Compare commits

..

4 Commits
dev ... main

@ -13,9 +13,10 @@ VUE_APP_API= '/'
# 请求环境
# 方楠
VUE_APP_BASE_API = 'http://139.224.253.31:8081'
# VUE_APP_BASE_API = 'http://one-h5.lyrfp.com'
# 开发环境 不要删
VUE_APP_BASE_API = 'http://192.168.3.128:58088'
# VUE_APP_BASE_API = 'http://192.168.3.128:58088'
# VUE_APP_BASE_API = 'http://60.204.223.58:8080'
#线上预览

@ -106,34 +106,38 @@ export default {
hanleCancel() {
this.isShow = false
},
handleConfirm(key) {
handleConfirm() {
this.$nextTick(() => {
if (key == 2) {
this.$refs.form.validate().then(() => {
let obj = {
id: this.accessId,
reason: ''
reason: this.form.reason
}
this.$loading(true, 'loadingSb')
approveTask(obj)
.then(() => {
this.$forceCloseLoading()
this.$EventBus.$emit('handleResetLive', 'company-myTrips')
this.$EventBus.$emit('handleResetLive', 'company-myClaim')
history.back()
this.$loading(false, 'loadingSb')
})
.catch(() => {
this.$forceCloseLoading()
this.$loading(false, 'loadingSb')
})
} else {
this.$refs.form.validate().then(() => {
let obj = {
id: this.accessId,
reason: this.form.reason
}
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)
.then(() => {
this.$forceCloseLoading()
this.$EventBus.$emit('handleResetLive', 'company-myTrips')
@ -145,8 +149,21 @@ export default {
this.$forceCloseLoading()
this.$loading(false, 'loadingSb')
})
})
}
} else {
rejectTask(obj)
.then(() => {
this.$forceCloseLoading()
this.$EventBus.$emit('handleResetLive', 'company-myTrips')
this.$EventBus.$emit('handleResetLive', 'company-myClaim')
history.back()
this.$loading(false, 'loadingSb')
})
.catch(() => {
this.$forceCloseLoading()
this.$loading(false, 'loadingSb')
})
}
})
})
},
handleSubmit(key) {
@ -155,7 +172,7 @@ export default {
this.title = '同意'
this.form.reason = '已同意'
//
this.handleConfirm(2)
this.handleConfirm()
} else if (key == 3) {
this.key = key
this.title = '驳回'

@ -896,9 +896,7 @@ export default {
projectName: null,
reason: null,
remark: null,
costDeptId: JSON.parse(
window.localStorage.getItem('userInfo') || { dept: {} }
).deptId,
costDeptId: null,
expenseApplyIds: [],
expenseClaimTrips: [
{

Loading…
Cancel
Save