From 3360d0a1377cbd91ccc870e0877497e424bef7b1 Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期三, 18 六月 2025 09:24:43 +0800 Subject: [PATCH] 1.生产领料可选工单 --- H5/Js/Scll.js | 69 +++++++++++++++++++++++++++++++++- 1 files changed, 66 insertions(+), 3 deletions(-) diff --git a/H5/Js/Scll.js b/H5/Js/Scll.js index 34e441b..94a8b49 100644 --- a/H5/Js/Scll.js +++ b/H5/Js/Scll.js @@ -14,6 +14,9 @@ port: "", oldBarInfo: [], cfBarInfo: [], + selectKey: "",//鏌ヨ鍏抽敭瀛� + actions: [],//鍒楄〃鐨勫�� + show: false,//鍒楄〃灞曠ず //isPrinterPopupVisible: false, // 鎺у埗寮圭獥鏄剧ず/闅愯棌 //selectedPrinter: '', // 褰撳墠閫夋嫨鐨勬墦鍗版満缂栧彿 //printerList: [ @@ -244,13 +247,13 @@ // }); //}, - //printCfBar(cfBar) { + //printCfBar(cfBar) { // var that = this; // that.AxiosHttp("post", 'MesPrint/getCfInfo', { // userName: that.userInfo.loginAccount, - // cfBar: cfBar, - // oldBar: that.scanInfo.barcode + // cfBar: cfBar, + // oldBar: that.scanInfo.barcode // }, false) // .then(function (res) { // var json = res; @@ -288,5 +291,65 @@ //onPrinterSelected(value) { // console.log('褰撳墠閫変腑鐨勬墦鍗版満缂栧彿:', value); //}, + + //鑾峰彇宸ュ崟淇℃伅 + 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.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