自动化立体仓库 - WMS系统
王佳豪
2021-03-29 8d1a27af40f3ebe9343a11eaede198e93836fa79
src/main/webapp/static/js/pakStore/pakStore.js
@@ -6,7 +6,10 @@
        {fixed: 'left', field: 'count', title: '数量(必填)', align: 'center', edit:'text', width: 120,  style:'color: blue;font-weight: bold'}
    ];
    cols.push.apply(cols, matCols);
    cols.push({fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:80})
    cols.push(
        {field: 'memo', title:'备注', align: 'center'},
        {fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120}
        )
    return cols;
}
@@ -89,6 +92,7 @@
    // 监听行工具事件
    table.on('tool(chooseData)', function(obj){
        var data = obj.data;
        switch (obj.event) {
            case 'remove':
                for (var i = matCodeData.length - 1; i >= 0; i--) {
@@ -102,6 +106,35 @@
                        // 覆盖render方法的done
                    }});
                break;
            case 'memo':
               var memoLayer = layer.open({
                    type: 2,
                    title: '备注',
                    maxmin: true,
                    area: ['400px', '215px'],
                    shadeClose: false,
                    content: 'matMemo.html',
                    btn: ['保存', '取消'],
                    style: 'text-algin: center',
                    yes:  function(index, layero){
                        var memo = layer.getChildFrame('body', index).find("#memo")[0].value;
                        matCodeData.map(function (item) {
                            if (item.matNo === data.matNo) {
                                item.memo = memo;
                            }
                        });
                        // 重置表格数据
                        tableIns.reload({data: matCodeData,done:function (res) {
                            limit();
                            getInBound();
                            layer.close(memoLayer);
                        }});
                    },
                    success: function(layero, index){
                    }
                });
                break;
        }
    });