From 5747cef7e826014682a02cd00da8769e1fa1e65a Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期二, 30 十二月 2025 14:45:52 +0800
Subject: [PATCH] 添加采购审批页面,显示台账审批状态
---
src/views/procurementManagement/procurementLedger/index.vue | 50 ++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 46 insertions(+), 4 deletions(-)
diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index 571e7ab..4475f30 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -54,6 +54,7 @@
:summary-method="summarizeMainTable"
@expand-change="expandChange"
height="calc(100vh - 18.5em)"
+ :row-class-name="tableRowClassName"
>
<el-table-column align="center" type="selection" width="55" />
<el-table-column type="expand">
@@ -112,12 +113,32 @@
prop="supplierName"
show-overflow-tooltip
/>
+ <el-table-column label="璁㈠崟鐘舵��" width="100" align="center">
+ <template #default="scope">
+ <el-tag v-if="scope.row.isInvalid" type="danger" size="small">澶辨晥</el-tag>
+ <el-tag v-else type="success" size="small">姝e父</el-tag>
+ </template>
+ </el-table-column>
<el-table-column
label="椤圭洰鍚嶇О"
prop="projectName"
width="420"
show-overflow-tooltip
/>
+ <el-table-column
+ label="瀹℃壒鐘舵��"
+ prop="approvalStatus"
+ width="200"
+ show-overflow-tooltip
+ >
+ <template #default="scope">
+ <el-tag
+ size="small"
+ >
+ {{ approvalStatusText[scope.row.approvalStatus] || '鏈煡鐘舵��' }}
+ </el-tag>
+ </template>
+ </el-table-column>
<el-table-column
label="浠樻鏂瑰紡"
width="100"
@@ -844,6 +865,13 @@
const qrCodeDialogVisible = ref(false);
const qrCodeUrl = ref("");
+// 璁㈠崟瀹℃壒鐘舵�佹樉绀烘枃鏈�
+const approvalStatusText = {
+ 0: '瀹℃壒涓�',
+ 1: '瀹℃壒閫氳繃',
+ 2: '瀹℃壒澶辫触'
+};
+
// 鐢ㄦ埛淇℃伅琛ㄥ崟寮规鏁版嵁
const operationType = ref("");
const dialogFormVisible = ref(false);
@@ -979,7 +1007,12 @@
purchaseListPage({ ...rest, ...page })
.then((res) => {
tableLoading.value = false;
- tableData.value = res.data.records;
+ // tableData.value = res.data.records;
+ // 澶勭悊鏁版嵁锛屾坊鍔犲け鏁堢姸鎬佹爣璁�
+ tableData.value = res.data.records.map(record => ({
+ ...record,
+ isInvalid: record.isWhite === 1
+ }));
tableData.value.map((item) => {
item.children = [];
});
@@ -1047,7 +1080,8 @@
salesContractList.value = res;
});
getOptions().then((res) => {
- supplierList.value = res.data;
+ // 渚涘簲鍟嗚繃婊ゅ嚭isWhite=0 鐨勬暟鎹�
+ supplierList.value = res.data.filter((item) => item.isWhite == 0);
});
form.value.recorderId = userStore.id;
form.value.entryDate = getCurrentDate();
@@ -1599,11 +1633,19 @@
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
-
+// 娣诲姞琛岀被鍚嶆柟娉�
+const tableRowClassName = ({ row }) => {
+ return row.isInvalid ? 'invalid-row' : '';
+};
onMounted(() => {
getList();
});
</script>
-<style scoped lang="scss"></style>
+<style scoped lang="scss">
+.invalid-row {
+ opacity: 0.6;
+ background-color: #f5f7fa;
+}
+</style>
--
Gitblit v1.9.3