Browse Source

Merge remote-tracking branch 'origin/master'

lizhenhao 2 years ago
parent
commit
2d58af7bb3
20 changed files with 4988 additions and 126 deletions
  1. 32 0
      src/api/cw/projectReportAuditSheet/CwProofreadTypeService.js
  2. 39 0
      src/api/cw/reportCancellApplyArchived/ReportCancellApplyArchivedService.js
  3. 9 5
      src/views/modules/cw/reimbursementApproval/info/InfoList.vue
  4. 231 0
      src/views/modules/cw/reimbursementApproval/projectInfo/ProjectChooseForm.vue
  5. 157 0
      src/views/modules/cw/reportCancellApplyArchived/ReportCancellApplyArchivedChooseCom.vue
  6. 864 0
      src/views/modules/cw/reportCancellApplyArchived/ReportCancellApplyArchivedForm.vue
  7. 570 0
      src/views/modules/cw/reportCancellApplyArchived/ReportCancellApplyArchivedList.vue
  8. 769 0
      src/views/modules/cw/reportCancellApplyArchived/ReportCancellApplyArchivedTaskForm.vue
  9. 145 0
      src/views/modules/cw/reportManagement/auditSheet/TypeForm.vue
  10. 152 0
      src/views/modules/cw/reportManagement/auditSheet/TypeList.vue
  11. 381 0
      src/views/modules/cw/reportManagement/reportReview/ReportReviewForm.vue
  12. 420 0
      src/views/modules/cw/reportManagement/reportReview/ReportReviewList.vue
  13. 2 2
      src/views/modules/cw/workContract/ContractFileForm.vue
  14. 65 28
      src/views/modules/cw/workContract/ContractFilePaperForm.vue
  15. 82 33
      src/views/modules/cw/workContract/ContractNameForm.vue
  16. 39 35
      src/views/modules/cw/workContract/ContractRegistration.vue
  17. 37 11
      src/views/modules/cw/workContract/ContractRegistrationForm.vue
  18. 982 0
      src/views/modules/cw/workContract/contractRegisitionAddForm/ContractAddForm.vue
  19. 8 8
      src/views/modules/materialManagement/info/UpdateInfoForm.vue
  20. 4 4
      src/views/modules/materialManagement/purchase/PurchaseForm.vue

+ 32 - 0
src/api/cw/projectReportAuditSheet/CwProofreadTypeService.js

