数据统计

version/0412
fanfan 1 year ago
parent deecab36a6
commit 66ff4c6d5a
  1. 83
      pages/news/user/report.vue
  2. 2
      pages/news3/LogisticsDetails.vue
  3. 101
      pages/news3/components/setRange.vue
  4. 266
      pages/news3/vipPrice.vue

@ -7,52 +7,52 @@
<view class="report-bd" v-if="tabIndex == 0"> <view class="report-bd" v-if="tabIndex == 0">
<view class="module1"> <view class="module1">
<view class="title">订单数据</view> <view class="title">订单数据</view>
<view class="info"> <view class="info" v-if=" orderData">
<view class="item"> <view class="item">
订单金额<text>¥{{infor.orderData.orderMoney}}</text> 订单金额<text>¥{{ orderData.orderMoney}}</text>
</view> </view>
<view class="item"> <view class="item">
订单数<text>{{infor.orderData.orderCount}}</text> 订单数<text>{{ orderData.orderCount}}</text>
</view> </view>
<view class="item"> <view class="item">
支持人数<text>{{infor.orderData.orderPayUser}}</text> 支持人数<text>{{ orderData.orderPayUser}}</text>
</view> </view>
<view class="item"> <view class="item">
总成本金额<text>¥{{infor.orderData.orderCostMoney}}</text> 总成本金额<text>¥{{ orderData.orderCostMoney}}</text>
</view> </view>
<view class="item"> <view class="item">
预估利益<text>¥{{infor.orderData.orderInterest}}</text> 预估利益<text>¥{{ orderData.orderInterest}}</text>
</view> </view>
<view class="item"> <view class="item">
付费会员数<text>{{infor.orderData.payMemberCount}}</text> 付费会员数<text>{{ orderData.payMemberCount}}</text>
</view> </view>
<view class="item"> <view class="item">
付费分销数<text>{{infor.orderData.payDealerCount}}</text> 付费分销数<text>{{ orderData.payDealerCount}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="module2"> <view class="module2">
<view class="title">退款数据</view> <view class="title">退款数据</view>
<view class="info"> <view class="info" v-if=" refundData">
<view class="item"> <view class="item">
退款单数<text>{{infor.refundData.refundCount}}</text> 退款单数<text>{{ refundData.refundCount}}</text>
</view> </view>
<view class="item"> <view class="item">
退款金额<text>¥{{infor.refundData.refundTotalMoney}}</text> 退款金额<text>¥{{ refundData.refundTotalMoney}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="module3"> <view class="module3">
<view class="title">用户数据</view> <view class="title">用户数据</view>
<view class="info"> <view class="info" v-if=" userData">
<view class="item"> <view class="item">
访客数<text>{{infor.userData.visitorCount}}</text> 访客数<text>{{ userData.visitorCount}}</text>
</view> </view>
<view class="item"> <view class="item">
浏览量<text>{{infor.userData.viewCount}}</text> 浏览量<text>{{ userData.viewCount}}</text>
</view> </view>
<view class="item"> <view class="item">
新增用户数<text>{{infor.userData.newUserCount}}</text> 新增用户数<text>{{ userData.newUserCount}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -69,7 +69,8 @@
<view class="end timer" @click="isShow=true">{{endTime?endTime:'结束时间'}}</view> <view class="end timer" @click="isShow=true">{{endTime?endTime:'结束时间'}}</view>
</view> </view>
<view class="rest"> <view class="rest">
<view class="c" @click="quantityReset" style="border:1rpx solid #E5E5E5;background: #fff;color:#3B3B3B ;">重置</view> <view class="c" @click="quantityReset"
style="border:1rpx solid #E5E5E5;background: #fff;color:#3B3B3B ;">重置</view>
<view class="c" :style="{'opacity': (startTime||dateIndex>-1)?1:0.6 }" @click="quantityFilter">确认</view> <view class="c" :style="{'opacity': (startTime||dateIndex>-1)?1:0.6 }" @click="quantityFilter">确认</view>
</view> </view>
@ -79,63 +80,63 @@
<view class="report-bd" v-if="tabIndex == 1"> <view class="report-bd" v-if="tabIndex == 1">
<view class="module1"> <view class="module1">
<view class="title">订单数据</view> <view class="title">订单数据</view>
<view class="info"> <view class="info" v-if=" orderData">
<view class="item"> <view class="item">
订单金额<text>¥{{infor.orderData.orderMoney}}</text> 订单金额<text>¥{{ orderData.orderMoney}}</text>
</view> </view>
<view class="item"> <view class="item">
订单数<text>{{infor.orderData.orderCount}}</text> 订单数<text>{{ orderData.orderCount}}</text>
</view> </view>
<view class="item"> <view class="item">
支持人数<text>{{infor.orderData.orderPayUser}}</text> 支持人数<text>{{ orderData.orderPayUser}}</text>
</view> </view>
<view class="item"> <view class="item">
总成本金额<text>¥{{infor.orderData.orderCostMoney}}</text> 总成本金额<text>¥{{ orderData.orderCostMoney}}</text>
</view> </view>
<view class="item"> <view class="item">
预估利益<text>¥{{infor.orderData.orderInterest}}</text> 预估利益<text>¥{{ orderData.orderInterest}}</text>
</view> </view>
<view class="item"> <view class="item">
付费会员数<text>{{infor.orderData.payMemberCount}}</text> 付费会员数<text>{{ orderData.payMemberCount}}</text>
</view> </view>
<view class="item"> <view class="item">
付费分销数<text>{{infor.orderData.payDealerCount}}</text> 付费分销数<text>{{ orderData.payDealerCount}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="module2"> <view class="module2">
<view class="title">退款数据</view> <view class="title">退款数据</view>
<view class="info"> <view class="info" v-if=" refundData">
<view class="item"> <view class="item">
退款单数<text>{{infor.refundData.refundCount}}</text> 退款单数<text>{{ refundData.refundCount}}</text>
</view> </view>
<view class="item"> <view class="item">
退款金额<text>¥{{infor.refundData.refundTotalMoney}}</text> 退款金额<text>¥{{ refundData.refundTotalMoney}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="module3"> <view class="module3">
<view class="title">用户数据</view> <view class="title">用户数据</view>
<view class="info"> <view class="info" v-if=" userData">
<view class="item"> <view class="item">
访客数<text>{{infor.userData.visitorCount}}</text> 访客数<text>{{ userData.visitorCount}}</text>
</view> </view>
<view class="item"> <view class="item">
浏览量<text>{{infor.userData.viewCount}}</text> 浏览量<text>{{ userData.viewCount}}</text>
</view> </view>
<view class="item"> <view class="item">
新增用户数<text>{{infor.userData.newUserCount}}</text> 新增用户数<text>{{ userData.newUserCount}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="module4"> <view class="module4">
<view class="title">佣金数据</view> <view class="title">佣金数据</view>
<view class="info"> <view class="info" v-if=" commissionData">
<view class="item"> <view class="item">
累计佣金已结算金额<text>{{infor.commissionData.settleTotalMoney}}</text> 累计佣金已结算金额<text>{{ commissionData.settleTotalMoney}}</text>
</view> </view>
<view class="item"> <view class="item">
累计佣金结算金额<text>{{infor.commissionData.noSettleTotalMoney}}</text> 累计佣金结算金额<text>{{ commissionData.noSettleTotalMoney}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -160,13 +161,11 @@
startTime: '', startTime: '',
endTime: '', endTime: '',
recentDate: '', recentDate: '',
infor: {
orderData: {}, orderData: {},
refundData: {}, refundData: {},
userData: {}, userData: {},
commissionData: {} commissionData: {}
} }
}
}, },
onLoad() { onLoad() {
this.getNumberPages() this.getNumberPages()
@ -191,9 +190,9 @@
this.startTime = this.getDay(day); this.startTime = this.getDay(day);
this.endTime = this.getDay(0) this.endTime = this.getDay(0)
}, },
quantityReset(){ quantityReset() {
this.startTime =''; this.startTime = '';
this.endTime =''; this.endTime = '';
this.dateIndex = -1 this.dateIndex = -1
this.getNumberPages() this.getNumberPages()
}, },
@ -218,8 +217,10 @@
endDate: this.endTime endDate: this.endTime
}) })
.then(result => { .then(result => {
this.infor = result.data.data this.orderData = result.data.orderData;
console.log(result) this.refundData = result.data.refundData;
this.userData = result.data.userData;
this.commissionData = result.data.commissionData;
}) })
.catch(reject) .catch(reject)
}) })

