From 29cd467ba62b2bdf49c6546e78ae3ec809c4a723 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期四, 19 六月 2025 17:50:28 +0800 Subject: [PATCH] 1 --- 代码管理/ZhongHePDA/pages/task/AgvTask.vue | 96 ++++++++++++++++++++++++++++++++--------------- 1 files changed, 65 insertions(+), 31 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/ZhongHePDA/pages/task/AgvTask.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/ZhongHePDA/pages/task/AgvTask.vue" index be438df..10b40ab 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/ZhongHePDA/pages/task/AgvTask.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/ZhongHePDA/pages/task/AgvTask.vue" @@ -9,6 +9,10 @@ <uni-easyinput type="text" :focus="!istrue" @input="carNoInputChange" v-model="EndAddress" placeholder="璇疯緭鍏ョ粓鐐�" ref='midInput' /> </uni-forms-item> + <uni-forms-item label="璧风偣"> + <uni-easyinput type="text" :focus="istrue" v-model="StartAddress1" placeholder="璇疯緭鍏ヨ捣鐐�" + ref='midInput' /> + </uni-forms-item> </uni-forms> <button @click="CallMateriel" type="primary" size="default" style="margin-top: 2%;">鍛兼枡</button> <u-toast ref="CallMaterieluToast" /> @@ -18,8 +22,12 @@ <view style="padding: 5%;"> <uni-forms label-width="120"> <uni-forms-item label="璧风偣"> - <uni-easyinput type="text" :focus="!istrue" @input="carNoInputChange" v-model="StartAddress" + <uni-easyinput type="text" :focus="!istrue1" @input="carNoInputChange1" v-model="StartAddress" placeholder="璇疯緭鍏ヨ捣鐐�" ref='midInput' /> + </uni-forms-item> + <uni-forms-item label="缁堢偣"> + <uni-easyinput type="text" :focus="istrue1" v-model="EndAddress1" placeholder="璇疯緭鍏ョ粓鐐�" + ref='midInput' /> </uni-forms-item> </uni-forms> <button @click="MaterielCarry" type="primary" size="default" style="margin-top: 2%;">鍙栨枡</button> @@ -35,8 +43,11 @@ data() { return { istrue: false, + istrue1: false, range: [], EndAddress: "", + EndAddress1:"", + StartAddress1:"", StartAddress: "", PalletCode: "", Point: "", @@ -50,12 +61,31 @@ methods: { onClickItem(e) { this.istrue = false; + this.istrue1 = false; + this.StartAddress = ""; + this.EndAddress == ""; + this.StartAddress1 = ""; + this.EndAddress1 == ""; if (this.current !== e.currentIndex) { this.current = e.currentIndex; if (this.current == 2) { this.getData(); } } + }, + carNoInputChange() { + this.$nextTick(function(x) { + if (this.EndAddress.length > 0) { + this.istrue = true; + } + }) + }, + carNoInputChange1() { + this.$nextTick(function(x) { + if (this.StartAddress.length > 0) { + this.istrue1 = true; + } + }) }, CallMateriel() { if (this.EndAddress == "") { @@ -70,21 +100,23 @@ // "endPoint": this.EndAddress // }, // } - this.$u.post('/api/PDA/CallMateriel?endPoint=' + this.EndAddress, {}).then(res => { - if (res.status) { - this.$refs.CallMaterieluToast.show({ - title: "鍛煎彨Agv閫佹枡鎴愬姛", - type: "success" - }) - this.EndAddress = ""; - this.istrue = false; - } else { - this.$refs.CallMaterieluToast.show({ - title: res.message, - type: "error" - }) - } - }) + this.$u.post('/api/PDA/CallMateriel?endPoint=' + this.EndAddress + '&startPoint=' + this.StartAddress1, {}) + .then(res => { + if (res.status) { + this.$refs.CallMaterieluToast.show({ + title: "鍛煎彨Agv閫佹枡鎴愬姛", + type: "success" + }) + this.StartAddress1 = ""; + this.EndAddress = ""; + this.istrue = false; + } else { + this.$refs.CallMaterieluToast.show({ + title: res.message, + type: "error" + }) + } + }) }, MaterielCarry() { if (this.StartAddress == "") { @@ -99,21 +131,23 @@ // "startPoint": this.StartAddress // }, // } - this.$u.post('/api/PDA/MaterielCarry?startPoint=' + this.StartAddress, {}).then(res => { - if (res.status) { - this.$refs.MaterielCarryuToast.show({ - title: "鍛煎彨Agv鍙栨枡鎴愬姛", - type: "success" - }) - this.StartAddress = ""; - this.istrue = false; - } else { - this.$refs.MaterielCarryuToast.show({ - title: res.message, - type: "error" - }) - } - }) + this.$u.post('/api/PDA/MaterielCarry?startPoint=' + this.StartAddress + '&endPoint=' + this.EndAddress1, {}) + .then(res => { + if (res.status) { + this.$refs.MaterielCarryuToast.show({ + title: "鍛煎彨Agv鍙栨枡鎴愬姛", + type: "success" + }) + this.StartAddress = ""; + this.EndAddress1 = ""; + this.istrue = false; + } else { + this.$refs.MaterielCarryuToast.show({ + title: res.message, + type: "error" + }) + } + }) }, } } -- Gitblit v1.9.3