From 90ab64d7deaa06ed6ec7f0c68519aac8967715ab Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Thu, 9 May 2024 15:37:39 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=B8=AD=E8=8B=B1=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/zh-CN.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 064cc88b7..3e38361f5 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -618,11 +618,11 @@ export default { }, ts: { 代码:'代码', - 全部 : 'All', + 全部 :'全部', 标准:'标准', - 委外 : '委外', - 其它 :'其它', - 其他 :'其他', + 委外:'委外', + 其它:'其它', + 其他:'其他', 是否可用: '是否可用', 类型:'类型', 名称:'名称', From 8e219ee3abecb848d38f521c99de6bd92edf75d2 Mon Sep 17 00:00:00 2001 From: zhousq Date: Thu, 9 May 2024 17:07:25 +0800 Subject: [PATCH 2/6] =?UTF-8?q?2024-05-09=20=E5=B7=A5=E5=8D=95=E5=B7=A5?= =?UTF-8?q?=E5=BA=8F=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/workSchedulingDetail/index.ts | 5 +- src/utils/dict.ts | 1 + .../mes/workScheduling/components/Detail.vue | 20 ++++--- .../mes/workScheduling/components/finish.vue | 12 +++-- src/views/mes/workScheduling/index.vue | 24 +++++++-- .../mes/workScheduling/workScheduling.data.ts | 53 ++++++++++--------- 6 files changed, 77 insertions(+), 38 deletions(-) diff --git a/src/api/mes/workSchedulingDetail/index.ts b/src/api/mes/workSchedulingDetail/index.ts index 0bd6244ea..f39e63513 100644 --- a/src/api/mes/workSchedulingDetail/index.ts +++ b/src/api/mes/workSchedulingDetail/index.ts @@ -40,7 +40,10 @@ export const getWorkSchedulingDetail = async (id: number) => { export const createWorkSchedulingDetail = async (data: WorkSchedulingDetailVO) => { return await request.post({ url: `/mes/work-scheduling-detail/create`, data }) } - +// 更新工序的状态 +export const processFinished = async (id:number) => { + return await request.get({ url: `/mes/work-scheduling-detail/processFinished?id=`+id }) +} // 修改工单任务明细 export const updateWorkSchedulingDetail = async (data: WorkSchedulingDetailVO) => { return await request.put({ url: `/mes/work-scheduling-detail/update`, data }) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 691897e7e..74ae2cd68 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -284,6 +284,7 @@ export enum DICT_TYPE { // ========== 业务 - mes ========== MESDO_STATUS= 'mes_do_status', // 工单执行状态 + MES_PROCESS_STATUS= 'mes_process_status', // 工单工序状态 MES_WORKBILL_MODEL='mes_workbill_model',// 工单模式 单工单(根据产品数量生成多个工单)、批量工单(一个产品一个工单) MES_TASK_MODE='mes_task_mode', //生产模式 派工方式、领工方式 MES_PLANDO_STATUS='mes_plando_status', //计划执行状 diff --git a/src/views/mes/workScheduling/components/Detail.vue b/src/views/mes/workScheduling/components/Detail.vue index b42ae5cd2..63620192e 100644 --- a/src/views/mes/workScheduling/components/Detail.vue +++ b/src/views/mes/workScheduling/components/Detail.vue @@ -90,25 +90,26 @@ > - @@ -96,12 +96,14 @@ const getCurrentWorkerList = async (row) => { } personData.value = await workschedulingApi.getCurrentWorkerList(params) } +const saveFlag=ref(false) //提交报工 -const saveReport = () => { +const saveReport = async() => { let data = { - reportDate: dayjs(new Date()).format('YYYY-MM-DD HH:mm:sss'), + reportDate: dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'), schedulingCode: rowData.value.schedulingCode, processCode: currentProcess.value, + id:rowData.value.id, list: [ { reportCount: reportCount.value, @@ -112,7 +114,11 @@ const saveReport = () => { } ] } + saveFlag.value=true workschedulingApi.completeHandle(data) + saveFlag.value=false + dialogVisible.value = false + emit('close') } // 传递给父类 const emit = defineEmits(['success', 'close']) diff --git a/src/views/mes/workScheduling/index.vue b/src/views/mes/workScheduling/index.vue index c12d7bd90..1ce8ac437 100644 --- a/src/views/mes/workScheduling/index.vue +++ b/src/views/mes/workScheduling/index.vue @@ -61,6 +61,7 @@ :apiUpdate="WorkSchedulingDetailApi.updateWorkSchedulingDetail" :apiDelete="WorkSchedulingDetailApi.deleteWorkSchedulingDetail" :detailButtonIsShowAdd="false" + :buttondataTable="buttondataTable" :detailButtonIsShowEdit="false" :detailButtonIsShowDelete="false" @handleMainFefresh="handleMainFefresh" @@ -85,6 +86,7 @@ import Detail from './components/Detail.vue' import Report from './components/report.vue' import Finish from './components/finish.vue' + defineOptions({ name: 'MesWorkScheduling' }) const message = useMessage() // 消息弹窗 @@ -94,7 +96,21 @@ const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name const tableColumns = ref(WorkScheduling.allSchemas.tableColumns) - +// 详情 table 操作扩展 按钮 +const buttondataTable = ref([{ + label: '完工', + name: 'pfinished', + hide: false, + type: 'primary', + icon: '', + color: '', + hasPermi: '', + link: true, // 文本展现按钮 + }]) +// 查看 Bom 按钮回调事件 +const tableFormButton = async (val , row) => { + getList() +} // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef) => { nextTick(() => { @@ -174,10 +190,11 @@ const butttondata=(row) =>{ return [ defaultButtons.mainListHandleBtn({label:"终止",name:'terminate',hide: isShowMainButton(row,['-1','0']),hasPermi:'mes:workScheduling:update'}), // defaultButtons.mainListHandleBtn({label:"暂停",name:'pause',hide: isShowMainButton(row,['1']),hasPermi:'mes:workScheduling:update'}), defaultButtons.mainListHandleBtn({label:"恢复",name:'resume',hide: isShowMainButton(row,['3']),hasPermi:'mes:workScheduling:update'}), - defaultButtons.mainListHandleBtn({label:"开工",name:'start',hide: isShowMainButton(row,['0']),hasPermi:'mes:workScheduling:update'}), + defaultButtons.mainListHandleBtn({label:"开工",name:'start',hide: isShowMainButton(row,['-1','0']),hasPermi:'mes:workScheduling:update'}), defaultButtons.mainListHandleBtn({label:"报工",name:'report',hide: isShowMainButton(row,['1'] ),hasPermi:'mes:workScheduling:update'}), defaultButtons.mainListHandleBtn({label:"完工",name:'finish',hide: isShowMainButton(row,['1']),hasPermi:'mes:workScheduling:update'}), - defaultButtons.mainListHandleBtn({label:"叫料",name:'callMaterial',hide: isShowMainButton(row,['1']),hasPermi:'mes:workScheduling:update'}), + //defaultButtons.mainListHandleBtn({label:"叫料",name:'callMaterial',hide: isShowMainButton(row,['1']),hasPermi:'mes:workScheduling:update'}), + ]} const reportRef=ref() const reportFinishRef=ref() @@ -211,6 +228,7 @@ const openForm = (type: string, row?: any) => { //完工报工 const finishReport=async(row)=>{ let params={ + id:row.id, planDayCode:row.planMasterCode, processCode:row.workingNode } diff --git a/src/views/mes/workScheduling/workScheduling.data.ts b/src/views/mes/workScheduling/workScheduling.data.ts index 890ceff4b..658876f4b 100644 --- a/src/views/mes/workScheduling/workScheduling.data.ts +++ b/src/views/mes/workScheduling/workScheduling.data.ts @@ -192,9 +192,14 @@ export const WorkSchedulingDetail = useCrudSchemas(reactive([ field: 'status', sort: 'custom', isSearch: false, - isTable: false, + isTable: true, isForm:false, isDetail:false, + dictType: DICT_TYPE.MES_PROCESS_STATUS, + dictClass: 'string', + form: { + component: 'Select', + }, }, { @@ -307,12 +312,12 @@ export const WorkSchedulingDetail = useCrudSchemas(reactive([ value: 0 }, }, - { - label: '报工人', - field: 'reportPerson', - sort: 'custom', - isSearch: true, - }, + // { + // label: '报工人', + // field: 'reportPerson', + // sort: 'custom', + // isSearch: true, + // }, { label: '报工数量', field: 'reportCount', @@ -373,22 +378,22 @@ export const WorkSchedulingDetail = useCrudSchemas(reactive([ // field: 'materialValidate', // sort: 'custom', // }, - { - label: '备注', - field: 'remark', - sort: 'custom', - isSearch: false, - isTable: false, - isForm:false, - isDetail:false, - }, // { - // label: '操作', - // field: 'action', - // isForm: false, - // table: { - // width: 150, - // fixed: 'right' - // } - // } + // label: '备注', + // field: 'remark', + // sort: 'custom', + // isSearch: false, + // isTable: false, + // isForm:false, + // isDetail:false, + // }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } ])) From 067b96e786496ab5c5cf24dd79f09899fadc3012 Mon Sep 17 00:00:00 2001 From: bjang03 Date: Fri, 10 May 2024 08:41:20 +0800 Subject: [PATCH 3/6] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E5=A4=8D=E6=9C=88?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=AD=90=E8=AE=A1=E5=88=92=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=8A=A5=E9=94=99BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mes/ordermonthplan/index.vue | 10 ---------- src/views/mes/ordermonthplan/mesOrderMonthSub.data.ts | 8 +++----- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/views/mes/ordermonthplan/index.vue b/src/views/mes/ordermonthplan/index.vue index fc5c30e21..afc9d1bd9 100644 --- a/src/views/mes/ordermonthplan/index.vue +++ b/src/views/mes/ordermonthplan/index.vue @@ -292,7 +292,6 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { //formRef.setValues({standardBom:'bomddd'}) // getProcessroutes(val[0][searchField]) productName = val[0].name - getBoms(val[0][searchField]) } if(formField=='factoryCode'){ factoryName = val[0].name @@ -304,15 +303,6 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { }) } -const bomOptions=ref([]) -const getBoms = async (code: String) => { - bomOptions.value = await OrderDayApi.getBoms(code) - MesOrderMonthSub.allSchemas.formSchema.forEach(item => { - if (item.field == 'bomCode') { - item.componentProps.options = bomOptions.value - } - }) -} const createMesOrderMonthSub = async (data: MesOrderMonthSubVO) => { diff --git a/src/views/mes/ordermonthplan/mesOrderMonthSub.data.ts b/src/views/mes/ordermonthplan/mesOrderMonthSub.data.ts index f4a25613e..c44addc8c 100644 --- a/src/views/mes/ordermonthplan/mesOrderMonthSub.data.ts +++ b/src/views/mes/ordermonthplan/mesOrderMonthSub.data.ts @@ -67,11 +67,9 @@ export const MesOrderMonthSub = useCrudSchemas(reactive([ sort: 'custom', isTable: false, isSearch: true, - form: { - component:'Select', - componentProps: { - options: [{lablel:'bom',value:'bom'}] - } + table: { + width: 200, + fixed: 'left' } }, { From dba6116ab44bae5aca6843d6a22037eb111a97b8 Mon Sep 17 00:00:00 2001 From: zhousq Date: Fri, 10 May 2024 09:09:01 +0800 Subject: [PATCH 4/6] =?UTF-8?q?2024-05-10=20=E5=B7=A5=E5=BA=8F=E6=8A=A5?= =?UTF-8?q?=E5=B7=A5=E5=A4=B1=E8=B4=A5=E5=90=8E=E6=8C=89=E9=92=AE=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E4=B8=8D=E6=81=A2=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mes/workScheduling/components/report.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/views/mes/workScheduling/components/report.vue b/src/views/mes/workScheduling/components/report.vue index 136b47ac9..4661a8675 100644 --- a/src/views/mes/workScheduling/components/report.vue +++ b/src/views/mes/workScheduling/components/report.vue @@ -130,11 +130,16 @@ const saveReport = async() => { ] } saveFlag.value = true + try { + await workschedulingApi.reportWorkByProcess(data) + }finally{ + saveFlag.value = false + dialogVisible.value = false + emit('close') + } //console.log("report-saveReport-82",data) - await workschedulingApi.reportWorkByProcess(data) - saveFlag.value = false - dialogVisible.value = false - emit('close') + //await workschedulingApi.reportWorkByProcess(data) + } // 传递给父类 const emit = defineEmits(['success', 'close']) From 1ee38eeed8a5f219eee7479f4c6bbc84829c8a87 Mon Sep 17 00:00:00 2001 From: zhousq Date: Fri, 10 May 2024 11:04:07 +0800 Subject: [PATCH 5/6] =?UTF-8?q?2024-05-10=20=E5=B7=A5=E5=8D=95=E6=9A=82?= =?UTF-8?q?=E5=81=9C=E6=97=B6=E4=B8=8D=E8=83=BD=E8=BF=9B=E8=A1=8C=E5=B7=A5?= =?UTF-8?q?=E5=BA=8F=E5=AE=8C=E5=B7=A5=E6=93=8D=E4=BD=9C=E7=9A=84=E6=8E=A7?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mes/workScheduling/components/Detail.vue | 15 ++++++++++----- src/views/mes/workScheduling/index.vue | 5 ++++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/views/mes/workScheduling/components/Detail.vue b/src/views/mes/workScheduling/components/Detail.vue index 63620192e..dc9f96206 100644 --- a/src/views/mes/workScheduling/components/Detail.vue +++ b/src/views/mes/workScheduling/components/Detail.vue @@ -104,9 +104,9 @@ :countScopeType="countScopeType" :key="updateKey" > -