From 5692cc272a735fdd57c6bdf502f457f28671a452 Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期三, 28 五月 2025 13:26:24 +0800 Subject: [PATCH] 1.PDA生产确认领料,新增工单查询。 --- H5/Js/Xcsl.js | 71 +++++++++++++++++++++++++++++++++-- 1 files changed, 67 insertions(+), 4 deletions(-) diff --git a/H5/Js/Xcsl.js b/H5/Js/Xcsl.js index e250b2b..ccb0312 100644 --- a/H5/Js/Xcsl.js +++ b/H5/Js/Xcsl.js @@ -14,11 +14,15 @@ GX: "G007:鏍稿閫佹", Xvalue:4, XbarInfo: [], - DAA001: [], + DAA001: "", DAANum: "", xcslItemList: [], //鏉愭枡鍒楄〃 xcslWjsBarList: [],//鏈帴鏀跺垪琛� xcslYjsBarList: [],//宸叉帴鏀跺垪琛� + selectKey: "",//鏌ヨ鍏抽敭瀛� + actions: [],//鍒楄〃鐨勫�� + show: false,//鍒楄〃灞曠ず + } }, mounted() { @@ -32,7 +36,7 @@ GetItemsXcsl() { var that = this; - if (that.DAA001.length <= 0) { + if (!that.DAA001 || that.DAA001.length <= 0) { that.$toast.fail("宸ュ崟鍗曞彿涓嶈兘涓虹┖锛�"); that.$refs.DAA001.focus(); return; @@ -70,14 +74,14 @@ } var that = this; - if (that.Bar.length <= 0) { + if (!that.Bar ||that.Bar.length <= 0) { that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�"); that.$refs.Bar.focus(); return; } - if (that.DAA001.length <= 0) { + if (!that.DAA001 ||that.DAA001.length <= 0) { that.$toast.fail("宸ュ崟鍗曞彿涓嶈兘涓虹┖锛�"); that.$refs.DAA001.focus(); return; @@ -108,5 +112,64 @@ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); }); }, + //鑾峰彇宸ュ崟淇℃伅 + getInfo() { + this.show = true; + var that = this; + that.actions = []; + that.isLoading = true; + that.AxiosHttp("post", 'Womdaa/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 // 鎷兼帴瀛楁 + + }; + }); + } + } + 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.DAA001 = matchResult[1]; // PPBOM00000088-1 + console.log('鎻愬彇鐨凞AA001:', this.DAA001); + } else { + this.$toast.fail('宸ュ崟鍙锋牸寮忓紓甯�'); + this.DAA001 = ''; + } + this.GetItemsXcsl(); + //this.$toast(item.name); + + }, } }) \ No newline at end of file -- Gitblit v1.9.3