update
This commit is contained in:
parent
abde28cc4d
commit
a207469c80
@ -26,11 +26,11 @@
|
||||
<div class="uni-flex ai-base jc-between">
|
||||
<span class="center-num">{{ sMsg.totalMoneyShow }}</span>
|
||||
<span class="budgetamount">
|
||||
<text class="budget-title">计划营收(元):</text>
|
||||
<!-- <text class="budget-title">计划营收(元):</text>
|
||||
<text :class="sMsg.budgetAmount < sMsg.cashPay ? 'up-text-title' : 'down-text-title'">
|
||||
{{ sMsg.budgetamoutShow }}
|
||||
<span style="font-size: 24rpx;margin-left: 12rpx;">{{ sMsg.diffBili }}%</span>
|
||||
</text>
|
||||
</text> -->
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -122,7 +122,7 @@
|
||||
</div>
|
||||
<div class="uni-flex jc-between">
|
||||
<div style="margin-bottom: 0;"><span style="font-size: 32rpx;">{{ operationModel[0].data
|
||||
}}</span>元
|
||||
}}</span>元
|
||||
</div>
|
||||
<div style="margin-bottom: 0;" v-if="operationModel[1].data"><span
|
||||
style="font-size: 32rpx;">{{
|
||||
@ -394,6 +394,8 @@ export default {
|
||||
let colors1 = ['#FFAC37', '#d8ece9', '#e0e3f7', '#f7f5f6', '#b2b7e3'];
|
||||
let list = []
|
||||
let list2 = []
|
||||
console.log('_this.pageData_this.pageData', _this.pageData);
|
||||
|
||||
_this.pageData.listBusinessModel.map((m, i) => {
|
||||
if (m.Revenue_Amount != 0) {
|
||||
let n = {
|
||||
@ -421,6 +423,8 @@ export default {
|
||||
|
||||
})
|
||||
if (list2.length > 0) {
|
||||
console.log('list2list2list2', list2);
|
||||
|
||||
_this.ServiceRevenueData.push(list2)
|
||||
_this.sellData = list
|
||||
|
||||
@ -436,6 +440,7 @@ export default {
|
||||
list.push(n)
|
||||
}
|
||||
})
|
||||
console.log('listlistlistlist', list);
|
||||
_this.ServiceRevenueData.push(list)
|
||||
}
|
||||
if (list.length > 0) {
|
||||
@ -631,7 +636,6 @@ export default {
|
||||
this.sMsg = totalData
|
||||
// 饼图分析及数据条形分析
|
||||
const [progressList, pieList] = this.getProgressData(busniessTypePie, totalData.cashPay)
|
||||
console.log('progressListprogressListprogressList', progressList);
|
||||
|
||||
this.operationModel = progressList
|
||||
// 经营类型分析
|
||||
@ -643,7 +647,9 @@ export default {
|
||||
});
|
||||
// 经营业态
|
||||
// this.ServiceRevenueData = []
|
||||
|
||||
this.ServiceRevenueData = [busniessTradeFathPie, busniessTradePie]
|
||||
|
||||
if (totalData.uploadCount !== totalData.totalUploadCount) {
|
||||
this.getUnUpLoadShops(theRequest)
|
||||
|
||||
@ -851,7 +857,8 @@ cover-view.page-title {
|
||||
|
||||
/* 门店卡片 */
|
||||
.shop-card {
|
||||
width: 210rpx;
|
||||
// width: 210rpx;
|
||||
width: calc((100% - 40rpx) / 3);
|
||||
height: 240rpx;
|
||||
border-radius: 16rpx;
|
||||
color: #fff;
|
||||
|
||||
@ -1,115 +1,115 @@
|
||||
<template>
|
||||
<uni-ec-canvas
|
||||
class="uni-ec-canvas"
|
||||
id="revenuecharts"
|
||||
ref="revenuecharts"
|
||||
canvas-id="revenuecharts"
|
||||
:ec="ec"
|
||||
@inited="inited"
|
||||
></uni-ec-canvas>
|
||||
<uni-ec-canvas class="uni-ec-canvas" id="revenuecharts" ref="revenuecharts" canvas-id="revenuecharts" :ec="ec"
|
||||
@inited="inited"></uni-ec-canvas>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniEcCanvas from './uni-ec-canvas/uni-ec-canvas.vue';
|
||||
export default {
|
||||
props:['data'],
|
||||
components:{
|
||||
uniEcCanvas
|
||||
},
|
||||
computed:{
|
||||
ec(){
|
||||
if(this.data){
|
||||
return {
|
||||
option:{
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{b}: {c} ({d}%)'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '业态',
|
||||
type: 'pie',
|
||||
selectedMode: 'single',
|
||||
radius: [0, '32%'],
|
||||
center: ['50%','50%'],
|
||||
startAngle: 40,
|
||||
label: {
|
||||
// position: 'inner',
|
||||
formatter: '{b} \n {d}% ',
|
||||
fontSize: 13,
|
||||
color: '#D1D1D1',
|
||||
// show: false,
|
||||
},
|
||||
startAngle: 115,
|
||||
labelLine: {
|
||||
// show: false,
|
||||
length: 62,
|
||||
length2: 12,
|
||||
smooth: true,
|
||||
lineStyle:{
|
||||
color: '#D1D1D1'
|
||||
},
|
||||
import uniEcCanvas from './uni-ec-canvas/uni-ec-canvas.vue';
|
||||
export default {
|
||||
props: ['data'],
|
||||
components: {
|
||||
uniEcCanvas
|
||||
},
|
||||
computed: {
|
||||
ec() {
|
||||
if (this.data) {
|
||||
console.log('传入的data', this.data);
|
||||
|
||||
},
|
||||
data: [
|
||||
...this.data[0]
|
||||
],
|
||||
color:['#FEA427','#7786E3','#75B7AD','#9BC9F8','#FFAC37',]
|
||||
return {
|
||||
option: {
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{b}: {c} ({d}%)'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '业态',
|
||||
type: 'pie',
|
||||
selectedMode: 'single',
|
||||
radius: [0, '32%'],
|
||||
center: ['40%', '50%'],
|
||||
startAngle: 40,
|
||||
label: {
|
||||
// position: 'inner',
|
||||
// formatter: '{b} \n {d}% ',
|
||||
// fontSize: 13,
|
||||
// color: '#D1D1D1',
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
name: '业态',
|
||||
type: 'pie',
|
||||
radius: ['48%', '72%'],
|
||||
center: ['50%','50%'],
|
||||
labelLine: {
|
||||
length: 30,
|
||||
},
|
||||
label: {
|
||||
show:false,
|
||||
startAngle: 115,
|
||||
labelLine: {
|
||||
// show: false,
|
||||
length: 62,
|
||||
length2: 12,
|
||||
smooth: true,
|
||||
lineStyle: {
|
||||
color: '#D1D1D1'
|
||||
},
|
||||
|
||||
color: this.data[1].length> 7 ? ['#FFC3CD','#F4A4B2','#FE6582','#FFE7C0','#FEDA9D','#FEC057','#F9C8A0','#FAB176','#ffa25b','#E1C9F7','#CDA6F1',
|
||||
'#E0E2F6','#C5CDF9','#9AA6EF','#D8ECEA','#8FE5B2','#70D599','#ADE5EE'] :
|
||||
['#70D599', '#FFE7C0', '#ADE5EE','#C5CDF9','#e0e3f7', '#AFB7E6', '#F3B1C9' ],
|
||||
},
|
||||
data: [
|
||||
...this.data[0]
|
||||
],
|
||||
color: ['#FEA427', '#7786E3', '#75B7AD', '#9BC9F8', '#FFAC37',]
|
||||
},
|
||||
{
|
||||
name: '业态',
|
||||
type: 'pie',
|
||||
radius: ['48%', '72%'],
|
||||
center: ['40%', '50%'],
|
||||
labelLine: {
|
||||
length: 30,
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
},
|
||||
color: this.data[1].length > 7 ? ['#FFC3CD', '#F4A4B2', '#FE6582', '#FFE7C0', '#FEDA9D', '#FEC057', '#F9C8A0', '#FAB176', '#ffa25b', '#E1C9F7', '#CDA6F1',
|
||||
'#E0E2F6', '#C5CDF9', '#9AA6EF', '#D8ECEA', '#8FE5B2', '#70D599', '#ADE5EE'] :
|
||||
['#70D599', '#FFE7C0', '#ADE5EE', '#C5CDF9', '#e0e3f7', '#AFB7E6', '#F3B1C9'],
|
||||
|
||||
data: [
|
||||
...this.data[1]
|
||||
]
|
||||
}
|
||||
]
|
||||
data: [
|
||||
...this.data[1]
|
||||
]
|
||||
}
|
||||
],
|
||||
legend: {
|
||||
show: true,
|
||||
orient: 'vertical', // vertical | horizontal
|
||||
right: 25, // left | center | right | 数值
|
||||
bottom: 'center'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
inited(chart){
|
||||
let _this =this
|
||||
// console.log('图表初始化完毕')
|
||||
// console.log('chart实例', this.ec)
|
||||
|
||||
chart.on('click',function(params){
|
||||
if(params.componentIndex==0){
|
||||
_this.$emit('selectCate',params.dataIndex+1)
|
||||
}
|
||||
// console.log(params)
|
||||
})
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
inited(chart) {
|
||||
let _this = this
|
||||
// console.log('图表初始化完毕')
|
||||
// console.log('chart实例', this.ec)
|
||||
|
||||
chart.on('click', function (params) {
|
||||
if (params.componentIndex == 0) {
|
||||
_this.$emit('selectCate', params.dataIndex + 1)
|
||||
}
|
||||
// console.log(params)
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* page {
|
||||
/* page {
|
||||
background-color: #fff;
|
||||
} */
|
||||
.uni-ec-canvas{
|
||||
width: 690rpx;
|
||||
height: 526rpx;
|
||||
margin-top: 40rpx;
|
||||
display:block;
|
||||
}
|
||||
|
||||
.uni-ec-canvas {
|
||||
width: 690rpx;
|
||||
height: 526rpx;
|
||||
margin-top: 40rpx;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -15,6 +15,7 @@ const methods = {
|
||||
*/
|
||||
// let regionList = [] // 营收上传列表 reginListModel[]
|
||||
this.groupType = obj.GroupType
|
||||
this.provinceCode = obj.ProvinceCode
|
||||
const requestParamas = {
|
||||
Statistics_Date: obj.time,
|
||||
Statistics_Month: obj.month,
|
||||
@ -37,14 +38,14 @@ const methods = {
|
||||
if (data.Result_Code != 100) return
|
||||
|
||||
// 处理一下数据 云南长短款只计算自营的 那么就是data 的营收数据 只拿自营的即可
|
||||
let newData = []
|
||||
if (data.Result_Data.List && data.Result_Data.List.length > 0) {
|
||||
data.Result_Data.List.forEach((item) => {
|
||||
if (item.Business_TypeName === '自营') {
|
||||
newData.push(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
// let newData = []
|
||||
// if (data.Result_Data.List && data.Result_Data.List.length > 0) {
|
||||
// data.Result_Data.List.forEach((item) => {
|
||||
// if (item.Business_TypeName === '自营') {
|
||||
// newData.push(item)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
|
||||
// 在营门店数量统计
|
||||
@ -72,11 +73,11 @@ const methods = {
|
||||
if (bayonetCount.Result_Code != 100) return
|
||||
|
||||
if (isServerPartDetail) { // 是服务区营收推送页面
|
||||
return _this.getSeverpartReginList(newData, busniessCounts.Result_Data.List,
|
||||
return _this.getSeverpartReginList(data.Result_Data.List, busniessCounts.Result_Data.List,
|
||||
tradeData.Result_Data.List, budgetAmount.Result_Data.List)
|
||||
}
|
||||
|
||||
return _this.getReginList(newData, busniessCounts.Result_Data.List,
|
||||
return _this.getReginList(data.Result_Data.List, busniessCounts.Result_Data.List,
|
||||
tradeData.Result_Data.List, budgetAmount.Result_Data.List,
|
||||
bayonetCount.Result_Data.List, mobileShare.Result_Data, mallDeliver.Result_Data)
|
||||
// [reginList, totalData, busniessTypePie, busniessTradePie]
|
||||
@ -102,8 +103,18 @@ const methods = {
|
||||
oldData.totalOffAmount += newData.TotalOffAmount
|
||||
oldData.mobilePayment += newData.MobilePayment
|
||||
oldData.cashPay += newData.CashPay
|
||||
oldData.diffLessPrice += newData.Different_Price_Less
|
||||
oldData.diffMorePrice += newData.Different_Price_More
|
||||
// oldData.diffLessPrice += newData.Different_Price_Less
|
||||
// oldData.diffMorePrice += newData.Different_Price_More
|
||||
if (this.provinceCode === '530000') {
|
||||
if (newData.Business_TypeName === '自营') {
|
||||
oldData.diffLessPrice += newData.Different_Price_Less || 0
|
||||
oldData.diffMorePrice += newData.Different_Price_More || 0
|
||||
}
|
||||
} else {
|
||||
oldData.diffLessPrice += newData.Different_Price_Less || 0
|
||||
oldData.diffMorePrice += newData.Different_Price_More || 0
|
||||
}
|
||||
|
||||
if (newData.BusinessType == 1000) { // 商超
|
||||
|
||||
oldData.scCount = oldData.scCount ? oldData.scCount + 1 : 1
|
||||
@ -119,9 +130,20 @@ const methods = {
|
||||
oldData.totalOffAmount = newData.TotalOffAmount
|
||||
oldData.mobilePayment = newData.MobilePayment
|
||||
oldData.cashPay = newData.CashPay
|
||||
oldData.diffLessPrice = newData.Different_Price_Less
|
||||
oldData.diffMorePrice = newData.Different_Price_More
|
||||
|
||||
// oldData.diffLessPrice = newData.Different_Price_Less
|
||||
// oldData.diffMorePrice = newData.Different_Price_More
|
||||
if (this.provinceCode === '530000') {
|
||||
if (newData.Business_TypeName === '自营') {
|
||||
oldData.diffLessPrice = newData.Different_Price_Less || 0
|
||||
oldData.diffMorePrice = newData.Different_Price_More || 0
|
||||
} else {
|
||||
oldData.diffLessPrice = 0
|
||||
oldData.diffMorePrice = 0
|
||||
}
|
||||
} else {
|
||||
oldData.diffLessPrice = newData.Different_Price_Less || 0
|
||||
oldData.diffMorePrice = newData.Different_Price_More || 0
|
||||
}
|
||||
if (newData.BusinessType == 1000) { // 商超
|
||||
|
||||
oldData.scCount = 1
|
||||
@ -137,6 +159,9 @@ const methods = {
|
||||
return { ...oldData }
|
||||
},
|
||||
getBusniessPie(typeName, item, list) { // 经营模式数据
|
||||
console.log('typeNametypeName', typeName);
|
||||
console.log('itemitemitem', item);
|
||||
console.log('listlistlist', list);
|
||||
|
||||
const oldData = list.find(m => m.name === item[typeName])
|
||||
if (oldData) {
|
||||
@ -231,7 +256,6 @@ const methods = {
|
||||
let busniessTypePie = [] // 经营模式饼图统计数据
|
||||
let busniessTradePie = [] // 经营业态饼图统计数据
|
||||
let busniessTradeFathPie = [] // 区域经营饼图统计数据
|
||||
|
||||
data.map(async (n, index) => {
|
||||
n.show = false
|
||||
totalShow = _this.getTotalShowData(n, totalShow, index); // 总营收数据统计
|
||||
@ -364,7 +388,6 @@ const methods = {
|
||||
if (budgetAmount.length) {
|
||||
totalShow.budgetAmount = budgetAmount[0].BUDGET_AMOUNT
|
||||
}
|
||||
console.log('list', list)
|
||||
return [list, totalShow, busniessTypePie, busniessTradePie, busniessAreaPie, bayonetPie]
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
</view>
|
||||
<view class="topRight" @click="handleGoMap">
|
||||
<image class="searchIcon" src="/static/images/home/searchIcon.svg" />
|
||||
<span class="searchText">请输入服务区</span>
|
||||
<span class="searchText">请输入服务区</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -333,9 +333,6 @@ export default {
|
||||
watch: {
|
||||
user: {
|
||||
handler(newValue, value) {
|
||||
console.log('newValuenewValuenewValue', newValue);
|
||||
console.log('valuevaluevaluevaluevalue', value);
|
||||
|
||||
let _this = this
|
||||
let userInfo = JSON.parse(JSON.stringify(newValue));
|
||||
_this.useInfo = JSON.parse(JSON.stringify(newValue));
|
||||
@ -353,6 +350,7 @@ export default {
|
||||
_this.profitSharingList = []
|
||||
_this.modalRateList = []
|
||||
}
|
||||
console.log('_this.isReturn_this.isReturn', _this.isReturn);
|
||||
|
||||
if (!_this.isReturn) {
|
||||
_this.handleGetOnLoad()
|
||||
@ -370,30 +368,6 @@ export default {
|
||||
}
|
||||
})
|
||||
|
||||
// uni.getLocation({
|
||||
// type: "gcj02",
|
||||
// altitude: true,
|
||||
// success: (res) => {
|
||||
// let seatInfo = {
|
||||
// latitude: res.latitude,
|
||||
// longitude: res.longitude,
|
||||
// };
|
||||
|
||||
// uni.setStorageSync("seatInfo", JSON.stringify(seatInfo));
|
||||
// _this.handleGetNearService(seatInfo.latitude, seatInfo.longitude)
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// // 因为错误 所以默认给读书铺的位置
|
||||
// let seatInfo = {
|
||||
// latitude: 24.95152,
|
||||
// longitude: 102.553311,
|
||||
// };
|
||||
|
||||
// uni.setStorageSync("seatInfo", JSON.stringify(seatInfo));
|
||||
// _this.handleGetNearService(seatInfo.latitude, seatInfo.longitude)
|
||||
// },
|
||||
// });
|
||||
|
||||
this.single = timestampToTimeMonth(new Date(this.lastDay).getTime());
|
||||
uni.setStorageSync("lastDay", this.lastDay);
|
||||
|
||||
@ -406,16 +380,9 @@ export default {
|
||||
if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] === 1) {
|
||||
_this.isReturn = false;
|
||||
} else if (userInfo && userInfo.WeChat_UserId && userInfo.AuthorityInfo["89a1f248-2113-4d57-84b1-c2e6edb9e8ee"] !== 1) {
|
||||
// uni.redirectTo({
|
||||
// url: `/pages/commercialBI/noData?type=noAuthor`,
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
// if (!_this.isReturn) {
|
||||
// _this.handleGetOnLoad()
|
||||
// }
|
||||
|
||||
},
|
||||
onShow() {
|
||||
// 隐藏掉小程序本身自带的 tabbar 让自定义的tabbar出现
|
||||
@ -493,7 +460,7 @@ export default {
|
||||
// 后台预加载,不影响当前显示
|
||||
setTimeout(async () => {
|
||||
try {
|
||||
await this.handleGetTopData(index);
|
||||
await this.handleGetTopData(index, 'noChange');
|
||||
} catch (error) {
|
||||
console.log('预加载数据失败:', error);
|
||||
}
|
||||
@ -838,10 +805,14 @@ export default {
|
||||
}
|
||||
},
|
||||
// 拿到顶部轮播框的数据
|
||||
async handleGetTopData(index) {
|
||||
async handleGetTopData(index, ischange) {
|
||||
// 因为预加载附近月份的时候 会将当前的数据给替换掉 肯定不会的 加个内容 进入页面之后的预加载附近月份 不改变当前月的数据
|
||||
|
||||
let nowMonth = index !== undefined ? this.monthList[index] : this.monthList[this.selectIndex];
|
||||
const monthKey = nowMonth.realFull;
|
||||
|
||||
console.log('nowMonthnowMonth', nowMonth);
|
||||
|
||||
// 检查是否正在加载,避免重复请求
|
||||
if (this.loadingMap[monthKey]) {
|
||||
return;
|
||||
@ -940,11 +911,16 @@ export default {
|
||||
modalRateList: modalListRate
|
||||
};
|
||||
|
||||
// 设置当前数据
|
||||
this.modalRateList = modalListRate;
|
||||
this.moneyRateList = moneyRateList;
|
||||
this.profitSharingList = shareList;
|
||||
this.topShowData = resObj;
|
||||
console.log('monthKeymonthKey', monthKey);
|
||||
if (ischange === 'noChange') {
|
||||
|
||||
} else {
|
||||
// 设置当前数据
|
||||
this.modalRateList = modalListRate;
|
||||
this.moneyRateList = moneyRateList;
|
||||
this.profitSharingList = shareList;
|
||||
this.topShowData = resObj;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取数据失败:', error);
|
||||
} finally {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user