Эх сурвалжийг харах

fix(demandList): 合并提交按钮显示逻辑,优化售后类型为3时的状态判断条件

yusheng 7 сар өмнө
parent
commit
ccc55d4d86

+ 15 - 10
src/views/salesServiceManagement/demandList/index.vue

@@ -61,9 +61,7 @@
             type="primary"
             :underline="false"
             @click="handleCommand('handleAudit', row)"
-            v-if="
-              subBtnShow(row) && $hasPermission('eom:aftersalesdemand:submit')
-            "
+            v-if="btnShow(row) && $hasPermission('eom:aftersalesdemand:submit')"
             >提交</el-link
           >
           <el-popconfirm
@@ -233,7 +231,7 @@
             showOverflowTooltip: true,
             formatter: (_row, _column, cellValue) => {
               if (_row.afterSalesType == 3) {
-                return reviewStatus[_row.approvalResult];
+                return cellValue == 2?'已关闭':reviewStatus[_row.approvalResult];
               } else {
                 return cellValue == 0
                   ? '待提交'
@@ -321,19 +319,26 @@
     },
     computed: {
       btnShow() {
-        return (row) => {
-          return row.demandStatus == 0;
-        };
-      },
-      subBtnShow() {
         return (row) => {
           if (row.afterSalesType == 3) {
-            return row.approvalResult == 0||row.approvalResult == 3
+            return (
+              (row.approvalResult == 0 || row.approvalResult == 3) &&
+              row.demandStatus != 2
+            );
           } else {
             return row.demandStatus == 0;
           }
         };
       },
+      // subBtnShow() {
+      //   return (row) => {
+      //     if (row.afterSalesType == 3) {
+      //       return row.approvalResult == 0||row.approvalResult == 3
+      //     } else {
+      //       return row.demandStatus == 0;
+      //     }
+      //   };
+      // },
       dispatchShow() {
         return (row) => {
           return !row.planStatus && row.afterSalesType !== 3;