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. 127
      src/pages/inventoryMove/job/inventoryMoveDetail.vue

7
src/mycomponents/qty/balanceQtyEdit.vue

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

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

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

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

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

Loading…
Cancel
Save