From b5bc9c2ca3c32818a8dd7912d6e49c38b8f784b3 Mon Sep 17 00:00:00 2001 From: Ledo Date: Fri, 6 Jun 2025 12:21:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E6=A0=B7=E5=BC=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/heli/processdesign/2d.vue | 16 +++++++++-- .../src/views/heli/processdesign/3d.vue | 15 ++++++++-- .../src/views/heli/processdesign/detail.vue | 28 ++++++++++++------- .../src/views/heli/processdesign/index.vue | 17 ++++++++--- .../views/heli/processdesign/workblank.vue | 13 +++++++-- .../views/heli/taskdispatch/detailDialog.vue | 18 ++++++------ .../moJuSheJiReport/components/dataItem.vue | 6 ++-- .../moJuSheJiReport-detail.vue | 8 +++--- 8 files changed, 84 insertions(+), 37 deletions(-) diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/processdesign/2d.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/processdesign/2d.vue index be176c9..2a9a9b7 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/processdesign/2d.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/processdesign/2d.vue @@ -188,17 +188,27 @@ const getDetailMsg = (row) =>{ if(row.isOverProcess){ //完结的,按计划完成了还是没按计划完成 if(row.twoDimDate != null && row.lastDate != null ){ - const start = new Date(row.twoDimDate).getTime(); + const starttemp = new Date(row.twoDimDate); + starttemp.setHours(23,59,59,999); + const start =starttemp.getTime() const end = new Date(row.lastDate).getTime(); const diffTime = Math.abs(end - start); var day = Math.floor(diffTime / (1000 * 60 * 60 * 24)); - if(row.lastDate > row.twoDimDate){ + if(day == 0){ + if(row.isDelay == 1 && row.lastDate > row.blankDate){ + return '延后' + (day+1) +'天'; + } + return '按时完成' + }else{ + if(row.lastDate > row.blankDate){ return '延后' + day +'天'; - }else if (row.lastDate < row.twoDimDate){ + }else if (row.lastDate < row.blankDate){ return '提前' + day +'天'; }else{ return '按时完成' } + } + }else{ return '实施中'; } diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/processdesign/3d.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/processdesign/3d.vue index 9238ba1..d10686d 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/processdesign/3d.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/processdesign/3d.vue @@ -238,17 +238,26 @@ const getDetailMsg = (row) =>{ if(row.isOverProcess){ //完结的,按计划完成了还是没按计划完成 if(row.threeDimDate != null && row.lastDate != null ){ - const start = new Date(row.threeDimDate).getTime(); + const starttemp = new Date(row.threeDimDate); + starttemp.setHours(23,59,59,999); + const start =starttemp.getTime() const end = new Date(row.lastDate).getTime(); const diffTime = Math.abs(end - start); var day = Math.floor(diffTime / (1000 * 60 * 60 * 24)); - if(row.lastDate > row.threeDimDate){ + if(day == 0){ + if(row.isDelay == 1 && row.lastDate > row.blankDate){ + return '延后' + (day+1) +'天'; + } + return '按时完成' + }else{ + if(row.lastDate > row.blankDate){ return '延后' + day +'天'; - }else if (row.lastDate < row.threeDimDate){ + }else if (row.lastDate < row.blankDate){ return '提前' + day +'天'; }else{ return '按时完成' } + } }else{ return '实施中'; } diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/processdesign/detail.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/processdesign/detail.vue index b327a99..1409bc5 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/processdesign/detail.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/processdesign/detail.vue @@ -206,10 +206,9 @@ v-for="dict in getIntDictOptions(DICT_TYPE.HELI_PROJECT_PLAN_STATUS)" :key="dict @@ -515,7 +514,7 @@ const beginTimeChange = (e , row) =>{ } } } -const delaySubmit = async(event) =>{ +const delaySubmit = async() =>{ if(formData.value.delayReason == null || formData.value.delayReason.replaceAll(' ','') == ''){ message.error("延期原因不得为空,请确认!") return; @@ -524,11 +523,14 @@ const delaySubmit = async(event) =>{ formData.value.delayTime = (new Date()).getTime() await submitForm('SAVE'); } -const openDelay = () =>{ +const openDelay = async() =>{ var date = new Date(); if(processDesignType.value == 'BLUEPRINT_WORKBLANK'){ if(formData.value.blankDate != null ){ - if(formData.value.blankDate > date.getTime()){ + var dateT = new Date(formData.value.blankDate) + dateT.setHours(23,59,59,999) + + if( dateT.getTime() > date.getTime()){ message.error("当前日期为正常生产周期,未达到延期条件,请确认!") return } @@ -539,7 +541,9 @@ const openDelay = () =>{ } if(processDesignType.value == 'BLUEPRINT_2D'){ if(formData.value.twoDimDate != null ){ - if(formData.value.twoDimDate > date.getTime()){ + var dateT = new Date(formData.value.blankDate) + dateT.setHours(23,59,59,999) + if(dateT.getTime() > date.getTime()){ message.error("当前日期为正常生产周期,未达到延期条件,请确认!") return } @@ -550,7 +554,9 @@ const openDelay = () =>{ } if(processDesignType.value == 'BLUEPRINT_3D'){ if(formData.value.threeDimDate != null ){ - if(formData.value.threeDimDate > date.getTime()){ + var dateT = new Date(formData.value.blankDate) + dateT.setHours(23,59,59,999) + if(dateT.getTime() > date.getTime()){ message.error("当前日期为正常生产周期,未达到延期条件,请确认!") return } @@ -562,7 +568,9 @@ const openDelay = () =>{ if(processDesignType.value == 'BLUEPRINT_FOUNDRY_TECHNOLOGY'){ if(formData.value.craftEndDate != null ){ - if(formData.value.craftEndDate > date.getTime()){ + var dateT = new Date(formData.value.blankDate) + dateT.setHours(23,59,59,999) + if(dateT.getTime() > date.getTime()){ message.error("当前日期为正常生产周期,未达到延期条件,请确认!") return } @@ -571,7 +579,7 @@ const openDelay = () =>{ return } } - delayDialog.value = true; + await delaySubmit() } const overRow = async( row :any) =>{ diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/processdesign/index.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/processdesign/index.vue index 91d0452..9590707 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/processdesign/index.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/processdesign/index.vue @@ -206,17 +206,26 @@ const getDetailMsg = (row) =>{ if(row.isOverProcess){ //完结的,按计划完成了还是没按计划完成 if(row.craftEndDate != null && row.lastDate != null ){ - const start = new Date(row.craftEndDate).getTime(); + const starttemp = new Date(row.craftEndDate); + starttemp.setHours(23,59,59,999); + const start =starttemp.getTime() const end = new Date(row.lastDate).getTime(); - const diffTime = Math.abs(end - start); + const diffTime = end - start var day = Math.floor(diffTime / (1000 * 60 * 60 * 24)); - if(row.lastDate > row.craftEndDate){ + if(day == 0){ + if(row.isDelay == 1 && row.lastDate > row.blankDate){ + return '延后' + (day+1) +'天'; + } + return '按时完成' + }else{ + if(row.lastDate > row.blankDate){ return '延后' + day +'天'; - }else if (row.lastDate < row.craftEndDate){ + }else if (row.lastDate < row.blankDate){ return '提前' + day +'天'; }else{ return '按时完成' } + } }else{ // return '已完成'; } diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/processdesign/workblank.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/processdesign/workblank.vue index 2099bb8..e23d6af 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/processdesign/workblank.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/processdesign/workblank.vue @@ -187,17 +187,26 @@ const getDetailMsg = (row) =>{ if(row.isOverProcess){ //完结的,按计划完成了还是没按计划完成 if(row.blankDate != null && row.lastDate != null ){ - const start = new Date(row.blankDate).getTime(); + const starttemp = new Date(row.blankDate); + starttemp.setHours(23,59,59,999); + const start =starttemp.getTime() const end = new Date(row.lastDate).getTime(); const diffTime = Math.abs(end - start); var day = Math.floor(diffTime / (1000 * 60 * 60 * 24)); - if(row.lastDate > row.blankDate){ + if(day == 0){ + if(row.isDelay == 1 && row.lastDate > row.blankDate){ + return '延后' + (day+1) +'天'; + } + return '按时完成' + }else{ + if(row.lastDate > row.blankDate){ return '延后' + day +'天'; }else if (row.lastDate < row.blankDate){ return '提前' + day +'天'; }else{ return '按时完成' } + } }else{ return '实施中'; } diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/taskdispatch/detailDialog.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/taskdispatch/detailDialog.vue index db4c3b6..cd66723 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/taskdispatch/detailDialog.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/taskdispatch/detailDialog.vue @@ -218,7 +218,7 @@ class="!w-260px" v-model="formData.createTime" type="date" value-format="x" v-loading="subFormLoading" label-width="0"> - + @@ -262,16 +262,18 @@ class="!w-260px" v-model="formData.createTime" type="date" value-format="x" - + diff --git a/mes-ui/mini-app/src/pages/moJuSheJiReport/components/dataItem.vue b/mes-ui/mini-app/src/pages/moJuSheJiReport/components/dataItem.vue index 15441c3..df0e1cd 100644 --- a/mes-ui/mini-app/src/pages/moJuSheJiReport/components/dataItem.vue +++ b/mes-ui/mini-app/src/pages/moJuSheJiReport/components/dataItem.vue @@ -550,11 +550,11 @@ 子项目:{{ item.projectSubCode || "" }} 客户名称:{{ item.customerName }} - 工艺起止日期:{{item.startTwoDimDate}} ~ {{item.twoDimDate}} + 工艺起止日期:{{item.startTwoDimDate == null ? '':item.startTwoDimDate.substring(0,10)}} ~ {{item.twoDimDate== null ? '':item.twoDimDate.substring(0,10)}} - 工艺起止日期:{{item.startThreeDimDate}} ~ {{item.threeDimDate}} + 工艺起止日期:{{item.startThreeDimDate== null ? '':item.startThreeDimDate.substring(0,10)}} ~ {{item.threeDimDate== null ? '':item.threeDimDate.substring(0,10)}} - 工艺起止日期:{{item.startBlankDate}} ~ {{item.blankDate}} + 工艺起止日期:{{item.startBlankDate== null ? '':item.startBlankDate.substring(0,10)}} ~ {{item.blankDate== null ? '':item.blankDate.substring(0,10)}} diff --git a/mes-ui/mini-app/src/pages/moJuSheJiReport/moJuSheJiReport-detail.vue b/mes-ui/mini-app/src/pages/moJuSheJiReport/moJuSheJiReport-detail.vue index cbda1cc..54671e3 100644 --- a/mes-ui/mini-app/src/pages/moJuSheJiReport/moJuSheJiReport-detail.vue +++ b/mes-ui/mini-app/src/pages/moJuSheJiReport/moJuSheJiReport-detail.vue @@ -529,14 +529,14 @@ 客户名称:{{detailInfo.customerName}} - 工艺起止日期:{{formatDate(detailInfo.startTwoDimDate)}} ~ {{formatDate(detailInfo.twoDimDate)}} + 工艺起止日期:{{formatDate(detailInfo.startTwoDimDate) == ''?'':formatDate(detailInfo.startTwoDimDate).substring(0,10)}} ~ {{formatDate(detailInfo.twoDimDate)== ''?'':formatDate(detailInfo.twoDimDate).substring(0,10)}} - 工艺起止日期:{{formatDate(detailInfo.startThreeDimDate)}} ~ - {{formatDate(detailInfo.threeDimDate)}} + 工艺起止日期:{{formatDate(detailInfo.startThreeDimDate)== ''?'':formatDate(detailInfo.startThreeDimDate).substring(0,10)}} ~ + {{formatDate(detailInfo.threeDimDate)== ''?'':formatDate(detailInfo.threeDimDate).substring(0,10)}} - 工艺起止日期:{{formatDate(detailInfo.startBlankDate)}} ~ {{formatDate(detailInfo.blankDate)}} + 工艺起止日期:{{formatDate(detailInfo.startBlankDate)== ''?'':formatDate(detailInfo.startBlankDate).substring(0,10)}} ~ {{formatDate(detailInfo.blankDate)== ''?'':formatDate(detailInfo.blankDate).substring(0,10)}}