From 5c30f301d6d4a5b8fc1183e06aaea8dc366d3540 Mon Sep 17 00:00:00 2001
From: buhuazhen <hua100783@gmail.com>
Date: 星期五, 29 五月 2026 17:56:25 +0800
Subject: [PATCH] feat: 调整
---
src/views/collaborativeApproval/approvalProcess/index.vue | 138 +++++++++++++++++++++++++++++-----------------
1 files changed, 87 insertions(+), 51 deletions(-)
diff --git a/src/views/collaborativeApproval/approvalProcess/index.vue b/src/views/collaborativeApproval/approvalProcess/index.vue
index 00e59c9..cb2dfdf 100644
--- a/src/views/collaborativeApproval/approvalProcess/index.vue
+++ b/src/views/collaborativeApproval/approvalProcess/index.vue
@@ -10,7 +10,7 @@
<el-tab-pane label="鎶ヤ环瀹℃壒" name="6"></el-tab-pane>
<el-tab-pane label="鍙戣揣瀹℃壒" name="7"></el-tab-pane>
</el-tabs>
-
+
<div class="search_form">
<div>
<span class="search_title">娴佺▼缂栧彿锛�</span>
@@ -21,6 +21,15 @@
@change="handleQuery"
clearable
:prefix-icon="Search"
+ />
+ <span class="search_title ml10" v-if="currentApproveType === 7">閿�鍞崟鍙凤細</span>
+ <el-input
+ v-if="currentApproveType === 7"
+ v-model="searchForm.salesContractNo"
+ style="width: 240px"
+ placeholder="璇疯緭鍏ラ攢鍞崟鍙锋悳绱�"
+ @change="handleQuery"
+ clearable
/>
<span class="search_title ml10">瀹℃壒鐘舵�侊細</span>
<el-select v-model="searchForm.approveStatus" clearable @change="handleQuery" style="width: 240px">
@@ -38,14 +47,14 @@
<el-button
type="primary"
@click="openForm('add')"
- v-if="currentApproveType !== 6 && currentApproveType !== 7"
+ v-if="currentApproveType !== 5 && currentApproveType !== 6 && currentApproveType !== 7"
>鏂板</el-button>
<el-button @click="handleOut">瀵煎嚭</el-button>
<el-button
type="danger"
plain
@click="handleDelete"
- v-if="currentApproveType !== 7"
+ v-if="currentApproveType !== 5 && currentApproveType !== 6 && currentApproveType !== 7"
>鍒犻櫎</el-button>
</div>
</div>
@@ -95,6 +104,7 @@
// 鍒囨崲鏍囩椤垫椂閲嶇疆鎼滅储鏉′欢鍜屽垎椤碉紝骞堕噸鏂板姞杞芥暟鎹�
searchForm.value.approveId = '';
searchForm.value.approveStatus = '';
+ searchForm.value.salesContractNo = '';
page.current = 1;
getList();
};
@@ -104,6 +114,7 @@
searchForm: {
approveId: "",
approveStatus: "",
+ salesContractNo: "",
},
});
const { searchForm } = toRefs(data);
@@ -113,7 +124,8 @@
const isLeaveType = currentApproveType.value === 2; // 璇峰亣绠$悊
const isReimburseType = currentApproveType.value === 4; // 鎶ラ攢绠$悊
const isQuotationType = currentApproveType.value === 6; // 鎶ヤ环瀹℃壒
-
+ const isPurchaseType = currentApproveType.value === 5; // 閲囪喘瀹℃壒
+
// 鍩虹鍒楅厤缃�
const baseColumns = [
{
@@ -159,9 +171,8 @@
width: 220
},
{
- label: isQuotationType ? "鎶ヤ环鍗曞彿" : "瀹℃壒浜嬬敱",
+ label: isQuotationType ? "鎶ヤ环鍗曞彿" : isPurchaseType ? "閲囪喘鍗曞彿" : "瀹℃壒浜嬬敱",
prop: "approveReason",
- width: 200
},
{
label: "鐢宠浜�",
@@ -169,7 +180,20 @@
width: 120
}
];
-
+
+ // 鍙戣揣瀹℃壒鏄剧ず閿�鍞崟鍙峰垪
+ if (currentApproveType.value === 7) {
+ // 鍦ㄧ敵璇烽儴闂ㄥ悗闈㈡彃鍏ラ攢鍞崟鍙峰垪
+ const deptIndex = baseColumns.findIndex(col => col.prop === 'approveDeptName');
+ if (deptIndex !== -1) {
+ baseColumns.splice(deptIndex + 1, 0, {
+ label: "閿�鍞崟鍙�",
+ prop: "salesContractNo",
+ width: 170
+ });
+ }
+ }
+
// 閲戦鍒楋紙浠呮姤閿�绠$悊鏄剧ず锛�
if (isReimburseType) {
baseColumns.push({
@@ -178,7 +202,7 @@
width: 120
});
}
-
+
// 鏃ユ湡鍒楋紙鏍规嵁绫诲瀷鍔ㄦ�侀厤缃級
baseColumns.push(
{
@@ -192,60 +216,72 @@
width: 120
}
);
-
+
// 褰撳墠瀹℃壒浜哄垪
baseColumns.push({
label: "褰撳墠瀹℃壒浜�",
prop: "approveUserCurrentName",
width: 120
});
-
+
// 鎿嶄綔鍒�
+ const actionOperations = [
+ {
+ name: "缂栬緫",
+ type: "text",
+ clickFun: (row) => {
+ openForm("edit", row);
+ },
+ disabled: (row) =>
+ currentApproveType.value === 5 ||
+ currentApproveType.value === 6 ||
+ currentApproveType.value === 7 ||
+ row.approveStatus == 2 ||
+ row.approveStatus == 1 ||
+ row.approveStatus == 4
+ },
+ {
+ name: "瀹℃牳",
+ type: "text",
+ clickFun: (row) => {
+ openApprovalDia("approval", row);
+ },
+ disabled: (row) =>
+ row.approveUserCurrentId == null ||
+ row.approveStatus == 2 ||
+ row.approveStatus == 3 ||
+ row.approveStatus == 4 ||
+ row.approveUserCurrentId !== userStore.id
+ },
+ {
+ name: "璇︽儏",
+ type: "text",
+ clickFun: (row) => {
+ openApprovalDia("view", row);
+ },
+ },
+ ];
+
+ // 鎶ヤ环瀹℃壒锛堢被鍨� 6锛変笉灞曠ず鈥滈檮浠垛�濇搷浣�
+ if (!isQuotationType) {
+ actionOperations.push({
+ name: "闄勪欢",
+ type: "text",
+ clickFun: (row) => {
+ downLoadFile(row);
+ },
+ });
+ }
+
baseColumns.push({
dataType: "action",
label: "鎿嶄綔",
align: "center",
fixed: "right",
width: 230,
- operation: [
- {
- name: "缂栬緫",
- type: "text",
- clickFun: (row) => {
- openForm("edit", row);
- },
- disabled: (row) =>
- currentApproveType.value === 6 ||
- currentApproveType.value === 7 ||
- row.approveStatus == 2 ||
- row.approveStatus == 1 ||
- row.approveStatus == 4
- },
- {
- name: "瀹℃牳",
- type: "text",
- clickFun: (row) => {
- openApprovalDia("approval", row);
- },
- disabled: (row) => row.approveUserCurrentId == null || row.approveStatus == 2 || row.approveStatus == 3 || row.approveStatus == 4 || row.approveUserCurrentId !== userStore.id
- },
- {
- name: "璇︽儏",
- type: "text",
- clickFun: (row) => {
- openApprovalDia('view', row);
- },
- },
- {
- name: "闄勪欢",
- type: "text",
- clickFun: (row) => {
- downLoadFile(row);
- },
- },
- ],
+ operation: actionOperations,
});
-
+
return baseColumns;
});
const tableData = ref([]);
@@ -359,17 +395,17 @@
// 鏍规嵁URL鍙傛暟璁剧疆鏍囩椤靛拰鏌ヨ鏉′欢
const approveType = route.query.approveType;
const approveId = route.query.approveId;
-
+
if (approveType) {
// 璁剧疆鏍囩椤碉紙approveType 瀵瑰簲 activeTab 鐨� name锛�
activeTab.value = String(approveType);
}
-
+
if (approveId) {
// 璁剧疆娴佺▼缂栧彿鏌ヨ鏉′欢
searchForm.value.approveId = String(approveId);
}
-
+
// 鏌ヨ鍒楄〃
getList();
});
--
Gitblit v1.9.3