From 9ea5ff67655241271bdf04bb50ca3a8d60c4e22a Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期二, 11 八月 2026 15:07:02 +0800
Subject: [PATCH] fix: 用河南鹤壁代码覆盖山西长治

---
 src/views/inventoryManagement/receiptManagement/Record.vue |  612 +++++++++++++++++++++++++-----------------------------
 1 files changed, 283 insertions(+), 329 deletions(-)

diff --git a/src/views/inventoryManagement/receiptManagement/Record.vue b/src/views/inventoryManagement/receiptManagement/Record.vue
index 0a01def..2fe86a2 100644
--- a/src/views/inventoryManagement/receiptManagement/Record.vue
+++ b/src/views/inventoryManagement/receiptManagement/Record.vue
@@ -1,52 +1,49 @@
 <template>
   <div>
-    <div class="search_form"
-         style="margin-bottom: 10px;">
-      <el-form ref="searchFormRef"
-               :model="searchForm"
-               class="demo-form-inline">
+    <div class="search_form" style="margin-bottom: 10px;">
+      <el-form
+          ref="searchFormRef"
+          :model="searchForm"
+          class="demo-form-inline"
+      >
         <el-row :gutter="20">
           <el-col :span="4">
-            <el-form-item label="鍏ュ簱鏃ユ湡"
-                          prop="timeStr">
+            <el-form-item label="鍏ュ簱鏃ユ湡" prop="timeStr">
               <el-date-picker v-model="searchForm.timeStr"
                               type="date"
                               placeholder="璇烽�夋嫨鏃ユ湡"
                               value-format="YYYY-MM-DD"
                               format="YYYY-MM-DD"
-                              clearable />
+                              clearable/>
             </el-form-item>
           </el-col>
           <el-col :span="4">
-            <el-form-item label="浜у搧澶х被"
-                          prop="productName">
+            <el-form-item label="浜у搧澶х被" prop="productName">
               <el-input v-model="searchForm.productName"
                         style="width: 240px"
                         placeholder="璇疯緭鍏�"
-                        clearable />
+                        clearable/>
             </el-form-item>
           </el-col>
+
           <el-col :span="4">
-            <el-form-item label="瑙勬牸鍨嬪彿"
-                          prop="model">
+            <el-form-item label="浜у搧瑙勬牸" prop="model">
               <el-input v-model="searchForm.model"
                         style="width: 240px"
                         placeholder="璇疯緭鍏�"
-                        clearable />
+                        clearable/>
             </el-form-item>
           </el-col>
           <el-col :span="4">
-            <el-form-item label="鎵瑰彿"
-                          prop="batchNo">
+            <el-form-item label="鎵瑰彿" prop="batchNo">
               <el-input v-model="searchForm.batchNo"
                         style="width: 240px"
                         placeholder="璇疯緭鍏�"
-                        clearable />
+                        clearable/>
             </el-form-item>
           </el-col>
           <el-col :span="4">
-            <el-form-item label="鏉ユ簮"
-                          prop="recordType">
+            <el-form-item label="鏉ユ簮" prop="recordType">
               <el-select v-model="searchForm.recordType"
                          style="width: 240px"
                          placeholder="璇烽�夋嫨"
@@ -54,17 +51,17 @@
                 <el-option v-for="item in stockRecordTypeOptions"
                            :key="item.value"
                            :label="item.label"
-                           :value="item.value" />
+                           :value="item.value"/>
               </el-select>
             </el-form-item>
           </el-col>
           <!-- 鎸夐挳 -->
           <el-col :span="4">
             <el-form-item>
-              <el-button type="primary"
-                         @click="getList">
+              <el-button type="primary" @click="getList">
                 鎼滅储
               </el-button>
+
               <el-button @click="resetSearch">
                 閲嶇疆
               </el-button>
@@ -74,11 +71,11 @@
       </el-form>
     </div>
     <div class="actions">
-      <el-button type="primary"
+      <!-- <el-button type="primary"
                  :disabled="!canBatchApprove"
                  @click="handleBatchApprove">瀹℃壒</el-button>
       <el-button :disabled="!canReverseApprove"
-                 @click="handleReverseApprove">鍙嶅</el-button>
+                 @click="handleReverseApprove">鍙嶅</el-button> -->
       <el-button @click="handleOut">瀵煎嚭</el-button>
       <el-button type="danger"
                  plain
