Bläddra i källkod

页面跳转调整

xy 1 vecka sedan
förälder
incheckning
df1b216246

+ 1 - 1
yudao-ui-admin-vue3/src/views/pressure2/boilerReportCheck/index.vue

@@ -297,7 +297,7 @@ const handleEdit = (row: Record<string, any>) => {
   router.push({ name: 'BoilerCheckerTaskDetail', query: { id:  row.orderItemId || row.id, type: 'reportAudit' } })
 }
 const handleRowDblclick = (row: Record<string, any>) => {
-  router.push({ name: 'BoilerCheckerTaskDetail', query: { id:  row.orderItemId || row.id, type: 'reportAudit' } })
+  // router.push({ name: 'BoilerCheckerTaskDetail', query: { id:  row.orderItemId || row.id, type: 'reportAudit' } })
 }
 
 //------------人员选择弹窗------------------------

+ 12 - 3
yudao-ui-admin-vue3/src/views/pressure2/boilerReportPreparationList/index.vue

@@ -631,14 +631,23 @@ const resetQuery = () => {
 }
 
 // 修改后的编辑/查看详情操作
-const handleEdit = (id: string) => {
-  router.push({ name: 'BoilerCheckerTaskDetail', query: { id, type: 'BoilerReportPreparationList' } })
+const handleEdit = (row: Record<string, any>) => {
+
+  //判断报告编制时是否有结束检验日期
+  if (row.taskStatus >= PressureTaskOrderTaskStatus.REPORT_INPUT){
+    if (!row.endCheckDate) {
+      ElMessage.error('请添加结束检验时间再进行编制!')
+      return
+    }
+  }
+
+  router.push({ name: 'BoilerCheckerTaskDetail', query: { row.id, type: 'BoilerReportPreparationList' } })
 }
 const handleRowDblclick = (row: Record<string, any>) => {
   if (row.isClaim === false) {
     return
   }
-  router.push({ name: 'BoilerCheckerTaskDetail', query: { id: row.id, type: 'BoilerReportPreparationList' } })
+  // router.push({ name: 'BoilerCheckerTaskDetail', query: { id: row.id, type: 'BoilerReportPreparationList' } })
 }
 
 //------------人员选择弹窗------------------------

+ 1 - 1
yudao-ui-admin-vue3/src/views/pressure2/boilerReportRatify/index.vue

@@ -297,7 +297,7 @@ const handleEdit = (row: Record<string, any>) => {
   router.push({ name: 'BoilerCheckerTaskDetail', query: { id: row.orderItemId || row.id, type: 'reportRatify' } })
 }
 const handleRowDblclick = (row: Record<string, any>) => {
-  router.push({ name: 'BoilerCheckerTaskDetail', query: { id:  row.orderItemId || row.id, type: 'reportRatify' } })
+  // router.push({ name: 'BoilerCheckerTaskDetail', query: { id:  row.orderItemId || row.id, type: 'reportRatify' } })
 }
 
 //------------人员选择弹窗------------------------

+ 1 - 1
yudao-ui-admin-vue3/src/views/pressure2/boilerchecker/myTask.vue

@@ -1094,7 +1094,7 @@ const handleRowDblclick = (row: Record<string, any>) => {
   if (row.isClaim === false) {
     return
   }
-  router.push({ name: 'BoilerCheckerTaskDetail', query: { id: row.id, type: 'BoilerMyTask' } })
+  // router.push({ name: 'BoilerCheckerTaskDetail', query: { id: row.id, type: 'BoilerMyTask' } })
 }
 const filterFn = (data, type = '1') => {
   switch (type) {

+ 2 - 2
yudao-ui-admin-vue3/src/views/pressure2/pipeReportCheck/index.vue

@@ -288,10 +288,10 @@ const resetQuery = () => {
 
 // 修改后的编辑/查看详情操作
 const handleEdit = (row: Record<string, any>) => {
-  router.push({ name: 'PipeCheckerTaskDetail', query: { id:  row.id , type: 'reportAudit' } })
+  router.push({ name: 'PipeCheckerTaskDetail', query: { id:row.id, orderId:row.orderId, type: 'reportAudit' } })
 }
 const handleRowDblclick = (row: Record<string, any>) => {
-  router.push({ name: 'PipeCheckerTaskDetail', query: { id:  row.id , type: 'reportAudit' } })
+  // router.push({ name: 'PipeCheckerTaskDetail', query: { id:row.id, orderId:row.orderId, type: 'reportAudit' } })
 }
 
 //------------人员选择弹窗------------------------

+ 13 - 4
yudao-ui-admin-vue3/src/views/pressure2/pipeReportPreparationList/index.vue

@@ -331,7 +331,7 @@
       <el-table-column label="操作" align="center" min-width="150px" fixed="right">
         <template #default="scope">
           <div class="flex flex-col gap-1">
-            <el-button link type="primary" @click="handleEdit(scope.row.id)"> 编制报告 </el-button>
+            <el-button link type="primary" @click="handleEdit(scope.row)"> 编制报告 </el-button>
           </div>
         </template>
       </el-table-column>
@@ -694,14 +694,23 @@ const resetQuery = () => {
 }
 
 // 修改后的编辑/查看详情操作
-const handleEdit = (id: string) => {
-  router.push({ name: 'PipeCheckerTaskDetail', query: { id, type: 'PipeReportPreparationList' } })
+const handleEdit = (row: Record<string, any>) => {
+
+  //判断报告编制时是否有结束检验日期
+  if (row.taskStatus >= PressureTaskOrderTaskStatus.REPORT_INPUT){
+    if (!row.endCheckDate) {
+      ElMessage.error('请添加结束检验时间再进行编制!')
+      return
+    }
+  }
+
+  router.push({ name: 'PipeCheckerTaskDetail', query: { id:row.id, orderId:row.orderId, type: 'PipeReportPreparationList' } })
 }
 const handleRowDblclick = (row: Record<string, any>) => {
   if (row.isClaim === false) {
     return
   }
-  router.push({ name: 'PipeCheckerTaskDetail', query: { id: row.id, type: 'PipeReportPreparationList' } })
+  // router.push({ name: 'PipeCheckerTaskDetail', query: { id:row.id, orderId:row.orderId, type: 'PipeReportPreparationList' } })
 }
 
 //------------人员选择弹窗------------------------

+ 2 - 2
yudao-ui-admin-vue3/src/views/pressure2/pipeReportRatify/index.vue

@@ -286,10 +286,10 @@ const resetQuery = () => {
 }
 
 const handleEdit = (row: Record<string, any>) => {
-  router.push({ name: 'PipeCheckerTaskDetail', query: { id: row.id || row.id, type: 'reportRatify' } })
+  router.push({ name: 'PipeCheckerTaskDetail', query: { id:row.id, orderId:row.orderId, type: 'reportRatify' } })
 }
 const handleRowDblclick = (row: Record<string, any>) => {
-  router.push({ name: 'PipeCheckerTaskDetail', query: { id: row.id || row.id, type: 'reportRatify' } })
+  // router.push({ name: 'PipeCheckerTaskDetail', query: { id:row.id, orderId:row.orderId, type: 'reportRatify' } })
 }
 
 //------------人员选择弹窗------------------------

+ 1 - 1
yudao-ui-admin-vue3/src/views/pressure2/pipechecker/myTask.vue

@@ -922,7 +922,7 @@ const handleRowDblclick = (row: Record<string, any>) => {
   if (row.isClaim === false) {
     return
   }
-  router.push({ name: 'PipeCheckerTaskDetail', query: { id: row.id, type: 'PipeReportPreparationList' } })
+  // router.push({ name: 'PipeCheckerTaskDetail', query: { id: row.id, type: 'PipeReportPreparationList' } })
 }
 
 const handleClaim = (id: string) => {