Selaa lähdekoodia

增加替客户申请按钮

ylong 8 kuukautta sitten
vanhempi
sitoutus
2d4147ae6f
1 muutettua tiedostoa jossa 36 lisäystä ja 13 poistoa
  1. 36 13
      src/views/finance/subsidyReview/index.vue

+ 36 - 13
src/views/finance/subsidyReview/index.vue

@@ -43,11 +43,11 @@
                     <el-radio-button label="用户放弃" value="5" />
                 </el-radio-group>
 
-                <el-button 
-                    type="primary" 
+                <el-button
+                    type="primary"
                     @click="handleBatchAudit"
                     v-permission="'finance:subsidyReview:audit'"
-                    style="margin-left: 20px;"
+                    style="margin-left: 20px"
                 >
                     批量审核
                 </el-button>
@@ -93,22 +93,32 @@
                     >
                         [操作日志]
                     </el-button>
+                    <!-- 替客户申请 showSubmit -->
+                    <el-button
+                        type="danger"
+                        link
+                        v-if="row.showSubmit == 1"
+                        v-permission="'finance:subsidyReview:showSubmit'"
+                        @click="handleShowSubmit(row)"
+                    >
+                        [替客户申请]
+                    </el-button>
                 </div>
             </template>
         </common-table>
 
         <orderDetail ref="orderDetailRef" />
-        
+
         <!-- 操作日志弹窗 -->
         <log-dialog ref="logDialogRef" />
-        
+
         <!-- 批量审核弹窗 -->
         <batch-audit ref="batchAuditRef" @success="handleBatchAuditSuccess" />
     </ele-page>
 </template>
 
 <script setup>
-    import { ref, reactive, onMounted } from 'vue';
+    import { ref, reactive, onMounted, getCurrentInstance } from 'vue';
     import CommonTable from '@/components/CommonPage/CommonTable.vue';
     import pageSearch from './page-search.vue';
     import request from '@/utils/request';
@@ -118,6 +128,7 @@
     import { ElMessage } from 'element-plus';
     defineOptions({ name: 'subsidyReview' });
 
+    const { proxy } = getCurrentInstance();
     // 添加统计数据的响应式对象
     const statistics = reactive({
         sumMoney: 0,
@@ -216,7 +227,7 @@
 
     // 日志弹窗引用
     const logDialogRef = ref(null);
-    
+
     // 操作日志
     const handleLog = (row) => {
         logDialogRef.value?.open(row);
@@ -230,19 +241,21 @@
             ElMessage.warning('请先选择要审核的记录');
             return;
         }
-        
+
         // 只能审核待审核状态的记录
-        const pendingRows = selectedRows.filter(row => row.status == 1);
+        const pendingRows = selectedRows.filter((row) => row.status == 1);
         if (pendingRows.length === 0) {
             ElMessage.warning('请选择待审核状态的记录');
             return;
         }
-        
+
         if (pendingRows.length !== selectedRows.length) {
-            ElMessage.warning('只能审核待审核状态的记录,已自动过滤其他状态的记录');
+            ElMessage.warning(
+                '只能审核待审核状态的记录,已自动过滤其他状态的记录'
+            );
         }
-        
-        const ids = pendingRows.map(row => row.id);
+
+        const ids = pendingRows.map((row) => row.id);
         batchAuditRef.value?.open(ids);
     };
 
@@ -253,4 +266,14 @@
         // 清空选中状态
         pageRef.value?.tableRef?.clearSelection();
     };
+
+    const handleShowSubmit = (row) => {
+        pageRef.value.messageBoxConfirm({
+            message: '确定替客户申请吗?',
+            fetch: () =>
+                proxy.$http.post(
+                    `/order/orderCompensationLog/adminSubmitAudit/${row.id}`
+                )
+        });
+    };
 </script>