From 380bff56969c0f3d2db224b9cb9968a2e073e927 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期五, 22 五月 2026 17:58:31 +0800
Subject: [PATCH] feat(approval): 添加发货审批产品信息展示功能
---
src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue | 63 +++++++++++++++++++++++++++++++
1 files changed, 62 insertions(+), 1 deletions(-)
diff --git a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
index 5a79c02..448b0c3 100644
--- a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
+++ b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
@@ -228,6 +228,40 @@
</el-skeleton>
</div>
+ <!-- 鍙戣揣瀹℃壒锛氬睍绀哄搴斾骇鍝佷俊鎭� -->
+ <div v-if="isShipmentApproval" style="margin: 10px 0 18px;">
+ <el-divider content-position="left">浜у搧淇℃伅</el-divider>
+ <el-skeleton :loading="shipmentProductLoading" 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="!currentShipmentProduct || !currentShipmentProduct.id"
+ description="鏈煡璇㈠埌瀵瑰簲浜у搧淇℃伅"
+ />
+ <template v-else>
+ <el-descriptions :column="2" border>
+ <el-descriptions-item label="浜у搧澶х被">
+ {{ currentShipmentProduct.productCategory || "-" }}
+ </el-descriptions-item>
+ <el-descriptions-item label="瑙勬牸鍨嬪彿">
+ {{ currentShipmentProduct.specificationModel || "-" }}
+ </el-descriptions-item>
+ <el-descriptions-item label="鍗曚綅">
+ {{ currentShipmentProduct.unit || "-" }}
+ </el-descriptions-item>
+ <el-descriptions-item label="鏁伴噺">
+ {{ currentShipmentProduct.quantity ?? "-" }}
+ </el-descriptions-item>
+ </el-descriptions>
+ </template>
+ </template>
+ </el-skeleton>
+ </div>
+
<el-form :model="{ activities }" ref="formRef" label-position="top">
@@ -295,6 +329,7 @@
import { getQuotationList } from "@/api/salesManagement/salesQuotation.js";
import { getPurchaseByCode } from "@/api/procurementManagement/procurementLedger.js";
import { getStockInRecordById } from "@/api/inventoryManagement/stockInRecord.js";
+import { getSalesProductById } from "@/api/salesManagement/salesLedger.js";
const emit = defineEmits(['close'])
const { proxy } = getCurrentInstance()
@@ -318,8 +353,11 @@
const currentPurchase = ref({})
const stockInLoading = ref(false)
const currentStockIn = ref({})
+const shipmentProductLoading = ref(false)
+const currentShipmentProduct = ref({})
const isQuotationApproval = computed(() => Number(props.approveType) === 6)
const isPurchaseApproval = computed(() => Number(props.approveType) === 5)
+const isShipmentApproval = computed(() => Number(props.approveType) === 7)
const isInventoryApproval = computed(() => Number(props.approveType) === 9)
const data = reactive({
@@ -366,6 +404,7 @@
currentQuotation.value = {}
currentPurchase.value = {}
currentStockIn.value = {}
+ currentShipmentProduct.value = {}
userListNoPageByTenantId().then((res) => {
userList.value = res.data;
});
@@ -423,6 +462,26 @@
}).finally(() => {
purchaseLoading.value = false
})
+ }
+ }
+
+ // 鍙戣揣瀹℃壒锛氭牴鎹鎵瑰垪琛ㄤ腑鐨� recordId 鏌ヨ瀵瑰簲浜у搧璇︽儏
+ if (isShipmentApproval.value) {
+ const recordId = row?.recordId;
+ form.value.recordId = recordId ?? form.value.recordId;
+ if (recordId) {
+ shipmentProductLoading.value = true;
+ getSalesProductById({ id: recordId })
+ .then((res) => {
+ currentShipmentProduct.value = res?.data || res || {};
+ })
+ .catch((err) => {
+ console.error("鏌ヨ鍙戣揣浜у搧璇︽儏澶辫触:", err);
+ proxy.$modal.msgError("鏌ヨ鍙戣揣浜у搧璇︽儏澶辫触");
+ })
+ .finally(() => {
+ shipmentProductLoading.value = false;
+ });
}
}
@@ -510,6 +569,8 @@
currentPurchase.value = {}
stockInLoading.value = false
currentStockIn.value = {}
+ shipmentProductLoading.value = false
+ currentShipmentProduct.value = {}
emit('close')
};
defineExpose({
@@ -548,4 +609,4 @@
width: 200px;
height: 60px;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3