Commit 08d68ed9 by cwq0219

merge

2 parents 21660769 fe6f352f
...@@ -5897,9 +5897,9 @@ ...@@ -5897,9 +5897,9 @@
} }
}, },
"glsx-components": { "glsx-components": {
"version": "1.1.0", "version": "1.1.8",
"resolved": "https://registry.npmjs.org/glsx-components/-/glsx-components-1.1.0.tgz", "resolved": "https://registry.npmmirror.com/glsx-components/download/glsx-components-1.1.8.tgz",
"integrity": "sha512-NiTfxOj07MsxymLcZYo3JuBrkSoTTWQ4pyNYfyCM/QREaaA51rYutxDmmdCZS3MGMIixyq+kugMoOGQ1Jj8Z8Q==", "integrity": "sha512-jjo1EY6tknpi5depW9u4xD70TAUs+6Vyzsi3PJf0v3aONA6nILKxK7Yu5jRiz//CG/H7S+Fd6AnYVnJ+QoQFjQ==",
"requires": { "requires": {
"core-js": "^3.6.5", "core-js": "^3.6.5",
"element-ui": "^2.15.6", "element-ui": "^2.15.6",
...@@ -5908,14 +5908,14 @@ ...@@ -5908,14 +5908,14 @@
}, },
"dependencies": { "dependencies": {
"core-js": { "core-js": {
"version": "3.19.0", "version": "3.19.1",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.19.0.tgz", "resolved": "https://registry.npmmirror.com/core-js/download/core-js-3.19.1.tgz",
"integrity": "sha512-L1TpFRWXZ76vH1yLM+z6KssLZrP8Z6GxxW4auoCj+XiViOzNPJCAuTIkn03BGdFe6Z5clX5t64wRIRypsZQrUg==" "integrity": "sha1-9vFzyuI+c6fYj6I7bp2jKSdsZkE="
}, },
"element-ui": { "element-ui": {
"version": "2.15.6", "version": "2.15.7",
"resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.6.tgz", "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-rcYXEKd/j2G0AgficAOk1Zd1AsnHRkhmrK4yLHmNOiimU2JfsywgfKUjMoFuT6pQx0luhovj8lFjpE4Fnt58Iw==", "integrity": "sha512-+J6rnXajxzLwV6w8Q6bf7Yqzk1FO1ewbIrCy/4B5alnd7tj8WEpfQoAvISirVaUGVGy77d9Ji3o2bF4f0AsJLQ==",
"requires": { "requires": {
"async-validator": "~1.8.1", "async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0", "babel-helper-vue-jsx-merge-props": "^2.0.0",
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.1.0", "glsx-components": "^1.1.8",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-router": "^3.1.3", "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 \ No newline at end of file
...@@ -12,4 +12,4 @@ const getMerberList = params => { ...@@ -12,4 +12,4 @@ const getMerberList = params => {
}) })
} }
export { getMerberList } export { getMerberList }
\ No newline at end of file \ 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 \ No newline at end of file
...@@ -95,6 +95,42 @@ ...@@ -95,6 +95,42 @@
color: #37383A; 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 { .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>
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
</template> </template>
<script> <script>
import { couponsTotalByDay } from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
import utils from '../../util/util'
import * as echarts from 'echarts' import * as echarts from 'echarts'
export default { export default {
name: '', name: '',
...@@ -13,51 +16,173 @@ export default { ...@@ -13,51 +16,173 @@ export default {
props: { props: {
echartId: { echartId: {
type: String, type: String,
default: '' default: '',
xAxisData: [],
getTotal: [],
usedTotal: [],
upgradeTotal: []
} }
}, },
mounted() { mounted() {
this.getOptions() this.initTIme()
}, },
methods: { methods: {
getOptions() { getOptions() {
var chartDom = document.getElementById(this.echartId) var chartDom = document.getElementById(this.echartId)
var myChart = echarts.init(chartDom) var myChart = echarts.init(chartDom)
var labelOption = {
show: false
}
var option = { var option = {
title:{ tooltip: {
show:true, trigger: 'axis',
text:'数量' axisPointer: {
type: 'shadow'
}
}, },
legend: {}, grid: {
tooltip: {}, height: '60%'
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]
]
}, },
xAxis: { type: 'category' }, legend: {
yAxis: { data: ['领券数', '核销数', '精品升级订单'],
axisLine: { 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, show: true,
lineStyle: { xAxisIndex: [0],
color: '#E8E8EA' 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) 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> </script>
<style> <style>
.chart-container { .chart-container {
height: 250px; width: 100%;
height: 300px;
} }
</style> </style>
<!-- 选择商品弹窗 --> <!-- 选择商品弹窗 -->
<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>
import * as echarts from 'echarts' import * as echarts from 'echarts'
import { couponsTotal } 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 {
nodata: false
}
}, },
props: { props: {
echartId: { echartId: {
type: String, type: String,
default: '' default: ''
}, }
}, },
mounted() { mounted() {
this.getOptions() this.initTIme()
}, },
methods: { methods: {
getOptions() { getOptions(res) {
var chartDom = document.getElementById(this.echartId) var chartDom = document.getElementById(this.echartId)
var myChart = echarts.init(chartDom) var myChart = echarts.init(chartDom)
var option = { var option = {
color: ['#5850FF', '#9191FF', '#CBCBFF'],
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: '{a} <br/>{b} : {c}%' formatter: '{a} <br/>{b}'
}, },
series: [ series: [
{ {
name: 'Funnel', name: '券统计',
type: 'funnel', type: 'funnel',
left: '10%', left: 'center',
top: 60, top: 60,
bottom: 60, bottom: 60,
width: '80%', width: '60%',
min: 0, min: 0,
max: 100, max: 100,
minSize: '50%', minSize: '50%',
maxSize: '100%', maxSize: '100%',
sort: 'descending', sort: 'descending',
gap: 2, gap: 15,
orient:"vertical", orient: 'vertical',
label: { label: {
show: true, show: true,
position: 'left' position: 'left',
// formatter: '{b}: {c}(张)',
textStyle: {
fontSize: 14
},
color: '#333'
}, },
labelLine: { labelLine: {
length: 20, length: 20,
...@@ -58,23 +72,42 @@ export default { ...@@ -58,23 +72,42 @@ export default {
}, },
itemStyle: { itemStyle: {
borderColor: '#fff', borderColor: '#fff',
borderWidth: 1 borderWidth: 1,
}, height: 37
emphasis: {
label: {
fontSize: 20
}
}, },
data: [ data: [
{ value: 60, name: 'Visit' }, { value: res.getTotal || 0, name: `发券总数:${res.getTotal || 0}(张)` },
{ value: 40, name: 'Inquiry' }, { value: res.usedTotal || 0, name: `核销总数:${res.usedTotal || 0}(张)` },
{ value: 20, name: 'Order' }, { value: res.upgradeTotal || 0, name: `转化订单数:${res.upgradeTotal || 0}(笔)` }
] ]
} }
] ]
} }
console.log(option);
option && myChart.setOption(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 @@ ...@@ -10,17 +10,19 @@
// let request = require('@/http/request.js') // let request = require('@/http/request.js')
let cfg = require('./conf.js') let cfg = require('./conf.js')
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
import { Http } from 'glsx-common'
export const fetchConfig = function(isEnv = true) { export const fetchConfig = function(isEnv = true) {
if (isEnv) { // if (isEnv) {
let { request } = cfg // let { request } = cfg
Object.assign(request, { timeout }) // Object.assign(request, { timeout })
return Promise.resolve(cfg) // return Promise.resolve(cfg)
} // }
//return window.fetch('https://', {}).then(res => res.json()) return new Http().get(' https://oss-config.test.glsx.com.cn/mock/618f5cc91072f92988f05a26/services/config')
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' }) //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 = { export const config = {
install(vue, cfg) { install(vue, cfg) {
vue.prototype.$config = cfg vue.prototype.$config = cfg
} }
} }
\ No newline at end of file \ No newline at end of file
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
const staticRoutes = Object.freeze([ const staticRoutes = Object.freeze([{
{ name: 'index',
name: 'InSale', path: '/inSale/index',
path: '/inSale/index', component: resolve => require([`@/views/inSale/index.vue`], resolve),
component: resolve => require([`@/views/inSale/index.vue`], resolve), meta: {}
meta: {} }, {
}, name: 'upgrade',
{ path: '/inSale/upgrade',
name: 'InSale', component: resolve => require([`@/views/inSale/upgrade.vue`], resolve),
path: '/inSale/upgrade', meta: {}
component: resolve => require([`@/views/inSale/upgrade.vue`], resolve), }, {
meta: {} name: 'guestComments',
}, path: '/inSale/guestComments',
{ component: resolve => require([`@/views/inSale/guestComments.vue`], resolve),
name: 'InSale', meta: {}
path: '/inSale/guestComments', }, {
component: resolve => require([`@/views/inSale/guestComments.vue`], resolve), name: 'accountRules',
meta: {} path: '/inSale/accountRules',
}, component: resolve => require([`@/views/inSale/accountRules.vue`], resolve),
{ meta: {}
name: 'InSale', },
path: '/inSale/accountRules', {
component: resolve => require([`@/views/inSale/accountRules.vue`], resolve), name: 'beforeSale',
meta: {} path: '/beforeSale/saleList',
}, component: resolve => require([`@/views/beforeSale/index.vue`], resolve),
{ meta: {}
name: 'beforeSale', } ])
path: '/beforeSale/saleList',
component: resolve => require([`@/views/beforeSale/index.vue`], resolve),
meta: {}
}
])
export default staticRoutes export default staticRoutes
...@@ -5,10 +5,13 @@ import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限 ...@@ -5,10 +5,13 @@ 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
Vue.use(GLTable) Vue.use(GLTable)
// Vue.use(Table)
// Vue.use(TableColumn)
export async function bootstrap({ history, common, messenger, globalState }) { export async function bootstrap({ history, common, messenger, globalState }) {
const { response, request, sign, secret } = await fetchConfig() const { response, request, sign, secret } = await fetchConfig()
Vue.prototype.$history = history Vue.prototype.$history = history
...@@ -18,7 +21,7 @@ export async function bootstrap({ history, common, messenger, globalState }) { ...@@ -18,7 +21,7 @@ export async function bootstrap({ history, common, messenger, globalState }) {
Vue.prototype.$message = message Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox Vue.prototype.$messageBox = messageBox
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) 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'] }) 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) const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData) routes = getRoutes(routesData)
...@@ -41,4 +44,4 @@ function subscribe({ messenger }) { ...@@ -41,4 +44,4 @@ function subscribe({ messenger }) {
messenger.subscribe(v => { messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v) console.log(`监听到子应用${v.from}发来消息:`, v)
}) })
} }
\ No newline at end of file \ 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 \ 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 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">尊敬的客户,您的分账规则于 #2021年10月1日 10:20#已经变更,新的规则将于 #2021年10月2日 00:00# 生效,修改人:管理员。</span> <span class="h10_title">尊敬的客户,您的分账规则于 #{{ updateTime }}#已经变更,新的规则将于 #{{ effectTime }}# 生效,修改人:{{ settleRule1.updatedBy }}。</span>
</div> </div>
<div class="drive_line"></div> <div v-if="updateTime" class="drive_line"></div>
<div class="content_wrap"> <div class="content_wrap">
<div class="time_widget"> <div class="time_widget">
<span class="h11_title">生效时间:2021年10月2日 00:00</span> <span class="h11_title">生效时间:{{ settleRule1.updatedDate }}</span>
<div class="time_status">生效中</div> <div v-if="settleRule1.enableFlag == 'N'" class="time_status">生效中</div>
<div v-if="settleRule1.enableFlag == 'Y'" class="time_status">已生效</div>
</div> </div>
<rule-table></rule-table> <rule-table :division="divisionRule1" :settle="settleRule1" :bankData="bankInfo"></rule-table>
</div> </div>
</div> </div>
<div class="list_wrapper"> <div v-if="!noList" class="list_wrapper">
<div class="find_wrap"> <div class="find_wrap">
<div class="date_wrap"> <div class="date_wrap">
<el-date-picker style="width: 160px" size="mini" v-model="startDate" type="date" placeholder="选择日期"></el-date-picker> <el-date-picker style="width: 160px" size="mini" v-model="startDate" type="date" placeholder="选择日期"></el-date-picker>
...@@ -23,36 +24,126 @@ ...@@ -23,36 +24,126 @@
<div class="date_wrap"> <div class="date_wrap">
<el-date-picker style="width: 160px" size="mini" v-model="endDate" type="date" placeholder="选择日期"></el-date-picker> <el-date-picker style="width: 160px" size="mini" v-model="endDate" type="date" placeholder="选择日期"></el-date-picker>
</div> </div>
<el-button size="mini" type="primary">查询</el-button> <el-button size="mini" type="primary" @click="toFindNote">查询</el-button>
<span class="tip_text">查看分润计算说明</span> <span class="tip_text" @click="computeShow = true">查看分润计算说明</span>
</div> </div>
<div class="timeLine_wrap"> <div class="timeLine_wrap">
<el-timeline> <el-timeline>
<template v-for="count in 5"> <template v-for="(item, index) in noteList">
<el-timeline-item :key="count" placement="top"> <el-timeline-item :key="index" placement="top">
<div slot="dot" class="dot_line"> <div slot="dot" class="dot_line">
<div class="icon"></div> <div class="icon"></div>
<span class="text">生效时间:2021年01月01日 00:00-至今</span> <span class="text">生效时间:{{ item.effectStartDate }}-{{ item.effectEndDate }}</span>
<div class="btn">生效中</div> <div class="btn">已生效</div>
<span v-if="count % 2 != 0" class="tip_text">点击查看详情</span> <span v-if="!item.show" class="tip_text" @click="showTable(item, index)">{{ item.show ? '收缩详情' : '点击查看详情' }}</span>
</div> </div>
<div v-if="count % 2 == 0" class="table_con"> <div v-if="item.show" class="table_con">
<rule-table></rule-table> <rule-table :division="item.divisionRule" :settle="item.settleRule"></rule-table>
</div> </div>
</el-timeline-item> </el-timeline-item>
</template> </template>
</el-timeline> </el-timeline>
<div class="showMoreBtn h7_title flex_cc"> <div v-if="noteList.length > 10" class="showMoreBtn h7_title flex_cc">
<span>查看更多</span> <span>查看更多</span>
<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>
<div v-if="nodata && noList" class="nodata_widget">
<div :style="[{ height: nodataHeight + 'px' }]" class="wrapper">
<img src="../../assets/nodata_icon.png" />
<span class="nodata_tip_1">您暂未开通精品升级服务</span>
<span class="nodata_tip_2">合作开通后,您方可在此页查看精品升级业务合作模式的分账规则,保障合作透明。</span>
</div>
<div :style="[{ height: stepHeight + 'px' }]" class="step_wrap">
<span class="nodata_tip_3">精品合作升级流程</span>
<div class="step flex_scb">
<div class="stepIcon flex_cc">1</div>
<div class="stepLine"></div>
<div class="stepIcon flex_cc">2</div>
<div class="stepLine"></div>
<div class="stepIcon flex_cc">3</div>
</div>
<div class="step_content flex_scb">
<span class="h13_title">联系嘀加精品业务经理,开通此业务</span>
<span class="h13_title">确定合作细则,销售专员转发精品礼券</span>
<span class="h13_title">车主完成精品升级,您获得分账收益</span>
</div>
</div>
</div>
<div v-if="nodata && noList" 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>
<el-dialog :visible.sync="computeShow" width="50%" :before-close="handleClose">
<div slot="title" class="dialogTitle">分润计算说明</div>
<div class="dialogContent">
<div class="wrap">
<div class="line_tip">
<div class="h7_title spac">财务配置:</div>
<div class="tip_box">
<span>4s店太阳膜按毛利的30%分润,4s店其他全部按30%分润;服务商太阳膜按70%分润,其他全部按70%分润,</span>
<p class="h16_title">太阳膜的商品成本为2元。</p>
</div>
</div>
<div class="line_tip">
<div class="h7_title spac">分账配置:</div>
<div class="tip_box">
<span>开启线上分账</span>
<div class="points_tip">
<span class="point"></span>
<span class="h17_title">嘀加智慧云分配:平台方分账金额,服务商分账金额,额外成本,市场费</span>
</div>
<div class="points_tip">
<span class="point"></span>
<span class="h17_title">导流方分配:导流方分账金额,产品成本</span>
</div>
</div>
</div>
</div>
<div class="wrap2">
<div class="icon_title">
<img class="icon" src="../../assets/scrm_changjin_icon.png" />
<span class="h18_title spac">场景搭配</span>
</div>
<div class="content1">
<p class="h17_title">场景1:车主购买太阳膜支付10元</p>
<p class="h17_title">POS机手续费¥0.04;实收¥9.96;分账金额¥9.94(支付金额统一按照0.6%扣除手续费)</p>
<p class="h17_title">导流方分润=¥2.38</p>
<p class="h17_title">服务商分润=¥3.89</p>
<p class="h17_title">平台方分润为=¥1.67</p>
</div>
<div class="content1 flex_scb">
<div class="con_box">
<p class="title1">假设分账设置:</p>
<p class="title2">导流方分:商品成本+导流方分润</p>
<p class="title2">嘀加智慧云分:平台方分润+服务商分润</p>
</div>
<div class="con_box">
<p class="title1">实际分账:</p>
<p class="title2">导流方=¥4.38</p>
<p class="title2">嘀加智慧云=¥5.58</p>
</div>
</div>
</div>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { converterApi } from '../../api/modules/converter'
import { getRulesData, getRulesListData } from '../../api/modules/rules'
import ruleTable from './ruleTable.vue' import ruleTable from './ruleTable.vue'
import utils from '../../util/util'
export default { export default {
name: '', name: '',
components: { components: {
...@@ -60,11 +151,114 @@ export default { ...@@ -60,11 +151,114 @@ export default {
}, },
data() { data() {
return { return {
startDate: '' startDate: '',
endDate: '',
settleRule1: '',
updateTime: null,
effectTime: null,
updatedBy: '',
divisionRule1: null,
noteList: [],
bankInfo: null,
pageSize: 10,
currentPage: 1,
computeShow: false,
accountLevel: 1,
nodata: true,
noList: true,
nodataHeight: 460,
stepHeight: 288
}
},
mounted() {
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)
} }
let clientHeight = document.documentElement.clientHeight
this.nodataHeight = clientHeight * 0.5
this.stepHeight = clientHeight - clientHeight * 0.5 - 133
}, },
mounted() {}, methods: {
methods: {} // 获取分账规则
getRulesDataList(merchantId) {
let method = getRulesData()
let para = {
//44209532
routerMethod: method,
merchantId
}
converterApi(para).then(res => {
this.bankInfo = res.bankInfo
this.divisionRule1 = res.divisionRule1
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
let updatedDateTemp2 = res.settleRule2.updatedDate
let update = updatedDateTemp1 > updatedDateTemp2 ? updatedDateTemp1 : updatedDateTemp2
let temp = new Date(update).getTime() + 24 * 60 * 60 * 1000
this.updateTime = utils.dateFormat(update)
this.effectTime = utils.dateFormat(temp) + ' ' + '00:00'
this.updatedBy = res.settleRule2.updatedBy
}
if (res.settleRule1) {
this.settleRule1.updatedDate = utils.dateFormat(res.settleRule1.updatedDate)
}
})
},
// 获取分账记录
getRuleNote(merchantId) {
let method = getRulesListData()
let para = {
routerMethod: method,
currentPage: this.currentPage,
pageSize: this.pageSize,
merchantId
}
if (this.startDate) {
para.beginDateStr = this.startDate
}
if (this.endDate) {
para.endDateStr = this.endDate
}
converterApi(para).then(res => {
if (res.list.length) {
this.noteList = res.list.map(item => {
item.show = false
return item
})
this.noteList[0].show = true
this.noList = false
} else {
this.noteList = []
this.noList = true
}
})
},
// 展示分账记录表格
showTable(item, index) {
this.noteList[index].show = !item
},
// 查询
toFindNote() {
this.getRuleNote(this.merchantId)
},
// 关闭弹框
handleClose() {
this.computeShow = false
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -73,10 +267,11 @@ export default { ...@@ -73,10 +267,11 @@ export default {
// } // }
.top_wrapper { .top_wrapper {
width: 100%; width: 100%;
height: 520px; // min-height: 520px;
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;
padding-bottom: 15px;
.tip_line { .tip_line {
box-sizing: border-box; box-sizing: border-box;
padding: 22px 20px 25px 20px; padding: 22px 20px 25px 20px;
...@@ -197,4 +392,204 @@ export default { ...@@ -197,4 +392,204 @@ export default {
} }
} }
} }
.dialogTitle {
font-size: 20px;
font-weight: bold;
color: #333333;
}
.dialogContent {
.wrap {
background: #f6f6f7;
box-sizing: border-box;
padding: 17px 0 7px 15px;
}
.line_tip {
display: flex;
margin-bottom: 10px;
.tip_box {
font-size: 12px;
font-weight: 400;
color: #333333;
line-height: 20px;
.points_tip {
display: flex;
align-items: center;
.point {
width: 6px;
height: 6px;
background: #5850ff;
border-radius: 50%;
margin-right: 5px;
}
}
}
.spac {
font-weight: bold;
line-height: 20px;
}
}
.wrap2 {
margin-top: 20px;
.icon_title {
display: flex;
align-items: center;
}
.icon {
width: 20px;
height: 20px;
margin-right: 5px;
}
.spac {
font-weight: bold;
}
.content1 {
margin-top: 10px;
box-sizing: border-box;
padding: 0px 25px;
.con_box {
width: calc(50% - 5.5px);
height: 82px;
border: 1px solid #ededed;
box-sizing: border-box;
padding: 15px 20px;
> p {
margin-bottom: 5px;
}
.title1 {
font-size: 12px;
font-weight: 600;
color: #333333;
line-height: 17px;
}
.title2 {
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
}
}
}
}
}
.no_data {
text-align: center;
padding: 20px 0;
}
.nodata_widget {
margin-top: 17px;
.wrapper {
width: 100%;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
// padding: 150px 0 145px 0;
overflow: hidden;
.nodata_tip_1 {
font-size: 18px;
font-weight: 500;
color: #3a3a3a;
margin-top: 48px;
}
.nodata_tip_2 {
font-size: 14px;
font-weight: 400;
color: #3a3a3a;
margin-top: 9px;
}
}
.step_wrap {
width: 100%;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
margin-top: 10px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.nodata_tip_3 {
font-size: 16px;
font-weight: 500;
color: #000000;
margin-bottom: 40px;
}
.step,
.step_content {
width: 100%;
box-sizing: border-box;
padding: 0 50px;
}
.step {
padding: 0 146px;
}
.step_content {
margin-top: 22px;
}
.stepLine {
width: 42%;
height: 1px;
background: #1890ff;
}
.stepIcon {
width: 32px;
height: 32px;
background: #5850ff;
font-size: 14px;
font-weight: 400;
color: #ffffff;
border-radius: 50%;
}
}
}
.qrcode_wrap {
position: fixed;
right: 0;
bottom: 182px;
width: 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> </style>
\ No newline at end of file \ 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 \ No newline at end of file
<template>
<div class="order-container">
<div class="find_wrap">
<div class="find_line">
<div class="cell_item">
<div class="cell_label h13_title">客户姓名</div>
<el-input class="myfindWidth" size="mini" clearable placeholder="请输入" suffix-icon="el-icon-search" v-model="customName"></el-input>
</div>
<div class="cell_item">
<div class="cell_label h13_title">核销状态</div>
<el-select class="myfindWidth" clearable size="mini" v-model="hxstatus" placeholder="请选择">
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div class="cell_item">
<div class="cell_label h13_title">领用时间</div>
<el-date-picker class="myfindWidth" clearable size="mini" v-model="dateBetween" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
<div class="cell_btn_item">
<el-button size="mini" @click="toshowDialog">查看礼券</el-button>
<el-button size="mini" @click="toExport">导出数据</el-button>
</div>
</div>
<div style="height: 18px"></div>
<div class="find_line">
<div class="cell_item">
<my-drop-menu ref="dropMenu1" :options="employeeNameList" @getValue="changeEmploy">
<div slot="right_con">
<el-select style="width: 190px" clearable class="myfindWidth" size="mini" v-model="employeeName" placeholder="请选择">
<el-option v-for="item in employeeNameData" :key="item" :label="item" :value="item"></el-option>
</el-select>
</div>
</my-drop-menu>
</div>
<div class="cell_item">
<div class="cell_label h13_title">核销时间</div>
<el-date-picker class="myfindWidth" clearable size="mini" v-model="hxdateBetween" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
<div class="cell_item">
<div class="cell_label h13_title">手机号</div>
<el-input class="myfindWidth" clearable size="mini" placeholder="请输入" suffix-icon="el-icon-search" v-model="phoneNum"></el-input>
</div>
<div class="cell_btn_item">
<el-button class="cell_btn" size="mini" @click="clearFind">重置</el-button>
<el-button class="cell_btn" size="mini" type="primary" @click="toHandlerFindParam">查询</el-button>
</div>
</div>
</div>
<div class="table_wrap">
<GLTable ref="table" :hasNum="false" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="toGetCouponsList"></GLTable>
</div>
<el-dialog width="60%" :visible.sync="dialogTableVisible">
<div slot="title" class="customTitle">
<div class="title1">共计{{ tabletotal1 }}条数据</div>
<span class="h9_title">门店新车精品礼券由</span>
<span class="title2">专属顾问</span>
<span class="h9_title">进行配置,如需新增详情请联系管理员</span>
</div>
<GLTable ref="table1" :tableTotal="tableTotal1" :hasNum="false" :tableData="tableData1" :tableParams="tableParams1" @refreshTable="toOpenCoupons"></GLTable>
</el-dialog>
</div>
</template>
<script>
import myDropMenu from '../../components/down-menu/index.vue'
import { findCoupons, checkCoupons, exportCoupons, getEmployName } from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
import utils from '../../util/util'
export default {
name: '',
components: {
'my-drop-menu': myDropMenu
},
data() {
return {
layout: 'sizes, prev, pager, next, jumper, ->, total',
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
tableOption: false,
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '领用时间',
prop: 'createdDate'
},
{
label: '客户姓名',
prop: 'customerName'
},
{
label: '手机号',
prop: 'customerPhone'
},
{
label: '礼券名称',
prop: 'couponName'
},
{
label: '发券人',
prop: 'employeeName'
},
{
label: '核销状态',
prop: 'status',
width: '100px'
},
{
label: '核销人',
prop: 'sellerName'
},
{
label: '核销时间',
prop: 'usedTime'
}
]
},
tableParams1: {
tableOption: false,
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '礼券批次号',
prop: 'merchantCouponCode'
},
{
label: '礼券名称',
prop: 'couponName'
},
{
label: '适用产品',
prop: 'couponTypeName'
},
{
label: '总数',
prop: 'amount'
},
{
label: '余量',
prop: 'remainAmount'
},
{
label: '发放',
prop: 'getAmount',
width: '100px'
},
{
label: '核销',
prop: 'usedAmount'
},
{
label: '配置时间',
prop: 'createdDate'
}
]
},
tableData: [],
tableData1: [],
tableTotal: 0,
tabletotal1: 0,
statusList: [
{
value: 'Y',
label: '已核销'
},
{
value: 'N',
label: '待核销'
}
],
employeeNameList: [
{
label: '发券人',
value: '1'
},
{
label: '转化人',
value: '2'
}
],
employeeNameData: [],
dialogTableVisible: false,
currentPage1: 1,
pageSize1: 10,
// 查询条件
customName: '',
hxstatus: '',
dateBetween: '',
columType: 0,
hxdateBetween: '',
phoneNum: '',
employeeName:'',
}
},
mounted() {
this.toGetCouponsList()
this.toOpenCoupons()
},
methods: {
// 发券人切换
changeEmploy(e) {
this.columType = e
this.getEmployNameList(e)
},
clearFind() {
let params = {}
this.customName = ''
this.hxstatus = ''
this.dateBetween = ''
this.columType = ''
this.hxdateBetween = ''
this.phoneNum = ''
this.employeeName = ''
this.toGetCouponsList(params)
},
// 处理查询条件
toHandlerFindParam() {
let params = {}
if (this.customName) {
//客户姓名
params.customerName = this.customName
}
if (this.hxstatus) {
//核销状态
params['usedFlagList[0]'] = this.hxstatus
}
if (this.dateBetween) {
//领用时间
let startDate = utils.dateFormat(this.dateBetween[0])
let endDate = utils.dateFormat(this.dateBetween[1])
params.startDate = startDate
params.endDate = endDate
}
if (this.columType&&this.employeeName) {
//发券人
params.columType = this.columType
}
if(this.employeeName&&this.columType){
params['employeeNameList[0]'] = this.employeeName
}
if (this.hxdateBetween) {
// 核销时间
let startDate = utils.dateFormat(this.hxdateBetween[0])
let endDate = utils.dateFormat(this.hxdateBetween[1])
params.startUsedTime = startDate
params.endUsedTime = endDate
}
if (this.phoneNum) {
// 手机号
params.customerPhone = this.phoneNum
}
this.toGetCouponsList(params)
},
toshowDialog() {
this.dialogTableVisible = true
},
toGetCouponsList(params = {}) {
let method = findCoupons()
let para = {
routerMethod: method,
currentPage: this.$refs.table.page.pageNum,
pageSize: this.$refs.table.page.pageSize,
...params
}
converterApi(para).then(res => {
this.tableData = res.list.map(item => {
item.createdDate = utils.dateFormat(item.createdDate)
item.usedTime = item.usedTime ? utils.dateFormat(item.usedTime) : '--'
item.status = item.usedFlag == 'Y' ? '已核销' : '待核销'
item.sellerName = item.sellerName || '--'
return item
})
this.tableTotal = res.total
this.httpParam = {
currentPage: this.$refs.table.page.pageNum,
pageSize: this.$refs.table.page.pageSize,
...params
}
})
},
toOpenCoupons() {
const { session } = this.$globalState
let merchantId = session.merchantId
let method = checkCoupons()
let para = {
routerMethod: method,
currentPage: this.dialogTableVisible ? this.$refs.table1.page.pageNum : 1,
pageSize: this.dialogTableVisible ? this.$refs.table1.page.pageSize : 10,
merchantId: 44209532
}
converterApi(para).then(res => {
this.tabletotal1 = res.total
this.tableData1 = res.list.map(item => {
item.createdDate = item.createdDate ? utils.dateFormat(item.createdDate) : '--'
item.couponTypeName = item.couponInfo.couponTypeName
return item
})
})
},
toExport() {
let method = exportCoupons()
let para = {
routerMethod: method,
...this.httpParam
}
converterApi(para).then(res => {
let iframe = document.createElement('iframe')
iframe.style.display = "none"
iframe.src = res
document.body.appendChild(iframe)
})
},
// 获取发券人和转化人列表
getEmployNameList(type) {
let method = getEmployName()
let para = {
routerMethod: method,
columType: type,
currentPage: 1,
pageSize: 100
}
converterApi(para).then(res => {
this.employeeNameData = res
})
}
}
}
</script>
<style lang="scss" scoped>
.find_wrap {
padding-bottom: 17px;
.find_line {
padding: 0 15px;
overflow: hidden;
}
.cell_item {
margin-right: 30px;
}
.find_line,
.cell_item {
display: flex;
align-items: center;
.cell_label {
width: 56px;
text-align: right;
padding-right: 15px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.mybtn {
width: 120px;
height: 26px;
background: #ffffff;
border-radius: 4px 0px 0px 4px;
border: 1px solid #e8e8ea;
cursor: pointer;
border-right: none;
> i {
margin-left: 5px;
font-size: 5px;
}
}
.myfindWidth {
width: 215px;
}
.myfindWidth1 {
width: 166px;
}
}
.cell_btn_item {
display: flex;
align-items: center;
justify-content: flex-end;
.cell_btn {
width: 78px;
}
.cell_btn_max {
width: 156px;
}
}
}
.table_wrap {
padding: 0 15px;
padding-bottom: 10px;
}
.customTitle {
display: flex;
align-items: center;
.title1 {
font-size: 20px;
font-weight: 500;
color: #333333;
margin-right: 11px;
}
.title2 {
font-size: 14px;
font-weight: 400;
color: #5850ff;
}
}
</style>
<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>7878</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">(累计)施工完成客户数:10000</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>7878</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>
...@@ -30,13 +30,13 @@ ...@@ -30,13 +30,13 @@
<div class="box_1 box_2 flex-ca"> <div class="box_1 box_2 flex-ca">
<div class="box_con"> <div class="box_con">
<div class="circle_wrap"> <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> </div>
<span class="h7_title">客户评价率</span> <span class="h7_title">客户评价率</span>
</div> </div>
<div class="box_con"> <div class="box_con">
<div class="circle_wrap"> <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> </div>
<span class="h7_title">客户好评率</span> <span class="h7_title">客户好评率</span>
</div> </div>
...@@ -55,24 +55,45 @@ ...@@ -55,24 +55,45 @@
<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 { converterApi } from '../../api/modules/converter'
export default { export default {
name: '', name: '',
data() { data() {
return {} return {
messageData: {},
accountLevel: 4
}
},
created() {
const { session } = this.$globalState
this.accountLevel = session.accountLevel
this.getCompentData()
}, },
mounted() {}, mounted() {},
methods: {} methods: {
// 获取客户评价
getCompentData() {
let method = guestComTotal()
let para = {
routerMethod: method
}
converterApi(para).then(res => {
this.messageData = res
})
}
}
} }
</script> </script>
<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;
...@@ -151,8 +172,8 @@ export default { ...@@ -151,8 +172,8 @@ 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;
} }
} }
} }
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
</template> </template>
<script> <script>
import {isOpenUpgrade} from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
export default { export default {
name: 'index', name: 'index',
data() { data() {
...@@ -12,13 +14,23 @@ export default { ...@@ -12,13 +14,23 @@ export default {
}, },
created() { created() {
// 默认进入精品升级页面 // 默认进入精品升级页面
this.$router.push('/inSale/upgrade') this.judgeOpen()
}, },
mounted() { 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> </script>
<template>
<div class="order-container">
<div class="tip_wrap flex_scb">
<div class="tip_text">
<p class="h14_title">合作了精品升级业务且开启了自动分账功能的商户,在“线上分账”列表中可查看分账明细,未开启线上自动分账或者因各种</p>
<div style="height: 10px"></div>
<p class="h14_title">其他因素导致未分账成功的,在线下对账中查看,统一下个月月初结算上个月订单。</p>
</div>
<div class="tip_btn flex_scb">
<el-button size="mini" :type="curDivisionType == 2 ? 'primary' : ''" @click="changDivisionType(2)">线上分账</el-button>
<el-button size="mini" :type="curDivisionType == 1 ? 'primary' : ''" @click="changDivisionType(1)">线下分账</el-button>
</div>
</div>
<div class="tip_wrap_line"></div>
<div class="find_wrap">
<div class="find_line">
<div class="cell_item">
<my-drop-menu :options="timeOptions" :leftName="timeChangeName" @getValue="timeChange">
<div slot="right_con">
<el-date-picker class="myfindWidth" size="mini" clearable v-model="timeBetwean" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
</my-drop-menu>
</div>
<div class="cell_item">
<div class="cell_label h13_title">分账状态</div>
<el-select style="width: 166px" class="myfindWidth" clearable size="mini" v-model="divisionTypeStatus" placeholder="请选择">
<el-option v-for="item in disivionOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div class="cell_item">
<my-drop-menu :leftName="orderNumName" :options="numOptions" @getValue="changeNOFind">
<div slot="right_con">
<el-input style="width: 166px" class="myfindWidth" clearable size="mini" placeholder="请输入" v-model="orderNum"></el-input>
</div>
</my-drop-menu>
</div>
<div class="cell_btn_item" style="width: 180px">
<el-button class="cell_btn_max" size="mini" @click="toExport">导出数据</el-button>
</div>
</div>
<div style="height: 18px"></div>
<div class="find_line flex_scb">
<el-input style="width: 286px" size="mini" clearable v-model="goodsName" placeholder="请输入查询的商品名称"></el-input>
<div class="cell_btn_item">
<el-button class="cell_btn" size="mini" @click="clearFind">重置</el-button>
<el-button class="cell_btn" size="mini" type="primary" @click="handlerParams">查询</el-button>
</div>
</div>
</div>
<div class="table_wrap">
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="toGetMyDivision"></GLTable>
</div>
</div>
</template>
<script>
import myDropMenu from '../../components/down-menu/index.vue'
import { mydivision, exportMydivision } from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
import utils from '../../util/util'
const divistionStatus = ['待分账', '分账中', '分账成功', '分账失败']
export default {
name: '',
components: {
'my-drop-menu': myDropMenu
},
data() {
return {
timeOptions: [
{
value: 1,
label: '分账时间'
},
{
value: 2,
label: '支付时间'
}
],
timeChangeName: '分账时间',
disivionOptions: [
{
value: 1,
label: '待分账'
},
{
value: 2,
label: '分账中'
},
{
value: 3,
label: '分账成功'
},
{
value: 4,
label: '分账失败'
}
],
numOptions: [
{
value: 1,
label: '主订单编号'
},
{
value: 2,
label: '交易参考号'
}
],
orderNumName: '主订单编号',
layout: 'sizes, prev, pager, next, jumper, ->, total',
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableTotal: 0,
tableParams2: {
tableOption: false,
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '主订单编号',
prop: 'orderCode',
width: '200px'
},
{
label: '子订单编号',
prop: 'subOrderCode',
width: '200px'
},
{
label: '客户姓名',
prop: 'customerName',
width: '110px'
},
{
label: '车架号',
prop: 'standNo',
width: '110px'
},
{
label: '分账账户',
prop: 'realityMerchantName',
width: '200px'
},
{
label: '总分账金额(元)',
prop: 'divisionMoney',
width: '110px'
},
{
label: '导流方名称',
prop: 'merchantName',
width: '200px'
},
{
label: '园区店名',
prop: 'sellerMerchantName',
width: '200px'
},
{
label: '分账类型',
prop: 'divisionTypeName',
width: '110px'
},
{
label: '分账状态',
prop: 'divisionStatusName',
width: '110px'
},
{
label: '分账时间',
prop: 'divisionDate',
width: '110px'
},
{
label: '支付时间',
prop: 'successDate',
width: '110px'
},
{
label: '商品编号',
prop: 'upgradeGoodsCommodityCode',
width: '200px'
},
{
label: '商品名称',
prop: 'upgradeGoodsName',
width: '200px'
}
]
},
tableParams1: {
tableOption: false,
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '主订单编号',
prop: 'orderCode',
width: '200px'
},
{
label: '子订单编号',
prop: 'subOrderCode',
width: '200px'
},
{
label: '客户姓名',
prop: 'customerName',
width: '110px'
},
{
label: '车架号',
prop: 'standNo',
width: '110px'
},
{
label: '分账账户',
prop: 'realityMerchantName',
width: '200px'
},
{
label: '总分账金额(元)',
prop: 'divisionMoney',
width: '110px'
},
{
label: '导流方名称',
prop: 'merchantName',
width: '200px'
},
{
label: '园区店名',
prop: 'sellerMerchantName',
width: '200px'
},
{
label: '分账类型',
prop: 'divisionTypeName',
width: '110px'
},
{
label: '支付时间',
prop: 'successDate',
width: '110px'
},
{
label: '商品编号',
prop: 'upgradeGoodsCommodityCode',
width: '200px'
},
{
label: '商品名称',
prop: 'upgradeGoodsName',
width: '200px'
}
]
},
curDivisionType: 2,
tableData: [],
tableParams: {},
// 查询参数
timeChangeType: 1,
timeBetwean: '',
divisionTypeStatus: '',
orderNum: '',
goodsName: ''
}
},
created() {
this.tableParams = this.tableParams2
},
mounted() {
this.toGetMyDivision()
},
methods: {
changeNOFind(e) {
this.orderNumType = e
this.orderNumName = e == 1 ? '主订单编号' : '交易参考号'
this.orderNum = ''
},
clearFind(){
this.timeBetwean = ''
this.divisionTypeStatus = ''
this.orderNum = ''
this.goodsName = ''
this.toGetMyDivision()
},
handlerParams() {
let params = {}
if (this.timeBetwean) {
let startDate = utils.dateFormat(this.timeBetwean[0])
let endDate = utils.dateFormat(this.timeBetwean[1])
if (this.timeChangeType == 1) {
params.divisionStartDate = startDate
params.divisionEndDate = endDate
} else {
params.successDateStartDate = startDate
params.successDateEndDate = endDate
}
}
if (this.divisionTypeStatus) {
params.divisionStatus = this.divisionTypeStatus
}
//主订单编号---交易参考号
if (this.orderNum) {
if (this.orderNumType == 1) {
params.orderCode = this.orderNum
} else {
params.tradeNo = this.orderNum
}
}
if (this.goodsName) {
params.goodsName = this.goodsName
}
this.toGetMyDivision(params)
},
timeChange(e) {
this.timeChangeType = e
this.timeChangeName = e == 1 ? '分账时间' : '支付时间'
},
changDivisionType(type) {
this.curDivisionType = type
this.tableParams = type == 1 ? this.tableParams1 : this.tableParams2
this.toGetMyDivision()
},
toGetMyDivision(params={}) {
// const { session } = this.$globalState
let method = mydivision()
let para = {
routerMethod: method,
currentPage: this.$refs.table.page.pageNum,
pageSize: this.$refs.table.page.pageSize,
divisionType: this.curDivisionType,
...params
// channelType
}
converterApi(para).then(res => {
res.list.map(item => {
item.sellerMerchantName = item.goodsOrder.sellerMerchantName
item.divisionTypeName = item.divisionType == 1 ? '线下对账' : '线上对账'
item.successDate = item.payOrder.successDate ? utils.dateFormat(item.payOrder.successDate) : '--'
item.divisionDate = item.orderDivision.divisionDate ? utils.dateFormat(item.orderDivision.divisionDate) : '--'
item.upgradeGoodsCommodityCode = item.goodsSubOrder.upgradeGoodsCommodityCode
item.upgradeGoodsName = item.goodsSubOrder.upgradeGoodsName
item.divisionStatusName = divistionStatus[item.orderDivision.divisionStatus - 1]
item.customerName = item.customerName || '--'
item.standNo = item.standNo || '--'
return item
})
this.tableData = res.list
this.tableTotal = res.total
this.httpParam = {
currentPage: this.$refs.table.page.pageNum,
pageSize: this.$refs.table.page.pageSize,
divisionType: this.curDivisionType,
...params
}
})
},
toExport() {
let method = exportMydivision()
let para = {
routerMethod: method,
...this.httpParam
}
converterApi(para).then(res => {
let iframe = document.createElement('iframe')
iframe.style.display = "none"
iframe.src = res
document.body.appendChild(iframe)
})
}
}
}
</script>
<style lang="scss" scoped>
// 精品礼券
.find_wrap {
padding-bottom: 17px;
.find_line {
padding: 0 15px;
overflow: hidden;
}
.cell_item {
margin-right: 30px;
}
.find_line,
.cell_item {
display: flex;
align-items: center;
.cell_label {
width: 56px;
text-align: right;
padding-right: 15px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.mybtn {
width: 120px;
height: 26px;
background: #ffffff;
border-radius: 4px 0px 0px 4px;
border: 1px solid #e8e8ea;
cursor: pointer;
border-right: none;
> i {
margin-left: 5px;
font-size: 5px;
}
}
.myfindWidth {
width: 215px;
}
.myfindWidth1 {
width: 166px;
}
}
.cell_btn_item {
display: flex;
align-items: center;
justify-content: flex-end;
.cell_btn {
width: 78px;
}
.cell_btn_max {
width: 156px;
}
}
}
.table_wrap {
padding: 0 15px;
padding-bottom: 10px;
}
// 我的分账
.tip_wrap {
box-sizing: border-box;
padding: 5px 15px 22px 15px;
}
.tip_wrap_line {
margin: 0 15px;
height: 1px;
background: #e8e8ea;
margin-bottom: 20px;
}
</style>
...@@ -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,10 +212,10 @@ export default { ...@@ -202,10 +212,10 @@ 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>
...@@ -6,27 +6,33 @@ ...@@ -6,27 +6,33 @@
<div class="title_wrap"> <div class="title_wrap">
<img class="icon1" src="../../assets/money_icon.png" /> <img class="icon1" src="../../assets/money_icon.png" />
<span class="h3_title">累计产值</span> <span class="h3_title">累计产值</span>
<img class="icon cur" src="../../assets/intro.png" /> <img class="icon cur" @mouseenter="showTip = true" @mouseleave="showTip = false" src="../../assets/intro.png" />
<div v-if="showTip" class="tipContentClass">
<div class="title">说明</div>
<p class="h20_title">总产值为门店的精品升级业务该获得的 分账金额总和,包括线上分账和线下对 账,但分账金额不明确订单不算入统计。</p>
<div class="single"></div>
<div class="single1"></div>
</div>
</div> </div>
<div class="price_max"> <div class="price_max">
<span class="h8_title">¥--.--</span> <span class="h8_title">¥{{ productValueInfo.divisionMoney || '--.--' }}</span>
</div> </div>
<span class="text_tip h12_title">低于基准线</span> <span class="text_tip h12_title">低于基准线</span>
<span class="text_tip_price h13_title">昨日产值:¥--.--</span> <span class="text_tip_price h13_title">昨日产值:¥{{ productValueInfo.yesterdayDivisionMoney || '--.--' }}</span>
<span class="text_tip_price1 h13_title">今日产值:¥--.--</span> <span class="text_tip_price1 h13_title">今日产值:¥{{ productValueInfo.todayDivisionMoney || '--.--' }}</span>
<span class="text_tip_price2 h13_title">行业均值(单店):¥--.--</span> <span class="text_tip_price2 h13_title">行业均值(单店):¥{{ productValueInfo.totalDivisionMoney || '--.--' }}</span>
<span class="text_tip_price3 h13_title">累计利润:¥--.--</span> <span class="text_tip_price3 h13_title">累计利润:¥{{ productValueInfo.profitMoney || '--.--' }}</span>
<span class="text_tip_price4 h13_title">昨日利润:¥--.--</span> <span class="text_tip_price4 h13_title">昨日利润:¥{{ productValueInfo.yesterdayProfitMoney || '--.--' }}</span>
</div> </div>
<div class="wrap"> <div class="wrap">
<div class="date_line"> <div class="date_line">
<el-button size="mini" type="primary">统计时间</el-button> <el-button size="mini" type="primary" @click="toFindChart">统计时间</el-button>
<div class="date_wrap"> <div class="date_wrap">
<el-date-picker style="width: 160px" size="mini" v-model="startDate" :type="dateType" :placeholder="dateplaceholder"></el-date-picker> <el-date-picker style="width: 160px" size="mini" v-model="chartStartDate" :type="dateType" :placeholder="dateplaceholder" @change="getChartStartTime"></el-date-picker>
</div> </div>
<div class="drive_w"></div> <div class="drive_w"></div>
<div class="date_wrap"> <div class="date_wrap">
<el-date-picker style="width: 160px" size="mini" v-model="endDate" :type="dateType" :placeholder="dateplaceholder"></el-date-picker> <el-date-picker style="width: 160px" size="mini" v-model="chartEndDate" :type="dateType" :placeholder="dateplaceholder" @change="getChartEndTime"></el-date-picker>
</div> </div>
<div class="drive_w"></div> <div class="drive_w"></div>
<el-button size="mini" type="primary" @click="toChangeMonth">按月</el-button> <el-button size="mini" type="primary" @click="toChangeMonth">按月</el-button>
...@@ -34,26 +40,33 @@ ...@@ -34,26 +40,33 @@
<el-button size="mini" type="primary" @click="toChangeDay">按日</el-button> <el-button size="mini" type="primary" @click="toChangeDay">按日</el-button>
</div> </div>
<div class="funnle_chart_wrap"> <div class="funnle_chart_wrap">
<funnel echartId="my-funnel"></funnel> <funnel ref="myFunnel" echartId="my-funnel"></funnel>
</div> </div>
</div> </div>
</div> </div>
<div class="mian_line"></div> <div v-if="accountLevel == 4" class="mian_line"></div>
<div class="bottom_widget"> <div v-if="accountLevel != 4" class="mian_line2"></div>
<div v-if="accountLevel == 4" class="bottom_widget">
<div class="chart_wrapper"> <div class="chart_wrapper">
<bar-chart echartId="my-bar"></bar-chart> <bar-chart echartId="mybar"></bar-chart>
</div> </div>
<div class="chart_wrapper"> <div class="chart_wrapper">
<bar-chart echartId="my-bar1"></bar-chart> <line-chart echartId="myline"></line-chart>
</div> </div>
<div class="mid_line"></div> <div class="mid_line"></div>
<div class="showMoreBtn h7_title flex_cc"> <div class="showMoreBtn h7_title flex_cc" @click="toChangeShowMoreBtn(showMore)">
<span>{{ showMore ? '收缩详情' : '查看详情' }}</span> <span>{{ showMore ? '收缩详情' : '查看详情' }}</span>
<img class="icon" src="../../assets/down_icon.png" /> <img class="icon" src="../../assets/down_icon.png" />
</div> </div>
</div> </div>
<template v-if="accountLevel != 4">
<bloc-con ref="mybloc" :show="openRankFlag" @showRanking="toOpenRanking"></bloc-con>
</template>
</div> </div>
<div class="box_bg_wrap mini_margin"> <template v-if="accountLevel != 4">
<ranking :show="openRankFlag" @closeRank="toCloseRanking"></ranking>
</template>
<div v-if="showMore" class="box_bg_wrap mini_margin">
<div class="tab_wrap"> <div class="tab_wrap">
<template v-for="(item, index) in tabList"> <template v-for="(item, index) in tabList">
<div :key="index" class="tab_element_wrap" @click="changeTab(index)"> <div :key="index" class="tab_element_wrap" @click="changeTab(index)">
...@@ -61,148 +74,24 @@ ...@@ -61,148 +74,24 @@
</div> </div>
</template> </template>
</div> </div>
<template v-if="curTabIndex == 0"> <template v-if="accountLevel == 4">
<div class="find_wrap"> <template v-if="curTabIndex == 0">
<div class="find_line"> <coupons-order></coupons-order>
<div class="cell_item"> </template>
<div class="cell_label h13_title">客户姓名</div> <template v-if="curTabIndex == 1">
<el-input class="myfindWidth" size="mini" placeholder="请输入" suffix-icon="el-icon-search" v-model="customName"></el-input> <upgrade-order></upgrade-order>
</div> </template>
<div class="cell_item"> <template v-if="curTabIndex == 2">
<div class="cell_label h13_title">核销状态</div> <my-fashionable-order></my-fashionable-order>
<el-select class="myfindWidth" size="mini" v-model="hxstatus" placeholder="请选择"> </template>
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div class="cell_item">
<div class="cell_label h13_title">领用时间</div>
<el-date-picker class="myfindWidth" size="mini" v-model="dateBetween" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
<div class="cell_btn_item">
<el-button size="mini">查看礼券</el-button>
<el-button size="mini">导出数据</el-button>
</div>
</div>
<div style="height: 18px"></div>
<div class="find_line">
<div class="cell_item">
<my-drop-menu leftName="发券人">
<div slot="right_con">
<el-select style="width: 190px" class="myfindWidth" size="mini" v-model="hxstatus" placeholder="请选择">
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
</my-drop-menu>
</div>
<div class="cell_item">
<div class="cell_label h13_title">核销时间</div>
<el-date-picker class="myfindWidth" size="mini" v-model="hxdateBetween" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
<div class="cell_item">
<div class="cell_label h13_title">手机号</div>
<el-input class="myfindWidth" size="mini" placeholder="请输入" suffix-icon="el-icon-search" v-model="phoneNum"></el-input>
</div>
<div class="cell_btn_item">
<el-button class="cell_btn" size="mini">重置</el-button>
<el-button class="cell_btn" size="mini" type="primary">查询</el-button>
</div>
</div>
</div>
<div class="table_wrap">
<GLTable ref="table" :hasNum="false" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="getTableData"></GLTable>
</div>
</template>
<template v-if="curTabIndex == 1">
<div class="find_wrap">
<div class="find_line">
<div class="cell_item">
<my-drop-menu>
<div slot="right_con">
<el-date-picker class="myfindWidth" size="mini" v-model="dateBetween" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
</my-drop-menu>
</div>
<div class="cell_item">
<div class="cell_label h13_title">分账状态</div>
<el-select style="width: 166px" class="myfindWidth" size="mini" v-model="hxstatus" placeholder="请选择">
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div class="cell_item">
<my-drop-menu leftName="主订单编号">
<div slot="right_con">
<el-input style="width: 166px" class="myfindWidth" size="mini" placeholder="请输入" v-model="orderNum"></el-input>
</div>
</my-drop-menu>
</div>
<div class="cell_btn_item" style="width: 180px">
<el-button class="cell_btn_max" size="mini">导出数据</el-button>
</div>
</div>
<div style="height: 18px"></div>
<div class="find_line flex_scb">
<el-input style="width: 286px" size="mini" v-model="goodsName" placeholder="请输入查询的商品名称"></el-input>
<div class="cell_btn_item">
<el-button class="cell_btn" size="mini">重置</el-button>
<el-button class="cell_btn" size="mini" type="primary">查询</el-button>
</div>
</div>
</div>
<div class="table_wrap">
<GLTable ref="table1" :isCustomHead="true" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams2" @refreshTable="getTableData"></GLTable>
</div>
</template> </template>
<template v-if="curTabIndex == 2"> <template v-if="accountLevel != 4">
<div class="tip_wrap flex_scb"> <template v-if="curTabIndex == 0">
<div class="tip_text"> <upgrade-order></upgrade-order>
<p class="h14_title">合作了精品升级业务且开启了自动分账功能的商户,在“线上分账”列表中可查看分账明细,未开启线上自动分账或者因各种</p> </template>
<div style="height: 10px"></div> <template v-if="curTabIndex == 1">
<p class="h14_title">其他因素导致未分账成功的,在线下对账中查看,统一下个月月初结算上个月订单。</p> <my-fashionable-order></my-fashionable-order>
</div> </template>
<div class="tip_btn flex_scb">
<el-button size="mini">线上分账</el-button>
<el-button size="mini" type="primary">线下分账</el-button>
</div>
</div>
<div class="tip_wrap_line"></div>
<div class="find_wrap">
<div class="find_line">
<div class="cell_item">
<my-drop-menu>
<div slot="right_con">
<el-date-picker class="myfindWidth" size="mini" v-model="dateBetween" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
</my-drop-menu>
</div>
<div class="cell_item">
<div class="cell_label h13_title">分账状态</div>
<el-select style="width: 166px" class="myfindWidth" size="mini" v-model="hxstatus" placeholder="请选择">
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div class="cell_item">
<my-drop-menu leftName="主订单编号">
<div slot="right_con">
<el-input style="width: 166px" class="myfindWidth" size="mini" placeholder="请输入" v-model="orderNum"></el-input>
</div>
</my-drop-menu>
</div>
<div class="cell_btn_item" style="width: 180px">
<el-button class="cell_btn_max" size="mini">导出数据</el-button>
</div>
</div>
<div style="height: 18px"></div>
<div class="find_line flex_scb">
<el-input style="width: 286px" size="mini" v-model="goodsName" placeholder="请输入查询的商品名称"></el-input>
<div class="cell_btn_item">
<el-button class="cell_btn" size="mini">重置</el-button>
<el-button class="cell_btn" size="mini" type="primary">查询</el-button>
</div>
</div>
</div>
<div class="table_wrap">
<GLTable ref="table2" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams2" @refreshTable="getTableData"></GLTable>
</div>
</template> </template>
</div> </div>
</div> </div>
...@@ -210,146 +99,95 @@ ...@@ -210,146 +99,95 @@
<script> <script>
import funnel from '../../components/service-echart/funnel.vue' import funnel from '../../components/service-echart/funnel.vue'
import barChart from '../../components/service-echart/bar.vue' import bar from '../../components/service-echart/bar.vue'
import myDropMenu from '../../components/down-menu/index.vue' import line from '../../components/service-echart/line.vue'
import couponsOrder from './couponsOrder.vue'
import upgradeOrder from './upgradeOrder.vue'
import myFashionableOrder from './myFashionableOrder.vue'
import blocCon from './blocCon.vue'
import ranking from './ranking.vue'
import { orderTotal } from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
import utils from '../../util/util'
export default { export default {
name: '', name: '',
components: { components: {
funnel, funnel,
'bar-chart': barChart, 'bar-chart': bar,
'my-drop-menu': myDropMenu 'line-chart': line,
'coupons-order': couponsOrder,
'upgrade-order': upgradeOrder,
'my-fashionable-order': myFashionableOrder,
'bloc-con': blocCon,
ranking: ranking
}, },
data() { data() {
return { return {
startDate: '', tipContent: '总产值为门店的精品升级业务该获得的 分账金额总和,包括线上分账和线下对 账,但分账金额不明确订单不算入统计。',
endDate: '', accountLevel: 4,
startDate: '', // 券开始时间
endDate: '', //券结束时间
dateType: 'date', dateType: 'date',
dateplaceholder: '选择日期', dateplaceholder: '选择日期',
showMore: true, showMore: true,
tabList: ['精品礼券领取订单', '精品升级订单', '我的分账'], tabList: ['精品礼券领取订单', '精品升级订单', '我的分账'],
curTabIndex: 1, curTabIndex: 0,
customName: '', customName: '',
hxstatus: '', hxstatus: '',
dateBetween: '', dateBetween: '',
hxdateBetween: '', hxdateBetween: '',
phoneNum: '', phoneNum: '',
statusList: [ productValueInfo: {},
{ //图表时间
value: '1', chartStartDate: '',
label: '已核销' chartEndDate: '',
}, openRankFlag: false,
{ showTip: false
value: '2', }
label: '未核销' },
} created() {
], const { session } = this.$globalState
//表格配置 this.accountLevel = session.accountLevel
layout: 'sizes, prev, pager, next, jumper, ->, total', if (session.accountLevel != 4) {
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, this.tabList = ['精品升级订单', '我的分账']
tableParams: {
tableOption: false,
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '领用时间',
prop: 'roleName'
},
{
label: '客户姓名',
prop: 'roleCode'
},
{
label: '手机号',
prop: 'statusName'
},
{
label: '礼券名称',
prop: 'createdTime'
},
{
label: '发券人',
prop: 'updatedTime'
},
{
label: '核销状态',
prop: 'updatedTime',
width: '100px'
},
{
label: '核销人',
prop: 'updatedTime'
},
{
label: '核销时间',
prop: 'updatedTime'
}
]
},
tableParams2: {
tableOption: false,
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '主订单编号',
prop: 'roleName'
},
{
label: '子订单编号',
prop: 'roleCode'
},
{
label: '客户姓名',
prop: 'statusName'
},
{
label: '车架号',
prop: 'createdTime'
},
{
label: '分账账户',
prop: 'updatedTime'
},
{
label: '总分账金额(元)',
prop: 'updatedTime'
},
{
label: '导流方名称',
prop: 'updatedTime'
},
{
label: '园区店名',
prop: 'updatedTime'
},
{
label: '分账状态',
prop: 'updatedTime'
},
{
label: '分账时间',
prop: 'updatedTime'
},
{
label: '支付时间',
prop: 'updatedTime'
},
{
label: '商品编号',
prop: 'updatedTime'
},
{
label: '商品名称',
prop: 'updatedTime'
}
]
},
tableData: [],
merchantList: [],
tableTotal: 0
} }
}, },
mounted() {}, mounted() {
this.judgeOpen()
},
methods: { methods: {
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) {
this.chartStartDate = utils.dateFormat(e)
},
getChartEndTime(e) {
this.chartEndDate = utils.dateFormat(e)
},
toChangeMonth() { toChangeMonth() {
this.dateType = 'month' this.dateType = 'month'
this.dateplaceholder = '选择月' this.dateplaceholder = '选择月'
...@@ -361,10 +199,30 @@ export default { ...@@ -361,10 +199,30 @@ export default {
changeTab(index) { changeTab(index) {
this.curTabIndex = index this.curTabIndex = index
}, },
changePeople(e) { toChangeShowMoreBtn(flag) {
console.log(e) this.showMore = !flag
}, },
getTableData() {} // 已开通--订单统计
judgeOpen() {
let openInfo = JSON.parse(localStorage.getItem('openInfo'))
// this.bengintime = utils.dateFormat(openInfo.openDate)
this.bengintime = '2020-01-01'
this.endtime = utils.dateFormat(new Date())
this.orderDataInfo()
},
// 门店统计
orderDataInfo() {
let method = orderTotal()
let para = {
routerMethod: method,
beginDateStr: this.bengintime,
endDateStr: this.endtime,
reportType: 2
}
converterApi(para).then(res => {
this.productValueInfo = res
})
}
} }
} }
</script> </script>
...@@ -403,6 +261,55 @@ export default { ...@@ -403,6 +261,55 @@ export default {
} }
.cur { .cur {
cursor: pointer; cursor: pointer;
position: relative;
}
.tipContentClass {
position: absolute;
left: 130px;
top: -15px;
width: 236px;
// height: 94px;
background: #ffffff;
box-shadow: 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 3px 6px -4px rgba(0, 0, 0, 0.12);
border: 1px solid #e4e7ed;
z-index: 999;
box-sizing: border-box;
padding: 10px 9px;
.title {
font-size: 12px;
font-weight: bold;
color: #333333;
z-index: 999;
position: relative;
}
> p {
z-index: 999;
position: relative;
margin-top: 10px;
line-height: 18px;
}
.single {
position: absolute;
left: -5px;
top: 15px;
// transform: translate(0, -50%);
width: 10px;
height: 10px;
background: #ffffff;
transform: rotate(-60deg);
border: 1px solid #e4e7ed;
z-index: -1;
}
.single1 {
position: absolute;
left: 0px;
top: 50%;
transform: translate(0, -50%);
width: 20px;
height: 100%;
background: #ffffff;
z-index: 22;
}
} }
.icon1 { .icon1 {
width: 16.22px; width: 16.22px;
...@@ -468,6 +375,11 @@ export default { ...@@ -468,6 +375,11 @@ export default {
background: #e8e8ea; background: #e8e8ea;
height: 1px; height: 1px;
} }
.mian_line2 {
margin: 0 22px;
background: #e8e8ea;
height: 1px;
}
.bottom_widget { .bottom_widget {
height: 400px; height: 400px;
position: relative; position: relative;
...@@ -475,7 +387,7 @@ export default { ...@@ -475,7 +387,7 @@ export default {
.chart_wrapper { .chart_wrapper {
width: 50%; width: 50%;
height: 350px; height: 350px;
background: #999; // background: #999;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
......
<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 \ 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 \ No newline at end of file
<template> <template>
<div class="content_body"> <div class="content_body">
<div class="max_widget"> <div ref="maxHBox" class="max_widget">
<div class="table_one"> <div class="table_one">
<p class="h7_title">商户名:深圳XXXX公司</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>
...@@ -15,45 +16,53 @@ ...@@ -15,45 +16,53 @@
</div> </div>
<div class="table_three"> <div class="table_three">
<div class="table_th h7_title">全部(除特殊分账品类)</div> <div class="table_th h7_title">全部(除特殊分账品类)</div>
<div class="table_th h7_title">收入分润</div> <div class="table_th h7_title">{{ settle.merchantSettleType == 1 ? '毛利分润' : '收入分润' }}</div>
<div class="table_th h7_title">30%</div> <div class="table_th h7_title">{{ settle.merchantProfitValue }}%</div>
</div> </div>
<div class="table_three"> <template v-if="settle.goodsTypeSettleRuleList.length">
<div class="table_th h7_title"> <div v-for="(item, index) in settle.goodsTypeSettleRuleList" :key="index" class="table_three">
<span>特殊分账品类:</span> <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>
<div class="table_th h7_title">毛利分润</div> </template>
<div class="table_th h7_title">30%</div>
</div>
<div class="table_four flex_scb"> <div class="table_four flex_scb">
<div class="h9_title"> <div class="h9_title">
<span>是否自动打款:</span> <span>是否自动打款:</span>
<span>是</span> <span>{{ division.autoFlag == 'Y' ? '是' : '否' }}</span>
</div> </div>
<div class="h9_title"> <div class="h9_title">
<span>分账周期:T+1</span> <span v-if="division.settleTimeType == 1">分账周期:T+1</span>
<span class="min_text">(分账后第2天到对公账户)</span> <span v-if="division.settleTimeType == 2">分账周期:每月{{ division.settleTime }}号</span>
<span v-if="division.settleTimeType == 1" class="min_text">(分账后第2天到对公账户)</span>
</div> </div>
</div> </div>
<div class="table_four flex_scb"> <div class="table_four flex_scb">
<div class="h9_title"> <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> </div>
<div class="table_four flex_scb border_all"> <div class="table_four flex_scb border_all">
<div class="h9_title"> <div class="h9_title">
<span>收款账户: XXXX商户有限公司</span> <span>收款账户:{{ division.realityShopMerchantName }}</span>
</div> </div>
</div> </div>
</div> </div>
<div class="min_widget"> <div class="min_widget">
<div class="title h7_title">对公账户信息</div> <div class="title h7_title">对公账户信息</div>
<div class="info_widget"> <div class="info_widget">
<span class="h9_title">开户账户户行:招商银行</span> <span class="h9_title">开户账户户行:{{bankData.bankName}}</span>
<span class="h9_title">开户支行:招商银行深圳泰然支行</span> <span class="h9_title">开户支行:{{bankData.openAccBankName}}</span>
<span class="h9_title">账户号:755918931710302</span> <span class="h9_title">账户号:{{bankData.bankAccountNo}}</span>
<span class="h9_title">账户名称:深圳广联赛讯股份有限公司</span> <span class="h9_title">账户名称:{{bankData.bankAccountName}}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -63,10 +72,28 @@ ...@@ -63,10 +72,28 @@
export default { export default {
name: '', name: '',
data() { data() {
return {} return {
merchantInfo: {
name: '',
merchantId: 0
},
}
},
props: {
bankData: Object,
division: Object,
settle: Object
}, },
mounted() {}, mounted() {
methods: {} const { session } = this.$globalState
this.merchantInfo = {
name: session.merchantName,
merchantId: session.session
}
},
methods: {
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -75,7 +102,7 @@ export default { ...@@ -75,7 +102,7 @@ export default {
justify-content: space-between; justify-content: space-between;
.max_widget { .max_widget {
width: calc(100% - 270px); width: calc(100% - 270px);
height: 389px; // min-height: 389px;
.table_one { .table_one {
width: 100%; width: 100%;
height: 54px; height: 54px;
...@@ -141,7 +168,7 @@ export default { ...@@ -141,7 +168,7 @@ export default {
} }
.min_widget { .min_widget {
width: 260px; width: 260px;
height: 393px; // min-height: 393px;
border: 2px solid #e8e8ea; border: 2px solid #e8e8ea;
.title { .title {
width: 100%; width: 100%;
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
<script> <script>
import notOpenCon from './notOpenCon.vue' import notOpenCon from './notOpenCon.vue'
import openCon from './open.vue' import openCon from './open.vue'
import { isOpenUpgrade } from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
export default { export default {
name: 'index', name: 'index',
components: { components: {
...@@ -16,11 +18,33 @@ export default { ...@@ -16,11 +18,33 @@ export default {
}, },
data() { data() {
return { 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() {}, 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
<template>
<div class="order-container">
<div class="find_wrap">
<div class="find_line">
<div class="cell_item">
<my-drop-menu :options="payOptionsList" :leftName="payChangeName" @getValue="changePayFind">
<div v-if="payTypeChange == 1" slot="right_con">
<el-date-picker class="myfindWidth" size="mini" v-model="dateBetween" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
<div v-if="payTypeChange == 2" slot="right_con">
<el-select class="myfindWidth" size="mini" clearable v-model="payType" placeholder="请选择">
<el-option v-for="item in payTypesList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
</my-drop-menu>
</div>
<div class="cell_item">
<div class="cell_label h13_title">分账状态</div>
<el-select style="width: 166px" class="myfindWidth" clearable size="mini" v-model="divisionType" placeholder="请选择">
<el-option v-for="item in disivionOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div class="cell_item">
<my-drop-menu :leftName="orderNumName" :options="numOptions" @getValue="changeNOFind">
<div slot="right_con">
<el-input style="width: 166px" class="myfindWidth" clearable size="mini" placeholder="请输入" v-model="orderNum"></el-input>
</div>
</my-drop-menu>
</div>
<div class="cell_btn_item" style="width: 180px">
<el-button class="cell_btn_max" size="mini" @click="toExport">导出数据</el-button>
</div>
</div>
<div style="height: 18px"></div>
<div class="find_line flex_scb">
<el-input style="width: 286px" size="mini" clearable v-model="goodsName" placeholder="请输入查询的商品名称"></el-input>
<div class="cell_btn_item">
<el-button class="cell_btn" size="mini" @click="clearFind">重置</el-button>
<el-button class="cell_btn" size="mini" type="primary" @click="handleParam">查询</el-button>
</div>
</div>
</div>
<div class="tipper flex_scb">
<div class="tip_text">
<span>共</span>
<sapn style="color: #5850ff">{{openCount}}</sapn>
<span>笔主订单</span>
<span style="color: #5850ff">{{tableCountInfo.nums || 0}}</span>
<span>笔子订单</span>
<span>,累计订单支付金额:</span>
<span style="color: #5850ff">¥{{tableCountInfo.totalPrice || 0}}</span>
<span>元,累计导流方利润:</span>
<span style="color: #5850ff">{{tableCountInfo.totalShopGrossProfit || 0}}</span>
<span>元</span>
</div>
<!-- <div class="right_select">
<el-select class="myfindWidth" size="mini" collapse-tags multiple clearable v-model="fieldListData" placeholder="请选择要展示的字段">
<el-option v-for="item in fieldList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div> -->
</div>
<div class="table_wrap">
<!-- <GLTable ref="table1" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="getTableData"></GLTable> -->
<el-table id="initTable" :data="tableData" style="width: 100%">
<el-table-column label="序号" align="center" type="index" :index="index => index + (currentPage - 1) * pageSize + 1">
<!-- <template slot-scope="scope">
{{ scope.$index + 1 }}
</template> -->
</el-table-column>
<el-table-column label="订单信息" align="center">
<el-table-column width="200" prop="orderCode" label="支付订单编号" align="center"></el-table-column>
<el-table-column width="200" prop="tradeNo" align="center" label="交易参考号"></el-table-column>
<el-table-column width="200" prop="upgradeBrandMerchantName" align="center" label="商品名称"></el-table-column>
<el-table-column width="200" prop="upgradeGoodsCommodityCode" align="center" label="商品编号"></el-table-column>
<el-table-column width="110" prop="goodsCost" align="center" label="商品成本"></el-table-column>
</el-table-column>
<el-table-column label="支付信息" align="center">
<el-table-column width="200" prop="customerPhone" align="center" label="客户手机号"></el-table-column>
<el-table-column width="200" prop="sellerName" align="center" label="转化员"></el-table-column>
<el-table-column width="200" prop="employeeName" align="center" label="转销售顾问"></el-table-column>
<el-table-column width="110" prop="paySuccessDate" align="center" label="支付时间"></el-table-column>
<el-table-column width="110" prop="payTypeName" align="center" label="支付方式"></el-table-column>
<el-table-column width="110" prop="subTotalPrice" align="center" label="支付金额"></el-table-column>
</el-table-column>
<el-table-column label="导流方利润" align="center">
<el-table-column width="110" prop="actualIncomeMoney" align="center" label="总分账金额"></el-table-column>
<el-table-column width="200" prop="shopMerchantName" align="center" label="分润对象"></el-table-column>
<el-table-column prop="rule" align="center" label="分润规则"></el-table-column>
<el-table-column width="110" prop="shopProfitMoney" align="center" label="分润金额"></el-table-column>
<el-table-column width="110" prop="divisionTypeName" align="center" label="分账类型"></el-table-column>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="120">
<template slot-scope="scope">
<div class="spanbtn h16_title" @click="openDetail(scope.row)">查看明细</div>
</template>
</el-table-column>
</el-table>
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="pageSize" :total="tableTotal" :layout="layout"></el-pagination>
</div>
<el-dialog title="订单详情" :visible.sync="dialogVisible" width="70%">
<div v-if="orderDetail" class="dialog_content">
<div class="wrapper">
<div class="title h18_title">
<div class="title_icon"></div>
<span>订单详情</span>
</div>
<div class="message_wrap flex_scb">
<div class="box_info">
<div class="info_text">
<span>订单单号:</span>
<span class="h19_title">{{ orderDetail.orderCode }}</span>
</div>
<div class="info_text">
<span>交易流水:</span>
<span class="h19_title">{{ orderDetail.payOrder.tradeNo || '--' }}</span>
</div>
</div>
<div class="box_info">
<div class="info_text">
<span>订单状态:</span>
<span v-if="orderDetail.upgradeFlag == 'Y'" class="h19_title">已升级</span>
<span v-else-if="orderDetail.upgradeFlag == 'N'" class="h19_title">未升级</span>
<span v-else class="h19_title">待升级</span>
</div>
<div class="info_text">
<span>支付状态:</span>
<span class="h19_title">{{ orderDetail.payOrder.payStatus == 1 ? '未支付' : '已支付' }}</span>
</div>
</div>
<div class="box_info">
<div class="info_text">
<span>支付方式:</span>
<span class="h19_title">{{ orderDetail.payOrder.payType == 1 ? '线上微信支付' : '线下支付' }}</span>
</div>
<div class="info_text">
<span>收款凭证:</span>
<span class="h19_title">{{ orderDetail.payOrder.outTradeNo || '--' }}</span>
</div>
</div>
</div>
</div>
<div class="wrapper">
<div class="title h18_title">
<div class="title_icon"></div>
<span>用户信息</span>
</div>
<div class="message_wrap flex_scb">
<div class="box_info">
<div class="info_text">
<span>用户姓名:</span>
<span class="h19_title">{{ orderDetail.customer.customerName || '--' }}</span>
</div>
<div class="info_text">
<span>评价:</span>
<span class="h19_title"></span>
</div>
</div>
<div class="box_info">
<div class="info_text">
<span>车架号:</span>
<span class="h19_title">{{ orderDetail.customer.standNo || '--' }}</span>
</div>
<div class="info_text"></div>
</div>
<div class="box_info"></div>
</div>
<div class="comment_wrap">
<div class="comment_line h20_title">
<span>产品与描述相符:</span>
<el-rate disabled :colors="['#5850FF', '#5850FF', '#5850FF']" text-color="#5850FF" :value="orderDetail.comment.customerScore"></el-rate>
<span>{{ orderDetail.comment.customerScore }}</span>
</div>
<div class="comment_line h20_title">
<span>服务态度:</span>
<el-rate disabled :colors="['#5850FF', '#5850FF', '#5850FF']" text-color="#5850FF" :value="orderDetail.comment.serviceScore"></el-rate>
<span>{{ orderDetail.comment.serviceScore }}</span>
</div>
<div class="comment_line nocenter h20_title">
<span>评价:</span>
<div class="textarea_con">{{ orderDetail.comment.customerComment }}</div>
</div>
</div>
</div>
<div class="wrapper">
<div class="title h18_title">
<div class="title_icon"></div>
<span>关联信息</span>
</div>
<div class="message_wrap flex_scb">
<div class="box_info">
<div class="info_text">
<span>流量来源:</span>
<span class="h19_title">{{ orderDetail.merchantName || '--' }}</span>
</div>
<div class="info_text">
<span>转化员:</span>
<span class="h19_title">{{ orderDetail.employeeName || '--' }}</span>
</div>
</div>
<div class="box_info">
<div class="info_text">
<span>推荐人:</span>
<span class="h19_title">{{ orderDetail.name || '--' }}</span>
</div>
<div class="info_text">
<span>门店地址:</span>
<span v-if="orderDetail.yqMerchantInfo" class="h19_title">{{ orderDetail.yqMerchantInfo.address }}</span>
<span v-else class="h19_title">--</span>
</div>
</div>
<div class="box_info">
<div class="info_text">
<span>园区店:</span>
<span class="h19_title">{{ orderDetail.yqMerchantIds || '--' }}</span>
</div>
<div class="info_text"></div>
</div>
</div>
</div>
<div class="wrapper">
<div class="title h18_title">
<div class="title_icon"></div>
<span>订单商品</span>
</div>
<div class="dialog_table_wrap">
<GLTable ref="dialogTable" :hasPage="false" :hasNum="false" :tableData="dialogTableData" :tableParams="dialogTableParams"></GLTable>
</div>
</div>
<div class="wrapper noBorder">
<div class="title h18_title">
<div class="title_icon"></div>
<span>订单进度</span>
</div>
<div class="dialog_table_wrap">
<GLTable ref="dialogTable2" :hasPage="false" :hasNum="false" :tableData="dialogTableData2" :tableParams="dialogTableParams2"></GLTable>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" @click="dialogVisible = false">返回</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import myDropMenu from '../../components/down-menu/index.vue'
import { findupGradeOrder, exportUpgrade, checkDetail,orderTotalNumOfJT } from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
import utils from '../../util/util'
const logTypeList = ['预录用户', '用户下单', '用户付款', '完成服务']
export default {
name: '',
components: {
'my-drop-menu': myDropMenu
},
data() {
return {
payOptionsList: [
{
value: 1,
label: '支付时间'
},
{
value: 2,
label: '支付方式'
}
],
payChangeName: '支付时间',
payTypesList: [
{
value: 0,
label: '不升级'
},
{
value: 1,
label: '线上支付'
},
{
value: 2,
label: '线下收款'
},
{
value: 3,
label: 'POS机'
}
],
disivionOptions: [
{
value: 1,
label: '线下对账'
},
{
value: 2,
label: '线上对账'
}
],
numOptions: [
{
value: 1,
label: '主订单编号'
},
{
value: 2,
label: '交易参考号'
}
],
orderNumName: '主订单编号',
layout: 'sizes, prev, pager, next, jumper, ->, total',
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableData: [],
tableTotal: 0,
currentPage: 1,
pageSize: 10,
payTypeChange: 1,
// 查询参数
dateBetween: '',
payType: '',
divisionType: '',
orderNumType: 1,
orderNum: '',
goodsName: '',
dialogVisible: false,
// 弹框表格
dialogTableData: [],
dialogTableData2: [],
dialogTableParams: {
tableOption: false,
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '商品ID',
prop: 'codeId'
},
{
label: '商品名称',
prop: 'goodsName'
},
{
label: '商品分类',
prop: 'goodsClass'
},
{
label: '品牌商',
prop: 'plateName'
},
{
label: '商品售价',
prop: 'saleprice'
},
{
label: '质保年限',
prop: 'upgradeWarrantyPeriodName'
},
{
label: '数量(件)',
prop: 'number'
},
{
label: '支付金额',
prop: 'totalPrice'
}
]
},
dialogTableParams2: {
tableOption: false,
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '时间',
prop: 'createdDate'
},
{
label: '当前进度',
prop: 'logTypeName'
},
{
label: '关联操作员',
prop: 'userName'
}
]
},
orderDetail: null,
fieldList: [
{
value: 'orderCode',
label: '支付订单编号'
},
{
value: 'tradeNo',
label: '交易参考号'
},
{
value: 'upgradeBrandMerchantName',
label: '商品名称'
},
{
value: 'upgradeGoodsCommodityCode',
label: '商品编号'
},
{
value: 'goodsCost',
label: '商品成本'
},
{
value: 'customerPhone',
label: '客户手机号'
},
{
value: 'sellerName',
label: '转化员'
},
{
value: 'employeeName',
label: '转销售顾问'
},
{
value: 'paySuccessDate',
label: '支付时间'
},
{
value: 'payTypeName',
label: '支付方式'
},
{
value: 'subTotalPrice',
label: '支付金额'
},
{
value: 'actualIncomeMoney',
label: '总分账金额'
},
{
value: 'shopMerchantName',
label: '分润对象'
},
{
value: 'shopProfitMoney',
label: '分润金额'
},
{
value: 'divisionTypeName',
label: '分账类型'
}
],
fieldListData:[],
openCount:0,
tableCountInfo:{
nums:0,
totalPrice:0,
totalShopGrossProfit:0
}
}
},
mounted() {
this.toGetCouponsList()
let openInfo = JSON.parse(localStorage.getItem('openInfo'))
this.openCount = openInfo.openCount || 0
},
methods: {
// 查看明细
openDetail(item) {
this.getDetailInfo(item.orderCode)
},
clearFind() {
let params = {}
this.dateBetween = ''
this.payType = ''
this.divisionType = ''
this.orderNum = ''
this.goodsName = ''
this.toGetCouponsList(params)
},
handleParam() {
let params = {}
if (this.dateBetween) {
//支付时间
let startDate = utils.dateFormat(this.dateBetween[0])
let endDate = utils.dateFormat(this.dateBetween[1])
params.payStartDateStr = startDate
params.payEndDateStr = endDate
}
if (this.payType) {
//支付方式
params.payType = this.payType
}
if (this.divisionType) {
//分账类型
params.divisionType = this.divisionType
}
if (this.orderNum) {
//主订单编号---交易参考号
if (this.orderNumType == 1) {
params.orderCode = this.orderNum
} else {
params.tradeNo = this.orderNum
}
}
if (this.goodsName) {
params.upgradeGoodsName = this.goodsName
}
this.toGetCouponsList(params)
},
changeNOFind(e) {
this.orderNumType = e
this.orderNumName = e == 1 ? '主订单编号' : '交易参考号'
this.orderNum = ''
},
changePayFind(e) {
this.payTypeChange = e
this.payChangeName = e == 1 ? '支付时间' : '支付方式'
this.dateBetween = ''
this.payType = ''
},
toGetCouponsList(params = {}) {
let method = findupGradeOrder()
let para = {
routerMethod: method,
pageNum: this.currentPage,
pageSize: this.pageSize,
...params
}
converterApi(para).then(res => {
console.log(res)
this.tableData = res.list.map((item, index) => {
let ruleType = item.shopProfitType == 1 ? '毛利' : '收入'
item.rule = `${ruleType}${item.shopProfitPer}%`
item.divisionTypeName = item.divisionType == 1 ? '线上分账' : '线下分账'
item.paySuccessDate = utils.dateFormat(item.paySuccessDate)
item.payTypeName = item.payType == 1 ? '线上微信支付' : item.payType == 2 ? '线下收款' : 'POS机'
return item
})
this.tableTotal = res.total
this.httpParam = {
pageNum: this.currentPage,
pageSize: this.pageSize,
...params
}
})
this.getTotalOfJT(this.httpParam)
},
// 获取导流方利润统计---集团
getTotalOfJT(params){
let method = orderTotalNumOfJT()
let para = {
routerMethod: method,
...params
}
converterApi(para).then(res=>{
if(res){
this.tableCountInfo = res
}
})
},
// 每页条数
handleSizeChange(value) {
this.pageSize = value
this.toGetCouponsList()
},
// 页码
handleCurrentChange(value) {
this.currentPage = value
this.toGetCouponsList()
},
toExport() {
let method = exportUpgrade()
let para = {
routerMethod: method,
...this.httpParam
}
converterApi(para).then(res => {
let iframe = document.createElement('iframe')
iframe.style.display = 'none'
iframe.src = res
document.body.appendChild(iframe)
})
},
// 获取明细信息
getDetailInfo(orderCode) {
let method = checkDetail()
let para = {
routerMethod: method,
orderCode
}
converterApi(para).then(res => {
this.orderDetail = res
this.dialogTableData = res.subOrderList || []
this.dialogTableData.map(item => {
item.upgradeWarrantyPeriodName = `${item.upgradeWarrantyPeriod || '--'}` + '年'
// 显示需要判断是否已升级
item.codeId = item.upgradeGoodsCommodityCode || item.baseGoodsCommodityCode
item.goodsName = item.upgradeGoodsName || item.baseGoodsName
item.goodsClass = item.upgradeGoodsTypeName || item.baseGoodsTypeName
item.plateName = item.upgradeBrandMerchantName || item.baseBrandMerchantName
item.saleprice = item.upgradeRetailPrice || item.baseRetailPrice
return item
})
this.dialogTableData2 = res.accessLogs || []
this.dialogTableData2.map(item => {
item.logTypeName = logTypeList[parseInt(item.logType)]
item.createdDate = item.createdDate ? utils.dateFormat(item.createdDate, 'YYYY-MM-DD HH:mm') : '--'
return item
})
this.dialogVisible = true
})
}
}
}
</script>
<style lang="scss" scoped>
.find_wrap {
padding-bottom: 17px;
.find_line {
padding: 0 15px;
overflow: hidden;
}
.cell_item {
margin-right: 30px;
}
.find_line,
.cell_item {
display: flex;
align-items: center;
.cell_label {
width: 56px;
text-align: right;
padding-right: 15px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.mybtn {
width: 120px;
height: 26px;
background: #ffffff;
border-radius: 4px 0px 0px 4px;
border: 1px solid #e8e8ea;
cursor: pointer;
border-right: none;
> i {
margin-left: 5px;
font-size: 5px;
}
}
.myfindWidth {
width: 215px;
}
.myfindWidth1 {
width: 166px;
}
}
.cell_btn_item {
display: flex;
align-items: center;
justify-content: flex-end;
.cell_btn {
width: 78px;
}
.cell_btn_max {
width: 156px;
}
}
}
.tipper {
width: 100%;
box-sizing: border-box;
padding: 15px 20px;
.tip_text {
font-size: 12px;
font-weight: 400;
color: #000000;
display: flex;
align-items: center;
}
.right_select {
width: 286rpx;
overflow: hidden;
}
}
.table_wrap {
padding: 0 15px;
padding-bottom: 10px;
}
.spanbtn {
cursor: pointer;
}
.dialog_content {
.wrapper {
width: 100%;
box-sizing: border-box;
padding-bottom: 20px;
border-bottom: 1px solid #e6e6e6;
margin-bottom: 20px;
.title {
display: flex;
align-items: center;
font-weight: bold;
}
.title_icon {
width: 2px;
height: 10px;
background: #5850ff;
margin-right: 5px;
}
.message_wrap {
box-sizing: border-box;
padding-top: 10px;
padding-right: 10px;
.box_info {
width: 33.33%;
overflow: hidden;
> div:first-child {
margin-bottom: 10px;
}
.info_text {
min-height: 17px;
font-size: 12px;
font-weight: bold;
color: #333333;
line-height: 17px;
}
}
}
.comment_wrap {
margin-top: 10px;
.comment_line {
display: flex;
align-items: center;
margin-bottom: 5px;
.textarea_con {
width: 60%;
white-space: pre-wrap;
word-spacing: 2;
}
}
.nocenter {
display: flex;
align-items: flex-start;
}
}
.dialog_table_wrap {
margin-top: 5px;
}
}
.noBorder {
border: none;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!