lizhenhao 2 lat temu
rodzic
commit
a5da714178

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

@@ -30,6 +30,13 @@ export default class ProgramProjectListInfoService {
       params: {id: id}
     })
   }
+  findByIdArchive (id) {
+    return request({
+      url: '/program/projectList/findByIdArchive',
+      method: 'get',
+      params: {id: id}
+    })
+  }
   save (inputForm) {
     return request({
       url: `/program/projectList/save`,
@@ -51,6 +58,13 @@ export default class ProgramProjectListInfoService {
       data: inputForm
     })
   }
+  saveFormArchive (inputForm) {
+    return request({
+      url: `/program/projectList/saveFormArchive`,
+      method: 'post',
+      data: inputForm
+    })
+  }
   delete (ids) {
     return request({
       url: '/program/projectList/deleteById',
@@ -79,6 +93,13 @@ export default class ProgramProjectListInfoService {
       data: data
     })
   }
+  updateStatusByArchiveId (data) {
+    return request({
+      url: '/program/projectList/updateStatusByArchiveId',
+      method: 'post',
+      data: data
+    })
+  }
   saveReportNo (id) {
     return request({
       url: '/program/projectList/saveReportNo',

+ 761 - 0
src/views/modules/program/registered/ProjectArchiveForm.vue

@@ -0,0 +1,761 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+  <div>
+    <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="formReadOnly"
+             label-width="170px" @submit.native.prevent>
+      <el-row  :gutter="15">
+        <el-col :span="12">
+          <el-form-item label="项目名称" prop="programProjectListInfo.name"
+          >
+            <el-input size="medium" :disabled="true" v-model="inputForm.programProjectListInfo.name" placeholder="请输入项目名称" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="评估基准日" prop="programProjectListInfo.assessmentDate"
+          >
+            <el-date-picker
+              :disabled="true"
+              v-model="inputForm.programProjectListInfo.assessmentDate"
+              type="date"
+              value-format="yyyy-MM-dd"
+              placeholder="选择评估基准日"
+              style="width:100%"
+              placement="bottom-start"
+              clearable>
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="报告号" prop="reportNo"
+          >
+            <el-input size="medium" :disabled="true" v-model="inputForm.reportNo" placeholder="请输入报告号" clearable></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="项目负责人" prop="programProjectListInfo.projectManager"
+          >
+            <SelectUserTree
+              ref="companyTree"
+              size="medium"
+              :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+              :url="`/sys/user/treeUserDataAllOffice?type=2`"
+              :value="inputForm.programProjectListInfo.projectManager"
+              :disabled="true"
+              :clearable="true"
+              :accordion="true"
+              @getValue="(value) => {inputForm.programProjectListInfo.projectManager=value}"/>
+          </el-form-item>
+        </el-col>
+        <el-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>
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="项目类型" prop="programType"
+                        :rules="[
+                        {required: true, message:'项目类型不能为空', trigger:'blur'}
+                 ]">
+            <el-input v-model="inputForm.programType" maxlength="64" placeholder="请填写项目类型"    clearable ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="评估报告日" prop="evaluationReportDate"
+                        :rules="[
+                        {required: true, message:'评估报告日不能为空', trigger:'blur'}
+                 ]">
+            <el-date-picker
+              style="width:100%;"
+              v-model="inputForm.evaluationReportDate"
+              type="date"
+              placement="bottom-start"
+              value-format="yyyy-MM-dd"
+              placeholder="选择日期"clearable>
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="协议号" prop="protocolNum"
+                        :rules="[
+                        {required: true, message:'协议号不能为空', trigger:'blur'}
+                 ]">
+            <el-input v-model="inputForm.protocolNum" maxlength="64" placeholder="请填写协议号"   clearable  ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="废旧物资评估(万元)" prop="waystEvaluation"
+                        :rules="[
+                        {required: true, message:'废旧物资评估不能为空', trigger:'blur'}
+                 ]">
+            <el-input-number
+              v-model="inputForm.waystEvaluation"
+              controls-position="right"
+              :controls="false"
+              :max="999999999999999"
+              style="width:100%;"
+              :precision="2"
+              placeholder="请填写废旧物资评估"
+              :step="0.01"
+              :min="0"
+              clearable>
+            </el-input-number>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="固定资产评估(万元)" prop="fixedAssetsEvaluation"
+                        :rules="[
+                        {required: true, message:'固定资产评估不能为空', trigger:'blur'}
+                 ]">
+            <el-input-number
+              v-model="inputForm.fixedAssetsEvaluation"
+              controls-position="right"
+              :controls="false"
+              :max="999999999999999"
+              style="width:100%;"
+              :precision="2"
+              placeholder="请填写固定资产评估"
+              :step="0.01"
+              :min="0"
+              clearable>
+            </el-input-number>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="净资产评估" prop="netAssetsEvaluation"
+                        :rules="[
+                        {required: true, message:'净资产评估不能为空', trigger:'blur'}
+                 ]">
+            <el-input v-model="inputForm.netAssetsEvaluation" maxlength="64" placeholder="请填写净资产评估" @keyup.native="inputForm.netAssetsEvaluation = twoDecimalPlaces(inputForm.netAssetsEvaluation)"clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="租金评估(万/年)" prop="rentEvaluation"
+                        :rules="[
+                        {required: true, message:'租金评估不能为空', trigger:'blur'}
+                 ]">
+            <el-input-number
+              v-model="inputForm.rentEvaluation"
+              controls-position="right"
+              :controls="false"
+              :max="999999999999999"
+              style="width:100%;"
+              :precision="2"
+              placeholder="请填写租金评估"
+              :step="0.01"
+              :min="0"
+              clearable>
+            </el-input-number>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="司法鉴定" prop="forensics"
+                        :rules="[
+                        {required: true, message:'司法鉴定不能为空', trigger:'blur'}
+                 ]">
+            <el-input v-model="inputForm.forensics" maxlength="64" placeholder="请填写司法鉴定"    clearable ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="报告收费(元)" prop="reportCharges"
+                        :rules="[
+                        {required: true, message:'报告收费不能为空', trigger:'blur'}
+                 ]">
+            <el-input-number
+              v-model="inputForm.reportCharges"
+              controls-position="right"
+              :controls="false"
+              :max="999999999999999"
+              style="width:100%;"
+              :precision="2"
+              placeholder="请填写报告收费"
+              :step="0.01"
+              :min="0"
+              clearable>
+            </el-input-number>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="当前处理人" prop="currentDisposePerson"
+                        :rules=" [
+                        {required: true, message:'当前处理人不能为空', trigger:'blur'}
+                        ]" >
+            <UserSelect size="medium" :disabled="formReadOnly" :readonly="true" :limit='1' :value="inputForm.currentDisposePerson" @getValue='(value) => {inputForm.currentDisposePerson = value}'></UserSelect>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="是否开票" prop="isInvoice"
+                        :rules="[
+                        {required: true, message:'是否开票不能为空', trigger:'blur'}
+                 ]">
+            <el-radio-group v-model="inputForm.isInvoice">
+              <el-radio v-for="item in $dictUtils.getDictList('yes_no')" :label="item.value" :key="item.id">{{item.label}}</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="开票日期" prop="invoiceDate"
+                        :rules="[
+                 ]">
+            <el-date-picker
+              style="width:100%;"
+              placement="bottom-start"
+              v-model="inputForm.invoiceDate"
+              type="date"
+              value-format="yyyy-MM-dd"
+              placeholder="选择日期时间"clearable>
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="预估/实际收费(万元)" prop="actualCharges"
+                        :rules="[
+                        {required: true, message:'预估/实际收费不能为空', trigger:'blur'}
+                 ]">
+            <el-input-number
+              v-model="inputForm.actualCharges"
+              controls-position="right"
+              :controls="false"
+              :max="999999999999999"
+              style="width:100%;"
+              :precision="2"
+              placeholder="请填写预估/实际收费"
+              :step="0.01"
+              :min="0"
+              clearable>
+            </el-input-number>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="合同是否存档" prop="isContractArchive"
+                        :rules="[
+                        {required: true, message:'合同是否存档不能为空', trigger:'blur'}
+                 ]">
+            <el-radio-group v-model="inputForm.isContractArchive">
+              <el-radio v-for="item in $dictUtils.getDictList('yes_no')" :label="item.value" :key="item.id">{{item.label}}</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="底稿是否完好" prop="isPapersIntact"
+                        :rules="[
+                        {required: true, message:'底稿是否完好不能为空', trigger:'blur'}
+                 ]">
+            <el-radio-group v-model="inputForm.isPapersIntact">
+              <el-radio v-for="item in $dictUtils.getDictList('yes_no')" :label="item.value" :key="item.id">{{item.label}}</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="底稿是否归档" prop="isPapersArchive"
+                        :rules="[
+                        {required: true, message:'底稿是否归档不能为空', trigger:'blur'}
+                 ]">
+            <el-radio-group v-model="inputForm.isPapersArchive">
+              <el-radio v-for="item in $dictUtils.getDictList('yes_no')" :label="item.value" :key="item.id">{{item.label}}</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="报销外勤天数" prop="opsAmount"
+                        :rules="[
+                        {required: true, message:'报销外勤天数不能为空', trigger:'blur'}
+                 ]">
+            <el-input-number
+              v-model="inputForm.opsAmount"
+              controls-position="right"
+              :controls="false"
+              :max="999999"
+              style="width:100%;"
+              :precision="1"
+              placeholder="请填写报销外勤天数"
+              :step="0.1"
+              :min="0"
+              clearable>
+            </el-input-number>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="外勤是否已经报销" prop="isOpsReimbursement"
+                        :rules="[
+                        {required: true, message:'外勤是否已经报销不能为空', trigger:'blur'}
+                 ]">
+            <el-radio-group v-model="inputForm.isOpsReimbursement">
+              <el-radio v-for="item in $dictUtils.getDictList('yes_no')" :label="item.value" :key="item.id">{{item.label}}</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="已报销金额" prop="reimbursementAmount"
+                        :rules="[
+                        {required: true, message:'已报销金额不能为空', trigger:'blur'}
+                 ]">
+            <el-input-number
+              v-model="inputForm.reimbursementAmount"
+              controls-position="right"
+              :controls="false"
+              :max="999999999999999"
+              style="width:100%;"
+              :precision="2"
+              placeholder="请填写已报销金额"
+              :step="0.01"
+              :min="0"
+              clearable>
+            </el-input-number>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="未报销金额" prop="unreimbursedAmount"
+                        :rules="[
+                        {required: true, message:'未报销金额不能为空', trigger:'blur'}
+                 ]">
+            <el-input-number
+              v-model="inputForm.unreimbursedAmount"
+              controls-position="right"
+              :controls="false"
+              :max="999999999999999"
+              style="width:100%;"
+              :precision="2"
+              placeholder="请填写未报销金额"
+              :step="0.01"
+              :min="0"
+              clearable>
+            </el-input-number>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="报销单号" prop="reimbursementNum"
+                        :rules="[
+                 ]">
+            <el-input v-model="inputForm.reimbursementNum" maxlength="64" placeholder="请填写报销单号"   clearable  ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="报销日期" prop="reimbursementDate"
+                        :rules="[
+                 ]">
+            <el-date-picker
+              placement="bottom-start"
+              style="width:100%;"
+              v-model="inputForm.reimbursementDate"
+              type="date"
+              value-format="yyyy-MM-dd"
+              placeholder="选择日期时间"clearable>
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+    </el-form>
+    <!--附件信息 - 评估报告-->
+    <UpLoadComponent ref="uploadComponentReport"></UpLoadComponent>
+    <!--附件信息 - 评估说明-->
+    <UpLoadComponent ref="uploadComponentExplain"></UpLoadComponent>
+    <!--附件信息 - 评估明细表-->
+    <UpLoadComponent ref="uploadComponentDetail"></UpLoadComponent>
+    <!--附件信息 - 评估操作计算底稿-->
+    <UpLoadComponent ref="uploadComponentPapers"></UpLoadComponent>
+    <!--附件信息 - 其他-->
+    <UpLoadComponent ref="uploadComponentOther"></UpLoadComponent>
+  </div>
+</template>
+
+<script>
+  import UpLoadComponent from '@/views/common/UpLoadComponent'
+  import UserSelect from '@/components/userSelect'
+  import SelectUserTree from '@/views/modules/utils/treeUserSelect'
+  import RosterSelectForm from '@/views/common/RosterSelectForm'
+  import ProgramProjectListInfoService from '@/api/program/ProgramProjectListInfoService'
+  import WangEditor from '@/components/editor/WangEditor'
+  export default {
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      formReadOnly: {
+        type: Boolean,
+        default: false
+      }
+    },
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+          id: '',
+          remarks: '',
+          programId: '',
+          year: '',
+          programType: '',
+          evaluationReportDate: '',
+          protocolNum: '',
+          waystEvaluation: '',
+          fixedAssetsEvaluation: '',
+          netAssetsEvaluation: '',
+          rentEvaluation: '',
+          forensics: '',
+          reportCharges: '',
+          currentDisposePerson: '',
+          isInvoice: '',
+          invoiceDate: '',
+          actualCharges: '',
+          isContractArchive: '',
+          isPapersIntact: '',
+          isPapersArchive: '',
+          opsAmount: '',
+          isOpsReimbursement: '',
+          reimbursementAmount: '',
+          unreimbursedAmount: '',
+          reimbursementNum: '',
+          reimbursementDate: '',
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          programProjectListInfo: {},
+          reportFileList: [],
+          explainFileList: [],
+          detailFileList: [],
+          papersFileList: [],
+          otherFileList: []
+        },
+        programId: '',
+        supervisorList: [],
+        keyWatch: ''
+      }
+    },
+    programProjectListInfoService: null,
+    created () {
+      this.programProjectListInfoService = new ProgramProjectListInfoService()
+    },
+    computed: {
+      bus: {
+        get () {
+          this.$refs.uploadComponentReport.setDividerName('评估报告')
+          this.$refs.uploadComponentExplain.setDividerName('评估说明')
+          this.$refs.uploadComponentDetail.setDividerName('评估明细表')
+          this.$refs.uploadComponentPapers.setDividerName('评估操作计算底稿')
+          this.$refs.uploadComponentOther.setDividerName('其他')
+          return this.businessId
+        },
+        set (val) {
+          this.businessId = val
+        }
+      }
+    },
+    watch: {
+      'keyWatch': {
+        handler (newVal) {
+          if (this.bus) {
+            if (this.bus !== 'false') {
+              this.init('', this.bus)
+            }
+          } else {
+            this.$nextTick(() => {
+              this.$refs.inputForm.resetFields()
+            })
+          }
+        }
+      }
+    },
+    components: {
+      UpLoadComponent,
+      RosterSelectForm,
+      UserSelect,
+      WangEditor,
+      SelectUserTree
+    },
+    methods: {
+      getKeyWatch (keyWatch) {
+        this.keyWatch = keyWatch
+      },
+      init (method, id) {
+        this.method = method
+        this.inputForm = {
+          id: '',
+          remarks: '',
+          programId: '',
+          year: '',
+          programType: '',
+          evaluationReportDate: '',
+          protocolNum: '',
+          waystEvaluation: '',
+          fixedAssetsEvaluation: '',
+          netAssetsEvaluation: '',
+          rentEvaluation: '',
+          forensics: '',
+          reportCharges: '',
+          currentDisposePerson: '',
+          isInvoice: '',
+          invoiceDate: '',
+          actualCharges: '',
+          isContractArchive: '',
+          isPapersIntact: '',
+          isPapersArchive: '',
+          opsAmount: '',
+          isOpsReimbursement: '',
+          reimbursementAmount: '',
+          unreimbursedAmount: '',
+          reimbursementNum: '',
+          reimbursementDate: '',
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          programProjectListInfo: {},
+          reportFileList: [],
+          explainFileList: [],
+          detailFileList: [],
+          papersFileList: [],
+          otherFileList: []
+        }
+        this.inputForm.id = id
+        this.visible = true
+        this.loading = false
+        this.$nextTick(() => {
+          this.$refs.inputForm.resetFields()
+          this.loading = true
+          this.programProjectListInfoService.findByIdArchive(this.inputForm.id).then(({data}) => {
+            this.$refs.uploadComponentReport.clearUpload()
+            this.$refs.uploadComponentExplain.clearUpload()
+            this.$refs.uploadComponentDetail.clearUpload()
+            this.$refs.uploadComponentPapers.clearUpload()
+            this.$refs.uploadComponentOther.clearUpload()
+            this.inputForm = this.recover(this.inputForm, data)
+            this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+            if (this.formReadOnly === true) {
+              method = 'view'
+            }
+            if (this.commonJS.isEmpty(this.inputForm.reportFileList)) {
+              this.inputForm.reportFileList = []
+            }
+            if (this.commonJS.isEmpty(this.inputForm.explainFileList)) {
+              this.inputForm.explainFileList = []
+            }
+            if (this.commonJS.isEmpty(this.inputForm.detailFileList)) {
+              this.inputForm.detailFileList = []
+            }
+            if (this.commonJS.isEmpty(this.inputForm.papersFileList)) {
+              this.inputForm.papersFileList = []
+            }
+            if (this.commonJS.isEmpty(this.inputForm.otherFileList)) {
+              this.inputForm.otherFileList = []
+            }
+            this.$refs.uploadComponentReport.newUpload(method, this.inputForm.reportFileList, 'program', null, '评估报告')
+            this.$refs.uploadComponentExplain.newUpload(method, this.inputForm.explainFileList, 'program', null, '评估说明')
+            this.$refs.uploadComponentDetail.newUpload(method, this.inputForm.detailFileList, 'program', null, '评估明细表')
+            this.$refs.uploadComponentPapers.newUpload(method, this.inputForm.papersFileList, 'program', null, '评估操作计算底稿')
+            this.$refs.uploadComponentOther.newUpload(method, this.inputForm.otherFileList, 'program', null, '其他')
+            this.loading = false
+          })
+        })
+      },
+      saveForm (callback) {
+        this.doSubmit('save', callback)
+      },
+      startForm (callback) {
+        this.doSubmit('start', callback)
+      },
+      async agreeForm (callback) {
+        await this.programProjectListInfoService.findByIdArchive(this.inputForm.id).then(({data}) => {
+          if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            this.err = true
+          }
+        })
+        if (this.err === true) {
+          this.err = ''
+          throw new Error()
+        } else {
+          await this.doSubmit('agree', callback)
+        }
+      },
+      // 表单提交
+      async doSubmit (status, callback) {
+        if (await this.$refs.uploadComponentReport.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        }
+        if (await this.$refs.uploadComponentExplain.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        }
+        if (await this.$refs.uploadComponentDetail.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        }
+        if (await this.$refs.uploadComponentPapers.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        }
+        if (await this.$refs.uploadComponentOther.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        }
+        if (status === 'save') {
+          // 暂存
+          this.loading = true
+          this.inputForm.status = '1'
+          this.inputForm.reportFileList = this.$refs.uploadComponentReport.getDataList()
+          this.inputForm.explainFileList = this.$refs.uploadComponentExplain.getDataList()
+          this.inputForm.detailFileList = this.$refs.uploadComponentDetail.getDataList()
+          this.inputForm.papersFileList = this.$refs.uploadComponentPapers.getDataList()
+          this.inputForm.otherFileList = this.$refs.uploadComponentOther.getDataList()
+          this.programProjectListInfoService.saveFormArchive(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.status = '5'
+          this.inputForm.auditDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+        }
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            this.inputForm.reportFileList = this.$refs.uploadComponentReport.getDataList()
+            this.inputForm.explainFileList = this.$refs.uploadComponentExplain.getDataList()
+            this.inputForm.detailFileList = this.$refs.uploadComponentDetail.getDataList()
+            this.inputForm.papersFileList = this.$refs.uploadComponentPapers.getDataList()
+            this.inputForm.otherFileList = this.$refs.uploadComponentOther.getDataList()
+            this.programProjectListInfoService.saveFormArchive(this.inputForm).then(({data}) => {
+              callback(data.businessTable, data.businessId, this.inputForm)
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      },
+      async updateStatusById (type) {
+        if (await this.$refs.uploadComponentReport.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        }
+        if (await this.$refs.uploadComponentExplain.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        }
+        if (await this.$refs.uploadComponentDetail.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        }
+        if (await this.$refs.uploadComponentPapers.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        }
+        if (await this.$refs.uploadComponentOther.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        }
+        await this.programProjectListInfoService.findByIdArchive(this.inputForm.id).then(({data}) => {
+          if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            this.err = true
+          }
+        })
+        if (this.err === true) {
+          this.err = ''
+          throw new Error()
+        } else {
+          // if (type === 'agree') {
+          //   // 同意
+          //   this.inputForm.status = '5'
+          // }
+          if (type === 'reject') {
+            // 驳回
+            this.inputForm.status = '4'
+          }
+          if (type === 'reback') {
+            // 撤回
+            this.inputForm.status = '3'
+          }
+          if (type === 'reback' || type === 'reject') {
+            let param = {status: this.inputForm.status, id: this.inputForm.id}
+            this.programProjectListInfoService.updateStatusByArchiveId(param)
+          }
+        }
+      },
+      close () {
+        this.$refs.uploadComponentReport.clearUpload()
+        this.$refs.uploadComponentExplain.clearUpload()
+        this.$refs.uploadComponentDetail.clearUpload()
+        this.$refs.uploadComponentPapers.clearUpload()
+        this.$refs.uploadComponentOther.clearUpload()
+        this.inputForm = {
+          id: '',
+          remarks: '',
+          programId: '',
+          year: '',
+          programType: '',
+          evaluationReportDate: '',
+          protocolNum: '',
+          waystEvaluation: '',
+          fixedAssetsEvaluation: '',
+          netAssetsEvaluation: '',
+          rentEvaluation: '',
+          forensics: '',
+          reportCharges: '',
+          currentDisposePerson: '',
+          isInvoice: '',
+          invoiceDate: '',
+          actualCharges: '',
+          isContractArchive: '',
+          isPapersIntact: '',
+          isPapersArchive: '',
+          opsAmount: '',
+          isOpsReimbursement: '',
+          reimbursementAmount: '',
+          unreimbursedAmount: '',
+          reimbursementNum: '',
+          reimbursementDate: '',
+          procInsId: '',
+          processDefinitionId: '',
+          status: '',
+          programProjectListInfo: {},
+          reportFileList: [],
+          explainFileList: [],
+          detailFileList: [],
+          papersFileList: [],
+          otherFileList: []
+        }
+        this.$refs.inputForm.resetFields()
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .w-e-text-container {
+    z-index: 1 !important;
+  }
+  /deep/ .wtext {
+    height: 200px
+  }
+  /deep/ .el-input-number .el-input__inner {
+    text-align: left;
+  }
+</style>

+ 96 - 1
src/views/modules/program/registered/ProjectList.vue

@@ -122,6 +122,11 @@
               <el-button  type="text" @click="thirdAuditDetail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.status3, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.status3, '-')}} </el-button>
             </template>
           </vxe-column>
+          <vxe-column min-width="120"align="center" title="项目归档" field="archiveStatus">
+            <template slot-scope="scope">
+              <el-button  type="text" @click="archiveDetail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.archiveStatus, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.archiveStatus, '-')}} </el-button>
+            </template>
+          </vxe-column>
           <vxe-column  min-width="150px"align="center" title="状态" field="status" >
             <template slot-scope="scope">
               <el-button  type="text" @click="registeredDetail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.status, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.status, '-')}} </el-button>
@@ -153,6 +158,9 @@
 
               <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status2 === '5' &&scope.row.status3 === '0'||scope.row.status3 === '1'||scope.row.status3 === '3'||scope.row.status3 === '4'" type="text"  icon="el-icon-circle-check" size="small" @click="thirdAuditPush(scope.row)">三级校审</el-button>
               <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status3 === '2'" type="text"  icon="el-icon-circle-check" size="small" @click="thirdAuditReback(scope.row)">校审撤回</el-button>
+
+              <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status === '5' &&scope.row.archiveStatus === '0'||scope.row.archiveStatus === '1'||scope.row.archiveStatus === '3'||scope.row.archiveStatus === '4'" type="text"  icon="el-icon-circle-check" size="small" @click="archivePush(scope.row)">项目归档</el-button>
+              <el-button v-if="hasPermission('program:registered:edit')&&scope.row.archiveStatus === '2'" type="text"  icon="el-icon-circle-check" size="small" @click="archiveReback(scope.row)">校审撤回</el-button>
             </template>
           </vxe-column>
         </vxe-table>
@@ -215,7 +223,9 @@
         processDefinitionId2: '',
         procDefKey2: '',
         processDefinitionId3: '',
-        procDefKey3: ''
+        procDefKey3: '',
+        processDefinitionIdArchive: '',
+        procDefKeyArchive: ''
       }
     },
     programProjectListInfoService: null,
@@ -304,6 +314,12 @@
             this.procDefKey3 = data.key
           }
         })
