From 5fc50f56a890b5c90b51178ca0675c957c2da24f Mon Sep 17 00:00:00 2001 From: zhousq Date: Thu, 16 May 2024 14:34:56 +0800 Subject: [PATCH 1/5] =?UTF-8?q?2024-05-16=20=E4=BF=AE=E6=94=B9=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrPersonAbility/hrPersonAbility.data.ts | 17 +++- src/views/mes/hrPersonAbility/index.vue | 16 +++- src/views/mes/opersteps/index.vue | 10 +++ src/views/mes/opersteps/opersteps.data.ts | 5 +- src/views/mes/operstepsType/index.vue | 9 +++ .../processroute/components/configDialog.vue | 30 ++++--- src/views/mes/processroute/index.vue | 19 +++-- .../mes/processroute/processroute.data.ts | 12 +-- .../components/qualifiedCheck.vue | 80 +++++++++++-------- 9 files changed, 131 insertions(+), 67 deletions(-) diff --git a/src/views/mes/hrPersonAbility/hrPersonAbility.data.ts b/src/views/mes/hrPersonAbility/hrPersonAbility.data.ts index 81c779e86..614e2ef7f 100644 --- a/src/views/mes/hrPersonAbility/hrPersonAbility.data.ts +++ b/src/views/mes/hrPersonAbility/hrPersonAbility.data.ts @@ -1,8 +1,9 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' import * as AbilityInfoApi from '@/api/mes/abilityInfo' +import * as UserApi from "@/api/system/user"; import { AbilityInfo } from '../abilityInfo/abilityInfo.data' - +import {searchUser} from "@/views/wms/basicDataManage/orderManage/team/team.data"; // 表单校验 export const HrPersonAbilityRules = reactive({ @@ -116,6 +117,20 @@ export const HrPersonAbility = useCrudSchemas(reactive([ field: 'personCode', sort: 'custom', isSearch: true, + form: { + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchTitle: '人员信息', // 查询弹窗标题 + searchAllSchemas: searchUser.allSchemas, // 查询弹窗所需类 + searchField: 'username', // 查询弹窗赋值字段 + searchPage: UserApi.getUserPage, // 查询弹窗所需分页方法 + searchCondition: [{ + action: "==", + column: 'userType', + value: 'WORKER' + }] + } + } }, { label: '能力编号', diff --git a/src/views/mes/hrPersonAbility/index.vue b/src/views/mes/hrPersonAbility/index.vue index f4b11845f..a4bc513f0 100644 --- a/src/views/mes/hrPersonAbility/index.vue +++ b/src/views/mes/hrPersonAbility/index.vue @@ -49,7 +49,7 @@ @searchTableSuccess="searchTableSuccess" :isBusiness="false" /> - + @@ -80,9 +80,17 @@ const tableColumns = ref(HrPersonAbility.allSchemas.tableColumns) // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef) => { nextTick(() => { - const setV = {} - setV[formField] = val[0][searchField] - formRef.setValues(setV) + if (formField === 'ablityCode') { + const setV = {} + setV[formField] = val[0][searchField] + formRef.setValues(setV) + } + if (formField === 'personCode') { + const setV = {} + setV[formField] = val[0][searchField] + formRef.setValues(setV) + } + }) } diff --git a/src/views/mes/opersteps/index.vue b/src/views/mes/opersteps/index.vue index 4e2c1abc8..6250e6ef1 100644 --- a/src/views/mes/opersteps/index.vue +++ b/src/views/mes/opersteps/index.vue @@ -149,6 +149,16 @@ const buttonTableClick = async (val, row) => { /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { + let disabledFlag = false + if(type==='update'){ + disabledFlag = true + } + Opersteps.allSchemas.formSchema.forEach(item => { + if (item.field == 'stepsCode') { + item.componentProps.disabled =disabledFlag + } + }) + basicFormRef.value.open(type, row) basicFormRef.value.open(type, row) } diff --git a/src/views/mes/opersteps/opersteps.data.ts b/src/views/mes/opersteps/opersteps.data.ts index 96dc16c9d..6dc4c1f12 100644 --- a/src/views/mes/opersteps/opersteps.data.ts +++ b/src/views/mes/opersteps/opersteps.data.ts @@ -5,7 +5,10 @@ import { OperstepsType } from '../operstepsType/operstepsType.data' // 表单校验 export const OperstepsRules = reactive({ - concurrencyStamp: [required], + //concurrencyStamp: [required], + stepsCode: [required], + stepsName: [required], + collectCode: [required], }) export const Opersteps = useCrudSchemas(reactive([ diff --git a/src/views/mes/operstepsType/index.vue b/src/views/mes/operstepsType/index.vue index 20c4d9940..761b74318 100644 --- a/src/views/mes/operstepsType/index.vue +++ b/src/views/mes/operstepsType/index.vue @@ -149,6 +149,15 @@ const buttonTableClick = async (val, row) => { /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { + let disabledFlag = false + if(type==='update'){ + disabledFlag = true + } + OperstepsType.allSchemas.formSchema.forEach(item => { + if (item.field == 'collectCode') { + item.componentProps.disabled =disabledFlag + } + }) basicFormRef.value.open(type, row) } diff --git a/src/views/mes/processroute/components/configDialog.vue b/src/views/mes/processroute/components/configDialog.vue index 589d36a19..08cdcd6bb 100644 --- a/src/views/mes/processroute/components/configDialog.vue +++ b/src/views/mes/processroute/components/configDialog.vue @@ -42,7 +42,7 @@ @@ -250,10 +250,16 @@ const searchTableSuccess = (formField, searchField, val, type, row) => { }) } } -const deleteNode=(row)=>{ - processData.value.splice(processData.value.indexOf(row),1) +const deleteNode=(row,index:number)=>{ + //console.log('row------',index) + //showProcessNodeData.value.splice(index,1) + processData.value.splice((page.value.current-1)*page.value.size+index,1) page.value.total=processData.value.length page.value.current=1 + showProcessNodeData.value=processData.value.slice(1,1+page.value.size); + + //page.value.current=1 + //showProcessNodeData.value=processData.value.slice((page.value.current-1)*page.value.size,page.value.size) graph.value.removeNode(row.code) } @@ -278,6 +284,9 @@ const openDetail = (row: any) => { materialData.value = [] mouldData.value = [] workStationList.value = [] + processData.value=[] + showProcessNodeData.value = [] + showMaterialsData.value = [] graph.value.on('node:dblclick', ({ e, x, y, node, view }) => { nodeClick(e, x, y, node, view) }) @@ -297,6 +306,7 @@ const handleDrawerClose = () => { //console.log(graph.value.toJSON()) rowData.value=null } + emit('close') } //**获取 工序信息 */ const getProcessInfo = async (id: any) => { @@ -440,15 +450,15 @@ const saveResult = async () => { processrouteId: processRouteId.value } - let res = ProcessrouteApi.saveGraphData(gdata) - if (res) { - message.success('保存成功!') - } else { - message.error('保存失败!') - } + await ProcessrouteApi.saveGraphData(gdata) + // if (res) { + // message.success('保存成功!') + // } else { + // message.error('保存失败!') + // } isShowDrawer.value = false handleDrawerClose() - emit('close') + //emit('close',) //return res } diff --git a/src/views/mes/processroute/index.vue b/src/views/mes/processroute/index.vue index 45d4c879d..98b69f762 100644 --- a/src/views/mes/processroute/index.vue +++ b/src/views/mes/processroute/index.vue @@ -157,16 +157,25 @@ const buttonTableClick = async (val, row) => { openDetail(row) } } -const dailogClose=() => { - console.log('close'); - nextTick?.(()=>{ - getList() - }) +const dailogClose= () => { + //console.log('dailogClose--confge',getList()); + //nextTick?.(()=>{ + getList() + //}) } /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { + let disabledFlag = false + if(type==='update'){ + disabledFlag = true + } + Processroute.allSchemas.formSchema.forEach(item => { + if (item.field == 'processrouteCode') { + item.componentProps.disabled =disabledFlag + } + }) basicFormRef.value.open(type, row) } diff --git a/src/views/mes/processroute/processroute.data.ts b/src/views/mes/processroute/processroute.data.ts index 077aecc88..c5640450b 100644 --- a/src/views/mes/processroute/processroute.data.ts +++ b/src/views/mes/processroute/processroute.data.ts @@ -7,8 +7,6 @@ export const ProcessrouteRules = reactive({ processrouteCode: [required], processName: [required], productCode: [required], - ablityCode: [required], - ablityCode: [required], }) export const Processroute = useCrudSchemas(reactive([ @@ -59,15 +57,7 @@ export const Processroute = useCrudSchemas(reactive([ field: 'processrouteCode', sort: 'custom', isSearch: true, - // form: { - // component: 'Input', - - // componentProps: { - // slots:{ - // default:} - // disabled: true - // } - // } + }, { diff --git a/src/views/mes/workScheduling/components/qualifiedCheck.vue b/src/views/mes/workScheduling/components/qualifiedCheck.vue index bf2d7733e..0c58be7d7 100644 --- a/src/views/mes/workScheduling/components/qualifiedCheck.vue +++ b/src/views/mes/workScheduling/components/qualifiedCheck.vue @@ -7,29 +7,29 @@ width="600px" > - - - + + + - - + + - - + + - + - - + + - - + + @@ -51,7 +51,8 @@ const formLoading = ref(false) const personOption=ref([]) const saveFlag=ref(false) const planDayCode=ref() -const form = reactive({ +const baseformRef=ref() +const baseform = reactive({ id:0, planDayCode: "", processCode:"", @@ -66,13 +67,13 @@ const openDetail = async (row: any, titleName: any,code:string) => { //console.log('row-68',row) dialogVisible.value = true dialogTitle.value = titleName - form.processCode=row.nodeCode - form.personSelected=[] - form.planDayCode=code - form.personSelected=[] - form.qualified=0 - form.unqualified=0 - form.id=row.id + baseform.processCode=row.nodeCode + baseform.personSelected=[] + baseform.planDayCode=code + baseform.personSelected=[] + baseform.qualified=0 + baseform.unqualified=0 + baseform.id=row.id planDayCode.value=code getCurrentWorkerList(row.nodeCode) @@ -92,30 +93,37 @@ const qcount=ref(0) //数量处理 const handleCount = () => { qcount.value++ - if (form.qualified> rowData.value.planCount - form.unqualified) { + if (baseform.qualified> rowData.value.planCount - baseform.unqualified) { message.alert('合格数量超限!计划总数【'+rowData.value.planCount+'】') - form.qualified =rowData.value.planCount - form.unqualified + baseform.qualified =rowData.value.planCount - baseform.unqualified return } - if (form.unqualified> rowData.value.planCount -form.qualified ) { + if (baseform.unqualified> rowData.value.planCount -baseform.qualified ) { message.alert('不合格数量超限!') - form.unqualified =rowData.value.planCount-form.qualified + baseform.unqualified =rowData.value.planCount-baseform.qualified return } } //提交质检 -const saveReport = async() => { - - saveFlag.value = true - try { - await workschedulingApi.processQualified(form) - }finally{ - saveFlag.value = false - dialogVisible.value = false - emit('close') - } +const saveReport = () => { + if (!baseformRef) return + baseformRef.value.validate((valid) => { + if (valid) { + saveFlag.value = true + try { + workschedulingApi.processQualified(baseform) + }finally{ + saveFlag.value = false + dialogVisible.value = false + emit('close') + } + } else { + console.log('请确认数据的正确!') + } + }) + //console.log("report-saveReport-82",data) //await workschedulingApi.reportWorkByProcess(data) @@ -124,4 +132,6 @@ const saveReport = async() => { const emit = defineEmits(['success', 'close']) defineOptions({ name: 'qualifiedCheck' }) defineExpose({ openDetail }) // 提供 open 方法,用于打开弹窗 + + From faf65e95bc8077a6e51b61be63ff072a7cbd9155 Mon Sep 17 00:00:00 2001 From: gaojs <757918719@qq.com> Date: Thu, 16 May 2024 14:54:45 +0800 Subject: [PATCH 2/5] =?UTF-8?q?EAM=20=E2=80=94=E2=80=94>=20=E5=B7=A1?= =?UTF-8?q?=E6=A3=80=E9=A1=B9=E7=9B=AE=20=E6=9B=B4=E6=96=B0=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=8F=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/dict.ts | 1 + .../basicInspectionOption.data.ts | 21 ++++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index b8a84e8e6..92d89451e 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -340,5 +340,6 @@ export enum DICT_TYPE { // ========== eam - 业务 - ========== DEVICE_TYPE = 'device_type', // 设备类型 + IS_UPDATED = 'is_updated', //是否可修改 } diff --git a/src/views/eam/basicInspectionOption/basicInspectionOption.data.ts b/src/views/eam/basicInspectionOption/basicInspectionOption.data.ts index d826259c0..13bf5fff5 100644 --- a/src/views/eam/basicInspectionOption/basicInspectionOption.data.ts +++ b/src/views/eam/basicInspectionOption/basicInspectionOption.data.ts @@ -40,7 +40,13 @@ export const BasicInspectionOption = useCrudSchemas(reactive([ label: '项是否可修改', field: 'isUpdated', sort: 'custom', + dictType: DICT_TYPE.IS_UPDATED, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isTable: true, + isDetail: false, isSearch: true, + isTableForm: false, + isForm: true, form: { component: 'Switch', value: 'TRUE', @@ -100,14 +106,13 @@ export const BasicInspectionOption = useCrudSchemas(reactive([ label: '是否可用', field: 'available', sort: 'custom', - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - }, + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isTable: true, + isDetail: false, + isSearch: false, + isTableForm: false, + isForm: false, }, { label: '删除时间', From 4877bf781d9825da3b222cde7a46ede359105c7e Mon Sep 17 00:00:00 2001 From: liuchen864 <23082234@qq.com> Date: Thu, 16 May 2024 15:07:03 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.hella16 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.hella16 b/.env.hella16 index 251fa31e6..e739fa5c3 100644 --- a/.env.hella16 +++ b/.env.hella16 @@ -4,10 +4,10 @@ NODE_ENV=production VITE_DEV=false # 请求路径 -VITE_BASE_URL='https://172.21.32.16:55563/api' +VITE_BASE_URL='https://scptest.faway-hella.com/api' # 上传路径 -VITE_UPLOAD_URL='https://172.21.32.16:55563/api/admin-api/infra/file/upload' +VITE_UPLOAD_URL='https://scptest.faway-hella.com/api/admin-api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH= From e103c0816f58bc283c23451ae4320c1bc38e7826 Mon Sep 17 00:00:00 2001 From: zhousq Date: Thu, 16 May 2024 15:07:03 +0800 Subject: [PATCH 4/5] qww --- .env.hella15 | 6 +- .env.hella16 | 6 +- README.md | 2 +- nginx_prod.conf | 24 ++ src/api/eam/basicDocumentType/index.ts | 7 +- src/api/eam/basicFaultCause/index.ts | 7 +- src/api/eam/basicFaultType/index.ts | 7 +- src/api/eam/equipmentMainPart/index.ts | 7 +- src/api/eam/equipmentManufacturer/index.ts | 7 +- src/api/eam/equipmentSupplier/index.ts | 7 +- src/api/eam/inspectionItem/index.ts | 62 ++++ src/api/eam/spotCheckItem/index.ts | 62 ++++ .../inspectionJob/inspectionJobMain/index.ts | 6 +- src/components/Annex/src/Annex.vue | 2 +- .../Descriptions/src/Descriptions.vue | 7 +- src/components/Detail/src/Detail.vue | 4 +- src/components/DictTag/src/DictTag.vue | 5 +- src/components/Remarks/src/Remarks.vue | 5 +- src/components/TableForm/src/TableForm.vue | 2 +- src/components/Tabs/src/Tabs.vue | 3 +- src/components/UploadFile/src/UploadFile.vue | 15 +- src/locales/en-US.ts | 24 ++ src/locales/zh-CN.ts | 24 ++ src/utils/dict.ts | 4 + src/utils/disposition/defaultButtons.ts | 2 +- .../basicDocumentType.data.ts | 20 +- .../basicFaultCause/basicFaultCause.data.ts | 15 +- .../eam/basicFaultType/basicFaultType.data.ts | 15 +- .../basicInspectionOption.data.ts | 2 +- .../basicMaintenanceOption.data.ts | 2 +- .../equipmentMainPart.data.ts | 25 +- .../equipmentManufacturer.data.ts | 40 ++- src/views/eam/equipmentManufacturer/index.vue | 33 ++- .../equipmentSupplier.data.ts | 40 ++- src/views/eam/equipmentSupplier/index.vue | 32 ++- src/views/eam/inspectionItem/index.vue | 271 ++++++++++++++++++ .../eam/inspectionItem/inspectionItem.data.ts | 110 +++++++ src/views/eam/spotCheckItem/index.vue | 270 +++++++++++++++++ .../eam/spotCheckItem/spotCheckItem.data.ts | 104 +++++++ src/views/home/components/supplierIndex.vue | 3 +- .../mes/orderDay/components/schedule.vue | 35 ++- src/views/mes/orderDay/index.vue | 60 ++-- src/views/mes/orderDay/orderDay.data.ts | 3 +- .../components/qualifiedCheck.vue | 13 +- src/views/qms/inspectionJob/addForm.vue | 48 +--- src/views/qms/inspectionJob/index.vue | 24 ++ .../deliverRequestMain.data.ts | 1 - .../deliver/deliverRequestMain/index.vue | 3 - .../saleShipmentMainRecord/index.vue | 17 +- .../saleShipmentMainRecord.data.ts | 3 + .../saleShipmentMainRequest/index.vue | 2 +- .../saleShipmentMain.data.ts | 6 +- .../containerMainRequest.data.ts | 5 +- .../productscrapRecordMain/index.vue | 3 +- .../purchasereceiptRequestMain/index.vue | 2 +- 55 files changed, 1278 insertions(+), 236 deletions(-) create mode 100644 src/api/eam/inspectionItem/index.ts create mode 100644 src/api/eam/spotCheckItem/index.ts create mode 100644 src/views/eam/inspectionItem/index.vue create mode 100644 src/views/eam/inspectionItem/inspectionItem.data.ts create mode 100644 src/views/eam/spotCheckItem/index.vue create mode 100644 src/views/eam/spotCheckItem/spotCheckItem.data.ts diff --git a/.env.hella15 b/.env.hella15 index dc2a813d1..15f726a54 100644 --- a/.env.hella15 +++ b/.env.hella15 @@ -4,10 +4,10 @@ NODE_ENV=production VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://172.21.32.15/api' +VITE_BASE_URL='https://172.21.32.15:55563/api' # 上传路径 -VITE_UPLOAD_URL='http://172.21.32.15/api/admin-api/infra/file/upload' +VITE_UPLOAD_URL='https://172.21.32.15:55563/api/admin-api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH= @@ -37,4 +37,4 @@ VITE_INTERFACE_URL='http://172.21.32.15:90/magic/web/index.html' VITE_JMREPORT_BASE_URL='http://172.21.32.15:90' # 租户配置 -VITE_TENANT='["长春"]' +VITE_TENANT='["长春","成都"]' diff --git a/.env.hella16 b/.env.hella16 index dd8d228a8..251fa31e6 100644 --- a/.env.hella16 +++ b/.env.hella16 @@ -4,10 +4,10 @@ NODE_ENV=production VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://172.21.32.16/api' +VITE_BASE_URL='https://172.21.32.16:55563/api' # 上传路径 -VITE_UPLOAD_URL='http://172.21.32.16/api/admin-api/infra/file/upload' +VITE_UPLOAD_URL='https://172.21.32.16:55563/api/admin-api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH= @@ -37,4 +37,4 @@ VITE_INTERFACE_URL='http://172.21.32.16:90/magic/web/index.html' VITE_JMREPORT_BASE_URL='http://172.21.32.16:90' # 租户配置 -VITE_TENANT='["长春"]' +VITE_TENANT='["长春","成都"]' diff --git a/README.md b/README.md index 74eef9397..82b41ee1a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## dev发布2024-05-15-004 +## dev发布2024-05-16-002 **xxxx.data.ts 文件配置说明** **form表单查询弹窗配置** form: { diff --git a/nginx_prod.conf b/nginx_prod.conf index b849be01c..225deb142 100644 --- a/nginx_prod.conf +++ b/nginx_prod.conf @@ -49,5 +49,29 @@ http { index index.html index.htm; } } + server { + listen 55563 ssl; + server_name_in_redirect off; + server_name _; + ssl_certificate /opt/faway-hella/faway-hella.com.pem; + ssl_certificate_key /opt/faway-hella/faway-hella.com.key; + location /api/ { + proxy_pass http://sfms3.0/; + proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header; + proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $http_x_forwarded_for; + } + location /profile/ { + alias /opt/profile/; + index index.html index.htm; + } + location / { + try_files $uri $uri/ /index.html; + root /opt/sfms3.0; + index index.html index.htm; + } + } } diff --git a/src/api/eam/basicDocumentType/index.ts b/src/api/eam/basicDocumentType/index.ts index 0ab30af39..ec53a58df 100644 --- a/src/api/eam/basicDocumentType/index.ts +++ b/src/api/eam/basicDocumentType/index.ts @@ -48,7 +48,12 @@ export const deleteDocumentType = async (id: number) => { // 导出文档类型 Excel export const exportDocumentType = async (params) => { - return await request.download({ url: `/eam/document-type/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/eam/document-type/export-excel-senior`, data }) + }else{ + return await request.download({ url: `/eam/document-type/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/api/eam/basicFaultCause/index.ts b/src/api/eam/basicFaultCause/index.ts index ff5aed0e5..ffffb2d80 100644 --- a/src/api/eam/basicFaultCause/index.ts +++ b/src/api/eam/basicFaultCause/index.ts @@ -49,7 +49,12 @@ export const deleteBasicFaultCause = async (id: number) => { // 导出故障原因 Excel export const exportBasicFaultCause = async (params) => { - return await request.download({ url: `/eam/basic-fault-cause/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/eam/basic-fault-cause/export-excel-senior`, data }) + }else{ + return await request.download({ url: `/eam/basic-fault-cause/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/api/eam/basicFaultType/index.ts b/src/api/eam/basicFaultType/index.ts index 899b82ec4..3af2b44ce 100644 --- a/src/api/eam/basicFaultType/index.ts +++ b/src/api/eam/basicFaultType/index.ts @@ -48,7 +48,12 @@ export const deleteBasicFaultType = async (id: number) => { // 导出故障类型 Excel export const exportBasicFaultType = async (params) => { - return await request.download({ url: `/eam/basic-fault-type/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/eam/basic-fault-type/export-excel-senior`, data }) + }else{ + return await request.download({ url: `/eam/basic-fault-type/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/api/eam/equipmentMainPart/index.ts b/src/api/eam/equipmentMainPart/index.ts index a5d7acdd2..6a081dd4c 100644 --- a/src/api/eam/equipmentMainPart/index.ts +++ b/src/api/eam/equipmentMainPart/index.ts @@ -48,7 +48,12 @@ export const deleteEquipmentMainPart = async (id: number) => { // 导出主要部件 Excel export const exportEquipmentMainPart = async (params) => { - return await request.download({ url: `/eam/equipment-main-part/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/eam/equipment-main-part/export-excel-senior`, data }) + }else{ + return await request.download({ url: `/eam/equipment-main-part/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/api/eam/equipmentManufacturer/index.ts b/src/api/eam/equipmentManufacturer/index.ts index d735e38e4..6efa2cbb2 100644 --- a/src/api/eam/equipmentManufacturer/index.ts +++ b/src/api/eam/equipmentManufacturer/index.ts @@ -54,7 +54,12 @@ export const deleteEquipmentManufacturer = async (id: number) => { // 导出设备制造商 Excel export const exportEquipmentManufacturer = async (params) => { - return await request.download({ url: `/eam/basic/equipment-manufacturer/export-excel`, params }) + if (params.isSearch) { + const data = { ...params } + return await request.downloadPost({ url: `/eam/basic/equipment-manufacturer/export-excel-senior`, data }) + } else { + return await request.download({ url: `/eam/basic/equipment-manufacturer/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/api/eam/equipmentSupplier/index.ts b/src/api/eam/equipmentSupplier/index.ts index 3026e600c..b6a38dc40 100644 --- a/src/api/eam/equipmentSupplier/index.ts +++ b/src/api/eam/equipmentSupplier/index.ts @@ -54,7 +54,12 @@ export const deleteEquipmentSupplier = async (id: number) => { // 导出供应商 Excel export const exportEquipmentSupplier = async (params) => { - return await request.download({ url: `/eam/basic/equipment-supplier/export-excel`, params }) + if (params.isSearch) { + const data = { ...params } + return await request.downloadPost({ url: `/eam/basic/equipment-supplier/export-excel-senior`, data }) + } else { + return await request.download({ url: `/eam/basic/equipment-supplier/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/api/eam/inspectionItem/index.ts b/src/api/eam/inspectionItem/index.ts new file mode 100644 index 000000000..86b606728 --- /dev/null +++ b/src/api/eam/inspectionItem/index.ts @@ -0,0 +1,62 @@ +import request from '@/config/axios' + +export interface InspectionItemVO { + id: number + content: string + equipmentParts: string + serialNumber: number + category: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询巡检项列表 +export const getInspectionItemPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/basic/inspection-item/senior', data }) + } else { + return await request.get({ url: `/eam/basic/inspection-item/page`, params }) + } +} + +// 查询巡检项详情 +export const getInspectionItem = async (id: number) => { + return await request.get({ url: `/eam/basic/inspection-item/get?id=` + id }) +} + +// 新增巡检项 +export const createInspectionItem = async (data: InspectionItemVO) => { + return await request.post({ url: `/eam/basic/inspection-item/create`, data }) +} + +// 修改巡检项 +export const updateInspectionItem = async (data: InspectionItemVO) => { + return await request.put({ url: `/eam/basic/inspection-item/update`, data }) +} + +// 删除巡检项 +export const deleteInspectionItem = async (id: number) => { + return await request.delete({ url: `/eam/basic/inspection-item/delete?id=` + id }) +} + +// 导出巡检项 Excel +export const exportInspectionItem = async (params) => { + if (params.isSearch) { + const data = { ...params } + return await request.downloadPost({ url: `/eam/basic/inspection-item/export-excel-senior`, data }) + } else { + return await request.download({ url: `/eam/basic/inspection-item/export-excel`, params }) + } +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/basic/inspection-item/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/eam/spotCheckItem/index.ts b/src/api/eam/spotCheckItem/index.ts new file mode 100644 index 000000000..e1f587c23 --- /dev/null +++ b/src/api/eam/spotCheckItem/index.ts @@ -0,0 +1,62 @@ +import request from '@/config/axios' + +export interface SpotCheckItemVO { + id: number + content: string + equipmentParts: string + serialNumber: number + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询点检项列表 +export const getSpotCheckItemPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/basic/spot-check-item/senior', data }) + } else { + return await request.get({ url: `/eam/basic/spot-check-item/page`, params }) + } +} + +// 查询点检项详情 +export const getSpotCheckItem = async (id: number) => { + return await request.get({ url: `/eam/basic/spot-check-item/get?id=` + id }) +} + +// 新增点检项 +export const createSpotCheckItem = async (data: SpotCheckItemVO) => { + return await request.post({ url: `/eam/basic/spot-check-item/create`, data }) +} + +// 修改点检项 +export const updateSpotCheckItem = async (data: SpotCheckItemVO) => { + return await request.put({ url: `/eam/basic/spot-check-item/update`, data }) +} + +// 删除点检项 +export const deleteSpotCheckItem = async (id: number) => { + return await request.delete({ url: `/eam/basic/spot-check-item/delete?id=` + id }) +} + +// 导出点检项 Excel +export const exportSpotCheckItem = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = { ...params } + return await request.downloadPost({ url: `/eam/basic/spot-check-item/export-excel-senior`, data }) + } else { + return await request.download({ url: `/eam/basic/spot-check-item/export-excel`, params }) + } +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/basic/spot-check-item/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/qms/inspectionJob/inspectionJobMain/index.ts b/src/api/qms/inspectionJob/inspectionJobMain/index.ts index aca7fd268..3346beae4 100644 --- a/src/api/qms/inspectionJob/inspectionJobMain/index.ts +++ b/src/api/qms/inspectionJob/inspectionJobMain/index.ts @@ -51,12 +51,14 @@ export const abandonInspectionJobMain = async (id) => { export const closeInspectionJobMain = async (id) => { return await request.put({ url: `/qms/inspection-job-main/close?id=` + id }) } - +// 发布检验任务 +export const releaseInspectionJobMain = async (id) => { + return await request.put({ url: `/qms/inspection-job-main/release?id=` + id }) +} // 导出检验申请 Excel export const exportInspectionJobMain = async (params) => { return await request.download({ url: `/qms/inspection-job-main/export-excel`, params }) } - // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/qms/inspection-job-main/get-import-template' }) diff --git a/src/components/Annex/src/Annex.vue b/src/components/Annex/src/Annex.vue index 7d5f0e142..5f5f144d6 100644 --- a/src/components/Annex/src/Annex.vue +++ b/src/components/Annex/src/Annex.vue @@ -3,7 +3,7 @@
-
diff --git a/src/components/Descriptions/src/Descriptions.vue b/src/components/Descriptions/src/Descriptions.vue index 6f00f10c2..f81f8f35a 100644 --- a/src/components/Descriptions/src/Descriptions.vue +++ b/src/components/Descriptions/src/Descriptions.vue @@ -5,6 +5,7 @@ import { useDesign } from '@/hooks/web/useDesign' import { propTypes } from '@/utils/propTypes' import { useAppStore } from '@/store/modules/app' import { DescriptionsSchema } from '@/types/descriptions' +const { t } = useI18n() // 国际化 defineOptions({ name: 'Descriptions' }) @@ -99,7 +100,7 @@ const showAll = () =>{ >
- {{ title }} + {{ t(`ts.${title}`).replace('ts.', '') }} @@ -119,7 +120,7 @@ const showAll = () =>{ - { :row="{ label: item.label }" - >{{ item.label }} + >{{ t(`ts.${item.label}`).replace('ts.', '') }} diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 3ebe261c5..af528c603 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -2,14 +2,14 @@
diff --git a/src/components/DictTag/src/DictTag.vue b/src/components/DictTag/src/DictTag.vue index b72b2b9ec..35920d91e 100644 --- a/src/components/DictTag/src/DictTag.vue +++ b/src/components/DictTag/src/DictTag.vue @@ -3,6 +3,7 @@ import { defineComponent, PropType, ref } from 'vue' import { isHexColor } from '@/utils/color' import { ElTag } from 'element-plus' import { DictDataType, getDictOptions } from '@/utils/dict' +const { t } = useI18n() // 国际化 export default defineComponent({ name: 'DictTag', @@ -55,7 +56,7 @@ export default defineComponent({ } disableTransitions={true} > - {dictData.value?.label} + {t(`ts.${dictData.value?.label}`).replace('ts.', '')} ) } else { @@ -71,7 +72,7 @@ export default defineComponent({ } disableTransitions={true} > - {item?.label} + {t(`ts.${item?.label}`).replace('ts.', '')} }) ) diff --git a/src/components/Remarks/src/Remarks.vue b/src/components/Remarks/src/Remarks.vue index 35423c454..857d91027 100644 --- a/src/components/Remarks/src/Remarks.vue +++ b/src/components/Remarks/src/Remarks.vue @@ -20,9 +20,9 @@
- + - 确定 + {{t('ts.确定')}}
@@ -32,6 +32,7 @@ const message = useMessage() // 消息弹窗 import * as RemarkApi from '@/api/wms/remark' import { formatDate } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 defineComponent({ name: 'Annex' diff --git a/src/components/TableForm/src/TableForm.vue b/src/components/TableForm/src/TableForm.vue index 87eb4a851..1cfc8ba01 100644 --- a/src/components/TableForm/src/TableForm.vue +++ b/src/components/TableForm/src/TableForm.vue @@ -303,7 +303,7 @@
-
添加明细
+
{{t('ts.添加明细')}}
diff --git a/src/components/Tabs/src/Tabs.vue b/src/components/Tabs/src/Tabs.vue index 8c66168a9..8c22163f6 100644 --- a/src/components/Tabs/src/Tabs.vue +++ b/src/components/Tabs/src/Tabs.vue @@ -1,7 +1,7 @@ @@ -9,6 +9,7 @@ // const message = useMessage() // 消息弹窗 import { emit } from "process"; +const { t } = useI18n() // 国际化 // const { t } = useI18n() // 国际化 defineComponent({ diff --git a/src/components/UploadFile/src/UploadFile.vue b/src/components/UploadFile/src/UploadFile.vue index 05ce5f239..bf3cc4895 100644 --- a/src/components/UploadFile/src/UploadFile.vue +++ b/src/components/UploadFile/src/UploadFile.vue @@ -42,6 +42,7 @@ import { PropType } from 'vue' import { propTypes } from '@/utils/propTypes' import { getAccessToken, getTenantId } from '@/utils/auth' import type { UploadInstance, UploadUserFile, UploadProps, UploadRawFile } from 'element-plus' +const { t } = useI18n() // 国际化 defineOptions({ name: 'UploadFile' }) @@ -78,7 +79,7 @@ const uploadHeaders = ref({ // 文件上传之前判断 const beforeUpload: UploadProps['beforeUpload'] = (file: UploadRawFile) => { if (fileList.value.length >= props.limit) { - message.error(`上传文件数量不能超过${props.limit}个!`) + message.error(`${t('ts.上传文件数量不能超过')}${props.limit}!`) return false } let fileExtension = '' @@ -91,14 +92,14 @@ const beforeUpload: UploadProps['beforeUpload'] = (file: UploadRawFile) => { }) const isLimit = file.size < props.fileSize * 1024 * 1024 if (!isImg) { - message.error(`文件格式不正确, 请上传${props.fileType.join('/')}格式!`) + message.error(`${t(`ts.${'文件格式不正确, 请上传'}`)}${props.fileType.join('/')}${t('ts.格式')}!`) return false } if (!isLimit) { - message.error(`上传文件大小不能超过${props.fileSize}MB!`) + message.error(`${t('ts.上传文件大小不能超过')}${props.fileSize}MB!`) return false } - message.success('正在上传文件,请稍候...') + message.success(t(`ts.${'正在上传文件,请稍候'}`)) uploadNumber.value++ } // 处理上传的文件发生变化 @@ -107,7 +108,7 @@ const beforeUpload: UploadProps['beforeUpload'] = (file: UploadRawFile) => { // } // 文件上传成功 const handleFileSuccess: UploadProps['onSuccess'] = (res: any,uploadFile: any): void => { - message.success('上传成功') + message.success(t('ts.上传成功')) const fileListNew = fileList.value fileListNew.pop() fileList.value = fileListNew @@ -121,11 +122,11 @@ const handleFileSuccess: UploadProps['onSuccess'] = (res: any,uploadFile: any): } // 文件数超出提示 const handleExceed: UploadProps['onExceed'] = (): void => { - message.error(`上传文件数量不能超过${props.limit}个!`) + message.error(`${t('ts.上传文件数量不能过')}${props.limit}!`) } // 上传错误提示 const excelUploadError: UploadProps['onError'] = (): void => { - message.error('导入数据失败,请您重新上传!') + message.error(t(`ts.导入数据失败,请您重新上传`)) } // 删除上传文件 const handleRemove = (file) => { diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index d426530a5..c8a4ee393 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -1063,6 +1063,30 @@ export default { 采购价格审批人:'Purchasing price approver', 供应商发货单号:'Supplier\'s invoice number', 加载中:'loading', + 请输入备注:'Please enter remarks', + '正在上传文件,请稍候':'Please wait while uploading files', + 上传成功:'upload successful', + 上传文件数量不能超过:'The number of uploaded files cannot exceed', + '导入数据失败,请您重新上传':'Failed to import data, please upload again!', + 上传文件大小不能超过:'The size of the uploaded file cannot exceed', + '文件格式不正确, 请上传':'The file format is incorrect. Please upload it in', + 格式:'format', + 收货人:'consignee', + 联系电话:'phone', + 送达日期:'delivery date', + 月台代码:'Platform code', + 截止日期:'Deadline', + 仓库代码:'Warehouse code', + 'ERP单据号(无用)':'ERP document number (useless)', + 供应商审批人:'Supplier approver', + 供应商审批时间:'Supplier approval time', + 快递单号:'courier number', + 开票日历管理:'Invoicing calendar management', + 描述:'description' + + + + }, diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 73699f76a..65f4ded05 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -1063,6 +1063,30 @@ export default { 采购价格审批人:'采购价格审批人', 供应商发货单号:'供应商发货单号', 加载中:'加载中', + 请输入备注:'请输入备注', + '正在上传文件,请稍候':'正在上传文件,请稍候...', + 上传成功:'上传成功', + 上传文件数量不能超过:'上传文件数量不能超过', + '导入数据失败,请您重新上传':'导入数据失败,请您重新上传!', + 上传文件大小不能超过:'上传文件大小不能超过', + '文件格式不正确, 请上传':'文件格式不正确, 请上传', + 格式:'格式', + 收货人:'收货人', + 联系电话:'联系电话', + 送达日期:'送达日期', + 月台代码:'月台代码', + 截止日期:'截止日期', + 仓库代码:'仓库代码', + 'ERP单据号(无用)':'ERP单据号(无用)', + 供应商审批人:'供应商审批人', + 供应商审批时间:'供应商审批时间', + 快递单号:'快递单号', + 开票日历管理:'开票日历管理', + 描述:'描述' + + + + }, diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 9d701ad18..b8a84e8e6 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -337,4 +337,8 @@ export enum DICT_TYPE { INTERFACE_STATUS = 'interfaceStatus', // 接口调用信息 接口状态 SYSTEM_DAY = 'system_day', // 系统天数 PURCHASE_INVOICE_ORDER_TYPE = 'purchase_invoice_order_type', // 发票采购订单类型 + + // ========== eam - 业务 - ========== + DEVICE_TYPE = 'device_type', // 设备类型 + } diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index 408141d1d..bd999713c 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -269,7 +269,7 @@ export function mainListEnableBtn(option:any) { label: t(`ts.启用`).replace('ts.', ''), name: 'enable', hide: false, - type: 'danger', + type: 'success', color: '', link: true, // 文本展现按钮 hasPermi: '' diff --git a/src/views/eam/basicDocumentType/basicDocumentType.data.ts b/src/views/eam/basicDocumentType/basicDocumentType.data.ts index 38605efc5..0456ee3c7 100644 --- a/src/views/eam/basicDocumentType/basicDocumentType.data.ts +++ b/src/views/eam/basicDocumentType/basicDocumentType.data.ts @@ -35,7 +35,12 @@ export const DocumentType = useCrudSchemas(reactive([ label: '类型设备', field: 'type', sort: 'custom', + dictType: DICT_TYPE.DEVICE_TYPE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 isSearch: true, + form: { + component: 'Select' + } }, { label: '创建时间', @@ -81,14 +86,13 @@ export const DocumentType = useCrudSchemas(reactive([ label: '是否可用', field: 'available', sort: 'custom', - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - }, + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isTable: true, + isDetail: false, + isSearch: false, + isTableForm: false, + isForm: false, }, { label: '删除时间', diff --git a/src/views/eam/basicFaultCause/basicFaultCause.data.ts b/src/views/eam/basicFaultCause/basicFaultCause.data.ts index 3704d71a1..3dc367434 100644 --- a/src/views/eam/basicFaultCause/basicFaultCause.data.ts +++ b/src/views/eam/basicFaultCause/basicFaultCause.data.ts @@ -92,14 +92,13 @@ export const BasicFaultCause = useCrudSchemas(reactive([ label: '是否可用', field: 'available', sort: 'custom', - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - }, + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isTable: true, + isDetail: false, + isSearch: false, + isTableForm: false, + isForm: false, }, { label: '删除时间', diff --git a/src/views/eam/basicFaultType/basicFaultType.data.ts b/src/views/eam/basicFaultType/basicFaultType.data.ts index 4a2802690..8fe42a032 100644 --- a/src/views/eam/basicFaultType/basicFaultType.data.ts +++ b/src/views/eam/basicFaultType/basicFaultType.data.ts @@ -79,14 +79,13 @@ export const BasicFaultType = useCrudSchemas(reactive([ label: '是否可用', field: 'available', sort: 'custom', - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - }, + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isTable: true, + isDetail: false, + isSearch: false, + isTableForm: false, + isForm: false, }, { label: '删除时间', diff --git a/src/views/eam/basicInspectionOption/basicInspectionOption.data.ts b/src/views/eam/basicInspectionOption/basicInspectionOption.data.ts index 6e7fe83bf..d826259c0 100644 --- a/src/views/eam/basicInspectionOption/basicInspectionOption.data.ts +++ b/src/views/eam/basicInspectionOption/basicInspectionOption.data.ts @@ -51,7 +51,7 @@ export const BasicInspectionOption = useCrudSchemas(reactive([ }, }, { - label: '来源于类型配置', + label: '巡检项', field: 'type', sort: 'custom', isSearch: true, diff --git a/src/views/eam/basicMaintenanceOption/basicMaintenanceOption.data.ts b/src/views/eam/basicMaintenanceOption/basicMaintenanceOption.data.ts index fe26160a5..b3fdbcfb2 100644 --- a/src/views/eam/basicMaintenanceOption/basicMaintenanceOption.data.ts +++ b/src/views/eam/basicMaintenanceOption/basicMaintenanceOption.data.ts @@ -51,7 +51,7 @@ export const BasicMaintenanceOption = useCrudSchemas(reactive([ }, }, { - label: '来源于类型配置', + label: '保养项', field: 'type', sort: 'custom', isSearch: true, diff --git a/src/views/eam/equipmentMainPart/equipmentMainPart.data.ts b/src/views/eam/equipmentMainPart/equipmentMainPart.data.ts index efba49dec..ed90c0233 100644 --- a/src/views/eam/equipmentMainPart/equipmentMainPart.data.ts +++ b/src/views/eam/equipmentMainPart/equipmentMainPart.data.ts @@ -31,10 +31,15 @@ export const EquipmentMainPart = useCrudSchemas(reactive([ isSearch: true, }, { - label: '设备工装枚举', + label: '类型', field: 'type', sort: 'custom', + dictType: DICT_TYPE.DEVICE_TYPE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 isSearch: true, + form: { + component: 'Select' + } }, { label: '创建时间', @@ -77,18 +82,16 @@ export const EquipmentMainPart = useCrudSchemas(reactive([ isDetail:false, }, { - label: '是否可用', + label: '是否启用', field: 'available', sort: 'custom', - isSearch: true, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - }, + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isTable: true, + isDetail: false, + isSearch: false, + isTableForm: false, + isForm: false, }, { label: '删除时间', diff --git a/src/views/eam/equipmentManufacturer/equipmentManufacturer.data.ts b/src/views/eam/equipmentManufacturer/equipmentManufacturer.data.ts index b2f57cff9..0be8d0a86 100644 --- a/src/views/eam/equipmentManufacturer/equipmentManufacturer.data.ts +++ b/src/views/eam/equipmentManufacturer/equipmentManufacturer.data.ts @@ -82,7 +82,10 @@ export const EquipmentManufacturer = useCrudSchemas(reactive([ label: '部门', field: 'departmentCode', sort: 'custom', - isSearch: true, + isTable: false, + isDetail: false, + isSearch: false, + isTableForm: false, form: { component: 'TreeSelect', componentProps: { // 假设deptList是部门数据列表 @@ -93,6 +96,18 @@ export const EquipmentManufacturer = useCrudSchemas(reactive([ } } }, + { + label: '是否启用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isTable: true, + isDetail: false, + isSearch: false, + isTableForm: false, + isForm: false, + }, { label: '备注', field: 'remark', @@ -105,28 +120,7 @@ export const EquipmentManufacturer = useCrudSchemas(reactive([ } } }, - { - label: '是否可用', - field: 'available', - sort: 'custom', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - isSearch: true, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - }, - search: { - component: 'Select', - }, - table: { - width: 110 - } - }, + { label: '操作', field: 'action', diff --git a/src/views/eam/equipmentManufacturer/index.vue b/src/views/eam/equipmentManufacturer/index.vue index 3189ad974..b30215282 100644 --- a/src/views/eam/equipmentManufacturer/index.vue +++ b/src/views/eam/equipmentManufacturer/index.vue @@ -33,7 +33,7 @@ @@ -90,6 +90,15 @@ const updataTableColumns = (val) => { tableColumns.value = val } + +const judgeStatus = (row) =>{ + if(row.available === 'TRUE'){ + return true + }else{ + return false + } +} + const { tableObject, tableMethods } = useTable({ getListApi: EquipmentManufacturerApi.getEquipmentManufacturerPage // 分页接口 }) @@ -132,10 +141,13 @@ const buttonBaseClick = (val, item) => { } // 列表-操作按钮 -const butttondata = [ +const butttondata = (row) => { + return [ defaultButtons.mainListEditBtn({hasPermi:'eam:equipment-manufacturer:update'}), // 编辑 + defaultButtons.mainListEnableBtn({hasPermi:'eam:inspection-item:enable',hide: judgeStatus(row)}), // 启用 + defaultButtons.mainListDisableBtn({hasPermi:'eam:inspection-item:disable',hide: !judgeStatus(row)}), // 禁用 // defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipment-manufacturer:delete'}), // 删除 -] +]} // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { @@ -143,6 +155,10 @@ const buttonTableClick = async (val, row) => { openForm('update', row) } else if (val == 'delete') { // 删除 handleDelete(row.id) + } else if (val == 'enable') { // 启用 + handleEnable(row,'TRUE') + }else if (val == 'disable') {// 禁用 + handleEnable(row,'FALSE') } } @@ -235,6 +251,17 @@ const searchFormClick = (searchData) => { getList() // 刷新当前列表 } +const handleEnable = (row,enable) =>{ + message.confirm(t('您确定'+(enable=='TRUE'?'启用':'禁用')+'该项吗, 是否继续?')).then(() => { + row.available = enable + EquipmentManufacturerApi.updateEquipmentManufacturer(row).then(res => { + message.success(t('common.updateSuccess')) + getList() + }) + }) + +} + /** 初始化 **/ onMounted(async () => { getList() diff --git a/src/views/eam/equipmentSupplier/equipmentSupplier.data.ts b/src/views/eam/equipmentSupplier/equipmentSupplier.data.ts index 2aaf9e1d6..7e7fc6377 100644 --- a/src/views/eam/equipmentSupplier/equipmentSupplier.data.ts +++ b/src/views/eam/equipmentSupplier/equipmentSupplier.data.ts @@ -88,7 +88,10 @@ export const EquipmentSupplier = useCrudSchemas(reactive([ label: '部门', field: 'departmentCode', sort: 'custom', - isSearch: true, + isTable: false, + isDetail: false, + isSearch: false, + isTableForm: false, form: { component: 'TreeSelect', componentProps: { // 假设deptList是部门数据列表 @@ -99,6 +102,18 @@ export const EquipmentSupplier = useCrudSchemas(reactive([ } } }, + { + label: '是否启用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isTable: true, + isDetail: false, + isSearch: false, + isTableForm: false, + isForm: false, + }, { label: '备注', field: 'remark', @@ -111,28 +126,7 @@ export const EquipmentSupplier = useCrudSchemas(reactive([ } } }, - { - label: '是否可用', - field: 'available', - sort: 'custom', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - isSearch: true, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - }, - search: { - component: 'Select', - }, - table: { - width: 110 - } - }, + { label: '操作', field: 'action', diff --git a/src/views/eam/equipmentSupplier/index.vue b/src/views/eam/equipmentSupplier/index.vue index 3a41de721..e9ffeac07 100644 --- a/src/views/eam/equipmentSupplier/index.vue +++ b/src/views/eam/equipmentSupplier/index.vue @@ -33,7 +33,7 @@ @@ -90,6 +90,15 @@ const updataTableColumns = (val) => { tableColumns.value = val } + +const judgeStatus = (row) =>{ + if(row.available === 'TRUE'){ + return true + }else{ + return false + } +} + const { tableObject, tableMethods } = useTable({ getListApi: EquipmentSupplierApi.getEquipmentSupplierPage // 分页接口 }) @@ -132,10 +141,13 @@ const buttonBaseClick = (val, item) => { } // 列表-操作按钮 -const butttondata = [ +const butttondata = (row) => { + return [ defaultButtons.mainListEditBtn({hasPermi:'eam:equipment-supplier:update'}), // 编辑 + defaultButtons.mainListEnableBtn({hasPermi:'eam:inspection-item:enable',hide: judgeStatus(row)}), // 启用 + defaultButtons.mainListDisableBtn({hasPermi:'eam:inspection-item:disable',hide: !judgeStatus(row)}), // 禁用 // defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipment-supplier:delete'}), // 删除 -] +]} // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { @@ -143,6 +155,10 @@ const buttonTableClick = async (val, row) => { openForm('update', row) } else if (val == 'delete') { // 删除 handleDelete(row.id) + } else if (val == 'enable') { // 启用 + handleEnable(row,'TRUE') + }else if (val == 'disable') {// 禁用 + handleEnable(row,'FALSE') } } @@ -235,6 +251,16 @@ const searchFormClick = (searchData) => { getList() // 刷新当前列表 } +const handleEnable = (row,enable) =>{ + message.confirm(t('您确定'+(enable=='TRUE'?'启用':'禁用')+'该项吗, 是否继续?')).then(() => { + row.available = enable + EquipmentSupplierApi.updateEquipmentSupplier(row).then(res => { + message.success(t('common.updateSuccess')) + getList() + }) + }) +} + /** 初始化 **/ onMounted(async () => { getList() diff --git a/src/views/eam/inspectionItem/index.vue b/src/views/eam/inspectionItem/index.vue new file mode 100644 index 000000000..fb132513f --- /dev/null +++ b/src/views/eam/inspectionItem/index.vue @@ -0,0 +1,271 @@ + + + diff --git a/src/views/eam/inspectionItem/inspectionItem.data.ts b/src/views/eam/inspectionItem/inspectionItem.data.ts new file mode 100644 index 000000000..1e310154e --- /dev/null +++ b/src/views/eam/inspectionItem/inspectionItem.data.ts @@ -0,0 +1,110 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import { handleTreeToComponentOptions } from '@/utils/tree' +import * as DeptApi from '@/api/system/dept' +const deptList = ref([]) // 树形结构 + +// 加载部门树(默认格式) +deptList.value = handleTreeToComponentOptions(await DeptApi.getSimpleDeptList()) + +// 表单校验 +export const InspectionItemRules = reactive({ + content: [required], + serialNumber: [required], + concurrencyStamp: [required], + type: [required], +}) + +export const InspectionItem = useCrudSchemas(reactive([ + + { + label: '巡检内容', + field: 'content', + sort: 'custom', + isSearch: true, + form: { + component: 'Input', + componentProps: { + type: 'textarea' + } + } + }, + { + label: '保养部位', + field: 'equipmentParts', + sort: 'custom', + isSearch: true + }, + { + label: '类别', + field: 'category', + sort: 'custom', + isSearch: true + }, + { + label: '序号', + field: 'serialNumber', + sort: 'custom', + isSearch: true, + fixed: 'left', + form: { + component:'InputNumber' + }, + }, + { + label: '来源于类型配置', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.DEVICE_TYPE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isSearch: true, + form: { + component: 'Select' + } + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + isTable: false, + isDetail: false, + isSearch: false, + isTableForm: false, + form: { + component: 'TreeSelect', + componentProps: { // 假设deptList是部门数据列表 + data: deptList, + placeholder: "请选择部门", + filterable: true, + // multiple: true, + } + } + }, + { + label: '是否启用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isTable: true, + isDetail: false, + isSearch: false, + isTableForm: false, + isForm: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/eam/spotCheckItem/index.vue b/src/views/eam/spotCheckItem/index.vue new file mode 100644 index 000000000..6fc7ba504 --- /dev/null +++ b/src/views/eam/spotCheckItem/index.vue @@ -0,0 +1,270 @@ + + + diff --git a/src/views/eam/spotCheckItem/spotCheckItem.data.ts b/src/views/eam/spotCheckItem/spotCheckItem.data.ts new file mode 100644 index 000000000..67902adfb --- /dev/null +++ b/src/views/eam/spotCheckItem/spotCheckItem.data.ts @@ -0,0 +1,104 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import { handleTreeToComponentOptions } from '@/utils/tree' +import * as DeptApi from '@/api/system/dept' +const deptList = ref([]) // 树形结构 + +// 加载部门树(默认格式) +deptList.value = handleTreeToComponentOptions(await DeptApi.getSimpleDeptList()) + +// 表单校验 +export const SpotCheckItemRules = reactive({ + content: [required], + serialNumber: [required], + concurrencyStamp: [required], + type: [required], +}) + +export const SpotCheckItem = useCrudSchemas(reactive([ + + { + label: '点检内容', + field: 'content', + sort: 'custom', + isSearch: true, + form: { + component: 'Input', + componentProps: { + type: 'textarea' + } + } + }, + { + label: '点检部位', + field: 'equipmentParts', + sort: 'custom', + isSearch: true + }, + { + label: '序号', + field: 'serialNumber', + sort: 'custom', + isSearch: true, + fixed: 'left', + form: { + component:'InputNumber' + }, + }, + { + label: '来源于类型配置', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.DEVICE_TYPE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isSearch: true, + form: { + component: 'Select' + } + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + isTable: false, + isDetail: false, + isSearch: false, + isTableForm: false, + form: { + component: 'TreeSelect', + componentProps: { // 假设deptList是部门数据列表 + data: deptList, + placeholder: "请选择部门", + filterable: true, + // multiple: true, + } + } + }, + { + label: '是否启用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isTable: true, + isDetail: false, + isSearch: false, + isTableForm: false, + isForm: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/home/components/supplierIndex.vue b/src/views/home/components/supplierIndex.vue index 5e8a679c1..af6faa6f0 100644 --- a/src/views/home/components/supplierIndex.vue +++ b/src/views/home/components/supplierIndex.vue @@ -231,7 +231,8 @@ import { set } from 'lodash-es' import { EChartsOption } from 'echarts' import { lineOptions, pieOptions } from '../echarts-data' -import { formatDate } from '@/utils/formatTime' +import { formatDate,dateFormatter } from '@/utils/formatTime' + import * as NotifyMessageApi from '@/api/system/notify/message' import * as IndexApi from '@/api/home' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' diff --git a/src/views/mes/orderDay/components/schedule.vue b/src/views/mes/orderDay/components/schedule.vue index 9ac9b269e..eccbefcd7 100644 --- a/src/views/mes/orderDay/components/schedule.vue +++ b/src/views/mes/orderDay/components/schedule.vue @@ -201,7 +201,7 @@ @@ -471,20 +471,23 @@ const opensearchTable = ( ) } -const handleClose=()=>{ - dialogVisible.value = false, - emit('close') +const handleClose=(val)=>{ + dialogVisible.value = false + emit('close',val) } const publishPlan=()=>{ - message.confirm("确认发布当前计划?","question").then(async () => { + message.confirm("确认发布当前计划?","提示").then( () => { //isPublish.value=true //loading.value = true, - try{formLoading.value=true - doPublishPlan() }finally{ + try{ + formLoading.value=true + let promise = doPublishPlan(); + handleClose(promise) + }finally{ formLoading.value=false; - handleClose() + } - + }).catch(() => { message.info("已取消发布") }) @@ -517,12 +520,14 @@ const doPublishPlan= ()=>{ let res = OrderDayApi.publishPlan(data) - res.then(()=>{ - message.success("计划发布成功") - }).catch(()=>{ - //console.log("---doPublishPlan-- 458--",res.msg) - message.error("计划发布失败!") - }) + return res + + // res.then(()=>{ + // message.success("计划发布成功") + // }).catch(()=>{ + // //console.log("---doPublishPlan-- 458--",res.msg) + // message.error("计划发布失败!") + // }) } diff --git a/src/views/mes/orderDay/index.vue b/src/views/mes/orderDay/index.vue index edcb14390..98a405c6f 100644 --- a/src/views/mes/orderDay/index.vue +++ b/src/views/mes/orderDay/index.vue @@ -57,7 +57,7 @@ :isBusiness="false" :isSearchFilterButtonHide="true" @onChange="valueChange" - + /> @@ -142,7 +142,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { if(formField=='workroomCode'){ getProductlines(val[0][searchField]) } - + }) } @@ -156,9 +156,9 @@ const valueChange=(filed,cur)=>{ //item.componentProps.required = cur==='ENABLE'?false:true } }) - + } - + } // 字段设置 更新主列表字段 @@ -199,10 +199,12 @@ const buttonBaseClick = (val, item) => { console.log('其他按钮', item) } } -const publishClosed=()=>{ - //console.log('orderday-publishClosed-200') - getList() - +const publishClosed=(val)=>{ + console.log('orderday-publishClosed-200',val) + nextTick?.(()=>{ + getList() + }) + } // 根据状态返回该按钮是否显示 const isShowMainButton = (row,val) => { @@ -227,7 +229,7 @@ const butttondata = (row) => { type: 'warning', icon: '', color: '', - hasPermi: 'mes:orderDay:update'}), // + hasPermi: 'mes:orderDay:update'}), // // defaultButtons.mainListHandleBtn({label: '发布', // name: 'publish', // hide: isShowMainButton(row,['2']), @@ -268,25 +270,24 @@ const openForm = (type: string, row?: any) => { // form表单提交 const formsSuccess = async (formType,data) => { - + if (formType === 'create') { - let ret= OrderDayApi.createOrderDay(data) - if(ret===undefined || ret===null){ - message.error(t('common.networkError')) - }else{ - message.success(t('common.createSuccess')) - } - + await OrderDayApi.createOrderDay(data) + // if(ret===undefined || ret===null){ + // message.error(t('common.networkError')) + // }else{ + // message.success(t('common.createSuccess')) + // } + } else { - let ret= OrderDayApi.updateOrderDay(data) - if(ret.code==0){ - message.success(t('common.updateSuccess')) - }else{ - message.error(t('common.networkError')) - } - + await OrderDayApi.updateOrderDay(data) + // if(ret.code==0){ + // message.success(t('common.updateSuccess')) + // }else{ + // message.error(t('common.networkError')) + // } + } - basicFormRef.value.dialogVisible = false await getList() } @@ -301,7 +302,7 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { //console.log('orderDay-openDetail-303',row) sDetailRef.value.open(row, titleName) } - + } /** 发布操作 */ const scheduleDetailRef = ref() @@ -336,9 +337,10 @@ const handleExport = async () => { exportLoading.value = false } } -const stopPlan = (id) => { - OrderDayApi.stopPlan(id) - +const stopPlan = async (id) => { + await OrderDayApi.stopPlan(id) + getList() + } /** 导入 */ const importFormRef = ref() diff --git a/src/views/mes/orderDay/orderDay.data.ts b/src/views/mes/orderDay/orderDay.data.ts index 43bed9d1e..d2d6a1109 100644 --- a/src/views/mes/orderDay/orderDay.data.ts +++ b/src/views/mes/orderDay/orderDay.data.ts @@ -49,6 +49,7 @@ export const OrderDay = useCrudSchemas(reactive([ field: 'id', sort: 'custom', isForm: false, + isTable: false, width: '60px', }, { @@ -365,7 +366,7 @@ export const OrderDay = useCrudSchemas(reactive([ field: 'remark', sort: 'custom', isSearch: false, - isTable:false, + // isTable:false, }, { label: '操作', diff --git a/src/views/mes/workScheduling/components/qualifiedCheck.vue b/src/views/mes/workScheduling/components/qualifiedCheck.vue index 0c58be7d7..c091f1802 100644 --- a/src/views/mes/workScheduling/components/qualifiedCheck.vue +++ b/src/views/mes/workScheduling/components/qualifiedCheck.vue @@ -32,13 +32,10 @@ - - +