From 635e42313eb7ae98252653631d12fb98ce95fe86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=BB=E7=A0=96-JAVA=5CAdministrator?= <591141169@qq.com> Date: Tue, 27 Feb 2024 13:58:37 +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/adjustRecordDetail/index.ts | 46 +++ src/api/eam/item/countRecordMain/index.ts | 1 + src/utils/dict.ts | 3 + .../item/adjustRecord/adjustRecord.data.ts | 143 ++++++++ src/views/eam/item/adjustRecord/index.vue | 320 ++++++++++++++++++ .../adjustRecordMain/adjustRecordMain.data.ts | 32 -- src/views/eam/item/adjustRecordMain/index.vue | 204 ----------- .../eam/item/countRecord/countRecord.data.ts | 44 ++- src/views/eam/item/countRecord/index.vue | 4 +- .../item/itemAccounts/itemAccounts.data.ts | 3 - 10 files changed, 553 insertions(+), 247 deletions(-) create mode 100644 src/api/eam/item/adjustRecordDetail/index.ts create mode 100644 src/views/eam/item/adjustRecord/adjustRecord.data.ts create mode 100644 src/views/eam/item/adjustRecord/index.vue delete mode 100644 src/views/eam/item/adjustRecordMain/adjustRecordMain.data.ts delete mode 100644 src/views/eam/item/adjustRecordMain/index.vue diff --git a/src/api/eam/item/adjustRecordDetail/index.ts b/src/api/eam/item/adjustRecordDetail/index.ts new file mode 100644 index 0000000..d8f18cb --- /dev/null +++ b/src/api/eam/item/adjustRecordDetail/index.ts @@ -0,0 +1,46 @@ +import request from '@/config/axios' + +export interface AdjustRecordDetailVO { + number: string + planNumber: string + requestNumber: string + requestTime: Date + jobNumber: string + recordNumber: string +} + +// 查询备件盘点调整记录主列表 +export const getAdjustRecordDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/adjustRecordDetail/senior', data }) + } else { + return await request.get({ url: `/eam/adjustRecordDetail/page`, params }) + } +} + +// 查询备件盘点调整记录主详情 +export const getAdjustRecordDetail = async (id: number) => { + return await request.get({ url: `/eam/adjustRecordDetail/get?id=` + id }) +} + +// 新增备件盘点调整记录主 +export const createAdjustRecordDetail = async (data: AdjustRecordDetailVO) => { + return await request.post({ url: `/eam/adjustRecordDetail/create`, data }) +} + +// 修改备件盘点调整记录主 +export const updateAdjustRecordDetail = async (data: AdjustRecordDetailVO) => { + return await request.put({ url: `/eam/adjustRecordDetail/update`, data }) +} + +// 删除备件盘点调整记录主 +export const deleteAdjustRecordDetail = async (id: number) => { + return await request.delete({ url: `/eam/adjustRecordDetail/delete?id=` + id }) +} + +// 导出备件盘点调整记录主 Excel +export const exportAdjustRecordDetail = async (params) => { + return await request.download({ url: `/eam/adjustRecordDetail/export-excel`, params }) +} diff --git a/src/api/eam/item/countRecordMain/index.ts b/src/api/eam/item/countRecordMain/index.ts index 88e078e..512ae4c 100644 --- a/src/api/eam/item/countRecordMain/index.ts +++ b/src/api/eam/item/countRecordMain/index.ts @@ -11,6 +11,7 @@ export interface CountRecordMainVO { // 查询备件盘点计划列表 export const getCountRecordMainPage = async (params) => { + params.status="CANGENERATE" if (params.isSearch) { delete params.isSearch const data = { ...params } diff --git a/src/utils/dict.ts b/src/utils/dict.ts index f6e71e5..5137935 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -296,6 +296,9 @@ export enum DICT_TYPE { DEPT_BUSI_TYPE = 'dept_busi_type', //部门类型 DEPT_GROUP = 'dept_group', //部门分组 POWER_RANGE = 'power_range', //功率范围 + ADJUST_STATUS = 'adjust_status', //盘点调整状态 + + } diff --git a/src/views/eam/item/adjustRecord/adjustRecord.data.ts b/src/views/eam/item/adjustRecord/adjustRecord.data.ts new file mode 100644 index 0000000..fff1ebf --- /dev/null +++ b/src/views/eam/item/adjustRecord/adjustRecord.data.ts @@ -0,0 +1,143 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const Rules = reactive({ + number: [required], + planNumber: [required], +}) + +export const AdjustRecordMain = useCrudSchemas(reactive([ + { + label: '调整编号', + field: 'number', + sort: 'custom', + isSearch: true, + }, + { + label: '计划编号', + field: 'planNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '任务编号', + field: 'jobNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) + +//表单校验 +export const AdjustRecordMainRules = reactive({ + name: [ + { required: true, message: '请填写描述', trigger: 'change' } + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + available: [ + { required: true, message: '请选择是否可用', trigger: 'change' } + ], +}) +/** + * @returns {Array} 备件申请子表 + */ +export const AdjustRecordDetail = 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 AdjustRecordDetailRules = 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/adjustRecord/index.vue b/src/views/eam/item/adjustRecord/index.vue new file mode 100644 index 0000000..3a3dd13 --- /dev/null +++ b/src/views/eam/item/adjustRecord/index.vue @@ -0,0 +1,320 @@ + + + diff --git a/src/views/eam/item/adjustRecordMain/adjustRecordMain.data.ts b/src/views/eam/item/adjustRecordMain/adjustRecordMain.data.ts deleted file mode 100644 index 74e97bd..0000000 --- a/src/views/eam/item/adjustRecordMain/adjustRecordMain.data.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter } from '@/utils/formatTime' - -// 表单校验 -export const Rules = reactive({ - number: [required], - planNumber: [required], -}) - -export const AdjustRecordMain = useCrudSchemas(reactive([ - { - label: '备件调整编号', - field: 'number', - sort: 'custom', - isSearch: true, - }, - { - label: '盘点计划编号', - field: 'planNumber', - sort: 'custom', - isSearch: true, - }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 150, - fixed: 'right' - } - } -])) \ No newline at end of file diff --git a/src/views/eam/item/adjustRecordMain/index.vue b/src/views/eam/item/adjustRecordMain/index.vue deleted file mode 100644 index 85bce24..0000000 --- a/src/views/eam/item/adjustRecordMain/index.vue +++ /dev/null @@ -1,204 +0,0 @@ - - - diff --git a/src/views/eam/item/countRecord/countRecord.data.ts b/src/views/eam/item/countRecord/countRecord.data.ts index a56334f..9b5297a 100644 --- a/src/views/eam/item/countRecord/countRecord.data.ts +++ b/src/views/eam/item/countRecord/countRecord.data.ts @@ -8,7 +8,7 @@ const { t } = useI18n() // 国际化 */ export const CountRecordMain = useCrudSchemas(reactive([ { - label: '工单编号', + label: '任务编号', field: 'number', sort: 'custom', isForm: false, @@ -18,6 +18,17 @@ export const CountRecordMain = useCrudSchemas(reactive([ fixed: 'left' }, }, + { + label: '工单编号', + field: 'jobNumber', + sort: 'custom', + isForm: false, + isSearch: true, + table: { + width: 180, + fixed: 'left' + }, + }, { label: '名称', field: 'name', @@ -26,12 +37,33 @@ export const CountRecordMain = useCrudSchemas(reactive([ isSearch: false, }, { - label: '创建时间', - field: 'createTime', + label: '状态', + field: 'status', sort: 'custom', - isForm: false, - isSearch: false, + dictType: DICT_TYPE.ADJUST_STATUS, + dictClass: 'string', + isTable: true, + isForm: true, + tableForm: { + type: 'Select' + } }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, { label: '操作', field: 'action', @@ -62,7 +94,7 @@ export const CountRecordMainRules = reactive({ */ export const CountRecordDetail = useCrudSchemas(reactive([ { - label: '工单编号', + label: '任务编号', field: 'number', sort: 'custom', isForm: false, diff --git a/src/views/eam/item/countRecord/index.vue b/src/views/eam/item/countRecord/index.vue index 3cb8703..4f55c36 100644 --- a/src/views/eam/item/countRecord/index.vue +++ b/src/views/eam/item/countRecord/index.vue @@ -211,10 +211,10 @@ const handleMainAdjust = async (id : number) => { try { // 删除的二次确认 - await message.delConfirm() + await message.confirm('是否确认盘点调整?') // 发起删除 await CountRecordMainApi.adjustCountRecordMain(id) - message.success(t('common.delSuccess')) + message.success(t('盘点调整成功!')) // 刷新列表 await getList() } catch { } diff --git a/src/views/eam/item/itemAccounts/itemAccounts.data.ts b/src/views/eam/item/itemAccounts/itemAccounts.data.ts index 90324f4..9db54bc 100644 --- a/src/views/eam/item/itemAccounts/itemAccounts.data.ts +++ b/src/views/eam/item/itemAccounts/itemAccounts.data.ts @@ -78,9 +78,6 @@ export const ItemAccounts = useCrudSchemas(reactive([ } } }, - - - { label: '规格', field: 'itemDO.specifications',