huminmin
2 天以前 8149580e1d1bd502dceffedf88858a87f131b3ee
src/views/inventoryManagement/receiptManagement/Record.vue
@@ -109,8 +109,7 @@
  batchDeleteStockInRecords,
} from "@/api/inventoryManagement/stockInRecord.js";
import {
  findAllQualifiedStockRecordTypeOptions,
  findAllUnqualifiedStockRecordTypeOptions
  findAllQualifiedStockInRecordTypeOptions, findAllUnQualifiedStockInRecordTypeOptions,
} from "@/api/basicData/enum.js";
const {proxy} = getCurrentInstance();
@@ -164,6 +163,7 @@
  const params = {...page, type: props.type};
  params.timeStr = searchForm.value.timeStr;
  params.productName = searchForm.value.productName;
  params.recordType = searchForm.value.recordType;
  getStockInRecordListPage(params)
      .then(res => {
        tableData.value = res.data.records;
@@ -175,13 +175,13 @@
// 获取来源类型选项
const fetchStockRecordTypeOptions = () => {
  if (props.type === '0') {
    findAllQualifiedStockRecordTypeOptions()
    findAllQualifiedStockInRecordTypeOptions()
        .then(res => {
          stockRecordTypeOptions.value = res.data;
        })
    return
  }
  findAllUnqualifiedStockRecordTypeOptions()
  findAllUnQualifiedStockInRecordTypeOptions()
      .then(res => {
        stockRecordTypeOptions.value = res.data;
      })
@@ -203,8 +203,7 @@
  })
      .then(() => {
        // 根据不同的 tab 类型调用不同的导出接口
        let exportUrl = "/stockin/export";
        proxy.download(exportUrl, {}, "入库台账.xlsx");
        proxy.download("/stockInRecord/exportStockInRecord", {type: props.type}, props.type === '0' ? "合格入库.xlsx" : "不合格入库.xlsx");
      })
      .catch(() => {
        proxy.$modal.msg("已取消");