Browse Source

终极修复版本

laiguoran 2 years ago
parent
commit
70f8b2f461
1 changed files with 8 additions and 8 deletions
  1. 8 8
      app/controller/change_controller.js

+ 8 - 8
app/controller/change_controller.js

@@ -781,15 +781,15 @@ module.exports = app => {
                 if (changeUsedData.length > 0) { // 防止未创建期时调用
                     // const stage = await this.ctx.service.stage.getLastestStage(ctx.tender.id, true);
                     for (const cu of changeUsedData) {
-                        if (cu.sorder !== 0) {
-                            // (cu.sorder === 0 && !(stage.status === audit.stage.status.uncheck || stage.status === audit.stage.status.checkNo))) {
-                            const index = ctx.helper._.findIndex(useChangeUsedData, { cbid: cu.cbid });
-                            if (index !== -1) {
-                                useChangeUsedData[index].qty = ctx.helper.add(useChangeUsedData[index].qty, cu.qty);
-                            } else {
-                                useChangeUsedData.push(cu);
-                            }
+                        // if (cu.sorder !== 0 ||
+                        //     (cu.sorder === 0 && !(stage.status === audit.stage.status.uncheck || stage.status === audit.stage.status.checkNo))) {
+                        const index = ctx.helper._.findIndex(useChangeUsedData, { cbid: cu.cbid });
+                        if (index !== -1) {
+                            useChangeUsedData[index].qty = ctx.helper.add(useChangeUsedData[index].qty, cu.qty);
+                        } else {
+                            useChangeUsedData.push(cu);
                         }
+                        // }
                     }
                 }
                 renderData.changeUsedData = useChangeUsedData;