فهرست منبع

fix(quality-inspection): 修复报告阶段流程标签显示不正确的问题

- 当 flow_stage 为 report 阶段时直接显示"审批中"
- 避免使用 stageString 拼接导致标签文案不准确
- 提取 stageLabel 变量提高代码可读性
caipin 2 هفته پیش
والد
کامیت
15d7290197
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      app/service/quality_inspection.js

+ 2 - 1
app/service/quality_inspection.js

@@ -275,7 +275,8 @@ module.exports = app => {
 
         setFlowLabel(inspection) {
             const status = inspection.status === undefined ? inspection.mstatus : inspection.status;
-            inspection.flowLabel = inspection.flow_version === 1 && [2, 6, 12].includes(status) ? auditConst.stageString[inspection.flow_stage] + '中' : auditConst.statusString[status];
+            const stageLabel = inspection.flow_stage === auditConst.stage.report ? '审批中' : auditConst.stageString[inspection.flow_stage] + '中';
+            inspection.flowLabel = inspection.flow_version === 1 && [2, 6, 12].includes(status) ? stageLabel : auditConst.statusString[status];
             inspection.actionLabel = status === 1 || status === 5 ? '上报' : status === 12 ? '整改' : inspection.flow_version === 1 && inspection.flow_stage === 3 ? '批复' : '审批';
         }