| | |
| | | v-model="Initiallife" /> |
| | | </uni-forms-item> |
| | | |
| | | <!-- <uni-forms-item> |
| | | <checkbox checked="check">æ¯å¦æ»¡ç</checkbox> |
| | | </uni-forms-item> --> |
| | | <uni-forms-item> |
| | | <view style="display: flex;justify-content: space-around;margin-top: 2%;"> |
| | | <button @click="reset" type="default" size="default" |
| | | style="width: 160rpx;border: 1rpx solid #007aff;color: #007aff;">éç½®</button> |
| | | <button @click="submit" type="primary" size="default" style="width: 160rpx;">ç»ç</button> |
| | | <!-- ç»çæé®æ·»å ç¦ç¨ç¶æåæåæç¤º --> |
| | | <button @click="submit" type="primary" size="default" style="width: 160rpx;" |
| | | :disabled="isSubmitting"> |
| | | {{ isSubmitting ? 'ç»çä¸...' : 'ç»ç' }} |
| | | </button> |
| | | </view> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | <uni-list> |
| | | <!-- <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 class="uni-title-sub uni-ellipsis-2">ç©æç¼ç ï¼{{item.matCode}}</view> |
| | | <view class="uni-title-sub uni-ellipsis-2">æ°éï¼{{item.matQuantity}}</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </uni-list-item> --> |
| | | <uni-list-item direction="column" v-for="(item,index) in matInfos" :key="index"> |
| | | <template v-slot:body> |
| | | <view class="uni-list-box"> |
| | |
| | | placeholder="è¯·æ«æå°åæ¡ç " ref='midInput' :focus="addressFocus" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item> |
| | | <button @click="inbound" type="primary" size="default" style="margin-top: 2%;">å
¥åºç¡®è®¤</button> |
| | | <!-- å
¥åºç¡®è®¤æé®æ·»å ç¦ç¨ç¶æåæåæç¤º --> |
| | | <button @click="inbound" type="primary" size="default" style="margin-top: 2%;" |
| | | :disabled="isInbounding"> |
| | | {{ isInbounding ? 'å
¥åºä¸...' : 'å
¥åºç¡®è®¤' }} |
| | | </button> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | </view> |
| | |
| | | <view style="font-size: 18px;">ç©æç¼ç ï¼{{item.materielCode}}</view> |
| | | <view>ç©æåç§°ï¼{{item.materielName}}</view> |
| | | <view>ç©æè§æ ¼ï¼{{item.materielSpec}}</view> |
| | | <!-- <view style="font-size: 18px;">ç©æåç§°ï¼{{item.matName}}</view> --> |
| | | <view style="font-size: 18px;">æ°éï¼{{item.orderQuantity+item.unit}}</view> |
| | | <view style="font-size: 18px;">ç»çæ°éï¼{{item.receiptQuantity}}</view> |
| | | </view> |
| | |
| | | <view style="display: flex;justify-content: space-around;margin-top: 2%;"> |
| | | <button @click="resetInPk" type="default" size="default" |
| | | style="width: 160rpx;border: 1rpx solid #007aff;color: #007aff;">éç½®</button> |
| | | <!-- å
¥å¹³åºæé®æ·»å ç¦ç¨ç¶æåæåæç¤º --> |
| | | <button @click="pksubmit" type="primary" size="default" |
| | | style="margin-top: 2%;">å
¥å¹³åº</button> |
| | | style="margin-top: 2%;" :disabled="isPkSubmitting"> |
| | | {{ isPkSubmitting ? 'å
¥åºä¸...' : 'å
¥å¹³åº' }} |
| | | </button> |
| | | </view> |
| | | </uni-forms-item> |
| | | |
| | |
| | | Testcheck: false, |
| | | pkmaterSn: "", |
| | | pkmatInfos: [], |
| | | addressdisabled: false |
| | | addressdisabled: false, |
| | | // æ°å¢ï¼é²éå¤ç¹å»ç¶æåé |
| | | isSubmitting: false, // ç»ç请æ±ç¶æ |
| | | isInbounding: false, // å
¥åºç¡®è®¤è¯·æ±ç¶æ |
| | | isPkSubmitting: false // å
¥å¹³åºè¯·æ±ç¶æ |
| | | } |
| | | }, |
| | | onShow() {}, |
| | |
| | | this.getData(); |
| | | }, |
| | | methods: { |
| | | // voiceSpeech(src) { |
| | | // innerAudioContext.src = src; // '../../static/success.mp3'; |
| | | // innerAudioContext.play(); |
| | | // }, |
| | | updateFocus() { |
| | | debugger |
| | | this.$nextTick(() => { |
| | |
| | | barcodeInput() { |
| | | 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; |
| | | // } else { |
| | | // this.$refs.uToast.show({ |
| | | // title: "æ«ç é误,è¯·æ«ææçç ", |
| | | // type: "error" |
| | | // }) |
| | | // } |
| | | } |
| | | }) |
| | | }, |
| | |
| | | this.Testcheck = false; |
| | | if (res.status) { |
| | | this.sns.push(res.data.serialNumber); |
| | | |
| | | this.matInfos.push(res.data); |
| | | if (res.message) { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/fail.mp3'); |
| | | // }, 100); |
| | | return; |
| | | } |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/success.mp3'); |
| | | // }, 100); |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/fail.mp3'); |
| | | // }, 100); |
| | | } |
| | | }) |
| | | } |
| | |
| | | pksnInput() { |
| | | this.$nextTick(() => { |
| | | if (this.pkmaterSn != "") { |
| | | |
| | | var matSn = this.pkmaterSn; |
| | | |
| | | if(matSn.indexOf("POHA")>0){ |
| | | this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => { |
| | | if (res.status) { |
| | |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/fail.mp3'); |
| | | // }, 100); |
| | | return; |
| | | } |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/success.mp3'); |
| | | // }, 100); |
| | | return; |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/fail.mp3'); |
| | | // }, 100); |
| | | } |
| | | }) |
| | | } |
| | |
| | | }) |
| | | }, |
| | | inbound() { |
| | | // 1. åç½®æ ¡éª |
| | | if (this.inboundBarcode == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«ææçæ¡ç ", |
| | |
| | | }) |
| | | return; |
| | | } |
| | | |
| | | // 2. 鲿¢éå¤ç¹å»ï¼è¯·æ±ä¸åç´æ¥è¿å |
| | | if (this.isInbounding) return; |
| | | |
| | | // 3. æ 记为请æ±ä¸ï¼ç¦ç¨æé® |
| | | this.isInbounding = true; |
| | | |
| | | var postData = { |
| | | MainData: { |
| | | "barcode": this.inboundBarcode, |
| | |
| | | title: err.message, |
| | | type: "error" |
| | | }) |
| | | }).finally(() => { |
| | | // 4. 请æ±å®æï¼æå/å¤±è´¥ï¼æ¢å¤æé®ç¶æ |
| | | this.isInbounding = false; |
| | | }) |
| | | }, |
| | | inputChangebarcode() { |
| | |
| | | this.pksns = []; |
| | | }, |
| | | pksubmit() { |
| | | // 1. åç½®æ ¡éª |
| | | if (this.pkmatInfos.length == 0) { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«æå
ç®±æ ç¾", |
| | |
| | | }) |
| | | return; |
| | | } |
| | | |
| | | // 2. 鲿¢éå¤ç¹å»ï¼è¯·æ±ä¸åç´æ¥è¿å |
| | | if (this.isPkSubmitting) return; |
| | | |
| | | // 3. æ 记为请æ±ä¸ï¼ç¦ç¨æé® |
| | | this.isPkSubmitting = true; |
| | | |
| | | this.$u.post('/api/InboundOrder/InPinKu?warehouseId=' + this.warehouseId + "&orderNo=" + this.orderNo, this |
| | | .pksns).then(res => { |
| | | if (res.status) { |
| | |
| | | type: "error" |
| | | }) |
| | | } |
| | | }).catch(err => { |
| | | this.$refs.uToast.show({ |
| | | title: err.message, |
| | | type: "error" |
| | | }) |
| | | }).finally(() => { |
| | | // 4. 请æ±å®æï¼æå/å¤±è´¥ï¼æ¢å¤æé®ç¶æ |
| | | this.isPkSubmitting = false; |
| | | }) |
| | | }, |
| | | submit() { |
| | | // 1. åç½®æ ¡éª |
| | | if (this.barcode == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«ææçæ¡ç ", |
| | |
| | | return; |
| | | } |
| | | } |
| | | |
| | | // 2. 鲿¢éå¤ç¹å»ï¼è¯·æ±ä¸åç´æ¥è¿å |
| | | if (this.isSubmitting) return; |
| | | |
| | | // 3. æ 记为请æ±ä¸ï¼ç¦ç¨æé® |
| | | this.isSubmitting = true; |
| | | |
| | | if (this.warehouseId == 2) { //油墨ä»åºåºID |
| | | this.sn = this.sns[0]; |
| | | for (var i = 0; i < this.Initiallife - 1; i++) { |
| | |
| | | "palletCode": this.barcode, |
| | | "orderNo": this.orderNo, |
| | | "initiallife": this.Initiallife, |
| | | // "isFull": this.check |
| | | "warehouseId": this.warehouseId |
| | | }, |
| | | DelKeys: this.sns |
| | |
| | | type: "error" |
| | | }) |
| | | } |
| | | }).catch(err => { |
| | | this.$refs.uToast.show({ |
| | | title: err.message, |
| | | type: "error" |
| | | }) |
| | | }).finally(() => { |
| | | // 4. 请æ±å®æï¼æå/å¤±è´¥ï¼æ¢å¤æé®ç¶æ |
| | | this.isSubmitting = false; |
| | | }) |
| | | } |
| | | } |