Commit 3308d494 by 杨北旺

修改漏斗图显示

1 parent c7ffd792
...@@ -3673,6 +3673,11 @@ ...@@ -3673,6 +3673,11 @@
"assert-plus": "^1.0.0" "assert-plus": "^1.0.0"
} }
}, },
"dayjs": {
"version": "1.10.7",
"resolved": "https://registry.nlark.com/dayjs/download/dayjs-1.10.7.tgz",
"integrity": "sha1-LPX5Gt0oEWdIRAhmoKHSbzps5Gg="
},
"de-indent": { "de-indent": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz", "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
......
<!-- 选择商品弹窗 --> <!-- 选择商品弹窗 -->
<template> <template>
<div> <div>
<div v-if="!nodata" :id="echartId" class="chart-container"></div> <div class="chart-container flex_cc">
<div v-else class="chart-container flex_cc h19_title">暂无数据</div> <div class="wrap flex_cc">
<div class="text_box">
<p class="h13_title">发券总数:{{ chartInfo.getTotal || 0 }}(张)</p>
</div>
<div class="text_box1">
<p class="h13_title">核销总数:{{ chartInfo.usedTotal || 0 }}(张)</p>
</div>
<div class="text_box2">
<p class="h13_title">转化订单数:{{ chartInfo.upgradeTotal || 0 }}(张)</p>
</div>
<div class="text_box3">
<p class="h13_title">核销转化率:{{chartInfo.usedPer || 0}}%</p>
<p class="h13_title spc">同行平均转化率:{{chartInfo.totalUsedPer || 0}}%</p>
</div>
<div class="text_box4">
<p class="h13_title">精品升级转化率:{{chartInfo.upgradePer || 0}}%</p>
<p class="h13_title spc">同行平均转化率:{{chartInfo.totalUpgradePer || 0}}%</p>
</div>
<img src="../../assets/funnel_icon.png" />
</div>
</div>
</div> </div>
</template> </template>
...@@ -15,7 +35,16 @@ export default { ...@@ -15,7 +35,16 @@ export default {
name: '', name: '',
data() { data() {
return { return {
nodata: false nodata: false,
chartInfo: {
getTotal:0,
usedTotal:0,
upgradeTotal:0,
usedPer:0,
totalUsedPer:0,
upgradePer:0,
totalUpgradePer:0,
}
} }
}, },
...@@ -106,14 +135,65 @@ export default { ...@@ -106,14 +135,65 @@ export default {
this.nodata = true this.nodata = true
return return
} }
this.getOptions(res) res.usedPer = utils.decimal(res.usedPer,2)
res.totalUsedPer = utils.decimal(res.totalUsedPer,2)
res.upgradePer = utils.decimal(res.upgradePer,2)
res.totalUpgradePer = utils.decimal(res.totalUpgradePer,2)
this.chartInfo = res
// this.getOptions(res)
}) })
} }
} }
} }
</script> </script>
<style> <style lang="scss" scoped>
.chart-container { .chart-container {
height: 258px; height: 258px;
} }
.wrap {
width: 100%;
height: 100%;
position: relative;
.text_box {
position: absolute;
top: 70px;
left: 38px;
}
.text_box1 {
position: absolute;
top: 123px;
left: 56px;
}
.text_box2 {
position: absolute;
top: 176px;
left: 66px;
}
.text_box3 {
position: absolute;
top: 82px;
right: 15px;
> p {
line-height: 20px;
}
.spc {
font-size: 14px;
font-weight: 400;
color: #888888;
}
}
.text_box4 {
position: absolute;
top: 146px;
right: 29px;
> p {
line-height: 20px;
}
.spc {
font-size: 14px;
font-weight: 400;
color: #888888;
}
}
}
</style> </style>
<template> <template>
<div v-if="accountLevel == 4" class="rule-container"> <div v-if="accountLevel == 4" class="rule-container">
<div v-if="!nodata" class="top_wrapper"> <div v-if="nodata==1" class="top_wrapper">
<div v-if="updateTime" class="tip_line"> <div v-if="updateTime" class="tip_line">
<img class="icon" src="../../assets/notice.png" /> <img class="icon" src="../../assets/notice.png" />
<span class="h10_title">尊敬的客户,您的分账规则于 #{{ updateTime }}#已经变更,新的规则将于 #{{ effectTime }}# 生效,修改人:{{ settleRule1.updatedBy }}。</span> <span class="h10_title">尊敬的客户,您的分账规则于 #{{ updateTime }}#已经变更,新的规则将于 #{{ effectTime }}# 生效,修改人:{{ settleRule1.updatedBy }}。</span>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<rule-table :division="divisionRule1" :settle="settleRule1" :bankData="bankInfo"></rule-table> <rule-table :division="divisionRule1" :settle="settleRule1" :bankData="bankInfo"></rule-table>
</div> </div>
</div> </div>
<div v-if="!noList" class="list_wrapper"> <div v-if="noList==1" class="list_wrapper">
<div class="find_wrap"> <div class="find_wrap">
<div class="date_wrap"> <div class="date_wrap">
<el-date-picker style="width: 160px" size="mini" v-model="startDate" type="date" placeholder="选择日期"></el-date-picker> <el-date-picker style="width: 160px" size="mini" v-model="startDate" type="date" placeholder="选择日期"></el-date-picker>
...@@ -48,9 +48,9 @@ ...@@ -48,9 +48,9 @@
<img class="icon" src="../../assets/down_icon.png" /> <img class="icon" src="../../assets/down_icon.png" />
</div> </div>
</div> </div>
<div v-if="noList" class="no_data h19_title">暂无数据</div> <div v-if="noList==0" class="no_data h19_title">暂无数据</div>
</div> </div>
<div v-if="nodata && noList" class="nodata_widget"> <div v-if="nodata==0 && noList==0" class="nodata_widget">
<div :style="[{ height: nodataHeight + 'px' }]" class="wrapper"> <div :style="[{ height: nodataHeight + 'px' }]" class="wrapper">
<img src="../../assets/nodata_icon.png" /> <img src="../../assets/nodata_icon.png" />
<span class="nodata_tip_1">您暂未开通精品升级服务</span> <span class="nodata_tip_1">您暂未开通精品升级服务</span>
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="nodata && noList" class="qrcode_wrap"> <div v-if="nodata==0 && noList==0" class="qrcode_wrap">
<div class="imag_wrap"> <div class="imag_wrap">
<img src="https://img01.glsx.com.cn/weapp/resource/equity-h5-new/qrcode2.jpg" /> <img src="https://img01.glsx.com.cn/weapp/resource/equity-h5-new/qrcode2.jpg" />
<span class="h18_title">联系电话</span> <span class="h18_title">联系电话</span>
...@@ -164,8 +164,8 @@ export default { ...@@ -164,8 +164,8 @@ export default {
currentPage: 1, currentPage: 1,
computeShow: false, computeShow: false,
accountLevel: 1, accountLevel: 1,
nodata: true, nodata: 2,
noList: true, noList: 2,
nodataHeight: 460, nodataHeight: 460,
stepHeight: 288 stepHeight: 288
} }
...@@ -199,10 +199,10 @@ export default { ...@@ -199,10 +199,10 @@ export default {
this.settleRule1 = res.settleRule1 this.settleRule1 = res.settleRule1
this.settleRule2 = res.settleRule2 this.settleRule2 = res.settleRule2
if (!res.bankInfo && !res.divisionRule1 && !res.divisionRule2 && !res.settleRule1 && !res.settleRule2) { if (!res.bankInfo && !res.divisionRule1 && !res.divisionRule2 && !res.settleRule1 && !res.settleRule2) {
this.nodata = true this.nodata = 0
return return
} }
this.nodata = false this.nodata = 1
// 广播时间比较: // 广播时间比较:
if (res.divisionRule2 && res.settleRule2) { if (res.divisionRule2 && res.settleRule2) {
let updatedDateTemp1 = res.divisionRule2.updatedDate let updatedDateTemp1 = res.divisionRule2.updatedDate
...@@ -240,10 +240,10 @@ export default { ...@@ -240,10 +240,10 @@ export default {
return item return item
}) })
this.noteList[0].show = true this.noteList[0].show = true
this.noList = false this.noList = 1
} else { } else {
this.noteList = [] this.noteList = []
this.noList = true this.noList = 0
} }
}) })
}, },
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</div> </div>
<div class="table-wrapper"> <div class="table-wrapper">
<div class="top_line flex_scb"> <div class="top_line flex_scb">
<span :style="[{'font-size':todayName.length>20?'12px':''}]" class="h7_title">{{ todayName }},各门店明细</span> <span :style="[{ 'font-size': todayName.length > 20 ? '12px' : '' }]" class="h7_title">{{ todayName }},各门店明细</span>
<div class="right_wrap flex_scb"> <div class="right_wrap flex_scb">
<el-radio size="mini" v-model="orderByType" :label="1" @change="changeType(1)"> <el-radio size="mini" v-model="orderByType" :label="1" @change="changeType(1)">
<span class="h15_title">按分账金额排序</span> <span class="h15_title">按分账金额排序</span>
...@@ -20,7 +20,10 @@ ...@@ -20,7 +20,10 @@
<GLTable ref="table" :hasPage="false" :hasNum="false" :tableData="productValueInfo" :tableParams="tableParams"></GLTable> <GLTable ref="table" :hasPage="false" :hasNum="false" :tableData="productValueInfo" :tableParams="tableParams"></GLTable>
</div> </div>
</div> </div>
<div v-if="!show" class="openBtn h18_title" @click="showContainer">展开详情</div> <div v-if="!show" class="openBtn h18_title" @click="showContainer">
<span>展开详情</span>
<img src="../../assets/down_icon.png" />
</div>
</div> </div>
</template> </template>
...@@ -34,10 +37,10 @@ export default { ...@@ -34,10 +37,10 @@ export default {
components: { components: {
'line-chart': line 'line-chart': line
}, },
props:{ props: {
show:{ show: {
type:Boolean, type: Boolean,
default:false default: false
} }
}, },
data() { data() {
...@@ -62,7 +65,7 @@ export default { ...@@ -62,7 +65,7 @@ export default {
todayName: '', todayName: '',
orderByType: 1, orderByType: 1,
productValueInfo: [], productValueInfo: [],
productList: [], productList: []
} }
}, },
mounted() { mounted() {
...@@ -70,21 +73,21 @@ export default { ...@@ -70,21 +73,21 @@ export default {
this.today = utils.dateFormat(new Date()) this.today = utils.dateFormat(new Date())
const { session } = this.$globalState const { session } = this.$globalState
if (session.accountLevel != 4) { if (session.accountLevel != 4) {
this.orderDataInfoOfJT(this.today,this.today) this.orderDataInfoOfJT(this.today, this.today)
} }
}, },
methods: { methods: {
showContainer(){ showContainer() {
this.show = true this.show = true
this.$emit('showRanking',true) this.$emit('showRanking', true)
}, },
// 切换radio // 切换radio
changeType(type) { changeType(type) {
this.orderByType = type this.orderByType = type
this.orderDataInfoOfJT(this.curStartTime,this.curEndTime) this.orderDataInfoOfJT(this.curStartTime, this.curEndTime)
}, },
// 集团统计 // 集团统计
orderDataInfoOfJT(start,end) { orderDataInfoOfJT(start, end) {
let method = orderTotalOfJT() let method = orderTotalOfJT()
let para = { let para = {
routerMethod: method, routerMethod: method,
...@@ -94,8 +97,8 @@ export default { ...@@ -94,8 +97,8 @@ export default {
orderByType: this.orderByType //1 分账 2分润 orderByType: this.orderByType //1 分账 2分润
} }
converterApi(para).then(res => { converterApi(para).then(res => {
this.productValueInfo = res.map(item=>{ this.productValueInfo = res.map(item => {
item.money = `${item.profitMoney}/${item.divisionMoney}` item.money = `¥${item.profitMoney} / ¥${item.divisionMoney}`
return item return item
}) })
this.curStartTime = start this.curStartTime = start
...@@ -103,9 +106,9 @@ export default { ...@@ -103,9 +106,9 @@ export default {
}) })
}, },
// 更换时间折线图 // 更换时间折线图
changeTimeForLine(start,end){ changeTimeForLine(start, end) {
this.$refs.myline.couponsChartData(start,end) this.$refs.myline.couponsChartData(start, end)
this.todayName = `${utils.dateFormat(start,'YYYY年MM月DD日')}至${utils.dateFormat(end,'YYYY年MM月DD日')}` this.todayName = `${utils.dateFormat(start, 'YYYY年MM月DD日')}至${utils.dateFormat(end, 'YYYY年MM月DD日')}`
} }
} }
} }
...@@ -153,6 +156,13 @@ export default { ...@@ -153,6 +156,13 @@ export default {
transform: translate(-50%, 0); transform: translate(-50%, 0);
bottom: 10px; bottom: 10px;
cursor: pointer; cursor: pointer;
display: flex;
align-items: center;
> img {
margin-left: 5px;
width: 10px;
height: 9px;
}
} }
.bloc-chart-container /deep/ .el-table__body-wrapper { .bloc-chart-container /deep/ .el-table__body-wrapper {
height: 270px; height: 270px;
......
...@@ -56,7 +56,8 @@ ...@@ -56,7 +56,8 @@
<div class="mid_line"></div> <div class="mid_line"></div>
<div class="showMoreBtn h7_title flex_cc" @click="toChangeShowMoreBtn(showMore)"> <div class="showMoreBtn h7_title flex_cc" @click="toChangeShowMoreBtn(showMore)">
<span>{{ showMore ? '收缩详情' : '查看详情' }}</span> <span>{{ showMore ? '收缩详情' : '查看详情' }}</span>
<img class="icon" src="../../assets/down_icon.png" /> <img v-if="showMore" class="icon" src="../../assets/updown_icon.png" />
<img v-else class="icon" src="../../assets/down_icon.png" />
</div> </div>
</div> </div>
<template v-if="accountLevel != 4"> <template v-if="accountLevel != 4">
......
...@@ -34,7 +34,10 @@ ...@@ -34,7 +34,10 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div class="openBtn h18_title" @click="showContainer">收缩详情</div> <div class="openBtn h18_title" @click="showContainer">
<span>收缩详情</span>
<img src="../../assets/updown_icon.png" />
</div>
</div> </div>
</template> </template>
...@@ -123,6 +126,11 @@ export default { ...@@ -123,6 +126,11 @@ export default {
transform: translate(-50%, 0); transform: translate(-50%, 0);
bottom: 10px; bottom: 10px;
cursor: pointer; cursor: pointer;
> img {
margin-left: 5px;
width: 10px;
height: 9px;
}
} }
.page_title { .page_title {
padding: 15px 20px 10px 20px; padding: 15px 20px 10px 20px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!