|
@@ -18,9 +18,8 @@ const auditConst = require('../const/audit');
|
|
|
*
|
|
|
* define: {
|
|
|
* "title": "请选择汇总的标段", "type": "month/final/checked-final/stage",
|
|
|
- * "defaultCompare": [1, 2, 3], // 结果按序 t_n_qty, t_n_tp
|
|
|
+ * "defaultCompare": [1, 2, 3], // 结果按序 rn_qty, rn_tp
|
|
|
* "match": { "quality": [2, 3], "qty": "<0" }, // class根据变更类型过滤,qty根据数量过滤
|
|
|
- * "selectCompare": [{ "key": "jl", "title": "驻地监理" }, ...] // 结果按key t_key_qty, t_key_tp
|
|
|
* "merge": true,
|
|
|
* }
|
|
|
* defaultCompare为默认选择的审批人,0为原报,1-N为1-N审
|
|
@@ -222,7 +221,7 @@ class jhHelper {
|
|
|
let load = false;
|
|
|
if (bills.pre_cd && bills.pre_cd.length > 0) load = true;
|
|
|
for (const dc of gsDefine.defaultCompare) {
|
|
|
- if (bills['t_' + dc + '_cd'] && bills['t_' + dc + '_cd'].length > 0) load = true;
|
|
|
+ if (bills['r' + dc + '_cd'] && bills['r' + dc + '_cd'].length > 0) load = true;
|
|
|
}
|
|
|
if (!load) continue;
|
|
|
gsDefine.merge ? this._loadMergeResult(bills, this.prefixes) : this._loadResult(bills, this.prefixes);
|
|
@@ -243,7 +242,7 @@ class jhHelper {
|
|
|
for (const dc of gsDefine.defaultCompare) {
|
|
|
const auditor = auditors[dc];
|
|
|
const auditorStage = await this.ctx.service.stagePos.getAuditorStageData2(tender.id, stage.id, auditor.times, auditor.order);
|
|
|
- loadData.push({ data: auditorStage, fields: ['qc_qty', 'qc_tp'], prefix: `t_${dc}_`, relaId: 'pid' });
|
|
|
+ loadData.push({ data: auditorStage, fields: ['qc_qty', 'qc_tp'], prefix: `r${dc}_`, relaId: 'pid' });
|
|
|
}
|
|
|
helper.assignRelaData(billsData, loadData);
|
|
|
// 计算截止本期
|
|
@@ -266,7 +265,7 @@ class jhHelper {
|
|
|
for (const dc of gsDefine.defaultCompare) {
|
|
|
const auditor = auditors[dc];
|
|
|
const auditorStage = await this.ctx.service.stagePos.getAuditorStageData2(tender.id, stage.id, auditor.times, auditor.order);
|
|
|
- loadData.push({ data: auditorStage, fields: ['qc_qty'], prefix: `t_${dc}_`, relaId: 'pid' });
|
|
|
+ loadData.push({ data: auditorStage, fields: ['qc_qty'], prefix: `r${dc}_`, relaId: 'pid' });
|
|
|
}
|
|
|
helper.assignRelaData(posData, loadData);
|
|
|
posData.forEach(x => {
|
|
@@ -300,8 +299,8 @@ class jhHelper {
|
|
|
const stageChangeDetail = await this.getCurChangeDetailData(tender.id, stage.id);
|
|
|
for (const dc of gsDefine.defaultCompare) {
|
|
|
const scd = helper.filterTimesOrderData(stageChangeDetail, ['lid', 'pid', 'cid', 'cbid'], auditors[dc].times, auditors[dc].order);
|
|
|
- this._loadChangeDetail(billsIndex, scd, gsDefine, `t_${dc}_`);
|
|
|
- this.prefixes.push(`t_${dc}_`);
|
|
|
+ this._loadChangeDetail(billsIndex, scd, gsDefine, `r${dc}_`);
|
|
|
+ this.prefixes.push(`r${dc}_`);
|
|
|
}
|
|
|
const finalChangeData = await this.getPreChangeDetailData(tender.id, stage.order);
|
|
|
this._loadChangeDetail(billsIndex, finalChangeData, gsDefine, 'pre_');
|