【修改】增加直接编辑接口
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
<span class="base_title">审批历史</span>
|
<span class="base_title">审批历史</span>
|
||||||
<process-approval-history :prcNum="prcNum"></process-approval-history>
|
<process-approval-history :prcNum="prcNum"></process-approval-history>
|
||||||
</div>
|
</div>
|
||||||
<div class="process_content">
|
<div class="process_content" v-if="isLevel">
|
||||||
<span class="base_title">指派信息</span>
|
<span class="base_title">指派信息</span>
|
||||||
<el-form ref="assignFormRef" :model="assignForm" label-width="150px"
|
<el-form ref="assignFormRef" :model="assignForm" label-width="150px"
|
||||||
:rules="assignFormRules" class="label-input-form" size="medium">
|
:rules="assignFormRules" class="label-input-form" size="medium">
|
||||||
@@ -78,6 +78,7 @@ export default {
|
|||||||
mixins: [processMixin],
|
mixins: [processMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isLevel: true,
|
||||||
dataId:'',
|
dataId:'',
|
||||||
showTableD: false,
|
showTableD: false,
|
||||||
initShow: false, // 控制审批历史是否显示 只有在不是第一次的时候才是true
|
initShow: false, // 控制审批历史是否显示 只有在不是第一次的时候才是true
|
||||||
@@ -177,6 +178,12 @@ export default {
|
|||||||
this.prcType=5
|
this.prcType=5
|
||||||
// 调用接口
|
// 调用接口
|
||||||
this.ids=this.$route.query.ids
|
this.ids=this.$route.query.ids
|
||||||
|
// 如果该用户的levelId==5 就直接编辑 并且不显示指派信息
|
||||||
|
if(this.$store.getters.userInfo.levelId=='0.5'){
|
||||||
|
this.isLevel=false
|
||||||
|
}else{
|
||||||
|
this.isLevel = true
|
||||||
|
}
|
||||||
this.getReportDetail()
|
this.getReportDetail()
|
||||||
}else{
|
}else{
|
||||||
this.prcType=4
|
this.prcType=4
|
||||||
@@ -313,38 +320,63 @@ export default {
|
|||||||
// 提交
|
// 提交
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
console.log(this.$store.getters.userInfo.usid, " this.$store.getters.userInfo.USID")
|
console.log(this.$store.getters.userInfo.usid, " this.$store.getters.userInfo.USID")
|
||||||
this.$refs.assignFormRef.validate(async v => {
|
if(this.isLevel){
|
||||||
|
this.$refs.assignFormRef.validate(async v => {
|
||||||
|
this.processForm=this.$refs.basMes.form
|
||||||
|
this.processForm.keyContent = JSON.stringify(this.$refs.basMes.tags)
|
||||||
|
this.processForm.prcName=this.processForm.name
|
||||||
|
// this.processForm.labelList= JSON.stringify(this.processForm.labelList)
|
||||||
|
|
||||||
|
let z=this.$refs.basMes.submit()
|
||||||
|
if (v && z) {
|
||||||
|
this.processForm.createUserId=this.userId
|
||||||
|
//如果不是第一次
|
||||||
|
if (this.initShow) {
|
||||||
|
let flag=await this.JuggleSub(this.taskId)
|
||||||
|
if(flag){
|
||||||
|
let dataJson = JSON.stringify(this.processForm)
|
||||||
|
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid})
|
||||||
|
this.completeProcess({
|
||||||
|
dataJson,
|
||||||
|
submitJson,
|
||||||
|
taskId: this.taskId,
|
||||||
|
userId: this.$store.getters.userInfo.usid,
|
||||||
|
prcType: this.prcType,
|
||||||
|
reportId: this.processForm.reportId|| ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.startProcess()
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.$message.warning('请检查表单填写完整')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
this.processForm=this.$refs.basMes.form
|
this.processForm=this.$refs.basMes.form
|
||||||
this.processForm.keyContent = JSON.stringify(this.$refs.basMes.tags)
|
this.processForm.keyContent = JSON.stringify(this.$refs.basMes.tags)
|
||||||
this.processForm.prcName=this.processForm.name
|
this.processForm.prcName=this.processForm.name
|
||||||
// this.processForm.labelList= JSON.stringify(this.processForm.labelList)
|
// this.processForm.labelList= JSON.stringify(this.processForm.labelList)
|
||||||
|
|
||||||
let z=this.$refs.basMes.submit()
|
let z=this.$refs.basMes.submit()
|
||||||
if (v && z) {
|
if(z){
|
||||||
this.processForm.createUserId=this.userId
|
this.processForm=this.$refs.basMes.form
|
||||||
//如果不是第一次
|
this.processForm.id=this.processForm.reportId
|
||||||
if (this.initShow) {
|
this.processForm.keyContent = JSON.stringify(this.$refs.basMes.tags)
|
||||||
let flag=await this.JuggleSub(this.taskId)
|
this.$api.report.reportAdd(this.processForm).then(_ => {
|
||||||
if(flag){
|
this.$message.success('编辑成功');
|
||||||
let dataJson = JSON.stringify(this.processForm)
|
this.$router.push({
|
||||||
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid})
|
path:"/userCenter/processCenter",
|
||||||
this.completeProcess({
|
query:{
|
||||||
dataJson,
|
id:'AEHJB8YNJ3'
|
||||||
submitJson,
|
}
|
||||||
taskId: this.taskId,
|
})
|
||||||
userId: this.$store.getters.userInfo.usid,
|
})
|
||||||
prcType: this.prcType,
|
}else{
|
||||||
reportId: this.processForm.reportId|| ''
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.startProcess()
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
this.$message.warning('请检查表单填写完整')
|
this.$message.warning('请检查表单填写完整')
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
},
|
},
|
||||||
startProcess() {
|
startProcess() {
|
||||||
//把表单都整合到form中
|
//把表单都整合到form中
|
||||||
|
|||||||
Reference in New Issue
Block a user