Browse Source

2026-06-24

待报价清单【报价】优化,做了防御性保护,遇到循环引用的结构会给出明确提示;
master
fengyuan_yang 1 month ago
parent
commit
5d774879de
  1. 33
      src/views/modules/quotation/toBeQuoted.vue

33
src/views/modules/quotation/toBeQuoted.vue

@ -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'

Loading…
Cancel
Save