From f9c7ba194dee021012f366e743164c5a1336f405 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 21 十一月 2025 13:57:32 +0800
Subject: [PATCH] 1.弘也水泥-报销管理添加报销金额字段

---
 src/views/collaborativeApproval/approvalProcess/index.vue |  160 ++++++++++++++++++++++++++++++-----------------------
 1 files changed, 91 insertions(+), 69 deletions(-)

diff --git a/src/views/collaborativeApproval/approvalProcess/index.vue b/src/views/collaborativeApproval/approvalProcess/index.vue
index 9b36320..4299d22 100644
--- a/src/views/collaborativeApproval/approvalProcess/index.vue
+++ b/src/views/collaborativeApproval/approvalProcess/index.vue
@@ -76,75 +76,95 @@
   },
 });
 const { searchForm } = toRefs(data);
-const tableColumn = ref([
-  {
-    label: "瀹℃壒鐘舵��",
-    prop: "approveStatus",
-    dataType: "tag",
-		width: 100,
-    formatData: (params) => {
-      if (params == 0) {
-        return "寰呭鏍�";
-      } else if (params == 1) {
-        return "瀹℃牳涓�";
-      } else if (params == 2) {
-        return "瀹℃牳瀹屾垚";
-      } else if (params == 4) {
-        return "宸查噸鏂版彁浜�";
-      } else {
-        return '涓嶉�氳繃';
-      }
+const tableColumn = computed(() => {
+  const baseColumns = [
+    {
+      label: "瀹℃壒鐘舵��",
+      prop: "approveStatus",
+      dataType: "tag",
+		  width: 100,
+      formatData: (params) => {
+        if (params == 0) {
+          return "寰呭鏍�";
+        } else if (params == 1) {
+          return "瀹℃牳涓�";
+        } else if (params == 2) {
+          return "瀹℃牳瀹屾垚";
+        } else if (params == 4) {
+          return "宸查噸鏂版彁浜�";
+        } else {
+          return '涓嶉�氳繃';
+        }
+      },
+      formatType: (params) => {
+        if (params == 0) {
+          return "warning";
+        } else if (params == 1) {
+          return "primary";
+        } else if (params == 2) {
+          return "success";
+        } else if (params == 4) {
+          return "";
+        } else {
+          return 'danger';
+        }
+      },
     },
-    formatType: (params) => {
-      if (params == 0) {
-        return "warning";
-      } else if (params == 1) {
-        return "primary";
-      } else if (params == 2) {
-        return "success";
-      } else if (params == 4) {
-        return "";
-      } else {
-        return 'danger';
-      }
+    {
+      label: "娴佺▼缂栧彿",
+      prop: "approveId",
+      width: 170
     },
-  },
-  {
-    label: "娴佺▼缂栧彿",
-    prop: "approveId",
-    width: 170
-  },
-  {
-    label: "鐢宠閮ㄩ棬",
-    prop: "approveDeptName",
-		width: 220
-  },
-  {
-    label: "瀹℃壒浜嬬敱",
-    prop: "approveReason",
-		width: 200
-  },
-  {
-    label: "鐢宠浜�",
-    prop: "approveUserName",
-    width: 120
-  },
-  {
-    label: "鐢宠鏃ユ湡",
-    prop: "approveTime",
-		width: 200
-  },
-  {
-    label: "缁撴潫鏃ユ湡",
-    prop: "approveOverTime",
-    width: 120
-  },
-  {
-    label: "褰撳墠瀹℃壒浜�",
-    prop: "approveUserCurrentName",
-    width: 120
-  },
-  {
+    {
+      label: "鐢宠閮ㄩ棬",
+      prop: "approveDeptName",
+		  width: 220
+    },
+    {
+      label: "瀹℃壒浜嬬敱",
+      prop: "approveReason",
+		  width: 200
+    },
+    {
+      label: "鐢宠浜�",
+      prop: "approveUserName",
+      width: 120
+    },
+    {
+      label: "鐢宠鏃ユ湡",
+      prop: "approveTime",
+		  width: 200
+    },
+    {
+      label: "缁撴潫鏃ユ湡",
+      prop: "approveOverTime",
+      width: 120
+    },
+    {
+      label: "褰撳墠瀹℃壒浜�",
+      prop: "approveUserCurrentName",
+      width: 120
+    }
+  ];
+
+  // 濡傛灉鏄姤閿�绠$悊瀹℃壒琛紙approveType=4锛夛紝娣诲姞鎶ラ攢閲戦鍒�
+  if (props.approveType == 4) {
+    baseColumns.push({
+      label: "鎶ラ攢閲戦",
+      prop: "price",
+      width: 120,
+      fixed: "right",
+      formatData: (params) => {
+        if (params) {
+          return `楼${Number(params).toFixed(2)}`;
+        }
+        return '-'
+      }
+    });
+  }
+
+  // 娣诲姞鎿嶄綔鍒�
+  baseColumns.push({
     dataType: "action",
     label: "鎿嶄綔",
     align: "center",
@@ -182,8 +202,10 @@
         },
       },
     ],
-  },
-]);
+  });
+
+  return baseColumns;
+});
 const tableData = ref([]);
 const selectedRows = ref([]);
 const tableLoading = ref(false);

--
Gitblit v1.9.3