|  |  |  | 
|---|
|  |  |  | <uni-easyinput type="text" placeholder="è¯·æ«æå
ç®±æ ç¾" ref='midInput' :focus="focus" | 
|---|
|  |  |  | v-model="materSn" @input="snInput" /> | 
|---|
|  |  |  | </uni-forms-item> | 
|---|
|  |  |  | <uni-forms-item label="åå§å¯¿å½:" v-if="Test"> | 
|---|
|  |  |  | <uni-easyinput type="text" placeholder="请è¾å
¥åå§å¯¿å½" ref='midInput' v-model="Initiallife" /> | 
|---|
|  |  |  | <uni-forms-item :label="Testlabel" v-if="Test"> | 
|---|
|  |  |  | <uni-easyinput type="text" :placeholder="Testplaceholder" ref='midInput' | 
|---|
|  |  |  | v-model="Initiallife" /> | 
|---|
|  |  |  | </uni-forms-item> | 
|---|
|  |  |  | <!-- <uni-forms-item> | 
|---|
|  |  |  | <checkbox checked="check">æ¯å¦æ»¡ç</checkbox> | 
|---|
|  |  |  | 
|---|
|  |  |  | materSn: "", | 
|---|
|  |  |  | Initiallife: 1000, | 
|---|
|  |  |  | sns: [], | 
|---|
|  |  |  | sn: "", | 
|---|
|  |  |  | addressFocus: false, | 
|---|
|  |  |  | inboundBarcode: "", | 
|---|
|  |  |  | address: "", | 
|---|
|  |  |  | 
|---|
|  |  |  | matTotals: [], | 
|---|
|  |  |  | warehouseId: "", | 
|---|
|  |  |  | Test: false, | 
|---|
|  |  |  | Testlabel: "", | 
|---|
|  |  |  | Testplaceholder: "", | 
|---|
|  |  |  | Testcheck: false, | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | 
|---|
|  |  |  | this.addressFocus = false; | 
|---|
|  |  |  | this.orderNo = res.orderNo; | 
|---|
|  |  |  | this.warehouseId = res.warehouseId; | 
|---|
|  |  |  | this.Test = this.warehouseId == 6; //æµè¯æ¶ä»åºåºID | 
|---|
|  |  |  | if (this.warehouseId == 6) { //æµè¯æ¶ä»åºåºID | 
|---|
|  |  |  | this.Test = true; | 
|---|
|  |  |  | this.Testlabel = "åå§å¯¿å½:"; | 
|---|
|  |  |  | this.Testplaceholder = "请è¾å
¥åå§å¯¿å½"; | 
|---|
|  |  |  | } else if (this.warehouseId == 2) { //油墨ä»åºåºID | 
|---|
|  |  |  | this.Test = true; | 
|---|
|  |  |  | this.Testlabel = "æ°é:"; | 
|---|
|  |  |  | this.Testplaceholder = "请è¾å
¥æ°é"; | 
|---|
|  |  |  | this.Initiallife = 16; | 
|---|
|  |  |  | } else if (this.warehouseId == 5) { //è¾
æä»åºåºID | 
|---|
|  |  |  | this.address = "8005"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.label = "åæ®ç¼å·ï¼" + this.orderNo; | 
|---|
|  |  |  | this.getData(); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | snInput() { | 
|---|
|  |  |  | this.$nextTick(() => { | 
|---|
|  |  |  | if (this.warehouseId == 6 || this.warehouseId == 2) { | 
|---|
|  |  |  | if (this.sns.length > 0) { | 
|---|
|  |  |  | this.sns = []; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (this.materSn != "") { | 
|---|
|  |  |  | this.focus = false; | 
|---|
|  |  |  | var matSn = this.materSn; | 
|---|
|  |  |  | 
|---|
|  |  |  | this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => { | 
|---|
|  |  |  | this.Testcheck = false; | 
|---|
|  |  |  | 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); | 
|---|
|  |  |  | if (this.warehouseId == 6 || this.warehouseId == 2) { | 
|---|
|  |  |  | if (this.matInfos.length > 0) { | 
|---|
|  |  |  | this.matInfos = []; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.matInfos.push(res.data); | 
|---|
|  |  |  | if (res.message) { | 
|---|
|  |  |  | this.$refs.uToast.show({ | 
|---|
|  |  |  | title: res.message, | 
|---|
|  |  |  | type: "error" | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // setTimeout(this.updateFocus,200); | 
|---|
|  |  |  | setTimeout(() => { | 
|---|
|  |  |  | this.voiceSpeech('../../static/fail.mp3'); | 
|---|
|  |  |  | }, 100); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // setTimeout(this.updateFocus,200); | 
|---|
|  |  |  | setTimeout(() => { | 
|---|
|  |  |  | this.voiceSpeech('../../static/success.mp3'); | 
|---|
|  |  |  | }, 100); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | // this.innerCode = ""; | 
|---|
|  |  |  | this.$refs.uToast.show({ | 
|---|
|  |  |  | title: res.message, | 
|---|
|  |  |  | type: "error" | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // setTimeout(this.updateFocus,200); | 
|---|
|  |  |  | setTimeout(() => { | 
|---|
|  |  |  | this.voiceSpeech('../../static/fail.mp3'); | 
|---|
|  |  |  | }, 100); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.$u.post('/api/Task/RequestInboundTask', postData).then(res => { | 
|---|
|  |  |  | if (res.status) { | 
|---|
|  |  |  | uni.$showMsg(res.message); | 
|---|
|  |  |  | this.inboundBarcode = ""; | 
|---|
|  |  |  | this.address = ""; | 
|---|
|  |  |  | if (this.warehouseId != 5) this.address = ""; | 
|---|
|  |  |  | setTimeout(() => { | 
|---|
|  |  |  | this.addressFocus = false; | 
|---|
|  |  |  | this.$refs.uToast.show({ | 
|---|
|  |  |  | title: "æå", | 
|---|
|  |  |  | type: "success" | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, 200); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | this.$refs.uToast.show({ | 
|---|
|  |  |  | 
|---|
|  |  |  | if (this.Test) { | 
|---|
|  |  |  | if (!this.Testcheck) { | 
|---|
|  |  |  | this.Testcheck = true; | 
|---|
|  |  |  | this.$refs.uToast.show({ | 
|---|
|  |  |  | title: "请确认åå§å¯¿å½", | 
|---|
|  |  |  | type: 'error' | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | if (this.warehouseId == 2) { | 
|---|
|  |  |  | this.$refs.uToast.show({ | 
|---|
|  |  |  | title: "请确认æ°é", | 
|---|
|  |  |  | type: 'error' | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } else if (this.warehouseId == 6) { | 
|---|
|  |  |  | this.$refs.uToast.show({ | 
|---|
|  |  |  | title: "请确认åå§å¯¿å½", | 
|---|
|  |  |  | type: 'error' | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (this.warehouseId == 2) { //油墨ä»åºåºID | 
|---|
|  |  |  | this.sn = this.sns[0]; | 
|---|
|  |  |  | for (var i = 0; i < this.Initiallife - 1; i++) { | 
|---|
|  |  |  | this.sns.push(this.sn); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | let url = 'palletCode=' + this.barcode + '&initiallife=' + this.Initiallife + '&warehouseId=' + this | 
|---|
|  |  |  | .warehouseId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | let url = 'palletCode=' + this.barcode + '&initiallife=' + this.Initiallife + '&warehouseId=' + this.warehouseId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | this.$u.post('/api/InboundOrder/ManualMaterielGroup?' + url, this.sns).then(res => { | 
|---|
|  |  |  | this.Testcheck = false; | 
|---|
|  |  |  | if (res.status) { | 
|---|