bug
This commit is contained in:
@@ -514,25 +514,38 @@
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
<div>
|
||||
<el-collapse accordion v-model="activeName">
|
||||
<el-collapse-item title="意见填写" name = "1">
|
||||
<div style="margin: 10px 0;">
|
||||
<el-select v-model="approvalOpinion" placeholder="请审批" style="margin-bottom: 20px;">
|
||||
<el-option label="驳回" value="1"></el-option>
|
||||
<el-option label="通过" value="0"></el-option>
|
||||
</el-select>
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
resize="none"
|
||||
placeholder="请输入意见"
|
||||
v-model="commentText">
|
||||
</el-input>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</div>
|
||||
<div>
|
||||
<el-collapse accordion v-model="activeName">
|
||||
<el-collapse-item title="意见填写" name = "1">
|
||||
<div style="margin: 10px 0;">
|
||||
<el-form
|
||||
ref="formTongGuo"
|
||||
:model="formTongGuo"
|
||||
:rules="rules">
|
||||
<el-form-item
|
||||
prop="approvalOpinion"
|
||||
>
|
||||
<el-select @change="getRule" v-model="formTongGuo.approvalOpinion" placeholder="请审批" style="margin-bottom: 20px;">
|
||||
<el-option label="驳回" value="1"></el-option>
|
||||
<el-option label="通过" value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
prop="commentText"
|
||||
>
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
resize="none"
|
||||
placeholder="请输入意见"
|
||||
v-model="formTongGuo.commentText">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content" v-if="active === '2'">
|
||||
<div class="block" style="padding-top: 20px;">
|
||||
@@ -650,7 +663,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<ProcessFooter
|
||||
show-save
|
||||
:show-save="false"
|
||||
show-submit
|
||||
:submitLoading="isSubmit"
|
||||
:saveLoading="saveLoading"
|
||||
@@ -672,6 +685,10 @@
|
||||
name: "bzrkStep2",
|
||||
data () {
|
||||
return {
|
||||
rules: {
|
||||
commentText: [{ required: true, message: '请输入意见', trigger: 'blur' }],
|
||||
approvalOpinion: [{ required: true, message: '请选择审批意见', trigger: 'change' }]
|
||||
},
|
||||
activeName:'1',
|
||||
// 当前流程类型(1待办/2已办)
|
||||
processType: 1,
|
||||
@@ -679,8 +696,10 @@
|
||||
userId:this.$store.getters.userInfo.userId,
|
||||
taskIds: this.$route.query.taskIds,
|
||||
pId: this.$route.query.prcId,
|
||||
formTongGuo: {
|
||||
approvalOpinion: '', // 通过/驳回
|
||||
commentText: '', // 意见
|
||||
},
|
||||
title: '', // 新增编辑抽屉标题
|
||||
ListModel: false, // 新增编辑抽屉开关
|
||||
active: '1', // 默认显示
|
||||
@@ -825,6 +844,11 @@
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getRule(){
|
||||
if (this.formTongGuo.approvalOpinion !== '1') {
|
||||
this.$refs.formTongGuo.clearValidate('commentText')
|
||||
}
|
||||
},
|
||||
popoverHide (checkedIds, checkedData) {
|
||||
if(checkedData) {
|
||||
this.form.standSystem = checkedData.id
|
||||
@@ -927,51 +951,34 @@
|
||||
handleTabs(name) {
|
||||
this.active = name
|
||||
},
|
||||
handleSave() {
|
||||
this.saveLoading = true
|
||||
let _formData = new FormData()
|
||||
// _formData.append('id', this.bpnId)
|
||||
_formData.append('createUser', this.$store.getters.userInfo.userId)
|
||||
_formData.append('createUserName', this.$store.getters.userInfo.uName)
|
||||
_formData.append('prcType', this.$route.query.type)
|
||||
_formData.append('json', JSON.stringify({
|
||||
prcForm: this.prcForm,
|
||||
sarAccessInfoList: this.sarAccessInfoList,
|
||||
sarAccessInfoListADMIN: this.sarAccessInfoListADMIN,
|
||||
bzqdForm: this.bzqdForm,
|
||||
listInfo: this.listInfo,
|
||||
id: this.id
|
||||
}))
|
||||
saveTaskFirst(_formData).then(res => {
|
||||
this.saveLoading = false
|
||||
this.$message.success('保存成功')
|
||||
// this.bpnId = res.result
|
||||
}).catch(e => {
|
||||
this.saveLoading = false
|
||||
})
|
||||
},
|
||||
handleSave() {},
|
||||
handleSubmit() {
|
||||
this.isSubmit = true
|
||||
this.form.commentText = this.commentText
|
||||
this.form.approvalOpinion = this.approvalOpinion
|
||||
const json = JSON.stringify(this.form);
|
||||
this.$http.post('lawss/activiti/completeTask', {
|
||||
taskIds: this.taskIds,
|
||||
userId : this.userId,
|
||||
json: json
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
console.log(res);
|
||||
if (res.success) {
|
||||
if(this.approvalOpinion === '1'){
|
||||
this.$refs['formTongGuo'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.isSubmit = true
|
||||
this.form.commentText = this.formTongGuo.commentText
|
||||
this.form.approvalOpinion = this.formTongGuo.approvalOpinion
|
||||
const json = JSON.stringify(this.form);
|
||||
this.$http.post('lawss/activiti/completeTask', {
|
||||
taskIds: this.taskIds,
|
||||
userId : this.userId,
|
||||
json: json
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
console.log(res);
|
||||
if (res.success) {
|
||||
if(this.formTongGuo.approvalOpinion === '1'){
|
||||
this.$message.warning("驳回成功")
|
||||
this.isSubmit = false
|
||||
}else{
|
||||
// 流程提交之后,应该流转至待办任务页面
|
||||
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
|
||||
}else{
|
||||
this.processCreateStand(json)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}})
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user