2 Komitmen 4167979f7a ... 1fafd4b367

Pembuat SHA1 Pesan Tanggal
  Tony Kang 1fafd4b367 Merge branch 'dev' of http://192.168.1.41:3000/maixinrong/Calculation into dev 2 bulan lalu
  Tony Kang 4d63b77332 fix: 合同支付签字问题 2 bulan lalu
2 mengubah file dengan 26 tambahan dan 13 penghapusan
  1. 24 11
      app/controller/report_controller.js
  2. 2 2
      app/public/report/js/rpt_main.js

+ 24 - 11
app/controller/report_controller.js

@@ -912,11 +912,11 @@ module.exports = app => {
                 // const bglObj = { status: stage_status };
                 bglObj.BUSINESS_ID = ctx.phasePay.id;
                 const stage = null;
-                const stage_order = -1;
-                const sorder = -1;
-                const stage_times = -1;
-                // const stage_status = -1;
-                const stage_status = 3; // 目前强制为通过,等后续审核逻辑完善后再改
+                const stage_order = ctx.phasePay.phase_order;
+                const sorder = ctx.phasePay.phase_order;
+                const stage_times = ctx.phasePay.audit_times;
+                const stage_status = ctx.phasePay.audit_status;
+                bglObj.status = stage_status;
                 const project_id = ctx.tender.data.project_id;
                 const { treeNodes, custCfg, commonArrs, allTreeItems, allIndivTreeItems } = await this._createNodes(ctx, sourceTypeConst.sourceType.phase_pay, project_id);
                 const cust_select_keys = JSON.stringify(['common', 'customize']); // 因其他地方也有可能保存用户报表的显示选择项,因当初设计问题,不好改数据库结构了,但可以调节内部json来满足需求
@@ -997,10 +997,10 @@ module.exports = app => {
                     jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.report.main),
                     customSelects,
                     rptCustomType: reportConst.rptCustomType,
-                    advanceList: JSON.stringify([]),
-                    advanceAuditList: JSON.stringify([]),
-                    materialAdjList: JSON.stringify([]),
-                    materialAdjAuditList: JSON.stringify([]),
+                    advanceList: '[]',
+                    advanceAuditList: '[]',
+                    materialAdjList: '[]',
+                    materialAdjAuditList: '[]',
                     materialList: [],
                     stages: [],
                     dataSelects,
@@ -1591,6 +1591,19 @@ module.exports = app => {
                     // });
                     // 暂未实现(2026-03-23)
                     break;
+                case -700: // 计量管理
+                    const phaseAudit = await ctx.service.phasePayAudit.getAuditors(params.business_id, params.stage_times);
+                    phaseAudit.forEach(audit => {
+                        stgAudit.push({ aid: audit.audit_id, status: audit.audit_status, opinion: audit.opinion, end_time: audit.audit_time, order: audit.audit_order });
+                    });
+
+                    // const options = { spid: params.sp_id };
+                    // const contractAudit = await ctx.service.contractAudit.getList(options);
+                    // contractAudit.forEach(audit => {
+                    //     stgAudit.push({ aid: audit.uid, status: audit.audit_status, opinion: audit.opinion, end_time: audit.audit_time, order: audit.audit_order });
+                    // });
+                    // 暂未实现(2026-03-23)
+                    break;
                 default:
                     break;
             }
@@ -1689,7 +1702,7 @@ module.exports = app => {
                     const payment = paymentDetailList[0];
                     stageList.push({ id: params.stage_id, user_id: payment.uid, status: payment.status });
                 }
-            } else if ([-150, -300, -301, -302, -303, -400, -500, -600].includes(params.stage_id)) {
+            } else if ([-150, -300, -301, -302, -303, -400, -500, -600, -700].includes(params.stage_id)) {
                 // 变更令、预付款、材差相关的
                 stgAudit = [];
                 stgAuditForOrg = [];
@@ -1823,7 +1836,7 @@ module.exports = app => {
                     const payment = paymentDetailList[0];
                     stageList.push({ id: params.stage_id, user_id: payment.uid, status: payment.status });
                 }
-            } else if ([-150, -300, -301, -302, -303, -400, -500, -600].includes(params.stage_id)) {
+            } else if ([-150, -300, -301, -302, -303, -400, -500, -600, -700].includes(params.stage_id)) {
                 stgAudit = [];
                 stageFlow = [];
                 await this._commonGetAudit(ctx, params, stgAudit, stageFlow);

+ 2 - 2
app/public/report/js/rpt_main.js

@@ -1580,9 +1580,9 @@ function getStageStatus() {
             return ppStatus
         } else return current_stage_status;
     } else {
-        if ([-100, -200, -600].includes(current_stage_id)) {
+        if ([-100, -200, -600, -700].includes(current_stage_id)) {
             return 3
-        } else if ([-150, -300, -301, -302, -303].includes(current_stage_id)) {
+        } else if ([-150, -300, -301, -302, -303, -700].includes(current_stage_id)) {
             // return 3; // 临时的
             return BGL_OBJ?.status || -1;
         }