lizhenhao пре 2 година
родитељ
комит
152f16647b

+ 53 - 0
src/api/cw/projectRecords/ProjectReportArchiveService.js

@@ -0,0 +1,53 @@
+import request from '@/utils/httpRequest'
+
+export default class ProjectReportArchiveService {
+  list (params) {
+    return request({
+      url: '/cwProjectReportArchive/list',
+      method: 'get',
+      params: params
+    })
+  }
+  reportList (params) {
+    return request({
+      url: '/cwProjectReportArchive/reportList',
+      method: 'get',
+      params: params
+    })
+  }
+  queryById (id) {
+    return request({
+      url: '/cwProjectReportArchive/queryById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  save (inputForm) {
+    return request({
+      url: `/cwProjectReportArchive/save`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+  saveForm (inputForm) {
+    return request({
+      url: `/cwProjectReportArchive/saveForm`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+  delete (ids) {
+    return request({
+      url: '/cwProjectReportArchive/delete',
+      method: 'delete',
+      params: {ids: ids}
+    })
+  }
+  updateStatusById (data) {
+    return request({
+      url: '/cwProjectReportArchive/updateStatusById',
+      method: 'post',
+      data: data
+    })
+  }
+}

+ 13 - 12
src/api/sys/OSSService.js

@@ -79,12 +79,12 @@ export const headers = {
 }
 
 export function onChange (file, files) {
-  console.log(file, 'file', files, 'Filest')
+  // console.log(file, 'file', files, 'Filest')
   return files
 }
 
 export function handleUploadSuccess (response, file, fileS) {
-  console.log(response, file, fileS, 'response, file, fileList')
+  // console.log(response, file, fileS, 'response, file, fileList')
 }
 
 export function handleRemove (e, files) {
@@ -92,7 +92,7 @@ export function handleRemove (e, files) {
 }
 
 export function fileName (file) {
-  console.log('文件名称处理')
+  // console.log('文件名称处理')
   const tmpcnt = file.file.name.lastIndexOf('.')
   let fileName = file.file.name.substring(0, tmpcnt)
   // 将单引号‘’都转换成',将双引号“”都转换成"
@@ -111,7 +111,7 @@ export function fileName (file) {
   fileName = fileName.replace(/Π/g, '')
   fileName = fileName.replace(/π/g, '')
   fileName = fileName.replace(/·/g, '.')
-  console.log('文件名处理结果', fileName)
+  // console.log('文件名处理结果', fileName)
   return fileName
 }
 
@@ -120,13 +120,13 @@ export function beforeAvatarUpload (file, fileList, maxValue) {
   const isLt2M = file.size / 1024 / 1024 < maxValue
   if (!isLt2M) {
     fileList.splice(fileList.length - 1, 1)
-    console.log('文件大小不能超过 ' + maxValue + ' MB!')
+    // console.log('文件大小不能超过 ' + maxValue + ' MB!')
   }
   return isLt2M
 }
 
 export function exnameFix (file, isShow, names) {
-  console.log('格式校验')
+  // console.log('格式校验')
   const tmpcnt = file.name.lastIndexOf('.')
   const exname = file.name.substring(tmpcnt + 1) // 获取后缀名
   if (names.indexOf(exname) < 0) {
@@ -142,19 +142,19 @@ export async function httpRequest (file, name, type, maxValue) { // 阿里云OSS
   if (!beforeAvatarUpload(file.file, [], maxValue)) {
     return
   }
-  console.log('开始上传')
+  // console.log('开始上传')
   // 判断扩展名
   const tmpcnt = file.file.name.lastIndexOf('.') // 获取.的下标
   const exname = file.file.name.substring(tmpcnt + 1) // 获取后缀名
-  console.log(exname, '后缀名')
+  // console.log(exname, '后缀名')
   const now = new Date()
   const year = now.getFullYear()
   const month = now.getMonth() + 1
   const day = now.getDate() > 10 ? now.getDate() : '0' + now.getDate()
   const filePath = '/attachment-file/assess/' + type + '/' + year + '/' + month + '/' + day + '/' + now.getTime()
-  console.log(filePath, '文件存储路径')
+  // console.log(filePath, '文件存储路径')
   const fileName = filePath + name + '.' + exname
-  console.log(fileName, '文件名')
+  // console.log(fileName, '文件名')
 
   await client.multipartUpload(fileName, file.file, {
     progress: await function (p, checkpoint) {
@@ -162,13 +162,14 @@ export async function httpRequest (file, name, type, maxValue) { // 阿里云OSS
     }
     // mime: type,
   }).then(await function (result) {
-    console.log(result)
+    // console.log(result)
     if (result.res.status === 200) {
       // file.onSuccess(result) // 触发el-upload组件的onSuccess方法
       file.file.url = fileName
     }
+    // eslint-disable-next-line handle-callback-err
   }).catch(function (err) {
-    console.log(err)
+    // console.log(err)
     file.onError('上传失败') // 触发el-upload组件的onError方法,此方法会移除文件列表
   })
 }

+ 3 - 3
src/views/common/UpLoadComponentV2.vue

@@ -164,7 +164,7 @@
             {
               attrs: {
                 placeholder: '请选择',
-                value: this.fileType,
+                value: this.$dictUtils.getDictLabel('cw_project_report_file_type', this.fileType, ''),
                 size: 'small',
                 clearable: true
               },
@@ -215,7 +215,7 @@
             {
               attrs: {
                 placeholder: '请选择',
-                value: this.sealType,
+                value: this.$dictUtils.getDictLabel('cw_seal_type', this.sealType, ''),
                 size: 'small',
                 clearable: true
               },
@@ -228,7 +228,7 @@
                       this.sealType = value
                       this.$emit('updateSealType', value)
                     } else {
-                      this.$message.error('此文件不允许盖章类型为“电子章”')
+                      this.$message.error('只有“pdf、doc、docx”格式文件的盖章类型可以是“电子章”')
                       this.sealType = ''
                       this.$emit('updateSealType', '')
                     }

+ 2 - 2
src/views/common/UpLoadComponentV3.vue

@@ -152,11 +152,11 @@
             {
               attrs: {
                 placeholder: '请选择',
-                value: this.fileType,
+                value: this.$dictUtils.getDictLabel('cw_project_report_archive_file_type', this.fileType, ''),
                 size: 'small',
                 clearable: true
               },
-              props: ['value'],
+              props: ['options', 'value'],
               on: {
                 change: (value) => {
                   this.fileType = value

+ 2 - 1
src/views/modules/cw/projectRecords/ProjectRecordsChooseCom.vue

@@ -11,7 +11,7 @@
       @keyup.enter.native=""
       :visible.sync="visible">
       <div style="height: calc(100% - 80px);">
-        <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+        <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
           <!-- 搜索框-->
           <el-form-item label="项目名称" prop="projectName">
             <el-input size="small" v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
@@ -164,6 +164,7 @@
         this.list()
       },
       close () {
+        this.$refs.searchForm.resetFields()
         this.visible = false
       }
     }

+ 1 - 2
src/views/modules/cw/projectRecords/ProjectRecordsForm.vue

@@ -387,7 +387,6 @@
         }
         this.activeName = 'client'
         this.projectRecordsService = new ProjectRecordsService()
-        this.method = method
         this.inputForm = {
           id: '',
           createDate: '',
@@ -466,7 +465,7 @@
       },
       async agreeForm (callback) {
         await this.projectRecordsService.queryById(this.inputForm.id).then(({data}) => {
-          if (this.inputForm.status !== '2') { // 审核状态不是“待审核”,就弹出提示
+          if (data.status !== '2') { // 审核状态不是“待审核”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
             throw new Error()
           } else {

+ 2 - 1
src/views/modules/cw/projectRecords/WorkContractChooseCom.vue

@@ -11,7 +11,7 @@
       @keyup.enter.native=""
       :visible.sync="visible">
       <div style="height: calc(100% - 80px);">
-        <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+        <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
           <!-- 搜索框-->
           <el-form-item label="合同名称" prop="contractName">
             <el-input size="small" v-model="searchForm.contractName" placeholder="请输入合同名称" clearable></el-input>
@@ -168,6 +168,7 @@
         this.list()
       },
       close () {
+        this.$refs.searchForm.resetFields()
         this.visible = false
       }
     }

+ 706 - 0
src/views/modules/cw/projectReportArchive/ProjectReportArchiveForm.vue

@@ -0,0 +1,706 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+      v-dialogDrag
+      width="1200px"
+      height="500px"
+      @close="close"
+      @keyup.enter.native=""
+      :visible.sync="visible">
+    <el-row>
+      <el-col :span="24">
+
+        <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method === 'view'"
+                     label-width="135px" @submit.native.prevent>
+              <el-row  :gutter="15">
+                <el-col :span="12">
+                  <el-form-item label="档案名称" prop="name"
+                                :rules="[
+                                {required: true, message:'档案名称不能为空', trigger:'blur'}
+                   ]">
+                    <el-input v-model="inputForm.name" placeholder="请填写档案名称" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="项目名称" prop="cwProjectRecordsDTO.projectName"
+                                :rules="[
+                                {required: true, message:'项目名称不能为空', trigger:'blur'},
+                                {required: true, message:'项目名称不能为空', trigger:'change'}
+                   ]">
+                    <el-input :readonly="true" v-model="inputForm.cwProjectRecordsDTO.projectName" placeholder="请填写项目名称" clearable>
+                      <el-button slot="append" :disabled="method === 'view'" @click="openChooseProject" icon="el-icon-search"></el-button>
+                    </el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="项目编号" prop="cwProjectRecordsDTO.projectNumber"
+                                :rules="[
+                   ]">
+                    <el-input :disabled="true" v-model="inputForm.cwProjectRecordsDTO.projectNumber" placeholder="请填写项目编号" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="项目经理" prop="cwProjectRecordsDTO.projectMasterId"
+                                :rules="[
+                   ]">
+                    <!--                    <el-input v-model="inputForm.projectMasterId" placeholder="请填写项目经理" clearable></el-input>-->
+                    <UserSelect size="medium" :disabled="true" :limit='1' :value="inputForm.cwProjectRecordsDTO.projectMasterId" @getValue='(value) => {inputForm.cwProjectRecordsDTO.projectMasterId = value}'></UserSelect>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="被审计单位" prop="auditedUnitsName"
+                                :rules="[
+                                {required: true, message:'被审计单位不能为空', trigger:'blur'},
+                                {required: true, message:'被审计单位不能为空', trigger:'change'}
+                   ]">
+                    <el-input :readonly="true" v-model="inputForm.auditedUnitsName" @focus="openChooseClient" placeholder="请填写被审计单位" clearable>
+                      <el-button slot="append" :disabled="method === 'view'" @click="openChooseClient" icon="el-icon-search"></el-button>
+                    </el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="报告册数" prop="reportNum"
+                                :rules="[
+                                {required: true, message:'报告册数不能为空', trigger:'blur'}
+                   ]">
+                    <el-input-number
+                      v-model="inputForm.reportNum"
+                      controls-position="right"
+                      style="width:100%"
+                      :precision="0"
+                      :max="9999999999"
+                      :step="1"
+                      :min="0"
+                      placeholder="请填写报告册数"
+                      :controls="false"
+                      clearable>
+                    </el-input-number>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="底稿册数" prop="papersNum"
+                                :rules="[
+                                {required: true, message:'底稿册数不能为空', trigger:'blur'}
+                   ]">
+                    <el-input-number
+                      v-model="inputForm.papersNum"
+                      controls-position="right"
+                      style="width:100%"
+                      :precision="0"
+                      :max="9999999999"
+                      :step="1"
+                      :min="0"
+                      placeholder="请填写底稿册数"
+                      :controls="false"
+                      clearable>
+                    </el-input-number>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="档案年度" prop="year"
+                                :rules="[
+                                {required: true, message:'档案年度不能为空', trigger:'blur'}
+                   ]">
+                    <el-date-picker
+                      v-model="inputForm.year"
+                      type="year"
+                      value-format="yyyy"
+                      placeholder="选择档案年度"
+                      style="width:100%"
+                      placement="bottom-start"
+                      :clearable="false">
+                    </el-date-picker>
+                  </el-form-item>
+                </el-col>
+                <el-col v-if="status !== 'audit'" :span="12">
+                  <el-form-item label="案卷号" prop="number"
+                                :rules="[
+                   ]">
+                    <el-input :disabled="true" v-model="inputForm.number" placeholder="请填写案卷号" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col v-if="status !== 'audit'" :span="12">
+                  <el-form-item label="确认案卷号" prop="isNumber"
+                                :rules="[
+                   ]">
+                    <el-input :disabled="true" v-model="inputForm.isNumber" placeholder="请填写确认案卷号" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-form v-if="status === 'audit'" size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+                         label-width="135px" @submit.native.prevent>
+                <el-col  :span="12">
+                  <el-form-item label="案卷号" prop="number"
+                                :rules="[
+                                {required: true, message:'案卷号不能为空', trigger:'blur'}
+                   ]">
+                    <el-input :disabled="false" v-model="inputForm.number" placeholder="请填写案卷号" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col  :span="12">
+                  <el-form-item label="确认案卷号" prop="isNumber"
+                                :rules="[
+                                {required: true, message:'确认案卷号不能为空', trigger:'blur'}
+                   ]">
+                    <el-input :disabled="false" v-model="inputForm.isNumber" placeholder="请填写确认案卷号" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                </el-form>
+                <el-col :span="12">
+                  <el-form-item label="归档时间" prop="auditDate"
+                                :rules="[
+                   ]">
+                    <el-input :disabled="true" v-model="inputForm.auditDate" placeholder="请填写归档时间" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="24">
+                  <el-form-item label="备注" prop="remarks"
+                                :rules="[
+                   ]">
+                    <el-input type="textarea" style="width:100%" maxlength="1000" v-model="inputForm.remarks" placeholder="请填写备注" show-word-limit></el-input>
+
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="申请人" prop="createBy.name"
+                                :rules="[
+                   ]">
+                    <el-input :disabled="true" v-model="inputForm.createBy.name" placeholder="请填写创建人" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="申请时间" prop="createDate"
+                                :rules="[
+                   ]">
+                    <el-input :disabled="true" v-model="inputForm.createDate" placeholder="请填写创建时间" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+        </el-form>
+        <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
+          <el-tab-pane label="审计报告" name="report">
+            <el-row :gutter="15">
+              <el-button type="info" style="margin-bottom: 15px" size="mini" :disabled="method === 'view'" @click="openReportChoose">
+                新增审计报告
+              </el-button>
+            </el-row>
+            <el-row  :gutter="15">
+              <vxe-table
+                border
+                show-overflow
+                show-footer
+                :column-config="{resizable: true}"
+                ref="reportTable"
+                :key="tableKeyReport"
+                class="vxe-table-element"
+                :data="inputForm.cwProjectReportArchiveReportDTOList"
+                style=""
+                @cell-click=""
+                @edit-closed=""
+                highlight-current-row
+                :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: false}"
+              >
+                <vxe-table-column align="center" field="reportNo" title="报告文号" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input :disabled="true" v-model="scope.row.reportNo" placeholder="报告文号" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" field="reportDate" title="报告日期" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input :disabled="true" v-model="scope.row.reportDate" placeholder="报告日期" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" field="signatureAnnotator1Name" title="签字注师1" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input :disabled="true" v-model="scope.row.signatureAnnotator1Name" placeholder="签字注师1" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" field="signatureAnnotator2Name" title="签字注师2" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input :disabled="true" v-model="scope.row.signatureAnnotator2Name" placeholder="签字注师2" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" field="remarks" title="审计意见" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input :disabled="status !== 'audit'" v-model="scope.row.remarks" placeholder="审计意见" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" title="操作" width="100">
+                  <template v-slot="scope">
+                    <el-button :disabled="method==='view'" size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'report')">删除</el-button>
+                  </template>
+                </vxe-table-column>
+              </vxe-table>
+            </el-row>
+          </el-tab-pane>
+          <el-tab-pane label="附件" name="files">
+            <!--        附件-->
+            <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+          </el-tab-pane>
+
+        </el-tabs>
+      </el-col>
+    </el-row>
+      <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
+      <el-button size="small" v-if="method === 'edit'" type="primary" icon="el-icon-circle-check" @click="doSubmit('save')">确定</el-button>
+    </span>
+    <ProjectRecordsChooseCom ref="projectRecordsChooseCom" @getProject="getProject"></ProjectRecordsChooseCom>
+    <WorkClientChooseByProjectCom ref="workClientChooseByProjectCom" @getClient="getClient"></WorkClientChooseByProjectCom>
+    <ReportChooseByProjectCom ref="reportChooseByProjectCom" @getReport="getReport"></ReportChooseByProjectCom>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import UpLoadComponent from '@/views/common/UpLoadComponentV3'
+  import SelectUserTree from '@/views/modules/utils/treeUserSelect'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
+  import UserSelect from '@/components/userSelect'
+  import ProjectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
+  import ProjectReportArchiveService from '@/api/cw/projectRecords/ProjectReportArchiveService'
+  import ProjectRecordsChooseCom from '@/views/modules/cw/projectRecords/ProjectRecordsChooseCom'
+  import WorkClientChooseByProjectCom from '@/views/modules/cw/projectReportArchive/WorkClientChooseByProjectCom'
+  import ReportChooseByProjectCom from '@/views/modules/cw/projectReportArchive/ReportChooseByProjectCom'
+  export default {
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      formReadOnly: {
+        type: Boolean,
+        default: false
+      },
+      status: {
+        type: String,
+        default: ''
+      }
+    },
+    data () {
+      return {
+        title: '',
+        method: '',
+        loading: false,
+        inputForm: {
+          id: '',
+          createDate: '',
+          createBy: {
+            id: '',
+            name: ''
+          },
+          remarks: '',
+          projectId: '',
+          name: '',
+          auditedUnits: '',
+          reportNum: '',
+          papersNum: '',
+          year: '',
+          number: '',
+          isNumber: '',
+          auditDate: '',
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          workAttachmentDtoList: [],
+          cwProjectReportArchiveReportDTOList: [],
+          cwProjectRecordsDTO: {
+            remarks: '',
+            projectNumber: '',
+            projectName: '',
+            officeId: '',
+            projectMoney: '',
+            auditYear: '',
+            planStartDate: '',
+            planEndDate: '',
+            projectMasterId: '',
+            projectLeaderId: '',
+            procInsId: '',
+            processDefinitionId: '',
+            status: '',
+            contractId: ''
+          },
+          auditedUnitsName: ''
+        },
+        keyWatch: '',
+        activeName: 'report',
+        tableKeyReport: '',
+        visible: false
+      }
+    },
+    projectRecordsService: null,
+    projectReportArchiveService: null,
+    created () {
+      this.projectRecordsService = new ProjectRecordsService()
+      this.projectReportArchiveService = new ProjectReportArchiveService()
+    },
+    computed: {
+      bus: {
+        get () {
+          this.$refs.uploadComponent.setDividerName('附件', false)
+          return this.businessId
+        },
+        set (val) {
+          this.businessId = val
+        }
+      }
+    },
+    watch: {
+      'keyWatch': {
+        handler (newVal) {
+          if (this.commonJS.isNotEmpty(this.bus)) {
+            this.init('', this.bus)
+          } else {
+            this.$nextTick(() => {
+              this.$refs.inputForm.resetFields()
+            })
+          }
+        }
+      }
+    },
+    components: {
+      SelectUserTree,
+      UpLoadComponent,
+      SelectTree,
+      UserSelect,
+      ProjectRecordsChooseCom,
+      WorkClientChooseByProjectCom,
+      ReportChooseByProjectCom
+    },
+    methods: {
+      getKeyWatch (keyWatch) {
+        this.keyWatch = keyWatch
+      },
+      init (method, id) {
+        this.visible = true
+        if (method === 'edit') {
+          this.title = '项目报告归档修改'
+          this.method = method
+        } else {
+          this.title = '项目报告归档详情'
+          this.method = 'view'
+        }
+        this.activeName = 'report'
+        this.projectRecordsService = new ProjectRecordsService()
+        this.projectReportArchiveService = new ProjectReportArchiveService()
+        this.inputForm = {
+          id: '',
+          createDate: '',
+          createBy: {
+            id: '',
+            name: JSON.parse(localStorage.getItem('user')).name
+          },
+          remarks: '',
+          projectId: '',
+          name: '',
+          auditedUnits: '',
+          reportNum: '',
+          papersNum: '',
+          year: '',
+          number: '',
+          isNumber: '',
+          auditDate: '',
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          workAttachmentDtoList: [],
+          cwProjectReportArchiveReportDTOList: [],
+          cwProjectRecordsDTO: {
+            remarks: '',
+            projectNumber: '',
+            projectName: '',
+            officeId: '',
+            projectMoney: '',
+            auditYear: '',
+            planStartDate: '',
+            planEndDate: '',
+            projectMasterId: '',
+            projectLeaderId: '',
+            procInsId: '',
+            processDefinitionId: '',
+            status: '',
+            contractId: ''
+          },
+          auditedUnitsName: ''
+        }
+        this.inputForm.id = id
+        this.loading = false
+        this.$nextTick(() => {
+          this.$refs.inputForm.resetFields()
+          this.loading = true
+          this.projectReportArchiveService.queryById(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.isEmpty(this.inputForm.workAttachmentDtoList)) {
+              this.inputForm.workAttachmentDtoList = []
+            }
+            if (this.commonJS.isEmpty(this.inputForm.createDate)) {
+              this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+            }
+            if (this.commonJS.isEmpty(this.inputForm.createBy.name)) {
+              this.inputForm.createBy.name = JSON.parse(localStorage.getItem('user')).name
+            }
+            if (this.commonJS.isEmpty(this.inputForm.officeId)) {
+              this.inputForm.officeId = JSON.parse(localStorage.getItem('user')).officeDTO.id
+            }
+            if (this.commonJS.isEmpty(this.inputForm.papersNum)) {
+              this.inputForm.papersNum = 0
+            }
+            if (this.commonJS.isEmpty(this.inputForm.reportNum)) {
+              this.inputForm.reportNum = 0
+            }
+            if (this.formReadOnly) {
+              this.method = 'view'
+            }
+            this.$refs.uploadComponent.newUpload(this.method, this.inputForm.workAttachmentDtoList, 'cw_project_archive', null, null, null, null, false)
+            this.loading = false
+          })
+        })
+      },
+      saveForm (callback) {
+        this.doSubmit('save', callback)
+      },
+      startForm (callback) {
+        this.doSubmit('start', callback)
+      },
+      async agreeForm (callback) {
+        await this.projectReportArchiveService.queryById(this.inputForm.id).then(({data}) => {
+          if (data.status !== '2') { // 审核状态不是“待审核”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error()
+          } else {
+            this.doSubmit('agree', callback)
+          }
+        })
+      },
+      // 表单提交
+      doSubmit (status, callback) {
+        if (status === 'save') {
+          // 暂存
+          // this.inputForm.status = '1'
+          this.loading = true
+          if (this.$refs.uploadComponent.checkProgress()) {
+            this.loading = false
+            return
+          }
+          this.$refs.uploadComponent.getDataList().then((list) => {
+            // list为返回数据
+            this.inputForm.workAttachmentDtoList = list
+          })
+          // this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+          this.projectReportArchiveService.saveForm(this.inputForm).then(({data}) => {
+            // callback(data.businessTable, data.businessId, this.inputForm)
+            this.close()
+            this.loading = false
+          }).catch(() => {
+            this.loading = false
+          })
+          return
+        } else if (status === 'start') {
+          // 送审  待审核
+          this.inputForm.status = '2'
+        }
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.$refs.uploadComponent.checkProgress()) {
+              this.loading = false
+              return
+            }
+            if (status === 'agree') {
+              // 审核同意
+              this.inputForm.auditDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+              // this.inputForm.agreeUserId = this.$store.state.user.id
+              this.inputForm.status = '5'
+              if (this.inputForm.isNumber !== this.inputForm.number) {
+                this.$message.error('“案卷号”与“确认案卷号”不一致,请重新填写')
+                this.loading = false
+                throw new Error('“案卷号”与“确认案卷号”不一致,请重新填写')
+              }
+            }
+            this.$refs.uploadComponent.getDataList().then((list) => {
+              // list为返回数据
+              this.inputForm.workAttachmentDtoList = list
+            })
+            if (this.commonJS.isEmpty(this.inputForm.createDate)) {
+              this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+            }
+            this.projectReportArchiveService.saveForm(this.inputForm).then(({data}) => {
+              callback(data.businessTable, data.businessId, this.inputForm)
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      },
+      async updateStatusById (type) {
+        if (type === 'reject' || type === 'reback') {
+          if (await this.$refs.uploadComponent.checkProgress()) {
+            this.loading = false
+            throw new Error()
+          }
+          await this.projectReportArchiveService.queryById(this.inputForm.id).then(({data}) => {
+            if (data.status !== '2') { // status的值不等于“审核中”就弹出提示
+              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+              throw new Error()
+            } else {
+              if (type === 'reject') {
+                // 驳回
+                this.inputForm.status = '4'
+                let param = {status: '4', id: this.inputForm.id}
+                this.projectReportArchiveService.updateStatusById(param)
+              }
+              if (type === 'reback') {
+                // 撤回
+                let param = {status: '3', id: this.inputForm.id}
+                this.projectReportArchiveService.updateStatusById(param)
+              }
+            }
+          })
+        }
+      },
+      close () {
+        this.inputForm = {
+          id: '',
+          createDate: '',
+          createBy: {
+            id: '',
+            name: ''
+          },
+          remarks: '',
+          projectId: '',
+          name: '',
+          auditedUnits: '',
+          reportNum: '',
+          papersNum: '',
+          year: '',
+          number: '',
+          isNumber: '',
+          auditDate: '',
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          workAttachmentDtoList: [],
+          cwProjectReportArchiveReportDTOList: [],
+          cwProjectRecordsDTO: {
+            remarks: '',
+            projectNumber: '',
+            projectName: '',
+            officeId: '',
+            projectMoney: '',
+            auditYear: '',
+            planStartDate: '',
+            planEndDate: '',
+            projectMasterId: '',
+            projectLeaderId: '',
+            procInsId: '',
+            processDefinitionId: '',
+            status: '',
+            contractId: ''
+          },
+          auditedUnitsName: ''
+        }
+        this.$refs.uploadComponent.clearUpload()
+        this.$refs.inputForm.resetFields()
+        this.visible = false
+      },
+      tabHandleClick (event) {
+        // console.log(event)
+      },
+      // 新增
+      // eslint-disable-next-line no-dupe-keys
+      insertEvent (type) {
+      },
+      // 删除
+      removeEvent (row, rowIndex, type) {
+        if (type === 'report') {
+          this.$refs.reportTable.remove(row)
+          this.inputForm.cwProjectReportArchiveReportDTOList.splice(rowIndex, 1)
+        }
+      },
+      // 打开项目选择组件
+      openChooseProject (event) {
+        if (this.commonJS.isNotEmpty(this.inputForm.auditedUnitsName) || this.commonJS.isNotEmpty(this.inputForm.auditedUnits) || this.commonJS.isNotEmpty(this.inputForm.cwProjectReportArchiveReportDTOList)) {
+          this.$confirm(`重新选择项目会清空"被审计单位"以及"审计报告"的数据,是否继续?`, '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            this.$refs.projectRecordsChooseCom.init()
+          }).catch(() => {
+          })
+        } else {
+          this.$refs.projectRecordsChooseCom.init()
+        }
+      },
+      // 项目选择结果获取
+      getProject (row) {
+        this.inputForm.projectId = row.id
+        this.inputForm.cwProjectRecordsDTO.projectName = row.projectName
+        this.inputForm.cwProjectRecordsDTO.projectNumber = row.projectNumber
+        this.inputForm.cwProjectRecordsDTO.projectMasterId = row.projectMasterId
+        this.inputForm.auditedUnitsName = ''
+        this.inputForm.auditedUnits = ''
+        this.inputForm.cwProjectReportArchiveReportDTOList = []
+      },
+      // 打开被审计单位选择组件
+      openChooseClient () {
+        this.$refs.workClientChooseByProjectCom.init(this.inputForm.projectId)
+      },
+      // 被审计单位选择结果获取
+      getClient (row) {
+        this.inputForm.auditedUnitsName = row.name
+        this.inputForm.auditedUnits = row.id
+      },
+      // 打开审计报告选择组件
+      openReportChoose () {
+        this.$refs.reportChooseByProjectCom.init(this.inputForm.projectId)
+      },
+      // 审计报告选择结果获取
+      getReport (list) {
+        if (this.commonJS.isEmpty(this.inputForm.cwProjectReportArchiveReportDTOList)) {
+          this.inputForm.cwProjectReportArchiveReportDTOList = []
+        }
+        let _this = this
+        let _list = list
+        const waitForEach = function () {
+          return new Promise(function (resolve, reject) {
+            _list.forEach((item) => {
+              _this.inputForm.cwProjectReportArchiveReportDTOList.forEach(report => {
+                if (item.reportNo === report.reportNo) {
+                  _this.$message.error('已存在审计报告 “' + report.reportNo + '”,请重新选择')
+                  throw new Error('已存在审计报告 “' + report.reportNo + '”,请重新选择')
+                }
+              })
+            })
+            resolve()
+          })
+        }
+        waitForEach().then(() => {
+          list.forEach(item => {
+            let p = {
+              reportId: item.newLineId,
+              reportDate: item.reportDate,
+              reportNo: item.reportNo,
+              signatureAnnotator1: item.signatureAnnotator1,
+              signatureAnnotator1Name: item.signatureAnnotator1Name,
+              signatureAnnotator2: item.signatureAnnotator2,
+              signatureAnnotator2Name: item.signatureAnnotator2Name
+            }
+            this.$refs.reportTable.insertAt(p)
+            this.inputForm.cwProjectReportArchiveReportDTOList.push(p)
+            this.tableKeyReport = Math.random()
+          })
+        })
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-input-number .el-input__inner {
+    text-align: left;
+  }
+</style>

+ 411 - 0
src/views/modules/cw/projectReportArchive/ProjectReportArchiveList.vue

@@ -0,0 +1,411 @@
+<template>
+  <div class="page">
+    <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+      <!-- 搜索框-->
+      <el-form-item label="档案名称" prop="name">
+        <el-input size="small" v-model="searchForm.name" placeholder="请输入档案名称" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="项目名称" prop="cwProjectRecordsDTO.projectName">
+        <el-input size="small" v-model="searchForm.cwProjectRecordsDTO.projectName" placeholder="请输入项目名称" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="项目经理" prop="cwProjectRecordsDTO.projectMasterName">
+        <el-input size="small" v-model="searchForm.cwProjectRecordsDTO.projectMasterName" placeholder="请输入项目经理" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="档案年度" prop="year">
+        <el-date-picker
+          size="small"
+          v-model="searchForm.year"
+          type="year"
+          value-format="yyyy"
+          placeholder="选择档案年度"
+          style="width:100%"
+          placement="bottom-start"
+          clearable>
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="案卷号" prop="number">
+        <el-input size="small" v-model="searchForm.number" placeholder="请输入案卷号" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="归档时间" prop="auditDates">
+        <el-date-picker
+          placement="bottom-start"
+          format="yyyy-MM-dd HH:mm:ss"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          v-model="searchForm.auditDates"
+          type="datetimerange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          clearable>
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="状态" prop="status">
+        <el-select size="small" v-model="searchForm.status" placeholder="请选择" style="width:100%;"clearable>
+          <el-option
+            v-for="item in $dictUtils.getDictList('cw_status')"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="创建人" prop="createBy.name">
+        <el-input size="small" v-model="searchForm.createBy.name" placeholder="请输入创建人" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="创建时间" prop="createDates">
+        <el-date-picker
+          placement="bottom-start"
+          format="yyyy-MM-dd HH:mm:ss"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          v-model="searchForm.createDates"
+          type="datetimerange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          clearable>
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="报告文号" prop="reportNo">
+        <el-input size="small" v-model="searchForm.reportNo" placeholder="请输入报告文号" clearable></el-input>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
+        <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <div class="bg-white top" style="">
+      <vxe-toolbar :refresh="{query: refreshList}" custom>
+        <template #buttons>
+          <el-button v-if="hasPermission('cwProjectReportArchive:add')" type="primary" size="small" icon="el-icon-plus" @click="start()">新建</el-button>
+        </template>
+      </vxe-toolbar>
+      <div style="height: calc(100% - 90px)">
+        <vxe-table
+          :key="tableKey"
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          :loading="loading"
+          size="small"
+          ref="projectTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          @sort-change="sortChangeHandle"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :checkbox-config="{}">
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column min-width="230" align="center" title="档案名称" field="name">
+            <template slot-scope="scope">
+              <el-link  type="primary" :underline="false" v-if="hasPermission('cwProjectReportArchive:view')" @click="view(scope.row.id)">{{scope.row.name}}</el-link>
+              <span v-else>{{scope.row.name}}</span>
+            </template>
+          </vxe-column>
+          <vxe-column min-width="230" align="center" title="项目名称" field="cwProjectRecordsDTO.projectName">
+            <template slot-scope="scope">
+              <el-link  type="primary" :underline="false" v-if="hasPermission('cwProjectRecords:view')" @click="viewProject(scope.row.projectId)">{{commonJS.isNotEmpty(scope.row.cwProjectRecordsDTO)?scope.row.cwProjectRecordsDTO.projectName:''}}</el-link>
+              <span v-else>{{commonJS.isNotEmpty(scope.row.cwProjectRecordsDTO)?scope.row.cwProjectRecordsDTO.projectName:''}}</span>
+            </template>
+          </vxe-column>
+          <vxe-column min-width="150" align="center" title="项目经理" field="cwProjectRecordsDTO.projectMasterName"></vxe-column>
+          <vxe-column min-width="230" align="center" title="被审计单位" field="auditedUnitsName"></vxe-column>
+          <vxe-column min-width="150" align="center" title="报告册数" field="reportNum"></vxe-column>
+          <vxe-column min-width="150" align="center" title="底稿册数" field="papersNum"></vxe-column>
+          <vxe-column min-width="150" align="center" title="档案年度" field="year"></vxe-column>
+          <vxe-column min-width="230" align="center" title="案卷号" field="number"></vxe-column>
+          <vxe-column min-width="200" align="center" title="归档时间" field="auditDate"></vxe-column>
+          <vxe-column min-width="150" align="center" title="创建人" field="createBy.name"></vxe-column>
+          <vxe-column min-width="200" align="center" title="创建时间" field="createDate"></vxe-column>
+          <vxe-column  min-width="150px"align="center" fixed="right" title="状态" field="status" >
+            <template slot-scope="scope">
+              <el-button  type="text" @click="detail(scope.row)" effect="dark" size="mini"
+                          :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status, '-')">
+                {{$dictUtils.getDictLabel("cw_status", scope.row.status, '-')}}
+              </el-button>
+            </template>
+          </vxe-column>
+          <vxe-column title="操作" width="150px" fixed="right" align="center">
+            <template  slot-scope="scope">
+              <el-button v-if="hasPermission('cwProjectReportArchive:edit')&&scope.row.createBy.id === $store.state.user.id&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4')" type="text" icon="el-icon-edit" size="small" @click="push(scope.row)">修改</el-button>
+              <el-button v-else-if="hasPermission('cwProjectReportArchive:edit')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'||scope.row.status==='5')" type="text" icon="el-icon-edit" size="small" @click="edit(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('cwProjectReportArchive:edit')&&scope.row.createBy.id === $store.state.user.id&&scope.row.status==='2'" type="text" icon="el-icon-edit" size="small" @click="reback(scope.row)">撤回</el-button>
+              <el-button v-if="hasPermission('cwProjectReportArchive:del')&&scope.row.createBy.id === $store.state.user.id&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4')" type="text"  icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
+              <el-button v-else-if="hasPermission('cwProjectReportArchive:del')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'||scope.row.status==='5')" type="text"  icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
+            </template>
+          </vxe-column>
+        </vxe-table>
+        <vxe-pager
+          background
+          size="small"
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+      </div>
+      <ProjectRecordsForm ref="projectRecordsForm"></ProjectRecordsForm>
+      <ProjectReportArchiveForm ref="projectReportArchiveForm"></ProjectReportArchiveForm>
+    </div>
+  </div>
+</template>
+
+<script>
+  import ProjectReportArchiveService from '@/api/cw/projectRecords/ProjectReportArchiveService'
+  import TaskService from '@/api/flowable/TaskService'
+  import ProcessService from '@/api/flowable/ProcessService'
+  import pick from 'lodash.pick'
+  import UserService from '@/api/sys/UserService'
+  import ProjectRecordsForm from '../projectRecords/ProjectRecordsForm'
+  import ProjectReportArchiveForm from './ProjectReportArchiveForm'
+  export default {
+    data () {
+      return {
+        searchForm: {
+          name: '',
+          cwProjectRecordsDTO: {
+            projectName: '',
+            projectMasterName: ''
+          },
+          year: '',
+          number: '',
+          auditDates: [],
+          status: '',
+          createBy: {
+            name: ''
+          },
+          createDates: [],
+          reportNo: ''
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        tableKey: '',
+        loading: false,
+        processDefinitionAuditId: '',
+        procDefAuditKey: '',
+        isAdmin: false
+      }
+    },
+    projectReportArchiveService: null,
+    taskService: null,
+    processService: null,
+    userService: null,
+    created () {
+      this.projectReportArchiveService = new ProjectReportArchiveService()
+      this.taskService = new TaskService()
+      this.processService = new ProcessService()
+      this.userService = new UserService()
+    },
+    components: {
+      ProjectRecordsForm,
+      ProjectReportArchiveForm
+    },
+    computed: {
+      userName () {
+        return JSON.parse(localStorage.getItem('user')).name
+      },
+      user () {
+        this.createName = JSON.parse(localStorage.getItem('user')).name
+        return JSON.parse(localStorage.getItem('user'))
+      }
+    },
+    mounted () {
+      this.refreshList()
+    },
+    activated () {
+      this.refreshList()
+    },
+    methods: {
+      // 新增
+      add () {
+        // this.$refs.projectRecordsForm.init('add', '')
+      },
+      // 修改
+      edit (id) {
+        id = id || this.$refs.projectTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+        this.$refs.projectReportArchiveForm.init('edit', id)
+      },
+      // 查看
+      view (id) {
+        this.$refs.projectReportArchiveForm.init('view', id)
+      },
+      viewProject (id) {
+        this.$refs.projectRecordsForm.init('view', id)
+      },
+      // 查询当前用户是否是管理员用户
+      checkIsAdmin () {
+        this.userService.is().then(({data}) => {
+          this.isAdmin = data
+        })
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.projectReportArchiveService.list({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then(({data}) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.tableKey = Math.random()
+          this.loading = false
+        })
+        this.checkIsAdmin()
+        this.processService.getByName('财务-项目报告归档').then(({data}) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionAuditId = data.id
+            this.procDefAuditKey = data.key
+          }
+        })
+      },
+      // 当前页
+      currentChangeHandle ({ currentPage, pageSize }) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
+      // 排序
+      sortChangeHandle (column) {
+        this.tablePage.orders = []
+        if (column.order != null) {
+          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+        }
+        this.refreshList()
+      },
+      // 删除
+      del (id) {
+        let ids = id || this.$refs.projectTable.getCheckboxRecords().map(item => {
+          return item.id
+        }).join(',')
+        this.$confirm(`确定删除所选项吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.projectReportArchiveService.delete(ids).then(({data}) => {
+            this.$message.success(data)
+            this.refreshList()
+            this.loading = false
+          })
+        })
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      },
+      start () {
+        // 读取流程表单
+        let tabTitle = `发起流程【项目报告归档】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [项目报告归档]`
+        this.taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+          status: 'startAndHold'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                procDefId: this.processDefinitionAuditId,
+                procDefKey: this.procDefAuditKey,
+                status: 'startAndHold',
+                title: tabTitle,
+                formType: data.data.formType,
+                formUrl: data.data.formUrl,
+                formTitle: processTitle,
+                businessId: 'false',
+                isShow: false,
+                routePath: '/cw/projectReportArchive/ProjectReportArchiveList'
+              }
+            })
+          })
+      },
+      // 发起项目归档
+      push (row) {
+        // 读取流程表单
+        let title = `发起流程【项目报告归档】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[项目报告归档]`
+        let status = 'startAndHold'
+        if (row.status === '3' || row.status === '4') {
+          status = 'startAndClose'
+        }
+        this.taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+          businessId: row.id,
+          businessTable: 'cw_project_archive'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                procDefId: this.processDefinitionAuditId,
+                procDefKey: this.procDefAuditKey,
+                title: title,
+                formType: data.data.formType,
+                formUrl: data.data.formUrl,
+                formTitle: processTitle,
+                businessTable: 'cw_project_archive',
+                businessId: row.id,
+                isShow: 'false',
+                status: status,
+                routePath: '/cw/projectReportArchive/ProjectReportArchiveList'
+              }
+            })
+          })
+      },
+      // 查看项目归档流程结果
+      detail (row) {
+        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')
+              }
+            })
+          })
+        }
+      },
+      // 撤回项目归档
+      reback (row) {
+        this.$confirm(`确定要撤回该申请吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(async () => {
+          await this.projectReportArchiveService.queryById(row.id).then(({data}) => {
+            if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.procInsId).then(({data}) => {
+                let form = {status: '3', id: row.id}
+                this.projectReportArchiveService.updateStatusById(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
+            }
+          })
+        })
+      }
+    }
+  }
+</script>

+ 711 - 0
src/views/modules/cw/projectReportArchive/ProjectReportArchiveTaskForm.vue

@@ -0,0 +1,711 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+  <div>
+    <el-row>
+      <el-col :span="24">
+
+        <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="formReadOnly"
+                     label-width="135px" @submit.native.prevent>
+              <el-row  :gutter="15">
+                <el-col :span="12">
+                  <el-form-item label="档案名称" prop="name"
+                                :rules="[
+                                {required: true, message:'档案名称不能为空', trigger:'blur'}
+                   ]">
+                    <el-input v-model="inputForm.name" placeholder="请填写档案名称" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="项目名称" prop="cwProjectRecordsDTO.projectName"
+                                :rules="[
+                                {required: true, message:'项目名称不能为空', trigger:'blur'},
+                                {required: true, message:'项目名称不能为空', trigger:'change'}
+                   ]">
+                    <el-input :readonly="true" v-model="inputForm.cwProjectRecordsDTO.projectName" placeholder="请填写项目名称" clearable>
+                      <el-button slot="append" :disabled="formReadOnly" @click="openChooseProject" icon="el-icon-search"></el-button>
+                    </el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="项目编号" prop="cwProjectRecordsDTO.projectNumber"
+                                :rules="[
+                   ]">
+                    <el-input :disabled="true" v-model="inputForm.cwProjectRecordsDTO.projectNumber" placeholder="请填写项目编号" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="项目经理" prop="cwProjectRecordsDTO.projectMasterId"
+                                :rules="[
+                   ]">
+                    <!--                    <el-input v-model="inputForm.projectMasterId" placeholder="请填写项目经理" clearable></el-input>-->
+                    <UserSelect size="medium" :disabled="true" :limit='1' :value="inputForm.cwProjectRecordsDTO.projectMasterId" @getValue='(value) => {inputForm.cwProjectRecordsDTO.projectMasterId = value}'></UserSelect>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="被审计单位" prop="auditedUnitsName"
+                                :rules="[
+                                {required: true, message:'被审计单位不能为空', trigger:'blur'},
+                                {required: true, message:'被审计单位不能为空', trigger:'change'}
+                   ]">
+                    <el-input :readonly="true" v-model="inputForm.auditedUnitsName" @focus="openChooseClient" placeholder="请填写被审计单位" clearable>
+                      <el-button slot="append" :disabled="formReadOnly" @click="openChooseClient" icon="el-icon-search"></el-button>
+                    </el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="报告册数" prop="reportNum"
+                                :rules="[
+                                {required: true, message:'报告册数不能为空', trigger:'blur'}
+                   ]">
+                    <el-input-number
+                      v-model="inputForm.reportNum"
+                      controls-position="right"
+                      style="width:100%"
+                      :precision="0"
+                      :max="9999999999"
+                      :step="1"
+                      :min="0"
+                      placeholder="请填写报告册数"
+                      :controls="false"
+                      clearable>
+                    </el-input-number>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="底稿册数" prop="papersNum"
+                                :rules="[
+                                {required: true, message:'底稿册数不能为空', trigger:'blur'}
+                   ]">
+                    <el-input-number
+                      v-model="inputForm.papersNum"
+                      controls-position="right"
+                      style="width:100%"
+                      :precision="0"
+                      :max="9999999999"
+                      :step="1"
+                      :min="0"
+                      placeholder="请填写底稿册数"
+                      :controls="false"
+                      clearable>
+                    </el-input-number>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="档案年度" prop="year"
+                                :rules="[
+                                {required: true, message:'档案年度不能为空', trigger:'blur'}
+                   ]">
+                    <el-date-picker
+                      v-model="inputForm.year"
+                      type="year"
+                      value-format="yyyy"
+                      placeholder="选择档案年度"
+                      style="width:100%"
+                      placement="bottom-start"
+                      :clearable="false">
+                    </el-date-picker>
+                  </el-form-item>
+                </el-col>
+                <el-col v-if="status !== 'audit'" :span="12">
+                  <el-form-item label="案卷号" prop="number"
+                                :rules="[
+                   ]">
+                    <el-input :disabled="true" v-model="inputForm.number" placeholder="请填写案卷号" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col v-if="status !== 'audit'" :span="12">
+                  <el-form-item label="确认案卷号" prop="isNumber"
+                                :rules="[
+                   ]">
+                    <el-input :disabled="true" v-model="inputForm.isNumber" placeholder="请填写确认案卷号" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-form v-if="status === 'audit'" size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+                         label-width="135px" @submit.native.prevent>
+                <el-col  :span="12">
+                  <el-form-item label="案卷号" prop="number"
+                                :rules="[
+                                {required: true, message:'案卷号不能为空', trigger:'blur'}
+                   ]">
+                    <el-input :disabled="false" v-model="inputForm.number" placeholder="请填写案卷号" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col  :span="12">
+                  <el-form-item label="确认案卷号" prop="isNumber"
+                                :rules="[
+                                {required: true, message:'确认案卷号不能为空', trigger:'blur'}
+                   ]">
+                    <el-input :disabled="false" v-model="inputForm.isNumber" placeholder="请填写确认案卷号" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                </el-form>
+                <el-col :span="12">
+                  <el-form-item label="归档时间" prop="auditDate"
+                                :rules="[
+                   ]">
+                    <el-input :disabled="true" v-model="inputForm.auditDate" placeholder="请填写归档时间" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="24">
+                  <el-form-item label="备注" prop="remarks"
+                                :rules="[
+                   ]">
+                    <el-input type="textarea" style="width:100%" maxlength="1000" v-model="inputForm.remarks" placeholder="请填写备注" show-word-limit></el-input>
+
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="申请人" prop="createBy.name"
+                                :rules="[
+                   ]">
+                    <el-input :disabled="true" v-model="inputForm.createBy.name" placeholder="请填写创建人" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="申请时间" prop="createDate"
+                                :rules="[
+                   ]">
+                    <el-input :disabled="true" v-model="inputForm.createDate" placeholder="请填写创建时间" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+        </el-form>
+        <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
+          <el-tab-pane label="审计报告" name="report">
+            <el-row :gutter="15">
+              <el-button type="info" style="margin-bottom: 15px" size="mini" :disabled="formReadOnly" @click="openReportChoose">
+                新增审计报告
+              </el-button>
+            </el-row>
+            <el-row  :gutter="15">
+              <vxe-table
+                border
+                show-overflow
+                show-footer
+                :column-config="{resizable: true}"
+                ref="reportTable"
+                :key="tableKeyReport"
+                class="vxe-table-element"
+                :data="inputForm.cwProjectReportArchiveReportDTOList"
+                style=""
+                @cell-click=""
+                @edit-closed=""
+                highlight-current-row
+                :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: false}"
+              >
+                <vxe-table-column align="center" field="reportNo" title="报告文号" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input :readonly="true" v-model="scope.row.reportNo" placeholder="报告文号" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" field="reportDate" title="报告日期" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input :readonly="true" v-model="scope.row.reportDate" placeholder="报告日期" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" field="signatureAnnotator1Name" title="签字注师1" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input :readonly="true" v-model="scope.row.signatureAnnotator1Name" placeholder="签字注师1" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" field="signatureAnnotator2Name" title="签字注师2" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input :readonly="true" v-model="scope.row.signatureAnnotator2Name" placeholder="签字注师2" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" field="remarks" title="审计意见" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input :disabled="status !== 'audit'" v-model="scope.row.remarks" placeholder="审计意见" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" title="操作" width="100">
+                  <template v-slot="scope">
+                    <el-button :disabled="formReadOnly" size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'report')">删除</el-button>
+                  </template>
+                </vxe-table-column>
+              </vxe-table>
+            </el-row>
+          </el-tab-pane>
+          <el-tab-pane label="附件" name="files">
+            <!--        附件-->
+            <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+          </el-tab-pane>
+
+        </el-tabs>
+      </el-col>
+    </el-row>
+    <ProjectRecordsChooseCom ref="projectRecordsChooseCom" @getProject="getProject"></ProjectRecordsChooseCom>
+    <WorkClientChooseByProjectCom ref="workClientChooseByProjectCom" @getClient="getClient"></WorkClientChooseByProjectCom>
+    <ReportChooseByProjectCom ref="reportChooseByProjectCom" @getReport="getReport"></ReportChooseByProjectCom>
+  </div>
+</template>
+
+<script>
+  import UpLoadComponent from '@/views/common/UpLoadComponentV3'
+  import SelectUserTree from '@/views/modules/utils/treeUserSelect'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
+  import UserSelect from '@/components/userSelect'
+  import ProjectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
+  import ProjectReportArchiveService from '@/api/cw/projectRecords/ProjectReportArchiveService'
+  import ProjectRecordsChooseCom from '@/views/modules/cw/projectRecords/ProjectRecordsChooseCom'
+  import WorkClientChooseByProjectCom from '@/views/modules/cw/projectReportArchive/WorkClientChooseByProjectCom'
+  import ReportChooseByProjectCom from '@/views/modules/cw/projectReportArchive/ReportChooseByProjectCom'
+  export default {
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      formReadOnly: {
+        type: Boolean,
+        default: false
+      },
+      status: {
+        type: String,
+        default: ''
+      }
+    },
+    data () {
+      return {
+        title: '',
+        method: '',
+        loading: false,
+        inputForm: {
+          id: '',
+          createDate: '',
+          createBy: {
+            id: '',
+            name: ''
+          },
+          remarks: '',
+          projectId: '',
+          name: '',
+          auditedUnits: '',
+          reportNum: '',
+          papersNum: '',
+          year: '',
+          number: '',
+          isNumber: '',
+          auditDate: '',
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          workAttachmentDtoList: [],
+          cwProjectReportArchiveReportDTOList: [],
+          cwProjectRecordsDTO: {
+            remarks: '',
+            projectNumber: '',
+            projectName: '',
+            officeId: '',
+            projectMoney: '',
+            auditYear: '',
+            planStartDate: '',
+            planEndDate: '',
+            projectMasterId: '',
+            projectLeaderId: '',
+            procInsId: '',
+            processDefinitionId: '',
+            status: '',
+            contractId: ''
+          },
+          auditedUnitsName: ''
+        },
+        keyWatch: '',
+        activeName: 'report',
+        tableKeyReport: ''
+      }
+    },
+    projectRecordsService: null,
+    projectReportArchiveService: null,
+    created () {
+      this.projectRecordsService = new ProjectRecordsService()
+      this.projectReportArchiveService = new ProjectReportArchiveService()
+    },
+    computed: {
+      bus: {
+        get () {
+          this.$refs.uploadComponent.setDividerName('附件', false)
+          return this.businessId
+        },
+        set (val) {
+          this.businessId = val
+        }
+      }
+    },
+    watch: {
+      'keyWatch': {
+        handler (newVal) {
+          if (this.commonJS.isNotEmpty(this.bus)) {
+            this.init('', this.bus)
+          } else {
+            this.$nextTick(() => {
+              this.$refs.inputForm.resetFields()
+            })
+          }
+        }
+      }
+    },
+    components: {
+      SelectUserTree,
+      UpLoadComponent,
+      SelectTree,
+      UserSelect,
+      ProjectRecordsChooseCom,
+      WorkClientChooseByProjectCom,
+      ReportChooseByProjectCom
+    },
+    methods: {
+      getKeyWatch (keyWatch) {
+        this.keyWatch = keyWatch
+      },
+      init (method, id) {
+        this.activeName = 'report'
+        this.projectRecordsService = new ProjectRecordsService()
+        this.projectReportArchiveService = new ProjectReportArchiveService()
+        this.method = method
+        this.inputForm = {
+          id: '',
+          createDate: '',
+          createBy: {
+            id: '',
+            name: JSON.parse(localStorage.getItem('user')).name
+          },
+          remarks: '',
+          projectId: '',
+          name: '',
+          auditedUnits: '',
+          reportNum: '',
+          papersNum: '',
+          year: '',
+          number: '',
+          isNumber: '',
+          auditDate: '',
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          workAttachmentDtoList: [],
+          cwProjectReportArchiveReportDTOList: [],
+          cwProjectRecordsDTO: {
+            remarks: '',
+            projectNumber: '',
+            projectName: '',
+            officeId: '',
+            projectMoney: '',
+            auditYear: '',
+            planStartDate: '',
+            planEndDate: '',
+            projectMasterId: '',
+            projectLeaderId: '',
+            procInsId: '',
+            processDefinitionId: '',
+            status: '',
+            contractId: ''
+          },
+          auditedUnitsName: ''
+        }
+        this.inputForm.id = id
+        this.loading = false
+        this.$nextTick(() => {
+          this.$refs.inputForm.resetFields()
+          this.loading = true
+          this.projectReportArchiveService.queryById(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.isEmpty(this.inputForm.workAttachmentDtoList)) {
+              this.inputForm.workAttachmentDtoList = []
+            }
+            if (this.commonJS.isEmpty(this.inputForm.createDate)) {
+              this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+            }
+            if (this.commonJS.isEmpty(this.inputForm.createBy.name)) {
+              this.inputForm.createBy.name = JSON.parse(localStorage.getItem('user')).name
+            }
+            if (this.commonJS.isEmpty(this.inputForm.officeId)) {
+              this.inputForm.officeId = JSON.parse(localStorage.getItem('user')).officeDTO.id
+            }
+            if (this.commonJS.isEmpty(this.inputForm.papersNum)) {
+              this.inputForm.papersNum = 0
+            }
+            if (this.commonJS.isEmpty(this.inputForm.reportNum)) {
+              this.inputForm.reportNum = 0
+            }
+            if (this.formReadOnly) {
+              this.method = 'view'
+            }
+            this.$refs.uploadComponent.newUpload(this.method, this.inputForm.workAttachmentDtoList, 'cw_project_archive', null, null, null, null, false)
+            this.loading = false
+          })
+        })
+      },
+      saveForm (callback) {
+        this.doSubmit('save', callback)
+      },
+      startForm (callback) {
+        this.doSubmit('start', callback)
+      },
+      async agreeForm (callback) {
+        await this.projectReportArchiveService.queryById(this.inputForm.id).then(({data}) => {
+          if (data.status !== '2') { // 审核状态不是“待审核”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error()
+          } else {
+            this.doSubmit('agree', callback)
+          }
+        })
+      },
+      // 表单提交
+      doSubmit (status, callback) {
+        if (status === 'save') {
+          // 暂存
+          this.inputForm.status = '1'
+          this.loading = true
+          if (this.$refs.uploadComponent.checkProgress()) {
+            this.loading = false
+            return
+          }
+          this.$refs.uploadComponent.getDataList().then((list) => {
+            // list为返回数据
+            this.inputForm.workAttachmentDtoList = list
+          })
+          this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+          this.projectReportArchiveService.saveForm(this.inputForm).then(({data}) => {
+            callback(data.businessTable, data.businessId, this.inputForm)
+            this.loading = false
+          }).catch(() => {
+            this.loading = false
+          })
+          return
+        } else if (status === 'start') {
+          // 送审  待审核
+          this.inputForm.status = '2'
+        }
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.$refs.uploadComponent.checkProgress()) {
+              this.loading = false
+              return
+            }
+            if (status === 'agree') {
+              if (this.inputForm.isNumber !== this.inputForm.number) {
+                this.$message.error('“案卷号”与“确认案卷号”不一致,请重新填写')
+                this.loading = false
+                throw new Error('“案卷号”与“确认案卷号”不一致,请重新填写')
+              } else {
+                // 审核同意
+                this.inputForm.auditDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+                // this.inputForm.agreeUserId = this.$store.state.user.id
+                this.inputForm.status = '5'
+              }
+            }
+            this.$refs.uploadComponent.getDataList().then((list) => {
+              // list为返回数据
+              this.inputForm.workAttachmentDtoList = list
+            })
+            if (this.commonJS.isEmpty(this.inputForm.createDate)) {
+              this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+            }
+            this.projectReportArchiveService.saveForm(this.inputForm).then(({data}) => {
+              callback(data.businessTable, data.businessId, this.inputForm)
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      },
+      async updateStatusById (type) {
+        if (type === 'reject' || type === 'reback') {
+          if (await this.$refs.uploadComponent.checkProgress()) {
+            this.loading = false
+            throw new Error()
+          }
+          await this.projectReportArchiveService.queryById(this.inputForm.id).then(({data}) => {
+            if (data.status !== '2') { // status的值不等于“审核中”就弹出提示
+              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+              throw new Error()
+            } else {
+              if (type === 'reject') {
+                if (this.inputForm.isNumber !== this.inputForm.number) {
+                  this.$message.error('“案卷号”与“确认案卷号”不一致,请重新填写')
+                  this.loading = false
+                  throw new Error('“案卷号”与“确认案卷号”不一致,请重新填写')
+                } else {
+                  // 驳回
+                  let _this = this
+                  const wait = function () {
+                    return new Promise(function (resolve, reject) {
+                      _this.inputForm.status = '4'
+                      _this.loading = true
+                      if (_this.$refs.uploadComponent.checkProgress()) {
+                        _this.loading = false
+                        reject(new Error())
+                      }
+                      _this.$refs.uploadComponent.getDataList().then((list) => {
+                        // list为返回数据
+                        _this.inputForm.workAttachmentDtoList = list
+                      })
+                      resolve()
+                    })
+                  }
+                  wait().then(() => {
+                    this.projectReportArchiveService.saveForm(this.inputForm).then(({data}) => {
+                      this.loading = false
+                    }).catch(() => {
+                      this.loading = false
+                    })
+                  }).catch(() => {
+                    this.loading = false
+                  })
+                }
+              }
+              if (type === 'reback') {
+                // 撤回
+                let param = {status: '3', id: this.inputForm.id}
+                this.projectReportArchiveService.updateStatusById(param)
+              }
+            }
+          })
+        }
+      },
+      close () {
+        this.inputForm = {
+          id: '',
+          createDate: '',
+          createBy: {
+            id: '',
+            name: ''
+          },
+          remarks: '',
+          projectId: '',
+          name: '',
+          auditedUnits: '',
+          reportNum: '',
+          papersNum: '',
+          year: '',
+          number: '',
+          isNumber: '',
+          auditDate: '',
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          workAttachmentDtoList: [],
+          cwProjectReportArchiveReportDTOList: [],
+          cwProjectRecordsDTO: {
+            remarks: '',
+            projectNumber: '',
+            projectName: '',
+            officeId: '',
+            projectMoney: '',
+            auditYear: '',
+            planStartDate: '',
+            planEndDate: '',
+            projectMasterId: '',
+            projectLeaderId: '',
+            procInsId: '',
+            processDefinitionId: '',
+            status: '',
+            contractId: ''
+          },
+          auditedUnitsName: ''
+        }
+        this.$refs.uploadComponent.clearUpload()
+        this.$refs.inputForm.resetFields()
+      },
+      tabHandleClick (event) {
+        // console.log(event)
+      },
+      // 新增
+      // eslint-disable-next-line no-dupe-keys
+      insertEvent (type) {
+      },
+      // 删除
+      removeEvent (row, rowIndex, type) {
+        if (type === 'report') {
+          this.$refs.reportTable.remove(row)
+          this.inputForm.cwProjectReportArchiveReportDTOList.splice(rowIndex, 1)
+        }
+      },
+      // 打开项目选择组件
+      openChooseProject (event) {
+        if (this.commonJS.isNotEmpty(this.inputForm.auditedUnitsName) || this.commonJS.isNotEmpty(this.inputForm.auditedUnits) || this.commonJS.isNotEmpty(this.inputForm.cwProjectReportArchiveReportDTOList)) {
+          this.$confirm(`重新选择项目会清空"被审计单位"以及"审计报告"的数据,是否继续?`, '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            this.$refs.projectRecordsChooseCom.init()
+          }).catch(() => {
+          })
+        } else {
+          this.$refs.projectRecordsChooseCom.init()
+        }
+      },
+      // 项目选择结果获取
+      getProject (row) {
+        this.inputForm.projectId = row.id
+        this.inputForm.cwProjectRecordsDTO.projectName = row.projectName
+        this.inputForm.cwProjectRecordsDTO.projectNumber = row.projectNumber
+        this.inputForm.cwProjectRecordsDTO.projectMasterId = row.projectMasterId
+        this.inputForm.auditedUnitsName = ''
+        this.inputForm.auditedUnits = ''
+        this.inputForm.cwProjectReportArchiveReportDTOList = []
+      },
+      // 打开被审计单位选择组件
+      openChooseClient () {
+        this.$refs.workClientChooseByProjectCom.init(this.inputForm.projectId)
+      },
+      // 被审计单位选择结果获取
+      getClient (row) {
+        this.inputForm.auditedUnitsName = row.name
+        this.inputForm.auditedUnits = row.id
+      },
+      // 打开审计报告选择组件
+      openReportChoose () {
+        this.$refs.reportChooseByProjectCom.init(this.inputForm.projectId)
+      },
+      // 审计报告选择结果获取
+      getReport (list) {
+        if (this.commonJS.isEmpty(this.inputForm.cwProjectReportArchiveReportDTOList)) {
+          this.inputForm.cwProjectReportArchiveReportDTOList = []
+        }
+        let _this = this
+        let _list = list
+        const waitForEach = function () {
+          return new Promise(function (resolve, reject) {
+            _list.forEach((item) => {
+              _this.inputForm.cwProjectReportArchiveReportDTOList.forEach(report => {
+                if (item.reportNo === report.reportNo) {
+                  _this.$message.error('已存在审计报告 “' + report.reportNo + '”,请重新选择')
+                  throw new Error('已存在审计报告 “' + report.reportNo + '”,请重新选择')
+                }
+              })
+            })
+            resolve()
+          })
+        }
+        waitForEach().then(() => {
+          list.forEach(item => {
+            let p = {
+              reportId: item.newLineId,
+              reportDate: item.reportDate,
+              reportNo: item.reportNo,
+              signatureAnnotator1: item.signatureAnnotator1,
+              signatureAnnotator1Name: item.signatureAnnotator1Name,
+              signatureAnnotator2: item.signatureAnnotator2,
+              signatureAnnotator2Name: item.signatureAnnotator2Name
+            }
+            this.$refs.reportTable.insertAt(p)
+            this.inputForm.cwProjectReportArchiveReportDTOList.push(p)
+            this.tableKeyReport = Math.random()
+          })
+        })
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-input-number .el-input__inner {
+    text-align: left;
+  }
+</style>

+ 157 - 0
src/views/modules/cw/projectReportArchive/ReportChooseByProjectCom.vue

@@ -0,0 +1,157 @@
+<template>
+  <div>
+    <el-dialog
+      title="审计报告选择"
+      :close-on-click-modal="false"
+      v-dialogDrag
+      width="1100px"
+      height="500px"
+      @close="close"
+      append-to-body
+      @keyup.enter.native=""
+      :visible.sync="visible">
+      <div style="height: calc(100% - 80px);">
+        <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
+          <!-- 搜索框-->
+          <el-form-item label="报告文号" prop="reportNo">
+            <el-input size="small" v-model="searchForm.reportNo" placeholder="请输入报告文号" clearable></el-input>
+          </el-form-item>
+
+          <el-form-item>
+            <el-button type="primary" @click="list()" size="small" icon="el-icon-search">查询</el-button>
+            <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+          </el-form-item>
+        </el-form>
+
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="400px"
+          :loading="loading"
+          size="small"
+          ref="reportTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :print-config="{}"
+          @sort-change=""
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :row-config="{isCurrent: true}"
+          :checkbox-config="{trigger: 'row'}"
+        >
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column type="checkbox" width="40px"></vxe-column>
+          <vxe-column min-width="230" align="center" title="报告文号" field="reportNo"></vxe-column>
+          <vxe-column min-width="230" align="center" title="报告日期" field="reportDate"></vxe-column>
+          <vxe-column min-width="230" align="center" title="签字注师1" field="signatureAnnotator1Name"></vxe-column>
+          <vxe-column min-width="230" align="center" title="签字注师2" field="signatureAnnotator2Name"></vxe-column>
+        </vxe-table>
+        <vxe-pager
+          background
+          size="small"
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+      </div>
+      <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
+      <el-button size="small" type="primary" v-if="method != 'view'" @click="getReport()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+    </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import ProjectReportArchiveService from '@/api/cw/projectRecords/ProjectReportArchiveService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        dataList: [],
+        searchForm: {
+          reportNo: ''
+        },
+        projectId: ''
+      }
+    },
+    projectReportArchiveService: null,
+    created () {
+      this.projectReportArchiveService = new ProjectReportArchiveService()
+    },
+    components: {
+    },
+    methods: {
+      init (projectId) {
+        this.projectId = projectId
+        this.visible = true
+        this.list()
+      },
+      // 表单提交
+      getReport () {
+        let list = this.$refs.reportTable.getCheckboxRecords()
+        if (this.commonJS.isEmpty(list)) {
+          this.$message.error('请选择一条数据')
+          return
+        }
+        this.close()
+        this.$emit('getReport', list)
+      },
+      list () {
+        this.loading = true
+        if (this.commonJS.isNotEmpty(this.projectId)) {
+          this.searchForm.projectId = this.projectId
+          this.projectReportArchiveService.reportList({
+            'current': this.tablePage.currentPage,
+            'size': this.tablePage.pageSize,
+            'orders': this.tablePage.orders,
+            ...this.searchForm
+          }).then(({data}) => {
+            this.dataList = data.records
+            this.tablePage.total = data.total
+            this.loading = false
+          })
+        } else {
+          this.dataList = []
+          this.tablePage.total = 0
+          this.loading = false
+        }
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+      close () {
+        this.$refs.searchForm.resetFields()
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-dialog__body {
+    padding-top: 0px;
+    padding-bottom: 15px;
+  }
+</style>

+ 192 - 0
src/views/modules/cw/projectReportArchive/WorkClientChooseByProjectCom.vue

@@ -0,0 +1,192 @@
+<template>
+  <div>
+    <el-dialog
+      title="被审计单位选择"
+      :close-on-click-modal="false"
+      v-dialogDrag
+      width="1100px"
+      height="500px"
+      @close="close"
+      append-to-body
+      @keyup.enter.native=""
+      :visible.sync="visible">
+      <div style="height: calc(100% - 80px);">
+        <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
+          <!-- 搜索框-->
+          <el-form-item label="客户名称" prop="name">
+            <el-input size="small" v-model="searchForm.name" placeholder="请输入客户名称" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="客户编号" prop="no">
+            <el-input size="small" v-model="searchForm.no" placeholder="请输入客户编号" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="统一社会信用代码" prop="uscCode">
+            <el-input size="small" v-model="searchForm.uscCode" placeholder="请输入统一社会信用代码" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="所属行业" prop="industry">
+            <el-select v-model="searchForm.industry" placeholder="请选择" style="width:100%;"clearable>
+              <el-option
+                v-for="item in $dictUtils.getDictList('cw_work_client_industry')"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+
+          <el-form-item>
+            <el-button type="primary" @click="list()" size="small" icon="el-icon-search">查询</el-button>
+            <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+          </el-form-item>
+        </el-form>
+
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="400px"
+          :loading="loading"
+          size="small"
+          ref="clientTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :print-config="{}"
+          @sort-change=""
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :row-config="{isCurrent: true}"
+          :radio-config="{trigger: 'row'}"
+        >
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column type="radio" width="40px"></vxe-column>
+          <vxe-column min-width="230" align="center" title="客户名称" field="name"></vxe-column>
+          <vxe-column min-width="160" align="center" title="客户编号" field="no"></vxe-column>
+          <vxe-column min-width="160" align="center" title="客户类型" field="type">
+            <template slot-scope="scope">
+              {{$dictUtils.getDictLabel('cw_work_client_type', scope.row.type, '-')}}
+            </template>
+          </vxe-column>
+          <vxe-column min-width="160" align="center" title="统一社会信用代码" field="uscCode"></vxe-column>
+          <vxe-column min-width="160" align="center" title="所属行业" field="industry">
+            <template slot-scope="scope">
+              {{$dictUtils.getDictLabel('cw_work_client_industry', scope.row.industry, '-')}}
+            </template>
+          </vxe-column>
+
+        </vxe-table>
+        <vxe-pager
+          background
+          size="small"
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+      </div>
+      <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
+      <el-button size="small" type="primary" v-if="method != 'view'" @click="getClient()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+    </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import WorkClientService from '@/api/cw/workClientInfo/WorkClientService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        dataList: [],
+        searchForm: {
+          name: '',
+          no: '',
+          uscCode: '',
+          affiliation: '',
+          cwWorkClientTypeDTO: {
+            ownershipType: ''
+          },
+          industry: '',
+          createDates: [],
+          status: ''
+        },
+        projectId: ''
+      }
+    },
+    workClientService: null,
+    created () {
+      this.workClientService = new WorkClientService()
+    },
+    components: {
+    },
+    methods: {
+      init (projectId) {
+        this.projectId = projectId
+        this.visible = true
+        this.list()
+      },
+      // 表单提交
+      getClient () {
+        let row = this.$refs.clientTable.getRadioRecord()
+        if (this.commonJS.isEmpty(row)) {
+          this.$message.error('请选择一条数据')
+          return
+        }
+        this.close()
+        this.$emit('getClient', row)
+      },
+      list () {
+        this.loading = true
+        if (this.commonJS.isNotEmpty(this.projectId)) {
+          this.searchForm.projectId = this.projectId
+          this.workClientService.list({
+            'current': this.tablePage.currentPage,
+            'size': this.tablePage.pageSize,
+            'orders': this.tablePage.orders,
+            ...this.searchForm
+          }).then(({data}) => {
+            this.dataList = data.records
+            this.tablePage.total = data.total
+            this.loading = false
+          })
+        } else {
+          this.dataList = []
+          this.tablePage.total = 0
+          this.loading = false
+        }
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+      close () {
+        this.$refs.searchForm.resetFields()
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-dialog__body {
+    padding-top: 0px;
+    padding-bottom: 15px;
+  }
+</style>

+ 1 - 1
src/views/modules/cw/workClientInfo/WorkClientForm.vue

@@ -955,7 +955,7 @@
       },
       async agreeForm (callback) {
         await this.workClientService.queryById(this.inputForm.id).then(({data}) => {
-          if (this.inputForm.status !== '2') { // 审核状态不是“待审核”,就弹出提示
+          if (data.status !== '2') { // 审核状态不是“待审核”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
             throw new Error()
           } else {

+ 1 - 1
src/views/modules/cw/workClientInfo/WorkClientTaskForm.vue

@@ -935,7 +935,7 @@
       },
       async agreeForm (callback) {
         await this.workClientService.queryById(this.inputForm.id).then(({data}) => {
-          if (this.inputForm.status !== '2') { // 审核状态不是“待审核”,就弹出提示
+          if (data.status !== '2') { // 审核状态不是“待审核”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
             throw new Error()
           } else {

+ 1 - 1
src/views/modules/cw/workClientInfo/manageLevelType/ManageLevelTypeListForm.vue

@@ -11,7 +11,7 @@
       @keyup.enter.native="getManageLevelType"
       :visible.sync="visible">
       <div style="height: calc(100% - 50px);">
-        <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+        <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm"  @submit.native.prevent>
           <!-- 搜索框-->
 <!--          <el-form-item label="客户姓名" prop="name">-->
 <!--            <el-input size="small" v-model="searchForm.name" placeholder="请输入客户姓名" clearable></el-input>-->

+ 1 - 1
src/views/modules/cw/workClientInfo/organizationType/OrganizationTypeListForm.vue

@@ -11,7 +11,7 @@
       @keyup.enter.native="getOrganizationType"
       :visible.sync="visible">
       <div style="height: calc(100% - 50px);">
-        <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+        <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
           <!-- 搜索框-->
 <!--          <el-form-item label="客户姓名" prop="name">-->
 <!--            <el-input size="small" v-model="searchForm.name" placeholder="请输入客户姓名" clearable></el-input>-->

+ 21 - 4
src/views/modules/flowable/task/TaskForm.vue

@@ -250,7 +250,7 @@
         this.auditForm.message = ''
         this.cUser = this.commonJS.isEmpty(this.$route.query.cUser) ? false : this.$route.query.cUser
         this.contractTitle = this.$route.query.contractTitle
-        if (this.$route.query.isShow === undefined || this.$route.query.isShow === '') {
+        if (this.commonJS.isEmpty(this.$route.query.isShow)) {
           this.isShow = 'true'
         } else {
           this.isShow = this.$route.query.isShow
@@ -523,6 +523,24 @@
       commit (vars) {
         var num = this.$route.query.num
         if (this.formType === '2') { // 外置表单
+          let param = {
+            num: this.$route.query.num,
+            taskId: this.taskId,
+            taskDefKey: this.taskDefKey,
+            procInsId: this.procInsId,
+            procDefId: this.procDefId,
+            vars: vars,
+            comment: this.auditForm,
+            assignee: this.auditForm.assignee,
+            cope: {
+              userIds: this.auditForm.userIds,
+              procDefId: this.procDefId,
+              procInsId: '',
+              procDefName: '',
+              procInsName: this.title,
+              taskName: ''
+            }
+          }
           this.$refs.form.agreeForm((businessTable, businessId, inputForm) => {
             vars = {...vars, ...inputForm}
             this.taskService.audit({
@@ -554,7 +572,7 @@
                 this.cc(data)
               }
             })
-          })
+          }, param)
         } else { // 动态表单
           this.$refs.form.submitTaskFormData(vars, this.procInsId, this.taskId, this.auditForm.assignee, this.auditForm, (data) => {
             this.changeBusiness()
@@ -673,8 +691,6 @@
       }
     },
     data () {
-      var num = this.$route.query.num
-      console.log(num)
       return {
         form: null,
         formType: '',
@@ -694,6 +710,7 @@
         buttons: [],
         isCC: false,
         isAssign: false,
+        isShow: true,
         printObj: {
           id: 'printForm',
           popTitle: '',