@@ -0,0 +1,32 @@
+import request from '@/utils/httpRequest'
+
+export default class CwProofreadTypeService {
+  list (param) {
+    return request({
+      url: '/auditSheet/type/list',
+      method: 'get',
+      params: param
+    })
+  }
+  save (param) {
+    return request({
+      url: '/auditSheet/type/save',
+      method: 'post',
+      data: param
+    })
+  }
+  findById (id) {
+    return request({
+      url: '/auditSheet/type/findById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  remove (id) {
+    return request({
+      url: '/auditSheet/type/deleteById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+}

+ 39 - 0
src/api/cw/reportCancellApplyArchived/ReportCancellApplyArchivedService.js

@@ -0,0 +1,39 @@
+import request from '@/utils/httpRequest'
+
+export default class ReportCancellApplyArchivedService {
+  findList (params) {
+    return request({
+      url: '/cwProjectReportArchivedCancell/findList',
+      method: 'get',
+      params: params
+    })
+  }
+  queryById (id) {
+    return request({
+      url: '/cwProjectReportArchivedCancell/queryById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  saveForm (inputForm) {
+    return request({
+      url: `/cwProjectReportArchivedCancell/saveForm`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+  updateStatusById (data) {
+    return request({
+      url: '/cwProjectReportArchivedCancell/updateStatusById',
+      method: 'post',
+      data: data
+    })
+  }
+  findByContractInfoId (id) {
+    return request({
+      url: '/cwProjectReportArchivedCancell/findByContractInfoId',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+}

+ 9 - 5
src/views/modules/cw/reimbursementApproval/info/InfoList.vue

@@ -149,7 +149,8 @@
           @page-change="currentChangeHandle">
         </vxe-pager>
 
-        <ProgramPageForm ref="programPageForm" @getProgram="getProgram"></ProgramPageForm>
+<!--        <ProgramPageForm ref="programPageForm" @getProgram="getProgram"></ProgramPageForm>-->
+        <ProjectChooseForm ref="projectChooseForm" @getProgram="getProgram"></ProjectChooseForm>
         <InfoForm ref="infoForm" @refreshDataList="refreshList"></InfoForm>
 <!--        <ProjectForm ref="projectForm" @refreshDataList="refreshList"></ProjectForm>-->
         <ProjectRecordsForm ref="projectRecordsForm" @refreshDataList="refreshList"></ProjectRecordsForm>
@@ -165,7 +166,8 @@
   import SelectUserTree from '@/views/modules/utils/treeUserSelect'
   import UserSelect from '@/components/userSelect'
   import SelectTree from '@/components/treeSelect/treeSelect.vue'
-  import ProgramPageForm from '@/views/modules/finance/invoice/ProgramPageForm'
+  // import ProgramPageForm from '@/views/modules/finance/invoice/ProgramPageForm'
+  import ProjectChooseForm from '../projectInfo/ProjectChooseForm'
   import InfoForm from './InfoForm'
   import TaskService from '@/api/flowable/TaskService'
   import ProcessService from '@/api/flowable/ProcessService'
@@ -213,7 +215,8 @@
       InputNumber,
       SelectUserTree,
       SelectTree,
-      ProgramPageForm,
+      // ProgramPageForm,
+      ProjectChooseForm,
       InfoForm,
       // ProjectForm,
       ProjectRecordsForm,
@@ -415,7 +418,8 @@
       },
       openProgramPageForm (rowIndex) {
         // 打开单选组件
-        this.$refs.programPageForm.init(null, false)
+        // this.$refs.programPageForm.init(null, false)
+        this.$refs.projectChooseForm.init(null, false)
       },
       getProgram (rows) {
         // rows[0].name // 项目名称、开票详情
@@ -425,7 +429,7 @@
         // rows[0].client // 客户id
         // rows[0].id // 项目id
         // rows[0].location // 项目所在地
-        this.searchForm.project = rows[0].name
+        this.searchForm.project = rows.projectName
       },
       // 下载文档
       exportFile () {

+ 231 - 0
src/views/modules/cw/reimbursementApproval/projectInfo/ProjectChooseForm.vue

@@ -0,0 +1,231 @@
+<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="projectName">
+            <el-input size="small" v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="项目编号" prop="projectNumber">
+            <el-input size="small" v-model="searchForm.projectNumber" placeholder="请输入项目编号" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="项目经理" prop="projectMasterName">
+            <el-input size="small" v-model="searchForm.projectMasterName" 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="结束日期">
+            </el-date-picker>
+          </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="projectTable"
+          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="projectName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="项目编号" field="projectNumber"></vxe-column>
+          <vxe-column min-width="160" align="center" title="项目经理" field="projectMasterName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="创建人" field="createBy.name"></vxe-column>
+          <vxe-column min-width="160" align="center" title="创建时间" field="createDate"></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="getProgram()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+    </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import ProgramProjectListInfoService from '@/api/program/ProgramProjectListInfoService'
+  import ProjectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
+  export default {
+    data () {
+      return {
+        title: '项目选择',
+        method: '',
+        visible: false,
+        loading: false,
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        dataList: [],
+        searchForm: {
+          projectMasterName: '',
+          projectNumber: '',
+          projectName: '',
+          createDates: [],
+          status: ''
+        },
+        checkType: '',
+        detail: '',
+        isShow: true,
+        num: true // num为true是多选,false是单选
+      }
+    },
+    programProjectListInfoService: null,
+    projectRecordsService: null,
+    created () {
+      this.programProjectListInfoService = new ProgramProjectListInfoService()
+      this.projectRecordsService = new ProjectRecordsService()
+    },
+    components: {
+    },
+    methods: {
+      init (isShow, num) {
+        if (this.commonJS.isEmpty(isShow)) {
+          this.isShow = true
+          this.checkType = '1'
+        } else {
+          if (isShow === false || isShow === 'false') {
+            this.isShow = false
+            this.checkType = '1'
+            this.$message({message: '第一条为项目后面新增只能选择项目', type: 'warning', customClass: 'messageZindex'})
+          } else if (isShow === '1') {
+            this.isShow = false
+            this.checkType = '1'
+          } else {
+            this.isShow = false
+            this.checkType = '2'
+          }
+        }
+        if (this.commonJS.isEmpty(num) || num === true) {
+          this.num = true // num为true是多选,false是单选
+        } else {
+          this.num = false
+        }
+        this.visible = true
+        this.list()
+      },
+      // 表单提交
+      getProgram () {
+        let row = this.$refs.projectTable.getRadioRecord()
+        if (this.commonJS.isEmpty(row)) {
+          this.$message.error('请选择一条数据')
+          return
+        }
+        this.close()
+        this.$emit('getProgram', row)
+        // let rows
+        // if (this.checkType === '1') {
+        //   if (this.commonJS.isEmpty(this.$refs.programTable.getCheckboxRecords())) {
+        //     this.$message.error('请至少选择一条数据')
+        //     return
+        //   }
+        //   if (this.num === false) {
+        //     if (this.$refs.programTable.getCheckboxRecords().length > 1) {
+        //       this.$message.error('最多选择一条数据')
+        //       return
+        //     }
+        //   }
+        //   rows = this.$refs.programTable.getCheckboxRecords()
+        // } else {
+        //   if (this.commonJS.isEmpty(this.detail)) {
+        //     this.$message.error('请填写开票详情')
+        //     return
+        //   }
+        //   rows = [{name: this.detail}]
+        // }
+        // this.close()
+        // this.$emit('getProgram', rows)
+      },
+      list () {
+        this.loading = true
+        this.projectRecordsService.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
+        })
+        // this.programProjectListInfoService.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
+        // })
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+      close () {
+        this.detail = ''
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style>
+  .messageZindex {
+    z-index:9999 !important;
+  }
+</style>

+ 157 - 0
src/views/modules/cw/reportCancellApplyArchived/ReportCancellApplyArchivedChooseCom.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" @keyup.enter.native="refreshList()" @submit.native.prevent>
+          <!-- 搜索框-->
+          <el-form-item label="项目名称" prop="projectName">
+            <el-input size="small" v-model="searchForm.projectName" 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="projectTable"
+          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="reportNo"></vxe-column>
+          <vxe-column min-width="230" align="center" title="单据状态" field="documentStatus"></vxe-column>
+          <vxe-column min-width="230" align="center" title="项目名称" field="projectName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="报告申请单号" field="documentNo"></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="getProject()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+    </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import InputNumber from '@/views/modules/sys/workContract/InputNumber.vue'
+  // import ProjectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
+  import ReportCancellApplyService from '@/api/cw/reportCancellApply/ReportCancellApplyService'
+  import SelectUserTree from '@/views/modules/utils/treeUserSelect'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        dataList: [],
+        searchForm: {
+          projectName: ''
+        }
+      }
+    },
+    // projectRecordsService: null,
+    reportCancellApplyService: null,
+    created () {
+      // this.projectRecordsService = new ProjectRecordsService()
+      this.reportCancellApplyService = new ReportCancellApplyService()
+    },
+    components: {
+      SelectUserTree,
+      InputNumber
+    },
+    methods: {
+      init () {
+        this.visible = true
+        this.list()
+      },
+      // 表单提交
+      getProject () {
+        let row = this.$refs.projectTable.getRadioRecord()
+        if (this.commonJS.isEmpty(row)) {
+          this.$message.error('请选择一条数据')
+          return
+        }
+        this.close()
+        this.$emit('getProject', row)
+      },
+      list () {
+        this.loading = true
+        this.searchForm.createId = this.$store.state.user.id
+        this.searchForm.status = '5'
+        this.reportCancellApplyService.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
+        })
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+      close () {
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-dialog__body {
+    padding-top: 0px;
+    padding-bottom: 15px;
+  }
+</style>

+ 864 - 0
src/views/modules/cw/reportCancellApplyArchived/ReportCancellApplyArchivedForm.vue

@@ -0,0 +1,864 @@
+<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-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="fileNumber"-->
+                <!--                            :rules="[-->
+                <!--                   ]">-->
+                <!--                <el-input :disabled="true" v-model="inputForm.fileNumber" 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="12">
+                  <el-form-item label="归档类型" prop="carchivedType"
+                                :rules="[
+                   ]">
+                    <!--                <el-input size="medium" :disabled="true" :limit='1' :value="inputForm.carchivedType" placeholder="请选择归档类型" clearable></el-input>-->
+                    <el-select v-model="inputForm.carchivedType" placeholder="请选择归档类型" style="width:100%;">
+                      <el-option
+                        v-for="item in $dictUtils.getDictList('cw_carchived_type')"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value">
+                      </el-option>
+                    </el-select>
+                  </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-divider content-position="left"><i class="el-icon-document"></i> 审计报告</el-divider>
+              <el-row :gutter="15">
+                <el-col :span="12">
+                  <el-form-item label="报告文号" prop="reportNo"
+                                :rules="[
+                                {required: true, message:'报告文号不能为空', trigger:'blur'},
+                                {required: true, message:'报告文号不能为空', trigger:'change'}
+                   ]">
+                    <el-input :readonly="true" v-model="inputForm.reportNo" placeholder="请填写报告文号" clearable>
+                      <el-button slot="append" :disabled="formReadOnly" @click="openReportChoose" icon="el-icon-search"></el-button>
+                    </el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="报告日期" prop="reportDate"
+                                :rules="[
+                   ]">
+                    <el-input :disabled="true" v-model="inputForm.reportDate" placeholder="请填写报告日期" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="签字注师1" prop="signatureAnnotator1Name"
+                                :rules="[
+                   ]">
+                    <el-input :disabled="true" v-model="inputForm.signatureAnnotator1Name" placeholder="请填写签字注师1" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="签字注师2" prop="signatureAnnotator2Name"
+                                :rules="[
+                   ]">
+                    <el-input :disabled="true" v-model="inputForm.signatureAnnotator2Name" placeholder="请填写签字注师2" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="报告主办人" prop="reportCreateName"
+                                :rules="[
+                   ]">
+                    <el-input :disabled="true" v-model="inputForm.reportCreateName" placeholder="请填写报告主办人" clearable></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status !== 'audit'"
+                         label-width="135px" @submit.native.prevent>
+                  <el-col :span="24">
+                    <el-form-item label="审计意见" prop="reportRemarks"
+                                  :rules="[
+                   ]">
+                      <el-input type="textarea"  style="width:100%" maxlength="225" v-model="inputForm.reportRemarks" placeholder="请填写审计意见" show-word-limit></el-input>
+
+                    </el-form-item>
+                  </el-col>
+                </el-form>
+              </el-row>
+            </el-form>
+            <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
+              <el-tab-pane label="附件" name="files">
+                <!--        附件-->
+                <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+              </el-tab-pane>
+
+            </el-tabs>
+          </el-col>
+        </el-row>
+      </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>
+      <ReportChooseByProjectCom ref="reportChooseByProjectCom" @getReport="getReport"></ReportChooseByProjectCom>
+      <ProjectRecordsChooseCom ref="projectRecordsChooseCom" @getProject="getProject"></ProjectRecordsChooseCom>
+      <!--      <UpLoadComponentDialog ref="upLoadComponentDialog" @getUpload="getUpload"></UpLoadComponentDialog>-->
+<!--      <WorkContractChooseCom ref="workContractChooseCom" @getContract="getContract"></WorkContractChooseCom>-->
+<!--      <WorkClientChooseForm ref="workClientChooseForm" @getWorkClientChoose="getWorkClientChoose"></WorkClientChooseForm>-->
+      <ReportCancellApplyChooseCom  ref="reportCancellApplyChooseCom" @getProject="getContract"></ReportCancellApplyChooseCom>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import ProjectReportArchiveService from '@/api/cw/projectRecords/ProjectReportArchiveService'
+  import ReportCancellApplyArchivedService from '@/api/cw/reportCancellApplyArchived/ReportCancellApplyArchivedService'
+  import ReportCancellApplyService from '@/api/cw/reportCancellApply/ReportCancellApplyService'
+  import UpLoadComponent from '@/views/common/UpLoadComponent'
+  import SelectUserTree from '@/views/modules/utils/treeUserSelect'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
+  import UserSelect from '@/components/userSelect'
+  import ProjectRecordsChooseCom from '@/views/modules/cw/projectRecords/ProjectRecordsChooseCom'
+  import ProjectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
+  import EnterpriseSearchService from '@/api/cw/common/EnterpriseSearchService'
+  import WorkClientChooseForm from '../workClientInfo/WorkClientChooseForm'
+  import WorkContractChooseCom from '../projectRecords/WorkContractChooseCom'
+  import ProjectReportService from '@/api/cw/reportManagement/ProjectReportService'
+  import UpLoadComponentDialog from '@/views/common/UpLoadComponentDialog'
+  import ReportCancellApplyChooseCom from './ReportCancellApplyArchivedChooseCom'
+  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: '',
+          auditedUnits: '',
+          reportNum: '',
+          papersNum: '',
+          year: '',
+          number: '',
+          isNumber: '',
+          auditDate: '',
+          carchivedType: '',
+          archiveId: '',  // 报告作废id
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          workAttachmentDtoList: [],
+          // cwProjectReportArchiveReportDTOList: [],
+          cwProjectRecordsDTO: {
+            remarks: '',
+            projectNumber: '',
+            projectName: '',
+            officeId: '',
+            projectMoney: '',
+            auditYear: '',
+            planStartDate: '',
+            planEndDate: '',
+            projectMasterId: '',
+            projectLeaderId: '',
+            procInsId: '',
+            processDefinitionId: '',
+            status: '',
+            contractId: ''
+          },
+          fileNumber: '',
+          reportDate: '',
+          reportNo: '',
+          signatureAnnotator1: '',
+          signatureAnnotator1Name: '',
+          signatureAnnotator2: '',
+          signatureAnnotator2Name: '',
+          reportCreateName: '',
+          reportId: ''
+        },
+        keyWatch: '',
+        activeName: 'newRow',
+        tableKey: '',
+        tableKeyClient: '1',
+        visible: false
+      }
+    },
+    projectReportArchiveService: null,
+    reportCancellApplyArchivedService: null,
+    ReportCancellApplyService: null,
+    projectRecordsService: null,
+    enterpriseSearchService: null,
+    projectReportService: null,
+    created () {
+      this.projectReportArchiveService = new ProjectReportArchiveService()
+      this.reportCancellApplyArchivedService = new ReportCancellApplyArchivedService()
+      this.enterpriseSearchService = new EnterpriseSearchService()
+      this.projectReportService = new ProjectReportService()
+      this.projectRecordsService = new ProjectRecordsService()
+      this.reportCancellApplyService = new ReportCancellApplyService()
+    },
+    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: {
+      ProjectRecordsChooseCom,
+      SelectUserTree,
+      UpLoadComponent,
+      SelectTree,
+      UserSelect,
+      WorkClientChooseForm,
+      WorkContractChooseCom,
+      UpLoadComponentDialog,
+      ReportCancellApplyChooseCom,
+      ReportChooseByProjectCom
+    },
+    methods: {
+      openContractForm () {
+        if (!this.commonJS.isEmpty(this.inputForm.contractId)) {
+          this.$refs.reportCancellApplyChooseCom.init()
+        } else {
+          this.$refs.reportCancellApplyChooseCom.init()
+        }
+      },
+      seeFileInfo (index) {
+        if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].cwFileInfoList)) {
+          this.inputForm.cwProjectInfoList[index].cwFileInfoList = []
+        }
+        this.$refs.upLoadComponentDialog.newUpload('view', this.inputForm.cwProjectInfoList[index].cwFileInfoList, null, null, null, null, null, false, index)
+      },
+      sss (index) {
+        if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].cwFileInfoList)) {
+          this.inputForm.cwProjectInfoList[index].cwFileInfoList = []
+        }
+        this.$refs.upLoadComponentDialog.newUpload(null, this.inputForm.cwProjectInfoList[index].cwFileInfoList, null, null, null, null, null, false, index)
+      },
+      getUpload (p, index) {
+        p.then((list) => {
+          // list为返回数据
+          this.inputForm.cwProjectInfoList[index].cwFileInfoList = list
+          this.inputForm.cwProjectInfoList[index].fileNumber = list.length
+          this.tableKeyClient = Math.random()
+          // console.log('this.inputForm.cwFileInfoList', this.inputForm.cwFileInfoList)
+          // console.log('list.length', list.length)
+          // console.log(list)
+        })
+      },
+      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 = 'files'
+        this.projectRecordsService = new ProjectRecordsService()
+        this.projectReportArchiveService = new ProjectReportArchiveService()
+        this.reportCancellApplyArchivedService = new ReportCancellApplyArchivedService()
+        this.method = method
+        this.inputForm = {
+          id: '',
+          createDate: '',
+          createBy: {
+            id: '',
+            name: JSON.parse(localStorage.getItem('user')).name
+          },
+          remarks: '',
+          projectId: '',
+          auditedUnits: '',
+          reportNum: '',
+          papersNum: '',
+          year: '',
+          number: '',
+          isNumber: '',
+          auditDate: '',
+          carchivedType: '',
+          archiveId: '',  // 报告作废id
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          workAttachmentDtoList: [],
+          // cwProjectReportArchiveReportDTOList: [],
+          cwProjectRecordsDTO: {
+            remarks: '',
+            projectNumber: '',
+            projectName: '',
+            officeId: '',
+            projectMoney: '',
+            auditYear: '',
+            planStartDate: '',
+            planEndDate: '',
+            projectMasterId: '',
+            projectLeaderId: '',
+            procInsId: '',
+            processDefinitionId: '',
+            status: '',
+            contractId: ''
+          },
+          fileNumber: '',
+          reportDate: '',
+          reportNo: '',
+          signatureAnnotator1: '',
+          signatureAnnotator1Name: '',
+          signatureAnnotator2: '',
+          signatureAnnotator2Name: '',
+          reportCreateName: '',
+          reportId: ''
+        }
+        this.inputForm.id = id
+        this.loading = false
+        this.$nextTick(() => {
+          this.$refs.inputForm.resetFields()
+          this.loading = true
+          this.reportCancellApplyArchivedService.queryById(this.inputForm.id).then(({data}) => {
+            this.inputForm.id = id
+            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'
+            }
+            console.log('this.inputForm.id', data)
+            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.reportCancellApplyService.queryById(this.inputForm.id).then(({data}) => {
+          if (this.inputForm.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.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+          // this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+          let _this = this
+          if (_this.inputForm.isNumber !== _this.inputForm.number) {
+            _this.$message.error('“案卷号”与“确认案卷号”不一致,请重新填写')
+            _this.loading = false
+            throw new Error('“案卷号”与“确认案卷号”不一致,请重新填写')
+          }
+          _this.inputForm.workAttachmentDtoList = _this.$refs.uploadComponent.getDataList()
+          this.reportCancellApplyArchivedService.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'
+        } else if (status === 'agree') {
+          // 审核同意
+          this.inputForm.agreeDate = 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['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            // if (this.$refs.uploadComponent.checkProgress()) {
+            //   this.loading = false
+            //   return
+            // }
+            // this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+            if (this.commonJS.isEmpty(this.inputForm.createDate)) {
+              this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+            }
+            this.inputForm.cwProjectInfoList.forEach((item, index) => {
+              if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].reportDate)) {
+                this.$message.error('报告日期不能为空')
+                this.loading = false
+                throw new Error('报告日期不能为空')
+              }
+              if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].reportType)) {
+                this.$message.error('报告类型不能为空')
+                this.loading = false
+                throw new Error('报告类型不能为空')
+              }
+              if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].opinionType)) {
+                this.$message.error('意见类型不能为空')
+                this.loading = false
+                throw new Error('意见类型不能为空')
+              }
+            })
+            this.projectReportService.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.reportCancellApplyService.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.reportCancellApplyService.updateStatusById(param)
+              }
+              if (type === 'reback') {
+                // 撤回
+                let param = {status: '3', id: this.inputForm.id}
+                this.reportCancellApplyService.updateStatusById(param)
+              }
+            }
+          })
+        }
+      },
+      close () {
+        this.inputForm = {
+          id: '',
+          createDate: '',
+          createBy: {
+            id: '',
+            name: ''
+          },
+          remarks: '',
+          projectId: '',
+          auditedUnits: '',
+          reportNum: '',
+          papersNum: '',
+          year: '',
+          number: '',
+          isNumber: '',
+          auditDate: '',
+          carchivedType: '',
+          archiveId: '',  // 报告作废id
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          workAttachmentDtoList: [],
+          // cwProjectReportArchiveReportDTOList: [],
+          cwProjectRecordsDTO: {
+            remarks: '',
+            projectNumber: '',
+            projectName: '',
+            officeId: '',
+            projectMoney: '',
+            auditYear: '',
+            planStartDate: '',
+            planEndDate: '',
+            projectMasterId: '',
+            projectLeaderId: '',
+            procInsId: '',
+            processDefinitionId: '',
+            status: '',
+            contractId: ''
+          },
+          fileNumber: '',
+          reportDate: '',
+          reportNo: '',
+          signatureAnnotator1: '',
+          signatureAnnotator1Name: '',
+          signatureAnnotator2: '',
+          signatureAnnotator2Name: '',
+          reportCreateName: '',
+          reportId: ''
+        }
+        this.$refs.uploadComponent.clearUpload()
+        this.$refs.inputForm.resetFields()
+        this.inputForm.reportId = ''
+        this.inputForm.projectId = ''
+        this.visible = false
+      },
+      tabHandleClick (event) {
+        // console.log(event)
+      },
+      // 新增
+      // eslint-disable-next-line no-dupe-keys
+      // insertEvent (type) {
+      //   if (type === 'client') {
+      //     let d = {
+      //       no: '',
+      //       name: '',
+      //       companyLevel: ''
+      //     }
+      //     if (this.commonJS.isEmpty(this.inputForm.cwProjectClientInfoDTOList)) {
+      //       this.inputForm.cwProjectClientInfoDTOList = []
+      //     }
+      //     this.$refs.clientTable.insertAt(d)
+      //     this.inputForm.cwProjectClientInfoDTOList.push(d)
+      //     this.tableKeyClient = Math.random()
+      //   }
+      // },
+      clearClientList () {
+        // 项目直接对接联系人列表清除
+        this.inputForm.clientList = []
+        this.$forceUpdate()
+      },
+      // 删除
+      removeEvent (row, rowIndex, type) {
+        if (type === 'client') {
+          this.$refs.clientTable.remove(row)
+          // this.inputForm.cwProjectClientInfoDTOList.splice(rowIndex, 1)
+          this.inputForm.cwProjectInfoList.splice(rowIndex, 1)
+        }
+      },
+      openWorkClient () {
+        this.$refs.workClientChooseForm.init()
+      },
+      getWorkClientChoose (list) {
+        if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList)) {
+          this.inputForm.cwProjectInfoList = []
+        }
+        let _this = this
+        let _list = list
+        const waitForEach = function () {
+          return new Promise(function (resolve, reject) {
+            _list.forEach((item) => {
+              _this.inputForm.cwProjectInfoList.forEach(client => {
+                if (item.id === client.servedUnitId) {
+                  // _this.$message.error('已存在客户 “' + client.servedUnitName + '”,请重新选择')
+                  // throw new Error('已存在客户 “' + client.servedUnitName + '”,请重新选择')
+                }
+              })
+            })
+            resolve()
+          })
+        }
+        waitForEach().then(() => {
+          list.forEach(item => {
+            // eslint-disable-next-line no-unused-vars
+            let d = {
+              servedUnitName: item.name, // 被服务单位名称
+              reportNumber: this.inputForm.projectNumber + '-0' + (this.inputForm.cwProjectInfoList.length + 1), // 报告流水号
+              issueReport: '是',
+              sealType: '未盖章',
+              id: this.uuid,
+              servedUnitId: item.id
+            }
+            // console.log('新增行数据填入')
+            // console.log('item', item)
+            // console.log('d', d)
+            this.$refs.clientTable.insertAt(d)
+            this.inputForm.cwProjectInfoList.push(d)
+            // console.log('this.inputForm.cwProjectInfoList', this.inputForm.cwProjectInfoList)
+            this.tableKeyClient = Math.random()
+          })
+        })
+      },
+      getContract (row) {
+        // console.log('row', row)
+        this.inputForm.projectName = row.projectName // 项目名称
+        this.inputForm.projectId = row.id // 项目id
+        this.inputForm.projectMasterName = row.projectMasterName // 项目经理
+        this.inputForm.reportNo = row.reportNo // 报告文号
+        this.inputForm.reportNewLineId = row.reportNewLineId // 新建行id
+        this.clearClientList()
+        this.$forceUpdate()
+      },
+      openContract () {
+        this.$refs.workContractChooseCom.init()
+      },
+      // 打开项目选择组件
+      openChooseProject (event) {
+        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 = []
+      },
+      // 打开审计报告选择组件
+      openReportChoose () {
+        this.$refs.reportChooseByProjectCom.init(this.inputForm.projectId, this.inputForm.id)
+      },
+      // 审计报告选择结果获取
+      getReport (row) {
+        if (this.commonJS.isNotEmpty(row)) {
+          if (this.commonJS.isNotEmpty(row.reportId)) {
+            this.projectReportArchiveService.findReportUse(row.reportId).then(({data}) => {
+              if (data === false) {
+                this.inputForm.reportDate = row.reportDate
+                this.inputForm.reportNo = row.reportNo
+                this.inputForm.signatureAnnotator1 = row.signatureAnnotator1
+                this.inputForm.signatureAnnotator1Name = row.signatureAnnotator1Name
+                this.inputForm.signatureAnnotator2 = row.signatureAnnotator2
+                this.inputForm.signatureAnnotator2Name = row.signatureAnnotator2Name
+                this.inputForm.reportCreateName = row.createName
+                this.inputForm.reportId = row.reportId
+              } else {
+                this.$message.error('此报告正在归档中或已归档,请重新选择')
+              }
+            })
+          }
+        }
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-input-number .el-input__inner {
+    text-align: left;
+  }
+</style>

+ 570 - 0
src/views/modules/cw/reportCancellApplyArchived/ReportCancellApplyArchivedList.vue

@@ -0,0 +1,570 @@
+<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="projectNumber">
+        <el-input size="small" v-model="searchForm.projectNumber" placeholder="请输入项目编号" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="项目名称" prop="projectName">
+        <el-input size="small" v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="项目经理" prop="projectMasterId">
+        <SelectUserTree
+          ref="companyTree"
+          :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+          :url="`/sys/user/treeUserDataAllOffice?type=2`"
+          :value="searchForm.projectMasterId"
+          :clearable="true"
+          :accordion="true"
+          @getValue="(value) => {searchForm.projectMasterId=value}"/>
+<!--        <el-input size="small" v-model="searchForm.projectMaster" placeholder="请输入项目经理" clearable></el-input>-->
+      </el-form-item>
+<!--      <el-form-item label="创建人" prop="createBy">-->
+<!--        <el-input size="small" v-model="searchForm.createBy" placeholder="请输入创建人" clearable></el-input>-->
+<!--      </el-form-item>-->
+      <el-form-item label="创建人" prop="createBy">
+        <SelectUserTree
+          ref="companyTree"
+          :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+          :url="`/sys/user/treeUserDataAllOffice?type=2`"
+          :value="searchForm.createBy"
+          :clearable="true"
+          :accordion="true"
+          @getValue="(value) => {searchForm.createBy=value}"/>
+      </el-form-item>
+      <el-form-item label="创建时间" prop="contractDates">
+        <el-date-picker
+          placement="bottom-start"
+          format="yyyy-MM-dd HH:mm:ss"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          v-model="searchForm.contractDates"
+          type="datetimerange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期">
+        </el-date-picker>
+      </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('cw_work_client:info: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="clientTable"
+          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="160" align="center" title="单据编号" field="documentNo">
+            <template slot-scope="scope">
+              <el-link  type="primary" :underline="false" v-if="hasPermission('cwProjectReport:list')" @click="view(scope.row.id)">{{scope.row.documentNo}}</el-link>
+              <el-link  type="primary" :underline="false" v-else-if="hasPermission('cwProjectReport:list')"  @click="view(scope.row.id,)">{{scope.row.documentNo}}</el-link>
+              <span v-else>{{scope.row.documentNo}}</span>
+            </template>
+          </vxe-column>
+          <vxe-column min-width="160" align="center" title="项目编号" field="projectNumber"></vxe-column>
+          <vxe-column min-width="160" align="center" title="项目名称" field="projectName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="报告所属部门" field="departmentName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="项目经理" field="projectMasterName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="报告主办人" field="reportSponsor"></vxe-column>
+          <vxe-column min-width="160" align="center" title="创建人" field="userName"></vxe-column>
+          <vxe-column min-width="160" 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  min-width="150px"align="center" fixed="right" title="作废归档状态" field="applyFileType" >
+            <template slot-scope="scope">
+              <el-button  type="text" @click="detail(scope.row)" effect="dark" size="mini"
+                          :type="$dictUtils.getDictLabel('filed_type_status', scope.row.applyFileType, '-')">
+                {{$dictUtils.getDictLabel("filed_type", scope.row.applyFileType, '-')}}
+              </el-button>
+<!--              <template slot-scope="scope">-->
+<!--                <el-button  type="text" @click="detailPaperFiled(scope.row)" :type="$dictUtils.getDictLabel('filed_type_status', scope.row.applyFileType, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("filed_type", scope.row.applyFileType, '未归档')}} </el-button>-->
+<!--              </template>-->
+            </template>
+          </vxe-column>
+
+          <vxe-column title="操作" width="150px" fixed="right" align="center">
+            <template  slot-scope="scope">
+              <el-button v-if="hasPermission('cw:cwProjectReport:filed')&&scope.row.createById === $store.state.user.id&&scope.row.status==='5'&& (scope.row.applyFileType === undefined || scope.row.applyFileType === '0')" type="text"  size="small" @click="archived(scope.row.id)">归档</el-button>
+              <!--归档暂存修改-->
+              <el-button v-if="hasPermission('cw:cwProjectReport:filed') && scope.row.status === '5'  && scope.row.createId === $store.state.user.id && scope.row.applyFileType === '1'" type="text" size="small" @click="archived(scope.row.id)">修改</el-button>
+              <el-button v-else-if="hasPermission('cw:cwProjectReport:edit')&&isAdmin&&(scope.row.applyFileType==='1'||scope.row.applyFileType==='3'||scope.row.applyFileType==='4'||scope.row.applyFileType==='5')" type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>
+              <!--纸质归档撤回驳回修改-->
+              <el-button v-if="hasPermission('cw:cwProjectReport:filed') && scope.row.status === '5'  && scope.row.createId === $store.state.user.id && (scope.row.applyFileType === '3' || scope.row.applyFileType === '4')" type="text" size="small" @click="paperFiledAndClose(scope.row.id)">修改</el-button>
+              <!--纸质归档撤回-->
+              <el-button v-if="hasPermission('cw:cwProjectReport:back') && scope.row.status === '5'  && scope.row.applyFileType === '2'" type="text"  size="small" @click="rebackPaperFiled(scope.row)">撤回</el-button>
+<!--              <el-button v-else-if="hasPermission('cw:cwProjectReport:del')&&isAdmin&&(scope.row.applyFileType==='1'||scope.row.applyFileType==='3'||scope.row.applyFileType==='4'||scope.row.applyFileType==='5')" type="text"   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>
+    </div>
+<!--    <ReportManagementForm ref="reportManagementForm"></ReportManagementForm>-->
+    <ReportCancellApplyForm ref="reportCancellApplyForm"></ReportCancellApplyForm>
+  </div>
+</template>
+
+<script>
+  import WorkClientService from '@/api/cw/workClientInfo/WorkClientService'
+  // import ProjectReportService from '@/api/cw/reportManagement/ProjectReportService'
+  // import ReportCancellApplyService from '@/api/cw/reportCancellApply/ReportCancellApplyService'
+  import ReportCancellApplyArchivedService from '@/api/cw/reportCancellApplyArchived/ReportCancellApplyArchivedService'
+  import TaskService from '@/api/flowable/TaskService'
+  import ProcessService from '@/api/flowable/ProcessService'
+  // import ReportManagementForm from '../reportManagement/ReportManagementForm'
+  import ReportCancellApplyForm from './ReportCancellApplyArchivedForm'
+  // eslint-disable-next-line no-unused-vars
+  import pick from 'lodash.pick'
+  import UserService from '@/api/sys/UserService'
+  import SelectUserTree from '@/views/modules/utils/treeUserSelect'
+  export default {
+    data () {
+      return {
+        searchForm: {
+          projectNumber: '',
+          projectName: '',
+          projectMasterId: '',
+          createBy: '',
+          contractDates: []
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        tableKey: '',
+        loading: false,
+        processDefinitionAuditId: '',
+        procDefAuditKey: '',
+        isAdmin: false,
+        create: ''
+      }
+    },
+    workClientService: null,
+    // projectReportService: null,
+    reportCancellApplyService: null,
+    reportCancellApplyArchivedService: null,
+    taskService: null,
+    processService: null,
+    userService: null,
+    created () {
+      this.workClientService = new WorkClientService()
+      // this.projectReportService = new ProjectReportService()
+      // this.reportCancellApplyService = new ReportCancellApplyService()
+      this.reportCancellApplyArchivedService = new ReportCancellApplyArchivedService()
+      this.taskService = new TaskService()
+      this.processService = new ProcessService()
+      this.userService = new UserService()
+    },
+    components: {
+      // ReportManagementForm
+      ReportCancellApplyForm,
+      SelectUserTree
+    },
+    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.reportManagementForm.init('add', '')
+        this.$refs.reportCancellApplyForm.init('add', '')
+      },
+      // 修改
+      edit (id) {
+        id = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+        // this.$refs.reportManagementForm.init('edit', id)
+        this.$refs.reportCancellApplyForm.init('edit', id)
+      },
+      // 查看
+      view (id) {
+        // this.$refs.reportManagementForm.init('view', id)
+        this.$refs.reportCancellApplyForm.init('view', id)
+      },
+      // 查询当前用户是否是管理员用户
+      checkIsAdmin () {
+        this.userService.is().then(({data}) => {
+          this.isAdmin = data
+        })
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.reportCancellApplyArchivedService.findList({
+          '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.reportCancellApplyService.findList({
+        //   '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.clientTable.getCheckboxRecords().map(item => {
+          return item.id
+        }).join(',')
+        this.$confirm(`确定删除所选项吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.reportCancellApplyArchivedService.delete(ids).then(({data}) => {
+            this.$message.success(data)
+            this.refreshList()
+            this.loading = false
+          })
+          // this.reportCancellApplyService.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: {
+                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+                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/reportCancellApply/ReportCancellApplyList'
+              }
+            })
+          })
+      }, */
+      // 发起客户登记
+      /* 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_report_cancell_apply'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+                procDefId: this.processDefinitionAuditId,
+                procDefKey: this.procDefAuditKey,
+                title: title,
+                formType: data.data.formType,
+                formUrl: data.data.formUrl,
+                formTitle: processTitle,
+                businessTable: 'cw_project_report_cancell_apply',
+                businessId: row.id,
+                isShow: 'false',
+                status: status,
+                routePath: '/cw/reportCancellApply/ReportCancellApplyList'
+              }
+            })
+          })
+      }, */
+      // 查看流程结果
+      detail (row) {
+        if (row.applyFileType !== '0' && row.applyFileType !== '1') {
+          this.reportCancellApplyArchivedService.findByContractInfoId(row.id).then(({data}) => {
+            if (!this.commonJS.isEmpty(data.id)) {
+              console.log('data', data)
+              this.taskService.getTaskDef({
+                procInsId: data.cwProcInsId,
+                procDefId: data.cwProDefId
+              }).then(({data}) => {
+                this.$router.push({
+                  path: '/flowable/task/TaskFormDetail',
+                  query: {
+                    readOnly: true,
+                    title: '报告作废归档流程详情',
+                    formTitle: '报告作废归档流程详情',
+                    businessId: row.id,
+                    ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title')}
+                })
+              })
+            }
+          })
+          // eslint-disable-next-line eqeqeq
+          // this.taskService.getTaskDef({
+          //   procInsId: row.cwProcInsId,
+          //   procDefId: row.cwProDefId
+          // }).then(({data}) => {
+          //   this.$router.push({
+          //     path: '/flowable/task/TaskFormDetail',
+          //     query: {
+          //       ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+          //       isShow: 'false',
+          //       readOnly: true,
+          //       title: '质控管理' + '流程详情',
+          //       formTitle: '质控管理' + '流程详情',
+          //       businessId: row.id,
+          //       status: 'reback'
+          //     }
+          //   })
+          // })
+        }
+      },
+      // 撤回报告流程
+      /* reback (row) {
+        this.$confirm(`确定要撤回该申请吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(async () => {
+          await this.reportCancellApplyService.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.reportCancellApplyService.updateStatusById(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
+            }
+          })
+          // await this.projectReportService.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.projectReportService.updateStatusById(form)
+          //       this.$message.success(data)
+          //       this.refreshList()
+          //     })
+          //   }
+          // })
+        })
+      } */
+      // 报告作废归档
+      archived (id) {
+        this.processService.getByName('财务-报告作废归档').then(({data}) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            // console.log('data', data)
+            // 读取流程表单
+            let tabTitle = `发起流程【财务-报告作废归档】`
+            let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [财务-报告作废归档]`
+            this.taskService.getTaskDef({ procDefId: data.id,
+              businessId: id,
+              businessTable: 'cw_project_report_cancell_apply_archived',
+              status: 'startAndHoldFiled'}).then((reture) => {
+                this.$router.push({
+                  path: '/flowable/task/TaskForm',
+                  query: {
+                    procDefId: data.id,
+                    procDefKey: data.key,
+                    status: 'startAndHoldFiled',
+                    title: tabTitle,
+                    formType: reture.data.formType,
+                    formUrl: reture.data.formUrl,
+                    formTitle: processTitle,
+                    businessTable: 'cw_project_report_cancell_apply_archived',
+                    businessId: id,
+                    isShow: false,
+                    routePath: '/cw/reportCancellApplyArchived/ReportCancellApplyArchivedList'
+                  }
+                })
+              })
+          }
+        })
+      },
+      // 归档撤回驳回修改
+      paperFiledAndClose (id) {
+        this.processService.getByName('财务-报告作废归档').then(({data}) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            // console.log('data', data)
+            // 读取流程表单
+            let tabTitle = `发起流程【财务-报告作废归档】`
+            let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [财务-报告作废归档]`
+            this.taskService.getTaskDef({ procDefId: data.id,
+              businessId: id,
+              businessTable: 'cw_project_report_cancell_apply_archived',
+              status: 'startAndCloseFiled'}).then((reture) => {
+                this.$router.push({
+                  path: '/flowable/task/TaskForm',
+                  query: {
+                    procDefId: data.id,
+                    procDefKey: data.key,
+                    status: 'startAndCloseFiled',
+                    title: tabTitle,
+                    formType: reture.data.formType,
+                    formUrl: reture.data.formUrl,
+                    formTitle: processTitle,
+                    businessTable: 'cw_project_report_cancell_apply_archived',
+                    businessId: id,
+                    isShow: false,
+                    routePath: '/cw/reportCancellApplyArchived/ReportCancellApplyArchivedList'
+                  }
+                })
+              })
+          }
+        })
+      },
+      // 归档撤回
+      rebackPaperFiled (row) {
+        // console.log('row.taskFiledProcInsId' + row.taskFiledProcInsId)
+        this.$confirm(`确定撤回流程吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.processService.revokeProcIns(row.cwProcInsId).then(({data}) => {
+            // let form = {filedType: '3', id: row.id}
+            this.updateStatusById(row, 'rebackFiledPaper')
+            this.$message.success(data)
+            this.refreshList()
+          })
+        })
+      },
+      updateStatusById (row, type) {
+        if (type === 'rebackFiledPaper') {
+          row.status = '3'
+          this.reportCancellApplyArchivedService.updateStatusById(row)
+        }
+      }
+      // 归档详情
+      // detailPaperFiled (row) {
+      //   // console.log('row.id', row.id)
+      //   // eslint-disable-next-line eqeqeq
+      //   if (!this.commonJS.isEmpty(row.applyFileType) && row.applyFileType != '1') {
+      //     this.reportCancellApplyService.findByContractInfoId(row.id).then(({data}) => {
+      //       if (!this.commonJS.isEmpty(data.id)) {
+      //         // console.log('data', data)
+      //         this.taskService.getTaskDef({
+      //           procInsId: data.cwProcInsId,
+      //           procDefId: data.cwProDefId
+      //         }).then(({data}) => {
+      //           this.$router.push({
+      //             path: '/flowable/task/TaskFormDetail',
+      //             query: {
+      //               readOnly: true,
+      //               title: '纸质归档流程详情',
+      //               formTitle: '纸质归档流程详情',
+      //               businessId: row.id,
+      //               ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title')}
+      //           })
+      //         })
+      //       }
+      //     })
+      //   }
+      // }
+    }
+  }
+</script>

+ 769 - 0
src/views/modules/cw/reportCancellApplyArchived/ReportCancellApplyArchivedTaskForm.vue

@@ -0,0 +1,769 @@
+<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="fileNumber"-->
+<!--                            :rules="[-->
+<!--                   ]">-->
+<!--                <el-input :disabled="true" v-model="inputForm.fileNumber" 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="12">
+              <el-form-item label="归档类型" prop="carchivedType"
+                            :rules="[
+                   ]">
+<!--                <el-input size="medium" :disabled="true" :limit='1' :value="inputForm.carchivedType" placeholder="请选择归档类型" clearable></el-input>-->
+                <el-select v-model="inputForm.carchivedType" placeholder="请选择归档类型" style="width:100%;">
+                  <el-option
+                    v-for="item in $dictUtils.getDictList('cw_carchived_type')"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                  </el-option>
+                </el-select>
+              </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-divider content-position="left"><i class="el-icon-document"></i> 审计报告</el-divider>
+          <el-row :gutter="15">
+            <el-col :span="12">
+              <el-form-item label="报告文号" prop="reportNo"
+                            :rules="[
+                                {required: true, message:'报告文号不能为空', trigger:'blur'},
+                                {required: true, message:'报告文号不能为空', trigger:'change'}
+                   ]">
+                <el-input :readonly="true" v-model="inputForm.reportNo" placeholder="请填写报告文号" clearable>
+                  <el-button slot="append" :disabled="formReadOnly" @click="openReportChoose" icon="el-icon-search"></el-button>
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="报告日期" prop="reportDate"
+                            :rules="[
+                   ]">
+                <el-input :disabled="true" v-model="inputForm.reportDate" placeholder="请填写报告日期" clearable></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="签字注师1" prop="signatureAnnotator1Name"
+                            :rules="[
+                   ]">
+                <el-input :disabled="true" v-model="inputForm.signatureAnnotator1Name" placeholder="请填写签字注师1" clearable></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="签字注师2" prop="signatureAnnotator2Name"
+                            :rules="[
+                   ]">
+                <el-input :disabled="true" v-model="inputForm.signatureAnnotator2Name" placeholder="请填写签字注师2" clearable></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="报告主办人" prop="reportCreateName"
+                            :rules="[
+                   ]">
+                <el-input :disabled="true" v-model="inputForm.reportCreateName" placeholder="请填写报告主办人" clearable></el-input>
+              </el-form-item>
+            </el-col>
+            <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status !== 'audit'"
+                     label-width="135px" @submit.native.prevent>
+              <el-col :span="24">
+                <el-form-item label="审计意见" prop="reportRemarks"
+                              :rules="[
+                   ]">
+                  <el-input type="textarea"  style="width:100%" maxlength="225" v-model="inputForm.reportRemarks" placeholder="请填写审计意见" show-word-limit></el-input>
+
+                </el-form-item>
+              </el-col>
+            </el-form>
+          </el-row>
+        </el-form>
+        <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
+          <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/UpLoadComponent'
+  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 ReportCancellApplyArchivedService from '@/api/cw/reportCancellApplyArchived/ReportCancellApplyArchivedService'
+  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: '',
+          auditedUnits: '',
+          reportNum: '',
+          papersNum: '',
+          year: '',
+          number: '',
+          isNumber: '',
+          auditDate: '',
+          carchivedType: '',
+          archiveId: '',  // 报告作废id
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          workAttachmentDtoList: [],
+          // cwProjectReportArchiveReportDTOList: [],
+          cwProjectRecordsDTO: {
+            remarks: '',
+            projectNumber: '',
+            projectName: '',
+            officeId: '',
+            projectMoney: '',
+            auditYear: '',
+            planStartDate: '',
+            planEndDate: '',
+            projectMasterId: '',
+            projectLeaderId: '',
+            procInsId: '',
+            processDefinitionId: '',
+            status: '',
+            contractId: ''
+          },
+          fileNumber: '',
+          reportDate: '',
+          reportNo: '',
+          signatureAnnotator1: '',
+          signatureAnnotator1Name: '',
+          signatureAnnotator2: '',
+          signatureAnnotator2Name: '',
+          reportCreateName: '',
+          reportId: ''
+        },
+        keyWatch: '',
+        activeName: 'files',
+        tableKeyReport: ''
+      }
+    },
+    projectRecordsService: null,
+    projectReportArchiveService: null,
+    reportCancellApplyArchivedService: null,
+    created () {
+      this.projectRecordsService = new ProjectRecordsService()
+      this.projectReportArchiveService = new ProjectReportArchiveService()
+      this.reportCancellApplyArchivedService = new ReportCancellApplyArchivedService()
+    },
+    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 = 'files'
+        this.projectRecordsService = new ProjectRecordsService()
+        this.projectReportArchiveService = new ProjectReportArchiveService()
+        this.reportCancellApplyArchivedService = new ReportCancellApplyArchivedService()
+        this.method = method
+        this.inputForm = {
+          id: '',
+          createDate: '',
+          createBy: {
+            id: '',
+            name: JSON.parse(localStorage.getItem('user')).name
+          },
+          remarks: '',
+          projectId: '',
+          auditedUnits: '',
+          reportNum: '',
+          papersNum: '',
+          year: '',
+          number: '',
+          isNumber: '',
+          auditDate: '',
+          carchivedType: '',
+          archiveId: '',  // 报告作废id
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          workAttachmentDtoList: [],
+          // cwProjectReportArchiveReportDTOList: [],
+          cwProjectRecordsDTO: {
+            remarks: '',
+            projectNumber: '',
+            projectName: '',
+            officeId: '',
+            projectMoney: '',
+            auditYear: '',
+            planStartDate: '',
+            planEndDate: '',
+            projectMasterId: '',
+            projectLeaderId: '',
+            procInsId: '',
+            processDefinitionId: '',
+            status: '',
+            contractId: ''
+          },
+          fileNumber: '',
+          reportDate: '',
+          reportNo: '',
+          signatureAnnotator1: '',
+          signatureAnnotator1Name: '',
+          signatureAnnotator2: '',
+          signatureAnnotator2Name: '',
+          reportCreateName: '',
+          reportId: ''
+        }
+        this.inputForm.id = id
+        this.loading = false
+        this.$nextTick(() => {
+          this.$refs.inputForm.resetFields()
+          this.loading = true
+          this.reportCancellApplyArchivedService.queryById(this.inputForm.id).then(({data}) => {
+            this.inputForm.id = id
+            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'
+            }
+            console.log('this.inputForm.id', data)
+            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.reportCancellApplyArchivedService.queryById(this.inputForm.id).then(({data}) => {
+          if (data.applyFileType !== '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
+          })
+          console.log('this.inputForm', this.inputForm)
+          this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+          this.reportCancellApplyArchivedService.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
+              throw new Error()
+            } else {
+              let _this = this
+              const wait = function () {
+                return new Promise(async (resolve, reject) => {
+                  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.inputForm.workAttachmentDtoList = _this.$refs.uploadComponent.getDataList()
+                  // await _this.$refs.uploadComponent.getDataList().then((list) => {
+                  //   // list为返回数据
+                  //   _this.inputForm.workAttachmentDtoList = list
+                  //   list.forEach(item => {
+                  //     if (_this.commonJS.isEmpty(item.fileType)) {
+                  //       _this.$message.error('附件中的文件类型不可以为空')
+                  //       _this.loading = false
+                  //       throw new Error('附件中的文件类型不可以为空')
+                  //     }
+                  //   })
+                  // })
+                  if (_this.commonJS.isEmpty(_this.inputForm.createDate)) {
+                    _this.inputForm.createDate = _this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+                  }
+                  resolve()
+                })
+              }
+              wait().then(() => {
+                this.reportCancellApplyArchivedService.saveForm(this.inputForm).then(({data}) => {
+                  callback(data.businessTable, data.businessId, this.inputForm)
+                  this.loading = false
+                }).catch(() => {
+                  this.loading = false
+                  throw new Error()
+                })
+              })
+            }
+          }
+        })
+      },
+      async updateStatusById (type) {
+        if (type === 'reject' || type === 'reback') {
+          if (await this.$refs.uploadComponent.checkProgress()) {
+            this.loading = false
+            throw new Error()
+          }
+          await this.reportCancellApplyArchivedService.queryById(this.inputForm.id).then(({data}) => {
+            if (data.applyFileType !== '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.reportCancellApplyArchivedService.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: '',
+          auditedUnits: '',
+          reportNum: '',
+          papersNum: '',
+          year: '',
+          number: '',
+          isNumber: '',
+          auditDate: '',
+          carchivedType: '',
+          archiveId: '',  // 报告作废id
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          workAttachmentDtoList: [],
+          // cwProjectReportArchiveReportDTOList: [],
+          cwProjectRecordsDTO: {
+            remarks: '',
+            projectNumber: '',
+            projectName: '',
+            officeId: '',
+            projectMoney: '',
+            auditYear: '',
+            planStartDate: '',
+            planEndDate: '',
+            projectMasterId: '',
+            projectLeaderId: '',
+            procInsId: '',
+            processDefinitionId: '',
+            status: '',
+            contractId: ''
+          },
+          fileNumber: '',
+          reportDate: '',
+          reportNo: '',
+          signatureAnnotator1: '',
+          signatureAnnotator1Name: '',
+          signatureAnnotator2: '',
+          signatureAnnotator2Name: '',
+          reportCreateName: '',
+          reportId: ''
+        }
+        this.$refs.uploadComponent.clearUpload()
+        this.$refs.inputForm.resetFields()
+        this.inputForm.reportId = ''
+        this.inputForm.projectId = ''
+      },
+      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) {
+        this.$refs.projectRecordsChooseCom.init()
+        // 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, this.inputForm.id)
+      },
+      // 审计报告选择结果获取
+      getReport (row) {
+        if (this.commonJS.isNotEmpty(row)) {
+          if (this.commonJS.isNotEmpty(row.reportId)) {
+            this.projectReportArchiveService.findReportUse(row.reportId).then(({data}) => {
+              if (data === false) {
+                this.inputForm.reportDate = row.reportDate
+                this.inputForm.reportNo = row.reportNo
+                this.inputForm.signatureAnnotator1 = row.signatureAnnotator1
+                this.inputForm.signatureAnnotator1Name = row.signatureAnnotator1Name
+                this.inputForm.signatureAnnotator2 = row.signatureAnnotator2
+                this.inputForm.signatureAnnotator2Name = row.signatureAnnotator2Name
+                this.inputForm.reportCreateName = row.createName
+                this.inputForm.reportId = row.reportId
+              } else {
+                this.$message.error('此报告正在归档中或已归档,请重新选择')
+              }
+            })
+          }
+        }
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-input-number .el-input__inner {
+    text-align: left;
+  }
+</style>

+ 145 - 0
src/views/modules/cw/reportManagement/auditSheet/TypeForm.vue

@@ -0,0 +1,145 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+      v-dialogDrag
+      width="500px"
+      @close="close"
+      @keyup.enter.native="doSubmit"
+      :visible.sync="visible">
+      <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method==='view'"
+               label-width="100px" @submit.native.prevent>
+        <el-row  :gutter="15">
+          <el-col :span="21">
+            <el-form-item label="上级节点" prop="parentId">
+              <SelectTree
+                ref="areaTree"
+                :props="{
+                      value: 'id',             // ID字段名
+                      label: 'name',         // 显示名称
+                      children: 'children'    // 子级字段名
+                    }"
+                url="/auditSheet/type/treeData?type=1"
+                :value="inputForm.parentId"
+                :clearable="true"
+                :accordion="true"
+                @getValue="(value) => {inputForm.parentId=value}"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="21">
+            <el-form-item label="自检名称" prop="name"
+                          :rules="[
+                          {required: true, message:'自检名称不能为空', trigger:'blur'}
+                 ]">
+              <el-input v-model="inputForm.name" placeholder="请填写自检名称"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <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="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+    </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  // import ProofreadTypeService from '@/api/sys/ProofreadTypeService'
+  import CwProofreadTypeService from '@/api/cw/projectReportAuditSheet/CwProofreadTypeService'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+          name: '',
+          parentId: '',
+          type: ''
+        }
+      }
+    },
+    // proofreadTypeService: null,
+    cwProofreadTypeService: null,
+    created () {
+      // this.proofreadTypeService = new ProofreadTypeService()
+      this.cwProofreadTypeService = new CwProofreadTypeService()
+    },
+    components: {
+      SelectTree
+    },
+    methods: {
+      init (method, id) {
+        this.method = method
+        this.inputForm = {
+          name: '',
+          parentId: '',
+          type: ''
+        }
+        if (method === 'add') {
+          this.title = `新建自检类型`
+        } else if (method === 'edit') {
+          this.inputForm.id = id
+          this.title = '修改自检类型'
+        } else if (method === 'view') {
+          this.inputForm.id = id
+          this.title = '查看自检类型'
+        } else if (method === 'addChild') {
+          this.title = '添加下级结构'
+          this.inputForm.parentId = id
+        }
+        this.visible = true
+        this.loading = false
+        this.$nextTick(() => {
+          if (method === 'edit' || method === 'view') { // 修改或者查看
+            this.loading = true
+            this.$refs.inputForm.resetFields()
+            this.cwProofreadTypeService.findById(this.inputForm.id).then(({data}) => {
+              this.inputForm = this.recover(this.inputForm, data)
+              this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+              this.loading = false
+            })
+            // this.proofreadTypeService.findById(this.inputForm.id).then(({data}) => {
+            //   this.inputForm = this.recover(this.inputForm, data)
+            //   this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+            //   this.loading = false
+            // })
+          }
+        })
+      },
+      // 表单提交
+      doSubmit () {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            this.inputForm.type = '1'
+            this.cwProofreadTypeService.save(this.inputForm).then(({data}) => {
+              this.close()
+              this.$message.success(data)
+              this.$emit('refreshDataList')
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+            // this.proofreadTypeService.save(this.inputForm).then(({data}) => {
+            //   this.close()
+            //   this.$message.success(data)
+            //   this.$emit('refreshDataList')
+            //   this.loading = false
+            // }).catch(() => {
+            //   this.loading = false
+            // })
+          }
+        })
+      },
+      close () {
+        this.$refs.inputForm.resetFields()
+        this.visible = false
+      }
+    }
+  }
+</script>

+ 152 - 0
src/views/modules/cw/reportManagement/auditSheet/TypeList.vue

@@ -0,0 +1,152 @@
+<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>
+        <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('proofread:type:add')" type="primary" size="small" icon="el-icon-plus" @click="add()">新建</el-button>
+          <el-button v-if="hasPermission('proofread:type:del')" type="danger"   size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.typeTable && $refs.typeTable.getCheckboxRecords().length === 0" plain>删除</el-button>
+        </template>
+      </vxe-toolbar>
+      <div style="height: calc(100% - 50px)">
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          :loading="loading"
+          size="small"
+          ref="typeTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :tree-config="{transform: true, rowField: 'id', parentField: 'parentId'}"
+          :checkbox-config="{}">
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column type="checkbox" width="40" ></vxe-column>
+          <vxe-column title="自检内容名称" field="name" align="left" tree-node></vxe-column>
+
+          <vxe-column title="操作" width="230px" fixed="right" align="center">
+            <template  slot-scope="scope">
+              <el-button v-if="hasPermission('proofread:type:edit')" type="text"  size="small" @click="addChild(scope.row.id)">添加下级结构</el-button>
+              <el-button v-if="hasPermission('proofread:type:edit')" type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('proofread:type:remove')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
+            </template>
+          </vxe-column>
+        </vxe-table>
+
+      </div>
+    </div>
+    <TypeForm  ref="typeForm" @refreshDataList="refreshList"></TypeForm>
+  </div>
+</template>
+
+<script>
+  // import ProofreadTypeService from '@/api/sys/ProofreadTypeService'
+  import CwProofreadTypeService from '@/api/cw/projectReportAuditSheet/CwProofreadTypeService'
+  import TypeForm from './TypeForm'
+  export default {
+    data () {
+      return {
+        searchForm: {
+          name: '',
+          type: ''
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        loading: false
+      }
+    },
+    // proofreadTypeService: null,
+    cwProofreadTypeService: null,
+    created () {
+      // this.proofreadTypeService = new ProofreadTypeService()
+      this.cwProofreadTypeService = new CwProofreadTypeService()
+    },
+    components: {
+      TypeForm
+    },
+    mounted () {
+      this.refreshList()
+    },
+    methods: {
+      // 新增
+      add () {
+        this.$refs.typeForm.init('add', '')
+      },
+      addChild (id) {
+        this.$refs.typeForm.init('addChild', id)
+      },
+      // 修改
+      edit (id) {
+        id = id || this.$refs.typeTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+        this.$refs.typeForm.init('edit', id)
+      },
+      // 查看
+      view (id) {
+        this.$refs.typeForm.init('view', id)
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.searchForm.type = '1'
+        this.cwProofreadTypeService.list({...this.searchForm}).then(({data}) => {
+          this.dataList = data
+          this.loading = false
+        })
+        // this.proofreadTypeService.list({...this.searchForm}).then(({data}) => {
+        //   this.dataList = data
+        //   this.loading = false
+        // })
+      },
+      // 删除
+      del (id) {
+        let ids = id || this.$refs.typeTable.getCheckboxRecords().map(item => {
+          return item.id
+        }).join(',')
+        this.$confirm(`确定删除所选项吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.cwProofreadTypeService.remove(ids).then(({data}) => {
+            this.$message.success(data)
+            this.refreshList()
+            this.loading = false
+          })
+          // this.proofreadTypeService.remove(ids).then(({data}) => {
+          //   this.$message.success(data)
+          //   this.refreshList()
+          //   this.loading = false
+          // })
+        })
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      }
+    }
+  }
+</script>

