Browse Source

fix:修改任务详情-工作流程、消息通知

luzhixia 1 week ago
parent
commit
a45080ff49

+ 15 - 4
src/components/task/TaskCustomizedReleaseDialog.vue

@@ -148,14 +148,19 @@
           </el-tab-pane>
 
           <!-- 监审通知 -->
-          <el-tab-pane label="监审通知" name="auditNotice">
-            <auditNoticeTab
+          <el-tab-pane label="消息通知" name="messageNotify">
+            <!-- <auditNoticeTab
               ref="auditNoticeTab"
               :project="project"
               :is-view="isView"
               :document-data="documentData"
               @refresh="getDocumentData"
               @paginationChange="handlePaginationChange"
+            /> -->
+            <message-notify
+              :id="selectedProject.id"
+              ref="messageNotifyRef"
+              :selected-project="selectedProject"
             />
           </el-tab-pane>
         </el-tabs>
@@ -170,7 +175,8 @@
   import materialTab from './mounTaskComponents/materialTab.vue'
   import surveyTab from './mounTaskComponents/surveyTab.vue'
   import workflowTab from './mounTaskComponents/workflowTab.vue'
-  import auditNoticeTab from './mounTaskComponents/auditNoticeTab.vue'
+  import messageNotify from './mounTaskComponents/messageNotify.vue'
+  // import auditNoticeTab from './mounTaskComponents/auditNoticeTab.vue'
   import { taskMixin } from './mounTaskComponents/index.js'
   import {
     addCostProjectScenario,
@@ -185,7 +191,8 @@
       materialTab,
       surveyTab,
       workflowTab,
-      auditNoticeTab,
+      // auditNoticeTab,
+      messageNotify,
     },
     mixins: [taskMixin],
     props: {
@@ -199,6 +206,10 @@
         type: Object,
         default: () => ({}),
       },
