diff --git a/src/api/spc/itembasic/index.ts b/src/api/spc/itembasic/index.ts new file mode 100644 index 0000000..2e0fe48 --- /dev/null +++ b/src/api/spc/itembasic/index.ts @@ -0,0 +1,77 @@ +import request from '@/config/axios' + +export interface ItembasicVO { + code: string + name: string + desc1: string + desc2: string + status: string + uom: string + altUom: string + isStdPack: string + enableBuy: string + enableMake: string + enableOutsourcing: string + isRecycled: string + isPhantom: string + abcClass: string + type: string + category: string + itemGroup: string + color: string + configuration: string + project: string + eqLevel: string + validityDays: number + userGroupCode: string + available: string + activeTime: Date + expireTime: Date + remark: string + deletionTime: Date + deleterId: string + extraProperties: string + concurrencyStamp: string + siteId: string +} + +// 查询物品基本信息列表 +export const getItembasicPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/spc/itembasic/senior', data }) + } else { + return await request.get({ url: `/spc/itembasic/page`, params }) + } +} + +// 查询物品基本信息详情 +export const getItembasic = async (id: number) => { + return await request.get({ url: `/spc/itembasic/get?id=` + id }) +} + +// 新增物品基本信息 +export const createItembasic = async (data: ItembasicVO) => { + return await request.post({ url: `/spc/itembasic/create`, data }) +} + +// 修改物品基本信息 +export const updateItembasic = async (data: ItembasicVO) => { + return await request.put({ url: `/spc/itembasic/update`, data }) +} + +// 删除物品基本信息 +export const deleteItembasic = async (id: number) => { + return await request.delete({ url: `/spc/itembasic/delete?id=` + id }) +} + +// 导出物品基本信息 Excel +export const exportItembasic = async (params) => { + return await request.download({ url: `/spc/itembasic/export-excel`, params }) +} + +// 下载导入模板 +export const importTemplate = () => { + return request.download({ url: '/spc/itembasic/get-import-template' }) +} \ No newline at end of file diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index 5e4d26b..26def83 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -1,110 +1,13 @@