Commit f417462a by 王志慧

commit

1 parent d091455b
...@@ -202,7 +202,8 @@ const getCouponconfig = params => { ...@@ -202,7 +202,8 @@ const getCouponconfig = params => {
url: 'rop-scrm-shopmall/router', url: 'rop-scrm-shopmall/router',
method: 'GET', method: 'GET',
data: params, data: params,
sign: true sign: true,
returnAll: true
}) })
} }
export default { getCouponconfig, configCoupons, getDirectionalGiftListApi, deleteChannel, updownshelvesChannel, topshelvesChannel, goodsActivity, crowdfundingActivity, bulgeActivity, getTencentcloudmedialist, addChannelTopic, getTopicDetail, getChannelTopicList, getMerchantListApi, openSubscribe, selStoreConfig, getMerchantShare, configMerchant, getconfigMerchant } export default { getCouponconfig, configCoupons, getDirectionalGiftListApi, deleteChannel, updownshelvesChannel, topshelvesChannel, goodsActivity, crowdfundingActivity, bulgeActivity, getTencentcloudmedialist, addChannelTopic, getTopicDetail, getChannelTopicList, getMerchantListApi, openSubscribe, selStoreConfig, getMerchantShare, configMerchant, getconfigMerchant }
...@@ -19,7 +19,11 @@ ...@@ -19,7 +19,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="couponAnticipatedCost" label="预估成本/元"></el-table-column> <el-table-column prop="couponAnticipatedCost" label="预估成本/元"></el-table-column>
<el-table-column prop="effectiveType" label="有效期" width="100"></el-table-column> <el-table-column prop="effectiveType" label="有效期" width="100">
<template slot-scope="scope">
<span>{{ toLabelText(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column prop="residueAmount" label="剩余库存" width="100"></el-table-column> <el-table-column prop="residueAmount" label="剩余库存" width="100"></el-table-column>
</el-table> </el-table>
</div> </div>
...@@ -106,7 +110,27 @@ export default { ...@@ -106,7 +110,27 @@ export default {
// components: { // components: {
// relateStoreDialog // relateStoreDialog
// }, // },
created() {
this.getCouponconfig()
},
methods: { methods: {
toLabelText(row) {
switch (row.effectiveType) {
case 3:
return '永久有效'
case 2:
return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : ''
case 1:
return row.effectiveDays + '天'
}
},
getCouponconfig() {
this.$apis.store.getCouponconfig({ topicId: this.topicId }).then(res => {
if (res.code == 0) {
this.tableData = res.data.coupons
}
})
},
handleAdd() { handleAdd() {
// console.log(this.couponObj, '') // console.log(this.couponObj, '')
this.selectedGiftList = JSON.parse(JSON.stringify(this.couponObj)) this.selectedGiftList = JSON.parse(JSON.stringify(this.couponObj))
......
...@@ -361,7 +361,10 @@ export default { ...@@ -361,7 +361,10 @@ export default {
couponName: item.couponName, couponName: item.couponName,
couponAmount: isSelected ? list.find(k => k.id == item.id).couponAmount : '1', couponAmount: isSelected ? list.find(k => k.id == item.id).couponAmount : '1',
couponAnticipatedCost: item.couponAnticipatedCost, couponAnticipatedCost: item.couponAnticipatedCost,
effectiveType: this.toLabelText(item), effectiveType: item.effectiveType,
effectiveStartTime: item.effectiveStartTime,
effectiveEndTime: item.effectiveEndTime,
effectiveDays: item.effectiveDays,
residueAmount: item.residueAmount, residueAmount: item.residueAmount,
status: '2' status: '2'
}) })
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<el-switch v-model="scope.scope.isOpen" @change="updateState(scope.scope)"></el-switch> <el-switch v-model="scope.scope.isOpen" @change="updateState(scope.scope)"></el-switch>
</template> </template>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" v-if="scope.scope.contentType == 1" @click="handleConfig(scope.scope)">待配置</el-button> <el-button type="text" v-if="scope.scope.contentType == 1" @click="handleConfig(scope.scope)">{{scope.scope.status==0?'待配置':'编辑'}}</el-button>
<template v-else> <template v-else>
<el-button type="text" v-if="scope.scope.status == 1" @click="handleTop(scope.scope)">置顶</el-button> <el-button type="text" v-if="scope.scope.status == 1" @click="handleTop(scope.scope)">置顶</el-button>
<el-button type="text" @click="handleAddContent(scope.scope)">编辑</el-button> <el-button type="text" @click="handleAddContent(scope.scope)">编辑</el-button>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!