懒羊羊
2024-01-10 a556270e96bc6e7fa4202c466d57cc75f778c614
批次上料
已修改12个文件
361 ■■■■■ 文件已修改
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/bs/bomInfo/entity/BomInfo.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/bs/bomInfo/mapper/mapping/BomInfoMapper.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/bs/bomInfo/model/params/BomInfoParam.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/bs/bomInfo/model/result/BomInfoResult.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrdeInfo/service/impl/ProductionOrdeInfoServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/controller/ProductionOrderBatchInfoController.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/mapper/mapping/ProductionOrderBatchInfoMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/model/params/ProductionOrderBatchInfoParam.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/assets/modular/bs/bomInfo/bomInfo.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/assets/modular/kb/materialRegistration/materialRegistration.js 254 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/assets/modular/om/productionOrderBatchInfo/productionOrderBatchInfo.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/pages/modular/kb/materialRegistration/materialRegistration.html 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/bs/bomInfo/entity/BomInfo.java
@@ -107,6 +107,19 @@
    @TableField("remarks")
    private String remarks;
    /**
     * 备注
     */
    @TableField("line_code")
    private String lineCode;
    public String getLineCode() {
        return lineCode;
    }
    public void setLineCode(String lineCode) {
        this.lineCode = lineCode;
    }
    public Long getId() {
        return id;
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/bs/bomInfo/mapper/mapping/BomInfoMapper.xml
@@ -16,6 +16,8 @@
        <result column="traceability_type" property="traceabilityType" />
        <result column="quantity" property="quantity" />
        <result column="remarks" property="remarks" />
        <result column="line_code" property="lineCode" />
    </resultMap>
    <!-- 通用查询结果列 -->
@@ -23,7 +25,7 @@
        id AS "id", material_code AS "materialCode", material_name AS "materialName", product_code AS "productCode", product_name AS "productName",
        location_code AS "locationCode", location_name AS "locationName",
        loading_code AS "loadingCode", loading_name AS "loadingName",
        traceability_type AS "traceabilityType", quantity AS "quantity", remarks AS "remarks"
        traceability_type AS "traceabilityType", quantity AS "quantity", remarks AS "remarks", line_code AS "lineCode"
    </sql>
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/bs/bomInfo/model/params/BomInfoParam.java
@@ -76,6 +76,9 @@
     */
    private String remarks;
    private String lineCode;
    @Override
    public String checkParam() {
        return null;
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/bs/bomInfo/model/result/BomInfoResult.java
@@ -55,6 +55,9 @@
     */
    private String locationCode;
    private String lineCode;
    /**
     * 工位名称
     */
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrdeInfo/service/impl/ProductionOrdeInfoServiceImpl.java
@@ -124,7 +124,10 @@
    @Override
    public void saveOrderBatchInfo(ProductionOrdeInfoParam productionOrdeInfoParam) {
        List<BomInfo> productCode = bomInfoService.list(new QueryWrapper<BomInfo>().eq("product_code", productionOrdeInfoParam.getMaterialCode()));
        List<BomInfo> productCode = bomInfoService.list(new QueryWrapper<BomInfo>()
                .eq("product_code", productionOrdeInfoParam.getMaterialCode())
                .isNotNull("location_code")
        );
        List<ProductionOrderBatchInfo> workOrderNo = orderBatchInfoService.list(new QueryWrapper<ProductionOrderBatchInfo>().eq("work_order_no", productionOrdeInfoParam.getWorkOrderNo()));
        if(workOrderNo.size()==0){
            for (BomInfo bomInfo : productCode) {
@@ -135,6 +138,8 @@
                param.setLoadingCode(bomInfo.getLoadingCode());
                param.setMaterialCode(bomInfo.getMaterialCode());
                param.setState("否");
                param.setSpareField1("0");
                param.setSpareField2(bomInfo.getLineCode());
                param.setCreateTime(new Date());
                orderBatchInfoService.save(param);
            }
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/controller/ProductionOrderBatchInfoController.java
@@ -7,6 +7,7 @@
import cn.stylefeng.roses.core.base.controller.BaseController;
import cn.stylefeng.roses.kernel.model.response.ResponseData;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -130,9 +131,10 @@
    @ResponseBody
    @RequestMapping("/boardList")
    public ResponseData boardList(ProductionOrderBatchInfoParam productionOrderBatchInfoParam) {
        productionOrderBatchInfoService.findPageBySpec(productionOrderBatchInfoParam);
        List<ProductionOrderBatchInfo> list = productionOrderBatchInfoService.list(new QueryWrapper<ProductionOrderBatchInfo>()
                .eq("work_order_no", productionOrderBatchInfoParam.getWorkOrderNo())
                .eq("loading_code", productionOrderBatchInfoParam.getLoadingCode())
                .isNotNull("location_code")
        );
        return ResponseData.success(0,null,list);
    }
@@ -151,6 +153,38 @@
        return ResponseData.success();
    }
    @ResponseBody
    @RequestMapping("/checkLocationCode")
    public ResponseData checkLocationCode(ProductionOrderBatchInfoParam productionOrderBatchInfoParam) {
        List<ProductionOrderBatchInfo> list = productionOrderBatchInfoService.list(new QueryWrapper<ProductionOrderBatchInfo>()
                .eq("material_code", productionOrderBatchInfoParam.getMaterialCode())
                .eq("work_order_no", productionOrderBatchInfoParam.getWorkOrderNo())
                .isNotNull("location_code")
                .eq("state", "否")
        );
        return ResponseData.success(list.size());
    }
    @ResponseBody
    @RequestMapping("/updateOrderBatchInfo")
    public ResponseData updateOrderBatchInfo(ProductionOrderBatchInfoParam productionOrderBatchInfoParam) {
        Long id = getCheckLocationCodeList(productionOrderBatchInfoParam).get(0).getId();
        ProductionOrderBatchInfo byId = productionOrderBatchInfoService.getById(id);
        byId.setState("是");
        byId.setLoadingCode(productionOrderBatchInfoParam.getLoadingCode());
        byId.setSpareField1(productionOrderBatchInfoParam.getSpareField1());
        productionOrderBatchInfoService.saveOrUpdate(byId);
        return ResponseData.success();
    }
    public List<ProductionOrderBatchInfo> getCheckLocationCodeList(ProductionOrderBatchInfoParam productionOrderBatchInfoParam){
        List<ProductionOrderBatchInfo> list = productionOrderBatchInfoService.list(new QueryWrapper<ProductionOrderBatchInfo>()
                .eq("material_code", productionOrderBatchInfoParam.getMaterialCode())
                .eq("work_order_no", productionOrderBatchInfoParam.getWorkOrderNo())
                .isNotNull("location_code")
        );
        return list;
    }
}
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/mapper/mapping/ProductionOrderBatchInfoMapper.xml
@@ -57,6 +57,7 @@
        <if test="paramCondition.loadingCode != null and paramCondition.loadingCode != ''">
            and loading_code like CONCAT('%',#{paramCondition.loadingCode},'%')
        </if>
    </select>
    <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.om.productionOrderBatchInfo.model.params.ProductionOrderBatchInfoParam">
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrderBatchInfo/model/params/ProductionOrderBatchInfoParam.java
@@ -57,6 +57,7 @@
     */
    private String state;
    /**
     * 预留字段1
     */
guns-vip-main/src/main/webapp/assets/modular/bs/bomInfo/bomInfo.js
@@ -31,6 +31,7 @@
            // {field: 'traceabilityType', sort: true, title: '追溯类型'},
            {field: 'traceabilityType', title: '追溯类型',width: 100, templet: function (data) {if (data.traceabilityType === '1') return '编号追溯';else if (data.traceabilityType === '2') return '批次追溯'; else return '追溯';}},
            {field: 'quantity', sort: true, title: '数量',align:'center'},
            {field: 'lineCode', sort: true, title: '单位',align:'center'},
            {field: 'remarks', sort: true, title: '备注'},
            {align: 'center', toolbar: '#tableBar', title: '操作', width: 125}
        ]];
guns-vip-main/src/main/webapp/assets/modular/kb/materialRegistration/materialRegistration.js
@@ -31,11 +31,12 @@
    async function initPageInfo() {
        await initKanBanConfInfo();//初始化配置信息
        await initOrderInfo();
        initBomTable();
       // initBomTable();
        initMaterialShortage();
     /*   xR();
        xa();*/
    }
@@ -87,7 +88,7 @@
    function initBomTable(){
        var queryData = {};
        queryData['loadingCode'] = $("#locationCode").val();
        // queryData['loadingCode'] = $("#locationCode").val();
        // queryData['workOrderNo'] = $("#workOrderNo").val();
        // 渲染表格
@@ -115,7 +116,7 @@
            // {field: 'workorderNo', sort: true, title: '工单编号'},
            // {field: 'productCode', sort: true, title: '产品编号'},
            {field: 'locationCode', sort: true, title: '工位编号'},
            {field: 'loadingCode', sort: true, title: '上料工位编号'},
           // {field: 'loadingCode', sort: true, title: '上料工位编号'},
            // {field: 'state', sort: true, title: '是否扫码'},
            // {field: 'batchCode', sort: true, title: '批次码'},
        ]];
