diff --git a/src/api/eam/basicEamWorkshop/index.ts b/src/api/eam/basicEamWorkshop/index.ts new file mode 100644 index 000000000..31acbb17c --- /dev/null +++ b/src/api/eam/basicEamWorkshop/index.ts @@ -0,0 +1,65 @@ +import request from '@/config/axios' +import {EquipmentMainPartVO} from "@/api/eam/equipmentMainPart"; + +export interface BasicEamWorkshopVO { + id: number + code: string + name: string + description: string + type: string + available: string + activeTime: Date + expireTime: Date + remark: string + deletionTime: Date + deleterId: string + extraProperties: string + concurrencyStamp: number + siteId: string +} + +// 查询EAM车间列表 +export const getBasicEamWorkshopPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/basic-eam-workshop/senior', data }) + } else { + return await request.get({ url: `/eam/basic-eam-workshop/page`, params }) + } +} + +// 查询EAM车间详情 +export const getBasicEamWorkshop = async (id: number) => { + return await request.get({ url: `/eam/basic-eam-workshop/get?id=` + id }) +} + +// 新增EAM车间 +export const createBasicEamWorkshop = async (data: BasicEamWorkshopVO) => { + return await request.post({ url: `/eam/basic-eam-workshop/create`, data }) +} + +// 修改EAM车间 +export const updateBasicEamWorkshop = async (data: BasicEamWorkshopVO) => { + return await request.put({ url: `/eam/basic-eam-workshop/update`, data }) +} + +// 删除EAM车间 +export const deleteBasicEamWorkshop = async (id: number) => { + return await request.delete({ url: `/eam/basic-eam-workshop/delete?id=` + id }) +} + +// 导出EAM车间 Excel +export const exportBasicEamWorkshop = async (params) => { + return await request.download({ url: `/eam/basic-eam-workshop/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/basic-eam-workshop/get-import-template' }) +} + +// 启用 / 禁用 +export const updateEnableCode = async (data: BasicEamWorkshopVO) => { + return await request.post({ url: `/eam/basic-eam-workshop/ables` , data }) +} diff --git a/src/api/qms/inspectionTemplate/index.ts b/src/api/qms/inspectionTemplate/index.ts index f3bf638d2..eb80285c8 100644 --- a/src/api/qms/inspectionTemplate/index.ts +++ b/src/api/qms/inspectionTemplate/index.ts @@ -37,3 +37,8 @@ export const enableInspectionTemplate = async (id: number) => { export const disableInspectionTemplate = async (id: number) => { return await request.disable({ url: `/qms/programme-template/disable?id=` + id }) } + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/qms/programme-template/get-import-template' }) +} diff --git a/src/views/eam/basicEamWorkshop/basicEamWorkshop.data.ts b/src/views/eam/basicEamWorkshop/basicEamWorkshop.data.ts new file mode 100644 index 000000000..49809cffb --- /dev/null +++ b/src/views/eam/basicEamWorkshop/basicEamWorkshop.data.ts @@ -0,0 +1,199 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const BasicEamWorkshopRules = reactive({ + code: [required], + available: [required], + concurrencyStamp: [required], +}) + +export const BasicEamWorkshop = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '车间编号', + field: 'code', + sort: 'custom', + isSearch: true, + }, + { + label: '车间名称', + field: 'name', + sort: 'custom', + isSearch: true, + }, + { + label: '描述', + field: 'description', + sort: 'custom', + isSearch: false, + }, + { + label: '车间类型', + field: 'type', + sort: 'custom', + isSearch: true, + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + isSearch: true, + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + }, + { + label: '生效时间', + field: 'activeTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + isTable: false, + isForm: false, + isDetail: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')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '失效时间', + field: 'expireTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + isTable: false, + isForm: false, + isDetail: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')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false, + }, + { + 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: 'deletionTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + isTable: false, + isForm: false, + isDetail: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')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + }, + }, + { + label: '删除者ID', + field: 'deleterId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '扩展属性', + field: 'extraProperties', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + form: { + component: 'InputNumber', + value: 0 + }, + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail:false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/eam/basicEamWorkshop/index.vue b/src/views/eam/basicEamWorkshop/index.vue new file mode 100644 index 000000000..c3739217a --- /dev/null +++ b/src/views/eam/basicEamWorkshop/index.vue @@ -0,0 +1,295 @@ + + + diff --git a/src/views/qms/inspectionTemplate/index.vue b/src/views/qms/inspectionTemplate/index.vue index dd0a4cea7..d5dc6e642 100644 --- a/src/views/qms/inspectionTemplate/index.vue +++ b/src/views/qms/inspectionTemplate/index.vue @@ -56,7 +56,15 @@ /> - + diff --git a/src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts b/src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts index 2470bc8c8..1ed56940b 100644 --- a/src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts +++ b/src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts @@ -254,7 +254,7 @@ export const AreaRules = reactive({ { validate: validateYS, message: '请输入正确的代码', trigger: 'blur' } ], name: [ - { max: 50, message: '不得超过50个字符', trigger: 'blur' } + { required: true, max: 50, message: '不得超过50个字符', trigger: 'blur' } ], remark: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' } diff --git a/src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue b/src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue index 7f06f76f3..58e2edbcc 100644 --- a/src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue +++ b/src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue @@ -70,6 +70,7 @@ :apiPage="CountadjustRequestDetailApi.getCountadjustRequestDetailPage" :apiDelete="CountadjustRequestDetailApi.deleteCountadjustRequestDetail" fromeWhere="countadjustRequest" + :detailButtonIsShowAdd="false" :Echo="Echo" @searchTableSuccessDetail="searchTableSuccessDetail" /> diff --git a/src/views/wms/productionManage/productionplan/productionMain/index.vue b/src/views/wms/productionManage/productionplan/productionMain/index.vue index 25e53a661..ccf175c27 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMain/index.vue @@ -461,7 +461,11 @@ const tableSelectionDelete = (selection) => { } // 主子数据 提交 -const submitForm = async (formType, data) => { +const submitForm = async (formType, submitData) => { + let data = {...submitData} + if(data.masterId){ + data.id = data.masterId + } if(tableData.value.find(item => (item.planQty <= 0))) { message.warning('数量必须大于0') formRef.value.formLoading = false diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue index f8dab6fc1..91b97e1da 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue @@ -448,7 +448,11 @@ const tableSelectionDelete = (selection) => { } // 主子数据 提交 -const submitForm = async (formType, data) => { +const submitForm = async (formType, submitData) => { + let data = {...submitData} + if(data.masterId){ + data.id = data.masterId + } if(tableData.value.find(item => (item.planQty <= 0))) { message.warning('数量必须大于0') formRef.value.formLoading = false diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue index 338d62945..468b425b1 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue @@ -447,7 +447,11 @@ const tableSelectionDelete = (selection) => { tableData.value = tableData.value.filter(item => !selection.includes(item)) } // 主子数据 提交 -const submitForm = async (formType, data) => { +const submitForm = async (formType, submitData) => { + let data = {...submitData} + if(data.masterId){ + data.id = data.masterId + } if(tableData.value.find(item => (item.planQty <= 0))) { message.warning('数量必须大于0') formRef.value.formLoading = false diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue index 186b60738..6d039de03 100644 --- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue @@ -448,7 +448,11 @@ const tableSelectionDelete = (selection) => { } // 主子数据 提交 -const submitForm = async (formType, data) => { +const submitForm = async (formType, submitData) => { + let data = {...submitData} + if(data.masterId){ + data.id = data.masterId + } if(tableData.value.find(item => (item.planQty <= 0))) { message.warning('数量必须大于0') formRef.value.formLoading = false