| | |
| | | cols: [[ //工具条明细 |
| | | {type: 'numbers'}, |
| | | {field: 'matnr', title: '商品编码', width: 160}, |
| | | {field: 'maktx', title: '商品名称', width: 160}, |
| | | {field: 'maktx', title: '商品名称'}, |
| | | {field: 'locNo', title: '库位号'}, |
| | | {field: 'batch', title: '批次'}, |
| | | {field: 'anfme', title: '数量'}, |
| | | {field: 'realAnfme', title: '真实数量',style: 'color: blue;font-weight: bold', edit: true}, |
| | | {field: 'diffAnfme', title: '差异数量', style: 'font-weight: bold'}, |
| | | {field: 'type$', title: '状态'}, |
| | | {align: 'center', title: '操作', toolbar: '#formSSXMTableBar3', minWidth: 80, width: 80, fixed: 'right'} |
| | | {field: 'type$', title: '状态'} |
| | | |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | {field: 'anfme', title: '库存数量'}, |
| | | {field: 'realAnfme', title: '真实数量'}, |
| | | {field: 'diffAnfme', title: '差异数量', style: 'font-weight: bold'}, |
| | | {field: 'type$', title: '状态'}, |
| | | {field: 'type$', title: '状态'} |
| | | |
| | | {align: 'center', title: '操作', toolbar: '#formSSXMTableBarr', minWidth: 80, width: 80, fixed: 'right'} |
| | | |
| | | ]], |
| | | done: function (res) { |
| | | $(layero).find('.layui-table-view').css('margin', '0'); |
| | |
| | | function examine(expTpe) { |
| | | admin.open({ |
| | | type: 1, |
| | | title: (expTpe ? '修改' : '添加') + '盘点单', |
| | | title: '审核盘点单', |
| | | content: $('#editDialog2').html(), |
| | | area: '1300px', |
| | | success: function (layero, dIndex) { |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | var isExpAdd = !expTpe; |
| | | // 回显数据 |
| | | form.val('editForm', expTpe); |
| | | form.val('editForm2', expTpe); |
| | | if (expTpe) { |
| | | $('#orderNo').attr("disabled", "disabled"); |
| | | } |
| | | // 表单提交事件 |
| | | form.on('submit(orderEditSubmit)', function (data) { |
| | | // 组装数据 |
| | | if (xxDataList.length <= 0) { |
| | | layer.tips('请添加单据明细', '#matAddBtnComment', {tips: [1, '#ff4c4c']}); |
| | | return false; |
| | | } |
| | | if (data.field.orderNo == "" || data.field.orderNo == null) { |
| | | layer.tips('请输入盘点单编号', '#orderNo', {tips: [1, '#ff4c4c']}); |
| | | return false; |
| | | } |
| | | form.on('submit(examine)', function (data) { |
| | | let nList = admin.util.deepClone(xxDataList); |
| | | // for (let xi = 0; xi < nList.length; xi++) { |
| | | // if (nList[xi].anfme <= 0){ |
| | | // layer.msg('明细修改数量不合法', {icon: 2}); |
| | | // return false; |
| | | // } |
| | | // if (nList[xi].anfme < nList[xi].workQty){ |
| | | // layer.msg('数量不能小于已作业数量', {icon: 2}); |
| | | // return false; |
| | | // } |
| | | // } |
| | | layer.load(2); |
| | | console.log(data); |
| | | $.ajax({ |
| | | url: baseUrl + "/orderCheck/form/" + (isExpAdd ? "add" : "modify") + "/auth", |
| | | url: baseUrl + "/orderCheck/examine", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | orderId: Number(data.field.id), |
| | | docType: Number(data.field.docType), |
| | | orderNo: data.field.orderNo, |
| | | orderDetlList: nList |
| | | list: nList |
| | | }), |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | |
| | | {field: 'realAnfme', title: '真实数量'}, |
| | | {field: 'diffAnfme', title: '差异数量', style: 'font-weight: bold'}, |
| | | {field: 'type$', title: '状态'} |
| | | |
| | | |
| | | ]], |
| | | done: function (res) { |