自动化立体仓库 - WMS系统
zyx
2023-12-22 1cea8144b4ddd9ed19f8e2542b5374ca13c030f4
Merge branch 'hzjzwms' of http://47.97.1.152:5880/r/zy-asrs into tzhnewms
19个文件已添加
19个文件已修改
2824 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/LocInPrintMatController.java 134 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/LocOutPrintMatController.java 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/LocOwnerController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/MatController.java 110 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/MobileController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/LocDetlWarningDTO.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/LocInPrintMat.java 221 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/LocOutPrintMat.java 208 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/ManLocDetl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/MatPrint.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/param/LocOutAnfmePrintPara.java 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/LocInPrintMatMapper.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/LocOutPrintMatMapper.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/LocInPrintMatService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/LocOutPrintMatService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/LocInPrintMatServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/LocOutPrintMatServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java 103 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/CodeBuilder.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/config/AdminInterceptor.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/locInPrintMat.sql 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/locOutPrintMat.sql 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/LocDetlMapper.xml 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/LocInPrintMatMapper.xml 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/LocOutPrintMatMapper.xml 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ManLocDetlMapper.xml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/common.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/locDetl/locDetl.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/locDetlWarning/locDetlWarning.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/locInPrintMat/locInPrintMat.js 341 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/locOutPrintMat/locOutPrintMat.js 336 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/manLocDetl/manLocDetl.js 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/home/map.html 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/locDetlStatis/locDetlStatis.html 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/locInPrintMat/locInPrintMat.html 383 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/locOutPrintMat/locOutPrintMat.html 393 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/mat/mat.html 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/report/locDetl.html 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/LocInPrintMatController.java
New file
@@ -0,0 +1,134 @@
package com.zy.asrs.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.core.common.DateUtils;
import com.zy.asrs.entity.LocInPrintMat;
import com.zy.asrs.entity.Mat;
import com.zy.asrs.entity.MatPrint;
import com.zy.asrs.service.LocInPrintMatService;
import com.core.annotations.ManagerAuth;
import com.core.common.BaseRes;
import com.core.common.Cools;
import com.core.common.R;
import com.zy.common.CodeRes;
import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.*;
@RestController
public class LocInPrintMatController extends BaseController {
    @Autowired
    private LocInPrintMatService locInPrintMatService;
    @RequestMapping(value = "/locInPrintMat/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") String id) {
        return R.ok(locInPrintMatService.selectById(String.valueOf(id)));
    }
    @RequestMapping(value = "/locInPrintMat/list/auth")
    @ManagerAuth
    public R list(@RequestParam(defaultValue = "1")Integer curr,
                  @RequestParam(defaultValue = "10")Integer limit,
                  @RequestParam(required = false)String orderByField,
                  @RequestParam(required = false)String orderByType,
                  @RequestParam Map<String, Object> param){
        EntityWrapper<LocInPrintMat> wrapper = new EntityWrapper<>();
        excludeTrash(param);
        convert(param, wrapper);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
        wrapper.orderBy("status",true);
        wrapper.orderBy("create_time",false);
        return R.ok(locInPrintMatService.selectPage(new Page<>(curr, limit), wrapper));
    }
    private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){
        for (Map.Entry<String, Object> entry : map.entrySet()){
            String val = String.valueOf(entry.getValue());
            if (val.contains(RANGE_TIME_LINK)){
                String[] dates = val.split(RANGE_TIME_LINK);
                wrapper.ge(entry.getKey(), DateUtils.convert(dates[0]));
                wrapper.le(entry.getKey(), DateUtils.convert(dates[1]));
            } else {
                wrapper.like(entry.getKey(), val);
            }
        }
    }
    @RequestMapping(value = "/locInPrintMat/add/auth")
    @ManagerAuth
    public R add(LocInPrintMat locInPrintMat) {
        Date now = new Date();
        locInPrintMat.setUuid(String.valueOf(now.getTime()));
        locInPrintMat.setUpdateTime(now);
        locInPrintMat.setCreateBy(getUserId());
        locInPrintMat.setUpdateTime(now);
        locInPrintMat.setUpdateBy(getUserId());
        locInPrintMatService.insert(locInPrintMat);
        return R.ok();
    }
    @RequestMapping(value = "/locInPrintMat/update/auth")
    @ManagerAuth
    public R update(LocInPrintMat locInPrintMat){
        if (Cools.isEmpty(locInPrintMat) || null==locInPrintMat.getId()){
            return R.error();
        }
        locInPrintMatService.updateById(locInPrintMat);
        return R.ok();
    }
    @RequestMapping(value = "/locInPrintMat/delete/auth")
    @ManagerAuth
    public R delete(@RequestParam(value="ids[]") Long[] ids){
         for (Long id : ids){
            locInPrintMatService.deleteById(id);
        }
        return R.ok();
    }
    @RequestMapping(value = "/locInPrintMat/export/auth")
    @ManagerAuth
    public R export(@RequestBody JSONObject param){
        EntityWrapper<LocInPrintMat> wrapper = new EntityWrapper<>();
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        Map<String, Object> map = excludeTrash(param.getJSONObject("locInPrintMat"));
        convert(map, wrapper);
        List<LocInPrintMat> list = locInPrintMatService.selectList(wrapper);
        return R.ok(exportSupport(list, fields));
    }
    @RequestMapping(value = "/locInPrintMatQuery/auth")
    @ManagerAuth
    public R query(String condition) {
        EntityWrapper<LocInPrintMat> wrapper = new EntityWrapper<>();
        wrapper.like("id", condition);
        Page<LocInPrintMat> page = locInPrintMatService.selectPage(new Page<>(0, 10), wrapper);
        List<Map<String, Object>> result = new ArrayList<>();
        for (LocInPrintMat locInPrintMat : page.getRecords()){
            Map<String, Object> map = new HashMap<>();
            map.put("id", locInPrintMat.getId());
            map.put("value", locInPrintMat.getId());
            result.add(map);
        }
        return R.ok(result);
    }
    @RequestMapping(value = "/locInPrintMat/check/column/auth")
    @ManagerAuth
    public R query(@RequestBody JSONObject param) {
        Wrapper<LocInPrintMat> wrapper = new EntityWrapper<LocInPrintMat>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val"));
        if (null != locInPrintMatService.selectOne(wrapper)){
            return R.parse(BaseRes.REPEAT).add(getComment(LocInPrintMat.class, String.valueOf(param.get("key"))));
        }
        return R.ok();
    }
}
src/main/java/com/zy/asrs/controller/LocOutPrintMatController.java
New file
@@ -0,0 +1,123 @@
package com.zy.asrs.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.core.common.DateUtils;
import com.zy.asrs.entity.LocOutPrintMat;
import com.zy.asrs.service.LocOutPrintMatService;
import com.core.annotations.ManagerAuth;
import com.core.common.BaseRes;
import com.core.common.Cools;
import com.core.common.R;
import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.*;
@RestController
public class LocOutPrintMatController extends BaseController {
    @Autowired
    private LocOutPrintMatService locOutPrintMatService;
    @RequestMapping(value = "/locOutPrintMat/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") String id) {
        return R.ok(locOutPrintMatService.selectById(String.valueOf(id)));
    }
    @RequestMapping(value = "/locOutPrintMat/list/auth")
    @ManagerAuth
    public R list(@RequestParam(defaultValue = "1")Integer curr,
                  @RequestParam(defaultValue = "10")Integer limit,
                  @RequestParam(required = false)String orderByField,
                  @RequestParam(required = false)String orderByType,
                  @RequestParam Map<String, Object> param){
        EntityWrapper<LocOutPrintMat> wrapper = new EntityWrapper<>();
        excludeTrash(param);
        convert(param, wrapper);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
        return R.ok(locOutPrintMatService.selectPage(new Page<>(curr, limit), wrapper));
    }
    private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){
        for (Map.Entry<String, Object> entry : map.entrySet()){
            String val = String.valueOf(entry.getValue());
            if (val.contains(RANGE_TIME_LINK)){
                String[] dates = val.split(RANGE_TIME_LINK);
                wrapper.ge(entry.getKey(), DateUtils.convert(dates[0]));
                wrapper.le(entry.getKey(), DateUtils.convert(dates[1]));
            } else {
                wrapper.like(entry.getKey(), val);
            }
        }
    }
    @RequestMapping(value = "/locOutPrintMat/add/auth")
    @ManagerAuth
    public R add(LocOutPrintMat locOutPrintMat) {
        locOutPrintMatService.insert(locOutPrintMat);
        return R.ok();
    }
    @RequestMapping(value = "/locOutPrintMat/update/auth")
    @ManagerAuth
    public R update(LocOutPrintMat locOutPrintMat){
        if (Cools.isEmpty(locOutPrintMat) || null==locOutPrintMat.getId()){
            return R.error();
        }
        locOutPrintMatService.updateById(locOutPrintMat);
        return R.ok();
    }
    @RequestMapping(value = "/locOutPrintMat/delete/auth")
    @ManagerAuth
    public R delete(@RequestParam(value="ids[]") Long[] ids){
         for (Long id : ids){
            locOutPrintMatService.deleteById(id);
        }
        return R.ok();
    }
    @RequestMapping(value = "/locOutPrintMat/export/auth")
    @ManagerAuth
    public R export(@RequestBody JSONObject param){
        EntityWrapper<LocOutPrintMat> wrapper = new EntityWrapper<>();
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        Map<String, Object> map = excludeTrash(param.getJSONObject("locOutPrintMat"));
        convert(map, wrapper);
        List<LocOutPrintMat> list = locOutPrintMatService.selectList(wrapper);
        return R.ok(exportSupport(list, fields));
    }
    @RequestMapping(value = "/locOutPrintMatQuery/auth")
    @ManagerAuth
    public R query(String condition) {
        EntityWrapper<LocOutPrintMat> wrapper = new EntityWrapper<>();
        wrapper.like("id", condition);
        Page<LocOutPrintMat> page = locOutPrintMatService.selectPage(new Page<>(0, 10), wrapper);
        List<Map<String, Object>> result = new ArrayList<>();
        for (LocOutPrintMat locOutPrintMat : page.getRecords()){
            Map<String, Object> map = new HashMap<>();
            map.put("id", locOutPrintMat.getId());
            map.put("value", locOutPrintMat.getId());
            result.add(map);
        }
        return R.ok(result);
    }
    @RequestMapping(value = "/locOutPrintMat/check/column/auth")
    @ManagerAuth
    public R query(@RequestBody JSONObject param) {
        Wrapper<LocOutPrintMat> wrapper = new EntityWrapper<LocOutPrintMat>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val"));
        if (null != locOutPrintMatService.selectOne(wrapper)){
            return R.parse(BaseRes.REPEAT).add(getComment(LocOutPrintMat.class, String.valueOf(param.get("key"))));
        }
        return R.ok();
    }
}
src/main/java/com/zy/asrs/controller/LocOwnerController.java
@@ -118,7 +118,7 @@
        for (LocOwner locOwner : page.getRecords()){
            Map<String, Object> map = new HashMap<>();
            map.put("id", locOwner.getId());
            map.put("value", locOwner.getId());
            map.put("value", locOwner.getOwner());
            result.add(map);
        }
        return R.ok(result);
