From 1b72fc0dd1d7004de54ab0886e0323cb1b96198d Mon Sep 17 00:00:00 2001 From: 懒羊羊 <15939171744@163.com> Date: 星期三, 10 一月 2024 16:38:53 +0800 Subject: [PATCH] 批次上料 --- guns-vip-main/src/main/webapp/assets/modular/kb/materialRegistration/materialRegistration.js | 54 ++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 42 insertions(+), 12 deletions(-) diff --git a/guns-vip-main/src/main/webapp/assets/modular/kb/materialRegistration/materialRegistration.js b/guns-vip-main/src/main/webapp/assets/modular/kb/materialRegistration/materialRegistration.js index ff99aab..b1da3de 100644 --- a/guns-vip-main/src/main/webapp/assets/modular/kb/materialRegistration/materialRegistration.js +++ b/guns-vip-main/src/main/webapp/assets/modular/kb/materialRegistration/materialRegistration.js @@ -127,17 +127,17 @@ */ MaterialShortage.initColumn = function () { return [[ - {type: 'numbers'}, + {type: 'checkbox', fixed: 'left'}, {field: 'id', hide: true, title: 'ID'}, - {field: 'workOrderNo', sort: true, title: '宸ュ崟鍙�', width: 165}, + {field: 'workOrderNo', sort: true, title: '宸ュ崟鍙�', width: 150}, // {field: 'loadingCode', sort: true, title: '涓婃枡宸ヤ綅', width: 105}, - {field: 'locationCode', sort: true, title: '宸ヤ綅缂栧彿', width: 105}, + {field: 'locationCode', sort: true, title: '宸ヤ綅缂栧彿', width: 100}, //{field: 'loadingCode', sort: true, title: '鎵爜宸ヤ綅缂栧彿', width: 105}, - {field: 'materialCode', sort: true, title: '鐗╂枡缂栫爜', width: 135}, + {field: 'materialCode', sort: true, title: '鐗╂枡缂栫爜', width: 170}, {field: 'spareField1', sort: true, title: '涓婃枡鏁伴噺'}, {field: 'spareField2', sort: true, title: '鍗曚綅'}, - {field: 'loadingCode', sort: true, title: '鐗╂枡鎵规'}, - {field: 'state', sort: true, title: '鏄惁鎵爜', width: 105,templet: '#stateTpl'}, + {field: 'loadingCode', sort: true, title: '鐗╂枡鎵规',width: 120}, + {field: 'state', sort: true, title: '鏄惁涓婃枡', width: 105,templet: '#stateTpl'}, // {field: 'orderStatus', sort: true, title: '鐘舵��',align:'center',width:80,templet: '#orderStatusTpl'}, ]]; @@ -154,10 +154,36 @@ url: Feng.ctxPath + '/productionOrderBatchInfo/boardList', // page: true, height: 345, + toolbar: '#toolbarDemo', cellMinWidth: 80, where:queryData, cols: MaterialShortage.initColumn() }); + } + + // 宸ュ叿鏍忎簨浠� + table.on('toolbar(materialShortageTable)', function(obj){ + var id = obj.config.id; + var checkStatus = table.checkStatus(id); + switch(obj.event){ + case 'getCheckData': + var data = checkStatus.data; + console.log(data.length) + console.log(data) + if(data.length!==1){ + Feng.error("璇锋纭�夋嫨涓�鏉℃暟鎹�") + return + } + resetting(data[0].id) + break; + }; + }); + + function resetting(data){ + var resetting = new $ax(Feng.ctxPath + "/productionOrderBatchInfo/resetting?id=" + data); + var resettingResult = resetting.start(); + initMaterialShortage() + Feng.success("閲嶇疆鎴愬姛") } // 鐢熶骇宸ュ崟璁剧疆鎸夐挳鐐瑰嚮浜嬩欢 @@ -335,14 +361,18 @@ Feng.error("璇疯緭鍏ュ畬鏁撮暱搴︿俊鎭�"); return } - var checkLocationCode = new $ax(Feng.ctxPath + "/productionOrderBatchInfo/checkLocationCode?materialCode=" + barCode.substring(0, 14) + "&workOrderNo="+ $('#workOrderNo').val()); - var checkLocationCodeResult = checkLocationCode.start(); - if(checkLocationCodeResult.data === 0){ - Feng.error("鏉$爜淇℃伅寮傚父") - return - } + // var checkLocationCode = new $ax(Feng.ctxPath + "/productionOrderBatchInfo/checkLocationCode?materialCode=" + barCode.substring(0, 14) + "&workOrderNo="+ $('#workOrderNo').val()); + // var checkLocationCodeResult = checkLocationCode.start(); + // if(checkLocationCodeResult.data === 0){ + // Feng.error("鏉$爜淇℃伅寮傚父") + // return + // } var updateOrderBatchInfo = new $ax(Feng.ctxPath + "/productionOrderBatchInfo/updateOrderBatchInfo?materialCode=" + barCode.substring(0, 14) + "&workOrderNo="+ $('#workOrderNo').val()+ "&spareField1="+ number + "&loadingCode="+ batch); var updateOrderBatchInfoResult = updateOrderBatchInfo.start(); + if(updateOrderBatchInfoResult.data === "0"){ + Feng.error("鎵规涓嶅悓鏃犳硶褰曞叆"); + return; + } Feng.success("褰曞叆鎴愬姛") clean() initMaterialShortage() -- Gitblit v1.9.3