From fd3d1b013ab8a883f95cbe406409aeb6c8714ee5 Mon Sep 17 00:00:00 2001 From: yejiaxing <591141169@qq.com> Date: Mon, 29 Jan 2024 13:17:25 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eam/item/countadjustPlan/index.ts | 51 ++++ .../countadjustPlan/countadjustPlan.data.ts | 52 ++++ src/views/eam/item/countadjustPlan/index.vue | 244 ++++++++++++++++++ 3 files changed, 347 insertions(+) create mode 100644 src/api/eam/item/countadjustPlan/index.ts create mode 100644 src/views/eam/item/countadjustPlan/countadjustPlan.data.ts create mode 100644 src/views/eam/item/countadjustPlan/index.vue diff --git a/src/api/eam/item/countadjustPlan/index.ts b/src/api/eam/item/countadjustPlan/index.ts new file mode 100644 index 0000000..4a9470f --- /dev/null +++ b/src/api/eam/item/countadjustPlan/index.ts @@ -0,0 +1,51 @@ +import request from '@/config/axios' + +export interface CountadjustPlanVO { + id : number + number : string + name : string + classification : string + isInAccount : string + status : string +} + +// 查询备件盘点计划列表 +export const getCountadjustPlanPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = { ...params } + return await request.post({ url: '/eam/countadjust-plan/senior', data }) + } else { + return await request.get({ url: `/eam/countadjust-plan/page`, params }) + } +} + +// 查询备件盘点计划详情 +export const getCountadjustPlan = async (id : number) => { + return await request.get({ url: `/eam/countadjust-plan/get?id=` + id }) +} + +// 新增备件盘点计划 +export const createCountadjustPlan = async (data : CountadjustPlanVO) => { + return await request.post({ url: `/eam/countadjust-plan/create`, data }) +} + +// 修改备件盘点计划 +export const updateCountadjustPlan = async (data : CountadjustPlanVO) => { + return await request.put({ url: `/eam/countadjust-plan/update`, data }) +} + +// 删除备件盘点计划 +export const deleteCountadjustPlan = async (id : number) => { + return await request.delete({ url: `/eam/countadjust-plan/delete?id=` + id }) +} + +// 导出备件盘点计划 Excel +export const exportCountadjustPlan = async (params) => { + return await request.download({ url: `/eam/countadjust-plan/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/countadjust-plan/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/eam/item/countadjustPlan/countadjustPlan.data.ts b/src/views/eam/item/countadjustPlan/countadjustPlan.data.ts new file mode 100644 index 0000000..4f5b6bc --- /dev/null +++ b/src/views/eam/item/countadjustPlan/countadjustPlan.data.ts @@ -0,0 +1,52 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' + +// 表单校验 +export const CountadjustPlanRules = reactive({ + number: [required], + name: [required], +}) + +export const CountadjustPlan = useCrudSchemas(reactive([ + { + label: '计划编号', + field: 'number', + sort: 'custom', + isSearch: true, + }, + { + label: '名称', + field: 'name', + sort: 'custom', + isSearch: true, + }, + { + label: '盘点类型', + field: 'classification', + sort: 'custom', + isSearch: false, + }, + { + label: '是否账内库', + field: 'isInAccount', + sort: 'custom', + isSearch: false, + }, + { + label: '状态', + field: 'status', + sort: 'custom', + isSearch: false, + form: { + component: 'Radio' + }, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/eam/item/countadjustPlan/index.vue b/src/views/eam/item/countadjustPlan/index.vue new file mode 100644 index 0000000..90a8c47 --- /dev/null +++ b/src/views/eam/item/countadjustPlan/index.vue @@ -0,0 +1,244 @@ + + +