| | |
| | | {type: 'checkbox'} |
| | | ,{field: 'id', align: 'center',title: 'ID', hide:true} |
| | | ,{field: 'hostId', align: 'center',title: '', hide:true} |
| | | ,{field: 'orderId$', align: 'center',title: '订单内码', width: 100} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', width: 185} |
| | | ,{field: 'anfme', align: 'center',title: '应入库量', width: 100} |
| | | ,{field: 'inQty', align: 'center',title: '已入库量', width: 100} |
| | | ,{field: 'matnr', align: 'center',title: '商品编码'} |
| | |
| | | // showEditModel(data); |
| | | startIn(data); |
| | | break; |
| | | case "renew": |
| | | renew(data); |
| | | break; |
| | | } |
| | | }); |
| | | function startIn(data) { |
| | |
| | | form.val('inDetail',{ |
| | | "remain": remain |
| | | }); |
| | | |
| | | form.val('inDetail',data); |
| | | |
| | | form.on('submit(inLoc)',function (data) { |
| | | |
| | | var loc = insXmSel.getValue('valueStr'); |
| | | // alert(loc); |
| | | console.log(data.field); |
| | | var storeQty =data.field.remain; |
| | | |
| | | if(storeQty> data.field.anfme - data.field.inQty || storeQty<=0){ |
| | | layer.msg("数量不对"); |
| | | return; |
| | | } |
| | | if(loc===""){ |
| | | layer.msg("库位号为空"); |
| | | return; |
| | | } |
| | | |
| | | $.ajax({ |
| | | url: baseUrl+"/receiveDetl/addIn" |
| | | ,headers: {'token':localStorage.getItem('token')} |
| | |
| | | ,contentType:'application/json;charset=UTF-8' |
| | | ,method: 'POST' |
| | | ,success: function (res) { |
| | | console.log(res) |
| | | layer.closeAll(); |
| | | if(res.code === 200){ |
| | | layer.msg(res.msg); |
| | | tableReload(); |
| | | } |
| | | if (res.code === 500){ |
| | | layer.msg(res.msg); |
| | |
| | | }); |
| | | } |
| | | |
| | | function renew(data) { |
| | | console.log(data) |
| | | layer.confirm('确定要撤回全部上架数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/receiveDetl/renew/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(data), |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |