From 69ffc260effae0d0ad09bd8edcddf8f534870308 Mon Sep 17 00:00:00 2001 From: gaojs <757918719@qq.com> Date: Wed, 26 Jun 2024 11:20:27 +0800 Subject: [PATCH 1/6] =?UTF-8?q?EAM=20=E2=80=94=E2=80=94>=20=20=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E6=95=B0=E6=8D=AE=E8=BD=A6=E9=97=B4=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eam/basicEamWorkshop/index.ts | 59 +++++ .../basicEamWorkshop/basicEamWorkshop.data.ts | 199 ++++++++++++++ src/views/eam/basicEamWorkshop/index.vue | 244 ++++++++++++++++++ 3 files changed, 502 insertions(+) create mode 100644 src/api/eam/basicEamWorkshop/index.ts create mode 100644 src/views/eam/basicEamWorkshop/basicEamWorkshop.data.ts create mode 100644 src/views/eam/basicEamWorkshop/index.vue diff --git a/src/api/eam/basicEamWorkshop/index.ts b/src/api/eam/basicEamWorkshop/index.ts new file mode 100644 index 000000000..330e0a251 --- /dev/null +++ b/src/api/eam/basicEamWorkshop/index.ts @@ -0,0 +1,59 @@ +import request from '@/config/axios' + +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' }) +} \ No newline at end of file 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..95ce7e199 --- /dev/null +++ b/src/views/eam/basicEamWorkshop/index.vue @@ -0,0 +1,244 @@ + + + From 9ade868f1c20ac3851a434be098e71f30b0cff5c Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Wed, 26 Jun 2024 11:27:22 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E7=BC=96=E8=BE=91=E9=A2=84=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E8=AE=A1=E5=88=92=E6=97=A0=E6=B3=95=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=EF=BC=8C=E6=8A=A5=E9=94=99=E2=80=9C=E7=94=9F=E4=BA=A7=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E4=B8=BB=E4=B8=8D=E5=AD=98=E5=9C=A8=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productionplan/productionMain/index.vue | 6 +++++- .../productionplan/productionMainAssemble/index.vue | 6 +++++- .../productionMainAssembleSparePart/index.vue | 6 +++++- .../productionplan/productionMainPredictSparePart/index.vue | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-) 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 From a4ff2bc4898b1e8a9fad158dc3cc801a6f2969fb Mon Sep 17 00:00:00 2001 From: gaojs <757918719@qq.com> Date: Wed, 26 Jun 2024 13:27:39 +0800 Subject: [PATCH 3/6] =?UTF-8?q?EAM=20=E2=80=94=E2=80=94>=20=20=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E6=95=B0=E6=8D=AE=E8=BD=A6=E9=97=B4=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eam/basicEamWorkshop/index.ts | 8 +++- src/views/eam/basicEamWorkshop/index.vue | 61 ++++++++++++++++++++++-- 2 files changed, 63 insertions(+), 6 deletions(-) diff --git a/src/api/eam/basicEamWorkshop/index.ts b/src/api/eam/basicEamWorkshop/index.ts index 330e0a251..31acbb17c 100644 --- a/src/api/eam/basicEamWorkshop/index.ts +++ b/src/api/eam/basicEamWorkshop/index.ts @@ -1,4 +1,5 @@ import request from '@/config/axios' +import {EquipmentMainPartVO} from "@/api/eam/equipmentMainPart"; export interface BasicEamWorkshopVO { id: number @@ -56,4 +57,9 @@ export const exportBasicEamWorkshop = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/eam/basic-eam-workshop/get-import-template' }) -} \ No newline at end of file +} + +// 启用 / 禁用 +export const updateEnableCode = async (data: BasicEamWorkshopVO) => { + return await request.post({ url: `/eam/basic-eam-workshop/ables` , data }) +} diff --git a/src/views/eam/basicEamWorkshop/index.vue b/src/views/eam/basicEamWorkshop/index.vue index 95ce7e199..c3739217a 100644 --- a/src/views/eam/basicEamWorkshop/index.vue +++ b/src/views/eam/basicEamWorkshop/index.vue @@ -33,7 +33,7 @@ @@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' +import * as BasicFaultCauseApi from "@/api/eam/basicFaultCause"; defineOptions({ name: 'BasicEamWorkshop' }) @@ -131,11 +132,25 @@ const buttonBaseClick = (val, item) => { } } +const isShowMainButton = (row,val) => { + if (val.indexOf(row.available) > -1) { + return false + } else { + return true + } +} + // 列表-操作按钮 -const butttondata = [ - defaultButtons.mainListEditBtn({hasPermi:'eam:basicEamWorkshop:update'}), // 编辑 - defaultButtons.mainListDeleteBtn({hasPermi:'eam:basicEamWorkshop:delete'}), // 删除 -] +const butttondata = (row) => { + return [ + defaultButtons.mainListEditBtn({hasPermi:'eam:basicEamWorkshop:update'}), // 编辑 + //defaultButtons.mainListDeleteBtn({hasPermi:'eam:basicEamWorkshop:delete'}), // 删除 + defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:basicEamWorkshop:update'}), + defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:basicEamWorkshop:update'}), + ] +} + + // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { @@ -143,6 +158,10 @@ const buttonTableClick = async (val, row) => { openForm('update', row) } else if (val == 'delete') { // 删除 handleDelete(row.id) + } else if (val == 'enable') { + handleEnable(row.id) + } else if (val == 'disable') { + handleDisable(row.id) } } @@ -195,6 +214,38 @@ const handleDelete = async (id: number) => { } catch {} } + +/** 启用 */ +const handleEnable = async (id: number) => { + try { + const params = ref({ + id: '', + available:'', + }) + params.value.id = id + params.value.available = 'TRUE' + await BasicEamWorkshopApi.updateEnableCode(params.value) + message.success(t('common.updateSuccess')) + // 刷新列表 + await getList() + } catch {} +} +/** 禁用 */ +const handleDisable = async (id: number) => { + try { + const params = ref({ + id: '', + available:'', + }) + params.value.id = id + params.value.available = 'FALSE' + await BasicEamWorkshopApi.updateEnableCode(params.value) + message.success(t('common.updateSuccess')) + // 刷新列表 + await getList() + } catch {} +} + /** 导出按钮操作 */ const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { From e5f5b1ad321d831ef2aadc92295e884f508c35fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Wed, 26 Jun 2024 14:28:33 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=BA=93=E5=8C=BA=E5=90=8D=E5=AD=97?= =?UTF-8?q?=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basicDataManage/factoryModeling/areabasic/areabasic.data.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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' } From 779681e312f66275acb3922ffd8c5080fc78faee Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Wed, 26 Jun 2024 14:47:08 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E6=96=B9=E6=A1=88?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/qms/inspectionTemplate/index.ts | 5 ++++ src/views/qms/inspectionTemplate/index.vue | 29 ++++++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) 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/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 @@ /> - + From 7509afbe5bc732e0be7922246b94043750d17858 Mon Sep 17 00:00:00 2001 From: bjang03 Date: Wed, 26 Jun 2024 15:20:13 +0800 Subject: [PATCH 6/6] =?UTF-8?q?BUG=E4=BF=AE=E5=A4=8D=201=E3=80=81=E7=9B=98?= =?UTF-8?q?=E7=82=B9-=E7=9B=98=E7=82=B9=E8=B0=83=E6=95=B4-=E7=9B=98?= =?UTF-8?q?=E7=82=B9=E8=B0=83=E6=95=B4=E7=94=B3=E8=AF=B7=EF=BC=8C=E6=98=8E?= =?UTF-8?q?=E7=BB=86=E4=B8=8D=E5=BA=94=E6=9C=89=E6=96=B0=E5=A2=9E=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/countManage/countadjust/countadjustRequestMain/index.vue | 1 + 1 file changed, 1 insertion(+) 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" />