Browse Source

feat(market/data): 新增销售分析和销售排名功能

- 添加销售分析图表,展示成交率、试听率和跟进率
- 实现销售排名列表,显示前四名销售人员的业绩
-增加标签切换功能,用户可在销售分析和销售排名之间切换
- 优化页面布局和样式,提升用户体验
master
liutong 1 year ago
parent
commit
8a5be11bfe
  1. 259
      pages/market/data/index.vue

259
pages/market/data/index.vue

@ -59,29 +59,81 @@
</view>
<view class="main_section">
<view class="section_box">
<view class="item">
<view>已签客户</view>
<view>23</view>
<view class="tag_section">
<view :class="['left',tagType=='1'?'select':'']" @click="changeTag('1')">销售分析</view>
<view :class="['right',tagType=='2'?'select':'']" @click="changeTag('2')">销售排名</view>
</view>
<!-- 销售分析-->
<view class="section_box_1" v-if="tagType=='1'">
<view class="left">
<qiun-data-charts
type="funnel"
:opts="opts_2"
:chartData="chartData_2"
/>
</view>
<view class="right">
<view class="item">
<view class="title" style="color: #12E7E8;">
成交率<text>(93.77%)</text>
</view>
<view class="title" style="color: #12E7E8;">
11239<text></text>
</view>
</view>
<view class="item" @click="openViewFirmInfo()">
<view>企业信息</view>
<view></view>
<view class="item">
<view class="title" style="color: #4DA3FF;">
试听率<text>(93.77%)</text>
</view>
<view class="title" style="color: #4DA3FF;">
11239<text></text>
</view>
</view>
<view class="item">
<view class="title" style="color: #FFCB31;">
跟进率<text>(93.77%)</text>
</view>
<view class="title" style="color: #FFCB31;">
11239<text></text>
</view>
</view>
</view>
</view>
<view class="section_box">
<view class="item" @click="openViewFeedback()">
<view>意见反馈</view>
<view></view>
<!-- 销售排名-->
<view class="section_box_2" v-else>
<view class="itme">
<view class="title">01 李小刚</view>
<view class="money">100000</view>
<view class="plan">
<fui-progress :percent="80" height="15" radius="15" background="#e4e4e4" activeColor="#4bced0"></fui-progress>
</view>
</view>
<view class="item" @click="openViewSetUp()">
<view>设置</view>
<view></view>
<view class="itme">
<view class="title">02 张刚</view>
<view class="money">100000</view>
<view class="plan">
<fui-progress :percent="80" height="15" radius="15" background="#e4e4e4" activeColor="#4bced0"></fui-progress>
</view>
</view>
<view class="itme">
<view class="title">03 李华</view>
<view class="money">100000</view>
<view class="plan">
<fui-progress :percent="80" height="15" radius="15" background="#e4e4e4" activeColor="#4bced0"></fui-progress>
</view>
</view>
<view class="itme">
<view class="title">04 王明</view>
<view class="money">100000</view>
<view class="plan">
<fui-progress :percent="80" height="15" radius="15" background="#e4e4e4" activeColor="#4bced0"></fui-progress>
</view>
</view>
</view>
</view>
@ -91,6 +143,8 @@
</view>
</template>
<script>
import user from '@/api/user.js';
import AQTabber from "@/components/AQ/AQTabber.vue"
@ -149,6 +203,44 @@ export default {
//
progress: 50, // 50%
box_2_show: false,//|true=,false=
tagType:'1',//1=,2=
//
chartData_2: {},
opts_2: {
//
// color: ["#12E7E8","#4DA3FF","#FFCB31"],
//
padding: [0,0,0,0],
// false
enableScroll: false,
legend:{
show:true//
},
//
extra: {
//
funnel: {
//
activeOpacity: 0.3,
//
activeWidth: 10,
//
border: true,
//
borderWidth: 2,
//
borderColor: "#FFFFFF",
//
fillOpacity: 1,
// left
labelAlign: "right",
// pyramid
type: "pyramid"
}
}
}
}
},
onLoad() {
@ -156,7 +248,8 @@ export default {
},
methods: {
async init(){
let res = {
//
let chartData_1 = {
series: [
{
data: [
@ -179,7 +272,47 @@ export default {
}
]
};
this.chartData = JSON.parse(JSON.stringify(res));
this.chartData = JSON.parse(JSON.stringify(chartData_1));
//
let chartDataB = {
series: [
{
data: [
{
"name": "跟进中", //
"centerText": "70", //
"value": 70, // 50
// "labelText":''
"labelShow":false,
"color": "#FFCB31", //
},
{
"name": "试听",
"centerText": "30",
"value": 30,
// "labelText":""
"labelShow":false,
"color": "#4DA3FF", //
},
{
"name": "已成交",
"centerText": "10",
"value": 10,
// "labelText":""
"labelShow":false,
"color": "#12E7E8", //
}
]
}
]
};
this.chartData_2 = JSON.parse(JSON.stringify(chartDataB));
},
//tag
changeTag(type){
this.tagType = type
},
//
@ -372,26 +505,92 @@ export default {
flex-direction: column;
gap: 22rpx;
.section_box {
background: #fff;
border-radius: 16rpx;
padding: 6rpx 24rpx;
.tag_section{
display: flex;
flex-direction: column;
.item{
padding: 24rpx 78rpx;
border-top: 1px solid #F2F2F2;
font-size: 28rpx;
display: flex;
justify-content: space-between;
justify-content: center;
align-items: center;
view{
border: 1px solid #969696;
width: 258rpx;
height: 72rpx;
line-height: 72rpx;
background-color: #292929;
text-align: center;
font-size: 26rpx;
color: #fff;
}
.item:nth-child(1){
border-top: 0;
.left{
border-radius: 22rpx 0rpx 0rpx 22rpx;
}
.right{
border-radius: 0rpx 22rpx 22rpx 0rpx;
}
.select{
background-color: #fff;
color: #29D3B4;
}
}
.section_box_1{
margin-top: 38rpx;
padding: 66rpx 14rpx;
border-radius: 12rpx;
background-color: #434544FF;
color: #d9dada;
font-size: 26rpx;
text-align: center;
height: 600rpx;
display: flex;
justify-content: space-between;
align-items: center;
.left{
width: 70%;
}
.right{
display: flex;
flex-direction: column;
gap: 20rpx;
.item{
display: flex;
flex-direction: column;
gap: 10rpx;
.title{
font-size: 26rpx;
text-align: left;
text{
margin-left: 5rpx;
color: #d9dada;
}
}
}
}
}
.section_box_2{
color: #fff;
margin-top: 38rpx;
padding: 20rpx 42rpx;
background-color: #434544;
border-radius: 12rpx;
font-size: 26rpx;
display: flex;
flex-direction: column;
gap: 20rpx;
.itme{
display: flex;
flex-direction: column;
gap: 15rpx;
.money{
display: flex;
justify-content: flex-end;
}
}
}
}

Loading…
Cancel
Save