laiguoran 3 лет назад
Родитель
Сommit
f1b2b75a94

+ 4 - 6
app/controller/change_controller.js

@@ -2620,8 +2620,8 @@ module.exports = app => {
                     auditConst: audit.changeApply,
                     fileList,
                     whiteList,
-                    tpUnit: ctx.tender.info.decimal.tp,
-                    upUnit: ctx.tender.info.decimal.up,
+                    tpUnit: ctx.change.applyDecimal ? ctx.change.applyDecimal.tp : ctx.tender.info.decimal.tp,
+                    upUnit: ctx.change.applyDecimal ? ctx.change.applyDecimal.up : ctx.tender.info.decimal.up,
                     changeUnits: changeConst.units,
                     precision: ctx.tender.info.precision,
                     returnUrl: this.app._.includes(ctx.request.headers.referer, '/tender/' + ctx.tender.id + '/change/apply') && !this.app._.includes(ctx.request.headers.referer, '/tender/' + ctx.tender.id + '/change/apply/' + ctx.change.id + '/information') ? ctx.request.headers.referer : null,
@@ -3238,10 +3238,8 @@ module.exports = app => {
                     auditConst: audit.changeApply,
                     fileList,
                     whiteList,
-                    // tpUnit: change.tp_decimal ? change.tp_decimal : ctx.tender.info.decimal.tp,
-                    // upUnit: change.up_decimal ? change.up_decimal : ctx.tender.info.decimal.up,
-                    tpUnit: ctx.tender.info.decimal.tp,
-                    upUnit: ctx.tender.info.decimal.up,
+                    tpUnit: ctx.change.planDecimal ? ctx.change.planDecimal.tp : ctx.tender.info.decimal.tp,
+                    upUnit: ctx.change.planDecimal ? ctx.change.planDecimal.up : ctx.tender.info.decimal.up,
                     changeUnits: changeConst.units,
                     precision: ctx.tender.info.precision,
                     returnUrl: this.app._.includes(ctx.request.headers.referer, '/tender/' + ctx.tender.id + '/change/plan') && !this.app._.includes(ctx.request.headers.referer, '/tender/' + ctx.tender.id + '/change/plan/' + ctx.change.id + '/information') ? ctx.request.headers.referer : null,

+ 2 - 0
app/middleware/change_apply_check.js

@@ -34,6 +34,8 @@ module.exports = options => {
             // 读取原报、审核人数据
             change.auditors = yield this.service.changeApplyAudit.getAuditors(change.id, change.times);
             change.curAuditor = yield this.service.changeApplyAudit.getCurAuditor(change.id, change.times);
+            // decimal小数位设置
+            change.applyDecimal = change.decimal ? JSON.parse(change.decimal) : { tp: this.tender.info.decimal.tp, up: this.tender.info.decimal.up };
 
             if (!change) throw '变更令数据有误';
             // 权限相关

+ 2 - 0
app/middleware/change_plan_check.js

@@ -34,6 +34,8 @@ module.exports = options => {
             // 读取原报、审核人数据
             change.auditors = yield this.service.changePlanAudit.getAuditors(change.id, change.times);
             change.curAuditor = yield this.service.changePlanAudit.getCurAuditor(change.id, change.times);
+            // decimal小数位设置
+            change.planDecimal = change.decimal ? JSON.parse(change.decimal) : { tp: this.tender.info.decimal.tp, up: this.tender.info.decimal.up };
 
             if (!change) throw '变更令数据有误';
             // 权限相关

+ 1 - 0
app/service/change_apply_audit.js

@@ -410,6 +410,7 @@ module.exports = app => {
                         id: caId, status: checkData.checkType,
                         notice_code: checkData.notice_code,
                         notice_uid: checkData.notice_uid,
+                        decimal: JSON.stringify(this.ctx.change.applyDecimal),
                     });
 
                     // 微信模板通知

+ 1 - 0
app/service/change_plan_audit.js

@@ -411,6 +411,7 @@ module.exports = app => {
                     // 同步 期信息
                     await transaction.update(this.ctx.service.changePlan.tableName, {
                         id: cpId, status: checkData.checkType,
+                        decimal: JSON.stringify(this.ctx.change.planDecimal),
                     });
 
                     // 微信模板通知