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