yyb
2 天以前 9bfda877a67bd2bdfe0c12bfca8ccf88f8db3f4b
src/views/inventoryManagement/receiptManagement/Record.vue
@@ -50,6 +50,7 @@
                height="calc(100vh - 18.5em)">
        <el-table-column align="center"
                         type="selection"
                         :selectable="isRowSelectableForApprove"
                         width="55"/>
        <el-table-column align="center"
                         label="序号"
@@ -123,7 +124,8 @@
  batchApproveStockInRecords,
} from "@/api/inventoryManagement/stockInRecord.js";
import {
  findAllQualifiedStockInRecordTypeOptions, findAllUnQualifiedStockInRecordTypeOptions,
  findAllQualifiedStockInRecordTypeOptions,
  // findAllUnQualifiedStockInRecordTypeOptions,
} from "@/api/basicData/enum.js";
const {proxy} = getCurrentInstance();
@@ -181,6 +183,7 @@
  APPROVED: "通过",
  REJECTED: "驳回",
};
approvalStatusLabelMap[3] = "待确认";
const getApprovalStatusLabel = (status) => {
  if (status === null || status === undefined || status === "") {
@@ -194,6 +197,14 @@
  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 isRowSelectableForApprove = row => {
  return isPendingApproval(row?.approvalStatus);
};
const pageProductChange = obj => {
@@ -226,15 +237,15 @@
        })
    return
  }
  findAllUnQualifiedStockInRecordTypeOptions()
      .then(res => {
        stockRecordTypeOptions.value = res.data;
      })
  // findAllUnQualifiedStockInRecordTypeOptions()
  //     .then(res => {
  //       stockRecordTypeOptions.value = res.data;
  //     })
}
// 表格选择数据
const handleSelectionChange = selection => {
  selectedRows.value = selection.filter(item => item.id);
  selectedRows.value = selection.filter(item => item.id && isPendingApproval(item.approvalStatus));
};
const expandedRowKeys = ref([]);