| | |
| | | return util.toDateString(d.createTime); |
| | | }, width: 180 |
| | | }, |
| | | {field: 'outqty', title: '已出库量'}, |
| | | {field: 'inQty', title: '已入库量'}, |
| | | {field: 'color', title: '颜色'}, |
| | | {field: 'specs', title: '规格'} |
| | | ]], |
| | |
| | | |
| | | // 显示表单弹窗 |
| | | function showEditModel(expTpe) { |
| | | var mlist=null |
| | | var inQtys=[] |
| | | admin.open({ |
| | | type: 1, |
| | | title: (expTpe ? '修改' : '添加') + '单据', |
| | |
| | | var param = []; |
| | | var nList = admin.util.deepClone(xxDataList); |
| | | for (var xi = 0; xi < nList.length; xi++) { |
| | | if (nList[xi].qty > 0) { |
| | | // console.log('已入库:'+nList[xi].inQty) |
| | | // console.log('旧数量:'+inQtys[xi]) |
| | | // console.log('数量:'+nList[xi].qty) |
| | | if (nList[xi].inQty > 0 && inQtys[xi]!=nList[xi].qty) { |
| | | layer.msg("已入库无法修改", {icon: 2}) |
| | | return false; |
| | | } else if (nList[xi].qty > 0) { |
| | | param.push({ |
| | | billNo: data.field.billNo, |
| | | billType: data.field.billType, |
| | |
| | | memo: nList[xi].memo, |
| | | unit: nList[xi].unit, |
| | | qty: nList[xi].qty, |
| | | inQty: nList[xi].inQty, |
| | | }) |
| | | }else if (nList[xi].qty == 0){ |
| | | layer.msg('明细修改数量不合法', {icon: 2}); |
| | | return false; |
| | | } |
| | | } |
| | | if (param.length === 0) { |
| | |
| | | {field: 'specs', title: '规格', width: 160}, |
| | | {field: 'color', title: '颜色', width: 160}, |
| | | {field: 'size', title: '尺寸', width: 160}, |
| | | {field: 'qty', title: '修改数量', style: 'color: blue;font-weight: bold', edit: true, minWidth: 100, width: 100}, |
| | | {field: 'inQty', title: '已入库量', minWidth: 100, width: 100}, |
| | | {field: 'unit', title: '单位', width: 160}, |
| | | {field: 'memo', title: '备注' , edit: true, width: 160}, |
| | | {field: 'qty', title: '修改数量', style: 'color: blue;font-weight: bold', edit: true, minWidth: 100, width: 100}, |
| | | {align: 'center', title: '操作', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80} |
| | | ]], |
| | | done: function (res) { |
| | | mlist= res.data |
| | | for (let i = 0; i < mlist.length; i++) { |
| | | var waitIn=mlist[i] |
| | | inQtys.push(waitIn.qty) |
| | | } |
| | | $(layero).find('.layui-table-view').css('margin', '0'); |
| | | }, |
| | | size: '' |