فهرست منبع

编号bug修复

laiguoran 3 سال پیش
والد
کامیت
29c5eb60b6
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      app/controller/change_controller.js

+ 5 - 1
app/controller/change_controller.js

@@ -202,7 +202,11 @@ module.exports = app => {
                     const c_code_rules = tenderData.c_code_rules !== null ? JSON.parse(tenderData.c_code_rules) : null;
                     cCodeRule = c_code_rules && c_code_rules[data.type + '_rule'] ? c_code_rules[data.type + '_rule'] : [];
                     cConnector = c_code_rules && c_code_rules[data.type + '_connector'] ? c_code_rules[data.type + '_connector'] : null;
-                    changeCount = await ctx.service.changeProject.count({ tid: tenderId, type: codeRuleConst.ruleType[data.type] });
+                    if (data.type === codeRuleConst.ruleField[codeRuleConst.ruleType.apply]) {
+                        changeCount = await ctx.service.changeApply.count({ tid: tenderId });
+                    } else {
+                        changeCount = await ctx.service.changeProject.count({ tid: tenderId, type: codeRuleConst.ruleType[data.type] });
+                    }
                 } else {
                     cCodeRule = tenderData.c_rule !== null ? JSON.parse(tenderData.c_rule) : [];
                     cConnector = tenderData.c_connector;