Browse Source

回滚版本

laiguoran 2 năm trước cách đây
mục cha
commit
f0ce5d478d
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      app/controller/change_controller.js

+ 3 - 3
app/controller/change_controller.js

@@ -779,10 +779,10 @@ module.exports = app => {
                 }), ['sorder'], ['desc']);
                 const useChangeUsedData = [];
                 if (changeUsedData.length > 0) { // 防止未创建期时调用
-                    const stage = await this.ctx.service.stage.getLastestStage(ctx.tender.id, true);
+                    // 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))) {
+                        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);