9 天以前 63afcf7bd6eff23e4feee8b6d12053bd8e78abb8
src/views/inventoryManagement/dispatchLog/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
@@ -96,7 +96,9 @@
        </el-table-column>
            <el-table-column label="审批状态" 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>
@@ -120,7 +122,7 @@
import { getCurrentDate } from "@/utils/index.js";
import {
   getStockOutPage,
   delStockOut,
   delPendingStockOut,
   batchApproveStockOutRecords,
} from "@/api/inventoryManagement/stockOut.js";
import {
@@ -179,7 +181,7 @@
};
const getList = () => {
   tableLoading.value = true;
   getStockOutPage({ ...searchForm.value, ...page, type: props.type, topParentProductId: props.topParentProductId })
   getStockOutPage({ ...searchForm.value, ...page,  topParentProductId: props.topParentProductId })
      .then((res) => {
         tableLoading.value = false;
         tableData.value = res.data.records;
@@ -214,6 +216,13 @@
      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";
};
// 获取来源类型选项
@@ -252,7 +261,7 @@
      distinguishCancelAndClose: true,
   })
      .then(() => {
         batchApproveStockOutRecords({ ids, approvalStatus: "通过" })
         batchApproveStockOutRecords({ ids, approvalStatus: 1 })
            .then(() => {
               proxy.$modal.msgSuccess("审批通过成功");
               getList();
@@ -263,7 +272,7 @@
      })
      .catch((action) => {
         if (action === "cancel") {
            batchApproveStockOutRecords({ ids, approvalStatus: "驳回" })
            batchApproveStockOutRecords({ ids, approvalStatus: 2 })
               .then(() => {
                  proxy.$modal.msgSuccess("审批驳回成功");
                  getList();
@@ -307,7 +316,7 @@
      type: "warning",
   })
      .then(() => {
         delStockOut(ids).then((res) => {
         delPendingStockOut(ids).then((res) => {
            proxy.$modal.msgSuccess("删除成功");
            getList();
         });