From 81a6593430d3a8d3669012e30d7ebc0e011ea26f Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期六, 06 五月 2023 14:36:11 +0800 Subject: [PATCH] # --- pages/order/orderPutDown.vue | 49 +++++++++++++++++++++++++++++++++---------------- 1 files changed, 33 insertions(+), 16 deletions(-) diff --git a/pages/order/orderPutDown.vue b/pages/order/orderPutDown.vue index 9753a6c..3094c4f 100644 --- a/pages/order/orderPutDown.vue +++ b/pages/order/orderPutDown.vue @@ -1,23 +1,16 @@ <template> <view> <view class="code"> - <!-- <view class="item"> - <view class="code-decs">璁㈠崟鍙�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="order" :focus="orderFocus" - @input="orderInput()" disabled> - </view> --> <view class="item"> - <view class="code-decs">鎵樼洏鐮�:</view> + <view class="code-decs">搴撲綅鐮�:</view> <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus" - @confirm="barcodeInput()"> + @input="barcodeInput()"> </view> <view class="item"> - <view class="code-decs">搴撲綅鍙�:</view> + <view class="code-decs">鐗╂枡鍙�:</view> <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()"> <view class="item-right"> <button></button> - <!-- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text> --> - <!-- <uni-icons type="right" color="#c1c1c1"></uni-icons> --> </view> </view> </view> @@ -148,7 +141,6 @@ baseUrl: '', token: '', order: '', - orderFocus: true, barcode: '', barcodeFocus: '', dataList: [], @@ -162,9 +154,10 @@ messageText: '', title: '', content: '', - barcodeFocus: false, + barcodeFocus: true, matFocus: false, - matData: '' + matData: '', + removeNum: 0 } }, onShow() { @@ -175,6 +168,28 @@ messageToggle(type) { this.msgType1 = type this.$refs.message.open() + }, + barcodeInput() { + // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏� + setTimeout(() => { + this.focuss() + }, 200) + }, + // 鎵樼洏鐮佹湁璇噸缃� + barcodeFocuss() { + let that = this; + that.barcodeFocus = false; + setTimeout(() => { + that.barcode = ''; + that.barcodeFocus = true; + }, 100); + }, + // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆 + focuss() { + setTimeout(() => { + this.matnr = ''; + this.matFocus = true; + }, 100); }, // 鎼滅储鐗╂枡 findMat() { @@ -209,6 +224,7 @@ events: { matList: function(data) { that.checkMat(data.data) + that.focuss() }, }, }); @@ -300,9 +316,9 @@ } } uni.request({ - url: that.baseUrl + '/mobile/comb/auth', + url: that.baseUrl + '/mobile/manDetl/out', data: JSON.stringify({ - locno: that.barcode, + locNo: that.barcode, combMats: that.dataList }), method: 'POST', @@ -362,6 +378,7 @@ }, // 鍒楄〃绉婚櫎鎸夐挳 remove(item, i, type) { + this.removeNum = i this.msgType = type this.title = '璀﹀憡' this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!' @@ -371,7 +388,7 @@ removeConfirm(i) { this.messageText = "绉婚櫎鎴愬姛" this.messageToggle('success') - this.dataList.splice(i, 1) + this.dataList.splice(this.removeNum, 1) }, reviseConfirm() { this.dataList[this.rowNum].anfme = this.count -- Gitblit v1.9.1