diff --git a/src/api/eam/item/itemInLocation/index.ts b/src/api/eam/item/itemInLocation/index.ts new file mode 100644 index 0000000..9589db3 --- /dev/null +++ b/src/api/eam/item/itemInLocation/index.ts @@ -0,0 +1,50 @@ +import request from '@/config/axios' + +export interface ItemInLocationVO { + number: string + itemNumber: string + locationNumber: string + type: string + qty: number +} + +// 查询备件入库记录列表 +export const getItemInLocationPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/item-in-location/senior', data }) + } else { + return await request.get({ url: `/eam/item-in-location/page`, params }) + } +} + +// 查询备件入库记录详情 +export const getItemInLocation = async (id: number) => { + return await request.get({ url: `/eam/item-in-location/get?id=` + id }) +} + +// 新增备件入库记录 +export const createItemInLocation = async (data: ItemInLocationVO) => { + return await request.post({ url: `/eam/item-in-location/create`, data }) +} + +// 修改备件入库记录 +export const updateItemInLocation = async (data: ItemInLocationVO) => { + return await request.put({ url: `/eam/item-in-location/update`, data }) +} + +// 删除备件入库记录 +export const deleteItemInLocation = async (id: number) => { + return await request.delete({ url: `/eam/item-in-location/delete?id=` + id }) +} + +// 导出备件入库记录 Excel +export const exportItemInLocation = async (params) => { + return await request.download({ url: `/eam/item-in-location/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/item-in-location/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/eam/item/itemOutLocation/index.ts b/src/api/eam/item/itemOutLocation/index.ts new file mode 100644 index 0000000..a6660ae --- /dev/null +++ b/src/api/eam/item/itemOutLocation/index.ts @@ -0,0 +1,50 @@ +import request from '@/config/axios' + +export interface ItemOutLocationVO { + number: string + itemNumber: string + locationNumber: string + type: string + qty: number +} + +// 查询备件出库记录列表 +export const getItemOutLocationPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/item-out-location/senior', data }) + } else { + return await request.get({ url: `/eam/item-out-location/page`, params }) + } +} + +// 查询备件出库记录详情 +export const getItemOutLocation = async (id: number) => { + return await request.get({ url: `/eam/item-out-location/get?id=` + id }) +} + +// 新增备件出库记录 +export const createItemOutLocation = async (data: ItemOutLocationVO) => { + return await request.post({ url: `/eam/item-out-location/create`, data }) +} + +// 修改备件出库记录 +export const updateItemOutLocation = async (data: ItemOutLocationVO) => { + return await request.put({ url: `/eam/item-out-location/update`, data }) +} + +// 删除备件出库记录 +export const deleteItemOutLocation = async (id: number) => { + return await request.delete({ url: `/eam/item-out-location/delete?id=` + id }) +} + +// 导出备件出库记录 Excel +export const exportItemOutLocation = async (params) => { + return await request.download({ url: `/eam/item-out-location/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/item-out-location/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/eam/item/itemInLocation/index.vue b/src/views/eam/item/itemInLocation/index.vue new file mode 100644 index 0000000..82f1e88 --- /dev/null +++ b/src/views/eam/item/itemInLocation/index.vue @@ -0,0 +1,225 @@ + + + \ No newline at end of file diff --git a/src/views/eam/item/itemInLocation/itemInLocation.data.ts b/src/views/eam/item/itemInLocation/itemInLocation.data.ts new file mode 100644 index 0000000..4aef77d --- /dev/null +++ b/src/views/eam/item/itemInLocation/itemInLocation.data.ts @@ -0,0 +1,53 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' + +// 表单校验 +export const ItemInLocationRules = reactive({ + number: [required], + itemNumber: [required], + locationNumber: [required], +}) + +export const ItemInLocation = useCrudSchemas(reactive([ + { + label: '入库编号', + field: 'number', + sort: 'custom', + isSearch: true, + }, + { + label: '备件编号', + field: 'itemNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '库位编号', + field: 'locationNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '入库类型', + field: 'type', + sort: 'custom', + isSearch: false, + form: { + component: 'Select' + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + isSearch: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/eam/item/itemOutLocation/index.vue b/src/views/eam/item/itemOutLocation/index.vue new file mode 100644 index 0000000..3a1f30a --- /dev/null +++ b/src/views/eam/item/itemOutLocation/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/eam/item/itemOutLocation/itemOutLocation.data.ts b/src/views/eam/item/itemOutLocation/itemOutLocation.data.ts new file mode 100644 index 0000000..ac28903 --- /dev/null +++ b/src/views/eam/item/itemOutLocation/itemOutLocation.data.ts @@ -0,0 +1,53 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' + +// 表单校验 +export const ItemOutLocationRules = reactive({ + number: [required], + itemNumber: [required], + locationNumber: [required], +}) + +export const ItemOutLocation = useCrudSchemas(reactive([ + { + label: '出库编号', + field: 'number', + sort: 'custom', + isSearch: true, + }, + { + label: '备件编号', + field: 'itemNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '库位编号', + field: 'locationNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '出库类型', + field: 'type', + sort: 'custom', + isSearch: false, + form: { + component: 'Select' + }, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + isSearch: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) \ No newline at end of file