Commit efe39200 authored by youjie's avatar youjie

车系统交互

parent 22918c2a
...@@ -600,7 +600,7 @@ ...@@ -600,7 +600,7 @@
</el-option> </el-option>
</el-select> </el-select>
</span> </p> </span> </p>
<!-- msg.TemplateId==27&&msg.CourseId&&orderObj&&orderObj.OrderID&&orderObj.OrderSource==8 --> <!-- msg.TemplateId==27&&msg.CourseId&&orderObj&&orderObj.OrderID&&orderObj.OrderSource==8 -->
<template v-if="isReceivablesAccount"> <template v-if="isReceivablesAccount">
<!-- <!--
...@@ -644,7 +644,7 @@ ...@@ -644,7 +644,7 @@
</span> </span>
</p> </p>
</template> </template>
<template v-if="(orderObj&&!orderObj.isPrestore)||msg.SigningCustomerId||msg.DepositCustomerId||RB_Branch_Id==1218 || showSigningCustomer"> <template v-if="(orderObj&&!orderObj.isPrestore)||msg.SigningCustomerId||msg.DepositCustomerId||RB_Branch_Id==1218 || showSigningCustomer">
<template v-if="!msg.DepositCustomerId||RB_Branch_Id==1218 || showSigningCustomer"> <template v-if="!msg.DepositCustomerId||RB_Branch_Id==1218 || showSigningCustomer">
<p v-if="CustomerIdList&&CustomerIdList.length" style="margin-left: 15px;">签约客户:<span> <p v-if="CustomerIdList&&CustomerIdList.length" style="margin-left: 15px;">签约客户:<span>
...@@ -686,7 +686,7 @@ ...@@ -686,7 +686,7 @@
<span style="margin-left: 20px;color: red;">注:只有帮其他公司{{this.$route.query.Type==1?'代收':'代付'}}的需选择此项,非代收代付则忽略此项</span> <span style="margin-left: 20px;color: red;">注:只有帮其他公司{{this.$route.query.Type==1?'代收':'代付'}}的需选择此项,非代收代付则忽略此项</span>
</p> </p>
</div> </div>
</template> </template>
<table v-if="ContractCustomer" class="Receipt_table" border="1" bordercolor="#c94052" <table v-if="ContractCustomer" class="Receipt_table" border="1" bordercolor="#c94052"
style="border-collapse:collapse;margin-top: 10px;"> style="border-collapse:collapse;margin-top: 10px;">
...@@ -1649,6 +1649,8 @@ ...@@ -1649,6 +1649,8 @@
}, },
Financial_post_Set(){ Financial_post_Set(){
console.log(this.msg,'=====------msg')
// return
this.loading = true; this.loading = true;
this.apipost('Financial_post_Set', this.msg, res => { this.apipost('Financial_post_Set', this.msg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
...@@ -1991,9 +1993,9 @@ ...@@ -1991,9 +1993,9 @@
if(!this.$route.query.edit){ if(!this.$route.query.edit){
this.msg.RB_Branch_Id = this.msg.RB_Branch_Id == 0 || this.msg.RB_Branch_Id == ParentCompanyId ? this this.msg.RB_Branch_Id = this.msg.RB_Branch_Id == 0 || this.msg.RB_Branch_Id == ParentCompanyId ? this
.getLocalStorage().RB_Branch_id : this.msg.RB_Branch_Id; .getLocalStorage().RB_Branch_id : this.msg.RB_Branch_Id;
} }
if (this.orderObj && this.orderObj.companyIDList && this.orderObj.companyIDList.length > 0) { if (this.orderObj && this.orderObj.companyIDList && this.orderObj.companyIDList.length > 0) {
this.msg.RB_Branch_Id = this.orderObj.companyIDList[0]; this.msg.RB_Branch_Id = this.orderObj.companyIDList[0];
} else if (this.$route.query.companyID) { } else if (this.$route.query.companyID) {
......
...@@ -37,9 +37,34 @@ ...@@ -37,9 +37,34 @@
}, },
mounted() { mounted() {
if (!this.getLocalStorage()) {
this.getLogin(false)
this.autoLogin()
} else {
this.getLogin(true)
var data = JSON.parse(localStorage.crmuserInfo)
console.log(data,'------data')
let query
if(data.parameter.tradeObj){
console.log(data.parameter,'------tradeObj')
query = {
tradeObj: data.parameter.tradeObj,
Type: data.parameter.type
}
}else{
query = {
crmOrderObj: JSON.stringify(data.parameter),
Type: data.parameter.type
}
}
this.$router.push({
path: data.parameter.path,
query
});
}
}, },
created() { created() {
this.getLogin(false)
if (this.$route.query) { if (this.$route.query) {
let param = JSON.parse(this.$route.query.data); let param = JSON.parse(this.$route.query.data);
this.obj.token = this.$route.query.token; this.obj.token = this.$route.query.token;
...@@ -51,20 +76,18 @@ ...@@ -51,20 +76,18 @@
} }
} }
} }
if (!this.getLocalStorage()) {
this.autoLogin()
} else {
var data = JSON.parse(localStorage.crmuserInfo)
this.$router.push({
path: data.parameter.path,
query: {
crmOrderObj: JSON.stringify(data.parameter),
Type: data.parameter.type
}
});
}
}, },
methods: { methods: {
getLogin(state){
let href = this.domainManager().CarUrl
window.parent.postMessage({
event_id: 'login',
data: {
loginState: state,
}}, `${href}`)
},
autoLogin() { autoLogin() {
this.apipostLogin( this.apipostLogin(
"admin_get_GetErpAutoLoginInfo", "admin_get_GetErpAutoLoginInfo",
...@@ -72,6 +95,7 @@ ...@@ -72,6 +95,7 @@
response => { response => {
var jsonData = response.data; var jsonData = response.data;
if (jsonData.resultCode == 1) { if (jsonData.resultCode == 1) {
console.log('-----erp登录')
var userData = jsonData.data; var userData = jsonData.data;
var userJson = JSON.stringify(userData); var userJson = JSON.stringify(userData);
localStorage.removeItem('navTabs') localStorage.removeItem('navTabs')
...@@ -92,14 +116,27 @@ ...@@ -92,14 +116,27 @@
localStorage.menu = JSON.stringify(firstTire) localStorage.menu = JSON.stringify(firstTire)
this.loginState = 0; this.loginState = 0;
var data = JSON.parse(localStorage.crmuserInfo) var data = JSON.parse(localStorage.crmuserInfo)
this.$router.push({ let crmOrderObj = JSON.parse(JSON.stringify(data.parameter))
path: data.parameter.path, let query = {}
query: { console.log(data,'---data.parameter.tradeObj')
crmOrderObj: JSON.stringify(data.parameter), if(data.parameter.tradeObj){
query = {
tradeObj: data.parameter.tradeObj,
Type: data.parameter.type,
}
}else{
query = {
crmOrderObj: JSON.stringify(crmOrderObj),
Type: data.parameter.type Type: data.parameter.type
} }
}
this.$router.push({
path: data.parameter.path,
query
}); });
this.getLogin(true)
} else { } else {
this.getLogin(false)
this.$notify.error({ this.$notify.error({
title: "提示", title: "提示",
customClass: "msgTips", customClass: "msgTips",
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<template> <template>
<div style="position: relative;" class="myIndexStyle" ref="firstParent"> <div style="position: relative;" class="myIndexStyle" ref="firstParent">
<div class="nav"> <div class="nav" v-if="!typeSystem">
<div class="nav-left"> <div class="nav-left">
<img class="GroupPic" v-if="userInfo.GroupPic!='' " :src="userInfo.GroupPic" :onerror='defaultHeadImg' /> <img class="GroupPic" v-if="userInfo.GroupPic!='' " :src="userInfo.GroupPic" :onerror='defaultHeadImg' />
</div> </div>
...@@ -957,7 +957,7 @@ ...@@ -957,7 +957,7 @@
<source src="/static/music/msgMusic.mp3" type="audio/mpeg"> <source src="/static/music/msgMusic.mp3" type="audio/mpeg">
</audio> </audio>
</div> </div>
<div class="temDivs"> <div class="temDivs" :style="{'top':!typeSystem?'58px':'0px'}">
<router-view></router-view> <router-view></router-view>
</div> </div>
...@@ -1271,6 +1271,7 @@ ...@@ -1271,6 +1271,7 @@
}, },
data() { data() {
return { return {
typeSystem: 0,
TemplateUrl: '', TemplateUrl: '',
dialogPptistVisible: false, dialogPptistVisible: false,
ExamineThePriceMsg: { ExamineThePriceMsg: {
...@@ -1752,6 +1753,12 @@ ...@@ -1752,6 +1753,12 @@
}, },
}, },
mounted() { mounted() {
let crmuserInfo = JSON.parse(localStorage.crmuserInfo)
if(crmuserInfo
&&crmuserInfo.parameter
&&crmuserInfo.parameter.typeSystem) {
this.typeSystem = crmuserInfo.parameter.typeSystem
}
let that = this; let that = this;
this.qjGroupId = this.QjGroupId(); this.qjGroupId = this.QjGroupId();
this.apipost('user_post_GetNowVote', {}, r => { this.apipost('user_post_GetNowVote', {}, r => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment