Commit fe312553 by zhangquan

修复精品升级bug

1 parent 5f3d1b98
...@@ -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" @cell-mouse-leave="handleCellMouseLeave" @cell-mouse-enter="handleCellMouseEnter" :span-method="objectSpanMethod" v-if="dynamicTableShow" ref="subTable" :tableData="tableData" :tableTotal="tableTotal" :tableParams="newTableParams" @refreshTable="toGetCouponsList"> <GLTable :cell-class-name="setClass" :hasNum="false" @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>
...@@ -594,6 +594,12 @@ export default { ...@@ -594,6 +594,12 @@ export default {
tableOption: false, tableOption: false,
tableColumns: [ tableColumns: [
{ {
label: '序号',
prop: 'tableNum',
width: '80px',
align: 'center'
},
{
label: '订单信息', label: '订单信息',
align: 'center', align: 'center',
children: [ children: [
...@@ -801,7 +807,7 @@ export default { ...@@ -801,7 +807,7 @@ 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
...@@ -900,6 +906,7 @@ export default { ...@@ -900,6 +906,7 @@ export default {
}, },
setClass({ row, column, rowIndex, columnIndex }) { setClass({ row, column, rowIndex, columnIndex }) {
const mergeColNameList = ['主订单编号', '交易参考号', '客户姓名', '转化员姓名', '销售顾问', '支付方式', '支付时间', '分账对象', '二级流量方', '整单规则', '分账金额/元', '分账类型'] const mergeColNameList = ['主订单编号', '交易参考号', '客户姓名', '转化员姓名', '销售顾问', '支付方式', '支付时间', '分账对象', '二级流量方', '整单规则', '分账金额/元', '分账类型']
if (columnIndex == 1) return 'add-right-border'
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' : ''
}, },
/**获取商户列表 */ /**获取商户列表 */
...@@ -977,6 +984,12 @@ export default { ...@@ -977,6 +984,12 @@ export default {
tableOption: false, tableOption: false,
tableColumns: [ tableColumns: [
{ {
label: '序号',
prop: 'tableNum',
width: '80px',
align: 'center'
},
{
label: '订单信息', label: '订单信息',
align: 'center', align: 'center',
children: [] children: []
...@@ -1009,7 +1022,7 @@ export default { ...@@ -1009,7 +1022,7 @@ export default {
if (item.align) { if (item.align) {
obj.align = item.align obj.align = item.align
} }
newTableParams.tableColumns[item.level - 1].children.push(obj) newTableParams.tableColumns[item.level].children.push(obj)
}) })
this.newTableParams = newTableParams this.newTableParams = newTableParams
this.$refs.subTable.componentKey = Date.now() this.$refs.subTable.componentKey = Date.now()
...@@ -1125,7 +1138,7 @@ export default { ...@@ -1125,7 +1138,7 @@ export default {
res.list = res && res.list ? res.list : [] res.list = res && res.list ? res.list : []
let tableData = [] let tableData = []
const TYPELIST = { 0: '--', 1: '毛利', 2: '收入', 3: '固定', 8: '(收入-自定义其他费用)', 9: '(收入-其他费用)' } const TYPELIST = { 0: '--', 1: '毛利', 2: '收入', 3: '固定', 8: '(收入-自定义其他费用)', 9: '(收入-其他费用)' }
res.list.forEach(item => { res.list.forEach((item, _idx) => {
const packageOrderList = item.packageOrderList || [] const packageOrderList = item.packageOrderList || []
const orderRuleObj = item.mainProfitAllocation || {} // 整单规则取值对象 const orderRuleObj = item.mainProfitAllocation || {} // 整单规则取值对象
packageOrderList.forEach((subItem, sunIdx) => { packageOrderList.forEach((subItem, sunIdx) => {
...@@ -1145,6 +1158,7 @@ export default { ...@@ -1145,6 +1158,7 @@ export default {
const _obj = { const _obj = {
...item, ...item,
tableNum: _idx + 1,
rowspan: 1, rowspan: 1,
setMealRowspan: eleIdx == 0 ? subOrderList.length : 0, setMealRowspan: eleIdx == 0 ? subOrderList.length : 0,
id, id,
...@@ -1317,6 +1331,12 @@ export default { ...@@ -1317,6 +1331,12 @@ export default {
border-collapse: collapse; border-collapse: collapse;
} }
/deep/ .el-table__row { /deep/ .el-table__row {
td:first-child:after {
content: none !important;
}
.add-right-border {
border-right: 1px solid #ebeef5;
}
.add-border { .add-border {
border-right: 1px solid #ebeef5; border-right: 1px solid #ebeef5;
border-left: 1px solid #ebeef5; border-left: 1px solid #ebeef5;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!