Commit 3bf0912a by 杨北旺

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

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