Commit 3f09c39a by chenyu

update: update

parent caa613c6
......@@ -806,6 +806,57 @@
</div>
</template>
<!-- 是否同意隐私协议(新) tag026 -->
<template v-if="parent.templateCode == 'tag026'">
<div class="m-b-20" :key="'tag026' + pindex">
<div>
<label class="inline-block m-r-20 label-unit">渠道<el-tooltip popper-class="edit-tag-tooltip" placement="top" open-delay="100" effect="light">
<div slot="content">若商户对接了微盟,客户除了在达摩侧会员小程序中会进行协议文件的授权,还可能在微盟微商城小程序中进行协议的授权,因此可区分不同渠道进行筛选;</div>
<i class="iconfont icon-tishi m-l-4" style="color: #909399"></i></el-tooltip>
</label><el-radio-group v-model="parent.channel" @change="parent.ids=[]">
<el-radio :label="0">达摩</el-radio>
<el-radio :label="1">微盟</el-radio>
</el-radio-group>
</div>
<div class="m-t-18" v-if="parent.channel===0">
<label class="inline-block m-r-20 label-unit">状态<el-tooltip popper-class="edit-tag-tooltip" placement="top" open-delay="100" effect="light">
<div slot="content">同意:同意授权协议;<br/>未同意:未授权/拒绝/取消授权协议;</div>
<i class="iconfont icon-tishi m-l-4" style="color: #909399"></i></el-tooltip>
</label><el-radio-group v-model="parent.isAgree" @change="parent.ids=[]">
<el-radio :label="1">同意</el-radio>
<el-radio :label="0">未同意</el-radio>
</el-radio-group>
</div>
<div class="m-t-18" v-if="parent.channel===1">
<label class="inline-block m-r-20 label-unit">事由<el-tooltip popper-class="edit-tag-tooltip" placement="top" open-delay="100" effect="light">
<div slot="content">商户在微盟侧可以配置在用户“访问”微商城小程序或进行“登录”时,要求同意协议,因此客户在微盟侧同意隐私协议的来源可能不同,您可基于您在微盟侧的协议配置情况来进行筛选。比如在微盟侧将“隐私协议”配置在了“访问”场景下,那么在筛选客户同意协议情况时就筛选“访问”来源下的授权情况;</div>
<i class="iconfont icon-tishi m-l-4" style="color: #909399"></i></el-tooltip>
</label><el-radio-group v-model="parent.event" @change="parent.ids=[]">
<el-radio :label="0">访问</el-radio>
<el-radio :label="1">登录</el-radio>
</el-radio-group>
</div>
<div class="m-t-18" v-if="(parent.channel===0&&parent.isAgree===1)||(parent.channel===1)">
<label class="inline-block m-r-20 label-unit">时间<el-tooltip popper-class="edit-tag-tooltip" placement="top" open-delay="100" effect="light">
<div slot="content">可根据客户最新一次同意协议的时间来筛选符合条件的客户。由于协议可能存在更新,客户同意协议的版本可能不一,建议根据“后台最新一次上传协议文件的时间至当前时间”来筛选出同意了最新版协议的客户;</div>
<i class="iconfont icon-tishi m-l-4" style="color: #909399"></i></el-tooltip></label>
<el-date-picker v-model="parent.date" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="选择日期"></el-date-picker><span class="m-l-16">&nbsp;&nbsp;当前时间</span>
<el-popover placement="bottom" width="600" trigger="click" :open-delay="200">
<el-table :data="parent.options" max-height="400">
<el-table-column min-width="150" property="agreementName" label="协议名称"></el-table-column>
<el-table-column width="100" property="agreementType" label="协议类型">
<template slot-scope="{row}">{{row.agreementType|agreementTypeFilter}}</template>
</el-table-column>
<el-table-column width="200" property="createTime" label="上传时间">
<template slot-scope="{row}">{{row.createTime|formatDate}}</template>
</el-table-column>
</el-table>
<el-button slot="reference" type="text" class="m-l-16">查看上传记录</el-button>
</el-popover>
</div>
</div>
</template>
<!-- 会员标签嵌入卡券选择器 com024 -->
<!-- v-if="parent.templateCode == 'com024'" -->
<div v-if="parent.templateCode == 'com024'" style="min-height: 100px">
......@@ -1117,6 +1168,13 @@ export default {
ids: [],
options: []
},
tag026: {
channel: 0, // 渠道 0达摩 1微盟
isAgree: 1, // 状态 0未同意 1同意
event: 0, // 事由 0访问 1登录
date: null,
options: []
},
cardListData: [],
com024: {},
com025: {},
......@@ -1270,7 +1328,6 @@ export default {
if (this.currentComputeType === 1) {
this.postCompute = templateVal.compute.compute;
}
// 门店
if (!!templateVal.valWidgetId) {
await this.getTemplateCodeById(templateVal.valWidgetId);
......@@ -1313,8 +1370,8 @@ export default {
this.getcityData();
}
// 隐私协议
if (data.templateCode === 'tag025') {
this.getPrivacyGgreement();
if (['tag025','tag026'].includes(data.templateCode)) {
this.getPrivacyGgreement(data.templateCode);
}
// 如果是给了 计算属性值
if (!!this.postCompute) {
......@@ -1451,13 +1508,13 @@ export default {
/**
* 隐私协议列表
*/
getPrivacyGgreement() {
getPrivacyGgreement(templateCode) {
const para = { requestProject: 'member-tag',agreementType: 1 };
this.axios
.post(`${this.baseUrl}/api-admin/list-service-privacy-agreement`, qs.stringify(para))
.then(res => {
if (res.data.errorCode === 0) {
this.tag025.options = [].concat(res.data.result||[]);
this[templateCode].options = [].concat(res.data.result||[]);
}
})
.catch(err => {
......@@ -2086,7 +2143,14 @@ export default {
},
formatDate(date) {
return moment(date).format('YYYY-MM-DD hh:mm:ss');
}
},
agreementTypeFilter(v) {
switch (v) {
case 1:return '隐私协议';break;
case 2:return '服务协议';break;
default:return '';break;
}
},
}
};
</script>
......
......@@ -466,6 +466,30 @@ export default {
tagValue.val[0].data.compute = that.templateData[0].ids.length?'in':'=';
tagValue.val[0].data.value = that.templateData[0].ids.length?that.templateData[0].ids.join(' '):that.templateData[0].isAgree;
}
if (code === 'tag026' && that.templateData.length === 1) {
if (!that.templateData[0].date) {
if ((!that.templateData[0].channel&&that.templateData[0].isAgree)||that.templateData[0].channel) {
that.$message.error({ message: '请选择开始时间' });
return false
}
}
// 渠道 0达摩 1微盟
if (that.templateData[0].channel) {
tagValue.val[0].data.key=that.templateData[0].event?'wemobLoginConsentProtocolTime':'wemobVisitConsentProtocolTime'
tagValue.val[0].data.compute='>'
tagValue.val[0].data.value=new Date(that.templateData[0].date).getTime()
that.postTemplateData.selectedVal=['微盟',that.templateData[0].event?'登录':'访问',that.templateData[0].date]
}else{
tagValue.val[0].data.key='consentPrivacyProtocolTime'
tagValue.val[0].data.compute=that.templateData[0].isAgree?'>':'!'
if (that.templateData[0].isAgree) {
tagValue.val[0].data.value=new Date(that.templateData[0].date).getTime()
that.postTemplateData.selectedVal=['达摩','同意',that.templateData[0].date]
}else{
that.postTemplateData.selectedVal=['达摩','未同意']
}
}
}
/**
* 商品选择必选
*/
......
......@@ -11,7 +11,7 @@
<p class="tag-desc">{{ tagDataAssgin.tagDescribe }}</p>
</div>
<p v-if="tagId" class="m-t-20 m-b-20 tag-config">标签值设置<el-tooltip v-if="tagDataAssgin.columnKey==='haobanWechatRelatedTime'||(Object.keys(tagDataAssgin).length&&tagDataAssgin.tagValue&&JSON.parse(tagDataAssgin.tagValue).val[0].data.key==='haobanWechatRelatedTime')" popper-class="edit-tag-tooltip" placement="top" open-delay="100" effect="light"
><div slot="content"><span style="font-weight:600">固定时段:</span>在所选时间段内首次添加导购企微好友的;<br/><span style="font-weight:600">相对时段:</span>相对于“标签统计时间”(每天凌晨计算统计一次)的前X天/月/年内首次添加导购企微好友的,例:选择相对时段为“最近2天”,那么系统在5号凌晨进行统计时,统计的是在3号、4号首次添加导购企微好友的顾客;系统在6号凌晨统计时,统计的是4号、5号首次添加导购企微好友的顾客。</div><i class="iconfont icon-tishi"></i></el-tooltip></p>
><div slot="content"><span style="font-weight:600">固定时段:</span>在所选时间段内与关联了好办导购账号的企微员工成为好友的;<br/><span style="font-weight:600">相对时段:</span>在“标签统计时间”(每天凌晨计算统计一次)的前X天/月/年与某员工成为好友的。例:选择相对时段为“最近2天”,那么系统在5号凌晨进行统计时,统计的是在3号、4号与某员工成为企微好友的用户;系统在6号凌晨统计时,统计的是在4号、5号与某员工成为企微好友的客户;</div><i class="iconfont icon-tishi"></i></el-tooltip></p>
<!-- 所有标签的配置项 -->
<div class="tag-config-options">
<tag-config-options v-if="isAddFlag" :creatorId="creatorId" :tagId="tagDataAssgin.tagId" :columnKey="tagDataAssgin.columnKey" ref="tagConfig" :templateDataList="templateObj" @returnTagData="returnTagData"></tag-config-options>
......
......@@ -161,7 +161,8 @@ import Trash from '@/components/Trash.vue';
import { parseTime } from '@/utils'
Vue.component(CollapseTransition.name, CollapseTransition);
const fixBeginTime = +new Date() + (1000 * 60 * 60 * 24);
let fixBeginTime = +new Date() + (1000 * 60 * 60 * 24);
let fixEndTime = +new Date() + (1000 * 3600 * 24 * 91);
export default {
......@@ -197,7 +198,7 @@ export default {
effectiveStatus: 1, // 有效状态nage
fixedType: 0, // 是否固化人群
fixedTime: parseTime(fixBeginTime, '{y}-{m}-{d}'), // 期初固化时间
fixedEndTime: parseTime(fixBeginTime + 2 * 365 * 24 * 3600 * 1000, '{y}-{m}-{d}'), // 期末固化时间
fixedEndTime: parseTime(fixEndTime, '{y}-{m}-{d}'), // 期末固化时间
},
activeTagsGroupIndex: 0,
activeTagIndex: 0,
......@@ -207,8 +208,8 @@ export default {
pickerOptions: {
disabledDate(time) {
let curDate = new Date().getTime();
let oneYear = 2 * 365 * 24 * 3600 * 1000;
let y = curDate + oneYear;
let twoYears = 2 * 365 * 24 * 3600 * 1000;
let y = curDate + twoYears;
return time.getTime() < Date.now() - 8.64e7 || time.getTime() > y;
}
},
......@@ -216,7 +217,7 @@ export default {
disabledDate(date) {
let beginDate = parseTime(fixBeginTime, '{y}-{m}-{d}');
beginDate = `${beginDate} 00:00:00`
return new Date(date) < new Date(beginDate);
return new Date(date) < new Date(beginDate)||new Date(date) > new Date(fixEndTime);
}
},
// 面包屑参数
......@@ -227,11 +228,11 @@ export default {
relocation: true
},
{
name: '会员管理',
name: '客户管理',
path: ''
},
{
name: '会员标签',
name: '客户标签',
path: ''
}
],
......@@ -310,7 +311,15 @@ export default {
isSync: false // 是否开启自动同步开关
};
},
watch: {
tagConfig: {
deep: true,
handler: function(n,o){
fixEndTime=+new Date(n.date) + (1000 * 60 * 60 * 24)
this.tagConfig.fixedEndTime=parseTime(fixEndTime)
}
}
},
computed: {
groupListNumber() {
let listNumber = 0;
......@@ -342,7 +351,7 @@ export default {
},
// 设置默认的分组有效期
defaultDate() {
let date = new Date(new Date().getTime() + 2 * 365 * 24 * 3600 * 1000);
let date = new Date(new Date().getTime() + 90 * 24 * 3600 * 1000);
let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
......
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