From df5efb2ca2b0cf74d9160ffe2b6c215c4ddc9c99 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期四, 21 五月 2026 17:48:17 +0800
Subject: [PATCH] 差旅报销费用报销

---
 src/views/officeProcessAutomation/ApproveManage/approve-list/index.vue |  139 ++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 122 insertions(+), 17 deletions(-)

diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-list/index.vue b/src/views/officeProcessAutomation/ApproveManage/approve-list/index.vue
index b87a964..bbfa56a 100644
--- a/src/views/officeProcessAutomation/ApproveManage/approve-list/index.vue
+++ b/src/views/officeProcessAutomation/ApproveManage/approve-list/index.vue
@@ -3,30 +3,35 @@
   <div class="app-container">
     <div class="search_form mb20">
       <div class="search_fields">
-        <span class="search_title">瀹℃壒绫诲瀷锛�</span>
+        <span class="search_title">妯℃澘绫诲瀷锛�</span>
         <el-select
-          v-model="searchForm.approvalType"
-          placeholder="璇烽�夋嫨瀹℃壒绫诲瀷"
+          v-model="searchForm.businessType"
+          placeholder="璇烽�夋嫨妯℃澘绫诲瀷"
           clearable
           filterable
           style="width: 200px"
         >
           <el-option
-            v-for="opt in APPROVAL_TYPE_OPTIONS"
+            v-for="opt in searchBusinessTypeOptions"
+            :key="`search-biz-type-${opt.value}`"
+            :label="opt.label"
+            :value="opt.value"
+          />
+        </el-select>
+        <span class="search_title" style="margin-left: 12px">瀹℃壒鐘舵�侊細</span>
+        <el-select
+          v-model="searchForm.status"
+          placeholder="璇烽�夋嫨瀹℃壒鐘舵��"
+          clearable
+          style="width: 140px"
+        >
+          <el-option
+            v-for="opt in APPROVAL_STATUS_SEARCH_OPTIONS"
             :key="opt.value"
             :label="opt.label"
             :value="opt.value"
           />
         </el-select>
-        <span class="search_title" style="margin-left: 12px">鐢宠浜哄悕绉帮細</span>
-        <el-input
-          v-model="searchForm.applicantKeyword"
-          style="width: 200px"
-          placeholder="璇疯緭鍏ョ敵璇蜂汉鍚嶇О"
-          clearable
-          :prefix-icon="Search"
-          @keyup.enter="handleQuery"
-        />
         <span class="search_title" style="margin-left: 12px">鍒涘缓鏃堕棿锛�</span>
         <el-date-picker
           v-model="searchForm.createTimeRange"
@@ -218,6 +223,64 @@
       </template>
     </el-dialog>
 
+    <!-- 宸梾/璐圭敤鎶ラ攢璇︽儏锛堝鎵瑰垪琛級 -->
+    <el-dialog
+      v-model="reimburseDialog.visible"
+      :title="reimburseDialog.mode === 'approve' ? reimburseApproveTitle : reimburseDetailTitle"
+      width="1000px"
+      append-to-body
+      destroy-on-close
+      @closed="approveOpinion = ''"
+    >
+      <FinReimburseApprovePanel
+        :mode="reimburseDialog.mode"
+        :module-key="reimburseDialog.moduleKey"
+        :reimburse-row="reimburseDialog.reimburseRow"
+        :loading="reimburseDialog.loading"
+        v-model:approve-opinion="approveOpinion"
+      />
+      <template #footer>
+        <template v-if="reimburseDialog.mode === 'approve'">
+          <el-button
+            type="success"
+            :loading="approveSubmitting"
+            @click="onReimburseApprove('approved')"
+          >
+            閫� 杩�
+          </el-button>
+          <el-button
+            type="danger"
+            :loading="approveSubmitting"
+            @click="onReimburseApprove('rejected')"
+          >
+            椹� 鍥�
+          </el-button>
+          <el-button :disabled="approveSubmitting" @click="reimburseDialog.visible = false">
+            鍙� 娑�
+          </el-button>
+        </template>
+        <template v-else>
+          <el-button
+            v-if="reimburseDialog.instanceRow?.approvalStatus === 'pending'"
+            @click="openEditFromReimburseDetail"
+          >
+            淇� 鏀�
+          </el-button>
+          <el-button
+            v-if="
+              reimburseDialog.instanceRow?.approvalStatus === 'pending' &&
+              reimburseDialog.instanceRow?.isApprove
+            "
+            type="primary"
+            @click="openReimburseApproveFromDetail"
+          >
+            鍘诲鎵�
+          </el-button>
+          <el-button type="primary" @click="reimburseDialog.visible = false">鍏� 闂�</el-button>
+        </template>
+      </template>
+    </el-dialog>
+
     <!-- 瀹℃壒鎿嶄綔 -->
     <el-dialog
       v-model="approveDialog.visible"
