From 3ba3f48fdf21d48f9443befc6b53af82e2206607 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期一, 11 五月 2026 14:41:53 +0800
Subject: [PATCH] ai人物更新

---
 src/views/inventoryManagement/receiptManagement/Record.vue |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/src/views/inventoryManagement/receiptManagement/Record.vue b/src/views/inventoryManagement/receiptManagement/Record.vue
index 013bac5..c9cb6ee 100644
--- a/src/views/inventoryManagement/receiptManagement/Record.vue
+++ b/src/views/inventoryManagement/receiptManagement/Record.vue
@@ -1,6 +1,6 @@
 <template>
-  <div class="app-container">
-    <div class="search_form">
+  <div>
+    <div class="search_form" style="margin-bottom: 10px;">
       <div>
         <span class="search_title ml10">鍏ュ簱鏃ユ湡锛�</span>
         <el-date-picker v-model="searchForm.timeStr"
@@ -91,7 +91,9 @@
                          prop="approvalStatus"
                          show-overflow-tooltip>
           <template #default="scope">
-            {{ getApprovalStatusLabel(scope.row.approvalStatus) }}
+            <el-tag :type="getApprovalStatusTagType(scope.row.approvalStatus)" size="small">
+              {{ getApprovalStatusLabel(scope.row.approvalStatus) }}
+            </el-tag>
           </template>
         </el-table-column>
       </el-table>
@@ -117,7 +119,7 @@
 import {ElMessageBox} from "element-plus";
 import {
   getStockInRecordListPage,
-  batchDeleteStockInRecords,
+  batchDeletePendingStockInRecords,
   batchApproveStockInRecords,
 } from "@/api/inventoryManagement/stockInRecord.js";
 import {
@@ -187,6 +189,13 @@
   return approvalStatusLabelMap[status] || "寰呭鎵�";
 };
 
+// 閫氳繃/椹冲洖鍥哄畾鑹诧紱鍏朵綑锛堝惈寰呭鎵广�佺┖鍊笺�佹湭鏄犲皠浣嗘枃妗堜负寰呭鎵癸級缁熶竴鐢� warning 棰勮鑹�
+const getApprovalStatusTagType = (status) => {
+  if (status === 1 || status === "1" || status === "approved" || status === "APPROVED") return "success";
+  if (status === 2 || status === "2" || status === "rejected" || status === "REJECTED") return "danger";
+  return "warning";
+};
+
 const pageProductChange = obj => {
   page.current = obj.page;
   page.size = obj.limit;
@@ -195,7 +204,7 @@
 
 const getList = () => {
   tableLoading.value = true;
-  const params = {...page, type: props.type, topParentProductId: props.topParentProductId};
+  const params = {...page,  topParentProductId: props.topParentProductId};
   params.timeStr = searchForm.value.timeStr;
   params.productName = searchForm.value.productName;
   params.recordType = searchForm.value.recordType;
@@ -243,7 +252,7 @@
     distinguishCancelAndClose: true,
   })
       .then(() => {
-        batchApproveStockInRecords({ids, approvalStatus: "閫氳繃"})
+        batchApproveStockInRecords({ids, approvalStatus: 1})
             .then(() => {
               proxy.$modal.msgSuccess("瀹℃壒閫氳繃鎴愬姛");
               getList();
@@ -254,7 +263,7 @@
       })
       .catch((action) => {
         if (action === "cancel") {
-          batchApproveStockInRecords({ids, approvalStatus: "椹冲洖"})
+          batchApproveStockInRecords({ids, approvalStatus: 2})
               .then(() => {
                 proxy.$modal.msgSuccess("瀹℃壒椹冲洖鎴愬姛");
                 getList();
@@ -298,7 +307,7 @@
     type: "warning",
   })
       .then(() => {
-        batchDeleteStockInRecords(ids)
+        batchDeletePendingStockInRecords(ids)
             .then(() => {
               proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
               getList();

--
Gitblit v1.9.3