Commit 1ddc7e40 by zhangquan

bug修复

1 parent 42315d7e
...@@ -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;
} }
} }
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</div> </div>
<!-- :span-method="objectSpanMethod" --> <!-- :span-method="objectSpanMethod" -->
<div class="table_wrap"> <div class="table_wrap">
<GLTable :cell-class-name="setClass" :span-method="objectSpanMethod" 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>
...@@ -735,6 +735,9 @@ export default { ...@@ -735,6 +735,9 @@ export default {
name: row => { name: row => {
return '查看明细' return '查看明细'
}, },
condition: row => {
return row.scope.rowspan != 0
},
attrs: { attrs: {
type: 'text' type: 'text'
}, },
...@@ -798,12 +801,103 @@ export default { ...@@ -798,12 +801,103 @@ export default {
methods: { methods: {
objectSpanMethod({ row, column, rowIndex, columnIndex }) { objectSpanMethod({ row, column, rowIndex, columnIndex }) {
// column没有prop,只能用label判断 // column没有prop,只能用label判断
const mergeColNameList = ['主订单编号', '交易参考号', '客户姓名', '转化员姓名', '销售顾问', '支付方式', '支付时间', '分账对象', '二级流量方', '整单规则', '分账金额/元', '分账类型'] const mergeColNameList = ['主订单编号', '交易参考号', '客户姓名', '转化员姓名', '销售顾问', '支付方式', '支付时间', '分账对象', '二级流量方', '整单规则', '分账金额/元', '分账类型', '操作']
return { return {
rowspan: mergeColNameList.includes(column.label) ? row.rowspan : column.label == '套餐规则' ? row.setMealRowspan : 1, rowspan: mergeColNameList.includes(column.label) ? row.rowspan : column.label == '套餐规则' ? row.setMealRowspan : 1,
colspan: 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 }) { setClass({ row, column, rowIndex, columnIndex }) {
const mergeColNameList = ['主订单编号', '交易参考号', '客户姓名', '转化员姓名', '销售顾问', '支付方式', '支付时间', '分账对象', '二级流量方', '整单规则', '分账金额/元', '分账类型'] const mergeColNameList = ['主订单编号', '交易参考号', '客户姓名', '转化员姓名', '销售顾问', '支付方式', '支付时间', '分账对象', '二级流量方', '整单规则', '分账金额/元', '分账类型']
return (mergeColNameList.includes(column.label) && row.rowspan > 1) || (column.label == '套餐规则' && row.setMealRowspan > 1) ? 'add-border' : '' return (mergeColNameList.includes(column.label) && row.rowspan > 1) || (column.label == '套餐规则' && row.setMealRowspan > 1) ? 'add-border' : ''
...@@ -1204,6 +1298,13 @@ export default { ...@@ -1204,6 +1298,13 @@ 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;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!