+ 381 - 0
src/views/modules/cw/reportManagement/reportReview/ReportReviewForm.vue

@@ -0,0 +1,381 @@
+<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="reportNo"
+                            :rules="[
+                              {required: true, message:'报告文号不能为空', trigger:'blur'},
+                              {required: true, message:'报告文号不能为空', trigger:'change'}
+                   ]">
+                <el-input size="medium" :readonly="true" @focus="openContractForm()" v-model="inputForm.reportNo" placeholder="请填写报告文号">
+                  <el-button slot="append" icon="el-icon-search" @click="openContractForm()"></el-button>
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="项目名称" prop="projectName"
+                            :rules="[
+                   ]">
+                <el-input :disabled="true" v-model="inputForm.projectName" placeholder="请填写项目名称" clearable></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="报告主办人" prop="reportSponsor"
+                            :rules="[
+                   ]">
+                <el-input :disabled="true" v-model="inputForm.reportSponsor" placeholder="请填写报告主办人" clearable></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="项目经理" prop="projectMasterName"
+                            :rules="[
+                   ]">
+                <el-input :disabled="true" v-model="inputForm.projectMasterName" placeholder="请填写项目经理" clearable></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-col :span="12">
+              <el-form-item label="作废原因" prop="cancellateReason"
+                            :rules="[
+                              {required: true, message:'作废原因不能为空', trigger:'blur'}
+                   ]">
+                <el-input type="textarea" v-model="inputForm.cancellateReason" placeholder="请填写作废原因" clearable></el-input>
+              </el-form-item>
+            </el-col>
+
+          </el-row>
+        </el-form>
+      </el-col>
+    </el-row>
+    <ReportCancellApplyChooseCom  ref="reportCancellApplyChooseCom" @getProject="getContract"></ReportCancellApplyChooseCom>
+  </div>
+</template>
+
+<script>
+  import UpLoadComponent from '@/views/common/UpLoadComponent'
+  import SelectUserTree from '@/views/modules/utils/treeUserSelect'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
+  import UserSelect from '../../workClientInfo/clientUserSelect'
+  import ProjectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
+  // import ProjectReportService from '@/api/cw/reportManagement/ProjectReportService'
+  import ReportCancellApplyService from '@/api/cw/reportCancellApply/ReportCancellApplyService'
+  import EnterpriseSearchService from '@/api/cw/common/EnterpriseSearchService'
+  import ReportCancellApplyChooseCom from '../../reportCancellApply/ReportCancellApplyChooseCom'
+  import UserService from '@/api/sys/UserService'
+  export default {
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      formReadOnly: {
+        type: Boolean,
+        default: false
+      },
+      status: {
+        type: String,
+        default: ''
+      }
+    },
+    data () {
+      return {
+        title: '',
+        method: '',
+        loading: false,
+        inputForm: {
+          projectId: '',
+          reportNewLineId: '',
+          id: '',
+          createDate: '',
+          createBy: {
+            id: '',
+            name: JSON.parse(localStorage.getItem('user')).name
+          },
+          remarks: '',
+          reportNo: '',
+          projectName: '',
+          cancellateReason: '',
+          reportSponsor: '',
+          projectMasterName: '',
+          cwFileInfoList: [],
+          servedUnitId: '',
+          status: ''
+        },
+        keyWatch: '',
+        activeName: 'newRow',
+        tableKey: '',
+        tableKeyClient: '1'
+      }
+    },
+    projectRecordsService: null,
+    // ProjectReportService: null,
+    ReportCancellApplyService: null,
+    enterpriseSearchService: null,
+    userService: null,
+    created () {
+      this.enterpriseSearchService = new EnterpriseSearchService()
+      this.projectRecordsService = new ProjectRecordsService()
+      // this.projectReportService = new ProjectReportService()
+      this.reportCancellApplyService = new ReportCancellApplyService()
+      this.userService = new UserService()
+    },
+    computed: {
+      bus: {
+        get () {
+          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,
+      ReportCancellApplyChooseCom
+    },
+    methods: {
+      getKeyWatch (keyWatch) {
+        this.keyWatch = keyWatch
+      },
+      init (method, id) {
+        this.activeName = 'newRow'
+        this.projectRecordsService = new ProjectRecordsService()
+        // this.projectReportService = new ProjectReportService()
+        this.reportCancellApplyService = new ReportCancellApplyService()
+        this.method = method
+        this.inputForm = {
+          projectId: '',
+          reportNewLineId: '',
+          id: '',
+          createDate: '',
+          createBy: {
+            id: '',
+            name: JSON.parse(localStorage.getItem('user')).name
+          },
+          remarks: '',
+          reportNo: '',
+          projectName: '',
+          cancellateReason: '',
+          reportSponsor: '',
+          projectMasterName: '',
+          status: ''
+        }
+        this.inputForm.id = id
+        this.loading = false
+        this.$nextTick(() => {
+          this.$refs.inputForm.resetFields()
+          this.loading = true
+          this.reportCancellApplyService.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.createDate)) {
+              this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+            }
+            this.loading = false
+          })
+        })
+      },
+      openContractForm () {
+        if (!this.commonJS.isEmpty(this.inputForm.contractId)) {
+          this.$refs.reportCancellApplyChooseCom.init()
+        } else {
+          this.$refs.reportCancellApplyChooseCom.init()
+        }
+      },
+      getContract (row) {
+        this.inputForm.projectName = row.projectName // 项目名称
+        this.inputForm.projectId = row.id // 项目id
+        this.inputForm.projectMasterName = row.projectMasterName // 项目经理
+        this.inputForm.reportNo = row.reportNo // 报告文号
+        this.inputForm.reportNewLineId = row.reportNewLineId // 新建行id
+        this.inputForm.reportSponsor = row.reportSponsor // 报告主办人
+        this.clearClientList()
+        this.$forceUpdate()
+      },
+      clearClientList () {
+        // 项目直接对接联系人列表清除
+        this.inputForm.clientList = []
+        this.$forceUpdate()
+      },
+      saveForm (callback) {
+        this.doSubmit('save', callback)
+      },
+      startForm (callback) {
+        this.doSubmit('start', callback)
+      },
+      async agreeForm (callback) {
+        await this.reportCancellApplyService.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
+          this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+          // 验证报告 日期报告 类型是否出具报告 意见类型 是否为空
+          // eslint-disable-next-line no-unused-expressions
+          this.reportCancellApplyService.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'
+        } else if (status === 'agree') {
+          // 审核同意
+          this.inputForm.agreeDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+          this.inputForm.agreeUserId = this.$store.state.user.id
+          // this.inputForm.status = '5'
+          this.userService.is().then(({data}) => {
+            if (data) {
+              this.inputForm.status = '5'
+            }
+          })
+        } else if (status === 'reapply') {
+          this.inputForm.status = '2'
+        }
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            if (this.commonJS.isEmpty(this.inputForm.createDate)) {
+              this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+            }
+            console.log('this.inputForm', this.inputForm)
+            this.reportCancellApplyService.saveForm(this.inputForm).then(({data}) => {
+              callback(data.businessTable, data.businessId, this.inputForm)
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      },
+      async updateStatusById (type, callback) {
+        if (type === 'reject' || type === 'reback') {
+          await this.reportCancellApplyService.queryById(this.inputForm.id).then(({data}) => {
+            if (data.status !== '2') { // status的值不等于“审核中”就弹出提示
+              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+              throw new Error()
+            } else {
+              if (type === 'reject') {
+                // 驳回
+                let param
+                this.userService.is().then(({data}) => {
+                  if (data) {
+                    this.inputForm.status = '2'
+                    // param = {status: '4', id: this.inputForm.id}
+                  } else {
+                    this.inputForm.status = '4'
+                  }
+                })
+                param = {status: this.inputForm.status, id: this.inputForm.id}
+                this.reportCancellApplyService.updateStatusById(param).then(() => {
+                  callback()
+                })
+                // this.projectRecordsService.updateStatusById(param)
+              }
+              if (type === 'reback') {
+                // 撤回
+                let param = {status: '3', id: this.inputForm.id}
+                // this.projectRecordsService.updateStatusById(param)
+                this.reportCancellApplyService.updateStatusById(param)
+              }
+            }
+          })
+        } else if (type === 'hold') {
+          this.reportCancellApplyService.queryById(this.inputForm.id).then(({data}) => {
+            if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+              throw new Error()
+            } else {
+              // 终止
+              let param = {status: '1', id: this.inputForm.id}
+              this.reportCancellApplyService.updateStatusById(param).then(() => {
+                callback()
+              })
+            }
+          })
+        }
+      },
+      close () {
+        this.inputForm = {
+          id: '',
+          createDate: '',
+          createBy: {
+            id: '',
+            name: JSON.parse(localStorage.getItem('user')).name
+          },
+          remarks: '',
+          reportNo: '',
+          projectName: '',
+          cancellateReason: '',
+          reportSponsor: '',
+          projectMasterName: ''
+        }
+        // this.$refs.uploadComponent.clearUpload()
+        this.$refs.inputForm.resetFields()
+      },
+      tabHandleClick (event) {
+        // console.log(event)
+      },
+      // 删除
+      removeEvent (row, rowIndex, type) {
+        if (type === 'client') {
+          this.$refs.clientTable.remove(row)
+        }
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-input-number .el-input__inner {
+    text-align: left;
+  }
+</style>

+ 420 - 0
src/views/modules/cw/reportManagement/reportReview/ReportReviewList.vue

@@ -0,0 +1,420 @@
+<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="projectNumber">
+        <el-input size="small" v-model="searchForm.projectNumber" placeholder="请输入项目编号" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="项目名称" prop="projectName">
+        <el-input size="small" v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="项目经理" prop="projectMasterId">
+        <SelectUserTree
+          ref="companyTree"
+          :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+          :url="`/sys/user/treeUserDataAllOffice?type=2`"
+          :value="searchForm.projectMasterId"
+          :clearable="true"
+          :accordion="true"
+          @getValue="(value) => {searchForm.projectMasterId=value}"/>
+        <!--        <el-input size="small" v-model="searchForm.projectMaster" placeholder="请输入项目经理" clearable></el-input>-->
+      </el-form-item>
+      <!--      <el-form-item label="创建人" prop="createBy">-->
+      <!--        <el-input size="small" v-model="searchForm.createBy" placeholder="请输入创建人" clearable></el-input>-->
+      <!--      </el-form-item>-->
+      <el-form-item label="创建人" prop="createBy">
+        <SelectUserTree
+          ref="companyTree"
+          :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+          :url="`/sys/user/treeUserDataAllOffice?type=2`"
+          :value="searchForm.createBy"
+          :clearable="true"
+          :accordion="true"
+          @getValue="(value) => {searchForm.createBy=value}"/>
+      </el-form-item>
+      <el-form-item label="创建时间" prop="contractDates">
+        <el-date-picker
+          placement="bottom-start"
+          format="yyyy-MM-dd HH:mm:ss"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          v-model="searchForm.contractDates"
+          type="datetimerange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期">
+        </el-date-picker>
+      </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('cw_work_client:info: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="clientTable"
+          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="160" align="center" title="单据编号" field="documentNo">
+            <template slot-scope="scope">
+              <el-link  type="primary" :underline="false" v-if="hasPermission('cwProjectReport:list')" @click="view(scope.row.id)">{{scope.row.documentNo}}</el-link>
+              <el-link  type="primary" :underline="false" v-else-if="hasPermission('cwProjectReport:list')"  @click="view(scope.row.id,)">{{scope.row.documentNo}}</el-link>
+              <span v-else>{{scope.row.documentNo}}</span>
+            </template>
+          </vxe-column>
+          <vxe-column min-width="160" align="center" title="项目编号" field="projectNumber"></vxe-column>
+          <vxe-column min-width="160" align="center" title="项目名称" field="projectName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="报告所属部门" field="departmentName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="项目经理" field="projectMasterName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="报告主办人" field="reportSponsor"></vxe-column>
+          <vxe-column min-width="160" align="center" title="创建人" field="userName"></vxe-column>
+          <vxe-column min-width="160" 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('cwProjectReport:edit')&&scope.row.createById === $store.state.user.id&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4')" type="text"  size="small" @click="push(scope.row)">修改</el-button>
+              <el-button v-else-if="hasPermission('cwProjectReport:edit')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'||scope.row.status==='5')" type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('cwProjectReport:edit')&&scope.row.createById === $store.state.user.id&&scope.row.status==='2'" type="text"  size="small" @click="reback(scope.row)">撤回</el-button>
+              <el-button v-if="hasPermission('cwProjectReport:del')&&scope.row.createById === $store.state.user.id&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
+              <el-button v-else-if="hasPermission('cwProjectReport:del')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'||scope.row.status==='5')" type="text"   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>
+    </div>
+    <!--    <ReportManagementForm ref="reportManagementForm"></ReportManagementForm>-->
+    <ReportCancellApplyForm ref="reportCancellApplyForm"></ReportCancellApplyForm>
+  </div>
+</template>
+
+<script>
+  import WorkClientService from '@/api/cw/workClientInfo/WorkClientService'
+  // import ProjectReportService from '@/api/cw/reportManagement/ProjectReportService'
+  import ReportCancellApplyService from '@/api/cw/reportCancellApply/ReportCancellApplyService'
+  import TaskService from '@/api/flowable/TaskService'
+  import ProcessService from '@/api/flowable/ProcessService'
+  // import ReportManagementForm from '../reportManagement/ReportManagementForm'
+  import ReportCancellApplyForm from '../../reportCancellApply/ReportCancellApplyForm'
+  import pick from 'lodash.pick'
+  import UserService from '@/api/sys/UserService'
+  import SelectUserTree from '@/views/modules/utils/treeUserSelect'
+  export default {
+    data () {
+      return {
+        searchForm: {
+          projectNumber: '',
+          projectName: '',
+          projectMasterId: '',
+          createBy: '',
+          contractDates: []
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        tableKey: '',
+        loading: false,
+        processDefinitionAuditId: '',
+        procDefAuditKey: '',
+        isAdmin: false,
+        create: ''
+      }
+    },
+    workClientService: null,
+    // projectReportService: null,
+    reportCancellApplyService: null,
+    taskService: null,
+    processService: null,
+    userService: null,
+    created () {
+      this.workClientService = new WorkClientService()
+      // this.projectReportService = new ProjectReportService()
+      this.reportCancellApplyService = new ReportCancellApplyService()
+      this.taskService = new TaskService()
+      this.processService = new ProcessService()
+      this.userService = new UserService()
+    },
+    components: {
+      // ReportManagementForm
+      ReportCancellApplyForm,
+      SelectUserTree
+    },
+    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.reportManagementForm.init('add', '')
+        this.$refs.reportCancellApplyForm.init('add', '')
+      },
+      // 修改
+      edit (id) {
+        id = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+        // this.$refs.reportManagementForm.init('edit', id)
+        this.$refs.reportCancellApplyForm.init('edit', id)
+      },
+      // 查看
+      view (id) {
+        // this.$refs.reportManagementForm.init('view', id)
+        this.$refs.reportCancellApplyForm.init('view', id)
+      },
+      // 查询当前用户是否是管理员用户
+      checkIsAdmin () {
+        this.userService.is().then(({data}) => {
+          this.isAdmin = data
+        })
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.reportCancellApplyService.findList({
+          '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.projectReportService.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.clientTable.getCheckboxRecords().map(item => {
+          return item.id
+        }).join(',')
+        this.$confirm(`确定删除所选项吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.reportCancellApplyService.delete(ids).then(({data}) => {
+            this.$message.success(data)
+            this.refreshList()
+            this.loading = false
+          })
+          // this.projectReportService.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: {
+                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+                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/reportManagement/reportReview/ReportReviewList'
+              }
+            })
+          })
+      },
+      // 发起客户登记
+      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_report_cancell_apply'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+                procDefId: this.processDefinitionAuditId,
+                procDefKey: this.procDefAuditKey,
+                title: title,
+                formType: data.data.formType,
+                formUrl: data.data.formUrl,
+                formTitle: processTitle,
+                businessTable: 'cw_project_report_cancell_apply',
+                businessId: row.id,
+                isShow: 'false',
+                status: status,
+                routePath: '/cw/reportManagement/reportReview/ReportReviewList'
+              }
+            })
+          })
+      },
+      // 查看客户登记流程结果
+      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.reportCancellApplyService.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.reportCancellApplyService.updateStatusById(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
+            }
+          })
+          // await this.projectReportService.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.projectReportService.updateStatusById(form)
+          //       this.$message.success(data)
+          //       this.refreshList()
+          //     })
+          //   }
+          // })
+        })
+      }
+    }
+  }
+</script>

+ 2 - 2
src/views/modules/cw/workContract/ContractFileForm.vue

@@ -237,8 +237,8 @@
       </el-row>
     </el-form>
       <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
-        <el-tab-pane label="合同文" name="uploadFile">
-          <!--        合同文-->
+        <el-tab-pane label="合同文" name="uploadFile">
+          <!--        合同文-->
           <UpLoadComponent ref="uploadFile"></UpLoadComponent>
         </el-tab-pane>
         <el-tab-pane label="参与签约方" name="contactParty">

+ 65 - 28
src/views/modules/cw/workContract/ContractFilePaperForm.vue

@@ -63,6 +63,25 @@
             <el-input maxlength="64" :disabled="true" v-model="inputForm.contractNo" placeholder="自动生成"></el-input>
           </el-form-item>
         </el-col>
+        <el-col :span="12">
+          <el-form-item label="合同类型" prop="contractType"
+                        :rules="[
+                 ]">
+            <el-select :disabled="true" v-model="inputForm.contractType" placeholder="请选择合同类型" style="width:100%;">
+              <el-option
+                v-for="item in $dictUtils.getDictList('cw_contract_type')"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="合同流水号" prop="contractSerialNumber">
+            <el-input maxlength="64" :disabled="true" v-model="inputForm.contractSerialNumber" placeholder="自动生成"></el-input>
+          </el-form-item>
+        </el-col>
         <!--        <el-col :span="12">-->
         <!--          <el-form-item label="合同状态" prop="contractStatus">-->
         <!--            <el-input maxlength="64" v-model="inputForm.contractStatus" :disabled="true" placeholder="请输入合同状态"></el-input>-->
@@ -84,7 +103,7 @@
         </el-col>
         <el-col :span="12">
           <el-form-item label="付款方式" prop="paymentMethod"
-                        :rules="[{required: true, message: '付款方式不能为空', trigger: 'blur'}
+                        :rules="[
                  ]">
             <el-select :disabled="true" v-model="inputForm.paymentMethod" placeholder="请选择付款方式" style="width:100%;">
               <el-option
@@ -96,6 +115,14 @@
             </el-select>
           </el-form-item>
         </el-col>
+        <el-col>
+          <el-form-item label="付款描述" prop="paymentDescribe" v-if="inputForm.paymentMethod === '2'"
+                        :rules="[
+               ]">
+            <el-input :disabled="true" type="textarea" v-model="inputForm.paymentDescribe" placeholder="请输入付款描述"
+            ></el-input>
+          </el-form-item>
+        </el-col>
 
         <el-col :span="12">
           <el-form-item label="签约日期" prop="signingDate"
@@ -121,13 +148,13 @@
           </el-form-item>
         </el-col>
 
-        <el-col :span="12">
-          <el-form-item label="修改次数" prop="changeNum"
-                        :rules="[{required: true, message: '修改次数', trigger: 'blur'}
-                 ]">
-            <el-input maxlength="64" :disabled="true" v-model="inputForm.changeNum" placeholder="请输入修改次数"></el-input>
-          </el-form-item>
-        </el-col>
+<!--        <el-col :span="12">-->
+<!--          <el-form-item label="修改次数" prop="changeNum"-->
+<!--                        :rules="[{required: true, message: '修改次数', trigger: 'blur'}-->
+<!--                 ]">-->
+<!--            <el-input maxlength="64" :disabled="true" v-model="inputForm.changeNum" placeholder="请输入修改次数"></el-input>-->
+<!--          </el-form-item>-->
+<!--        </el-col>-->
 
         <el-col :span="12">
           <el-form-item label="所属部门" prop="departmentName"
@@ -205,7 +232,7 @@
           <el-form-item label="合同实际金额" prop="actualContractAmount"
                         :rules="[{required: true, message: '请填写合同实际金额', trigger: 'blur'}
                  ]">
-            <el-input maxlength="64" :disabled="true" v-model="inputForm.actualContractAmount" ></el-input>
+            <el-input maxlength="64" @blur="testSout" v-model="inputForm.actualContractAmount" ></el-input>
           </el-form-item>
         </el-col>
 
@@ -240,8 +267,8 @@
       </el-row>
     </el-form>
       <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
-        <el-tab-pane label="合同文" name="uploadFile">
-          <!--        合同文-->
+        <el-tab-pane label="合同文" name="uploadFile">
+          <!--        合同文-->
           <UpLoadComponent ref="uploadFile"></UpLoadComponent>
         </el-tab-pane>
         <el-tab-pane label="参与签约方" name="contactParty">
@@ -377,9 +404,12 @@
           contractOpposite: '',
           contractAmountType: '',
           contractNo: '',
+          contractSerialNumber: '',
+          contractType: '',
           contractName: '',
           payerSubject: '',
           paymentMethod: '',
+          paymentDescribe: '',
           contractInfoId: '',
           signingDate: '',
           contractAmount: '',
@@ -483,6 +513,11 @@
       }
     },
     methods: {
+      testSout (event) {
+        console.log('actualContractAmount', this.inputForm.actualContractAmount)
+
+        console.log('evemt', event)
+      },
       checkFiledNo () {
         let filedNo = this.inputForm.filedNo
         let confirmFiledNo = this.inputForm.confirmFiledNo
@@ -531,9 +566,12 @@
           contractOpposite: '',
           contractAmountType: '',
           contractNo: '',
+          contractSerialNumber: '',
+          contractType: '',
           contractName: '',
           payerSubject: '',
           paymentMethod: '',
+          paymentDescribe: '',
           signingDate: '',
           contractAmount: '',
           actualContractAmount: '',
@@ -589,7 +627,7 @@
             // console.log('data', data)
             // console.log('this.inputForm.department', this.inputForm.department)
             this.$refs.uploadFile.newUpload('view', this.inputForm.contractProperList, 'cwWorkContract', null, null, null, null, false)
-            this.$refs.archiveFile.newUpload('view', this.inputForm.contractInfoList, 'cwWorkContract', null, null, null, null, false)
+            this.$refs.archiveFile.newUpload(method, this.inputForm.contractInfoList, 'cwWorkContract', null, null, null, null, false)
             this.loading = false
           })
         }
@@ -686,7 +724,7 @@
         } else {
           let _this = this
           const wait = function () {
-            return new Promise((resolve, reject) => {
+            return new Promise(async (resolve, reject) => {
               // 合同登记暂存
               if (_this.status === 'startAndHold' || _this.status === 'startAndHoldFiled') {
                 _this.loading = true
@@ -700,19 +738,14 @@
               // console.log('actualContractAmount', _this.inputForm.actualContractAmount)
               // eslint-disable-next-line no-unused-vars
               // 合同登记归档暂存
-              if (_this.status === 'startAndHoldFiled') {
-                _this.inputForm.filedPaperType = '1'
-                _this.inputForm.contractInfoId = _this.businessId
-                _this.inputForm.contractInfoList = _this.$refs.archiveFile.getDataList()
-                // console.log('actualContractAmount', _this.inputForm.actualContractAmount)
-                // this.inputForm.contractInfoList = this.$refs.uploadFile.getDataList()
-                _this.contractFilePaperService.save(_this.inputForm).then(() => {
-                  _this.contractInfoService.updatePaperInfo(_this.inputForm).then(() => {
-                    resolve()
-                  })
-                  resolve()
-                })
-              }
+              _this.inputForm.filedPaperType = '1'
+              _this.inputForm.contractInfoId = _this.businessId
+              _this.inputForm.contractInfoList = _this.$refs.archiveFile.getDataList()
+              // console.log('actualContractAmount', _this.inputForm.actualContractAmount)
+              // this.inputForm.contractInfoList = this.$refs.uploadFile.getDataList()
+              await _this.contractFilePaperService.save(_this.inputForm)
+              await _this.contractInfoService.updatePaperInfo(_this.inputForm)
+              resolve()
             })
           }
           wait().then(() => {
@@ -725,7 +758,10 @@
       },
       // 送审
       startForm (callback) {
-        if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadFile.checkProgress()) {
+        if (this.commonJS.isEmpty(this.inputForm.actualContractAmount)) {
+          this.$message.error('请填写合同实际金额')
+          throw new Error('请填写合同实际金额')
+        } else if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadFile.checkProgress()) {
           this.loading = false
           throw new Error()
         } else {
@@ -737,6 +773,7 @@
           console.log('status', status)
           // this.contractInfoService.updateInfo(this.inputForm)
           // console.log('inputForm', this.inputForm)
+          this.contractInfoService.updatePaperInfo(this.inputForm)
           this.inputForm.contractInfoId = id
           this.inputForm.contractInfoList = this.$refs.archiveFile.getDataList()
           // console.log('this.inputForm', this.inputForm)
@@ -782,7 +819,7 @@
             this.$message.error('请填写确认案卷号')
             throw new Error('请填写确认案卷号')
           }
-          this.inputForm.contractInfoList = this.$refs.uploadFile.getDataList()
+          // this.inputForm.contractInfoList = this.$refs.uploadFile.getDataList()
           this.contractFilePaperService.save(this.inputForm).then(({data}) => {
             callback(data.businessTable, data.businessId, this.inputForm)
             this.$refs.inputForm.resetFields()

+ 82 - 33
src/views/modules/cw/workContract/ContractNameForm.vue

@@ -74,6 +74,25 @@
                 </el-form-item>
               </el-col>
               <el-col :span="12">
+                <el-form-item label="合同类型" prop="contractType"
+                              :rules="[
+                 ]">
+                  <el-select :disabled="true" v-model="inputForm.contractType" placeholder="请选择合同类型" style="width:100%;">
+                    <el-option
+                      v-for="item in $dictUtils.getDictList('cw_contract_type')"
+                      :key="item.value"
+                      :label="item.label"
+                      :value="item.value">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="合同流水号" prop="contractSerialNumber">
+                  <el-input maxlength="64" :disabled="true" v-model="inputForm.contractSerialNumber" placeholder="自动生成"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
                 <el-form-item label="付款主体" prop="payerSubject"
                               :rules="[{required: true, message: '付款主体不能为空', trigger: 'blur'}
                        ]">
@@ -89,7 +108,7 @@
               </el-col>
               <el-col :span="12">
                 <el-form-item label="付款方式" prop="paymentMethod"
-                              :rules="[{required: true, message: '付款方式不能为空', trigger: 'blur'}
+                              :rules="[
                        ]">
                   <el-select v-model="inputForm.paymentMethod" placeholder="请选择付款方式" style="width:100%;">
                     <el-option
@@ -101,6 +120,14 @@
                   </el-select>
                 </el-form-item>
               </el-col>
+              <el-col>
+                <el-form-item label="付款描述" prop="paymentDescribe" v-if="inputForm.paymentMethod === '2'"
+                              :rules="[
+               ]">
+                  <el-input :disabled="true" type="textarea" v-model="inputForm.paymentDescribe" placeholder="请输入付款描述"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
 
               <el-col :span="12">
                 <el-form-item label="签约日期" prop="signingDate"
@@ -125,13 +152,13 @@
           </el-form-item>
         </el-col>
 
-        <el-col :span="12">
-          <el-form-item label="修改次数" prop="changeNum"
-                        :rules="[{required: true, message: '修改次数', trigger: 'blur'}
-                 ]">
-            <el-input maxlength="64" :disabled="true" v-model="inputForm.changeNum" placeholder="请输入修改次数"></el-input>
-          </el-form-item>
-        </el-col>
+<!--        <el-col :span="12">-->
+<!--          <el-form-item label="修改次数" prop="changeNum"-->
+<!--                        :rules="[{required: true, message: '修改次数', trigger: 'blur'}-->
+<!--                 ]">-->
+<!--            <el-input maxlength="64" :disabled="true" v-model="inputForm.changeNum" placeholder="请输入修改次数"></el-input>-->
+<!--          </el-form-item>-->
+<!--        </el-col>-->
 
         <el-col :span="12">
           <el-form-item  prop="department" label="所属部门">
@@ -249,8 +276,8 @@
             </el-row>
           </el-form>
           <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
-            <el-tab-pane label="合同文" name="uploadFile">
-              <!--        合同文-->
+            <el-tab-pane label="合同文" name="uploadFile">
+              <!--        合同文-->
               <UpLoadComponent ref="uploadFile"></UpLoadComponent>
             </el-tab-pane>
             <el-tab-pane label="参与签约方" name="contactParty">
@@ -552,9 +579,12 @@
           address: '',
           filedType: '',
           contractNo: '',
+          contractSerialNumber: '',
+          contractType: '',
           contractName: '',
           payerSubject: '',
           paymentMethod: '',
+          paymentDescribe: '',
           contractInfoId: '',
           signingDate: '',
           contractAmount: '',
@@ -735,9 +765,12 @@
           customerId: '',  // 客户id
           address: '',
           contractNo: '',
+          contractSerialNumber: '',
+          contractType: '',
           contractName: '',
           payerSubject: '',
           paymentMethod: '',
+          paymentDescribe: '',
           signingDate: '',
           contractAmount: '',
           actualContractAmount: '',
@@ -782,6 +815,7 @@
             this.inputForm = this.recover(this.inputForm, data)
             // console.log('this.inputForm.filedPaperType', this.inputForm.filedPaperType)
             const f = []
+            console.log('data.fees', data.fees)
             if (data.fees !== null && data.fees !== undefined && data.fees !== '') {
               data.fees.split(',').forEach(item => {
                 if (item !== null && item !== undefined && item !== '') {
@@ -852,29 +886,32 @@
           throw new Error()
         } else {
           if (status === 'save') {
-            if (this.inputForm.filedPaperType !== '0' & this.inputForm.filedPaperType !== '') {
-              if (this.inputForm.filedNo === '' || this.inputForm.filedNo === undefined) {
-                this.loading = false
-                this.$message.error('请填写案卷号')
-                throw new Error('请填写案卷号')
-              }
-              if (this.inputForm.confirmFiledNo === '' || this.inputForm.confirmFiledNo === undefined) {
-                this.loading = false
-                this.$message.error('请填写确认案卷号')
-                throw new Error('请填写确认案卷号')
+            this.$refs['inputForm'].validate(async (valid) => {
+              if (this.inputForm.filedPaperType !== '0' & this.inputForm.filedPaperType !== '') {
+                if (this.inputForm.filedNo === '' || this.inputForm.filedNo === undefined) {
+                  this.loading = false
+                  this.$message.error('请填写案卷号')
+                  throw new Error('请填写案卷号')
+                }
+                if (this.inputForm.confirmFiledNo === '' || this.inputForm.confirmFiledNo === undefined) {
+                  this.loading = false
+                  this.$message.error('请填写确认案卷号')
+                  throw new Error('请填写确认案卷号')
+                }
+                this.loading = true
+                this.inputForm.status = '5'
+                this.inputForm.filedType = '5'
+                this.inputForm.contractProperList = this.$refs.uploadFile.getDataList()
+                this.inputForm.contractInfoList = this.$refs.archiveFile.getDataList()
+                this.inputForm.fees = this.inputForm.contractFees.join(',')
+                this.contractInfoService.save(this.inputForm).then(({data}) => {
+                  this.loading = false
+                  this.close()
+                }).catch(() => {
+                  this.$refs.inputForm.resetFields()
+                  this.loading = false
+                })
               }
-            }
-            this.loading = true
-            this.inputForm.status = '5'
-            this.inputForm.filedType = '5'
-            this.inputForm.contractProperList = this.$refs.uploadFile.getDataList()
-            this.inputForm.contractInfoList = this.$refs.archiveFile.getDataList()
-            this.contractInfoService.save(this.inputForm).then(({data}) => {
-              this.loading = false
-              this.close()
-            }).catch(() => {
-              this.$refs.inputForm.resetFields()
-              this.loading = false
             })
           }
         }
@@ -1110,10 +1147,22 @@
         if (fees.length > 0) {
           fees.forEach(i => {
             if (i === '1') {
-              i = '发改价格[2009]2914号'
+              i = '苏会协[2010]52号'
               fee = fee + ';' + i
             }
             if (i === '2') {
+              i = '苏政办发[2010]101号'
+              fee = fee + ';' + i
+            }
+            if (i === '3') {
+              i = '苏价费[2010]284号'
+              fee = fee + ';' + i
+            }
+            if (i === '4') {
+              i = '发改价格[2010]196号'
+              fee = fee + ';' + i
+            }
+            if (i === '5') {
               i = '其他'
               fee = fee + ';' + i
             }

+ 39 - 35
src/views/modules/cw/workContract/ContractRegistration.vue

@@ -66,16 +66,16 @@
         </el-select>
       </el-form-item>
 
-      <el-form-item label="电子归档" prop="filedType">
-        <el-select v-model="searchForm.filedType" placeholder="请选择" style="width:100%;">
-          <el-option
-            v-for="item in $dictUtils.getDictList('filed_type')"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value">
-          </el-option>
-        </el-select>
-      </el-form-item>
+<!--      <el-form-item label="电子归档" prop="filedType">-->
+<!--        <el-select v-model="searchForm.filedType" placeholder="请选择" style="width:100%;">-->
+<!--          <el-option-->
+<!--            v-for="item in $dictUtils.getDictList('filed_type')"-->
+<!--            :key="item.value"-->
+<!--            :label="item.label"-->
+<!--            :value="item.value">-->
+<!--          </el-option>-->
+<!--        </el-select>-->
+<!--      </el-form-item>-->
       <el-form-item label="纸质归档" prop="filedPaperType">
         <el-select v-model="searchForm.filedPaperType" placeholder="请选择" style="width:100%;">
           <el-option
@@ -140,11 +140,11 @@
               <el-button  type="text" @click="detail(scope.row)" :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("cw_status", scope.row.status, '-')}} </el-button>
             </template>
           </vxe-column>
-          <vxe-column width="200px" title="电子归档" field="filedType">
-            <template slot-scope="scope">
-              <el-button  type="text" @click="detailFiled(scope.row)" :type="$dictUtils.getDictLabel('filed_type_status', scope.row.filedType, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("filed_type", scope.row.filedType, '未归档')}} </el-button>
-            </template>
-          </vxe-column>
+<!--          <vxe-column width="200px" title="电子归档" field="filedType">-->
+<!--            <template slot-scope="scope">-->
+<!--              <el-button  type="text" @click="detailFiled(scope.row)" :type="$dictUtils.getDictLabel('filed_type_status', scope.row.filedType, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("filed_type", scope.row.filedType, '未归档')}} </el-button>-->
+<!--            </template>-->
+<!--          </vxe-column>-->
           <vxe-column width="200px" title="纸质归档" field="filedPaperType">
             <template slot-scope="scope">
               <el-button  type="text" @click="detailPaperFiled(scope.row)" :type="$dictUtils.getDictLabel('filed_type_status', scope.row.filedPaperType, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("filed_type", scope.row.filedPaperType, '未归档')}} </el-button>
@@ -160,32 +160,32 @@
           <vxe-column title="操作" width="200px" fixed="right" align="center">
             <template  slot-scope="scope">
 <!--              <el-button v-if="hasPermission('cw:workContract:view')" type="text" size="small" @click="view(scope.row.id)">查看</el-button>-->
-              <el-button v-if="hasPermission('cw:workContract:edit') && scope.row.status !== '2' && scope.row.status !== '5' && scope.row.createId === $store.state.user.id" type="text" size="small" @click="edit(scope.row)">修改</el-button>
+<!--              <el-button v-if="hasPermission('cw:workContract:edit') && scope.row.status !== '2' && scope.row.status !== '5' && scope.row.createId === $store.state.user.id" type="text" size="small" @click="edit(scope.row)">修改</el-button>-->
               <el-button v-if="hasPermission('cw:workContract:edit') && scope.row.status === '5' && isAdmin" type="text" size="small" @click="editForm(scope.row.id)">修改</el-button>
 <!--              <el-button v-if="hasPermission('cw:workContract:edit') && scope.row.status === '5' && scope.row.filedType === '5' && scope.row.filedPaperType === '5' && isAdmin" type="text" size="small" @click="editForm(scope.row.id)">修改</el-button>-->
               <el-button v-if="hasPermission('cw:workContract:del') && (scope.row.status === '1' || scope.row.status === '3' || scope.row.status === '4')  && scope.row.createId === $store.state.user.id" type="text" size="small" @click="del(scope.row.id)">删除</el-button>
-              <el-button v-if="hasPermission('cw:workContract:back') && scope.row.status === '2'" type="text" size="small" @click="reback(scope.row)">撤回</el-button>
-              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.createId === $store.state.user.id && (scope.row.filedType === '0' || scope.row.filedType === undefined)" type="text" size="small" @click="filed(scope.row.id)">归档</el-button>
+<!--              <el-button v-if="hasPermission('cw:workContract:back') && scope.row.status === '2'" type="text" size="small" @click="reback(scope.row)">撤回</el-button>-->
+<!--              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.createId === $store.state.user.id && (scope.row.filedType === '0' || scope.row.filedType === undefined)" type="text" size="small" @click="filed(scope.row.id)">归档</el-button>-->
               <!--归档暂存修改-->
-              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.createId === $store.state.user.id && scope.row.filedType === '1'" type="text" size="small" @click="filed(scope.row.id)">修改</el-button>
+<!--              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.createId === $store.state.user.id && scope.row.filedType === '1'" type="text" size="small" @click="filed(scope.row.id)">修改</el-button>-->
               <!--归档撤回驳回修改-->
-              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.createId === $store.state.user.id && (scope.row.filedType === '3' || scope.row.filedType === '4')" type="text" size="small" @click="filedAndClose(scope.row.id)">修改</el-button>
+<!--              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.createId === $store.state.user.id && (scope.row.filedType === '3' || scope.row.filedType === '4')" type="text" size="small" @click="filedAndClose(scope.row.id)">修改</el-button>-->
               <!--归档撤回-->
-              <el-button v-if="hasPermission('cw:workContract:back') && scope.row.status === '5' && scope.row.filedType === '2'" type="text"  size="small" @click="rebackFiled(scope.row)">撤回</el-button>
+<!--              <el-button v-if="hasPermission('cw:workContract:back') && scope.row.status === '5' && scope.row.filedType === '2'" type="text"  size="small" @click="rebackFiled(scope.row)">撤回</el-button>-->
               <!--合同借用-->
-              <el-button v-if="hasPermission('cw:workContract:borrow') && scope.row.status === '5' && scope.row.filedType === '5' && (scope.row.borrowType === undefined || scope.row.borrowType === '0' || scope.row.borrowType === '1')" type="text" size="small" @click="borrow(scope.row.id)">借用</el-button>
+              <el-button v-if="hasPermission('cw:workContract:borrow') && scope.row.status === '5' && (scope.row.borrowType === undefined || scope.row.borrowType === '0' || scope.row.borrowType === '1')" type="text" size="small" @click="borrow(scope.row.id)">借用</el-button>
               <!--借用撤回-->
-              <el-button v-if="hasPermission('cw:workContract:back') && scope.row.status === '5' && scope.row.filedType === '5' && scope.row.borrowType === '2'" type="text" size="small" @click="rebackBorrow(scope.row)">撤回</el-button>
+              <el-button v-if="hasPermission('cw:workContract:back') && scope.row.status === '5' && scope.row.borrowType === '2'" type="text" size="small" @click="rebackBorrow(scope.row)">撤回</el-button>
               <!--借用归还-->
-              <el-button v-if="hasPermission('cw:workContract:reture') && scope.row.status === '5' && scope.row.filedType === '5' && scope.row.borrowType === '5'" type="text" size="small" @click="retureBorrow(scope.row)">归还合同</el-button>
+              <el-button v-if="hasPermission('cw:workContract:reture') && scope.row.status === '5'  && scope.row.borrowType === '5'" type="text" size="small" @click="retureBorrow(scope.row)">归还合同</el-button>
 
-              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.filedType === '5' && scope.row.createId === $store.state.user.id && (scope.row.filedPaperType === '0' || scope.row.filedPaperType === undefined)" type="text" size="small" @click="paperFiled(scope.row.id)">纸质归档</el-button>
+              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5'  && scope.row.createId === $store.state.user.id && (scope.row.filedPaperType === '0' || scope.row.filedPaperType === undefined)" type="text" size="small" @click="paperFiled(scope.row.id)">纸质归档</el-button>
               <!--纸质归档暂存修改-->
-              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.filedType === '5' && scope.row.createId === $store.state.user.id && scope.row.filedPaperType === '1'" type="text" size="small" @click="paperFiled(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5'  && scope.row.createId === $store.state.user.id && scope.row.filedPaperType === '1'" type="text" size="small" @click="paperFiled(scope.row.id)">修改</el-button>
               <!--纸质归档撤回驳回修改-->
-              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.filedType === '5' && scope.row.createId === $store.state.user.id && (scope.row.filedPaperType === '3' || scope.row.filedPaperType === '4')" type="text" size="small" @click="paperFiledAndClose(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5'  && scope.row.createId === $store.state.user.id && (scope.row.filedPaperType === '3' || scope.row.filedPaperType === '4')" type="text" size="small" @click="paperFiledAndClose(scope.row.id)">修改</el-button>
               <!--纸质归档撤回-->
-              <el-button v-if="hasPermission('cw:workContract:back') && scope.row.status === '5' && scope.row.filedType === '5' && scope.row.filedPaperType === '2'" type="text"  size="small" @click="rebackPaperFiled(scope.row)">撤回</el-button>
+              <el-button v-if="hasPermission('cw:workContract:back') && scope.row.status === '5'  && scope.row.filedPaperType === '2'" type="text"  size="small" @click="rebackPaperFiled(scope.row)">撤回</el-button>
             </template>
           </vxe-column>
         </vxe-table>
@@ -203,6 +203,7 @@
     </div>
     <!-- 弹窗, 新增 / 修改 -->
     <ContractNameForm ref="contractNameForm"></ContractNameForm>
+    <ContractAddForm ref="contractAddForm"></ContractAddForm>
     <WorkClientForm ref="workClientForm" @refreshDataList="refreshList"></WorkClientForm>
     <WorkContractBorrowMessageForm ref="workContractBorrowMessageForm" @refreshDataList="refreshList"></WorkContractBorrowMessageForm>
   </div>
@@ -211,6 +212,7 @@
 <script>
   import InputNumber from './InputNumber.vue'
   import ContractNameForm from './ContractNameForm'
+  import ContractAddForm from './contractRegisitionAddForm/ContractAddForm'
   import WorkClientForm from '../../sys/workClient/WorkClientForm'
   import WorkContractBorrowMessageForm from './WorkContractBorrowMessageForm'
   // import WorkContractService from '@/api/sys/WorkContractService'
@@ -284,6 +286,7 @@
     components: {
       InputNumber,
       ContractNameForm,
+      ContractAddForm,
       WorkClientForm,
       WorkContractBorrowMessageForm,
       SelectUserTree,
@@ -343,7 +346,8 @@
       },
       // 新增
       add () {
-        this.start()
+        this.$refs.contractAddForm.init('add', '')
+        // this.start()
       },
       // 详情
       detail (row) {
@@ -586,7 +590,7 @@
         })
       },
       // 归档
-      filed (id) {
+      /* filed (id) {
         this.processService.getByName('财务-合同登记归档').then(({data}) => {
           if (!this.commonJS.isEmpty(data.id)) {
             // console.log('data', data)
@@ -616,9 +620,9 @@
               })
           }
         })
-      },
+      }, */
       // 归档
-      filedAndClose (id) {
+      /* filedAndClose (id) {
         this.processService.getByName('财务-合同登记归档').then(({data}) => {
           if (!this.commonJS.isEmpty(data.id)) {
             // console.log('data', data)
@@ -648,9 +652,9 @@
               })
           }
         })
-      },
+      }, */
       // 归档详情
-      detailFiled (row) {
+      /* detailFiled (row) {
         // console.log('row.id', row.id)
         // eslint-disable-next-line eqeqeq
         if (!this.commonJS.isEmpty(row.filedType) && row.filedType != '1') {
@@ -674,7 +678,7 @@
             }
           })
         }
-      },
+      }, */
       // 借用
       borrow (id) {
         this.processService.getByName('财务-合同登记借用').then(({data}) => {

+ 37 - 11
src/views/modules/cw/workContract/ContractRegistrationForm.vue

@@ -63,6 +63,20 @@
             <el-input maxlength="64" :disabled="true" v-model="inputForm.contractNo" placeholder="自动生成"></el-input>
           </el-form-item>
         </el-col>
+        <el-col :span="12">
+          <el-form-item label="合同类型" prop="contractType"
+                        :rules="[
+                 ]">
+            <el-select v-model="inputForm.contractType" placeholder="请选择合同类型" style="width:100%;">
+              <el-option
+                v-for="item in $dictUtils.getDictList('cw_contract_type')"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
         <!--        <el-col :span="12">-->
         <!--          <el-form-item label="合同状态" prop="contractStatus">-->
         <!--            <el-input maxlength="64" v-model="inputForm.contractStatus" :disabled="true" placeholder="请输入合同状态"></el-input>-->
@@ -84,7 +98,7 @@
         </el-col>
         <el-col :span="12">
           <el-form-item label="付款方式" prop="paymentMethod"
-                        :rules="[{required: true, message: '付款方式不能为空', trigger: 'blur'}
+                        :rules="[
                  ]">
             <el-select v-model="inputForm.paymentMethod" placeholder="请选择付款方式" style="width:100%;">
               <el-option
@@ -96,6 +110,14 @@
             </el-select>
           </el-form-item>
         </el-col>
+        <el-col>
+          <el-form-item label="付款描述" prop="paymentDescribe" v-if="inputForm.paymentMethod === '2'"
+                        :rules="[
+               ]">
+            <el-input type="textarea" v-model="inputForm.paymentDescribe" placeholder="请输入付款描述"
+            ></el-input>
+          </el-form-item>
+        </el-col>
 
         <el-col :span="12">
           <el-form-item label="签约日期" prop="signingDate"
@@ -126,13 +148,13 @@
           </el-form-item>
         </el-col>
 
-        <el-col :span="12">
-          <el-form-item label="修改次数" prop="changeNum"
-                        :rules="[{required: true, message: '修改次数', trigger: 'blur'}
-                 ]">
-            <el-input maxlength="64" :disabled="true" v-model="inputForm.changeNum" placeholder="请输入修改次数"></el-input>
-          </el-form-item>
-        </el-col>
+<!--        <el-col :span="12">-->
+<!--          <el-form-item label="修改次数" prop="changeNum"-->
+<!--                        :rules="[{required: true, message: '修改次数', trigger: 'blur'}-->
+<!--                 ]">-->
+<!--            <el-input maxlength="64" :disabled="true" v-model="inputForm.changeNum" placeholder="请输入修改次数"></el-input>-->
+<!--          </el-form-item>-->
+<!--        </el-col>-->
 
         <el-col :span="12">
           <el-form-item  prop="department" label="所属部门">
@@ -219,7 +241,7 @@
           </el-form-item>
         </el-col>
 
-        <el-col :span="12">
+        <el-col>
           <el-form-item label="付款约定" prop="paymentAgreement">
             <el-input maxlength="64" type="textarea" v-model="inputForm.paymentAgreement" placeholder="请输入付款约定"></el-input>
           </el-form-item>
@@ -228,8 +250,8 @@
       </el-row>
 
       <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
-        <el-tab-pane label="合同文" name="contractProper">
-          <!--        合同文-->
+        <el-tab-pane label="合同文" name="contractProper">
+          <!--        合同文-->
           <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
         </el-tab-pane>
         <el-tab-pane label="参与签约方" name="contactParty">
@@ -359,9 +381,11 @@
           contractFees: [],
           contractFee: '',
           contractNo: '',
+          contractType: '',
           contractName: '',
           payerSubject: '',
           paymentMethod: '',
+          paymentDescribe: '',
           signingDate: '',
           contractAmount: '',
           actualContractAmount: '',
@@ -496,9 +520,11 @@
           contractFees: [],
           contractFee: '',
           contractNo: '',
+          contractType: '',
           contractName: '',
           payerSubject: '',
           paymentMethod: '',
+          paymentDescribe: '',
           signingDate: '',
           fees: '',
           contractAmount: '',

+ 982 - 0
src/views/modules/cw/workContract/contractRegisitionAddForm/ContractAddForm.vue

@@ -0,0 +1,982 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+      v-dialogDrag
+      width="1300px"
+      @close="close"
+      @keyup.enter.native=""
+      :visible.sync="visible">
+    <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="formReadOnly"
+             label-width="150px">
+
+      <el-divider v-if="formReadOnly && commonJS.isNotEmpty(inputForm.customerId)" content-position="left">
+        <el-link  type="primary" :underline="false" icon="el-icon-document" @click="viewClient(inputForm.customerId)"><b>查看客户详情</b></el-link>
+      </el-divider>
+      <el-divider v-else content-position="left"><i class="el-icon-document"></i> 客户信息</el-divider>
+      <el-row  :gutter="0">
+        <el-col :span="12">
+          <el-form-item label="委托方联系人" prop="clientContacts"
+                        :rules="[
+                          // {required: true, message: '委托方联系人', trigger: 'blur'}
+                 ]">
+            <el-input maxlength="100" @focus="openWorkClient2()" v-model="inputForm.clientContacts" placeholder="请选择委托方联系人">
+              <el-button slot="append" icon="el-icon-search" @click="openWorkClient2()"></el-button>
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="客户编号" prop="customerNo"
+                        :rules="[
+                   ]">
+            <el-input :disabled="true" v-model="inputForm.customerNo" placeholder="请填写客户编号" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="统一社会信用代码" prop="uscCode"
+                        :rules="[
+                   ]">
+            <el-input :disabled="true" v-model="inputForm.uscCode" placeholder="请填写统一社会信用代码" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="委托方联系人电话" prop="clientContactsPhone"
+                        :rules="[
+                          // {required: true, message: '委托方联系人电话', trigger: 'blur'}
+                 ]">
+            <el-input maxlength="15" :disabled="true" v-model="inputForm.clientContactsPhone" placeholder="请输入委托方联系人电话"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="地址" prop="address"
+                        :rules="[
+                   ]">
+            <el-input :disabled="true" v-model="inputForm.address" placeholder="地址" clearable></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-divider content-position="left"><i class="el-icon-document"></i> 基本信息</el-divider>
+      <el-row  :gutter="0">
+        <el-col :span="12">
+          <el-form-item label="合同名称" prop="contractName"
+                        :rules="[{required: true, message: '合同名称不能为空', trigger: 'blur'}
+                 ]">
+            <el-input v-model="inputForm.contractName" placeholder="请输入合同名称" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="合同编号" prop="contractNo">
+            <el-input maxlength="64" :disabled="true" v-model="inputForm.contractNo" placeholder="自动生成"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="合同类型" prop="contractType"
+                        :rules="[
+                 ]">
+            <el-select v-model="inputForm.contractType" placeholder="请选择合同类型" style="width:100%;">
+              <el-option
+                v-for="item in $dictUtils.getDictList('cw_contract_type')"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="合同流水号" prop="contractSerialNumber">
+            <el-input maxlength="64" :disabled="true" v-model="inputForm.contractSerialNumber" placeholder="自动生成"></el-input>
+          </el-form-item>
+        </el-col>
+        <!--        <el-col :span="12">-->
+        <!--          <el-form-item label="合同状态" prop="contractStatus">-->
+        <!--            <el-input maxlength="64" v-model="inputForm.contractStatus" :disabled="true" placeholder="请输入合同状态"></el-input>-->
+        <!--          </el-form-item>-->
+        <!--        </el-col>-->
+        <el-col :span="12">
+          <el-form-item label="付款主体" prop="payerSubject"
+                        :rules="[{required: true, message: '付款主体不能为空', trigger: 'blur'}
+                 ]">
+            <el-select v-model="inputForm.payerSubject" placeholder="请选择付款主体" style="width:100%;">
+              <el-option
+                v-for="item in $dictUtils.getDictList('cw_payment_subject')"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="付款方式" prop="paymentMethod"
+                        :rules="[
+                 ]">
+            <el-select v-model="inputForm.paymentMethod" placeholder="请选择付款方式" style="width:100%;">
+              <el-option
+                v-for="item in $dictUtils.getDictList('cw_payment_method')"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col>
+          <el-form-item label="付款描述" prop="paymentDescribe" v-if="inputForm.paymentMethod === '2'"
+                        :rules="[
+               ]">
+            <el-input type="textarea" v-model="inputForm.paymentDescribe" placeholder="请输入付款描述"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="签约日期" prop="signingDate"
+                        :rules="[
+                {required: true, message:'请输入签约日期', trigger:'blur'}
+               ]">
+            <el-date-picker
+              placement="bottom-start"
+              value-format="yyyy-MM-dd"
+              v-model="inputForm.signingDate"
+              style="width: 100%"
+              placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="合同份数" prop="contractNum"
+                        :rules="[{required: true, message: '合同份数', trigger: 'blur'}
+                 ]">
+            <el-input maxlength="64" v-model="inputForm.contractNum" placeholder="请输入合同份数"></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="对方合同编号" prop="contractOpposite">
+            <el-input maxlength="64" v-model="inputForm.contractOpposite" placeholder="请填写对方合同编号"></el-input>
+          </el-form-item>
+        </el-col>
+
+        <!--        <el-col :span="12">-->
+        <!--          <el-form-item label="修改次数" prop="changeNum"-->
+        <!--                        :rules="[{required: true, message: '修改次数', trigger: 'blur'}-->
+        <!--                 ]">-->
+        <!--            <el-input maxlength="64" :disabled="true" v-model="inputForm.changeNum" placeholder="请输入修改次数"></el-input>-->
+        <!--          </el-form-item>-->
+        <!--        </el-col>-->
+
+        <el-col :span="12">
+          <el-form-item  prop="department" label="所属部门">
+            <SelectTree
+              ref="officeTree"
+              :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+
+              :url="`/sys/office/treeData?type=1`"
+              :value="inputForm.department"
+              :accordion="true"
+              size="medium"
+              @getValue="(value) => {inputForm.department=value}"/>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="创建人" prop="createBy"
+                        :rules="[{required: true, message: '创建人', trigger: 'blur'}
+                 ]">
+            <el-input maxlength="64" :disabled="true" v-model="inputForm.createBy" placeholder="请输入创建人"></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="创建时间" prop="createDate">
+            <el-date-picker
+              placement="bottom-start"
+              value-format="yyyy-MM-dd"
+              v-model="inputForm.createDate"
+              style="width: 100%"
+              :disabled="true"
+              placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+
+        <el-col>
+          <el-form-item label="合同金额类别" prop="contractAmountType"
+                        :rules="[
+                  {required: true, message:'请选择合同金额类别', trigger:'blur'}
+               ]">
+            <el-radio-group v-model="inputForm.contractAmountType">
+              <el-radio v-for="item in $dictUtils.getDictList('contract_amount_type')" :label="item.value" >{{item.label}}</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="合同金额(元)" prop="contractAmount" v-if="inputForm.contractAmountType === '1'"
+                        :rules="[
+                  {required: true, message:'请输入合同金额(元)', trigger:'blur'}
+               ]">
+            <el-input maxlength="15" v-model="inputForm.contractAmount" placeholder="请输入合同金额(元)"
+                      @keyup.native="inputForm.contractAmount = twoDecimalPlaces(inputForm.contractAmount)"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="合同实际金额" prop="actualContractAmount">
+            <el-input maxlength="64" :disabled="true" v-model="inputForm.actualContractAmount"
+                      @keyup.native="inputForm.actualContractAmount = twoDecimalPlaces(inputForm.actualContractAmount)"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="24">
+          <el-form-item label="收费标准" prop="contractFees">
+            <el-checkbox-group v-model="inputForm.contractFees">
+              <el-checkbox @change="changeContractFee" v-for="item in $dictUtils.getDictList('contract_fee')" :label="item.value">
+                {{item.label}}
+              </el-checkbox>
+            </el-checkbox-group>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="24">
+          <el-form-item prop="contractFee">
+            <el-input style="width: 100%" placeholder="请选择收费标准" v-model="inputForm.contractFee"></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col>
+          <el-form-item label="付款约定" prop="paymentAgreement">
+            <el-input maxlength="64" type="textarea" v-model="inputForm.paymentAgreement" placeholder="请输入付款约定"></el-input>
+          </el-form-item>
+        </el-col>
+
+      </el-row>
+
+      <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
+        <el-tab-pane label="合同文件" name="contractProper">
+          <!--        合同文件-->
+          <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+        </el-tab-pane>
+        <el-tab-pane label="参与签约方" name="contactParty">
+          <span slot="label"><span style="color: red;border-top: 20px">*</span> 参与签约方</span>
+          <el-row :gutter="15">
+            <el-button type="primary" style="margin-bottom: 15px" size="mini" :disabled="formReadOnly" @click="openWorkClient">
+              新增参与签约方
+            </el-button>
+          </el-row>
+          <el-row :gutter="15">
+            <el-form>
+              <vxe-table
+                border
+                show-overflow
+                show-footer
+                :column-config="{resizable: true}"
+                ref="contactTable"
+                :key="tableKeyClient"
+                class="vxe-table-element"
+                :data="inputForm.cwWorkClientContactDTOList"
+                style=""
+                @cell-click=""
+                @edit-closed=""
+                highlight-current-row
+                :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: false}"
+              >
+                <vxe-table-column align="center" field="no" title="客户编号" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input :readonly="true" v-model="scope.row.no" placeholder="客户编号" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" field="name" title="客户名称" :edit-render="{}">
+                  <template v-slot:edit="scope">
+                    <el-input :readonly="true" v-model="scope.row.name" placeholder="客户名称" clearable></el-input>
+                  </template>
+                </vxe-table-column>
+                <vxe-table-column align="center" title="操作" width="100">
+                  <template v-slot="scope">
+                    <el-button size="mini" :disabled="formReadOnly" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'client')">删除</el-button>
+                  </template>
+                </vxe-table-column>
+              </vxe-table>
+            </el-form>
+          </el-row>
+        </el-tab-pane>
+        <el-tab-pane  label="合同归档文件" name="archiveFile">
+          <!--        合同归档文件-->
+          <UpLoadComponent ref="archiveFile"></UpLoadComponent>
+        </el-tab-pane>
+
+      </el-tabs>
+
+    </el-form>
+    <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 !== 'view'" type="primary" icon="el-icon-circle-check" @click="doSubmit('save')">确定</el-button>
+    </span>
+    <el-image-viewer
+      v-if="showViewer"
+      :on-close="closeViewer"
+      :url-list="[url]"
+      zIndex="9999"/>
+    </el-dialog>
+    <WorkClientChooseForm ref="workClientChooseForm" @getWorkClientChoose="getWorkClientChoose"></WorkClientChooseForm>
+    <WorkClientChooseRadio ref="workClientChooseRadio" @getWorkClientRadioChoose="getWorkClientChoose2"></WorkClientChooseRadio>
+    <WorkClientForm ref="workClientForm" @refreshList=""></WorkClientForm>
+  </div>
+</template>
+
+<script>
+  // import WorkContractService from '@/api/sys/WorkContractService'
+  import ContractInfoService from '@/api/cw/workContract/ContractInfoService'
+  import UpLoadComponent from '@/views/common/UpLoadComponent'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
+  import WorkClientSelect from '@/components/workClientInfoSelect'
+  import WorkClientForm from '../../workClientInfo/WorkClientForm'
+  import WorkClientChooseForm from '../../workClientInfo/WorkClientChooseForm'
+  import WorkClientChooseRadio from '../../workClientInfo/WorkClientChooseRadio'
+  import OSSSerive, {
+    httpRequest,
+    toHref,
+    openWindowOnUrl,
+    handleRemove,
+    fileName
+  } from '@/api/sys/OSSService'
+  import moment from 'moment'
+  import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
+  export default {
+    data () {
+      return {
+        visable: false,
+        gridData: [],
+        radio: 0,
+        tableData: [],
+        dataList: [],
+        dataListNew: [],
+        title: '',
+        method: '',
+        isSubmit: false,
+        visible: false,
+        loading: false,
+        returnForm: {
+          customerId: '',  // 客户id
+          address: '',
+          uscCode: '',
+          clientId: '',
+          name: '',
+          contractDate: '',
+          effectiveDate: '',
+          closingDate: '',
+          contractType: '',
+          contractAmountType: '',
+          contractAmount: '',
+          contractOpposite: '',
+          contractFees: [],
+          fees: '',
+          contractFee: '',
+          describes: '',
+          contractSpecial: '',
+          remarks: '',
+          clientName: '',
+          contractProperList: [],
+          status: '',
+          customerNo: '',
+          customerName: ''
+        },
+        inputForm: {
+          customerId: '',  // 客户id
+          address: '',
+          uscCode: '',
+          customerNo: '',
+          contractFees: [],
+          contractFee: '',
+          contractNo: '',
+          contractSerialNumber: '',
+          contractType: '',
+          contractName: '',
+          payerSubject: '',
+          paymentMethod: '',
+          paymentDescribe: '',
+          signingDate: '',
+          contractAmount: '',
+          actualContractAmount: '',
+          contractNum: '2',
+          contractStatus: '新创建',
+          paymentAgreement: '',
+          changeNum: '0',
+          department: '',
+          clientContacts: '',
+          clientContactsPhone: '',
+          createBy: JSON.parse(localStorage.getItem('user')).name,
+          createId: JSON.parse(localStorage.getItem('user')).id,
+          createDate: '',
+          contractProperList: [],
+          cwWorkClientContactDTOList: [],
+          contractAmountType: '',
+          contractOpposite: '',
+          fees: ''
+        },
+        activeName: 'contractProper',
+        filesArra2: [],
+        fileList: [],
+        isFlag: true,
+        showViewer: false, // 显示查看器
+        url: '',
+        rowurl: '',
+        src: '',
+        onedit: false,
+        type: '',
+        loadProgress: 0, // 动态显示进度条
+        progressFlag: false, // 关闭进度条
+        promi: null,
+        tableKeyClient: '1',
+        keyWatch: ''
+      }
+    },
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      formReadOnly: {
+        type: Boolean,
+        default: false
+      }
+    },
+    components: {
+      ElImageViewer,
+      UpLoadComponent,
+      SelectTree,
+      WorkClientSelect,
+      WorkClientForm,
+      WorkClientChooseForm,
+      WorkClientChooseRadio
+    },
+    // computed: {
+    //   officeName () {
+    //     return JSON.parse(localStorage.getItem('user')).officeDTO.name
+    //   }
+    // },
+    ossService: null,
+    contractInfoService: null,
+    created () {
+      this.ossService = new OSSSerive()
+      this.contractInfoService = new ContractInfoService()
+    },
+    mounted () {
+      window.onPreview = this.onPreview
+    },
+    computed: {
+      officeName () {
+        return JSON.parse(localStorage.getItem('user')).officeDTO.name
+      },
+      bus: {
+        get () {
+          this.$refs.archiveFile.setDividerName('附件', false)
+          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()
+            })
+          }
+        }
+      }
+    },
+    methods: {
+      getKeyWatch (keyWatch) {
+        this.keyWatch = keyWatch
+      },
+      uploadVideoProcess (event, file, fileList) {
+        this.progressFlag = true // 显示进度条
+        this.loadProgress = parseInt(event.percent) // 动态获取文件上传进度
+        if (this.loadProgress >= 100) {
+          this.loadProgress = 100
+          setTimeout(() => { this.progressFlag = false }, 1000) // 一秒后关闭进度条
+        }
+      },
+      async toHref (row) {
+        toHref(row)
+      },
+      onPreview (url) {
+        this.url = url
+        this.showViewer = true
+      },
+      // 关闭查看器
+      closeViewer () {
+        this.url = ''
+        this.showViewer = false
+      },
+      init (method, id) {
+        this.dataList = []
+        this.dataListNew = []
+        this.method = method
+        // console.log('method', method)
+        this.inputForm = {
+          customerId: '',  // 客户id
+          address: '',
+          uscCode: '',
+          customerNo: '',
+          contractFees: [],
+          contractFee: '',
+          contractNo: '',
+          contractSerialNumber: '',
+          contractType: '',
+          contractName: '',
+          payerSubject: '',
+          paymentMethod: '',
+          paymentDescribe: '',
+          signingDate: '',
+          fees: '',
+          contractAmount: '',
+          actualContractAmount: '',
+          contractNum: '',
+          contractStatus: '',
+          paymentAgreement: '',
+          changeNum: '',
+          department: '',
+          clientContacts: '',
+          clientContactsPhone: '',
+          createBy: JSON.parse(localStorage.getItem('user')).name,
+          createId: JSON.parse(localStorage.getItem('user')).id,
+          createDate: '',
+          contractProperList: [],
+          cwWorkClientContactDTOList: [],
+          contractAmountType: '',
+          contractOpposite: ''
+        }
+        this.inputForm.id = id
+        if (method === 'add') {
+          this.title = `新建合同登记`
+        } else if (method === 'edit') {
+          this.title = '修改合同登记'
+        } else if (method === 'view') {
+          this.inputForm.showVi = false
+          this.title = '查看合同登记'
+        }
+        this.visible = true
+        this.loading = false
+        this.$nextTick(() => {
+          this.$refs.inputForm.resetFields()
+          // if (method === 'edit' || method === 'view') { // 修改或者查看
+          this.loading = true
+          this.$refs.uploadComponent.clearUpload()
+          this.$refs.archiveFile.clearUpload()
+          this.contractInfoService.findById(this.inputForm.id).then(({data}) => {
+            this.inputForm = this.recover(this.inputForm, data)
+            if (this.commonJS.isEmpty(this.inputForm.contractAmountType)) {
+              this.inputForm.contractAmountType = '1'
+            }
+            if (this.commonJS.isEmpty(this.inputForm.department)) {
+              this.inputForm.department = JSON.parse(localStorage.getItem('user')).officeDTO.id
+            }
+            // 对数值进行判断是否为空,为空则赋值默认值
+            // console.log('this.inputForm.contractStatus', this.inputForm.contractStatus)
+            if (this.inputForm.contractStatus === undefined || this.inputForm.contractStatus === '') {
+              this.inputForm.contractStatus = '新创建'
+            }
+            if (this.inputForm.contractNum === undefined || this.inputForm.contractNum === '') {
+              this.inputForm.contractNum = '2'
+            }
+            if (this.inputForm.changeNum === undefined || this.inputForm.changeNum === '') {
+              this.inputForm.changeNum = '0'
+            }
+            if (this.inputForm.createBy === undefined || this.inputForm.createBy === '') {
+              this.inputForm.createBy = JSON.parse(localStorage.getItem('user')).name
+            }
+            if (this.inputForm.createId === undefined || this.inputForm.createId === '') {
+              this.inputForm.createId = JSON.parse(localStorage.getItem('user')).id
+            }
+            if (this.commonJS.isEmpty(this.inputForm.createDate)) {
+              this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+            }
+            const f = []
+            if (data.fees !== null && data.fees !== undefined && data.fees !== '') {
+              data.fees.split(',').forEach(item => {
+                if (item !== null && item !== undefined && item !== '') {
+                  f.push(item)
+                }
+              })
+            }
+            this.inputForm.contractFees = f
+            if (this.formReadOnly) {
+              method = 'view'
+            }
+            this.$refs.uploadComponent.newUpload(method, this.inputForm.contractProperList, 'cwWorkContract', null, null, null, null, false)
+            this.$refs.archiveFile.newUpload('view', [], 'cwWorkContract', null, null, null, null, false)
+            this.loading = false
+          })
+        })
+      },
+      // 表单提交  保存数据
+      doSubmit (status, callback) {
+        if (this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        } else {
+          this.$refs['inputForm'].validate(async (valid) => {
+            if (valid) {
+              this.loading = true
+              this.inputForm.status = '5'
+              this.inputForm.filedType = '5'
+              this.inputForm.fees = this.inputForm.contractFees.join(',')
+              this.inputForm.contractProperList = this.$refs.uploadComponent.getDataList()
+              // this.inputForm.contractInfoList = this.$refs.archiveFile.getDataList()
+              this.contractInfoService.save(this.inputForm).then(({data}) => {
+                this.loading = false
+                this.close()
+              }).catch(() => {
+                this.$refs.inputForm.resetFields()
+                this.loading = false
+              })
+            }
+          })
+        }
+      },
+      // 查看
+      view (id) {
+        this.$refs.workClientForm.init('view', id)
+      },
+      // 新增
+      // eslint-disable-next-line no-dupe-keys
+      async insertEvent (type) {
+        if (type === 'client') {
+          let d = {
+            no: '',
+            name: ''
+          }
+          if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
+            this.inputForm.cwWorkClientContactDTOList = []
+          }
+          this.$refs.contactTable.insertAt(d)
+          this.inputForm.cwWorkClientContactDTOList.push(d)
+          this.tableKeyClient = Math.random()
+        }
+      },
+
+      // 删除
+      removeEvent (row, rowIndex, type) {
+        if (type === 'client') {
+          this.$refs.contactTable.remove(row)
+          this.inputForm.cwWorkClientContactDTOList.splice(rowIndex, 1)
+        }
+      },
+      openWorkClient () {
+        this.$refs.workClientChooseForm.init()
+      },
+      openWorkClient2 () {
+        this.$refs.workClientChooseRadio.init()
+      },
+      getWorkClientChoose (list) {
+        // console.log('list', list)
+        if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
+          this.inputForm.cwWorkClientContactDTOList = []
+        }
+        let _this = this
+        let _list = list
+        const waitForEach = function () {
+          return new Promise(function (resolve, reject) {
+            _list.forEach((item) => {
+              _this.inputForm.cwWorkClientContactDTOList.forEach(client => {
+                if (item.no === client.no) {
+                  _this.$message.error('已存在客户 “' + client.name + '”,请重新选择')
+                  throw new Error('已存在客户 “' + client.name + '”,请重新选择')
+                }
+              })
+            })
+            resolve()
+          })
+        }
+        waitForEach().then(() => {
+          list.forEach(item => {
+            this.$refs.contactTable.insertAt(item)
+            this.inputForm.cwWorkClientContactDTOList.push(item)
+            this.tableKeyClient = Math.random()
+          })
+        })
+      },
+      getWorkClientChoose2 (list) {
+        if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
+          this.inputForm.cwWorkClientContactDTOList = []
+        }
+        // console.log('list', list)
+        let _this = this
+        // eslint-disable-next-line no-unused-vars
+        let _list = list
+        let _num = 0
+        const waitForEach = function () {
+          return new Promise(function (resolve, reject) {
+            if (_this.commonJS.isEmpty(_this.inputForm.cwWorkClientContactDTOList)) {
+              resolve()
+            } else {
+              _this.inputForm.cwWorkClientContactDTOList.forEach((client, index) => {
+                if (_this.inputForm.customerNo === client.no) {
+                  _this.$refs.contactTable.remove(client)
+                  _this.inputForm.cwWorkClientContactDTOList.splice(index, 1)
+                }
+              })
+              setTimeout(() => {
+                resolve()
+              }, 400)
+            }
+          })
+        }
+        waitForEach().then(() => {
+          this.inputForm.customerNo = list.no
+          this.inputForm.uscCode = list.uscCode
+          this.inputForm.address = list.address
+          this.inputForm.customerId = list.id
+          this.inputForm.clientContacts = list.name
+          this.inputForm.clientContactsPhone = list.mobile
+          const wait = function () {
+            return new Promise(function (resolve, reject) {
+              _this.inputForm.cwWorkClientContactDTOList.forEach(client => {
+                if (_list.no === client.no) {
+                  _num = 1
+                }
+              })
+              setTimeout(() => {
+                resolve()
+              }, 100)
+            })
+          }
+          wait().then(() => {
+            if (_num === 0) {
+              this.inputForm.cwWorkClientContactDTOList.push({no: list.no, name: list.name})
+              this.$refs.contactTable.insertAt({no: list.no, name: list.name})
+              this.tableKeyClient = Math.random()
+            }
+          })
+        })
+      },
+      // 表单提交
+      changeContractFee () {
+        let fee = ''
+        let fees = this.inputForm.contractFees
+        if (fees.length > 0) {
+          fees.forEach(i => {
+            if (i === '1') {
+              i = '苏会协[2010]52号'
+              fee = fee + ';' + i
+            }
+            if (i === '2') {
+              i = '苏政办发[2010]101号'
+              fee = fee + ';' + i
+            }
+            if (i === '3') {
+              i = '苏价费[2010]284号'
+              fee = fee + ';' + i
+            }
+            if (i === '4') {
+              i = '发改价格[2010]196号'
+              fee = fee + ';' + i
+            }
+            if (i === '5') {
+              i = '其他'
+              fee = fee + ';' + i
+            }
+            this.inputForm.contractFee = fee.substring(1, fee.length)
+          })
+        } else {
+          this.inputForm.contractFee = ''
+        }
+      },
+      close () {
+        this.$refs.inputForm.resetFields()
+        this.inputForm.clientName = ''
+        this.inputForm.cwWorkClientContactDTOList = []
+        this.visible = false
+        this.showVi = true
+        this.$refs.uploadComponent.clearUpload()
+      },
+      tabHandleClick (event) {
+        // console.log(event)
+      },
+      httpRequest (file) {
+        httpRequest(file, fileName(file), 'workContract')
+      },
+      handleRemove () {
+        this.fileList = handleRemove()
+      },
+      changes (file, fileList) {
+        this.dataListNew = []
+        this.dataList.forEach((item) => {
+          this.dataListNew.push(item)
+        })
+        fileList.forEach((item) => {
+          item.createDate = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+          item.createBy = this.$store.state.user.name
+          this.dataListNew.push(item)
+        })
+        const isLt2M = file.size / 1024 / 1024 < 300
+        if (isLt2M === false) {
+          this.$message.error('文件大小不能超过 ' + 300 + 'M !')
+          this.fileList = []
+          this.filesArra2 = []
+        }
+      },
+      async showFile (row) {
+        await openWindowOnUrl(row)
+      },
+      // 排序
+      sortChangeHandle (column) {
+        this.orders = []
+        if (column.order != null) {
+          this.orders.push({column: this.$utils.toLine(column.prop), asc: column.order === 'ascending'})
+        }
+        this.refreshList()
+      },
+      deleteMsgById (row, index) {
+        this.dataListNew.splice(index, 1)
+        if (row.id !== null && row.id !== '' && row.id !== undefined) {
+          this.ossService.deleteMsgById(row.id)
+        }
+      },
+      twoDecimalPlaces (num) {
+        let str = num.toString()
+        var len1 = str.substr(0, 1)
+        var len2 = str.substr(1, 1)
+        // eslint-disable-next-line eqeqeq
+        if (str.length > 1 && len1 == 0 && len2 != '.') {
+          str = str.substr(1, 1)
+        }
+        // eslint-disable-next-line eqeqeq
+        if (len1 == '.') {
+          str = ''
+        }
+        // eslint-disable-next-line eqeqeq
+        if (str.indexOf('.') != -1) {
+          var str_ = str.substr(str.indexOf('.') + 1)
+          // eslint-disable-next-line eqeqeq
+          if (str_.indexOf('.') != -1) {
+            str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
+          }
+          if (str_.length > 2) {
+            this.$message.warning(`金额小数点后只能输入两位,请正确输入!`)
+            return (str = '')
+          }
+        }
+        // eslint-disable-next-line no-useless-escape
+        str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
+        return str
+      },
+      positiveInteger (num) {
+        let str = num.toString()
+        var len1 = str.substr(0, 1)
+        var len2 = str.substr(1, 1)
+        // eslint-disable-next-line eqeqeq
+        if (str.length > 1 && len1 == 0 && len2 != '.') {
+          str = str.substr(1, 1)
+        }
+        // eslint-disable-next-line eqeqeq
+        if (len1 == '.') {
+          str = ''
+        }
+        // eslint-disable-next-line no-useless-escape
+        str = str.replace(/[^\d^]+/g, '') // 保留数字
+        return str
+      },
+      tableRowClassName ({row, rowIndex}) {
+        row.index = rowIndex
+      },
+      handleRadioChange (val) {
+        if (val) {
+          this.radio = val.index
+        }
+      },
+      // 关闭窗口时调用
+      closeXTable () {
+        this.closePop()
+      },
+      rowStyle (event) {
+        return 'cursor:pointer;'
+      },
+      closePop () {
+        this.visable = false
+      },
+      /* updateStatusById (type) {
+        if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        } else {
+          if (type === 'agree') {
+            this.inputForm.status = '5'
+            this.contractInfoService.updateStatusById(this.inputForm)
+          }
+          // 驳回
+          if (type === 'reject') {
+            this.inputForm.status = '4'
+            this.contractInfoService.updateStatusById(this.inputForm)
+          }
+          if (type === 'reback') {
+            this.inputForm.status = '3'
+            this.contractInfoService.updateStatusById(this.inputForm)
+          }
+          // 流程终止,调整为暂存状态
+          if (type === 'hold') {
+            this.inputForm.status = '1'
+            this.contractInfoService.updateStatusById(this.inputForm)
+          }
+        }
+      }, */
+      checkData () {
+        let begin = this.inputForm.effectiveDate
+        let close = this.inputForm.closingDate
+        if (close < begin) {
+          this.$message.warning(`合同终止日期要大于合同开始日期`)
+          this.inputForm.closingDate = ''
+        }
+      },
+      // 查看客户信息详情
+      viewClient (id) {
+        this.$refs.workClientForm.init('view', id)
+      }
+    }
+  }
+</script>
+
+<style>
+  .tid_40 .vxe-body--column .vxe-cell{
+    padding: 1px;
+    text-align: center;
+  }
+  .tid_40 .vxe-header--row .col--last{
+    text-align: center;
+  }
+  .tid_45 .vxe-body--column .vxe-cell{
+    padding: 1px;
+    text-align: center;
+  }
+  .tid_45 .vxe-header--row .col--last{
+    text-align: center;
+  }
+</style>
+
+<style scoped>
+  .avatar{
+    height: 100px;
+  }
+  .el-divider__text {
+    font-weight: bold;
+    font-size: 16px;
+  }
+</style>

+ 8 - 8
src/views/modules/materialManagement/info/UpdateInfoForm.vue

@@ -87,7 +87,7 @@
         </el-row>
 
         <el-divider content-position="left"><i class="el-icon-document"></i>
-          报销详情
+          采购详情
           <el-button style="margin-left: 20px" type="primary" @click="insertEvent('detail')" plain>
             新增
           </el-button>
@@ -299,13 +299,13 @@
           files: [] // 附件信息
         }
         if (method === 'add') {
-          this.title = `新建报销类型`
+          this.title = `新建采购类型`
         } else if (method === 'edit') {
           this.inputForm.id = id
-          this.title = '修改报销类型'
+          this.title = '修改采购类型'
         } else if (method === 'view') {
           this.inputForm.id = id
-          this.title = '查看报销类型'
+          this.title = '查看采购类型'
         } else if (method === 'addChild') {
           this.title = '添加下级结构'
           this.inputForm.parentId = id
@@ -468,7 +468,7 @@
               this.inputForm.files = []
             }
             if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
-              this.$message.error('至少填写一条报销详情信息')
+              this.$message.error('至少填写一条采购详情信息')
               this.loading = false
               return
             } else {
@@ -476,17 +476,17 @@
               for (let j = 0; j < i; j++) {
                 let k = j + 1
                 if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].purchaser)) {
-                  this.$message.error('报销详情第' + k + '行请选择采购人')
+                  this.$message.error('采购详情第' + k + '行请选择采购人')
                   this.loading = false
                   return
                 }
                 if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].procurementType)) {
-                  this.$message.error('报销详情第' + k + '行请选择采购类型')
+                  this.$message.error('采购详情第' + k + '行请选择采购类型')
                   this.loading = false
                   return
                 }
                 if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].tradePrice)) {
-                  this.$message.error('报销详情第' + k + '行请输入商品单价')
+                  this.$message.error('采购详情第' + k + '行请输入商品单价')
                   this.loading = false
                   return
                 }

+ 4 - 4
src/views/modules/materialManagement/purchase/PurchaseForm.vue

@@ -513,7 +513,7 @@
               this.inputForm.files = []
             }
             if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
-              this.$message.error('至少填写一条报销详情信息')
+              this.$message.error('至少填写一条采购详情信息')
               this.loading = false
               return
             } else {
@@ -521,17 +521,17 @@
               for (let j = 0; j < i; j++) {
                 let k = j + 1
                 if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].purchaser)) {
-                  this.$message.error('报销详情第' + k + '行请选择采购人')
+                  this.$message.error('采购详情第' + k + '行请选择采购人')
                   this.loading = false
                   return
                 }
                 if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].procurementType)) {
-                  this.$message.error('报销详情第' + k + '行请选择采购类型')
+                  this.$message.error('采购详情第' + k + '行请选择采购类型')
                   this.loading = false
                   return
                 }
                 if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].tradePrice)) {
-                  this.$message.error('报销详情第' + k + '行请输入商品单价')
+                  this.$message.error('采购详情第' + k + '行请输入商品单价')
                   this.loading = false
                   return
                 }