This commit is contained in:
xiaozhiyong
2023-07-20 17:01:43 +08:00
parent 5408b75b83
commit d0953d12ff
2 changed files with 590 additions and 503 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -73,7 +73,7 @@
}; };
}, },
computed: { computed: {
activeChannelCode() { activeChannelCode() {
if (this.channelList.length && this.channelList[this.TabCur]) { if (this.channelList.length && this.channelList[this.TabCur]) {
let channelCode = this.channelList[this.TabCur].channelCode let channelCode = this.channelList[this.TabCur].channelCode
@@ -111,21 +111,23 @@
} }
}, },
methods: { methods: {
goFinancial(){ goFinancial() {
const user = uni.getStorageSync('user'); const user = uni.getStorageSync('user');
if(user){ if (user) {
Financial.findHomePageReport({customerId:user.id}).then(res=>{ Financial.findHomePageReport({
if(res.data){ customerId: user.id
}).then(res => {
if (res.data) {
uni.navigateTo({ uni.navigateTo({
url:`../../../Financial/pages/estimate/index?data=${encodeURIComponent(JSON.stringify(res.data))}` url: `../../../Financial/pages/estimate/index?data=${encodeURIComponent(JSON.stringify(res.data))}`
}) })
}else{ } else {
uni.navigateTo({ uni.navigateTo({
url:'../../../Financial/pages/index?guide=1' url: '../../../Financial/pages/index?guide=1'
}) })
} }
}); });
}else{ } else {
uni.showToast({ uni.showToast({
title: '请先登录!', title: '请先登录!',
icon: 'none' icon: 'none'
@@ -149,7 +151,7 @@
// return String(value).split('.')[1]&&String(value).split('.')[1].length>2? Number(`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}`)+0.01 :Number(value).toFixed(2); // return String(value).split('.')[1]&&String(value).split('.')[1].length>2? Number(`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}`)+0.01 :Number(value).toFixed(2);
return String(value).split('.')[1] && String(value).split('.')[1].length > 2 ? Number( return String(value).split('.')[1] && String(value).split('.')[1].length > 2 ? Number(
`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}${Number(String(value).split('.')[1].substr(2))==0?'':9}` `${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}${Number(String(value).split('.')[1].substr(2))==0?'':9}`
).toFixed(2) : Number(value).toFixed(2); ).toFixed(2) : Number(value).toFixed(2);
} else { } else {
return Number(value).toFixed(2) return Number(value).toFixed(2)
} }
@@ -179,6 +181,7 @@
// 渠道编码 ( XOIL星油 WJY万金油 LV老吕找油网 TY团油 YDJY一点加油壳牌) // 渠道编码 ( XOIL星油 WJY万金油 LV老吕找油网 TY团油 YDJY一点加油壳牌)
switch (value) { switch (value) {
case 'XOIL': case 'XOIL':
case 'ZDC':
return '星油' return '星油'
case 'WJY': case 'WJY':
return '万金油' return '万金油'
@@ -188,6 +191,7 @@
return '团油' return '团油'
case 'YDJY': case 'YDJY':
return '一点加油(壳牌)' return '一点加油(壳牌)'
} }
} }
} }