【修改】
This commit is contained in:
@@ -49,7 +49,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="22">
|
<el-col :span="22">
|
||||||
<el-form-item label="二级审批人:" prop="twoApprove">
|
<el-form-item label="二级审批人:" prop="twoApprove">
|
||||||
<el-input readonly :disabled="formControl" v-model="applicationForm.twoApproveName"
|
<el-input readonly :disabled="formControl " v-model="applicationForm.twoApproveName"
|
||||||
@click.native="handleCheck('spr2')"
|
@click.native="handleCheck('spr2')"
|
||||||
placeholder="请选择二级审批人"></el-input>
|
placeholder="请选择二级审批人"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -100,6 +100,7 @@ export default {
|
|||||||
name: "reportDrawer",
|
name: "reportDrawer",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
conTwo: false,
|
||||||
isShow: false,
|
isShow: false,
|
||||||
visibleOrgTable: false,
|
visibleOrgTable: false,
|
||||||
treeType: '',
|
treeType: '',
|
||||||
@@ -150,7 +151,7 @@ export default {
|
|||||||
handleClose() {
|
handleClose() {
|
||||||
this.isShow = false
|
this.isShow = false
|
||||||
},
|
},
|
||||||
open(form) {
|
async open(form) {
|
||||||
this.isShow = true
|
this.isShow = true
|
||||||
let oldPower = form.power
|
let oldPower = form.power
|
||||||
if (!form.twoApprove) {
|
if (!form.twoApprove) {
|
||||||
@@ -170,8 +171,28 @@ export default {
|
|||||||
}
|
}
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
|
}else if(form.twoApprove){
|
||||||
|
|
||||||
|
let res=await this.getLearder(form.oneApprove)
|
||||||
|
if(res.length>0){
|
||||||
|
form.twoApprove = res[0].usid
|
||||||
|
form.twoApproveName= res[0].usname
|
||||||
|
this.conTwo=true
|
||||||
|
if(form.powerName == ''|| !form.powerName){
|
||||||
|
form.applyReason = ''
|
||||||
|
form.prcType = ''
|
||||||
|
form.powerName=''
|
||||||
|
form.power=''
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
this.conTwo=false
|
||||||
|
form.applyReason = ''
|
||||||
|
form.prcType = ''
|
||||||
|
form.powerName=''
|
||||||
|
form.power=''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
this.applicationForm = JSON.parse(JSON.stringify(form))
|
this.applicationForm = JSON.parse(JSON.stringify(form))
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -190,8 +211,26 @@ export default {
|
|||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 获取领导
|
||||||
|
getLearder(id){
|
||||||
|
console.log("获取领导")
|
||||||
|
return new Promise((resolve,reject)=>{
|
||||||
|
this.$api.reportProcess.getLeader({
|
||||||
|
userId:id
|
||||||
|
}).then(res=>{
|
||||||
|
if(res.data.length>0){
|
||||||
|
resolve(res.data)
|
||||||
|
}else{
|
||||||
|
resolve('')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
handleCheck(name) {
|
handleCheck(name) {
|
||||||
if (this.formControl) {
|
if (this.formControl ) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if(name==='spr2' &&this.conTwo){
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
this.treeType = name
|
this.treeType = name
|
||||||
@@ -204,10 +243,13 @@ export default {
|
|||||||
this.orgTableVal = this.applicationForm.twoApprove ? this.applicationForm.twoApprove : ''
|
this.orgTableVal = this.applicationForm.twoApprove ? this.applicationForm.twoApprove : ''
|
||||||
this.orgTableValName = this.applicationForm.twoApproveName ? this.applicationForm.twoApproveName : ''
|
this.orgTableValName = this.applicationForm.twoApproveName ? this.applicationForm.twoApproveName : ''
|
||||||
}
|
}
|
||||||
|
|
||||||
this.visibleOrgTable = true
|
this.visibleOrgTable = true
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 树点击
|
// 树点击
|
||||||
isTreeOk(checkedList) {
|
async isTreeOk(checkedList) {
|
||||||
// console.log(checkedList)
|
// console.log(checkedList)
|
||||||
const parts = []
|
const parts = []
|
||||||
const partsName = []
|
const partsName = []
|
||||||
@@ -219,10 +261,22 @@ export default {
|
|||||||
if (this.treeType === 'spr1') {
|
if (this.treeType === 'spr1') {
|
||||||
this.applicationForm.oneApprove = parts.toString()
|
this.applicationForm.oneApprove = parts.toString()
|
||||||
this.applicationForm.oneApproveName = partsName.toString()
|
this.applicationForm.oneApproveName = partsName.toString()
|
||||||
|
let res=await this.getLearder(this.applicationForm.oneApprove)
|
||||||
|
if(res.length>0){
|
||||||
|
this.applicationForm.twoApprove = res[0].usid
|
||||||
|
this.applicationForm.twoApproveName= res[0].usname
|
||||||
|
this.conTwo=true
|
||||||
|
}else{
|
||||||
|
this.applicationForm.twoApprove =''
|
||||||
|
this.applicationForm.twoApproveName=''
|
||||||
|
this.conTwo=false
|
||||||
|
}
|
||||||
|
|
||||||
} else if (this.treeType === 'spr2') {
|
} else if (this.treeType === 'spr2') {
|
||||||
this.applicationForm.twoApprove = parts.toString()
|
this.applicationForm.twoApprove = parts.toString()
|
||||||
this.applicationForm.twoApproveName = partsName.toString()
|
this.applicationForm.twoApproveName = partsName.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log(this.assignForm.name1Id, this.assignForm.name2Id)
|
// console.log(this.assignForm.name1Id, this.assignForm.name2Id)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -367,7 +367,8 @@ export default {
|
|||||||
// 判断报告名称是否重复
|
// 判断报告名称是否重复
|
||||||
this.$api.reportProcess.JggleName({
|
this.$api.reportProcess.JggleName({
|
||||||
id:this.processForm.reportId || '',
|
id:this.processForm.reportId || '',
|
||||||
name:this.processForm.name
|
name:this.processForm.name,
|
||||||
|
prcType:this.prcType
|
||||||
}).then(async res=>{
|
}).then(async res=>{
|
||||||
|
|
||||||
this.processForm.createUserId=this.userId
|
this.processForm.createUserId=this.userId
|
||||||
|
|||||||
Reference in New Issue
Block a user