@@ -98,36 +95,42 @@
         <el-table-column align="center"
                          type="selection"
                          :selectable="isRowSelectable"
-                         width="55" />
+                         width="55"/>
         <el-table-column align="center"
                          label="搴忓彿"
                          type="index"
-                         width="60" />
+                         width="60"/>
         <el-table-column label="鍏ュ簱鎵规"
                          prop="inboundBatches"
-                         width="200"
-                         show-overflow-tooltip />
+                         width="150"
+                         show-overflow-tooltip/>
         <el-table-column label="鍏ュ簱鏃堕棿"
                          prop="createTime"
-                         show-overflow-tooltip />
+                         width="120"
+                         show-overflow-tooltip>
+          <template #default="scope">
+            <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
         <el-table-column label="浜у搧澶х被"
                          prop="productName"
-                         show-overflow-tooltip />
+                         show-overflow-tooltip/>
         <el-table-column label="瑙勬牸鍨嬪彿"
                          prop="model"
-                         show-overflow-tooltip />
+                         show-overflow-tooltip/>
         <el-table-column label="鎵瑰彿"
                          prop="batchNo"
-                         show-overflow-tooltip />
+                         width="180"
+                         show-overflow-tooltip/>
         <el-table-column label="鍗曚綅"
                          prop="unit"
-                         show-overflow-tooltip />
+                         show-overflow-tooltip/>
         <el-table-column label="鍏ュ簱鏁伴噺"
                          prop="stockInNum"
-                         show-overflow-tooltip />
+                         show-overflow-tooltip/>
         <el-table-column label="鍏ュ簱浜�"
                          prop="createBy"
-                         show-overflow-tooltip />
+                         show-overflow-tooltip/>
         <el-table-column label="鏉ユ簮"
                          prop="recordType"
                          show-overflow-tooltip>
@@ -135,380 +138,331 @@
             {{ getRecordType(scope.row.recordType) }}
           </template>
         </el-table-column>
-        <el-table-column v-if="showSourceOrderNoColumn"
-                         label="婧愬崟鍙�"
-                         width="150"
-                         prop="sourceOrderNo"
-                         show-overflow-tooltip>
+        <el-table-column
+            v-if="showSourceOrderNoColumn"
+            label="婧愬崟鍙�"
+            width="150"
+            prop="sourceOrderNo"
+            show-overflow-tooltip>
           <template #default="scope">
             {{ formatSourceOrderNo(scope.row?.sourceOrderNo) }}
           </template>
         </el-table-column>
-        <el-table-column label="瀹℃壒鐘舵��"
+        <!-- <el-table-column label="瀹℃壒鐘舵��"
                          prop="approvalStatus"
                          show-overflow-tooltip>
           <template #default="scope">
-            <el-tag :type="getApprovalStatusTagType(scope.row.approvalStatus)"
-                    size="small">
+            <el-tag :type="getApprovalStatusTagType(scope.row.approvalStatus)" size="small">
               {{ getApprovalStatusLabel(scope.row.approvalStatus) }}
             </el-tag>
           </template>
-        </el-table-column>
+        </el-table-column> -->
       </el-table>
       <pagination v-show="total > 0"
                   :total="total"
                   layout="total, sizes, prev, pager, next, jumper"
                   :page="page.current"
                   :limit="page.size"
-                  @pagination="pageProductChange" />
+                  @pagination="pageProductChange"/>
     </div>
   </div>
 </template>
 
 <script setup>
-  import pagination from "@/components/PIMTable/Pagination.vue";
-  import {
-    ref,
-    reactive,
-    toRefs,
-    computed,
-    onMounted,
-    getCurrentInstance,
-  } from "vue";
-  import { ElMessageBox } from "element-plus";
-  import {
-    getStockInRecordListPage,
-    batchDeletePendingStockInRecords,
-    batchApproveStockInRecords,
-    batchUnapproveStockInRecords,
-  } from "@/api/inventoryManagement/stockInRecord.js";
-  import {
-    findAllQualifiedStockInRecordTypeOptions,
-    // findAllUnQualifiedStockInRecordTypeOptions,
-  } from "@/api/basicData/enum.js";
+import pagination from "@/components/PIMTable/Pagination.vue";
+import {
+  ref,
+  reactive,
+  toRefs,
+  computed,
+  onMounted,
+  getCurrentInstance,
+} from "vue";
+import {ElMessageBox} from "element-plus";
+import {
+  getStockInRecordListPage,
+  batchDeletePendingStockInRecords,
+  batchApproveStockInRecords,
+  batchUnapproveStockInRecords,
+} from "@/api/inventoryManagement/stockInRecord.js";
+import {
+  findAllQualifiedStockInRecordTypeOptions, 
+  // findAllUnQualifiedStockInRecordTypeOptions,
+} from "@/api/basicData/enum.js";
+import { parseTime } from "@/utils/ruoyi";
 
-  const { proxy } = getCurrentInstance();
+const {proxy} = getCurrentInstance();
 
-  const props = defineProps({
-    type: {
-      type: String,
-      required: true,
-      default: "0",
-    },
-    topParentProductId: {
-      type: [String, Number],
-      default: undefined,
-    },
-  });
+const props = defineProps({
+  type: {
+    type: String,
+    required: true,
+    default: '0'
+  },
+  topParentProductId: {
+    type: [String, Number],
+    default: undefined
+  }
+})
 
-  const tableData = ref([]);
-  const selectedRows = ref([]);
-  const tableLoading = ref(false);
-  // 鏉ユ簮绫诲瀷閫夐」
-  const stockRecordTypeOptions = ref([]);
-  const page = reactive({
-    current: 1,
-    size: 10,
-  });
-  const total = ref(0);
+const tableData = ref([]);
+const selectedRows = ref([]);
+const tableLoading = ref(false);
+// 鏉ユ簮绫诲瀷閫夐」
+const stockRecordTypeOptions = ref([]);
+const page = reactive({
+  current: 1,
+  size: 10,
+});
+const total = ref(0);
 
-  const data = reactive({
-    searchForm: {
-      productName: "",
-      batchNo: "",
-      model: "",
-      timeStr: "",
-      recordType: "",
-    },
-  });
-  const { searchForm } = toRefs(data);
-  const searchFormRef = ref(null);
+const data = reactive({
+  searchForm: {
+    productName: "",
+    batchNo: "",
+    model: "",
+    timeStr: "",
+    recordType: "",
+  },
+});
+const {searchForm} = toRefs(data);
+const searchFormRef = ref(null);
 
-  const resetSearch = () => {
-    searchFormRef.value?.resetFields();
-    page.current = 1;
-    getList();
-  };
+const resetSearch = () => {
+  searchFormRef.value?.resetFields();
+  page.current = 1;
+  getList();
+}
 
-  const getRecordType = recordType => {
-    return (
-      stockRecordTypeOptions.value.find(item => item.value === recordType)
-        ?.label || ""
-    );
-  };
+const getRecordType = (recordType) => {
+  return stockRecordTypeOptions.value.find(item => item.value === recordType)?.label || ''
+}
 
-  const approvalStatusLabelMap = {
-    0: "寰呭鎵�",
-    1: "閫氳繃",
-    2: "椹冲洖",
-    pending: "寰呭鎵�",
-    approved: "閫氳繃",
-    rejected: "椹冲洖",
-    PENDING: "寰呭鎵�",
-    APPROVED: "閫氳繃",
-    REJECTED: "椹冲洖",
-  };
-  approvalStatusLabelMap[3] = "寰呯‘璁�";
+const approvalStatusLabelMap = {
+  0: "寰呭鎵�",
+  1: "閫氳繃",
+  2: "椹冲洖",
+  pending: "寰呭鎵�",
+  approved: "閫氳繃",
+  rejected: "椹冲洖",
+  PENDING: "寰呭鎵�",
+  APPROVED: "閫氳繃",
+  REJECTED: "椹冲洖",
+};
+approvalStatusLabelMap[3] = "寰呯‘璁�";
 
-  const getApprovalStatusLabel = status => {
-    if (status === null || status === undefined || status === "") {
-      return "寰呭鎵�";
-    }
-    return approvalStatusLabelMap[status] || "寰呭鎵�";
-  };
+const getApprovalStatusLabel = (status) => {
+  if (status === null || status === undefined || status === "") {
+    return "寰呭鎵�";
+  }
+  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";
-  };
+// 閫氳繃/椹冲洖鍥哄畾鑹诧紱鍏朵綑锛堝惈寰呭鎵广�佺┖鍊笺�佹湭鏄犲皠浣嗘枃妗堜负寰呭鎵癸級缁熶竴鐢� 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 isPendingApproval = status => {
-    return (
-      status === 0 ||
-      status === "0" ||
-      status === "pending" ||
-      status === "PENDING" ||
-      status === null ||
-      status === undefined ||
-      status === ""
-    );
-  };
+const isPendingApproval = status => {
+  return status === 0 || status === "0" || status === "pending" || status === "PENDING" || status === null || status === undefined || status === "";
+};
 
-  const isRejectedApproval = status => {
-    return (
-      status === 2 ||
-      status === "2" ||
-      status === "rejected" ||
-      status === "REJECTED"
-    );
-  };
+const isRejectedApproval = status => {
+  return status === 2 || status === "2" || status === "rejected" || status === "REJECTED";
+};
 
-  const isRowSelectable = row => {
-    return (
-      isPendingApproval(row?.approvalStatus) ||
-      isRejectedApproval(row?.approvalStatus)
-    );
-  };
+const isRowSelectable = row => {
+  return isPendingApproval(row?.approvalStatus) || isRejectedApproval(row?.approvalStatus);
+};
 
-  const canBatchApprove = computed(() => {
-    return (
-      selectedRows.value.length > 0 &&
-      selectedRows.value.every(row => isPendingApproval(row.approvalStatus))
-    );
-  });
+const canBatchApprove = computed(() => {
+  return selectedRows.value.length > 0
+      && selectedRows.value.every(row => isPendingApproval(row.approvalStatus));
+});
 
-  const canReverseApprove = computed(() => {
-    return (
-      selectedRows.value.length > 0 &&
-      selectedRows.value.every(row => isRejectedApproval(row.approvalStatus))
-    );
-  });
+const canReverseApprove = computed(() => {
+  return selectedRows.value.length > 0
+      && selectedRows.value.every(row => isRejectedApproval(row.approvalStatus));
+});
 
-  const canDelete = computed(() => canBatchApprove.value);
-  const showSourceOrderNoColumn = computed(() => {
-    const topParentProductId = Number(props.topParentProductId);
-    return topParentProductId === 276 || topParentProductId === 278;
-  });
+const canDelete = computed(() => canBatchApprove.value);
+const showSourceOrderNoColumn = computed(() => {
+  const topParentProductId = Number(props.topParentProductId);
+  return topParentProductId === 1 || topParentProductId === 3;
+});
 
-  const formatSourceOrderNo = value => {
-    const text = String(value ?? "").trim();
-    return text || "--";
-  };
+const formatSourceOrderNo = (value) => {
+  const text = String(value ?? "").trim();
+  return text || "--";
+};
 
-  const pageProductChange = obj => {
-    page.current = obj.page;
-    page.size = obj.limit;
-    getList();
-  };
+const pageProductChange = obj => {
+  page.current = obj.page;
+  page.size = obj.limit;
+  getList();
+};
 
-  const getList = () => {
-    tableLoading.value = true;
-    getStockInRecordListPage(
-      Object.assign(
-        {},
-        {
-          ...searchForm.value,
-          ...page,
-          topParentProductId: props.topParentProductId,
-        }
-      )
-    )
+const getList = () => {
+  tableLoading.value = true;
+  getStockInRecordListPage(Object.assign({}, {...searchForm.value, ...page,  topParentProductId: props.topParentProductId}))
       .then(res => {
         tableData.value = res.data.records;
         total.value = res.data.total || 0;
-      })
-      .finally(() => {
-        tableLoading.value = false;
-      });
-  };
+      }).finally(() => {
+    tableLoading.value = false;
+  })
+};
 
-  // 鑾峰彇鏉ユ簮绫诲瀷閫夐」
-  const fetchStockRecordTypeOptions = () => {
-    if (props.type === "0") {
-      findAllQualifiedStockInRecordTypeOptions().then(res => {
-        stockRecordTypeOptions.value = res.data;
-      });
-      return;
-    }
-    // findAllUnQualifiedStockInRecordTypeOptions()
-    //     .then(res => {
-    //       stockRecordTypeOptions.value = res.data;
-    //     })
-  };
+// 鑾峰彇鏉ユ簮绫诲瀷閫夐」
+const fetchStockRecordTypeOptions = () => {
+  if (props.type === '0') {
+    findAllQualifiedStockInRecordTypeOptions()
+        .then(res => {
+          stockRecordTypeOptions.value = res.data;
+        })
+    return
+  }
+  // findAllUnQualifiedStockInRecordTypeOptions()
+  //     .then(res => {
+  //       stockRecordTypeOptions.value = res.data;
+  //     })
+}
 
-  // 琛ㄦ牸閫夋嫨鏁版嵁
-  const handleSelectionChange = selection => {
-    selectedRows.value = selection.filter(
-      item => item.id && isRowSelectable(item)
-    );
-  };
+// 琛ㄦ牸閫夋嫨鏁版嵁
+const handleSelectionChange = selection => {
+  selectedRows.value = selection.filter(item => item.id && isRowSelectable(item));
+};
 
-  const expandedRowKeys = ref([]);
+const expandedRowKeys = ref([]);
 
-  const handleReverseApprove = () => {
-    if (!canReverseApprove.value) {
-      proxy.$modal.msgWarning("璇烽�夋嫨宸查┏鍥炵殑鏁版嵁");
-      return;
-    }
-    const ids = selectedRows.value.map(item => item.id);
-    ElMessageBox.confirm("鍙嶅鍚庤褰曞皢鎭㈠涓哄緟瀹℃壒鐘舵�侊紝鏄惁纭鍙嶅锛�", "鍙嶅", {
-      confirmButtonText: "纭",
-      cancelButtonText: "鍙栨秷",
-      type: "warning",
-    })
+const handleReverseApprove = () => {
+  if (!canReverseApprove.value) {
+    proxy.$modal.msgWarning("璇烽�夋嫨宸查┏鍥炵殑鏁版嵁");
+    return;
+  }
+  const ids = selectedRows.value.map(item => item.id);
+  ElMessageBox.confirm("鍙嶅鍚庤褰曞皢鎭㈠涓哄緟瀹℃壒鐘舵�侊紝鏄惁纭鍙嶅锛�", "鍙嶅", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  })
       .then(() => {
-        batchUnapproveStockInRecords({ ids })
-          .then(() => {
-            proxy.$modal.msgSuccess("鍙嶅鎴愬姛");
-            getList();
-          })
-          .catch(() => {
-            proxy.$modal.msgError("鍙嶅澶辫触");
-          });
+        batchUnapproveStockInRecords({ids})
+            .then(() => {
+              proxy.$modal.msgSuccess("鍙嶅鎴愬姛");
+              getList();
+            })
+            .catch(() => {
+              proxy.$modal.msgError("鍙嶅澶辫触");
+            });
       })
       .catch(() => {
         proxy.$modal.msg("宸插彇娑�");
       });
-  };
+};
 
-  const handleBatchApprove = () => {
-    if (!canBatchApprove.value) {
-      proxy.$modal.msgWarning("璇烽�夋嫨寰呭鎵圭殑鏁版嵁");
-      return;
-    }
-    const ids = selectedRows.value.map(item => item.id);
-    ElMessageBox.confirm("璇烽�夋嫨瀹℃壒缁撴灉", "瀹℃壒", {
-      confirmButtonText: "閫氳繃",
-      cancelButtonText: "椹冲洖",
-      type: "warning",
-      distinguishCancelAndClose: true,
-    })
+const handleBatchApprove = () => {
+  if (!canBatchApprove.value) {
+    proxy.$modal.msgWarning("璇烽�夋嫨寰呭鎵圭殑鏁版嵁");
+    return;
+  }
+  const ids = selectedRows.value.map(item => item.id);
+  ElMessageBox.confirm("璇烽�夋嫨瀹℃壒缁撴灉", "瀹℃壒", {
+    confirmButtonText: "閫氳繃",
+    cancelButtonText: "椹冲洖",
+    type: "warning",
+    distinguishCancelAndClose: true,
+  })
       .then(() => {
-        batchApproveStockInRecords({ ids, approvalStatus: 1 })
-          .then(() => {
-            proxy.$modal.msgSuccess("瀹℃壒閫氳繃鎴愬姛");
-            getList();
-          })
-          .catch(() => {
-            proxy.$modal.msgError("瀹℃壒閫氳繃澶辫触");
-          });
-      })
-      .catch(action => {
-        if (action === "cancel") {
-          batchApproveStockInRecords({ ids, approvalStatus: 2 })
+        batchApproveStockInRecords({ids, approvalStatus: 1})
             .then(() => {
-              proxy.$modal.msgSuccess("瀹℃壒椹冲洖鎴愬姛");
+              proxy.$modal.msgSuccess("瀹℃壒閫氳繃鎴愬姛");
               getList();
             })
             .catch(() => {
-              proxy.$modal.msgError("瀹℃壒椹冲洖澶辫触");
+              proxy.$modal.msgError("瀹℃壒閫氳繃澶辫触");
             });
+      })
+      .catch((action) => {
+        if (action === "cancel") {
+          batchApproveStockInRecords({ids, approvalStatus: 2})
+              .then(() => {
+                proxy.$modal.msgSuccess("瀹℃壒椹冲洖鎴愬姛");
+                getList();
+              })
+              .catch(() => {
+                proxy.$modal.msgError("瀹℃壒椹冲洖澶辫触");
+              });
           return;
         }
         proxy.$modal.msg("宸插彇娑�");
       });
-  };
+};
 
-  // 瀵煎嚭
-  const handleOut = () => {
-    ElMessageBox.confirm("鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
-      confirmButtonText: "纭",
-      cancelButtonText: "鍙栨秷",
-      type: "warning",
-    })
+// 瀵煎嚭
+const handleOut = () => {
+  ElMessageBox.confirm("鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  })
       .then(() => {
         // 鏍规嵁涓嶅悓鐨� tab 绫诲瀷璋冪敤涓嶅悓鐨勫鍑烘帴鍙�
-        proxy.download(
-          "/stockInRecord/exportStockInRecord",
-          { type: props.type },
-          props.type === "0" ? "鍚堟牸鍏ュ簱.xlsx" : "涓嶅悎鏍煎叆搴�.xlsx"
-        );
+        proxy.download("/stockInRecord/exportStockInRecord", {type: props.type}, props.type === '0' ? "鍚堟牸鍏ュ簱.xlsx" : "涓嶅悎鏍煎叆搴�.xlsx");
       })
       .catch(() => {
         proxy.$modal.msg("宸插彇娑�");
       });
-  };
+};
 
-  // 鍒犻櫎
-  const handleDelete = () => {
-    if (!canDelete.value) {
-      proxy.$modal.msgWarning("璇烽�夋嫨寰呭鎵圭殑鏁版嵁");
-      return;
-    }
-    const ids = selectedRows.value.map(item => item.id);
+// 鍒犻櫎
+const handleDelete = () => {
+  if (!canDelete.value) {
+    proxy.$modal.msgWarning("璇烽�夋嫨寰呭鎵圭殑鏁版嵁");
+    return;
+  }
+  const ids = selectedRows.value.map(item => item.id);
 
-    ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "鍒犻櫎", {
-      confirmButtonText: "纭",
-      cancelButtonText: "鍙栨秷",
-      type: "warning",
-    })
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "鍒犻櫎", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  })
       .then(() => {
         batchDeletePendingStockInRecords(ids)
-          .then(() => {
-            proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
-            getList();
-          })
-          .catch(() => {
-            proxy.$modal.msgError("鍒犻櫎澶辫触");
-          });
+            .then(() => {
+              proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+              getList();
+            })
+            .catch(() => {
+              proxy.$modal.msgError("鍒犻櫎澶辫触");
+            });
       })
       .catch(() => {
         proxy.$modal.msg("宸插彇娑�");
       });
-  };
+};
 
-  onMounted(() => {
+onMounted(() => {
+  getList();
+  fetchStockRecordTypeOptions();
+});
+
+watch(
+  () => props.topParentProductId,
+  () => {
+    page.current = 1;
     getList();
-    fetchStockRecordTypeOptions();
-  });
-
-  watch(
-    () => props.topParentProductId,
-    () => {
-      page.current = 1;
-      getList();
-    }
-  );
+  }
+);
 </script>
 
 <style scoped lang="scss">
-  .actions {
-    display: flex;
-    justify-content: flex-end;
-    margin-bottom: 10px;
-  }
+.actions {
+  display: flex;
+  justify-content: flex-end;
+  margin-bottom: 10px;
+}
 </style>

--
Gitblit v1.9.3