Commit fa36dcf8 by zhangquan

联调

1 parent ba434982
......@@ -17,6 +17,10 @@ const isOpenUpgrade = () => {
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'
......@@ -133,4 +137,4 @@ const getMerchantList = params => {
sign: true
})
}
export { getRulesData, getRulesListData, guestComTotal, isOpenUpgrade, orderTotal, couponsTotal, couponsTotalByDay, moneyTotal, findCoupons, findupGradeOrder, newFindupGradeOrder, checkCoupons, mydivision, exportMydivision, exportUpgrade, exportCoupons, getEmployName, checkDetail, orderTotalOfJT, orderTotalNumOfJT, myAccountTotalNumOfJT, get4SList, introConpute, getMerchantList }
export { getRulesData, getRulesListData, guestComTotal, isOpenUpgrade, isOpenInsurance, orderTotal, couponsTotal, couponsTotalByDay, moneyTotal, findCoupons, findupGradeOrder, newFindupGradeOrder, checkCoupons, mydivision, exportMydivision, exportUpgrade, exportCoupons, getEmployName, checkDetail, orderTotalOfJT, orderTotalNumOfJT, myAccountTotalNumOfJT, get4SList, introConpute, getMerchantList }
......@@ -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 } })
}
}
}
......
......@@ -216,6 +216,7 @@ export default {
props: {
list: Array
},
inject: ['pageName'],
data() {
return {
pageTypeObj: PAYTYPEOBJ,
......@@ -531,6 +532,14 @@ export default {
disabled: false
},
{
value: 'setMealRule',
label: '套餐规则',
filter: true,
level: 3,
width: '200',
disabled: false
},
{
value: 'shopTrafficMoney',
label: '分账金额/元',
level: 3,
......@@ -674,6 +683,11 @@ export default {
width: '200'
},
{
label: '套餐规则',
prop: 'setMealRule',
width: '200'
},
{
label: '分账金额/元',
prop: 'shopTrafficMoney',
width: '110',
......@@ -733,6 +747,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())
......@@ -751,18 +777,16 @@ export default {
},
methods: {
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex == 2) console.log(row.rowspan, rowIndex, columnIndex)
const mergeColList = ['orderCode', 'tradeNo', 'customerName', 'sellerName', 'employeeName', 'payTypeName', 'subTotalPrice', 'realityShopMerchantName', 'subShopMerchantName', 'orderRule', 'shopTrafficMoney', 'divisionTypeName']
// column没有prop,只能用label判断
const mergeColNameList = ['主订单编号', '交易参考号', '客户姓名', '转化员姓名', '销售顾问', '支付方式', '支付金额/元', '分账对象', '二级流量方', '整单规则', '分账金额/元', '分账类型']
return {
rowspan: mergeColNameList.includes(column.label) ? row.rowspan : 1,
rowspan: mergeColNameList.includes(column.label) ? row.rowspan : column.label == '套餐规则' ? row.setMealRowspan : 1,
colspan: 1
}
},
setClass({ row, column, rowIndex, columnIndex }) {
const mergeColNameList = ['主订单编号', '交易参考号', '客户姓名', '转化员姓名', '销售顾问', '支付方式', '支付金额/元', '分账对象', '二级流量方', '整单规则', '分账金额/元', '分账类型']
return mergeColNameList.includes(column.label) && row.rowspan > 1 ? 'add-border' : ''
return (mergeColNameList.includes(column.label) && row.rowspan > 1) || (column.label == '套餐规则' && row.setMealRowspan > 1) ? 'add-border' : ''
},
/**获取商户列表 */
getMerchanListData(accountLevel) {
......@@ -992,15 +1016,18 @@ export default {
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 } = subProfitAllocation || {}
let ruleType = TYPELIST[shopTrafficMoneyCalculateType]
let orderRuleType = TYPELIST[orderRuleObj.shopTrafficMoneyCalculateType]
let ruleType = TYPELIST[shopTrafficMoneyCalculateType] || '--'
let setMealRuleType = TYPELIST[setMealRuleObj.shopTrafficMoneyCalculateType] || '--'
let orderRuleType = TYPELIST[orderRuleObj.shopTrafficMoneyCalculateType] || '--'
const _obj = {
...item,
rowspan: 1,
setMealRowspan: eleIdx == 0 ? subOrderList.length : 0,
id,
subOrderCode,
subTotalPrice,
......@@ -1011,8 +1038,9 @@ export default {
realityShopMerchantName: orderRuleObj.shopMerchantName,
shopTrafficMoney: orderRuleObj.shopTrafficMoney,
goodsCost: virtualAccountCost || goodsCost,
rule: `${ruleType}${shopTrafficMoneyCalculateType == 0 ? '' : shopTrafficMoneyCalculateValue}${shopTrafficMoneyCalculateType == 0 ? '' : '%'}`,
orderRule: `${orderRuleType}${orderRuleObj.shopTrafficMoneyCalculateType == 0 ? '' : orderRuleObj.shopTrafficMoneyCalculateValue}${orderRuleObj.shopTrafficMoneyCalculateType == 0 ? '' : '%'}`,
rule: `${ruleType}${!shopTrafficMoneyCalculateType ? '' : shopTrafficMoneyCalculateValue}${!shopTrafficMoneyCalculateType ? '' : '%'}`,
orderRule: `${orderRuleType}${!orderRuleObj.shopTrafficMoneyCalculateType ? '' : orderRuleObj.shopTrafficMoneyCalculateValue}${!orderRuleObj.shopTrafficMoneyCalculateType ? '' : '%'}`,
setMealRule: `${setMealRuleType}${!setMealRuleObj.shopTrafficMoneyCalculateType ? '' : setMealRuleObj.shopTrafficMoneyCalculateValue}${!setMealRuleObj.shopTrafficMoneyCalculateType ? '' : '%'}`,
divisionTypeName: item.divisionType == 1 ? '线下对账' : '线上分账',
payTypeName: PAYTYPEOBJ[item.payType],
paySuccessDate: utils.dateFormat(item.paySuccessDate, 'YYYY-MM-DD HH:mm:ss')
......
<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!