| | |
| | | <uni-easyinput type="text" v-model="stationcode" placeholder="请æ«çç¼åç¹ç¼å·" ref='midInput' |
| | | :focus="addressFocus" /> |
| | | </uni-forms-item> |
| | | <!-- <uni-forms-item label="æçæ¡ç "> |
| | | <uni-easyinput type="text" :focus="!addressFocus" v-model="inboundBarcode" |
| | | placeholder="è¯·æ«ææçæ¡ç " ref='midInput' @input="inputChangebarcode" /> |
| | | </uni-forms-item> --> |
| | | <uni-forms-item label="ç©æç±»å"> |
| | | <uni-easyinput type="text" v-model="PalletCode" placeholder="è¯·æ«æç©æç±»å" ref='midInput' |
| | | :focus="addressFocus" /> |
| | |
| | | <uni-forms-item label="ç¼åç¹ç¶æ"> |
| | | <uni-data-checkbox v-model="value" :localdata="range" @change="change"></uni-data-checkbox> |
| | | </uni-forms-item> |
| | | <!-- <uni-forms-item label="ç¼åç¹ç¶æ"> |
| | | <uni-data-checkbox v-model="values" :localdata="ranges" @change="change"></uni-data-checkbox> |
| | | </uni-forms-item> --> |
| | | <uni-forms-item> |
| | | <button @click="inbound" type="primary" size="default" |
| | | style="margin-top: 2%;">ç¶æä¿®æ¹ç¡®è®¤</button> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | // items: ['ç»ç', 'å
¥åº', 'åæ®ä¿¡æ¯', 'è§£ç'], |
| | | items: ['ç¼åæ¶ç¶æä¿®æ¹'], |
| | | current: 0, |
| | | matTotal: [], |
| | |
| | | sns: [], |
| | | addressFocus: false, |
| | | PalletCode: "", |
| | | stationcode: "", |
| | | stationcode: "", // ç¼åç¹ç¼å· |
| | | address: "", |
| | | check: true, |
| | | value: "", |
| | | values: "", |
| | | range: [{ |
| | | "value": 0, |
| | | "text": "空é²" |
| | | }, { |
| | | "value": 1, |
| | | "text": "éå®" |
| | | }], |
| | | range: [ |
| | | { value: 0, text: "空é²" }, |
| | | { value: 1, text: "éå®" }, |
| | | { value: 2, text: "æè´§" } // å设æ¥å£è¿åçç¶æå¼ä¸º 2ï¼è¡¨ç¤ºå ç¨ |
| | | ], |
| | | code: [], |
| | | } |
| | | }, |
| | |
| | | this.orderNo = res.orderNo; |
| | | this.label = "åæ®ç¼å·ï¼" + this.orderNo; |
| | | this.getData(); |
| | | this.getEndLocations(); |
| | | }, |
| | | watch: { |
| | | // çå¬ stationcode çåå |
| | | stationcode(newVal, oldVal) { |
| | | if (newVal && newVal !== oldVal) { |
| | | this.getEndLocations(); // èªå¨è°ç¨æ¥å£ |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | voiceSpeech(src) { |
| | | innerAudioContext.src = src; // '../../static/success.mp3'; |
| | | innerAudioContext.src = src; |
| | | innerAudioContext.play(); |
| | | }, |
| | | updateFocus() { |
| | |
| | | } |
| | | }, |
| | | getData() { |
| | | var postData = this.orderNo |
| | | |
| | | var postData = this.orderNo; |
| | | this.$u.post('/api/InboundOrder/GetInboundOrderDetail', postData).then((res) => { |
| | | if (res.status) { |
| | | this.orderDetail = res.data; |
| | |
| | | var postData = { |
| | | MainData: { |
| | | "stationcode": this.stationcode, |
| | | "PalletCode": this.PalletCode, |
| | | "palletCode": this.PalletCode, |
| | | "toaddress": this.value, |
| | | } |
| | | } |
| | | |
| | | this.$u.post('/api/Task/EmptyTask', postData).then(res => { |
| | | this.$u.post('/api/CachePoint/UpdateHCJStaue', postData).then(res => { |
| | | if (res.status) { |
| | | uni.$showMsg("任塿·»å æå"); |
| | | uni.$showMsg("ä¿®æ¹ç¼åæ¶ä¿¡æ¯æå"); |
| | | this.stationcode = ""; |
| | | this.PalletCode = ""; |
| | | this.toaddress = ""; |
| | | this.value = ""; |
| | | setTimeout(() => { |
| | | // this.materialtype = false; |
| | | }, 200); |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | inputChangebarcode() { |
| | | this.addressFocus = false; |
| | | this.$nextTick(function(x) { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | // getEndLocations() { |
| | | // var stationcode=this.stationcode; |
| | | // this.$u.post('/api/CachePoint/GetHCJStaue?stationcode=' + stationcode, {}).then(res => { |
| | | // if (res.status) { |
| | | // this.value = 2; |
| | | // console.log(res.data); |
| | | // console.log(res.data.materialtype); |
| | | // this.PalletCode=res.data.materialtype; |
| | | // this.range.value=2; |
| | | // } else { |
| | | // this.$refs.uToast.show({ |
| | | // title: res.message, |
| | | // type: "error" |
| | | // }) |
| | | // } |
| | | // }) |
| | | // } |
| | | getEndLocations() { |
| | | this.$u.post('/api/CachePoint/GetHCJStaue?stationcode', null).then(res => { |
| | | var stationcode = this.stationcode; |
| | | this.$u.post('/api/CachePoint/GetHCJStaue?stationcode=' + stationcode, {}).then(res => { |
| | | if (res.status) { |
| | | this.value = 2; |
| | | console.log(res.data); |
| | | // å设æ¥å£è¿åçæ°æ®ç»æä¸º { status: true, data: { state: 1, materialtype: 'A' } } |
| | | const responseData = res.data; |
| | | |
| | | // æ´æ°ç¼åç¹ç¶æ |
| | | this.value = responseData.pointStatus; // å设 state æ¯ç¼åç¹ç¶æçå¼ |
| | | |
| | | // æ´æ°ç©æç±»å |
| | | this.PalletCode = responseData.materialtype; // å设 materialtype æ¯ç©æç±»å |
| | | |
| | | // 妿éè¦æ´æ° range çé项 |
| | | this.range = [ |
| | | { value: 0, text: "空é²" }, |
| | | { value: 1, text: "éå®" }, |
| | | { value: 2, text: "æè´§" } // å设æ¥å£è¿åçç¶æå¼ä¸º 2ï¼è¡¨ç¤ºå ç¨ |
| | | ]; |
| | | |
| | | // 妿éè¦æ ¹æ®ç¶æå¼å¨æè®¾ç½® range çé»è®¤å¼ |
| | | this.range.forEach(item => { |
| | | if (item.value === responseData.state) { |
| | | this.value = item.value; // 设置é»è®¤éä¸é¡¹ |
| | | } |
| | | }); |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | }); |
| | | } |
| | | }) |
| | | }).catch(err => { |
| | | this.$refs.uToast.show({ |
| | | title: err.message, |
| | | type: "error" |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |