Commit d3900a37 by 杨明

fixed

1 parent 92a1da0d
......@@ -13,7 +13,7 @@
<div class="gift-table">
<div class="goods-panel">
<div v-show="currentIndex == 1" class="car-table">
<GLTable :hasPage="false" v-loading="loading" ref="carRef" :tableData="carList" :tableParams="carTableParams" @refreshTable="getCarList" @select="handleSelectionCarTable">
<GLTable :hasPage="false" v-loading="loading" ref="carRef" :tableData="carList" :tableParams="carTableParams" @refreshTable="getCarList" @select="handleSelectionCarTable" @selectAll="handleSelectionCarTableAll">
<template slot="price" slot-scope="scope">
<el-input v-model="scope.scope.packageAmount" @blur="calcCarValue(scope.scope)" placeholder="请输入" oninput="value=value.match(/\d+\.?\d{0,2}/, '')"></el-input>
</template>
......@@ -29,7 +29,7 @@
<div class="tab-border" :style="{ left: (goodsIndex - 1) * 61 + 2 + 'px' }"></div>
</div>
<div v-for="(item, index) in goodsTabList" :key="index">
<GLTable v-loading="loading" v-show="goodsIndex == item.type" :ref="'goodsRef' + item.type" :tableData="goodsList" :tableParams="goodsTableParams" @refreshTable="getGoodsList" @select="handleSelectionGoodsTable"></GLTable>
<GLTable v-loading="loading" v-show="goodsIndex == item.type" :ref="'goodsRef' + item.type" :tableData="goodsList" :tableParams="goodsTableParams" @refreshTable="getGoodsList" @select="handleSelectionGoodsTable" @select-all="handleSelectionGoodsTableAll"></GLTable>
</div>
</div>
<div v-show="currentIndex == 3">
......@@ -48,7 +48,7 @@
</div>
</div>
<div v-for="(item, index) in serviceTabList" :key="index">
<GLTable v-loading="loading" v-show="serviceIndex == item.type" :ref="'serviceRef' + item.type" :tableData="serviceList" :tableParams="serviceTableParams" @refreshTable="getServiceList" @select="handleSelectionServiceTable">
<GLTable v-loading="loading" v-show="serviceIndex == item.type" :ref="'serviceRef' + item.type" :tableData="serviceList" :tableParams="serviceTableParams" @refreshTable="getServiceList" @select="handleSelectionServiceTable" @select-all="handleSelectionServiceTableAll">
<span slot="effectiveType" slot-scope="scope">
<span>{{ toLabelText(scope.scope) }}</span>
</span>
......@@ -334,6 +334,13 @@ export default {
console.log(this.selectedServiceList)
// this.selectedServiceList = val
},
handleSelectionServiceTableAll(selected) {
if (selected.length > 0) {
this.addRows(this.selectedServiceList, selected, 'id')
} else {
this.selectedServiceList = this.deleteRows(this.selectedServiceList, selected, 'id')
}
},
// 选择/取消 生活权益
handleSelectionGoodsTable(selection, row) {
if (selection && selection.find(item => item && item.id == row.id)) {
......@@ -343,6 +350,14 @@ export default {
}
console.log(this.selectedGoodsList)
},
handleSelectionGoodsTableAll(selected) {
if (selected.length > 0) {
this.addRows(this.selectedGoodsList, selected, 'id')
} else {
this.selectedGoodsList = this.deleteRows(this.selectedGoodsList, selected, 'id')
}
console.log(this.selectedGoodsList)
},
// 选择/取消 用车权益
handleSelectionCarTable(selection, row) {
if (selection && selection.find(item => item && item.packageCode == row.packageCode)) {
......@@ -352,6 +367,14 @@ export default {
}
this.calcCarValue()
},
handleSelectionCarTableAll(selected) {
if (selected.length > 0) {
this.addRows(this.selectedCarList, selected, 'packageCode')
} else {
this.selectedCarList = this.deleteRows(this.selectedCarList, selected, 'packageCode')
}
this.calcCarValue()
},
addCoupon() {
openTab('/marketing/couponManage/index')
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!