| | |
| | | <view> |
| | | <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem"> |
| | | </uni-segmented-control> |
| | | <view v-show="current === 0"> |
| | | <!-- <view v-show="current === 0"> |
| | | <view style="padding: 5%;"> |
| | | <uni-forms label-width="120"> |
| | | <uni-forms-item label="æçç¼ç "> |
| | |
| | | </uni-forms> |
| | | <button @click="InboundTask" type="primary" size="default" style="margin-top: 2%;">æ¬è¿</button> |
| | | </view> |
| | | </view> |
| | | <view v-show="current === 1"> |
| | | <view style="padding: 5%;"> |
| | | </view> --> |
| | | <view v-show="current === 0"> |
| | | <!-- <view style="padding: 5%;"> |
| | | <uni-forms label-width="120"> |
| | | <uni-forms-item label="æçç¼ç "> |
| | | <uni-easyinput type="text" :focus="barcodefocus" @input="inputChangebarcode" |
| | |
| | | </view> |
| | | </uni-forms> |
| | | <button @click="GroupPlate" type="primary" size="default" style="margin-top: 2%;">ç»ç</button> |
| | | </view> --> |
| | | <view style="padding: 5%;"> |
| | | <uni-forms label-width="120"> |
| | | <uni-forms-item label="é¶ä»¶ç¼å·:"> |
| | | <uni-easyinput type="text" placeholder="è¯·æ«æé¶ä»¶å·" ref='midInput' :focus="focus" v-model="materSn" @blur="inputChangebarcode" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="è½½å
·ç¼å·"> |
| | | <uni-easyinput type="text" :focus="barcodefocus1" |
| | | v-model="VehicleNumber" placeholder="请è¾å
¥è½½å
·ç¼å·" ref='midInput' /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="车åä¿¡æ¯"> |
| | | <uni-easyinput type="text" |
| | | v-model="Carmodel" placeholder="èªå¨è·å车å(é¤å¼æå¨è¾å
¥é¶ä»¶å·)" ref='midInput' /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="å½åä½ç½®:"> |
| | | <uni-easyinput type="text" placeholder="请è¾å
¥å¤æç¹ä½" ref='midInput' :focus="focus2" v-model="Position"/> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | <button @click="GroupPlate" type="primary" size="default" style="margin-top: 2%;">ç»ç</button> |
| | | </view> |
| | | </view> |
| | | <view v-show="current === 2"> |
| | | <view v-show="current === 1"> |
| | | <view style="padding: 5%;"> |
| | | <uni-forms label-width="120"> |
| | | <uni-forms-item label="æçç¼ç "> |
| | |
| | | return { |
| | | barcodeFocus:true, |
| | | focus: false, |
| | | focus2:false, |
| | | istrue: false, |
| | | addressFocus:false, |
| | | barcodefocus: false, |
| | | barcodefocus1:false, |
| | | range: [], |
| | | rangethree:[], |
| | | group: [], |
| | | group: [{ |
| | | orderNo:1, |
| | | warehouseName:'helloæµè¯', |
| | | materialNo:'123' |
| | | } |
| | | ], |
| | | AreaId: 0, |
| | | acrossFloor:0, |
| | | quantity: "", |
| | |
| | | TargetAddress: "", |
| | | PalletCode1: "", |
| | | PalletCode2: "", |
| | | VehicleNumber:"",// è½½å
·ç¼å· |
| | | PalletCode3: "", |
| | | materSn: "", |
| | | items: ['å
¥åº','ç©æç»å®', 'ç©æè§£ç»'], |
| | | current: 0 |
| | | //items: ['å
¥åº','ç©æç»å®', 'ç©æè§£ç»'], |
| | | items: ['ç©æç»å®', 'ç©æè§£ç»'], |
| | | current: 0, |
| | | Position: '', //容卿å¨ä½ç½® |
| | | Carmodel:'', // 车å |
| | | } |
| | | }, |
| | | onLoad(res) { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | GroupPlate() { |
| | | if (this.PalletCode2.length <= 0 && this.InBoundOrder.length) { |
| | | GroupPlate() { // ç»ç ç©æç»å® |
| | | // if (this.PalletCode2.length <= 0 && this.InBoundOrder.length) { |
| | | // this.$refs.luToast.show({ |
| | | // title: "请è¾å
¥èµ·ç¹ç«å°", |
| | | // type: "error" |
| | | // }) |
| | | // return; |
| | | // } |
| | | if (this.VehicleNumber.length <= 0 |
| | | || this.materSn.length <= 0 |
| | | || this.Position.length <= 0 |
| | | || this.Carmodel.length <= 0) { |
| | | this.$refs.luToast.show({ |
| | | title: "请è¾å
¥èµ·ç¹ç«å°", |
| | | title: "æ°æ®è¾å
¥ä¸å®æ´!", |
| | | type: "error" |
| | | }) |
| | | return; |
| | | } |
| | | |
| | | var param = { |
| | | "PalletCode": this.PalletCode2, |
| | | "groups": this.group |
| | | "VehicleNumber": this.VehicleNumber, |
| | | "materSn":this.materSn, |
| | | "Position": this.Position, |
| | | "Carmodel":this.Carmodel |
| | | } |
| | | this.$u.post('/api/BoxingInfo/AddGroupPlateAsync', param).then(res => { |
| | | console.log(param) |
| | | |
| | | this.$u.post('/api/PDA/ContainerbindingAsync', param).then(res => { |
| | | if (res.status) { |
| | | this.$refs.luToast.show({ |
| | | title: res.message, |
| | | type: "success" |
| | | }) |
| | | this.PalletCode2 = ""; |
| | | this.group = []; |
| | | this.barcodefocus = false; |
| | | this.Init(); |
| | | } else { |
| | | this.$refs.luToast.show({ |
| | | title: res.message, |
| | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | Init(){ |
| | | this.VehicleNumber = ''; |
| | | this.materSn = ''; |
| | | this.Position = ''; |
| | | this.Carmodel = ''; |
| | | }, |
| | | SolvePlate() { |
| | | if (this.PalletCode3.length <= 0) { |
| | | this.$refs.luToast.show({ |
| | |
| | | }, |
| | | updateFocus() { |
| | | this.$nextTick(() => { |
| | | this.materSn = ''; |
| | | if (!this.focus) { |
| | | this.focus = true; |
| | | this.VehicleNumber = ''; |
| | | if (!this.barcodefocus1) { |
| | | this.barcodefocus1 = true; |
| | | } |
| | | }); |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | inputChangebarcode() { |
| | | this.$nextTick(() => { |
| | | this.$u.post('/api/BoxingInfo/GetPalletCodeInfo?palletCode=' + this.PalletCode2, "").then( |
| | | res => { |
| | | if (res.status) { |
| | | this.group = res.data; |
| | | console.log(this.group); |
| | | setTimeout(this.updateFocus, 200); |
| | | setTimeout(() => { |
| | | this.voiceSpeech('../../static/success.mp3'); |
| | | }, 100); |
| | | } |
| | | }) |
| | | }) |
| | | var materSns = this.materSn; |
| | | console.log(materSns) |
| | | this.barcodefocus1 = true; |
| | | if(materSns.indexOf(',') === -1){ |
| | | return; |
| | | } |
| | | |
| | | // 1. å¤çé¶ä»¶å·ï¼åæå䏿®µ |
| | | this.materSn = materSns.split(',').pop(); |
| | | // // 2. å¤ç车åï¼åç¬¬ä¸æ®µ |
| | | this.Carmodel = materSns.split(',')[0]; |
| | | |
| | | // 3. å
³é®ï¼è¿åå¤çåçå¼ï¼uni-easyinputä¼èªå¨æ´æ°v-modelåçé¢ |
| | | console.log('å¤çåçé¶ä»¶å·:', this.materSn); |
| | | |
| | | // this.$nextTick(() => { |
| | | // this.$u.post('/api/BoxingInfo/GetPalletCodeInfo?palletCode=' + this.PalletCode2, "").then( |
| | | // res => { |
| | | // if (res.status) { |
| | | // this.group = res.data; |
| | | // console.log(this.group); |
| | | // setTimeout(this.updateFocus, 200); |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/success.mp3'); |
| | | // }, 100); |
| | | // } |
| | | // }) |
| | | // }) |
| | | |
| | | }, |
| | | removeScanItem(orderNo) { |
| | | this.group = this.group.filter(item => item.orderNo !== orderNo); |