Commit 39f19c11 by cwq0219
2 parents ec830332 d2b11524
...@@ -163,6 +163,24 @@ const remindUserGroup = params => { ...@@ -163,6 +163,24 @@ const remindUserGroup = params => {
sign: true sign: true
}) })
} }
const getMerchant = params => {
params.method = 'scrm.api.coupon.list.merchant'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
const getCard = params => {
params.method = 'scrm.api.equity.card.class.list.with.page'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
customerList, customerList,
customerGroupList, customerGroupList,
...@@ -179,5 +197,7 @@ export default { ...@@ -179,5 +197,7 @@ export default {
groupDetailStatistic, groupDetailStatistic,
staffList, staffList,
customerDetailList, customerDetailList,
groupDetailList groupDetailList,
getMerchant,
getCard
} }
export function debounce(func, wait= 200){
let timeout;
return function(event){
clearTimeout(timeout)
timeout = setTimeout(()=>{
func.call(this, event)
},wait)
}
}
export function dateFormat (dateTime, format = 'YYYY-MM-DD HH:mm') { export function dateFormat (dateTime, format = 'YYYY-MM-DD HH:mm') {
const date = new Date(dateTime) const date = new Date(dateTime)
const config = { const config = {
......
...@@ -2,6 +2,27 @@ ...@@ -2,6 +2,27 @@
<template> <template>
<div class="edit-share marketing p-t-20"> <div class="edit-share marketing p-t-20">
<div class="container edit-container"> <div class="container edit-container">
<div class="right_show">
<div class="card-top"></div>
<div class="card-middle">
<div>
<span class="cname">{{ editForm.couponName }}</span>
<span class="ctype"><span class="ctypeName">代金券</span></span>
</div>
<div class="ctime">
<span class="ctime_name">有效期: </span>
<span class="ctime_content" v-if="editForm.effectiveType == 3">无限制</span>
<span class="ctime_content" v-if="editForm.effectiveType == 1">{{editForm.effectiveDays}}天</span>
<span class="ctime_content" v-if="editForm.effectiveType == 2">{{couponTime}}</span>
</div>
<div class="ctime">
<span class="ctime_name">使用限制: </span>
<span class="ctime_content">{{editForm.useBarriers==1?'无限制':'满'+ editForm.full + '可用'}}</span>
</div>
<div class="cremarks">使用说明: </div>
<div class="cremarks_content">{{editForm.useDescription}}</div>
</div>
</div>
<p class="edit-title">{{ title }}代金券</p> <p class="edit-title">{{ title }}代金券</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="144px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="144px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="useChannelHtml"> <template slot="useChannelHtml">
...@@ -26,7 +47,7 @@ ...@@ -26,7 +47,7 @@
</el-form-item> </el-form-item>
<el-form-item prop="effectiveDays"> <el-form-item prop="effectiveDays">
<el-radio v-model="editForm.effectiveType" label="1" :disabled="apear!='couponAdd'"> <el-radio v-model="editForm.effectiveType" label="1" :disabled="apear!='couponAdd'">
领取后你好<el-input v-model="editForm.effectiveDays" style="width:100px;margin-left:5px;margin-right:5px" :disabled="apear!='couponAdd'|| editForm.effectiveType != 1" />天内有效 领取后<el-input v-model="editForm.effectiveDays" style="width:100px;margin-left:5px;margin-right:5px" :disabled="apear!='couponAdd'|| editForm.effectiveType != 1" />天内有效
</el-radio> </el-radio>
</el-form-item> </el-form-item>
</template> </template>
...@@ -65,7 +86,7 @@ ...@@ -65,7 +86,7 @@
</template> </template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<div class="view pull-left"> <!-- <div class="view pull-left">
<img src="@/images/wechat_top.png"> <img src="@/images/wechat_top.png">
<div class='view-box'> <div class='view-box'>
<div class='coupon-img'> <div class='coupon-img'>
...@@ -105,7 +126,7 @@ ...@@ -105,7 +126,7 @@
</div> </div>
<div>立即领取</div> <div>立即领取</div>
</div> </div>
</div> </div> -->
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button> <el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button>
<el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button> <el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button>
...@@ -150,6 +171,7 @@ export default { ...@@ -150,6 +171,7 @@ export default {
effectiveType: '3', effectiveType: '3',
effectiveDays: '', effectiveDays: '',
useBarriers: '1', useBarriers: '1',
full: '',
goods: '1', goods: '1',
goodsRefList: [], goodsRefList: [],
}, },
...@@ -543,182 +565,125 @@ export default { ...@@ -543,182 +565,125 @@ export default {
} }
</script> </script>
<style scoped> <style scoped>
.view { .right_show {
width: 375px; /* float: right; */
height: 600px; position: absolute;
/* margin: 30px 45px 0 60px; */ z-index: 10;
background: #F6F6F6; height: 566px;
position: relative; width: 290px;
right: 44px;
position: absolute; top: 92px;
top: 110px; background-image:url(../../assets/coupon/phone.png);
left: 50%;
}
.coupon-img {
position: relative;
}
.conpon-left {
position: absolute;
width: 90px;
height: 80px;
top: 0;
left: 0;
z-index: 2;
}
.conpon-left>div {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #fff;
font-size: 30px;
width: 100%;
text-align: center;
}
.conpon-left>div span {
font-size: 12px;
} }
.conpon-left>div p { .right_show .card-top {
font-size: 10px; height: 59px;
margin: 0; width: 251px;
margin-left: 18px;
margin-top: 55px;
} }
.conpon-right { .right_show .card-middle {
position: absolute; height: 388px;
background: #fff; width: 251px;
z-index: 2; margin-left: 18px;
width: calc(100% - 90px); overflow:auto
height: 80px;
box-sizing: border-box;
padding: 8px 11px 0;
top: 0;
left: 90px;
font-size: 12px;
color: #999999;
} }
.coupon_name { .right_show .card-middle .cname {
color: #333; width: 170px;
font-size: 14px; height: 17px;
margin-bottom: 10px; font-family: PingFangSC-Regular;
font-size: 12px;
color: #666666;
font-weight: 400;
margin-left: 10px;
margin-top: 15px;
display: inline-block;
} }
.view img { .right_show .card-middle .ctype {
width: 100%; width: 48px;
vertical-align: top; height: 20px;
background: #5850FF;
border-radius: 10px;
margin-right: 6px;
margin-top: 10px;
display: inline-block;
float: right;
} }
.view-btn { .right_show .card-middle .ctype .ctypeName {
position: absolute; width: 36px;
left: 0; height: 17px;
bottom: 0; font-family: PingFangSC-Regular;
width: 100%; font-size: 12px;
height: 50px; color: #FFFFFF;
text-align: center; font-weight: 400;
background: #fff; margin-left: 6px;
font-size: 10px;
color: #999999;
} }
.view-btn>div:first-of-type { .right_show .card-middle .ctime {
float: left; margin-left: 10px;
width: 100px; margin-top: 17px;
height: 100%;
box-sizing: border-box;
padding-top: 7px;
} }
.right_show .card-middle .ctime .ctime_name {
.view-btn>div:last-of-type { width: 48px;
float: left; height: 17px;
width: calc(100% - 100px); font-family: PingFangSC-Regular;
line-height: 50px; font-size: 12px;
height: 100%; color: #333333;
background: #FF6600; font-weight: 400;
color: #fff;
font-size: 16px;
}
.view-btn img {
width: 22px;
height: 20px;
}
.view-box {
margin: 14px 20px 0;
}
.view-box .mt3 {
background: #FFFFFF;
border-radius: 4px;
}
.view-box .mt3 div {
padding: 20px;
font-size: 14px;
color: #333;
}
.couponName {
padding: 10px 0 0 125px;
}
.couponName span {
margin-right: 10px;
cursor: pointer;
}
.couponName span:hover {
color: #00a479;
} }
.form-item-input { .right_show .card-middle .ctime .ctime_content {
height: 30px; height: 17px;
width: 180px; font-family: PingFangSC-Regular;
box-sizing: border-box; font-size: 12px;
border: 1px solid #cccccc; color: #717171;
border-radius: 2px; font-weight: 400;
box-sizing: border-box; margin-left: 5px;
padding: 0 10px;
outline: none;
} }
.couponTypeList { .right_show .card-middle .ccode {
float: left; width: 120px;
height: 30px; height: 120px;
line-height: 30px; margin-left: 67px;
border-radius: 2px; margin-top: 8px;
padding: 0 14px;
box-sizing: border-box;
border: 1px solid #ccc;
margin-right: 10px;
cursor: pointer;
} }
.couponTypeList:hover, .right_show .card-middle .ccodeName {
.couponTypeList.active { width: 68px;
color: #fff; height: 17px;
background-color: #00a479; font-family: PingFangSC-Medium;
border-color: #00a479; font-size: 12px;
color: #1D1D1D;
font-weight: 500;
margin-left: 93px;
margin-top: 8px;
} }
.user { .right_show .card-middle .cremarks {
font-size: 14px; margin-left: 10px;
color: #666; margin-top: 17px;
height: 18px; width: 60px;
line-height: 18px; height: 17px;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #333333;
font-weight: 400;
} }
.user img { .right_show .card-middle .cremarks_content {
width: 18px; margin-left: 10px;
height: 18px; margin-right: 11px;
border-radius: 100%; margin-top: 4px;
overflow: hidden; width: 230px;
vertical-align: middle; height: 34px;
margin-right: 6px; font-family: PingFangSC-Regular;
font-size: 12px;
color: #666666;
font-weight: 400;
word-break: break-word;
} }
</style> </style>
<!-- 编辑代金券 --> <!-- 编辑代金券 -->
<template> <template>
<div class="edit-share marketing p-t-20"> <div class="edit-share marketing p-t-20">
<div class="container edit-container"> <div class="container edit-container" style="height: 630px;">
<div class="right_show">
<div class="card-top"></div>
<div class="card-middle">
<div>
<span class="cname">{{ editForm.couponName }}</span>
<span class="ctype"><span class="ctypeName">折扣券</span></span>
</div>
<div class="ctime">
<span class="ctime_name">有效期: </span>
<span class="ctime_content" v-if="editForm.effectiveType == 1">{{editForm.effectiveDays}}天</span>
<span class="ctime_content" v-if="editForm.effectiveType == 2">{{couponTime}}</span>
</div>
<div class="ctime">
<span class="ctime_name">核销劵码: </span>
</div>
<img class="ccode" src="../../assets/coupon/code.png" />
<div class="ccodeName">GH078-003</div>
<div class="cremarks">使用说明: </div>
<div class="cremarks_content">{{editForm.useDescription}}</div>
</div>
</div>
<p class="edit-title">{{ title }}折扣劵</p> <p class="edit-title">{{ title }}折扣劵</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="effectiveHtml"> <template slot="effectiveHtml">
...@@ -30,24 +51,6 @@ ...@@ -30,24 +51,6 @@
</template> </template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<div class="left_show">
<div class="card-panel-top">
<div class="card-h-title">折扣券</div>
<!-- <div class="card-extime" v-if="editForm.effectiveType == 3">有效期:无限制</div> -->
<div class="card-extime" v-if="editForm.effectiveType == 1">有效期:{{editForm.effectiveDays}}天</div>
<!-- <div class="card-extime" ng-show="effectiveType == 2 && model.effectiveStartTime">有效期:{{model.effectiveTime}}</div> -->
<!-- <div class="card-extime" ng-show="effective == 2 && effectiveTime">有效期:{{effectiveTime.startDate.format('YYYY-MM-DD')}}-{{effectiveTime.endDate.format('YYYY-MM-DD')}}</div> -->
<div class="card-extime" v-if="editForm.effectiveType == 2">有效期:{{couponTime}}</div>
<div class="card-name">{{editForm.couponName}}</div>
<!-- <div class="card-day" v-if="editForm.useType == 0">使用限制:无限定次数</div>
<div class="card-day" v-if="editForm.useType == 1">使用限制:{{editForm.usageTimes}}次</div>
<div class="card-day" v-if="editForm.useType == 2">使用限制:每{{editForm.useLimitDays}}天可以使用{{editForm.usageTimes2}}次</div> -->
</div>
<div class="card-panel-bottom">
<div class="card-remark">使用说明:</div>
<div class="card-remark">{{editForm.useDescription}}</div>
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button> <el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button>
<el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button> <el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button>
...@@ -163,7 +166,7 @@ export default { ...@@ -163,7 +166,7 @@ export default {
}, },
'editForm.effectiveTime'(newValue, oldValue){ 'editForm.effectiveTime'(newValue, oldValue){
if(newValue && newValue.length > 0){ if(newValue && newValue.length > 0){
this.couponTime = this.setDateString(newValue[0], true) + ' - ' + this.setDateString(newValue[1], true) this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
}else{ }else{
this.couponTime = '' this.couponTime = ''
} }
...@@ -275,54 +278,125 @@ export default { ...@@ -275,54 +278,125 @@ export default {
} }
</script> </script>
<style scoped> <style scoped>
.left_show { .right_show {
width: 400px; /* float: right; */
/*min-height: 600px;*/
background: #fff;
/*border: 1px solid #eee;*/
position:relative;
display:flex;
flex-direction: column;
position: absolute; position: absolute;
top: 110px; z-index: 10;
left: 50%; height: 566px;
width: 290px;
right: 44px;
top: 92px;
background-image:url(../../assets/coupon/phone.png);
} }
.left_show .card-panel-top { .right_show .card-top {
/* margin-top: 200px; */ height: 59px;
width: 365px; width: 251px;
height: 122px; margin-left: 18px;
background-color: rgba(245, 154, 35, 0.7); margin-top: 55px;
border: none;
text-align: center;
line-height: 24px;
position: relative;
} }
.card-h-title {
position: absolute; .right_show .card-middle {
font-weight: 500; height: 388px;
font-size: 20px; width: 251px;
top: 20px; margin-left: 18px;
transform: rotate(-45deg); overflow:auto
} }
.card-panel-bottom {
width: 353px; .right_show .card-middle .cname {
min-height: 90px; width: 170px;
background-color: rgba(250, 205, 145, 1); height: 17px;
padding: 6px; font-family: PingFangSC-Regular;
font-size: 12px;
color: #666666;
font-weight: 400;
margin-left: 10px;
margin-top: 15px;
display: inline-block;
} }
.card-extime {
.right_show .card-middle .ctype {
width: 48px;
height: 20px;
background: #5850FF;
border-radius: 10px;
margin-right: 6px;
margin-top: 10px; margin-top: 10px;
display: inline-block;
float: right;
} }
.card-name {
margin: 16px 0px; .right_show .card-middle .ctype .ctypeName {
font-size: 16px; width: 36px;
height: 17px;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #FFFFFF;
font-weight: 400;
margin-left: 6px;
} }
.card-day {
margin-top: 10px; .right_show .card-middle .ctime {
margin-left: 10px;
margin-top: 17px;
}
.right_show .card-middle .ctime .ctime_name {
width: 48px;
height: 17px;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #333333;
font-weight: 400;
}
.right_show .card-middle .ctime .ctime_content {
height: 17px;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #717171;
font-weight: 400;
margin-left: 5px;
}
.right_show .card-middle .ccode {
width: 120px;
height: 120px;
margin-left: 67px;
margin-top: 8px;
} }
.card-remark {
.right_show .card-middle .ccodeName {
width: 68px;
height: 17px;
font-family: PingFangSC-Medium;
font-size: 12px;
color: #1D1D1D;
font-weight: 500;
margin-left: 93px;
margin-top: 8px;
}
.right_show .card-middle .cremarks {
margin-left: 10px;
margin-top: 17px;
width: 60px;
height: 17px;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #333333;
font-weight: 400;
}
.right_show .card-middle .cremarks_content {
margin-left: 10px;
margin-right: 11px;
margin-top: 4px;
width: 230px;
height: 34px;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #666666;
font-weight: 400;
word-break: break-word; word-break: break-word;
} }
</style> </style>
...@@ -2,6 +2,27 @@ ...@@ -2,6 +2,27 @@
<template> <template>
<div class="edit-share marketing p-t-20"> <div class="edit-share marketing p-t-20">
<div class="container edit-container"> <div class="container edit-container">
<div class="right_show">
<div class="card-top"></div>
<div class="card-middle">
<div>
<span class="cname">{{ editForm.couponName }}</span>
<span class="ctype"><span class="ctypeName">兑换券</span></span>
</div>
<div class="ctime">
<span class="ctime_name">有效期: </span>
<span class="ctime_content" v-if="editForm.effectiveType == 1">{{editForm.effectiveDays}}天</span>
<span class="ctime_content" v-if="editForm.effectiveType == 2">{{couponTime}}</span>
</div>
<div class="ctime">
<span class="ctime_name">核销劵码: </span>
</div>
<img class="ccode" src="../../assets/coupon/code.png" />
<div class="ccodeName">GH078-003</div>
<div class="cremarks">使用说明: </div>
<div class="cremarks_content">{{editForm.useDescription}}</div>
</div>
</div>
<p class="edit-title">{{ title }}兑换券</p> <p class="edit-title">{{ title }}兑换券</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="effectiveHtml"> <template slot="effectiveHtml">
...@@ -30,24 +51,6 @@ ...@@ -30,24 +51,6 @@
</template> </template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<div class="left_show">
<div class="card-panel-top">
<div class="card-h-title">兑换券</div>
<!-- <div class="card-extime" v-if="editForm.effectiveType == 3">有效期:无限制</div> -->
<div class="card-extime" v-if="editForm.effectiveType == 1">有效期:{{editForm.effectiveDays}}天</div>
<!-- <div class="card-extime" ng-show="effectiveType == 2 && model.effectiveStartTime">有效期:{{model.effectiveTime}}</div> -->
<!-- <div class="card-extime" ng-show="effective == 2 && effectiveTime">有效期:{{effectiveTime.startDate.format('YYYY-MM-DD')}}-{{effectiveTime.endDate.format('YYYY-MM-DD')}}</div> -->
<div class="card-extime" v-if="editForm.effectiveType == 2">有效期:{{couponTime}}</div>
<div class="card-name">{{editForm.couponName}}</div>
<!-- <div class="card-day" v-if="editForm.useType == 0">使用限制:无限定次数</div>
<div class="card-day" v-if="editForm.useType == 1">使用限制:{{editForm.usageTimes}}次</div>
<div class="card-day" v-if="editForm.useType == 2">使用限制:每{{editForm.useLimitDays}}天可以使用{{editForm.usageTimes2}}次</div> -->
</div>
<div class="card-panel-bottom">
<div class="card-remark">使用说明:</div>
<div class="card-remark">{{editForm.useDescription}}</div>
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button> <el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button>
<el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button> <el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button>
...@@ -275,54 +278,125 @@ export default { ...@@ -275,54 +278,125 @@ export default {
} }
</script> </script>
<style scoped> <style scoped>
.left_show { .right_show {
width: 400px; /* float: right; */
/*min-height: 600px;*/
background: #fff;
/*border: 1px solid #eee;*/
position:relative;
display:flex;
flex-direction: column;
position: absolute; position: absolute;
top: 110px; z-index: 10;
left: 50%; height: 566px;
width: 290px;
right: 44px;
top: 92px;
background-image:url(../../assets/coupon/phone.png);
} }
.left_show .card-panel-top { .right_show .card-top {
/* margin-top: 200px; */ height: 59px;
width: 365px; width: 251px;
height: 122px; margin-left: 18px;
background-color: rgba(245, 154, 35, 0.7); margin-top: 55px;
border: none;
text-align: center;
line-height: 24px;
position: relative;
} }
.card-h-title {
position: absolute; .right_show .card-middle {
font-weight: 500; height: 388px;
font-size: 20px; width: 251px;
top: 20px; margin-left: 18px;
transform: rotate(-45deg); overflow:auto
} }
.card-panel-bottom {
width: 353px; .right_show .card-middle .cname {
min-height: 90px; width: 170px;
background-color: rgba(250, 205, 145, 1); height: 17px;
padding: 6px; font-family: PingFangSC-Regular;
font-size: 12px;
color: #666666;
font-weight: 400;
margin-left: 10px;
margin-top: 15px;
display: inline-block;
} }
.card-extime {
.right_show .card-middle .ctype {
width: 48px;
height: 20px;
background: #5850FF;
border-radius: 10px;
margin-right: 6px;
margin-top: 10px; margin-top: 10px;
display: inline-block;
float: right;
} }
.card-name {
margin: 16px 0px; .right_show .card-middle .ctype .ctypeName {
font-size: 16px; width: 36px;
height: 17px;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #FFFFFF;
font-weight: 400;
margin-left: 6px;
} }
.card-day {
margin-top: 10px; .right_show .card-middle .ctime {
margin-left: 10px;
margin-top: 17px;
}
.right_show .card-middle .ctime .ctime_name {
width: 48px;
height: 17px;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #333333;
font-weight: 400;
}
.right_show .card-middle .ctime .ctime_content {
height: 17px;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #717171;
font-weight: 400;
margin-left: 5px;
}
.right_show .card-middle .ccode {
width: 120px;
height: 120px;
margin-left: 67px;
margin-top: 8px;
} }
.card-remark {
.right_show .card-middle .ccodeName {
width: 68px;
height: 17px;
font-family: PingFangSC-Medium;
font-size: 12px;
color: #1D1D1D;
font-weight: 500;
margin-left: 93px;
margin-top: 8px;
}
.right_show .card-middle .cremarks {
margin-left: 10px;
margin-top: 17px;
width: 60px;
height: 17px;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #333333;
font-weight: 400;
}
.right_show .card-middle .cremarks_content {
margin-left: 10px;
margin-right: 11px;
margin-top: 4px;
width: 230px;
height: 34px;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #666666;
font-weight: 400;
word-break: break-word; word-break: break-word;
} }
</style> </style>
...@@ -50,13 +50,11 @@ ...@@ -50,13 +50,11 @@
</template> </template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<div class="left_show"> <!-- <div class="left_show">
<div class="card-panel-top"> <div class="card-panel-top">
<div class="card-h-title">会员券</div> <div class="card-h-title">会员券</div>
<div class="card-extime" v-if="editForm.effectiveType == 3">有效期:无限制</div> <div class="card-extime" v-if="editForm.effectiveType == 3">有效期:无限制</div>
<div class="card-extime" v-if="editForm.effectiveType == 1">有效期:{{editForm.effectiveDays}}天</div> <div class="card-extime" v-if="editForm.effectiveType == 1">有效期:{{editForm.effectiveDays}}天</div>
<!-- <div class="card-extime" ng-show="effectiveType == 2 && model.effectiveStartTime">有效期:{{model.effectiveTime}}</div> -->
<!-- <div class="card-extime" ng-show="effective == 2 && effectiveTime">有效期:{{effectiveTime.startDate.format('YYYY-MM-DD')}}-{{effectiveTime.endDate.format('YYYY-MM-DD')}}</div> -->
<div class="card-extime" v-if="editForm.effectiveType == 2">有效期:{{couponTime}}</div> <div class="card-extime" v-if="editForm.effectiveType == 2">有效期:{{couponTime}}</div>
<div class="card-name">{{editForm.couponName}}</div> <div class="card-name">{{editForm.couponName}}</div>
<div class="card-day" v-if="editForm.useType == 0">使用限制:无限定次数</div> <div class="card-day" v-if="editForm.useType == 0">使用限制:无限定次数</div>
...@@ -67,7 +65,7 @@ ...@@ -67,7 +65,7 @@
<div class="card-remark">使用说明:</div> <div class="card-remark">使用说明:</div>
<div class="card-remark">{{editForm.useDescription}}</div> <div class="card-remark">{{editForm.useDescription}}</div>
</div> </div>
</div> </div> -->
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button> <el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button>
<el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button> <el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button>
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<div class="marketing pro-group p-t-20"> <div class="marketing pro-group p-t-20">
<div class="m-b-20"> <div class="m-b-20">
<el-button :size="size" type="primary" class="el-icon-plus" @click="addCashCoupon()">新建代金券</el-button> <el-button :size="size" type="primary" class="el-icon-plus" @click="addCashCoupon()">新建代金券</el-button>
<el-button :size="size" type="primary" class="el-icon-plus" @click="addService()">新建会员服务</el-button> <el-button :size="size" type="primary" class="el-icon-plus" style="margin-left:30px;" @click="addService()">新建会员服务</el-button>
<el-button :size="size" type="primary" class="el-icon-plus" @click="addDiscountCoupon()">新建折扣劵</el-button> <el-button :size="size" type="primary" class="el-icon-plus" style="margin-left:30px;" @click="addDiscountCoupon()">新建折扣劵</el-button>
<el-button :size="size" type="primary" class="el-icon-plus" @click="addExchangeCoupon()">新建兑换券</el-button> <el-button :size="size" type="primary" class="el-icon-plus" style="margin-left:30px;" @click="addExchangeCoupon()">新建兑换券</el-button>
</div> </div>
<div class="container"> <div class="container">
<div> <div>
......
...@@ -46,10 +46,10 @@ ...@@ -46,10 +46,10 @@
<el-form :model="basicForm.condition" label-width="120px"> <el-form :model="basicForm.condition" label-width="120px">
<el-form-item label="性别"> <el-form-item label="性别">
<el-radio-group v-model="basicForm.condition.sex" @change="valueChange"> <el-radio-group v-model="basicForm.condition.sex" @change="valueChange">
<el-radio :label="1">全部</el-radio> <el-radio label>全部</el-radio>
<el-radio :label="2">男性</el-radio> <el-radio :label="1">男性</el-radio>
<el-radio :label="3">女性</el-radio> <el-radio :label="2">女性</el-radio>
<el-radio :label="4">未知性别</el-radio> <el-radio :label="0">未知性别</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="所在群聊"> <el-form-item label="所在群聊">
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
@confirmDialog="handleConfirm" @confirmDialog="handleConfirm"
@closeDialog="membersVisible = !membersVisible" @closeDialog="membersVisible = !membersVisible"
> >
<SelectMembers :selectData="selectData" ref="membersForm"></SelectMembers> <SelectMembers islord="false" :selectData="selectData" ref="membersForm"></SelectMembers>
</glsx-dialog> </glsx-dialog>
</div> </div>
<div <div
...@@ -219,6 +219,7 @@ export default { ...@@ -219,6 +219,7 @@ export default {
} }
} }
const validatorAttachment = (rule, value, callback) => { const validatorAttachment = (rule, value, callback) => {
console.log(this.$refs.welcome.previewList)
const previewList = this.$refs.welcome.previewList const previewList = this.$refs.welcome.previewList
if (previewList.length != 0) { if (previewList.length != 0) {
this.basicForm.attachmentList = previewList this.basicForm.attachmentList = previewList
...@@ -281,7 +282,7 @@ export default { ...@@ -281,7 +282,7 @@ export default {
// 是否有修改筛选成员 // 是否有修改筛选成员
isUpdate: true, isUpdate: true,
tagging: [], tagging: [],
groupNumber: '', groupNumber: 0,
dateOptions: { dateOptions: {
disabledDate(time) { disabledDate(time) {
let now = new Date() let now = new Date()
...@@ -332,17 +333,32 @@ export default { ...@@ -332,17 +333,32 @@ export default {
this.$refs.selectLabel.init() this.$refs.selectLabel.init()
}, },
handleSubmit() { handleSubmit() {
console.log(this.basicForm) console.log(this.basicForm, this.$refs.welcome.previewList)
this.$refs.basicForm.validate(valid => { this.$refs.basicForm.validate(valid => {
if (valid) { if (valid) {
console.log(valid) console.log(valid)
this.$refs.groupForm.validate(v => { this.$refs.groupForm.validate(v => {
if (v) { if (v) {
console.log(v) if (this.basicForm.selectType == 2 && this.groupNumber == 0) {
this.$message({
type: 'error',
message: '选择客户数量为0,不可创建'
})
return
}
const params = this.getSiftMembers() const params = this.getSiftMembers()
params.type = 1 params.type = 1
params.attachmentList = this.basicForm.attachmentList // params.attachmentList = this.basicForm.attachmentList
params.sendType = this.basicForm.sendType params.sendType = this.basicForm.sendType
const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList
const attachmentList = previewList.map(item => {
// const attachmentList = this.$common.utils.deepClone(this.$refs.welcome.previewList).map(item => {
if (item.attType == 1) {
item.attContent = item.attContent.replace('@昵称', '[@昵称]')
}
return item
})
params.attachmentList = attachmentList
// const params = { // const params = {
// type: 1, // type: 1,
// attachmentList: this.basicForm.attachmentList, // attachmentList: this.basicForm.attachmentList,
......
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
@confirmDialog="handleConfirm" @confirmDialog="handleConfirm"
@closeDialog="membersVisible = !membersVisible" @closeDialog="membersVisible = !membersVisible"
> >
<SelectMembers ref="membersForm"></SelectMembers> <SelectMembers ref="membersForm" islord="true"></SelectMembers>
</glsx-dialog> </glsx-dialog>
</div> </div>
</template> </template>
......
<template>
<div class="square-main">
<el-dialog title="选择活动" :visible.sync="dialogVisible" width="70%" :before-close="handleClose">
<div class="model-panel">
<div class="model-panel-tab">
<label>活动类型:</label>
<el-tabs v-model="activeName" @tab-click="handleClick" type="card">
<el-tab-pane label="券营销" name="1"></el-tab-pane>
<el-tab-pane label="权益卡" name="2"></el-tab-pane>
</el-tabs>
</div>
<div class="model-item-panel" v-if="modelList.length > 0" v-loading="loading">
<div
class="model-item"
:class="{ checked: selectItem == item }"
v-for="(item, index) in modelList"
:key="index"
@click="handleSelectItem(item)"
>
<div class="model-item-title" v-show="activeName == 2">{{ item.cardClassName }}</div>
<div class="model-item-title" v-show="activeName == 1">{{ item.couponName }}</div>
<div class="model-item-content" v-show="activeName == 1">数量:{{ item.residueAmount }}</div>
<div class="model-item-content" v-show="activeName == 2">价格:{{ item.price }}</div>
<div
class="model-item-content"
v-show="activeName == 2 && item.effectiveType == 2"
>有效期:{{ item.effectiveNum }}天</div>
<div
class="model-item-content"
v-show="activeName == 2 && item.effectiveType == 1"
>有效期:无限制</div>
<div
class="model-item-content"
v-show="activeName == 1 && item.effectiveType == 2"
>有效期:{{ item.effectiveStartTime }}~{{ item.effectiveEndTime }}</div>
<div
class="model-item-content"
v-show="activeName == 1 && item.effectiveType == 1"
>有效期:{{ item.effectiveDays }}天</div>
<div
class="model-item-content"
v-show="activeName == 1 && item.effectiveType == 3"
>有效期:无限制</div>
<div
class="model-item-content"
v-show="activeName == 1"
>类型:{{ item.discountType == 1 ? '满减劵' : item.discountType == 2 ? '折扣券' : item.discountType == 3 ? '代金券' : item.discountType == 4 ? '实物券' : item.discountType == 5 ? '购车代金券' : item.discountType == 6 ? '商品折扣券' : item.discountType == 7 ? '会员服务' : '' }}</div>
<div class="model-item-content" v-show="activeName == 2">类型:权益卡</div>
</div>
</div>
<div class="model-item-empty" v-else v-loading="loading">
<img src="@/assets/empty.png" />
<div class="empty-item">暂无数据</div>
</div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="tableTotal"
layout="total, sizes, prev, pager, next, jumper"
></el-pagination>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'ActivityModel',
data() {
return {
dialogVisible: false,
loading: false,
activeName: '1',
modelList: [],
pageNum: 1,
pageSize: 10,
tableTotal: 0,
selectItem: {}
}
},
methods: {
handleSelectItem(item) {
this.selectItem = item
},
handleSelect() {
if (!this.selectItem.id) {
this.$message({
type: 'error',
message: '请选择活动'
})
return
}
this.dialogVisible = false
this.$emit('selectActivity', { marketingId: this.selectItem.id, marketingType: this.activeName == 1 ? 2 : 3, marketingName: this.activeName == 2 ? this.selectItem.cardClassName : this.selectItem.couponName })
},
handleSizeChange(val) {
this.pageSize = val
this.getModelList()
},
handleCurrentChange(val) {
this.pageNum = val
this.getModelList()
},
getModelList() {
this.modelList = []
this.loading = true
let market = ''
switch (this.activeName) {
case '1':
market = 'getMerchant'
break
case '2':
market = 'getCard'
break
}
let params = {
pageSize: this.pageSize,
pageNum: this.pageNum
}
this.$apis.customerTransform[market](params).then(res => {
this.modelList = res.list ? res.list : res.data
this.tableTotal = res.total
this.loading = false
})
},
init() {
this.dialogVisible = true
this.getModelList()
this.selectItem = {}
},
handleClick() {
this.getModelList()
}
}
}
</script>
<style lang="scss" scoped>
.model-panel {
.model-panel-tab {
display: flex;
align-items: center;
margin-bottom: 18px;
label {
font-size: 16px;
font-weight: 400;
color: #000000;
line-height: 24px;
}
/deep/ {
.el-checkbox:last-of-type {
margin-right: 8px;
}
.el-tabs__nav {
border: 0;
}
.el-tabs__header {
border: 0;
background-color: #f4f6fc;
margin: 0px;
}
.el-tabs__item {
border: none;
width: 180px;
height: 32px;
line-height: 32px;
margin: 2px;
text-align: center;
}
.el-tabs__item.is-active {
background-color: #fff;
border-radius: 4px;
}
}
}
.model-item-empty {
> img {
display: block;
margin: 50px auto 0px;
width: 60px;
height: auto;
}
.empty-item {
text-align: center;
font-size: 14px;
font-weight: 400;
color: #000000;
line-height: 22px;
margin-bottom: 30px;
}
}
.model-item-panel {
display: grid;
grid-template-columns: repeat(4, 25%);
grid-row-gap: 10px;
height: 40vh;
overflow: auto;
.model-item {
position: relative;
height: 128px;
background: #ffffff;
border-radius: 4px;
border: 2px solid #e6e6e6;
padding: 14px 24px;
box-sizing: border-box;
margin-right: 10px;
&:nth-child(4n) {
margin-right: 0px;
}
&.checked {
border: 2px solid #5850ff;
}
&-qrcode {
position: absolute;
right: 10px;
bottom: 10px;
width: 60px;
height: 60px;
border: 1px solid #979797;
}
&-title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
margin-bottom: 5px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
&-content {
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
margin-top: 6px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -7,11 +7,19 @@ ...@@ -7,11 +7,19 @@
<template v-if="item.attType == 1"> <template v-if="item.attType == 1">
<div class="preview-text text">{{ item.attContent }}</div> <div class="preview-text text">{{ item.attContent }}</div>
</template> </template>
<template v-else-if="item.attType == 4"> <template v-else-if="item.attType == 7">
<div class="preview-text preview-link"> <div class="preview-activity">
<img class="applet-logo" src="@/assets/guestCustom/applet-logo.png" alt />
<div class="activity-name">{{item.attContent.marketingName}}</div>
<img class="activity-logo" src="@/assets/guestCustom/activity-logo.png" alt />
<div class="activity-footer">
<img src="@/assets/guestCustom/applet-footer.png" alt />
</div>
</div>
<!-- <div class="preview-text preview-link">
{{ item.attContent.url }} {{ item.attContent.url }}
<img src="@/assets/guestCustom/preview-link.png" alt /> <img src="@/assets/guestCustom/preview-link.png" alt />
</div> </div>-->
</template> </template>
<template v-else-if="item.attType == 2"> <template v-else-if="item.attType == 2">
<el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image> <el-image style="width: 100px" :src="item.attContent" fit="contain"></el-image>
...@@ -139,6 +147,31 @@ export default { ...@@ -139,6 +147,31 @@ export default {
margin-bottom: 5px; margin-bottom: 5px;
} }
} }
.preview-activity {
width: 160px;
// height: 184px;
background-color: #fff;
border-radius: 4px;
border: 1px solid #dce1e5;
padding: 7px 7px 0;
.activity-name {
font-size: 12px;
color: #333;
margin: 7px 0 4px;
width: 160px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.applet-logo {
width: 95px;
height: 24px;
}
.activity-footer {
margin-top: 4px;
border-top: 1px solid #edeff3;
}
}
} }
} }
} }
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<script> <script>
export default { export default {
name: 'selectEmp', name: 'selectEmp',
props: ['selectData'], props: ['selectData', 'islord'],
data() { data() {
return { return {
treeHeight: 0, treeHeight: 0,
...@@ -69,7 +69,6 @@ export default { ...@@ -69,7 +69,6 @@ export default {
] ]
}, },
tableEmpData: [], tableEmpData: [],
group: {},
currentArr: [], currentArr: [],
loading: true loading: true
} }
...@@ -79,10 +78,14 @@ export default { ...@@ -79,10 +78,14 @@ export default {
this.$emit('selectTable', val) this.$emit('selectTable', val)
}, },
listDepartmentTree() { listDepartmentTree() {
this.$apis.customerTransform.listDepartmentTree({ merchantId: 10001001, addChildrensFlag: true }).then(res => { const params = { merchantId: 10001001, addChildrensFlag: true }
if (this.islord) {
params.islord = this.islord
}
this.$apis.customerTransform.listDepartmentTree(params).then(res => {
this.listTree = res this.listTree = res
this.loading = false this.loading = false
this.listTree[0].entmicroStaffResponses = this.getEmployee(this.listTree) // this.listTree[0].entmicroStaffResponses = this.getEmployee(this.listTree)
console.log(this.listTree) console.log(this.listTree)
this.currentArr = this.$common.utils.deepClone(this.listTree[0].entmicroStaffResponses) this.currentArr = this.$common.utils.deepClone(this.listTree[0].entmicroStaffResponses)
this.selectData.forEach(i => { this.selectData.forEach(i => {
...@@ -145,6 +148,7 @@ export default { ...@@ -145,6 +148,7 @@ export default {
// } // }
}, },
mounted() { mounted() {
console.log('islord', this.islord)
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
this.treeHeight = clientHeight - 650 this.treeHeight = clientHeight - 650
this.listDepartmentTree() this.listDepartmentTree()
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<div class="select-sale-panel"> <div class="select-sale-panel">
<select-emp <select-emp
:selectData="selectData" :selectData="selectData"
@group="handlGroup" :islord="islord"
@selectTable="selectTable" @selectTable="selectTable"
ref="selectEmpTabel" ref="selectEmpTabel"
></select-emp> ></select-emp>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
import selectEmp from './selectEmp.vue' import selectEmp from './selectEmp.vue'
export default { export default {
name: 'SelectMembers', name: 'SelectMembers',
props: ['selectData'], props: ['selectData', 'islord'],
components: { components: {
selectEmp selectEmp
}, },
......
...@@ -17,7 +17,6 @@ export default { ...@@ -17,7 +17,6 @@ export default {
// formatter: `{b}\r \n成交金额:{c}\n \n 订单总数:{d}单` // formatter: `{b}\r \n成交金额:{c}\n \n 订单总数:{d}单`
formatter: function(params) { formatter: function(params) {
var tips = '' var tips = ''
console.log(params)
if (params != null && params.length > 0) { if (params != null && params.length > 0) {
tips += params[0].name + '<br />' tips += params[0].name + '<br />'
for (var i = 0; i < params.length; i++) { for (var i = 0; i < params.length; i++) {
...@@ -71,7 +70,7 @@ export default { ...@@ -71,7 +70,7 @@ export default {
console.log(val) console.log(val)
const xData = val.map(i => i.dataDateStr) const xData = val.map(i => i.dataDateStr)
const yData = val.map(i => i.amount) const yData = val.map(i => i.amount)
this.option.xAxis.data = xData.reverse() this.option.xAxis.data = xData
this.option.series[0].data = yData this.option.series[0].data = yData
this.option.series[0].count = val.map(i => i.count) this.option.series[0].count = val.map(i => i.count)
this.option && this.myChart.setOption(this.option) this.option && this.myChart.setOption(this.option)
......
...@@ -34,7 +34,16 @@ ...@@ -34,7 +34,16 @@
<div class="data-item"> <div class="data-item">
<span class="data-title w-90"> <span class="data-title w-90">
优惠券总数 优惠券总数
<img :src="iconUrl" alt /> <el-popover
placement="top-start"
title="优惠券总数"
width="200"
trigger="hover"
content="营销工具中优惠券类配置的所有类型的券总数量。"
>
<img slot="reference" :src="iconUrl" alt />
</el-popover>
<!-- <img :src="iconUrl" alt /> -->
</span> </span>
<span class="date-content"> <span class="date-content">
<span class="data-num">{{coupon.totalIssue}}</span>张 <span class="data-num">{{coupon.totalIssue}}</span>张
...@@ -43,7 +52,16 @@ ...@@ -43,7 +52,16 @@
<div class="data-item"> <div class="data-item">
<span class="data-title w-90"> <span class="data-title w-90">
发放总数 发放总数
<img :src="iconUrl" alt /> <el-popover
placement="top-start"
title="发放总数"
width="200"
trigger="hover"
content="配置的优惠券中已发放给客户的数量。"
>
<img slot="reference" :src="iconUrl" alt />
</el-popover>
<!-- <img :src="iconUrl" alt /> -->
</span> </span>
<span class="date-content"> <span class="date-content">
<span class="data-num">{{coupon.totalIssue}}</span>张 <span class="data-num">{{coupon.totalIssue}}</span>张
...@@ -52,7 +70,16 @@ ...@@ -52,7 +70,16 @@
<div class="data-item"> <div class="data-item">
<span class="data-title w-90"> <span class="data-title w-90">
核销总数 核销总数
<img :src="iconUrl" alt /> <el-popover
placement="top-start"
title="核销总数"
width="200"
trigger="hover"
content="已发放给客户的券被核销的数量。"
>
<img slot="reference" :src="iconUrl" alt />
</el-popover>
<!-- <img :src="iconUrl" alt /> -->
</span> </span>
<span class="date-content"> <span class="date-content">
<span class="data-num">{{coupon.totalVerification}}</span>张 <span class="data-num">{{coupon.totalVerification}}</span>张
...@@ -105,7 +132,7 @@ ...@@ -105,7 +132,7 @@
<!-- <img :src="iconUrl" alt /> --> <!-- <img :src="iconUrl" alt /> -->
</span> </span>
<span class="date-content"> <span class="date-content">
<span class="data-num">{{merchant.viewAmount}}</span>人 <span class="data-num">{{merchant.viewAmount}}</span>次
</span> </span>
</div> </div>
<div class="data-item"> <div class="data-item">
...@@ -339,21 +366,24 @@ export default { ...@@ -339,21 +366,24 @@ export default {
switch (name) { switch (name) {
case 'week': case 'week':
startTime = new Date(nowYear, nowMonth, nowDay - nowDayOfWeek) startTime = new Date(nowYear, nowMonth, nowDay - nowDayOfWeek)
endTime = new Date(nowYear, nowMonth, nowDay + 6 - nowDayOfWeek) endTime = new Date()
// endTime = new Date(nowYear, nowMonth, nowDay + 6 - nowDayOfWeek)
this.$set(this.date, 0, startTime) this.$set(this.date, 0, startTime)
this.$set(this.date, 1, endTime) this.$set(this.date, 1, endTime)
this.dateChange(this.date) this.dateChange(this.date)
break break
case 'month': case 'month':
startTime = new Date(nowYear, nowMonth, 1) startTime = new Date(nowYear, nowMonth, 1)
endTime = new Date(nowYear, nowMonth + 1, 0) endTime = new Date()
// endTime = new Date(nowYear, nowMonth + 1, 0)
this.$set(this.date, 0, startTime) this.$set(this.date, 0, startTime)
this.$set(this.date, 1, endTime) this.$set(this.date, 1, endTime)
this.dateChange(this.date) this.dateChange(this.date)
break break
case 'year': case 'year':
startTime = new Date(nowYear, 0, 1) startTime = new Date(nowYear, 0, 1)
endTime = new Date(nowYear, 11, 31) endTime = new Date()
// endTime = new Date(nowYear, 11, 31)
this.$set(this.date, 0, startTime) this.$set(this.date, 0, startTime)
this.$set(this.date, 1, endTime) this.$set(this.date, 1, endTime)
this.dateChange(this.date) this.dateChange(this.date)
...@@ -633,6 +663,7 @@ export default { ...@@ -633,6 +663,7 @@ export default {
&-picker { &-picker {
// width: 240px; // width: 240px;
// width: 25%; // width: 25%;
width: calc(100% - 130px);
margin-left: 20px; margin-left: 20px;
} }
&-content { &-content {
......
...@@ -216,7 +216,6 @@ export default { ...@@ -216,7 +216,6 @@ export default {
{ {
label: '开通日期', label: '开通日期',
prop: 'activeTime' prop: 'activeTime'
// addHtml: 'activeTime' // addHtml: 'activeTime'
}, },
{ {
...@@ -240,7 +239,8 @@ export default { ...@@ -240,7 +239,8 @@ export default {
cardName: '', cardName: '',
price: '', price: '',
marketPrice: '', marketPrice: '',
linkUrl: '' linkUrl: '',
tryAble:''
}, },
copyRuleForm: {}, copyRuleForm: {},
rules: { rules: {
...@@ -263,7 +263,7 @@ export default { ...@@ -263,7 +263,7 @@ export default {
created() { created() {
if (window.__POWERED_BY_QIANKUN__) { if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中 //运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId this.merchantId = this.$globalState.session.merchantId
} }
this.getCardContentFun() this.getCardContentFun()
}, },
...@@ -301,11 +301,13 @@ export default { ...@@ -301,11 +301,13 @@ export default {
}, },
getCardContentFun() { getCardContentFun() {
getCardContent({ merchantId: this.merchantId }).then(res => { getCardContent({ merchantId: this.merchantId }).then(res => {
this.ruleForm.equityId = res[0].id this.ruleForm.equityId = res[0].id
this.ruleForm.cardName = res[0].cardClassName this.ruleForm.cardName = res[0].cardClassName
this.ruleForm.price = res[0].price this.ruleForm.price = res[0].price
this.ruleForm.marketPrice = res[0].marketPrice this.ruleForm.marketPrice = res[0].marketPrice
this.ruleForm.linkUrl = res[0].url this.ruleForm.linkUrl = res[0].url
this.ruleForm.tryAble=res[0].tryAble
}) })
}, },
openEditWrap() { openEditWrap() {
...@@ -328,7 +330,7 @@ export default { ...@@ -328,7 +330,7 @@ export default {
params.cardClassName = this.ruleForm.cardName params.cardClassName = this.ruleForm.cardName
params.price = this.ruleForm.price params.price = this.ruleForm.price
params.marketPrice = this.ruleForm.marketPrice params.marketPrice = this.ruleForm.marketPrice
params.tryAble=this.ruleForm.tryAble
updateCardContent(params).then(res => { updateCardContent(params).then(res => {
if (!res) { if (!res) {
return return
......
...@@ -509,8 +509,9 @@ export default { ...@@ -509,8 +509,9 @@ export default {
// flag = false // flag = false
// } // }
if(this.nameToValSpecsList && this.nameToValSpecsList.length > 0){ if(this.nameToValSpecsList && this.nameToValSpecsList.length > 0){
for (var key in this.nameToValSpecsList) { var list = this.nameToValSpecsList
var item = this.nameToValSpecsList[key] for (var key = 0; key < list.length; key++) {
var item = list[key]
if(!item.activityPrice){ if(!item.activityPrice){
this.$message({ this.$message({
message: '有未设置秒杀价的项', message: '有未设置秒杀价的项',
...@@ -532,14 +533,14 @@ export default { ...@@ -532,14 +533,14 @@ export default {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => { this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) { if (valid) {
if(!flag){ if(!flag){
return return false
} }
var params = this.getCouponInfoParams() var params = this.getCouponInfoParams()
console.log(params); console.log(params);
this.$apis.seckillActivity.addOrUpdateActivityApi(params).then(res => { this.$apis.seckillActivity.addOrUpdateActivityApi(params).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : '操作失败', message: res.code == '0' ? '操作成功' : (res.message?res.message:'操作失败'),
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
}) })
if (res.code == '0') { if (res.code == '0') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!