|
@ -54,6 +54,10 @@ |
|
|
calcHandleQty |
|
|
calcHandleQty |
|
|
} from '@/common/record.js'; |
|
|
} from '@/common/record.js'; |
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
|
|
|
getManagementPrecisions |
|
|
|
|
|
} from '@/common/balance.js'; |
|
|
|
|
|
|
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
|
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
|
|
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' |
|
|
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' |
|
@ -221,6 +225,8 @@ |
|
|
var params = this.setParams(); |
|
|
var params = this.setParams(); |
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
if (this.fromType == "requestType") { |
|
|
if (this.fromType == "requestType") { |
|
|
|
|
|
var params = this.setParams(false) |
|
|
|
|
|
console.log("提交" + JSON.stringify(params)) |
|
|
// purchaseReturnRequestSubmit(params).then(res => { |
|
|
// purchaseReturnRequestSubmit(params).then(res => { |
|
|
// uni.hideLoading() |
|
|
// uni.hideLoading() |
|
|
// if (res.data) { |
|
|
// if (res.data) { |
|
@ -234,10 +240,39 @@ |
|
|
// }) |
|
|
// }) |
|
|
} else { |
|
|
} 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 => { |
|
|
// purchaseReturnRecordSubmit(params).then(res => { |
|
|
// uni.hideLoading() |
|
|
// uni.hideLoading() |
|
|
// if (res.data) { |
|
|
// if (res.data) { |
|
|
// this.showCommitSuccessMessage("提交成功<br>生成采购收货记录" + res.data, ) |
|
|
// this.showCommitSuccessMessage("提交成功<br>生成采购收货记录" + res.data ) |
|
|
// } else { |
|
|
// } else { |
|
|
// this.showErrorMessage("提交失败"+res.msg) |
|
|
// this.showErrorMessage("提交失败"+res.msg) |
|
|
// } |
|
|
// } |
|
@ -253,23 +288,35 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setParams() { |
|
|
setParams(queryModel) { |
|
|
var subList = [] |
|
|
var subList = [] |
|
|
var creator = this.$store.state.user.id |
|
|
var creator = this.$store.state.user.id |
|
|
this.detailSource.forEach(item => { |
|
|
this.detailSource.forEach(item => { |
|
|
item.subList.forEach(detail => { |
|
|
item.subList.forEach(detail => { |
|
|
if (detail.scaned) { |
|
|
if (detail.scaned) { |
|
|
var subItem = {}; |
|
|
if (queryModel) { |
|
|
Object.assign(subItem, detail) |
|
|
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, |
|
|
subItem.package ="" |
|
|
detail.packingNumber, detail.batch); |
|
|
subList.push(subItem) |
|
|
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.jobContent.subList = subList |
|
|
this.submitMainContent.creator = creator; |
|
|
this.jobContent.creator = creator; |
|
|
|
|
|
return this.jobContent; |
|
|
return this.submitMainContent; |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showMessage(message) { |
|
|
showMessage(message) { |
|
|