From 6cc35000a6e138cfad96e7b02f8aeddcdb4ba6bf Mon Sep 17 00:00:00 2001 From: wankeda <Administrator@DESKTOP-HAU3ST3> Date: 星期二, 24 六月 2025 09:57:25 +0800 Subject: [PATCH] 代码提交 --- 代码管理/NEWCode/WIDESEAWCS_PDA/pages/叫料/烘烤回炉.vue | 92 +++++++++++++++++++++++++++++++++++++++------ 1 files changed, 79 insertions(+), 13 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_PDA/pages/\345\217\253\346\226\231/\347\203\230\347\203\244\345\233\236\347\202\211.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_PDA/pages/\345\217\253\346\226\231/\347\203\230\347\203\244\345\233\236\347\202\211.vue" index 241be68..f760d82 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_PDA/pages/\345\217\253\346\226\231/\347\203\230\347\203\244\345\233\236\347\202\211.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_PDA/pages/\345\217\253\346\226\231/\347\203\230\347\203\244\345\233\236\347\202\211.vue" @@ -6,15 +6,38 @@ <view v-if="current === 0" class="headerstyle"> <view class="itemstyle"> <uni-forms label-width="120"> - <uni-forms-item label="璧风偣缂撳瓨鏋跺湴鍧�"> - <uni-easyinput type="text" :focus="!addressFocus" v-model="sourceAddress" - placeholder="璇锋壂鐬勮捣鐐瑰湴鍧�" ref='midInput' @input="inputChangebarcode" /> - <!-- <uni-data-select v-model="value" :localdata="rangs"></uni-data-select> --> - </uni-forms-item> - <uni-forms-item label="缁堢偣鐑樼儰鏈轰笂鏂欏湴鍧�"> - <uni-easyinput type="text" :focus="!addressFocus" v-model="targetAddress" - placeholder="璇锋壂鎻忕粓鐐瑰湴鍧�" ref='midInput' @input="inputChangebarcode" /> - </uni-forms-item> + <uni-forms-item label="绗竴璧风偣缂撳瓨鏋跺湴鍧�"> + <uni-easyinput + type="text" + v-model="sourceAddress" + placeholder="璇锋壂鐬勮捣鐐瑰湴鍧�" + ref='firstInput' + :focus="focusState === 'first'" + @confirm="jumpToSecond" + @input="checkFirstInput" + /> + </uni-forms-item> + <uni-forms-item label="绗簩璧风偣缂撳瓨鏋跺湴鍧�"> + <uni-easyinput + type="text" + v-model="sourceAddress1" + placeholder="璇锋壂鐬勮捣鐐瑰湴鍧�" + ref='secondInput' + :focus="focusState === 'second'" + @confirm="jumpToThird" + @input="checkSecondInput" + /> + </uni-forms-item> + <uni-forms-item label="缁堢偣鐑樼儰鏈轰笂鏂欏湴鍧�"> + <uni-easyinput + type="text" + v-model="targetAddress" + placeholder="璇锋壂鎻忕粓鐐瑰湴鍧�" + ref='thirdInput' + :focus="focusState === 'third'" + @confirm="handleSubmit" + /> + </uni-forms-item> <button @click="inbound" type="primary" size="default" style="margin-top: 2%;">鎼繍纭</button> </uni-forms-item> </uni-forms> @@ -36,14 +59,50 @@ focus: false, addressFocus: false, sourceAddress: "", - targetAddress: "," + sourceAddress1: "", + focusState: 'first', + targetAddress: "" } }, + mounted() { + // 椤甸潰鍔犺浇鍚庤嚜鍔ㄨ仛鐒︾涓�涓緭鍏ユ + this.focusState = 'first'; + }, methods: { voiceSpeech(src) { innerAudioContext.src = src; // '../../static/success.mp3'; innerAudioContext.play(); }, + // 妫�鏌ョ涓�涓緭鍏ユ + checkFirstInput(value) { + if(value && value.trim().length > 0) { + this.jumpToSecond(); + } + }, + + // 璺宠浆鍒扮浜屼釜杈撳叆妗� + jumpToSecond() { + this.focusState = 'second'; + // 纭繚DOM鏇存柊鍚庢墽琛岃仛鐒� + this.$nextTick(() => { + this.$refs.secondInput.focus(); + }); + }, + + // 妫�鏌ョ浜屼釜杈撳叆妗� + checkSecondInput(value) { + if(value && value.trim().length > 0) { + this.jumpToThird(); + } + }, + + // 璺宠浆鍒扮涓変釜杈撳叆妗� + jumpToThird() { + this.focusState = 'third'; + this.$nextTick(() => { + this.$refs.thirdInput.focus(); + }); + }, onClickItem(e) { this.focus = false; this.addressFocus = false; @@ -57,9 +116,14 @@ inbound() { // 鎻愬彇杈撳叆妗嗙殑鍊� const sourceAddress = this.sourceAddress; + const sourceAddress1 = this.sourceAddress1; const targetAddress = this.targetAddress; if (sourceAddress == "") { this.$t.message.toast('璇锋壂鎻忚捣鐐逛綅缃�'); + return; + } + if (sourceAddress1 == "") { + this.$t.message.toast('璇烽�夋嫨璧风偣浣嶇疆'); return; } if (targetAddress == "") { @@ -69,17 +133,19 @@ var PostData = { MainData: { "sourceAddress": this.sourceAddress, + "sourceAddress1": this.sourceAddress1, "targetAddress": this.targetAddress, } } // console.log(Exception); this.$u.post('/api/PDA/OutBoundTasks', PostData).then(res => { this.$t.message.closeLoading(); - if (res.code == 0) { + if (res.code == 200) { this.$t.message.toast('鍛煎彨鎴愬姛'); this.sourceAddress = ""; - this.targetAddress=""; - // this.$refs.popup.close(); + this.sourceAddress1 = ""; + this.targetAddress = ""; + // this.$refs.popup.close(); // this.submit(); } else { this.$t.message.toast(res.message); -- Gitblit v1.9.3