Commit ef134125 by zhangmeng

dd

parent e4db60f6
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/app.5296ef48442f7cb2584ff83e80d2e972.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/marketing/static/js/manifest.0a85049e489e85ac5f0a.js></script><script type=text/javascript src=/marketing/static/js/vendor.162b0e6539b2dd8ccf95.js></script><script type=text/javascript src=/marketing/static/js/app.0066977c2f71c91bf08c.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="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/app.f2e6067afe90b8033759e9d390fda13a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/marketing/static/js/manifest.0a85049e489e85ac5f0a.js></script><script type=text/javascript src=/marketing/static/js/vendor.34665a6259e36256891f.js></script><script type=text/javascript src=/marketing/static/js/app.d99ab8e75783fe2597a9.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.
......@@ -21,6 +21,8 @@ import vueGicPeople from '@gic-test/vue-gic-people'
import vueGicConfirmPeople from '@gic-test/vue-gic-confirm-people/src/lib'
import vueGicImgPreview from '@gic-test/vue-gic-img-preview'
// import vueGicMarketingEvent from '@gic-test/vue-gic-marketing-event'
import { gicStoreCard } from '@gic-test/vue-gic-store-new/src/lib'
import packele from 'packele'
Vue.config.productionTip = false
......@@ -36,6 +38,7 @@ Vue.use(vueGicStoreGroup)
Vue.use(vueGicPeople)
Vue.use(vueGicConfirmPeople)
Vue.use(vueGicImgPreview)
Vue.use(gicStoreCard)
// Vue.use(vueGicMarketingEvent)
Vue.prototype.axios = axios;
Vue.prototype.axios.withCredentials = true
......
......@@ -74,10 +74,6 @@
overflow: hidden;
}
.text-center{
text-align: center;
}
/* reset样式end */
......@@ -184,7 +180,7 @@
}
.dm-store__list--more{
text-align: center;
padding:10px 0;
padding:6px 0;
}
.dm-store__center {
......
<template>
<el-popover class="vertical-baseline" placement="bottom-start" width="490" height="378" trigger="click">
<el-popover class="vertical-baseline" placement="bottom-start" width="490" height="378" trigger="click" v-model="popoverShow">
<div class="dm-store__wrap" style="height: 378px;">
<!-- 左侧 -->
<div class="dm-store__left">
......@@ -35,6 +35,11 @@
</el-checkbox-group>
</div>
</div>
<!-- 操作按钮 -->
<div class="dm-store__btn">
<span class="dm-store__btn--cancel" @click="popoverShow = false">取 消</span>
<el-button class="dm-store__btn--cancel" type="text" @click="popoverShow = false">确 定</el-button>
</div>
<!-- 展示区 -->
<div class="el-input dm-store__reference w240" slot="reference">
<div class="el-input__inner dm-store__inputtag">
......@@ -84,21 +89,27 @@ export default {
id:'storeGroupId',
label:'storeGroupName',
children:'children'
}
},
popoverShow:false
}
},
created() {
this.getLeftList();
this.getRightList();
this.getLeftList().then(_ => {
this.getRightList();
})
},
methods:{
// 拉取左侧数据
getLeftList() {
this.axios.get(baseUrl + '/api-plug/store-group-list?requestProject=gic-web&search='+this.leftValue).then(res => {
this.leftList = res.data.result || [];
// this.leftTotal = res.data.result.totalCount || 0;
}).catch(err => {
console.log(err)
return new Promise((resolve,reject) => {
this.axios.get(baseUrl + '/api-plug/store-group-list?requestProject=gic-web&search='+this.leftValue).then(res => {
this.leftList = res.data.result || [];
resolve();
// this.leftTotal = res.data.result.totalCount || 0;
}).catch(err => {
reject();
console.log(err)
})
})
},
// 拉取右侧数据
......@@ -113,6 +124,9 @@ export default {
this.axios.post(baseUrl + '/api-plug/list-right-data?requestProject=gic-web',qs.stringify(params)).then(res => {
this.rightList = (res.data.result && res.data.result.result) || [];
this.rightTotal = (res.data.result && res.data.result.totalCount) || 0;
this.$nextTick(_ => {
this.$refs.tree.setCheckedKeys(this.rightList.map(v => v.id));
})
}).catch(err => {
console.log(err)
})
......
<template>
<el-popover class="vertical-baseline" placement="bottom-start" width="490" height="378" trigger="click">
<el-popover class="vertical-baseline" placement="bottom-start" width="490" height="378" trigger="click" v-model="popoverShow">
<div class="dm-store__wrap" style="height: 378px;">
<div class="dm-store__left">
<div class="dm-store__state">
......@@ -37,11 +37,15 @@
<i class="el-icon-close" v-show="rightHoverIndex !== i"></i>
<i class="el-icon-circle-close" v-show="rightHoverIndex === i" @click.stop="deleteRightItems(v.id)"></i>
</p>
<p class="dm-store__list--more"><el-button type="text" @click="loadMore">加载更多</el-button></p>
<p class="dm-store__list--more" v-if="moreShow" :disabled="moreLoading"><el-button type="text" @click="loadMore">{{moreLoading?'加载中...':'加载更多'}}</el-button></p>
</el-checkbox-group>
</div>
</div>
<!-- 操作按钮 -->
<div class="dm-store__btn">
<span class="dm-store__btn--cancel" @click="popoverShow = false">取 消</span>
<el-button class="dm-store__btn--cancel" type="text" @click="popoverShow = false">确 定</el-button>
</div>
<div class="el-input dm-store__reference w240" slot="reference">
<div class="el-input__inner dm-store__inputtag">
<el-tag size="small" v-for="v in rightList" :key="v.id" @close="deleteRightItems(v.id)" closable>{{v.name}}</el-tag>
......@@ -90,20 +94,25 @@ export default {
currentPage:1,
pageSize:20
},
isIndeterminate: true,
rightHoverIndex:null,
rightTotal:0,
leftTotal:0
leftTotal:0,
moreShow:false,
moreLoading:false,
popoverShow:false
}
},
created() {
this.getLeftList();
this.getRightList();
this.rightParams.currentPage = 1;
this.getRightList().then(res => {
this.rightList = res;
})
},
methods:{
// 拉取左侧数据
getLeftList() {
this.axios.get(baseUrl + '/api-plug/query-store-by-code-name-new?requestProject=gic-web&pageSize=20&currentPage=1&searchParams='+this.leftValue).then(res => {
this.axios.get(baseUrl + '/api-plug/query-store-by-code-name-new?requestProject=gic-web&pageSize=20&currentPage=1&searchParam='+this.leftValue).then(res => {
this.leftList = res.data.result.result || [];
this.leftTotal = res.data.result.totalCount || 0;
}).catch(err => {
......@@ -112,14 +121,30 @@ export default {
},
// 拉取右侧数据
getRightList() {
this.rightParams.key = this.uuid;
this.rightParams.search = this.rightValue;
this.axios.post(baseUrl + '/api-plug/list-right-data?requestProject=gic-web',qs.stringify(params)).then(res => {
this.rightList = (res.data.result && res.data.result.result) || [];
this.rightTotal = (res.data.result && res.data.result.totalCount) || 0;
}).catch(err => {
console.log(err)
});
return new Promise((resolve,reject) => {
this.moreLoading = true;
this.rightParams.key = this.uuid;
this.rightParams.search = this.rightValue;
this.axios.post(baseUrl + '/api-plug/list-right-data?requestProject=gic-web',qs.stringify(this.rightParams)).then(res => {
this.moreLoading = false;
if (res.data.errorCode === 0) {
this.rightTotal = (res.data.result && res.data.result.totalCount) || 0;
let list = (res.data.result && res.data.result.result) || [];
// 没有拉取到数据,说明没有更多数据
if (list.length < 20) {
this.moreShow = false;
} else {
this.moreShow = true;
}
resolve(list);
} else {
reject(new Error('获取列表错误'));
}
}).catch(err => {
reject(new Error('获取列表错误'));
console.log(err)
});
})
},
// 左侧数据移动到右侧
saveToRight() {
......@@ -136,7 +161,10 @@ export default {
}
}
this.axios.post(baseUrl + '/api-plug/save-store-widget?requestProject=gic-web',qs.stringify(this.params)).then(res => {
this.getRightList();
this.rightParams.currentPage = 1;
this.getRightList().then(res => {
this.rightList = res;
})
}).catch(err => {
console.log(err)
})
......@@ -145,7 +173,10 @@ export default {
deleteRightAll() {
this.axios.get(baseUrl + '/api-plug/remove-allitems?requestProject=gic-web&key='+this.uuid).then(res => {
if (res.data.errorCode === 0) {
this.getRightList();
this.rightParams.currentPage = 1;
this.getRightList().then(res => {
this.rightList = res;
})
} else {
this.$message({type:'error',message:'清除全部失败'});
}
......@@ -161,7 +192,10 @@ export default {
}
this.params.value = this.leftCheckList.join(',');
this.axios.post(baseUrl + '/api-plug/remove-items?requestProject=gic-web',qs.stringify(params)).then(res => {
this.getRightList();
this.rightParams.currentPage = 1;
this.getRightList().then(res => {
this.rightList = res;
})
this.rightCheckList = [];
}).catch(err => {
console.log(err)
......@@ -174,6 +208,13 @@ export default {
// 加载更多
loadMore() {
this.rightParams.currentPage += 1;
this.getRightList().then(res => {
if (res instanceof Array) {
res.map(v => {
this.rightList.push(v);
})
}
})
}
}
}
......
<template>
<el-popover class="vertical-baseline" placement="bottom-start" width="490" height="378" trigger="click">
<el-popover class="vertical-baseline" placement="bottom-start" width="490" height="378" trigger="click" v-model="popoverShow">
<div class="dm-store__wrap" style="height: 378px;">
<div class="dm-store__left">
<div class="dm-store__state">
......@@ -34,9 +34,15 @@
<i class="el-icon-close" v-show="rightHoverIndex !== i"></i>
<i class="el-icon-circle-close" v-show="rightHoverIndex === i" @click.stop="deleteRightItems(v.id)"></i>
</p>
<p class="dm-store__list--more" v-if="moreShow" :disabled="moreLoading"><el-button type="text" @click="loadMore">{{moreLoading?'加载中...':'加载更多'}}</el-button></p>
</el-checkbox-group>
</div>
</div>
<!-- 操作按钮 -->
<div class="dm-store__btn">
<span class="dm-store__btn--cancel" @click="popoverShow = false">取 消</span>
<el-button class="dm-store__btn--cancel" type="text" @click="popoverShow = false">确 定</el-button>
</div>
<div class="el-input dm-store__reference w240" slot="reference">
<div class="el-input__inner dm-store__inputtag">
<el-tag size="small" v-for="v in rightList" :key="v.id" @close="deleteRightItems(v.id)" closable>{{v.name}}</el-tag>
......@@ -77,15 +83,27 @@ export default {
value:'', //否 string isAll=0时,必填,选中项id,多个逗号分隔
removeItems:'', //否 string isAll=1,取消选中项的id,多个逗号分隔
},
isIndeterminate: true,
rightParams:{
key:this.uuid,
selectType:2,
search:this.rightValue,
currentPage:1,
pageSize:20
},
rightHoverIndex:null,
rightTotal:0,
leftTotal:0
leftTotal:0,
moreShow:false,
moreLoading:false,
popoverShow:false
}
},
created() {
this.getLeftList();
this.getRightList();
this.rightParams.currentPage = 1;
this.getRightList().then(res => {
this.rightList = res;
})
},
methods:{
// 拉取左侧数据
......@@ -99,20 +117,29 @@ export default {
},
// 拉取右侧数据
getRightList() {
let params = {
key:this.uuid,
selectType:2,
search:this.rightValue,
currentPage:1,
pageSize:20
}
this.axios.post(baseUrl + '/api-plug/list-right-data?requestProject=gic-web',qs.stringify(params)).then(res => {
if (res.data.errorCode === 0) {
this.rightList = (res.data.result && res.data.result.result) || [];
this.rightTotal = (res.data.result && res.data.result.totalCount) || 0;
}
}).catch(err => {
console.log(err)
return new Promise((resolve,reject) => {
this.moreLoading = true;
this.rightParams.key = this.uuid;
this.rightParams.search = this.rightValue;
this.axios.post(baseUrl + '/api-plug/list-right-data?requestProject=gic-web',qs.stringify(this.rightParams)).then(res => {
this.moreLoading = false;
if (res.data.errorCode === 0) {
this.rightTotal = (res.data.result && res.data.result.totalCount) || 0;
let list = (res.data.result && res.data.result.result) || [];
// 没有拉取到数据,说明没有更多数据
if (list.length < 20) {
this.moreShow = false;
} else {
this.moreShow = true;
}
resolve(list);
} else {
reject(new Error('获取列表错误'));
}
}).catch(err => {
reject(new Error('获取列表错误'));
console.log(err)
});
})
},
// 左侧数据移动到右侧
......@@ -130,7 +157,10 @@ export default {
}
}
this.axios.post(baseUrl + '/api-plug/save-store-widget?requestProject=gic-web',qs.stringify(this.params)).then(res => {
this.getRightList();
this.rightParams.currentPage = 1;
this.getRightList().then(res => {
this.rightList = res;
})
}).catch(err => {
console.log(err)
})
......@@ -139,7 +169,10 @@ export default {
deleteRightAll() {
this.axios.get(baseUrl + '/api-plug/remove-allitems?requestProject=gic-web&key='+this.uuid).then(res => {
if (res.data.errorCode === 0) {
this.getRightList();
this.rightParams.currentPage = 1;
this.getRightList().then(res => {
this.rightList = res;
})
} else {
this.$message({type:'error',message:'清除全部失败'});
}
......@@ -156,7 +189,10 @@ export default {
}
this.params.value = this.leftCheckList.join(',');
this.axios.post(baseUrl + '/api-plug/remove-items?requestProject=gic-web',qs.stringify(params)).then(res => {
this.getRightList();
this.rightParams.currentPage = 1;
this.getRightList().then(res => {
this.rightList = res;
})
this.rightCheckList = [];
}).catch(err => {
console.log(err)
......@@ -166,6 +202,17 @@ export default {
handleCheckAllChange(val) {
this.leftCheckList = val ? this.leftList.map(v => v.tagId) : [];
},
// 加载更多
loadMore() {
this.rightParams.currentPage += 1;
this.getRightList().then(res => {
if (res instanceof Array) {
res.map(v => {
this.rightList.push(v);
})
}
})
}
}
}
</script>
......
......@@ -64,6 +64,7 @@
</div>
</template>
<script>
import qs from 'qs';
import { baseUrl } from './config';
import uuidv1 from 'uuid/v1';
......@@ -120,15 +121,17 @@ export default {
rightLoading:false
}
},
created() {
this.newUuid = this.uuid || this.newUuid;
if (!this.uuid) {
this.$emit('update:uuid',this.newUuid);
}
this.initLeftList();
this.getRightList();
},
methods:{
// 获取配置项
init() {
this.newUuid = this.uuid || this.newUuid;
if (!this.uuid) {
this.$emit('update:uuid',this.newUuid);
} else {
this.getRightList();
}
this.initLeftList();
},
//左侧搜索 如果是全部门店则调用init列表
leftSearch() {
if (this.storeType) {
......
......@@ -12,7 +12,7 @@ import gicStoreNew from '../component/dmStore/index.vue'
data() {
return {
// 参数
uuid:'', // 新增传空,编辑必传,
uuid:'8f02ccc0e35911e8aaf8672621cbd00c', // 新增传空,编辑必传,
// 需要的下拉 默认为全部[0,1,2,3,4,5]
// 0 全部 1 门店类型 2门店标签 3 门店区域 4 门店分组 5 部分门店
options:[0,1,2,3,4,5],
......
......@@ -133,7 +133,8 @@
</el-form-item>
<el-form-item prop="sendChildData" label="适用门店">
<vue-gic-store-linkage :disabled="isInfo" :msg="sendChildData" ref="selectTree" @sendSelectGroupData="getSelectGroupData"></vue-gic-store-linkage>
<vue-gic-store-card ref="storeCard" :uuid.sync="uuid"></vue-gic-store-card>
<!-- <vue-gic-store-linkage :disabled="isInfo" :msg="sendChildData" ref="selectTree" @sendSelectGroupData="getSelectGroupData"></vue-gic-store-linkage> -->
</el-form-item>
<el-form-item prop="image" label="(选填)封面图片">
......
......@@ -46,6 +46,7 @@ const goods = {ok:'',no:'',flag:false}
export default {
data() {
return {
uuid:'',
loading:false,
cardShelfsLoading:false, //卡券展架loading
testList:[],
......@@ -79,6 +80,7 @@ export default {
isEdit:this.$route.meta.type === 'edit',
isInfo:this.$route.meta.type === 'info',
isCopy:this.$route.meta.type === 'copy',
isAdd:this.$route.meta.type === 'add'
}
},
watch:{
......@@ -100,6 +102,11 @@ export default {
this.getCardDetail()
this.$store.commit('mutations_breadcrumb',[{name:'营销管理',path:''},{name:'卡券营销',path:'/card'},{name:'卡券库',path:'/card/list'},{name:'卡券详情',path:''}])
},
mounted () {
if (this.isAdd){
this.$refs.storeCard.init();
}
},
computed: {
asideShow() {
return this.$store.state.marketing.asideShow
......@@ -209,21 +216,26 @@ export default {
this.form.cardExplain = card.cardExplain || '';
this.form.useDescript = card.useDescript || '';
this.form.coverDescript = card.coverDescript || '';
this.uuid = card.storeWidgetKey || '';
this.sendChildData = {
storeType:card.storeMode || 0,
storeGroupIds:card.groupIds?(card.groupIds.length?card.groupIds.join(','):''):'',
};
this.$nextTick(_ => {
this.$refs.storeCard.init();
})
let list = [];
// this.sendChildData = {
// storeType:card.storeMode || 0,
// storeGroupIds:card.groupIds?(card.groupIds.length?card.groupIds.join(','):''):'',
// };
if (card.storeIds && card.storeIds.length) {
card.storeIds.map(v => {
list.push(JSON.parse(v));
})
}
// let list = [];
this.sendChildData.storeIds = list;
// if (card.storeIds && card.storeIds.length) {
// card.storeIds.map(v => {
// list.push(JSON.parse(v));
// })
// }
// this.sendChildData.storeIds = list;
this.form.image = {
imgUrl:card.qcloudImageUrl || '',
......@@ -308,11 +320,6 @@ export default {
}
}
this.$refs[formName].validate((valid) => {
if (valid) {
this.saveUpdateCard();
......@@ -425,7 +432,7 @@ export default {
card.useDescript = this.form.useDescript;
//门店类型
card.storeMode = this.sendChildData.storeType;
// card.storeMode = this.sendChildData.storeType;
//封面
card.qcloudImageUrl = this.form.image.imgUrl;
card.imageFieldCode = this.form.image.code;
......@@ -459,19 +466,21 @@ export default {
card.checkSource = 0;
card.applicableMode = 0;
card.storeProMode = 0;
card.storeMode = 1;
// if (this.sendChildData.storeType === 1) {
// if (this.sendChildData.storeGroupIds) {
// params.groupIdList = JSON.stringify(this.sendChildData.storeGroupIds.split(','));
// }
// } else if (this.sendChildData.storeType === 2){
// if (this.sendChildData.storeIds) {
// params.storeIdList = JSON.stringify(this.sendChildData.storeIds.map(v => v.storeId));
// } else {
// params.storeIdList = JSON.stringify([]);
// }
// }
card.storeWidgetKey = this.uuid;
if (this.sendChildData.storeType === 1) {
if (this.sendChildData.storeGroupIds) {
params.groupIdList = JSON.stringify(this.sendChildData.storeGroupIds.split(','));
}
} else if (this.sendChildData.storeType === 2){
if (this.sendChildData.storeIds) {
params.storeIdList = JSON.stringify(this.sendChildData.storeIds.map(v => v.storeId));
} else {
params.storeIdList = JSON.stringify([]);
}
}
params.shelfIds = JSON.stringify(this.form.shelfIds);
params.card = JSON.stringify(card);
......
......@@ -6,8 +6,8 @@
<dm-input class="w400" :maxlength="9" v-model="form.ecmPlanName" ></dm-input>
</el-form-item>
<el-form-item label="时效" class="width50">
<el-radio v-model="form.effectType" :label="0">实时</el-radio>
<el-radio class="mr10" v-model="form.effectType" :label="1">每天</el-radio>
<el-radio v-model="form.effectType" :label="0" :disabled="!isAdd">实时</el-radio>
<el-radio class="mr10" v-model="form.effectType" :label="1" :disabled="!isAdd">每天</el-radio>
<el-select style="width:262px;" v-model="form.effectTime" v-if="form.effectType" placeholder="请选择时间">
<el-option v-for="(v,i) in dayOptions" :key="i" :label="v.label" :value="v.value"></el-option>
</el-select>
......
......@@ -281,7 +281,7 @@ export default {
//6.卡券
if (val.comName === 'card') {
params.title = val.cardName;
params.relationId = val.coupCardId;
params.relationId = val.wechatCardId;
}
//7.短信
......
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