@@ -131,17 +132,21 @@
            {field: 'workOrderNo', sort: true, title: '工单号', width: 165},
            // {field: 'loadingCode', sort: true, title: '上料工位', width: 105},
            {field: 'locationCode', sort: true, title: '工位编号', width: 105},
            {field: 'loadingCode', sort: true, title: '扫码工位编号', width: 105},
            {field: 'materialCode', sort: true, title: '物料编码'},
            {field: 'barCode', sort: true, title: '扫码编号'},
            {field: 'state', sort: true, title: '是否扫码', width: 105},
            //{field: 'loadingCode', sort: true, title: '扫码工位编号', width: 105},
            {field: 'materialCode', sort: true, title: '物料编码', width: 135},
            {field: 'spareField1', sort: true, title: '剩余数量'},
            {field: 'spareField2', sort: true, title: '单位'},
            {field: 'loadingCode', sort: true, title: '物料批次'},
            {field: 'state', sort: true, title: '是否扫码', width: 105,templet: '#stateTpl'},
            // {field: 'orderStatus', sort: true, title: '状态',align:'center',width:80,templet: '#orderStatusTpl'},
        ]];
    };
    function initMaterialShortage(){
        var queryData = {};
        queryData['workOrderNo'] = $("#workOrderNo").val();
        queryData['loadingCode'] = $("#locationCode").val();
        // queryData['loadingCode'] = $("#locationCode").val();
        // 渲染表格
        var tableResult = table.render({
@@ -239,56 +244,110 @@
        });
    };
    $("#barCode").bind("keydown",function(e){
        // 兼容FF和IE和Opera
        var theEvent = e || window.event;
        var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
        if (code === 13) {
            var ajax1 = new $ax(Feng.ctxPath + "/bomInfo/bomCheck?materialCode=" +$('#barCode').val()+"&loadingCode="+$('#locationCode').val());
            var result1 = ajax1.start();
            console.log(result1.data);
            if(result1.data!==0) {
                //回车执行查询
                var ajax = new $ax(Feng.ctxPath + "/productionOrderBatchInfo/barCodeCheck?materialCode=" + $('#barCode').val() + "&workOrderNo=" + $('#workOrderNo').val());
                var result = ajax.start();
                console.log(result.data);
                if (result.data === 0) {
                    let ajax = new $ax(Feng.ctxPath + "/productionOrderBatchInfo/updateState", function (data) {
                    }, function (data) {
                        Feng.error("添加失败!" + data.responseJSON.message)
                    });
                    ajax.set("materialCode", $('#barCode').val());
                    ajax.set("workOrderNo", $('#workOrderNo').val());
                    ajax.set("state", "是");
                    ajax.start();
                    // initBomTable();
                    initMaterialShortage();
                } else {
                    layer.open({
                        title: "操作提示",
                        icon: 0,
                        closeBtn: 2,
                        area: ['450px', '160px'],
                        time: 5000,
                        content: '<span style="font-size: 30px;color: red">该标签已被扫描!!!</span>'
                    });
                }
            }else {
                layer.open({
                    title: "操作提示",
                    icon: 0,
                    closeBtn: 2,
                    area: ['450px', '160px'],
                    time: 5000,
                    content: '<span style="font-size: 30px;color: red">BOM校验错误请重新扫码!!!</span>'
                });
            }
        }
    });
    // $("#barCode").bind("keydown",function(e){
    //     // 兼容FF和IE和Opera
    //     var theEvent = e || window.event;
    //     var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
    //     if (code === 13) {
    //         var ajax1 = new $ax(Feng.ctxPath + "/bomInfo/bomCheck?materialCode=" +$('#barCode').val()+"&loadingCode="+$('#locationCode').val());
    //         var result1 = ajax1.start();
    //         console.log(result1.data);
    //         if(result1.data!==0) {
    //             //回车执行查询
    //             var ajax = new $ax(Feng.ctxPath + "/productionOrderBatchInfo/barCodeCheck?materialCode=" + $('#barCode').val() + "&workOrderNo=" + $('#workOrderNo').val());
    //             var result = ajax.start();
    //             console.log(result.data);
    //             if (result.data === 0) {
    //                 let ajax = new $ax(Feng.ctxPath + "/productionOrderBatchInfo/updateState", function (data) {
    //                 }, function (data) {
    //                     Feng.error("添加失败!" + data.responseJSON.message)
    //                 });
    //                 ajax.set("materialCode", $('#barCode').val());
    //                 ajax.set("workOrderNo", $('#workOrderNo').val());
    //                 ajax.set("state", "是");
    //                 ajax.start();
    //                 // initBomTable();
    //                 initMaterialShortage();
    //             } else {
    //                 layer.open({
    //                     title: "操作提示",
    //                     icon: 0,
    //                     closeBtn: 2,
    //                     area: ['450px', '160px'],
    //                     time: 5000,
    //                     content: '<span style="font-size: 30px;color: red">该标签已被扫描!!!</span>'
    //                 });
    //             }
    //         }else {
    //             layer.open({
    //                 title: "操作提示",
    //                 icon: 0,
    //                 closeBtn: 2,
    //                 area: ['450px', '160px'],
    //                 time: 5000,
    //                 content: '<span style="font-size: 30px;color: red">BOM校验错误请重新扫码!!!</span>'
    //             });
    //         }
    //     }
    // });
    $('#btnClean').click(function (){
        $('#barCode').val("");
        clean()
    });
    function clean(){
        $('#barCode').val("");
        $('#number').val("");
    }
    $('#confirm').click(function (){
        inputMethod($('#barCode').val());
       // let barCode = $('#barCode').val();
       // let batch = barCode.substring(14,25);
       // let number = $('#number').val();
       // if(barCode === '' || number === ''){
       //     Feng.error("请输入条码和数量的完整信息");
       //     return
       // }else if(barCode.length!==25){
       //     Feng.error("请输入完整长度信息");
       //     return
       // }
       // var checkLocationCode = new $ax(Feng.ctxPath + "/productionOrderBatchInfo/checkLocationCode?materialCode=" + barCode.substring(0, 14) + "&workOrderNo="+ $('#workOrderNo').val());
       // var checkLocationCodeResult = checkLocationCode.start();
       // if(checkLocationCodeResult.data === 0){
       //     Feng.error("条码信息异常")
       //     return
       // }
       //  var updateOrderBatchInfo = new $ax(Feng.ctxPath + "/productionOrderBatchInfo/updateOrderBatchInfo?materialCode=" + barCode.substring(0, 14) + "&workOrderNo="+ $('#workOrderNo').val()+ "&spareField1="+ number + "&loadingCode="+ batch);
       //  var updateOrderBatchInfoResult = updateOrderBatchInfo.start();
       //  Feng.success("录入成功")
       //  clean()
       //  initMaterialShortage()
    });
    function inputMethod(inBarCode){
        let barCode = inBarCode;
        let batch = barCode.substring(14,25);
        let number = $('#number').val();
        if(barCode === '' || number === ''){
            Feng.error("请输入条码和数量的完整信息");
            return
        }else if(barCode.length!==25){
            Feng.error("请输入完整长度信息");
            return
        }
        var checkLocationCode = new $ax(Feng.ctxPath + "/productionOrderBatchInfo/checkLocationCode?materialCode=" + barCode.substring(0, 14) + "&workOrderNo="+ $('#workOrderNo').val());
        var checkLocationCodeResult = checkLocationCode.start();
        if(checkLocationCodeResult.data === 0){
            Feng.error("条码信息异常")
            return
        }
        var updateOrderBatchInfo = new $ax(Feng.ctxPath + "/productionOrderBatchInfo/updateOrderBatchInfo?materialCode=" + barCode.substring(0, 14) + "&workOrderNo="+ $('#workOrderNo').val()+ "&spareField1="+ number + "&loadingCode="+ batch);
        var updateOrderBatchInfoResult = updateOrderBatchInfo.start();
        Feng.success("录入成功")
        clean()
        initMaterialShortage()
    }
    var websocket = null;
    //判断当前浏览器是否支持WebSocket
