diff --git a/src/api/eam/item/countadjustWork/index.ts b/src/api/eam/item/countadjustWork/index.ts deleted file mode 100644 index 003a203..0000000 --- a/src/api/eam/item/countadjustWork/index.ts +++ /dev/null @@ -1,51 +0,0 @@ -import request from '@/config/axios' - -export interface CountadjustPlanVO { - id : number - number : string - name : string - classification : string - isInAccount : string - status : string -} - -// 查询备件盘点计划列表 -export const getCountadjustWorkPage = 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 getCountadjustWork = async (id : number) => { - return await request.get({ url: `/eam/countadjust-plan/get?id=` + id }) -} - -// 新增备件盘点计划 -export const createCountadjustWork = async (data : CountadjustPlanVO) => { - return await request.post({ url: `/eam/countadjust-plan/create`, data }) -} - -// 修改备件盘点计划 -export const updateCountadjustWork = async (data : CountadjustPlanVO) => { - return await request.put({ url: `/eam/countadjust-plan/update`, data }) -} - -// 删除备件盘点计划 -export const deleteCountadjustWork = async (id : number) => { - return await request.delete({ url: `/eam/countadjust-plan/delete?id=` + id }) -} - -// 导出备件盘点计划 Excel -export const exportCountadjustWork = 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/utils/dict.ts b/src/utils/dict.ts index 8072cb1..d6007ee 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -291,6 +291,8 @@ export enum DICT_TYPE { IS_OPEN = 'is_open', //是否打开 ITEM_APPLY_STATUS = 'item_apply_status',//备件申领状态 JX_DETAILS_STATUS = 'jx_details_status', //检修明细状态 + CLASSIFICATION = 'classification', //检修明细状态 + } diff --git a/src/views/eam/basic/item/index.vue b/src/views/eam/basic/item/index.vue index 096136f..4b237dd 100644 --- a/src/views/eam/basic/item/index.vue +++ b/src/views/eam/basic/item/index.vue @@ -83,7 +83,7 @@ // 列表头部按钮 const HeadButttondata = [ - // defaultButtons.defaultAddBtn(null), // 新增 + defaultButtons.defaultAddBtn(null), // 新增 defaultButtons.defaultExportBtn(null), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 diff --git a/src/views/eam/basic/item/item.data.ts b/src/views/eam/basic/item/item.data.ts index a8b1839..4800dba 100644 --- a/src/views/eam/basic/item/item.data.ts +++ b/src/views/eam/basic/item/item.data.ts @@ -76,6 +76,18 @@ export const Item = useCrudSchemas(reactive([ type: 'Select' } }, + { + label: '备件分类', + field: 'classification', + sort: 'custom', + dictType: DICT_TYPE.CLASSIFICATION, + dictClass: 'string', + isSearch: false, + isTable: true, + tableForm: { + type: 'Select' + } + }, { label: '单价', field: 'singlePrice', diff --git a/src/views/eam/item/countadjustPlan/countadjustPlan.data.ts b/src/views/eam/item/countadjustPlan/countadjustPlan.data.ts index 0075d07..42ce751 100644 --- a/src/views/eam/item/countadjustPlan/countadjustPlan.data.ts +++ b/src/views/eam/item/countadjustPlan/countadjustPlan.data.ts @@ -20,26 +20,53 @@ export const CountadjustPlan = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, }, + // { + // label: '盘点类型', + // field: 'classification', + // sort: 'custom', + // isSearch: false, + // }, + { label: '盘点类型', - field: 'classification', - sort: 'custom', - isSearch: false, + field: 'type', + sort: 'classification', + dictType: DICT_TYPE.CLASSIFICATION, + dictClass: 'string', + isSearch: true, + isTable: true, + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: false + } }, { label: '是否账内库', field: 'isInAccount', - sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', isSearch: false, - }, - { - label: '状态', - field: 'status', + isTable: true, sort: 'custom', - isSearch: false, - form: { - component: 'Radio' + table: { + width: 140 }, + tableForm: { + type: 'Select', + inactiveValue: 'FALSE', + disabled: true + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } }, { label: '操作', diff --git a/src/views/eam/item/countadjustWork/countadjustWork.data.ts b/src/views/eam/item/countadjustWork/countadjustWork.data.ts deleted file mode 100644 index ee5c72f..0000000 --- a/src/views/eam/item/countadjustWork/countadjustWork.data.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { CrudSchema } from '@/hooks/web/useCrudSchemas' - -// 表单校验 -export const CountadjustWorkRules = reactive({ - number: [required], - name: [required], -}) - -export const CountadjustWork = 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/countadjustWork/index.vue b/src/views/eam/item/countadjustWork/index.vue index 7892429..928a17a 100644 --- a/src/views/eam/item/countadjustWork/index.vue +++ b/src/views/eam/item/countadjustWork/index.vue @@ -1,244 +1,300 @@