Browse Source

[SBBJ-838][各个页面导入功能 基础数据:库位管理、供应商管理、设备保养项、模具保养项、设备巡检点检项、模具巡检点检项、设备年度指标 固定资产:固定资产管理、资产台账管理(工位器具管理) 设备管理:设备台账 模具管理:模具台账]

master
zengqinyuan 1 month ago
parent
commit
390b30f844
  1. 5
      src/api/eam/basic/deviceMaintenance/index.ts
  2. 4
      src/api/eam/basic/inspection/index.ts
  3. 5
      src/api/eam/basic/location/index.ts
  4. 5
      src/api/eam/basic/moldInspection/index.ts
  5. 6
      src/api/eam/basic/moldInspectionConfig/index.ts
  6. 5
      src/api/eam/basic/moldMaintenance/index.ts
  7. 5
      src/api/eam/basic/supplier/index.ts
  8. 4
      src/api/eam/mold/moldAccounts/index.ts
  9. 9
      src/views/eam/basic/assetsAccount/index.vue
  10. 17
      src/views/eam/basic/basciYearEquipment/index.vue
  11. 22
      src/views/eam/basic/deviceMaintenance/index.vue
  12. 5
      src/views/eam/basic/fixedAssets/index.vue
  13. 6
      src/views/eam/basic/fixedAssetsControlsHistory/index.vue
  14. 25
      src/views/eam/basic/inspection/index.vue
  15. 25
      src/views/eam/basic/location/index.vue
  16. 27
      src/views/eam/basic/moldInspection/index.vue
  17. 25
      src/views/eam/basic/moldMaintenance/index.vue
  18. 29
      src/views/eam/basic/supplier/index.vue
  19. 7
      src/views/eam/device/deviceAccounts/index.vue
  20. 26
      src/views/eam/mold/moldAccounts/index.vue

5
src/api/eam/basic/deviceMaintenance/index.ts

@ -63,4 +63,9 @@ export const exportDeviceMoldItems = async (params) => {
return await request.download({ url: `/eam/device-mold-items/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/device-mold-items/get-import-template/DEVICE/MAINTAIN' })
}

4
src/api/eam/basic/inspection/index.ts

@ -94,3 +94,7 @@ export const getAllByNumber = async (number: string) => {
return await request.get({ url: `/eam/device-mold-items/getAllByNumber?number=` + number })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/device-mold-items/get-import-template/DEVICE/INSPECTION' })
}

5
src/api/eam/basic/location/index.ts

@ -82,6 +82,11 @@ export const getLocationNoInAccountPage = async (params) => {
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/location/get-import-template' })
}

5
src/api/eam/basic/moldInspection/index.ts

@ -59,5 +59,8 @@ export const deleteDeviceMoldItems = async (id: number, remark: string) => {
export const exportDeviceMoldItems = async (params) => {
return await request.download({ url: `/eam/device-mold-items/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/device-mold-items/get-import-template/MOLD/INSPECTION' })
}

6
src/api/eam/basic/moldInspectionConfig/index.ts

@ -66,4 +66,8 @@ export const addMaintenanceItem = async (data: MoldMaintenanceConfigVO) => {
export const delMaintenanceItem = async (data: MoldMaintenanceConfigVO) => {
return await request.post({ url: `/eam/device-mold-maintenance-config/delMaintenanceItem`, data })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/device-mold-items/get-import-template' })
}

5
src/api/eam/basic/moldMaintenance/index.ts

@ -64,4 +64,7 @@ export const exportDeviceMoldItems = async (params) => {
return await request.download({ url: `/eam/device-mold-items/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/device-mold-items/get-import-template/MOLD/MAINTAIN' })
}

5
src/api/eam/basic/supplier/index.ts

@ -57,3 +57,8 @@ export const getSupplierNoPage = async (params) => {
return await request.get({ url: `/eam/supplier/noPage`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/supplier/get-import-template' })
}

4
src/api/eam/mold/moldAccounts/index.ts

@ -56,8 +56,8 @@ export const exportMoldAccounts = async (params) => {
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/mold-accounts/get-import-template' })
export const importTemplate = (sourceType) => {
return request.download({ url: '/eam/mold-accounts/get-import-template/' + sourceType })
}

9
src/views/eam/basic/assetsAccount/index.vue

@ -64,8 +64,9 @@
>
<el-image v-for="url in urls" :key="url" :src="url" lazy />
</Dialog>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/fixed-assets/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<SYMonthImportForm ref="importFormRef" url="/eam/fixed-assets/import/2" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
@ -76,6 +77,7 @@ import { AssetsAccount,AssetsAccountRules } from './assetsAccount.data'
import * as AssetsAccountApi from '@/api/eam/basic/assetsAccount'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { checkPermi } from '@/utils/permission'
import SYMonthImportForm from "@/components/ImportForm/src/SYMonthImportForm.vue";
// import TableHead from '@/components/TableHead/src/TableHead.vue'
// import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
// import Detail from '@/components/Detail/src/Detail.vue'
@ -117,7 +119,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
// defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultImportBtn(null), //
// defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -151,6 +153,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn(null), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.mainListDeleteBtn(null), //
]
@ -281,7 +284,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '固定资产导入模版.xlsx'
templateTitle: '工位器具导入模版.xlsx'
})
//
const importSuccess = () => {

17
src/views/eam/basic/basciYearEquipment/index.vue

@ -61,13 +61,9 @@
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="BasciYearEquipment.allSchemas" />
<!-- 导入 -->
<!-- <ImportForm
ref="importFormRef"
url="/eam/basci-year-equipment/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
/> -->
<!-- 导出 -->
<SYMonthImportForm ref="importFormRef" url="/eam/basci-year-equipment/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
@ -75,6 +71,7 @@ import download from '@/utils/download'
import { BasciYearEquipment, BasciYearEquipmentRules } from './basciYearEquipment.data'
import * as BasciYearEquipmentApi from '@/api/eam/basic/basciYearEquipment'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import SYMonthImportForm from "@/components/ImportForm/src/SYMonthImportForm.vue";
// import TableHead from '@/components/TableHead/src/TableHead.vue'
// import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
// import Detail from '@/components/Detail/src/Detail.vue'
@ -113,7 +110,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'basic:BasciYearEquipment:create'}), //
// defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultImportBtn(null), //
//defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
//defaultButtons.defaultFilterBtn(null), //
@ -161,6 +158,8 @@ const buttonTableClick = async (val, row) => {
if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'import') { //
handleImport()
} else if (val == 'delete') {
//
handleDelete(row.id)
@ -269,6 +268,6 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
getList()
//importTemplateData.templateUrl = await BasciYearEquipmentApi.importTemplate()
importTemplateData.templateUrl = await BasciYearEquipmentApi.importTemplate()
})
</script>

22
src/views/eam/basic/deviceMaintenance/index.vue

@ -81,6 +81,7 @@
</template>
</Dialog>
<SYMonthImportForm ref="importFormRef" url="/eam/device-mold-items/import/DEVICE/MAINTAIN" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
@ -91,6 +92,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { useUserStore } from '@/store/modules/user'
import { updateForm } from '@/api/bpm/form'
import * as DeptApi from '@/api/system/dept'
import SYMonthImportForm from "@/components/ImportForm/src/SYMonthImportForm.vue";
import * as FixedAssetsApi from "@/api/eam/basic/fixedAssets";
const userStore = useUserStore() //
defineOptions({ name: 'DeviceMaintenance' })
@ -161,6 +164,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'basic:deviceMaintenance:create'}), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn({hasPermi:'basic:deviceMaintenance:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -179,6 +183,8 @@ const HeadButttondata = [
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
}else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
@ -271,6 +277,21 @@ const handleDelete = async (id: number) => {
} catch {}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '设备保养配置入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
@ -361,6 +382,7 @@ const judgeSame = () => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await DeviceMaintenanceApi.importTemplate()
})
</script>

5
src/views/eam/basic/fixedAssets/index.vue

@ -65,7 +65,7 @@
<el-image v-for="url in urls" :key="url" :src="url" lazy />
</Dialog>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/fixed-assets/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<SYMonthImportForm ref="importFormRef" url="/eam/fixed-assets/import/1" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
@ -77,6 +77,7 @@ import * as FixedAssetsApi from '@/api/eam/basic/fixedAssets'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { checkPermi } from '@/utils/permission'
import { hasPermi } from '@/directives/permission/hasPermi'
import SYMonthImportForm from "@/components/ImportForm/src/SYMonthImportForm.vue";
// import TableHead from '@/components/TableHead/src/TableHead.vue'
// import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
// import Detail from '@/components/Detail/src/Detail.vue'
@ -119,7 +120,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:fixed-assets:create'}), //
// defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultImportBtn(null), //
// defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //

6
src/views/eam/basic/fixedAssetsControlsHistory/index.vue

@ -61,6 +61,8 @@
>
<el-image v-for="url in urls" :key="url" :src="url" lazy />
</Dialog>
<!-- 导入 -->
<SYMonthImportForm ref="importFormRef" url="/eam/fixed-assets/import/2" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
@ -68,6 +70,8 @@ import download from '@/utils/download'
import { FixedAssetsControlsHistory,FixedAssetsControlsHistoryRules } from './fixedAssetsControlsHistory.data'
import * as FixedAssetsControlsHistoryApi from '@/api/eam/basic/fixedAssetsControlsHistory'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import SYMonthImportForm from "@/components/ImportForm/src/SYMonthImportForm.vue";
import * as FixedAssetsApi from "@/api/eam/basic/fixedAssets";
defineOptions({ name: 'FixedAssetsControlsHistory' })
@ -106,6 +110,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultImportBtn(null), //
// defaultButtons.defaultAddBtn({hasPermi:'eam:fixedAssetsControlsHistory:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'eam:fixedAssetsControlsHistory:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'eam:fixedAssetsControlsHistory:export'}), //
@ -261,6 +266,7 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await FixedAssetsApi.importTemplate()
})
</script>

25
src/views/eam/basic/inspection/index.vue

@ -81,16 +81,18 @@
</template>
</Dialog>
<SYMonthImportForm ref="importFormRef" url="/eam/device-mold-items/import/DEVICE/INSPECTION" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { DeviceMoldItems,DeviceMoldItemsRules } from './inspection.data'
import * as DeviceMoldItemsApi from '@/api/eam/basic/inspection'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import SYMonthImportForm from "@/components/ImportForm/src/SYMonthImportForm.vue";
defineOptions({ name: 'Inspection' })
@ -134,6 +136,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'basic:deviceMaintenance:create'}), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn({hasPermi:'basic:deviceMaintenance:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -152,6 +155,8 @@ const HeadButttondata = [
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
@ -234,6 +239,23 @@ const handleDelete = async (id: number) => {
} catch {}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '设备巡检点检项配置入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
@ -323,6 +345,7 @@ const judgeSame = () => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await DeviceMoldItemsApi.importTemplate()
})
</script>

25
src/views/eam/basic/location/index.vue

@ -36,8 +36,7 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="Location.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/location/import" :importTemplateData="importTemplateData"
@success="importSuccess" />
<SYMonthImportForm ref="importFormRef" url="/eam/location/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
@ -49,6 +48,8 @@
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { getAccessToken } from '@/utils/auth'
import SYMonthImportForm from "@/components/ImportForm/src/SYMonthImportForm.vue";
import * as BasicMonthEquipmentApi from "@/api/eam/basic/basicMonthEquipment";
defineOptions({ name: 'Location' })
const tableRef = ref(null);
@ -60,7 +61,6 @@
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(Location.allSchemas.tableColumns)
const importFormRef = ref()
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
const src = ref(BASE_URL + '/jmreport/view/950537917716037632?token=' + getAccessToken())
@ -96,6 +96,7 @@
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'basic:location:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'basic:locationArea:export'}), //
defaultButtons.defaultExportBtn({hasPermi:'basic:location:update'}), //
defaultButtons.selectQrCodeBatchBtn(null), //
defaultButtons.defaultFreshBtn(null), //
@ -115,6 +116,8 @@
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'qrCodeBatch') {
@ -209,6 +212,21 @@
} catch { }
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '库位导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
@ -237,5 +255,6 @@
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await LocationApi.importTemplate()
})
</script>

27
src/views/eam/basic/moldInspection/index.vue

@ -78,6 +78,9 @@
</div>
</template>
</Dialog>
<SYMonthImportForm ref="importFormRef" url="/eam/device-mold-items/import/MOLD/INSPECTION" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
@ -88,6 +91,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import SYMonthImportForm from "@/components/ImportForm/src/SYMonthImportForm.vue";
import * as DeviceMaintenanceApi from "@/api/eam/basic/deviceMaintenance";
defineOptions({ name: 'MoldInspection' })
@ -130,6 +135,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'basic:deviceMaintenance:create'}), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn({hasPermi:'basic:deviceMaintenance:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -148,6 +154,8 @@ const HeadButttondata = [
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
@ -230,6 +238,23 @@ const handleDelete = async (id: number) => {
} catch {}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '模具巡检点检项配置入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
@ -318,6 +343,8 @@ const judgeSame = () => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await DeviceMoldItemsApi.importTemplate()
})
</script>

25
src/views/eam/basic/moldMaintenance/index.vue

@ -79,6 +79,8 @@
</div>
</template>
</Dialog>
<!-- 导出 -->
<SYMonthImportForm ref="importFormRef" url="/eam/device-mold-items/import/MOLD/MAINTAIN" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
@ -89,6 +91,8 @@ import * as MoldMaintenanceApi from '@/api/eam/basic/moldMaintenance'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { useUserStore } from '@/store/modules/user'
import * as DeptApi from '@/api/system/dept'
import SYMonthImportForm from "@/components/ImportForm/src/SYMonthImportForm.vue";
import * as DeviceMaintenanceApi from "@/api/eam/basic/deviceMaintenance";
const userStore = useUserStore() //
defineOptions({ name: 'MoldMaintenance' })
@ -157,6 +161,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'basic:deviceMaintenance:create'}), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn({hasPermi:'basic:deviceMaintenance:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -175,6 +180,8 @@ const HeadButttondata = [
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
}else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
@ -266,6 +273,22 @@ const handleDelete = async (id: number) => {
} catch {}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '模具保养配置入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
@ -369,6 +392,8 @@ const judgeIsTheClassEngineer = (row) => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await MoldMaintenanceApi.importTemplate()
})
</script>

29
src/views/eam/basic/supplier/index.vue

@ -34,9 +34,8 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="Supplier.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/supplier/import" :importTemplateData="importTemplateData"
@success="importSuccess" />
</template>
<SYMonthImportForm ref="importFormRef" url="/eam/supplier/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
@ -46,6 +45,8 @@
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import SYMonthImportForm from "@/components/ImportForm/src/SYMonthImportForm.vue";
import * as LocationApi from "@/api/eam/basic/location";
defineOptions({ name: 'Supplier' })
@ -81,6 +82,7 @@
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'basic:supplier:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'basic:supplier:export'}), //
defaultButtons.defaultExportBtn({hasPermi:'basic:supplier:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -99,7 +101,10 @@
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'export') { //
} else if (val == 'import') { //
handleImport()
}
else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
@ -177,6 +182,21 @@
} catch { }
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '供应商导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
@ -205,5 +225,6 @@
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await SupplierApi.importTemplate()
})
</script>

7
src/views/eam/device/deviceAccounts/index.vue

@ -41,8 +41,8 @@
:dialogAllSchemas="dialogAllSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/device-accounts/import" :importTemplateData="importTemplateData"
@success="importSuccess" />
<SYMonthImportForm ref="importFormRef" url="/eam/device-accounts/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
@ -81,6 +81,7 @@
} from '../devicemaintenancejob/deviceMaintenanceMain.data'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import {hasPermi} from "@/directives/permission/hasPermi";
import SYMonthImportForm from "@/components/ImportForm/src/SYMonthImportForm.vue";
defineOptions({ name: 'DeviceAccounts' })
const tableRef = ref(null);
@ -129,7 +130,7 @@
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:device-accounts:create'}), //
defaultButtons.selectQrCodeBatchBtn(null), //
// defaultButtons.defaultImportBtn({hasPermi:'eam:device-accounts:import'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:device-accounts:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'eam:device-accounts:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //

26
src/views/eam/mold/moldAccounts/index.vue

@ -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)

Loading…
Cancel
Save