Commit 592b795b by 杨明

fixed

1 parent a96411a2
...@@ -8,23 +8,23 @@ ...@@ -8,23 +8,23 @@
<el-input size="small" v-model.trim="addForm.configName" placeholder="请输入活动名称" maxlength="20"></el-input> <el-input size="small" v-model.trim="addForm.configName" placeholder="请输入活动名称" maxlength="20"></el-input>
<div class="activity-name-tips">例:输入“定保客户”,系统推送任务时将自动追加月份信息“5月招揽-定保客户”</div> <div class="activity-name-tips">例:输入“定保客户”,系统推送任务时将自动追加月份信息“5月招揽-定保客户”</div>
</el-form-item> </el-form-item>
<el-form-item label="推送日期" prop="sendDate" size="small"> <el-form-item label="推送日期" prop="sendDate" size="small" class="activity-item">
<div class="activity-date"> <div class="activity-date">
每月 每月
<el-input-number v-model="addForm.sendDate" controls-position="right" :min="1" :max="28"></el-input-number> <el-input-number v-model="addForm.sendDate" controls-position="right" :min="1" :max="28"></el-input-number>
号 号
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="推送月份" prop="sendMonth" size="small"> <el-form-item label="推送月份" prop="sendMonth" size="small" class="activity-item">
<el-radio-group v-model="addForm.sendMonth"> <el-radio-group v-model="addForm.sendMonth">
<el-radio :label="1">次月</el-radio> <el-radio :label="1">次月</el-radio>
<el-radio :label="0">当月</el-radio> <el-radio :label="0">当月</el-radio>
</el-radio-group> </el-radio-group>
<div class="activity-name-tips">例:选择“次月”,系统将在设定的推送日期推送次月的待定保客户</div> <div class="activity-name-tips">例:选择“次月”,系统将在设定的推送日期推送次月的待定保客户</div>
</el-form-item> </el-form-item>
<el-form-item label="状态" size="small"> <el-form-item label="状态" size="small" class="activity-status">
<el-switch v-model="activityStatus"></el-switch> <el-switch v-model="activityStatus"></el-switch>
{{ activityStatus ? '启用' : '停用' }} <span class="activity-stop">{{ activityStatus ? '启用' : '停用' }}</span>
<el-popover placement="top" width="300" trigger="hover" content="停用活动仅会影响下个周期的营销推送,不影响已经生成的招揽活动。"> <el-popover placement="top" width="300" trigger="hover" content="停用活动仅会影响下个周期的营销推送,不影响已经生成的招揽活动。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" /> <img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover> </el-popover>
...@@ -39,9 +39,15 @@ ...@@ -39,9 +39,15 @@
</el-form-item> </el-form-item>
<el-form-item label="配置营销" prop="name" size="small" v-if="addForm.custGroupId"> <el-form-item label="配置营销" prop="name" size="small" v-if="addForm.custGroupId">
<GLTable :hasPage="false" ref="config" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams"> <GLTable :hasPage="false" ref="config" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams">
<template slot="welcomeConfigDTOS" slot-scope="scope">
<div class="statusText">
<span :class="{ circleStatusGray: scope.scope.welcomeDTOS.length == 0, circleStatusGreen: scope.scope.welcomeDTOS.length == 1 }"></span>
<span>{{ statusText(scope.scope.welcomeDTOS) }}</span>
</div>
</template>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleConfig(scope.scope)">配置</el-button> <el-button type="text" @click="handleConfig(scope.scope)"><div class="config">配置</div></el-button>
<el-button type="text" @click="handleReset(scope.scope)">重置</el-button> <el-button type="text" @click="handleReset(scope.scope)" v-if="scope.scope.welcomeDTOS && scope.scope.welcomeDTOS.length"><div class="config">重置</div></el-button>
</div> </div>
</GLTable> </GLTable>
<div class="activity-name-tips"> <div class="activity-name-tips">
...@@ -127,6 +133,7 @@ export default { ...@@ -127,6 +133,7 @@ export default {
{ {
label: '状态', label: '状态',
prop: 'welcomeConfigDTOS', prop: 'welcomeConfigDTOS',
addHtml: 'welcomeConfigDTOS',
formatter: cellValue => { formatter: cellValue => {
return cellValue.welcomeDTOS && cellValue.welcomeDTOS.length ? '已配置' : '未配置' return cellValue.welcomeDTOS && cellValue.welcomeDTOS.length ? '已配置' : '未配置'
} }
...@@ -165,8 +172,11 @@ export default { ...@@ -165,8 +172,11 @@ export default {
} }
}, },
methods: { methods: {
statusText(text) {
return text && text.length ? '已配置' : '未配置'
},
handleReset(scope) { handleReset(scope) {
this.tableIndex = this.tableData.findIndex(item => item.crowdId == scope.crowdId) this.tableIndex = this.tableData.findIndex(item => item.groupId == scope.groupId)
this.dialogVisible = true this.dialogVisible = true
}, },
//配置 //配置
...@@ -279,13 +289,29 @@ export default { ...@@ -279,13 +289,29 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.statusText {
> span:first-child {
width: 6px;
height: 6px;
border-radius: 50%;
display: inline-block;
vertical-align: middle;
margin-right: 8px;
&.circleStatusGreen {
background: #2cca74;
}
&.circleStatusGray {
background: #c6c6c6;
}
}
}
.activity-box-f { .activity-box-f {
background: #ffffff; background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1); box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
margin-bottom: 60px; margin-bottom: 60px;
.activity-box-title { .activity-box-title {
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 600;
color: #333333; color: #333333;
line-height: 54px; line-height: 54px;
padding-left: 24px; padding-left: 24px;
...@@ -294,6 +320,19 @@ export default { ...@@ -294,6 +320,19 @@ export default {
.activity-box-form { .activity-box-form {
width: 60%; width: 60%;
padding-top: 30px; padding-top: 30px;
.activity-item {
/deep/ {
.el-radio {
margin-right: 24px;
}
.el-input-number--small {
width: 104px;
}
}
}
.activity-stop {
margin: 0px 8px;
}
.group-item { .group-item {
display: flex; display: flex;
.edit-group { .edit-group {
...@@ -302,6 +341,14 @@ export default { ...@@ -302,6 +341,14 @@ export default {
margin-left: 15px; margin-left: 15px;
} }
} }
.activity-status {
/deep/ {
.el-form-item__content {
display: flex;
align-items: center;
}
}
}
.count-item-question { .count-item-question {
width: 14px; width: 14px;
height: 14px; height: 14px;
...@@ -309,10 +356,10 @@ export default { ...@@ -309,10 +356,10 @@ export default {
} }
.activity-name-tips { .activity-name-tips {
font-size: 14px; font-size: 14px;
line-height: 14px;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
line-height: 22px; margin: 8px 0px;
margin: 10px 0px;
a { a {
color: #5850ff; color: #5850ff;
cursor: pointer; cursor: pointer;
......
...@@ -330,7 +330,7 @@ export default { ...@@ -330,7 +330,7 @@ export default {
align-items: center; align-items: center;
> label { > label {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 500;
color: #333333; color: #333333;
} }
} }
...@@ -338,7 +338,7 @@ export default { ...@@ -338,7 +338,7 @@ export default {
display: flex; display: flex;
.member-title { .member-title {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 500;
line-height: 22px; line-height: 22px;
margin-bottom: 6px; margin-bottom: 6px;
span { span {
...@@ -375,7 +375,7 @@ export default { ...@@ -375,7 +375,7 @@ export default {
font-size: 14px; font-size: 14px;
color: #333; color: #333;
line-height: 20px; line-height: 20px;
padding: 18px; padding: 17px;
border: 1px solid #eee; border: 1px solid #eee;
} }
} }
...@@ -395,7 +395,7 @@ export default { ...@@ -395,7 +395,7 @@ export default {
line-height: 32px; line-height: 32px;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1); transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 100%; width: 100%;
height: calc(100% - 186px); height: calc(100% - 115px);
display: flex; display: flex;
align-items: center; align-items: center;
overflow: auto; overflow: auto;
......
...@@ -318,7 +318,6 @@ export default { ...@@ -318,7 +318,6 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
// 给标签默认样式,不可scoped
.w-textarea { .w-textarea {
wise { wise {
border-radius: 2px; border-radius: 2px;
...@@ -356,11 +355,9 @@ $textColor: #666; ...@@ -356,11 +355,9 @@ $textColor: #666;
box-sizing: border-box; box-sizing: border-box;
// border-radius: 4px; // border-radius: 4px;
border: 1px solid $borderColor; border: 1px solid $borderColor;
overflow: hidden; min-height: 400px;
min-height: 200px;
// margin-bottom: 15px;
overflow: hidden;
position: relative; position: relative;
overflow-y: auto;
&_input { &_input {
width: 100%; width: 100%;
height: 200px; height: 200px;
......
...@@ -332,7 +332,7 @@ export default { ...@@ -332,7 +332,7 @@ export default {
this.textInput(str) this.textInput(str)
}, 300), }, 300),
updateList(val) { updateList(val) {
this.previewList = val this.previewList = this.$common.utils.deepClone(val)
// this.eventBus.$emit('update', this.previewList) // this.eventBus.$emit('update', this.previewList)
const obj = val.find(item => item.attType == 1) const obj = val.find(item => item.attType == 1)
if (obj) { if (obj) {
...@@ -371,7 +371,7 @@ export default { ...@@ -371,7 +371,7 @@ export default {
} }
} }
.content-bg { .content-bg {
background-color: #f7f7f7; // background-color: #f7f7f7;
} }
.content { .content {
display: inline-block; display: inline-block;
...@@ -414,7 +414,7 @@ export default { ...@@ -414,7 +414,7 @@ export default {
} }
} }
.btn-group { .btn-group {
padding: 6px 0 6px 20px; padding: 12px 0 12px 20px;
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
border-top: 0; border-top: 0;
.add-btn { .add-btn {
......
...@@ -279,7 +279,7 @@ export default { ...@@ -279,7 +279,7 @@ export default {
}, },
//分配任务 //分配任务
handleDistribution() { handleDistribution() {
if (this.customerIds.length == 0) { if (!this.customerIds.length == 0) {
this.$message({ this.$message({
showClose: true, showClose: true,
duration: 3000, duration: 3000,
...@@ -356,11 +356,6 @@ export default { ...@@ -356,11 +356,6 @@ export default {
resetTable() { resetTable() {
this.searchForm = {} this.searchForm = {}
this.$refs.customForm.refreshTable() this.$refs.customForm.refreshTable()
// 点击之后强制页面刷新
// this.reload()
// this.$forceUpdate() // 没用
// this.$router.go(0)//没有预期效果,会出现一段空白页,用户体验不好
// location.reload() //没有预期效果,会出现一段空白页,用户体验不好
}, },
goDetail(scope) { goDetail(scope) {
this.$history.push('/custom/clientManage/clientDetail?id=' + scope.nickNameList[0].oneId) this.$history.push('/custom/clientManage/clientDetail?id=' + scope.nickNameList[0].oneId)
......
...@@ -132,7 +132,7 @@ export default { ...@@ -132,7 +132,7 @@ export default {
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
if (this.tableSearchForm.createTime) { if (this.tableSearchForm.createTime) {
this.tableSearchForm.beginTime = new Date(this.tableSearchForm.createTime[0]).toLocaleDateString().replace(/-/g, '/') this.tableSearchForm.startTime = new Date(this.tableSearchForm.createTime[0]).toLocaleDateString().replace(/-/g, '/')
this.tableSearchForm.endTime = new Date(this.tableSearchForm.createTime[1]).toLocaleDateString().replace(/-/g, '/') this.tableSearchForm.endTime = new Date(this.tableSearchForm.createTime[1]).toLocaleDateString().replace(/-/g, '/')
} }
delete this.tableSearchForm.createTime delete this.tableSearchForm.createTime
......
<template> <template>
<div class="activity-main"> <div class="activity-main">
<div class="activity-main-header"> <div class="activity-main-header">
<collect-button> <el-button data-title="新增营销" type="primary" size="small" @click="handleAdd()" fn="新增营销">
<el-button data-title="新增营销" type="primary" size="small" @click="handleAdd()" fn="新增营销"> <i class="el-icon-plus"></i>
<i class="el-icon-plus"></i> 创建活动
创建活动 </el-button>
</el-button> <label>统一配制招揽活动,设置人群范围及人群对应企微营销的内容。</label>
</collect-button>
<collect-button dataAnalyics="{page:1}">
<label>配置门店轻改专家,形成业务活码,客户可通过「精品升级」订单扫码来添加该员工。</label>
</collect-button>
</div> </div>
<div class="activity-tabel scrm-box-f"> <div class="activity-tabel scrm-box-f">
<div class="activity-tabel-form"> <div class="activity-tabel-form">
...@@ -100,8 +96,7 @@ export default { ...@@ -100,8 +96,7 @@ export default {
}, },
{ {
label: '推送日期', label: '推送日期',
prop: 'sendDate', prop: 'sendDate'
width: '180px'
}, },
{ {
label: '创建人', label: '创建人',
...@@ -110,12 +105,13 @@ export default { ...@@ -110,12 +105,13 @@ export default {
{ {
label: '创建日期', label: '创建日期',
prop: 'createdTime', prop: 'createdTime',
width: '220px' width: '180px'
}, },
{ {
label: '状态', label: '状态',
prop: 'status', prop: 'status',
addHtml: 'status' addHtml: 'status',
width: '140px'
}, },
{ {
label: '操作', label: '操作',
...@@ -156,7 +152,7 @@ export default { ...@@ -156,7 +152,7 @@ export default {
}) })
}, },
handleAdd(scope) { handleAdd(scope) {
let editParams = scope ? '?id=' + scope.id : '' let editParams = scope ? '?$title=编辑活动&id=' + scope.id : ''
this.$router.push('/activity/addActivity' + editParams) this.$router.push('/activity/addActivity' + editParams)
}, },
changeSwitch(scope) { changeSwitch(scope) {
...@@ -178,20 +174,20 @@ export default { ...@@ -178,20 +174,20 @@ export default {
const tableSearchArr = Object.values(this.tableSearchForm).find(item => item) const tableSearchArr = Object.values(this.tableSearchForm).find(item => item)
let cloneNode, let cloneNode,
nodata = document.querySelector('.nodata-panel') nodata = document.querySelector('.nodata-panel')
if (tableSearchArr) { this.$nextTick(() => {
nodata.setAttribute('style', 'display:none') if (tableSearchArr) {
cloneNode = '暂无数据' nodata.setAttribute('style', 'display:none')
document.querySelector('.noDataText').innerHTML = '' cloneNode = '暂无数据'
document.querySelector('.noDataText').append(nodata) document.querySelector('.noDataText').innerHTML = ''
// document.querySelector('.noDataText').innerHTML += cloneNode document.querySelector('.noDataText').append(nodata)
} else { } else {
nodata.setAttribute('style', 'display:block') nodata.setAttribute('style', 'display:block')
document.querySelector('.noDataText').innerHTML = '' document.querySelector('.noDataText').innerHTML = ''
cloneNode = nodata cloneNode = nodata
} }
document.querySelector('.noDataText').append(cloneNode)
document.querySelector('.noDataText').append(cloneNode) this.$refs.taskForm.setTableHeightFun()
this.$refs.taskForm.setTableHeightFun() })
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!