gaoluyang
2025-11-27 25d688fb6df1c23959b6cdaee9385dee8a657df1
src/views/inventoryManagement/receiptManagement/index.vue
@@ -90,7 +90,7 @@
            <el-table-column label="入库人" prop="createBy" width="80" show-overflow-tooltip />
            <el-table-column fixed="right" label="操作" min-width="60" align="center">
              <template #default="scope">
                <el-button link type="primary" size="small" @click="openForm('edit', scope.row, 'purchase');" :disabled="scope.row.createUser !== userStore.id">编辑</el-button>
                <el-button link type="primary" size="small" @click="openForm('edit', scope.row, 'purchase');">编辑</el-button>
              </template>
            </el-table-column>
          </el-table>
@@ -99,7 +99,7 @@
        </div>
      </el-tab-pane>
      
      <el-tab-pane label="手动入库" name="manual">
      <el-tab-pane label="自定义入库" name="manual">
        <div class="search_form">
          <div>
            <span class="search_title">供应商名称:</span>
@@ -131,7 +131,7 @@
            <el-table-column align="center" label="序号" type="index" width="60" />
            <el-table-column label="入库时间" prop="inboundDate" width="100" show-overflow-tooltip />
            <el-table-column label="入库批次" prop="inboundBatches" width="160" show-overflow-tooltip />
            <el-table-column label="供应商名称" prop="supplierName" width="240" show-overflow-tooltip />
            <!-- <el-table-column label="供应商名称" prop="supplierName" width="240" show-overflow-tooltip /> -->
            <el-table-column label="产品大类" prop="productCategory" width="100" show-overflow-tooltip />
            <el-table-column label="规格型号" prop="specificationModel" width="200" show-overflow-tooltip />
            <el-table-column label="单位" prop="unit" width="70" show-overflow-tooltip />
@@ -144,7 +144,7 @@
            <el-table-column label="入库人" prop="createBy" width="80" show-overflow-tooltip />
            <el-table-column fixed="right" label="操作" min-width="60" align="center">
              <template #default="scope">
                <el-button link type="primary" size="small" @click="openForm('edit', scope.row, 'manual');" :disabled="scope.row.createBy !== userStore.nickName">编辑</el-button>
                <el-button link type="primary" size="small" @click="openForm('edit', scope.row, 'manual');">编辑</el-button>
              </template>
            </el-table-column>
          </el-table>
@@ -165,11 +165,11 @@
import { ElMessageBox } from "element-plus";
import useUserStore from '@/store/modules/user'
import {
  getStockInPage,
  getStockInPageByProduction,
  getStockInPageByCustom,
  delStockIn,
  delStockInCustom,
   getStockInPage,
   getStockInPageByProduction,
   getStockInPageByCustom,
   delStockIn,
   delStockInCustom, getInPageByCustom,
} from "@/api/inventoryManagement/stockIn.js";
import FormDia from './components/formDia.vue'
import FormDiaManual from './components/formDiaManual.vue'
@@ -226,7 +226,7 @@
  const apiCall = activeTab.value === 'production' 
    ? getStockInPageByProduction(params)
    : activeTab.value === 'manual' 
    ? getStockInPageByCustom(params)
    ? getInPageByCustom(params)
    : getStockInPage(params)
  
  apiCall.then(res => {
@@ -279,7 +279,14 @@
    cancelButtonText: '取消',
    type: 'warning',
  }).then(() => {
    proxy.download("/stockin/export", {}, '入库台账.xlsx')
    // 根据不同的 tab 类型调用不同的导出接口
    let exportUrl = "/stockin/export"
    if (activeTab.value === 'production') {
      exportUrl = "/stockin/exportOne"
    } else if (activeTab.value === 'manual') {
      exportUrl = "/stockin/exportTwo"
    }
    proxy.download(exportUrl, {}, '入库台账.xlsx')
  }).catch(() => {
    proxy.$modal.msg("已取消")
  })