From 3639cc3129fe3433f110a18d53b1cae2c4f4ff8e Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 10 三月 2026 17:37:24 +0800
Subject: [PATCH] fix: 入库流程优化

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

diff --git a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
index c3fb6d1..323953c 100644
--- a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
+++ b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
@@ -39,6 +39,59 @@
 						</el-form-item>
 					</el-col>
 				</el-row>
+        <!-- 鍏ュ簱瀹℃壒锛氬睍绀哄叆搴撲俊鎭� -->
+        <!-- <el-row v-if="isInventoryApproval">
+          <el-col :span="24">
+            <el-form-item label="鏄惁鍏ュ簱瀹℃牳閫氳繃锛�">
+              <el-tag :type="form.inventoryReview ? 'success' : 'danger'">
+                {{ form.inventoryReview ? '鏄�' : '鍚�' }}
+              </el-tag>
+            </el-form-item>
+          </el-col>
+        </el-row> -->
+        <el-row v-if="isInventoryApproval">
+          <el-col :span="12">
+            <el-form-item label="鍏ュ簱绫诲瀷锛�">
+              <el-tag type="info">
+                {{ form.storageType || '-' }}
+              </el-tag>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鍏ュ簱鏁伴噺锛�">
+              <el-tag type="warning">
+                {{ currentStockIn.stockInNum ?? '-' }}
+              </el-tag>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <!-- 鍏ュ簱瀹℃壒锛氬睍绀哄叆搴撳彴璐︽槑缁嗭紙瀛楁褰㈠紡锛� -->
+      <el-row v-if="isInventoryApproval" style="margin-top: 10px">
+        <el-col :span="12">
+          <el-form-item label="浜у搧鍚嶇О锛�">
+            <el-tag type="info">
+              {{ currentStockIn.productName || '-' }}
+            </el-tag>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="瑙勬牸鍨嬪彿锛�">
+            <el-tag type="info">
+              {{ currentStockIn.model || '-' }}
+            </el-tag>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row v-if="isInventoryApproval">
+        
+        <el-col :span="24">
+          <el-form-item label="鐢熶骇璁㈠崟鍙凤細">
+            <el-tag type="info">
+              {{ currentStockIn.npsNo || '-' }}
+            </el-tag>
+          </el-form-item>
+        </el-col>
+      </el-row>
 				<!-- 瀹℃壒浜洪�夋嫨锛堝姩鎬佽妭鐐癸級 -->
 				<el-row :gutter="30">
 					<el-col :span="12">
@@ -104,7 +157,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>
@@ -168,6 +221,8 @@
         </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
@@ -196,10 +251,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 +287,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 { getStockInRecordById } from "@/api/inventoryManagement/stockInRecord.js";
 const emit = defineEmits(['close'])
 const { proxy } = getCurrentInstance()
 
@@ -257,8 +309,11 @@
 const currentQuotation = ref({})
 const purchaseLoading = ref(false)
 const currentPurchase = ref({})
+const stockInLoading = ref(false)
+const currentStockIn = ref({})
 const isQuotationApproval = computed(() => Number(props.approveType) === 6)
 const isPurchaseApproval = computed(() => Number(props.approveType) === 5)
+const isInventoryApproval = computed(() => Number(props.approveType) === 9)
 
 const data = reactive({
 	form: {
@@ -268,6 +323,10 @@
 		approveDeptId: "",
 		approveReason: "",
 		checkResult: "",
+    inventoryReview: false,
+    storageType: "",
+    stockInNum: null,
+    recordId: null,
 	},
 });
 const { form } = toRefs(data);
@@ -299,6 +358,7 @@
   dialogFormVisible.value = true;
   currentQuotation.value = {}
   currentPurchase.value = {}
+  currentStockIn.value = {}
 	userListNoPageByTenantId().then((res) => {
 		userList.value = res.data;
 	});
@@ -359,6 +419,28 @@
     }
   }
 
+  // 鍏ュ簱瀹℃壒锛氭牴鎹� recordId 鏌ヨ鍏ュ簱鍙拌处璇︽儏
+  if (isInventoryApproval.value) {
+    const recordId = row?.recordId;
+    form.value.recordId = recordId ?? form.value.recordId;
+    form.value.inventoryReview = row?.inventoryReview ?? form.value.inventoryReview;
+    form.value.storageType = row?.storageType ?? form.value.storageType;
+    if (recordId) {
+      stockInLoading.value = true;
+      getStockInRecordById(recordId)
+        .then((res) => {
+          currentStockIn.value = res?.data || res || {};
+        })
+        .catch((err) => {
+          console.error("鏌ヨ鍏ュ簱璁板綍澶辫触:", err);
+          proxy.$modal.msgError("鏌ヨ鍏ュ簱璁板綍澶辫触");
+        })
+        .finally(() => {
+          stockInLoading.value = false;
+        });
+    }
+  }
+
   approveProcessDetails(row.approveId).then((res) => {
     activities.value = res.data
     // 澧炲姞isApproval瀛楁
@@ -396,6 +478,14 @@
     return;
   }
   currentActivity.approveNodeStatus = status;
+  // 濮嬬粓甯︿笂褰撳墠瀹℃壒绫诲瀷锛堝叆搴撳鎵逛负 9锛�
+  currentActivity.approveType = Number(props.approveType);
+  // 鍏ュ簱瀹℃壒锛氭妸鍏ュ簱鐩稿叧瀛楁鍐欏叆褰撳墠鑺傜偣
+  if (isInventoryApproval.value) {
+    currentActivity.recordId = form.value.recordId;
+    currentActivity.storageType = form.value.storageType;
+    currentActivity.inventoryReview = status === 1;
+  }
   // 鍒ゆ柇鏄惁涓烘渶鍚庝竴姝�
   const isLast = activities.value.findIndex(a => a.isShen) === activities.value.length-1;
   updateApproveNode({ ...currentActivity, isLast }).then(() => {
@@ -411,6 +501,8 @@
   currentQuotation.value = {}
   purchaseLoading.value = false
   currentPurchase.value = {}
+  stockInLoading.value = false
+  currentStockIn.value = {}
   emit('close')
 };
 defineExpose({

--
Gitblit v1.9.3