Commit 98e13090 by liuchenxi

update: 会员分组

parent b99d52ad
......@@ -7,7 +7,7 @@
<span :title="list.classifyName" v-show="!list.edit">{{ list.classifyName }}</span>
<span style="vertical-align: top">({{ list.groupNum }})</span>
</div>
<el-popover placement="bottom" trigger="click">
<el-popover placement="bottom" trigger="click" v-if="operatorName(list)">
<p class="more" :limit-code="$buttonCode.memberTagEditCateGory" v-if="$getButtonLimit($buttonCode.memberTagEditCateGory)" @click="editGroupName(list, 0)">编辑分类</p>
<p class="more" :limit-code="$buttonCode.memberTagDelCateGory" v-if="$getButtonLimit($buttonCode.memberTagDelCateGory)" @click="deleteGroupName(list, 0)">删除分类</p>
<i slot="reference" class="iconfont icon-gengduo icon"></i>
......@@ -31,7 +31,7 @@
<span class="name-txt" :title="list.classifyName" v-show="!list.edit">{{ list.classifyName }}</span>
<span style="vertical-align: top">({{ list.groupNum }})</span>
</div>
<el-popover placement="bottom" trigger="click">
<el-popover placement="bottom" trigger="click" v-if="operatorName(list)">
<p class="more" :limit-code="$buttonCode.memberTagEditCateGory" v-if="$getButtonLimit($buttonCode.memberTagEditCateGory)" @click="editGroupName(list, 1)">编辑分类</p>
<p class="more" :limit-code="$buttonCode.memberTagDelCateGory" v-if="$getButtonLimit($buttonCode.memberTagDelCateGory)" @click="deleteGroupName(list, 1)">删除分类</p>
<i slot="reference" class="iconfont icon-gengduo icon"></i>
......@@ -262,11 +262,11 @@ export default {
operatorName(list) {
if (list.memberTagGroupClassifyId == '0' || list.memberTagGroupClassifyId == '1') {
this.$message({
message: `${list.classifyName}的不能操作`,
type: 'warning',
duration: 2000
});
// this.$message({
// message: `${list.classifyName}的不能操作`,
// type: 'warning',
// duration: 2000
// });
return false;
}
return true;
......@@ -386,6 +386,15 @@ export default {
}
}
},
activated() {
switch(this.activeType) {
case '2':
this.getFixedMemberGroupList();
break;
default:
break;
}
},
beforeMount() {
this.getMemberGroupList();
this.getFixedMemberGroupList();
......
......@@ -52,6 +52,7 @@
<el-form-item
label
prop="effectiveDateTmp"
v-if="!ruleForm.isActive"
>
<div class="effective label-title">
分组有效期至
......@@ -90,7 +91,7 @@
</el-form-item>
<el-form-item label prop="fixedTime" v-if="ruleForm.fixedType">
<div class="label-title">固化生效时间</div>
<el-date-picker :clearable="false" :picker-options="fixedTimeOptions" v-model="ruleForm.fixedTime" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%"></el-date-picker>
<el-date-picker :clearable="false" :picker-options="ruleForm.isActive ? realTimeOptions : fixedTimeOptions" v-model="ruleForm.fixedTime" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%"></el-date-picker>
</el-form-item>
<el-form-item label prop="isTogether" v-if="ruleForm.fixedType">
<div class="label-title m-b-15">是否同时生成非固化分组</div>
......@@ -324,6 +325,12 @@ export default {
return date.getTime() < begin || date.getTime() > end ;
}
},
realTimeOptions: {
disabledDate: date => {
const oneDay = 24 * 60 * 60 * 1000
return date.getTime() < +new Date() - oneDay || date.getTime() > +new Date() + oneDay
}
},
// 会员分组分类
memberGroupList: {},
// 表单验证规则
......@@ -542,7 +549,7 @@ export default {
this.$message.error({ message: '请至少保留一个标签!' });
return false;
}
if (fixedType && new Date(fixedTime).setHours(0,0,0,0) > new Date(effectiveDateTmp).setHours(0,0,0,0)) {
if (!this.ruleForm.isActive && fixedType && new Date(fixedTime).setHours(0,0,0,0) > new Date(effectiveDateTmp).setHours(0,0,0,0)) {
this.$message.error({ message: '固化生效时间不能晚于分组有效期' });
return false;
}
......
......@@ -127,7 +127,8 @@
</el-table-column>
<el-table-column prop="effectiveDate" min-width="100" label="到期时间">
<template slot-scope="scope">
<p class="h-18">{{ scope.row.effectiveDate | formatTimeYMD }}</p>
<p v-if="!scope.row.effectiveStatus" class="h-18">{{ scope.row.effectiveDate | formatTimeYMD }}</p>
<p v-else class="h-18">--</p>
</template>
</el-table-column>
<el-table-column label="创建人" prop="createUserName" min-width="110" v-if="[2,3].includes($store.state.departAuth) || $store.state.isSuperAdmin">
......@@ -305,8 +306,11 @@
</el-table-column>
<el-table-column prop="recentUpdateDate" min-width="100" label="到期时间">
<template slot-scope="scope">
<p class="h-18">{{ scope.row.effectiveDate | formatTimeYMD }}</p>
<p class="h-18">{{ scope.row.effectiveDate | formatTimeHMS }}</p>
<template v-if="!scope.row.effectiveStatus">
<p class="h-18">{{ scope.row.effectiveDate | formatTimeYMD }}</p>
<p class="h-18">{{ scope.row.effectiveDate | formatTimeHMS }}</p>
</template>
<template v-else>--</template>
</template>
</el-table-column>
......
......@@ -402,9 +402,9 @@ export default {
*/
getTagValueDtoList() {
let that = this;
let memberTagGradeId = that.$route.query.memberTagGradeId;
let memberTagGroupId = that.$route.query.memberTagGroupId;
let params = {
memberTagGradeId
memberTagGroupId
};
getRequest('/member-tag-group/findOneDetial.json', params)
.then(res => {
......
......@@ -114,7 +114,7 @@
<label for="">分组名称</label>
<el-input v-model="tagConfig.groupName" :maxlength="10" placeholder="请输入分组名称" show-word-limit></el-input>
</div>
<div class="form-item">
<div class="form-item" v-show="!tagConfig.isRealTime">
<label for="">
分组有效期至
<el-tooltip content="分组有效期需早于所用标签的最早有效期,且最长不超过730天">
......@@ -149,7 +149,7 @@
<label for="">固化生效时间</label>
<el-date-picker
:clearable="false"
:picker-options="fixedTimeOptions"
:picker-options="tagConfig.isRealTime ? realTimeOptions : fixedTimeOptions"
v-model="tagConfig.fixedTime"
value-format="yyyy-MM-dd"
placeholder="选择日期"
......@@ -279,6 +279,12 @@ export default {
return date.getTime() < begin || date.getTime() > end ;
}
},
realTimeOptions: {
disabledDate: date => {
const oneDay = 24 * 60 * 60 * 1000
return date.getTime() < +new Date() - oneDay || date.getTime() > +new Date() + oneDay
}
},
// 面包屑参数
navpath: [
{
......@@ -477,7 +483,7 @@ export default {
// return;
// }
if (param.fixedType && new Date(this.tagConfig.fixedTime).setHours(0,0,0,0) > new Date(this.tagConfig.date).setHours(0,0,0,0)) {
if (!this.tagConfig.isRealTime && param.fixedType && new Date(this.tagConfig.fixedTime).setHours(0,0,0,0) > new Date(this.tagConfig.date).setHours(0,0,0,0)) {
this.$message.error({ message: '固化生效时间不能晚于分组有效期' });
return 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