From 2fc20934018994b7a8abe5199d717a29283cbb8e Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期一, 16 三月 2026 16:44:24 +0800
Subject: [PATCH] 协同审批:增加原料管理页面

---
 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 20a4ee6..cb0b2a5 100644
--- a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
+++ b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
@@ -168,6 +168,43 @@
         </el-skeleton>
       </div>
 
+      <div v-if="isRawMaterialApproval" style="margin: 10px 0 18px;">
+        <el-divider content-position="left">鍘熸枡璇︽儏</el-divider>
+        <el-skeleton :loading="rawMaterialLoading" 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="!currentRawMaterial" description="鏈煡璇㈠埌瀵瑰簲鍘熸枡璇︽儏" />
+            <template v-else>
+              <el-descriptions :column="2" border>
+                <el-descriptions-item label="浜у搧鍚嶇О">{{ currentRawMaterial.productName }}</el-descriptions-item>
+                <el-descriptions-item label="瑙勬牸">{{ currentRawMaterial.model }}</el-descriptions-item>
+                <el-descriptions-item label="鍗曚綅">{{ currentRawMaterial.unit }}</el-descriptions-item>
+                <el-descriptions-item label="鎵瑰彿">{{ currentRawMaterial.batchNo }}</el-descriptions-item>
+                <el-descriptions-item label="妫�楠岀被鍨�">{{ currentRawMaterial.checkTypeText }}</el-descriptions-item>
+                <el-descriptions-item label="妫�娴嬬粨鏋�">{{ currentRawMaterial.checkResultText }}</el-descriptions-item>
+                <el-descriptions-item label="妫�楠屽憳">{{ currentRawMaterial.checkUserName }}</el-descriptions-item>
+                <el-descriptions-item label="妫�娴嬫棩鏈�">{{ currentRawMaterial.checkTime }}</el-descriptions-item>
+              </el-descriptions>
+
+              <div style="margin-top: 20px;">
+                <h4>妫�娴嬮」鐩槑缁�</h4>
+                <el-table :data="currentRawMaterial.qualityInspectItem || []" border style="width: 100%">
+                  <el-table-column prop="name" label="妫�娴嬮」鐩�" />
+                  <el-table-column prop="unit" label="鍗曚綅" />
+                  <el-table-column prop="standardValue" label="鏍囧噯鍊�" />
+                  <el-table-column prop="internalControl" label="鍐呮帶鍊�" />
+                  <el-table-column prop="testValue" label="鍖栭獙鍊�" />
+                </el-table>
+              </div>
+            </template>
+          </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 +269,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 {findRawMaterialDetail} from "@/api/qualityManagement/rawMaterial.js";
 const emit = defineEmits(['close'])
 const { proxy } = getCurrentInstance()
 
@@ -252,9 +290,12 @@
 const quotationLoading = ref(false)
 const currentQuotation = ref({})
 const purchaseLoading = ref(false)
+const rawMaterialLoading = ref(false)
 const currentPurchase = ref({})
+const currentRawMaterial = ref({})
 const isQuotationApproval = computed(() => Number(props.approveType) === 6)
 const isPurchaseApproval = computed(() => Number(props.approveType) === 5)
+const isRawMaterialApproval = computed(() => Number(props.approveType) === 9)
 
 const data = reactive({
 	form: {
@@ -291,10 +332,12 @@
 
 // 鎵撳紑寮规
 const openDialog = (type, row) => {
+  console.log(type, row);
   operationType.value = type;
   dialogFormVisible.value = true;
   currentQuotation.value = {}
   currentPurchase.value = {}
+  currentRawMaterial.value = {}
 	userListNoPageByTenantId().then((res) => {
 		userList.value = res.data;
 	});
@@ -355,6 +398,15 @@
     }
   }
 
+  if (isRawMaterialApproval.value) {
+    rawMaterialLoading.value = true
+    findRawMaterialDetail(row.approveRecordId).then(res => {
+      currentRawMaterial.value = res.data;
+    }).finally(() => {
+      rawMaterialLoading.value = false
+    })
+  }
+
   approveProcessDetails(row.approveId).then((res) => {
     activities.value = res.data
     // 澧炲姞isApproval瀛楁

--
Gitblit v1.9.3