Browse Source

增加参数的赋值

hella_online_20240829
niexiting 2 months ago
parent
commit
51f7882f62
  1. 59
      src/pages/fg/fgChange.vue

59
src/pages/fg/fgChange.vue

@ -70,7 +70,8 @@
<win-scan-button @goScan='openScanFgPopup'></win-scan-button> <win-scan-button @goScan='openScanFgPopup'></win-scan-button>
</view> </view>
<win-com-scan-balance ref="scanPopup" @getBalance='getPackScanResult' :bussinessCode="bussinessCode" :verifyCategory='true'> <win-com-scan-balance ref="scanPopup" @getBalance='getPackScanResult' :bussinessCode="bussinessCode"
:verifyCategory='true'>
</win-com-scan-balance> </win-com-scan-balance>
<win-scan-fg-label ref="scanFgPopup" @getResult='getFgScanResult' title='灯码'></win-scan-fg-label> <win-scan-fg-label ref="scanFgPopup" @getResult='getFgScanResult' title='灯码'></win-scan-fg-label>
@ -140,6 +141,7 @@
businessType: {}, businessType: {},
show: false, show: false,
toItemCode: "请选择变更后物料", toItemCode: "请选择变更后物料",
toItemInfo: {},
toItemList: [], toItemList: [],
fgList: [], fgList: [],
currentPackage: null, currentPackage: null,
@ -297,32 +299,68 @@
if (this.currentPackage.handleQty == null) { if (this.currentPackage.handleQty == null) {
this.$refs.comMessage.showQuestionMessage('是否要将全部灯码进行变更?', res => { this.$refs.comMessage.showQuestionMessage('是否要将全部灯码进行变更?', res => {
if (res) { if (res) {
this.commitRecord(); this.commitChange();
} }
}) })
} else { } else {
this.$refs.comMessage.showQuestionMessage('是否要将已扫描的【' + this.currentPackage.handleQty + '】个灯码进行变更?', this.$refs.comMessage.showQuestionMessage('是否要将已扫描的【' + this.currentPackage.handleQty + '】个灯码进行变更?',
res => { res => {
if (res) { if (res) {
this.commitRecord(); this.commitChange();
} }
}) })
} }
}, },
commitRecord() {
// this.showCommitSuccessMessage('') commitChange() {
// uni.showLoading({
// title:'...',
// mask:true
// })
let params = this.setParams();
console.log('params', JSON.stringify(params))
}, },
setParams() { setParams() {
let scanedList = this.fgList.filter(r => r.scaned == true) var creator = this.$store.state.user.id
if (this.currentPackage.handleQty > 0) { var subList = this.fgList.filter(r => r.scaned == true)
scanedList = this.fgList.filter(r => r.scaned == true) if (this.currentPackage.handleQty == undefined) {
subList = this.fgList;
} }
var creator = this.$store.state.user.id // var item = deepCopyData(this.currentPackage);
var item = {};
item.fromItemCode = this.currentPackage.itemCode;
item.fromItemName = this.currentPackage.itemName;
item.fromItemDesc1 = this.currentPackage.itemDesc1;
item.fromItemDesc2 = this.currentPackage.itemDesc2;
item.toItemCode = this.toItemCode;
item.toItemName = this.toItemInfo.itemName;
item.toItemDesc1 = this.toItemInfo.itemDesc1;
item.toItemDesc2 = this.toItemInfo.itemDesc2;
item.fromInventoryStatus = this.currentPackage.inventoryStatus;
item.fromQty = this.currentPackage.handleQty;
item.fromParentPackingNumber = this.currentPackage.parentNumber;
item.fromPackingNumber = this.currentPackage.packingNumber;
item.fromBatch = this.currentPackage.batch;
item.fromLocationCode = this.currentPackage.locationCode;
item.fromPackUnit = this.currentPackage.packUnit;
item.fromPackQty = this.currentPackage.packQty;
item.toPackQty = this.currentPackage.packUnit;
item.toPackUnit = this.currentPackage.packUnit;
item.subList = subList;
item.creator = creator;
return item;
}, },
showMessage(message) { showMessage(message) {
setTimeout(r => { setTimeout(r => {
this.scanPopupLoseFocus(); this.scanPopupLoseFocus();
@ -396,6 +434,7 @@
}, },
confirmSelect(e) { confirmSelect(e) {
this.toItemCode = e[0].value; this.toItemCode = e[0].value;
this.toItemInfo = e[0];
}, },
} }
} }

Loading…
Cancel
Save