Commit 3bf0912a by 杨北旺

完成接口联调,剩余部分交互

1 parent c7863868
......@@ -5133,7 +5133,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
......@@ -5154,12 +5155,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
......@@ -5174,17 +5177,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
......@@ -5301,7 +5307,8 @@
"inherits": {
"version": "2.0.4",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
......@@ -5313,6 +5320,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
......@@ -5327,6 +5335,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
......@@ -5334,12 +5343,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.9.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
......@@ -5358,6 +5369,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
......@@ -5447,7 +5459,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
......@@ -5459,6 +5472,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -5544,7 +5558,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -5580,6 +5595,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -5599,6 +5615,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......@@ -5642,12 +5659,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
......
......@@ -43,7 +43,47 @@ const findCoupons = () => {
}
// 精品礼券升级订单查询
const findupGradeOrder = () => {
let method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.page'
let method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.page'
return method
}
// 查看礼券
const checkCoupons = () => {
let method = 'dj.api.smartcarlife.merchant.coupon.page'
return method
}
// 我的分账
const mydivision = () => {
let method = 'dj.smartcarlife.api.shop.order.division.page'
return method
}
// 精品礼券导出
const exportCoupons = () => {
let method = 'dj.api.life.customer.coupon.exportExcelListFor4S'
return method
}
// 精品礼券升级订单导出
const exportUpgrade = () => {
let method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.export'
return method
}
// 我的分账导出
const exportMydivision = () => {
let method = 'dj.smartcarlife.api.shop.order.division.export'
return method
}
// 获取发券人/转化人列表
const getEmployName = () => {
let method = 'dj.api.life.customer.coupon.distinctColum'
return method
}
// 查看明细
const checkDetail = () => {
let method = 'dj.api.smartcarlife.goodsOrder.detail'
return method
}
// 集团--订单统计
const orderTotalOfJT = () => {
let method = 'dj.api.smartcarlife.orderReport.totalByMerchant'
return method
}
export {
......@@ -56,5 +96,13 @@ export {
couponsTotalByDay,
moneyTotal,
findCoupons,
findupGradeOrder
findupGradeOrder,
checkCoupons,
mydivision,
exportMydivision,
exportUpgrade,
exportCoupons,
getEmployName,
checkDetail,
orderTotalOfJT
}
\ No newline at end of file
......@@ -119,6 +119,18 @@
color: #333333;
}
.h19_title {
font-size: 14px;
font-weight: 500;
color: #666666;
}
.h20_title {
font-size: 12px;
font-weight: 400;
color: #666666;
}
.flex_scb {
display: flex;
align-items: center;
......
<template>
<div class="my-drop-menu">
<div class="left_widget label flex_cc">
<el-dropdown trigger="click">
<el-dropdown trigger="click" @command="onChangeValue">
<div class="h13_title">
{{ leftName }}
<i class="el-icon-caret-bottom el-icon-caret-top"></i>
</div>
<el-dropdown-menu slot="dropdown" class="drop_item">
<el-dropdown-item>黄金糕</el-dropdown-item>
<el-dropdown-item>狮子头</el-dropdown-item>
<el-dropdown-item>螺蛳粉</el-dropdown-item>
<el-dropdown-item v-for="item in options" :key="item.value" :command="item">{{item.label}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
......@@ -29,12 +27,18 @@ export default {
props: {
leftName: {
type: String,
default: '下拉菜单'
}
default: '请选择'
},
options:Array
},
mounted() {},
methods: {}
methods: {
onChangeValue(e){
this.leftName = e.label
this.$emit('getValue',e.value)
},
}
}
</script>
<style lang="scss" scoped>
......
......@@ -105,7 +105,7 @@ export default {
},
itemStyle: {
normal: {
color: '#5850FF'
color: '#B3B3FF'
}
},
data: this.getTotal
......@@ -120,7 +120,7 @@ export default {
barWidth: 6,
itemStyle: {
normal: {
color: '#FF6D00'
color: '#7C7CFF'
}
},
data: this.usedTotal
......@@ -135,7 +135,7 @@ export default {
},
itemStyle: {
normal: {
color: '#FDB757'
color: '#5850FF'
}
},
data: this.upgradeTotal
......
<!-- 选择商品弹窗 -->
<template>
<div :id="echartId" class="chart-container"></div>
<div>
<div v-if="!nodata" :id="echartId" class="chart-container"></div>
<div v-else class="chart-container flex_cc h19_title">暂无数据</div>
</div>
</template>
<script>
......@@ -11,7 +14,9 @@ import utils from '../../util/util'
export default {
name: '',
data() {
return {}
return {
nodata: false
}
},
props: {
......@@ -32,7 +37,7 @@ export default {
color: ['#5850FF', '#9191FF', '#CBCBFF'],
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c}(张)'
formatter: '{a} <br/>{b}'
},
series: [
{
......@@ -52,7 +57,7 @@ export default {
label: {
show: true,
position: 'left',
formatter: '{b}: {c}(张)',
// formatter: '{b}: {c}(张)',
textStyle: {
fontSize: 14
},
......@@ -71,9 +76,9 @@ export default {
height: 37
},
data: [
{ value: res.getTotal, name: `发券总数` },
{ value: res.usedTotal, name: `核销总数` },
{ value: res.upgradeTotal, name: `转化订单数` }
{ value: res.getTotal || 0, name: `发券总数:${res.getTotal || 0}(张)` },
{ value: res.usedTotal || 0, name: `核销总数:${res.usedTotal || 0}(张)` },
{ value: res.upgradeTotal || 0, name: `转化订单数:${res.upgradeTotal || 0}(笔)` }
]
}
]
......@@ -81,14 +86,15 @@ export default {
option && myChart.setOption(option)
},
// 初始化时间
initTIme(){
initTIme() {
let openInfo = JSON.parse(localStorage.getItem('openInfo'))
let startDate = utils.dateFormat(openInfo.openDate)
// let startDate = utils.dateFormat(openInfo.openDate)
let startDate = '2020-01-01'
let endDate = utils.dateFormat(new Date())
this.couponsChartData(startDate,endDate)
this.couponsChartData(startDate, endDate)
},
// 券统计
couponsChartData(startDate,endDate) {
couponsChartData(startDate, endDate) {
let method = couponsTotal()
let para = {
routerMethod: method,
......@@ -96,6 +102,10 @@ export default {
endDate
}
converterApi(para).then(res => {
if (!res.getTotal && !res.usedTotal && !res.upgradeTotal) {
this.nodata = true
return
}
this.getOptions(res)
})
}
......
......@@ -108,7 +108,6 @@ export default {
reportType:2
}
converterApi(para).then(res => {
this.getOptions(res)
let arr = res || []
if(arr.length){
arr.forEach(item=>{
......@@ -116,6 +115,7 @@ export default {
this.divisionMoney.push(item.divisionMoney)
this.profitMoney.push(item.profitMoney)
})
this.getOptions()
}
})
}
......
import Vue from 'vue'
import { Message, Button, ButtonGroup, Form, FormItem, Input, Radio, RadioGroup, Checkbox, CheckboxGroup, Switch, Select, Option, TimePicker, Col, DatePicker, Tree, Card, Table, TableColumn, Pagination, Loading, Dialog, MessageBox, Upload, Tooltip, Tabs, TabPane, Container, Progress, Timeline, TimelineItem, Dropdown, DropdownMenu } from 'element-ui'
import { Message, Button, ButtonGroup, Form, FormItem, Input, Radio, RadioGroup, Checkbox, CheckboxGroup, Switch, Select, Option, TimePicker, Col, DatePicker, Tree, Card, Table, TableColumn, Pagination, Loading, Dialog, MessageBox, Upload, Tooltip, Tabs, TabPane, Container, Progress, Timeline, TimelineItem, Dropdown, DropdownMenu, Rate } from 'element-ui'
Vue.use(Button)
Vue.use(ButtonGroup)
Vue.use(Form)
......@@ -31,5 +31,6 @@ Vue.use(Timeline)
Vue.use(TimelineItem)
Vue.use(Dropdown)
Vue.use(DropdownMenu)
Vue.use(Rate)
export const message = Message
export const messageBox = MessageBox
\ No newline at end of file
......@@ -4,7 +4,8 @@ import { fetchConfig } from '@/config'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import render from './render'
import 'glsx-components/dist/glsx-components.css'
// import 'glsx-components/dist/glsx-components.css'
import 'glsx-components/src/theme/theme.scss'
let routes = []
let router = null
let instance = null
......
......@@ -22,4 +22,8 @@ function appendZero(int) {
return int
}
}
util.decimal = function(num, fixed) {
let pow = Math.pow(10, fixed)
return Math.round(num * pow) / pow
}
export default util
\ No newline at end of file
<template>
<div class="rule-container">
<div class="top_wrapper">
<div v-if="accountLevel==4" class="rule-container">
<div v-if="!nodata" class="top_wrapper">
<div v-if="updateTime" class="tip_line">
<img class="icon" src="../../assets/notice.png" />
<span class="h10_title">尊敬的客户,您的分账规则于 #{{ updateTime }}#已经变更,新的规则将于 #{{ effectTime }}# 生效,修改人:{{ settleRule1.updatedBy }}。</span>
......@@ -48,6 +48,7 @@
<img class="icon" src="../../assets/down_icon.png" />
</div>
</div>
<div v-if="noList" class="no_data h19_title">暂无数据</div>
</div>
<el-dialog :visible.sync="computeShow" width="50%" :before-close="handleClose">
<div slot="title" class="dialogTitle">分润计算说明</div>
......@@ -118,6 +119,7 @@ export default {
data() {
return {
startDate: '',
endDate: '',
settleRule1: '',
updateTime: null,
effectTime: null,
......@@ -127,22 +129,29 @@ export default {
bankInfo: null,
pageSize: 10,
currentPage: 1,
computeShow: false
computeShow: false,
accountLevel:1,
nodata:false,
noList:false
}
},
mounted() {
// const { session } = this.$globalState
// let merchantId = session.merchantId
this.getRulesDataList()
this.getRuleNote()
const { session } = this.$globalState
let merchantId = session.merchantId
this.merchantId = merchantId
this.accountLevel = session.accountLevel
if (session.accountLevel == 4) {
this.getRulesDataList(merchantId)
this.getRuleNote(merchantId)
}
},
methods: {
// 获取分账规则
getRulesDataList() {
getRulesDataList(merchantId) {
let method = getRulesData()
let para = {
let para = {//44209532
routerMethod: method,
merchantId: 44209532
merchantId
}
converterApi(para).then(res => {
this.bankInfo = res.bankInfo
......@@ -150,6 +159,10 @@ export default {
this.divisionRule2 = res.divisionRule2
this.settleRule1 = res.settleRule1
this.settleRule2 = res.settleRule2
if(!res.bankInfo&&!res.divisionRule1&&!res.divisionRule2&&!res.settleRule1&&!res.settleRule2){
this.nodata = true
return
}
// 广播时间比较:
if (res.divisionRule2 && res.settleRule2) {
let updatedDateTemp1 = res.divisionRule2.updatedDate
......@@ -166,13 +179,19 @@ export default {
})
},
// 获取分账记录
getRuleNote() {
getRuleNote(merchantId) {
let method = getRulesListData()
let para = {
routerMethod: method,
currentPage: this.currentPage,
pageSize: this.pageSize,
merchantId: 44209532
merchantId
}
if (this.startDate) {
para.beginDateStr = this.startDate
}
if (this.endDate) {
para.endDateStr = this.endDate
}
converterApi(para).then(res => {
if (res.list.length) {
......@@ -181,8 +200,10 @@ export default {
return item
})
this.noteList[0].show = true
this.noList = false
} else {
this.noteList = []
this.noList = true
}
})
},
......@@ -191,7 +212,9 @@ export default {
this.noteList[index].show = !item
},
// 查询
toFindNote() {},
toFindNote() {
this.getRuleNote(this.merchantId)
},
// 关闭弹框
handleClose() {
this.computeShow = false
......@@ -390,7 +413,7 @@ export default {
border: 1px solid #ededed;
box-sizing: border-box;
padding: 15px 20px;
>p{
> p {
margin-bottom: 5px;
}
.title1 {
......@@ -409,4 +432,8 @@ export default {
}
}
}
.no_data{
text-align: center;
padding: 20px 0;
}
</style>
\ No newline at end of file
......@@ -2,34 +2,44 @@
<div class="bloc-chart-container">
<div class="mid_line"></div>
<div class="chart_wrapper">
<line-chart echartId="myline"></line-chart>
<line-chart ref="myline" echartId="myline"></line-chart>
</div>
<div class="table-wrapper">
<div class="top_line flex_scb">
<span class="h7_title">2021年8月7日,各门店明细</span>
<span :style="[{'font-size':todayName.length>20?'12px':''}]" class="h7_title">{{ todayName }},各门店明细</span>
<div class="right_wrap flex_scb">
<el-radio size="mini" v-model="radio" label="1">
<el-radio size="mini" v-model="orderByType" :label="1" @change="changeType(1)">
<span class="h15_title">按分账金额排序</span>
</el-radio>
<el-radio size="mini" v-model="radio" label="2">
<el-radio size="mini" v-model="orderByType" :label="2" @change="changeType(2)">
<span class="h15_title">按分润金额排序</span>
</el-radio>
</div>
</div>
<div class="table_widget">
<GLTable ref="table" :hasPage="false" :hasNum="false" :tableData="tableData" :tableParams="tableParams"></GLTable>
<GLTable ref="table" :hasPage="false" :hasNum="false" :tableData="productValueInfo" :tableParams="tableParams"></GLTable>
</div>
</div>
<div v-if="!show" class="openBtn h18_title" @click="showContainer">展开详情</div>
</div>
</template>
<script>
import line from '../../components/service-echart/line.vue'
import { orderTotalOfJT } from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
import utils from '../../util/util'
export default {
name: '',
components: {
'line-chart': line
},
props:{
show:{
type:Boolean,
default:false
}
},
data() {
return {
radio: 0,
......@@ -47,13 +57,57 @@ export default {
prop: 'money'
}
]
}
},
//集团
todayName: '',
orderByType: 1,
productValueInfo: [],
productList: [],
}
},
mounted() {
this.todayName = utils.dateFormat(new Date(), 'YYYY年MM月DD日')
this.today = utils.dateFormat(new Date())
const { session } = this.$globalState
if (session.accountLevel != 4) {
this.orderDataInfoOfJT(this.today,this.today)
}
},
methods: {}
methods: {
showContainer(){
this.show = true
this.$emit('showRanking',true)
},
// 切换radio
changeType(type) {
this.orderByType = type
this.orderDataInfoOfJT(this.curStartTime,this.curEndTime)
},
// 集团统计
orderDataInfoOfJT(start,end) {
let method = orderTotalOfJT()
let para = {
routerMethod: method,
beginDateStr: start,
endDateStr: end,
reportType: 2,
orderByType: this.orderByType //1 分账 2分润
}
converterApi(para).then(res => {
this.productValueInfo = res.map(item=>{
item.money = `${item.profitMoney}/${item.divisionMoney}`
return item
})
this.curStartTime = start
this.curEndTime = end
})
},
// 更换时间折线图
changeTimeForLine(start,end){
this.$refs.myline.couponsChartData(start,end)
this.todayName = `${utils.dateFormat(start,'YYYY年MM月DD日')}至${utils.dateFormat(end,'YYYY年MM月DD日')}`
}
}
}
</script>
<style lang="scss" scoped>
......@@ -93,7 +147,14 @@ export default {
}
}
}
.bloc-chart-container /deep/ .el-table__body-wrapper{
.openBtn {
position: absolute;
left: 50%;
transform: translate(-50%, 0);
bottom: 10px;
cursor: pointer;
}
.bloc-chart-container /deep/ .el-table__body-wrapper {
height: 270px;
overflow-y: scroll;
}
......
<template>
<div class="guest-container">
<div v-if="accountLevel == 4" class="guest-container">
<div class="top_tip_title">
<span class="h6_title">客户评价使用场景</span>
<div class="toNext_widget">
......@@ -14,15 +14,15 @@
<div class="box_1 flex-cc">
<span class="h7_title">(累计)评价客户数</span>
<div class="h8_title">
<span>{{messageData.commentCount}}</span>
<span>{{ messageData.commentCount || 0 }}</span>
<span style="margin-left: 5px" class="h7_title">人</span>
</div>
<span class="h9_title">(累计)施工完成客户数:{{messageData.constructedCount}}</span>
<span class="h9_title">(累计)施工完成客户数:{{ messageData.constructedCount || 0 }}</span>
</div>
<div class="box_1 flex-cc">
<span class="h7_title">(累计)好评客户数</span>
<div class="h8_title">
<span>{{messageData.goodCommentCount}}</span>
<span>{{ messageData.goodCommentCount || 0 }}</span>
<span style="margin-left: 5px" class="h7_title">人</span>
</div>
<span style="height: 20px" class="h9_title"></span>
......@@ -55,31 +55,35 @@
<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/guest_content.png" />
</div>
</div>
<div style="height:20px"></div>
<div style="height: 20px"></div>
</div>
</template>
<script>
import {guestComTotal} from '../../api/modules/rules'
import { guestComTotal } from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
export default {
name: '',
data() {
return {
messageData:{}
messageData: {},
accountLevel: 4
}
},
mounted() {
created() {
const { session } = this.$globalState
this.accountLevel = session.accountLevel
this.getCompentData()
},
mounted() {},
methods: {
// 获取客户评价
getCompentData(){
getCompentData() {
let method = guestComTotal()
let para = {
routerMethod:method
routerMethod: method
}
converterApi(para).then(res=>{
converterApi(para).then(res => {
this.messageData = res
})
}
......@@ -89,7 +93,7 @@ export default {
<style lang="scss" scoped>
.guest-container {
width: 100%;
// height: calc(100% - 17px);
// height: calc(100% - 17px);
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
margin-top: 17px;
......@@ -168,8 +172,8 @@ export default {
flex-direction: column;
align-items: center;
justify-content: center;
>span{
margin-bottom: 10px;
> span {
margin-bottom: 10px;
}
}
}
......
......@@ -17,7 +17,7 @@
<div class="line_icon_text">
<div class="icon_num">1</div>
<div class="text">一键转发您门店的精品礼券</div>
<img class="icon" src="../../assets/go_icon.png">
<!-- <img class="icon" src="../../assets/go_icon.png" /> -->
</div>
</div>
<div class="box_wrap margin_2">
......@@ -57,24 +57,24 @@
<div v-if="count == 1" class="text_line_widget margin_4">
<div class="h5_title">
2020年6月份累计收益:
<span class="price">5344</span>
<span class="price">53400</span>
元
</div>
<div class="h5_title">
2020年度累计收益约:
<span class="price">10万</span>
<span class="price">65万</span>
元
</div>
</div>
<div v-if="count == 2" class="text_line_widget margin_4">
<div class="h5_title">
2020年集团累计收益约:
<span class="price">5344</span>
<span class="price">53400</span>
元
</div>
<div class="h5_title">
平均单店收益约:
<span class="price">10万</span>
<span class="price">81万</span>
元
</div>
</div>
......@@ -103,7 +103,17 @@
<el-dialog :visible.sync="videoShow" width="50%" :before-close="handleClose">
<video v-if="videoShow" width="100%" height="100%" controls src="https://img02.glsx.com.cn/scrm/video/pre_video.mp4"></video>
</el-dialog>
<!-- <div class="qrcode_wrap"></div> -->
<div class="qrcode_wrap">
<div class="imag_wrap">
<img src="https://img01.glsx.com.cn/weapp/resource/equity-h5-new/qrcode2.jpg" />
<span class="h18_title">联系电话</span>
<span class="h18_title">189 0000 1234</span>
</div>
<div class="qr_text_wrap flex_cc">
<img src="../../assets/contact_icon.png">
<div class="contact_text">联系我们</div>
</div>
</div>
</div>
</template>
......@@ -114,8 +124,8 @@ export default {
return {
tableHeader1: ['6月新增销量', '转化率', '转化量', '平均客单价', '增值产值', '分店分润'],
tableHeader2: ['门店年度新车销量', '年度转化率', '平均客单价', '门店年度产值', '集团年度产值'],
tableTD1: [100, 50, 20, 30, 40, 60],
tableTD2: [100, 50, 20, 30, 40],
tableTD1: [100, '52%', 52, 2283, 116716, 23400],
tableTD2: [960, '63%', 1350, 816480, 22861440],
videoShow: false
}
},
......@@ -202,10 +212,10 @@ export default {
color: #3a3a3a;
margin: 0 5px;
}
.icon{
width: 16px;
height: 16px;
cursor: pointer;
.icon {
width: 16px;
height: 16px;
cursor: pointer;
}
}
}
......@@ -295,7 +305,48 @@ export default {
right: 0;
bottom: 182px;
width: 201px;
height: 201px;
// height: 201px;
box-sizing: border-box;
padding-top: 10px;
padding-bottom: 12px;
background: #ffffff;
display: flex;
cursor:pointer;
.imag_wrap {
display: flex;
flex-direction: column;
align-items: center;
> img {
width: 124px;
height: 124px;
}
>span{
line-height: 20px;
}
}
.qr_text_wrap {
position: absolute;
top: 0;
right: 20px;
bottom: 0;
width: 52px;
// min-height: 100;
background: #5850ff;
box-shadow: 0px 3px 6px -4px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 9px 28px 8px rgba(0, 0, 0, 0.05);
border-radius: 4px;
flex-direction: column;
>img{
width: 20px;
height: 20px;
margin-bottom: 7px;
}
.contact_text{
width: 14px;
font-size: 14px;
font-weight: 400;
color: #FFFFFF;
line-height: 20px;
}
}
}
</style>
......@@ -54,11 +54,11 @@
</div>
</div>
<template v-if="accountLevel != 4">
<bloc-con></bloc-con>
<bloc-con ref="mybloc" :show="openRankFlag" @showRanking="toOpenRanking"></bloc-con>
</template>
</div>
<template v-if="accountLevel != 4">
<ranking></ranking>
<ranking :show="openRankFlag" @closeRank="toCloseRanking"></ranking>
</template>
<div v-if="showMore" class="box_bg_wrap mini_margin">
<div class="tab_wrap">
......@@ -68,14 +68,24 @@
</div>
</template>
</div>
<template v-if="curTabIndex == 0">
<coupons-order></coupons-order>
</template>
<template v-if="curTabIndex == 1">
<upgrade-order></upgrade-order>
<template v-if="accountLevel == 4">
<template v-if="curTabIndex == 0">
<coupons-order></coupons-order>
</template>
<template v-if="curTabIndex == 1">
<upgrade-order></upgrade-order>
</template>
<template v-if="curTabIndex == 2">
<my-fashionable-order></my-fashionable-order>
</template>
</template>
<template v-if="curTabIndex == 2">
<my-fashionable-order></my-fashionable-order>
<template v-if="accountLevel != 4">
<template v-if="curTabIndex == 0">
<upgrade-order></upgrade-order>
</template>
<template v-if="curTabIndex == 1">
<my-fashionable-order></my-fashionable-order>
</template>
</template>
</div>
</div>
......@@ -124,20 +134,45 @@ export default {
//图表时间
chartStartDate: '',
chartEndDate: '',
openRankFlag: false
}
},
created() {
const { session } = this.$globalState
this.accountLevel = session.accountLevel
if (session.accountLevel != 4) {
this.tabList = ['精品升级订单', '我的分账']
}
},
mounted() {
this.judgeOpen()
},
methods: {
toFindChart(){
let type = this.dateType
if(type=='date'){//按天
this.$refs.myFunnel.couponsChartData(this.chartStartDate,this.chartEndDate)
}else{//按月
let start = this.chartStartDate+'-01'
let end = this.chartEndDate+'-01'
this.$refs.myFunnel.couponsChartData(start,end)
toOpenRanking(e) {
this.openRankFlag = e
},
toCloseRanking(e) {
this.openRankFlag = e
},
toFindChart() {
let type = this.dateType
if (type == 'date') {
//按天
// 漏斗图
this.$refs.myFunnel.couponsChartData(this.chartStartDate, this.chartEndDate)
// 集团折线图+列表
this.$refs.mybloc.changeTimeForLine(this.chartStartDate,this.chartEndDate)
this.$refs.mybloc.orderDataInfoOfJT(this.chartStartDate,this.chartEndDate)
} else {
//按月
let start = this.chartStartDate
let end = this.chartEndDate
// 漏斗图
this.$refs.myFunnel.couponsChartData(start, end)
// 集团折线图+列表
this.$refs.mybloc.changeTimeForLine(start,end)
this.$refs.mybloc.orderDataInfoOfJT(start,end)
}
},
getChartStartTime(e) {
......@@ -162,12 +197,13 @@ export default {
},
// 已开通--订单统计
judgeOpen() {
// let openInfo = JSON.parse(localStorage.getItem('openInfo'))
let openInfo = JSON.parse(localStorage.getItem('openInfo'))
// this.bengintime = utils.dateFormat(openInfo.openDate)
this.bengintime = '2019-01-01'
this.bengintime = '2020-01-01'
this.endtime = utils.dateFormat(new Date())
this.orderDataInfo()
},
// 门店统计
orderDataInfo() {
let method = orderTotal()
let para = {
......
<template>
<div class="rank-container">
<div v-if="show" class="rank-container">
<div class="page_title">门店产值排名</div>
<div class="tipper flex_scb">
<div class="tip_text">
<span>共</span>
<sapn style="color: #5850ff">10</sapn>
<span>家门店开通精品升级业务,平均3单店产值:</span>
<span style="color: #5850ff">¥545406</span>
<sapn style="color: #5850ff">{{ tableData.length }}</sapn>
<span>家门店开通精品升级业务,平均单店产值:</span>
<span style="color: #5850ff">¥{{ pjstoreTotal }}</span>
<span>;高于平均线</span>
<span>(同行此业务的平均产值为:</span>
<span style="color: #5850ff">¥545406</span>
<span style="color: #5850ff">¥{{ productValue }}</span>
<span>)的共</span>
<span style="color: #5850ff; font-size: 16px">3</span>
<span style="color: #5850ff; font-size: 16px">{{ storeNum }}</span>
<span>家</span>
</div>
<div class="tip_rig h15_title">
<!-- <div class="tip_rig h15_title">
查看同行如何提高产值
<i class="el-icon-d-arrow-right"></i>
</div>
</div> -->
</div>
<div class="table_widget">
<el-table :data="tableData" height="350" style="100%" highlight-current-row>
<el-table-column prop="sort" label="排名" align="center" width="120px"></el-table-column>
<el-table-column prop="merchantName" label="门店名称" width="350px" align="center"></el-table-column>
<el-table-column label="总产值">
<!-- <el-table-column prop="sort" label="排名" align="center" width="120px"></el-table-column> -->
<el-table-column label="排名" align="center" type="index" :index="index => index + 1"></el-table-column>
<el-table-column prop="merchantName" label="门店名称" align="center"></el-table-column>
<el-table-column label="总产值" width="500">
<template slot-scope="scope">
<div class="echat_wrap">
<span>{{ scope.row.productNum }}</span>
<div :style="{ width: (100 * scope.row.productNum) / 2000 + '%' }" class="summary-progress-barin"></div>
<span>{{ scope.row.divisionMoney }}</span>
<div :style="{ width: (100 * scope.row.divisionMoney) / custSortMax + '%' }" class="summary-progress-barin"></div>
</div>
</template>
</el-table-column>
</el-table>
</div>
<div class="openBtn h18_title" @click="showContainer">收缩详情</div>
</div>
</template>
<script>
import { orderTotalOfJT } from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
import utils from '../../util/util'
export default {
name: '',
data() {
return {
tableData: []
tableData: [],
pjstoreTotal: 0,
storeNum: 0,
productValue: 0,
custSortMax: 0
}
},
props: {
show: {
type: Boolean,
default: false
}
},
created() {
this.today = utils.dateFormat(new Date())
},
mounted() {
this.test()
this.orderAll()
},
methods: {
test() {
for (let i = 0; i < 10; i++) {
this.tableData.push({
sort: i + 1,
merchantName: '门店' + i,
productNum: 1220 + i
})
orderAll() {
let openInfo = JSON.parse(localStorage.getItem('openInfo'))
this.bengintime = utils.dateFormat(openInfo.openDate)
let method = orderTotalOfJT()
let para = {
routerMethod: method,
beginDateStr: '2020-01-01',
endDateStr: this.today,
reportType: 2,
orderByType: 1 //1 分账 2分润
}
converterApi(para).then(res => {
let arr = res || []
let total = 0
this.tableData = arr
this.custSortMax = 0
this.tableData.forEach(item => {
total = total + parseFloat(item.divisionMoney)
if (item.divisionMoney >= this.custSortMax) {
this.custSortMax = item.divisionMoney
}
})
this.pjstoreTotal = utils.decimal(total / arr.length, 2)
this.storeNum = this.sortNum(arr, this.pjstoreTotal)
})
},
sortNum(arr, total) {
let count = 0
arr.forEach(item => {
if (item.divisionMoney > total) {
count++
}
})
return count
},
showContainer() {
this.show = false
this.$emit('closeRank', false)
}
}
}
......@@ -67,6 +115,14 @@ export default {
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
margin-top: 10px;
position: relative;
}
.openBtn {
position: absolute;
left: 50%;
transform: translate(-50%, 0);
bottom: 10px;
cursor: pointer;
}
.page_title {
padding: 15px 20px 10px 20px;
......
......@@ -4,7 +4,8 @@
<div class="table_one">
<p class="h7_title">商户名:{{ merchantInfo.name }}</p>
<div class="title_text">
<p class="h7_title">分润计算:扣除手续费(按0.6%的标准)</p>
<p v-if="settle.deductChargeFlag=='Y'" class="h7_title">分润计算:扣除手续费(按0.6%的标准)</p>
<p v-if="settle.deductChargeFlag=='N'" class="h7_title">分润计算:不扣除手续费</p>
<p class="min_text">仅针对POS机收款订单</p>
</div>
</div>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!