| | |
| | | <view v-show="current === 0"> |
| | | <view style="padding: 5%;"> |
| | | <uni-forms label-width="120"> |
| | | <uni-forms-item label="æçç¼ç "> |
| | | <uni-easyinput type="text" :focus="!istrue" @input="carNoInputChange" v-model="PalletCode" |
| | | placeholder="请è¾å
¥æçç¼ç " ref='midInput' /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="æ¬è¿èµ·ç¹"> |
| | | <uni-easyinput type="text" :focus="istrue" v-model="SourceAddress" |
| | | placeholder="请è¾å
¥AGVæ¬è¿èµ·ç¹" ref='midInput' /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="æ¬è¿ç»ç¹"> |
| | | <uni-easyinput type="text" :focus="!istrue" @input="carNoInputChange" v-model="TargetAddress" |
| | | placeholder="请è¾å
¥AGVæ¬è¿ç»ç¹" ref='midInput' /> |
| | | <uni-forms-item label="æçæ¡ç "> |
| | | <uni-easyinput type="text" :focus="barcodeFocus" v-model="PalletCode" placeholder="请è¾å
¥æçæ¡ç " |
| | | ref='midInput'/> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | <button @click="InboundTask" type="primary" size="default" style="margin-top: 2%;">æ¬è¿</button> |
| | | <u-toast ref="InboundTaskluToast" /> |
| | | <button @click="InboundTask" type="primary" size="default" style="margin-top: 2%;">åºåº</button> |
| | | </view> |
| | | </view> |
| | | <view v-show="current === 1"> |
| | | <view style="padding: 5%;"> |
| | | <uni-forms label-width="120"> |
| | | <uni-forms-item label="æ ç ç¼ ç "> |
| | | <uni-easyinput type="text" :focus="barcodefocus" @input="inputChangebarcode" v-model="Barcode" |
| | | placeholder="请è¾å
¥æçç¼ç " ref='midInput' /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="跨楼å±èµ·ç¹"> |
| | | <uni-easyinput type="text" :focus="barcodefocus" v-model="StartAddress" |
| | | placeholder="请è¾å
¥è·¨æ¥¼å±èµ·ç¹" ref='midInput' /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="跨楼å±ç»ç¹"> |
| | | <uni-easyinput type="text" :focus="barcodefocus" v-model="EndAddress" |
| | | placeholder="请è¾å
¥è·¨æ¥¼å±ç»ç¹" ref='midInput' /> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | <button @click="OutboundTask" type="primary" size="default" style="margin-top: 2%;">ä¸åä»»å¡</button> |
| | | <u-toast ref="OutboundTaskluToast" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <u-toast ref="luToast" /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | const innerAudioContext = uni.createInnerAudioContext(); |
| | | export default { |
| | | data() { |
| | | return { |
| | | istrue: false, |
| | | barcodefocus: false, |
| | | range: [], |
| | | EndAddress: "", |
| | | StartAddress: "", |
| | | Barcode: "", |
| | | TargetAddress:"", |
| | | barcodeFocus:true, |
| | | PalletCode: "", |
| | | SourceAddress: "", |
| | | items: ['æ¬è¿', '跨楼å±'], |
| | | items: ['åºåº'], |
| | | current: 0 |
| | | } |
| | | }, |
| | | onLoad() { |
| | | |
| | | }, |
| | | methods: { |
| | | onClickItem(e) { |
| | |
| | | this.current = e.currentIndex; |
| | | } |
| | | }, |
| | | voiceSpeech(src) { |
| | | innerAudioContext.src = src; // '../../static/success.mp3'; |
| | | innerAudioContext.play(); |
| | | }, |
| | | InboundTask() { |
| | | if (this.PalletCode.length <= 0 && this.Point.length) { |
| | | this.$refs.InboundTaskluToast.show({ |
| | | title: "æçç¼ç è·ç»å®è´§ä½ä¸è½ä¸ºç©º", |
| | | if (this.PalletCode.length <= 0) { |
| | | this.$refs.luToast.show({ |
| | | title: "æçæ¡ç ä¸è½ä¸ºç©º", |
| | | type: "error" |
| | | }) |
| | | return; |
| | | } |
| | | var param = { |
| | | "PalletCode": this.PalletCode, |
| | | "Position": this.SourceAddress, |
| | | "TargetAddress":this.TargetAddress |
| | | } |
| | | console.log(param); |
| | | this.$u.post('/api/Task/RequestAGVCarryTaskAsync', param).then(res => { |
| | | this.$u.post('/api/Task/OutBoundTaskAsync?palletCode='+this.PalletCode+'&remark=""').then(res => { |
| | | if (res.status) { |
| | | this.$refs.InboundTaskluToast.show({ |
| | | this.$refs.luToast.show({ |
| | | title: res.message, |
| | | type: "success" |
| | | }) |
| | | this.PalletCode = ""; |
| | | this.SourceAddress = ""; |
| | | this.TargetAddress=""; |
| | | this.istrue = false; |
| | | this.barcodeFocus=true; |
| | | } else { |
| | | this.$refs.InboundTaskluToast.show({ |
| | | this.$refs.luToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | OutboundTask() { |
| | | if (this.EndAddress.length <= 0 && this.Barcode.length) { |
| | | this.$refs.OutboundTaskluToast.show({ |
| | | title: "请è¾å
¥èµ·ç¹ç«å°", |
| | | type: "error" |
| | | }) |
| | | return; |
| | | } |
| | | var param = { |
| | | "PalletCode": this.Barcode, |
| | | "Position": this.StartAddress, |
| | | "TargetAddress":this.EndAddress |
| | | } |
| | | this.$u.post('/api/Task/RequestAcrossFloorTaskAsync', param).then(res => { |
| | | if (res.status) { |
| | | this.$refs.OutboundTaskluToast.show({ |
| | | title: res.message, |
| | | type: "success" |
| | | }) |
| | | this.Barcode = ""; |
| | | this.EndAddress = ""; |
| | | this.StartAddress=""; |
| | | this.barcodefocus = false; |
| | | } else { |
| | | this.$refs.OutboundTaskluToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |