|
|
@ -86,12 +86,8 @@ |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
|
<ImportForm |
|
|
|
ref="importFormRef" |
|
|
|
url="/eam/mold-accounts/import" |
|
|
|
:importTemplateData="importTemplateData" |
|
|
|
@success="importSuccess" |
|
|
|
/> |
|
|
|
<SYMonthImportForm ref="importFormRef" :url="importUrl" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
@ -132,8 +128,10 @@ import { |
|
|
|
MoldMaintenanceDetail |
|
|
|
} from '../moldmaintenancejob/moldMaintenanceMain.data' |
|
|
|
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|
|
|
import SYMonthImportForm from "@/components/ImportForm/src/SYMonthImportForm.vue"; |
|
|
|
|
|
|
|
defineOptions({ name: 'MoldAccounts' }) |
|
|
|
const importUrl = ref(''); |
|
|
|
const tableRef = ref(null); |
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
|
const { t } = useI18n() // 国际化 |
|
|
@ -181,8 +179,8 @@ const { getList, setSearchParams } = tableMethods |
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultAddBtn({hasPermi:'eam:mold-accounts:create'}), // 新增 |
|
|
|
defaultButtons.defaultImportBtn({hasPermi:'eam:mold-accounts:import'}), // 导入 |
|
|
|
defaultButtons.selectQrCodeBatchBtn(null), //批量生成二维码 |
|
|
|
// defaultButtons.defaultImportBtn({hasPermi:'eam:mold-accounts:import'}), // 导入 |
|
|
|
// defaultButtons.defaultExportBtn({hasPermi:'eam:mold-accounts:export'}), // 导出 |
|
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
@ -326,7 +324,7 @@ const handleImport = () => { |
|
|
|
// 导入附件弹窗所需的参数 |
|
|
|
const importTemplateData = reactive({ |
|
|
|
templateUrl: '', |
|
|
|
templateTitle: '设备台账导入模版.xlsx' |
|
|
|
templateTitle: '' |
|
|
|
}) |
|
|
|
// 导入成功之后 |
|
|
|
const importSuccess = () => { |
|
|
@ -439,7 +437,17 @@ const count = ref(0) |
|
|
|
onMounted(async () => { |
|
|
|
await init() |
|
|
|
await getList() |
|
|
|
importTemplateData.templateUrl = await MoldAccountsApi.importTemplate() |
|
|
|
|
|
|
|
if (route.name == 'withinMoldAccounts') { |
|
|
|
importTemplateData.templateUrl = await MoldAccountsApi.importTemplate("0") |
|
|
|
importUrl.value = "/eam/mold-accounts/import/0" |
|
|
|
importTemplateData.templateTitle = '厂内模具台账导入模版.xlsx' |
|
|
|
} |
|
|
|
if (route.name == 'outsideMoldAccounts') { |
|
|
|
importTemplateData.templateUrl = await MoldAccountsApi.importTemplate("1") |
|
|
|
importUrl.value = "/eam/mold-accounts/import/1" |
|
|
|
importTemplateData.templateTitle = '厂外台账导入模版.xlsx' |
|
|
|
} |
|
|
|
}) |
|
|
|
const init = () => { |
|
|
|
console.log(route.name) |
|
|
|