From 4e591bd0b0042c4bc28f7a999ceea064f8ed5d43 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 02 六月 2026 17:28:06 +0800
Subject: [PATCH] 富边商务电子 1.发货审批点击详情的时候产品列表没有展示问题
---
src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue | 87 +++++++++++++++++++++++++++++++++++++------
1 files changed, 75 insertions(+), 12 deletions(-)
diff --git a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
index c3fb6d1..403dcab 100644
--- a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
+++ b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
@@ -34,7 +34,7 @@
</el-row>
<el-row v-if="!isQuotationApproval && !isPurchaseApproval">
<el-col :span="24">
- <el-form-item :label="props.approveType == 5 ? '閲囪喘鍚堝悓鍙凤細' : '瀹℃壒浜嬬敱锛�'" prop="approveReason">
+ <el-form-item :label="props.approveType == 5 ? '閲囪喘鍗曞彿锛�' : '瀹℃壒浜嬬敱锛�'" prop="approveReason">
<el-input v-model="form.approveReason" placeholder="璇疯緭鍏�" clearable type="textarea" disabled/>
</el-form-item>
</el-col>
@@ -104,7 +104,7 @@
<h4>浜у搧鏄庣粏</h4>
<el-table :data="currentQuotation.products || []" border style="width: 100%">
<el-table-column prop="product" label="浜у搧鍚嶇О" />
- <el-table-column prop="specificationModel" label="瑙勬牸鍨嬪彿" />
+ <el-table-column prop="specification" label="瑙勬牸鍨嬪彿" />
<el-table-column prop="unit" label="鍗曚綅" />
<el-table-column prop="unitPrice" label="鍗曚环">
<template #default="scope">楼{{ Number(scope.row.unitPrice ?? 0).toFixed(2) }}</template>
@@ -134,10 +134,10 @@
<el-empty v-if="!currentPurchase || !currentPurchase.purchaseContractNumber" description="鏈煡璇㈠埌瀵瑰簲閲囪喘璇︽儏" />
<template v-else>
<el-descriptions :column="2" border>
- <el-descriptions-item label="閲囪喘鍚堝悓鍙�">{{ currentPurchase.purchaseContractNumber }}</el-descriptions-item>
+ <el-descriptions-item label="閲囪喘鍗曞彿">{{ currentPurchase.purchaseContractNumber }}</el-descriptions-item>
<el-descriptions-item label="渚涘簲鍟嗗悕绉�">{{ currentPurchase.supplierName }}</el-descriptions-item>
<el-descriptions-item label="椤圭洰鍚嶇О">{{ currentPurchase.projectName }}</el-descriptions-item>
- <el-descriptions-item label="閿�鍞悎鍚屽彿">{{ currentPurchase.salesContractNo }}</el-descriptions-item>
+ <el-descriptions-item label="閿�鍞崟鍙�">{{ currentPurchase.salesContractNo }}</el-descriptions-item>
<el-descriptions-item label="绛捐鏃ユ湡">{{ currentPurchase.executionDate }}</el-descriptions-item>
<el-descriptions-item label="褰曞叆鏃ユ湡">{{ currentPurchase.entryDate }}</el-descriptions-item>
<el-descriptions-item label="浠樻鏂瑰紡">{{ currentPurchase.paymentMethod }}</el-descriptions-item>
@@ -164,6 +164,34 @@
</el-table>
</div>
</template>
+ </template>
+ </el-skeleton>
+ </div>
+
+ <!-- 鍙戣揣瀹℃壒锛氬睍绀轰骇鍝佸垪琛� -->
+ <div v-if="isDeliveryApproval" style="margin: 10px 0 18px;">
+ <el-divider content-position="left">浜у搧璇︽儏</el-divider>
+ <el-skeleton :loading="deliveryLoading" animated>
+ <template #template>
+ <el-skeleton-item variant="h3" style="width: 30%" />
+ <el-skeleton-item variant="text" style="width: 100%" />
+ <el-skeleton-item variant="text" style="width: 100%" />
+ </template>
+ <template #default>
+ <div style="margin-top: 20px;">
+ <el-table :data="deliveryProducts" border style="width: 100%">
+ <el-table-column prop="productCategory" label="浜у搧鍚嶇О" />
+ <el-table-column prop="specificationModel" label="瑙勬牸鍨嬪彿" />
+ <el-table-column prop="unit" label="鍗曚綅" />
+ <el-table-column prop="quantity" label="鏁伴噺" />
+ <el-table-column prop="taxInclusiveUnitPrice" label="鍚◣鍗曚环">
+ <template #default="scope">楼{{ Number(scope.row.taxInclusiveUnitPrice ?? 0).toFixed(2) }}</template>
+ </el-table-column>
+ <el-table-column prop="taxInclusiveTotalPrice" label="鍚◣鎬讳环">
+ <template #default="scope">楼{{ Number(scope.row.taxInclusiveTotalPrice ?? 0).toFixed(2) }}</template>
+ </el-table-column>
+ </el-table>
+ </div>
</template>
</el-skeleton>
</div>
@@ -196,10 +224,6 @@
</div>
<div v-if="!activity.isShen" class="node-reason">
<span>瀹℃壒鎰忚锛�</span>{{ activity.approveNodeReason }}
- </div>
- <div v-if="!activity.isShen" class="node-reason">
- <span>绛惧悕锛�</span>
- <img :src="activity.urlTem" class="signImg" alt="" v-if="activity.urlTem"/>
</div>
<div v-else-if="activity.isShen">
<el-form-item
@@ -236,6 +260,7 @@
import { WarningFilled, Edit, Check, MoreFilled } from '@element-plus/icons-vue'
import { getQuotationList } from "@/api/salesManagement/salesQuotation.js";
import { getPurchaseByCode } from "@/api/procurementManagement/procurementLedger.js";
+import { productList, ledgerListPage } from "@/api/salesManagement/salesLedger.js";
const emit = defineEmits(['close'])
const { proxy } = getCurrentInstance()
@@ -257,8 +282,11 @@
const currentQuotation = ref({})
const purchaseLoading = ref(false)
const currentPurchase = ref({})
+const deliveryLoading = ref(false)
+const deliveryProducts = ref([])
const isQuotationApproval = computed(() => Number(props.approveType) === 6)
const isPurchaseApproval = computed(() => Number(props.approveType) === 5)
+const isDeliveryApproval = computed(() => Number(props.approveType) === 7)
const data = reactive({
form: {
@@ -313,8 +341,8 @@
getProductOptions().then(() => {
// 纭繚鍊肩被鍨嬪尮閰嶏紙濡傛灉閫夐」宸插姞杞斤級
if (productOptions.value.length > 0 && form.value.approveDeptId) {
- const matchedOption = productOptions.value.find(opt =>
- opt.deptId == form.value.approveDeptId ||
+ const matchedOption = productOptions.value.find(opt =>
+ opt.deptId == form.value.approveDeptId ||
String(opt.deptId) === String(form.value.approveDeptId)
);
if (matchedOption) {
@@ -343,7 +371,7 @@
}
}
- // 閲囪喘瀹℃壒锛氱敤瀹℃壒浜嬬敱瀛楁鎵胯浇鐨�"閲囪喘鍚堝悓鍙�"鍘绘煡閲囪喘璇︽儏
+ // 閲囪喘瀹℃壒锛氱敤瀹℃壒浜嬬敱瀛楁鎵胯浇鐨�"閲囪喘鍗曞彿"鍘绘煡閲囪喘璇︽儏
if (isPurchaseApproval.value) {
const purchaseContractNumber = row?.approveReason;
if (purchaseContractNumber) {
@@ -355,6 +383,39 @@
proxy.$modal.msgError('鏌ヨ閲囪喘璇︽儏澶辫触')
}).finally(() => {
purchaseLoading.value = false
+ })
+ }
+ }
+
+ // 鍙戣揣瀹℃壒锛氭牴鎹� salesLedgerId 鏌ヨ浜у搧鍒楄〃
+ if (isDeliveryApproval.value) {
+ const loadProducts = (salesLedgerId) => {
+ deliveryLoading.value = true
+ productList({ salesLedgerId }).then((res) => {
+ deliveryProducts.value = res?.data || []
+ }).catch((err) => {
+ console.error('鏌ヨ浜у搧鍒楄〃澶辫触:', err)
+ proxy.$modal.msgError('鏌ヨ浜у搧鍒楄〃澶辫触')
+ }).finally(() => {
+ deliveryLoading.value = false
+ })
+ }
+
+ let salesLedgerId = row?.salesLedgerId;
+ if (salesLedgerId) {
+ loadProducts(salesLedgerId)
+ } else if (row?.salesContractNo) {
+ deliveryLoading.value = true
+ ledgerListPage({ salesContractNo: row.salesContractNo, current: 1, size: 1 }).then((res) => {
+ const records = res.records
+ if (records.length > 0) {
+ loadProducts(records[0].id)
+ } else {
+ deliveryLoading.value = false
+ }
+ }).catch((err) => {
+ console.error('鏌ヨ閿�鍞彴璐﹀け璐�:', err)
+ deliveryLoading.value = false
})
}
}
@@ -411,6 +472,8 @@
currentQuotation.value = {}
purchaseLoading.value = false
currentPurchase.value = {}
+ deliveryLoading.value = false
+ deliveryProducts.value = []
emit('close')
};
defineExpose({
@@ -449,4 +512,4 @@
width: 200px;
height: 60px;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3