@ -3,7 +3,7 @@
<view class="park-navbar"> <view class="park-navbar">
<u-navbar title="物流信息" :border-bottom="false" :background="background"></u-navbar> <u-navbar title="物流信息" :border-bottom="false" :background="background"></u-navbar>
</view> </view>
<view class="logis-box"> <view class="logis-box" v-if="logisticsItem">
<image src="/static/default-logo.png" alt=""></image> <image src="/static/default-logo.png" alt=""></image>
<view class="logis-pany"> <view class="logis-pany">
<view class="logis-text"> <view class="logis-text">

@ -1,20 +1,20 @@
<template> <template>
<view> <view>
<u-popup v-model="afterSale" width="80%" border-radius="10" :closeable="true" mode="center"> <u-popup v-model="afterSale" width="80%" border-radius="10" @close="close" :closeable="true" mode="center">
<view class="afterSales"> <view class="afterSales">
<view class="filterTitle"> <view class="filterTitle">
请设置价格区间 请设置价格区间
</view> </view>
<view class="priceContainer"> <view class="priceContainer">
<u-input placeholder="最低" v-model="min"></u-input> <u-input placeholder="最低" @input="startPrice" v-model="min"></u-input>
<text style="margin:0 30upx;">-</text> <text style="margin:0 30upx;">-</text>
<u-input placeholder="最高" v-model="max"></u-input> <u-input placeholder="最高" v-model="max"></u-input>
</view> </view>
<view class="btnGroup"> <view class="btnGroup">
<view class="reset"> <view class="reset" @click="reset">
重置 重置
</view> </view>
<view class="submit" style="margin-left:24upx;"> <view class="submit" @click="submit" style="margin-left:24upx;">
确定 确定
</view> </view>
</view> </view>
@ -23,65 +23,91 @@
设置规则 设置规则
</view> </view>
<view class="ruleText"> <view class="ruleText">
A.当加价率生效后会员价高于市场价会员价统一自动按以下标准执行 市场价-成本价x_____% +成本价=会员价 _____%为此时的加价率 利润低于_____元的商品不展示在商城里 A.当加价率生效后会员价高于市场价会员价统一自动按以下标准执行 市场价-成本价x_____% +成本价=会员价 _____%为此时的加价率
利润低于_____元的商品不展示在商城里
</view> </view>
</view> </view>
</view> </view>
</u-popup> </u-popup>
</view> </view>
</template> </template>
<script> <script>
export default{ export default {
data(){ data() {
return{ return {
afterSale:false, afterSale: false,
min:null, min: null,
max:null, max: null,
} }
}, },
methods:{ methods: {
reset() {
this.min = null;
this.max = null
},
close() {
this.min = null;
this.max = null
},
startPrice(e) {
console.log(e)
this.min = e
},
onRate(e){
console.log(e)
},
submit() {
this.$emit('getprice', {
min: this.min,
max: this.max
})
}
}
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.afterSales {
padding: 32upx;
.afterSales{ .filterTitle {
padding:32upx;
.filterTitle{
font-size: 32upx; font-size: 32upx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 500; font-weight: 500;
color: #303030; color: #303030;
text-align: center; text-align: center;
} }
.priceContainer{
.priceContainer {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding-top:56upx; padding-top: 56upx;
margin-top:34upx; margin-top: 34upx;
border-top:1px solid #EAEAEA; border-top: 1px solid #EAEAEA;
::v-deep .u-input{
::v-deep .u-input {
height: 70upx; height: 70upx;
background: #F3F3F3; background: #F3F3F3;
border-radius: 22px 22px 22px 22px; border-radius: 22px 22px 22px 22px;
opacity: 1; opacity: 1;
text-align: center; text-align: center;
} }
::v-deep .u-input__input{
::v-deep .u-input__input {
text-align: center; text-align: center;
} }
} }
.btnGroup{
margin:60upx 0; .btnGroup {
margin: 60upx 0;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.reset{
width:216upx; .reset {
width: 216upx;
height: 70upx; height: 70upx;
background: #E9E9E9; background: #E9E9E9;
border-radius: 22px 22px 22px 22px; border-radius: 22px 22px 22px 22px;
@ -94,8 +120,9 @@ export default{
line-height: 70upx; line-height: 70upx;
text-align: center; text-align: center;
} }
.submit{
width:216upx; .submit {
width: 216upx;
height: 70upx; height: 70upx;
background: linear-gradient(180deg, #FD5D06 0%, #F3211A 100%); background: linear-gradient(180deg, #FD5D06 0%, #F3211A 100%);
border-radius: 50px 50px 50px 50px; border-radius: 50px 50px 50px 50px;
@ -110,8 +137,9 @@ export default{
} }
} }
.setRule{
.ruleTitle{ .setRule {
.ruleTitle {
font-size: 28upx; font-size: 28upx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
@ -119,8 +147,9 @@ export default{
color: #303030; color: #303030;
} }
.ruleText{
margin-top:24upx; .ruleText {
margin-top: 24upx;
font-size: 28upx; font-size: 28upx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 400; font-weight: 400;
@ -130,5 +159,5 @@ export default{
} }
} }
} }
</style> </style>

@ -1,27 +1,37 @@
<template> <template>
<view class="vipInfo"> <view class="vipInfo">
<view class="msg"> <view class="msg">
<text>价格区间()</text> <text>价格区间()</text>
<text>会员加价率</text> <text>会员加价率%</text>
<text>利润空间(</text> <text>利润空间(</text>
</view> </view>
<view class="classifyContainer"> <view class="classifyContainer">
<view class="classifyItem" v-for="(item,index) in list" :key="index"> <view class="classifyItem" v-for="(item,index_1) in list" :key="index">
<view class="classTitle"> <view class="classTitle">
<text>{{item.name}}</text> <text>{{item.name}}</text>
<u-icon name="arrow-right" color="#292929" size="28"></u-icon> <u-icon name="arrow-right" color="#292929" size="28"></u-icon>
</view> </view>
<view class="priceRange"> <view class="priceRange">
<view class="rangeItem" v-for="(p,i) in item.children" :key="i"> <view class="rangeItem" v-for="(val,index_2) in item.children" :key="i">
<u-input placeholder="请设置" disabled v-model="p.priceRange"></u-input> <view class="rangeInput" @click="setUp(index_1,index_2)">
<u-input placeholder="请设置" disabled style="margin:0 60upx" v-model="p.rate"></u-input> <text v-if="val.startPrice>=0 && val.endPrice>0 ">
<u-input class="profit" disabled v-model="p.profit"></u-input> <text>0</text> - <text>100</text>
</text>
<text v-else style="color: #8F8F8F;">请设置</text>
</view>
<view class="rangeInput fix">
<input type="text" style="border: none;" @input="onRate($event,index_1,index_2)"
placeholder="请设置" v-model="val.rate" />
<text style="margin-right: 15rpx;">%</text>
</view>
<view class="profit">
<text>{{val.startProfit}}</text> - <text>{{val.endProfit}}</text>
</view>
</view> </view>
</view> </view>
<view class="rangeBtn"> <view class="rangeBtn">
<view class="rangeHandle" @click="addHandle(item)"> <view class="rangeHandle" @click="addHandle(index_1)">
<view class="addFlag">+</view> <view class="addFlag">+</view>
<text>新增价格区间</text> <text>新增价格区间</text>
</view> </view>
@ -32,64 +42,89 @@
</view> </view>
</view> </view>
</view> </view>
<setRange ref="setRange"></setRange> <setRange ref="setRange" @getprice="getprice"></setRange>
</view> </view>
</template> </template>
<script> <script>
import setRange from './components/setRange.vue' import setRange from './components/setRange.vue'
export default{ export default {
components:{setRange}, components: {
data(){ setRange
return{
value:null,
value1:null,
list:[
{
name:'一级分类名称',
children:[
{
priceRange:'1',
rate:'1',
profit:'1'
}
]
}, },
{ data() {
name:'二级分类名称', return {
children:[ index_1: '',
{ index_2: '',
priceRange:'', list: [{
rate:'', name: '一级分类名称',
profit:'' children: [{
} startPrice: null,
] endPrice: null,
rate: null,
startProfit: null,
endProfit: null
}]
}, },
{ {
name:'三级分类名称', name: '二级分类名称',
children:[ children: [{
startPrice: null,
endPrice: null,
rate: null,
startProfit: null,
endProfit: null
}]
},
{ {
priceRange:'', name: '三级分类名称',
rate:'', children: [{
profit:'' startPrice: null,
} endPrice: null,
] rate: null,
startProfit: null,
endProfit: null
}]
}, },
] ]
} }
}, },
methods:{ methods: {
addHandle(item){ onRate(e, index_1, index_2) {
item.children.push({ let rate = Number(e.detail.value)
priceRange:'', this.list[this.index_1].children[this.index_2].startProfit = Number((this.list[this.index_1].children[this
rate:'', .index_2]
profit:'' .startPrice * (rate / 100)).toFixed(2))
this.list[this.index_1].children[this.index_2].endProfit = Number((this.list[this.index_1].children[this
.index_2]
.endPrice * (rate / 100)).toFixed(2))
this.list[this.index_1].children[this.index_2].rate = rate
console.log(this.list)
},
getprice(res) {
this.list[this.index_1].children[this.index_2].startPrice = Number(res.min)
this.list[this.index_1].children[this.index_2].endPrice = Number(res.max)
this.$forceUpdate(this.list)
},
addHandle(index_1) {
this.list[index_1].children.push({
startPrice: null,
endPrice: null,
rate: null,
startProfit: null,
endProfit: null
}) })
this.index_2 = this.list[index_1].children;
this.$refs.setRange.afterSale = true; this.$refs.setRange.afterSale = true;
}, },
setUp(index_1, index_2) {
delHandle(item){ this.index_1 = index_1;
if(item.children.length>1){ this.index_2 = index_2;
this.$refs.setRange.afterSale = true;
},
delHandle(item) {
if (item.children.length > 1) {
item.children.pop() item.children.pop()
} }
@ -97,25 +132,37 @@ export default{
}, },
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
page{ page {
min-height:100%; min-height: 100%;
padding-bottom:60upx; padding-bottom: 60upx;
} }
::v-deep .uni-input-wrapper {
width: 160rpx !important;
text-align: center !important;
height: 70rpx !important;
}
.vipInfo{ ::v-deep uni-input {
.msg{ height: 70rpx !important;
font-size: 28rpx;
}
.vipInfo {
.msg {
background: #FFE7E7; background: #FFE7E7;
border-radius: 0px 0px 0px 0px; border-radius: 0px 0px 0px 0px;
opacity: 1; opacity: 1;
padding:36upx 56upx; padding: 36upx 56upx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
text{
text {
font-size: 28upx; font-size: 28upx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
@ -124,12 +171,14 @@ page{
} }
} }
.classifyContainer{
.classifyItem{ .classifyContainer {
padding:36upx 56upx; .classifyItem {
padding: 36upx 56upx;
background-color: #fff; background-color: #fff;
margin-bottom:14upx; margin-bottom: 14upx;
.classTitle{
.classTitle {
font-size: 28upx; font-size: 28upx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
@ -137,14 +186,41 @@ page{
color: #292929; color: #292929;
} }
.priceRange{
margin-top:40upx; .priceRange {
.rangeItem{ margin-top: 40upx;
margin:13upx 0;
.rangeItem {
margin: 13upx 0;
display: flex; display: flex;
} }
::v-deep .u-input{ .fix {
display: flex;
}
.rangeInput {
width: 180rpx;
height: 70rpx;
border-radius: 4rpx;
border: 2rpx solid #DADADA;
text-align: center;
line-height: 74rpx;
margin-right: 50rpx;
text {
;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #3B3B3B;
text-align: left;
font-style: normal;
text-transform: none;
}
}
::v-deep .u-input {
// height: 64upx; // height: 64upx;
background: #FFFFFF; background: #FFFFFF;
@ -154,56 +230,64 @@ page{
text-align: center !important; text-align: center !important;
} }
.profit{
border:none !important; .profit {
border: none !important;
background: transparent !important; background: transparent !important;
::v-deep .uni-input-placeholder{ line-height: 70rpx;
::v-deep .uni-input-placeholder {
display: none; display: none;
} }
} }
} }
.rangeBtn{
.rangeBtn {
display: flex; display: flex;
margin-top:30upx; margin-top: 30upx;
border-top:1px solid #E6E6E6; border-top: 1px solid #E6E6E6;
.rangeHandle{
flex:1; .rangeHandle {
flex: 1;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-top:34rpx; margin-top: 34rpx;
.addFlag{
.addFlag {
width: 30upx; width: 30upx;
height: 30upx; height: 30upx;
background: #FF6551; background: #FF6551;
border-radius:50%; border-radius: 50%;
color:#fff; color: #fff;
line-height: 26upx; line-height: 26upx;
text-align: center; text-align: center;
opacity: 1; opacity: 1;
} }
.delBtn{
.delBtn {
width: 30upx; width: 30upx;
height: 30upx; height: 30upx;
line-height: 26upx; line-height: 26upx;
text-align: center; text-align: center;
background: #BDBDBD; background: #BDBDBD;
border-radius:50%; border-radius: 50%;
color:#fff; color: #fff;
opacity: 1; opacity: 1;
} }
text{
text {
font-size: 24upx; font-size: 24upx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 400; font-weight: 400;
color: #3B3B3B; color: #3B3B3B;
margin-left:50upx; margin-left: 50upx;
}
} }
} }
} }
} }
} }
}
</style> </style>
Loading…
Cancel
Save