|
|
@ -106,14 +106,37 @@ export default {
|
|
|
|
hanleCancel() {
|
|
|
|
hanleCancel() {
|
|
|
|
this.isShow = false
|
|
|
|
this.isShow = false
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleConfirm(key) {
|
|
|
|
handleConfirm() {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
if (key == 2) {
|
|
|
|
this.$refs.form.validate().then(() => {
|
|
|
|
let obj = {
|
|
|
|
let obj = {
|
|
|
|
id: this.accessId,
|
|
|
|
id: this.accessId,
|
|
|
|
reason: ''
|
|
|
|
reason: this.form.reason
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.$loading(true, 'loadingSb')
|
|
|
|
this.$loading(true, 'loadingSb')
|
|
|
|
|
|
|
|
if (this.key == 2) {
|
|
|
|
|
|
|
|
/* approveTask(obj)
|
|
|
|
|
|
|
|
.then(() => {
|
|
|
|
|
|
|
|
this.$EventBus.$emit('handleResetLive', 'company-myTrips')
|
|
|
|
|
|
|
|
this.$EventBus.$emit('handleResetLive', 'company-myClaim')
|
|
|
|
|
|
|
|
history.back()
|
|
|
|
|
|
|
|
this.$loading(false, 'loadingSb')
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(() => {
|
|
|
|
|
|
|
|
this.$loading(false, 'loadingSb')
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
rejectTask(obj)
|
|
|
|
|
|
|
|
.then(() => {
|
|
|
|
|
|
|
|
this.$EventBus.$emit('handleResetLive', 'company-myTrips')
|
|
|
|
|
|
|
|
this.$EventBus.$emit('handleResetLive', 'company-myClaim')
|
|
|
|
|
|
|
|
history.back()
|
|
|
|
|
|
|
|
this.$loading(false, 'loadingSb')
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(() => {
|
|
|
|
|
|
|
|
this.$loading(false, 'loadingSb')
|
|
|
|
|
|
|
|
}) */
|
|
|
|
|
|
|
|
|
|
|
|
approveTask(obj)
|
|
|
|
approveTask(obj)
|
|
|
|
.then(() => {
|
|
|
|
.then(() => {
|
|
|
|
this.$forceCloseLoading()
|
|
|
|
this.$forceCloseLoading()
|
|
|
@ -127,12 +150,6 @@ export default {
|
|
|
|
this.$loading(false, 'loadingSb')
|
|
|
|
this.$loading(false, 'loadingSb')
|
|
|
|
})
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$refs.form.validate().then(() => {
|
|
|
|
|
|
|
|
let obj = {
|
|
|
|
|
|
|
|
id: this.accessId,
|
|
|
|
|
|
|
|
reason: this.form.reason
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.$loading(true, 'loadingSb')
|
|
|
|
|
|
|
|
rejectTask(obj)
|
|
|
|
rejectTask(obj)
|
|
|
|
.then(() => {
|
|
|
|
.then(() => {
|
|
|
|
this.$forceCloseLoading()
|
|
|
|
this.$forceCloseLoading()
|
|
|
@ -145,9 +162,9 @@ export default {
|
|
|
|
this.$forceCloseLoading()
|
|
|
|
this.$forceCloseLoading()
|
|
|
|
this.$loading(false, 'loadingSb')
|
|
|
|
this.$loading(false, 'loadingSb')
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleSubmit(key) {
|
|
|
|
handleSubmit(key) {
|
|
|
|
if (key == 2) {
|
|
|
|
if (key == 2) {
|
|
|
@ -155,7 +172,7 @@ export default {
|
|
|
|
this.title = '同意'
|
|
|
|
this.title = '同意'
|
|
|
|
this.form.reason = '已同意'
|
|
|
|
this.form.reason = '已同意'
|
|
|
|
// 无需原因,直接同意
|
|
|
|
// 无需原因,直接同意
|
|
|
|
this.handleConfirm(2)
|
|
|
|
this.handleConfirm()
|
|
|
|
} else if (key == 3) {
|
|
|
|
} else if (key == 3) {
|
|
|
|
this.key = key
|
|
|
|
this.key = key
|
|
|
|
this.title = '驳回'
|
|
|
|
this.title = '驳回'
|
|
|
|