| | |
| | | <template> |
| | | <view> |
| | | <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem"> |
| | | <uni-segmented-control |
| | | :current="current" |
| | | :values="items" |
| | | @clickItem="onClickItem" |
| | | > |
| | | </uni-segmented-control> |
| | | <view class="content"> |
| | | <view v-if="current === 0" class="headerstyle"> |
| | | <view class="itemstyle"> |
| | | <uni-forms label-width="180"> |
| | | <uni-forms-item :label="label"> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label="goods_no"> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label="batch_num"> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label="order_qty"> |
| | | </uni-forms-item> |
| | | <uni-forms-item :label="order_Inqty"> |
| | | <uni-forms-item :label="label"> </uni-forms-item> |
| | | <uni-forms-item :label="goods_no"> </uni-forms-item> |
| | | <uni-forms-item :label="batch_num"> </uni-forms-item> |
| | | <uni-forms-item :label="order_qty"> </uni-forms-item> |
| | | <uni-forms-item :label="order_Inqty"> </uni-forms-item> |
| | | <uni-forms-item label="å¾
æ«ç©æç¼ç :"> |
| | | <uni-easyinput |
| | | type="text" |
| | | placeholder="è¯·æ«æç©æç¼ç " |
| | | ref="materialInput" |
| | | :focus="step === 1" |
| | | v-model="materialCode" |
| | | @confirm="materialCodeInput" |
| | | @blur="materialCodeInput" |
| | | /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="åºä½ç¼å·:"> |
| | | <uni-easyinput type="text" placeholder="è¯·æ«æåºä½ç¼å·" ref='midInput' :focus="!focus" |
| | | v-model="barcode" @confirm="barcodeInput" /> |
| | | <uni-easyinput |
| | | type="text" |
| | | placeholder="è¯·æ«æåºä½ç¼å·" |
| | | ref="midInput" |
| | | :focus="step === 2" |
| | | v-model="barcode" |
| | | @confirm="barcodeInput" |
| | | /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="å
¥åºæ°é:"> |
| | | <uni-easyinput type="text" placeholder="请è¾å
¥å
¥åºæ°é" ref='midInput' :focus="focus" |
| | | v-model="materSn" @confirm="snInput" /> |
| | | <uni-easyinput |
| | | type="text" |
| | | placeholder="请è¾å
¥å
¥åºæ°é" |
| | | ref="midInput" |
| | | :focus="step === 3" |
| | | v-model="materSn" |
| | | @confirm="snInput" |
| | | /> |
| | | </uni-forms-item> |
| | | |
| | | <uni-forms-item :label="Testlabel" v-if="Test"> |
| | | <uni-easyinput type="text" :placeholder="Testplaceholder" ref='midInput' |
| | | v-model="Initiallife" /> |
| | | <uni-easyinput |
| | | type="text" |
| | | :placeholder="Testplaceholder" |
| | | ref="midInput" |
| | | 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%;"> |
| | | <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: 200rpx;">确认å
¥åº</button> |
| | | <button |
| | | @click="submit" |
| | | type="primary" |
| | | size="default" |
| | | style="width: 250rpx" |
| | | > |
| | | 确认å
¥åº |
| | | </button> |
| | | </view> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | |
| | | <view class="itemstyle"> |
| | | <uni-forms label-width="120"> |
| | | <uni-forms-item label="æçæ¡ç "> |
| | | <uni-easyinput type="text" :focus="!addressFocus" v-model="inboundBarcode" |
| | | placeholder="è¯·æ«ææçæ¡ç " ref='midInput' @confirm="inputChangebarcode" /> |
| | | <uni-easyinput |
| | | type="text" |
| | | :focus="!addressFocus" |
| | | v-model="inboundBarcode" |
| | | placeholder="è¯·æ«ææçæ¡ç " |
| | | ref="midInput" |
| | | @confirm="inputChangebarcode" |
| | | /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="å°åæ¡ç "> |
| | | <uni-easyinput type="text" v-model="address" :disabled="addressdisabled" |
| | | placeholder="è¯·æ«æå°åæ¡ç " ref='midInput' :focus="addressFocus" /> |
| | | <uni-easyinput |
| | | type="text" |
| | | v-model="address" |
| | | :disabled="addressdisabled" |
| | | 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%" |
| | | > |
| | | å
¥åºç¡®è®¤ |
| | | </button> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | </view> |
| | |
| | | <view v-if="current === 2" class="headerstyle"> |
| | | <view class="itemstyle"> |
| | | <uni-list :border="true"> |
| | | <uni-list-item direction="column" v-for="(item,index) in orderInfo" :key="index"> |
| | | <uni-list-item |
| | | direction="column" |
| | | v-for="(item, index) in orderInfo" |
| | | :key="index" |
| | | > |
| | | <template v-slot:body> |
| | | <view class="uni-list-box"> |
| | | <view class="uni-content"> |
| | | <view style="font-size: 18px;">åæ®å·ï¼{{orderNo}}</view> |
| | | <view style="font-size: 18px;">ç©æç¼ç ï¼{{item.materielCode}}</view> |
| | | <view style="font-size: 18px">åæ®å·ï¼{{ orderNo }}</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 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> |
| | | </template> |
| | |
| | | <view class="itemstyle"> |
| | | <uni-forms label-width="180"> |
| | | <uni-forms-item label="å
ç®±æ ç¾:"> |
| | | <uni-easyinput type="text" placeholder="è¯·æ«æå
ç®±æ ç¾" ref='midInput' :focus="!pkfocus" |
| | | v-model="pkmaterSn" @confirm="pksnInput" /> |
| | | <uni-easyinput |
| | | type="text" |
| | | placeholder="è¯·æ«æå
ç®±æ ç¾" |
| | | ref="midInput" |
| | | :focus="!pkfocus" |
| | | v-model="pkmaterSn" |
| | | @confirm="pksnInput" |
| | | /> |
| | | </uni-forms-item> |
| | | |
| | | <uni-forms-item> |
| | | <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> |
| | | <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> |
| | | </view> |
| | | </uni-forms-item> |
| | | |
| | | </uni-forms> |
| | | <uni-list> |
| | | <uni-list-item direction="column" v-for="(item,index) in pkmatInfos" :key="index"> |
| | | <uni-list-item |
| | | direction="column" |
| | | v-for="(item, index) in pkmatInfos" |
| | | :key="index" |
| | | > |
| | | <template v-slot:body> |
| | | <view class="uni-list-box"> |
| | | <uni-icons type="trash" size="22" style="position: absolute;right: 5%;" |
| | | @click="pkdeleteList(index)"> |
| | | <uni-icons |
| | | type="trash" |
| | | size="22" |
| | | style="position: absolute; right: 5%" |
| | | @click="pkdeleteList(index)" |
| | | > |
| | | </uni-icons> |
| | | <view class="uni-content"> |
| | | <view class="uni-title-sub uni-ellipsis-2">éè´åå·ï¼{{item.purchaseOrderNo}}</view> |
| | | <view class="uni-note">ç©æç¼ç ï¼{{item.materielCode}}</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 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: [], |
| | |
| | | Testcheck: false, |
| | | pkmaterSn: "", |
| | | pkmatInfos: [], |
| | | addressdisabled: false |
| | | } |
| | | addressdisabled: false, |
| | | materialCode: "", // æ°å¢ï¼æ«æçç©æç¼ç |
| | | materialCodeValid: false, // æ°å¢ï¼ç©æç¼ç éªè¯ç¶æ |
| | | step: 1, // æ°å¢ï¼1-ç©æç¼ç ï¼2-åºä½ç¼å·ï¼3-å
¥åºæ°é |
| | | }; |
| | | }, |
| | | onShow() {}, |
| | | onLoad(res) { |
| | | this.step = 1; // åå§æ¥éª¤ï¼ç©æç¼ç |
| | | this.focus = false; |
| | | |
| | | this.id = res.id; |
| | | this.addressFocus = false; |
| | | this.orderNo = res.orderNo; |
| | |
| | | // innerAudioContext.src = src; // '../../static/success.mp3'; |
| | | // innerAudioContext.play(); |
| | | // }, |
| | | updateFocus() { |
| | | debugger |
| | | |
| | | // ç©æç¼ç éªè¯ |
| | | materialCodeInput() { |
| | | console.log("materialCodeInput 被触å"); |
| | | console.log("è¾å
¥å¼:", this.materialCode); |
| | | this.$nextTick(() => { |
| | | this.materSn = ''; |
| | | if (this.materialCode.trim() !== "") { |
| | | const scannedCode = this.materialCode.trim(); |
| | | const expectedCode = this.materielCode; |
| | | |
| | | console.log("æ«æç¼ç :", scannedCode); |
| | | console.log("ææç¼ç ï¼materielCodeï¼:", expectedCode); |
| | | |
| | | if (scannedCode === expectedCode) { |
| | | this.materialCodeValid = true; |
| | | console.log("â
ç©æç¼ç éªè¯æå"); |
| | | |
| | | // éªè¯æåå䏿¸
空å¼ï¼ç´æ¥åæ¢å°ä¸ä¸æ¥ |
| | | this.step = 2; |
| | | this.$refs.uToast.show({ |
| | | title: "ç©æç¼ç éªè¯æå", |
| | | type: "success", |
| | | }); |
| | | // ä½¿ç¨ $nextTick ç¡®ä¿ç¦ç¹åæ¢å¨ DOM æ´æ°åæ§è¡ |
| | | this.$nextTick(() => { |
| | | // 让åºä½ç¼å·è¾å
¥æ¡è·å¾ç¦ç¹ |
| | | this.$refs.midInput.focus(); |
| | | }); |
| | | } else { |
| | | this.materialCodeValid = false; |
| | | console.log("â ç©æç¼ç éªè¯å¤±è´¥"); |
| | | |
| | | this.$refs.uToast.show({ |
| | | title: `ç©æç¼ç ä¸å¹é
`, |
| | | type: "error", |
| | | }); |
| | | |
| | | // éªè¯å¤±è´¥æ¶æ¸
空å¼å¹¶ä¿æç¦ç¹å¨ç©æç¼ç è¾å
¥æ¡ |
| | | setTimeout(() => { |
| | | this.materialCode = ""; |
| | | this.step = 1; |
| | | // ç¡®ä¿ç¦ç¹åå°ç©æç¼ç è¾å
¥æ¡ |
| | | this.$nextTick(() => { |
| | | this.$refs.materialInput.focus(); |
| | | }); |
| | | }, 500); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | updateFocus() { |
| | | debugger; |
| | | this.$nextTick(() => { |
| | | this.materSn = ""; |
| | | if (!this.focus) { |
| | | this.focus = true; |
| | | } |
| | | }); |
| | | }, |
| | | barcodeFocus() { |
| | | debugger |
| | | this.barcode = ''; |
| | | debugger; |
| | | this.barcode = ""; |
| | | if (this.focus) { |
| | | this.focus = false; |
| | | } |
| | |
| | | getData() { |
| | | var postData = { |
| | | MainData: { |
| | | orderNo: this.orderNo |
| | | orderNo: this.orderNo, |
| | | }, |
| | | } |
| | | this.$u.post('/api/InboundOrderDetail/GetInboundOrderDetails', postData).then((res) => { |
| | | }; |
| | | this.$u |
| | | .post("/api/InboundOrderDetail/GetInboundOrderDetails", postData) |
| | | .then((res) => { |
| | | if (res.status) { |
| | | this.orderInfo = res.data; |
| | | if (this.orderInfo.length > 3) { |
| | | this.loadVisible = true; |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | onClickItem(e) { |
| | | this.focus = false; |
| | |
| | | } |
| | | } |
| | | }, |
| | | 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 { |
| | | |
| | | // barcodeInput() { |
| | | // this.$nextTick(function(x) { |
| | | // if (this.barcode.length > 0) { |
| | | // // æ«æåºä½ç¼å·åï¼èªå¨åæ¢å°å
¥åºæ°éè¾å
¥æ¡ï¼æ¥éª¤3ï¼ |
| | | // setTimeout(() => { |
| | | // this.step = 3; // 忢å°å
¥åºæ°é |
| | | // this.$refs.uToast.show({ |
| | | // title: "æ«ç é误,è¯·æ«ææçç ", |
| | | // type: "error" |
| | | // }) |
| | | // title: "åºä½ç¼å·æ«ææå", |
| | | // type: "success" |
| | | // }); |
| | | // }, 100); |
| | | // } |
| | | // }) |
| | | // }, |
| | | barcodeInput() { |
| | | this.$nextTick(() => { |
| | | if (this.barcode.length > 0) { |
| | | this.step = 3; // 忢å°å
¥åºæ°é |
| | | this.$refs.uToast.show({ |
| | | title: "åºä½ç¼å·æ«ææå", |
| | | type: "success", |
| | | }); |
| | | // æ·»å å»¶æ¶ç¡®ä¿æ«ç 宿 |
| | | setTimeout(() => { |
| | | this.$nextTick(() => { |
| | | this.$refs.midInput.focus(); |
| | | }); |
| | | }, 100); |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | |
| | | snInput() { |
| | | this.$nextTick(() => { |
| | | if (this.materSn != "") { |
| | | this.focus = false; |
| | | var matSn = this.materSn; |
| | | if (this.warehouseId == 11) { |
| | | matSn = matSn.replace(/,SC.*/, ''); |
| | | matSn = matSn.replace(/,SC.*/, ""); |
| | | } |
| | | //æ¥è¯¢matSnæ¯å¦åå¨å符 |
| | | if (matSn.indexOf("POHA") > 0) { |
| | | this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => { |
| | | this.$u |
| | | .post("/api/MaterielInfo/CodeAnalysis?serNum=" + matSn, {}) |
| | | .then((res) => { |
| | | this.Testcheck = false; |
| | | if (res.status) { |
| | | this.sns.push(res.data.serialNumber); |
| | |
| | | if (res.message) { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | type: "error", |
| | | }); |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/fail.mp3'); |
| | | // }, 100); |
| | |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | type: "error", |
| | | }); |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/fail.mp3'); |
| | | // }, 100); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | setTimeout(() => { |
| | | this.materSn = ""; |
| | | }, 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) => { |
| | | this.$u |
| | | .post("/api/MaterielInfo/CodeAnalysis?serNum=" + matSn, {}) |
| | | .then((res) => { |
| | | if (res.status) { |
| | | this.pksns.push(res.data.serialNumber); |
| | | this.pkmatInfos.push(res.data); |
| | | if (!res.status) { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | type: "error", |
| | | }); |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/fail.mp3'); |
| | | // }, 100); |
| | |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | type: "error", |
| | | }); |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/fail.mp3'); |
| | | // }, 100); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | setTimeout(() => { |
| | | this.pkmaterSn = ""; |
| | | }, 100); |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | inbound() { |
| | | if (this.inboundBarcode == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«ææçæ¡ç ", |
| | | type: "error" |
| | | }) |
| | | type: "error", |
| | | }); |
| | | return; |
| | | } |
| | | if (this.address == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«æå°åæ¡ç ", |
| | | type: "error" |
| | | }) |
| | | type: "error", |
| | | }); |
| | | return; |
| | | } |
| | | var postData = { |
| | | MainData: { |
| | | "barcode": this.inboundBarcode, |
| | | "startPoint": this.address, |
| | | "warehouseId": this.warehouseId |
| | | } |
| | | } |
| | | this.$u.post('/api/Task/RequestInboundTask', postData).then(res => { |
| | | barcode: this.inboundBarcode, |
| | | startPoint: this.address, |
| | | warehouseId: this.warehouseId, |
| | | }, |
| | | }; |
| | | this.$u |
| | | .post("/api/Task/RequestInboundTask", postData) |
| | | .then((res) => { |
| | | if (res.status) { |
| | | this.inboundBarcode = ""; |
| | | if (this.warehouseId != 5) this.address = ""; |
| | |
| | | this.addressFocus = false; |
| | | this.$refs.uToast.show({ |
| | | title: "æå", |
| | | type: "success" |
| | | }) |
| | | type: "success", |
| | | }); |
| | | }, 200); |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | type: "error", |
| | | }); |
| | | } |
| | | }).catch(err => { |
| | | }) |
| | | .catch((err) => { |
| | | this.$refs.uToast.show({ |
| | | title: err.message, |
| | | type: "error" |
| | | }) |
| | | }) |
| | | type: "error", |
| | | }); |
| | | }); |
| | | }, |
| | | inputChangebarcode() { |
| | | this.addressFocus = false; |
| | | this.$nextTick(function(x) { |
| | | if (this.inboundBarcode != '') { |
| | | if (this.inboundBarcode != "") { |
| | | this.addressFocus = true; |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | deleteList(res) { |
| | | this.matInfos.splice(res, 1); |
| | |
| | | this.pksns.splice(res, 1); |
| | | }, |
| | | reset() { |
| | | //éç½®ç©æç¼ç ç¸å
³ç¶æ |
| | | this.materialCode = ""; |
| | | this.materialCodeValid = false; |
| | | this.materialFocus = false; |
| | | |
| | | this.barcode = ""; |
| | | this.matInfos = []; |
| | | this.sns = []; |
| | | this.materSn = ""; |
| | | if (this.warehouseId = !6) { |
| | | if ((this.warehouseId = !6)) { |
| | | this.Initiallife = 0; |
| | | } |
| | | }, |
| | |
| | | if (this.pkmatInfos.length == 0) { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«æå
ç®±æ ç¾", |
| | | type: 'error' |
| | | }) |
| | | type: "error", |
| | | }); |
| | | return; |
| | | } |
| | | this.$u.post('/api/InboundOrder/InPinKu?warehouseId=' + this.warehouseId + "&orderNo=" + this.orderNo, this |
| | | .pksns).then(res => { |
| | | this.$u |
| | | .post( |
| | | "/api/InboundOrder/InPinKu?warehouseId=" + |
| | | this.warehouseId + |
| | | "&orderNo=" + |
| | | this.orderNo, |
| | | this.pksns |
| | | ) |
| | | .then((res) => { |
| | | if (res.status) { |
| | | this.$refs.uToast.show({ |
| | | title: "å
¥åºæå", |
| | | type: "success" |
| | | }) |
| | | type: "success", |
| | | }); |
| | | this.pkfocus = false; |
| | | this.pkmatInfos = []; |
| | | this.pksns = []; |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | type: "error", |
| | | }); |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | // submit() { |
| | | // if (this.barcode == "") { |
| | |
| | | // æ°å¢æ¹æ³å¤çå
¥åºå®æé»è¾ |
| | | |
| | | submit() { |
| | | // å
éªè¯ç©æç¼ç |
| | | if (!this.materialCodeValid) { |
| | | this.$refs.uToast.show({ |
| | | title: "请å
æ«æå¹¶éªè¯ç©æç¼ç ", |
| | | type: "error", |
| | | }); |
| | | return; |
| | | } |
| | | if (this.barcode == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«æè´§ä½ç¼å·", |
| | | type: 'error' |
| | | }) |
| | | type: "error", |
| | | }); |
| | | return; |
| | | } |
| | | if (this.materSn.length == 0) { |
| | | this.$refs.uToast.show({ |
| | | title: "请è¾å
¥å
¥åºæ°é", |
| | | type: 'error' |
| | | }) |
| | | type: "error", |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | // æ°å¢äºæ¬¡ç¡®è®¤é»è¾ |
| | | uni.showModal({ |
| | | title: '确认å
¥åº', |
| | | content: 'æ¨ç¡®å®è¦æäº¤å
¥åºä¿¡æ¯åï¼', |
| | | title: "确认å
¥åº", |
| | | content: "æ¨ç¡®å®è¦æäº¤å
¥åºä¿¡æ¯åï¼", |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | // ç¨æ·ç¹å»ç¡®å®ï¼æ§è¡åæçæäº¤é»è¾ |
| | | uni.showLoading({ |
| | | title: 'æäº¤ä¸...' |
| | | title: "æäº¤ä¸...", |
| | | }); |
| | | this.$u.post('/api/CabinOrder/FeedbackIn', { |
| | | this.$u |
| | | .post("/api/CabinOrder/FeedbackIn", { |
| | | MainData: { |
| | | "LocationCode": this.barcode, |
| | | "id": this.id, |
| | | "warehouseCode": this.warehouseId, |
| | | "orderNo": this.orderNo, |
| | | "materielCode": this.materielCode, |
| | | "Inqty": this.materSn, |
| | | "batchNo": this.batchNo, |
| | | LocationCode: this.barcode, |
| | | id: this.id, |
| | | warehouseCode: this.warehouseId, |
| | | orderNo: this.orderNo, |
| | | materielCode: this.materielCode, |
| | | Inqty: this.materSn, |
| | | batchNo: this.batchNo, |
| | | }, |
| | | DelKeys: this.sns |
| | | }).then(res => { |
| | | DelKeys: this.sns, |
| | | }) |
| | | .then((res) => { |
| | | uni.hideLoading(); |
| | | this.Testcheck = false; |
| | | if (res.status) { |
| | | this.$refs.uToast.show({ |
| | | title: "å
¥åºæå", |
| | | type: "success" |
| | | }) |
| | | type: "success", |
| | | }); |
| | | this.Inqty = parseInt(res.message); |
| | | this.order_Inqty = "å·²å
¥åºæ°éï¼" + this.Inqty; |
| | | // æå¨æ¸
空ææè¾å
¥æ°æ® |
| | | this.materialCode = ""; |
| | | this.materialCodeValid = false; |
| | | this.barcode = ""; |
| | | this.materSn = ""; |
| | | this.step = 1; // éç½®æ¥éª¤å°ç¬¬ä¸æ¥ |
| | | |
| | | // ä½¿ç¨ $nextTick ç¡®ä¿ç¦ç¹è®¾ç½®å¨ DOM æ´æ°åæ§è¡ |
| | | this.$nextTick(() => { |
| | | // ç¡®ä¿ç©æç¼ç è¾å
¥æ¡è·å¾ç¦ç¹ |
| | | this.$refs.materialInput.focus(); |
| | | }); |
| | | if (this.Inqty == this.orderqty) { |
| | | uni.setStorageSync('isIn', true); |
| | | uni.setStorageSync("isIn", true); |
| | | this.handleInboundComplete(); |
| | | } |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | type: "error", |
| | | }); |
| | | } |
| | | }).catch(err => { |
| | | }) |
| | | .catch((err) => { |
| | | uni.hideLoading(); |
| | | this.$refs.uToast.show({ |
| | | title: "ç½ç»é误ï¼è¯·éè¯", |
| | | type: "error" |
| | | }) |
| | | }) |
| | | type: "error", |
| | | }); |
| | | }); |
| | | } else { |
| | | // ç¨æ·ç¹å»åæ¶ï¼ä¸åä»»ä½æä½ |
| | | } |
| | | } |
| | | }, |
| | | }); |
| | | }, |
| | | |
| | |
| | | // }); |
| | | // æ¹å¼1ï¼ä½¿ç¨uni.navigateBackè¿åä¸ä¸é¡µ |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | delta: 1, |
| | | }); |
| | | }, 600); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/common/uni-ui.scss'; |
| | | @import "@/common/uni-ui.scss"; |
| | | |
| | | .content { |
| | | display: flex; |