@@ -301,48 +360,49 @@
    }
    //接收到消息的回调方法
    websocket.onmessage = function(event) {
        console.log(event);
        console.log(event.data)
        $('#barCode').val(event.data);
            var ajax1 = new $ax(Feng.ctxPath + "/bomInfo/bomCheck?materialCode=" +$('#barCode').val()+"&loadingCode="+$('#locationCode').val());
            var result1 = ajax1.start();
            console.log(result1.data);
            if(result1.data!==0) {
                //回车执行查询
                var ajax = new $ax(Feng.ctxPath + "/productionOrderBatchInfo/barCodeCheck?materialCode=" + $('#barCode').val() + "&workOrderNo=" + $('#workOrderNo').val());
                var result = ajax.start();
                console.log(result.data);
                if (result.data === 0) {
                    let ajax = new $ax(Feng.ctxPath + "/productionOrderBatchInfo/updateState", function (data) {
                    }, function (data) {
                        Feng.error("添加失败!" + data.responseJSON.message)
                    });
                    ajax.set("materialCode", $('#barCode').val());
                    ajax.set("workOrderNo", $('#workOrderNo').val());
                    ajax.set("state", "是");
                    ajax.start();
                    // initBomTable();
                    initMaterialShortage();
                } else {
                    layer.open({
                        title: "操作提示",
                        icon: 0,
                        closeBtn: 2,
                        area: ['450px', '160px'],
                        time: 5000,
                        content: '<span style="font-size: 30px;color: red">该标签已被扫描!!!</span>'
                    });
                }
            }else {
                layer.open({
                    title: "操作提示",
                    icon: 0,
                    closeBtn: 2,
                    area: ['450px', '160px'],
                    time: 5000,
                    content: '<span style="font-size: 30px;color: red">BOM校验错误请重新扫码!!!</span>'
                });
            }
        inputMethod(event.data);
        // console.log(event);
        // console.log(event.data)
        // $('#barCode').val(event.data);
        //     var ajax1 = new $ax(Feng.ctxPath + "/bomInfo/bomCheck?materialCode=" +$('#barCode').val()+"&loadingCode="+$('#locationCode').val());
        //     var result1 = ajax1.start();
        //     console.log(result1.data);
        //     if(result1.data!==0) {
        //         //回车执行查询
        //         var ajax = new $ax(Feng.ctxPath + "/productionOrderBatchInfo/barCodeCheck?materialCode=" + $('#barCode').val() + "&workOrderNo=" + $('#workOrderNo').val());
        //         var result = ajax.start();
        //         console.log(result.data);
        //         if (result.data === 0) {
        //             let ajax = new $ax(Feng.ctxPath + "/productionOrderBatchInfo/updateState", function (data) {
        //             }, function (data) {
        //                 Feng.error("添加失败!" + data.responseJSON.message)
        //             });
        //             ajax.set("materialCode", $('#barCode').val());
        //             ajax.set("workOrderNo", $('#workOrderNo').val());
        //             ajax.set("state", "是");
        //             ajax.start();
        //             // initBomTable();
        //             initMaterialShortage();
        //         } else {
        //             layer.open({
        //                 title: "操作提示",
        //                 icon: 0,
        //                 closeBtn: 2,
        //                 area: ['450px', '160px'],
        //                 time: 5000,
        //                 content: '<span style="font-size: 30px;color: red">该标签已被扫描!!!</span>'
        //             });
        //         }
        //     }else {
        //         layer.open({
        //             title: "操作提示",
        //             icon: 0,
        //             closeBtn: 2,
        //             area: ['450px', '160px'],
        //             time: 5000,
        //             content: '<span style="font-size: 30px;color: red">BOM校验错误请重新扫码!!!</span>'
        //         });
        //     }
    }
    //连接成功建立的回调方法
