Commit 9add34f8 by damodmg

添加人群筛选器

parent 24103ef1
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>积分商城</title><link href=./static/css/app.298340dca964282543362dbb6435a9d8.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.05.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.11.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.bf93010d9b9b1322a27b.js></script><script type=text/javascript src=./static/js/app.3ea0c93b2e2e96337349.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>积分商城</title><link href=./static/css/app.c7ed4cf5d26144d0a06539e7fd41d944.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.05.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.11.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.26.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.bf93010d9b9b1322a27b.js></script><script type=text/javascript src=./static/js/app.19e92d40ee519761a5de.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -24,6 +24,7 @@
<!-- <script src="//web-1251519181.file.myqcloud.com/components/member-info.1.0.01.js"></script> -->
<script src="//web-1251519181.file.myqcloud.com/components/card.2.0.03.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/people.2.0.26.js"></script>
<!-- <script src="//web-1251519181.cos.ap-shanghai.myqcloud.com/components/space.2.0.00.js"></script> -->
<!-- built files will be auto injected -->
</body>
......
......@@ -98,10 +98,17 @@
<div class="section-content">
<h3>兑换设置</h3>
<span style="display:none">{{ refash }}</span>
<el-form-item label="适用会员" prop="memberGrade">
<!-- <el-form-item label="适用会员" prop="memberGrade">
<el-select v-model="couponForm.memberGrade" multiple placeholder="请选择" size="small" class="w-350">
<el-option v-for="item in memberGradeList" :key="item.gradeId" :label="item.gradeName" :value="item.gradeId"> </el-option>
</el-select>
</el-form-item> -->
<el-form-item label="会员筛选">
<vue-gic-people :projectName="projectName" :useId="useId" :hasSearchData="hasSearchData" :sceneValue="sceneValue" ref="peopleFilter" :isAdd="operateType" @findFilter="findFilter" @getBackData="getBackData" @editHide="editHide" @editShow="editShow" @hideBtn="hideBtn"> </vue-gic-people>
<div class="gic-people--button" v-show="toggleTag">
<el-button size="small" type="primary" @click="getData">确 定</el-button>
<el-button size="small" @click="cancelFilter">取 消</el-button>
</div>
</el-form-item>
<el-form-item label="展现门店" required>
<vue-gic-store-linkage :disabled="isInfo" :msg="sendChildData" ref="selectTree" @sendSelectGroupData="getSelectGroupData"></vue-gic-store-linkage>
......@@ -224,7 +231,7 @@ export default {
cashCost: '',
virtualStock: '',
memberLabelType: 1,
memberGrade: [], //适用会员
// memberGrade: [], //适用会员
limitTimesStatus: false, //限兑
limitTimes: '', //限兑次数
releaseType: 1, //上架时间
......@@ -246,7 +253,7 @@ export default {
uploadStatus: true, //上传按钮
dialogVisibleImg: false, //上传图片
refash: false,
memberGradeList: [], //会员等级
// memberGradeList: [], //会员等级
// 门店控件
sendChildData: {
storeType: 0,
......@@ -259,7 +266,7 @@ export default {
integralCost: [{ required: true, message: '请输入积分费用', trigger: 'blur' }],
cashCost: [{ required: true, message: '请输入现金费用', trigger: 'blur' }],
virtualStock: [{ required: true, message: '请输入库存', trigger: 'blur' }],
memberGrade: [{ required: true, message: '请选择适用会员', trigger: 'change' }],
// memberGrade: [{ required: true, message: '请选择适用会员', trigger: 'change' }],
exchangeFixDate: [{ required: true, message: '请选择时间', trigger: 'change' }],
exchangeDateDayArr: [{ required: true, message: '请选择时间', trigger: 'change' }],
exchangeDateWeekArr: [{ required: true, message: '请选择时间', trigger: 'change' }],
......@@ -271,7 +278,19 @@ export default {
costValue: '', //礼品成本
costValueStatus: true,
couponCardStock: '', //优惠券库存
couponStatus: false //卡券状态
couponStatus: false, //卡券状态
// 人群筛选器
// 可传参数
// projectName: 'integral-mall', // 当前项目名
getSaveData: '',
sceneValue: 'member', // 场景值
useId: '', // 模板id
hasSearchData: '', // 当前页回显的数据(接口返回)
operateType: true, // 编辑的时候是false 新增是true 例如列表筛选是开始true 编辑改成false
toggleTag: false, // 控制(确认取消)按钮显示的参数,仅供参考,可自行修改
saveTag: false, // 控制(保存)按钮显示的参数,仅供参考,可自行修改
searchParams: {}, //查询数据数据
responseParams: [] //回显的数据
};
},
created() {
......@@ -293,26 +312,26 @@ export default {
this.getInfo();
}
this.getMemberGradeList(); //会员等级列表\
// this.getMemberGradeList(); //会员等级列表\
},
methods: {
refashData() {
this.refash = !this.refash;
},
// 获取会员等级
getMemberGradeList() {
request.post('/api-integral-mall/load-grade').then(res => {
if (res.data.errorCode === 0) {
if (res.data.result) {
this.memberGradeList = res.data.result;
} else {
this.memberGradeList = [];
}
} else {
this.$message.error(res.data.message);
}
});
},
// getMemberGradeList() {
// request.post('/api-integral-mall/load-grade').then(res => {
// if (res.data.errorCode === 0) {
// if (res.data.result) {
// this.memberGradeList = res.data.result;
// } else {
// this.memberGradeList = [];
// }
// } else {
// this.$message.error(res.data.message);
// }
// });
// },
// 获取详情
getInfo() {
let params = {
......@@ -333,12 +352,16 @@ export default {
//库存
this.couponForm.virtualStock = res.data.result.virtualStock;
this.couponForm.detailDescription = res.data.result.detailDescription; //图文详情
//适用会员
if (res.data.result.memberGrade) {
this.couponForm.memberGrade = res.data.result.memberGrade.split(',');
} else {
this.couponForm.memberGrade = [];
}
this.searchParams = res.data.result.searchParams; //会员筛选
this.responseParams = res.data.result.responseParams;
this.useId = res.data.result.integralMallProId;
this.hasSearchData = res.data.result.searchParams;
// //适用会员
// if (res.data.result.memberGrade) {
// this.couponForm.memberGrade = res.data.result.memberGrade.split(',');
// } else {
// this.couponForm.memberGrade = [];
// }
if (res.data.result.images) {
//主图
for (let item of res.data.result.images) {
......@@ -657,7 +680,10 @@ export default {
giftImageUrls.push(item.imageUrl);
giftImageFiledCodes.push(item.imageCode);
}
if ((this.toggleTag && !this.getSaveData) || !this.getSaveData) {
this.$message.error('请选中人群筛选器的数据');
return false;
}
this.$refs[couponForm].validate(valid => {
if (valid) {
let params = {
......@@ -673,7 +699,7 @@ export default {
costValue: this.costValue, //礼品成本
cashCost: this.couponForm.cashCost, //现金
virtualStock: this.couponForm.virtualStock, //库存
memberGrade: this.couponForm.memberGrade.join(','), //适用会员
// memberGrade: this.couponForm.memberGrade.join(','), //适用会员
showStore: this.sendChildData.storeType, // 显示门店 0所有 1部分分类 2部分门店
storeIds: '', //展现门店id
limitTimes: this.couponForm.limitTimesStatus ? this.couponForm.limitTimes : '-1', //限兑
......@@ -685,7 +711,9 @@ export default {
exchangeTimeType: this.couponForm.exchangeTimeType, //兑换时段
proShowStatus: this.couponForm.proShowStatus, //显示状态
releaseType: this.couponForm.releaseType, //上架状态
limitTimeBegin: this.couponForm.releaseType === 2 ? this.getTimeAll(this.couponForm.limitTimeBegin) : '' //定时上架时间
limitTimeBegin: this.couponForm.releaseType === 2 ? this.getTimeAll(this.couponForm.limitTimeBegin) : '', //定时上架时间
searchParams: this.searchParams, //会员筛选
responseParams: this.responseParams
};
// 门店分类
if (this.sendChildData.storeType === 1) {
......@@ -734,6 +762,50 @@ export default {
this.$router.push({
name: 'coupon'
});
},
//人群筛选器使用的方法
// 父组件调用子组件方法,触发父组件事件
getData() {
var that = this;
that.$refs.peopleFilter.confirmSet();
// that.usePeopleFilter = true;
},
// 子组件触发父组件事件,返回过滤条件数据
findFilter(value) {
// var that = this;
this.searchParams = value;
},
// 取消
cancelFilter() {
var that = this;
that.$refs.peopleFilter.cancelSet();
},
// 获取需要回显的数据, 供保存时候使用
getBackData(val) {
this.responseParams = val;
this.getSaveData = val;
},
// 显示编辑,保存按钮隐藏,确认按钮显示 (子组件会调用)
editShow() {
var that = this;
that.toggleTag = true;
that.saveTag = false;
},
// 显示保存按钮,隐藏确认按钮显示 (子组件会调用)
editHide() {
var that = this;
that.toggleTag = false;
that.saveTag = true;
},
// 隐藏保存按钮和确认按钮 (子组件会调用)
// 传个参数给父组件 来查数据
hideBtn(refresh) {
if (refresh === 0) {
this.memberSearchStr = -1;
this.toggleTag = false;
// 查数据的方法
// this.getList();
}
}
},
components: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment