Browse Source

直接合格转隔离

intex_online20241111
zhang_li 3 weeks ago
parent
commit
27fd58c27a
  1. 3
      src/mycomponents/scan/winScanPackAndLocation.vue
  2. 79
      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) {
if(scanResult.fromLocationCode){
this.fromLocationCode = scanResult.fromLocationCode
}
var isCheck = false;
if (this.fromLocationCode == '') {
this.showErrorMessage('来源库位不能为空', callback => {

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

@ -35,7 +35,7 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</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>
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation'
@ -296,7 +296,7 @@
// this.getResult.fromLocationCode = obj.fromLocationCode
this.getResult.label.batch = obj.handleQty
this.getResult.label.qty = obj.handleQty
this.getScanResultAfterBatchOnePop(this.getResult)
this.getScanResultAfterBatch(this.getResult)
},
getScanResultAfter(result){
var balance = result.balance;
@ -382,9 +382,12 @@
}
newDetail.toLocationCode = this.toLocationCode;
newDetail.fromLocationCode = result.fromLocationCode
newDetail.handleQty = Number(result.label.qty)
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
console.log(233,this.detailSource)
console.log(988,balance.inventoryStatus)
var detail = item.subList.find(r => {
if (r.batch == pack.batch &&
r.fromLocationCode == balance.locationCode &&
@ -393,68 +396,6 @@
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) {
let newDetail = createDetailInfo(balance, pack);
// newDetail.inventoryStatus = balance.inventoryStatus;
@ -476,10 +417,14 @@
}
calcHandleQty(this.detailSource);
},
fromLocationBlur(result){
getInputMsgResult(result){
console.log('pooo',result)
this.$refs.scanFromLocationCode.getScanResult(result)
// this.$refs.scanPopup.
if(!this.fromLocationCode){
this.$refs.scanFromLocationCode.getScanResult(result)
}else{
result.fromLocationCode = this.fromLocationCode
this.$refs.scanPopup.getScanResult(result)
}
},
showErrorMessage(message) {
if (this.$refs.scanPopup) {

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

@ -9,14 +9,14 @@
</view>
<view class="item">
<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">
<image src="/static/search.svg" mode="" @click="fromLocationClick"/>
</view>
</view>
<view class="item">
<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">
<image src="/static/search.svg" mode="" @click="itemCodeClick"/>
</view>
@ -62,7 +62,7 @@
components: {
winScanLocation
},
emits: ["showFromLocationPopup",'itemCodeClick','confirm','fromLocationBlur'],
emits: ["showFromLocationPopup",'itemCodeClick','confirm','getInputMsgResult'],
data() {
return {
show:true,
@ -120,7 +120,7 @@
this.scanMsg = this.fromLocationCode
this.handelScanMsg()
},
itemCodeBlur(){
itemCodeScanMsg(){
this.scanMsg = this.itemCode
this.handelScanMsg()
},
@ -136,7 +136,7 @@
// that.scanMsg =that.scanMsg + "\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';
setTimeout(() => {
that.losefocus();
@ -162,7 +162,7 @@
scanResult.scanMessage = content
if (scanResult.success) {
// that.getfocus();//
that.$emit("fromLocationBlur", scanResult);
that.$emit("getInputMsgResult", scanResult);
} else {
that.losefocus();
this.$refs.comMessage.showErrorMessage(scanResult.message, res => {
@ -173,7 +173,7 @@
}
});
}, 200);
}
// }
},
losefocus() {
let that = this;
@ -192,6 +192,7 @@
},
batchProps(newVal) {
this.batch = newVal
console.log(999,this.batch)
},
}
}

Loading…
Cancel
Save