Commit 08d68ed9 by cwq0219

merge

2 parents 21660769 fe6f352f
......@@ -5897,9 +5897,9 @@
}
},
"glsx-components": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/glsx-components/-/glsx-components-1.1.0.tgz",
"integrity": "sha512-NiTfxOj07MsxymLcZYo3JuBrkSoTTWQ4pyNYfyCM/QREaaA51rYutxDmmdCZS3MGMIixyq+kugMoOGQ1Jj8Z8Q==",
"version": "1.1.8",
"resolved": "https://registry.npmmirror.com/glsx-components/download/glsx-components-1.1.8.tgz",
"integrity": "sha512-jjo1EY6tknpi5depW9u4xD70TAUs+6Vyzsi3PJf0v3aONA6nILKxK7Yu5jRiz//CG/H7S+Fd6AnYVnJ+QoQFjQ==",
"requires": {
"core-js": "^3.6.5",
"element-ui": "^2.15.6",
......@@ -5908,14 +5908,14 @@
},
"dependencies": {
"core-js": {
"version": "3.19.0",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.19.0.tgz",
"integrity": "sha512-L1TpFRWXZ76vH1yLM+z6KssLZrP8Z6GxxW4auoCj+XiViOzNPJCAuTIkn03BGdFe6Z5clX5t64wRIRypsZQrUg=="
"version": "3.19.1",
"resolved": "https://registry.npmmirror.com/core-js/download/core-js-3.19.1.tgz",
"integrity": "sha1-9vFzyuI+c6fYj6I7bp2jKSdsZkE="
},
"element-ui": {
"version": "2.15.6",
"resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.6.tgz",
"integrity": "sha512-rcYXEKd/j2G0AgficAOk1Zd1AsnHRkhmrK4yLHmNOiimU2JfsywgfKUjMoFuT6pQx0luhovj8lFjpE4Fnt58Iw==",
"version": "2.15.7",
"resolved": "https://registry.npmmirror.com/element-ui/download/element-ui-2.15.7.tgz?cache=0&sync_timestamp=1637217246631&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Felement-ui%2Fdownload%2Felement-ui-2.15.7.tgz",
"integrity": "sha512-+J6rnXajxzLwV6w8Q6bf7Yqzk1FO1ewbIrCy/4B5alnd7tj8WEpfQoAvISirVaUGVGy77d9Ji3o2bF4f0AsJLQ==",
"requires": {
"async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0",
......
......@@ -13,7 +13,7 @@
"el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5",
"glsx-common": "^1.4.6",
"glsx-components": "^1.1.0",
"glsx-components": "^1.1.8",
"lodash": "^4.17.21",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
......
import { http } from '@/main'
const converterApi = params => {
params.method = `scrm.api.boutiquecoupon.rop.router`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'GET',
data: params,
sign: true
})
}
export { converterApi }
\ No newline at end of file
......@@ -12,4 +12,4 @@ const getMerberList = params => {
})
}
export { getMerberList }
export { getMerberList }
\ No newline at end of file
import { http } from '@/main'
const defaultPath = 'scrm.api.live.'
const getLiveRoomListApi = params => {
params.method = `${defaultPath}live.room.list`
return http({
url: 'rop-scrm-live/router',
method: 'GET',
data: params,
sign: true
})
}
const getLiveShareApi = params => {
params.method = `${defaultPath}get.shared.code`
return http({
url: 'rop-scrm-live/router',
method: 'GET',
data: params,
sign: true
})
}
const insertLiveRoomApi = params => {
params.method = `${defaultPath}insert.live.room`
return http({
url: 'rop-scrm-live/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const deleteLiveRoomApi = params => {
params.method = `${defaultPath}delete.live.room`
return http({
url: 'rop-scrm-live/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const getLiveRoomInfoApi = params => {
params.method = `${defaultPath}get.live.room.by.id`
return http({
url: 'rop-scrm-live/router',
method: 'POST',
data: params,
sign: true
})
}
const getControlInfoApi = params => {
params.method = `${defaultPath}get.control`
return http({
url: 'rop-scrm-live/router',
method: 'POST',
data: params,
sign: true
})
}
const getControlImportListApi = params => {
params.method = `${defaultPath}get.import.goods`
return http({
url: 'rop-scrm-live/router',
method: 'POST',
data: params,
sign: true
})
}
const getWaitImportListApi = params => {
params.method = `${defaultPath}get.wait.import.goods`
return http({
url: 'rop-scrm-live/router',
method: 'POST',
data: params,
sign: true
})
}
const importGoodsApi = params => {
params.method = `${defaultPath}import.goods`
return http({
url: 'rop-scrm-live/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const updateCommentApi = params => {
params.method = `${defaultPath}update.comment`
return http({
url: 'rop-scrm-live/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const updateReplayApi = params => {
params.method = `${defaultPath}update.replay`
return http({
url: 'rop-scrm-live/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const controlUpOrDownApi = params => {
params.method = `${defaultPath}toggle.status`
return http({
url: 'rop-scrm-live/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const controlDeleteApi = params => {
params.method = `${defaultPath}delete.room.goods`
return http({
url: 'rop-scrm-live/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export { getLiveRoomListApi, getLiveShareApi, insertLiveRoomApi, deleteLiveRoomApi, getLiveRoomInfoApi, getControlInfoApi, getControlImportListApi, getWaitImportListApi, importGoodsApi, updateCommentApi, updateReplayApi, controlUpOrDownApi, controlDeleteApi }
const getRulesData = () => {
let method = 'dj.api.smartcarlife.merchantDivisionRule.getAllRule'
return method
}
const getRulesListData = () => {
let method = 'dj.api.smartcarlife.merchantDivisionRule.pageChangeRecord'
return method
}
// 客户评价
const guestComTotal = () => {
let method = 'dj.api.smartcarlife.orderCommentReport.total'
return method
}
// 是否开通精品升级
const isOpenUpgrade = () => {
let method = 'dj.api.serviceMerchant.isOpenSmartcarlife'
return method
}
// 订单统计
const orderTotal = () => {
let method = 'dj.api.smartcarlife.orderReport.total'
return method
}
// 券统计
const couponsTotal = () => {
let method = 'dj.api.smartcarlife.couponReport.total'
return method
}
// 按天统计券
const couponsTotalByDay = () => {
let method = 'dj.api.smartcarlife.couponReport.countByDate'
return method
}
// 按天统计金额
const moneyTotal = () => {
let method = 'dj.api.smartcarlife.orderReport.totalByDay'
return method
}
// 精品礼券订单查询
const findCoupons = () => {
let method = 'dj.api.life.customer.coupon.listFor4S'
return method
}
// 精品礼券升级订单查询
const findupGradeOrder = () => {
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
}
// 集团--精品升级订单统计数
const orderTotalNumOfJT = () => {
let method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.count'
return method
}
export {
getRulesData,
getRulesListData,
guestComTotal,
isOpenUpgrade,
orderTotal,
couponsTotal,
couponsTotalByDay,
moneyTotal,
findCoupons,
findupGradeOrder,
checkCoupons,
mydivision,
exportMydivision,
exportUpgrade,
exportCoupons,
getEmployName,
checkDetail,
orderTotalOfJT,
orderTotalNumOfJT
}
\ No newline at end of file
......@@ -95,6 +95,42 @@
color: #37383A;
}
.h15_title {
font-size: 14px;
font-weight: 500;
color: #5850FF;
}
.h16_title {
font-size: 12px;
font-weight: 500;
color: #5850FF;
}
.h17_title {
font-size: 12px;
font-weight: 400;
color: #333333;
}
.h18_title {
font-size: 14px;
font-weight: 500;
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>
......
......@@ -3,6 +3,9 @@
</template>
<script>
import { couponsTotalByDay } from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
import utils from '../../util/util'
import * as echarts from 'echarts'
export default {
name: '',
......@@ -13,51 +16,173 @@ export default {
props: {
echartId: {
type: String,
default: ''
default: '',
xAxisData: [],
getTotal: [],
usedTotal: [],
upgradeTotal: []
}
},
mounted() {
this.getOptions()
this.initTIme()
},
methods: {
getOptions() {
var chartDom = document.getElementById(this.echartId)
var myChart = echarts.init(chartDom)
var labelOption = {
show: false
}
var option = {
title:{
show:true,
text:'数量'
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
legend: {},
tooltip: {},
dataset: {
source: [
['product', '领券数', '核销数', '精品是升级订单'],
['Matcha Latte', 43.3, 85.8, 93.7],
['Milk Tea', 83.1, 73.4, 55.1],
['Cheese Cocoa', 86.4, 65.2, 82.5],
['Walnut Brownie', 72.4, 53.9, 39.1]
]
grid: {
height: '60%'
},
xAxis: { type: 'category' },
yAxis: {
axisLine: {
legend: {
data: ['领券数', '核销数', '精品升级订单'],
icon: 'rect'
},
xAxis: [
{
type: 'category',
axisTick: { show: false },
data: this.xAxisData
}
],
yAxis: [
{
type: 'value',
name: '数量'
}
],
dataZoom: [
//给x轴设置滚动条
{
start: 0, //默认为0
end: 100 - 1500 / 31, //默认为100
type: 'slider',
show: true,
lineStyle: {
color: '#E8E8EA'
}
xAxisIndex: [0],
handleSize: 0, //滑动条的 左右2个滑动条的大小
height: 1, //组件高度
left: '10%', //左边的距离
right: '10%', //右边的距离
bottom: 26, //右边的距离
borderColor: '#fff',
fillerColor: '#909399',
borderRadius: 5,
backgroundColor: '#f5f5f5', //两边未选中的滑动条区域的颜色
showDataShadow: false, //是否显示数据阴影 默认auto
showDetail: false, //即拖拽时候是否显示详细数值信息 默认true
realtime: true, //是否实时更新
filterMode: 'filter',
zoomLock:false
},
//下面这个属性是里面拖到
{
type: 'inside',
show: false,
xAxisIndex: [0],
start: 0, //默认为1
end: 100 - 1500 / 31 //默认为100
}
},
series: [{ type: 'bar' }, { type: 'bar' }, { type: 'bar' }]
],
series: [
{
name: '领券数',
type: 'bar',
barGap: 0,
label: labelOption,
barWidth: 6,
emphasis: {
focus: 'series'
},
itemStyle: {
normal: {
color: '#B3B3FF'
}
},
data: this.getTotal
},
{
name: '核销数',
type: 'bar',
label: labelOption,
emphasis: {
focus: 'series'
},
barWidth: 6,
itemStyle: {
normal: {
color: '#7C7CFF'
}
},
data: this.usedTotal
},
{
name: '精品升级订单',
type: 'bar',
label: labelOption,
barWidth: 6,
emphasis: {
focus: 'series'
},
itemStyle: {
normal: {
color: '#5850FF'
}
},
data: this.upgradeTotal
}
]
}
option && myChart.setOption(option)
},
// 初始化时间
initTIme() {
let openInfo = JSON.parse(localStorage.getItem('openInfo'))
let startDate = utils.dateFormat(openInfo.openDate)
let endDate = utils.dateFormat(new Date())
this.couponsChartData(startDate, endDate)
},
couponsChartData(startDate, endDate) {
this.xAxisData = []
this.getTotal = []
this.usedTotal = []
this.upgradeTotal = []
let method = couponsTotalByDay()
let para = {
routerMethod: method,
startDate,
endDate
}
converterApi(para).then(res => {
let arr = res || []
if (arr.length) {
arr.map(item => {
item.dataDate = utils.dateFormat(item.dataDate)
this.xAxisData.push(item.dataDate)
this.getTotal.push(item.getTotal)
this.usedTotal.push(item.usedTotal)
this.upgradeTotal.push(item.upgradeTotal)
return item
})
}
this.getOptions()
})
}
}
}
</script>
<style>
.chart-container {
height: 250px;
width: 100%;
height: 300px;
}
</style>
<!-- 选择商品弹窗 -->
<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>
import * as echarts from 'echarts'
import { couponsTotal } from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
import utils from '../../util/util'
export default {
name: '',
data() {
return {}
return {
nodata: false
}
},
props: {
echartId: {
type: String,
default: ''
},
}
},
mounted() {
this.getOptions()
this.initTIme()
},
methods: {
getOptions() {
getOptions(res) {
var chartDom = document.getElementById(this.echartId)
var myChart = echarts.init(chartDom)
var option = {
color: ['#5850FF', '#9191FF', '#CBCBFF'],
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c}%'
formatter: '{a} <br/>{b}'
},
series: [
{
name: 'Funnel',
name: '券统计',
type: 'funnel',
left: '10%',
left: 'center',
top: 60,
bottom: 60,
width: '80%',
width: '60%',
min: 0,
max: 100,
minSize: '50%',
maxSize: '100%',
sort: 'descending',
gap: 2,
orient:"vertical",
gap: 15,
orient: 'vertical',
label: {
show: true,
position: 'left'
position: 'left',
// formatter: '{b}: {c}(张)',
textStyle: {
fontSize: 14
},
color: '#333'
},
labelLine: {
length: 20,
......@@ -58,23 +72,42 @@ export default {
},
itemStyle: {
borderColor: '#fff',
borderWidth: 1
},
emphasis: {
label: {
fontSize: 20
}
borderWidth: 1,
height: 37
},
data: [
{ value: 60, name: 'Visit' },
{ value: 40, name: 'Inquiry' },
{ value: 20, name: 'Order' },
{ value: res.getTotal || 0, name: `发券总数:${res.getTotal || 0}(张)` },
{ value: res.usedTotal || 0, name: `核销总数:${res.usedTotal || 0}(张)` },
{ value: res.upgradeTotal || 0, name: `转化订单数:${res.upgradeTotal || 0}(笔)` }
]
}
]
}
console.log(option);
option && myChart.setOption(option)
},
// 初始化时间
initTIme() {
let openInfo = JSON.parse(localStorage.getItem('openInfo'))
// let startDate = utils.dateFormat(openInfo.openDate)
let startDate = '2020-01-01'
let endDate = utils.dateFormat(new Date())
this.couponsChartData(startDate, endDate)
},
// 券统计
couponsChartData(startDate, endDate) {
let method = couponsTotal()
let para = {
routerMethod: method,
startDate,
endDate
}
converterApi(para).then(res => {
if (!res.getTotal && !res.usedTotal && !res.upgradeTotal) {
this.nodata = true
return
}
this.getOptions(res)
})
}
}
}
......
<template>
<div :id="echartId" class="chart-container"></div>
</template>
<script>
import * as echarts from 'echarts'
import { moneyTotal } from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
import utils from '../../util/util'
export default {
name: '',
data() {
return {
divisionMoney:[],
profitMoney:[],
xAxisData:[]
}
},
props: {
echartId: {
type: String,
default: ''
}
},
mounted() {
this.initTIme()
},
methods: {
getOptions() {
var chartDom = document.getElementById(this.echartId)
var myChart = echarts.init(chartDom)
var option = (option = {
title: {
text: ''
},
grid: {
height: '60%'
},
tooltip: {
trigger: 'axis',
show: true,
axisPointer: {
// type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
xAxis: {
type: 'category',
data: this.xAxisData
},
yAxis: {
name: '金额'
},
legend: {
data: ['分润金额', '分账金额'],
icon: 'rect'
},
series: [
{
name: '分润金额',
type: 'line',
data: this.profitMoney,
smooth: false,
showSymbol: false,
itemStyle: {
normal: {
color: '#5850FF'
}
}
},
{
name: '分账金额',
type: 'line',
data: this.divisionMoney,
smooth: false,
showSymbol: false,
itemStyle: {
normal: {
color: '#FF6D00'
}
}
}
]
})
option && myChart.setOption(option)
},
// 初始化时间
initTIme() {
let openInfo = JSON.parse(localStorage.getItem('openInfo'))
let startDate = utils.dateFormat(openInfo.openDate)
let endDate = utils.dateFormat(new Date())
this.couponsChartData(startDate, endDate)
},
// 获取折线图数据
couponsChartData(beginDateStr, endDateStr) {
this.xAxisData = []
this.divisionMoney = []
this.profitMoney = []
let method = moneyTotal()
let para = {
routerMethod: method,
beginDateStr,
endDateStr,
reportType:2
}
converterApi(para).then(res => {
let arr = res || []
if(arr.length){
arr.forEach(item=>{
this.xAxisData.push(item.dataDateStr)
this.divisionMoney.push(item.divisionMoney)
this.profitMoney.push(item.profitMoney)
})
this.getOptions()
}
})
}
}
}
</script>
<style>
.chart-container {
height: 300px;
}
</style>
......@@ -10,17 +10,19 @@
// let request = require('@/http/request.js')
let cfg = require('./conf.js')
let timeout = 30000 //超时时间
import { Http } from 'glsx-common'
export const fetchConfig = function(isEnv = true) {
if (isEnv) {
let { request } = cfg
Object.assign(request, { timeout })
return Promise.resolve(cfg)
}
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
// if (isEnv) {
// let { request } = cfg
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
// }
return new Http().get(' https://oss-config.test.glsx.com.cn/mock/618f5cc91072f92988f05a26/services/config')
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
}
export const config = {
install(vue, cfg) {
vue.prototype.$config = cfg
}
}
}
\ No newline at end of file
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
const staticRoutes = Object.freeze([
{
name: 'InSale',
path: '/inSale/index',
component: resolve => require([`@/views/inSale/index.vue`], resolve),
meta: {}
},
{
name: 'InSale',
path: '/inSale/upgrade',
component: resolve => require([`@/views/inSale/upgrade.vue`], resolve),
meta: {}
},
{
name: 'InSale',
path: '/inSale/guestComments',
component: resolve => require([`@/views/inSale/guestComments.vue`], resolve),
meta: {}
},
{
name: 'InSale',
path: '/inSale/accountRules',
component: resolve => require([`@/views/inSale/accountRules.vue`], resolve),
meta: {}
},
{
name: 'beforeSale',
path: '/beforeSale/saleList',
component: resolve => require([`@/views/beforeSale/index.vue`], resolve),
meta: {}
}
])
const staticRoutes = Object.freeze([{
name: 'index',
path: '/inSale/index',
component: resolve => require([`@/views/inSale/index.vue`], resolve),
meta: {}
}, {
name: 'upgrade',
path: '/inSale/upgrade',
component: resolve => require([`@/views/inSale/upgrade.vue`], resolve),
meta: {}
}, {
name: 'guestComments',
path: '/inSale/guestComments',
component: resolve => require([`@/views/inSale/guestComments.vue`], resolve),
meta: {}
}, {
name: 'accountRules',
path: '/inSale/accountRules',
component: resolve => require([`@/views/inSale/accountRules.vue`], resolve),
meta: {}
},
{
name: 'beforeSale',
path: '/beforeSale/saleList',
component: resolve => require([`@/views/beforeSale/index.vue`], resolve),
meta: {}
} ])
export default staticRoutes
......@@ -5,10 +5,13 @@ import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限
import { getRoutes } from '@/router'
import render from './render'
import 'glsx-components/dist/glsx-components.css'
// import 'glsx-components/src/theme/theme.scss'
let routes = []
let router = null
let instance = null
Vue.use(GLTable)
// Vue.use(Table)
// Vue.use(TableColumn)
export async function bootstrap({ history, common, messenger, globalState }) {
const { response, request, sign, secret } = await fetchConfig()
Vue.prototype.$history = history
......@@ -18,7 +21,7 @@ export async function bootstrap({ history, common, messenger, globalState }) {
Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData)
......@@ -41,4 +44,4 @@ function subscribe({ messenger }) {
messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v)
})
}
}
\ No newline at end of file
let util = {}
util.dateFormat = function(dateTime, format = 'YYYY-MM-DD') {
const date = new Date(dateTime)
const config = {
YYYY: date.getFullYear(),
MM: appendZero(date.getMonth() + 1), //getMonth() 方法根据本地时间返回指定日期的月份(从 0 到 11)
DD: appendZero(date.getDate()),
HH: date.getHours(),
mm: date.getMinutes(),
ss: date.getSeconds()
}
for (const key in config) {
format = format.replace(key, config[key])
}
return format
}
function appendZero(int) {
if (int < 10) {
return '0' + `${int}`
} else {
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="bloc-chart-container">
<div class="mid_line"></div>
<div class="chart_wrapper">
<line-chart ref="myline" echartId="myline"></line-chart>
</div>
<div class="table-wrapper">
<div class="top_line flex_scb">
<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="orderByType" :label="1" @change="changeType(1)">
<span class="h15_title">按分账金额排序</span>
</el-radio>
<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="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,
tableData: [],
tableParams: {
tableOption: false,
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '门店名称',
prop: 'merchantName'
},
{
label: '分润金额 / (实际)分账金额',
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: {
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>
.bloc-chart-container {
height: 400px;
position: relative;
display: flex;
.mid_line {
width: 1px;
position: absolute;
left: 50%;
top: 0;
transform: translate(-50%, 0);
height: 350px;
background: #e8e8ea;
}
.chart_wrapper {
width: 50%;
height: 350px;
// background: #999;
display: flex;
align-items: center;
justify-content: center;
}
.table-wrapper {
width: 50%;
height: 350px;
box-sizing: border-box;
padding: 13px 22px 0 20px;
.top_line {
.right_wrap {
width: 50%;
}
}
.table_widget {
margin-top: 7px;
}
}
}
.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;
}
</style>
\ No newline at end of file
<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>7878</span>
<span>{{ messageData.commentCount || 0 }}</span>
<span style="margin-left: 5px" class="h7_title">人</span>
</div>
<span class="h9_title">(累计)施工完成客户数:10000</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>7878</span>
<span>{{ messageData.goodCommentCount || 0 }}</span>
<span style="margin-left: 5px" class="h7_title">人</span>
</div>
<span style="height: 20px" class="h9_title"></span>
......@@ -30,13 +30,13 @@
<div class="box_1 box_2 flex-ca">
<div class="box_con">
<div class="circle_wrap">
<el-progress width="60" color="#5850FF" type="circle" :percentage="25"></el-progress>
<el-progress width="60" color="#5850FF" type="circle" :percentage="messageData.commentPer"></el-progress>
</div>
<span class="h7_title">客户评价率</span>
</div>
<div class="box_con">
<div class="circle_wrap">
<el-progress width="60" color="#5850FF" type="circle" :percentage="50"></el-progress>
<el-progress width="60" color="#5850FF" type="circle" :percentage="messageData.goodCommentPer"></el-progress>
</div>
<span class="h7_title">客户好评率</span>
</div>
......@@ -55,24 +55,45 @@
<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 { converterApi } from '../../api/modules/converter'
export default {
name: '',
data() {
return {}
return {
messageData: {},
accountLevel: 4
}
},
created() {
const { session } = this.$globalState
this.accountLevel = session.accountLevel
this.getCompentData()
},
mounted() {},
methods: {}
methods: {
// 获取客户评价
getCompentData() {
let method = guestComTotal()
let para = {
routerMethod: method
}
converterApi(para).then(res => {
this.messageData = res
})
}
}
}
</script>
<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;
......@@ -151,8 +172,8 @@ export default {
flex-direction: column;
align-items: center;
justify-content: center;
>span{
margin-bottom: 10px;
> span {
margin-bottom: 10px;
}
}
}
......
......@@ -3,6 +3,8 @@
</template>
<script>
import {isOpenUpgrade} from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
export default {
name: 'index',
data() {
......@@ -12,13 +14,23 @@ export default {
},
created() {
// 默认进入精品升级页面
this.$router.push('/inSale/upgrade')
this.judgeOpen()
},
mounted() {
// const { session } = this.$globalState
// console.log(session, '**********')
// this.accountLevel = session.accountLevel
},
methods: {}
methods: {
judgeOpen(){
localStorage.removeItem('openInfo')
let method = isOpenUpgrade()
let para = {
routerMethod:method
}
converterApi(para).then(res=>{
localStorage.setItem('openInfo',JSON.stringify(res))
this.$router.push('/inSale/upgrade')
})
}
}
}
</script>
......@@ -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>
<template>
<div class="video-container">
<video width="100%" height="100%" controls autoplay src="http://static.video.qq.com/TPout.swf?vid=n01393q6qvo&auto=0"></video>
<i class="el-icon-circle-close" @click="toBackPage"></i>
</div>
</template>
<script>
export default {
name: '',
data() {
return {}
},
mounted() {},
methods: {
toBackPage() {
history.go(-1)
}
}
}
</script>
<style lang="scss" scoped>
.video-container {
width: 100%;
height: 100%;
position: relative;
> i {
position: absolute;
right: 20px;
top: 20px;
cursor: pointer;
font-size: 28px;
color: white;
}
}
</style>
\ No newline at end of file
<template>
<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">{{ tableData.length }}</sapn>
<span>家门店开通精品升级业务,平均单店产值:</span>
<span style="color: #5850ff">¥{{ pjstoreTotal }}</span>
<span>;高于平均线</span>
<span>(同行此业务的平均产值为:</span>
<span style="color: #5850ff">¥{{ productValue }}</span>
<span>)的共</span>
<span style="color: #5850ff; font-size: 16px">{{ storeNum }}</span>
<span>家</span>
</div>
<!-- <div class="tip_rig h15_title">
查看同行如何提高产值
<i class="el-icon-d-arrow-right"></i>
</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 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.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: [],
pjstoreTotal: 0,
storeNum: 0,
productValue: 0,
custSortMax: 0
}
},
props: {
show: {
type: Boolean,
default: false
}
},
created() {
this.today = utils.dateFormat(new Date())
},
mounted() {
this.orderAll()
},
methods: {
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)
}
}
}
</script>
<style lang="scss" scoped>
.rank-container {
width: 100%;
height: 454px;
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;
}
.tipper {
width: 100%;
box-sizing: border-box;
padding: 0 20px;
.tip_text {
font-size: 12px;
font-weight: 400;
color: #000000;
display: flex;
align-items: center;
}
.tip_rig {
cursor: pointer;
> i {
margin-left: 5px;
}
}
}
.table_widget {
box-sizing: border-box;
padding: 10px 15px;
.echat_wrap {
display: flex;
align-items: center;
.summary-progress-barin {
margin-left: 10px;
background-color: #5850ff;
height: 15px;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="content_body">
<div class="max_widget">
<div ref="maxHBox" class="max_widget">
<div class="table_one">
<p class="h7_title">商户名:深圳XXXX公司</p>
<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>
......@@ -15,45 +16,53 @@
</div>
<div class="table_three">
<div class="table_th h7_title">全部(除特殊分账品类)</div>
<div class="table_th h7_title">收入分润</div>
<div class="table_th h7_title">30%</div>
<div class="table_th h7_title">{{ settle.merchantSettleType == 1 ? '毛利分润' : '收入分润' }}</div>
<div class="table_th h7_title">{{ settle.merchantProfitValue }}%</div>
</div>
<div class="table_three">
<div class="table_th h7_title">
<span>特殊分账品类:</span>
太阳膜
<template v-if="settle.goodsTypeSettleRuleList.length">
<div v-for="(item, index) in settle.goodsTypeSettleRuleList" :key="index" class="table_three">
<div class="table_th h7_title">
<span>特殊分账品类:</span>
{{ item.goodsTypeName }}
</div>
<div class="table_th h7_title">{{ item.merchantSettleType == 1 ? '毛利分润' : '收入分润' }}</div>
<div class="table_th h7_title">{{ item.merchantProfitValue }}%</div>
</div>
<div class="table_th h7_title">毛利分润</div>
<div class="table_th h7_title">30%</div>
</div>
</template>
<div class="table_four flex_scb">
<div class="h9_title">
<span>是否自动打款:</span>
<span>是</span>
<span>{{ division.autoFlag == 'Y' ? '是' : '否' }}</span>
</div>
<div class="h9_title">
<span>分账周期:T+1</span>
<span class="min_text">(分账后第2天到对公账户)</span>
<span v-if="division.settleTimeType == 1">分账周期:T+1</span>
<span v-if="division.settleTimeType == 2">分账周期:每月{{ division.settleTime }}号</span>
<span v-if="division.settleTimeType == 1" class="min_text">(分账后第2天到对公账户)</span>
</div>
</div>
<div class="table_four flex_scb">
<div class="h9_title">
<span>您的分账金额包含:导流方分账金额,服务商分账金额</span>
<span>您的分账金额包含:</span>
<span v-if="division.shopProfitDivisionFlag == 3">平台分账金额,</span>
<span v-if="division.partnerProfitDivisionFlag == 3">服务商分账金额,</span>
<span v-if="division.goodsCostDivisionFlag == 3">产品金额,</span>
<span v-if="division.extraCostDivisionFlag == 3">额外成本,</span>
<span v-if="division.incentiveCostDivisionFlag == 3">导流方分账金额</span>
</div>
</div>
<div class="table_four flex_scb border_all">
<div class="h9_title">
<span>收款账户: XXXX商户有限公司</span>
<span>收款账户:{{ division.realityShopMerchantName }}</span>
</div>
</div>
</div>
<div class="min_widget">
<div class="title h7_title">对公账户信息</div>
<div class="info_widget">
<span class="h9_title">开户账户户行:招商银行</span>
<span class="h9_title">开户支行:招商银行深圳泰然支行</span>
<span class="h9_title">账户号:755918931710302</span>
<span class="h9_title">账户名称:深圳广联赛讯股份有限公司</span>
<span class="h9_title">开户账户户行:{{bankData.bankName}}</span>
<span class="h9_title">开户支行:{{bankData.openAccBankName}}</span>
<span class="h9_title">账户号:{{bankData.bankAccountNo}}</span>
<span class="h9_title">账户名称:{{bankData.bankAccountName}}</span>
</div>
</div>
</div>
......@@ -63,10 +72,28 @@
export default {
name: '',
data() {
return {}
return {
merchantInfo: {
name: '',
merchantId: 0
},
}
},
props: {
bankData: Object,
division: Object,
settle: Object
},
mounted() {},
methods: {}
mounted() {
const { session } = this.$globalState
this.merchantInfo = {
name: session.merchantName,
merchantId: session.session
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
......@@ -75,7 +102,7 @@ export default {
justify-content: space-between;
.max_widget {
width: calc(100% - 270px);
height: 389px;
// min-height: 389px;
.table_one {
width: 100%;
height: 54px;
......@@ -141,7 +168,7 @@ export default {
}
.min_widget {
width: 260px;
height: 393px;
// min-height: 393px;
border: 2px solid #e8e8ea;
.title {
width: 100%;
......
......@@ -8,6 +8,8 @@
<script>
import notOpenCon from './notOpenCon.vue'
import openCon from './open.vue'
import { isOpenUpgrade } from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
export default {
name: 'index',
components: {
......@@ -16,11 +18,33 @@ export default {
},
data() {
return {
openType: 1 // 0未开通 1已开通
openType: 2 // 0未开通 1已开通
}
},
created() {
this.judgeOpen()
// if(localStorage.getItem('openInfo')){
// let info = JSON.parse(localStorage.getItem('openInfo'))
// this.openType = info.open
// }else{
// this.judgeOpen()
// }
},
mounted() {},
methods: {}
methods: {
// 避免未配置权限菜单
judgeOpen() {
localStorage.removeItem('openInfo')
let method = isOpenUpgrade()
let para = {
routerMethod: method
}
converterApi(para).then(res => {
localStorage.setItem('openInfo', JSON.stringify(res))
this.openType = res.open?1:0
})
}
}
}
</script>
<style lang="scss" scoped>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!