xiaozy_当月动销
xiaozhiyong 1 year ago
parent 5ec7e9d36e
commit c0cd0262f0
  1. 115
      salesRanking/page/enterpriseDetails/enterpriseDetails.vue

@ -52,64 +52,46 @@
: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"> <view style="height:75%;">
<!-- <swiper-item @tap.stop=''> <qiunDataCharts :canvas2d='true' canvasId='canvasIdw' type="area"
<view class="swiper-item"> :opts="{extra:{area:{type:'curve',addLine:true,gradient:true}}}" :chartData="Line" />
<view style="height:75%;"> </view>
<qiunDataCharts :canvas2d='true' canvasId='canvasIdw' inScrollView="true" type="area" <view v-if="detailsData"
:opts="{extra:{area:{type:'curve',addLine:true,gradient:true}}}" style="height: 25%; display: flex; justify-content: space-around; align-items: center;">
:chartData="Line" /> <view class="swiper-item_table">今日</view>
</view> <view> <text class="numberoli">{{detailsData.todaySalesRose.toFixed(2)}}</text> L</view>
<view v-if="detailsData" <view> <text class="numberoli">{{detailsData.siteDayBalance|price}}</text> </view>
style="height: 25%; display: flex; justify-content: space-around; align-items: center;"> </view>
<view class="swiper-item_table">今日</view> </view>
<view> <text class="numberoli">{{detailsData.todaySalesRose.toFixed(2)}}</text> L</view> <view class="swiper-item" v-if="chartSeleIndex == 1">
<view> <text class="numberoli">{{detailsData.siteDayBalance|price}}</text> </view> <view style="height:75%;">
</view> <qiunDataCharts :canvas2d='true' canvasId='canvasIdt' type="area"
</view> :opts="{extra:{area:{type:'curve',addLine:true,gradient:true}}}" :chartData="LineTwo" />
</swiper-item> </view>
<swiper-item> <view v-if="chartsData"
<view class="swiper-item"> style="height: 25%; display: flex; justify-content: space-around; align-items: center;">
<view style="height:75%;"> <view class="swiper-item_table">今日</view>
<qiunDataCharts :canvas2d='true' canvasId='canvasIdt' inScrollView="true" type="area" <view> <text class="numberoli">{{chartsData.rechargeAmountOnTheDay|price}}</text>
:opts="{extra:{area:{type:'curve',addLine:true,gradient:true}}}"
:chartData="LineTwo" />
</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>
</swiper-item> --> </view>
<swiper-item>
</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 class="swiper-item">
<view style="height:75%;">
<qiunDataCharts :canvas2d='true' canvasId='canvasIdt' inScrollView="true" type="area"
:opts="{extra:{area:{type:'curve',addLine:true,gradient:true}}}"
:chartData="oneMonthLine" />
</view> </view>
<view <view class="swiper-item" v-if="chartSeleIndex == 2">
style="height: 25%; display: flex; justify-content: space-around; align-items: center;"> <view style="height:75%;">
<view class="swiper-item_table">今日</view> <qiunDataCharts :canvas2d='true' canvasId='canvasIdx' type="area"
<view> <text class="numberoli">{{}}</text> L</view> :opts="{extra:{area:{type:'curve',addLine:true,gradient:true}},enableScroll:true,xAxis:{itemCount:7}}"
<view> <text class="numberoli">{{}}</text> </view> :chartData="oneMonthLine" :ontouch="true" />
</view>
<view v-if="oneMonthData"
style="height: 25%; display: flex; justify-content: space-around; align-items: center;">
<view class="swiper-item_table">今日</view>
<view> <text class="numberoli">{{oneMonthData.todaySalesRose.toFixed(2)}}</text> L
</view>
<view> <text class="numberoli">{{oneMonthData.siteDayBalance|price}}</text> </view>
</view>
</view> </view>
</view> </view>
<view class="footer"> <view class="footer">
<view @click="ishowFn()" class="footer_title" v-if="dedata">{{dedata.startTime|timeProcessing}} - <view @click="ishowFn()" class="footer_title" v-if="dedata">{{dedata.startTime|timeProcessing}} -
{{dedata.endTime|timeProcessing}} {{dedata.endTime|timeProcessing}}
@ -163,23 +145,24 @@
}, },
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
}, { }, {
lable: '近五次充值', lable: '近五次充值',
value: 1 value: 1
},{ }, {
lable: '近一月动销', lable: '近一月动销',
value: 2 value: 2
}], }],
chartSeleIndex: 0, chartSeleIndex: 0,
Line: {}, Line: {},
LineTwo: {}, LineTwo: {},
oneMonthLine:{} oneMonthLine: {}
} }
}, },
onLoad(e) { onLoad(e) {
@ -209,6 +192,9 @@
} }
}, },
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,
@ -277,7 +263,7 @@
this.quantity = res.data.orderNumber this.quantity = res.data.orderNumber
console.log(res, '收入') console.log(res, '收入')
}) })
if(this.routerIndex) { if (this.routerIndex) {
// //
sy.findMonthlySiteMovingPinVo(e.id).then(res => { sy.findMonthlySiteMovingPinVo(e.id).then(res => {
let dateArr = [] let dateArr = []
@ -285,8 +271,11 @@
res.data.siteMovingPins.forEach(item => { res.data.siteMovingPins.forEach(item => {
let date = item.createTime.split('-') let date = item.createTime.split('-')
dateArr.push(`${date[1]}-${date[2]}`) dateArr.push(`${date[1]}-${date[2]}`)
moneyArr.push(item.money.toFixed(2)) let money = (item.money + '').includes('.') ? item.money.toFixed(2) : item
.money
moneyArr.push(money)
}) })
this.oneMonthData = res.data
this.oneMonthLine = { this.oneMonthLine = {
categories: dateArr, categories: dateArr,
series: [{ series: [{
@ -295,7 +284,7 @@
}] }]
} }
}) })
} }
}, },
jump(e) { jump(e) {
this.dedata.routerIndex = this.routerIndex; this.dedata.routerIndex = this.routerIndex;
@ -333,7 +322,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
@ -345,6 +334,10 @@
<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;

Loading…
Cancel
Save