修复行政处罚修复,添加文书生成
This commit is contained in:
parent
2e28333bb6
commit
b87671aa1e
|
|
@ -22,6 +22,17 @@ export function getContentsWithBizseq(data) {
|
|||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取行政处罚文书模板内容
|
||||
*/
|
||||
export function getRemPunishmentContentsWithBizseq(data) {
|
||||
return request({
|
||||
url: '/tswrittemplate/getRemPunishmentContentsWithBizseq',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据工作流id及意见类型获取最新意见
|
||||
* @param {string} workflowId 工作流id
|
||||
|
|
|
|||
|
|
@ -72,41 +72,41 @@
|
|||
<el-date-picker
|
||||
v-model="punishInfo.applyDate"
|
||||
type="date"
|
||||
:disabled="onlyShow || punishInfo.linkType !== '1'"
|
||||
:disabled="onlyShow"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="准予修复决定书文号" prop="repairNo">
|
||||
<el-input :readonly="onlyShow || punishInfo.linkType !== '1'" v-model="punishInfo.repairNo"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="bt0 flex-row">
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="准予修复决定书文号" prop="repairNo">-->
|
||||
<!-- <el-input :readonly="true" v-model="punishInfo.repairNo"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="信用修复决定时间" prop="repairDate">
|
||||
<el-date-picker
|
||||
v-model="punishInfo.repairDate"
|
||||
type="date"
|
||||
:disabled="onlyShow || punishInfo.linkType !== '1'"
|
||||
:disabled="onlyShow"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
</el-row>
|
||||
<el-row class="bt0 flex-row">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="作出信用修复决定机关" prop="repairOrgCn">
|
||||
<el-input :readonly="onlyShow || punishInfo.linkType !== '1'" v-model="punishInfo.repairOrgCn"></el-input>
|
||||
<el-input :readonly="true" v-model="punishInfo.repairOrgCn"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="bt0">
|
||||
<el-form-item label="信用修复决定审批表" class="upload" prop="files_1">
|
||||
<el-form-item label="信用修复申请书" class="upload" prop="files_application">
|
||||
<el-upload
|
||||
:action="uploadPath"
|
||||
:data="uploadBodyData('1')"
|
||||
:data="uploadBodyData('8')"
|
||||
:on-remove="removeFile"
|
||||
:on-success="uploadCallback"
|
||||
:on-preview="previewFile"
|
||||
|
|
@ -116,8 +116,8 @@
|
|||
multiple
|
||||
:disabled="onlyShow"
|
||||
name="files"
|
||||
ref="files_1"
|
||||
:file-list="fileListDyn('1')"
|
||||
ref="files_application"
|
||||
:file-list="fileListDyn('8')"
|
||||
style="max-width:800px;display: inline-block"
|
||||
class="uploadFileList"
|
||||
:class="{disabled: onlyShow}"
|
||||
|
|
@ -130,7 +130,7 @@
|
|||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row class="bt0">
|
||||
<el-form-item label="准予信用修复决定文书" class="upload" prop="files_2">
|
||||
<el-form-item label="守信承诺书" class="upload" prop="files_commitment">
|
||||
<el-upload
|
||||
:action="uploadPath"
|
||||
:data="uploadBodyData('2')"
|
||||
|
|
@ -143,8 +143,8 @@
|
|||
multiple
|
||||
:disabled="onlyShow"
|
||||
name="files"
|
||||
ref="files_commitment"
|
||||
:file-list="fileListDyn('2')"
|
||||
ref="files_2"
|
||||
style="max-width:800px;display: inline-block"
|
||||
class="uploadFileList"
|
||||
:class="{disabled: onlyShow}"
|
||||
|
|
@ -157,7 +157,7 @@
|
|||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row class="bt0">
|
||||
<el-form-item label="补充材料" class="upload" prop="files_3">
|
||||
<el-form-item label="履行法定义务的相关材料" class="upload" prop="files_compliance">
|
||||
<el-upload
|
||||
:action="uploadPath"
|
||||
:data="uploadBodyData('3')"
|
||||
|
|
@ -170,7 +170,7 @@
|
|||
multiple
|
||||
:disabled="onlyShow"
|
||||
name="files"
|
||||
ref="files_3"
|
||||
ref="files_compliance"
|
||||
:file-list="fileListDyn('3')"
|
||||
style="max-width:800px;display: inline-block"
|
||||
class="uploadFileList"
|
||||
|
|
@ -183,6 +183,33 @@
|
|||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row class="bt0">
|
||||
<el-form-item label="补充材料" class="upload" prop="files_supplementary">
|
||||
<el-upload
|
||||
:action="uploadPath"
|
||||
:data="uploadBodyData('1')"
|
||||
:on-remove="removeFile"
|
||||
:on-success="uploadCallback"
|
||||
:on-preview="previewFile"
|
||||
:before-upload="beforeFileUpload"
|
||||
:before-remove="beforeRemove"
|
||||
accept=".doc,.docx,.xlsx,.xls,.pdf,.jpg,.zip,.rar,.7z,.png"
|
||||
multiple
|
||||
:disabled="onlyShow"
|
||||
name="files"
|
||||
ref="files_supplementary"
|
||||
:file-list="fileListDyn('1')"
|
||||
style="max-width:800px;display: inline-block"
|
||||
class="uploadFileList"
|
||||
:class="{disabled: onlyShow}"
|
||||
>
|
||||
<div v-if="!onlyShow" style="display: inline-block;">
|
||||
<el-button style="display: inline-block;" size="mini" type="primary">点击上传</el-button>
|
||||
<div slot="tip" style="display: inline-block;" class="el-upload__tip">只能上传jpg/png/pdf/doc/docx/xls/xlsx/rar/zip/7z文件,且单个文件不能超过20M</div>
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
|
|
@ -201,21 +228,37 @@
|
|||
<el-row class="flex-row">
|
||||
<el-col :span="24">
|
||||
<template v-if="taskInfo && taskInfo.origin === '1'">
|
||||
<el-form-item label="是否受理:" prop="status">
|
||||
<!-- origin为1时,代表外网申请的 -->
|
||||
<el-radio v-model="punishInfo.status" label="2" style="font-size: unset">受理并予以修复</el-radio>
|
||||
<el-radio v-model="punishInfo.status" label="3" style="font-size: unset">不予受理(回退至申请人)</el-radio>
|
||||
<el-form-item label="是否受理:" prop="isAccept">
|
||||
<el-radio v-model="punishInfo.isAccept" label="1" style="font-size: unset" @change="handleAcceptChange">受理</el-radio>
|
||||
<el-radio v-model="punishInfo.isAccept" label="0" style="font-size: unset" @change="handleAcceptChange">不予受理(回退至申请人)</el-radio>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-form-item label="是否准予修复:" prop="status">
|
||||
<!-- origin不为1时,代表内网发起的 -->
|
||||
<el-radio v-model="punishInfo.status" label="2" style="font-size: unset">准予修复</el-radio>
|
||||
<el-radio v-model="punishInfo.status" label="3" style="font-size: unset">不予修复(结束流程)</el-radio>
|
||||
<el-form-item label="是否受理:" prop="isAccept">
|
||||
<el-radio v-model="punishInfo.isAccept" label="1" style="font-size: unset" @change="handleAcceptChange">受理</el-radio>
|
||||
<el-radio v-model="punishInfo.isAccept" label="0" style="font-size: unset" @change="handleAcceptChange">不予受理</el-radio>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="flex-row" v-if="punishInfo.isAccept === '1'">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="是否准予修复:" prop="isAgreeRepair">
|
||||
<el-radio v-model="punishInfo.isAgreeRepair" label="1" style="font-size: unset">准予修复</el-radio>
|
||||
<el-radio v-model="punishInfo.isAgreeRepair" label="0" style="font-size: unset">不予修复</el-radio>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="bt0 flex-row" v-if="punishInfo.isAccept === '1'">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="文书">
|
||||
<el-link v-if="punishInfo.isAgreeRepair === '0'" type="primary" :underline="false" style="font-size: unset;border-bottom:1px solid #409EFF" @click="openDialog('noCreidtRepair')">不予信用修复决定书</el-link>
|
||||
<el-link v-else-if="punishInfo.isAgreeRepair === '1'" type="primary" :underline="false" style="font-size: unset;border-bottom:1px solid #409EFF" @click="openDialog('creidtRepair')">准予信用修复决定书</el-link>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="bt0 flex-row">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="意见" prop="opinion">
|
||||
|
|
@ -223,7 +266,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="bt0 flex-row" v-if="punishInfo.linkType === '1'&& punishInfo.status === '2'">
|
||||
<el-row class="bt0 flex-row" v-if="punishInfo.linkType === '1' && punishInfo.isAccept === '1'">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="下一步操作人" prop="nextPerformerids">
|
||||
<el-select v-model="punishInfo.nextPerformerids" placeholder="请选择下一步操作人" filterable class="custom" style="width:40%">
|
||||
|
|
@ -243,11 +286,43 @@
|
|||
|
||||
<div class="submit-box">
|
||||
<template v-if="!onlyShow">
|
||||
<el-button type="primary" @click="submit">提交</el-button>
|
||||
<el-button type="primary" @click="submit" :loading="submitLoading">提交</el-button>
|
||||
</template>
|
||||
<el-button @click="$router.back()">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 文书对话框 -->
|
||||
<el-dialog
|
||||
:title="dialogTitle"
|
||||
:visible.sync="eidtDialog"
|
||||
:close-on-click-modal="false"
|
||||
width="60%"
|
||||
center
|
||||
>
|
||||
<div class="firstEnt">
|
||||
<el-form label-position="left" label-width="200px" :model="firstEnt" class="decForm">
|
||||
<el-row>
|
||||
<el-form-item label="主标题">
|
||||
<span>{{ user.orgName }}</span>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="副标题">
|
||||
<span>{{ dialogTitle }}</span>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="当事人">
|
||||
<span>{{ IlcPunInfo.dsrmc }}</span>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<Editor ref="editorDialog" v-model="eidtContent" :is-clear="isClear" :is-disable="editorDisable" @getTextVal="getTextVal" @change="changeEditor" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button v-if="!editorDisable" type="primary" :loading="submitLoading" @click="saveTempalte(true)">保存</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -257,9 +332,12 @@ import { validBeforeUpload } from '@/api/fileUpload'
|
|||
import { removeAttachementById } from '@/api/attachment'
|
||||
import { getInfo, listFile, submitTask } from '@/api/remPunish'
|
||||
import {getUsersWithPermission} from "@/api/user";
|
||||
import Editor from '@/components/editor.vue'
|
||||
import {getRemPunishmentContentsWithBizseq, saveOrUpdateContent} from "@/api/credit";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
submitLoading: false,
|
||||
fullscreenLoading: false,
|
||||
user: JSON.parse(sessionStorage.getItem('user')),
|
||||
bizSeq: this.$route.query.bizSeq,
|
||||
|
|
@ -270,27 +348,28 @@ export default {
|
|||
uploadPath: `${process.env.VUE_APP_BASE_API}/punishment/tBizRemPunishment/upload`,
|
||||
onlyShow: this.$route.query.onlyShow === '1',
|
||||
fileList: [],
|
||||
dialogTitle: '',
|
||||
eidtDialog: false,
|
||||
firstEnt: {},
|
||||
isClear: false,
|
||||
editorDisable: false,
|
||||
eidtContent: '',
|
||||
contentText: '',
|
||||
tswrittemplate: {
|
||||
bizseq: '',
|
||||
writsType: '',
|
||||
isTemplate: '',
|
||||
type: 'punishment' // 设置为行政处罚类型
|
||||
},
|
||||
formRules: {
|
||||
applyDate: [
|
||||
{ required: true, message: '请选择主体申请修复日期', trigger: 'blur' }
|
||||
],
|
||||
repairNo: [
|
||||
{ required: true, message: '请录入准予修复决定书文号', trigger: 'blur' }
|
||||
],
|
||||
repairDate: [
|
||||
{ required: true, message: '请选择信用修复决定时间', trigger: 'blur' }
|
||||
],
|
||||
repairOrgCn: [
|
||||
{ required: true, message: '请录入作出信用修复决定机关', trigger: 'blur' }
|
||||
],
|
||||
files_1: [
|
||||
{ required: true, message: '请上传信用修复决定审批表', validator: this.validateFile }
|
||||
],
|
||||
files_2: [
|
||||
{ required: true, message: '请上传准予信用修复决定文书', validator: this.validateFile }
|
||||
],
|
||||
files_3: [
|
||||
{ required: true, message: '请上传补充材料', validator: this.validateFile }
|
||||
]
|
||||
},
|
||||
processRules: {
|
||||
|
|
@ -335,6 +414,15 @@ export default {
|
|||
this.punishInfo.repairOrgCn = this.user.orgName
|
||||
|
||||
this.initFileList()
|
||||
|
||||
// 初始化文书内容
|
||||
this.$nextTick(() => {
|
||||
if (this.punishInfo.isAgreeRepair === '0') {
|
||||
this.getNoRepairDecContent()
|
||||
} else if (this.punishInfo.isAgreeRepair === '1') {
|
||||
this.getRepairDecContent()
|
||||
}
|
||||
})
|
||||
}).finally(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
|
|
@ -359,8 +447,8 @@ export default {
|
|||
},
|
||||
submit() {
|
||||
this.submitLoading = true
|
||||
// 判断是否为"不予受理"或"不予修复"状态
|
||||
const isNotAgree = this.punishInfo.status === '3'
|
||||
// 判断是否为"不予受理"状态
|
||||
const isNotAgree = this.punishInfo.isAccept === '0'
|
||||
|
||||
if (isNotAgree) {
|
||||
// 不需要验证,直接提交
|
||||
|
|
@ -373,7 +461,7 @@ export default {
|
|||
// 需要验证表单
|
||||
this.validateBusinessForm()
|
||||
.then(() => {
|
||||
return this.$confirm('确定提交后,上述行政处罚信息将从国家企业信用信息公示系统撤下,不再对外公示。');
|
||||
return this.$confirm('确定提交?');
|
||||
})
|
||||
.then(() => {
|
||||
this.performSubmit();
|
||||
|
|
@ -387,10 +475,20 @@ export default {
|
|||
},
|
||||
// 提取公共提交逻辑
|
||||
performSubmit() {
|
||||
// 只在 linkType 不为 '1' 时显示提交提示
|
||||
if (this.punishInfo.linkType !== '1') {
|
||||
this.$message({
|
||||
message: '提醒!后台正在生成文书,过程需要耐心等待,切勿重复点击提交,待生成完毕页面会自动返回待办。',
|
||||
type: 'warning',
|
||||
duration: 5000 // 5秒后自动消失
|
||||
});
|
||||
}
|
||||
submitTask(this.punishInfo).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success('提交成功')
|
||||
this.$router.back()
|
||||
} else if (res.code === 5002) {
|
||||
this.$message.error('须保存文书内容')
|
||||
} else {
|
||||
this.$message.error('提交失败,' + res.msg)
|
||||
}
|
||||
|
|
@ -427,8 +525,12 @@ export default {
|
|||
window.open(`${process.env.VUE_APP_BASE_API}/attachment/download?id=${file.id}`, '_blank')
|
||||
},
|
||||
uploadCallback(res, file) {
|
||||
if (res.code === 0) {
|
||||
this.$message.success('上传成功')
|
||||
this.initFileList()
|
||||
} else {
|
||||
this.$message.error('上传失败')
|
||||
}
|
||||
},
|
||||
// 移除文件回调
|
||||
removeFile(file) {
|
||||
|
|
@ -456,7 +558,6 @@ export default {
|
|||
// 验证必填字段
|
||||
const validations = [
|
||||
{ field: 'applyDate', name: '主体申请修复日期', value: this.punishInfo.applyDate },
|
||||
{ field: 'repairNo', name: '准予修复决定书文号', value: this.punishInfo.repairNo },
|
||||
{ field: 'repairDate', name: '信用修复决定时间', value: this.punishInfo.repairDate },
|
||||
{ field: 'repairOrgCn', name: '作出信用修复决定机关', value: this.punishInfo.repairOrgCn }
|
||||
];
|
||||
|
|
@ -469,28 +570,114 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
// 验证文件上传
|
||||
const fileTypes = ['1', '2', '3'];
|
||||
const fileLabels = ['信用修复决定审批表', '准予信用修复决定文书', '补充材料'];
|
||||
|
||||
for (let i = 0; i < fileTypes.length; i++) {
|
||||
const fileType = fileTypes[i];
|
||||
const fileLabel = fileLabels[i];
|
||||
const files = this.fileList.filter(item => item.attachtype === fileType);
|
||||
|
||||
if (files.length === 0) {
|
||||
this.$message.warning(`请上传${fileLabel}`);
|
||||
reject(new Error(`请上传${fileLabel}`));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
resolve(true);
|
||||
});
|
||||
},
|
||||
handleAcceptChange(value) {
|
||||
// 当选择受理时,清空之前的是否准予修复选择
|
||||
if (value === '1') {
|
||||
this.punishInfo.isAgreeRepair = '';
|
||||
}
|
||||
},
|
||||
openDialog(type) {
|
||||
// 验证日期字段是否为空
|
||||
if (!this.punishInfo.applyDate) {
|
||||
this.$message.warning('请先填写主体申请修复日期');
|
||||
return;
|
||||
}
|
||||
if (!this.punishInfo.repairDate) {
|
||||
this.$message.warning('请先填写信用修复决定时间');
|
||||
return;
|
||||
}
|
||||
var title = ''
|
||||
if (type === 'creidtRepair') {
|
||||
// 点击准予信用修复决定书时,获取最新内容
|
||||
this.getRepairDecContent()
|
||||
title = '准予信用修复决定书'
|
||||
} else if (type === 'noCreidtRepair') {
|
||||
this.getNoRepairDecContent()
|
||||
title = '不予信用修复决定书'
|
||||
}
|
||||
this.eidtDialog = true
|
||||
this.dialogLoading = true
|
||||
this.dialogTitle = title
|
||||
},
|
||||
changeEditor(val) {
|
||||
// 处理编辑器变化
|
||||
},
|
||||
getTextVal(res) {
|
||||
this.contentText = res
|
||||
},
|
||||
async saveTempalte(alertMsg) {
|
||||
this.submitLoading = true
|
||||
this.tswrittemplate.content = this.eidtContent
|
||||
var resData = false
|
||||
|
||||
// 这里需要根据实际的API接口调整
|
||||
try {
|
||||
const response = await saveOrUpdateContent(this.tswrittemplate)
|
||||
resData = response.data
|
||||
} catch (error) {
|
||||
console.error('保存决定书失败:', error)
|
||||
}
|
||||
|
||||
if (resData === true) {
|
||||
this.submitLoading = false
|
||||
this.eidtDialog = false
|
||||
if (alertMsg) {
|
||||
return this.$message.success('保存成功')
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
if (alertMsg) {
|
||||
return this.$message.error('保存决定书失败')
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
// 获取准予信用修复决定书内容
|
||||
async getRepairDecContent() {
|
||||
this.tswrittemplate.bizseq = this.bizSeq
|
||||
this.tswrittemplate.writsType = '65' // 准予信用修复决定书类型码
|
||||
this.tswrittemplate.type = 'punishment'
|
||||
// 添加日期参数
|
||||
this.tswrittemplate.applyDate = this.punishInfo.applyDate
|
||||
this.tswrittemplate.repairDate = this.punishInfo.repairDate
|
||||
|
||||
getRemPunishmentContentsWithBizseq(this.tswrittemplate).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$nextTick(() => {
|
||||
this.$set(this.tswrittemplate, 'content', res.data.content)
|
||||
this.$set(this, 'eidtContent', res.data.content)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取不予信用修复决定书内容
|
||||
async getNoRepairDecContent() {
|
||||
this.tswrittemplate.bizseq = this.bizSeq
|
||||
this.tswrittemplate.writsType = '66' // 不予信用修复决定书类型码
|
||||
this.tswrittemplate.type = 'punishment'
|
||||
// 添加日期参数
|
||||
this.tswrittemplate.applyDate = this.punishInfo.applyDate
|
||||
this.tswrittemplate.repairDate = this.punishInfo.repairDate
|
||||
|
||||
getRemPunishmentContentsWithBizseq(this.tswrittemplate).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$nextTick(() => {
|
||||
this.$set(this.tswrittemplate, 'content', res.data.content)
|
||||
this.$set(this.tswrittemplate, 'writsType', res.data.writsType)
|
||||
this.$set(this, 'eidtContent', res.data.content)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
components: {
|
||||
DetailHead
|
||||
DetailHead,
|
||||
Editor
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue