From eff92d4bf081c937c93ca05b3f1f2d9713c0eb61 Mon Sep 17 00:00:00 2001 From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU> Date: 星期四, 11 九月 2025 15:07:13 +0800 Subject: [PATCH] 委外领料:1.显示当前组织2.添加工单查询列表3.添加库位列表4.(待发物料)和(物料总清单)更改为(待扫物料)和(已扫物料)5.查询列表与带出明细改为存储过程 --- H5/Js/Wwll.js | 138 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 137 insertions(+), 1 deletions(-) diff --git a/H5/Js/Wwll.js b/H5/Js/Wwll.js index e359115..0e89c82 100644 --- a/H5/Js/Wwll.js +++ b/H5/Js/Wwll.js @@ -9,6 +9,20 @@ }, modeInfo: { daa001: "", planNo: "" }, scanInfo: { barcodeNum: "", splitNum: "", barcode: "" }, + ItemDetail: [], + ip: "", + port: "", + oldBarInfo: [], + cfBarInfo: [], + selectKey: "",//鏌ヨ鍏抽敭瀛� + actions: [],//鍒楄〃鐨勫�� + show: false,//鍒楄〃灞曠ず + // 褰撳墠閫変腑琛岀殑绱㈠紩 + currentIndex: -1, + // 瀛樺偍閫変腑琛屾暟鎹璞� + selItem: {}, + ItemBarKw: [],//褰撳ぉ琛岀浉鍏虫潯鐮佸簱浣嶄俊鎭� + DaaInfo: {}, } }, mounted() { @@ -19,6 +33,61 @@ }; }, methods: { + /** + * 澶勭悊琛岀偣鍑讳簨浠讹紙鍗曢�夐�昏緫锛� + * @param {Object} item 褰撳墠琛屾暟鎹� + * @param {Number} index 褰撳墠琛岀储寮� + */ + handleRowClick(item, index) { + if (this.isLoading) { + return; + } + + // 閲嶇疆鎵�鏈夎鐨勯�変腑鐘舵�� + this.currentIndex = -1; + + // 璁剧疆褰撳墠閫変腑琛� + this.currentIndex = index; + this.selItem = { + itemid: item.itemId,//椹煎嘲鍛藉悕娉� + index: index + }; + + console.log('褰撳墠閫変腑椤�:', this.selItem); // 璋冭瘯鐢� + + this.GetBarKwByItem(); + }, + //鑾峰彇搴撲綅淇℃伅 + GetBarKwByItem() { + //Womdaa + //WwGd + var that = this; + that.isLoading = true; + that.AxiosHttp("post", 'Womdaa/GetBarKwByItem', { + itemId: that.selItem.itemid, + userName: that.userInfo.loginAccount + }, false) + .then(function (res) { + var json = res; + if (json.status == 0) { + that.ItemBarKw = json.data.tbBillList; + } + else { + that.$toast.fail(json.message); + that.$playSound('error'); + that.ItemBarKw = []; + } + that.isLoading = false; + }) + .catch(function (error) { + that.isLoading = false; + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$playSound('error'); + console.log(error); + that.ItemBarKw = []; + }); + }, + getModel() { var that = this; that.isLoading = true; @@ -29,13 +98,20 @@ .then(function (res) { var json = res; if (json.status == 0) { - that.modeInfo = json.data.tbBillList; + that.ItemDetail = json.data.tbBillList; + that.DaaInfo = json.data.tbBillList.daaInfo; + that.modeInfo.planNo = json.data.tbBillList.planNo; + that.modeInfo.startTime = json.data.tbBillList.startTime; that.$refs.barcode.focus(); } else { that.$toast.fail(json.message); + that.$playSound('error'); that.$refs.daa001.focus(); that.modeInfo.daa001 = ""; + that.modeInfo.planNo = ""; + that.modeInfo.startTime = ""; + that.ItemDetail = []; } that.isLoading = false; }) @@ -47,6 +123,7 @@ that.modeInfo.daa001 = ""; }); }, + //鎵爜 getScan() { var that = this; if (that.modeInfo.daa001.length <= 0) { @@ -87,6 +164,7 @@ that.$refs.barcode.focus(); }); }, + //鎷嗗垎 getChaiFen() { var that = this; if (that.modeInfo.daa001.length <= 0) { @@ -132,5 +210,63 @@ that.$refs.splitNum.focus(); }); }, + //鑾峰彇宸ュ崟淇℃伅 + getInfo() { + this.show = true; + var that = this; + that.actions = []; + that.isLoading = true; + that.AxiosHttp("post", 'WwGd/GetXcslDaa', { + selectKey: that.selectKey, + }, false) + .then(function (res) { + var json = res; + if (json.status == 0) { + + if (json.data.tbBillList.length <= 0) { + that.$toast.fail("娌℃湁鍙敤鐨勬暟鎹�"); + that.$playSound('error'); + } else { + that.itemInfo = json.data.tbBillList; + that.actions = json.data.tbBillList.map(item => { + return { + name: item.daaInfo, // 鎷兼帴瀛楁 + subname: item.startTime + }; + }); + } + } + else { + that.$toast.fail(json.message); + that.$playSound('error'); + } + that.isLoading = false; + }) + .catch(function (error) { + that.isLoading = false; + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$playSound('error'); + console.log(error); + }); + }, + onSelect(item) { + // 榛樿鎯呭喌涓嬬偣鍑婚�夐」鏃朵笉浼氳嚜鍔ㄦ敹璧� + // 鍙互閫氳繃 close-on-click-action 灞炴�у紑鍚嚜鍔ㄦ敹璧� + this.show = false; + console.log(item); + // 姝e垯鍖归厤绗竴涓柟鎷彿鍐呭 + const regex = /\[([^\]]+)\]/; + const matchResult = item.name.match(regex); + + if (matchResult && matchResult[1]) { + this.modeInfo.daa001 = matchResult[1]; // PPBOM00000088-1 + console.log('鎻愬彇鐨凞AA001:', this.modeInfo.daa001); + } else { + this.$toast.fail('宸ュ崟鍙锋牸寮忓紓甯�'); + this.modeInfo.daa001 = ''; + } + this.getModel(); + //this.$toast(item.name); + }, } }) \ No newline at end of file -- Gitblit v1.9.3