From af56818d094e38b66d2fb039b50d7ee63edfdd84 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期五, 15 五月 2026 16:16:02 +0800
Subject: [PATCH] 修改协同审批附件上传
---
src/views/inventoryManagement/receiptManagement/Record.vue | 40 ++++++++++++++++++++++++++++++----------
1 files changed, 30 insertions(+), 10 deletions(-)
diff --git a/src/views/inventoryManagement/receiptManagement/Record.vue b/src/views/inventoryManagement/receiptManagement/Record.vue
index d8bc1ea..9485188 100644
--- a/src/views/inventoryManagement/receiptManagement/Record.vue
+++ b/src/views/inventoryManagement/receiptManagement/Record.vue
@@ -1,6 +1,6 @@
<template>
- <div class="app-container">
- <div class="search_form">
+ <div>
+ <div class="search_form" style="margin-bottom: 10px;">
<div>
<span class="search_title ml10">鍏ュ簱鏃ユ湡锛�</span>
<el-date-picker v-model="searchForm.timeStr"
@@ -50,6 +50,7 @@
height="calc(100vh - 18.5em)">
<el-table-column align="center"
type="selection"
+ :selectable="isRowSelectableForApprove"
width="55"/>
<el-table-column align="center"
label="搴忓彿"
@@ -91,7 +92,9 @@
prop="approvalStatus"
show-overflow-tooltip>
<template #default="scope">
- {{ getApprovalStatusLabel(scope.row.approvalStatus) }}
+ <el-tag :type="getApprovalStatusTagType(scope.row.approvalStatus)" size="small">
+ {{ getApprovalStatusLabel(scope.row.approvalStatus) }}
+ </el-tag>
</template>
</el-table-column>
</el-table>
@@ -121,7 +124,8 @@
batchApproveStockInRecords,
} from "@/api/inventoryManagement/stockInRecord.js";
import {
- findAllQualifiedStockInRecordTypeOptions, findAllUnQualifiedStockInRecordTypeOptions,
+ findAllQualifiedStockInRecordTypeOptions,
+ // findAllUnQualifiedStockInRecordTypeOptions,
} from "@/api/basicData/enum.js";
const {proxy} = getCurrentInstance();
@@ -179,12 +183,28 @@
APPROVED: "閫氳繃",
REJECTED: "椹冲洖",
};
+approvalStatusLabelMap[3] = "寰呯‘璁�";
const getApprovalStatusLabel = (status) => {
if (status === null || status === undefined || status === "") {
return "寰呭鎵�";
}
return approvalStatusLabelMap[status] || "寰呭鎵�";
+};
+
+// 閫氳繃/椹冲洖鍥哄畾鑹诧紱鍏朵綑锛堝惈寰呭鎵广�佺┖鍊笺�佹湭鏄犲皠浣嗘枃妗堜负寰呭鎵癸級缁熶竴鐢� warning 棰勮鑹�
+const getApprovalStatusTagType = (status) => {
+ if (status === 1 || status === "1" || status === "approved" || status === "APPROVED") return "success";
+ if (status === 2 || status === "2" || status === "rejected" || status === "REJECTED") return "danger";
+ return "warning";
+};
+
+const isPendingApproval = status => {
+ return status === 0 || status === "0" || status === "pending" || status === "PENDING" || status === null || status === undefined || status === "";
+};
+
+const isRowSelectableForApprove = row => {
+ return isPendingApproval(row?.approvalStatus);
};
const pageProductChange = obj => {
@@ -195,7 +215,7 @@
const getList = () => {
tableLoading.value = true;
- const params = {...page, type: props.type, topParentProductId: props.topParentProductId};
+ const params = {...page, topParentProductId: props.topParentProductId};
params.timeStr = searchForm.value.timeStr;
params.productName = searchForm.value.productName;
params.recordType = searchForm.value.recordType;
@@ -217,15 +237,15 @@
})
return
}
- findAllUnQualifiedStockInRecordTypeOptions()
- .then(res => {
- stockRecordTypeOptions.value = res.data;
- })
+ // findAllUnQualifiedStockInRecordTypeOptions()
+ // .then(res => {
+ // stockRecordTypeOptions.value = res.data;
+ // })
}
// 琛ㄦ牸閫夋嫨鏁版嵁
const handleSelectionChange = selection => {
- selectedRows.value = selection.filter(item => item.id);
+ selectedRows.value = selection.filter(item => item.id && isPendingApproval(item.approvalStatus));
};
const expandedRowKeys = ref([]);
--
Gitblit v1.9.3