|
|
@ -53,6 +53,10 @@ |
|
|
|
createDetailInfo, |
|
|
|
calcHandleQty |
|
|
|
} from '@/common/record.js'; |
|
|
|
|
|
|
|
import { |
|
|
|
getManagementPrecisions |
|
|
|
} from '@/common/balance.js'; |
|
|
|
|
|
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
|
|
@ -221,6 +225,8 @@ |
|
|
|
var params = this.setParams(); |
|
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
|
if (this.fromType == "requestType") { |
|
|
|
var params = this.setParams(false) |
|
|
|
console.log("提交" + JSON.stringify(params)) |
|
|
|
// purchaseReturnRequestSubmit(params).then(res => { |
|
|
|
// uni.hideLoading() |
|
|
|
// if (res.data) { |
|
|
@ -233,11 +239,40 @@ |
|
|
|
// this.showErrorMessage(error) |
|
|
|
// }) |
|
|
|
} else { |
|
|
|
|
|
|
|
var itemCodes = [] |
|
|
|
this.detailSource.forEach(item => { |
|
|
|
itemCodes.push(item.itemCode) |
|
|
|
}) |
|
|
|
|
|
|
|
//获取管理模式,封装参数 |
|
|
|
getManagementPrecisions(itemCodes, this.toLocationCode, res => { |
|
|
|
if (res.success) { |
|
|
|
this.managementList = res.list; |
|
|
|
var params = this.setParams(true) |
|
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
|
|
|
|
|
// putawayRecordSubmit(params).then(res => { |
|
|
|
// uni.hideLoading() |
|
|
|
// if (res.data) { |
|
|
|
// this.showCommitSuccessMessage("提交成功<br>生成采购收货记录" + res.data ) |
|
|
|
// } else { |
|
|
|
// this.showErrorMessage("提交失败"+res.msg) |
|
|
|
// } |
|
|
|
// }).catch(error => { |
|
|
|
// uni.hideLoading() |
|
|
|
// this.showErrorMessage(error) |
|
|
|
// }) |
|
|
|
} else { |
|
|
|
uni.hideLoading(); |
|
|
|
this.showErrorMessage(res.message); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
// purchaseReturnRecordSubmit(params).then(res => { |
|
|
|
// uni.hideLoading() |
|
|
|
// if (res.data) { |
|
|
|
// this.showCommitSuccessMessage("提交成功<br>生成采购收货记录" + res.data, ) |
|
|
|
// this.showCommitSuccessMessage("提交成功<br>生成采购收货记录" + res.data ) |
|
|
|
// } else { |
|
|
|
// this.showErrorMessage("提交失败"+res.msg) |
|
|
|
// } |
|
|
@ -253,23 +288,35 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
setParams() { |
|
|
|
setParams(queryModel) { |
|
|
|
var subList = [] |
|
|
|
var creator = this.$store.state.user.id |
|
|
|
this.detailSource.forEach(item => { |
|
|
|
item.subList.forEach(detail => { |
|
|
|
if (detail.scaned) { |
|
|
|
var subItem = {}; |
|
|
|
Object.assign(subItem, detail) |
|
|
|
subItem.package ="" |
|
|
|
subList.push(subItem) |
|
|
|
if (queryModel) { |
|
|
|
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, |
|
|
|
detail.packingNumber, detail.batch); |
|
|
|
detail.toPackingNumber = info.packingNumber;; |
|
|
|
detail.toContainerNumber = detail.containerNumber |
|
|
|
detail.toBatch = info.batch; |
|
|
|
detail.toInventoryStatus = detail.inventoryStatus |
|
|
|
detail.toLocationCode = this.toLocationCode |
|
|
|
} else { |
|
|
|
detail.toPackingNumber = detail.packingNumber; |
|
|
|
detail.toContainerNumber = detail.containerNumber |
|
|
|
detail.toBatch = detail.toBatch; |
|
|
|
detail.toInventoryStatus = detail.inventoryStatus |
|
|
|
detail.toLocationCode = "" |
|
|
|
} |
|
|
|
|
|
|
|
subList.push(detail) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.submitMainContent.subList = subList |
|
|
|
this.submitMainContent.creator = creator; |
|
|
|
|
|
|
|
return this.submitMainContent; |
|
|
|
this.jobContent.subList = subList |
|
|
|
this.jobContent.creator = creator; |
|
|
|
return this.jobContent; |
|
|
|
}, |
|
|
|
|
|
|
|
showMessage(message) { |
|
|
|