| | |
| | | <uni-easyinput type="text" placeholder="è¯·æ«æå
ç®±æ ç¾" ref='midInput' :focus="focus" |
| | | v-model="materSn" @input="snInput" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item> |
| | | <!-- <uni-forms-item> |
| | | <checkbox checked="check">æ¯å¦æ»¡ç</checkbox> |
| | | </uni-forms-item> |
| | | </uni-forms-item> --> |
| | | <uni-forms-item> |
| | | <button @click="submit" type="primary" size="default" style="margin-top: 2%;">ç»ç</button> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | <uni-list> |
| | | <uni-list-item direction="column" v-for="item in matTotal" :key="item.matCode"> |
| | | <!-- <uni-list-item direction="column" v-for="item in matTotal" :key="item.matCode"> |
| | | <template v-slot:body> |
| | | <view class="uni-list-box"> |
| | | <view class="uni-content"> |
| | |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </uni-list-item> |
| | | </uni-list-item> --> |
| | | <uni-list-item direction="column" v-for="(item,index) in matInfos" :key="item.sn"> |
| | | <template v-slot:body> |
| | | <view class="uni-list-box"> |
| | |
| | | @click="deleteList(item.sn)"> |
| | | </uni-icons> |
| | | <view class="uni-content"> |
| | | <view class="uni-title-sub uni-ellipsis-2">订åå·ï¼{{item.orderNo}}</view> |
| | | <view class="uni-note">ç©æç¼ç ï¼{{item.matCode}}</view> |
| | | <view class="uni-note">æ°éï¼{{item.matQty}}</view> |
| | | <view class="uni-title-sub uni-ellipsis-2">éè´åå·ï¼{{item.purchaseOrderNo}}</view> |
| | | <view class="uni-note">ç©æç¼ç ï¼{{item.materielCode}}</view> |
| | | <view class="uni-note">æ¹æ¬¡å·ï¼{{item.lotNo}}</view> |
| | | <view class="uni-note">æ°éï¼{{item.quantity}}</view> |
| | | <view class="uni-note">çäº§æ¥æï¼{{item.productionDate}}</view> |
| | | <view class="uni-note">æææï¼{{item.effectiveDate}}</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | items: ['ç»ç', 'å
¥åº', 'åæ®ä¿¡æ¯'],//, 'è§£ç' |
| | | items: ['ç»ç', 'å
¥åº', 'åæ®ä¿¡æ¯'], //, 'è§£ç' |
| | | current: 0, |
| | | matTotal: [], |
| | | matInfos: [], |
| | |
| | | value: "", |
| | | matInfo: [], |
| | | value2: "", |
| | | matTotals:[] |
| | | matTotals: [], |
| | | warehouseId:"" |
| | | } |
| | | }, |
| | | onShow() {}, |
| | |
| | | this.focus = false; |
| | | this.addressFocus = false; |
| | | this.orderNo = res.orderNo; |
| | | this.warehouseId=res.warehouseId; |
| | | this.label = "åæ®ç¼å·ï¼" + this.orderNo; |
| | | this.getData(); |
| | | }, |
| | |
| | | innerAudioContext.play(); |
| | | }, |
| | | //è§£ç |
| | | releasebox(){ |
| | | releasebox() { |
| | | if (this.value.length == 0) { |
| | | this.$refs.uToast.show({ |
| | | title: "请æ«ç ", |
| | |
| | | } |
| | | }) |
| | | }, |
| | | releaseboxInput(){ |
| | | releaseboxInput() { |
| | | this.$nextTick(() => { |
| | | if (this.value.length == 0) { |
| | | return; |
| | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | updateFocus() { |
| | | this.$nextTick(() => { |
| | | this.materSn = ''; |
| | |
| | | this.$nextTick(function(x) { |
| | | if (this.barcode.length > 0) { |
| | | // if (this.barcode.substring(0, 1) == 'A' || this.barcode.substring(0, 2) == 'TP') { |
| | | this.focus = true; |
| | | this.focus = true; |
| | | // } else { |
| | | // this.$refs.uToast.show({ |
| | | // title: "æ«ç é误,è¯·æ«ææçç ", |
| | |
| | | setTimeout(() => { |
| | | this.materSn = ""; |
| | | }, 10); |
| | | var matInfo = matSn.split('|'); |
| | | |
| | | if (matInfo.length == 7) { |
| | | var matObj = { |
| | | matCode: matInfo[1], |
| | | matProductionDate: matInfo[3], |
| | | matQty: matInfo[5], |
| | | orderNo: matInfo[6], |
| | | sn: matSn |
| | | } |
| | | var temp = this.matInfos.find(x => x.orderNo == matObj.orderNo); |
| | | if (!temp) { |
| | | var tmp = this.matTotal.find(x => x.matCode == matObj.matCode); |
| | | if (!tmp) { |
| | | this.matTotal.push({ |
| | | matCode: matObj.matCode, |
| | | matQuantity: parseInt(matObj.matQty) |
| | | this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => { |
| | | if (res.status) { |
| | | // debugger |
| | | // this.matTotal.push({ |
| | | // matCode: res.data.materielCode, |
| | | // matQuantity: parseInt(res.data.quantity) |
| | | // }); |
| | | // this.sns.push(res.data.serialNumber); |
| | | |
| | | this.matInfos.splice(0, this.matInfos.length); |
| | | this.matInfos.push(res.data); |
| | | if (res.message) { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | } else { |
| | | tmp.matQuantity += parseInt(matObj.matQty); |
| | | // setTimeout(this.updateFocus,200); |
| | | setTimeout(() => { |
| | | this.voiceSpeech('../../static/fail.mp3'); |
| | | }, 100); |
| | | return; |
| | | } |
| | | this.sns.push(matSn); |
| | | this.matInfos.push(matObj); |
| | | setTimeout(this.updateFocus, 200); |
| | | // setTimeout(this.updateFocus,200); |
| | | setTimeout(() => { |
| | | this.voiceSpeech('../../static/success.mp3'); |
| | | }, 100); |
| | | } else { |
| | | // this.innerCode = ""; |
| | | this.$refs.uToast.show({ |
| | | title: "æ«ç éå¤", |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | setTimeout(this.updateFocus, 200); |
| | | // setTimeout(this.updateFocus,200); |
| | | setTimeout(() => { |
| | | this.voiceSpeech('../../static/fail.mp3'); |
| | | }, 100); |
| | | } |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: "æ«ç é误,è¯·æ«ææ£ç¡®å
ç®±ç ", |
| | | type: "error" |
| | | }) |
| | | setTimeout(this.updateFocus, 200); |
| | | setTimeout(() => { |
| | | this.voiceSpeech('../../static/fail.mp3'); |
| | | }, 100); |
| | | } |
| | | }) |
| | | |
| | | |
| | | // var matInfo = matSn.split('|'); |
| | | |
| | | // if (matInfo.length == 7) { |
| | | // var matObj = { |
| | | // matCode: matInfo[1], |
| | | // matProductionDate: matInfo[3], |
| | | // matQty: matInfo[5], |
| | | // orderNo: matInfo[6], |
| | | // sn: matSn |
| | | // } |
| | | // var temp = this.matInfos.find(x => x.orderNo == matObj.orderNo); |
| | | // if (!temp) { |
| | | // var tmp = this.matTotal.find(x => x.matCode == matObj.matCode); |
| | | // if (!tmp) { |
| | | // this.matTotal.push({ |
| | | // matCode: matObj.matCode, |
| | | // matQuantity: parseInt(matObj.matQty) |
| | | // }) |
| | | // } else { |
| | | // tmp.matQuantity += parseInt(matObj.matQty); |
| | | // } |
| | | // this.sns.push(matSn); |
| | | // this.matInfos.push(matObj); |
| | | // setTimeout(this.updateFocus, 200); |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/success.mp3'); |
| | | // }, 100); |
| | | // } else { |
| | | // this.$refs.uToast.show({ |
| | | // title: "æ«ç éå¤", |
| | | // type: "error" |
| | | // }) |
| | | // setTimeout(this.updateFocus, 200); |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/fail.mp3'); |
| | | // }, 100); |
| | | // } |
| | | // } else { |
| | | // this.$refs.uToast.show({ |
| | | // title: "æ«ç é误,è¯·æ«ææ£ç¡®å
ç®±ç ", |
| | | // type: "error" |
| | | // }) |
| | | // setTimeout(this.updateFocus, 200); |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/fail.mp3'); |
| | | // }, 100); |
| | | // } |
| | | } |
| | | }) |
| | | }, |
| | |
| | | var postData = { |
| | | MainData: { |
| | | "barcode": this.inboundBarcode, |
| | | "startPoint": this.address |
| | | "startPoint": this.address, |
| | | "warehouseId":this.warehouseId |
| | | } |
| | | } |
| | | this.$u.post('/api/Inbound/RequestInbound', postData).then(res => { |
| | | this.$u.post('/api/Task/RequestInboundTask', postData).then(res => { |
| | | if (res.status) { |
| | | uni.$showMsg(res.message); |
| | | this.inboundBarcode = ""; |
| | | this.address = ""; |
| | | setTimeout(()=>{ |
| | | setTimeout(() => { |
| | | this.addressFocus = false; |
| | | },200); |
| | | }, 200); |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | |
| | | sn = item.sn; |
| | | var tmp = this.matTotal.find(x => x.matCode == item.matCode); |
| | | if (tmp) { |
| | | tmp.matQuantity -= parseInt(item.matQty); |
| | | tmp.matQuantity -= parseInt(item.quantity); |
| | | } else { |
| | | |
| | | } |
| | |
| | | }) |
| | | return; |
| | | } |
| | | if (this.sns.length == 0) { |
| | | if (this.matInfos.length == 0) { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«æå
ç®±æ ç¾", |
| | | type: 'error' |
| | |
| | | } |
| | | this.$u.post('/api/InboundOrder/MaterielGroup', { |
| | | MainData: { |
| | | "pallet_barcode": this.barcode, |
| | | "palletCode": this.barcode, |
| | | "orderNo": this.orderNo, |
| | | "isFull": this.check |
| | | // "isFull": this.check |
| | | "warehouseId":this.warehouseId |
| | | }, |
| | | DelKeys: this.sns |
| | | }).then(res => { |