@@ -272,7 +335,9 @@
 <script setup>
 import { Plus, RefreshRight } from "@element-plus/icons-vue";
 import { ElMessage } from "element-plus";
-import { onMounted, ref } from "vue";
+import { computed, onMounted, ref } from "vue";
+import { APPROVAL_MODULE_KEYS } from "../approve-shared/approvalModuleRegistry.js";
+import FinReimburseApprovePanel from "../../ReimburseManage/shared/components/FinReimburseApprovePanel.vue";
 import ApprovalTemplateFormSection from "../approve-shared/components/ApprovalTemplateFormSection.vue";
 import ApprovalTemplatePicker from "../approve-shared/components/ApprovalTemplatePicker.vue";
 import { useFlowUserOptions } from "../approve-shared/useFlowUserOptions.js";
@@ -285,7 +350,9 @@
 const al = useApproveList();
 const {
   Search,
-  APPROVAL_TYPE_OPTIONS,
+  APPROVAL_STATUS_SEARCH_OPTIONS,
+  searchBusinessTypeOptions,
+  loadSearchBusinessTypeOptions,
   submitBusinessTypeOptions,
   submitTemplateCards,
   selectedBusinessTypeLabel,
@@ -302,9 +369,11 @@
   tableColumn,
   detailDialog,
   detailRow,
+  reimburseDialog,
   approveDialog,
   approveOpinion,
   approveSubmitting,
+  submitReimburseApprove,
   submitDialog,
   isSubmitEdit,
   submitDialogTitle,
@@ -335,8 +404,30 @@
   if (ok) ElMessage.success(isSubmitEdit.value ? "淇敼鎴愬姛" : "瀹℃壒宸叉彁浜�");
 }
 
+const reimburseDetailTitle = computed(() =>
+  reimburseDialog.moduleKey === APPROVAL_MODULE_KEYS.COST_REIMBURSE
+    ? "璐圭敤鎶ラ攢璇︽儏"
+    : "宸梾鎶ラ攢璇︽儏"
+);
+const reimburseApproveTitle = computed(() =>
+  reimburseDialog.moduleKey === APPROVAL_MODULE_KEYS.COST_REIMBURSE
+    ? "璐圭敤鎶ラ攢瀹℃壒"
+    : "宸梾鎶ラ攢瀹℃壒"
+);
+
 async function onApprove(result) {
   const ret = await submitApprove(result);
+  if (ret?.needOpinion) {
+    ElMessage.warning("椹冲洖鏃惰濉啓瀹℃壒鎰忚");
+    return;
+  }
+  if (ret?.ok) {
+    ElMessage.success(result === "approved" ? "宸查�氳繃" : "宸查┏鍥�");
+  }
+}
+
+async function onReimburseApprove(result) {
+  const ret = await submitReimburseApprove(result);
   if (ret?.needOpinion) {
     ElMessage.warning("椹冲洖鏃惰濉啓瀹℃壒鎰忚");
     return;
@@ -350,10 +441,10 @@
   return formatDisplayTime(time) || "鈥�";
 }
 
-function openApproveFromDetail() {
+async function openApproveFromDetail() {
   const row = detailRow.value;
   detailDialog.visible = false;
-  openApprove(row);
+  await openApprove(row);
 }
 
 function openEditFromDetail() {
@@ -362,8 +453,22 @@
   openEditDialog(row);
 }
 
+function openEditFromReimburseDetail() {
+  const row = reimburseDialog.instanceRow;
+  reimburseDialog.visible = false;
+  if (row) openEditDialog(row);
+}
+
+async function openReimburseApproveFromDetail() {
+  const row = reimburseDialog.instanceRow;
+  if (!row) return;
+  reimburseDialog.mode = "approve";
+  approveOpinion.value = "";
+}
+
 onMounted(() => {
   loadFlowUsers();
+  loadSearchBusinessTypeOptions();
   handleQuery();
 });
 </script>

--
Gitblit v1.9.3