Browse Source

直接合格转隔离

intex_online20241111
zhang_li 3 weeks ago
parent
commit
27fd58c27a
  1. 3
      src/mycomponents/scan/winScanPackAndLocation.vue
  2. 77
      src/pages/inventoryMove/coms/comMoveRecord.vue
  3. 15
      src/pages/inventoryMove/coms/okToHoldRecordPack.vue

3
src/mycomponents/scan/winScanPackAndLocation.vue

@ -236,6 +236,9 @@
scanLocation(scanResult) { scanLocation(scanResult) {
if(scanResult.fromLocationCode){
this.fromLocationCode = scanResult.fromLocationCode
}
var isCheck = false; var isCheck = false;
if (this.fromLocationCode == '') { if (this.fromLocationCode == '') {
this.showErrorMessage('来源库位不能为空', callback => { this.showErrorMessage('来源库位不能为空', callback => {

77
src/pages/inventoryMove/coms/comMoveRecord.vue

@ -35,7 +35,7 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
</view> </view>
<!-- 合格转隔离单独的弹窗--> <!-- 合格转隔离单独的弹窗-->
<okToHoldRecordPack ref="okToHoldRecordPackRef" :fromLocationCodeProps='fromLocationCode' :itemCodeProps='itemCode' :batchProps='batch' :showOnePop='showOnePop' @showFromLocationPopup='showFromLocationPopup' @itemCodeClick='openScanPopup' @confirm='okToHoldRecordPackConfirm' @fromLocationBlur="fromLocationBlur"></okToHoldRecordPack> <okToHoldRecordPack ref="okToHoldRecordPackRef" :fromLocationCodeProps='fromLocationCode' :itemCodeProps='itemCode' :batchProps='batch' :showOnePop='showOnePop' @showFromLocationPopup='showFromLocationPopup' @itemCodeClick='openScanPopup' @confirm='okToHoldRecordPackConfirm' @getInputMsgResult="getInputMsgResult" @itemCodeScanMsg='itemCodeScanMsg'></okToHoldRecordPack>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :title="'箱码'" > <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :title="'箱码'" >
</win-scan-pack-and-location> </win-scan-pack-and-location>
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation' <win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation'
@ -296,7 +296,7 @@
// this.getResult.fromLocationCode = obj.fromLocationCode // this.getResult.fromLocationCode = obj.fromLocationCode
this.getResult.label.batch = obj.handleQty this.getResult.label.batch = obj.handleQty
this.getResult.label.qty = obj.handleQty this.getResult.label.qty = obj.handleQty
this.getScanResultAfterBatchOnePop(this.getResult) this.getScanResultAfterBatch(this.getResult)
}, },
getScanResultAfter(result){ getScanResultAfter(result){
var balance = result.balance; var balance = result.balance;
@ -382,9 +382,12 @@
} }
newDetail.toLocationCode = this.toLocationCode; newDetail.toLocationCode = this.toLocationCode;
newDetail.fromLocationCode = result.fromLocationCode newDetail.fromLocationCode = result.fromLocationCode
newDetail.handleQty = Number(result.label.qty)
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
console.log(233,this.detailSource)
console.log(988,balance.inventoryStatus)
var detail = item.subList.find(r => { var detail = item.subList.find(r => {
if (r.batch == pack.batch && if (r.batch == pack.batch &&
r.fromLocationCode == balance.locationCode && r.fromLocationCode == balance.locationCode &&
@ -393,68 +396,6 @@
return r; return r;
} }
}) })
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
// newDetail.inventoryStatus = balance.inventoryStatus;
if (this.businessTypeCode == "Move") {
newDetail.toInventoryStatus = balance.inventoryStatus;
} else {
newDetail.toInventoryStatus = this.toInventoryStatus;
}
if (newDetail.packingNumber == '') {
newDetail.packingNumber = pack.number;
}
newDetail.toLocationCode = this.toLocationCode;
newDetail.fromLocationCode = result.fromLocationCode
item.subList.push(newDetail);
} else {
detail.handleQty =calc.add(detail.handleQty, result.label.qty)
}
}
calcHandleQty(this.detailSource);
},
getScanResultAfterBatchOnePop(result){
var balance = result.balance;
this.balanceInfo = result.balance;
var pack = result.package;
var item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode) {
return res
}
})
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack);
if (newDetail.packingNumber == '') {
newDetail.packingNumber = pack.number;
}
if (this.businessTypeCode == "Move") {
newDetail.toInventoryStatus = balance.inventoryStatus;
} else {
newDetail.toInventoryStatus = this.toInventoryStatus;
}
newDetail.toLocationCode = this.toLocationCode;
newDetail.fromLocationCode = result.fromLocationCode
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
if( balance.inventoryStatus != this.toInventoryStatus){
this.showErrorMessage("库存状态的库存")
return
}
var detail = item.subList.find(r => {
if (r.batch == pack.batch &&
r.fromLocationCode == balance.locationCode &&
r.toInventoryStatus == balance.inventoryStatus &&
r.scaned == true) {
return r;
}
})
console.log(2333,detail)
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
// newDetail.inventoryStatus = balance.inventoryStatus; // newDetail.inventoryStatus = balance.inventoryStatus;
@ -476,10 +417,14 @@
} }
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
}, },
fromLocationBlur(result){ getInputMsgResult(result){
console.log('pooo',result) console.log('pooo',result)
if(!this.fromLocationCode){
this.$refs.scanFromLocationCode.getScanResult(result) this.$refs.scanFromLocationCode.getScanResult(result)
// this.$refs.scanPopup. }else{
result.fromLocationCode = this.fromLocationCode
this.$refs.scanPopup.getScanResult(result)
}
}, },
showErrorMessage(message) { showErrorMessage(message) {
if (this.$refs.scanPopup) { if (this.$refs.scanPopup) {

15
src/pages/inventoryMove/coms/okToHoldRecordPack.vue

@ -9,14 +9,14 @@
</view> </view>
<view class="item"> <view class="item">
<view class="label">来源库位</view> <view class="label">来源库位</view>
<view class="value"><input v-model="fromLocationCode" @input="fromLocationScanMsg"></input></view> <view class="value"><u-input v-model="fromLocationCode" @confirm="fromLocationScanMsg"></u-input></view>
<view class="searchIcon"> <view class="searchIcon">
<image src="/static/search.svg" mode="" @click="fromLocationClick"/> <image src="/static/search.svg" mode="" @click="fromLocationClick"/>
</view> </view>
</view> </view>
<view class="item"> <view class="item">
<view class="label">零件</view> <view class="label">零件</view>
<view class="value"><u-input v-model="itemCode" @blur="itemCodeBlur"></u-input></view> <view class="value"><u-input v-model="itemCode" @confirm="itemCodeScanMsg"></u-input></view>
<view class="searchIcon"> <view class="searchIcon">
<image src="/static/search.svg" mode="" @click="itemCodeClick"/> <image src="/static/search.svg" mode="" @click="itemCodeClick"/>
</view> </view>
@ -62,7 +62,7 @@
components: { components: {
winScanLocation winScanLocation
}, },
emits: ["showFromLocationPopup",'itemCodeClick','confirm','fromLocationBlur'], emits: ["showFromLocationPopup",'itemCodeClick','confirm','getInputMsgResult'],
data() { data() {
return { return {
show:true, show:true,
@ -120,7 +120,7 @@
this.scanMsg = this.fromLocationCode this.scanMsg = this.fromLocationCode
this.handelScanMsg() this.handelScanMsg()
}, },
itemCodeBlur(){ itemCodeScanMsg(){
this.scanMsg = this.itemCode this.scanMsg = this.itemCode
this.handelScanMsg() this.handelScanMsg()
}, },
@ -136,7 +136,7 @@
// that.scanMsg =that.scanMsg + "\n"; // that.scanMsg =that.scanMsg + "\n";
// } // }
console.log(that.scanMsg.includes('\n')) console.log(that.scanMsg.includes('\n'))
if (that.scanMsg.includes('\n')) { // if (that.scanMsg.includes('\n')) {
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50'; // that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50';
setTimeout(() => { setTimeout(() => {
that.losefocus(); that.losefocus();
@ -162,7 +162,7 @@
scanResult.scanMessage = content scanResult.scanMessage = content
if (scanResult.success) { if (scanResult.success) {
// that.getfocus();// // that.getfocus();//
that.$emit("fromLocationBlur", scanResult); that.$emit("getInputMsgResult", scanResult);
} else { } else {
that.losefocus(); that.losefocus();
this.$refs.comMessage.showErrorMessage(scanResult.message, res => { this.$refs.comMessage.showErrorMessage(scanResult.message, res => {
@ -173,7 +173,7 @@
} }
}); });
}, 200); }, 200);
} // }
}, },
losefocus() { losefocus() {
let that = this; let that = this;
@ -192,6 +192,7 @@
}, },
batchProps(newVal) { batchProps(newVal) {
this.batch = newVal this.batch = newVal
console.log(999,this.batch)
}, },
} }
} }

Loading…
Cancel
Save