|
|
@ -4,13 +4,16 @@ |
|
|
|
<view class="flex jb ac"> |
|
|
|
<view class="flex jb ac"> |
|
|
|
<view> |
|
|
|
<view> |
|
|
|
<view class="flex "> |
|
|
|
<view class="flex "> |
|
|
|
<uni-icons v-if="routerIndex" color="#2866ff" custom-prefix="iconfont" type="iconjiayou" size="20"></uni-icons> |
|
|
|
<uni-icons v-if="routerIndex" color="#2866ff" custom-prefix="iconfont" type="iconjiayou" |
|
|
|
<image v-if="!routerIndex" style="width: 60rpx; height: 60rpx;" src="../../../static/selegs.png"></image> |
|
|
|
size="20"></uni-icons> |
|
|
|
|
|
|
|
<image v-if="!routerIndex" style="width: 60rpx; height: 60rpx;" |
|
|
|
|
|
|
|
src="../../../static/selegs.png"></image> |
|
|
|
<view class="header_text_left"> |
|
|
|
<view class="header_text_left"> |
|
|
|
<view class="text_ov">{{routerIndex?dedata.siteName:dedata.companyName}}</view> |
|
|
|
<view class="text_ov">{{routerIndex?dedata.siteName:dedata.companyName}}</view> |
|
|
|
<view class="small_text text_ov ">{{dedata.id}}</view> |
|
|
|
<view class="small_text text_ov ">{{dedata.id}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-if="!routerIndex" :style="{background:dedata.parentMark=='0'?'':'#BC853B'}" class="list_item_tip"> |
|
|
|
<view v-if="!routerIndex" :style="{background:dedata.parentMark=='0'?'':'#BC853B'}" |
|
|
|
|
|
|
|
class="list_item_tip"> |
|
|
|
{{dedata.parentMark=='0'?'总公司':'子公司'}} |
|
|
|
{{dedata.parentMark=='0'?'总公司':'子公司'}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -24,10 +27,11 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-if="routerIndex" class="t-icon"> |
|
|
|
<view v-if="routerIndex" class="t-icon"> |
|
|
|
<image style="width: 100%;height: 100%;" :src="dedata.siteImages?dedata.siteImages: '../../../static/selegs.png' " mode=""></image> |
|
|
|
<image style="width: 100%;height: 100%;" |
|
|
|
|
|
|
|
:src="dedata.siteImages?dedata.siteImages: '../../../static/selegs.png' " mode=""></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view @click="jump(2)" class="account"> |
|
|
|
<view @click="jump(2)" class="account" v-if="detailsData"> |
|
|
|
<view class="yuan"></view> |
|
|
|
<view class="yuan"></view> |
|
|
|
<view> |
|
|
|
<view> |
|
|
|
<view style="text-align: center;">账户余额</view> |
|
|
|
<view style="text-align: center;">账户余额</view> |
|
|
@ -48,45 +52,48 @@ |
|
|
|
:class=" chartSeleIndex==index?'selechartSeleBar_item':'chartSeleBar_item' ">{{item.lable}}</view> |
|
|
|
:class=" chartSeleIndex==index?'selechartSeleBar_item':'chartSeleBar_item' ">{{item.lable}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="chart_scoll"> |
|
|
|
<view class="chart_scoll"> |
|
|
|
<swiper @change="swiperChange" :current='chartSeleIndex' class="swiper" :interval="1000" |
|
|
|
<view class="swiper-item" v-if="chartSeleIndex == 0"> |
|
|
|
:duration="1000"> |
|
|
|
|
|
|
|
<swiper-item @tap.stop=''> |
|
|
|
|
|
|
|
<view class="swiper-item"> |
|
|
|
|
|
|
|
<view style="height:75%;"> |
|
|
|
<view style="height:75%;"> |
|
|
|
<qiunDataCharts :canvas2d='true' canvasId='canvasIdw' inScrollView="true" type="area" |
|
|
|
<qiunDataCharts :canvas2d='true' canvasId='canvasIdw' type="area" |
|
|
|
:opts="{extra:{area:{type:'curve',addLine:true,gradient:true}}}" |
|
|
|
:opts="{extra:{area:{type:'curve',addLine:true,gradient:true}}}" :chartData="Line" /> |
|
|
|
:chartData="Line" /> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view |
|
|
|
<view v-if="detailsData" |
|
|
|
style="height: 25%; display: flex; justify-content: space-around; align-items: center;"> |
|
|
|
style="height: 25%; display: flex; justify-content: space-around; align-items: center;"> |
|
|
|
<view class="swiper-item_table">今日</view> |
|
|
|
<view class="swiper-item_table">今日</view> |
|
|
|
<view> <text class="numberoli">{{detailsData.todaySalesRose.toFixed(2)}}</text> L</view> |
|
|
|
<view> <text class="numberoli">{{detailsData.todaySalesRose.toFixed(2)}}</text> L</view> |
|
|
|
<view> <text class="numberoli">{{detailsData.siteDayBalance|price}}</text> ¥</view> |
|
|
|
<view> <text class="numberoli">{{detailsData.siteDayBalance|price}}</text> ¥</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</swiper-item> |
|
|
|
<view class="swiper-item" v-if="chartSeleIndex == 1"> |
|
|
|
<swiper-item> |
|
|
|
|
|
|
|
<view class="swiper-item"> |
|
|
|
|
|
|
|
<view style="height:75%;"> |
|
|
|
<view style="height:75%;"> |
|
|
|
<qiunDataCharts :canvas2d='true' canvasId='canvasIdt' inScrollView="true" type="area" |
|
|
|
<qiunDataCharts :canvas2d='true' canvasId='canvasIdt' type="area" |
|
|
|
:opts="{extra:{area:{type:'curve',addLine:true,gradient:true}}}" |
|
|
|
:opts="{extra:{area:{type:'curve',addLine:true,gradient:true}}}" :chartData="LineTwo" /> |
|
|
|
:chartData="LineTwo" /> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view |
|
|
|
<view v-if="chartsData" |
|
|
|
|
|
|
|
style="height: 25%; display: flex; justify-content: space-around; align-items: center;"> |
|
|
|
|
|
|
|
<view class="swiper-item_table">今日</view> |
|
|
|
|
|
|
|
<view> <text class="numberoli">{{chartsData.rechargeAmountOnTheDay|price}}</text> ¥ |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="swiper-item" v-if="chartSeleIndex == 2"> |
|
|
|
|
|
|
|
<view style="height:75%;"> |
|
|
|
|
|
|
|
<qiunDataCharts :canvas2d='true' canvasId='canvasIdx' type="area" |
|
|
|
|
|
|
|
:opts="{extra:{area:{type:'curve',addLine:true,gradient:true}},enableScroll:true,xAxis:{itemCount:7}}" |
|
|
|
|
|
|
|
:chartData="oneMonthLine" :ontouch="true" /> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view v-if="oneMonthData" |
|
|
|
style="height: 25%; display: flex; justify-content: space-around; align-items: center;"> |
|
|
|
style="height: 25%; display: flex; justify-content: space-around; align-items: center;"> |
|
|
|
<view class="swiper-item_table">今日</view> |
|
|
|
<view class="swiper-item_table">今日</view> |
|
|
|
<!-- <view> <text class="numberoli">2987.5</text> L</view> --> |
|
|
|
<view> <text class="numberoli">{{oneMonthData.todaySalesRose.toFixed(2)}}</text> L |
|
|
|
<view> <text class="numberoli">{{chartsData.rechargeAmountOnTheDay|price}}</text> ¥</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view> <text class="numberoli">{{oneMonthData.siteDayBalance|price}}</text> ¥</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</swiper-item> |
|
|
|
|
|
|
|
</swiper> |
|
|
|
|
|
|
|
<!-- <view style="height: 70%;width: 100%; padding: 20rpx 0;"> |
|
|
|
|
|
|
|
<qiun-data-charts type="area" :opts="{extra:{area:{type:'curve',addLine:true,gradient:true}}}" :chartData="Line" /> |
|
|
|
|
|
|
|
</view> --> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="footer"> |
|
|
|
<view class="footer"> |
|
|
|
<view @click="ishowFn()" class="footer_title">{{dedata.startTime|timeProcessing}} - |
|
|
|
<view @click="ishowFn()" class="footer_title" v-if="dedata">{{dedata.startTime|timeProcessing}} - |
|
|
|
{{dedata.endTime|timeProcessing}} |
|
|
|
{{dedata.endTime|timeProcessing}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view @click="jump(1)" class="footer_item"> |
|
|
|
<view @click="jump(1)" class="footer_item"> |
|
|
@ -162,9 +169,10 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
dedata: null, |
|
|
|
dedata: null, |
|
|
|
chartsData: null, |
|
|
|
chartsData: null, |
|
|
|
|
|
|
|
detailsData: null, |
|
|
|
|
|
|
|
oneMonthData: null, |
|
|
|
income: 0, |
|
|
|
income: 0, |
|
|
|
quantity: 0, |
|
|
|
quantity: 0, |
|
|
|
detailsData: null, |
|
|
|
|
|
|
|
chartSeleBarData: [{ |
|
|
|
chartSeleBarData: [{ |
|
|
|
lable: '近五日动销', |
|
|
|
lable: '近五日动销', |
|
|
|
value: 0 |
|
|
|
value: 0 |
|
|
@ -175,6 +183,7 @@ |
|
|
|
chartSeleIndex: 0, |
|
|
|
chartSeleIndex: 0, |
|
|
|
Line: {}, |
|
|
|
Line: {}, |
|
|
|
LineTwo: {}, |
|
|
|
LineTwo: {}, |
|
|
|
|
|
|
|
oneMonthLine: {}, |
|
|
|
distributeData:{}, |
|
|
|
distributeData:{}, |
|
|
|
totalAmount:0, |
|
|
|
totalAmount:0, |
|
|
|
outTotalAmount:0 |
|
|
|
outTotalAmount:0 |
|
|
@ -188,11 +197,11 @@ |
|
|
|
.$page.fullPath.split('?')[0].split('/').length - 1] : |
|
|
|
.$page.fullPath.split('?')[0].split('/').length - 1] : |
|
|
|
routes[(routes.length - 2)].$page.fullPath.split('/')[routes[(routes.length - 2)].$page |
|
|
|
routes[(routes.length - 2)].$page.fullPath.split('/')[routes[(routes.length - 2)].$page |
|
|
|
.fullPath.split('/').length - 1]; |
|
|
|
.fullPath.split('/').length - 1]; |
|
|
|
|
|
|
|
// 仅用于判断是从油站动销还是企业动销跳入 |
|
|
|
this.routerIndex = routerIndex == 'enterpriseIndex' ? false : true; |
|
|
|
this.routerIndex = routerIndex == 'enterpriseIndex' ? false : true; |
|
|
|
if (e.jsData) { |
|
|
|
if (e.jsData) { |
|
|
|
this.dedata = JSON.parse(e.jsData); |
|
|
|
this.dedata = JSON.parse(e.jsData); |
|
|
|
this.getdata(JSON.parse(e.jsData)); |
|
|
|
this.getdata(JSON.parse(e.jsData)); |
|
|
|
this.getDistributeCount(JSON.parse(e.jsData)) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
filters: { |
|
|
|
filters: { |
|
|
@ -200,7 +209,6 @@ |
|
|
|
return e ? e.split(' ')[0] : e |
|
|
|
return e ? e.split(' ')[0] : e |
|
|
|
}, |
|
|
|
}, |
|
|
|
price(e = 0.00) { |
|
|
|
price(e = 0.00) { |
|
|
|
// if(!e) e=0.00; |
|
|
|
|
|
|
|
return convertW.convertW(e) |
|
|
|
return convertW.convertW(e) |
|
|
|
}, |
|
|
|
}, |
|
|
|
distinguish(e) { |
|
|
|
distinguish(e) { |
|
|
@ -208,10 +216,13 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
getTouchMove(e) { |
|
|
|
|
|
|
|
// console.log('e',e) |
|
|
|
|
|
|
|
}, |
|
|
|
datePopupChange(e) { |
|
|
|
datePopupChange(e) { |
|
|
|
sy[(this.routerIndex ? 'queryBusinessIncome' : 'queryEnterpriseIncome')]({ |
|
|
|
sy[(this.routerIndex ? 'queryBusinessIncome' : 'queryEnterpriseIncome')]({ |
|
|
|
[((this.routerIndex ? 'siteId' : 'companyId'))]: this.dedata.id, |
|
|
|
[((this.routerIndex ? 'siteId' : 'companyId'))]: this.dedata.id, |
|
|
|
endTime: e[1].split(' ')[0]+' 23:59:59', |
|
|
|
endTime: e[1], |
|
|
|
startTime: e[0] |
|
|
|
startTime: e[0] |
|
|
|
}).then(res => { |
|
|
|
}).then(res => { |
|
|
|
this.enterpriseData = res.data |
|
|
|
this.enterpriseData = res.data |
|
|
@ -277,6 +288,7 @@ |
|
|
|
}] |
|
|
|
}] |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(e => { |
|
|
|
}).catch(e => { |
|
|
|
|
|
|
|
console.log(e, '///') |
|
|
|
}) |
|
|
|
}) |
|
|
|
sy[(this.routerIndex ? 'queryBusinessIncome' : 'queryEnterpriseIncome')]({ |
|
|
|
sy[(this.routerIndex ? 'queryBusinessIncome' : 'queryEnterpriseIncome')]({ |
|
|
|
[((this.routerIndex ? 'siteId' : 'companyId'))]: e.id, |
|
|
|
[((this.routerIndex ? 'siteId' : 'companyId'))]: e.id, |
|
|
@ -298,6 +310,32 @@ |
|
|
|
this.totalAmount = res.data.totalAmount ==null ? 0 : res.data.totalAmount |
|
|
|
this.totalAmount = res.data.totalAmount ==null ? 0 : res.data.totalAmount |
|
|
|
this.outTotalAmount = res.data.outTotalAmount ==null ? 0 : res.data.outTotalAmount |
|
|
|
this.outTotalAmount = res.data.outTotalAmount ==null ? 0 : res.data.outTotalAmount |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
if (this.routerIndex) { |
|
|
|
|
|
|
|
this.chartSeleBarData.push({ |
|
|
|
|
|
|
|
lable: '当月动销', |
|
|
|
|
|
|
|
value: 2 |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
// 近一个月动销 仅油站动销展示 |
|
|
|
|
|
|
|
sy.findMonthlySiteMovingPinVo(e.id).then(res => { |
|
|
|
|
|
|
|
let dateArr = [] |
|
|
|
|
|
|
|
let moneyArr = [] |
|
|
|
|
|
|
|
res.data.siteMovingPins.forEach(item => { |
|
|
|
|
|
|
|
let date = item.createTime.split('-') |
|
|
|
|
|
|
|
dateArr.push(`${date[1]}-${date[2]}`) |
|
|
|
|
|
|
|
let money = (item.money + '').includes('.') ? item.money.toFixed(2) : item |
|
|
|
|
|
|
|
.money |
|
|
|
|
|
|
|
moneyArr.push(money) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.oneMonthData = res.data |
|
|
|
|
|
|
|
this.oneMonthLine = { |
|
|
|
|
|
|
|
categories: dateArr, |
|
|
|
|
|
|
|
series: [{ |
|
|
|
|
|
|
|
name: "金额", |
|
|
|
|
|
|
|
data: moneyArr |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
jump(e) { |
|
|
|
jump(e) { |
|
|
|
this.dedata.routerIndex = this.routerIndex; |
|
|
|
this.dedata.routerIndex = this.routerIndex; |
|
|
@ -307,7 +345,8 @@ |
|
|
|
url: '../contribution/contribution?jsData=' + JSON.stringify(Object.assign(this |
|
|
|
url: '../contribution/contribution?jsData=' + JSON.stringify(Object.assign(this |
|
|
|
.dedata, { |
|
|
|
.dedata, { |
|
|
|
liters: this.enterpriseData.liters, |
|
|
|
liters: this.enterpriseData.liters, |
|
|
|
enterpriseContributionAmount: this.enterpriseData.enterpriseContributionAmount, |
|
|
|
enterpriseContributionAmount: this.enterpriseData |
|
|
|
|
|
|
|
.enterpriseContributionAmount, |
|
|
|
...this.detailsData |
|
|
|
...this.detailsData |
|
|
|
})) |
|
|
|
})) |
|
|
|
}) |
|
|
|
}) |
|
|
@ -345,7 +384,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
swiperChange(e) { |
|
|
|
swiperChange(e) { |
|
|
|
this.chartSeleIndex = e.detail.current |
|
|
|
// this.chartSeleIndex = e.detail.current |
|
|
|
}, |
|
|
|
}, |
|
|
|
chartSeleBarFn(item, index) { |
|
|
|
chartSeleBarFn(item, index) { |
|
|
|
this.chartSeleIndex = index |
|
|
|
this.chartSeleIndex = index |
|
|
@ -356,6 +395,11 @@ |
|
|
|
|
|
|
|
|
|
|
|
<style scoped> |
|
|
|
<style scoped> |
|
|
|
@import url("./enterpriseDetails.css"); |
|
|
|
@import url("./enterpriseDetails.css"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.swiper-item { |
|
|
|
|
|
|
|
width: 100%; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.list_item_tip { |
|
|
|
.list_item_tip { |
|
|
|
padding: 11rpx 14rpx; |
|
|
|
padding: 11rpx 14rpx; |
|
|
|
background-color: #9F43CC; |
|
|
|
background-color: #9F43CC; |
|
|
@ -365,6 +409,7 @@ |
|
|
|
margin: 0 auto; |
|
|
|
margin: 0 auto; |
|
|
|
height: fit-content; |
|
|
|
height: fit-content; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.t-icon { |
|
|
|
.t-icon { |
|
|
|
width: 95rpx !important; |
|
|
|
width: 95rpx !important; |
|
|
|
height: 95rpx !important; |
|
|
|
height: 95rpx !important; |
|
|
|