Commit dbdc0d5e by 张权

Merge branch 'master' into 'V4.39.0-0603'

Master

See merge request !13
2 parents fbb5d121 cc49135c
......@@ -4,120 +4,135 @@ const getRulesData = () => {
return method
}
const getRulesListData = () => {
let method = 'dj.api.smartcarlife.merchantDivisionRule.pageChangeRecord'
return method
}
// 客户评价
let method = 'dj.api.smartcarlife.merchantDivisionRule.pageChangeRecord'
return method
}
// 客户评价
const guestComTotal = () => {
let method = 'dj.api.smartcarlife.orderCommentReport.total'
return method
}
// 是否开通精品升级
let method = 'dj.api.smartcarlife.orderCommentReport.total'
return method
}
// 是否开通精品升级
const isOpenUpgrade = () => {
let method = 'dj.api.serviceMerchant.isOpenSmartcarlife'
return method
}
// 订单统计
let method = 'dj.api.serviceMerchant.isOpenSmartcarlife'
return method
}
const isOpenInsurance = () => {
let method = 'dj.api.serviceMerchant.isOpenScene0'
return method
}
// 订单统计
const orderTotal = () => {
let method = 'dj.api.smartcarlife.orderReport.total'
return method
}
// 券统计
let method = 'dj.api.smartcarlife.orderReport.total'
return method
}
// 券统计
const couponsTotal = () => {
let method = 'dj.api.smartcarlife.couponReport.total'
return method
}
// 按天统计券
let method = 'dj.api.smartcarlife.couponReport.total'
return method
}
// 按天统计券
const couponsTotalByDay = () => {
let method = 'dj.api.smartcarlife.couponReport.countByDate'
return method
}
// 按天统计金额
let method = 'dj.api.smartcarlife.couponReport.countByDate'
return method
}
// 按天统计金额
const moneyTotal = () => {
let method = 'dj.api.smartcarlife.orderReport.totalByDay'
return method
}
// 精品礼券订单查询
let method = 'dj.api.smartcarlife.orderReport.totalByDay'
return method
}
// 精品礼券订单查询
const findCoupons = () => {
let method = 'dj.api.life.customer.coupon.listFor4S'
return method
}
// 精品礼券升级订单查询
let method = 'dj.api.life.customer.coupon.listFor4S'
return method
}
// 精品礼券升级订单查询
const findupGradeOrder = () => {
let method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.page'
return method
}
// 查看礼券
let method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.page'
return method
}
const newFindupGradeOrder = () => {
let method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.pageByMainOrder'
return method
}
// 查看礼券
const checkCoupons = () => {
let method = 'dj.api.smartcarlife.merchant.coupon.page'
return method
}
// 我的分账
let method = 'dj.api.smartcarlife.merchant.coupon.page'
return method
}
// 我的分账
const mydivision = () => {
let method = 'dj.smartcarlife.api.shop.order.division.page'
return method
}
// 精品礼券导出
let method = 'dj.smartcarlife.api.shop.order.division.page'
return method
}
// 精品礼券导出
const exportCoupons = () => {
let method = 'dj.api.life.customer.coupon.exportExcelListFor4S'
return method
}
// 精品礼券升级订单导出
let method = 'dj.api.life.customer.coupon.exportExcelListFor4S'
return method
}
// 精品礼券升级订单导出
const exportUpgrade = () => {
let method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.export'
return method
}
// 我的分账导出
let method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.export'
return method
}
// 延保订单导出
const exportInsurance = () => {
let method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.exportNew'
return method
}
// 我的分账导出
const exportMydivision = () => {
let method = 'dj.smartcarlife.api.shop.order.division.export'
return method
}
// 获取发券人/转化人列表
let method = 'dj.smartcarlife.api.shop.order.division.export'
return method
}
// 获取发券人/转化人列表
const getEmployName = () => {
let method = 'dj.api.life.customer.coupon.distinctColum'
return method
}
// 查看明细
let method = 'dj.api.life.customer.coupon.distinctColum'
return method
}
// 查看明细
const checkDetail = () => {
let method = 'dj.api.smartcarlife.goodsOrder.detail'
return method
}
// 集团--订单统计
let method = 'dj.api.smartcarlife.goodsOrder.detail'
return method
}
// 集团--订单统计
const orderTotalOfJT = () => {
let method = 'dj.api.smartcarlife.orderReport.totalByMerchant'
return method
}
// 集团--精品升级订单统计数
let method = 'dj.api.smartcarlife.orderReport.totalByMerchant'
return method
}
// 集团--精品升级订单统计数
const orderTotalNumOfJT = () => {
let method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.count'
return method
}
// 集团--我的分账统计数
let method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.count'
return method
}
// 集团--我的分账统计数
const myAccountTotalNumOfJT = () => {
let method = 'dj.smartcarlife.api.shop.order.division.page.count'
return method
}
// 获取4s店列表
let method = 'dj.smartcarlife.api.shop.order.division.page.count'
return method
}
// 获取4s店列表
const get4SList = params => {
params.method = `scrm.api.carlife.merchant.listWithPageByCurMerchant`
return http({
url: 'rop-scrm-carlife/router',
method: 'GET',
data: params,
sign: true
})
}
// 服务介绍
params.method = `scrm.api.carlife.merchant.listWithPageByCurMerchant`
return http({
url: 'rop-scrm-carlife/router',
method: 'GET',
data: params,
sign: true
})
}
// 服务介绍
const introConpute = params => {
params.method = `scrm.api.boutiquecoupon.config.getModelParams`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'GET',
data: params,
sign: true
})
}
// 获取商户列表
params.method = `scrm.api.boutiquecoupon.config.getModelParams`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'GET',
data: params,
sign: true
})
}
// 获取商户列表
const getMerchantList = params => {
params.method = `entmicro.api.common.findMerchantTreeByMerchantNo.list`
return http({
......@@ -127,28 +142,4 @@ const getMerchantList = params => {
sign: true
})
}
export {
getRulesData,
getRulesListData,
guestComTotal,
isOpenUpgrade,
orderTotal,
couponsTotal,
couponsTotalByDay,
moneyTotal,
findCoupons,
findupGradeOrder,
checkCoupons,
mydivision,
exportMydivision,
exportUpgrade,
exportCoupons,
getEmployName,
checkDetail,
orderTotalOfJT,
orderTotalNumOfJT,
myAccountTotalNumOfJT,
get4SList,
introConpute,
getMerchantList
}
\ No newline at end of file
export { getRulesData, getRulesListData, guestComTotal, isOpenUpgrade, isOpenInsurance, orderTotal, couponsTotal, couponsTotalByDay, moneyTotal, findCoupons, findupGradeOrder, newFindupGradeOrder, checkCoupons, mydivision, exportMydivision, exportUpgrade, exportInsurance, exportCoupons, getEmployName, checkDetail, orderTotalOfJT, orderTotalNumOfJT, myAccountTotalNumOfJT, get4SList, introConpute, getMerchantList }
......@@ -2,7 +2,7 @@
<div class="order-container">
<div class="tip_wrap flex_scb">
<div class="tip_text">
<p class="h14_title">合作了精品升级业务且开启了自动分账功能的商户,在“线上分账”列表中可查看分账明细,未开启线上自动分账或者因各种</p>
<p class="h14_title">合作了{{ pageName == 'insurance' ? '会员权益延保' : '精品升级' }}业务且开启了自动分账功能的商户,在“线上分账”列表中可查看分账明细,未开启线上自动分账或者因各种</p>
<div style="height: 10px"></div>
<p class="h14_title">其他因素导致未分账成功的,在线下对账中查看,统一下个月月初结算上个月订单。</p>
</div>
......@@ -65,12 +65,13 @@ const SERCH_GOODSNAME = {
type: 'input',
isClear: true
}
const DISABLE_MERCHANTID =[44191564,44191528,44191536,44184606,44209510]
const DISABLE_MERCHANTID = [44191564, 44191528, 44191536, 44184606, 44209510]
export default {
name: '',
props: {
list: Array
},
inject: ['pageName'],
data() {
return {
refreshKey1: new Date(),
......@@ -316,7 +317,7 @@ export default {
created() {
this.tableParams = this.tableParams2
const { session } = this.$globalState
this.merchantId = session.merchantId
this.merchantId = session.merchantId
this.accountLevel = session.accountLevel
this.isAdmin = session.admin
// 1.工厂 2省代 3市代 4门店
......@@ -443,7 +444,7 @@ export default {
let startdate = utils.dateFormat(openInfo.openDate, 'YYYY-MM-DD 00:00:00')
let endDate = utils.dateFormat(new Date(), 'YYYY-MM-DD 23:59:59')
const ISEXIT = DISABLE_MERCHANTID.includes(Number(this.merchantId))
if(!ISEXIT){
if (!ISEXIT) {
params.paySuccessDateStartDate = startdate
params.paySuccessDateEndDate = endDate
}
......@@ -533,10 +534,11 @@ export default {
currentPage: this.$refs[`table${this.curDivisionType}`].page.pageNum,
pageSize: this.$refs[`table${this.curDivisionType}`].page.pageSize,
divisionType: this.curDivisionType,
...this.newHttpParam
...this.newHttpParam,
sceneType: this.pageName == 'insurance' ? 0 : 1
}
converterApi(para).then(res => {
res.list = res&&res.list?res.list:[]
res.list = res && res.list ? res.list : []
res.list.map(item => {
item.divisionTypeName = item.divisionType == 1 ? '线下对账' : '线上分账'
item.successDate = item.paySuccessDate ? utils.dateFormat(item.paySuccessDate, 'YYYY-MM-DD HH:mm:ss') : '--'
......@@ -586,7 +588,8 @@ export default {
let method = myAccountTotalNumOfJT()
let para = {
routerMethod: method,
...params
...params,
sceneType: this.pageName == 'insurance' ? 0 : 1
}
converterApi(para).then(res => {
this.mytotalNumData = res
......@@ -598,7 +601,8 @@ export default {
routerMethod: method,
currentPage: this.$refs[`table${this.curDivisionType}`].page.pageNum,
pageSize: this.$refs[`table${this.curDivisionType}`].page.pageSize,
...this.httpParam
...this.httpParam,
sceneType: this.pageName == 'insurance' ? 0 : 1
}
converterApi(para).then(res => {
let tempaa = utils.getExplorer()
......
......@@ -141,6 +141,7 @@ import util from '../../util/util'
// const openDdate = JSON.parse(localStorage.getItem('openInfo'))
export default {
name: '',
inject: ['pageName'],
components: {
funnel,
'bar-chart': bar,
......@@ -161,7 +162,10 @@ export default {
dateplaceholder: '选择日期',
showMore: true,
// tabList: ['精品升级订单', '我的分账'],
tabList: [{name:'精品升级订单',conId:'first'},{name:'我的分账',conId:'second'}],
tabList: [
{ name: '精品升级订单', conId: 'first' },
{ name: '我的分账', conId: 'second' }
],
// tabList: ['精品礼券领取订单', '精品升级订单'],
curTabIndex: 'first',
customName: '',
......@@ -186,8 +190,17 @@ export default {
created() {
const { session } = this.$globalState
this.accountLevel = session.accountLevel
if (this.pageName == 'insurance') {
this.tabList = [
{ name: '订单列表', conId: 'first' },
{ name: '我的分账', conId: 'second' }
]
}
if (session.accountLevel != 4) {
this.tabList = [{name:'订单明细',conId:'first'},{name:'分账明细',conId:'second'}]
this.tabList = [
{ name: '订单明细', conId: 'first' },
{ name: '分账明细', conId: 'second' }
]
// this.tabList = ['订单明细']
// this.toGet4SStore()
}
......@@ -391,7 +404,7 @@ export default {
.new_tab_wrap {
margin-top: 8px;
margin-bottom: 16px;
/deep/ .el-tabs__item{
/deep/ .el-tabs__item {
font-size: 16px !important;
}
}
......
......@@ -5,29 +5,39 @@
<div class="text">该业务场景的优势介绍可点击</div>
<div @click="toIntroductPage" class="btn_text">去查看</div>
</div>
<not-open-con v-if="openType == 0"></not-open-con>
<template v-if="!openType">
<not-open-con v-if="pageName != 'insurance'"></not-open-con>
<warranty v-else></warranty>
</template>
<open-con v-if="openType == 1"></open-con>
</div>
</template>
<script>
import notOpenCon from './upgradeIntro.vue'
import warranty from '@/views/publicity/warranty.vue'
import openCon from './open.vue'
import { isOpenUpgrade } from '../../api/modules/rules'
import { isOpenUpgrade, isOpenInsurance } from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
export default {
name: 'index',
components: {
'not-open-con': notOpenCon,
'open-con': openCon
'open-con': openCon,
warranty
},
inject: ['pageName'],
data() {
return {
openType: 2 // 0未开通 1已开通
}
},
created() {
this.judgeOpen()
if (this.pageName == 'insurance') {
this.judgeShowInsurance()
} else {
this.judgeOpen()
}
// if(localStorage.getItem('openInfo')){
// let info = JSON.parse(localStorage.getItem('openInfo'))
// this.openType = info.open
......@@ -60,9 +70,29 @@ export default {
loading.close()
})
},
judgeShowInsurance() {
let method = isOpenInsurance()
let para = {
routerMethod: method
}
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
converterApi(para)
.then(res => {
this.openType = res
})
.finally(end => {
loading.close()
})
},
toIntroductPage() {
const title = '业务介绍'
this.$router.push({ path: '/inSale/upgradeIntro', query: { $title: title } })
const pageUrl = this.pageName == 'insurance' ? '/publicity/warranty' : '/inSale/upgradeIntro'
this.$router.push({ path: pageUrl, query: { $title: title } })
}
}
}
......
......@@ -14,7 +14,7 @@
<span>,累计订单支付金额:</span>
<span style="color: #5850ff">¥{{ tableCountInfo.totalPrice || 0 }}</span>
<span>元,累计导流方利润:</span>
<span style="color: #5850ff">{{ tableCountInfo.totalShopProfitMoney || 0 }}</span>
<span style="color: #5850ff">{{ tableCountInfo.totalShopTrafficMoney || 0 }}</span>
<span>元</span>
</div>
<div class="right_select">
......@@ -24,9 +24,9 @@
<GLButton style="margin-left: 8px;" size="small" fn="导出精品升级订单" @click="toExport">导出数据</GLButton>
</div>
</div>
<!-- :span-method="objectSpanMethod" -->
<div class="table_wrap">
<GLTable v-if="dynamicTableShow" ref="subTable" :tableData="tableData" :tableTotal="tableTotal" :tableParams="newTableParams" @refreshTable="toGetCouponsList">
<GLTable :cell-class-name="setClass" @cell-mouse-leave="handleCellMouseLeave" @cell-mouse-enter="handleCellMouseEnter" :span-method="objectSpanMethod" v-if="dynamicTableShow" ref="subTable" :tableData="tableData" :tableTotal="tableTotal" :tableParams="newTableParams" @refreshTable="toGetCouponsList">
<div class="table-btns" slot="table-btns" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div>
......@@ -67,7 +67,7 @@
<!-- <span v-if="orderDetail.payOrder.payType == 1" class="h19_title">微信支付</span>
<span v-if="orderDetail.payOrder.payType == 2" class="h19_title">线下支付</span>
<span v-if="orderDetail.payOrder.payType == 3" class="h19_title">POS机收款</span> -->
<span v-if="orderDetail.payOrder.payType" class="h19_title">{{pageTypeObj[orderDetail.payOrder.payType]}}</span>
<span v-if="orderDetail.payOrder.payType" class="h19_title">{{ pageTypeObj[orderDetail.payOrder.payType] }}</span>
</div>
<div class="info_text flex_img">
<span>收款凭证:</span>
......@@ -197,28 +197,29 @@
</template>
<script>
import { findupGradeOrder, exportUpgrade, checkDetail, orderTotalNumOfJT, getMerchantList } from '../../api/modules/rules'
import { findupGradeOrder, newFindupGradeOrder, exportUpgrade, exportInsurance, checkDetail, orderTotalNumOfJT, getMerchantList } from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
import utils from '../../util/util'
const logTypeList = ['预录用户', '用户下单', '用户付款', '完成服务']
const orderStatusList = ['待升级', '未升级', '待支付', '已支付', '已退款', '已完成']
const PAYTYPEOBJ = {
1: "微信支付",
2: "4S店支付",
3: "POS机收款",
4: "支付宝支付",
5: "嘀加收款"
1: '微信支付',
2: '4S店支付',
3: 'POS机收款',
4: '支付宝支付',
5: '嘀加收款'
}
const DISABLE_MERCHANTID =[44191564,44191528,44191536,44184606,44209510]
const DISABLE_MERCHANTID = [44191564, 44191528, 44191536, 44184606, 44209510]
export default {
name: '',
props: {
list: Array
},
inject: ['pageName'],
data() {
return {
pageTypeObj:PAYTYPEOBJ,
pageTypeObj: PAYTYPEOBJ,
dynamicTableShow: true,
rowNumber: 2,
refreshKey: Date.now(),
......@@ -273,7 +274,7 @@ export default {
{
confId: 5,
confName: '嘀加收款'
},
}
]
},
{
......@@ -348,7 +349,7 @@ export default {
width: 150,
line: 1,
formatter: cellValue => {
return cellValue.upgradeGoodsAlias || cellValue.goodsName || '--'
return cellValue.upgradeGoodsAlias || cellValue.goodsName || '--'
}
},
{
......@@ -406,6 +407,7 @@ export default {
label: '主订单编号',
level: 1,
width: '200',
enumId: 'orderCode',
disabled: true
},
{
......@@ -413,6 +415,7 @@ export default {
label: '交易参考号',
level: 1,
width: '200',
enumId: 'tradeNo',
disabled: true
},
{
......@@ -420,6 +423,7 @@ export default {
label: '子订单编号',
level: 1,
width: '200',
enumId: 'subOrderCode',
disabled: true
},
{
......@@ -427,6 +431,7 @@ export default {
label: '商品名称',
level: 1,
width: '200',
enumId: 'upgradeGoodsName',
disabled: false
},
{
......@@ -434,12 +439,14 @@ export default {
label: '商品编号',
level: 1,
width: '200',
enumId: 'upgradeGoodsCommodityCode',
disabled: false
},
{
value: 'goodsCost',
label: '商品成本',
level: 1,
enumId: 'goodsCost',
width: '110',
align: 'right',
disabled: false
......@@ -448,6 +455,7 @@ export default {
value: 'customerName',
label: '客户姓名',
level: 1,
enumId: 'customerName',
width: '200',
disabled: false
},
......@@ -462,6 +470,7 @@ export default {
value: 'sellerName',
label: '转化员姓名',
level: 2,
enumId: 'sellerName',
width: '200',
disabled: false
},
......@@ -469,6 +478,7 @@ export default {
value: 'employeeName',
label: '销售顾问',
level: 2,
enumId: 'employeeName',
width: '200',
disabled: false
},
......@@ -476,6 +486,7 @@ export default {
value: 'paySuccessDate',
label: '支付时间',
level: 2,
enumId: 'paySuccessDate',
width: '200',
disabled: false
},
......@@ -483,6 +494,7 @@ export default {
value: 'payTypeName',
label: '支付方式',
level: 3,
enumId: 'payType',
width: '200',
disabled: false
},
......@@ -491,6 +503,7 @@ export default {
label: '支付金额/元',
level: 3,
width: '110',
enumId: 'subTotalPrice',
align: 'right',
disabled: true
},
......@@ -499,6 +512,7 @@ export default {
label: '总分账金额/元',
level: 3,
width: '150',
enumId: 'actualIncomeMoney',
align: 'right',
disabled: true
},
......@@ -506,6 +520,7 @@ export default {
value: 'realityShopMerchantName',
label: '分账对象',
level: 3,
enumId: 'shopMerchantName',
width: '200',
disabled: false
},
......@@ -513,13 +528,32 @@ export default {
value: 'subShopMerchantName',
label: '二级流量方',
level: 3,
enumId: 'subShopMerchantName',
width: '200',
disabled: false
},
{
value: 'rule',
label: '分账规则',
label: '品类规则',
level: 3,
enumId: 'subOrderProfitAllocationRule',
width: '200',
disabled: false
},
{
value: 'orderRule',
label: '整单规则',
level: 3,
enumId: 'mainProfitAllocationRule',
width: '200',
disabled: false
},
{
value: 'setMealRule',
label: '套餐规则',
filter: true,
level: 3,
enumId: 'packageProfitAllocationRule',
width: '200',
disabled: false
},
......@@ -527,6 +561,7 @@ export default {
value: 'shopTrafficMoney',
label: '分账金额/元',
level: 3,
enumId: 'shopTrafficMoney',
width: '110',
align: 'right',
disabled: true
......@@ -535,6 +570,7 @@ export default {
value: 'divisionTypeName',
label: '分账类型',
level: 3,
enumId: 'divisionType',
width: '200',
disabled: false
}
......@@ -657,11 +693,21 @@ export default {
width: '200'
},
{
label: '分账规则',
label: '品类规则',
prop: 'rule',
width: '200'
},
{
label: '整单规则',
prop: 'orderRule',
width: '200'
},
{
label: '套餐规则',
prop: 'setMealRule',
width: '200'
},
{
label: '分账金额/元',
prop: 'shopTrafficMoney',
width: '110',
......@@ -689,6 +735,9 @@ export default {
name: row => {
return '查看明细'
},
condition: row => {
return row.scope.rowspan != 0
},
attrs: {
type: 'text'
},
......@@ -709,7 +758,7 @@ export default {
this.accountLevel = session.accountLevel
this.merchantId = session.merchantId
this.isAdmin = session.admin
let temp = JSON.parse(localStorage.getItem(`menuList${session.merchantId}`))
let temp = JSON.parse(localStorage.getItem(`${this.pageName == 'insurance' ? 'in' : ''}menuList${session.merchantId}`))
if (temp) {
this.tableCoulumList = temp
} else {
......@@ -721,6 +770,18 @@ export default {
}
},
mounted() {
if (this.pageName != 'insurance') {
this.fieldList = this.fieldList.filter(item => !item.filter)
this.$nextTick(() => {
const _target = this.newTableParams.tableColumns?.find(item => item.label == '导流方利润')
if (_target) {
const _targetIdx = _target?.children?.findIndex(item => item.prop == 'setMealRule')
if (_targetIdx > -1) {
_target?.children?.splice(_targetIdx, 1)
}
}
})
}
let openInfo = JSON.parse(localStorage.getItem('openInfo'))
let startDate = utils.dateFormat(openInfo.openDate)
let endDate = utils.dateFormat(new Date())
......@@ -728,7 +789,7 @@ export default {
let params = {}
// 2023.6.28 特殊门店不需要默认传支付时间
const ISEXIT = DISABLE_MERCHANTID.includes(Number(this.merchantId))
if(!ISEXIT){
if (!ISEXIT) {
params.payStartDateStr = utils.dateFormat(startDate, 'YYYY-MM-DD 00:00:00')
params.payEndDateStr = utils.dateFormat(endDate, 'YYYY-MM-DD 23:59:59')
}
......@@ -738,6 +799,109 @@ export default {
this.toGetCouponsList()
},
methods: {
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
// column没有prop,只能用label判断
const mergeColNameList = ['主订单编号', '交易参考号', '客户姓名', '转化员姓名', '销售顾问', '支付方式', '支付时间', '分账对象', '二级流量方', '整单规则', '分账金额/元', '分账类型', '操作']
return {
rowspan: mergeColNameList.includes(column.label) ? row.rowspan : column.label == '套餐规则' ? row.setMealRowspan : 1,
colspan: 1
}
},
// 鼠标移入
handleCellMouseEnter(row, column, cell, event) {
try {
this.$nextTick(() => {
//获取鼠标移入时的tbody结点
const tbody = this.$el.querySelector('.el-table__body-wrapper table tbody')
//循环获取tr结点
for (let i = 0; i < tbody.children.length; i++) {
const tr = tbody.children[i]
//逻辑判断,这步已经获取到了tr所以tableData[i]与tr是一致的
if (this.tableData[i].orderCode == row.orderCode) {
//改变tr的背景颜色
tr.style.background = '#f4f4fc'
//循环获取td,改变td的样式
for (let j = 0; j < tr.children.length; j++) {
const td = tr.children[j]
if (tr.children.length - 1 == j) {
console.log(tr.children[j], 11111)
}
//#region
td.style.background = '#f4f4fc'
}
} else {
tr.style.background = '#fff'
for (let j = 0; j < tr.children.length; j++) {
const td = tr.children[j]
td.style.background = '#fff'
}
}
}
//这部分是为了修改固定列部分样式的代码,逻辑与上面的一致
const tbody_fix = this.$el.querySelector('.el-table__fixed table tbody')
for (let i = 0; i < tbody_fix.children.length; i++) {
const tr = tbody_fix.children[i]
if (this.tableData[i].orderCode == row.orderCode) {
tr.style.background = '#f4f4fc'
for (let j = 0; j < tr.children.length; j++) {
const td = tr.children[j]
td.style.background = '#f4f4fc'
}
} else {
tr.style.background = '#fff'
for (let j = 0; j < tr.children.length; j++) {
const td = tr.children[j]
td.style.background = '#fff'
}
}
}
})
} catch (error) {
console.log(error)
}
},
// 鼠标移出
handleCellMouseLeave(row, column, cell, event) {
try {
//与鼠标移入的逻辑一致
this.$nextTick(() => {
const tbody = this.$el.querySelector('.el-table__body-wrapper table tbody')
for (let i = 0; i < tbody.children.length; i++) {
const tr = tbody.children[i]
if (this.tableData[i].orderCode == row.orderCode) {
tr.style.background = '#fff'
for (let j = 0; j < tr.children.length; j++) {
const td = tr.children[j]
td.style.background = '#fff'
}
}
}
//这部分是为了修改固定列部分样式的代码
const tbody_fix = this.$el.querySelector('.el-table__fixed table tbody')
for (let i = 0; i < tbody_fix.children.length; i++) {
const tr = tbody_fix.children[i]
if (this.tableData[i].orderCode == row.orderCode) {
tr.style.background = '#fff'
for (let j = 0; j < tr.children.length; j++) {
const td = tr.children[j]
td.style.background = '#fff'
}
}
}
})
} catch (error) {
console.log(error)
}
},
setClass({ row, column, rowIndex, columnIndex }) {
const mergeColNameList = ['主订单编号', '交易参考号', '客户姓名', '转化员姓名', '销售顾问', '支付方式', '支付时间', '分账对象', '二级流量方', '整单规则', '分账金额/元', '分账类型']
return (mergeColNameList.includes(column.label) && row.rowspan > 1) || (column.label == '套餐规则' && row.setMealRowspan > 1) ? 'add-border' : ''
},
/**获取商户列表 */
getMerchanListData(accountLevel) {
let merchantForm = {}
......@@ -893,7 +1057,7 @@ export default {
},
changTableCoulum(e) {
const { session } = this.$globalState
localStorage.setItem(`menuList${session.merchantId}`, JSON.stringify(e))
localStorage.setItem(`${this.pageName == 'insurance' ? 'in' : ''}menuList${session.merchantId}`, JSON.stringify(e))
},
// 查看明细
openDetail(item) {
......@@ -908,11 +1072,11 @@ export default {
params.payStartDateStr = startDate
params.payEndDateStr = endDate
} else {
const ISEXIT = DISABLE_MERCHANTID.includes(Number(this.merchantId))
if(!ISEXIT){
const ISEXIT = DISABLE_MERCHANTID.includes(Number(this.merchantId))
if (!ISEXIT) {
params.payStartDateStr = this.defaultStart
params.payEndDateStr = this.defaultEnd
}
}
}
if (this.searchForm.payType || this.searchForm.payType === 0) {
//支付方式
......@@ -949,31 +1113,84 @@ export default {
this.toGetCouponsList()
},
toGetCouponsList() {
let method = findupGradeOrder()
let method = newFindupGradeOrder()
let para = {
sceneType: this.pageName == 'insurance' ? 0 : 1,
routerMethod: method,
pageNum: this.$refs.subTable.page.pageNum,
pageSize: this.$refs.subTable.page.pageSize,
...this.newHttpParam
}
converterApi(para).then(res => {
res.list = res&&res.list?res.list:[]
this.tableData = res.list.map((item, index) => {
const TYPELIST = ['--', '毛利', '收入', '固定']
// let ruleType = item.shopProfitType == 1 ? '毛利' : '收入'
// let ruleType = item.shopTrafficMoneyCalculateType == 1 ? '毛利' : '收入'
let ruleType = TYPELIST[item.shopTrafficMoneyCalculateType]
item.rule = `${ruleType}${item.shopTrafficMoneyCalculateType == 0 ? '' : item.shopTrafficMoneyCalculateValue}${item.shopTrafficMoneyCalculateType == 0 ? '' : '%'}`
item.divisionTypeName = item.divisionType == 1 ? '线下对账' : '线上分账'
item.paySuccessDate = utils.dateFormat(item.paySuccessDate, 'YYYY-MM-DD HH:mm:ss')
// item.payTypeName = item.payType == 1 ? '微信支付' : item.payType == 2 ? '线下收款' : 'POS机'
item.payTypeName = PAYTYPEOBJ[item.payType]
// 如果有虚拟对账成本virtualAccountCost则取virtualAccountCost,否则按照原有逻辑
if(item.virtualAccountCost){
item.goodsCost = item.virtualAccountCost
}
res.list = res && res.list ? res.list : []
let tableData = []
const TYPELIST = { 0: '--', 1: '毛利', 2: '收入', 3: '固定', 8: '(收入-自定义其他费用)', 9: '(收入-其他费用)' }
res.list.forEach(item => {
const packageOrderList = item.packageOrderList || []
const orderRuleObj = item.mainProfitAllocation || {} // 整单规则取值对象
packageOrderList.forEach((subItem, sunIdx) => {
const subOrderList = subItem.subOrderList || []
const setMealRuleObj = subItem.profitAllocationRule || {} // 套餐规则取值对象
subOrderList.forEach((ele, eleIdx) => {
const { id, subOrderCode, subTotalPrice, upgradeGoodsCommodityCode, upgradeGoodsName, upgradeGoodsTypeName, subProfitAllocation, profitAllocationRule } = ele
let { shopTrafficMoneyCalculateType, shopTrafficMoneyCalculateValue } = profitAllocationRule || {}
const { goodsCost, virtualAccountCost, actualIncomeMoney, thirdPartyCost, djCost } = subProfitAllocation || {}
let ruleType = TYPELIST[shopTrafficMoneyCalculateType] || '--'
let setMealRuleType = TYPELIST[setMealRuleObj.shopTrafficMoneyCalculateType] || '--'
let orderRuleType = TYPELIST[orderRuleObj.shopTrafficMoneyCalculateType] || '--'
let _goodsCost = virtualAccountCost || goodsCost
if ((thirdPartyCost || djCost) && this.pageName == 'insurance') {
_goodsCost = (thirdPartyCost || 0) + (djCost || 0)
}
const _obj = {
...item,
rowspan: 1,
setMealRowspan: eleIdx == 0 ? subOrderList.length : 0,
id,
subOrderCode,
subTotalPrice,
upgradeGoodsCommodityCode,
upgradeGoodsName,
upgradeGoodsTypeName,
actualIncomeMoney,
realityShopMerchantName: orderRuleObj.shopMerchantName,
shopTrafficMoney: orderRuleObj.shopTrafficMoney,
goodsCost: _goodsCost,
rule: `${ruleType}${!shopTrafficMoneyCalculateType ? '' : shopTrafficMoneyCalculateValue}${!shopTrafficMoneyCalculateType ? '' : shopTrafficMoneyCalculateType == 3 ? '元' : '%'}`,
orderRule: `${orderRuleType}${!orderRuleObj.shopTrafficMoneyCalculateType ? '' : orderRuleObj.shopTrafficMoneyCalculateValue}${!orderRuleObj.shopTrafficMoneyCalculateType ? '' : orderRuleObj.shopTrafficMoneyCalculateType == 3 ? '元' : '%'}`,
setMealRule: `${setMealRuleType}${!setMealRuleObj.shopTrafficMoneyCalculateType ? '' : setMealRuleObj.shopTrafficMoneyCalculateValue}${!setMealRuleObj.shopTrafficMoneyCalculateType ? '' : setMealRuleObj.shopTrafficMoneyCalculateType == 3 ? '元' : '%'}`,
divisionTypeName: item.divisionType == 1 ? '线下对账' : '线上分账',
payTypeName: PAYTYPEOBJ[item.payType],
paySuccessDate: utils.dateFormat(item.paySuccessDate, 'YYYY-MM-DD HH:mm:ss')
}
tableData.push(_obj)
})
})
})
let codeList = tableData.map(item => item.orderCode)
this.tableData = tableData.map((item, index) => {
const rowspan = codeList?.filter(ele => ele == item.orderCode)?.length || 1
item.rowspan = codeList.indexOf(item.orderCode) == index ? rowspan : rowspan > 1 ? 0 : 1
return item
})
// this.tableData = res.list.map((item, index) => {
// let profitAllocationRule = item.profitAllocationRule || {}
// const TYPELIST = ['--', '毛利', '收入', '固定']
// let ruleType = TYPELIST[item.shopTrafficMoneyCalculateType]
// item.rule = `${ruleType}${item.shopTrafficMoneyCalculateType == 0 ? '' : item.shopTrafficMoneyCalculateValue}${item.shopTrafficMoneyCalculateType == 0 ? '' : '%'}`
// item.divisionTypeName = item.divisionType == 1 ? '线下对账' : '线上分账'
// item.paySuccessDate = utils.dateFormat(item.paySuccessDate, 'YYYY-MM-DD HH:mm:ss')
// // item.payTypeName = item.payType == 1 ? '微信支付' : item.payType == 2 ? '线下收款' : 'POS机'
// item.payTypeName = PAYTYPEOBJ[item.payType]
// // 如果有虚拟对账成本virtualAccountCost则取virtualAccountCost,否则按照原有逻辑
// if (item.virtualAccountCost) {
// item.goodsCost = item.virtualAccountCost
// }
// const rowspan = codeList?.filter(ele => ele == item.orderCode)?.length || 1
// item.rowspan = codeList.indexOf(item.orderCode) == index ? rowspan : rowspan > 1 ? 0 : 1
// return item
// })
this.tableTotal = res.total
this.httpParam = {
pageNum: this.$refs.subTable.page.pageNum,
......@@ -991,7 +1208,8 @@ export default {
let method = orderTotalNumOfJT()
let para = {
routerMethod: method,
...params
...params,
sceneType: this.pageName == 'insurance' ? 0 : 1
}
converterApi(para).then(res => {
if (res) {
......@@ -1000,10 +1218,23 @@ export default {
})
},
toExport() {
let method = exportUpgrade()
let hiddenColumnList = []
if (this.pageName == 'insurance') {
const showCoulumList = this.tableCoulumList.map(item => item.value)
this.fieldList.forEach(item => {
if (!showCoulumList.includes(item.value)) {
hiddenColumnList.push(item.enumId)
}
})
}
let method = this.pageName == 'insurance' ? exportInsurance() : exportUpgrade()
let para = {
routerMethod: method,
...this.httpParam
...this.httpParam,
sceneType: this.pageName == 'insurance' ? 0 : 1
}
if (this.pageName == 'insurance') {
para.hiddenColumnList = hiddenColumnList
}
converterApi(para).then(res => {
let tempaa = utils.getExplorer()
......@@ -1072,9 +1303,25 @@ export default {
.pannel {
padding: 0 15px;
}
/deep/ .table_wrap {
.el-table .el-table__body tr.hover-row,
.el-table tbody tr:hover {
box-shadow: unset !important;
transform: unset !important;
}
}
.table_wrap {
padding: 0 15px;
padding-bottom: 10px;
/deep/ .el-table__body {
border-collapse: collapse;
}
/deep/ .el-table__row {
.add-border {
border-right: 1px solid #ebeef5;
border-left: 1px solid #ebeef5;
}
}
}
.spanbtn {
cursor: pointer;
......@@ -1168,4 +1415,8 @@ export default {
// .table_wrap /deep/ .el-table th.is-leaf:first-child {
// border-right: none;
// }
// /deep/ .el-table .cross-row-border {
// border-right: 1px solid #dcdfe6;
// border-bottom: 1px solid #dcdfe6;
// }
</style>
<template>
<div>
<upgrade></upgrade>
</div>
</template>
<script>
import upgrade from '@/views/inSale/upgrade.vue'
export default {
name: 'index',
components: {
upgrade: upgrade
},
provide() {
return {
pageName: 'insurance'
}
},
data() {
return {}
},
created() {},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped></style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!