yyb
昨天 fa4a8a332b2b60b7b94b1f763091c1daf8927710
src/views/inventoryManagement/receiptManagement/Record.vue
@@ -15,6 +15,11 @@
                  style="width: 240px"
                  placeholder="请输入"
                  clearable/>
        <span class="search_title ml10">合同号:</span>
        <el-input v-model="searchForm.salesContractNo"
                  style="width: 240px"
                  placeholder="请输入合同号"
                  clearable/>
        <span class="search_title ml10">来源:</span>
        <el-select v-model="searchForm.recordType"
                  style="width: 240px"
@@ -58,6 +63,9 @@
                         prop="inboundBatches"
                         width="280"
                         show-overflow-tooltip/>
        <el-table-column label="合同号"
                         prop="salesContractNo"
                         show-overflow-tooltip/>
        <el-table-column label="入库时间"
                         prop="createTime"
                         show-overflow-tooltip/>
@@ -67,6 +75,9 @@
        <el-table-column label="规格型号"
                         prop="model"
                         show-overflow-tooltip/>
       <el-table-column label="厚度(mm)"
                        prop="thickness"
                        show-overflow-tooltip />
        <el-table-column label="单位"
                         prop="unit"
                         show-overflow-tooltip/>
@@ -109,8 +120,7 @@
  batchDeleteStockInRecords,
} from "@/api/inventoryManagement/stockInRecord.js";
import {
  findAllQualifiedStockRecordTypeOptions,
  findAllUnqualifiedStockRecordTypeOptions
  findAllQualifiedStockInRecordTypeOptions, findAllUnQualifiedStockInRecordTypeOptions,
} from "@/api/basicData/enum.js";
const {proxy} = getCurrentInstance();
@@ -130,13 +140,14 @@
const stockRecordTypeOptions = ref([]);
const page = reactive({
  current: 1,
  size: 100,
  size: 10,
});
const total = ref(0);
const data = reactive({
  searchForm: {
    productName: "",
    salesContractNo: "",
    timeStr: "",
    recordType: "",
  },
@@ -164,9 +175,12 @@
  const params = {...page, type: props.type};
  params.timeStr = searchForm.value.timeStr;
  params.productName = searchForm.value.productName;
  params.salesContractNo = searchForm.value.salesContractNo;
  params.recordType = searchForm.value.recordType;
  getStockInRecordListPage(params)
      .then(res => {
        tableData.value = res.data.records;
        total.value = res.data.total || 0;
      }).finally(() => {
    tableLoading.value = false;
  })
@@ -175,13 +189,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 +217,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("已取消");