From 804c72f50011e7f6fdccd80edaef272f11a973c5 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期一, 11 五月 2026 16:02:47 +0800
Subject: [PATCH] fix: 采购不审批
---
src/views/procurementManagement/procurementLedger/index.vue | 142 +----------------------------------------------
1 files changed, 4 insertions(+), 138 deletions(-)
diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index 1eb1e39..fc946b6 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -162,7 +162,7 @@
prop="projectName"
width="320"
show-overflow-tooltip />
- <el-table-column label="瀹℃壒鐘舵��"
+ <!-- <el-table-column label="瀹℃壒鐘舵��"
prop="approvalStatus"
width="100"
show-overflow-tooltip>
@@ -172,7 +172,7 @@
{{ approvalStatusText[scope.row.approvalStatus] || '鏈煡鐘舵��' }}
</el-tag>
</template>
- </el-table-column>
+ </el-table-column> -->
<el-table-column label="绛捐鏃ユ湡"
prop="executionDate"
width="100"
@@ -328,45 +328,6 @@
type="date"
placeholder="璇烽�夋嫨"
clearable />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="30">
- <el-col :span="24">
- <el-form-item>
- <template #label>
- <div style="display: flex; align-items: center; justify-content: space-between; width: 100%;">
- <span>瀹℃壒浜洪�夋嫨锛�</span>
- <el-button type="primary"
- size="small"
- @click="addApproverNode"
- icon="Plus">鏂板鑺傜偣</el-button>
- </div>
- </template>
- <div class="approver-nodes-container">
- <div v-for="(node, index) in approverNodes"
- :key="node.id"
- class="approver-node-item">
- <div class="approver-node-header">
- <span class="approver-node-label">瀹℃壒鑺傜偣 {{ index + 1 }}</span>
- <el-button v-if="approverNodes.length > 1"
- type="danger"
- size="small"
- text
- @click="removeApproverNode(index)"
- icon="Delete">鍒犻櫎</el-button>
- </div>
- <el-select v-model="node.userId"
- placeholder="璇烽�夋嫨瀹℃壒浜�"
- filterable
- style="width: 100%;">
- <el-option v-for="user in userList"
- :key="user.userId"
- :label="user.nickName"
- :value="user.userId" />
- </el-select>
- </div>
- </div>
</el-form-item>
</el-col>
</el-row>
@@ -839,16 +800,6 @@
const userStore = useUserStore();
- // 瀹℃壒浜鸿妭鐐癸紙浠块攢鍞彴璐﹀彂璐у鎵逛汉锛�
- const approverNodes = ref([{ id: 1, userId: null }]);
- let nextApproverId = 2;
- const addApproverNode = () => {
- approverNodes.value.push({ id: nextApproverId++, userId: null });
- };
- const removeApproverNode = index => {
- approverNodes.value.splice(index, 1);
- };
-
// 澶勭悊渚涘簲鍟嗛�夋嫨鍙樺寲
const handleSupplierChange = async supplierId => {
const selectedSupplier = supplierList.value.find(
@@ -1020,9 +971,6 @@
rules: {
purchaseContractNumber: [
{ required: true, message: "璇疯緭鍏�", trigger: "blur" },
- ],
- approverId: [
- { required: true, message: "璇烽�夋嫨瀹℃壒浜�", trigger: "change" },
],
projectName: [
{ required: true, message: "璇疯緭鍏ラ」鐩悕绉�", trigger: "blur" },
@@ -1263,19 +1211,13 @@
}
try {
- // 鑾峰彇瀹℃壒浜篒D瀛楃涓�
- const approveUserIds = approverNodes.value
- .filter(node => node.userId)
- .map(node => node.userId)
- .join(",");
-
let params = {
productData: proxy.HaveJson(productData.value),
supplierId: form.value.supplierId,
paymentMethod: form.value.paymentMethod,
recorderId: form.value.recorderId,
projectName: form.value.projectName,
- approveUserIds: approveUserIds,
+ approveUserIds: "",
templateName: templateName.value.trim(),
};
console.log(
@@ -1457,9 +1399,6 @@
templateName.value = "";
filterInputValue.value = "";
isTemplateNameDuplicate.value = false;
- // 閲嶇疆瀹℃壒浜鸿妭鐐癸紙榛樿涓�涓┖鑺傜偣锛�
- approverNodes.value = [{ id: 1, userId: null }];
- nextApproverId = 2;
try {
// 骞惰鍔犺浇鍩虹鏁版嵁
const [userRes, salesRes, supplierRes] = await Promise.all([
@@ -1499,15 +1438,6 @@
form.value = { ...purchaseRes };
productData.value = purchaseRes.productData || [];
fileList.value = purchaseRes.salesLedgerFiles || [];
- // 濡傛灉缂栬緫鏃舵湁瀹℃壒浜猴紝瑙f瀽瀹℃壒浜篒D瀛楃涓插苟璁剧疆鍒拌妭鐐逛腑
- if (purchaseRes.approveUserIds) {
- const approverIds = purchaseRes.approveUserIds.split(",");
- approverNodes.value = approverIds.map((id, index) => ({
- id: index + 1,
- userId: Number(id),
- }));
- nextApproverId = approverIds.length + 1;
- }
// 璁剧疆褰撳墠渚涘簲鍟嗙被鍨�
if (form.value.supplierId) {
handleSupplierChange(form.value.supplierId);
@@ -1580,16 +1510,6 @@
const submitForm = () => {
proxy.$refs["formRef"].validate(valid => {
if (valid) {
- // 瀹℃壒浜哄繀濉牎楠岋紙鎵�鏈夎妭鐐归兘瑕侀�変汉锛�
- const hasEmptyApprover = approverNodes.value.some(node => !node.userId);
- if (hasEmptyApprover) {
- proxy.$modal.msgError("璇蜂负鎵�鏈夊鎵硅妭鐐归�夋嫨瀹℃壒浜猴紒");
- return;
- }
- const approveUserIds = approverNodes.value
- .map(node => node.userId)
- .join(",");
-
if (productData.value.length > 0) {
// 鏂板鏃讹紝闇�瑕佷粠姣忎釜浜у搧瀵硅薄涓垹闄� id 瀛楁
let processedProductData = productData.value;
@@ -1610,7 +1530,7 @@
}
form.value.tempFileIds = tempFileIds;
form.value.type = 2;
- form.value.approveUserIds = approveUserIds;
+ form.value.approveUserIds = "";
// 濡傛灉salesLedgerId涓虹┖锛屽垯涓嶄紶閫抯alesContractNo
if (!form.value.salesLedgerId) {
@@ -1637,9 +1557,6 @@
// 鍏抽棴寮规
const closeDia = () => {
proxy.resetForm("formRef");
- // 閲嶇疆瀹℃壒浜鸿妭鐐癸紙榛樿涓�涓┖鑺傜偣锛�
- approverNodes.value = [{ id: 1, userId: null }];
- nextApproverId = 2;
dialogFormVisible.value = false;
};
// 鎵撳紑浜у搧寮规
@@ -2162,57 +2079,6 @@
.select-button-group {
display: flex;
align-items: center;
- }
-
- // 瀹℃壒浜鸿妭鐐瑰鍣ㄦ牱寮�
- .approver-nodes-container {
- display: flex;
- flex-wrap: wrap;
- gap: 16px;
- padding: 16px;
- background-color: #f8f9fa;
- border-radius: 4px;
- border: 1px solid #e4e7ed;
- }
-
- .approver-node-item {
- flex: 0 0 calc(33.333% - 12px);
- min-width: 200px;
- padding: 12px;
- background-color: #fff;
- border-radius: 4px;
- border: 1px solid #dcdfe6;
- transition: all 0.3s;
-
- &:hover {
- border-color: #409eff;
- box-shadow: 0 2px 8px rgba(64, 158, 255, 0.1);
- }
- }
-
- .approver-node-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 8px;
- }
-
- .approver-node-label {
- font-size: 13px;
- font-weight: 500;
- color: #606266;
- }
-
- @media (max-width: 1200px) {
- .approver-node-item {
- flex: 0 0 calc(50% - 8px);
- }
- }
-
- @media (max-width: 768px) {
- .approver-node-item {
- flex: 0 0 100%;
- }
}
// 鍒犻櫎鍥炬爣鏍峰紡
--
Gitblit v1.9.3