luxiaotao1123
2021-06-04 25cf6f9a79cb2816104354762144fe6d70ba3b1f
Merge branch 'master' of https://gitee.com/luxiaotao1123/xtywms
1个文件已修改
46 ■■■■■ 已修改文件
src/main/webapp/views/pda/combProAgv.html 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pda/combProAgv.html
@@ -241,8 +241,6 @@
            }
        });
    });
    // 获取工作区
    function getDevp(){
        $.ajax({
@@ -266,31 +264,45 @@
        })
    }
    getDevp();
    });
    var matCodeLayerIdx;
    function getMat() {
        matCodeLayerIdx = layer.open({
            type: 2,
            title: '提取物料',
            shade: [0.3,'#000'],
            area: ['90%', '90%'],
            content: 'matQuery.html',
            success: function(layero, index){
                $('.layui-layer-title').css('font-size', '16px');
            },
            end: function () {
                $('#mat-btn').focus();
            }
        });
    }
    // 添加表格数据
    //    var matData = [];
    function addTableData(data) {
        for (var i = 0; i < data.length; i++) {
            var toPush = true;
        if (isEmpty(data.matName)){
            tips("提取失败", true);
            return;
        }
        let toPush = true;
            for (var j = 0; j < matData.length; j++) {
                if (data[i].matNo === matData[j].matNo && data[i].mnemonic === matData[j].mnemonic) {
                    matData[j].count = Number(matData[j].count) + Number(data[i].count);
            if (data.matNo === matData[j].matNo) {
                matData[j].count = Number(matData[j].count) + Number(data.count);
                    toPush = false;
                }
            }
            if (toPush) {
                matData.push(data[i]);
                sourceData.push({
                    matNo: data[i].matNo,
                    count: data[i].count,
                    supplier: data[i].supplier,
                    mnemonic: data[i].mnemonic,
                });
            matData.push(data);
            }
        }
        tips("提取成功");
        tableIns.reload({data: matData});
//        $("#comb-btn").focus();
    }