+        this.processService.getByName('项目登记归档').then(({data}) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionIdArchive = data.id
+            this.procDefKeyArchive = data.key
+          }
+        })
       },
       // 当前页
       currentChangeHandle ({ currentPage, pageSize }) {
@@ -683,6 +699,85 @@
           }
         })
       },
+      // 发起项目登记归档
+      archivePush (row) {
+        // 读取流程表单
+        let title = `发起流程【项目登记归档】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[项目登记归档]`
+        let status = 'startAndHold'
+        if (row.archiveStatus === '3' || row.archiveStatus === '4') {
+          status = 'startAndClose'
+        }
+        this.taskService.getTaskDef({ procDefId: this.processDefinitionIdArchive,
+          businessId: row.archiveId,
+          businessTable: 'program_archive'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                procDefId: this.processDefinitionIdArchive,
+                procDefKey: this.procDefKeyArchive,
+                title: title,
+                formType: data.data.formType,
+                formUrl: data.data.formUrl,
+                formTitle: processTitle,
+                businessTable: 'program_archive',
+                businessId: row.archiveId,
+                isShow: 'false',
+                status: status,
+                routePath: '/program/registered/ProjectList'
+              }
+            })
+          })
+      },
+      // 查看三级校审审批流程结果
+      archiveDetail (row) {
+        if (row.archiveStatus !== '0' && row.archiveStatus !== '1') {
+          // eslint-disable-next-line eqeqeq
+          this.taskService.getTaskDef({
+            procInsId: row.procInsIdArchive,
+            procDefId: this.processDefinitionIdArchive
+          }).then(({data}) => {
+            this.$router.push({
+              path: '/flowable/task/TaskFormDetail',
+              query: {
+                isShow: 'false',
+                readOnly: true,
+                title: '项目登记归档' + '流程详情',
+                formTitle: '项目登记归档' + '流程详情',
+                businessId: row.archiveId,
+                status: 'reback',
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
+              }
+            })
+          })
+        }
+      },
+      // 撤回三级校审
+      archiveReback (row) {
+        this.$confirm(`确定要撤回该申请吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(async () => {
+          await this.programProjectListInfoService.findByIdArchive(row.archiveId).then(({data}) => {
+            if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.err = true
+            }
+          })
+          if (this.err === true) {
+            this.err = ''
+            this.refreshList()
+          } else {
+            this.processService.revokeProcIns(row.procInsIdArchive).then(({data}) => {
+              let form = {status: '3', id: row.archiveId}
+              this.programProjectListInfoService.updateStatusByArchiveId(form)
+              this.$message.success(data)
+              this.refreshList()
+            })
+          }
+        })
+      },
       is () {
         this.userService.is().then(({data}) => {
           this.isAdmin = data

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

@@ -91,6 +91,23 @@
             <WangEditor :disabled="formReadOnly" ref="contents4Editor" v-model="inputForm.workOpinion"/>
           </el-form-item>
         </el-col>
+          <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+                   label-width="125px" @submit.native.prevent>
+          <el-col :span="24">
+            <el-form-item label="执行人员保留意见" prop="retainOpinion"
+                          :rules="[
+                 ]">
+              <el-input type="textarea" maxlength="500" v-model="inputForm.retainOpinion" placeholder="请填写执行人员保留意见"     ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="审核人员审核未修改意见" prop="changeOpinion"
+                          :rules="[
+                 ]">
+              <el-input type="textarea" maxlength="500" v-model="inputForm.changeOpinion" placeholder="请填写审核人员审核未修改意见"     ></el-input>
+            </el-form-item>
+          </el-col>
+          </el-form>
       </el-row>
 
     </el-form>