From 7fb3beda17ba7f5e71f949112141455ab7b69970 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 30 五月 2026 10:40:56 +0800
Subject: [PATCH] 富边电子 1.协同办公的发货审批点详情时候展示具体的产品明细

---
 src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
index a0b93b5..4ae0f3c 100644
--- a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
+++ b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
@@ -168,6 +168,36 @@
         </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>
+            <el-empty v-if="!deliveryProducts || deliveryProducts.length === 0" description="鏈煡璇㈠埌瀵瑰簲浜у搧淇℃伅" />
+            <div v-else style="margin-top: 20px;">
+              <h4>浜у搧鏄庣粏</h4>
+              <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>
+
       <el-form :model="{ activities }" ref="formRef" label-position="top">
         <el-steps :active="getActiveStep()" finish-status="success" process-status="process" align-center direction="vertical">
           <el-step
@@ -232,6 +262,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 } from "@/api/salesManagement/salesLedger.js";
 const emit = defineEmits(['close'])
 const { proxy } = getCurrentInstance()
 
@@ -253,8 +284,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: {
@@ -355,6 +389,22 @@
     }
   }
 
+  // 鍙戣揣瀹℃壒锛氭牴鎹� salesLedgerId 鏌ヨ浜у搧鍒楄〃
+  if (isDeliveryApproval.value) {
+    const salesLedgerId = row?.salesLedgerId;
+    if (salesLedgerId) {
+      deliveryLoading.value = true
+      productList({ salesLedgerId }).then((res) => {
+        deliveryProducts.value = res?.data || []
+      }).catch((err) => {
+        console.error('鏌ヨ浜у搧鍒楄〃澶辫触:', err)
+        proxy.$modal.msgError('鏌ヨ浜у搧鍒楄〃澶辫触')
+      }).finally(() => {
+        deliveryLoading.value = false
+      })
+    }
+  }
+
   approveProcessDetails(row.approveId).then((res) => {
     activities.value = res.data
     // 澧炲姞isApproval瀛楁
@@ -407,6 +457,8 @@
   currentQuotation.value = {}
   purchaseLoading.value = false
   currentPurchase.value = {}
+  deliveryLoading.value = false
+  deliveryProducts.value = []
   emit('close')
 };
 defineExpose({

--
Gitblit v1.9.3