|
|
@ -628,7 +628,8 @@ export default { |
|
|
// 批量新增报价信息 |
|
|
// 批量新增报价信息 |
|
|
saveBatchQuotationHeader(list){ |
|
|
saveBatchQuotationHeader(list){ |
|
|
this.saveBatchQuotationLoading = true; |
|
|
this.saveBatchQuotationLoading = true; |
|
|
batchSaveQuote(list).then(({data})=>{ |
|
|
|
|
|
|
|
|
const payload = this.buildBatchQuotePayload(list) |
|
|
|
|
|
batchSaveQuote(payload).then(({data})=>{ |
|
|
this.saveBatchQuotationLoading = false; |
|
|
this.saveBatchQuotationLoading = false; |
|
|
if (data && data.code === 0){ |
|
|
if (data && data.code === 0){ |
|
|
this.$message.success(data.msg); |
|
|
this.$message.success(data.msg); |
|
|
@ -651,15 +652,31 @@ export default { |
|
|
this.$message.warning("请选择需报价的单号") |
|
|
this.$message.warning("请选择需报价的单号") |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
this.quotationSelections = this.quotationSelections.map(item=>{ |
|
|
|
|
|
item.qty = undefined |
|
|
|
|
|
item.currency = undefined |
|
|
|
|
|
item.createBy = this.$store.state.user.name |
|
|
|
|
|
item.site = this.$store.state.user.site |
|
|
|
|
|
return item; |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
this.quotationSelections = this.quotationSelections.map(item=>({ |
|
|
|
|
|
...item, |
|
|
|
|
|
qty: undefined, |
|
|
|
|
|
currency: undefined, |
|
|
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
})) |
|
|
this.quoteVisible = true; |
|
|
this.quoteVisible = true; |
|
|
}, |
|
|
}, |
|
|
|
|
|
buildBatchQuotePayload(list){ |
|
|
|
|
|
return list.map(item=>({ |
|
|
|
|
|
site: item.site || this.$store.state.user.site, |
|
|
|
|
|
quotationNo: item.quotationNo, |
|
|
|
|
|
customerNo: item.customerNo, |
|
|
|
|
|
projectId: item.projectId, |
|
|
|
|
|
tracker: item.tracker, |
|
|
|
|
|
quoter: item.quoter, |
|
|
|
|
|
testPartNo: item.testPartNo, |
|
|
|
|
|
finalPartNo: item.finalPartNo, |
|
|
|
|
|
partName: item.partName, |
|
|
|
|
|
createBy: item.createBy || this.$store.state.user.name, |
|
|
|
|
|
qty: item.qty, |
|
|
|
|
|
currency: item.currency, |
|
|
|
|
|
})) |
|
|
|
|
|
}, |
|
|
searchByAnyField(params){ |
|
|
searchByAnyField(params){ |
|
|
params.site = this.$store.state.user.site |
|
|
params.site = this.$store.state.user.site |
|
|
params.menuId = '102004' |
|
|
params.menuId = '102004' |
|
|
|