Commit 53bbdbe6 by cwq0219

Merge branch 'v1.1.1' of http://192.168.3.233:8090/glsx-business/dj-car-life-system into v1.1.1

2 parents 85831f6b ea1b04c6
......@@ -4,7 +4,7 @@
<div class="finnance_table_wrap">
<table class="finnance_table">
<tr>
<td rowspan="3"><img :src="detail.goodsThumbUrl"/></td>
<td rowspan="3" class="product_td"><img class="product_img" :src="detail.goodsThumbUrl"/></td>
<td class="lb">商品名称</td>
<td colspan="3">{{detail.goodsName}}</td>
<td class="lb">品牌商</td>
......@@ -14,7 +14,7 @@
<td class="lb">商品类别</td>
<td>{{detail.goodsTypeName}}</td>
<td class="lb">数量</td>
<td>{{detail.nums}}</td>
<td>{{detail.nums}}件</td>
<td rowspan="2" class="lb">实付金额</td>
<td rowspan="2">{{detail.paidMoney}}</td>
</tr>
......@@ -22,7 +22,7 @@
<td class="lb">商品零售价</td>
<td>{{detail.sellPrice}}</td>
<td class="lb">优惠折扣</td>
<td>{{detail.priceDiscount}}</td>
<td>{{detail.priceDiscount}}折</td>
</tr>
</table>
<table class="finnance_table">
......@@ -61,7 +61,7 @@
<td class="lb">性别</td>
<td>{{customerSexOpts[detail.customerSex]}}</td>
<td rowspan="4" class="lb_total">归属信息</td>
<td class="lb">所在园区店</td>
<td class="lb">服务门店</td>
<td>{{detail.sellerMerchantName}}</td>
</tr>
<tr>
......@@ -73,13 +73,13 @@
<tr>
<td class="lb">汽车型号</td>
<td colspan="3">{{detail.carTypeStr}}</td>
<td class="lb">来源4s店</td>
<td class="lb">流量来源</td>
<td>{{detail.merchantName}}</td>
</tr>
<tr>
<td class="lb">客户类型</td>
<td colspan="3">{{customerTypeOpts[detail.customerType]}}</td>
<td class="lb">销售顾问</td>
<td class="lb">推荐人</td>
<td>{{detail.employeeName}}</td>
</tr>
</table>
......@@ -105,7 +105,7 @@
</table>
<table class="finnance_table">
<tr>
<td class="lb_total" :rowspan="8">分账明细</td>
<td class="lb_total" :rowspan="userInfo.beSuper?5:3">分账明细</td>
<td class="lb_respond">分账主体</td>
<td class="lb_respond">商户编号</td>
<td class="lb_respond">分账比例</td>
......@@ -114,32 +114,35 @@
<tr>
<td>{{detail.shopMerchantName}}</td>
<td>{{detail.shopMerchantId}}</td>
<td>{{detail.shopProfitPer}}</td>
<td>{{detail.shopProfitPer}}%</td>
<td>{{detail.shopProfitMoney}}</td>
</tr>
<tr>
<td>{{detail.yqMerchantName}}</td>
<td>{{detail.yqMerchantId}}</td>
<td>{{detail.yqProfitPer}}</td>
<td>{{detail.yqProfitPer}}%</td>
<td>{{detail.yqProfitMoney}}</td>
</tr>
<tr v-show="userInfo.beSuper">
<td>{{detail.glName}}</td>
<td>{{}}</td>
<td>{{detail.glProfitPer}}</td>
<td></td>
<td>{{detail.glProfitPer}}%</td>
<td>{{detail.glProfitMoney}}</td>
</tr>
<tr v-show="userInfo.beSuper">
<td>{{detail.franchiseeName}}</td>
<td>{{}}</td>
<td>{{detail.franchiseeProfitPer}}</td>
<td></td>
<td>{{detail.franchiseeProfitPer}}%</td>
<td>{{detail.franchiseeProfitMoney}}</td>
</tr>
<tr>
<td class="lb">分账总计</td>
<td colspan="4">{{detail.allocationMoney}}</td>
<td class="lb" colspan="4">分账总计</td>
<td>{{detail.allocationMoney}}</td>
</tr>
</table>
<p style="text-align:center;">
<el-button type="primary" @click="close({ tagName: '/financeDetail' })">关闭</el-button>
</p>
</div>
</d2-container>
......@@ -189,6 +192,7 @@ export default {
},
methods: {
...mapActions({ close: 'd2admin/page/close' }),
}
}
......@@ -241,4 +245,15 @@ export default {
}
}
}
.product_td{
width: 110px;
height: 110px;
font-size: 0;
.product_img{
display: inline-block;
width: 100%;
height: 100%
}
}
</style>
......@@ -34,20 +34,20 @@
</div>
<div class="summary_total">
<span class="summary_total_label">总订单收入</span>
<span class="summary_total_value">{{userInfo.beSuper?summayData.totalInComeMoney:summayData.totalYqProfitMoney}}</span>
<span class="summary_total_value">{{summayData.totalInComeMoney}}</span>
</div>
<div class="summary_list">
<div class="summary_item">
<span class="summary_label">订单销售总额</span>
<span class="summary_value summary_value_yuen">{{summayData.totalSalesMoney}}</span>
<span class="summary_value summary_value_yuen">{{summayData.totalOrderMoney}}</span>
</div>
<div class="summary_item">
<span class="summary_label">订单毛利润</span>
<span class="summary_value summary_value_rate">{{summayData.totalYqGrossProfit}}</span>
<span class="summary_value summary_value_yuen">{{summayData.totalGrossProfit}}</span>
</div>
<div class="summary_item">
<span class="summary_label">总订单量</span>
<span class="summary_value summary_value_yuen">{{summayData.totalOrderCounts}}</span>
<span class="summary_value summary_value_amount">{{summayData.totalAdd}}</span>
</div>
<div class="summary_item" style="display:none">
<span class="summary_label">业务提成</span>
......@@ -59,11 +59,11 @@
</div>
<div class="summary_item">
<span class="summary_label">毛利率</span>
<span class="summary_value summary_value_rate">{{summayData.yqGrossProfitRadio}}</span>
<span class="summary_value summary_value_rate">{{summayData.grossProfitRadio}}</span>
</div>
<div class="summary_item">
<span class="summary_label">总成本</span>
<span class="summary_value summary_value_yuen">{{summayData.totalYqCost}}</span>
<span class="summary_value summary_value_yuen">{{summayData.totalCost}}</span>
</div>
</div>
</el-col>
......@@ -76,7 +76,7 @@
<p class="funnel_label">升级转化率</p>
<p class="funnel_rate">{{transferData.upgradeTransfer}}%</p>
</div>
<div id="funnelChart" style="height: 180px"></div>
<div id="financeChart" style="height: 180px"></div>
</div>
</el-col>
</el-row>
......@@ -93,8 +93,8 @@
<el-input
size="small"
class="custom-input"
v-model="searchForm.orderId"
placeholder="请输入推荐人或转化员姓名"
v-model="searchForm.subOrderCode"
placeholder="请输入订单编号"
suffix-icon="el-icon-search"
></el-input>
</p>
......@@ -139,23 +139,24 @@
</div>
<div class="d2-container-content">
<d2-table-header>
<span slot="left">合计: 收款:{{totalPrice}} 元, 毛利受益:{{totalProfit}}元</span>
<span slot="left">合计: 收款:{{totalPrice}} 元, 毛利收益:{{totalProfit}}元</span>
<auth-button category="Button"></auth-button>
</d2-table-header>
<el-table :data="tableData">
<el-table-column
type="index"
label="序号"
align="center"
width="50">
</el-table-column>
<el-table-column label="商品信息" align="center">
<el-table-column
prop="orderCode"
prop="subOrderCode"
label="订单编号"
align="center">
</el-table-column>
<el-table-column
prop="merchantName"
prop="goodsName"
label="商品名称"
align="center">
</el-table-column>
......@@ -205,7 +206,7 @@
label="分账规则"
align="center">
<template slot-scope="scope">
<span>按{{shopProfitTypeOpts[scope.row.shopProfitType]}}{{shopProfitPer}}</span>
<span>按{{shopProfitTypeOpts[scope.row.shopProfitType]}}{{scope.row.shopProfitPer}}%</span>
</template>
</el-table-column>
<el-table-column label="分账信息(导流方)" align="center">
......@@ -256,17 +257,11 @@
align="center">
</el-table-column>
</el-table-column>
<el-table-column label="成本费用" align="center" v-show="userInfo.beSuper">
<el-table-column
prop="goodsExtraCost"
label="格外成本"
align="center">
</el-table-column>
<el-table-column
prop="yqIncentiveTotal"
label="阳光激励费"
align="center">
</el-table-column>
<el-table-column
v-show="userInfo.beSuper"
prop="goodsExtraCost"
label="额外成本"
align="center">
</el-table-column>
<el-table-column
prop="yqGrossProfit"
......@@ -283,6 +278,17 @@
</template>
</el-table-column>
</el-table>
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page.pageNum"
:page-sizes="[10,20,30,40]"
:page-size="page.pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
>
</el-pagination>
</div>
</d2-container>
</template>
......@@ -309,7 +315,8 @@ export default {
searchForm: {
time: '',
ydMerchantId: '',
merchantId: ''
merchantId: '',
subOrderCode: ''
},
showFormData: [{
label: '按时间',
......@@ -369,7 +376,7 @@ export default {
}
},
mounted() { // console.log(document.getElementById('funnelChart'))
mounted() { // console.log(document.getElementById('financeChart'))
if (this.userInfo.beSuper) {
getParkStore({}).then(res => {
this.baseData.parkServiceList = res
......@@ -384,12 +391,12 @@ export default {
this.getSummary()
this.getList()
this.funnelChart = echarts.init(document.getElementById('funnelChart'))
this.financeChart = echarts.init(document.getElementById('financeChart'))
this.drawFunnelChart()
getListTotal((this.getParams())).then((res) => {
this.totalPrice = res.totalPrice
this.totalProfit = this.userInfo.beSuper ? res.totalYqGrossProfit : res.totalShopGrossProfit
this.totalProfit = res.totalYqGrossProfit
})
},
watch: {
......@@ -411,14 +418,15 @@ export default {
this.transferData.toShopTransfer = res.toShopTransfer
this.transferData.upgradeTransfer = res.upgradeTransfer
this.funnelChart.setOption(funnelOption)
this.financeChart.setOption(funnelOption)
})
},
handleReset() {
this.searchForm = {
time: '',
ydMerchantId: '',
merchantId: ''
merchantId: '',
subOrderCode: ''
}
this.userInfo.beSuper && (this.baseData.storeIdList = [])
this.getOptionsList()
......@@ -462,7 +470,7 @@ export default {
getSummary() {
getSummary({
beginDateStr: moment(this.summaryDate).startOf('month').format('YYYY-MM-DD hh:mm:ss'),
endDateStr: moment(this.summaryDate).endOf('month').format('YYYY-MM-DD hh:mm:ss')
endDateStr : moment(this.summaryDate).endOf('month').format('YYYY-MM-DD')+' 23:59:59',
}).then((res) => {
this.summayData = res
})
......@@ -474,9 +482,27 @@ export default {
...params
}
// console.log(params)
const moneyLabels = ['totalPrice',
'serviceCharge',
'actualIncomeMoney',
'shopProfitMoney',
'yqProfitMoney',
'glProfitMoney',
'franchiseeProfitMoney',
'goodsExtraCost',
'yqIncentiveTotal',
'yqGrossProfit',
'paidMoney','sellPrice', 'shopCost', 'allocationMoney']
getList(params).then(res => {
// console.log(res)
this.tableData = res.list
this.tableData = res.list.map((item) => {
for(let key in item) {
if(moneyLabels.indexOf(key) > -1 && typeof item[key] === 'number') {
item[key] = `¥${item[key]}`
}
}
return item
})
this.page.pageNum = res.pageNum
this.page.pageSize = res.pageSize
this.total = res.total
......@@ -490,12 +516,27 @@ export default {
params.payStartDateStr = new Date(this.searchForm.time[0]).toLocaleDateString().replace(/\//g, '-')
params.payEndDateStr = new Date(this.searchForm.time[1]).toLocaleDateString().replace(/\//g, '-')
}
if(this.searchForm.subOrderCode) {
params.subOrderCode = this.searchForm.subOrderCode
}
return params
},
handleSearch() {
this.page.pageNum = 1
this.getList()
}
},
// 每页条数
handleSizeChange(value) {
this.page.pageSize = value
this.getList()
},
// 页码
handleCurrentChange(value) {
this.page.pageNum = value
this.getList()
},
}
}
......@@ -561,6 +602,11 @@ export default {
content: '(%)';
}
}
&.summary_value_amount{
&:after{
content: '(个)';
}
}
}
}
......@@ -589,7 +635,7 @@ export default {
margin: 0 0 10px;
color: #0947C6;
}
#funnelChart{
#financeChart{
flex: 1
}
......
const funnelOption = {
/* tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c}%'
}, */
tooltip: {
trigger: 'item',
formatter: function (params, ticket, callback) {
return `${params.data.tooltipName}:${params.data.tooltipValue}`
}
},
series: [
{
name: '漏斗图',
......@@ -24,7 +26,7 @@ const funnelOption = {
show: true,
position: 'right'
},
silent: true,
//silent: true,
labelLine: {
length: 10,
lineStyle: {
......@@ -42,9 +44,9 @@ const funnelOption = {
}
},
data: [
{ value: 60, name: '流量总量', itemStyle: {color: 'rgba(9,71,198,1)'} },
{ value: 40, name: '已到店', itemStyle: {color: 'rgba(43,154,255,1)'} },
{ value: 20, name: '已转化', itemStyle: {color: 'rgba(255,170,0,1)'} },
{ value: 60, name: '流量总量', tooltipName: '转化客户数', tooltipValue: '100', itemStyle: {color: 'rgba(9,71,198,1)'} },
{ value: 40, name: '已到店', tooltipName: '总到店数', tooltipValue: '100', itemStyle: {color: 'rgba(43,154,255,1)'} },
{ value: 20, name: '已转化', tooltipName: '总升级数', tooltipValue: '100', itemStyle: {color: 'rgba(255,170,0,1)'} },
]
}
......
......@@ -21,7 +21,7 @@ const incomeFlowOption = {
xAxis: {
type: 'category',
boundaryGap: false,
data: ['2020-10-20', '周二', '周三', '周四', '周五', '周六', '周日'],
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
axisLine: {
show: false,
lineStyle: {
......
......@@ -75,7 +75,7 @@
</div>
<div class="top_card_bm">
<span class="top_card_bm_left">毛利</span>
<span class="top_card_bm_right">{{totalData.totalGrossProfit}}%</span>
<span class="top_card_bm_right">¥{{totalData.totalGrossProfit}}</span>
</div>
</div>
</div>
......@@ -86,6 +86,9 @@
</el-card>
</el-col>
</el-row>
<div class="ad_wrap">
<img class="ad_img" src="http://img01.glsx.com.cn/image/head.png" alt="">
</div>
<el-row>
<el-col :span="24">
<el-card class="box-card">
......@@ -111,8 +114,8 @@
<span class="top_card_md_right top_card_primary">{{customerData.totalCustomerNums}}</span>
</div>
<div class="top_card_bm" v-show="customerType==='yesterday'">
<span class="top_card_bm_left">周同比:{{customerData.onWeekCustomerNums}}</span>
<span class="top_card_bm_right customer">日环比:{{customerData.onDayCustomerNums}}</span>
<span class="top_card_bm_left">周同比:{{customerData.onWeekCustomerNums}}%</span>
<span class="top_card_bm_right customer">日环比:{{customerData.onDayCustomerNums}}%</span>
</div>
<div class="top_card_bm">
<span class="top_card_bm_left">日均新增客户(人)</span>
......@@ -126,11 +129,11 @@
<div class="top_card_title">客户到店数(人)</div>
<div class="top_card_main top_card_main_multi">
<div class="top_card_md">
<span class="top_card_md_right top_card_second">{{customerData.totalToShopTotal}}</span>
<span class="top_card_md_right top_card_second">{{customerData.totalToShop}}</span>
</div>
<div class="top_card_bm" v-show="customerType==='yesterday'">
<span class="top_card_bm_left">周同比:{{customerData.onWeekToShop}}</span>
<span class="top_card_bm_right customer">日环比:{{customerData.onDayToShop}}</span>
<span class="top_card_bm_left">周同比:{{customerData.onWeekToShop}}%</span>
<span class="top_card_bm_right customer">日环比:{{customerData.onDayToShop}}%</span>
</div>
<div class="top_card_bm">
<span class="top_card_bm_left">日均到店数(人)</span>
......@@ -144,11 +147,11 @@
<div class="top_card_title">转化升级率(比)</div>
<div class="top_card_main top_card_main_multi">
<div class="top_card_md">
<span class="top_card_md_right top_card_third">{{customerData.totalFlowsMoney}}</span>
<span class="top_card_md_right top_card_third">{{customerData.upgradeTransfer}}%</span>
</div>
<div class="top_card_bm" v-show="customerType==='yesterday'">
<span class="top_card_bm_left">周同比:{{customerData.onWeekUpgradeTransfer}}</span>
<span class="top_card_bm_right customer">日环比:{{customerData.onDayUpgradeTransfer}}</span>
<span class="top_card_bm_left">周同比:{{customerData.onWeekUpgradeTransfer}}%</span>
<span class="top_card_bm_right customer">日环比:{{customerData.onDayUpgradeTransfer}}%</span>
</div>
<div class="top_card_bm">
<span class="top_card_bm_left">日均转化率(比)</span>
......@@ -354,6 +357,10 @@ export default {
if (this.userInfo.beSuper) {
this.isBeSuper = true
getParkStore({}).then(res => {
res.unshift({
merchantId: '',
merchantName: '全部'
})
this.parkServiceList = res
this.id = this.parkServiceList[0].merchantId
resolve()
......@@ -412,8 +419,9 @@ export default {
this.showChartLoading(this.customTransChart)
getCustomerTransList({
beginDateStr: moment().subtract(1, 'month').startOf('month').format('YYYY-MM-DD'),
endDateStr: moment().subtract(1, 'month').endOf('month').format('YYYY-MM-DD')
yqMerchantId: this.id,
beginDateStr: moment().startOf('month').format('YYYY-MM-DD'),
endDateStr: moment().endOf('month').format('YYYY-MM-DD'),
}).then((res) => {
const data = res
......@@ -435,7 +443,7 @@ export default {
color: '#2B9AFF',
}) */
this.showChartLoading(this.funnelChart)
getTransferData({}).then((res) => {
getTransferData({yqMerchantId: this.id}).then((res) => {
funnelOption.series[0].data[0].tooltipValue = res.totalCustomerNums
funnelOption.series[0].data[1].tooltipValue = res.totalToShop
funnelOption.series[0].data[2].tooltipValue = res.totalUpgrade
......@@ -481,10 +489,10 @@ export default {
getOrderProductData(params).then((res) => {
const data = res
let index = 0
const idObj = {}
for (const key in data) {
const list = data[key]
let idObj = {}
for(let key in data) {
let index = moment(key).day() - 1
let list = data[key]
list.forEach((item) => {
if (!(item.id in idObj)) {
idObj[item.id] = {
......@@ -494,7 +502,6 @@ export default {
}
idObj[item.id].data.push([index, item.goodsTotal])
})
index++
}
const seriesArr = []
......@@ -504,7 +511,7 @@ export default {
type: 'bar',
stack: '总量',
label: {
show: true,
show: false,
formatter: '{a}',
position: 'insideRight'
},
......@@ -519,11 +526,12 @@ export default {
drawIncomeFlowChart() {
this.showChartLoading(this.incomeFlowChart)
getIncomeFlowList({
yqMerchantId: this.id,
year: moment().format('YYYY')
}).then((res) => {
const data = res
incomeFlowOption.xAxis.data = data.map((item) => item.month)
//incomeFlowOption.xAxis.data = data.map((item) => item.month)
incomeFlowOption.series[0].data = data.map((item) => item.totalIncomeMoney)
// incomeFlowOption.series[1].data = data.map((item) => item.totalCost)
this.incomeFlowChart.setOption(incomeFlowOption)
......@@ -549,7 +557,7 @@ export default {
getIncomeProductList(params).then((res) => {
const data = res
incomeProductOption.title.text = `累计收入\n${data.totalGrossProfit}元`
incomeProductOption.title.text = `累计毛利\n${data.totalGrossProfit}元`
incomeProductOption.series[0].data = []
incomeProductOption.series[0].data = data.rankList.map((item) => {
......@@ -600,7 +608,8 @@ export default {
},
getTotal() {
const params = {
...this.getDateFormatByType(this.totalType)
...this.getDateFormatByType(this.totalType),
yqMerchantId: this.id
}
getTotalData(params).then((res) => {
......@@ -609,7 +618,8 @@ export default {
},
getCustomer() {
const params = {
...this.getDateFormatByType(this.customerType)
...this.getDateFormatByType(this.customerType),
yqMerchantId: this.id
}
if (this.customerType === 'yesterday') {
params.needCompareDateStr = moment().subtract(1, 'day').startOf('day').format('YYYY-MM-DD')
......@@ -628,8 +638,9 @@ export default {
box-sizing: border-box;
height: calc(100vh - 115px);
width: 100%;
padding: 0 20px 20px;
overflow: auto;
padding: 0px 5px 0 15px;
overflow-y: auto;
overflow-x: hidden;
&>.el-row{
margin-bottom: 20px;
}
......@@ -746,4 +757,12 @@ export default {
color: #0947C6;
}
}
.ad_wrap{
text-align: center;
margin-bottom: 20px;
font-size: 0;
.ad_img{
max-width: 100%;
}
}
</style>
......@@ -2,12 +2,22 @@ const storeFlowOption = {
color: ['rgba(9,71,198,1)', 'rgba(9,71,198,0.8)', 'rgba(9,71,198,0.6)','rgba(9,71,198,0.4)','rgba(9,71,198,0.3)'],
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
formatter: '{a} <br/>{b} : {c} ({d}%)',
position: [10, 10]
},
legend: {
orient: 'vertical',
right: 0,
data: ['xx']
data: [],
formatter: function (name) {
if(name.length>8) {
return name.substr(0,8)+'...'
}
return name
},
tooltip: {
show: true
}
},
series: [
{
......@@ -15,6 +25,28 @@ const storeFlowOption = {
type: 'pie',
radius: '55%',
center: ['40%', '65%'],
label:{
align: 'left',
normal:{
formatter(v) {
let text = v.name
if(text.length <= 8){
return text;
}else if(text.length > 8 && text.length <= 16){
return text = `${text.slice(0,8)}\n${text.slice(8)}\n`
}else if(text.length > 16 && text.length <= 24){
return text = `${text.slice(0,8)}\n${text.slice(8,16)}\n${text.slice(16)}\n`
}else if(text.length > 24 && text.length <= 30){
return text = `${text.slice(0,8)}\n${text.slice(8,16)}\n${text.slice(16,24)}\n${text.slice(24)}\n`
}else if(text.length > 30){
return text = `${text.slice(0,8)}\n${text.slice(8,16)}\n${text.slice(16,24)}\n${text.slice(24,30)}\n${text.slice(30)}\n`
}
},
textStyle : {
fontSize : 10
}
}
},
data: [
{
value: 335,
......
......@@ -43,36 +43,47 @@
:summary-method="getSummaries"
style="width: 100%">
<el-table-column
prop="orderCode"
prop="goodsInfo.goodsCode"
align="center"
label="商品编号">
</el-table-column>
<el-table-column
prop="goodsInfo.goodsName"
align="center"
label="商品名称">
</el-table-column>
<el-table-column
prop="goodsInfo.goodsType"
prop="goodsInfo.goodsTypeName"
align="center"
label="商品分类">
</el-table-column>
<el-table-column
prop="goodsInfo.brandMerchantName"
align="center"
label="品牌商">
</el-table-column>
<el-table-column
prop="goodsInfo.retailPrice"
align="center"
label="商品售价">
</el-table-column>
<el-table-column
prop="discount"
align="center"
label="优惠折扣">
</el-table-column>
<el-table-column
prop="nums"
align="center"
label="数量(件)">
</el-table-column>
<el-table-column
prop="actualMoney"
align="center"
label="支付金额">
<template slot-scope="scope">
<span>¥{{scope.row.actualMoney}}</span>
</template>
</el-table-column>
</el-table>
</div>
......@@ -85,14 +96,17 @@
style="width: 100%">
<el-table-column
prop="createdDate"
align="center"
label="时间">
</el-table-column>
<el-table-column
prop="logContent"
align="center"
label="当前进度">
</el-table-column>
<el-table-column
prop="userName"
align="center"
label="关联操作员">
<template slot-scope="scope">
<span>{{logType[scope.row.logType]}} {{scope.row.userName}}</span>
......@@ -159,18 +173,27 @@ export default {
}
}
},
getTotalNums() {
return this.detail.goods.reduce((prev, item) => prev+item.nums, 0)
},
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总价';
column.align = 'is-left'
column.colSpan = 6
return;
}
if (index === 1) {
sums[index] = this.detail.totalPrice;
sums[index] = this.getTotalNums()
return;
}
if (index === 2) {
sums[index] = `¥${this.detail.totalPrice}`;
return;
}
......
......@@ -28,36 +28,42 @@
<span slot="left"></span>
<auth-button category="Button"></auth-button>
</d2-table-header>
<el-table :data="tableData">
<el-table
:data="tableData"
border
:highlight-current-row="true"
default-expand-all>
<el-table-column type="expand">
<template slot-scope="props">
<div class="product_list">
<div class="product_item" v-for="(item, index) in props.row.goods" :key="index">
<img src="item.goodsInfo.thumbUrl" alt="" class="product_img">
<img :src="item.goodsInfo.thumbUrl" alt="" class="product_img">
<div class="product_info">
<p class="product_name">{{item.goodsInfo.goodsName}}</p>
<p class="product_count">{{item.goodsInfo.shopPrice}}*{{item.nums}}件</p>
<p class="product_count">{{item.sellPrice?`¥${item.sellPrice} * `:''}}{{item.nums}}件</p>
</div>
</div>
</div>
</template>
</el-table-column>
<el-table-column
type="index"
label="序号"
width="50">
align="center">
</el-table-column>
<el-table-column
label="订单编号"
align="center"
prop="orderCode">
</el-table-column>
<el-table-column
label="订单时间"
align="center"
prop="orderTimeStr">
</el-table-column>
<el-table-column
label="订单状态"
align="center"
prop="status">
<template slot-scope="scope">
<span>{{statusOpts[scope.row.status]}}</span>
......@@ -65,14 +71,20 @@
</el-table-column>
<el-table-column
label="客户姓名"
align="center"
prop="customerName">
</el-table-column>
<el-table-column
label="订单总价"
align="center"
prop="totalPrice">
<template slot-scope="scope">
<span>¥{{scope.row.totalPrice}}</span>
</template>
</el-table-column>
<el-table-column
label="操作">
label="操作"
align="center">
<template slot-scope="scope">
<auth-button
:data="scope"
......@@ -152,9 +164,7 @@ export default {
baseData: {
},
tableData: [{
id: 'xx'
}],
tableData: [],
total: 0,
page: {
pageNum: 1,
......@@ -185,7 +195,7 @@ export default {
}
if (form.orderTime && form.orderTime.length) {
params.placeOrderStartDateStr = Util.dateFormate(form.orderTime[0], 'YYYY-MM-DD HH:mm:ss')
params.placeOrderEndDateStr = Util.dateFormate(form.orderTime[1], 'YYYY-MM-DD HH:mm:ss')
params.placeOrderEndDateStr = Util.dateFormate(form.orderTime[1], 'YYYY-MM-DD') + ' 23:59:59'
}
if (form.orderStatus) {
params.status = form.orderStatus
......
......@@ -8,43 +8,43 @@
:rules="rules"
label-suffix=":"
label-width="180px">
<el-form-item label="是否开启自动打款结算">
<el-form-item label="是否开启自动打款结算" prop="autoFlag">
<el-radio-group v-model="form.autoFlag">
<el-radio label="Y" value="">是</el-radio>
<el-radio label="N" value="">否</el-radio>
</el-radio-group>
<p class="form_tip">开启自动结算打款,商户在嘀加平台产生的转化+交易均会自动结算并打款给商户,如果关闭自动结算,请和商户约定线下对账;开启或关闭后第二天生效,请注意和门店的对账单结算</p>
</el-form-item>
<el-form-item label="结算时间方式" >
<el-form-item label="结算时间方式" prop="settleTimeType">
<el-radio-group v-model="form.settleTimeType">
<div class="block_item">
<el-radio label="1">T+1</el-radio>
<el-radio :label="1">T+1</el-radio>
<span class="form_tip">用户支付的款项会T+1打款到商户银行卡</span>
</div>
<div class="block_item">
<el-radio label="2">每月1号打款</el-radio>
<el-radio :label="2">每月1号打款</el-radio>
<span class="form_tip">用户支付的款项会在每个月1号将上月结算账单打款到商户银行卡</span>
</div>
</el-radio-group>
</el-form-item>
<el-form-item label="结算打款方式" >
<el-radio-group v-model="form.settleAmountType">
<el-form-item label="结算打款方式" prop="settleAmountType">
<el-radio-group v-model="form.settleAmountType" prop="settleAmountType">
<div class="block_item">
<el-radio label="1">全额打款商户</el-radio>
<el-radio :label="1">全额打款商户</el-radio>
<span class="form_tip">广联收款后,扣除手续费后全部打款给商户</span>
</div>
</el-radio-group>
</el-form-item>
<div>
<h4 class="form_gp_title">导流方(4S店)财务对账结算规则</h4>
<el-form-item label="结算模式">
<el-form-item label="结算模式" prop="merchantSettleType">
<el-radio-group v-model="form.merchantSettleType">
<el-radio :label="2" >收入分润</el-radio>
<el-radio :label="1" >毛利分润</el-radio>
</el-radio-group>
<p class="form_tip">收入分润指按照客户支付的金额进行分润,毛利分润指按照客户购买的产品毛利进行分润,毛利等于收入减去成本</p>
</el-form-item>
<el-form-item label="结算比例">
<el-form-item label="结算比例" prop="merchantProfitType">
<el-radio-group v-model="form.merchantProfitType">
<div class="block_item">
<el-radio :label="1">按照统一比例</el-radio>
......@@ -52,9 +52,10 @@
label-width="0"
ref="merchantProfitValue"
prop="merchantProfitValue"
style="display:inline-block;width:140px;margin-right:10px;margin-bottom: 10px">
style="display:inline-block;width:180px;margin-right:10px;margin-bottom: 10px">
<el-input
v-model="form.merchantProfitValue"
placeholder="请输入小于100的正整数"
size="mini"
type="text">
<span slot="suffix" style="line-height:30px">%</span>
......@@ -72,7 +73,7 @@
</div>
<div>
<h4 class="form_gp_title">服务商财务对账分润规则</h4>
<el-form-item label="服务商分润比例">
<el-form-item label="服务商分润比例" prop="partnerProfitType">
<el-radio-group v-model="form.partnerProfitType">
<div class="block_item">
<el-radio :label="1">按照统一比例</el-radio>
......@@ -80,9 +81,10 @@
ref="partnerProfitPer"
label-width="0"
prop="partnerProfitPer"
style="display:inline-block;width:140px;margin-right:10px;margin-bottom: 10px">
style="display:inline-block;width:180px;margin-right:10px;margin-bottom: 10px">
<el-input
v-model="form.partnerProfitPer"
placeholder="请输入小于100的正整数"
size="mini"
type="text">
<span slot="suffix" style="line-height:30px">%</span>
......@@ -98,7 +100,7 @@
</el-radio-group>
</el-form-item>
<el-form-item label="管理员手机号验证">
{{contactName}} {{phone}}
梁卉卉 186 **** 6547
</el-form-item>
<el-form-item label="验证码" prop="smsCode">
<el-input
......@@ -112,7 +114,7 @@
</div>
<el-form-item style="text-align:right">
<el-button type="primary" @click="onSubmit">确认</el-button>
<el-button>取消</el-button>
<el-button @click="onCancel">取消</el-button>
</el-form-item>
</el-form>
</div>
......@@ -136,6 +138,24 @@ export default {
merchantProfitValue: ''
},
rules: {
autoFlag: [
{ required: true, message: '请选择是否开启自动打款结算', trigger: 'change' },
],
settleTimeType: [
{ required: true, message: '请选择结算时间方式', trigger: 'change' },
],
settleAmountType: [
{ required: true, message: '请选择结算打款方式', trigger: 'change' },
],
merchantSettleType: [
{ required: true, message: '请选择结算模式', trigger: 'change' },
],
merchantProfitType: [
{ required: true, message: '请选择结算比例', trigger: 'change' },
],
partnerProfitType: [
{ required: true, message: '请选择服务商分润比例', trigger: 'change' },
],
merchantProfitValue: [
{ required: false, message: '请输入比例', trigger: 'blur' },
{ pattern: /^(([1-9][0-9])|[1-9])$/, message: '请输入小于100正整数', trigger: 'blur' }
......@@ -182,6 +202,15 @@ export default {
this.form[key] = this.settleAccountRule[key]
}
}
if(this.form.merchantProfitValue == '-1') {
this.form.merchantProfitType = 2
this.form.merchantProfitValue = ''
}
if(this.form.partnerProfitPer == '-1') {
this.form.partnerProfitType = 2
this.form.partnerProfitPer = ''
}
}
},
......@@ -225,12 +254,15 @@ export default {
}else{
params.partnerProfitPer = -1
}
updateRule(params).then((res) => {
this.$message({
message: '修改成功',
type: 'success',
})
this.$router.push({
name: 'merchantManage',
})
})
} else {
......@@ -238,6 +270,11 @@ export default {
return false;
}
});
},
onCancel() {
this.$router.push({
name: 'merchantManage',
})
}
}
}
......
......@@ -44,7 +44,7 @@
import _ from 'lodash'
import { getList } from '@api/merchant'
import { mapActions } from 'vuex'
import { BaseData, userTypeList, ghUserTypeList, merchantClassifyList } from '@/common/constants.js'
import { BaseData, userTypeList, ghUserTypeList, userType, ghUserType, merchantClassifyList } from '@/common/constants.js'
export default {
name: 'merchantManage',
data() {
......@@ -115,10 +115,17 @@ export default {
prop: 'shortName'
}, {
label: '商户类型',
prop: 'accountName'
prop: 'userType',
formatter: (cellValue) => {
var typeList = cellValue.channelType === 2 ? ghUserType : userType
return typeList[cellValue.userType]
}
}, {
label: '商户分类',
prop: 'userType'
prop: 'merchantType',
formatter: (cellValue) => {
return cellValue.merchantType == '6' ? '园区店':'4s店'
}
}, {
label: '联系人',
prop: 'contactName'
......@@ -201,7 +208,16 @@ export default {
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
let optionList = this.baseData[item.optionsName]
if(item.optionsName === 'channelTypeList') {
if(optionList.length && optionList[0].name !== '全部') {
optionList.unshift({ value: '', name: '全部' })
}
}else if(optionList.length && optionList[0].confLabel !== '全部') {
optionList.unshift({ confId: '', confLabel: '全部' })
}
this.$set(this.showFormData[index], 'optionList', optionList)
}
})
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!