| | |
| | | <template> |
| | | <view> |
| | | <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem"> |
| | | </uni-segmented-control> |
| | | <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem"></uni-segmented-control> |
| | | <view class="content"> |
| | | <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 label="第ä¸èµ·ç¹ç¼åæ¶å°å"> |
| | | <uni-easyinput type="text" v-model="sourceAddress" placeholder="请æ«çèµ·ç¹å°å" ref='firstInput' |
| | | :focus="focusFirst" @confirm="handleFirstInputConfirm" @input="checkFirstInput" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="ç»ç¹è¾é线å°å"> |
| | | <uni-easyinput type="text" :focus="!addressFocus" v-model="targetAddress" |
| | | placeholder="è¯·æ«æç»ç¹å°å" ref='midInput' @input="inputChangebarcode" /> |
| | | <uni-forms-item label="第äºèµ·ç¹ç¼åæ¶å°å"> |
| | | <uni-easyinput type="text" v-model="sourceAddress1" placeholder="请æ«çèµ·ç¹å°å" ref='secondInput' |
| | | :focus="focusSecond" @confirm="handleSecondInputConfirm" /> |
| | | </uni-forms-item> |
| | | <!-- <uni-forms-item label="ç»ç¹è¾é线å°å"> |
| | | <uni-data-select v-model="value" :localdata="rangs"></uni-data-select> |
| | | </uni-forms-item> --> |
| | | <uni-forms-item> |
| | | <button @click="inbound" type="primary" size="default" |
| | | style="margin-top: 2%;">è¾é线æ¬è¿ç¡®è®¤</button> |
| | |
| | | addressFocus: false, |
| | | targetAddress: "", |
| | | sourceAddress: "", |
| | | sourceAddress1: "", |
| | | Exception: "", |
| | | address: "", |
| | | check: true, |
| | |
| | | matInfo: [], |
| | | value2: "", |
| | | matTotals: [], |
| | | focusFirst: true, // åå§èç¦ç¬¬ä¸ä¸ªè¾å
¥æ¡ |
| | | focusSecond: false, // åå§ä¸èç¦ç¬¬äºä¸ªè¾å
¥æ¡ |
| | | value: 0, |
| | | rangs: [{ |
| | | value: "FJXL-KPHLX001", |
| | | text: "FJXL-KPHLX001" |
| | | }, |
| | | { |
| | | value: "ZJXL-KPHLX001", |
| | | text: "ZJXL-KPHLX001" |
| | | }, |
| | | ], |
| | | // range: [], |
| | | } |
| | | }, |
| | |
| | | // } |
| | | // }) |
| | | // }, |
| | | // æ£æ¥ç¬¬ä¸ä¸ªè¾å
¥æ¡å
容 |
| | | checkFirstInput(value) { |
| | | if (value && value.length > 0) { |
| | | // å¦æç¬¬ä¸ä¸ªè¾å
¥æ¡æå
容ï¼èªå¨è·³è½¬å°ç¬¬äºä¸ªè¾å
¥æ¡ |
| | | this.focusFirst = false; |
| | | this.$nextTick(() => { |
| | | this.focusSecond = true; |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // å¤ç第ä¸ä¸ªè¾å
¥æ¡ç¡®è®¤äºä»¶ |
| | | handleFirstInputConfirm() { |
| | | this.focusFirst = false; |
| | | this.$nextTick(() => { |
| | | this.focusSecond = true; |
| | | }); |
| | | }, |
| | | |
| | | |
| | | onClickItem(e) { |
| | | this.focus = false; |
| | | this.addressFocus = false; |
| | |
| | | inbound() { |
| | | // æåè¾å
¥æ¡çå¼ |
| | | const sourceAddress = this.sourceAddress; |
| | | const targetAddress = this.targetAddress; |
| | | const sourceAddress1 = this.sourceAddress1; |
| | | const targetAddress = this.value; |
| | | |
| | | if (sourceAddress == "") { |
| | | this.$t.message.toast('è¯·éæ©èµ·ç¹ä½ç½®'); |
| | | return; |
| | | } |
| | | if (targetAddress == "") { |
| | | this.$t.message.toast('请æ«çç»ç¹ä½ç½®'); |
| | | if (sourceAddress1 == "") { |
| | | this.$t.message.toast('è¯·éæ©èµ·ç¹ä½ç½®'); |
| | | return; |
| | | } |
| | | // if (targetAddress == "") { |
| | | // this.$t.message.toast('请æ«çç»ç¹ä½ç½®'); |
| | | // return; |
| | | // } |
| | | var postData = { |
| | | MainData: { |
| | | "sourceAddress": this.sourceAddress, |
| | | "targetAddress": this.targetAddress, |
| | | "sourceAddress1": this.sourceAddress1, |
| | | // "targetAddress": this.value, |
| | | } |
| | | } |
| | | // console.log(Exception); |
| | | this.$u.post('/api/PDA/EmptyTask', postData).then(res => { |
| | | this.$t.message.closeLoading(); |
| | | console.log(postData); |
| | | if (res.code == 0) { |
| | | if (res.code == 200) { |
| | | this.$t.message.toast('å¼å«æå'); |
| | | this.sourceAddress = ""; |
| | | this.targetAddress = ""; |
| | | // this.$refs.popup.close(); |
| | | this.sourceAddress1 = ""; |
| | | // this.value = ""; |
| | | // this.$refs.popup.close(); |
| | | // this.submit(); |
| | | } else { |
| | | this.$t.message.toast(res.message); |
| | |
| | | } |
| | | }) |
| | | }, |
| | | onReady() { |
| | | // 页é¢å è½½å®æåèªå¨èç¦ç¬¬ä¸ä¸ªè¾å
¥æ¡ |
| | | this.focusFirst = true; |
| | | } |
| | | // getEndLocations() { |
| | | // this.$u.post('/api/CachePoint/GetEndPoints', null).then(res => { |
| | | // if (res.status) { |