guns-vip-main/src/main/webapp/assets/modular/om/productionOrderBatchInfo/productionOrderBatchInfo.js
@@ -19,14 +19,16 @@
        return [[
            {type: 'checkbox'},
            {field: 'id', hide: true, title: '主键id'},
            {field: 'workOrderNo', sort: true, title: '工单编号',minWidth:160},
            {field: 'productionLine', sort: true, title: '产线编号'},
            {field: 'locationCode', sort: true, title: '工位编号'},
            {field: 'state', sort: true, title: '是否上料'},
            {field: 'createUser', sort: true, title: '创建用户'},
            {field: 'updateUser', sort: true, title: '更改用户'},
            {field: 'workOrderNo', sort: true, title: '工单号', width: 165},
            // {field: 'loadingCode', sort: true, title: '上料工位', width: 105},
            {field: 'locationCode', sort: true, title: '工位编号', width: 105},
            //{field: 'loadingCode', sort: true, title: '扫码工位编号', width: 105},
            {field: 'materialCode', sort: true, title: '物料编码'},
            {field: 'spareField1', sort: true, title: '剩余数量'},
            {field: 'loadingCode', sort: true, title: '物料批次'},
            {field: 'state', sort: true, title: '是否扫码', width: 105,templet: '#stateTpl'},
            {field: 'createTime', sort: true, title: '创建时间',minWidth:160},
            {field: 'updateTime', sort: true, title: '修改时间',minWidth:160},
            // {field: 'updateTime', sort: true, title: '修改时间',minWidth:160},
            {align: 'center', toolbar: '#tableBar', title: '操作'}
        ]];
    };
