|
|
|
|
@ -5,6 +5,9 @@
|
|
|
|
|
<slot>
|
|
|
|
|
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
|
|
|
|
|
<Input v-model="select.keyword" style="width: 200px;margin-right: 10px;" placeholder="关键字搜索" />
|
|
|
|
|
<Select clearable v-model="select.active_type_id" style="width: 200px;margin-right: 10px;" placeholder="选择活动分类">
|
|
|
|
|
<Option v-for="item in activeTypeList" :value="item.id">{{item.name}}</Option>
|
|
|
|
|
</Select>
|
|
|
|
|
<Button type="primary" @click="getActivities">查询</Button>
|
|
|
|
|
<Button icon="ios-add" type="primary" style="margin-left: 10px;" @click="$refs['addActivity'].isShow = true,$refs['addActivity'].type = 'add'">添加</Button>
|
|
|
|
|
</div>
|
|
|
|
|
@ -45,7 +48,7 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {index,destroy} from "@/api/activity"
|
|
|
|
|
|
|
|
|
|
import {index as getTypes} from "@/api/activityType"
|
|
|
|
|
import addActivity from '@/views/activity/component/addActivity'
|
|
|
|
|
import checkActivity from '@/views/activity/component/checkActivity'
|
|
|
|
|
import showActiveOrder from '@/views/activity/component/showActiveOrder'
|
|
|
|
|
@ -61,7 +64,8 @@ export default {
|
|
|
|
|
select:{
|
|
|
|
|
pageSize:10,
|
|
|
|
|
pageIndex:1,
|
|
|
|
|
keyword:""
|
|
|
|
|
keyword:"",
|
|
|
|
|
active_type_id:''
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
total:0,
|
|
|
|
|
@ -69,6 +73,7 @@ export default {
|
|
|
|
|
isShowOrder:false,
|
|
|
|
|
activeId:null,
|
|
|
|
|
activeName:"",
|
|
|
|
|
activeTypeList:[],
|
|
|
|
|
table:[
|
|
|
|
|
{
|
|
|
|
|
label:"活动名称",
|
|
|
|
|
@ -78,17 +83,10 @@ export default {
|
|
|
|
|
fixed:'left',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label:"提交商家",
|
|
|
|
|
width: 220,
|
|
|
|
|
prop:'merchant_username',
|
|
|
|
|
label:"活动分类",
|
|
|
|
|
width: 180,
|
|
|
|
|
prop:'type.name',
|
|
|
|
|
align:'center',
|
|
|
|
|
formatter:(cell,data,value)=>{
|
|
|
|
|
if(cell.merchant){
|
|
|
|
|
return cell.merchant.username
|
|
|
|
|
}else{
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label:"状态",
|
|
|
|
|
@ -118,6 +116,19 @@ export default {
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label:"提交商家",
|
|
|
|
|
width: 220,
|
|
|
|
|
prop:'merchant_username',
|
|
|
|
|
align:'center',
|
|
|
|
|
formatter:(cell,data,value)=>{
|
|
|
|
|
if(cell.merchant){
|
|
|
|
|
return cell.merchant.username
|
|
|
|
|
}else{
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label:"活动关联方",
|
|
|
|
|
width: 220,
|
|
|
|
|
@ -274,12 +285,19 @@ export default {
|
|
|
|
|
const res = await index({
|
|
|
|
|
page_size:this.select.pageSize,
|
|
|
|
|
page:this.select.pageIndex,
|
|
|
|
|
keyword:this.select.keyword
|
|
|
|
|
keyword:this.select.keyword,
|
|
|
|
|
active_type_id:this.select.active_type_id
|
|
|
|
|
})
|
|
|
|
|
this.list = res.data
|
|
|
|
|
this.total = res.total
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async getTypeList(){
|
|
|
|
|
const res = await getTypes({
|
|
|
|
|
rows:99,
|
|
|
|
|
page:1
|
|
|
|
|
})
|
|
|
|
|
this.activeTypeList = res
|
|
|
|
|
},
|
|
|
|
|
pageChange(e){
|
|
|
|
|
this.select.pageIndex = e
|
|
|
|
|
this.getActivities()
|
|
|
|
|
@ -324,6 +342,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.getTypeList()
|
|
|
|
|
this.getActivities()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|