Commit 984e8efe by chenwq

编辑礼包

1 parent cf910902
......@@ -273,6 +273,7 @@ export default {
.then(res => {
res.data.couponList.forEach(item => {
item.id = item.couponId
item.anticipatedCost = item.couponAnticipatedCost
})
this.editForm = res.data
this.editForm.receiveWay = this.editForm.receiveWay + ''
......
......@@ -19,7 +19,10 @@
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span>
</glsx-combi-form>
<GLTable v-loading="loading" ref="giftRef" :tableData="giftList" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList" @selectionTable="handleSelectionTable"></GLTable>
<GLTable v-loading="loading" v-show="activeName == 'service'" ref="serviceRef" :tableData="giftList" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList" @selectionTable="handleSelectionTable"></GLTable>
<GLTable v-loading="loading" v-show="activeName == 'cash'" ref="cashRef" :tableData="giftList" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList" @selectionTable="handleSelectionTable"></GLTable>
<GLTable v-loading="loading" v-show="activeName == 'discount'" ref="discountRef" :tableData="giftList" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList" @selectionTable="handleSelectionTable"></GLTable>
<GLTable v-loading="loading" v-show="activeName == 'exchange'" ref="exchangeRef" :tableData="giftList" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList" @selectionTable="handleSelectionTable"></GLTable>
</div>
</div>
<div class="selected-list">
......@@ -173,19 +176,22 @@ export default {
var params = {
...this.searchForm,
discountType: this.selectedGiftList[this.activeName].discountType,
pageNum: isReset ? 1 : this.$refs.giftRef.page.pageNum,
pageSize: isReset ? 10 : this.$refs.giftRef.page.pageSize
pageNum: isReset ? 1 : this.$refs[this.activeName + 'Ref'].page.pageNum,
pageSize: isReset ? 10 : this.$refs[this.activeName + 'Ref'].page.pageSize
}
this.loading = true
this.$apis.giftBag
.getDirectionalGiftListApi(params)
.then(res => {
this.giftList = res.list
this.giftList.forEach(item => {
item.couponAnticipatedCost = item.anticipatedCost
})
this.fnCallBack = true
this.$refs.giftRef.tableTotal = res.total
this.$refs[this.activeName + 'Ref'].tableTotal = res.total
this.recoverySelected()
this.recoveryTotal()
this.$refs.giftRef.tableHeightValues = '50vh'
this.$refs[this.activeName + 'Ref'].tableHeightValues = '50vh'
})
.finally(() => {
this.loading = false
......@@ -204,7 +210,7 @@ export default {
if (this.selectedGiftList[this.activeName].list && this.selectedGiftList[this.activeName].list.length) {
this.selectedGiftList[this.activeName].list.forEach(row => {
if (row.status != '3') {
this.$refs.giftRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(row)
this.$refs[this.activeName + 'Ref'].$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(row)
}
})
}
......@@ -238,7 +244,7 @@ export default {
discountType: item.discountType,
couponName: item.couponName,
couponAmount: isSelected ? list.find(k => k.id == item.id).couponAmount : '1',
couponAnticipatedCost: item.anticipatedCost,
couponAnticipatedCost: item.couponAnticipatedCost,
status: '2'
})
}
......@@ -248,6 +254,7 @@ export default {
this.selectedGiftList[this.activeName].list.push(item)
}
})
this.recoveryTotal()
},
handleGiftConfirm() {
......@@ -263,7 +270,7 @@ export default {
// })
// return true
// }
// var selectedData = this.$refs.giftRef.mutiSelectArr[this.tableParams.mutiSelectName]
// var selectedData = this.$refs[this.activeName + 'Ref'].mutiSelectArr[this.tableParams.mutiSelectName]
var selectedData = JSON.parse(JSON.stringify(this.selectedGiftList))
this.$emit('handleGiftConfirm', selectedData)
},
......@@ -363,6 +370,9 @@ export default {
margin-right: 7px;
}
}
.gift-item:last-child {
margin-bottom: 0;
}
}
.gift-content:last-child {
border-bottom: 0px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!