合同会签

master
lion 4 months ago
parent 3ac3f2fe4e
commit 7e60543ae3

@ -19,7 +19,7 @@ export default {
watch: {
$route(to, from) {
const locationHash = window.location.hash
console.log("locationHash",locationHash)
this.$matomo.setCustomUrl(locationHash.replace(/#/g, ''))
this.$matomo.trackPageView(to.meta.title) //
}

@ -68,7 +68,7 @@ router.beforeEach(async(to, from, next) => {
// remove token and go to login page to re-login
await store.dispatch('user/resetToken')
Message.error(error || 'Has Error')
next(`/login?redirect=${to.path}`)
next(`/login?redirect=${to.fullPath}`)
NProgress.done()
}
}
@ -91,6 +91,17 @@ router.beforeEach(async(to, from, next) => {
} catch (e) {
next('/login')
}
}else if(to.query.auth_token && to.query.oaType==='contractSign' && to.query.contractId){
try {
await store.dispatch('user/loginskip', {
token: to.query.auth_token,
tp: 'inner'
})
next(to.fullPath?to.fullPath.slice(1): '/')
} catch (e) {
console.log("e",e)
next('/login')
}
} else {
// other pages that do not have permission to access are redirected to the login page.
next(`/login?redirect=${to.path}`)

@ -286,13 +286,12 @@
label: '付款日期',
width: 160,
customFn: row => {
return ( <
el - date - picker style = 'width: 130px;'
return ( <el-date-picker style = 'width: 130px;'
vModel = {
row.date
}
size = 'mini'
value - format = 'yyyy-MM-dd' > < /el-date-picker>
value-format = 'yyyy-MM-dd' > </el-date-picker>
)
}
},
@ -301,8 +300,7 @@
label: '金额',
width: 180,
customFn: row => {
return ( <
el - input - number size = 'mini'
return ( <el-input-number size = 'mini'
vModel = {
row.money
}
@ -311,7 +309,7 @@
}
controls = {
false
} > < /el-input-number>
} > </el-input-number>
)
}
},
@ -321,8 +319,7 @@
customFn: (row, {
$index
}) => {
return ( <
Button type = 'error'
return ( <Button type = 'error'
size = 'small'
on = {
{
@ -330,7 +327,7 @@
this.manyForm.splice($index, 1)
}
}
} > 移除 < /Button>
} > 移除 </Button>
)
}
}
@ -512,7 +509,8 @@
type: 'success',
message: '操作成功'
})
this.$emit('signSuccess')
this.$emit('signSuccess')
this.handleOperationSuccess()
})
},
//
@ -523,6 +521,7 @@
data: {
status: 'success',
result: '合同签署成功',
}
};

@ -107,7 +107,8 @@ export default {
},
watch: {
$route: {
handler: function(route) {
handler: function(route) {
console.log("route12",route)
this.redirect = route.query && route.query.redirect
},
immediate: true
@ -138,6 +139,28 @@ export default {
console.log(error)
this.loading = false
})
}
// oa
// var url = "http://192.168.60.99:8003/admin/#/contract/contractList?oaType=contractSign&contractId="+
// out_contract_id+'&auth_token='+"{{$oatoken}}"
console.log("query.auth_token",query)
console.log("query.auth_token",query.auth_token)
console.log("oa跳转来的",this.redirect)
if(query.auth_token && query.oaType==='contractSign' && query.contractId){
console.log("oa跳转来的",this.redirect)
this.loading = true
this.$store.dispatch('user/loginskip', {
token: query.auth_token,
tp: 'inner'
}).then(() => {
this.$router.push({
path: this.redirect || '/'
})
this.loading = false
}).catch((error) => {
console.log(error)
this.loading = false
})
}
},
methods: {

Loading…
Cancel
Save