|
|
@ -70,7 +70,7 @@
|
|
|
|
</el-tabs>
|
|
|
|
</el-tabs>
|
|
|
|
<el-dialog :title="eventType === 'audit' ? '审批通过' : '审批拒绝'" :close-on-click-modal="false" :visible.sync="visible"
|
|
|
|
<el-dialog :title="eventType === 'audit' ? '审批通过' : '审批拒绝'" :close-on-click-modal="false" :visible.sync="visible"
|
|
|
|
class="JNPF-dialog JNPF-dialog_center" lock-scroll append-to-body width='600px'>
|
|
|
|
class="JNPF-dialog JNPF-dialog_center" lock-scroll append-to-body width='600px'>
|
|
|
|
<el-form label-width="80px" ref="candidateForm" :model="candidateForm">
|
|
|
|
<el-form label-width="80px" ref="candidateForm" :model="candidateForm" >
|
|
|
|
<template v-if="eventType === 'audit'">
|
|
|
|
<template v-if="eventType === 'audit'">
|
|
|
|
<el-form-item :label="item.nodeName + item.label" :prop="'candidateList.' + i + '.value'"
|
|
|
|
<el-form-item :label="item.nodeName + item.label" :prop="'candidateList.' + i + '.value'"
|
|
|
|
v-for="(item, i) in candidateForm.candidateList" :key="i" :rules="item.rules">
|
|
|
|
v-for="(item, i) in candidateForm.candidateList" :key="i" :rules="item.rules">
|
|
|
@ -81,8 +81,9 @@
|
|
|
|
<el-form-item label="加签人员" v-if="eventType === 'audit' && properties.hasFreeApprover">
|
|
|
|
<el-form-item label="加签人员" v-if="eventType === 'audit' && properties.hasFreeApprover">
|
|
|
|
<user-select v-model="handleId" placeholder="请选择加签人员,不选即该节点审核结束" />
|
|
|
|
<user-select v-model="handleId" placeholder="请选择加签人员,不选即该节点审核结束" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="审批意见">
|
|
|
|
|
|
|
|
<el-input v-model="reason" placeholder="请输入审批意见(选填)" type="textarea" :rows="4" />
|
|
|
|
<el-form-item label="审批意见" :required="true">
|
|
|
|
|
|
|
|
<el-input v-model="reason" placeholder="请输入审批意见(必填)" type="textarea" :rows="4" />
|
|
|
|
<el-tag :key="tag" v-for="tag in dynamicTags" closable :disable-transitions="false" @close="handleClose(tag)"
|
|
|
|
<el-tag :key="tag" v-for="tag in dynamicTags" closable :disable-transitions="false" @close="handleClose(tag)"
|
|
|
|
@click="useTag(tag)">
|
|
|
|
@click="useTag(tag)">
|
|
|
|
{{ tag }}
|
|
|
|
{{ tag }}
|
|
|
@ -92,6 +93,7 @@
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
<el-button v-else class="button-new-tag" size="small" @click="showInput">+ 新增常用语</el-button>
|
|
|
|
<el-button v-else class="button-new-tag" size="small" @click="showInput">+ 新增常用语</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="审批签名" v-if="properties.hasSign">
|
|
|
|
<el-form-item label="审批签名" v-if="properties.hasSign">
|
|
|
|
<div class="sign-main">
|
|
|
|
<div class="sign-main">
|
|
|
|
<div class="sign-head">
|
|
|
|
<div class="sign-head">
|
|
|
@ -164,6 +166,11 @@ export default {
|
|
|
|
components: { recordList, Process, vueEsign, PrintBrowse, Comment, RecordSummary, CandidateForm, CandidateUserSelect },
|
|
|
|
components: { recordList, Process, vueEsign, PrintBrowse, Comment, RecordSummary, CandidateForm, CandidateUserSelect },
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
reasonRules: {
|
|
|
|
|
|
|
|
reason: [
|
|
|
|
|
|
|
|
{ required: true, message: '请选择指派节点', trigger: 'blur'}
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
},
|
|
|
|
userBoxVisible: false,
|
|
|
|
userBoxVisible: false,
|
|
|
|
userBoxTitle: '审批人',
|
|
|
|
userBoxTitle: '审批人',
|
|
|
|
assignVisible: false,
|
|
|
|
assignVisible: false,
|
|
|
@ -644,47 +651,58 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleApproval() {
|
|
|
|
handleApproval() {
|
|
|
|
|
|
|
|
debugger
|
|
|
|
this.$refs['candidateForm'].validate((valid) => {
|
|
|
|
this.$refs['candidateForm'].validate((valid) => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
if (this.properties.hasSign && !this.signImg) {
|
|
|
|
if (this.properties.hasSign && !this.signImg) {
|
|
|
|
this.$message({
|
|
|
|
this.$message({
|
|
|
|
message: '请签名',
|
|
|
|
message: '请签名',
|
|
|
|
type: 'error'
|
|
|
|
type: 'error'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
let query = {
|
|
|
|
|
|
|
|
handleOpinion: this.reason,
|
|
|
|
|
|
|
|
formData: this.formData,
|
|
|
|
|
|
|
|
enCode: this.setting.enCode,
|
|
|
|
|
|
|
|
signImg: this.signImg,
|
|
|
|
|
|
|
|
copyIds: this.copyIds.join(',')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.candidateForm.candidateList.length) {
|
|
|
|
|
|
|
|
let candidateList = {}
|
|
|
|
|
|
|
|
for (let i = 0; i < this.candidateForm.candidateList.length; i++) {
|
|
|
|
|
|
|
|
candidateList[this.candidateForm.candidateList[i].nodeId] = this.candidateForm.candidateList[i].value
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
query.candidateList = candidateList
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.eventType === 'audit' && this.properties.hasFreeApprover) {
|
|
|
|
|
|
|
|
query = { freeApproverUserId: this.handleId, ...query }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const approvalMethod = this.eventType === 'audit' ? Audit : Reject
|
|
|
|
|
|
|
|
this.approvalBtnLoading = true
|
|
|
|
|
|
|
|
approvalMethod(this.setting.taskId, query).then(res => {
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
|
|
message: res.msg,
|
|
|
|
|
|
|
|
duration: 1000,
|
|
|
|
|
|
|
|
onClose: () => {
|
|
|
|
|
|
|
|
this.approvalBtnLoading = false
|
|
|
|
|
|
|
|
this.visible = false
|
|
|
|
|
|
|
|
this.$emit('close', true)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
if (!this.reason) {
|
|
|
|
}).catch(() => { this.approvalBtnLoading = false })
|
|
|
|
this.$message({
|
|
|
|
}
|
|
|
|
message: '请输入审批意见',
|
|
|
|
|
|
|
|
type: 'error',
|
|
|
|
|
|
|
|
duration: 1500
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let query = {
|
|
|
|
|
|
|
|
handleOpinion: this.reason,
|
|
|
|
|
|
|
|
formData: this.formData,
|
|
|
|
|
|
|
|
enCode: this.setting.enCode,
|
|
|
|
|
|
|
|
signImg: this.signImg,
|
|
|
|
|
|
|
|
copyIds: this.copyIds.join(',')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.candidateForm.candidateList.length) {
|
|
|
|
|
|
|
|
let candidateList = {}
|
|
|
|
|
|
|
|
for (let i = 0; i < this.candidateForm.candidateList.length; i++) {
|
|
|
|
|
|
|
|
candidateList[this.candidateForm.candidateList[i].nodeId] = this.candidateForm.candidateList[i].value
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
query.candidateList = candidateList
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.eventType === 'audit' && this.properties.hasFreeApprover) {
|
|
|
|
|
|
|
|
query = { freeApproverUserId: this.handleId, ...query }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const approvalMethod = this.eventType === 'audit' ? Audit : Reject
|
|
|
|
|
|
|
|
this.approvalBtnLoading = true
|
|
|
|
|
|
|
|
approvalMethod(this.setting.taskId, query).then(res => {
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
|
|
message: res.msg,
|
|
|
|
|
|
|
|
duration: 1000,
|
|
|
|
|
|
|
|
onClose: () => {
|
|
|
|
|
|
|
|
this.approvalBtnLoading = false
|
|
|
|
|
|
|
|
this.visible = false
|
|
|
|
|
|
|
|
this.$emit('close', true)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
this.approvalBtnLoading = false
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleReset() {
|
|
|
|
handleReset() {
|
|
|
|