From 727e9cb845a70cb99ded092f262e0d4712eaa33b Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 30 三月 2026 13:49:00 +0800
Subject: [PATCH] 酒泉 1.设备功能迁移
---
src/views/procurementManagement/procurementLedger/index.vue | 96 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 95 insertions(+), 1 deletions(-)
diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index ae01c9c..7e8c39d 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -118,6 +118,31 @@
width="420"
show-overflow-tooltip
/>
+ <el-table-column label="瀹℃壒鐘舵��" width="140">
+ <template #default="scope">
+ <el-tag
+ v-if="(scope.row.approveStatus ?? scope.row.approvalStatus ?? scope.row.auditStatus) == 0"
+ type="warning"
+ >寰呭鏍�</el-tag>
+ <el-tag
+ v-else-if="(scope.row.approveStatus ?? scope.row.approvalStatus ?? scope.row.auditStatus) == 1"
+ type="primary"
+ >瀹℃牳涓�</el-tag>
+ <el-tag
+ v-else-if="(scope.row.approveStatus ?? scope.row.approvalStatus ?? scope.row.auditStatus) == 2"
+ type="success"
+ >瀹℃牳瀹屾垚</el-tag>
+ <el-tag
+ v-else-if="(scope.row.approveStatus ?? scope.row.approvalStatus ?? scope.row.auditStatus) == 3"
+ type="danger"
+ >瀹℃牳鏈�氳繃</el-tag>
+ <el-tag
+ v-else-if="(scope.row.approveStatus ?? scope.row.approvalStatus ?? scope.row.auditStatus) == 4"
+ type="info"
+ >宸查噸鏂版彁浜�</el-tag>
+ <el-tag v-else type="info">-</el-tag>
+ </template>
+ </el-table-column>
<el-table-column
label="浠樻鏂瑰紡"
width="100"
@@ -155,7 +180,6 @@
type="primary"
size="small"
@click="openForm('edit', scope.row)"
- :disabled="scope.row.receiptPaymentAmount>0 || scope.row.recorderName !== userStore.nickName"
>缂栬緫</el-button
>
<el-button
@@ -299,6 +323,48 @@
placeholder="璇烽�夋嫨"
clearable
/>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item>
+ <template #label>
+ <span>瀹℃壒浜洪�夋嫨锛�</span>
+ <el-button type="primary" @click="addApproverNode" style="margin-left: 8px;">鏂板鑺傜偣</el-button>
+ </template>
+ <div style="display: flex; align-items: flex-end; flex-wrap: wrap;">
+ <div
+ v-for="(node, index) in approverNodes"
+ :key="node.id"
+ style="margin-right: 30px; text-align: center; margin-bottom: 10px;"
+ >
+ <div>
+ <span>瀹℃壒浜�</span>
+ 鈫�
+ </div>
+ <el-select
+ v-model="node.userId"
+ placeholder="閫夋嫨浜哄憳"
+ style="width: 140px; margin-bottom: 8px;"
+ >
+ <el-option
+ v-for="user in userList"
+ :key="user.userId"
+ :label="user.nickName"
+ :value="user.userId"
+ />
+ </el-select>
+ <div>
+ <el-button
+ type="danger"
+ size="small"
+ @click="removeApproverNode(index)"
+ v-if="approverNodes.length > 1"
+ >鍒犻櫎</el-button>
+ </div>
+ </div>
+ </div>
</el-form-item>
</el-col>
</el-row>
@@ -833,6 +899,8 @@
});
const total = ref(0);
const fileList = ref([]);
+const approverNodes = ref([{ id: 1, userId: null }]);
+let nextApproverId = 2;
import useUserStore from "@/store/modules/user";
import { modelList, productTreeList } from "@/api/basicData/product.js";
import dayjs from "dayjs";
@@ -880,6 +948,13 @@
});
const { form, rules } = toRefs(data);
const { form: searchForm } = useFormData(data.searchForm);
+
+const addApproverNode = () => {
+ approverNodes.value.push({ id: nextApproverId++, userId: null });
+};
+const removeApproverNode = (index) => {
+ approverNodes.value.splice(index, 1);
+};
// 浜у搧琛ㄥ崟寮规鏁版嵁
const productFormVisible = ref(false);
@@ -1034,6 +1109,8 @@
form.value = {};
productData.value = [];
fileList.value = [];
+ approverNodes.value = [{ id: 1, userId: null }];
+ nextApproverId = 2;
if (operationType.value == "add") {
createPurchaseNo().then((res) => {
form.value.purchaseContractNumber = res.data;
@@ -1055,6 +1132,17 @@
getPurchaseById({ id: row.id, type: 2 }).then((res) => {
form.value = { ...res };
productData.value = form.value.productData;
+ const approveUserIds = form.value.approveUserIds || form.value.approverIds;
+ if (approveUserIds) {
+ const ids = String(approveUserIds)
+ .split(",")
+ .map((id) => Number(id.trim()))
+ .filter((id) => !Number.isNaN(id));
+ if (ids.length > 0) {
+ approverNodes.value = ids.map((id, idx) => ({ id: idx + 1, userId: id }));
+ nextApproverId = ids.length + 1;
+ }
+ }
if (form.value.salesLedgerFiles) {
fileList.value = form.value.salesLedgerFiles;
} else {
@@ -1109,6 +1197,12 @@
const submitForm = () => {
proxy.$refs["formRef"].validate((valid) => {
if (valid) {
+ const hasEmptyApprover = approverNodes.value.some((node) => !node.userId);
+ if (hasEmptyApprover) {
+ proxy.$modal.msgWarning("璇蜂负鎵�鏈夊鎵硅妭鐐归�夋嫨瀹℃壒浜�");
+ return;
+ }
+ form.value.approveUserIds = approverNodes.value.map((node) => node.userId).join(",");
if (productData.value.length > 0) {
form.value.productData = proxy.HaveJson(productData.value);
} else {
--
Gitblit v1.9.3