浏览代码

1. 审核比较,取值调整
2. 导入分包计量数据,期列表、标段概况、标段列表等金额重算

MaiXinRong 3 年之前
父节点
当前提交
acf69ec01f
共有 3 个文件被更改,包括 5 次插入4 次删除
  1. 2 1
      app/controller/stage_controller.js
  2. 3 2
      app/controller/tender_controller.js
  3. 0 1
      app/service/stage.js

+ 2 - 1
app/controller/stage_controller.js

@@ -1372,7 +1372,8 @@ module.exports = app => {
                 for (const order of data.roles) {
                     const data = { order, bills: [], pos: [] };
                     const compareTimes = ctx.stage.status === auditConst.status.checkNo && !ctx.stage.readOnly
-                        ? ctx.stage.curTimes - 1 : ctx.stage.curTimes;
+                        ? ( order === 0 ? ctx.stage.curTimes : ctx.stage.curTimes - 1)
+                        : ctx.stage.curTimes;
                     data.bills = await ctx.service.stageBills.getAuditorStageData2(ctx.tender.id, ctx.stage.id, compareTimes, order);
                     data.pos = await ctx.service.stagePos.getAuditorStageData2(ctx.tender.id, ctx.stage.id, compareTimes, order);
                     result.roles.push(data);

+ 3 - 2
app/controller/tender_controller.js

@@ -1307,14 +1307,15 @@ module.exports = app => {
                     case 'stage':
                         const stageData = await this.ctx.service.stageBills.sumLoad(data.lid, data.tenders, data.cover);
                         stageData.import_change = { target: { import_lid: data.lid } };
-                        stageData.import_change.data = await this.ctx.service.stageImportChange.getLeafXmjStageImportData(this.ctx.stage, data.lid);
+                        stageData.import_change.data = await this.ctx.service.stageImportChange.getLeafXmjStageImportData(ctx.stage, data.lid);
+                        await ctx.service.stage.updateCheckCalcFlag(ctx.stage, true);
+                        await ctx.service.stage.updateCacheTime(ctx.stage.id);
                         ctx.body = {err: 0, msg: '', data: stageData};
                         break;
                     default:
                         throw '数据错误';
                 }
             } catch (err) {
-                console.log(err);
                 this.log(err);
                 ctx.ajaxErrorBody(err, '导入数据失败');
             }

+ 0 - 1
app/service/stage.js

@@ -444,7 +444,6 @@ module.exports = app => {
             const result = {};
             const bg = await this.ctx.service.stageChange.getSubtotal(stage);
             const importBg = await this.ctx.service.stageImportChange.getSubtotal(stage);
-            console.log(bg, importBg);
             result.common = this.ctx.helper.add(bg.common, importBg.common);
             result.great = this.ctx.helper.add(bg.great, importBg.great);
             result.more = this.ctx.helper.add(bg.more, importBg.more);