| | |
| | | transform:rotate(-45deg); |
| | | } |
| | | |
| | | /**绿色勾*/ |
| | | #node-ok { |
| | | float: left; |
| | | width: 15px; |
| | | height: 15px; |
| | | border-radius: 50%; |
| | | margin-top: 13px; |
| | | background-color: #2ac845; |
| | | display: none; |
| | | } |
| | | |
| | | </style> |
| | | </head> |
| | | <body> |
| | |
| | | </div> |
| | | <div STYLE="margin: 5px 0" class="layui-input-inline"> |
| | | <label class="layui-form-label">上架货位</label> |
| | | <input class="layui-input" type="text" id="node" onkeyup="findNode(this)" placeholder="扫码 / 输入" autocomplete="off"> |
| | | <input style="float: left" class="layui-input" type="text" id="node" onkeyup="findNode(this)" placeholder="扫码 / 输入" autocomplete="off"> |
| | | <span id="node-ok"></span> |
| | | </div> |
| | | </header> |
| | | |
| | |
| | | limit: 500, |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {fixed: 'left', align: 'center', field: 'count', title: '数量', style:'color: blue', width:50}, |
| | | {fixed: 'left', align: 'center', field: 'anfme', title: '数量', style:'color: blue', width:50}, |
| | | {field: 'matnr', align: 'center', title: '商品编码'}, |
| | | {field: 'maktx', align: 'center', title: '商品名称'} |
| | | ]], |
| | |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | if (res.data != null) { |
| | | addTableData(res.data) |
| | | if (res.data.length > 0) { |
| | | tableIns.reload({data: res.data}); |
| | | $('#node').focus(); |
| | | } |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/pda"; |
| | |
| | | } |
| | | |
| | | function findNode(el) { |
| | | if (el.value.length === 7) { |
| | | $('#mat-btn').focus(); |
| | | getMat(); |
| | | if (isEmpty(el.value)) { |
| | | return; |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl + "/mobile/inStock/node/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | node: el.value |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | if (res.data != null) { |
| | | $('#pakin').focus(); |
| | | $('#node-ok').show(); |
| | | } else { |
| | | $('#node-ok').hide(); |
| | | } |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/pda"; |
| | | } else { |
| | | alert(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 提取物料 |
| | |
| | | matData.push(data[i]); |
| | | } |
| | | } |
| | | // console.log(matData) |
| | | tableIns.reload({data: matData}); |
| | | $("#comb-btn").focus(); |
| | | } |
| | |
| | | $('#code').val(""); |
| | | matData = []; |
| | | tableIns.reload({data: matData}); |
| | | $('#node-ok').hide(); |
| | | $('#putSiteSelect').val(""); |
| | | layui.form.render('select'); |
| | | // tips(""); |
| | | } |
| | | |
| | | // 入库 |
| | |
| | | if (res.code === 200) { |
| | | reset(); |
| | | tips("入库启动成功") |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/pda"; |
| | | } else { |
| | | tips(res.msg, true) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 空板入库 |
| | | function emptyPakIn() { |
| | | var barcode = $('#code').val(); |
| | | if (isEmpty(barcode)) { |
| | | tips("托盘条码为空", true); |
| | | return; |
| | | } |
| | | if (barcode.length !== 7) { |
| | | tips("条码必须为7位", true); |
| | | return; |
| | | } |
| | | var site = $('#putSiteSelect').val(); |
| | | if (null === site || undefined === site || site === "") { |
| | | tips("请选择入库口", true); |
| | | return; |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl+"/empty/plate/in/start", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | barcode: barcode, |
| | | sourceStaNo: site |
| | | }, |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | reset(); |
| | | tips("空板入库启动成功") |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/pda"; |
| | | } else { |