|  |  |  | 
|---|
|  |  |  | <view class="itemstyle"> | 
|---|
|  |  |  | <uni-forms style="margin-left: 2%;margin-top: 20px;" label-width="180"> | 
|---|
|  |  |  | <uni-forms-item :label="label" style="margin-top: -20px;"></uni-forms-item> | 
|---|
|  |  |  | <!-- <uni-forms-item label="åæ®ç±»åï¼çäº§é¢æå" style="margin-top: -20px;"></uni-forms-item> --> | 
|---|
|  |  |  | <uni-forms-item label="ç©æç ï¼" style="margin-top: -20px;"> | 
|---|
|  |  |  | <uni-easyinput type="text" placeholder="è¯·æ«æç©æç " ref='midInput' :focus="focus" | 
|---|
|  |  |  | v-model="innerCode" @input="snInput" /> | 
|---|
|  |  |  | <uni-easyinput type="text" placeholder="è¯·æ«æç©æç " ref='midInput' :focus="!focus" | 
|---|
|  |  |  | v-model="materSn" @input="snInput" /> | 
|---|
|  |  |  | </uni-forms-item> | 
|---|
|  |  |  | <!-- <uni-forms-item :label="PurchaseOrderNo" style="margin-top: -20px;"></uni-forms-item> | 
|---|
|  |  |  | <uni-forms-item :label="matCode" style="margin-top: -20px;"></uni-forms-item> | 
|---|
|  |  |  | <uni-forms-item :label="LotNo" style="margin-top: -20px;"></uni-forms-item> | 
|---|
|  |  |  | <uni-forms-item :label="ProductionDate" style="margin-top: -20px;"></uni-forms-item> | 
|---|
|  |  |  | <uni-forms-item :label="EffectiveDate" style="margin-top: -20px;"></uni-forms-item> | 
|---|
|  |  |  | <uni-forms-item :label="orderQty" style="margin-top: -20px;"></uni-forms-item> | 
|---|
|  |  |  | <uni-forms-item :label="remaindQty" style="margin-top: -20px;"> --> | 
|---|
|  |  |  | <uni-list> | 
|---|
|  |  |  | <uni-list-item direction="column" v-for="item in matInfos" :key="item.palletCode"> | 
|---|
|  |  |  | <uni-list-item direction="column" v-for="(item,index) in matInfos" :key="index"> | 
|---|
|  |  |  | <template v-slot:body> | 
|---|
|  |  |  | <view class="uni-content"> | 
|---|
|  |  |  | <view>åæ®ç¼å·ï¼{{item.orderNo}}</view> | 
|---|
|  |  |  | <view>æçç¼å·ï¼{{item.palletCode}}</view> | 
|---|
|  |  |  | <view>ç©ææ¹æ¬¡ï¼{{item.batchNo}}</view> | 
|---|
|  |  |  | <!-- <view class="uni-title-sub uni-ellipsis-2">éè´åå·ï¼{{item.purchaseOrderNo}}</view> --> | 
|---|
|  |  |  | <view>ç©æç¼ç ï¼{{item.materielCode}}</view> | 
|---|
|  |  |  | <view>ç©æåç§°ï¼{{item.materielName}}</view> | 
|---|
|  |  |  | <view>åæ®æ°éï¼{{item.orderQuantity}}</view> | 
|---|
|  |  |  | <view>åå§åºåï¼{{item.originalQuantity}}</view> | 
|---|
|  |  |  | <view>åé
åºåï¼{{item.assignQuantity}}</view> | 
|---|
|  |  |  | <view>å©ä½åºåï¼{{item.originalQuantity-item.assignQuantity}}</view> | 
|---|
|  |  |  | <view>æ¹æ¬¡å·ï¼{{item.lotNo}}</view> | 
|---|
|  |  |  | <view>æ°éï¼{{item.quantity}}</view> | 
|---|
|  |  |  | <!-- <view class="uni-note">çäº§æ¥æï¼{{item.productionDate}}</view> | 
|---|
|  |  |  | <view class="uni-note">æææï¼{{item.effectiveDate}}</view> --> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </uni-list-item> | 
|---|
|  |  |  | </uni-list> | 
|---|
|  |  |  | <uni-forms-item label="åºåºæ°éï¼" style="margin-top: -20px;"> | 
|---|
|  |  |  | <uni-easyinput type="text" placeholder="请è¾å
¥åºåºæ°é" ref='midInput' :focus="focus" | 
|---|
|  |  |  | v-model="outQty" /> | 
|---|
|  |  |  | </uni-forms-item> | 
|---|
|  |  |  | </uni-forms-item> | 
|---|
|  |  |  | </uni-forms> | 
|---|
|  |  |  | <uni-forms-item> | 
|---|
|  |  |  | 
|---|
|  |  |  | <view>ç©æç¼ç ï¼{{item.materielCode}}</view> | 
|---|
|  |  |  | <view>ç©æåç§°ï¼{{item.materielName}}</view> | 
|---|
|  |  |  | <view>æ°éï¼{{item.orderQuantity+item.unit}}</view> | 
|---|
|  |  |  | <view>åºåºæ°éï¼{{item.orderQuantity}}</view> | 
|---|
|  |  |  | <view>å·²åºæ°éï¼{{item.overOutQuantity}}</view> | 
|---|
|  |  |  | <view>åºåºæ°éï¼{{item.orderQuantity+item.unit}}</view> | 
|---|
|  |  |  | <view>å·²åºæ°éï¼{{item.overOutQuantity+item.unit}}</view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | items: ['ç©æä¿¡æ¯', 'åæ®ä¿¡æ¯'], | 
|---|
|  |  |  | current: 0, | 
|---|
|  |  |  | matTotal: [], | 
|---|
|  |  |  | matInfos: [], | 
|---|
|  |  |  | orderNo: "", | 
|---|
|  |  |  | label: "", | 
|---|
|  |  |  | outQty: "", | 
|---|
|  |  |  | orderInfo: [], | 
|---|
|  |  |  | focus: false, | 
|---|
|  |  |  | pkfocus: false, | 
|---|
|  |  |  | barcode: "", | 
|---|
|  |  |  | materSn: "", | 
|---|
|  |  |  | Initiallife: 1000, | 
|---|
|  |  |  | sns: [], | 
|---|
|  |  |  | pksns: [], | 
|---|
|  |  |  | addressFocus: false, | 
|---|
|  |  |  | inboundBarcode: "", | 
|---|
|  |  |  | address: "", | 
|---|
|  |  |  | check: true, | 
|---|
|  |  |  | value: "", | 
|---|
|  |  |  | matInfo: [], | 
|---|
|  |  |  | value2: "", | 
|---|
|  |  |  | matTotals: [], | 
|---|
|  |  |  | sn: "", | 
|---|
|  |  |  | warehouseId: "", | 
|---|
|  |  |  | Test: false, | 
|---|
|  |  |  | Testlabel: "", | 
|---|
|  |  |  | Testplaceholder: "", | 
|---|
|  |  |  | Testcheck: false, | 
|---|
|  |  |  | pkmaterSn: "", | 
|---|
|  |  |  | pkmatInfos: [] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | onShow() {}, | 
|---|
|  |  |  | onLoad(res) { | 
|---|
|  |  |  | this.focus = false; | 
|---|
|  |  |  | this.addressFocus = false; | 
|---|
|  |  |  | this.orderNo = res.orderNo; | 
|---|
|  |  |  | this.warehouseId = res.warehouseId; | 
|---|
|  |  |  | this.label = "åæ®ç¼å·ï¼" + this.orderNo; | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | onClickItem(e) { | 
|---|
|  |  |  | this.focus = false; | 
|---|
|  |  |  | this.addressFocus = false; | 
|---|
|  |  |  | if (this.current !== e.currentIndex) { | 
|---|
|  |  |  | this.current = e.currentIndex; | 
|---|
|  |  |  | if (this.current == 2) { | 
|---|
|  |  |  | 
|---|
|  |  |  | snInput() { | 
|---|
|  |  |  | this.$nextTick(() => { | 
|---|
|  |  |  | if (this.materSn != "") { | 
|---|
|  |  |  | this.focus = false; | 
|---|
|  |  |  | this.focus = true; | 
|---|
|  |  |  | var matSn = this.materSn; | 
|---|
|  |  |  | setTimeout(() => { | 
|---|
|  |  |  | this.materSn = ""; | 
|---|
|  |  |  | 
|---|
|  |  |  | this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => { | 
|---|
|  |  |  | this.Testcheck = false; | 
|---|
|  |  |  | if (res.status) { | 
|---|
|  |  |  | this.sns.push(res.data.serialNumber); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | this.matInfos = []; | 
|---|
|  |  |  | this.sn = res.data.serialNumber; | 
|---|
|  |  |  | this.matInfos.push(res.data); | 
|---|
|  |  |  | if (res.message) { | 
|---|
|  |  |  | if (!res.status) { | 
|---|
|  |  |  | this.$refs.uToast.show({ | 
|---|
|  |  |  | title: res.message, | 
|---|
|  |  |  | type: "error" | 
|---|
|  |  |  | 
|---|
|  |  |  | this.voiceSpeech('../../static/success.mp3'); | 
|---|
|  |  |  | }, 100); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | this.matInfos = []; | 
|---|
|  |  |  | this.sns = []; | 
|---|
|  |  |  | this.$refs.uToast.show({ | 
|---|
|  |  |  | title: res.message, | 
|---|
|  |  |  | type: "error" | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | deleteList(res) { | 
|---|
|  |  |  | this.matInfos.splice(res, 1); | 
|---|
|  |  |  | this.sns.splice(res, 1); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | submit() { | 
|---|
|  |  |  | if (this.barcode == "") { | 
|---|
|  |  |  | if (this.sn == "") { | 
|---|
|  |  |  | this.$refs.uToast.show({ | 
|---|
|  |  |  | title: "è¯·æ«ææçæ¡ç ", | 
|---|
|  |  |  | title: "è¯·æ«æç©æç ", | 
|---|
|  |  |  | type: 'error' | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (this.matInfos.length == 0) { | 
|---|
|  |  |  | this.$refs.uToast.show({ | 
|---|
|  |  |  | title: "è¯·æ«æå
ç®±æ ç¾", | 
|---|
|  |  |  | type: 'error' | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (this.Test) { | 
|---|
|  |  |  | if (!this.Testcheck) { | 
|---|
|  |  |  | this.Testcheck = true; | 
|---|
|  |  |  | this.$refs.uToast.show({ | 
|---|
|  |  |  | title: "请确认åå§å¯¿å½", | 
|---|
|  |  |  | type: 'error' | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.$u.post('/api/InboundOrder/MaterielGroup', { | 
|---|
|  |  |  | debugger | 
|---|
|  |  |  | this.$u.post('/api/OutboundOrder/outpinku', { | 
|---|
|  |  |  | MainData: { | 
|---|
|  |  |  | "palletCode": this.barcode, | 
|---|
|  |  |  | "orderNo": this.orderNo, | 
|---|
|  |  |  | "initiallife": this.Initiallife, | 
|---|
|  |  |  | // "isFull": this.check | 
|---|
|  |  |  | "sn": this.sn, | 
|---|
|  |  |  | "warehouseId": this.warehouseId | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | DelKeys: this.sns | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | this.Testcheck = false; | 
|---|
|  |  |  | if (res.status) { | 
|---|
|  |  |  | this.$refs.uToast.show({ | 
|---|
|  |  |  | title: "åºåºæå", | 
|---|
|  |  |  | type: "success" | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | this.focus = false; | 
|---|
|  |  |  | this.barcode = ""; | 
|---|
|  |  |  | this.matInfos = []; | 
|---|
|  |  |  | this.sns = []; | 
|---|
|  |  |  | this.matTotal = []; | 
|---|
|  |  |  | this.sn = ""; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | this.$refs.uToast.show({ | 
|---|
|  |  |  | title: res.message, | 
|---|