fix(bid): 修复物料报价对比和租户ID设置问题
1. 为新增物料添加租户ID自动设置逻辑,优先取部门ID,默认值为1 2. 调整报价对比页面初始化加载逻辑,移除空判断限制并优化空数组处理 3. 为供应商报价明细查询添加空值过滤,提升数据准确性
This commit is contained in:
@@ -208,13 +208,11 @@ export default {
|
||||
async initLoad() {
|
||||
this.loadError = null;
|
||||
await this.loadSameNameMaterials();
|
||||
if (this.sameNameMaterials.length) {
|
||||
const allIds = this.sameNameMaterials.map(m => m.materialId);
|
||||
this._loadingLock = true;
|
||||
await this.loadQuoteComparison(allIds);
|
||||
this.targetIds = allIds;
|
||||
this._loadingLock = false;
|
||||
}
|
||||
const allIds = this.sameNameMaterials.map(m => m.materialId);
|
||||
this._loadingLock = true;
|
||||
await this.loadQuoteComparison(allIds);
|
||||
this.targetIds = allIds;
|
||||
this._loadingLock = false;
|
||||
},
|
||||
|
||||
async loadSameNameMaterials() {
|
||||
@@ -241,11 +239,10 @@ export default {
|
||||
},
|
||||
|
||||
async loadQuoteComparison(materialIds) {
|
||||
if (!materialIds || !materialIds.length) return;
|
||||
this.loadingQuote = true;
|
||||
this.loadError = null;
|
||||
try {
|
||||
const ids = [Number(this.materialId), ...materialIds];
|
||||
const ids = [Number(this.materialId), ...(materialIds || [])];
|
||||
const res = await getQuoteComparison(ids);
|
||||
const data = res.data || [];
|
||||
const map = {};
|
||||
|
||||
Reference in New Issue
Block a user