From b48cbaed482a5e530052a9e31fa0d2e8fd06cec4 Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期一, 08 九月 2025 09:00:51 +0800 Subject: [PATCH] 1.巡检上下限为0的,判定为选择合格不合格(已更新) 2.AGV选择点位 3.现场收料新增参数 --- H5/Js/Xcsl.js | 88 +++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 83 insertions(+), 5 deletions(-) diff --git a/H5/Js/Xcsl.js b/H5/Js/Xcsl.js index e250b2b..fa0a600 100644 --- a/H5/Js/Xcsl.js +++ b/H5/Js/Xcsl.js @@ -14,11 +14,17 @@ GX: "G007:鏍稿閫佹", Xvalue:4, XbarInfo: [], - DAA001: [], + DAA001: "", + DAA021: "", DAANum: "", xcslItemList: [], //鏉愭枡鍒楄〃 xcslWjsBarList: [],//鏈帴鏀跺垪琛� xcslYjsBarList: [],//宸叉帴鏀跺垪琛� + selectKey: "",//鏌ヨ鍏抽敭瀛� + actions: [],//鍒楄〃鐨勫�� + show: false,//鍒楄〃灞曠ず + DaaInfo: { }, + } }, mounted() { @@ -32,8 +38,9 @@ GetItemsXcsl() { var that = this; - if (that.DAA001.length <= 0) { + if (!that.DAA001 || that.DAA001.length <= 0) { that.$toast.fail("宸ュ崟鍗曞彿涓嶈兘涓虹┖锛�"); + that.$playSound('error'); that.$refs.DAA001.focus(); return; } @@ -45,7 +52,9 @@ .then(function (res) { var json = res; if (json.status == 0) { - that.DAANum = json.data.tbBillList.gD_Num; + //that.DAANum = json.data.tbBillList.gD_Num; + //that.DAA021 = json.data.tbBillList.workNo; + that.DaaInfo = json.data.tbBillList.daaInfoList[0]; that.xcslItemList = json.data.tbBillList.xcslItemList; that.xcslWjsBarList = json.data.tbBillList.xcslWjsBarList; that.xcslYjsBarList = json.data.tbBillList.xcslYjsBarList; @@ -53,6 +62,7 @@ } else { that.$toast.fail(json.message); + that.$playSound('error'); that.$refs.DAA001.focus(); that.DAA001 = ""; } @@ -61,6 +71,7 @@ .catch(function (error) { that.isLoading = false; that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$playSound('error'); }); }, ScanXcsl() { @@ -70,15 +81,17 @@ } var that = this; - if (that.Bar.length <= 0) { + if (!that.Bar ||that.Bar.length <= 0) { that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�"); + that.$playSound('error'); that.$refs.Bar.focus(); return; } - if (that.DAA001.length <= 0) { + if (!that.DAA001 ||that.DAA001.length <= 0) { that.$toast.fail("宸ュ崟鍗曞彿涓嶈兘涓虹┖锛�"); + that.$playSound('error'); that.$refs.DAA001.focus(); return; } @@ -94,10 +107,12 @@ if (json.status == 0) { // that.scanInfo = json.data.tbBillList; that.$notify({ type: 'success', message: json.message }); + that.$playSound('success'); that.GetItemsXcsl(); } else { that.$toast.fail(json.message); + that.$playSound('error'); } that.isLoading = false; that.$refs.Bar.focus(); @@ -106,7 +121,70 @@ .catch(function (error) { that.isLoading = false; that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$playSound('error'); }); }, + //鑾峰彇宸ュ崟淇℃伅 + getInfo() { + this.show = true; + var that = this; + that.actions = []; + that.isLoading = true; + that.AxiosHttp("post", 'Womdaa/GetXcslDaa', { + selectKey: that.selectKey, + selDaaType: "1", + }, 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.DAA001 = matchResult[1]; // PPBOM00000088-1 + console.log('鎻愬彇鐨凞AA001:', this.DAA001); + } else { + this.$toast.fail('宸ュ崟鍙锋牸寮忓紓甯�'); + that.$playSound('error'); + this.DAA001 = ''; + } + this.GetItemsXcsl(); + //this.$toast(item.name); + + }, } }) \ No newline at end of file -- Gitblit v1.9.3