9.11
This commit is contained in:
parent
d182ba99ad
commit
afe8f64d05
@ -9,7 +9,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="rp-box">
|
<div class="rp-box">
|
||||||
<!-- 营销活动-->
|
<!-- 营销活动-->
|
||||||
<div class="bai-box" v-show="tabindex == 0">
|
<div class="bai-box" style="height: 84.5vh;overflow: auto" v-show="tabindex == 0">
|
||||||
<div class="d-s">
|
<div class="d-s">
|
||||||
<div class="gang"></div>
|
<div class="gang"></div>
|
||||||
<div style="font-weight: bold">会员营销</div>
|
<div style="font-weight: bold">会员营销</div>
|
||||||
@ -216,63 +216,65 @@
|
|||||||
<el-button icon="el-icon-refresh-right" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh-right" @click="resetQuery">重置</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<div style="height: 70vh;overflow: auto">
|
||||||
:data="tableData"
|
<el-table
|
||||||
border
|
:data="tableData"
|
||||||
style="width: 100%">
|
border
|
||||||
<el-table-column type="selection" width="55"></el-table-column>
|
style="width: 100%">
|
||||||
<el-table-column type="index" label="序号" width="55"></el-table-column>
|
<el-table-column type="selection" width="55"></el-table-column>
|
||||||
<el-table-column prop="typeText" label="活动类型"></el-table-column>
|
<el-table-column type="index" label="序号" width="55"></el-table-column>
|
||||||
<el-table-column prop="name" label="活动名称"></el-table-column>
|
<el-table-column prop="typeText" label="活动类型"></el-table-column>
|
||||||
<el-table-column prop="discountActiveDescribe" label="活动内容"></el-table-column>
|
<el-table-column prop="name" label="活动名称"></el-table-column>
|
||||||
<el-table-column prop="time" label="活动时间">
|
<el-table-column prop="discountActiveDescribe" label="活动内容"></el-table-column>
|
||||||
<template slot-scope="scope">
|
<el-table-column prop="time" label="活动时间">
|
||||||
<span v-if="scope.row.time==0">不限时间</span>
|
<template slot-scope="scope">
|
||||||
<span v-else>{{ scope.row.activeStartTime }} ~ {{ scope.row.activeEndTime }}</span>
|
<span v-if="scope.row.time==0">不限时间</span>
|
||||||
</template>
|
<span v-else>{{ scope.row.activeStartTime }} ~ {{ scope.row.activeEndTime }}</span>
|
||||||
</el-table-column>
|
</template>
|
||||||
<el-table-column prop="adaptUserType" label="适用会员等级">
|
</el-table-column>
|
||||||
<template slot-scope="scope">
|
<el-table-column prop="userGradeName" label="适用会员等级">
|
||||||
<span>{{ scope.row.adaptUserType || "--" }}</span>
|
<template slot-scope="scope">
|
||||||
</template>
|
<span>{{ scope.row.userGradeName || "--" }}</span>
|
||||||
</el-table-column>
|
</template>
|
||||||
<el-table-column prop="name" label="已领数量"></el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="activeStatus" label="状态">
|
<el-table-column prop="sendNum" label="已领数量"></el-table-column>
|
||||||
<template slot-scope="scope">
|
<el-table-column prop="activeStatus" label="状态">
|
||||||
<el-switch
|
<template slot-scope="scope">
|
||||||
v-model="scope.row.activeStatus"
|
<el-switch
|
||||||
active-color="#13ce66"
|
v-model="scope.row.activeStatus"
|
||||||
inactive-color="#ff4949"
|
active-color="#13ce66"
|
||||||
active-value="1"
|
inactive-color="#ff4949"
|
||||||
inactive-value="2">
|
active-value="1"
|
||||||
</el-switch>
|
inactive-value="2">
|
||||||
</template>
|
</el-switch>
|
||||||
</el-table-column>
|
</template>
|
||||||
<el-table-column prop="createName" label="创建人"></el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="createTime" label="创建时间"></el-table-column>
|
<el-table-column prop="createName" label="创建人"></el-table-column>
|
||||||
<el-table-column prop="date" label="操作" align="center">
|
<el-table-column prop="createTime" label="创建时间"></el-table-column>
|
||||||
<template slot-scope="scope">
|
<el-table-column prop="date" label="操作" align="center">
|
||||||
<el-button
|
<template slot-scope="scope">
|
||||||
size="mini"
|
<el-button
|
||||||
type="text"
|
size="mini"
|
||||||
@click="routerPush(scope.row.type)"
|
type="text"
|
||||||
>修改
|
@click="routerPush(scope.row.type)"
|
||||||
</el-button>
|
>修改
|
||||||
<el-button
|
</el-button>
|
||||||
size="mini"
|
<el-button
|
||||||
type="text"
|
size="mini"
|
||||||
slot="reference"
|
type="text"
|
||||||
>删除
|
slot="reference"
|
||||||
</el-button>
|
>删除
|
||||||
<el-button
|
</el-button>
|
||||||
size="mini"
|
<el-button
|
||||||
type="text"
|
size="mini"
|
||||||
>停用
|
type="text"
|
||||||
</el-button>
|
>停用
|
||||||
</template>
|
</el-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
</div>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total>0"
|
||||||
:total="total"
|
:total="total"
|
||||||
@ -302,67 +304,69 @@
|
|||||||
<el-button icon="el-icon-refresh-right" @click="resetOldQuery">重置</el-button>
|
<el-button icon="el-icon-refresh-right" @click="resetOldQuery">重置</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<div style="height: 70vh;overflow: auto">
|
||||||
:data="oldTableData"
|
<el-table
|
||||||
border
|
:data="oldTableData"
|
||||||
style="width: 100%">
|
border
|
||||||
<el-table-column
|
style="width: 100%">
|
||||||
type="selection"
|
<el-table-column
|
||||||
width="55">
|
type="selection"
|
||||||
</el-table-column>
|
width="55">
|
||||||
<el-table-column type="index" label="序号" width="55"></el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="typeText" label="活动类型"></el-table-column>
|
<el-table-column type="index" label="序号" width="55"></el-table-column>
|
||||||
<el-table-column prop="name" label="活动名称"></el-table-column>
|
<el-table-column prop="typeText" label="活动类型"></el-table-column>
|
||||||
<el-table-column prop="discountActiveDescribe" label="活动内容"></el-table-column>
|
<el-table-column prop="name" label="活动名称"></el-table-column>
|
||||||
<el-table-column prop="time" label="活动时间">
|
<el-table-column prop="discountActiveDescribe" label="活动内容"></el-table-column>
|
||||||
<template slot-scope="scope">
|
<el-table-column prop="time" label="活动时间">
|
||||||
<span v-if="scope.row.time==0">不限时间</span>
|
<template slot-scope="scope">
|
||||||
<span v-else>{{ scope.row.activeStartTime }} ~ {{ scope.row.activeEndTime }}</span>
|
<span v-if="scope.row.time==0">不限时间</span>
|
||||||
</template>
|
<span v-else>{{ scope.row.activeStartTime }} ~ {{ scope.row.activeEndTime }}</span>
|
||||||
</el-table-column>
|
</template>
|
||||||
<el-table-column prop="adaptUserType" label="适用会员等级">
|
</el-table-column>
|
||||||
<template slot-scope="scope">
|
<el-table-column prop="userGradeName" label="适用会员等级">
|
||||||
<span>{{ scope.row.adaptUserType || "--" }}</span>
|
<template slot-scope="scope">
|
||||||
</template>
|
<span>{{ scope.row.userGradeName || "--" }}</span>
|
||||||
</el-table-column>
|
</template>
|
||||||
<el-table-column prop="sendNum" label="已领数量"></el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="activeStatus" label="状态">
|
<el-table-column prop="sendNum" label="已领数量"></el-table-column>
|
||||||
<template slot-scope="scope">
|
<el-table-column prop="activeStatus" label="状态">
|
||||||
<el-switch
|
<template slot-scope="scope">
|
||||||
v-model="scope.row.activeStatus"
|
<el-switch
|
||||||
active-color="#13ce66"
|
v-model="scope.row.activeStatus"
|
||||||
inactive-color="#ff4949"
|
active-color="#13ce66"
|
||||||
active-value="1"
|
inactive-color="#ff4949"
|
||||||
inactive-value="2">
|
active-value="1"
|
||||||
</el-switch>
|
inactive-value="2">
|
||||||
</template>
|
</el-switch>
|
||||||
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="createName" label="创建人"></el-table-column>
|
<el-table-column prop="createName" label="创建人"></el-table-column>
|
||||||
<el-table-column prop="createTime" label="创建时间"></el-table-column>
|
<el-table-column prop="createTime" label="创建时间"></el-table-column>
|
||||||
<el-table-column prop="date" label="操作" align="center">
|
<el-table-column prop="date" label="操作" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@click="routerPush(scope.row.type)"
|
@click="routerPush(scope.row.type)"
|
||||||
>修改
|
>修改
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
slot="reference"
|
slot="reference"
|
||||||
>删除
|
>删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
>停用
|
>停用
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
</div>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="oldTotal>0"
|
v-show="oldTotal>0"
|
||||||
:total="oldTotal"
|
:total="oldTotal"
|
||||||
@ -400,7 +404,7 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
value: '3',
|
value: '3',
|
||||||
label: '立减营销'
|
label: '立减营销'
|
||||||
},{
|
}, {
|
||||||
value: '4',
|
value: '4',
|
||||||
label: '生日有礼'
|
label: '生日有礼'
|
||||||
}, {
|
}, {
|
||||||
@ -418,7 +422,7 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
value: '9',
|
value: '9',
|
||||||
label: '推荐会员消费有礼'
|
label: '推荐会员消费有礼'
|
||||||
},{
|
}, {
|
||||||
value: '10',
|
value: '10',
|
||||||
label: '弹窗营销'
|
label: '弹窗营销'
|
||||||
}],
|
}],
|
||||||
@ -471,12 +475,12 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getindex(index){
|
getindex(index) {
|
||||||
this.tabindex = index
|
this.tabindex = index
|
||||||
if (index == 1){
|
if (index == 1) {
|
||||||
this.queryParams.type = ""
|
this.queryParams.type = ""
|
||||||
this.handleQuery()
|
this.handleQuery()
|
||||||
}else {
|
} else {
|
||||||
this.queryParams.type = ""
|
this.queryParams.type = ""
|
||||||
this.getOldList()
|
this.getOldList()
|
||||||
}
|
}
|
||||||
|
@ -73,5 +73,10 @@ public class ActiveApplet extends Model<ActiveApplet> {
|
|||||||
*/
|
*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String createName;
|
private String createName;
|
||||||
|
/**
|
||||||
|
* 创建人名称
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String userGradeName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,9 +8,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.fuint.business.marketingActivity.activeApplet.mapper.ActiveAppletMapper;
|
import com.fuint.business.marketingActivity.activeApplet.mapper.ActiveAppletMapper;
|
||||||
import com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet;
|
import com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet;
|
||||||
import com.fuint.business.marketingActivity.activeApplet.service.ActiveAppletService;
|
import com.fuint.business.marketingActivity.activeApplet.service.ActiveAppletService;
|
||||||
|
import com.fuint.business.userManager.entity.LJUserGrade;
|
||||||
|
import com.fuint.business.userManager.service.LJUserGradeService;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
import com.fuint.utils.StringUtil;
|
import com.fuint.utils.StringUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@ -27,6 +30,8 @@ public class ActiveAppletServiceImpl extends ServiceImpl<ActiveAppletMapper, Act
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ActiveAppletMapper activeAppletMapper;
|
private ActiveAppletMapper activeAppletMapper;
|
||||||
|
@Autowired
|
||||||
|
private LJUserGradeService userGradeService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActiveApplet> applet(ActiveApplet activeApplet) {
|
public List<ActiveApplet> applet(ActiveApplet activeApplet) {
|
||||||
@ -65,8 +70,22 @@ public class ActiveAppletServiceImpl extends ServiceImpl<ActiveAppletMapper, Act
|
|||||||
@Override
|
@Override
|
||||||
public IPage<ActiveApplet> pageActive(Page<ActiveApplet> page, ActiveApplet activeApplet) {
|
public IPage<ActiveApplet> pageActive(Page<ActiveApplet> page, ActiveApplet activeApplet) {
|
||||||
IPage<ActiveApplet> result = activeAppletMapper.pageActive(page,activeApplet);
|
IPage<ActiveApplet> result = activeAppletMapper.pageActive(page,activeApplet);
|
||||||
|
// 查询用户等级信息
|
||||||
|
List<LJUserGrade> ljUserGrades = userGradeService.selectUserGradeAll(TokenUtil.getNowAccountInfo().getStoreId());
|
||||||
result.getRecords().forEach(item -> {
|
result.getRecords().forEach(item -> {
|
||||||
item.setTypeText(replaceType(item.getType()));
|
item.setTypeText(replaceType(item.getType()));
|
||||||
|
String userGradeName = "";
|
||||||
|
if (ObjectUtil.isNotEmpty(item.getAdaptUserType())){
|
||||||
|
String[] gradeIds = item.getAdaptUserType().split(",");
|
||||||
|
for (String gradeId : gradeIds) {
|
||||||
|
for (LJUserGrade ljUserGrade : ljUserGrades) {
|
||||||
|
if (gradeId.equals(ljUserGrade.getId().toString())){
|
||||||
|
userGradeName += ljUserGrade.getName() + ",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
item.setUserGradeName(userGradeName);
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -88,16 +107,16 @@ public class ActiveAppletServiceImpl extends ServiceImpl<ActiveAppletMapper, Act
|
|||||||
**/
|
**/
|
||||||
public String replaceType(String type) {
|
public String replaceType(String type) {
|
||||||
if (StringUtil.isNotBlank(type)) {
|
if (StringUtil.isNotBlank(type)) {
|
||||||
type = type.replace("1", "储值卡");
|
|
||||||
type = type.replace("2", "囤油卡");
|
|
||||||
type = type.replace("3", "立减营销");
|
|
||||||
type = type.replace("4", "生日有礼");
|
|
||||||
type = type.replace("5", "消费有礼");
|
|
||||||
type = type.replace("6", "开卡有礼");
|
|
||||||
type = type.replace("7", "邀请有礼");
|
|
||||||
type = type.replace("8", "推荐会员充值有礼");
|
|
||||||
type = type.replace("9", "推荐会员消费有礼");
|
|
||||||
type = type.replace("10", "弹窗营销");
|
type = type.replace("10", "弹窗营销");
|
||||||
|
type = type.replace("9", "推荐会员消费有礼");
|
||||||
|
type = type.replace("8", "推荐会员充值有礼");
|
||||||
|
type = type.replace("7", "邀请有礼");
|
||||||
|
type = type.replace("6", "开卡有礼");
|
||||||
|
type = type.replace("5", "消费有礼");
|
||||||
|
type = type.replace("4", "生日有礼");
|
||||||
|
type = type.replace("3", "立减营销");
|
||||||
|
type = type.replace("2", "囤油卡");
|
||||||
|
type = type.replace("1", "储值卡");
|
||||||
} else {
|
} else {
|
||||||
type = "无";
|
type = "无";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user