huminmin
2 天以前 927ee63e361a93906cc2099d2b31ec87a887a107
src/views/inventoryManagement/receiptManagement/Record.vue
@@ -22,8 +22,8 @@
                  clearable>
          <el-option v-for="item in stockRecordTypeOptions"
                     :key="item.value"
                     :label="item.value"
                     :value="item.key"/>
                     :label="item.label"
                     :value="item.value"/>
        </el-select>
        <el-button type="primary"
                   @click="handleQuery"
@@ -108,7 +108,10 @@
  getStockInRecordListPage,
  batchDeleteStockInRecords,
} from "@/api/inventoryManagement/stockInRecord.js";
import {findAllStockRecordTypeOptions} from "@/api/basicData/enum.js";
import {
  findAllQualifiedStockRecordTypeOptions,
  findAllUnqualifiedStockRecordTypeOptions
} from "@/api/basicData/enum.js";
const {proxy} = getCurrentInstance();
@@ -147,7 +150,7 @@
};
const getRecordType = (recordType) => {
  return stockRecordTypeOptions.value.find(item => item.key === recordType)?.value || ''
  return stockRecordTypeOptions.value.find(item => item.value === recordType)?.label || ''
}
const pageProductChange = obj => {
@@ -171,7 +174,14 @@
// 获取来源类型选项
const fetchStockRecordTypeOptions = () => {
  findAllStockRecordTypeOptions()
  if (props.type === '0') {
    findAllQualifiedStockRecordTypeOptions()
        .then(res => {
          stockRecordTypeOptions.value = res.data;
        })
    return
  }
  findAllUnqualifiedStockRecordTypeOptions()
      .then(res => {
        stockRecordTypeOptions.value = res.data;
      })
@@ -193,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("已取消");