张诺
2026-04-21 1e697f13a97c01a460946bcf93d4d0baf09fcf17
src/views/productionManagement/productStructure/index.vue
@@ -1,20 +1,22 @@
<template>
  <div class="app-container">
    <div style="text-align: right; margin-bottom: 10px;">
      <el-button type="info" plain icon="Upload" @click="handleImport"
        v-hasPermi="['product:bom:import']">导入</el-button>
      <el-button type="warning" plain icon="Download" @click="handleExport" :disabled="selectedRows.length !== 1"
        v-hasPermi="['product:bom:export']">导出</el-button>
      <el-button type="primary" @click="handleAdd">新增</el-button>
      <el-button type="danger" plain @click="handleBatchDelete" :disabled="selectedRows.length === 0">删除</el-button>
    </div>
    <PIMTable rowKey="id" :column="tableColumn" :tableData="tableData" :page="page" :isSelection="true"
      @selection-change="handleSelectionChange" :tableLoading="tableLoading" @pagination="pagination">
      <template #detail="{ row }">
        <el-button type="primary" text @click="showDetail(row)">{{ row.bomNo }}
        </el-button>
      </template>
    </PIMTable>
      <div class="table_list">
         <div style="text-align: right; margin-bottom: 10px;">
            <el-button type="primary" @click="handleAdd">新增</el-button>
            <el-button type="info" plain icon="Upload" @click="handleImport"
                       v-hasPermi="['product:bom:import']">导入</el-button>
            <el-button type="warning" plain icon="Download" @click="handleExport" :disabled="selectedRows.length !== 1"
                       v-hasPermi="['product:bom:export']">导出</el-button>
            <el-button type="danger" plain @click="handleBatchDelete" :disabled="selectedRows.length === 0">删除</el-button>
         </div>
         <PIMTable rowKey="id" :column="tableColumn" :tableData="tableData" :page="page" :isSelection="true"
                   @selection-change="handleSelectionChange" :tableLoading="tableLoading" @pagination="pagination">
            <template #detail="{ row }">
               <el-button type="primary" text @click="showDetail(row)">{{ row.bomNo }}
               </el-button>
            </template>
         </PIMTable>
      </div>
    <StructureEdit v-if="showEdit" v-model:show-model="showEdit" :record="currentRow" />
    <!-- 新增/编辑弹窗 -->
@@ -139,7 +141,7 @@
  // 设置上传的请求头部
  headers: { Authorization: "Bearer " + getToken() },
  // 上传的地址
  url: import.meta.env.VITE_APP_BASE_API + "/productBom/uploadBom"
  url: import.meta.env.VITE_APP_BASE_API + "/technologyBom/uploadBom"
});
const page = reactive({