guns-vip-main/src/main/webapp/pages/modular/kb/materialRegistration/materialRegistration.html
@@ -47,8 +47,18 @@
                                    <input id="barCode" name="barCode" placeholder="扫描条码,获取物料编号,获取扫码类型,如果是批次上料,直接存工单批次表,如果是条码追溯,直接存追溯表(找最新的进行绑定)" type="text" class="layui-input" />
                                </div>
                            </div>
                            <div class="layui-inline" >
                                <button id="btnClean" class="layui-btn layui-btn-radius  layui-btn-normal layui-btn-lg">清 除</button>
                            <div class="layui-inline">
                                <button id="btnClean" class="layui-btn layui-btn-radius layui-btn-danger layui-btn-lg">清 除</button>
                            </div>
                            <br>
                            <div class="layui-inline layui-col-md8">
                                <label class="layui-form-label">剩余数量:</label>
                                <div class="layui-input-block">
                                    <input id="number" name="number" placeholder="请输入数量" type="number" class="layui-input" />
                                </div>
                            </div>
                            <div class="layui-inline">
                                <button id="confirm" class="layui-btn layui-btn-radius  layui-btn-normal layui-btn-lg">确 认</button>
                            </div>
                        </div>
                    </div>
@@ -195,7 +205,13 @@
    </div>
</div>
<script type="text/html" id="stateTpl">
    {{#  if(d.state == '是'){ }}
    <span style="color: green">是</span>
    {{#  } else if(d.state == '否'){ }}
    <span style="color: red;">否</span>
    {{#  } }}
</script>
@}