瀏覽代碼

三级校审

lizhenhao 2 年之前
父節點
當前提交
9fbe85854e

+ 21 - 0
src/api/program/ProgramProjectListInfoService.js

@@ -23,6 +23,13 @@ export default class ProgramProjectListInfoService {
       params: {id: id}
     })
   }
+  findByIdAudit (id) {
+    return request({
+      url: '/program/projectList/findByIdAudit',
+      method: 'get',
+      params: {id: id}
+    })
+  }
   save (inputForm) {
     return request({
       url: `/program/projectList/save`,
@@ -37,6 +44,13 @@ export default class ProgramProjectListInfoService {
       data: inputForm
     })
   }
+  saveFormThree (inputForm) {
+    return request({
+      url: `/program/projectList/saveFormThree`,
+      method: 'post',
+      data: inputForm
+    })
+  }
   delete (ids) {
     return request({
       url: '/program/projectList/deleteById',
@@ -58,6 +72,13 @@ export default class ProgramProjectListInfoService {
       data: data
     })
   }
+  updateStatusByAuditId (data) {
+    return request({
+      url: '/program/projectList/updateStatusByAuditId',
+      method: 'post',
+      data: data
+    })
+  }
   saveReportNo (id) {
     return request({
       url: '/program/projectList/saveReportNo',

+ 21 - 21
src/components/editor/WangEditor.vue

@@ -55,26 +55,26 @@ export default {
       this.editor.customConfig.uploadImgTimeout = 3 * 60 * 1000 // 设置超时时间
       // 配置菜单
       this.editor.customConfig.menus = [
-        'head', // 标题
-        'bold', // 粗体
-        'fontSize', // 字号
-        'fontName', // 字体
-        'italic', // 斜体
-        'underline', // 下划线
-        'strikeThrough', // 删除线
-        'foreColor', // 文字颜色
-        'backColor', // 背景颜色
-        'link', // 插入链接
-        'list', // 列表
-        'justify', // 对齐方式
-        'quote', // 引用
-        'emoticon', // 表情
-        'image', // 插入图片
-        'table', // 表格
-        'video', // 插入视频
-        'code', // 插入代码
-        'undo', // 撤销
-        'redo' // 重复
+        // 'head', // 标题
+        // 'bold', // 粗体
+        // 'fontSize', // 字号
+        // 'fontName', // 字体
+        // 'italic', // 斜体
+        // 'underline', // 下划线
+        // 'strikeThrough', // 删除线
+        // 'foreColor', // 文字颜色
+        // 'backColor', // 背景颜色
+        // 'link', // 插入链接
+        // 'list', // 列表
+        // 'justify', // 对齐方式
+        // 'quote', // 引用
+        // 'emoticon', // 表情
+        // 'image', // 插入图片
+        // 'table', // 表格
+        // 'video', // 插入视频
+        // 'code', // 插入代码
+        // 'undo', // 撤销
+        // 'redo' // 重复
       ]
       this.editor.customConfig.uploadImgHooks = {
         fail: (xhr, editor, result) => {
@@ -116,4 +116,4 @@ export default {
   border: 1px solid #ccc;
   height: 500px;
 }
-</style>
+</style>

+ 8 - 0
src/views/common/UpLoadComponent.vue

@@ -103,6 +103,14 @@
     },
     methods: {
       /**
+       * 组件中divider的名称赋值
+       **/
+      setDividerName (dividerName) {
+        if (this.commonJS.isNotEmpty(dividerName)) {
+          this.dividerName = dividerName
+        }
+      },
+      /**
        * 文件上传组件初始化
        * @param auth
        *    auth的值为"view"时,不可上传/编辑文件

+ 8 - 1
src/views/modules/finance/invoice/InvoiceList.vue

@@ -182,7 +182,7 @@
           <vxe-column type="checkbox" width="40" ></vxe-column>
           <vxe-column min-width="150" title="项目名称"align="center" field="programName">
             <template slot-scope="scope">
-              <el-link  type="primary" :underline="false" @click="viewProject(scope.row.id)">{{commonJS.isEmpty(scope.row.financeInvoiceBaseDTOList[0].programId)?'其他:':''}}{{scope.row.programName}}</el-link>
+              <el-link  type="primary" :underline="false" @click="viewProject(scope.row.id)">{{scope.row.programName}}</el-link>
             </template>
           </vxe-column>
           <vxe-column min-width="150" title="发票申请编号"align="center" field="no">
@@ -399,6 +399,13 @@
             item.account = parseFloat(item.account).toFixed(2)
             if (!this.commonJS.isEmpty(item.financeInvoiceBaseDTOList)) {
               let pName = ''
+              if (this.commonJS.isNotEmpty(item.financeInvoiceBaseDTOList)) {
+                if (item.financeInvoiceBaseDTOList.length === 1) {
+                  if (this.commonJS.isEmpty(item.financeInvoiceBaseDTOList[0].programId)) {
+                    pName = '其他: '
+                  }
+                }
+              }
               item.financeInvoiceBaseDTOList.forEach((program, index) => {
                 if ((index + 1) !== item.financeInvoiceBaseDTOList.length) {
                   pName = pName + program.programName + ','

+ 319 - 24
src/views/modules/program/registered/ProjectList.vue

@@ -107,6 +107,21 @@
           <vxe-column min-width="180"align="center" title="委托方" field="clientName"></vxe-column>
           <vxe-column min-width="210"align="center" title="报告号" field="reportNo"></vxe-column>
           <vxe-column min-width="120"align="center" title="创建日期" field="createDate"></vxe-column>
+          <vxe-column min-width="120"align="center" title="一级校审" field="status1">
+            <template slot-scope="scope">
+              <el-button  type="text" @click="firstAuditDetail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.status1, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.status1, '-')}} </el-button>
+            </template>
+          </vxe-column>
+          <vxe-column min-width="120"align="center" title="二级校审" field="status2">
+            <template slot-scope="scope">
+              <el-button  type="text" @click="secondAuditDetail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.status2, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.status2, '-')}} </el-button>
+            </template>
+          </vxe-column>
+          <vxe-column min-width="120"align="center" title="三级校审" field="status3">
+            <template slot-scope="scope">
+              <el-button  type="text" @click="thirdAuditDetail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.status3, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.status3, '-')}} </el-button>
+            </template>
+          </vxe-column>
           <vxe-column  min-width="150px"align="center" title="状态" field="status" >
             <template slot-scope="scope">
               <el-button  type="text" @click="registeredDetail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.status, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.status, '-')}} </el-button>
@@ -124,6 +139,15 @@
               <el-button v-if="hasPermission('program:registered:del')&&scope.row.status === '5' && isAdmin" type="text"  icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
 
               <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status === '5' && commonJS.isEmpty(scope.row.reportNo)" type="text"  icon="el-icon-circle-check" size="small" @click="saveReportNo(scope.row.id)">生成报告号</el-button>
+
+              <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status === '5' && commonJS.isNotEmpty(scope.row.reportNo)&&scope.row.status1 === '0'||scope.row.status1 === '1'||scope.row.status1 === '3'||scope.row.status1 === '4'" type="text"  icon="el-icon-circle-check" size="small" @click="firstAuditPush(scope.row)">一级校审</el-button>
+              <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status1 === '2' && commonJS.isNotEmpty(scope.row.reportNo)" type="text"  icon="el-icon-circle-check" size="small" @click="firstAuditReback(scope.row)">校审撤回</el-button>
+
+              <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status1 === '5'&&scope.row.status2 === '0'||scope.row.status2 === '1'||scope.row.status2 === '3'||scope.row.status2 === '4'" type="text"  icon="el-icon-circle-check" size="small" @click="secondAuditPush(scope.row)">二级校审</el-button>
+              <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status2 === '2'" type="text"  icon="el-icon-circle-check" size="small" @click="secondAuditReback(scope.row)">校审撤回</el-button>
+
+              <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status2 === '5' &&scope.row.status3 === '0'||scope.row.status3 === '1'||scope.row.status3 === '3'||scope.row.status3 === '4'" type="text"  icon="el-icon-circle-check" size="small" @click="thirdAuditPush(scope.row)">三级校审</el-button>
+              <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status3 === '2'" type="text"  icon="el-icon-circle-check" size="small" @click="thirdAuditReback(scope.row)">校审撤回</el-button>
             </template>
           </vxe-column>
         </vxe-table>
@@ -176,7 +200,13 @@
         loading: false,
         processDefinitionAuditId: '',
         procDefAuditKey: '',
-        isAdmin: false
+        isAdmin: false,
+        processDefinitionId1: '',
+        procDefKey1: '',
+        processDefinitionId2: '',
+        procDefKey2: '',
+        processDefinitionId3: '',
+        procDefKey3: ''
       }
     },
     programProjectListInfoService: null,
@@ -207,7 +237,6 @@
       },
       user () {
         this.create = JSON.parse(localStorage.getItem('user')).id
-        console.log('createId', this.create)
         return JSON.parse(localStorage.getItem('user'))
       }
     },
@@ -244,7 +273,24 @@
           if (!this.commonJS.isEmpty(data.id)) {
             this.processDefinitionAuditId = data.id
             this.procDefAuditKey = data.key
-            console.log(this.processDefinitionAuditId)
+          }
+        })
+        this.processService.getByName('项目一级校审').then(({data}) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionId1 = data.id
+            this.procDefKey1 = data.key
+          }
+        })
+        this.processService.getByName('项目二级校审').then(({data}) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionId2 = data.id
+            this.procDefKey2 = data.key
+          }
+        })
+        this.processService.getByName('项目三级校审').then(({data}) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionId3 = data.id
+            this.procDefKey3 = data.key
           }
         })
       },
@@ -342,43 +388,292 @@
       },
       // 查看项目登记审批流程结果
       registeredDetail (row) {
-        // eslint-disable-next-line eqeqeq
-        this.taskService.getTaskDef({
-          procInsId: row.procInsId,
-          procDefId: this.processDefinitionAuditId
-        }).then(({data}) => {
+        if (row.status !== '0' && row.status !== '1') {
+          // eslint-disable-next-line eqeqeq
+          this.taskService.getTaskDef({
+            procInsId: row.procInsId,
+            procDefId: this.processDefinitionAuditId
+          }).then(({data}) => {
+            this.$router.push({
+              path: '/flowable/task/TaskFormDetail',
+              query: {
+                isShow: 'false',
+                readOnly: true,
+                title: '项目登记' + '流程详情',
+                formTitle: '项目登记' + '流程详情',
+                businessId: row.id,
+                status: 'reback',
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
+              }
+            })
+          })
+        }
+      },
+      // 撤回项目登记审批
+      registeredReback (row) {
+        this.$confirm(`确定要撤回该申请吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(async () => {
+          await this.programProjectListInfoService.queryById(row.id).then(({data}) => {
+            if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.err = true
+            }
+          })
+          if (this.err === true) {
+            this.err = ''
+            this.refreshList()
+          } else {
+            this.processService.revokeProcIns(row.procInsId).then(({data}) => {
+              let form = {status: '3', id: row.id}
+              this.programProjectListInfoService.updateStatusById(form)
+              this.$message.success(data)
+              this.refreshList()
+            })
+          }
+        })
+      },
+      // 发起一级校审
+      firstAuditPush (row) {
+        // 读取流程表单
+        let title = `发起流程【项目一级校审】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[项目一级校审]`
+        let status = 'startAndHold'
+        if (row.status1 === '3' || row.status1 === '4') {
+          status = 'startAndClose'
+        }
+        this.taskService.getTaskDef({ procDefId: this.processDefinitionId1,
+          businessId: row.auditId1,
+          businessTable: 'program_audit'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                procDefId: this.processDefinitionId1,
+                procDefKey: this.procDefKey1,
+                title: title,
+                formType: data.data.formType,
+                formUrl: data.data.formUrl,
+                formTitle: processTitle,
+                businessTable: 'program_audit',
+                businessId: row.auditId1,
+                isShow: 'false',
+                status: status,
+                routePath: '/program/registered/ProjectList'
+              }
+            })
+          })
+      },
+      // 查看一级校审审批流程结果
+      firstAuditDetail (row) {
+        if (row.status1 !== '0' && row.status1 !== '1') {
+          // eslint-disable-next-line eqeqeq
+          this.taskService.getTaskDef({
+            procInsId: row.procInsId1,
+            procDefId: this.processDefinitionId1
+          }).then(({data}) => {
+            this.$router.push({
+              path: '/flowable/task/TaskFormDetail',
+              query: {
+                isShow: 'false',
+                readOnly: true,
+                title: '项目登记' + '流程详情',
+                formTitle: '项目登记' + '流程详情',
+                businessId: row.auditId1,
+                status: 'reback',
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
+              }
+            })
+          })
+        }
+      },
+      // 撤回一级校审
+      firstAuditReback (row) {
+        this.$confirm(`确定要撤回该申请吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(async () => {
+          await this.programProjectListInfoService.findByIdAudit(row.auditId1).then(({data}) => {
+            if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.err = true
+            }
+          })
+          if (this.err === true) {
+            this.err = ''
+            this.refreshList()
+          } else {
+            this.processService.revokeProcIns(row.procInsId1).then(({data}) => {
+              let form = {status: '3', id: row.auditId1}
+              this.programProjectListInfoService.updateStatusByAuditId(form)
+              this.$message.success(data)
+              this.refreshList()
+            })
+          }
+        })
+      },
+      // 发起二级校审
+      secondAuditPush (row) {
+        // 读取流程表单
+        let title = `发起流程【项目二级校审】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[项目二级校审]`
+        let status = 'startAndHold'
+        if (row.status2 === '3' || row.status2 === '4') {
+          status = 'startAndClose'
+        }
+        this.taskService.getTaskDef({ procDefId: this.processDefinitionId2,
+          businessId: row.auditId2,
+          businessTable: 'program_audit'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                procDefId: this.processDefinitionId2,
+                procDefKey: this.procDefKey2,
+                title: title,
+                formType: data.data.formType,
+                formUrl: data.data.formUrl,
+                formTitle: processTitle,
+                businessTable: 'program_audit',
+                businessId: row.auditId2,
+                isShow: 'false',
+                status: status,
+                routePath: '/program/registered/ProjectList'
+              }
+            })
+          })
+      },
+      // 查看二级校审审批流程结果
+      secondAuditDetail (row) {
+        if (row.status2 !== '0' && row.status2 !== '1') {
+          // eslint-disable-next-line eqeqeq
+          this.taskService.getTaskDef({
+            procInsId: row.procInsId2,
+            procDefId: this.processDefinitionId2
+          }).then(({data}) => {
+            this.$router.push({
+              path: '/flowable/task/TaskFormDetail',
+              query: {
+                isShow: 'false',
+                readOnly: true,
+                title: '项目登记' + '流程详情',
+                formTitle: '项目登记' + '流程详情',
+                businessId: row.auditId2,
+                status: 'reback',
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
+              }
+            })
+          })
+        }
+      },
+      // 撤回二级校审
+      secondAuditReback (row) {
+        this.$confirm(`确定要撤回该申请吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(async () => {
+          await this.programProjectListInfoService.findByIdAudit(row.auditId2).then(({data}) => {
+            if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.err = true
+            }
+          })
+          if (this.err === true) {
+            this.err = ''
+            this.refreshList()
+          } else {
+            this.processService.revokeProcIns(row.procInsId2).then(({data}) => {
+              let form = {status: '3', id: row.auditId2}
+              this.programProjectListInfoService.updateStatusByAuditId(form)
+              this.$message.success(data)
+              this.refreshList()
+            })
+          }
+        })
+      },
+      // 发起三级校审
+      thirdAuditPush (row) {
+        // 读取流程表单
+        let title = `发起流程【项目三级校审】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[项目三级校审]`
+        let status = 'startAndHold'
+        if (row.status3 === '3' || row.status3 === '4') {
+          status = 'startAndClose'
+        }
+        this.taskService.getTaskDef({ procDefId: this.processDefinitionId3,
+          businessId: row.auditId3,
+          businessTable: 'program_audit'}).then((data) => {
           this.$router.push({
-            path: '/flowable/task/TaskFormDetail',
+            path: '/flowable/task/TaskForm',
             query: {
+              procDefId: this.processDefinitionId3,
+              procDefKey: this.procDefKey3,
+              title: title,
+              formType: data.data.formType,
+              formUrl: data.data.formUrl,
+              formTitle: processTitle,
+              businessTable: 'program_audit',
+              businessId: row.auditId3,
               isShow: 'false',
-              readOnly: true,
-              title: '项目登记' + '流程详情',
-              formTitle: '项目登记' + '流程详情',
-              businessId: row.id,
-              status: 'reback',
-              ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
+              status: status,
+              routePath: '/program/registered/ProjectList'
             }
           })
         })
       },
-      // 撤回项目登记审批
-      registeredReback (row) {
+      // 查看三级校审审批流程结果
+      thirdAuditDetail (row) {
+        if (row.status3 !== '0' && row.status3 !== '1') {
+          // eslint-disable-next-line eqeqeq
+          this.taskService.getTaskDef({
+            procInsId: row.procInsId3,
+            procDefId: this.processDefinitionId3
+          }).then(({data}) => {
+            this.$router.push({
+              path: '/flowable/task/TaskFormDetail',
+              query: {
+                isShow: 'false',
+                readOnly: true,
+                title: '项目登记' + '流程详情',
+                formTitle: '项目登记' + '流程详情',
+                businessId: row.auditId3,
+                status: 'reback',
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
+              }
+            })
+          })
+        }
+      },
+      // 撤回三级校审
+      thirdAuditReback (row) {
         this.$confirm(`确定要撤回该申请吗?`, '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'
-        }).then(() => {
-          this.processService.revokeProcIns(row.procInsId).then(({data}) => {
-            let form = {status: '3', id: row.id}
-            this.programProjectListInfoService.updateStatusById(form)
-            this.$message.success(data)
-            this.refreshList()
+        }).then(async () => {
+          await this.programProjectListInfoService.findByIdAudit(row.auditId3).then(({data}) => {
+            if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.err = true
+            }
           })
+          if (this.err === true) {
+            this.err = ''
+            this.refreshList()
+          } else {
+            this.processService.revokeProcIns(row.procInsId3).then(({data}) => {
+              let form = {status: '3', id: row.auditId3}
+              this.programProjectListInfoService.updateStatusByAuditId(form)
+              this.$message.success(data)
+              this.refreshList()
+            })
+          }
         })
       },
       is () {
         this.userService.is().then(({data}) => {
-          console.log('isAdmin', data)
           this.isAdmin = data
         })
       },

+ 429 - 0
src/views/modules/program/registered/ProjectThreeAuditForm.vue

@@ -0,0 +1,429 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+  <div>
+    <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="formReadOnly"
+             label-width="125px" @submit.native.prevent>
+      <el-row  :gutter="15">
+        <el-col :span="12">
+          <el-form-item label="项目名称" prop="programProjectListInfo.name"
+          >
+            <el-input size="medium" :disabled="true" v-model="inputForm.programProjectListInfo.name" placeholder="请输入项目名称" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="评估基准日" prop="programProjectListInfo.assessmentDate"
+          >
+            <el-date-picker
+              :disabled="true"
+              v-model="inputForm.programProjectListInfo.assessmentDate"
+              type="date"
+              value-format="yyyy-MM-dd"
+              placeholder="选择评估基准日"
+              style="width:100%"
+              placement="bottom-start"
+              clearable>
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="专业评估人员" prop="auditPeopleList"
+                          :rules="[{required: true, message: '专业评估人员不能为空', trigger: 'blur'},{required: true, message: '专业评估人员不能为空', trigger: 'change'}]"
+            >
+              <UserSelect size="medium" :disabled="formReadOnly" :readonly="true" :limit='10' :value="inputForm.auditPeopleList" @getValue='(value) => {inputForm.auditPeopleList = value}'></UserSelect>
+            </el-form-item>
+          </el-col>
+        <el-col :span="12">
+          <el-form-item label="项目负责人" prop="programProjectListInfo.projectManager"
+          >
+            <SelectUserTree
+              ref="companyTree"
+              size="medium"
+              :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+              :url="`/sys/user/treeUserDataAllOffice?type=2`"
+              :value="inputForm.programProjectListInfo.projectManager"
+              :disabled="true"
+              :clearable="true"
+              :accordion="true"
+              @getValue="(value) => {inputForm.programProjectListInfo.projectManager=value}"/>
+          </el-form-item>
+        </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="选择项目审核人" prop="auditPeople"
+                          :rules="[{required: true, message: '审批人不能为空', trigger: 'blur'},{required: true, message: '审批人不能为空', trigger: 'change'}]"
+            >
+              <UserSelect size="medium" :disabled="formReadOnly" :readonly="true" :limit='1' :value="inputForm.auditPeople" @getValue='(value) => {inputForm.auditPeople = value}'></UserSelect>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-divider content-position="left"><i class="el-icon-document"></i> 审核意见及回复</el-divider>
+        <el-row>
+        <el-col :span="24">
+          <el-form-item label="明细表" prop="detailOpinion"
+                        >
+<!--            <el-input type="textarea" style="width:100%" maxlength="1000" v-model="inputForm.detailOpinion" placeholder="请填写明细表"     ></el-input>-->
+            <WangEditor :disabled="true" ref="contents1Editor" v-model="inputForm.detailOpinion"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="评估报告" prop="reportOpinion"
+          >
+<!--            <el-input type="textarea" style="width:100%" maxlength="1000" v-model="inputForm.reportOpinion" placeholder="请填写评估报告"     ></el-input>-->
+            <WangEditor :disabled="formReadOnly" ref="contents2Editor" v-model="inputForm.reportOpinion"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="技术说明" prop="remarksOpinion"
+          >
+<!--            <el-input type="textarea" style="width:100%" maxlength="1000" v-model="inputForm.remarksOpinion" placeholder="请填写技术说明"     ></el-input>-->
+            <WangEditor :disabled="formReadOnly" ref="contents3Editor" v-model="inputForm.remarksOpinion"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="工作底稿" prop="workOpinion"
+          >
+<!--            <el-input type="textarea" style="width:100%" maxlength="1000" v-model="inputForm.workOpinion" placeholder="请填写工作底稿"     ></el-input>-->
+            <WangEditor :disabled="formReadOnly" ref="contents4Editor" v-model="inputForm.workOpinion"/>
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+    </el-form>
+    <!--        附件-->
+    <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+  </div>
+</template>
+
+<script>
+  import UpLoadComponent from '@/views/common/UpLoadComponent'
+  import UserSelect from '@/components/userSelect'
+  import SelectUserTree from '@/views/modules/utils/treeUserSelect'
+  import RosterSelectForm from '@/views/common/RosterSelectForm'
+  import ProgramProjectListInfoService from '@/api/program/ProgramProjectListInfoService'
+  import WangEditor from '@/components/editor/WangEditor'
+  export default {
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      formReadOnly: {
+        type: Boolean,
+        default: false
+      }
+    },
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+          id: '',
+          remarks: '',
+          programId: '',
+          auditLevel: '',
+          auditPeople: '',
+          auditDate: '',
+          retainOpinion: '',
+          changeOpinion: '',
+          detailOpinion: '',
+          reportOpinion: '',
+          remarksOpinion: '',
+          workOpinion: '',
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          programProjectListInfo: {},
+          programAuditAssessPeopleDtoList: [],
+          workAttachmentDtoList: [],
+          auditPeopleList: ''
+        },
+        programId: '',
+        supervisorList: [],
+        keyWatch: ''
+      }
+    },
+    programProjectListInfoService: null,
+    created () {
+      this.programProjectListInfoService = new ProgramProjectListInfoService()
+    },
+    computed: {
+      bus: {
+        get () {
+          this.$refs.uploadComponent.setDividerName('附件')
+          return this.businessId
+        },
+        set (val) {
+          this.businessId = val
+        }
+      }
+    },
+    watch: {
+      'keyWatch': {
+        handler (newVal) {
+          if (this.bus) {
+            if (this.bus !== 'false') {
+              this.init('', this.bus)
+            }
+          } else {
+            this.$nextTick(() => {
+              this.$refs.inputForm.resetFields()
+            })
+          }
+        }
+      }
+    },
+    components: {
+      UpLoadComponent,
+      RosterSelectForm,
+      UserSelect,
+      WangEditor,
+      SelectUserTree
+    },
+    methods: {
+      disclick () {
+        this.$refs.contents1Editor.disabledclick()
+      },
+      getKeyWatch (keyWatch) {
+        this.keyWatch = keyWatch
+      },
+      init (method, id) {
+        this.method = method
+        this.inputForm = {
+          id: '',
+          remarks: '',
+          programId: '',
+          auditLevel: '',
+          auditPeople: '',
+          auditDate: '',
+          retainOpinion: '',
+          changeOpinion: '',
+          detailOpinion: '',
+          reportOpinion: '',
+          remarksOpinion: '',
+          workOpinion: '',
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          programProjectListInfo: {},
+          programAuditAssessPeopleDtoList: [],
+          workAttachmentDtoList: [],
+          auditPeopleList: ''
+        }
+        this.inputForm.id = id
+        this.visible = true
+        this.loading = false
+        this.$nextTick(() => {
+          this.$refs.inputForm.resetFields()
+          this.loading = true
+          this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then(({data}) => {
+            this.$refs.uploadComponent.clearUpload()
+            this.inputForm = this.recover(this.inputForm, data)
+            this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+            if (this.commonJS.isNotEmpty(this.inputForm.detailOpinion)) {
+              this.$refs.contents1Editor.init(this.inputForm.detailOpinion)
+            }
+            if (this.commonJS.isNotEmpty(this.inputForm.reportOpinion)) {
+              this.$refs.contents2Editor.init(this.inputForm.reportOpinion)
+            }
+            if (this.commonJS.isNotEmpty(this.inputForm.remarksOpinion)) {
+              this.$refs.contents3Editor.init(this.inputForm.remarksOpinion)
+            }
+            if (this.commonJS.isNotEmpty(this.inputForm.workOpinion)) {
+              this.$refs.contents4Editor.init(this.inputForm.workOpinion)
+            }
+            // if (this.formReadOnly === true) {
+            //   method = 'view'
+            // }
+            if (this.commonJS.isEmpty(this.inputForm.workAttachmentDtoList)) {
+              this.inputForm.workAttachmentDtoList = []
+            }
+            if (this.commonJS.isNotEmpty(this.inputForm.programAuditAssessPeopleDtoList)) {
+              let p = ''
+              this.inputForm.programAuditAssessPeopleDtoList.forEach((item, index) => {
+                if (this.inputForm.programAuditAssessPeopleDtoList.length === parseInt(parseInt(index) + parseInt(1))) {
+                  p = p + item.assessPeople
+                } else {
+                  p = p + item.assessPeople + ','
+                }
+              })
+              this.inputForm.auditPeopleList = p
+            } else {
+              this.inputForm.auditPeopleList = ''
+            }
+            this.$refs.uploadComponent.newUpload(method, this.inputForm.workAttachmentDtoList, 'program_audit_first')
+            this.loading = false
+          })
+        })
+      },
+      saveForm (callback) {
+        this.doSubmit('save', callback)
+      },
+      startForm (callback) {
+        this.doSubmit('start', callback)
+      },
+      async agreeForm (callback) {
+        await this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then(({data}) => {
+          if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            this.err = true
+          }
+        })
+        if (this.err === true) {
+          this.err = ''
+          throw new Error()
+        } else {
+          await this.doSubmit('agree', callback)
+        }
+      },
+      // 表单提交
+      async doSubmit (status, callback) {
+        if (await this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        }
+        if (status === 'save') {
+          // 暂存
+          this.loading = true
+          this.inputForm.status = '1'
+          this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+          if (this.commonJS.isNotEmpty(this.inputForm.auditPeopleList)) {
+            this.inputForm.programAuditAssessPeopleDtoList = []
+            this.inputForm.auditPeopleList.split(',').forEach(item => {
+              let i = {assessPeople: item, auditId: this.inputForm.id}
+              this.inputForm.programAuditAssessPeopleDtoList.push(i)
+            })
+          } else {
+            this.inputForm.programAuditAssessPeopleDtoList = []
+          }
+          this.programProjectListInfoService.saveFormThree(this.inputForm).then(({data}) => {
+            this.inputForm.assignee = this.inputForm.auditPeople
+            callback(data.businessTable, data.businessId, this.inputForm)
+            this.loading = false
+          }).catch(() => {
+            this.loading = false
+          })
+          return
+        } else if (status === 'start') {
+          // 送审  待审核
+          this.inputForm.status = '2'
+        } else if (status === 'agree') {
+          // 审核同意
+          this.inputForm.status = '5'
+          this.inputForm.auditDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+        }
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.commonJS.isNotEmpty(this.inputForm.auditPeopleList)) {
+              this.inputForm.programAuditAssessPeopleDtoList = []
+              this.inputForm.auditPeopleList.split(',').forEach(item => {
+                let i = {assessPeople: item, auditId: this.inputForm.id}
+                this.inputForm.programAuditAssessPeopleDtoList.push(i)
+              })
+            } else {
+              this.inputForm.programAuditAssessPeopleDtoList = []
+            }
+            this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+            this.programProjectListInfoService.saveFormThree(this.inputForm).then(({data}) => {
+              this.inputForm.assignee = this.inputForm.auditPeople
+              callback(data.businessTable, data.businessId, this.inputForm)
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      },
+      async updateStatusById (type) {
+        if (await this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        }
+        await this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then(({data}) => {
+          if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            this.err = true
+          }
+        })
+        if (this.err === true) {
+          this.err = ''
+          throw new Error()
+        } else {
+          // if (type === 'agree') {
+          //   // 同意
+          //   this.inputForm.status = '5'
+          // }
+          if (type === 'reject') {
+            // 驳回
+            this.inputForm.status = '4'
+            this.loading = true
+            this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+            if (this.commonJS.isNotEmpty(this.inputForm.auditPeopleList)) {
+              this.inputForm.programAuditAssessPeopleDtoList = []
+              this.inputForm.auditPeopleList.split(',').forEach(item => {
+                let i = {assessPeople: item, auditId: this.inputForm.id}
+                this.inputForm.programAuditAssessPeopleDtoList.push(i)
+              })
+            } else {
+              this.inputForm.programAuditAssessPeopleDtoList = []
+            }
+            this.programProjectListInfoService.saveFormThree(this.inputForm).then(({data}) => {
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+            return
+          }
+          if (type === 'reback') {
+            // 撤回
+            this.inputForm.status = '3'
+          }
+          if (type === 'reback') {
+            let param = {status: this.inputForm.status, id: this.inputForm.id}
+            this.programProjectListInfoService.updateStatusByAuditId(param)
+          }
+        }
+      },
+      close () {
+        this.$refs.uploadComponent.clearUpload()
+        this.inputForm = {
+          id: '',
+          remarks: '',
+          programId: '',
+          auditLevel: '',
+          auditPeople: '',
+          auditDate: '',
+          retainOpinion: '',
+          changeOpinion: '',
+          detailOpinion: '',
+          reportOpinion: '',
+          remarksOpinion: '',
+          workOpinion: '',
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          programProjectListInfo: {},
+          programAuditAssessPeopleDtoList: [],
+          workAttachmentDtoList: []
+        }
+        this.$refs.inputForm.resetFields()
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .w-e-text-container {
+    z-index: 1 !important;
+  }
+  /deep/ .wtext {
+    height: 200px
+  }
+</style>

+ 429 - 0
src/views/modules/program/registered/ProjectThreeAuditFormSecond.vue

@@ -0,0 +1,429 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+  <div>
+    <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="formReadOnly"
+             label-width="125px" @submit.native.prevent>
+      <el-row  :gutter="15">
+        <el-col :span="12">
+          <el-form-item label="项目名称" prop="programProjectListInfo.name"
+          >
+            <el-input size="medium" :disabled="true" v-model="inputForm.programProjectListInfo.name" placeholder="请输入项目名称" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="评估基准日" prop="programProjectListInfo.assessmentDate"
+          >
+            <el-date-picker
+              :disabled="true"
+              v-model="inputForm.programProjectListInfo.assessmentDate"
+              type="date"
+              value-format="yyyy-MM-dd"
+              placeholder="选择评估基准日"
+              style="width:100%"
+              placement="bottom-start"
+              clearable>
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="专业评估人员" prop="auditPeopleList"
+                          :rules="[{required: true, message: '专业评估人员不能为空', trigger: 'blur'},{required: true, message: '专业评估人员不能为空', trigger: 'change'}]"
+            >
+              <UserSelect size="medium" :disabled="formReadOnly" :readonly="true" :limit='10' :value="inputForm.auditPeopleList" @getValue='(value) => {inputForm.auditPeopleList = value}'></UserSelect>
+            </el-form-item>
+          </el-col>
+        <el-col :span="12">
+          <el-form-item label="项目负责人" prop="programProjectListInfo.projectManager"
+          >
+            <SelectUserTree
+              ref="companyTree"
+              size="medium"
+              :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+              :url="`/sys/user/treeUserDataAllOffice?type=2`"
+              :value="inputForm.programProjectListInfo.projectManager"
+              :disabled="true"
+              :clearable="true"
+              :accordion="true"
+              @getValue="(value) => {inputForm.programProjectListInfo.projectManager=value}"/>
+          </el-form-item>
+        </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="选择项目审核人" prop="auditPeople"
+                          :rules="[{required: true, message: '审批人不能为空', trigger: 'blur'},{required: true, message: '审批人不能为空', trigger: 'change'}]"
+            >
+              <UserSelect size="medium" :disabled="formReadOnly" :readonly="true" :limit='1' :value="inputForm.auditPeople" @getValue='(value) => {inputForm.auditPeople = value}'></UserSelect>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-divider content-position="left"><i class="el-icon-document"></i> 审核意见及回复</el-divider>
+        <el-row>
+        <el-col :span="24">
+          <el-form-item label="明细表" prop="detailOpinion"
+                        >
+<!--            <el-input type="textarea" style="width:100%" maxlength="1000" v-model="inputForm.detailOpinion" placeholder="请填写明细表"     ></el-input>-->
+            <WangEditor :disabled="true" ref="contents1Editor" v-model="inputForm.detailOpinion"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="评估报告" prop="reportOpinion"
+          >
+<!--            <el-input type="textarea" style="width:100%" maxlength="1000" v-model="inputForm.reportOpinion" placeholder="请填写评估报告"     ></el-input>-->
+            <WangEditor :disabled="formReadOnly" ref="contents2Editor" v-model="inputForm.reportOpinion"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="技术说明" prop="remarksOpinion"
+          >
+<!--            <el-input type="textarea" style="width:100%" maxlength="1000" v-model="inputForm.remarksOpinion" placeholder="请填写技术说明"     ></el-input>-->
+            <WangEditor :disabled="formReadOnly" ref="contents3Editor" v-model="inputForm.remarksOpinion"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="工作底稿" prop="workOpinion"
+          >
+<!--            <el-input type="textarea" style="width:100%" maxlength="1000" v-model="inputForm.workOpinion" placeholder="请填写工作底稿"     ></el-input>-->
+            <WangEditor :disabled="formReadOnly" ref="contents4Editor" v-model="inputForm.workOpinion"/>
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+    </el-form>
+    <!--        附件-->
+    <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+  </div>
+</template>
+
+<script>
+  import UpLoadComponent from '@/views/common/UpLoadComponent'
+  import UserSelect from '@/components/userSelect'
+  import SelectUserTree from '@/views/modules/utils/treeUserSelect'
+  import RosterSelectForm from '@/views/common/RosterSelectForm'
+  import ProgramProjectListInfoService from '@/api/program/ProgramProjectListInfoService'
+  import WangEditor from '@/components/editor/WangEditor'
+  export default {
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      formReadOnly: {
+        type: Boolean,
+        default: false
+      }
+    },
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+          id: '',
+          remarks: '',
+          programId: '',
+          auditLevel: '',
+          auditPeople: '',
+          auditDate: '',
+          retainOpinion: '',
+          changeOpinion: '',
+          detailOpinion: '',
+          reportOpinion: '',
+          remarksOpinion: '',
+          workOpinion: '',
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          programProjectListInfo: {},
+          programAuditAssessPeopleDtoList: [],
+          workAttachmentDtoList: [],
+          auditPeopleList: ''
+        },
+        programId: '',
+        supervisorList: [],
+        keyWatch: ''
+      }
+    },
+    programProjectListInfoService: null,
+    created () {
+      this.programProjectListInfoService = new ProgramProjectListInfoService()
+    },
+    computed: {
+      bus: {
+        get () {
+          this.$refs.uploadComponent.setDividerName('附件')
+          return this.businessId
+        },
+        set (val) {
+          this.businessId = val
+        }
+      }
+    },
+    watch: {
+      'keyWatch': {
+        handler (newVal) {
+          if (this.bus) {
+            if (this.bus !== 'false') {
+              this.init('', this.bus)
+            }
+          } else {
+            this.$nextTick(() => {
+              this.$refs.inputForm.resetFields()
+            })
+          }
+        }
+      }
+    },
+    components: {
+      UpLoadComponent,
+      RosterSelectForm,
+      UserSelect,
+      WangEditor,
+      SelectUserTree
+    },
+    methods: {
+      disclick () {
+        this.$refs.contents1Editor.disabledclick()
+      },
+      getKeyWatch (keyWatch) {
+        this.keyWatch = keyWatch
+      },
+      init (method, id) {
+        this.method = method
+        this.inputForm = {
+          id: '',
+          remarks: '',
+          programId: '',
+          auditLevel: '',
+          auditPeople: '',
+          auditDate: '',
+          retainOpinion: '',
+          changeOpinion: '',
+          detailOpinion: '',
+          reportOpinion: '',
+          remarksOpinion: '',
+          workOpinion: '',
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          programProjectListInfo: {},
+          programAuditAssessPeopleDtoList: [],
+          workAttachmentDtoList: [],
+          auditPeopleList: ''
+        }
+        this.inputForm.id = id
+        this.visible = true
+        this.loading = false
+        this.$nextTick(() => {
+          this.$refs.inputForm.resetFields()
+          this.loading = true
+          this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then(({data}) => {
+            this.$refs.uploadComponent.clearUpload()
+            this.inputForm = this.recover(this.inputForm, data)
+            this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+            if (this.commonJS.isNotEmpty(this.inputForm.detailOpinion)) {
+              this.$refs.contents1Editor.init(this.inputForm.detailOpinion)
+            }
+            if (this.commonJS.isNotEmpty(this.inputForm.reportOpinion)) {
+              this.$refs.contents2Editor.init(this.inputForm.reportOpinion)
+            }
+            if (this.commonJS.isNotEmpty(this.inputForm.remarksOpinion)) {
+              this.$refs.contents3Editor.init(this.inputForm.remarksOpinion)
+            }
+            if (this.commonJS.isNotEmpty(this.inputForm.workOpinion)) {
+              this.$refs.contents4Editor.init(this.inputForm.workOpinion)
+            }
+            // if (this.formReadOnly === true) {
+            //   method = 'view'
+            // }
+            if (this.commonJS.isEmpty(this.inputForm.workAttachmentDtoList)) {
+              this.inputForm.workAttachmentDtoList = []
+            }
+            if (this.commonJS.isNotEmpty(this.inputForm.programAuditAssessPeopleDtoList)) {
+              let p = ''
+              this.inputForm.programAuditAssessPeopleDtoList.forEach((item, index) => {
+                if (this.inputForm.programAuditAssessPeopleDtoList.length === parseInt(parseInt(index) + parseInt(1))) {
+                  p = p + item.assessPeople
+                } else {
+                  p = p + item.assessPeople + ','
+                }
+              })
+              this.inputForm.auditPeopleList = p
+            } else {
+              this.inputForm.auditPeopleList = ''
+            }
+            this.$refs.uploadComponent.newUpload(method, this.inputForm.workAttachmentDtoList, 'program_audit_second')
+            this.loading = false
+          })
+        })
+      },
+      saveForm (callback) {
+        this.doSubmit('save', callback)
+      },
+      startForm (callback) {
+        this.doSubmit('start', callback)
+      },
+      async agreeForm (callback) {
+        await this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then(({data}) => {
+          if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            this.err = true
+          }
+        })
+        if (this.err === true) {
+          this.err = ''
+          throw new Error()
+        } else {
+          await this.doSubmit('agree', callback)
+        }
+      },
+      // 表单提交
+      async doSubmit (status, callback) {
+        if (await this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        }
+        if (status === 'save') {
+          // 暂存
+          this.loading = true
+          this.inputForm.status = '1'
+          this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+          if (this.commonJS.isNotEmpty(this.inputForm.auditPeopleList)) {
+            this.inputForm.programAuditAssessPeopleDtoList = []
+            this.inputForm.auditPeopleList.split(',').forEach(item => {
+              let i = {assessPeople: item, auditId: this.inputForm.id}
+              this.inputForm.programAuditAssessPeopleDtoList.push(i)
+            })
+          } else {
+            this.inputForm.programAuditAssessPeopleDtoList = []
+          }
+          this.programProjectListInfoService.saveFormThree(this.inputForm).then(({data}) => {
+            this.inputForm.assignee = this.inputForm.auditPeople
+            callback(data.businessTable, data.businessId, this.inputForm)
+            this.loading = false
+          }).catch(() => {
+            this.loading = false
+          })
+          return
+        } else if (status === 'start') {
+          // 送审  待审核
+          this.inputForm.status = '2'
+        } else if (status === 'agree') {
+          // 审核同意
+          this.inputForm.status = '5'
+          this.inputForm.auditDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+        }
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.commonJS.isNotEmpty(this.inputForm.auditPeopleList)) {
+              this.inputForm.programAuditAssessPeopleDtoList = []
+              this.inputForm.auditPeopleList.split(',').forEach(item => {
+                let i = {assessPeople: item, auditId: this.inputForm.id}
+                this.inputForm.programAuditAssessPeopleDtoList.push(i)
+              })
+            } else {
+              this.inputForm.programAuditAssessPeopleDtoList = []
+            }
+            this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+            this.programProjectListInfoService.saveFormThree(this.inputForm).then(({data}) => {
+              this.inputForm.assignee = this.inputForm.auditPeople
+              callback(data.businessTable, data.businessId, this.inputForm)
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      },
+      async updateStatusById (type) {
+        if (await this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        }
+        await this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then(({data}) => {
+          if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            this.err = true
+          }
+        })
+        if (this.err === true) {
+          this.err = ''
+          throw new Error()
+        } else {
+          // if (type === 'agree') {
+          //   // 同意
+          //   this.inputForm.status = '5'
+          // }
+          if (type === 'reject') {
+            // 驳回
+            this.inputForm.status = '4'
+            this.loading = true
+            this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+            if (this.commonJS.isNotEmpty(this.inputForm.auditPeopleList)) {
+              this.inputForm.programAuditAssessPeopleDtoList = []
+              this.inputForm.auditPeopleList.split(',').forEach(item => {
+                let i = {assessPeople: item, auditId: this.inputForm.id}
+                this.inputForm.programAuditAssessPeopleDtoList.push(i)
+              })
+            } else {
+              this.inputForm.programAuditAssessPeopleDtoList = []
+            }
+            this.programProjectListInfoService.saveFormThree(this.inputForm).then(({data}) => {
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+            return
+          }
+          if (type === 'reback') {
+            // 撤回
+            this.inputForm.status = '3'
+          }
+          if (type === 'reback') {
+            let param = {status: this.inputForm.status, id: this.inputForm.id}
+            this.programProjectListInfoService.updateStatusByAuditId(param)
+          }
+        }
+      },
+      close () {
+        this.$refs.uploadComponent.clearUpload()
+        this.inputForm = {
+          id: '',
+          remarks: '',
+          programId: '',
+          auditLevel: '',
+          auditPeople: '',
+          auditDate: '',
+          retainOpinion: '',
+          changeOpinion: '',
+          detailOpinion: '',
+          reportOpinion: '',
+          remarksOpinion: '',
+          workOpinion: '',
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          programProjectListInfo: {},
+          programAuditAssessPeopleDtoList: [],
+          workAttachmentDtoList: []
+        }
+        this.$refs.inputForm.resetFields()
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .w-e-text-container {
+    z-index: 1 !important;
+  }
+  /deep/ .wtext {
+    height: 200px
+  }
+</style>

+ 22 - 27
src/views/modules/program/registered/RegisItemForm.vue

@@ -754,7 +754,8 @@
         clientTypes: [
           {value: 1, label: '委托人'},
           {value: 2, label: '项目对接人'}
-        ]
+        ],
+        keyWatch: ''
       }
     },
     programTypeDictService: null,
@@ -765,21 +766,30 @@
       this.getTypeList()
       this.inputForm.company = '江苏兴光资产评估有限公司'
     },
+    computed: {
+      bus: {
+        get () {
+          this.$refs.uploadComponent.setDividerName('附件')
+          return this.businessId
+        },
+        set (val) {
+          this.businessId = val
+        }
+      }
+    },
     watch: {
-      'businessId': {
+      'keyWatch': {
         handler (newVal) {
-          if (this.businessId) {
-            if (this.businessId !== 'false') {
-              this.init('', this.businessId)
+          if (this.bus) {
+            if (this.bus !== 'false') {
+              this.init('', this.bus)
             }
           } else {
             this.$nextTick(() => {
               this.$refs.inputForm.resetFields()
             })
           }
-        },
-        immediate: true,
-        deep: false
+        }
       }
     },
     components: {
@@ -791,6 +801,9 @@
       SelectTree
     },
     methods: {
+      getKeyWatch (keyWatch) {
+        this.keyWatch = keyWatch
+      },
       init (method, id) {
         this.programProjectListInfoService = new ProgramProjectListInfoService()
         this.programTypeDictService = new ProgramTypeDictService()
@@ -967,27 +980,9 @@
             this.inputForm.links.push(item)
           })
         } else {
-          this.$message.error('至少填写一条项目直接对接人信息')
-          return
-        }
-        if (!this.commonJS.isEmpty(this.inputForm.equityList)) {
-          this.inputForm.equityList.forEach(item => {
-            item.type = '2'
-            this.inputForm.links.push(item)
-          })
-        } else {
-          this.$message.error('至少填写一条产权持有人联系人信息')
+          this.$message.error('至少填写一条委托人和对接人信息')
           return
         }
-        // if (!this.commonJS.isEmpty(this.inputForm.contactList)) {
-        //   this.inputForm.contactList.forEach(item => {
-        //     item.type = '3'
-        // this.inputForm.links.push(item)
-        //   })
-        // } else {
-        //   this.$message.error('至少填写一条被评估企业对接联系人信息')
-        //   return
-        // }
         if (this.commonJS.isEmpty(this.inputForm.members)) {
           this.$message.error('至少填写一条项目组成员信息')
           return