+      selectedProject: {
+        type: Object,
+        default: () => ({}),
+      },
       // 是否查看模式
       isView: {
         type: Boolean,

+ 36 - 18
src/components/task/mounTaskComponents/index.js

@@ -38,6 +38,7 @@ export const taskMixin = {
         setStepDialogVisible: false,
         stepDialogVisible: false,
         documentDialogVisible: false,
+        detailDialogVisible: false,
       },
       loading: {
         save: false,
@@ -159,29 +160,41 @@ export const taskMixin = {
             },
           },
           {
-            prop: 'mainUserName',
-            label: '办人员',
+            prop: 'userName',
+            label: '办人员',
             minWidth: 100,
             align: 'left',
+            formatter: (row) => {
+              return row.mainUserName
+                ? row.mainUserName + ',' + row.userName || ''
+                : row.userName || ''
+            },
           },
+
           {
-            prop: 'userName',
-            label: '从办人员',
+            prop: 'actRemarks',
+            label: '办理意见',
             minWidth: 150,
             align: 'left',
           },
+          // {
+          //   prop: 'status',
+          //   label: '预置流转操作',
+          //   minWidth: 150,
+          //   align: 'left',
+          //   formatter: (row) => {
+          //     return this.getDictName('processStatus', row.status)
+          //   },
+          // },
           {
-            prop: 'status',
-            label: '预置流转操作',
-            minWidth: 150,
-            align: 'left',
-            formatter: (row) => {
-              return this.getDictName('processStatus', row.status)
-            },
+            prop: 'endTime',
+            label: '要求办结期限',
+            width: 140,
+            align: 'center',
           },
           {
             prop: 'actStartTime',
-            label: '流程开始时间',
+            label: '开始时间',
             width: 140,
             align: 'center',
           },
@@ -191,12 +204,7 @@ export const taskMixin = {
             width: 140,
             align: 'center',
           },
-          {
-            prop: 'endTime',
-            label: '预置环节截止时间',
-            width: 140,
-            align: 'center',
-          },
+
           {
             prop: 'action',
             label: '操作',
@@ -477,6 +485,16 @@ export const taskMixin = {
         case 'workflow':
           this.getWorkflow()
           break
+        case 'messageNotify':
+          // this.getWorkflow()
+          // 切到消息通知时,调用子组件刷新
+          console.log('messageNotify')
+          this.$nextTick(() => {
+            if (this.$refs && this.$refs.messageNotifyRef) {
+              this.$refs.messageNotifyRef.getNoticeList()
+            }
+          })
+          break
         default:
           break
       }

+ 57 - 5
src/components/task/mounTaskComponents/workflowTab.vue

@@ -2,7 +2,7 @@
   <!-- 直接复用原 workflowTab 代码 -->
   <div class="task-formulate">
     <div class="operation-bar">
-      <span>预定的监审工作起止时间:</span>
+      <span>流程预定起止时间:</span>
       <el-date-picker
         v-model="formData.workflow.plannedAuditStartDate"
         type="date"
@@ -27,11 +27,10 @@
       <el-button
         type="success"
         plain
-        icon="iconfont-5039297 icon-zengjia1"
         :disabled="isView"
         @click="handleSetWorkflow"
       >
-        工作环节设置
+        流程明细
       </el-button>
     </div>
     <CostAuditTable
@@ -41,9 +40,12 @@
       :show-action-column="true"
     >
       <template #action="{ row }">
-        <el-button type="text" :disabled="isView" @click="handleSetStep(row)">
-          设置
+        <el-button type="text" @click="handleViewStepDetail(row)">
+          环节明细
         </el-button>
+        <!-- <el-button type="text" :disabled="isView" @click="handleSetStep(row)">
+          设置
+        </el-button> -->
       </template>
     </CostAuditTable>
     <div class="table-description">
@@ -272,6 +274,49 @@
         <el-button @click="dialogs.stepDialogVisible = false">取消</el-button>
       </div>
     </el-dialog>
+    <!-- 环节明细对话框 -->
+    <el-dialog
+      title="环节明细"
+      :visible.sync="dialogs.detailDialogVisible"
+      width="50%"
+      :modal="false"
+      append-to-body
+    >
+      <el-row :gutter="16">
+        <el-col :span="12">
+          流程环节:{{ detailRow.processNodeValue || '-' }}
+        </el-col>
+        <el-col :span="12">
+          环节类型:{{
+            getDictName('processNodeType', detailRow.nodeType) || '-'
+          }}
+        </el-col>
+      </el-row>
+      <el-row :gutter="16" style="margin-top: 10px">
+        <el-col :span="12">
+          办理人员:{{
+            detailRow.mainUserName
+              ? detailRow.mainUserName + ',' + detailRow.userName || ''
+              : detailRow.userName || '-'
+          }}
+        </el-col>
+      </el-row>
+      <el-row :gutter="16" style="margin-top: 10px">
+        <el-col :span="24">办理意见:{{ detailRow.actRemarks || '-' }}</el-col>
+      </el-row>
+      <el-row :gutter="16" style="margin-top: 10px">
+        <el-col :span="12">要求办结期限:{{ detailRow.endTime || '-' }}</el-col>
+        <el-col :span="12">
+          开始时间:{{ detailRow.actStartTime || '-' }}
+        </el-col>
+      </el-row>
+      <el-row :gutter="16" style="margin-top: 10px">
+        <el-col :span="12">结束时间:{{ detailRow.actEndTime || '-' }}</el-col>
+      </el-row>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogs.detailDialogVisible = false">关闭</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -297,6 +342,8 @@
     },
     data() {
       return {
+        // 环节明细数据
+        detailRow: {},
         formData: {
           currentStepRules: {
             endTime: [
@@ -370,6 +417,11 @@
     },
 
     methods: {
+      // 查看环节明细
+      handleViewStepDetail(row) {
+        this.detailRow = { ...(row || {}) }
+        this.dialogs.detailDialogVisible = true
+      },
       formatterUserList(userId) {
         return this.formatterMainUserList().filter(
           (item) => item.userId !== userId

+ 7 - 1
src/views/costAudit/auditInfo/auditManage/index.vue

@@ -111,7 +111,11 @@
               <el-button type="text" @click="handleViewTaskDetail(scope.row)">
                 任务详情
               </el-button>
-              <el-button type="text" @click="handleOpenMainDetails(scope.row)">
+              <el-button
+                v-if="scope.row.status != '300'"
+                type="text"
+                @click="handleOpenMainDetails(scope.row)"
+              >
                 任务办理
               </el-button>
               <el-button type="text" @click="handleCheckRecord(scope.row)">
@@ -235,6 +239,7 @@
     <task-customized-release-dialog
       :visible.sync="taskReleaseDialogVisible"
       :project="project"
+      :selected-project="selectedProject"
       :is-view="true"
       @backToList="taskReleaseDialogVisible = false"
       @close="taskReleaseDialogVisible = false"
@@ -435,6 +440,7 @@
           return
         }
         this.isView = true
+        this.selectedProject = row
         getCostProjectDetail({ id: projectId })
           .then((res) => {
             this.project = (res && res.value) || {}

+ 1 - 1
src/views/costAudit/baseInfo/statistics/components/index.js

@@ -180,7 +180,7 @@ export const taskMixin = {
           },
           {
             prop: 'actStartTime',
-            label: '流程开始时间',
+            label: '开始时间',
             width: 140,
             align: 'center',
           },

+ 1 - 1
src/views/costAudit/projectInfo/auditTaskManage/taskCustomizedRelease/index.js

@@ -181,7 +181,7 @@ export const taskMixin = {
           },
           {
             prop: 'actStartTime',
-            label: '流程开始时间',
+            label: '开始时间',
             width: 140,
             align: 'center',
           },