Commit dbdc0d5e by 张权

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

Master

See merge request !13
2 parents fbb5d121 cc49135c
...@@ -6,98 +6,113 @@ const getRulesData = () => { ...@@ -6,98 +6,113 @@ const getRulesData = () => {
const getRulesListData = () => { const getRulesListData = () => {
let method = 'dj.api.smartcarlife.merchantDivisionRule.pageChangeRecord' let method = 'dj.api.smartcarlife.merchantDivisionRule.pageChangeRecord'
return method return method
} }
// 客户评价 // 客户评价
const guestComTotal = () => { const guestComTotal = () => {
let method = 'dj.api.smartcarlife.orderCommentReport.total' let method = 'dj.api.smartcarlife.orderCommentReport.total'
return method return method
} }
// 是否开通精品升级 // 是否开通精品升级
const isOpenUpgrade = () => { const isOpenUpgrade = () => {
let method = 'dj.api.serviceMerchant.isOpenSmartcarlife' let method = 'dj.api.serviceMerchant.isOpenSmartcarlife'
return method return method
} }
// 订单统计 const isOpenInsurance = () => {
let method = 'dj.api.serviceMerchant.isOpenScene0'
return method
}
// 订单统计
const orderTotal = () => { const orderTotal = () => {
let method = 'dj.api.smartcarlife.orderReport.total' let method = 'dj.api.smartcarlife.orderReport.total'
return method return method
} }
// 券统计 // 券统计
const couponsTotal = () => { const couponsTotal = () => {
let method = 'dj.api.smartcarlife.couponReport.total' let method = 'dj.api.smartcarlife.couponReport.total'
return method return method
} }
// 按天统计券 // 按天统计券
const couponsTotalByDay = () => { const couponsTotalByDay = () => {
let method = 'dj.api.smartcarlife.couponReport.countByDate' let method = 'dj.api.smartcarlife.couponReport.countByDate'
return method return method
} }
// 按天统计金额 // 按天统计金额
const moneyTotal = () => { const moneyTotal = () => {
let method = 'dj.api.smartcarlife.orderReport.totalByDay' let method = 'dj.api.smartcarlife.orderReport.totalByDay'
return method return method
} }
// 精品礼券订单查询 // 精品礼券订单查询
const findCoupons = () => { const findCoupons = () => {
let method = 'dj.api.life.customer.coupon.listFor4S' let method = 'dj.api.life.customer.coupon.listFor4S'
return method return method
} }
// 精品礼券升级订单查询 // 精品礼券升级订单查询
const findupGradeOrder = () => { const findupGradeOrder = () => {
let method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.page' let method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.page'
return method return method
} }
// 查看礼券
const newFindupGradeOrder = () => {
let method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.pageByMainOrder'
return method
}
// 查看礼券
const checkCoupons = () => { const checkCoupons = () => {
let method = 'dj.api.smartcarlife.merchant.coupon.page' let method = 'dj.api.smartcarlife.merchant.coupon.page'
return method return method
} }
// 我的分账 // 我的分账
const mydivision = () => { const mydivision = () => {
let method = 'dj.smartcarlife.api.shop.order.division.page' let method = 'dj.smartcarlife.api.shop.order.division.page'
return method return method
} }
// 精品礼券导出 // 精品礼券导出
const exportCoupons = () => { const exportCoupons = () => {
let method = 'dj.api.life.customer.coupon.exportExcelListFor4S' let method = 'dj.api.life.customer.coupon.exportExcelListFor4S'
return method return method
} }
// 精品礼券升级订单导出 // 精品礼券升级订单导出
const exportUpgrade = () => { const exportUpgrade = () => {
let method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.export' let method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.export'
return method return method
} }
// 我的分账导出 // 延保订单导出
const exportInsurance = () => {
let method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.exportNew'
return method
}
// 我的分账导出
const exportMydivision = () => { const exportMydivision = () => {
let method = 'dj.smartcarlife.api.shop.order.division.export' let method = 'dj.smartcarlife.api.shop.order.division.export'
return method return method
} }
// 获取发券人/转化人列表 // 获取发券人/转化人列表
const getEmployName = () => { const getEmployName = () => {
let method = 'dj.api.life.customer.coupon.distinctColum' let method = 'dj.api.life.customer.coupon.distinctColum'
return method return method
} }
// 查看明细 // 查看明细
const checkDetail = () => { const checkDetail = () => {
let method = 'dj.api.smartcarlife.goodsOrder.detail' let method = 'dj.api.smartcarlife.goodsOrder.detail'
return method return method
} }
// 集团--订单统计 // 集团--订单统计
const orderTotalOfJT = () => { const orderTotalOfJT = () => {
let method = 'dj.api.smartcarlife.orderReport.totalByMerchant' let method = 'dj.api.smartcarlife.orderReport.totalByMerchant'
return method return method
} }
// 集团--精品升级订单统计数 // 集团--精品升级订单统计数
const orderTotalNumOfJT = () => { const orderTotalNumOfJT = () => {
let method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.count' let method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.shop.merchant.count'
return method return method
} }
// 集团--我的分账统计数 // 集团--我的分账统计数
const myAccountTotalNumOfJT = () => { const myAccountTotalNumOfJT = () => {
let method = 'dj.smartcarlife.api.shop.order.division.page.count' let method = 'dj.smartcarlife.api.shop.order.division.page.count'
return method return method
} }
// 获取4s店列表 // 获取4s店列表
const get4SList = params => { const get4SList = params => {
params.method = `scrm.api.carlife.merchant.listWithPageByCurMerchant` params.method = `scrm.api.carlife.merchant.listWithPageByCurMerchant`
return http({ return http({
...@@ -106,8 +121,8 @@ const get4SList = params => { ...@@ -106,8 +121,8 @@ const get4SList = params => {
data: params, data: params,
sign: true sign: true
}) })
} }
// 服务介绍 // 服务介绍
const introConpute = params => { const introConpute = params => {
params.method = `scrm.api.boutiquecoupon.config.getModelParams` params.method = `scrm.api.boutiquecoupon.config.getModelParams`
return http({ return http({
...@@ -116,8 +131,8 @@ const introConpute = params => { ...@@ -116,8 +131,8 @@ const introConpute = params => {
data: params, data: params,
sign: true sign: true
}) })
} }
// 获取商户列表 // 获取商户列表
const getMerchantList = params => { const getMerchantList = params => {
params.method = `entmicro.api.common.findMerchantTreeByMerchantNo.list` params.method = `entmicro.api.common.findMerchantTreeByMerchantNo.list`
return http({ return http({
...@@ -127,28 +142,4 @@ const getMerchantList = params => { ...@@ -127,28 +142,4 @@ const getMerchantList = params => {
sign: true 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 \ 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 @@ ...@@ -2,7 +2,7 @@
<div class="order-container"> <div class="order-container">
<div class="tip_wrap flex_scb"> <div class="tip_wrap flex_scb">
<div class="tip_text"> <div class="tip_text">
<p class="h14_title">合作了精品升级业务且开启了自动分账功能的商户,在“线上分账”列表中可查看分账明细,未开启线上自动分账或者因各种</p> <p class="h14_title">合作了{{ pageName == 'insurance' ? '会员权益延保' : '精品升级' }}业务且开启了自动分账功能的商户,在“线上分账”列表中可查看分账明细,未开启线上自动分账或者因各种</p>
<div style="height: 10px"></div> <div style="height: 10px"></div>
<p class="h14_title">其他因素导致未分账成功的,在线下对账中查看,统一下个月月初结算上个月订单。</p> <p class="h14_title">其他因素导致未分账成功的,在线下对账中查看,统一下个月月初结算上个月订单。</p>
</div> </div>
...@@ -65,12 +65,13 @@ const SERCH_GOODSNAME = { ...@@ -65,12 +65,13 @@ const SERCH_GOODSNAME = {
type: 'input', type: 'input',
isClear: true isClear: true
} }
const DISABLE_MERCHANTID =[44191564,44191528,44191536,44184606,44209510] const DISABLE_MERCHANTID = [44191564, 44191528, 44191536, 44184606, 44209510]
export default { export default {
name: '', name: '',
props: { props: {
list: Array list: Array
}, },
inject: ['pageName'],
data() { data() {
return { return {
refreshKey1: new Date(), refreshKey1: new Date(),
...@@ -443,7 +444,7 @@ export default { ...@@ -443,7 +444,7 @@ export default {
let startdate = utils.dateFormat(openInfo.openDate, 'YYYY-MM-DD 00:00:00') let startdate = utils.dateFormat(openInfo.openDate, 'YYYY-MM-DD 00:00:00')
let endDate = utils.dateFormat(new Date(), 'YYYY-MM-DD 23:59:59') let endDate = utils.dateFormat(new Date(), 'YYYY-MM-DD 23:59:59')
const ISEXIT = DISABLE_MERCHANTID.includes(Number(this.merchantId)) const ISEXIT = DISABLE_MERCHANTID.includes(Number(this.merchantId))
if(!ISEXIT){ if (!ISEXIT) {
params.paySuccessDateStartDate = startdate params.paySuccessDateStartDate = startdate
params.paySuccessDateEndDate = endDate params.paySuccessDateEndDate = endDate
} }
...@@ -533,10 +534,11 @@ export default { ...@@ -533,10 +534,11 @@ export default {
currentPage: this.$refs[`table${this.curDivisionType}`].page.pageNum, currentPage: this.$refs[`table${this.curDivisionType}`].page.pageNum,
pageSize: this.$refs[`table${this.curDivisionType}`].page.pageSize, pageSize: this.$refs[`table${this.curDivisionType}`].page.pageSize,
divisionType: this.curDivisionType, divisionType: this.curDivisionType,
...this.newHttpParam ...this.newHttpParam,
sceneType: this.pageName == 'insurance' ? 0 : 1
} }
converterApi(para).then(res => { converterApi(para).then(res => {
res.list = res&&res.list?res.list:[] res.list = res && res.list ? res.list : []
res.list.map(item => { res.list.map(item => {
item.divisionTypeName = item.divisionType == 1 ? '线下对账' : '线上分账' item.divisionTypeName = item.divisionType == 1 ? '线下对账' : '线上分账'
item.successDate = item.paySuccessDate ? utils.dateFormat(item.paySuccessDate, 'YYYY-MM-DD HH:mm:ss') : '--' item.successDate = item.paySuccessDate ? utils.dateFormat(item.paySuccessDate, 'YYYY-MM-DD HH:mm:ss') : '--'
...@@ -586,7 +588,8 @@ export default { ...@@ -586,7 +588,8 @@ export default {
let method = myAccountTotalNumOfJT() let method = myAccountTotalNumOfJT()
let para = { let para = {
routerMethod: method, routerMethod: method,
...params ...params,
sceneType: this.pageName == 'insurance' ? 0 : 1
} }
converterApi(para).then(res => { converterApi(para).then(res => {
this.mytotalNumData = res this.mytotalNumData = res
...@@ -598,7 +601,8 @@ export default { ...@@ -598,7 +601,8 @@ export default {
routerMethod: method, routerMethod: method,
currentPage: this.$refs[`table${this.curDivisionType}`].page.pageNum, currentPage: this.$refs[`table${this.curDivisionType}`].page.pageNum,
pageSize: this.$refs[`table${this.curDivisionType}`].page.pageSize, pageSize: this.$refs[`table${this.curDivisionType}`].page.pageSize,
...this.httpParam ...this.httpParam,
sceneType: this.pageName == 'insurance' ? 0 : 1
} }
converterApi(para).then(res => { converterApi(para).then(res => {
let tempaa = utils.getExplorer() let tempaa = utils.getExplorer()
......
...@@ -141,6 +141,7 @@ import util from '../../util/util' ...@@ -141,6 +141,7 @@ import util from '../../util/util'
// const openDdate = JSON.parse(localStorage.getItem('openInfo')) // const openDdate = JSON.parse(localStorage.getItem('openInfo'))
export default { export default {
name: '', name: '',
inject: ['pageName'],
components: { components: {
funnel, funnel,
'bar-chart': bar, 'bar-chart': bar,
...@@ -161,7 +162,10 @@ export default { ...@@ -161,7 +162,10 @@ export default {
dateplaceholder: '选择日期', dateplaceholder: '选择日期',
showMore: true, showMore: true,
// tabList: ['精品升级订单', '我的分账'], // tabList: ['精品升级订单', '我的分账'],
tabList: [{name:'精品升级订单',conId:'first'},{name:'我的分账',conId:'second'}], tabList: [
{ name: '精品升级订单', conId: 'first' },
{ name: '我的分账', conId: 'second' }
],
// tabList: ['精品礼券领取订单', '精品升级订单'], // tabList: ['精品礼券领取订单', '精品升级订单'],
curTabIndex: 'first', curTabIndex: 'first',
customName: '', customName: '',
...@@ -186,8 +190,17 @@ export default { ...@@ -186,8 +190,17 @@ export default {
created() { created() {
const { session } = this.$globalState const { session } = this.$globalState
this.accountLevel = session.accountLevel this.accountLevel = session.accountLevel
if (this.pageName == 'insurance') {
this.tabList = [
{ name: '订单列表', conId: 'first' },
{ name: '我的分账', conId: 'second' }
]
}
if (session.accountLevel != 4) { if (session.accountLevel != 4) {
this.tabList = [{name:'订单明细',conId:'first'},{name:'分账明细',conId:'second'}] this.tabList = [
{ name: '订单明细', conId: 'first' },
{ name: '分账明细', conId: 'second' }
]
// this.tabList = ['订单明细'] // this.tabList = ['订单明细']
// this.toGet4SStore() // this.toGet4SStore()
} }
...@@ -391,7 +404,7 @@ export default { ...@@ -391,7 +404,7 @@ export default {
.new_tab_wrap { .new_tab_wrap {
margin-top: 8px; margin-top: 8px;
margin-bottom: 16px; margin-bottom: 16px;
/deep/ .el-tabs__item{ /deep/ .el-tabs__item {
font-size: 16px !important; font-size: 16px !important;
} }
} }
......
...@@ -5,29 +5,39 @@ ...@@ -5,29 +5,39 @@
<div class="text">该业务场景的优势介绍可点击</div> <div class="text">该业务场景的优势介绍可点击</div>
<div @click="toIntroductPage" class="btn_text">去查看</div> <div @click="toIntroductPage" class="btn_text">去查看</div>
</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> <open-con v-if="openType == 1"></open-con>
</div> </div>
</template> </template>
<script> <script>
import notOpenCon from './upgradeIntro.vue' import notOpenCon from './upgradeIntro.vue'
import warranty from '@/views/publicity/warranty.vue'
import openCon from './open.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' import { converterApi } from '../../api/modules/converter'
export default { export default {
name: 'index', name: 'index',
components: { components: {
'not-open-con': notOpenCon, 'not-open-con': notOpenCon,
'open-con': openCon 'open-con': openCon,
warranty
}, },
inject: ['pageName'],
data() { data() {
return { return {
openType: 2 // 0未开通 1已开通 openType: 2 // 0未开通 1已开通
} }
}, },
created() { created() {
if (this.pageName == 'insurance') {
this.judgeShowInsurance()
} else {
this.judgeOpen() this.judgeOpen()
}
// if(localStorage.getItem('openInfo')){ // if(localStorage.getItem('openInfo')){
// let info = JSON.parse(localStorage.getItem('openInfo')) // let info = JSON.parse(localStorage.getItem('openInfo'))
// this.openType = info.open // this.openType = info.open
...@@ -60,9 +70,29 @@ export default { ...@@ -60,9 +70,29 @@ export default {
loading.close() 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() { toIntroductPage() {
const title = '业务介绍' 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 @@ ...@@ -14,7 +14,7 @@
<span>,累计订单支付金额:</span> <span>,累计订单支付金额:</span>
<span style="color: #5850ff">¥{{ tableCountInfo.totalPrice || 0 }}</span> <span style="color: #5850ff">¥{{ tableCountInfo.totalPrice || 0 }}</span>
<span>元,累计导流方利润:</span> <span>元,累计导流方利润:</span>
<span style="color: #5850ff">{{ tableCountInfo.totalShopProfitMoney || 0 }}</span> <span style="color: #5850ff">{{ tableCountInfo.totalShopTrafficMoney || 0 }}</span>
<span>元</span> <span>元</span>
</div> </div>
<div class="right_select"> <div class="right_select">
...@@ -24,9 +24,9 @@ ...@@ -24,9 +24,9 @@
<GLButton style="margin-left: 8px;" size="small" fn="导出精品升级订单" @click="toExport">导出数据</GLButton> <GLButton style="margin-left: 8px;" size="small" fn="导出精品升级订单" @click="toExport">导出数据</GLButton>
</div> </div>
</div> </div>
<!-- :span-method="objectSpanMethod" -->
<div class="table_wrap"> <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"> <div class="table-btns" slot="table-btns" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton> <GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div> </div>
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<!-- <span v-if="orderDetail.payOrder.payType == 1" class="h19_title">微信支付</span> <!-- <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 == 2" class="h19_title">线下支付</span>
<span v-if="orderDetail.payOrder.payType == 3" class="h19_title">POS机收款</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>
<div class="info_text flex_img"> <div class="info_text flex_img">
<span>收款凭证:</span> <span>收款凭证:</span>
...@@ -197,28 +197,29 @@ ...@@ -197,28 +197,29 @@
</template> </template>
<script> <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 { converterApi } from '../../api/modules/converter'
import utils from '../../util/util' import utils from '../../util/util'
const logTypeList = ['预录用户', '用户下单', '用户付款', '完成服务'] const logTypeList = ['预录用户', '用户下单', '用户付款', '完成服务']
const orderStatusList = ['待升级', '未升级', '待支付', '已支付', '已退款', '已完成'] const orderStatusList = ['待升级', '未升级', '待支付', '已支付', '已退款', '已完成']
const PAYTYPEOBJ = { const PAYTYPEOBJ = {
1: "微信支付", 1: '微信支付',
2: "4S店支付", 2: '4S店支付',
3: "POS机收款", 3: 'POS机收款',
4: "支付宝支付", 4: '支付宝支付',
5: "嘀加收款" 5: '嘀加收款'
} }
const DISABLE_MERCHANTID =[44191564,44191528,44191536,44184606,44209510] const DISABLE_MERCHANTID = [44191564, 44191528, 44191536, 44184606, 44209510]
export default { export default {
name: '', name: '',
props: { props: {
list: Array list: Array
}, },
inject: ['pageName'],
data() { data() {
return { return {
pageTypeObj:PAYTYPEOBJ, pageTypeObj: PAYTYPEOBJ,
dynamicTableShow: true, dynamicTableShow: true,
rowNumber: 2, rowNumber: 2,
refreshKey: Date.now(), refreshKey: Date.now(),
...@@ -273,7 +274,7 @@ export default { ...@@ -273,7 +274,7 @@ export default {
{ {
confId: 5, confId: 5,
confName: '嘀加收款' confName: '嘀加收款'
}, }
] ]
}, },
{ {
...@@ -406,6 +407,7 @@ export default { ...@@ -406,6 +407,7 @@ export default {
label: '主订单编号', label: '主订单编号',
level: 1, level: 1,
width: '200', width: '200',
enumId: 'orderCode',
disabled: true disabled: true
}, },
{ {
...@@ -413,6 +415,7 @@ export default { ...@@ -413,6 +415,7 @@ export default {
label: '交易参考号', label: '交易参考号',
level: 1, level: 1,
width: '200', width: '200',
enumId: 'tradeNo',
disabled: true disabled: true
}, },
{ {
...@@ -420,6 +423,7 @@ export default { ...@@ -420,6 +423,7 @@ export default {
label: '子订单编号', label: '子订单编号',
level: 1, level: 1,
width: '200', width: '200',
enumId: 'subOrderCode',
disabled: true disabled: true
}, },
{ {
...@@ -427,6 +431,7 @@ export default { ...@@ -427,6 +431,7 @@ export default {
label: '商品名称', label: '商品名称',
level: 1, level: 1,
width: '200', width: '200',
enumId: 'upgradeGoodsName',
disabled: false disabled: false
}, },
{ {
...@@ -434,12 +439,14 @@ export default { ...@@ -434,12 +439,14 @@ export default {
label: '商品编号', label: '商品编号',
level: 1, level: 1,
width: '200', width: '200',
enumId: 'upgradeGoodsCommodityCode',
disabled: false disabled: false
}, },
{ {
value: 'goodsCost', value: 'goodsCost',
label: '商品成本', label: '商品成本',
level: 1, level: 1,
enumId: 'goodsCost',
width: '110', width: '110',
align: 'right', align: 'right',
disabled: false disabled: false
...@@ -448,6 +455,7 @@ export default { ...@@ -448,6 +455,7 @@ export default {
value: 'customerName', value: 'customerName',
label: '客户姓名', label: '客户姓名',
level: 1, level: 1,
enumId: 'customerName',
width: '200', width: '200',
disabled: false disabled: false
}, },
...@@ -462,6 +470,7 @@ export default { ...@@ -462,6 +470,7 @@ export default {
value: 'sellerName', value: 'sellerName',
label: '转化员姓名', label: '转化员姓名',
level: 2, level: 2,
enumId: 'sellerName',
width: '200', width: '200',
disabled: false disabled: false
}, },
...@@ -469,6 +478,7 @@ export default { ...@@ -469,6 +478,7 @@ export default {
value: 'employeeName', value: 'employeeName',
label: '销售顾问', label: '销售顾问',
level: 2, level: 2,
enumId: 'employeeName',
width: '200', width: '200',
disabled: false disabled: false
}, },
...@@ -476,6 +486,7 @@ export default { ...@@ -476,6 +486,7 @@ export default {
value: 'paySuccessDate', value: 'paySuccessDate',
label: '支付时间', label: '支付时间',
level: 2, level: 2,
enumId: 'paySuccessDate',
width: '200', width: '200',
disabled: false disabled: false
}, },
...@@ -483,6 +494,7 @@ export default { ...@@ -483,6 +494,7 @@ export default {
value: 'payTypeName', value: 'payTypeName',
label: '支付方式', label: '支付方式',
level: 3, level: 3,
enumId: 'payType',
width: '200', width: '200',
disabled: false disabled: false
}, },
...@@ -491,6 +503,7 @@ export default { ...@@ -491,6 +503,7 @@ export default {
label: '支付金额/元', label: '支付金额/元',
level: 3, level: 3,
width: '110', width: '110',
enumId: 'subTotalPrice',
align: 'right', align: 'right',
disabled: true disabled: true
}, },
...@@ -499,6 +512,7 @@ export default { ...@@ -499,6 +512,7 @@ export default {
label: '总分账金额/元', label: '总分账金额/元',
level: 3, level: 3,
width: '150', width: '150',
enumId: 'actualIncomeMoney',
align: 'right', align: 'right',
disabled: true disabled: true
}, },
...@@ -506,6 +520,7 @@ export default { ...@@ -506,6 +520,7 @@ export default {
value: 'realityShopMerchantName', value: 'realityShopMerchantName',
label: '分账对象', label: '分账对象',
level: 3, level: 3,
enumId: 'shopMerchantName',
width: '200', width: '200',
disabled: false disabled: false
}, },
...@@ -513,13 +528,32 @@ export default { ...@@ -513,13 +528,32 @@ export default {
value: 'subShopMerchantName', value: 'subShopMerchantName',
label: '二级流量方', label: '二级流量方',
level: 3, level: 3,
enumId: 'subShopMerchantName',
width: '200', width: '200',
disabled: false disabled: false
}, },
{ {
value: 'rule', 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, level: 3,
enumId: 'packageProfitAllocationRule',
width: '200', width: '200',
disabled: false disabled: false
}, },
...@@ -527,6 +561,7 @@ export default { ...@@ -527,6 +561,7 @@ export default {
value: 'shopTrafficMoney', value: 'shopTrafficMoney',
label: '分账金额/元', label: '分账金额/元',
level: 3, level: 3,
enumId: 'shopTrafficMoney',
width: '110', width: '110',
align: 'right', align: 'right',
disabled: true disabled: true
...@@ -535,6 +570,7 @@ export default { ...@@ -535,6 +570,7 @@ export default {
value: 'divisionTypeName', value: 'divisionTypeName',
label: '分账类型', label: '分账类型',
level: 3, level: 3,
enumId: 'divisionType',
width: '200', width: '200',
disabled: false disabled: false
} }
...@@ -657,11 +693,21 @@ export default { ...@@ -657,11 +693,21 @@ export default {
width: '200' width: '200'
}, },
{ {
label: '分账规则', label: '品类规则',
prop: 'rule', prop: 'rule',
width: '200' width: '200'
}, },
{ {
label: '整单规则',
prop: 'orderRule',
width: '200'
},
{
label: '套餐规则',
prop: 'setMealRule',
width: '200'
},
{
label: '分账金额/元', label: '分账金额/元',
prop: 'shopTrafficMoney', prop: 'shopTrafficMoney',
width: '110', width: '110',
...@@ -689,6 +735,9 @@ export default { ...@@ -689,6 +735,9 @@ export default {
name: row => { name: row => {
return '查看明细' return '查看明细'
}, },
condition: row => {
return row.scope.rowspan != 0
},
attrs: { attrs: {
type: 'text' type: 'text'
}, },
...@@ -709,7 +758,7 @@ export default { ...@@ -709,7 +758,7 @@ export default {
this.accountLevel = session.accountLevel this.accountLevel = session.accountLevel
this.merchantId = session.merchantId this.merchantId = session.merchantId
this.isAdmin = session.admin 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) { if (temp) {
this.tableCoulumList = temp this.tableCoulumList = temp
} else { } else {
...@@ -721,6 +770,18 @@ export default { ...@@ -721,6 +770,18 @@ export default {
} }
}, },
mounted() { 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 openInfo = JSON.parse(localStorage.getItem('openInfo'))
let startDate = utils.dateFormat(openInfo.openDate) let startDate = utils.dateFormat(openInfo.openDate)
let endDate = utils.dateFormat(new Date()) let endDate = utils.dateFormat(new Date())
...@@ -728,7 +789,7 @@ export default { ...@@ -728,7 +789,7 @@ export default {
let params = {} let params = {}
// 2023.6.28 特殊门店不需要默认传支付时间 // 2023.6.28 特殊门店不需要默认传支付时间
const ISEXIT = DISABLE_MERCHANTID.includes(Number(this.merchantId)) const ISEXIT = DISABLE_MERCHANTID.includes(Number(this.merchantId))
if(!ISEXIT){ if (!ISEXIT) {
params.payStartDateStr = utils.dateFormat(startDate, 'YYYY-MM-DD 00:00:00') params.payStartDateStr = utils.dateFormat(startDate, 'YYYY-MM-DD 00:00:00')
params.payEndDateStr = utils.dateFormat(endDate, 'YYYY-MM-DD 23:59:59') params.payEndDateStr = utils.dateFormat(endDate, 'YYYY-MM-DD 23:59:59')
} }
...@@ -738,6 +799,109 @@ export default { ...@@ -738,6 +799,109 @@ export default {
this.toGetCouponsList() this.toGetCouponsList()
}, },
methods: { 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) { getMerchanListData(accountLevel) {
let merchantForm = {} let merchantForm = {}
...@@ -893,7 +1057,7 @@ export default { ...@@ -893,7 +1057,7 @@ export default {
}, },
changTableCoulum(e) { changTableCoulum(e) {
const { session } = this.$globalState 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) { openDetail(item) {
...@@ -909,7 +1073,7 @@ export default { ...@@ -909,7 +1073,7 @@ export default {
params.payEndDateStr = endDate params.payEndDateStr = endDate
} else { } else {
const ISEXIT = DISABLE_MERCHANTID.includes(Number(this.merchantId)) const ISEXIT = DISABLE_MERCHANTID.includes(Number(this.merchantId))
if(!ISEXIT){ if (!ISEXIT) {
params.payStartDateStr = this.defaultStart params.payStartDateStr = this.defaultStart
params.payEndDateStr = this.defaultEnd params.payEndDateStr = this.defaultEnd
} }
...@@ -949,31 +1113,84 @@ export default { ...@@ -949,31 +1113,84 @@ export default {
this.toGetCouponsList() this.toGetCouponsList()
}, },
toGetCouponsList() { toGetCouponsList() {
let method = findupGradeOrder() let method = newFindupGradeOrder()
let para = { let para = {
sceneType: this.pageName == 'insurance' ? 0 : 1,
routerMethod: method, routerMethod: method,
pageNum: this.$refs.subTable.page.pageNum, pageNum: this.$refs.subTable.page.pageNum,
pageSize: this.$refs.subTable.page.pageSize, pageSize: this.$refs.subTable.page.pageSize,
...this.newHttpParam ...this.newHttpParam
} }
converterApi(para).then(res => { converterApi(para).then(res => {
res.list = res&&res.list?res.list:[] res.list = res && res.list ? res.list : []
this.tableData = res.list.map((item, index) => { let tableData = []
const TYPELIST = ['--', '毛利', '收入', '固定'] const TYPELIST = { 0: '--', 1: '毛利', 2: '收入', 3: '固定', 8: '(收入-自定义其他费用)', 9: '(收入-其他费用)' }
// let ruleType = item.shopProfitType == 1 ? '毛利' : '收入' res.list.forEach(item => {
// let ruleType = item.shopTrafficMoneyCalculateType == 1 ? '毛利' : '收入' const packageOrderList = item.packageOrderList || []
let ruleType = TYPELIST[item.shopTrafficMoneyCalculateType] const orderRuleObj = item.mainProfitAllocation || {} // 整单规则取值对象
item.rule = `${ruleType}${item.shopTrafficMoneyCalculateType == 0 ? '' : item.shopTrafficMoneyCalculateValue}${item.shopTrafficMoneyCalculateType == 0 ? '' : '%'}` packageOrderList.forEach((subItem, sunIdx) => {
item.divisionTypeName = item.divisionType == 1 ? '线下对账' : '线上分账' const subOrderList = subItem.subOrderList || []
item.paySuccessDate = utils.dateFormat(item.paySuccessDate, 'YYYY-MM-DD HH:mm:ss') const setMealRuleObj = subItem.profitAllocationRule || {} // 套餐规则取值对象
// item.payTypeName = item.payType == 1 ? '微信支付' : item.payType == 2 ? '线下收款' : 'POS机' subOrderList.forEach((ele, eleIdx) => {
item.payTypeName = PAYTYPEOBJ[item.payType] const { id, subOrderCode, subTotalPrice, upgradeGoodsCommodityCode, upgradeGoodsName, upgradeGoodsTypeName, subProfitAllocation, profitAllocationRule } = ele
// 如果有虚拟对账成本virtualAccountCost则取virtualAccountCost,否则按照原有逻辑 let { shopTrafficMoneyCalculateType, shopTrafficMoneyCalculateValue } = profitAllocationRule || {}
if(item.virtualAccountCost){ const { goodsCost, virtualAccountCost, actualIncomeMoney, thirdPartyCost, djCost } = subProfitAllocation || {}
item.goodsCost = item.virtualAccountCost 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 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.tableTotal = res.total
this.httpParam = { this.httpParam = {
pageNum: this.$refs.subTable.page.pageNum, pageNum: this.$refs.subTable.page.pageNum,
...@@ -991,7 +1208,8 @@ export default { ...@@ -991,7 +1208,8 @@ export default {
let method = orderTotalNumOfJT() let method = orderTotalNumOfJT()
let para = { let para = {
routerMethod: method, routerMethod: method,
...params ...params,
sceneType: this.pageName == 'insurance' ? 0 : 1
} }
converterApi(para).then(res => { converterApi(para).then(res => {
if (res) { if (res) {
...@@ -1000,10 +1218,23 @@ export default { ...@@ -1000,10 +1218,23 @@ export default {
}) })
}, },
toExport() { 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 = { let para = {
routerMethod: method, routerMethod: method,
...this.httpParam ...this.httpParam,
sceneType: this.pageName == 'insurance' ? 0 : 1
}
if (this.pageName == 'insurance') {
para.hiddenColumnList = hiddenColumnList
} }
converterApi(para).then(res => { converterApi(para).then(res => {
let tempaa = utils.getExplorer() let tempaa = utils.getExplorer()
...@@ -1072,9 +1303,25 @@ export default { ...@@ -1072,9 +1303,25 @@ export default {
.pannel { .pannel {
padding: 0 15px; 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 { .table_wrap {
padding: 0 15px; padding: 0 15px;
padding-bottom: 10px; 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 { .spanbtn {
cursor: pointer; cursor: pointer;
...@@ -1168,4 +1415,8 @@ export default { ...@@ -1168,4 +1415,8 @@ export default {
// .table_wrap /deep/ .el-table th.is-leaf:first-child { // .table_wrap /deep/ .el-table th.is-leaf:first-child {
// border-right: none; // border-right: none;
// } // }
// /deep/ .el-table .cross-row-border {
// border-right: 1px solid #dcdfe6;
// border-bottom: 1px solid #dcdfe6;
// }
</style> </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!