浏览代码

代码提交:
1021报告签发

sunruiqi 2 年之前
父节点
当前提交
6e204f1983

+ 32 - 0
src/api/sys/ProofreadIssuedService.js

@@ -0,0 +1,32 @@
+import request from '@/utils/httpRequest'
+
+export default class ProofreadIssuedService {
+  save (param) {
+    return request({
+      url: '/proofread/issued/save',
+      method: 'post',
+      data: param
+    })
+  }
+  findById (id) {
+    return request({
+      url: '/proofread/issued/findById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  findProjectInfoById (id) {
+    return request({
+      url: '/proofread/issued/findProjectInfoById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  updateStatus (param) {
+    return request({
+      url: '/proofread/issued/updateStatusById',
+      method: 'post',
+      data: param
+    })
+  }
+}

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

@@ -132,6 +132,11 @@
               <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>
             </template>
           </vxe-column>
+          <vxe-column  min-width="150px"align="center" title="签发单状态" field="status" >
+            <template slot-scope="scope">
+              <el-button  type="text" @click="issuedDetail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.issuedStatus, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.issuedStatus, '-')}} </el-button>
+            </template>
+          </vxe-column>
           <vxe-column title="操作" min-width="230px" fixed="right" align="center">
             <template  slot-scope="scope">
               <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status === '1'" type="text"  icon="el-icon-delete" size="small" @click="registeredPush(scope.row)">送审</el-button>
@@ -149,6 +154,10 @@
               <el-button v-if="hasPermission('program:registered:proo')" type="text"  icon="el-icon-delete" size="small" @click="proofread(scope.row.id)">校对</el-button>
               <!--评估报告装订后的审核-->
               <el-button v-if="hasPermission('program:registered:browse')" type="text"  icon="el-icon-delete" size="small" @click="browse(scope.row.id)">浏览审核</el-button>
+              <!--报告签发-->
+              <el-button v-if="hasPermission('program:registered:browse') && scope.row.issuedStatus !== '2' && scope.row.issuedStatus !== '5'" type="text"  icon="el-icon-delete" size="small" @click="issued(scope.row)">签发</el-button>
+              <!--报告签发撤回-->
+              <el-button v-if="hasPermission('program:registered:browse') && scope.row.issuedStatus === '2'" type="text"  icon="el-icon-delete" size="small" @click="issuedReback(scope.row)">签发撤回</el-button>
 
               <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status === '5' && commonJS.isNotEmpty(scope.row.reportNo)&&scope.row.status1 === '0'||scope.row.status1 === '1'||scope.row.status1 === '3'||scope.row.status1 === '4'" type="text"  icon="el-icon-circle-check" size="small" @click="firstAuditPush(scope.row)">一级校审</el-button>
               <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status1 === '2' && commonJS.isNotEmpty(scope.row.reportNo)" type="text"  icon="el-icon-circle-check" size="small" @click="firstAuditReback(scope.row)">校审撤回</el-button>
@@ -194,6 +203,7 @@
   import TaskService from '@/api/flowable/TaskService'
   import ProcessService from '@/api/flowable/ProcessService'
   import UserService from '@/api/sys/UserService'
+  import ProofreadIssuedService from '@/api/sys/ProofreadIssuedService'
   export default {
     data () {
       return {
@@ -225,18 +235,22 @@
         processDefinitionId3: '',
         procDefKey3: '',
         processDefinitionIdArchive: '',
-        procDefKeyArchive: ''
+        procDefKeyArchive: '',
+        processDefinitionId4: '',
+        procDefKey4: ''
       }
     },
     programProjectListInfoService: null,
     taskService: null,
     processService: null,
     userService: null,
+    proofreadIssuedService: null,
     created () {
       this.programProjectListInfoService = new ProgramProjectListInfoService()
       this.taskService = new TaskService()
       this.processService = new ProcessService()
       this.userService = new UserService()
+      this.proofreadIssuedService = new ProofreadIssuedService()
     },
     components: {
       ProjectForm,
@@ -320,6 +334,12 @@
             this.procDefKeyArchive = data.key
           }
         })
+        this.processService.getByName('报告签发审批').then(({data}) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionId4 = data.id
+            this.procDefKey4 = data.key
+          }
+        })
       },
       // 当前页
       currentChangeHandle ({ currentPage, pageSize }) {
@@ -817,6 +837,85 @@
       // 浏览审核
       browse (id) {
         this.$refs.proofreadBrowseForm.init(id)
+      },
+      // 签发
+      issued (row) {
+        // 读取流程表单
+        let title = `发起流程【报告签发审批】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[报告签发审批]`
+        let status = 'startAndHold'
+        if (row.issuedStatus === '3' || row.issuedStatus === '4' || row.issuedStatus === '2') {
+          status = 'startAndClose'
+        }
+        this.taskService.getTaskDef({ procDefId: this.processDefinitionId4,
+          businessId: row.id,
+          businessTable: 'proofread_issued'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                procDefId: this.processDefinitionId4,
+                procDefKey: this.procDefKey4,
+                title: title,
+                formType: data.data.formType,
+                formUrl: data.data.formUrl,
+                formTitle: processTitle,
+                businessTable: 'proofread_issued',
+                businessId: row.id,
+                isShow: 'false',
+                status: status,
+                routePath: '/program/registered/ProjectList'
+              }
+            })
+          })
+      },
+      // 签发单详情
+      issuedDetail (row) {
+        if (row.issuedStatus !== '0' && row.issuedStatus !== '1') {
+          // eslint-disable-next-line eqeqeq
+          this.taskService.getTaskDef({
+            procInsId: row.procInsId4,
+            procDefId: this.processDefinitionId4
+          }).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')
+              }
+            })
+          })
+        }
+      },
+      // 签发撤回
+      issuedReback (row) {
+        this.$confirm(`确定要撤回该申请吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(async () => {
+          await this.proofreadIssuedService.findById(row.id).then(({data}) => {
+            if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.err = true
+            }
+          })
+          if (this.err === true) {
+            this.err = ''
+            this.refreshList()
+          } else {
+            this.processService.revokeProcIns(row.procInsId4).then(({data}) => {
+              let form = {status: '3', id: row.id}
+              this.proofreadIssuedService.updateStatus(form)
+              this.$message.success(data)
+              this.refreshList()
+            })
+          }
+        })
       }
     }
   }

+ 452 - 0
src/views/modules/program/registered/ProofreadIssuedForm.vue

@@ -0,0 +1,452 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+  <div>
+    <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="formReadOnly"
+             label-width="125px" @submit.native.prevent>
+      <el-row  :gutter="15">
+        <el-col :span="24">
+          <el-form-item label="项目名称" prop="projectName">
+            <el-input size="medium" :disabled="true" v-model="inputForm.projectName" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="评估基准日" prop="assessmentDate">
+            <el-input size="medium" :disabled="true" v-model="inputForm.assessmentDate" clearable></el-input>
+          </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" clearable></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="项目负责人" prop="projectManager">
+            <SelectUserTree
+              ref="companyTree"
+              size="medium"
+              :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+              :url="`/sys/user/treeUserDataAllOffice?type=2`"
+              :value="inputForm.projectManager"
+              :disabled="true"
+              :clearable="true"
+              :accordion="true"
+              @getValue="(value) => {inputForm.projectManager=value}"/>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="所属部门" prop="department">
+            <el-input size="medium" :disabled="true" v-model="inputForm.department" clearable></el-input>
+          </el-form-item>
+        </el-col>
+
+       </el-row>
+
+      <el-divider>业务类型</el-divider>
+      <el-divider content-position="left">A类</el-divider>
+      <el-row>
+        <vxe-table
+          border
+          show-overflow
+          ref="details"
+          class="vxe-table-element"
+          :data="AList"
+          style="margin-left: 5em"
+          @cell-click=""
+          @edit-closed=""
+          highlight-current-row
+          :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
+        >
+          <vxe-table-column field="name" title="名称" :edit-render="{}">
+          </vxe-table-column>
+        </vxe-table>
+      </el-row>
+
+      <el-divider content-position="left">B类</el-divider>
+      <el-row>
+        <vxe-table
+          border
+          show-overflow
+          ref="details"
+          class="vxe-table-element"
+          :data="BList"
+          style="margin-left: 5em"
+          @cell-click=""
+          @edit-closed=""
+          highlight-current-row
+          :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
+        >
+          <vxe-table-column field="name" title="名称" :edit-render="{}">
+          </vxe-table-column>
+        </vxe-table>
+      </el-row>
+
+      <el-divider content-position="left">C类</el-divider>
+      <el-row>
+        <vxe-table
+          border
+          show-overflow
+          ref="details"
+          class="vxe-table-element"
+          :data="CList"
+          style="margin-left: 5em"
+          @cell-click=""
+          @edit-closed=""
+          highlight-current-row
+          :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
+        >
+          <vxe-table-column field="name" title="名称" :edit-render="{}">
+          </vxe-table-column>
+        </vxe-table>
+      </el-row>
+
+      <el-row :gutter="15">
+
+        <el-col :span="12">
+          <el-form-item label="是否已填写台账" prop="isTxtz" :rules="[{required: true, message:'请选择是否已填写台账', trigger:'blur'}]">
+            <vxe-select v-model="inputForm.isTxtz" transfer>
+              <vxe-option
+                v-for="item in yesOrNo"
+                :key="item.value"
+                :value="item.label"
+                :label="item.label">
+              </vxe-option>
+            </vxe-select>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="报告电子版是否归档" prop="isBgdzdgd" :rules="[{required: true, message:'请选择报告电子版是否归档', trigger:'blur'}]">
+            <vxe-select v-model="inputForm.isBgdzdgd" transfer>
+              <vxe-option
+                v-for="item in yesOrNo"
+                :key="item.value"
+                :value="item.label"
+                :label="item.label">
+              </vxe-option>
+            </vxe-select>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="是否需要备案" prop="isXyba" :rules="[{required: true, message:'请选择是否需要备案', trigger:'blur'}]">
+            <vxe-select v-model="inputForm.isXyba" transfer>
+              <vxe-option
+                v-for="item in yesOrNo"
+                :key="item.value"
+                :value="item.label"
+                :label="item.label">
+              </vxe-option>
+            </vxe-select>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="是否完成备案" prop="isWcba" :rules="[{required: true, message:'请选择是否完成备案', trigger:'blur'}]">
+            <vxe-select v-model="inputForm.isWcba" transfer>
+              <vxe-option
+                v-for="item in yesOrNo"
+                :key="item.value"
+                :value="item.label"
+                :label="item.label">
+              </vxe-option>
+            </vxe-select>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="评估报告(份)" prop="assessmentReport" :rules="[{required: true, message:'请输入评估报告(份)', trigger:'blur'}]">
+            <el-input size="medium" v-model="inputForm.assessmentReport" clearable></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="评估说明(份)" prop="assessmentExplain" :rules="[{required: true, message:'请输入评估说明(份)', trigger:'blur'}]">
+            <el-input size="medium" v-model="inputForm.assessmentExplain" clearable></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="评估明细表(份)" prop="assessmentDetail" :rules="[{required: true, message:'请输入评估明细表(份)', trigger:'blur'}]">
+            <el-input size="medium" v-model="inputForm.assessmentDetail" clearable></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="咨询报告(份)" prop="consultingReport" :rules="[{required: true, message:'请输入咨询报告(份)', trigger:'blur'}]">
+            <el-input size="medium" v-model="inputForm.consultingReport" clearable></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="用印类型" prop="sealType" :rules="[{required: true, message:'请输入用印类型', trigger:'blur'}]">
+            <el-input size="medium" v-model="inputForm.sealType" clearable></el-input>
+          </el-form-item>
+        </el-col>
+
+      </el-row>
+
+    </el-form>
+  </div>
+</template>
+
+<script>
+  import SelectUserTree from '@/views/modules/utils/treeUserSelect'
+  import ProofreadIssuedService from '@/api/sys/ProofreadIssuedService'
+  export default {
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      formReadOnly: {
+        type: Boolean,
+        default: false
+      }
+    },
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+          id: '',
+          projectId: '',
+          projectName: '',
+          assessmentDate: '',
+          reportNo: '',
+          projectManager: '',
+          department: '',
+          isTxtz: '',
+          isBgdzdgd: '',
+          isXyba: '',
+          isWcba: '',
+          assessmentReport: '',
+          assessmentExplain: '',
+          assessmentDetail: '',
+          consultingReport: '',
+          sealType: '',
+          status: '',
+          agreeTime: ''
+        },
+        keyWatch: '',
+        yesOrNo: [
+          {value: 0, label: '否'},
+          {value: 1, label: '是'}
+        ],
+        AList: [
+          {name: '经济行为涉及上市公司及其子公司的资产组合、无形资产、企业价值(包括业务及资产组)评估业务'},
+          {name: '上市公司及其合并报表范围内的下属公司财务报告目的的评估及咨询业务'},
+          {name: '经济行为涉及上市公司及其合并报表范围内的下属公司的除本条第(一)款规定之外的评估业务'},
+          {name: '经济行为涉及非上市证券公司、非上市期货公司、非上市公众公司、拟上市公司及其合并报表范围内的下属公司的评估业务'},
+          {name: '其中:非国有企业改制设立股份公司评估业务'}
+        ],
+        BList: [
+          {name: '除A类业务以外的无形资产评估业务'},
+          {name: '除A类业务以外的资产组合评估业务'},
+          {name: '除A类业务以外的企业价值评估业务'},
+          {name: '除A类业务以外的报务报告目的评估业务'},
+          {name: '除A类业务以外的抵押担保目的评估业务'},
+          {name: '除A类以外的,涉及上市公司、证券公司、期货公司、非上市公众公司、拟上市公司及其下属公司不用于市场交易的复核评估、追溯评估和咨询评估业务'},
+          {name: '除A类以外的涉及国有企业与非国有企业之间的交易行为的评估业务及相关的复核评估、追溯评估和咨询评估业务'},
+          {name: '金融企业(包括银行、保险公司、信托投资公司、基金管理公司、租赁公司等)的评估业务'},
+          {name: '评估经验较少的新领域评估业务'}
+        ],
+        CList: [
+          {name: '除A、B类业务以外的经济行为涉及单项资产的评估业务'},
+          {name: '除A、B类业务以外的不用于市场交易的复核评估、追溯评估和咨询评估业务'}
+        ]
+      }
+    },
+    proofreadIssuedService: null,
+    created () {
+      this.proofreadIssuedService = new ProofreadIssuedService()
+      this.proofreadIssuedService.findProjectInfoById(this.businessId).then(({data}) => {
+        this.inputForm = this.recover(this.inputForm, data)
+        this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+        this.loading = false
+      })
+    },
+    computed: {
+      bus: {
+        get () {
+          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: {
+      SelectUserTree
+    },
+    methods: {
+      getKeyWatch (keyWatch) {
+        this.keyWatch = keyWatch
+      },
+      init (method, id) {
+        this.method = method
+        this.inputForm = {
+          id: '',
+          projectId: '',
+          projectName: '',
+          assessmentDate: '',
+          reportNo: '',
+          projectManager: '',
+          department: '',
+          isTxtz: '',
+          isBgdzdgd: '',
+          isXyba: '',
+          isWcba: '',
+          assessmentReport: '',
+          assessmentExplain: '',
+          assessmentDetail: '',
+          consultingReport: '',
+          sealType: '',
+          status: '',
+          agreeTime: ''
+        }
+        this.inputForm.projectId = id
+        this.visible = true
+        this.loading = false
+        this.$nextTick(() => {
+          this.loading = true
+          this.proofreadIssuedService.findById(this.inputForm.projectId).then(({data}) => {
+            if (!this.commonJS.isEmpty(data.id)) {
+              this.$refs.inputForm.resetFields()
+              this.inputForm = this.recover(this.inputForm, data)
+              this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+              this.loading = false
+            }
+          })
+        })
+      },
+      saveForm (callback) {
+        this.loading = true
+        this.inputForm.status = '1'
+        this.proofreadIssuedService.save(this.inputForm).then(({data}) => {
+          callback(data.businessTable, data.businessId, this.inputForm)
+          this.loading = false
+        }).catch(() => {
+          this.loading = false
+        })
+      },
+      startForm (callback) {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            this.inputForm.status = '2'
+            this.proofreadIssuedService.save(this.inputForm).then(({data}) => {
+              callback(data.businessTable, data.businessId, this.inputForm)
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      },
+      async agreeForm (callback) {
+        await this.proofreadIssuedService.findById(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 {
+          this.$refs['inputForm'].validate((valid) => {
+            if (valid) {
+              this.loading = true
+              this.inputForm.status = '5'
+              this.inputForm.agreeTime = new Date()
+              this.proofreadIssuedService.save(this.inputForm).then(({data}) => {
+                callback(data.businessTable, data.businessId, this.inputForm)
+                this.loading = false
+              }).catch(() => {
+                this.loading = false
+              })
+            }
+          })
+        }
+      },
+      async updateStatusById (type) {
+        await this.proofreadIssuedService.findById(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 === 'reject') {
+            // 驳回
+            this.inputForm.status = '4'
+            this.proofreadIssuedService.updateStatus(this.inputForm)
+          }
+          if (type === 'reback') {
+            // 撤回
+            this.inputForm.status = '3'
+            this.proofreadIssuedService.updateStatus(this.inputForm)
+          }
+        }
+      },
+      close () {
+        this.inputForm = {
+          id: '',
+          projectId: '',
+          projectName: '',
+          assessmentDate: '',
+          reportNo: '',
+          projectManager: '',
+          department: '',
+          isTxtz: '',
+          isBgdzdgd: '',
+          isXyba: '',
+          isWcba: '',
+          assessmentReport: '',
+          assessmentExplain: '',
+          assessmentDetail: '',
+          consultingReport: '',
+          sealType: '',
+          status: '',
+          agreeTime: ''
+        }
+        this.$refs.inputForm.resetFields()
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .w-e-text-container {
+    z-index: 1 !important;
+  }
+  /deep/ .wtext {
+    height: 200px
+  }
+</style>