|
@@ -4,16 +4,16 @@
|
|
|
<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>
|
|
|
+ label-width="110px" @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="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="[
|
|
@@ -24,11 +24,9 @@
|
|
|
<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 :disabled="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>
|
|
@@ -127,7 +125,7 @@
|
|
|
</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>
|
|
|
+ label-width="110px" @submit.native.prevent>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="案卷号" prop="number"
|
|
|
:rules="[
|
|
@@ -180,11 +178,9 @@
|
|
|
<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 :disabled="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>
|
|
@@ -217,7 +213,7 @@
|
|
|
</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>
|
|
|
+ label-width="110px" @submit.native.prevent>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="审计意见" prop="reportRemarks"
|
|
|
:rules="[
|
|
@@ -476,6 +472,16 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ reapplyForm (callback) {
|
|
|
+ this.projectReportArchiveService.queryById(this.inputForm.id).then(({data}) => {
|
|
|
+ if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
|
|
|
+ this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
+ throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
+ } else {
|
|
|
+ this.doSubmit('reapply', callback)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 表单提交
|
|
|
doSubmit (status, callback) {
|
|
|
if (status === 'save') {
|
|
@@ -501,6 +507,8 @@
|
|
|
} else if (status === 'start') {
|
|
|
// 送审 待审核
|
|
|
this.inputForm.status = '2'
|
|
|
+ } else if (status === 'reapply') {
|
|
|
+ this.inputForm.status = '2'
|
|
|
}
|
|
|
this.$refs['inputForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
@@ -553,58 +561,75 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- async updateStatusById (type) {
|
|
|
- if (type === 'reject' || type === 'reback') {
|
|
|
- if (await this.$refs.uploadComponent.checkProgress()) {
|
|
|
- this.loading = false
|
|
|
- throw new Error()
|
|
|
- }
|
|
|
- await this.projectReportArchiveService.queryById(this.inputForm.id).then(({data}) => {
|
|
|
- if (data.status !== '2') { // status的值不等于“审核中”就弹出提示
|
|
|
- this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
- throw new Error()
|
|
|
- } else {
|
|
|
- if (type === 'reject') {
|
|
|
- if (this.inputForm.isNumber !== this.inputForm.number) {
|
|
|
- this.$message.error('“案卷号”与“确认案卷号”不一致,请重新填写')
|
|
|
- this.loading = false
|
|
|
- throw new Error('“案卷号”与“确认案卷号”不一致,请重新填写')
|
|
|
- } else {
|
|
|
- // 驳回
|
|
|
- let _this = this
|
|
|
- const wait = function () {
|
|
|
- return new Promise(function (resolve, reject) {
|
|
|
- _this.inputForm.status = '4'
|
|
|
- _this.loading = true
|
|
|
- if (_this.$refs.uploadComponent.checkProgress()) {
|
|
|
- _this.loading = false
|
|
|
- reject(new Error())
|
|
|
- }
|
|
|
- _this.$refs.uploadComponent.getDataList().then((list) => {
|
|
|
- // list为返回数据
|
|
|
- _this.inputForm.workAttachmentDtoList = list
|
|
|
+ async updateStatusById (type, callback) {
|
|
|
+ if (this.$refs.uploadComponent.checkProgress()) {
|
|
|
+ this.loading = false
|
|
|
+ throw new Error()
|
|
|
+ } else {
|
|
|
+ if (type === 'reject' || type === 'reback') {
|
|
|
+ await this.projectReportArchiveService.queryById(this.inputForm.id).then(({data}) => {
|
|
|
+ if (data.status !== '2') { // status的值不等于“审核中”就弹出提示
|
|
|
+ this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
+ throw new Error()
|
|
|
+ } else {
|
|
|
+ if (type === 'reject') {
|
|
|
+ if (this.inputForm.isNumber !== this.inputForm.number) {
|
|
|
+ this.$message.error('“案卷号”与“确认案卷号”不一致,请重新填写')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('“案卷号”与“确认案卷号”不一致,请重新填写')
|
|
|
+ } else {
|
|
|
+ // 驳回
|
|
|
+ let _this = this
|
|
|
+ const wait = function () {
|
|
|
+ return new Promise(function (resolve, reject) {
|
|
|
+ _this.inputForm.status = '4'
|
|
|
+ _this.loading = true
|
|
|
+ if (_this.$refs.uploadComponent.checkProgress()) {
|
|
|
+ _this.loading = false
|
|
|
+ reject(new Error())
|
|
|
+ }
|
|
|
+ _this.$refs.uploadComponent.getDataList().then((list) => {
|
|
|
+ // list为返回数据
|
|
|
+ _this.inputForm.workAttachmentDtoList = list
|
|
|
+ })
|
|
|
+ resolve()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ wait().then(() => {
|
|
|
+ this.projectReportArchiveService.saveForm(this.inputForm).then(({data}) => {
|
|
|
+ callback()
|
|
|
+ this.loading = false
|
|
|
+ }).catch(() => {
|
|
|
+ this.loading = false
|
|
|
})
|
|
|
- resolve()
|
|
|
- })
|
|
|
- }
|
|
|
- wait().then(() => {
|
|
|
- this.projectReportArchiveService.saveForm(this.inputForm).then(({data}) => {
|
|
|
- this.loading = false
|
|
|
}).catch(() => {
|
|
|
this.loading = false
|
|
|
})
|
|
|
- }).catch(() => {
|
|
|
- this.loading = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (type === 'reback') {
|
|
|
+ // 撤回
|
|
|
+ let param = {status: '3', id: this.inputForm.id}
|
|
|
+ this.projectReportArchiveService.updateStatusById(param).then(() => {
|
|
|
+ callback()
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
- if (type === 'reback') {
|
|
|
- // 撤回
|
|
|
- let param = {status: '3', id: this.inputForm.id}
|
|
|
- this.projectReportArchiveService.updateStatusById(param)
|
|
|
+ })
|
|
|
+ } else if (type === 'hold') {
|
|
|
+ this.projectReportArchiveService.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.projectReportArchiveService.updateStatusById(param).then(() => {
|
|
|
+ callback()
|
|
|
+ })
|
|
|
}
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
close () {
|