Commit 73db6885 authored by youjie's avatar youjie

car 冲抵

parent 87ea148a
......@@ -45,12 +45,12 @@
mycareer
},
watch: {
'window.location': {
'window.location.ancestorOrigins': {
handler(newValue) {
if(window.location.ancestorOrigins.length==0) localStorage.setItem('typeSystem', 0)
else localStorage.setItem('typeSystem', 1)
console.log(window.location.href)
console.log(localStorage.typeSystem,'=-===')
// console.log(window.location.href)
// console.log(localStorage.typeSystem,'=-===')
},
deep: true,
immediate: true
......@@ -138,6 +138,10 @@
}
},
mounted() {
let href = this.domainManager().CarUrl
window.parent.postMessage({
event_id: 'app',
data: {}}, `${href}`)
if (
!this.getLocalStorage() &&
document.URL.indexOf("SupplierLogin") == -1 &&
......
......@@ -1025,7 +1025,8 @@ export default {
GuestFile: '',
isShowCorrelation: false,
CorrelationObj:{},
is_correlationOP: false
is_correlationOP: false,
typeSystem: 0
};
},
watch: {
......@@ -1058,6 +1059,22 @@ export default {
}
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){
this.makeAdocument(row, index, num, name, 'Offset')
},
......@@ -1509,6 +1526,7 @@ export default {
}
},
mounted() {
this.typeSystem = localStorage.typeSystem
this.userInfo = this.getLocalStorage();
let ActionMenuCode = this.userInfo.ActionMenuCode;
if (ActionMenuCode.indexOf('is_correlationOP') != -1 ){
......@@ -1519,6 +1537,10 @@ export default {
window.onresize = () => {
this.com_onresize();
};
if(this.$route.query.cdState=='true'){
this.addBalanceout()
}
}
};
</script>
......
......@@ -38,10 +38,8 @@
},
mounted() {
if (!this.getLocalStorage()) {
this.getLogin(false)
this.autoLogin()
} else {
this.getLogin(true)
var data = JSON.parse(localStorage.crmuserInfo)
let query
console.log(data.parameter,'---parameter')
......@@ -60,10 +58,10 @@
path: data.parameter.path,
query
});
this.getLogin()
}
},
created() {
this.getLogin(false)
if (this.$route.query) {
let param = JSON.parse(this.$route.query.data);
this.obj.token = this.$route.query.token;
......@@ -79,12 +77,12 @@
},
methods: {
getLogin(state){
getLogin(data){
let href = this.domainManager().CarUrl
window.parent.postMessage({
event_id: 'login',
data: {
loginState: state,
loginState: data?data:'',
}}, `${href}`)
},
autoLogin() {
......@@ -131,9 +129,9 @@
path: data.parameter.path,
query
});
this.getLogin(true)
this.getLogin('登录成功')
} else {
this.getLogin(false)
this.getLogin('')
this.$notify.error({
title: "提示",
customClass: "msgTips",
......
......@@ -61,7 +61,7 @@
layout="total,prev, pager, next, jumper" :page-size="czMsg.pageSize" :total='total2'>
</el-pagination>
<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>
</div>
</el-dialog>
......@@ -125,9 +125,25 @@
},
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(){
this.cdState = false
this.$emit('close',false)
this.cdState = false
this.$emit('close',false)
},
// 冲抵
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