|
@@ -35,6 +35,9 @@
|
|
:scroll="{ y: tableHeight }"
|
|
:scroll="{ y: tableHeight }"
|
|
:defaultLoadData="false"
|
|
:defaultLoadData="false"
|
|
bordered>
|
|
bordered>
|
|
|
|
+ <template slot="shelf" slot-scope="text, record">
|
|
|
|
+ 共 <a title="查看参与货架" @click="viewShelf(record)">{{ text }}</a> 个货架
|
|
|
|
+ </template>
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
<a-button v-if="record.ruleStatus == 'wait'" size="small" type="link" class="button-info" @click="handlePublish(record)">发布</a-button>
|
|
<a-button v-if="record.ruleStatus == 'wait'" size="small" type="link" class="button-info" @click="handlePublish(record)">发布</a-button>
|
|
<a-button v-if="record.ruleStatus == 'release'" size="small" type="link" class="button-info" @click="handleEnd(record)">终止</a-button>
|
|
<a-button v-if="record.ruleStatus == 'release'" size="small" type="link" class="button-info" @click="handleEnd(record)">终止</a-button>
|
|
@@ -44,6 +47,7 @@
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
</a-spin>
|
|
</a-spin>
|
|
|
|
+ <shelfDetail ref="shelfDetail" :itemData="itemData" :visible="showModal" @close="closeModal"></shelfDetail>
|
|
</a-card>
|
|
</a-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -52,9 +56,10 @@ import { STable, VSelect } from '@/components'
|
|
import { rewardRuleList, rewardRuleRelease, rewardRuleDelete, rewardRuleClose } from '@/api/redPacket.js'
|
|
import { rewardRuleList, rewardRuleRelease, rewardRuleDelete, rewardRuleClose } from '@/api/redPacket.js'
|
|
import dealerList from '@/views/common/dealerList.vue'
|
|
import dealerList from '@/views/common/dealerList.vue'
|
|
import storeList from '@/views/common/storeList.vue'
|
|
import storeList from '@/views/common/storeList.vue'
|
|
|
|
+import shelfDetail from './shelfDetail.vue'
|
|
export default {
|
|
export default {
|
|
name: 'UserList',
|
|
name: 'UserList',
|
|
- components: { STable, VSelect, storeList, dealerList },
|
|
|
|
|
|
+ components: { STable, VSelect, storeList, dealerList, shelfDetail },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
@@ -73,12 +78,12 @@ export default {
|
|
{ title: '活动名称', dataIndex: 'ruleName', width: '17%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '活动名称', dataIndex: 'ruleName', width: '17%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '活动发布时间', dataIndex: 'releaseDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '活动发布时间', dataIndex: 'releaseDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '活动截止时间', dataIndex: 'expireDate', width: '10%', align: 'center', customRender: function (text, record) { return record.neverExpireFlag == 1 ? '永久' : text } },
|
|
{ title: '活动截止时间', dataIndex: 'expireDate', width: '10%', align: 'center', customRender: function (text, record) { return record.neverExpireFlag == 1 ? '永久' : text } },
|
|
- { title: '参与货架', dataIndex: 'joinNum', width: '8%', align: 'center', customRender: function (text) { return text ? ('共' + text + '个货架') : '--' } },
|
|
|
|
|
|
+ { title: '参与货架', dataIndex: 'joinNum', width: '8%', align: 'center', scopedSlots: { customRender: 'shelf' } },
|
|
{ title: '活动范围', dataIndex: 'bizTypes', width: '8%', align: 'center', customRender: function (text) { return '货架订单' } },
|
|
{ title: '活动范围', dataIndex: 'bizTypes', width: '8%', align: 'center', customRender: function (text) { return '货架订单' } },
|
|
{ title: '活动状态', dataIndex: 'ruleStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
{ title: '活动状态', dataIndex: 'ruleStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
{ title: '备注', dataIndex: 'remarks', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '备注', dataIndex: 'remarks', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '操作', width: '12%', align: 'left', scopedSlots: { customRender: 'action' } }
|
|
|
|
|
|
+ { title: '操作', width: '12%', align: 'center', scopedSlots: { customRender: 'action' } }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
@@ -116,6 +121,19 @@ export default {
|
|
this.$router.push({ name: 'redPacketAdd' })
|
|
this.$router.push({ name: 'redPacketAdd' })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 详情
|
|
|
|
+ handleDetail (row) {
|
|
|
|
+ this.$router.push({ name: 'redPacketDetail', params: { sn: row.rewardRuleSn } })
|
|
|
|
+ },
|
|
|
|
+ // 查看参与货架详细
|
|
|
|
+ viewShelf (row) {
|
|
|
|
+ this.showModal = true
|
|
|
|
+ this.itemData = row
|
|
|
|
+ },
|
|
|
|
+ closeModal () {
|
|
|
|
+ this.showModal = false
|
|
|
|
+ this.itemData = null
|
|
|
|
+ },
|
|
// 发布
|
|
// 发布
|
|
handlePublish (row) {
|
|
handlePublish (row) {
|
|
this.spinning = true
|
|
this.spinning = true
|
|
@@ -159,11 +177,6 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 详情
|
|
|
|
- handleDetail (row) {
|
|
|
|
- this.showModal = true
|
|
|
|
- this.itemData = row
|
|
|
|
- },
|
|
|
|
pageInit () {
|
|
pageInit () {
|
|
const _this = this
|
|
const _this = this
|
|
_this.$refs.table.refresh()
|
|
_this.$refs.table.refresh()
|