Commit 73db6885 authored by youjie's avatar youjie

car 冲抵

parent 87ea148a
...@@ -45,12 +45,12 @@ ...@@ -45,12 +45,12 @@
mycareer mycareer
}, },
watch: { watch: {
'window.location': { 'window.location.ancestorOrigins': {
handler(newValue) { handler(newValue) {
if(window.location.ancestorOrigins.length==0) localStorage.setItem('typeSystem', 0) if(window.location.ancestorOrigins.length==0) localStorage.setItem('typeSystem', 0)
else localStorage.setItem('typeSystem', 1) else localStorage.setItem('typeSystem', 1)
console.log(window.location.href) // console.log(window.location.href)
console.log(localStorage.typeSystem,'=-===') // console.log(localStorage.typeSystem,'=-===')
}, },
deep: true, deep: true,
immediate: true immediate: true
...@@ -138,6 +138,10 @@ ...@@ -138,6 +138,10 @@
} }
}, },
mounted() { mounted() {
let href = this.domainManager().CarUrl
window.parent.postMessage({
event_id: 'app',
data: {}}, `${href}`)
if ( if (
!this.getLocalStorage() && !this.getLocalStorage() &&
document.URL.indexOf("SupplierLogin") == -1 && document.URL.indexOf("SupplierLogin") == -1 &&
......
...@@ -1025,7 +1025,8 @@ export default { ...@@ -1025,7 +1025,8 @@ export default {
GuestFile: '', GuestFile: '',
isShowCorrelation: false, isShowCorrelation: false,
CorrelationObj:{}, CorrelationObj:{},
is_correlationOP: false is_correlationOP: false,
typeSystem: 0
}; };
}, },
watch: { watch: {
...@@ -1058,6 +1059,22 @@ export default { ...@@ -1058,6 +1059,22 @@ export default {
} }
this.isShowCorrelation = true; this.isShowCorrelation = true;
}, },
// 车行订单 制成本冲抵单
addBalanceout() {
let datas = this.$route.query
let tradeObj = datas.tradeObj
console.log(datas,tradeObj,'-----crmuserInfo')
let query = {
blank: "y",
tab: `新增付款单据`,
Type: 2,
tradeObj: tradeObj,
companyID: 1248
};
this.queryObj = query
this.cdState = true
// this.makeAdocument(row, 0, 3, null, 'Offset')
},
isOffset(row, index, num,name){ isOffset(row, index, num,name){
this.makeAdocument(row, index, num, name, 'Offset') this.makeAdocument(row, index, num, name, 'Offset')
}, },
...@@ -1509,6 +1526,7 @@ export default { ...@@ -1509,6 +1526,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.typeSystem = localStorage.typeSystem
this.userInfo = this.getLocalStorage(); this.userInfo = this.getLocalStorage();
let ActionMenuCode = this.userInfo.ActionMenuCode; let ActionMenuCode = this.userInfo.ActionMenuCode;
if (ActionMenuCode.indexOf('is_correlationOP') != -1 ){ if (ActionMenuCode.indexOf('is_correlationOP') != -1 ){
...@@ -1519,6 +1537,10 @@ export default { ...@@ -1519,6 +1537,10 @@ export default {
window.onresize = () => { window.onresize = () => {
this.com_onresize(); this.com_onresize();
}; };
if(this.$route.query.cdState=='true'){
this.addBalanceout()
}
} }
}; };
</script> </script>
......
...@@ -38,10 +38,8 @@ ...@@ -38,10 +38,8 @@
}, },
mounted() { mounted() {
if (!this.getLocalStorage()) { if (!this.getLocalStorage()) {
this.getLogin(false)
this.autoLogin() this.autoLogin()
} else { } else {
this.getLogin(true)
var data = JSON.parse(localStorage.crmuserInfo) var data = JSON.parse(localStorage.crmuserInfo)
let query let query
console.log(data.parameter,'---parameter') console.log(data.parameter,'---parameter')
...@@ -60,10 +58,10 @@ ...@@ -60,10 +58,10 @@
path: data.parameter.path, path: data.parameter.path,
query query
}); });
this.getLogin()
} }
}, },
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;
...@@ -79,12 +77,12 @@ ...@@ -79,12 +77,12 @@
}, },
methods: { methods: {
getLogin(state){ getLogin(data){
let href = this.domainManager().CarUrl let href = this.domainManager().CarUrl
window.parent.postMessage({ window.parent.postMessage({
event_id: 'login', event_id: 'login',
data: { data: {
loginState: state, loginState: data?data:'',
}}, `${href}`) }}, `${href}`)
}, },
autoLogin() { autoLogin() {
...@@ -131,9 +129,9 @@ ...@@ -131,9 +129,9 @@
path: data.parameter.path, path: data.parameter.path,
query query
}); });
this.getLogin(true) this.getLogin('登录成功')
} else { } else {
this.getLogin(false) this.getLogin('')
this.$notify.error({ this.$notify.error({
title: "提示", title: "提示",
customClass: "msgTips", customClass: "msgTips",
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
layout="total,prev, pager, next, jumper" :page-size="czMsg.pageSize" :total='total2'> layout="total,prev, pager, next, jumper" :page-size="czMsg.pageSize" :total='total2'>
</el-pagination> </el-pagination>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="cdState=false">{{$t('pub.cancelBtn')}}</button> <button class="hollowFixedBtn" @click="cancelBtn()">{{$t('pub.cancelBtn')}}</button>
<button class="normalBtn" type="primary" @click="goUrlZD">{{$t('pub.sureBtn')}}</button> <button class="normalBtn" type="primary" @click="goUrlZD">{{$t('pub.sureBtn')}}</button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -125,9 +125,25 @@ ...@@ -125,9 +125,25 @@
}, },
methods: { methods: {
cancelBtn(){
if(this.queryObj.companyID){
this.$confirm("车行冲抵单据参数将丢失,是否继续关闭", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.cdState = false
this.$emit('close',false)
}).catch(() => {
this.$message.info("已取消!");
});
}
},
close(){ close(){
this.cdState = false this.cdState = false
this.$emit('close',false) this.$emit('close',false)
}, },
// 冲抵 // 冲抵
goUrlZD(){ goUrlZD(){
......
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