MaiXinRong преди 3 седмици
родител
ревизия
ca8718efb1
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      app/controller/measure_controller.js

+ 1 - 1
app/controller/measure_controller.js

@@ -110,7 +110,7 @@ module.exports = app => {
                 }
                 const stages = await ctx.service.stage.getAllDataByCondition({ where: { tid: ctx.tender.id }});
                 const unCompleteStageCount = stages.filter(s => { return s.status !== auditConst.status.checked; }).length;
-                if (unCompleteStageCount.length > 0) {
+                if (unCompleteStageCount > 0) {
                     if (ctx.subProject.page_show.openMultiStageCalc) {
                         if (ctx.tender.info.calc_type === 'tp') throw `【总价合同】不允许新增下一期,请联系管理员`;
                         if (ctx.subProject.page_show.correctCalcContractTp) throw `【反算本期合同计量】不允许新增下一期,请联系管理员`;