Browse Source

YT-2929物料隔离需要支持线边负库存的隔离

intex
张立 4 days ago
parent
commit
3b03b45417
  1. 7
      src/mycomponents/qty/balanceQtyEdit.vue
  2. 9
      src/pages/inventoryMove/coms/comInventoryDetailCard.vue
  3. 101
      src/pages/inventoryMove/job/inventoryMoveDetail.vue

7
src/mycomponents/qty/balanceQtyEdit.vue

@ -124,6 +124,11 @@
type: Boolean,
default: true
},
//
isTestBalance: {
type: Boolean,
default: true
},
},
watch:{
'allQty'(newVal){
@ -188,7 +193,7 @@
this.allQty = balanceQty;
})
}else {
if (this.allQty > balanceQty) {
if (this.allQty > balanceQty && this.isTestBalance) {
this.$refs.comMessage.showConfirmWarningModal('数量[' + this.allQty + ']不允许大于库存数量[' + balanceQty + ']',
res => {
this.allQty = balanceQty;

9
src/pages/inventoryMove/coms/comInventoryDetailCard.vue

@ -22,7 +22,7 @@
</uni-collapse-item>
</uni-collapse>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" :allowEditQty="allowEditQty" @confirm="confirm"
:allowEditStatus="true"></balance-qty-edit>
:allowEditStatus="true" :isTestBalance='isTestBalance'></balance-qty-edit>
<win-scan-location ref="scanLocationCode" :locationAreaTypeList="locationAreaTypeList" title="目标库位" @getLocation='getLocation'></win-scan-location>
<detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<comMessage ref="message"></comMessage>
@ -80,7 +80,12 @@
locationAreaTypeList: {
type: Array,
default: []
}
},
//
isTestBalance: {
type: Boolean,
default: true
},
},
watch: {
dataContent: {

101
src/pages/inventoryMove/job/inventoryMoveDetail.vue

@ -14,7 +14,7 @@
<view class="">
<comInventoryDetailCard :dataContent="item" :settingParam="jobContent" @remove="updateData"
@updateData='updateData' :locationAreaTypeList="toLocationAreaTypeList"
:allowEditQty="jobContent.allowModifyQty=='TRUE'?true:false" @openDetail="openDetail">
:allowEditQty="jobContent.allowModifyQty=='TRUE'?true:false" @openDetail="openDetail" :isTestBalance='isTestBalance'>
</comInventoryDetailCard>
</view>
</view>
@ -117,7 +117,9 @@
title: '',
toLocationAreaTypeList: [],
jobToLocationCode:'',
deptObj:{}
deptObj:{},
areaType:'',
isTestBalance:'true'
};
},
props: {
@ -195,6 +197,7 @@
name = "合格转隔离";
this.toLocationCode = 'HOLD';
this.toInventoryStatus = 'HOLD';
this.isTestBalance = false
} else if (this.businessTypeCode == "NokToHold") {
name = "不合格转隔离";
this.toLocationCode = 'HOLD';
@ -297,7 +300,6 @@
calcHandleQty() {
calcHandleQty(this.detailSource)
console.log(this.detailSource)
this.continueScan()
this.$forceUpdate();
},
@ -327,6 +329,7 @@
getScanResult(result, managementPrecision) {
this.managementType = managementPrecision
this.areaType = result && result.balance && result.balance.areaType ? result.balance.areaType : ''
if (managementPrecision == 'BY_BATCH' || managementPrecision == 'BY_QUANTITY') {
this.setDataBatch(result, managementPrecision)
} else {
@ -335,7 +338,6 @@
},
setDataBatch(result, managementPrecision) {
console.log(877, result)
try {
var packingNumber = result.label.packingNumber;
var batch = result.label.batch;
@ -498,7 +500,6 @@
this.managementType = this.managementList && this.managementList[0] && this
.managementList[0].ManagementPrecision ? this.managementList[0]
.ManagementPrecision : 'BY_PACKAGING'
console.log(11, this.managementType)
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
@ -563,24 +564,20 @@
//
let str = ''
let str1 = ''
let str2 = ''
this.detailSource.forEach((item) => {
item.subList.forEach(cur => {
if (cur.scaned) {
if (cur.qty != cur.handleQty) {
var tempHandleQty = 0
if (cur.handleQty) {
tempHandleQty = cur.handleQty
} else {
tempHandleQty = 0
}
var batchHint = cur.batch ? `批次【${cur.batch}` : ``
str += `物料号【${item.itemCode}` + `${batchHint}` +
`提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致\n`
`提交数量【${cur.handleQty || 0 }】与任务物料数量【${cur.qty}】不一致\n`
}
if (cur.handleQty > cur.balance.balanceQty) {
str1 += `物料号【${item.itemCode}` + `${batchHint}` +
`提交数量【${ cur.handleQty}】不可以大于库存数量【${cur.balance.balanceQty}`
}
`提交数量【${ cur.handleQty || 0 }】不可以大于库存数量【${cur.balance.balanceQty}`
str2 += `物料号【${item.itemCode}】在库位【${cur.fromLocationCode}】下` +
`提交数量【${ cur.handleQty || 0 }】大于库存数量【${cur.balance.balanceQty}`
}
} else {
var batchHint = cur.batch ? `批次【${cur.batch}` : ``
@ -589,6 +586,38 @@
}
})
})
if(this.businessTypeCode == "OkToHold" && this.areaType == "WIP"){
console.log(999,this.jobContent.allowSmallerQty)
console.log(999,this.jobContent.allowBiggerQty)
if(str){
if (this.jobContent.allowSmallerQty == "TRUE" || this.jobContent.allowBiggerQty == "TRUE") {
str = str + '/n是否提交?'
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) {
this.submitJob()
}
});
}else{
//
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
if (res) {
this.openScanPopup();
}
});
return;
}
}
if (str2) {
str2 = str2 + '\n是否确认提交'
this.$refs.comMessage.showQuestionMessage1(str2, 'red', res => {
if (res) {
this.submitJob()
}
});
return;
}
}else{
if (str1) {
this.$refs.comMessage.showConfirmWarningModal(str1)
return
@ -597,23 +626,13 @@
str = '任务明细未全部完成,是否提交?\n' + str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) {
// 2025-04-16号修改物料隔离去掉明细弹窗 // // 物料隔离 // if(this.businessTypeCode == "OkToHold"){ // this.$refs.deptPopup.deptShow = true // this.$refs.deptPopup.chooseDutyItem={} // this.$refs.deptPopup.chooseDeptItem={} // this.$refs.deptPopup.chooseDetailItem={} // }else{ // this.submitJob() // }
this.submitJob()
}
});
} else {
// 2025-04-16
// //
// if(this.businessTypeCode == "OkToHold"){
// this.$refs.deptPopup.deptShow = true
// this.$refs.deptPopup.chooseDutyItem={}
// this.$refs.deptPopup.chooseDeptItem={}
// this.$refs.deptPopup.chooseDetailItem={}
// }else{
// this.submitJob()
// }
this.submitJob()
}
}
},
submitJob() {
uni.showLoading({
@ -626,21 +645,21 @@
...this.deptObj
}
console.log("提交",params)
inventoryMoveSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
let showTitle = this.title
if (this.title.indexOf('任务') == this.title.length - 2) {
showTitle = this.title.replace('任务', '')
}
this.showCommitSuccessMessage("提交成功\n生成" + showTitle + "记录\n" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
// inventoryMoveSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
// let showTitle = this.title
// if (this.title.indexOf('') == this.title.length - 2) {
// showTitle = this.title.replace('', '')
// }
// this.showCommitSuccessMessage("\n" + showTitle + "\n" + res.data)
// } else {
// this.showErrorMessage("[" + res.msg + "]")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
},
setPrecisionStrategParams() {

Loading…
Cancel
Save