From 9900b12ed735fc67b4ea988d38da6fd6aff83317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=BB=E7=A0=96-JAVA=5CAdministrator?= <591141169@qq.com> Date: Fri, 23 Feb 2024 14:29:18 +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/countJobDetail/index.ts | 51 +++ src/api/eam/item/countJobMain/index.ts | 56 +++ src/api/eam/item/countRecordDetail/index.ts | 51 +++ src/api/eam/item/countRecordMain/index.ts | 60 ++++ .../eam/item/countRecord/countRecord.data.ts | 151 ++++++++ src/views/eam/item/countRecord/index.vue | 337 ++++++++++++++++++ .../countadjustWork/countadjustWork.data.ts | 144 ++++++++ 7 files changed, 850 insertions(+) create mode 100644 src/api/eam/item/countJobDetail/index.ts create mode 100644 src/api/eam/item/countJobMain/index.ts create mode 100644 src/api/eam/item/countRecordDetail/index.ts create mode 100644 src/api/eam/item/countRecordMain/index.ts create mode 100644 src/views/eam/item/countRecord/countRecord.data.ts create mode 100644 src/views/eam/item/countRecord/index.vue create mode 100644 src/views/eam/item/countadjustWork/countadjustWork.data.ts diff --git a/src/api/eam/item/countJobDetail/index.ts b/src/api/eam/item/countJobDetail/index.ts new file mode 100644 index 0000000..5f06e89 --- /dev/null +++ b/src/api/eam/item/countJobDetail/index.ts @@ -0,0 +1,51 @@ +import request from '@/config/axios' + +export interface CountJobDetailVO { + id : number + number : string + name : string + classification : string + isInAccount : string + status : string +} + +// 查询备件盘点计划列表 +export const getCountJobDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = { ...params } + return await request.post({ url: '/eam/countJobDetail/senior', data }) + } else { + return await request.get({ url: `/eam/countJobDetail/page`, params }) + } +} + +// 查询备件盘点计划详情 +export const getCountJobDetail = async (id : number) => { + return await request.get({ url: `/eam/countJobDetail/get?id=` + id }) +} + +// 新增备件盘点计划 +export const createCountJobDetail = async (data : CountJobDetailVO) => { + return await request.post({ url: `/eam/countJobDetail/create`, data }) +} + +// 修改备件盘点计划 +export const updateCountJobDetail = async (data : CountJobDetailVO) => { + return await request.put({ url: `/eam/countJobDetail/update`, data }) +} + +// 删除备件盘点计划 +export const deleteCountJobDetail = async (id : number) => { + return await request.delete({ url: `/eam/countJobDetail/delete?id=` + id }) +} + +// 导出备件盘点计划 Excel +export const exportCountJobDetail = async (params) => { + return await request.download({ url: `/eam/countJobDetail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/countJobDetail/get-import-template' }) +} diff --git a/src/api/eam/item/countJobMain/index.ts b/src/api/eam/item/countJobMain/index.ts new file mode 100644 index 0000000..2ead754 --- /dev/null +++ b/src/api/eam/item/countJobMain/index.ts @@ -0,0 +1,56 @@ +import request from '@/config/axios' + +export interface CountJobMainVO { + id : number + number : string + name : string + classification : string + isInAccount : string + status : string +} + +// 查询备件盘点计划列表 +export const getCountJobMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = { ...params } + return await request.post({ url: '/eam/countJobMain/senior', data }) + } else { + return await request.get({ url: `/eam/countJobMain/page`, params }) + } +} + +// 查询备件盘点计划详情 +export const getCountJobMain = async (id : number) => { + return await request.get({ url: `/eam/countJobMain/get?id=` + id }) +} + +// 新增备件盘点计划 +export const createCountJobMain = async (data : CountJobMainVO) => { + return await request.post({ url: `/eam/countJobMain/create`, data }) +} + +// 修改备件盘点计划 +export const updateCountJobMain = async (data : CountJobMainVO) => { + return await request.put({ url: `/eam/countJobMain/update`, data }) +} + +// 删除备件盘点计划 +export const deleteCountJobMain = async (id : number) => { + return await request.delete({ url: `/eam/countJobMain/delete?id=` + id }) +} + +// 导出备件盘点计划 Excel +export const handleMainExport = async (id : number) => { + return await request.download({ url: `/eam/countJobMain/handleMainExport?id=` + id }) +} + +// 导出备件盘点计划 Excel +export const exportCountJobMain = async (params) => { + return await request.download({ url: `/eam/countJobMain/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/countJobMain/get-import-template' }) +} diff --git a/src/api/eam/item/countRecordDetail/index.ts b/src/api/eam/item/countRecordDetail/index.ts new file mode 100644 index 0000000..0387608 --- /dev/null +++ b/src/api/eam/item/countRecordDetail/index.ts @@ -0,0 +1,51 @@ +import request from '@/config/axios' + +export interface CountRecordDetailVO { + id : number + number : string + name : string + classification : string + isInAccount : string + status : string +} + +// 查询备件盘点计划列表 +export const getCountRecordDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = { ...params } + return await request.post({ url: '/eam/countRecordDetail/senior', data }) + } else { + return await request.get({ url: `/eam/countRecordDetail/page`, params }) + } +} + +// 查询备件盘点计划详情 +export const getCountRecordDetail = async (id : number) => { + return await request.get({ url: `/eam/countRecordDetail/get?id=` + id }) +} + +// 新增备件盘点计划 +export const createCountRecordDetail = async (data : CountRecordDetailVO) => { + return await request.post({ url: `/eam/countRecordDetail/create`, data }) +} + +// 修改备件盘点计划 +export const updateCountRecordDetail = async (data : CountRecordDetailVO) => { + return await request.put({ url: `/eam/countRecordDetail/update`, data }) +} + +// 删除备件盘点计划 +export const deleteCountRecordDetail = async (id : number) => { + return await request.delete({ url: `/eam/countRecordDetail/delete?id=` + id }) +} + +// 导出备件盘点计划 Excel +export const exportCountRecordDetail = async (params) => { + return await request.download({ url: `/eam/countRecordDetail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/countRecordDetail/get-import-template' }) +} diff --git a/src/api/eam/item/countRecordMain/index.ts b/src/api/eam/item/countRecordMain/index.ts new file mode 100644 index 0000000..88e078e --- /dev/null +++ b/src/api/eam/item/countRecordMain/index.ts @@ -0,0 +1,60 @@ +import request from '@/config/axios' + +export interface CountRecordMainVO { + id : number + number : string + name : string + classification : string + isInAccount : string + status : string +} + +// 查询备件盘点计划列表 +export const getCountRecordMainPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = { ...params } + return await request.post({ url: '/eam/countRecordMain/senior', data }) + } else { + return await request.get({ url: `/eam/countRecordMain/page`, params }) + } +} + +// 查询备件盘点计划详情 +export const getCountRecordMain = async (id : number) => { + return await request.get({ url: `/eam/countRecordMain/get?id=` + id }) +} + +// 新增备件盘点计划 +export const createCountRecordMain = async (data : CountRecordMainVO) => { + return await request.post({ url: `/eam/countRecordMain/create`, data }) +} + +// 修改备件盘点计划 +export const updateCountRecordMain = async (data : CountRecordMainVO) => { + return await request.put({ url: `/eam/countRecordMain/update`, data }) +} + +// 删除备件盘点计划 +export const deleteCountRecordMain = async (id : number) => { + return await request.delete({ url: `/eam/countRecordMain/delete?id=` + id }) +} +// 盘点调整 +export const adjustCountRecordMain = async (id : number) => { + return await request.get({ url: `/eam/countRecordMain/adjust?number=` + id }) +} + +// 导出备件盘点计划 Excel +export const handleMainExport = async (id : number) => { + return await request.download({ url: `/eam/countRecordMain/handleMainExport?id=` + id }) +} + +// 导出备件盘点计划 Excel +export const exportCounRecordMain = async (params) => { + return await request.download({ url: `/eam/countRecordMain/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/countRecordMain/get-import-template' }) +} diff --git a/src/views/eam/item/countRecord/countRecord.data.ts b/src/views/eam/item/countRecord/countRecord.data.ts new file mode 100644 index 0000000..a56334f --- /dev/null +++ b/src/views/eam/item/countRecord/countRecord.data.ts @@ -0,0 +1,151 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import { validateHanset, validateEmail } from '@/utils/validator' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 备件申领主表 + */ +export const CountRecordMain = useCrudSchemas(reactive([ + { + label: '工单编号', + field: 'number', + sort: 'custom', + isForm: false, + isSearch: true, + table: { + width: 180, + fixed: 'left' + }, + }, + { + label: '名称', + field: 'name', + sort: 'custom', + isForm: false, + isSearch: false, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + isForm: false, + isSearch: false, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 200, + fixed: 'right' + } + } +])) + +//表单校验 +export const CountRecordMainRules = reactive({ + name: [ + { required: true, message: '请填写描述', trigger: 'change' } + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], +}) + +/** + * @returns {Array} 备件申请子表 + */ +export const CountRecordDetail = useCrudSchemas(reactive([ + { + label: '工单编号', + field: 'number', + sort: 'custom', + isForm: false, + isSearch: true, + table: { + width: 180, + fixed: 'left' + }, + }, + + { + label: '备件编号', + field: 'itemNumber', + sort: 'custom', + isForm: false, + isSearch: true, + table: { + width: 180, + }, + }, + + { + label: '库位编号', + field: 'locationNumber', + sort: 'custom', + isForm: false, + isSearch: true, + table: { + width: 180, + }, + }, + + { + label: '库区编号', + field: 'areaNumber', + sort: 'custom', + isForm: false, + isSearch: true, + table: { + width: 180, + }, + }, + + { + label: '库存数量', + field: 'qty', + sort: 'custom', + isForm: false, + isSearch: true, + table: { + width: 180, + }, + }, + { + label: '盘点数量', + field: 'countQty', + sort: 'custom', + isForm: false, + isSearch: true, + table: { + width: 180, + }, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 150, + fixed: 'right' + }, + isTableForm: false, + } +])) + +//表单校验 +export const CountRecordDetailRules = reactive({ + lineNumber: [ + { required: true, message: '请输入行号', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + stdPackQty: [ + { required: true, message: '请输入标包数量', trigger: 'blur' } + ], +}) diff --git a/src/views/eam/item/countRecord/index.vue b/src/views/eam/item/countRecord/index.vue new file mode 100644 index 0000000..3cb8703 --- /dev/null +++ b/src/views/eam/item/countRecord/index.vue @@ -0,0 +1,337 @@ + + + diff --git a/src/views/eam/item/countadjustWork/countadjustWork.data.ts b/src/views/eam/item/countadjustWork/countadjustWork.data.ts new file mode 100644 index 0000000..89aa3cb --- /dev/null +++ b/src/views/eam/item/countadjustWork/countadjustWork.data.ts @@ -0,0 +1,144 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import { validateHanset, validateEmail } from '@/utils/validator' +const { t } = useI18n() // 国际化 + +/** + * @returns {Array} 备件申领主表 + */ +export const CountJobMain = useCrudSchemas(reactive([ + { + label: '计划编号', + field: 'number', + sort: 'custom', + isForm: false, + isSearch: true, + table: { + width: 180, + fixed: 'left' + }, + }, + { + label: '工单编号', + field: 'jobNumber', + sort: 'custom', + isForm: false, + isSearch: true, + table: { + width: 180, + }, + }, + { + label: '名称', + field: 'name', + sort: 'custom', + isForm: false, + isSearch: false, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 200, + fixed: 'right' + } + } +])) + +//表单校验 +export const CountJobMainRules = reactive({ + name: [ + { required: true, message: '请填写描述', trigger: 'change' } + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], +}) + +/** + * @returns {Array} 备件申请子表 + */ +export const CountJobDetail = useCrudSchemas(reactive([ + { + label: '工单编号', + field: 'number', + sort: 'custom', + isForm: false, + isSearch: true, + table: { + width: 180, + fixed: 'left' + }, + }, + + { + label: '备件编号', + field: 'itemNumber', + sort: 'custom', + isForm: false, + isSearch: true, + table: { + width: 180, + }, + }, + + { + label: '库位编号', + field: 'locationNumber', + sort: 'custom', + isForm: false, + isSearch: true, + table: { + width: 180, + }, + }, + + { + label: '库区编号', + field: 'areaNumber', + sort: 'custom', + isForm: false, + isSearch: true, + table: { + width: 180, + }, + }, + + { + label: '库存数量', + field: 'qty', + sort: 'custom', + isForm: false, + isSearch: true, + table: { + width: 180, + }, + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 150, + fixed: 'right' + }, + isTableForm: false, + } +])) + +//表单校验 +export const CountJobDetailRules = reactive({ + lineNumber: [ + { required: true, message: '请输入行号', trigger: 'blur' }, + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + stdPackQty: [ + { required: true, message: '请输入标包数量', trigger: 'blur' } + ], +})