From fd20b340153df3282b87dc631b7f72437ee06c07 Mon Sep 17 00:00:00 2001
From: buhuazhen <hua100783@gmail.com>
Date: 星期五, 29 五月 2026 14:26:53 +0800
Subject: [PATCH] feat:供应商往来增加筛选条件 采购单号
---
src/views/collaborativeApproval/approvalProcess/index.vue | 114 +++++++++++++++++++++++++++++++-------------------------
1 files changed, 63 insertions(+), 51 deletions(-)
diff --git a/src/views/collaborativeApproval/approvalProcess/index.vue b/src/views/collaborativeApproval/approvalProcess/index.vue
index 00e59c9..13523a0 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>
@@ -38,14 +38,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>
@@ -113,7 +113,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 +160,8 @@
width: 220
},
{
- label: isQuotationType ? "鎶ヤ环鍗曞彿" : "瀹℃壒浜嬬敱",
+ label: isQuotationType ? "鎶ヤ环鍗曞彿" : isPurchaseType ? "閲囪喘鍗曞彿" : "瀹℃壒浜嬬敱",
prop: "approveReason",
- width: 200
},
{
label: "鐢宠浜�",
@@ -169,7 +169,7 @@
width: 120
}
];
-
+
// 閲戦鍒楋紙浠呮姤閿�绠$悊鏄剧ず锛�
if (isReimburseType) {
baseColumns.push({
@@ -178,7 +178,7 @@
width: 120
});
}
-
+
// 鏃ユ湡鍒楋紙鏍规嵁绫诲瀷鍔ㄦ�侀厤缃級
baseColumns.push(
{
@@ -192,60 +192,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 +371,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