Commit 4fd79de5 by crushh

update: dist

parent 24bfba42
......@@ -27,9 +27,6 @@
</p>
<img :src="modalData.imgUrl" class="wechat-img" style="width:140px;height:140px;">
</div>
<div class="wechat-force" style="margin-bottom:0">
<p>温馨提示:通过二维码兑换,仅校验会员适用等级</p>
</div>
<div class="wechat-force">
<el-button type="primary" @click="force">
重新生成
......@@ -40,11 +37,9 @@
</template>
<script>
// import request from '../../../service/request.js';
import request from '../service/request';
export default {
props: {
modalData: {
modalVal: {
type: Object,
},
integralMallProId: {
......@@ -53,26 +48,26 @@ export default {
return '';
},
},
saleType: {
type: String,
default () {
return '';
},
},
},
data () {
return {
// loading:true,
forceIntegralMallProId: '',
forceType: '',
modalData: {
show: false,
imgUrl: '',
loading: false,
},
};
},
watch: {
integralMallProId: function (value) {
this.forceIntegralMallProId = value;
},
saleType: function (value) {
this.forceType = value;
modalVal (val) {
console.log(val);
this.modalData = val;
},
},
methods: {
......@@ -83,22 +78,7 @@ export default {
this.$message.error('复制失败');
},
force () {
const params = {
integralMallProId: this.forceIntegralMallProId,
type: this.forceType,
isForce: '1',
};
this.modalData.show = true;
request.get('/api-integral-mall/get-qRCode', { params }).then(res => {
if (res.data.errorCode === 0) {
this.modalData.show = true;
this.modalData.pageUrl = res.data.result.page;
this.modalData.imgUrl = res.data.result.url;
this.modalData.loading = false;
} else {
this.$message.error(res.data.message);
}
});
this.$emit('updateEqcode', { integralMallProId: this.forceIntegralMallProId });
},
},
};
......
......@@ -12,9 +12,9 @@
@clear="getSearchList"
/>
</div>
<div class="tips" style="font-size:14px" v-show="allRuleData.length<20">
<div class="tips" style="font-size:14px">
没有适用规则?<el-button type="text" size="small" @click="$router.push('/addRule')">
去新建上架规则{{ allRuleData.length }}/20)
去新建上架规则
</el-button>
</div>
</div>
......@@ -40,14 +40,28 @@
</div>
</template>
</el-table-column>
<el-table-column label="可见人群">
<el-table-column label="可见条件">
<template slot-scope="{row}">
<p v-if="row.memberType==1">
全部会员
</p>
<p v-else>
{{ row.echoData }}
</p>
<div v-else>
<el-tooltip
class="tips-content"
popper-class="store-tips"
effect="dark"
placement="top-start"
v-if="(row.showBack&&row.showBack.length>20)"
>
<div slot="content" style="line-height:18px">
{{ row.showBack }}
</div>
<div>{{ row.showBack.slice(0,20)+'...' }}</div>
</el-tooltip>
<div v-else>
{{ row.showBack }}
</div>
</div>
</template>
</el-table-column>
</el-table>
......@@ -95,7 +109,6 @@ export default {
},
dialogTableVisible: false,
echoRuleId: '',
allRuleData: [],
};
},
watch: {
......@@ -123,19 +136,9 @@ export default {
getList () {
this.loading = true;
this.tableRadio = '';
request.get('/api-integral-mall/list-rule', { params: {} }).then(res => {
this.allRuleData = res.data.result || [];
});
request.get('/api-integral-mall/page-rule', { params: this.relateForm }).then(async (res) => {
this.tableDate = res.data.result.result || [];
this.totalCount = res.data.result.totalCount;
for (let i = 0; i < this.tableDate.length; i++) {
const item = this.tableDate[i];
if (item.memberType == 3) {
const res = await this.echoData(item);
item.echoData = res.data.result;
}
}
this.tableDate = this.tableDate.splice(0);
if (this.echoRuleId) this.tableRadio = this.echoRuleId;
}).finally(_ => {
......
......@@ -475,7 +475,7 @@
</div>
</el-dialog>
<!-- 推广 -->
<eqCode :modalData="modalData" :integralMallProId="integralMallProId" :saleType="saleType" />
<eqCode :modalVal="modalData" :integralMallProId="integralMallProId" @updateEqcode="getLink" />
<!-- 调整积分费用 -->
<editInfo :editInfoModal="editInfoModal" @getList="getList" />
<!-- <stockModal :intergralModal="intergralModal" @getList="getList"></stockModal> -->
......@@ -567,7 +567,6 @@ export default {
integralMallProId: '',
},
integralMallProId: '',
saleType: '',
errorMessage: '',
errorList: '',
outerVisible: false,
......@@ -756,7 +755,6 @@ export default {
getLink (item) {
this.modalData.loading = true;
this.integralMallProId = item.integralMallProId;
this.saleType = 'card';
const params = {
integralMallProId: item.integralMallProId,
type: 'card',
......@@ -772,6 +770,7 @@ export default {
this.$message.error(res.data.message);
}
});
this.modalData = Object.assign({}, this.modalData);
},
// 删除操作
deleteList (item, type, index) {
......
......@@ -25,6 +25,7 @@
label-width="100px"
class="demo-ruleForm"
label-position="right"
@submit.native.prevent
>
<div class="section-content">
<h3>选择卡券</h3>
......@@ -1579,9 +1580,7 @@ export default {
.select-shop__right {
line-height: 28px !important;
}
.section-content .pagination {
float: none !important;
}
.upload-list-box .el-upload--picture-card {
width: 104px;
height: 104px;
......
......@@ -1856,9 +1856,7 @@ export default {
.select-shop__right {
line-height: 28px !important;
}
.section-content .pagination {
float: none !important;
}
.upload-list-box .el-upload--picture-card {
width: 104px;
height: 104px;
......
......@@ -24,6 +24,7 @@
ref="giftForm"
label-width="100px"
class="demo-ruleForm"
@submit.native.prevent
label-position="right"
>
<div class="section-content">
......
......@@ -453,7 +453,7 @@
<!-- 修改礼品名称 -->
<editName :editInfoModal="editInfoModal" @getList="getList" />
<!-- 推广 -->
<eqCode :modalData="modalData" :integralMallProId="integralMallProId" :saleType="saleType" />
<eqCode :modalVal="modalData" :integralMallProId="integralMallProId" @updateEqcode="getLink" />
<!-- 新增礼品 -->
<selectType :addModalData="addModalData" />
<!-- 调整积分费用 -->
......@@ -568,7 +568,6 @@ export default {
couponCurrentPage: 1,
couponPageSize: 20,
integralMallProId: '',
saleType: '',
ladderPriceData: {
data: [],
id: '',
......@@ -776,7 +775,6 @@ export default {
getLink (item) {
this.modalData.loading = true;
this.integralMallProId = item.integralMallProId;
this.saleType = 'gift';
const params = {
integralMallProId: item.integralMallProId,
type: 'gift',
......@@ -791,6 +789,7 @@ export default {
} else {
this.$message.error(res.data.message);
}
this.modalData = Object.assign({}, this.modalData);
});
},
// 获取卡券列表
......
......@@ -57,9 +57,6 @@
会员筛选
</el-radio>
</el-form-item>
<el-form-item v-show="ruleForm.memberType === 1">
<span class="tips">提示:单商户下【会员】类型的上架规则只支持1条</span>
</el-form-item>
<el-form-item v-show="ruleForm.memberType === 4">
<vue-gic-store-new
v-if="isAdd||uuid"
......@@ -70,7 +67,7 @@
/>
</el-form-item>
<el-form-item v-show="ruleForm.memberType === 3">
<span class="tips">提示:单商户下【会员筛选】类型的上架规则最多支持20条 {{ `${memberTypeTotal}/20` }}</span>
<span class="tips">【会员筛选】类型的上架规则最多支持20条 {{ `${memberTypeTotal}/20` }}</span>
<vue-gic-people
v-bind="storeParams"
:projectName="projectName"
......@@ -81,18 +78,7 @@
ref="peopleFilter"
@findFilter="findFilter"
@getBackData="getBackData"
@editHide="editHide"
@editShow="editShow"
@hideBtn="hideBtn"
/>
<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>
<div>
<el-form-item style="margin-top:50px">
......@@ -137,7 +123,6 @@ export default {
useId: '',
hasSearchData: '',
sceneValue: 'member', // 场景值
toggleTag: true,
isEdit: this.$route.meta.type === 'edit',
isAdd: this.$route.meta.type === 'add',
isCopy: this.$route.meta.type === 'copy',
......@@ -171,34 +156,14 @@ export default {
this.uuid = storeId;
},
/** 人群筛选器 */
cancelFilter () { // 取消
this.$refs.peopleFilter.cancelSet();
},
getData () {
this.$refs.peopleFilter.confirmSet();
},
// 获取需要回显的数据, 供保存时候使用
getBackData (val) {
this.ruleForm.searchJson = val;
},
// 显示编辑,保存按钮隐藏,确认按钮显示 (子组件会调用)
editShow () {
this.toggleTag = true;
},
// 显示保存按钮,隐藏确认按钮显示 (子组件会调用)
editHide () {
this.toggleTag = false;
},
// 子组件触发父组件事件,返回过滤条件数据
findFilter (value) {
this.ruleForm.filterJson = value;
},
// 隐藏保存按钮和确认按钮 (子组件会调用)
// 传个参数给父组件 来查数据
hideBtn () {
this.toggleTag = false;
},
getDatail (integralMallProRuleId) {
this.loading = true;
request.get('/api-integral-mall/get-rule', { params: { integralMallProRuleId } }).then(res => {
......@@ -225,12 +190,13 @@ export default {
});
},
submitRequest () {
console.log(this.ruleForm);
this.$refs.ruleForm.validate(val => {
if (val) {
let data = {};
if (this.isCopy) {
const { ruleTitle, ruleExplanation, filterJson, memberType, searchJson } = this.ruleForm;
data = { ruleTitle, ruleExplanation, memberType, filterJson, searchJson };
const { ruleTitle, ruleExplanation, filterJson, memberType, searchJson, showBack } = this.ruleForm;
data = { ruleTitle, ruleExplanation, memberType, filterJson, searchJson, showBack };
} else {
data = this.ruleForm;
}
......@@ -248,16 +214,26 @@ export default {
});
},
submit () {
if (this.toggleTag) {
this.$refs.peopleFilter.confirmSet().then(() => {
if (this.ruleForm.memberType == 3) {
this.$refs.peopleFilter.confirmSet().then(async () => {
const res = await this.echoData(this.ruleForm.filterJson);
this.ruleForm.showBack = res.data.result;
this.submitRequest();
});
} else if (this.ruleForm.memberType == 4) {
this.$refs.storeGroup.getStoreConfig().then(data => {
let type = 1;
this.$refs.storeGroup.getStoreConfig().then(async (data) => {
let type = 0;
if (data.type != 0) {
type = 2;
type = 1;
}
const res = await this.echoData2(this.uuid, data.type);
const { data: { result } } = res;
if (result) {
this.ruleForm.showBack = result.result.map(item => item.name).join(',');
} else {
this.ruleForm.showBack = '所有门店';
}
console.log(this.ruleForm.showBack);
this.ruleForm.filterJson = JSON.stringify({ storeMode: type, storeWidgetId: this.uuid });
this.submitRequest();
});
......@@ -265,6 +241,21 @@ export default {
this.submitRequest();
}
},
echoData (filterJson) { // 取得人群筛选器回显文字
const form = new FormData();
form.append('params', filterJson);
form.append('requestProject', 'integral-mall');
form.append('sceneCode', 'member');
return request.post('/api-plug/screening-show-back', form);
},
echoData2 (key, type) { // 取得门店筛选器的文字回显
const form = new FormData();
form.append('key', key);
form.append('selectType', type);
form.append('currentPage', 1);
form.append('pageSize', 20);
return request.post('/api-plug/list-right-data', form);
},
memberTypeNum () {
request.get('/api-integral-mall/list-rule', { params: { memberType: 3 } }).then(res => {
this.memberTypeTotal = res.data.result.length || 0;
......
......@@ -84,7 +84,7 @@
</el-table-column>
<el-table-column
prop="memberType"
label="会员类型"
label="类型"
>
<template slot-scope="{row}">
{{ row.memberType | filterMemberType }}
......@@ -454,7 +454,7 @@ export default {
const params = this.relateForm;
request.get('/api-integral-mall/page-rule-pro', { params }).then(res => {
this.relatingGoodsTable = res.data.result.result || [];
this.relateCount = res.data.result.relateCount;
this.relateCount = res.data.result.totalCount;
}).finally(_ => {
this.loading = false;
});
......
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