| | |
| | | function getCol() { |
| | | var cols = [ |
| | | {fixed: 'left', field: 'anfme', title: '数量(必填)', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}, |
| | | {field: 'batch', title: '序列码(选填)', align: 'center', edit:'text', width: 200, style:'color: block;font-weight: bold'} |
| | | {field: 'batch', title: '批号(选填)', align: 'center', edit:'text', width: 200, style:'color: block;font-weight: bold'} |
| | | ]; |
| | | cols.push.apply(cols, matCols); |
| | | cols.push({fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width: 80}) |
| | |
| | | return; |
| | | } |
| | | } |
| | | let devpNo = $('#putSiteSelect').val(); |
| | | let devpNo = $('#barcode').val(); |
| | | if (isEmpty(devpNo)) { |
| | | layer.msg("请选择入库站", {icon: 2}); |
| | | layer.msg("请输入料箱码", {icon: 2}); |
| | | return; |
| | | } |
| | | // 8 位纯数字校验 |
| | | if (!/^\d{8}$/.test(devpNo)) { |
| | | layer.msg("料箱码必须是 8 位纯数字", { icon: 2 }); |
| | | return; |
| | | } |
| | | console.log(matCodeData) |
| | | $.ajax({ |
| | | url: baseUrl+"/full/store/put/start", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | devpNo: Number(devpNo), |
| | | barcode: devpNo, |
| | | list: matCodeData |
| | | }), |
| | | contentType:'application/json;charset=UTF-8', |
| | |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.msg("入库启动成功,目标库位:" + res.data, {icon: 1}); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | matCodeData = []; |
| | | $('#barcode').val(""); |
| | | $('#focusMatByMat').val(""); |
| | | tableIns.reload({data: matCodeData,done:function (res) { limit(); getInBound();}}); |
| | | } else if (res.code === 403){ |