src/main/java/com/zy/asrs/controller/MatController.java
@@ -10,11 +10,11 @@
import com.core.annotations.ManagerAuth;
import com.core.common.*;
import com.core.exception.CoolException;
import com.zy.asrs.entity.Mat;
import com.zy.asrs.entity.MatPrint;
import com.zy.asrs.entity.OrderDetl;
import com.zy.asrs.entity.Pakout;
import com.zy.asrs.entity.*;
import com.zy.asrs.entity.param.LocOutAnfmePrintPara;
import com.zy.asrs.entity.result.KeyValueVo;
import com.zy.asrs.service.LocInPrintMatService;
import com.zy.asrs.service.LocOutPrintMatService;
import com.zy.asrs.service.MatService;
import com.zy.asrs.service.PakoutService;
import com.zy.asrs.utils.MatExcelListener;
@@ -45,6 +45,10 @@
    private SnowflakeIdWorker snowflakeIdWorker;
    @Autowired
    private PakoutService pakoutService;
    @Autowired
    private LocInPrintMatService locInPrintMatService;
    @Autowired
    private LocOutPrintMatService locOutPrintMatService;
    @RequestMapping(value = "/mat/auto/matnr/auth")
    public R autoMatnr(){
@@ -272,6 +276,104 @@
        return R.ok().add(res);
    }
    // 打印
    @RequestMapping(value = "/loc/in/mat/print/auth")
    @ManagerAuth(memo = "商品编码打印")
    public R locInMatCodePrint(@RequestParam(value = "param[]") Long[] ids) {
        if(Cools.isEmpty(ids)) {
            return R.parse(CodeRes.EMPTY);
        }
        List<MatPrint> res = new ArrayList<>();
        for (Long id : ids){
            LocInPrintMat locInPrintMat = locInPrintMatService.selectById(id);
            // 打印数据注入
            MatPrint print = new MatPrint();
            print.setMatnr(locInPrintMat.getMatnr());
            print.setMaktx(locInPrintMat.getMaktx());
            print.setBatch(locInPrintMat.getBatch());
            print.setAnfme(locInPrintMat.getAnfme());
            print.setLocNo(locInPrintMat.getLocNo());
            print.setOwnerId(locInPrintMat.getOwnerId());
            print.setOwner(locInPrintMat.getOwner$());
            print.setId(locInPrintMat.getId());
            res.add(print);
            locInPrintMat.setUpdateTime(new Date());
            locInPrintMat.setUpdateBy(getUserId());
            locInPrintMat.setStatus(2);
            locInPrintMatService.updateById(locInPrintMat);
        }
        return R.ok().add(res);
    }
    // 打印
    @RequestMapping(value = "/loc/out/mat/print/auth")
    @ManagerAuth(memo = "商品编码打印")
    public R locOutMatCodePrint(@RequestParam(value = "param[]") Long[] ids) {
        if(Cools.isEmpty(ids)) {
            return R.parse(CodeRes.EMPTY);
        }
        List<MatPrint> res = new ArrayList<>();
        List<String> memoList = new ArrayList<>();
        for (Long id : ids){
            LocOutPrintMat locOutPrintMat = locOutPrintMatService.selectById(id);
            // 打印数据注入
            MatPrint print = new MatPrint();
            print.setMatnr(locOutPrintMat.getMatnr());
            print.setMaktx(locOutPrintMat.getMaktx());
            print.setBatch(locOutPrintMat.getBatch());
            print.setAnfme(locOutPrintMat.getAnfme());
            print.setOwnerId(locOutPrintMat.getOwnerId());
            print.setOwner(locOutPrintMat.getOwner$());
            print.setId(locOutPrintMat.getId());
            res.add(print);
            print.setMemo(print.getMatnr()+";"+print.getBatch()+";"+print.getOwnerId());
            if (!memoList.contains(print.getMemo())){
                memoList.add(print.getMemo());
            }
            locOutPrintMat.setUpdateTime(new Date());
            locOutPrintMat.setUpdateBy(getUserId());
            locOutPrintMat.setStatus(2);
            locOutPrintMatService.updateById(locOutPrintMat);
        }
        List<LocOutAnfmePrintPara> locOutAnfmePrintParaList = new ArrayList<>();
        for (String memo : memoList){
            LocOutAnfmePrintPara locOutAnfmePrintPara = new LocOutAnfmePrintPara();
            int signInt = 0;
            Double[] anfme = new Double[]{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};
            for (MatPrint matPrint:res){
                if (!memo.equals(matPrint.getMemo())){
                    continue;
                }
                if (signInt==0){
                    locOutAnfmePrintPara.setMatnr(matPrint.getMatnr());
                    locOutAnfmePrintPara.setBatch(matPrint.getBatch());
                    locOutAnfmePrintPara.setOwner(matPrint.getOwner());
                    locOutAnfmePrintPara.setOwnerId(matPrint.getOwnerId());
                }
                if (signInt<17){
                    anfme[signInt] = matPrint.getAnfme();
                    signInt++;
                }else {
                    locOutAnfmePrintPara.setAnfme(anfme);
                    locOutAnfmePrintParaList.add(locOutAnfmePrintPara);
                    locOutAnfmePrintPara = new LocOutAnfmePrintPara();
                    locOutAnfmePrintPara.setMatnr(matPrint.getMatnr());
                    locOutAnfmePrintPara.setBatch(matPrint.getBatch());
                    locOutAnfmePrintPara.setOwner(matPrint.getOwner());
                    locOutAnfmePrintPara.setOwnerId(matPrint.getOwnerId());
                    signInt = 0;
                    anfme = new Double[]{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};
                    anfme[signInt] = matPrint.getAnfme();
                    signInt++;
                }
            }
            locOutAnfmePrintPara.setAnfme(anfme);
            locOutAnfmePrintParaList.add(locOutAnfmePrintPara);
        }
        return R.ok().add(locOutAnfmePrintParaList);
    }
    /*************************************** 数据相关 ***********************************************/
src/main/java/com/zy/asrs/controller/MobileController.java
@@ -403,9 +403,18 @@
        return mobileService.manDetlOrigInNo(json,getUser());
    }
//    @RequestMapping("/manDetl/out/origin")
//    @ManagerAuth(memo = "平库下架")
//    public R manDetlout(@RequestBody JSONObject json){
//        if (json == null){
//            return R.error("传入数据为空");
//        }
//        return mobileService.manDetlOriginOut(json,getUser());
//    }
    @RequestMapping("/manDetl/out/origin")
    @ManagerAuth(memo = "平库下架")
    public R manDetlout(@RequestBody JSONObject json){
    public R manDetlout2(@RequestBody JSONObject json){
        if (json == null){
            return R.error("传入数据为空");
        }
src/main/java/com/zy/asrs/entity/LocDetlWarningDTO.java
@@ -5,6 +5,7 @@
import com.baomidou.mybatisplus.annotations.TableField;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.asrs.service.LocOwnerService;
import com.zy.common.utils.Synchro;
import com.zy.system.entity.User;
import com.zy.system.service.UserService;
@@ -31,13 +32,19 @@
    private Date createTime;
    @ExcelProperty("规格")
    private String specs;
    @ExcelProperty("库存上限")
    @ExcelProperty("批次")
    private String batch;
    @ExcelProperty("货主Id")
    private String owner;
    @ExcelProperty("货主")
    private String ownerName;
//    @ExcelProperty("库存上限")
    private String inventoryMax;
    @ExcelProperty("库存下限")
//    @ExcelProperty("库存下限")
    private String inventoryMin;
    @ExcelProperty("库龄上限")
    private String inventoryAgeMax;
    @ExcelProperty("库存总数量")
//    @ExcelProperty("库存总数量")
    private Integer countAnfme;
    @ExcelProperty("在库天数")
    private Integer diffTime;
@@ -49,6 +56,24 @@
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
    }
    public String getOwner$(){
        LocOwnerService service = SpringUtils.getBean(LocOwnerService.class);
        LocOwner locOwner = service.selectById(this.owner);
        if (!Cools.isEmpty(locOwner)){
            return String.valueOf(locOwner.getOwner());
        }
        return null;
    }
    public String getOwnerName(){
        LocOwnerService service = SpringUtils.getBean(LocOwnerService.class);
        LocOwner locOwner = service.selectById(this.owner);
        if (!Cools.isEmpty(locOwner)){
            return String.valueOf(locOwner.getOwner());
        }
        return null;
    }
    public void sync(Object source) {
        Synchro.Copy(source, this);
    }
src/main/java/com/zy/asrs/entity/LocInPrintMat.java
New file
@@ -0,0 +1,221 @@
package com.zy.asrs.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.core.common.Cools;import java.text.SimpleDateFormat;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.zy.asrs.service.LocOwnerService;
import org.springframework.format.annotation.DateTimeFormat;
import com.core.common.SpringUtils;
import com.zy.system.service.UserService;
import com.zy.system.entity.User;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.core.common.SpringUtils;
import com.zy.system.service.UserService;
import com.zy.system.entity.User;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;
@Data
@TableName("asr_loc_in_print_mat")
public class LocInPrintMat implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * ID
     */
    @ApiModelProperty(value= "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 编号
     */
    @ApiModelProperty(value= "编号")
    private String uuid;
    /**
     * 打印情况 1: 未打印  2: 已打印
     */
    @ApiModelProperty(value= "打印情况 1: 未打印  2: 已打印  ")
    private Integer status;
    /**
     * 添加时间
     */
    @ApiModelProperty(value= "添加时间")
    @TableField("create_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 添加人员
     */
    @ApiModelProperty(value= "添加人员")
    @TableField("create_by")
    private Long createBy;
    /**
     * 修改时间
     */
    @ApiModelProperty(value= "修改时间")
    @TableField("update_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    /**
     * 修改人员
     */
    @ApiModelProperty(value= "修改人员")
    @TableField("update_by")
    private Long updateBy;
    /**
     * 备注
     */
    @ApiModelProperty(value= "备注")
    private String memo;
    /**
     * 物料编码
     */
    @ApiModelProperty(value= "物料编码")
    private String matnr;
    /**
     * 批次
     */
    @ApiModelProperty(value= "批次")
    private String batch;
    /**
     * 重量
     */
    @ApiModelProperty(value= "重量")
    private Double anfme;
    /**
     * 库位号
     */
    @ApiModelProperty(value= "库位号")
    @TableField("loc_no")
    private String locNo;
    /**
     * 商品名称
     */
    @ApiModelProperty(value= "商品名称")
    private String maktx;
    /**
     * 商品名称
     */
    @ApiModelProperty(value= "商品名称")
    private Long ownerId;
    public LocInPrintMat() {}
    public LocInPrintMat(String uuid,Integer status,Date createTime,Long createBy,Date updateTime,Long updateBy,String memo,String matnr,String batch,Double anfme,String locNo,String maktx) {
        this.uuid = uuid;
        this.status = status;
        this.createTime = createTime;
        this.createBy = createBy;
        this.updateTime = updateTime;
        this.updateBy = updateBy;
        this.memo = memo;
        this.matnr = matnr;
        this.batch = batch;
        this.anfme = anfme;
        this.locNo = locNo;
        this.maktx = maktx;
    }
    public LocInPrintMat(Date now,Long userId,String matnr,String batch,Double anfme,String locNo,String maktx) {
        this.uuid = String.valueOf(now.getTime());
        this.createTime = now;
        this.createBy = userId;
//        this.updateTime = now;
//        this.updateBy = userId;
        this.matnr = matnr;
        this.batch = batch;
        this.anfme = anfme;
        this.locNo = locNo;
        this.maktx = maktx;
    }
//    LocInPrintMat locInPrintMat = new LocInPrintMat(
//            null,    // 编号
//            null,    // 打印情况
//            null,    // 添加时间
//            null,    // 添加人员
//            null,    // 修改时间
//            null,    // 修改人员
//            null,    // 备注
//            null,    // 物料编码
//            null,    // 批次
//            null,    // 重量
//            null,    // 库位号
//            null    // 商品名称
//    );
    public String getStatus$(){
        if (null == this.status){ return null; }
        switch (this.status){
            case 1:
                return "未打印";
            case 2:
                return "已打印";
            default:
                return String.valueOf(this.status);
        }
    }
    public String getCreateTime$(){
        if (Cools.isEmpty(this.createTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
    }
    public String getCreateBy$(){
        UserService service = SpringUtils.getBean(UserService.class);
        User user = service.selectById(this.createBy);
        if (!Cools.isEmpty(user)){
            return String.valueOf(user.getUsername());
        }
        return null;
    }
    public String getOwner$(){
        LocOwnerService locOwnerService = SpringUtils.getBean(LocOwnerService.class);
        LocOwner locOwner = locOwnerService.selectById(this.ownerId);
        if (!Cools.isEmpty(locOwner)){
            return String.valueOf(locOwner.getOwner());
        }
        return null;
    }
    public String getUpdateTime$(){
        if (Cools.isEmpty(this.updateTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
    }
    public String getUpdateBy$(){
        UserService service = SpringUtils.getBean(UserService.class);
        User user = service.selectById(this.updateBy);
        if (!Cools.isEmpty(user)){
            return String.valueOf(user.getUsername());
        }
        return null;
    }
}
src/main/java/com/zy/asrs/entity/LocOutPrintMat.java
New file
@@ -0,0 +1,208 @@
package com.zy.asrs.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.core.common.Cools;import java.text.SimpleDateFormat;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.zy.asrs.service.LocOwnerService;
import org.springframework.format.annotation.DateTimeFormat;
import com.core.common.SpringUtils;
import com.zy.system.service.UserService;
import com.zy.system.entity.User;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.core.common.SpringUtils;
import com.zy.system.service.UserService;
import com.zy.system.entity.User;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;
@Data
@TableName("asr_loc_out_print_mat")
public class LocOutPrintMat implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * ID
     */
    @ApiModelProperty(value= "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 编号
     */
    @ApiModelProperty(value= "编号")
    private String uuid;
    /**
     * 打印情况 1: 未打印  2: 已打印
     */
    @ApiModelProperty(value= "打印情况 1: 未打印  2: 已打印  ")
    private Integer status;
    /**
     * 添加时间
     */
    @ApiModelProperty(value= "添加时间")
    @TableField("create_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 添加人员
     */
    @ApiModelProperty(value= "添加人员")
    @TableField("create_by")
    private Long createBy;
    /**
     * 修改时间
     */
    @ApiModelProperty(value= "修改时间")
    @TableField("update_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    /**
     * 修改人员
     */
    @ApiModelProperty(value= "修改人员")
    @TableField("update_by")
    private Long updateBy;
    /**
     * 备注
     */
    @ApiModelProperty(value= "备注")
    private String memo;
    /**
     * 物料编码
     */
    @ApiModelProperty(value= "物料编码")
    private String matnr;
    /**
     * 批次
     */
    @ApiModelProperty(value= "批次")
    private String batch;
    /**
     * 重量
     */
    @ApiModelProperty(value= "重量")
    private Double anfme;
    /**
     * 库位号
     */
    @ApiModelProperty(value= "库位号")
    @TableField("loc_no")
    private String locNo;
    /**
     * 商品名称
     */
    @ApiModelProperty(value= "商品名称")
    private String maktx;
    /**
     * 拥有者
     */
    @ApiModelProperty(value= "拥有者")
    @TableField("owner_id")
    private Long ownerId;
    public LocOutPrintMat() {}
    public LocOutPrintMat(String uuid,Integer status,Date createTime,Long createBy,Date updateTime,Long updateBy,String memo,String matnr,String batch,Double anfme,String locNo,String maktx,Long ownerId) {
        this.uuid = uuid;
        this.status = status;
        this.createTime = createTime;
        this.createBy = createBy;
        this.updateTime = updateTime;
        this.updateBy = updateBy;
        this.memo = memo;
        this.matnr = matnr;
        this.batch = batch;
        this.anfme = anfme;
        this.locNo = locNo;
        this.maktx = maktx;
        this.ownerId = ownerId;
    }
    public LocOutPrintMat(Date now,Long userId,String matnr,String batch,Double anfme,String locNo,String maktx) {
        this.uuid = String.valueOf(now.getTime());
        this.createTime = now;
        this.createBy = userId;
//        this.updateTime = now;
//        this.updateBy = userId;
        this.matnr = matnr;
        this.batch = batch;
        this.anfme = anfme;
        this.locNo = locNo;
        this.maktx = maktx;
    }
    public String getStatus$(){
        if (null == this.status){ return null; }
        switch (this.status){
            case 1:
                return "未打印";
            case 2:
                return "已打印";
            default:
                return String.valueOf(this.status);
        }
    }
    public String getCreateTime$(){
        if (Cools.isEmpty(this.createTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
    }
    public String getCreateBy$(){
        UserService service = SpringUtils.getBean(UserService.class);
        User user = service.selectById(this.createBy);
        if (!Cools.isEmpty(user)){
            return String.valueOf(user.getNickname());
        }
        return null;
    }
    public String getUpdateTime$(){
        if (Cools.isEmpty(this.updateTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
    }
    public String getUpdateBy$(){
        UserService service = SpringUtils.getBean(UserService.class);
        User user = service.selectById(this.updateBy);
        if (!Cools.isEmpty(user)){
            return String.valueOf(user.getNickname());
        }
        return null;
    }
    public String getOwner$(){
        LocOwnerService locOwnerService = SpringUtils.getBean(LocOwnerService.class);
        LocOwner locOwner = locOwnerService.selectById(this.ownerId);
        if (!Cools.isEmpty(locOwner)){
            return String.valueOf(locOwner.getOwner());
        }
        return null;
    }
}
src/main/java/com/zy/asrs/entity/ManLocDetl.java
@@ -199,6 +199,13 @@
    private Date modiTime;
    /**
     * 添加时间
     */
    @ApiModelProperty(value= "生产日期")
    @TableField("produce_time")
    private Date produceTime;
    /**
     * 备注
     */
    @ApiModelProperty(value= "备注")
@@ -329,6 +336,13 @@
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
    }
    public String getProduceTimeTime$(){
        if (Cools.isEmpty(this.produceTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.produceTime);
    }
    public String getUpdateBy$(){
        UserService service = SpringUtils.getBean(UserService.class);
        User user = service.selectById(this.updateBy);
src/main/java/com/zy/asrs/entity/MatPrint.java
@@ -34,6 +34,42 @@
    private String specs;
    /**
     * 物料批次
     */
    private String batch;
    /**
     * 数量
     */
    private Double anfme;
    /**
     * 库位号
     */
    private String locNo;
    /**
     * 库位号
     */
    private Long id;
    /**
     * 库位号
     */
    private Long index;
    /**
     * 货主号
     */
    private Long ownerId;
    /**
     * 货主
     */
    private String owner;
    /**
     * 备注
     */
    private String memo;
src/main/java/com/zy/asrs/entity/param/LocOutAnfmePrintPara.java
New file
@@ -0,0 +1,83 @@
package com.zy.asrs.entity.param;
import lombok.Data;
@Data
public class LocOutAnfmePrintPara {
    /**
     * 物料编码
     */
    private String matnr;
    /**
     * 物料名称
     */
    private String maktx;
    /**
     * 物料规格
     */
    private String specs;
    /**
     * 物料批次
     */
    private String batch;
    /**
     * 货主号
     */
    private Long ownerId;
    /**
     * 货主
     */
    private String owner;
    /**
     * 数量
     */
    private Double[] anfme;
    private Double anfme1;
    private Double anfme2;
    private Double anfme3;
    private Double anfme4;
    private Double anfme5;
    private Double anfme6;
    private Double anfme7;
    private Double anfme8;
    private Double anfme9;
    private Double anfme10;
    private Double anfme11;
    private Double anfme12;
    private Double anfme13;
    private Double anfme14;
    private Double anfme15;
    private Double anfme16;
    private Double anfme17;
    private Double anfme18;
    public void setAnfme(Double[] anfme){
        this.anfme = anfme;
        this.anfme1 = anfme[0];
        this.anfme2 = anfme[1];
        this.anfme3 = anfme[2];
        this.anfme4 = anfme[3];
        this.anfme5 = anfme[4];
        this.anfme6 = anfme[5];
        this.anfme7 = anfme[6];
        this.anfme8 = anfme[7];
        this.anfme9 = anfme[8];
        this.anfme10 = anfme[9];
        this.anfme11 = anfme[10];
        this.anfme12 = anfme[11];
        this.anfme13 = anfme[12];
        this.anfme14 = anfme[13];
        this.anfme15 = anfme[14];
        this.anfme16 = anfme[15];
        this.anfme17 = anfme[16];
    }
}
src/main/java/com/zy/asrs/mapper/LocInPrintMatMapper.java
New file
@@ -0,0 +1,12 @@
package com.zy.asrs.mapper;
import com.zy.asrs.entity.LocInPrintMat;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
@Mapper
@Repository
public interface LocInPrintMatMapper extends BaseMapper<LocInPrintMat> {
}
src/main/java/com/zy/asrs/mapper/LocOutPrintMatMapper.java
New file
@@ -0,0 +1,12 @@
package com.zy.asrs.mapper;
import com.zy.asrs.entity.LocOutPrintMat;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
@Mapper
@Repository
public interface LocOutPrintMatMapper extends BaseMapper<LocOutPrintMat> {
}
src/main/java/com/zy/asrs/service/LocInPrintMatService.java
New file
@@ -0,0 +1,8 @@
package com.zy.asrs.service;
import com.zy.asrs.entity.LocInPrintMat;
import com.baomidou.mybatisplus.service.IService;
public interface LocInPrintMatService extends IService<LocInPrintMat> {
}
src/main/java/com/zy/asrs/service/LocOutPrintMatService.java
New file
@@ -0,0 +1,8 @@
package com.zy.asrs.service;
import com.zy.asrs.entity.LocOutPrintMat;
import com.baomidou.mybatisplus.service.IService;
public interface LocOutPrintMatService extends IService<LocOutPrintMat> {
}
src/main/java/com/zy/asrs/service/impl/LocInPrintMatServiceImpl.java
New file
@@ -0,0 +1,12 @@
package com.zy.asrs.service.impl;
import com.zy.asrs.mapper.LocInPrintMatMapper;
import com.zy.asrs.entity.LocInPrintMat;
import com.zy.asrs.service.LocInPrintMatService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
@Service("locInPrintMatService")
public class LocInPrintMatServiceImpl extends ServiceImpl<LocInPrintMatMapper, LocInPrintMat> implements LocInPrintMatService {
}
src/main/java/com/zy/asrs/service/impl/LocOutPrintMatServiceImpl.java
New file
@@ -0,0 +1,12 @@
package com.zy.asrs.service.impl;
import com.zy.asrs.mapper.LocOutPrintMatMapper;
import com.zy.asrs.entity.LocOutPrintMat;
import com.zy.asrs.service.LocOutPrintMatService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
@Service("locOutPrintMatService")
public class LocOutPrintMatServiceImpl extends ServiceImpl<LocOutPrintMatMapper, LocOutPrintMat> implements LocOutPrintMatService {
}
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -29,6 +29,7 @@
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
/**
@@ -88,6 +89,15 @@
    @Autowired
    private OriginRuleService originRuleService;
    @Autowired
    private LocInPrintMatService locInPrintMatService;
    @Autowired
    private LocOutPrintMatService locOutPrintMatService;
    @Autowired
    private LocOwnerService locOwnerService;
@@ -957,9 +967,23 @@
    @Override
    public R manDetlOrigin(JSONObject json, User user) {
        Date now = new Date();
        String jsonLocNo = (String) json.get("locNo"); //获取库位码
        String ownerName = (String) json.get("owner"); //获取拥有者
        LocOwner locOwner = locOwnerService.selectOne(new EntityWrapper<LocOwner>().eq("owner", ownerName));
        Long ownerId = locOwner.getId();
        String jsonCode = (String) json.get("code"); //获取条码
        String jsonOrigin = (String) json.get("origin"); //获取来源地
        if (Cools.isEmpty(jsonLocNo)){
            return R.error("库位号参数为空!");
        }else if (Cools.isEmpty(ownerId)){
            return R.error("拥有者参数为空!");
        }else if (Cools.isEmpty(jsonCode)){
            return R.error("条码参数为空!");
        }else if (Cools.isEmpty(jsonOrigin)){
            return R.error("来源地参数为空!");
        }
        Integer jsonOwner = ownerId.intValue(); //获取拥有者
        OriginRule originRule = originRuleService.selectOne(new EntityWrapper<OriginRule>()
                .eq("origin_address", jsonOrigin));
@@ -992,8 +1016,13 @@
            if (Cools.isEmpty(mat)){
                return R.error("未查询到商品信息");
            }
            //增加打印档案
            LocInPrintMat locInPrintMat = new LocInPrintMat(now,user.getId(), mat.getMatnr(),jsonOriginDetl.getBatch(),jsonOriginDetl.getAnfme(),jsonLocNo,mat.getMaktx());
            locInPrintMat.setOwnerId(ownerId);
            locInPrintMatService.insert(locInPrintMat);
            Wrapper<ManLocDetl> manLocDetlWrapper = new EntityWrapper<ManLocDetl>().eq("loc_no", jsonLocNo).eq("matnr", jsonOriginDetl.getMatnr()).eq("batch",date);
            Wrapper<ManLocDetl> manLocDetlWrapper = new EntityWrapper<ManLocDetl>().eq("loc_no", jsonLocNo)
                    .eq("matnr", jsonOriginDetl.getMatnr()).eq("batch",date).eq("owner",jsonOwner);
            ManLocDetl manLocDetl1 = manLocDetlService.selectOne(manLocDetlWrapper);
            if(!Cools.isEmpty(manLocDetl1)){
                BigDecimal inAnfme = BigDecimal.valueOf(jsonOriginDetl.getAnfme());
@@ -1006,7 +1035,6 @@
                }
            }else {
                Date now = new Date();
                ManLocDetl manLocDetl = new ManLocDetl();  //初始化库存实体类
                manLocDetl.sync(mat);
                manLocDetl.setLocNo(node.getUuid());
@@ -1025,6 +1053,13 @@
                manLocDetl.setModiTime(now);
                // manLocDetl.setOrderNo(waitPakin.getOrderNo());
                manLocDetl.setStockFreeze(1);
                manLocDetl.setOwner(jsonOwner);
                try {
                    Date produceTime = DateUtils.convert(manLocDetl.getBatch(),DateUtils.yyyyMMdd);
                    manLocDetl.setProduceTime(produceTime);
                } catch (Exception e) {
                    manLocDetl.setProduceTime(now);
                }
                if (!manLocDetlService.insert(manLocDetl)){  //数据库插入实体类信息
                    return R.error("物料信息入库失败");
@@ -1037,8 +1072,17 @@
    @Override
    public R manDetlOrigInNo(JSONObject json, User user) {
        Date now = new Date();
        String jsonLocNo = (String) json.get("locNo"); //获取库位码
        String ownerName = (String) json.get("owner"); //获取拥有者
        LocOwner locOwner = locOwnerService.selectOne(new EntityWrapper<LocOwner>().eq("owner", ownerName));
        Long ownerId = locOwner.getId();
        if (Cools.isEmpty(jsonLocNo)){
            return R.error("库位号参数为空!");
        }else if (Cools.isEmpty(ownerId)){
            return R.error("拥有者参数为空!");
        }
        Integer jsonOwner = ownerId.intValue(); //获取拥有者
        Node node = nodeService.selectOne(new EntityWrapper<Node>().eq("name", jsonLocNo));  //获取对应库位信息
        if (Cools.isEmpty(node)){
            return R.error("未查询到库位信息");
@@ -1052,8 +1096,13 @@
            if (Cools.isEmpty(mat)){
                return R.error("未查询到商品信息");
            }
            //增加打印档案
            LocInPrintMat locInPrintMat = new LocInPrintMat(now,user.getId(), mat.getMatnr(),jsonOriginDetl.getBatch(),jsonOriginDetl.getAnfme(),jsonLocNo,mat.getMaktx());
            locInPrintMat.setOwnerId(ownerId);
            locInPrintMatService.insert(locInPrintMat);
            Wrapper<ManLocDetl> manLocDetlWrapper = new EntityWrapper<ManLocDetl>().eq("loc_no", jsonLocNo).eq("matnr", jsonOriginDetl.getMatnr()).eq("batch",jsonOriginDetl.getBatch());
            Wrapper<ManLocDetl> manLocDetlWrapper = new EntityWrapper<ManLocDetl>().eq("loc_no", jsonLocNo)
                    .eq("matnr", jsonOriginDetl.getMatnr()).eq("batch",jsonOriginDetl.getBatch()).eq("owner",jsonOwner);
            ManLocDetl manLocDetl1 = manLocDetlService.selectOne(manLocDetlWrapper);
            if(!Cools.isEmpty(manLocDetl1)){
                BigDecimal inAnfme = BigDecimal.valueOf(jsonOriginDetl.getAnfme());
@@ -1066,7 +1115,6 @@
                }
            }else {
                Date now = new Date();
                ManLocDetl manLocDetl = new ManLocDetl();  //初始化库存实体类
                manLocDetl.sync(mat);
                manLocDetl.setLocNo(node.getUuid());
@@ -1083,9 +1131,15 @@
                manLocDetl.setCreateTime(now);
                manLocDetl.setUpdateBy(user.getId());
                manLocDetl.setModiTime(now);
                manLocDetl.setOwner(jsonOwner);
                // manLocDetl.setOrderNo(waitPakin.getOrderNo());
                manLocDetl.setStockFreeze(1);
                try {
                    Date produceTime = DateUtils.convert(jsonOriginDetl.getBatch(),DateUtils.yyyyMMdd);
                    manLocDetl.setProduceTime(produceTime);
                } catch (Exception e) {
                    manLocDetl.setProduceTime(now);
                }
                if (!manLocDetlService.insert(manLocDetl)){  //数据库插入实体类信息
                    return R.error("物料信息入库失败");
                }
@@ -1097,24 +1151,35 @@
    @Override
    public R manDetlOriginOut(JSONObject json, User user) {
        String jsonLocNo = (String) json.get("locNo"); //获取库位码
        Date now = new Date();
        JSONArray combMats = json.getJSONArray("combMats");
        List<MatPrint> matPrintList=new ArrayList<>();
        List<Long> ids=new ArrayList<>();
        for (int i = 0; i < combMats.size(); i++) {
            OrderDetl jsonOriginDetl = combMats.getObject(i, OrderDetl.class);
            Wrapper<ManLocDetl> manLocDetlWrapper = new EntityWrapper<ManLocDetl>().eq("loc_no", jsonLocNo).eq("matnr", jsonOriginDetl.getMatnr()).eq("batch", jsonOriginDetl.getBatch());
            MatPrint matPrintNow = combMats.getObject(i, MatPrint.class);
            if (!ids.contains(matPrintNow.getIndex())){
                ids.add(matPrintNow.getIndex());
                matPrintList.add(matPrintNow);
            }
        }
        for (MatPrint jsonOriginDetl:matPrintList) {
            Double parseLong = jsonOriginDetl.getAnfme();
            Long ownerId = Long.parseLong(jsonOriginDetl.getOwner());
            jsonOriginDetl.setOwnerId(ownerId);
            Wrapper<ManLocDetl> manLocDetlWrapper = new EntityWrapper<ManLocDetl>().eq("loc_no", jsonOriginDetl.getLocNo())
                    .eq("matnr", jsonOriginDetl.getMatnr()).eq("batch", jsonOriginDetl.getBatch()).eq("owner",jsonOriginDetl.getOwnerId());
            ManLocDetl manLocDetl = manLocDetlService.selectOne(manLocDetlWrapper);
            if (Cools.isEmpty(manLocDetl)){
                return R.error("未商品明细信息!库位号:"+jsonLocNo+";商品编号:"+jsonOriginDetl.getMatnr()+"批次:"+jsonOriginDetl.getBatch());
                return R.error("未查询到商品明细信息!库位号:"+jsonOriginDetl.getLocNo()+";商品编号:"+jsonOriginDetl.getMatnr()+"批次:"+jsonOriginDetl.getBatch()+"货主"+jsonOriginDetl.getOwnerId());
            }
            BigDecimal outAnfme = BigDecimal.valueOf(jsonOriginDetl.getAnfme());
            BigDecimal outAnfme = BigDecimal.valueOf(parseLong);
            BigDecimal anfme = BigDecimal.valueOf(manLocDetl.getAnfme());
            if (manLocDetl.getAnfme() > jsonOriginDetl.getAnfme()){
            if (manLocDetl.getAnfme() > parseLong){
                BigDecimal num = anfme.subtract(outAnfme);
                manLocDetl.setAnfme(num.doubleValue());
                manLocDetl.setUpdateBy(user.getId());
                manLocDetl.setModiTime(now);
                if (!manLocDetlService.update(manLocDetl,manLocDetlWrapper)) {
                    return R.error("物料信息下架失败");
                }
@@ -1124,8 +1189,12 @@
                    return R.error("物料信息删除失败");
                }
            }
        }
        for (MatPrint jsonOriginDetl:matPrintList) {
            //增加打印档案
            LocOutPrintMat locOutPrintMat = new LocOutPrintMat(now, user.getId(), jsonOriginDetl.getMatnr(), jsonOriginDetl.getBatch(), jsonOriginDetl.getAnfme(), jsonOriginDetl.getLocNo(), jsonOriginDetl.getMaktx());
            locOutPrintMat.setOwnerId(jsonOriginDetl.getOwnerId());
            locOutPrintMatService.insert(locOutPrintMat);
        }
        return R.ok();
    }
src/main/java/com/zy/common/CodeBuilder.java
@@ -17,10 +17,10 @@
//        generator.table="sys_host";
        // sqlserver
        generator.sqlOsType = SqlOsType.SQL_SERVER;
        generator.url="192.168.4.22:1433;databasename=hzjzasrs";
        generator.url="127.0.0.1:1433;databasename=hzjzasrs";
        generator.username="sa";
        generator.password="sa@123";
        generator.table="man_origin_rule";
        generator.table="asr_loc_out_print_mat";
        generator.packagePath="com.zy.asrs";
        generator.build();
    }
src/main/java/com/zy/common/config/AdminInterceptor.java
@@ -115,8 +115,8 @@
            User user = userService.selectById(userLogin.getUserId());
//            String deToken = Cools.deTokn(token, user.getPassword());
//            long timestamp = Long.parseLong(deToken.substring(0, 13));
            // 15分钟后过期
            if (System.currentTimeMillis() - userLogin.getCreateTime().getTime() > 900000){
            // 15分钟后过期  一天
            if (System.currentTimeMillis() - userLogin.getCreateTime().getTime() > 86400000){
                Http.response(response, BaseRes.DENIED);
                return false;
            }
src/main/java/locInPrintMat.sql
New file
@@ -0,0 +1,18 @@
-- save locInPrintMat record
-- mysql
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locInPrintMat/locInPrintMat.html', 'locInPrintMat管理', null , '2', null , '1');
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locInPrintMat#view', '查询', '', '3', '0', '1');
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locInPrintMat#btn-add', '新增', '', '3', '1', '1');
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locInPrintMat#btn-edit', '编辑', '', '3', '2', '1');
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locInPrintMat#btn-delete', '删除', '', '3', '3', '1');
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locInPrintMat#btn-export', '导出', '', '3', '4', '1');
-- sqlserver
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locInPrintMat/locInPrintMat.html', N'入库条码打印', '221', '2', '4', '1');
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locInPrintMat#view', N'查询', '70603', '3', '0', '1');
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locInPrintMat#btn-add', N'新增', '70603', '3', '1', '1');
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locInPrintMat#btn-edit', N'编辑', '70603', '3', '2', '1');
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locInPrintMat#btn-delete', N'删除', '70603', '3', '3', '1');
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locInPrintMat#btn-export', N'导出', '70603', '3', '4', '1');
src/main/java/locOutPrintMat.sql
New file
@@ -0,0 +1,18 @@
-- save locOutPrintMat record
-- mysql
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locOutPrintMat/locOutPrintMat.html', 'locOutPrintMat管理', null , '2', null , '1');
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locOutPrintMat#view', '查询', '', '3', '0', '1');
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locOutPrintMat#btn-add', '新增', '', '3', '1', '1');
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locOutPrintMat#btn-edit', '编辑', '', '3', '2', '1');
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locOutPrintMat#btn-delete', '删除', '', '3', '3', '1');
insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'locOutPrintMat#btn-export', '导出', '', '3', '4', '1');
-- sqlserver
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locOutPrintMat/locOutPrintMat.html', N'出库数据打印', '221', '2', '10', '1');
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locOutPrintMat#view', N'查询', '70609', '3', '0', '1');
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locOutPrintMat#btn-add', N'新增', '70609', '3', '1', '1');
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locOutPrintMat#btn-edit', N'编辑', '70609', '3', '2', '1');
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locOutPrintMat#btn-delete', N'删除', '70609', '3', '3', '1');
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'locOutPrintMat#btn-export', N'导出', '70609', '3', '4', '1');
src/main/resources/mapper/LocDetlMapper.xml
@@ -122,6 +122,9 @@
        <if test="crnNo!=null and crnNo!='' ">
            and b.crn_no=#{crnNo}
        </if>
        <if test="owner!=null and owner!='' ">
            and a.owner=#{owner}
        </if>
    </sql>
    <select id="getStockOutPage" resultMap="BaseResultMap">
@@ -573,10 +576,11 @@
        ROW_NUMBER() over (order by sum(a.anfme) desc) as row
        , a.matnr
        , sum(a.anfme) as anfme
        , a.owner
        from asr_loc_detl_all a
        where 1=1
        <include refid="stockOutCondition"></include>
        group by a.matnr
        group by a.matnr, a.owner
        ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
    </select>
@@ -584,11 +588,11 @@
        select count(1) as count from
        (
        select
        a.matnr
        a.matnr, a.owner
        from asr_loc_detl_all a
        where 1=1
        <include refid="stockOutCondition"></include>
        group by a.matnr
        group by a.matnr, a.owner
        ) b
    </select>
@@ -684,17 +688,19 @@
        FROM
        (
        SELECT
        loc_no,
        DISTINCT loc_no,
        locd.matnr,
        locd.maktx,
        create_time,
        locd.owner,
        locd.batch,
        produce_time as create_time,
        produce_time,
        locd.specs,
        locd.unit,
        inventory_max,
        inventory_min,
        inventory_age_max,
        count_anfme,
        DATEDIFF( DAY, create_time, GETDATE( ) ) AS [diff_time]
        DATEDIFF( DAY, produce_time, GETDATE( ) ) AS [diff_time]
        FROM
        man_loc_detl locd
        LEFT JOIN (
@@ -709,10 +715,10 @@
        count_anfme
        FROM
        man_mat
        RIGHT JOIN ( SELECT matnr, SUM ( anfme ) AS count_anfme FROM man_loc_detl loc GROUP BY matnr ) aa ON aa.matnr = man_mat.matnr
        RIGHT JOIN ( SELECT matnr,batch,owner, SUM ( anfme ) AS count_anfme FROM man_loc_detl loc GROUP BY matnr,batch,owner ) aa ON aa.matnr = man_mat.matnr
        ) warn ON locd.matnr = warn.matnr
        WHERE
        DATEDIFF( DAY, create_time, GETDATE( ) ) > inventory_age_max
        DATEDIFF( DAY, produce_time, GETDATE( ) ) > inventory_age_max
        ) t
        WHERE
        1 = 1
@@ -731,17 +737,19 @@
        FROM
        (
        SELECT
        loc_no,
        DISTINCT loc_no,
        locd.matnr,
        locd.maktx,
        create_time,
        locd.owner,
        locd.batch,
        produce_time as create_time,
        produce_time,
        locd.specs,
        locd.unit,
        inventory_max,
        inventory_min,
        inventory_age_max,
        count_anfme,
        DATEDIFF( DAY, create_time, GETDATE( ) ) AS [diff_time]
        DATEDIFF( DAY, produce_time, GETDATE( ) ) AS [diff_time]
        FROM
        man_loc_detl locd
        LEFT JOIN (
@@ -756,10 +764,10 @@
        count_anfme
        FROM
        man_mat
        RIGHT JOIN ( SELECT matnr, SUM ( anfme ) AS count_anfme FROM man_loc_detl loc GROUP BY matnr ) aa ON aa.matnr = man_mat.matnr
        RIGHT JOIN ( SELECT matnr,batch,owner, SUM ( anfme ) AS count_anfme FROM man_loc_detl loc GROUP BY matnr,batch,owner ) aa ON aa.matnr = man_mat.matnr
        ) warn ON locd.matnr = warn.matnr
        WHERE
        DATEDIFF( DAY, create_time, GETDATE( ) ) > inventory_age_max
        DATEDIFF( DAY, produce_time, GETDATE( ) ) > inventory_age_max
        ) t
        WHERE
        1 = 1
src/main/resources/mapper/LocInPrintMatMapper.xml
New file
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zy.asrs.mapper.LocInPrintMatMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.zy.asrs.entity.LocInPrintMat">
        <id column="id" property="id" />
        <result column="uuid" property="uuid" />
        <result column="status" property="status" />
        <result column="create_time" property="createTime" />
        <result column="create_by" property="createBy" />
        <result column="update_time" property="updateTime" />
        <result column="update_by" property="updateBy" />
        <result column="memo" property="memo" />
        <result column="matnr" property="matnr" />
        <result column="batch" property="batch" />
        <result column="anfme" property="anfme" />
        <result column="loc_no" property="locNo" />
        <result column="maktx" property="maktx" />
        <result column="owner_id" property="ownerId" />
        <result column="owner" property="owner" />
    </resultMap>
</mapper>
src/main/resources/mapper/LocOutPrintMatMapper.xml
New file
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zy.asrs.mapper.LocOutPrintMatMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.zy.asrs.entity.LocOutPrintMat">
        <id column="id" property="id" />
        <result column="uuid" property="uuid" />
        <result column="status" property="status" />
        <result column="create_time" property="createTime" />
        <result column="create_by" property="createBy" />
        <result column="update_time" property="updateTime" />
        <result column="update_by" property="updateBy" />
        <result column="memo" property="memo" />
        <result column="matnr" property="matnr" />
        <result column="batch" property="batch" />
        <result column="anfme" property="anfme" />
        <result column="loc_no" property="locNo" />
        <result column="maktx" property="maktx" />
        <result column="owner_id" property="ownerId" />
    </resultMap>
</mapper>
src/main/resources/mapper/ManLocDetlMapper.xml
@@ -29,6 +29,7 @@
        <result column="create_time" property="createTime" />
        <result column="update_by" property="updateBy" />
        <result column="modi_time" property="modiTime" />
        <result column="produce_time" property="produceTime" />
        <result column="memo" property="memo" />
        <result column="owner" property="owner" />
        <result column="payment" property="payment" />
@@ -373,17 +374,19 @@
        FROM
        (
        SELECT
        loc_no,
        DISTINCT loc_no,
        locd.matnr,
        locd.maktx,
        create_time,
        locd.owner,
        locd.batch,
        produce_time as create_time,
        produce_time,
        locd.specs,
        locd.unit,
        inventory_max,
        inventory_min,
        inventory_age_max,
        count_anfme,
        DATEDIFF( DAY, create_time, GETDATE( ) ) AS [diff_time]
        DATEDIFF( DAY, produce_time, GETDATE( ) ) AS [diff_time]
        FROM
        man_loc_detl locd
        LEFT JOIN (
@@ -398,10 +401,10 @@
        count_anfme
        FROM
        man_mat
        RIGHT JOIN ( SELECT matnr, SUM ( anfme ) AS count_anfme FROM man_loc_detl loc GROUP BY matnr ) aa ON aa.matnr = man_mat.matnr
        RIGHT JOIN ( SELECT matnr,batch,owner, SUM ( anfme ) AS count_anfme FROM man_loc_detl loc GROUP BY matnr,batch,owner ) aa ON aa.matnr = man_mat.matnr
        ) warn ON locd.matnr = warn.matnr
        WHERE
        DATEDIFF( DAY, create_time, GETDATE( ) ) > inventory_age_max
        DATEDIFF( DAY, produce_time, GETDATE( ) ) > inventory_age_max
        OR count_anfme > inventory_max
        OR count_anfme &lt; inventory_min
        ) t
src/main/webapp/static/js/common.js
@@ -274,6 +274,7 @@
    ,{field: 'source$', align: 'center',title: '制购', hide: true}
    ,{field: 'check$', align: 'center',title: '要求检验', hide: true}
    ,{field: 'danger$', align: 'center',title: '危险品', hide: true}
    ,{field: 'owner$', align: 'center',title: '货主', hide: false}
]
function getQueryVariable(variable)
src/main/webapp/static/js/locDetl/locDetl.js
@@ -7,7 +7,7 @@
        ,{field: 'orderNo', align: 'center',title: '单据编号', hide: false}
        ,{field: 'batch', align: 'center',title: '批号', width: 200, sort:true}
        ,{field: 'anfme', align: 'center',title: '数量'}
        ,{field: 'zpallet', align: 'center',title: '托盘条码'}
        ,{field: 'zpallet', align: 'center',title: '托盘条码',hide: true}
        ,{field: 'specs', align: 'center',title: '配置',hide: true}
        ,{field: 'model', align: 'center',title: '代码', hide: true}
        ,{field: 'color', align: 'center',title: '颜色', hide: true}
@@ -34,6 +34,7 @@
        ,{field: 'source$', align: 'center',title: '制购', hide: true}
        ,{field: 'check$', align: 'center',title: '要求检验', hide: true}
        ,{field: 'danger$', align: 'center',title: '危险品', hide: true}
        ,{field: 'owner$', align: 'center',title: '货主', hide: false}
    ];
src/main/webapp/static/js/locDetlWarning/locDetlWarning.js
@@ -38,6 +38,7 @@
            ,{field: 'createTime$', align: 'center',title: '入库时间'}
            ,{field: 'specs', align: 'center',title: '规格'}
            ,{field: 'batch', align: 'center',title: '批次'}
            ,{field: 'owner$', align: 'center',title: '货主'}
        ]
        ],
src/main/webapp/static/js/locInPrintMat/locInPrintMat.js
New file
@@ -0,0 +1,341 @@
var pageCurr;
layui.config({
    base: baseUrl + "/static/layui/lay/modules/"
}).use(['table','laydate', 'form', 'admin'], function(){
    var table = layui.table;
    var $ = layui.jquery;
    var layer = layui.layer;
    var layDate = layui.laydate;
    var form = layui.form;
    var admin = layui.admin;
    // 数据渲染
    tableIns = table.render({
        elem: '#locInPrintMat',
        headers: {token: localStorage.getItem('token')},
        url: baseUrl+'/locInPrintMat/list/auth',
        page: true,
        limit: 15,
        limits: [15, 30, 50, 100, 200, 500],
        toolbar: '#toolbar',
        cellMinWidth: 50,
        height: 'full-120',
        cols: [[
            {type: 'checkbox'}
            ,{field: 'id', align: 'center',title: 'ID',hide : true}
            ,{field: 'uuid', align: 'center',title: '编号',hide: true}
            ,{field: 'status$', align: 'center',title: '打印情况', width:100,hide: false}
            ,{field: 'matnr', align: 'center',title: '物料编码', width:180,hide: false}
            ,{field: 'batch', align: 'center',title: '批次', width:100,hide: false}
            ,{field: 'anfme', align: 'center',title: '重量(kg)', width:100,hide: false}
            ,{field: 'locNo', align: 'center',title: '库位号', width:120,hide: false}
            ,{field: 'maktx', align: 'center',title: '商品名称',hide: false}
            ,{field: 'owner$', align: 'center',title: '货主',hide: false}
            ,{field: 'createTime$', align: 'center',title: '入库时间', width:120,hide: false}
            ,{field: 'createBy$', align: 'center',title: '入库人员', width:100,hide: false}
            ,{field: 'updateTime$', align: 'center',title: '打印时间', width:120,hide: false}
            ,{field: 'updateBy$', align: 'center',title: '打印人员',hide: false}
            ,{field: 'memo', align: 'center',title: '备注',hide: false}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120}
        ]],
        request: {
            pageName: 'curr',
            pageSize: 'limit'
        },
        parseData: function (res) {
            return {
                'code': res.code,
                'msg': res.msg,
                'count': res.data.total,
                'data': res.data.records
            }
        },
        response: {
            statusCode: 200
        },
        done: function(res, curr, count) {
            if (res.code === 403) {
                top.location.href = baseUrl+"/";
            }
            pageCurr=curr;
            limit();
        }
    });
    // 监听排序事件
    table.on('sort(locInPrintMat)', function (obj) {
        var searchData = {};
        $.each($('#search-box [name]').serializeArray(), function() {
            searchData[this.name] = this.value;
        });
        searchData['orderByField'] = obj.field;
        searchData['orderByType'] = obj.type;
        tableIns.reload({
            where: searchData,
            page: {curr: 1}
        });
    });
    // 监听头工具栏事件
    table.on('toolbar(locInPrintMat)', function (obj) {
        var checkStatus = table.checkStatus(obj.config.id).data;
        switch(obj.event) {
            case 'addData':
                showEditModel();
                break;
            case 'deleteData':
               if (checkStatus.length === 0) {
                   layer.msg('请选择要删除的数据', {icon: 2});
                   return;
               }
               del(checkStatus.map(function (d) {
                   return d.id;
               }));
               break;
            case 'exportData':
                admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){
                    var titles=[];
                    var fields=[];
                    obj.config.cols[0].map(function (col) {
                        if (col.type === 'normal' && col.hide === false && col.toolbar == null) {
                            titles.push(col.title);
                            fields.push(col.field);
                        }
                    });
                    var exportData = {};
                    $.each($('#search-box [name]').serializeArray(), function() {
                        exportData[this.name] = this.value;
                    });
                    var param = {
                        'locInPrintMat': exportData,
                        'fields': fields
                    };
                    $.ajax({
                        url: baseUrl+"/locInPrintMat/export/auth",
                        headers: {'token': localStorage.getItem('token')},
                        data: JSON.stringify(param),
                        dataType:'json',
                        contentType:'application/json;charset=UTF-8',
                        method: 'POST',
                        success: function (res) {
                            layer.closeAll();
                            if (res.code === 200) {
                                table.exportFile(titles,res.data,'xls');
                            } else if (res.code === 403) {
                                top.location.href = baseUrl+"/";
                            } else {
                                layer.msg(res.msg, {icon: 2})
                            }
                        }
                    });
                });
                break;
            // 批量打印
            case "btnPrintBatch":
                printMatCodeNos = [];
                var data = checkStatus;
                if (data.length === 0){
                    layer.msg('请选择打印数据');
                } else {
                    layer.open({
                        type: 1,
                        title: '批量打印 [数量'+ data.length +']',
                        area: ['500px'],
                        shadeClose: true,
                        content: $('#printDataDiv'),
                        success: function(layero, index){
                            for (var i = 0; i<data.length;i++) {
                                printMatCodeNos.push(data[i].id);
                            }
                        },
                        end: function () {
                        }
                    });
                }
                break;
        }
    });
    // 监听行工具事件
    table.on('tool(locInPrintMat)', function(obj){
        var data = obj.data;
        switch (obj.event) {
            case 'btnPrint':
                layer.msg("废弃")
                break;
            // btnPrint(data.id, data.orderNo, 4);
            case 'edit':
                showEditModel(data);
                break;
            case "del":
                del([data.id]);
                break;
        }
    });
    /* 弹窗 - 新增、修改 */
    function showEditModel(mData) {
        admin.open({
            type: 1,
            area: '600px',
            title: (mData ? '修改' : '添加') + '订单状态',
            content: $('#editDialog').html(),
            success: function (layero, dIndex) {
                layDateRender(mData);
                form.val('detail', mData);
                form.on('submit(editSubmit)', function (data) {
                    var loadIndex = layer.load(2);
                    $.ajax({
                        url: baseUrl+"/locInPrintMat/"+(mData?'update':'add')+"/auth",
                        headers: {'token': localStorage.getItem('token')},
                        data: data.field,
                        method: 'POST',
                        success: function (res) {
                            layer.close(loadIndex);
                            if (res.code === 200){
                                layer.close(dIndex);
                                layer.msg(res.msg, {icon: 1});
                                tableReload();
                            } else if (res.code === 403){
                                top.location.href = baseUrl+"/";
                            }else {
                                layer.msg(res.msg, {icon: 2});
                            }
                        }
                    })
                    return false;
                });
                $(layero).children('.layui-layer-content').css('overflow', 'visible');
                layui.form.render('select');
            }
        });
    }
    /* 删除 */
    function del(ids) {
        layer.confirm('确定要删除选中数据吗?', {
            skin: 'layui-layer-admin',
            shade: .1
        }, function (i) {
            layer.close(i);
            var loadIndex = layer.load(2);
            $.ajax({
                url: baseUrl+"/locInPrintMat/delete/auth",
                headers: {'token': localStorage.getItem('token')},
                data: {ids: ids},
                method: 'POST',
                success: function (res) {
                    layer.close(loadIndex);
                    if (res.code === 200){
                        layer.msg(res.msg, {icon: 1});
                        tableReload();
                    } else if (res.code === 403){
                        top.location.href = baseUrl+"/";
                    } else {
                        layer.msg(res.msg, {icon: 2});
                    }
                }
            })
        });
    }
    // 搜索
    form.on('submit(search)', function (data) {
        pageCurr = 1;
        tableReload(false);
    });
    // 重置
    form.on('submit(reset)', function (data) {
        pageCurr = 1;
        clearFormVal($('#search-box'));
        tableReload(false);
    });
    // 模板选择
    form.on('radio(selectTemplateRadio)', function (data) {
        $('.template-preview').hide();
        $('#template-preview-'+data.value).show();
    });
    // 开始打印
    form.on('submit(doPrint)', function (data) {
        var templateNo = data.field.selectTemplate;
        $.ajax({
            url: baseUrl+"/loc/in/mat/print/auth",
            headers: {'token': localStorage.getItem('token')},
            data: {param: printMatCodeNos},
            method: 'POST',
            async: false,
            success: function (res) {
                if (res.code === 200){
                    layer.closeAll();
                    for (let i=0;i<res.data.length;i++){
                        var templateDom = $("#templatePreview"+templateNo);
                        var className = templateDom.attr("class");
                        if (className === 'template-barcode') {
                            res.data[i]["barcodeUrl"]=baseUrl+"/mac/code/auth?type=1&param="
                                +res.data[i].matnr+";" +res.data[i].batch+";"
                                +res.data[i].anfme+";" +res.data[i].locNo+";"
                                +res.data[i].ownerId+";"+res.data[i].maktx+";"
                                +res.data[i].id;
                        } else {
                            res.data[i]["barcodeUrl"]=baseUrl+"/mac/code/auth?type=2&param="
                                +res.data[i].matnr+";" +res.data[i].batch+";"
                                +res.data[i].anfme+";" +res.data[i].locNo+";"
                                +res.data[i].ownerId+";"+res.data[i].maktx+";"
                                +res.data[i].id;
                        }
                    }
                    var tpl = templateDom.html();
                    var template = Handlebars.compile(tpl);
                    var html = template(res);
                    var box = $("#box");
                    box.html(html);box.show();
                    box.print({mediaPrint:true});
                    box.hide();
                } else if (res.code === 403){
                    top.location.href = baseUrl+"/";
                }else {
                    layer.msg(res.msg)
                }
            }
        })
    });
    // 时间选择器
    function layDateRender(data) {
        setTimeout(function () {
            layDate.render({
                elem: '#createTime\\$',
                type: 'datetime',
                value: data!==undefined?data['createTime\\$']:null
            });
            layDate.render({
                elem: '#updateTime\\$',
                type: 'datetime',
                value: data!==undefined?data['updateTime\\$']:null
            });
        }, 300);
    }
    layDateRender();
});
// 关闭动作
$(document).on('click','#data-detail-close', function () {
    parent.layer.closeAll();
});
function tableReload(child) {
    var searchData = {};
    $.each($('#search-box [name]').serializeArray(), function() {
        searchData[this.name] = this.value;
    });
    tableIns.reload({
        where: searchData,
        page: {curr: pageCurr}
     });
}
src/main/webapp/static/js/locOutPrintMat/locOutPrintMat.js
New file
@@ -0,0 +1,336 @@
var pageCurr;
layui.config({
    base: baseUrl + "/static/layui/lay/modules/"
}).use(['table','laydate', 'form', 'admin'], function(){
    var table = layui.table;
    var $ = layui.jquery;
    var layer = layui.layer;
    var layDate = layui.laydate;
    var form = layui.form;
    var admin = layui.admin;
    // 数据渲染
    tableIns = table.render({
        elem: '#locOutPrintMat',
        headers: {token: localStorage.getItem('token')},
        url: baseUrl+'/locOutPrintMat/list/auth',
        page: true,
        limit: 15,
        limits: [15, 30, 50, 100, 200, 500],
        toolbar: '#toolbar',
        cellMinWidth: 50,
        height: 'full-120',
        cols: [[
            {type: 'checkbox'}
            ,{field: 'id', align: 'center',title: 'ID',hide : true}
            ,{field: 'uuid', align: 'center',title: '编号',hide: true}
            ,{field: 'status$', align: 'center',title: '打印情况', width:100,hide: false}
            ,{field: 'matnr', align: 'center',title: '物料编码', width:180,hide: false}
            ,{field: 'batch', align: 'center',title: '批次', width:100,hide: false}
            ,{field: 'anfme', align: 'center',title: '重量(kg)', width:100,hide: false}
            ,{field: 'locNo', align: 'center',title: '库位号', width:120,hide: false}
            ,{field: 'maktx', align: 'center',title: '商品名称',hide: false}
            ,{field: 'owner$', align: 'center',title: '货主',hide: false}
            ,{field: 'createTime$', align: 'center',title: '入库时间', width:120,hide: false}
            ,{field: 'createBy$', align: 'center',title: '入库人员', width:100,hide: false}
            ,{field: 'updateTime$', align: 'center',title: '打印时间', width:120,hide: false}
            ,{field: 'updateBy$', align: 'center',title: '打印人员',hide: false}
            ,{field: 'memo', align: 'center',title: '备注',hide: false}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120}
        ]],
        request: {
            pageName: 'curr',
            pageSize: 'limit'
        },
        parseData: function (res) {
            return {
                'code': res.code,
                'msg': res.msg,
                'count': res.data.total,
                'data': res.data.records
            }
        },
        response: {
            statusCode: 200
        },
        done: function(res, curr, count) {
            if (res.code === 403) {
                top.location.href = baseUrl+"/";
            }
            pageCurr=curr;
            limit();
        }
    });
    // 监听排序事件
    table.on('sort(locOutPrintMat)', function (obj) {
        var searchData = {};
        $.each($('#search-box [name]').serializeArray(), function() {
            searchData[this.name] = this.value;
        });
        searchData['orderByField'] = obj.field;
        searchData['orderByType'] = obj.type;
        tableIns.reload({
            where: searchData,
            page: {curr: 1}
        });
    });
    // 监听头工具栏事件
    table.on('toolbar(locOutPrintMat)', function (obj) {
        var checkStatus = table.checkStatus(obj.config.id).data;
        switch(obj.event) {
            case 'addData':
                showEditModel();
                break;
            case 'deleteData':
                if (checkStatus.length === 0) {
                    layer.msg('请选择要删除的数据', {icon: 2});
                    return;
                }
                del(checkStatus.map(function (d) {
                    return d.id;
                }));
                break;
            case 'exportData':
                admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){
                    var titles=[];
                    var fields=[];
                    obj.config.cols[0].map(function (col) {
                        if (col.type === 'normal' && col.hide === false && col.toolbar == null) {
                            titles.push(col.title);
                            fields.push(col.field);
                        }
                    });
                    var exportData = {};
                    $.each($('#search-box [name]').serializeArray(), function() {
                        exportData[this.name] = this.value;
                    });
                    var param = {
                        'locOutPrintMat': exportData,
                        'fields': fields
                    };
                    $.ajax({
                        url: baseUrl+"/locOutPrintMat/export/auth",
                        headers: {'token': localStorage.getItem('token')},
                        data: JSON.stringify(param),
                        dataType:'json',
                        contentType:'application/json;charset=UTF-8',
                        method: 'POST',
                        success: function (res) {
                            layer.closeAll();
                            if (res.code === 200) {
                                table.exportFile(titles,res.data,'xls');
                            } else if (res.code === 403) {
                                top.location.href = baseUrl+"/";
                            } else {
                                layer.msg(res.msg, {icon: 2})
                            }
                        }
                    });
                });
                break;
            // 批量打印
            case "btnPrintBatch":
                printMatCodeNos = [];
                var data = checkStatus;
                if (data.length === 0){
                    layer.msg('请选择打印数据');
                } else {
                    layer.open({
                        type: 1,
                        title: '批量打印 [数量'+ data.length +']',
                        area: ['500px'],
                        shadeClose: true,
                        content: $('#printDataDiv'),
                        success: function(layero, index){
                            for (var i = 0; i<data.length;i++) {
                                printMatCodeNos.push(data[i].id);
                            }
                        },
                        end: function () {
                        }
                    });
                }
                break;
        }
    });
    // 监听行工具事件
    table.on('tool(locOutPrintMat)', function(obj){
        var data = obj.data;
        switch (obj.event) {
            case 'btnPrint':
                layer.msg("废弃")
                break;
            // btnPrint(data.id, data.orderNo, 4);
            case 'edit':
                showEditModel(data);
                break;
            case "del":
                del([data.id]);
                break;
        }
    });
    /* 弹窗 - 新增、修改 */
    function showEditModel(mData) {
        admin.open({
            type: 1,
            area: '600px',
            title: (mData ? '修改' : '添加') + '订单状态',
            content: $('#editDialog').html(),
            success: function (layero, dIndex) {
                layDateRender(mData);
                form.val('detail', mData);
                form.on('submit(editSubmit)', function (data) {
                    var loadIndex = layer.load(2);
                    $.ajax({
                        url: baseUrl+"/locOutPrintMat/"+(mData?'update':'add')+"/auth",
                        headers: {'token': localStorage.getItem('token')},
                        data: data.field,
                        method: 'POST',
                        success: function (res) {
                            layer.close(loadIndex);
                            if (res.code === 200){
                                layer.close(dIndex);
                                layer.msg(res.msg, {icon: 1});
                                tableReload();
                            } else if (res.code === 403){
                                top.location.href = baseUrl+"/";
                            }else {
                                layer.msg(res.msg, {icon: 2});
                            }
                        }
                    })
                    return false;
                });
                $(layero).children('.layui-layer-content').css('overflow', 'visible');
                layui.form.render('select');
            }
        });
    }
    /* 删除 */
    function del(ids) {
        layer.confirm('确定要删除选中数据吗?', {
            skin: 'layui-layer-admin',
            shade: .1
        }, function (i) {
            layer.close(i);
            var loadIndex = layer.load(2);
            $.ajax({
                url: baseUrl+"/locOutPrintMat/delete/auth",
                headers: {'token': localStorage.getItem('token')},
                data: {ids: ids},
                method: 'POST',
                success: function (res) {
                    layer.close(loadIndex);
                    if (res.code === 200){
                        layer.msg(res.msg, {icon: 1});
                        tableReload();
                    } else if (res.code === 403){
                        top.location.href = baseUrl+"/";
                    } else {
                        layer.msg(res.msg, {icon: 2});
                    }
                }
            })
        });
    }
    // 搜索
    form.on('submit(search)', function (data) {
        pageCurr = 1;
        tableReload(false);
    });
    // 重置
    form.on('submit(reset)', function (data) {
        pageCurr = 1;
        clearFormVal($('#search-box'));
        tableReload(false);
    });
    // 模板选择
    form.on('radio(selectTemplateRadio)', function (data) {
        $('.template-preview').hide();
        $('#template-preview-'+data.value).show();
    });
    // 开始打印
    form.on('submit(doPrint)', function (data) {
        var templateNo = data.field.selectTemplate;
        $.ajax({
            url: baseUrl+"/loc/out/mat/print/auth",
            headers: {'token': localStorage.getItem('token')},
            data: {param: printMatCodeNos},
            method: 'POST',
            async: false,
            success: function (res) {
                if (res.code === 200){
                    layer.closeAll();
                    for (let i=0;i<res.data.length;i++){
                        console.log(res)
                        var templateDom = $("#templatePreview"+templateNo);
                        var className = templateDom.attr("class");
                        // if (className === 'template-barcode') {
                        //     res.data[i]["barcodeUrl"]=baseUrl+"/mac/code/auth?type=1&param="
                        //         +res.data[i].matnr+";"
                        // } else {
                        //     res.data[i]["barcodeUrl"]=baseUrl+"/mac/code/auth?type=2&param="
                        //         +res.data[i].matnr+";"
                        // }
                    }
                    var tpl = templateDom.html();
                    var template = Handlebars.compile(tpl);
                    var html = template(res);
                    var box = $("#box");
                    box.html(html);box.show();
                    box.print({mediaPrint:true});
                    box.hide();
                } else if (res.code === 403){
                    top.location.href = baseUrl+"/";
                }else {
                    layer.msg(res.msg)
                }
            }
        })
    });
    // 时间选择器
    function layDateRender(data) {
        setTimeout(function () {
            layDate.render({
                elem: '#createTime\\$',
                type: 'datetime',
                value: data!==undefined?data['createTime\\$']:null
            });
            layDate.render({
                elem: '#updateTime\\$',
                type: 'datetime',
                value: data!==undefined?data['updateTime\\$']:null
            });
        }, 300);
    }
    layDateRender();
});
// 关闭动作
$(document).on('click','#data-detail-close', function () {
    parent.layer.closeAll();
});
function tableReload(child) {
    var searchData = {};
    $.each($('#search-box [name]').serializeArray(), function() {
        searchData[this.name] = this.value;
    });
    tableIns.reload({
        where: searchData,
        page: {curr: pageCurr}
    });
}
src/main/webapp/static/js/manLocDetl/manLocDetl.js
@@ -1,16 +1,16 @@
var pageCurr;
function getCol() {
    var cols = [
        {field: 'locNo', align: 'center',title: '库位号'},
        {field: 'locNo', align: 'center',title: '库位号', hide: false},
        {field: 'matnr', align: 'center',title: '商品编号', sort:true}
        ,{field: 'maktx', align: 'center',title: '商品名称', sort:true}
        ,{field: 'orderNo', align: 'center',title: '单据编号', hide: true}
        ,{field: 'specs', align: 'center',title: '规格'}
        ,{field: 'specs', align: 'center',title: '规格', hide: false}
        ,{field: 'weight', align: 'center',title: '库位总重量', hide: true}
        ,{field: 'batch', align: 'center',title: '批号', sort:true}
        ,{field: 'anfme', align: 'center',title: '数量'}
        ,{field: 'zpallet', align: 'center',title: '托盘条码'}
        ,{field: 'batch', align: 'center',title: '批号', sort:true, hide: false}
        ,{field: 'anfme', align: 'center',title: '重量(kg)', sort:true, hide: false}
        ,{field: 'zpallet', align: 'center',title: '托盘条码', sort:true, hide: true}
        ,{field: 'model', align: 'center',title: '代码', hide: true}
        ,{field: 'color', align: 'center',title: '颜色', hide: true}
        ,{field: 'brand', align: 'center',title: '品牌', hide: true}
@@ -35,7 +35,8 @@
        ,{field: 'source$', align: 'center',title: '制购', hide: true}
        ,{field: 'check$', align: 'center',title: '要求检验', hide: true}
        ,{field: 'danger$', align: 'center',title: '危险品', hide: true}
        ,{field: 'status$', align: 'center',title: '明细锁', hide: false}
        ,{field: 'status$', align: 'center',title: '明细锁', hide: true}
        ,{field: 'owner$', align: 'center',title: '货主', hide: false}
    ];
src/main/webapp/views/home/map.html
@@ -513,12 +513,12 @@
                        <div style="margin-left: 10px;">
                            <button @click="resetSearch" class="layui-btn layui-btn-sm">重置</button>
                        </div>
                        <div style="margin-left: 10px;">
                            <button @click="locToLoc2" class="layui-btn layui-btn-sm">侧边移库</button>
                        </div>
                        <div v-if="!locOutStatus" style="margin-left: 10px;">
                            <button @click="locOutStatus = true" class="layui-btn layui-btn-sm">出库选择</button>
                        </div>
<!--                        <div style="margin-left: 10px;">-->
<!--                            <button @click="locToLoc2" class="layui-btn layui-btn-sm">侧边移库</button>-->
<!--                        </div>-->
<!--                        <div v-if="!locOutStatus" style="margin-left: 10px;">-->
<!--                            <button @click="locOutStatus = true" class="layui-btn layui-btn-sm">出库选择</button>-->
<!--                        </div>-->
                        <div v-else style="margin-left: 10px;border: 1px red solid;display: flex;">
                            <div>
                                <button @click="cancelSelectLoc" class="layui-btn layui-btn-sm">取消选择</button>
@@ -587,30 +587,30 @@
                        <div style="flex: 1;margin-top: 10px;">
                            <div style="font-size: 10px;">在库</div><div class="pointBox2 pointBoxRed">F</div>
                        </div>
<!--                        <div style="flex: 1;margin-top: 10px;">-->
<!--                            <div style="font-size: 10px;">空板</div><div class="pointBox2 pointBoxEmpty">D</div>-->
<!--                        </div>-->
<!--                        <div style="flex: 1;margin-top: 10px;">-->
<!--                            <div style="font-size: 10px;">出库中</div><div class="pointBox2 pointBoxOut">P</div>-->
<!--                        </div>-->
<!--                        <div style="flex: 1;margin-top: 10px;">-->
<!--                            <div style="font-size: 10px;">出库预约</div><div class="pointBox2 pointBoxOutYy">R</div>-->
<!--                        </div>-->
<!--                        <div style="flex: 1;margin-top: 10px;">-->
<!--                            <div style="font-size: 10px;">入库预约</div><div class="pointBox2 pointBoxInYy">S</div>-->
<!--                        </div>-->
                        <div style="flex: 1;margin-top: 10px;">
                            <div style="font-size: 10px;">空板</div><div class="pointBox2 pointBoxEmpty">D</div>
                            <div style="font-size: 10px;">搜索</div><div class="pointBox2 pointBoxSearch"></div>
                        </div>
                        <div style="flex: 1;margin-top: 10px;">
                            <div style="font-size: 10px;">出库中</div><div class="pointBox2 pointBoxOut">P</div>
                        </div>
                        <div style="flex: 1;margin-top: 10px;">
                            <div style="font-size: 10px;">出库预约</div><div class="pointBox2 pointBoxOutYy">R</div>
                        </div>
                        <div style="flex: 1;margin-top: 10px;">
                            <div style="font-size: 10px;">入库预约</div><div class="pointBox2 pointBoxInYy">S</div>
                        </div>
                        <div style="flex: 1;margin-top: 10px;">
                            <div style="font-size: 10px;">搜索结果</div><div class="pointBox2 pointBoxSearch"></div>
                        </div>
                        <div style="flex: 1;margin-top: 10px;">
                            <div style="font-size: 10px;">选择结果</div><div class="pointBox2 pointBoxSelected"></div>
                        </div>
<!--                        <div style="flex: 1;margin-top: 10px;">-->
<!--                            <div style="font-size: 10px;">选择</div><div class="pointBox2 pointBoxSelected"></div>-->
<!--                        </div>-->
                        <div style="flex: 1;margin-top: 10px;">
                            <div style="font-size: 10px;text-align: center">其他</div><div class="pointBox2 pointBoxDefault"></div>
                        </div>
                        <div style="flex: 1;margin-top: 10px;">
                            <div style="font-size: 10px;text-align: center">冻结</div><div class="pointBox2 pointBoxEnd"></div>
                        </div>
<!--                        <div style="flex: 1;margin-top: 10px;">-->
<!--                            <div style="font-size: 10px;text-align: center">冻结</div><div class="pointBox2 pointBoxEnd"></div>-->
<!--                        </div>-->
                    </div>
                </div>
                <button class="card-button">库位状态</button>
src/main/webapp/views/locDetlStatis/locDetlStatis.html
@@ -18,6 +18,9 @@
        <div class="layui-input-inline">
            <input class="layui-input" type="text" name="matnr" placeholder="商品编号" autocomplete="off">
        </div>
        <div class="layui-input-inline">
            <input class="layui-input" type="text" name="owner" placeholder="货主编号" autocomplete="off">
        </div>
    </div>
    <!-- 待添加 -->
    <div id="data-search-btn" class="layui-btn-container layui-form-item" style="display: inline-block">
src/main/webapp/views/locInPrintMat/locInPrintMat.html
New file
@@ -0,0 +1,383 @@
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all">
    <link rel="stylesheet" href="../../static/css/cool.css" media="all">
    <style>
        /* ------------------------- 打印表格 -----------------------  */
        .contain {
            border-collapse: collapse;
            width: 280px;
            font-size: x-small;
            table-layout: fixed;
            color: black;
        }
        .contain img.template-qrcode {
            width: 80%;
        }
        .contain td, .contain th {
            border: 1px solid black;
            text-align: center;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            padding: 5px;
        }
        .contain th {
            font-weight: bold;
            color: black;
            background-color: #f2f2f2;
        }
        .contain tr:nth-child(even){background-color: #f9f9f9;}
        .contain strong {
            font-weight: bold;
            line-height: 20px;
            vertical-align: middle;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
        }
        .barcode-section {
            text-align: center;
        }
        .barcode-section span {
            letter-spacing: 1px;
            font-weight: bold;
            color: black;
        }
        #templatePreview3 {
            color: black;
            border-color: black;
            border-collapse: collapse; /* 折叠边框 */
        }
        /* 将样式只应用到具有特定id的table、th、td */
        #templatePreview3, #myTable th, #myTable td {
            color: black;
            border: 2px solid black; /* 2像素黑色边框 */
        }
        #templatePreview3 th, #myTable td {
            color: black;
            border-color: black;
            text-align: left;
            padding: 8px;
        }
    </style>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-form toolbar" id="search-box">
                <div class="layui-form-item">
<!--                    <div class="layui-inline">-->
<!--                        <label class="layui-form-label">编号:</label>-->
<!--                        <div class="layui-input-inline">-->
<!--                            <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off">-->
<!--                        </div>-->
<!--                    </div>-->
                    <div class="layui-inline">
                        <label class="layui-form-label">打印情况: </label>
                        <div class="layui-input-block">
                            <select name="status">
                                <option value="">请选择打印情况</option>
                                <option value="1">未打印</option>
                                <option value="2">已打印</option>
                            </select>
                        </div>
                    </div>
<!--                    <div class="layui-inline">-->
<!--                        <div class="layui-input-inline">-->
<!--                            <input class="layui-input" type="text" name="ownerId" placeholder="货主" autocomplete="off">-->
<!--                        </div>-->
<!--                    </div>-->
                    <div class="layui-inline">&emsp;
                        <button class="layui-btn icon-btn" lay-filter="search" lay-submit>
                            <i class="layui-icon">&#xe615;</i>搜索
                        </button>
                        <button class="layui-btn icon-btn" lay-filter="reset" lay-submit>
                            <i class="layui-icon">&#xe666;</i>重置
                        </button>
                    </div>
                </div>
            </div>
            <table class="layui-hide" id="locInPrintMat" lay-filter="locInPrintMat"></table>
        </div>
    </div>
</div>
<script type="text/html" id="toolbar">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button>
        <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button>
        <button class="layui-btn layui-btn-sm" id="btn-print-batch" lay-event="btnPrintBatch">批量打印</button>
        <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button>
    </div>
</script>
<script type="text/html" id="operate">
    <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a>
<!--    <a class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs btn-complete" lay-event="btnPrint">打印</a>-->
</script>
<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/jquery/jQuery.print.js"></script>
<script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script>
<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/locInPrintMat/locInPrintMat.js" charset="utf-8"></script>
</body>
<!-- 表单弹窗 -->
<script type="text/html" id="editDialog">
    <form id="detail" lay-filter="detail" class="layui-form admin-form model-form">
        <input name="id" type="hidden">
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">打印情况: </label>
                    <div class="layui-input-block">
                        <select name="status">
                            <option value="">请选择打印情况</option>
                            <option value="1">未打印</option>
                            <option value="2">已打印</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">货主编号: </label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="owner" placeholder="请输入货主编号">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">物料编码: </label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="matnr" placeholder="请输入物料编码">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">批次: </label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="batch" placeholder="请输入批次">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">重量: </label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="anfme" placeholder="请输入重量">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">库位号: </label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="locNo" placeholder="请输入库位号">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">商品名称: </label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="maktx" placeholder="请输入商品名称">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">备注: </label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="memo" placeholder="请输入备注">
                    </div>
                </div>
             </div>
        </div>
        <hr class="layui-bg-gray">
        <div class="layui-form-item text-right">
            <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button>
            <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
        </div>
    </form>
</script>
<!-- 打印操作弹窗 -->
<div id="printDataDiv" style="display: none;padding: 20px">
    <div class="layui-form" style="text-align: center">
        <hr>
        <!--单选框-->
        <div class="layui-form-item" style="display: inline-block; margin-bottom: 10px">
<!--            <input type="radio" name="selectTemplate" value="1" title="模板一"  lay-filter="selectTemplateRadio" checked="">-->
<!--            <input type="radio" name="selectTemplate" value="2" title="模板二" lay-filter="selectTemplateRadio">-->
            <input type="radio" name="selectTemplate" value="3" title="模板" lay-filter="selectTemplateRadio">
        </div>
        <fieldset class="layui-elem-field site-demo-button" style="margin-top: 30px;text-align: left;">
            <legend>打印预览</legend>
            <div id="template-container" style="margin: 20px;text-align: center">
                <!-- 预览图 1 -->
                <div id="template-preview-1" class="template-preview" style="display: inline-block">
                    <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;">
                        <tr style="height: 74px">
                            <td colspan="3" align="center" scope="col">商品编码</td>
                            <td class="barcode" colspan="9" align="center" scope="col">
                                <img class="template-code template-barcode" src="" width="90%;">
                                <div style="letter-spacing: 2px;margin-top: 1px; text-align: center;">
                                    <span>xxxxxx</span>
                                </div>
                            </td>
                        </tr>
                        <tr style="height: 74px">
                            <td align="center" colspan="3">商品</td>
                            <td align="center" colspan="5">xxxxxx-xx/xx</td>
                            <td align="center" colspan="2">备注</td>
                            <td align="center" colspan="2">xx</td>
                        </tr>
                    </table>
                </div>
                <!-- 预览图 2 -->
                <div id="template-preview-2" class="template-preview" style="display: none">
                    <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;">
                        <tr style="height: 30px">
                            <td align="center" width="20%">商品</td>
                            <td align="center" width="80%" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">xxxxxxx</td>
                        </tr>
                        <tr style="height: 30px">
                            <td align="center" width="20%">备注</td>
                            <td align="center" width="80%">xxxxxxxx</td>
                        </tr>
                        <tr style="height: 75px;">
                            <td align="center" colspan="2" width="100%" style="border: none">
                                <img class="template-code template-barcode" src="" width="80%">
                                <div style="letter-spacing: 2px;margin-top: 1px; text-align: center">
                                    <span>xxxxxx</span>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
                <!-- 预览图 3 -->
                <div id="template-preview-3" class="template-preview" style="display: none">
                    <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;">
                        <tr style="height: 74px">
                            <td align="center" scope="col" colspan="1">商品</td>
                            <td align="center" scope="col" colspan="1" style="">xxxxxx-xx/xx</td>
                            <td align="center" scope="col" colspan="2" rowspan="2">
                                <img class="template-code template-qrcode" src="" width="80%">
                                <div style="letter-spacing: 1px;margin-top: 1px; text-align: center">
                                    <span>xxxxxx</span>
                                </div>
                            </td>
                        </tr>
                        <tr style="height: 74px">
                            <td align="center" colspan="1">备注</td>
                            <td align="center" colspan="1" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">xxxxxxx</td>
                        </tr>
                    </table>
                </div>
            </div>
        </fieldset>
        <button class="layui-btn" id="doPrint" lay-submit lay-filter="doPrint" style="margin-top: 20px">确定</button>
    </div>
</div>
<div id="box" style="display: block"></div>
<!-- 初始化打印模板的条形码 -->
<script type="text/javascript">
    $('.template-barcode').attr("src", baseUrl+"/mac/code/auth?type=1&param=123");
    $('.template-qrcode').attr("src", baseUrl+"/mac/code/auth?type=2&param=123");
</script>
<!-- 模板引擎 -->
<!-- 模板1 -->
<script type="text/template" id="templatePreview1" class="template-barcode">
    {{#each data}}
    <table class="contain" width="280" style="overflow: hidden;font-size: small;table-layout: fixed;">
        <tr style="height: 74px">
            <td align="center" colspan="3" scope="col">商品编码</td>
            <td align="center" class="barcode" colspan="9" scope="col">
                <img class="template-code" src="{{this.barcodeUrl}}" width="90%">
                <div style="letter-spacing: 2px;margin-top: 1px; text-align: center">
                    <span>{{this.matnr}}</span>
                </div>
            </td>
        </tr>
        <tr style="height: 74px">
            <td align="center" colspan="3">商品</td>
            <td align="center" colspan="5" style="overflow: hidden; white-space: nowrap;text-overflow: ellipsis;">{{this.maktx}}</td>
            <td align="center" colspan="2">备注</td>
            <td align="center" colspan="2">{{this.memo}}</td>
        </tr>
    </table>
    {{/each}}
</script>
<!-- 模板2 -->
<script type="text/template" id="templatePreview2" class="template-barcode">
    {{#each data}}
    <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;">
        <tr style="height: 35px">
            <td align="center" width="20%">商品</td>
            <td align="center" width="80%" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">{{this.maktx}}</td>
        </tr>
        <tr style="height: 35px">
            <td align="center" width="20%">备注</td>
            <td align="center" width="80%">{{this.memo}}</td>
        </tr>
        <tr style="height: 79px;">
            <td align="center" colspan="2" width="100%" style="border: none">
                <img class="template-code" src="{{this.barcodeUrl}}" width="80%">
                <div style="letter-spacing: 2px;margin-top: 1px; text-align: center">
                    <span>{{this.matnr}}</span>
                </div>
            </td>
        </tr>
    </table>
    {{/each}}
</script>
<!-- 模板3 -->
<script type="text/template" id="templatePreview3" class="template-qrcode">
    {{#each data}}
    <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;">
        <tr>
            <th>商品</th>
            <td colspan="2"><strong>{{this.maktx}}</strong></td>
            <td colspan="3" rowspan="4" class="barcode-section" style="white-space: normal; ">
                <img class="template-code template-qrcode" src="{{this.barcodeUrl}}" alt="Barcode Image">
                <div><span >{{this.owner}}</span></div>
            </td>
        </tr>
        <tr>
            <th>批次</th>
            <td colspan="2"><strong>{{this.batch}}</strong></td>
        </tr>
        <tr>
            <th>重量</th>
            <td colspan="2"><strong>{{this.anfme}}kg</strong></td>
        </tr>
        <tr>
            <th>库位</th>
            <td colspan="2"><strong>{{this.locNo}}</strong></td>
        </tr>
        <tr>
            <th>品号</th>
            <td colspan="5"><strong>{{this.matnr}}</strong></td>
        </tr>
    </table>
    {{/each}}
</script>
</html>
src/main/webapp/views/locOutPrintMat/locOutPrintMat.html
New file
@@ -0,0 +1,393 @@
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all">
    <link rel="stylesheet" href="../../static/css/cool.css" media="all">
    <style>
        /* ------------------------- 打印表格 -----------------------  */
        .contain {
            border-collapse: collapse;
            width: 280px;
            font-size: x-small;
            table-layout: fixed;
            color: black;
        }
        .contain img.template-qrcode {
            width: 80%;
        }
        .contain td, .contain th {
            border: 1px solid black;
            text-align: center;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            padding: 5px;
        }
        .contain th {
            font-weight: bold;
            color: black;
            background-color: #f2f2f2;
        }
        .contain tr:nth-child(even){background-color: #f9f9f9;}
        .contain strong {
            font-weight: bold;
            line-height: 20px;
            vertical-align: middle;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
        }
        .barcode-section {
            text-align: center;
        }
        .barcode-section span {
            letter-spacing: 1px;
            font-weight: bold;
            color: black;
        }
        #templatePreview3 {
            color: black;
            border-color: black;
            border-collapse: collapse; /* 折叠边框 */
        }
        /* 将样式只应用到具有特定id的table、th、td */
        #templatePreview3, #myTable th, #myTable td {
            color: black;
            border: 2px solid black; /* 2像素黑色边框 */
        }
        #templatePreview3 th, #myTable td {
            color: black;
            border-color: black;
            text-align: left;
            padding: 8px;
        }
    </style>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-form toolbar" id="search-box">
                <div class="layui-form-item">
                    <!--                    <div class="layui-inline">-->
                    <!--                        <label class="layui-form-label">编号:</label>-->
                    <!--                        <div class="layui-input-inline">-->
                    <!--                            <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off">-->
                    <!--                        </div>-->
                    <!--                    </div>-->
                    <div class="layui-inline">
                        <label class="layui-form-label">打印情况: </label>
                        <div class="layui-input-block">
                            <select name="status">
                                <option value="">请选择打印情况</option>
                                <option value="1">未打印</option>
                                <option value="2">已打印</option>
                            </select>
                        </div>
                    </div>
                    <!--                    <div class="layui-inline">-->
                    <!--                        <div class="layui-input-inline">-->
                    <!--                            <input class="layui-input" type="text" name="ownerId" placeholder="货主" autocomplete="off">-->
                    <!--                        </div>-->
                    <!--                    </div>-->
                    <div class="layui-inline">&emsp;
                        <button class="layui-btn icon-btn" lay-filter="search" lay-submit>
                            <i class="layui-icon">&#xe615;</i>搜索
                        </button>
                        <button class="layui-btn icon-btn" lay-filter="reset" lay-submit>
                            <i class="layui-icon">&#xe666;</i>重置
                        </button>
                    </div>
                </div>
            </div>
            <table class="layui-hide" id="locOutPrintMat" lay-filter="locOutPrintMat"></table>
        </div>
    </div>
</div>
<script type="text/html" id="toolbar">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button>
        <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button>
        <button class="layui-btn layui-btn-sm" id="btn-print-batch" lay-event="btnPrintBatch">批量打印</button>
        <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button>
    </div>
</script>
<script type="text/html" id="operate">
    <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a>
    <!--    <a class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs btn-complete" lay-event="btnPrint">打印</a>-->
</script>
<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/jquery/jQuery.print.js"></script>
<script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script>
<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/locOutPrintMat/locOutPrintMat.js" charset="utf-8"></script>
</body>
<!-- 表单弹窗 -->
<script type="text/html" id="editDialog">
    <form id="detail" lay-filter="detail" class="layui-form admin-form model-form">
        <input name="id" type="hidden">
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">打印情况: </label>
                    <div class="layui-input-block">
                        <select name="status">
                            <option value="">请选择打印情况</option>
                            <option value="1">未打印</option>
                            <option value="2">已打印</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">货主编号: </label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="owner" placeholder="请输入货主编号">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">物料编码: </label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="matnr" placeholder="请输入物料编码">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">批次: </label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="batch" placeholder="请输入批次">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">重量: </label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="anfme" placeholder="请输入重量">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">库位号: </label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="locNo" placeholder="请输入库位号">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">商品名称: </label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="maktx" placeholder="请输入商品名称">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">备注: </label>
                    <div class="layui-input-block">
                        <input class="layui-input" name="memo" placeholder="请输入备注">
                    </div>
                </div>
            </div>
        </div>
        <hr class="layui-bg-gray">
        <div class="layui-form-item text-right">
            <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button>
            <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
        </div>
    </form>
</script>
<!-- 打印操作弹窗 -->
<div id="printDataDiv" style="display: none;padding: 20px">
    <div class="layui-form" style="text-align: center">
        <hr>
        <!--单选框-->
        <div class="layui-form-item" style="display: inline-block; margin-bottom: 10px">
            <!--            <input type="radio" name="selectTemplate" value="1" title="模板一"  lay-filter="selectTemplateRadio" checked="">-->
            <!--            <input type="radio" name="selectTemplate" value="2" title="模板二" lay-filter="selectTemplateRadio">-->
            <input type="radio" name="selectTemplate" value="3" title="模板" lay-filter="selectTemplateRadio">
        </div>
        <fieldset class="layui-elem-field site-demo-button" style="margin-top: 30px;text-align: left;">
            <legend>打印预览</legend>
            <div id="template-container" style="margin: 20px;text-align: center">
                <!-- 预览图 1 -->
                <div id="template-preview-1" class="template-preview" style="display: inline-block">
                    <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;">
                        <tr style="height: 74px">
                            <td colspan="3" align="center" scope="col">商品编码</td>
                            <td class="barcode" colspan="9" align="center" scope="col">
<!--                                <img class="template-code template-barcode" src="" width="90%;">-->
                                <div style="letter-spacing: 2px;margin-top: 1px; text-align: center;">
                                    <span>xxxxxx</span>
                                </div>
                            </td>
                        </tr>
                        <tr style="height: 74px">
                            <td align="center" colspan="3">商品</td>
                            <td align="center" colspan="5">xxxxxx-xx/xx</td>
                            <td align="center" colspan="2">备注</td>
                            <td align="center" colspan="2">xx</td>
                        </tr>
                    </table>
                </div>
                <!-- 预览图 2 -->
                <div id="template-preview-2" class="template-preview" style="display: none">
                    <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;">
                        <tr style="height: 30px">
                            <td align="center" width="20%">商品</td>
                            <td align="center" width="80%" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">xxxxxxx</td>
                        </tr>
                        <tr style="height: 30px">
                            <td align="center" width="20%">备注</td>
                            <td align="center" width="80%">xxxxxxxx</td>
                        </tr>
                        <tr style="height: 75px;">
                            <td align="center" colspan="2" width="100%" style="border: none">
                                <img class="template-code template-barcode" src="" width="80%">
                                <div style="letter-spacing: 2px;margin-top: 1px; text-align: center">
                                    <span>xxxxxx</span>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
                <!-- 预览图 3 -->
                <div id="template-preview-3" class="template-preview" style="display: none">
                    <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;">
                        <tr style="height: 74px">
                            <td align="center" scope="col" colspan="1">商品</td>
                            <td align="center" scope="col" colspan="1" style="">xxxxxx-xx/xx</td>
                            <td align="center" scope="col" colspan="2" rowspan="2">
                                <img class="template-code template-qrcode" src="" width="80%">
                                <div style="letter-spacing: 1px;margin-top: 1px; text-align: center">
                                    <span>xxxxxx</span>
                                </div>
                            </td>
                        </tr>
                        <tr style="height: 74px">
                            <td align="center" colspan="1">备注</td>
                            <td align="center" colspan="1" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">xxxxxxx</td>
                        </tr>
                    </table>
                </div>
            </div>
        </fieldset>
        <button class="layui-btn" id="doPrint" lay-submit lay-filter="doPrint" style="margin-top: 20px">确定</button>
    </div>
</div>
<div id="box" style="display: block"></div>
<!-- 初始化打印模板的条形码 -->
<script type="text/javascript">
    $('.template-barcode').attr("src", baseUrl+"/mac/code/auth?type=1&param=123");
    $('.template-qrcode').attr("src", baseUrl+"/mac/code/auth?type=2&param=123");
</script>
<!-- 模板引擎 -->
<!-- 模板1 -->
<script type="text/template" id="templatePreview1" class="template-barcode">
    {{#each data}}
    <table class="contain" width="280" style="overflow: hidden;font-size: small;table-layout: fixed;">
        <tr style="height: 74px">
            <td align="center" colspan="3" scope="col">商品编码</td>
            <td align="center" class="barcode" colspan="9" scope="col">
                <img class="template-code" src="{{this.barcodeUrl}}" width="90%">
                <div style="letter-spacing: 2px;margin-top: 1px; text-align: center">
                    <span>{{this.matnr}}</span>
                </div>
            </td>
        </tr>
        <tr style="height: 74px">
            <td align="center" colspan="3">商品</td>
            <td align="center" colspan="5" style="overflow: hidden; white-space: nowrap;text-overflow: ellipsis;">{{this.maktx}}</td>
            <td align="center" colspan="2">备注</td>
            <td align="center" colspan="2">{{this.memo}}</td>
        </tr>
    </table>
    {{/each}}
</script>
<!-- 模板2 -->
<script type="text/template" id="templatePreview2" class="template-barcode">
    {{#each data}}
    <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;">
        <tr style="height: 35px">
            <td align="center" width="20%">商品</td>
            <td align="center" width="80%" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">{{this.maktx}}</td>
        </tr>
        <tr style="height: 35px">
            <td align="center" width="20%">备注</td>
            <td align="center" width="80%">{{this.memo}}</td>
        </tr>
        <tr style="height: 79px;">
            <td align="center" colspan="2" width="100%" style="border: none">
                <img class="template-code" src="{{this.barcodeUrl}}" width="80%">
                <div style="letter-spacing: 2px;margin-top: 1px; text-align: center">
                    <span>{{this.matnr}}</span>
                </div>
            </td>
        </tr>
    </table>
    {{/each}}
</script>
<!-- 模板3 -->
<script type="text/template" id="templatePreview3" class="template-qrcode">
    {{#each data}}
    <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;color: black;">
        <tr>
            <th>品号</th>
            <td colspan="5"><strong>{{this.matnr}}</strong></td>
        </tr>
        <tr>
            <th>批次</th>
            <td colspan="2"><strong>{{this.batch}}</strong></td>
            <th>货主</th>
            <td colspan="2"><strong>{{this.owner}}</strong></td>
        </tr>
        <tr>
            <th>重量</th>
            <td colspan="1"><strong>{{this.anfme1}}kg</strong></td>
            <td colspan="1"><strong>{{this.anfme2}}kg</strong></td>
            <td colspan="1"><strong>{{this.anfme3}}kg</strong></td>
            <td colspan="1"><strong>{{this.anfme4}}kg</strong></td>
            <td colspan="1"><strong>{{this.anfme5}}kg</strong></td>
        </tr>
        <tr>
            <td colspan="1"><strong>{{this.anfme6}}kg</strong></td>
            <td colspan="1"><strong>{{this.anfme7}}kg</strong></td>
            <td colspan="1"><strong>{{this.anfme8}}kg</strong></td>
            <td colspan="1"><strong>{{this.anfme9}}kg</strong></td>
            <td colspan="1"><strong>{{this.anfme10}}kg</strong></td>
            <td colspan="1"><strong>{{this.anfme11}}kg</strong></td>
        </tr>
        <tr>
            <td colspan="1"><strong>{{this.anfme12}}kg</strong></td>
            <td colspan="1"><strong>{{this.anfme13}}kg</strong></td>
            <td colspan="1"><strong>{{this.anfme14}}kg</strong></td>
            <td colspan="1"><strong>{{this.anfme15}}kg</strong></td>
            <td colspan="1"><strong>{{this.anfme16}}kg</strong></td>
            <td colspan="1"><strong>{{this.anfme17}}kg</strong></td>
        </tr>
    </table>
    {{/each}}
</script>
</html>
src/main/webapp/views/mat/mat.html
@@ -417,8 +417,9 @@
    {{#each data}}
    <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;">
        <tr style="height: 74px" >
            <td align="center" scope="col" colspan="1">商品</td>
            <td align="center" scope="col" colspan="1" style="font-weight: bold;"><strong style="font-weight: bold;color: black;">商品</strong></td>
            <td align="center" scope="col" colspan="1" style="
                font-weight: bold;
                display: inline-block;
                line-height: 20px;
                vertical-align: middle;
@@ -430,18 +431,18 @@
                -webkit-line-clamp: 3;
                -webkit-box-orient: vertical;
                    ">
                {{this.maktx}}
                <strong style="font-weight: bold;color: black;">{{this.maktx}}</strong>
            </td>
            <td align="center" scope="col" colspan="2" rowspan="2">
                <img class="template-code template-qrcode" src="{{this.barcodeUrl}}" width="80%">
                <div style="letter-spacing: 1px;margin-top: 1px; text-align: center">
                    <span>{{this.matnr}}</span>
                    <span style="font-weight: bold;color: black;"><strong style="font-weight: bold;color: black;">{{this.matnr}}</strong></span>
                </div>
            </td>
        </tr>
        <tr style="height: 74px">
            <td align="center" colspan="1">备注</td>
            <td align="center" colspan="1" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">{{this.memo}}</td>
            <td align="center" colspan="1" style="font-weight: bold;color: black;"><strong style="font-weight: bold;color: black;">备注</strong></td>
            <td align="center" colspan="1" style="font-weight: bold;color: black;overflow:hidden; white-space:nowrap; text-overflow:ellipsis;"><strong style="font-weight: bold;color: black;">{{this.memo}}</strong></td>
        </tr>
    </table>
    {{/each}}
src/main/webapp/views/report/locDetl.html
@@ -67,7 +67,8 @@
                {field: 'maktx', align: 'center',title: '商品名称'},
                {field: 'batch', align: 'center',title: '批次'},
                {field: 'anfme', align: 'center',title: '数量'},
                {field: 'orderNo', align: 'center',title: '订单号'},
                {field: 'owner$', align: 'center',title: '货主'},
                // {field: 'orderNo', align: 'center',title: '订单号'},
                {field: 'createTime$', align: 'center',title: '入库时间'},
                {field: 'specs', align: 'center',title: '规格'}
            ]],