Commit 81e21776 by yangming

new

1 parent 75796436
...@@ -139,6 +139,27 @@ const updateChannelCode = params => { ...@@ -139,6 +139,27 @@ const updateChannelCode = params => {
sign: true sign: true
}) })
} }
const getCustomer = params => {
params.method = 'entmicro.api.customer.page'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const getChannelCodeStaffList = params => {
params.method = 'entmicro.api.code.getChannelCodeStaffList'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
getListApi, getListApi,
getFollower, getFollower,
...@@ -152,5 +173,7 @@ export default { ...@@ -152,5 +173,7 @@ export default {
detailChannelCode, detailChannelCode,
deleteChannelCode, deleteChannelCode,
updateChannelCodeBill, updateChannelCodeBill,
listChannelCodeBill listChannelCodeBill,
getCustomer,
getChannelCodeStaffList
} }
\ No newline at end of file \ No newline at end of file
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
<script> <script>
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
import util from '@/utils/util'
export default { export default {
name: 'selectEmp', name: 'selectEmp',
data() { data() {
...@@ -60,7 +61,7 @@ export default { ...@@ -60,7 +61,7 @@ export default {
}, },
methods: { methods: {
jumpUrl() { jumpUrl() {
this.$history.push('/home/followUp/index') util.openUrl(location.origin + '/home/followUp/index')
}, },
getFollower() { getFollower() {
var params = { var params = {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<el-input size="small" v-model="labelGroupName" placeholder="请输入搜索内容"></el-input> <el-input size="small" v-model="labelGroupName" placeholder="请输入搜索内容"></el-input>
<el-button size="small" type="primary" @click="handleSearch">查询</el-button> <el-button size="small" type="primary" @click="handleSearch">查询</el-button>
</div> </div>
<div class="checkbox-group-box" :style="{ 'height': heightBox + 'px' }"> <div class="checkbox-group-box" :style="{ height: heightBox + 'px' }">
<div style="margin-bottom: 8px" v-for="(item, index) in labelTreeRets" :key="index"> <div style="margin-bottom: 8px" v-for="(item, index) in labelTreeRets" :key="index">
<span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked }" @click="item.checked = !item.checked"></span> <span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked }" @click="item.checked = !item.checked"></span>
<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" @change="handleCheckAllChange(item.checkAll, index)">{{ item.labelGroup.name }}({{ item.tagChecked.length }}/{{ item.labelList.length }} 项)</el-checkbox> <el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" @change="handleCheckAllChange(item.checkAll, index)">{{ item.labelGroup.name }}({{ item.tagChecked.length }}/{{ item.labelList.length }} 项)</el-checkbox>
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
<div class="tag-title">已选标签</div> <div class="tag-title">已选标签</div>
<div class="tag-select-box"> <div class="tag-select-box">
<div class="tag-box-header">标签名称({{ selectNum }}项)</div> <div class="tag-box-header">标签名称({{ selectNum }}项)</div>
<div class="tag-selected-box" :style="{ 'height': heightBox + 'px' }"> <div class="tag-selected-box" :style="{ height: heightBox + 'px' }">
<template v-for="item in labelTreeRetSelect"> <template v-for="item in labelTreeRetSelect">
<template v-for="(tag, idx) in item.tagChecked"> <template v-for="(tag, idx) in item.tagChecked">
<el-tag :title="tag.name" type='info' class="tag-selected-item" :key="idx" v-if="tag" closable :disable-transitions="false" @close="remove(item, idx)"> <el-tag :title="tag.name" type="info" class="tag-selected-item" :key="idx" v-if="tag" closable :disable-transitions="false" @close="remove(item, idx)">
{{ tag.name }} {{ tag.name }}
</el-tag> </el-tag>
</template> </template>
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
<script> <script>
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
import util from '@/utils/util'
export default { export default {
name: 'activityModel', name: 'activityModel',
data() { data() {
...@@ -99,10 +100,8 @@ export default { ...@@ -99,10 +100,8 @@ export default {
}, },
methods: { methods: {
jumpUrl() { jumpUrl() {
const link = document.createElement('a') util.openUrl(location.origin + '/custom/tagsManage/index')
link.setAttribute('href', location.host+'/custom/tagsManage/index') //设置下载文件的url地址 this.dialogVisible = false
//link.setAttribute('download', 'download'); //用于设置下载文件的文件名
link.click()
// console.log(location.host+'/custom/tagsManage/index') // console.log(location.host+'/custom/tagsManage/index')
// this.$history.push('/custom/tagsManage/index') // this.$history.push('/custom/tagsManage/index')
// window.open(location.host+'/custom/tagsManage/index') // window.open(location.host+'/custom/tagsManage/index')
...@@ -281,7 +280,7 @@ export default { ...@@ -281,7 +280,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.dialog-jump { .dialog-jump {
color: #5850FF; color: #5850ff;
float: left; float: left;
line-height: 24px; line-height: 24px;
text-decoration: underline; text-decoration: underline;
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<el-tab-pane label="权益套餐" name="4"></el-tab-pane> <el-tab-pane label="权益套餐" name="4"></el-tab-pane>
<el-tab-pane label="商城券" name="2"></el-tab-pane> <el-tab-pane label="商城券" name="2"></el-tab-pane>
<el-tab-pane label="秒杀活动" name="5"></el-tab-pane> <el-tab-pane label="秒杀活动" name="5"></el-tab-pane>
<el-tab-pane label="精品券" name="1"></el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
<div class="model-item-panel" v-if="modelList.length > 0" v-loading="loading"> <div class="model-item-panel" v-if="modelList.length > 0" v-loading="loading">
...@@ -66,13 +67,15 @@ ...@@ -66,13 +67,15 @@
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button> <el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button> <el-button size="small" type="primary" @click="handleSelect" v-show="modelList.length">确 定</el-button>
<el-button size="small" type="primary" @click="handleOpen" v-show="modelList.length == 0 && activeName != 1">立即添加</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import util from '@/utils/util'
export default { export default {
name: 'ActivityModel', name: 'ActivityModel',
data() { data() {
...@@ -116,6 +119,22 @@ export default { ...@@ -116,6 +119,22 @@ export default {
this.pageNum = val this.pageNum = val
this.getModelList() this.getModelList()
}, },
handleOpen() {
let url
switch (this.activeName) {
case '2':
url = '/marketing/couponManage/index'
break
case '4':
url = '/marketing/memberCenter/setmealAddUpdate?%24title=%25E5%2588%259B%25E5%25BB%25BA%25E5%25A5%2597%25E9%25A4%2590'
break
case '5':
url = '/marketing/seckillActivity/editActivity/1'
break
}
util.openUrl(location.origin + url)
this.dialogVisible = false
},
getModelList() { getModelList() {
this.modelList = [] this.modelList = []
this.loading = true this.loading = true
......
<template> <template>
<div class="w-textarea" ref="wTextarea"> <div class="w-textarea" ref="wTextarea">
<div contenteditable="true" class="w-textarea_input" ref="wTextareaContent" :id="contentId" @click="inputClick($event)" @focus="isLocked = true" @blur="isLocked = false" @keydown.delete="handleDelete($event)" @input="handleInput($event.target)"></div> <div contenteditable="true" class="w-textarea_input" ref="wTextareaContent" :id="contentId" @click="inputClick($event)" @focus="onFocus" @blur="onBlur" @keydown.delete="handleDelete($event)" @input="handleInput($event.target)"></div>
<!-- <div class="w-textarea_tools" v-if="tools.length > 0 || maxlength"> <!-- <div class="w-textarea_tools" v-if="tools.length > 0 || maxlength">
<button <button
class="w-textarea_tools__item" class="w-textarea_tools__item"
...@@ -31,6 +31,7 @@ export default { ...@@ -31,6 +31,7 @@ export default {
contentId: `content${this.getGuid()}`, contentId: `content${this.getGuid()}`,
// 输入的时候锁定,禁止更新innerHTML // 输入的时候锁定,禁止更新innerHTML
isLocked: false, isLocked: false,
isInsert: false,
// 记录当前选中tag的ID // 记录当前选中tag的ID
currentTagId: null, currentTagId: null,
// 当前光标位置 // 当前光标位置
...@@ -179,12 +180,34 @@ export default { ...@@ -179,12 +180,34 @@ export default {
node.src = url node.src = url
this.insertNode(node) this.insertNode(node)
}, },
onFocus() {
this.isLocked = true
this.isInsert = true
},
onBlur() {
this.isLocked = false
},
insertNode(node) { insertNode(node) {
// 在内容中插入标签 // 在内容中插入标签
// 删掉选中的内容(如有) // 删掉选中的内容(如有)
if(this.savedRange.startContainer) {
this.insertNodeFirst(node)
}else {
document.querySelector('.w-textarea_input').focus()
setTimeout(()=>{
this.insertNodeFirst(node)
},100)
}
},
insertNodeFirst(node) {
this.savedRange.deleteContents() this.savedRange.deleteContents()
// 插入链接 // 插入链接
if (this.isInsert) {
this.savedRange.insertNode(node) this.savedRange.insertNode(node)
} else {
document.querySelector('.w-textarea_input').appendChild(node)
}
this.isInsert = false
// 更新双向绑定数据 // 更新双向绑定数据
let target = this.$refs.wTextareaContent let target = this.$refs.wTextareaContent
if (navigator.userAgent.indexOf('Firefox') > 0 || navigator.userAgent.indexOf('QQBrowser') > 0) { if (navigator.userAgent.indexOf('Firefox') > 0 || navigator.userAgent.indexOf('QQBrowser') > 0) {
...@@ -193,9 +216,115 @@ export default { ...@@ -193,9 +216,115 @@ export default {
this.updateData(target.innerHTML) this.updateData(target.innerHTML)
} }
let htm = target.innerHTML let htm = target.innerHTML
const list = ['微笑', '撇嘴', '色', '发呆', '得意', '流泪', '害羞', '闭嘴', '睡', '大哭', '尴尬', '发怒', '调皮', '呲牙', '惊讶', '难过', '酷', '冷汗', '抓狂', '吐', '偷笑', '可爱', '白眼', '傲慢', '饥饿', '困', '惊恐', '流汗', '憨笑', '大兵', '奋斗', '咒骂', '疑问', '嘘', '晕', '折磨', '衰', '骷髅', '敲打', '再见', '擦汗', '抠鼻', '鼓掌', '糗大了', '坏笑', '左哼哼', '右哼哼', '哈欠', '鄙视', '委屈', '快哭了', '阴险', '亲亲', '吓', '可怜', '菜刀', '西瓜', '啤酒', '篮球', '乒乓', '咖啡', '饭', '猪头', '玫瑰', '凋谢', '示爱', '爱心', '心碎', '蛋糕', '闪电', '炸弹', '刀', '足球', '瓢虫', '便便', '月亮', '太阳', '礼物', '拥抱', '强', '弱', '握手', '胜利', '抱拳', '勾引', '拳头', '差劲', '爱你', 'NO', 'OK', '爱情', '飞吻', '跳跳', '发抖', '怄火', '转圈', '磕头', '回头', '跳绳', '挥手', '激动', '街舞', '献吻', '左太极', '右太极'] const list = [
const cutImg = htm.replaceAll('<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/','') '微笑',
const replaceImg = cutImg.replace(/(\d){1,2}.gif">/g,function(str){ '撇嘴',
'色',
'发呆',
'得意',
'流泪',
'害羞',
'闭嘴',
'睡',
'大哭',
'尴尬',
'发怒',
'调皮',
'呲牙',
'惊讶',
'难过',
'酷',
'冷汗',
'抓狂',
'吐',
'偷笑',
'可爱',
'白眼',
'傲慢',
'饥饿',
'困',
'惊恐',
'流汗',
'憨笑',
'大兵',
'奋斗',
'咒骂',
'疑问',
'嘘',
'晕',
'折磨',
'衰',
'骷髅',
'敲打',
'再见',
'擦汗',
'抠鼻',
'鼓掌',
'糗大了',
'坏笑',
'左哼哼',
'右哼哼',
'哈欠',
'鄙视',
'委屈',
'快哭了',
'阴险',
'亲亲',
'吓',
'可怜',
'菜刀',
'西瓜',
'啤酒',
'篮球',
'乒乓',
'咖啡',
'饭',
'猪头',
'玫瑰',
'凋谢',
'示爱',
'爱心',
'心碎',
'蛋糕',
'闪电',
'炸弹',
'刀',
'足球',
'瓢虫',
'便便',
'月亮',
'太阳',
'礼物',
'拥抱',
'强',
'弱',
'握手',
'胜利',
'抱拳',
'勾引',
'拳头',
'差劲',
'爱你',
'NO',
'OK',
'爱情',
'飞吻',
'跳跳',
'发抖',
'怄火',
'转圈',
'磕头',
'回头',
'跳绳',
'挥手',
'激动',
'街舞',
'献吻',
'左太极',
'右太极'
]
const cutImg = htm.replaceAll('<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/', '')
const replaceImg = cutImg.replace(/(\d){1,2}.gif">/g, function (str) {
let s = list[str.split('.')[0]] let s = list[str.split('.')[0]]
return `[${s}]` return `[${s}]`
}) })
...@@ -226,10 +355,116 @@ export default { ...@@ -226,10 +355,116 @@ export default {
this.updateData(target.innerHTML) this.updateData(target.innerHTML)
let htm = target.innerHTML let htm = target.innerHTML
console.log(htm) console.log(htm)
const list = ['微笑', '撇嘴', '色', '发呆', '得意', '流泪', '害羞', '闭嘴', '睡', '大哭', '尴尬', '发怒', '调皮', '呲牙', '惊讶', '难过', '酷', '冷汗', '抓狂', '吐', '偷笑', '可爱', '白眼', '傲慢', '饥饿', '困', '惊恐', '流汗', '憨笑', '大兵', '奋斗', '咒骂', '疑问', '嘘', '晕', '折磨', '衰', '骷髅', '敲打', '再见', '擦汗', '抠鼻', '鼓掌', '糗大了', '坏笑', '左哼哼', '右哼哼', '哈欠', '鄙视', '委屈', '快哭了', '阴险', '亲亲', '吓', '可怜', '菜刀', '西瓜', '啤酒', '篮球', '乒乓', '咖啡', '饭', '猪头', '玫瑰', '凋谢', '示爱', '爱心', '心碎', '蛋糕', '闪电', '炸弹', '刀', '足球', '瓢虫', '便便', '月亮', '太阳', '礼物', '拥抱', '强', '弱', '握手', '胜利', '抱拳', '勾引', '拳头', '差劲', '爱你', 'NO', 'OK', '爱情', '飞吻', '跳跳', '发抖', '怄火', '转圈', '磕头', '回头', '跳绳', '挥手', '激动', '街舞', '献吻', '左太极', '右太极'] const list = [
const cutImg = htm.replaceAll('<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/','') '微笑',
'撇嘴',
'色',
'发呆',
'得意',
'流泪',
'害羞',
'闭嘴',
'睡',
'大哭',
'尴尬',
'发怒',
'调皮',
'呲牙',
'惊讶',
'难过',
'酷',
'冷汗',
'抓狂',
'吐',
'偷笑',
'可爱',
'白眼',
'傲慢',
'饥饿',
'困',
'惊恐',
'流汗',
'憨笑',
'大兵',
'奋斗',
'咒骂',
'疑问',
'嘘',
'晕',
'折磨',
'衰',
'骷髅',
'敲打',
'再见',
'擦汗',
'抠鼻',
'鼓掌',
'糗大了',
'坏笑',
'左哼哼',
'右哼哼',
'哈欠',
'鄙视',
'委屈',
'快哭了',
'阴险',
'亲亲',
'吓',
'可怜',
'菜刀',
'西瓜',
'啤酒',
'篮球',
'乒乓',
'咖啡',
'饭',
'猪头',
'玫瑰',
'凋谢',
'示爱',
'爱心',
'心碎',
'蛋糕',
'闪电',
'炸弹',
'刀',
'足球',
'瓢虫',
'便便',
'月亮',
'太阳',
'礼物',
'拥抱',
'强',
'弱',
'握手',
'胜利',
'抱拳',
'勾引',
'拳头',
'差劲',
'爱你',
'NO',
'OK',
'爱情',
'飞吻',
'跳跳',
'发抖',
'怄火',
'转圈',
'磕头',
'回头',
'跳绳',
'挥手',
'激动',
'街舞',
'献吻',
'左太极',
'右太极'
]
const cutImg = htm.replaceAll('<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/', '')
console.log(cutImg) console.log(cutImg)
const replaceImg = cutImg.replace(/(\d){1,2}.gif">/g,function(str){ const replaceImg = cutImg.replace(/(\d){1,2}.gif">/g, function (str) {
let s = list[str.split('.')[0]] let s = list[str.split('.')[0]]
return `[${s}]` return `[${s}]`
}) })
......
...@@ -9,7 +9,8 @@ Vue.use(ElementUI) ...@@ -9,7 +9,8 @@ Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
// import GLTable from '@/components/glsx-table/index' // import GLTable from '@/components/glsx-table/index'
// Vue.component('GLTable', GLTable) // Vue.component('GLTable', GLTable)
import 'glsx-components/src/theme/theme.scss' // import 'glsx-components/src/theme/theme.scss'
import 'glsx-components/dist/glsx-components.css'
import '@/assets/css/common.scss' import '@/assets/css/common.scss'
let routes = [] let routes = []
let router = null let router = null
...@@ -25,7 +26,6 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt ...@@ -25,7 +26,6 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
const routesData = common.utils.deepClone(globalState.routers) const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData) routes = getRoutes(routesData)
subscribe({ messenger }) subscribe({ messenger })
console.log(routes,routesData)
Vue.use(GLButton, { routes, routerBase}) Vue.use(GLButton, { routes, routerBase})
} }
export async function mount(props) { export async function mount(props) {
......
...@@ -72,6 +72,13 @@ util.getDay = function (num, str = '-') { ...@@ -72,6 +72,13 @@ util.getDay = function (num, str = '-') {
if (oDay.length <= 1) oDay = '0' + oDay; if (oDay.length <= 1) oDay = '0' + oDay;
return oYear + str + oMoth + str + oDay; return oYear + str + oMoth + str + oDay;
} }
util.openUrl = function (url) {
const link = document.createElement('a')
link.href = url
link.target = '_blank'
link.rel = 'opener'
link.click()
}
util.downloadIamge = function (imgsrc, name = new Date().getTime()) { util.downloadIamge = function (imgsrc, name = new Date().getTime()) {
//下载图片地址和图片名 //下载图片地址和图片名
var image = new Image(); var image = new Image();
......
...@@ -32,10 +32,11 @@ ...@@ -32,10 +32,11 @@
<span>{{ taggingLength }}</span> <span>{{ taggingLength }}</span>
个标签 个标签
</span> </span>
<div class="form-tips">自动为通过该活码添加的客户打上所选标签</div>
<div class="el-input-tag input-tag-wrapper" v-show="taggingLength"> <div class="el-input-tag input-tag-wrapper" v-show="taggingLength">
<template v-if="tagging && tagging.length > 0"> <template v-if="tagging && tagging.length > 0">
<template v-for="(item,index) in tagging"> <template v-for="(item, index) in tagging">
<el-tag type="info" v-for="(tag, idx) in item.labelList" :key="idx" closable :disable-transitions="false" @close="removeTag(item, idx,index)"> <el-tag type="info" v-for="(tag, idx) in item.labelList" :key="idx" closable :disable-transitions="false" @close="removeTag(item, idx, index)">
{{ tag ? tag.name : '' }} {{ tag ? tag.name : '' }}
</el-tag> </el-tag>
</template> </template>
...@@ -56,6 +57,7 @@ ...@@ -56,6 +57,7 @@
<span>{{ staffInfo.length }}</span> <span>{{ staffInfo.length }}</span>
人 人
</span> </span>
<div class="form-tips">客户扫码后将添加所选专员为好友,选择多名专员则按ABBA的顺序添加客户</div>
<div class="el-input-tag input-tag-wrapper" v-show="staffInfo.length"> <div class="el-input-tag input-tag-wrapper" v-show="staffInfo.length">
<el-tag effect="plain" type="info" v-for="(tag, idx) in staffInfo" :key="idx" closable :disable-transitions="false" @close="removeStaff(idx)"> <el-tag effect="plain" type="info" v-for="(tag, idx) in staffInfo" :key="idx" closable :disable-transitions="false" @close="removeStaff(idx)">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
...@@ -121,6 +123,8 @@ export default { ...@@ -121,6 +123,8 @@ export default {
footerLeft: 0, footerLeft: 0,
footerWidth: 0, footerWidth: 0,
autoWelcome: true, autoWelcome: true,
editStatus: false,
previewListStart: [],
codeRules: { codeRules: {
codeName: [{ required: true, message: '请输入渠道名称', trigger: 'blur' }] codeName: [{ required: true, message: '请输入渠道名称', trigger: 'blur' }]
} }
...@@ -133,18 +137,50 @@ export default { ...@@ -133,18 +137,50 @@ export default {
this.tagging.forEach(item => { this.tagging.forEach(item => {
this.taggingLength += item.labelList.length this.taggingLength += item.labelList.length
}) })
this.editStatus = true
},
deep: true
},
addCodeForm: {
handler() {
this.editStatus = true
},
deep: true
},
staffInfo: {
handler() {
this.editStatus = true
}, },
deep: true deep: true
} }
}, },
methods: { methods: {
goback() { goback() {
this.previewListStart.forEach(item=>{
this.$refs.welcome.previewList.forEach(itm=>{
if(item.attType == itm.attType) {
if(item.attContent != itm.attContent) {
this.editStatus = true
}
}
})
})
if (this.editStatus || (this.$refs.welcome.previewList.length > 0 && !this.codeId)) {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$router.push('/channel/index') this.$router.push('/channel/index')
})
} else {
this.$router.push('/channel/index')
}
}, },
removeTag(item, idx,index) { removeTag(item, idx, index) {
item.labelList.splice(idx, 1) item.labelList.splice(idx, 1)
if(item.labelList.length == 0) { if (item.labelList.length == 0) {
this.tagging.splice(index,1) this.tagging.splice(index, 1)
} }
}, },
removeStaff(index) { removeStaff(index) {
...@@ -250,11 +286,17 @@ export default { ...@@ -250,11 +286,17 @@ export default {
}) })
this.tagging = taggingList this.tagging = taggingList
this.autoWelcome = res.autoWelcome ? true : false this.autoWelcome = res.autoWelcome ? true : false
if (res.welcomeInfo.length != 0) {
const previewList = res.welcomeInfo.map(item => { const previewList = res.welcomeInfo.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent) if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
return item return item
}) })
this.$refs.welcome.updateList(previewList) this.$refs.welcome.updateList(previewList)
}
this.$nextTick(() => {
this.editStatus = false
this.previewListStart = this.$common.utils.deepClone(this.$refs.welcome.previewList)
})
}) })
}, },
resize() { resize() {
......
...@@ -9,59 +9,73 @@ ...@@ -9,59 +9,73 @@
<el-form-item size="small" label="渠道名称或备注"> <el-form-item size="small" label="渠道名称或备注">
<el-input size="small" v-model="tableSearchForm.codeNameAndRemark" placeholder="请输入渠道名称或备注"></el-input> <el-input size="small" v-model="tableSearchForm.codeNameAndRemark" placeholder="请输入渠道名称或备注"></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" label="关联专员" style="margin-left: 20px">
<el-input size="small" v-model="tableSearchForm.staffName" placeholder="请输入关联专员"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right"> <el-form-item size="small" style="float: right">
<el-button @click="handleReset">重置</el-button> <el-button @click="handleReset">重置</el-button>
<el-button type="primary" @click="handleSearch">查询</el-button> <el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<GLTable ref="table" :searchForm="tableSearchForm" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams"> <GLTable ref="table" @refreshTable="handleSearch" :searchForm="tableSearchForm" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams">
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<GLButton type="text" @click="handleDetail(scope.scope)" fn="到店咨询客户数据">数据</GLButton> <GLButton type="text" @click="handleDetail(scope.scope)" fn="到店咨询客户数据">数据</GLButton>
<GLButton type="text" @click="handleEdit(scope.scope)" fn="活码编辑">修改</GLButton> <GLButton type="text" @click="handleEdit(scope.scope)" fn="活码编辑">修改</GLButton>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> <el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
<GLButton type="text" @click="handleAddPoster(scope.scope)" fn="活码海报">活码海报</GLButton> <GLButton type="text" @click="handleAddPoster(scope.scope)" fn="活码海报">活码海报</GLButton>
</div> </div>
<div slot="yesterdayNum" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope,'day')" v-if="scope.scope.yesterdayNum">{{ scope.scope.yesterdayNum }}</div>
<div v-else>0</div>
</div>
<div slot="totalNum" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope)" v-if="scope.scope.totalNum">{{ scope.scope.totalNum }}</div>
<div v-else>0</div>
</div>
<div slot="staffInfo" slot-scope="scope"> <div slot="staffInfo" slot-scope="scope">
<el-popover trigger="hover" placement="top" v-if="scope.scope.staffInfo.length > 3"> <el-popover trigger="hover" placement="top" v-if="scope.scope.staffName.split(',').length > 3">
<div class="accountType-row" v-for="(item, index) in scope.scope.staffInfo" :key="index"> <div class="accountType-row" v-for="(item, index) in scope.scope.staffName.split(',')" :key="index">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ item.staffName }} {{ item }}
</div> </div>
<div slot="reference" class="name-wrapper"> <div slot="reference" class="name-wrapper">
<div v-for="(item, index) in scope.scope.staffInfo" :key="index" v-show="index < 4"> <div v-for="(item, index) in scope.scope.staffName.split(',')" :key="index" v-show="index < 4">
<div class="accountType-row"> <div class="accountType-row">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ index == 3 && scope.scope.staffInfo.length > 3 ? '...(' + scope.scope.staffInfo.length + ')' : item.staffName }} {{ index == 3 && scope.scope.staffName.split(',').length > 3 ? '...(' + scope.scope.staffName.split(',').length + ')' : item }}
</div> </div>
</div> </div>
</div> </div>
</el-popover> </el-popover>
<div v-for="(item, index) in scope.scope.staffInfo" :key="index" v-else> <div v-for="(item, index) in scope.scope.staffName.split(',')" :key="index" v-else>
<div class="accountType-row"> <div class="accountType-row">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ item.staffName }} {{ item }}
</div> </div>
</div> </div>
</div> </div>
<div slot="qrCode" slot-scope="scope"> <div slot="qrCode" slot-scope="scope">
<img :src="scope.scope.qrCode" style="width: 80px; height: 80px" /> <el-popover placement="bottom" width="200" trigger="click">
<img :src="scope.scope.qrCode" style="width: 160px; height: 160px" />
<img :src="scope.scope.qrCode" style="width: 80px; height: 80px" slot="reference" />
</el-popover>
<div class="download-link" @click="downloadIamge(scope.scope.qrCode)">下载二维码</div> <div class="download-link" @click="downloadIamge(scope.scope.qrCode)">下载二维码</div>
</div> </div>
<div slot="tagging" slot-scope="scope" class="tag-panel"> <div slot="tagging" slot-scope="scope" class="tag-panel">
<el-popover trigger="hover" placement="top" v-if="scope.scope.taggingList && scope.scope.taggingList.length > 3"> <el-popover trigger="hover" placement="top" v-if="scope.scope.taggingList && scope.scope.taggingList.length > 3">
<div :title="item.name" class="accountType-row accountType-row-tag" v-for="(item, index) in scope.scope.taggingList" :key="index"> <div :title="item.name" class="accountType-row accountType-row-tag" v-for="(item, index) in scope.scope.taggingList" :key="index">
{{ item.name.length > 8 ? item.name.substring(0, 8)+'...' : item.name }} {{ item.name.length > 8 ? item.name.substring(0, 8) + '...' : item.name }}
</div> </div>
<div slot="reference" class="name-wrapper"> <div slot="reference" class="name-wrapper">
<div v-for="(item, index) in scope.scope.taggingList" :key="index" v-show="index < 4"> <div v-for="(item, index) in scope.scope.taggingList" :key="index" v-show="index < 4">
<div :title="item.name" class="accountType-row accountType-row-tag">{{ index == 3 && scope.scope.taggingList.length > 3 ? '...(' + scope.scope.taggingList.length + ')' : item.name.length > 8 ? item.name.substring(0, 8)+'...' : item.name }}</div> <div :title="item.name" class="accountType-row accountType-row-tag">{{ index == 3 && scope.scope.taggingList.length > 3 ? '...(' + scope.scope.taggingList.length + ')' : item.name.length > 8 ? item.name.substring(0, 8) + '...' : item.name }}</div>
</div> </div>
</div> </div>
</el-popover> </el-popover>
<template v-if="scope.scope.taggingList && scope.scope.taggingList.length <= 3 && scope.scope.taggingList.length > 0"> <template v-if="scope.scope.taggingList && scope.scope.taggingList.length <= 3 && scope.scope.taggingList.length > 0">
<div v-for="(item, index) in scope.scope.taggingList" :key="index"> <div v-for="(item, index) in scope.scope.taggingList" :key="index">
<div :title="item.name" class="accountType-row accountType-row-tag">{{ item.name.length > 8 ? item.name.substring(0, 8)+'...' : item.name }}</div> <div :title="item.name" class="accountType-row accountType-row-tag">{{ item.name.length > 8 ? item.name.substring(0, 8) + '...' : item.name }}</div>
</div> </div>
</template> </template>
<div v-if="!scope.scope.taggingList || (scope.scope.taggingList && scope.scope.taggingList.length == 0)">--</div> <div v-if="!scope.scope.taggingList || (scope.scope.taggingList && scope.scope.taggingList.length == 0)">--</div>
...@@ -72,12 +86,15 @@ ...@@ -72,12 +86,15 @@
</div> </div>
</GLTable> </GLTable>
</div> </div>
<emp-detail ref="empDetailForm"></emp-detail>
</div> </div>
</template> </template>
<script> <script>
import util from '@/utils/util' import util from '@/utils/util'
import empDetail from './empDetail.vue'
export default { export default {
components: { empDetail },
name: 'channelList', name: 'channelList',
data() { data() {
return { return {
...@@ -95,12 +112,14 @@ export default { ...@@ -95,12 +112,14 @@ export default {
{ {
label: '今日新增客户数', label: '今日新增客户数',
prop: 'yesterdayNum', prop: 'yesterdayNum',
width: '120px' width: '120px',
addHtml: 'yesterdayNum'
}, },
{ {
label: '总新增客户数', label: '总新增客户数',
prop: 'totalNum', prop: 'totalNum',
width: '150px' width: '150px',
addHtml: 'totalNum'
}, },
{ {
label: '使用专员', label: '使用专员',
...@@ -159,6 +178,9 @@ export default { ...@@ -159,6 +178,9 @@ export default {
handleAddPoster(scope) { handleAddPoster(scope) {
this.$router.push('/channel/poster/' + scope.id) this.$router.push('/channel/poster/' + scope.id)
}, },
handleEmpDetail(scope,status) {
this.$refs.empDetailForm.init(scope,status)
},
downloadIamge(imgsrc) { downloadIamge(imgsrc) {
util.downloadIamge(imgsrc) util.downloadIamge(imgsrc)
}, },
...@@ -336,6 +358,10 @@ export default { ...@@ -336,6 +358,10 @@ export default {
} }
} }
} }
.link-dialog {
text-decoration: underline;
cursor: pointer;
}
.accountType-row { .accountType-row {
text-align: left; text-align: left;
position: relative; position: relative;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<el-form-item size="small" label="渠道名称"> <el-form-item size="small" label="渠道名称">
<el-input size="small" v-model="tableSearchForm.keyWord" placeholder="请输入渠道名称"></el-input> <el-input size="small" v-model="tableSearchForm.keyWord" placeholder="请输入渠道名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" style="float: right;margin-left: 40px"> <el-form-item size="small" style="float: right; margin-left: 40px">
<el-button type="primary" @click="handleSearch">查询</el-button> <el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
<div class="chart-title-num">各渠道新增客户数</div> <div class="chart-title-num">各渠道新增客户数</div>
</div> </div>
<div class="chart-desc-item" v-for="(item, index) in codeIds" :key="index"> <div class="chart-desc-item" v-for="(item, index) in codeIds" :key="index">
<div class="chart-item-title"> <div class="chart-item-title" :title="item.codeName">
<span :style="{ background: colorList[index], }"></span> <span :style="{ background: colorList[index] }"></span>
{{ item.codeName }} {{ item.codeName }}
</div> </div>
<div class="chart-item-num">{{ item.totalNum }}</div> <div class="chart-item-num">{{ item.totalNum }}</div>
...@@ -46,8 +46,18 @@ ...@@ -46,8 +46,18 @@
</div> </div>
</div> </div>
</div> </div>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch"></GLTable> <GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<div slot="newlyCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope,'day',scope.scope.timeFrame)" v-if="scope.scope.newlyCount">{{ scope.scope.newlyCount }}</div>
<div>0</div>
</div>
<div slot="newlyKeepCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope,'status',scope.scope.timeFrame)" v-if="scope.scope.newlyKeepCount">{{ scope.scope.newlyKeepCount }}</div>
<div>0</div>
</div>
</GLTable>
<select-channel :colorList="colorList" ref="channelForm" @selectTable="selectTable"></select-channel> <select-channel :colorList="colorList" ref="channelForm" @selectTable="selectTable"></select-channel>
<emp-detail ref="empDetailForm"></emp-detail>
</div> </div>
</template> </template>
...@@ -55,11 +65,13 @@ ...@@ -55,11 +65,13 @@
import utils from '@/utils/util' import utils from '@/utils/util'
import linechart from './linechart' import linechart from './linechart'
import selectChannel from './selectChannel' import selectChannel from './selectChannel'
import empDetail from './empDetail.vue'
export default { export default {
name: 'channelStatistics', name: 'channelStatistics',
components: { components: {
linechart, linechart,
selectChannel selectChannel,
empDetail
}, },
data() { data() {
return { return {
...@@ -83,11 +95,13 @@ export default { ...@@ -83,11 +95,13 @@ export default {
}, },
{ {
label: '新增客户数', label: '新增客户数',
prop: 'newlyCount' prop: 'newlyCount',
addHtml: 'newlyCount'
}, },
{ {
label: '留存客户数', label: '留存客户数',
prop: 'newlyKeepCount' prop: 'newlyKeepCount',
addHtml: 'newlyKeepCount'
}, },
{ {
label: '日期', label: '日期',
...@@ -134,6 +148,9 @@ export default { ...@@ -134,6 +148,9 @@ export default {
handleSearch() { handleSearch() {
this.codeSearch() this.codeSearch()
}, },
handleEmpDetail(scope,value,day) {
this.$refs.empDetailForm.init(scope,value,day)
},
codeSearch() { codeSearch() {
var params = { var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)), ...JSON.parse(JSON.stringify(this.tableSearchForm)),
...@@ -171,7 +188,7 @@ export default { ...@@ -171,7 +188,7 @@ export default {
return { return {
codeState: item.codeState, codeState: item.codeState,
codeName: item.codeName, codeName: item.codeName,
totalNum: item.totalNum totalNum: item.yesterdayNum
} }
}) })
this.getFollower() this.getFollower()
...@@ -195,7 +212,7 @@ export default { ...@@ -195,7 +212,7 @@ export default {
return { return {
codeState: item.codeState, codeState: item.codeState,
codeName: item.codeName, codeName: item.codeName,
totalNum: item.totalNum totalNum: item.yesterdayNum
} }
}) })
this.codeTrend() this.codeTrend()
...@@ -218,6 +235,10 @@ export default { ...@@ -218,6 +235,10 @@ export default {
} }
} }
} }
.link-dialog {
text-decoration: underline;
cursor: pointer;
}
.channel-chart { .channel-chart {
display: flex; display: flex;
.channel-chart-desc { .channel-chart-desc {
...@@ -248,6 +269,9 @@ export default { ...@@ -248,6 +269,9 @@ export default {
line-height: 17px; line-height: 17px;
margin-top: 10px; margin-top: 10px;
.chart-item-title { .chart-item-title {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
span { span {
vertical-align: middle; vertical-align: middle;
display: inline-block; display: inline-block;
......
<template>
<div class="square-main" v-loading="loading">
<el-dialog title="客户详情" :visible.sync="dialogVisible" width="70%" :before-close="handleClose">
<el-form :inline="true" :model="tableSearchForm">
<el-form-item size="small" label="客户名称">
<el-input v-model="tableSearchForm.customerName" placeholder="请输入客户名称"></el-input>
</el-form-item>
<el-form-item size="small" label="状态">
<el-select v-model="tableSearchForm.status" placeholder="请选择">
<el-option v-for="item in optionstatus" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="跟进员工">
<el-select v-model="staffId" placeholder="请选择">
<el-option v-for="item in staffName" :key="item.staffId" :label="item.staffName" :value="item.staffId"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="添加时间">
<el-date-picker :picker-options="pickerOptions" value-format="yyyy-MM-dd" v-model="createTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-form-item size="small">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable v-loading="loading" ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button>
</div>
<template slot="status" slot-scope="scope">
<div class="status-form" v-if="scope.scope.status" style="color: #eb4e4e">删除好友</div>
<div class="status-form" v-else style="color: #00a854">正常</div>
</template>
<template slot="customerName" slot-scope="scope">
<div class="form-row">
{{ scope.scope.customerName }}
<span style="color: #5850ff">{{ scope.scope.type == 1 ? '@微信' : '@企微' }}</span>
</div>
</template>
</GLTable>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleCancel" type="primary">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { utils } from 'glsx-common'
import util from '@/utils/util'
export default {
name: 'selectEmp',
data() {
return {
loading: false,
dialogVisible: false,
status: '',
createTime: [],
optionstatus: [
{
value: '',
label: '全部'
},
{
value: '0',
label: '正常'
},
{
value: '1',
label: '删除好友'
}
],
tableSearchForm: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName'
},
{
label: '客户性别',
prop: 'customerSex',
formatter: cellValue => {
console.log(cellValue)
return cellValue.customerSex == 1 ? '男' : '女'
}
},
{
label: '状态',
prop: 'status',
addHtml: 'status'
},
{
label: '跟进员工',
prop: 'followStaff'
},
{
label: '添加时间',
prop: 'addTime'
},
{
label: '操作',
prop: 'optionBtns',
width: '80px',
addHtml: 'optionBtns'
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
staffName: [],
tableTotal: 0,
selectItem: [],
selectEmp: [],
pStatus: null,
staffIds: null,
staffId: null
}
},
methods: {
jumpUrl() {
this.$history.push('/home/followUp/index')
},
getFollower() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
custState: this.selectRow.codeState,
staffIds: this.staffId ? [this.staffId] : null
}
if (this.createTime.length > 0) {
params.beginTime = this.createTime[0]
params.endTime = this.createTime[1]
}
if (this.pStatus) {
params.status = 0
}
if (this.staffIds) {
params.staffIds = this.staffIds
}
this.loading = true
this.$apis.channel.getCustomer(params).then(res => {
this.loading = false
this.tableData = res.data
this.tableTotal = res.count
})
},
getChannelCodeStaffList() {
var params = {
pageSize: 1000,
pageNum: 1,
codeState: this.selectRow.codeState
}
this.$apis.channel.getChannelCodeStaffList(params).then(res => {
this.staffName = [{staffName: '全部',staffId: null}].concat(res.data)
})
},
init(item, value, day) {
this.createTime = []
if (value == 'day' && !day) {
this.createTime = [util.getDay(0), util.getDay(0)]
}
if (value == 'day' && day) {
if (day.indexOf('~') == -1) {
this.createTime = [day, day]
} else {
this.createTime = [day.split('~')[0], day.split('~')[1]]
}
}
if (value == 'status' && !day) {
this.pStatus = 'status'
}
if (value == 'status' && day) {
this.pStatus = 'status'
if (day.indexOf('~') == -1) {
this.createTime = [day, day]
} else {
this.createTime = [day.split('~')[0], day.split('~')[1]]
}
}
if (value == 'staffIds') {
this.staffIds = item.staffId
}
if (value == 'statusAndStaffIds') {
this.pStatus = 'status'
this.staffIds = item.staffId
}
this.selectRow = item
this.tableSearchForm = {}
this.dialogVisible = true
this.getChannelCodeStaffList()
this.$nextTick(() => {
this.$refs.table.page.pageNum = 1
this.getFollower()
})
},
handleSearch() {
this.getFollower()
},
selectionTable(val) {
this.selectItem = val
},
handleClose() {
this.handleCancel()
},
handleDetail(scope) {
this.$history.push('/custom/clientManage/clientDetail?id=' + scope.oneId)
},
handleCancel: utils.debounce(function () {
this.dialogVisible = false
}, 300)
}
}
</script>
<style lang="scss" scoped>
.dialog-jump {
color: #5850ff;
float: left;
line-height: 24px;
text-decoration: underline;
cursor: pointer;
}
.square-main {
/deep/ {
.el-table {
height: 35vh;
overflow-y: auto;
}
.el-form-item {
margin-right: 20px;
}
.el-table::before {
left: 0;
bottom: 0;
width: 100%;
height: 0px;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<div class="selected-title">已选渠道</div> <div class="selected-title">已选渠道</div>
<div class="selected-panel"> <div class="selected-panel">
<div class="selected-item" v-for="(item, index) in selectedList" :key="index"> <div class="selected-item" v-for="(item, index) in selectedList" :key="index">
<div> <div :title="item.codeName">
<span :style="{ background: colorList[index]}"></span> <span :style="{ background: colorList[index]}"></span>
{{ item.codeName }} {{ item.codeName }}
</div> </div>
...@@ -148,6 +148,11 @@ export default { ...@@ -148,6 +148,11 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
div {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
span { span {
vertical-align: middle; vertical-align: middle;
display: inline-block; display: inline-block;
......
...@@ -34,12 +34,14 @@ ...@@ -34,12 +34,14 @@
<div class="count-panel"> <div class="count-panel">
<div class="count-panel-item"> <div class="count-panel-item">
<div class="count-item-title">今日新增客户</div> <div class="count-item-title">今日新增客户</div>
<div class="count-item-num">{{ detailCodeForm.yesTodayAddCount }}人</div> <div class="count-item-num" @click="handleEmpDetail(detailCodeForm,'day')" v-if="detailCodeForm.yesTodayAddCount">{{ detailCodeForm.yesTodayAddCount }}人</div>
<div class="count-item-num2" v-else>0人</div>
<img src="@/assets/img/channel/count3.png" class="count-item-icon" /> <img src="@/assets/img/channel/count3.png" class="count-item-icon" />
</div> </div>
<div class="count-panel-item"> <div class="count-panel-item">
<div class="count-item-title">总新增客户</div> <div class="count-item-title">总新增客户</div>
<div class="count-item-num">{{ detailCodeForm.newlyCount }}人</div> <div class="count-item-num" @click="handleEmpDetail(detailCodeForm)" v-if="detailCodeForm.newlyCount">{{ detailCodeForm.newlyCount }}人</div>
<div class="count-item-num2" v-else>0人</div>
<img src="@/assets/img/channel/count2.png" class="count-item-icon" /> <img src="@/assets/img/channel/count2.png" class="count-item-icon" />
</div> </div>
<div class="count-panel-item"> <div class="count-panel-item">
...@@ -49,7 +51,8 @@ ...@@ -49,7 +51,8 @@
<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>
</div> </div>
<div class="count-item-num">{{ detailCodeForm.newlyKeepCount }}人</div> <div class="count-item-num" @click="handleEmpDetail(detailCodeForm,'status')" v-if="detailCodeForm.newlyKeepCount">{{ detailCodeForm.newlyKeepCount }}人</div>
<div class="count-item-num2" v-else>0人</div>
<img src="@/assets/img/channel/count1.png" class="count-item-icon" /> <img src="@/assets/img/channel/count1.png" class="count-item-icon" />
</div> </div>
</div> </div>
...@@ -58,14 +61,35 @@ ...@@ -58,14 +61,35 @@
<el-tab-pane label="按日期查看" name="1"></el-tab-pane> <el-tab-pane label="按日期查看" name="1"></el-tab-pane>
<el-tab-pane label="按成员查看" name="2"></el-tab-pane> <el-tab-pane label="按成员查看" name="2"></el-tab-pane>
</el-tabs> </el-tabs>
<GLTable v-show="activeName == 1" ref="timeTable" :tableData="getTimeApi" :tableParams="tableParams" :hasNum="false" :hasPage="false"></GLTable> <GLTable v-show="activeName == 1" ref="timeTable" :tableData="getTimeApi" :tableParams="tableParams" :hasNum="false" :hasPage="false">
<GLTable v-show="activeName == 2" @refreshTable="listStaff" :layout="layout" :tableTotal="tableTotal" ref="memberTabel" :tableData="getMemberApi" :tableParams="tableMemberParams" :pageConf="pageMemberConf" :hasNum="false"></GLTable> <div slot="newlyCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope, 'day', scope.scope.dayTime)" v-if="scope.scope.newlyCount">{{ scope.scope.newlyCount }}</div>
<div v-else>0</div>
</div>
<div slot="newlyKeepCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope, 'status', scope.scope.dayTime)" v-if="scope.scope.newlyKeepCount">{{ scope.scope.newlyKeepCount }}</div>
<div v-else>0</div>
</div>
</GLTable>
<GLTable v-show="activeName == 2" @refreshTable="listStaff" :layout="layout" :tableTotal="tableTotal" ref="memberTabel" :tableData="getMemberApi" :tableParams="tableMemberParams" :pageConf="pageMemberConf" :hasNum="false">
<div slot="newlyCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope,'staffIds')" v-if="scope.scope.newlyCount">{{ scope.scope.newlyCount }}</div>
<div v-else>0</div>
</div>
<div slot="newlyKeepCount" slot-scope="scope">
<div class="link-dialog" @click="handleEmpDetail(scope.scope,'statusAndStaffIds')" v-if="scope.scope.newlyKeepCount">{{ scope.scope.newlyKeepCount }}</div>
<div v-else>0</div>
</div>
</GLTable>
<emp-detail ref="empDetailForm"></emp-detail>
</div> </div>
</template> </template>
<script> <script>
import empDetail from './components/empDetail.vue'
export default { export default {
name: 'store', name: 'store',
components: { empDetail },
data() { data() {
return { return {
activeName: '1', activeName: '1',
...@@ -79,11 +103,13 @@ export default { ...@@ -79,11 +103,13 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '新增客户数', label: '新增客户数',
prop: 'newlyCount' prop: 'newlyCount',
addHtml: 'newlyCount'
}, },
{ {
label: '留存客户数', label: '留存客户数',
prop: 'newlyKeepCount' prop: 'newlyKeepCount',
addHtml: 'newlyKeepCount'
}, },
{ {
label: '日期', label: '日期',
...@@ -101,11 +127,13 @@ export default { ...@@ -101,11 +127,13 @@ export default {
}, },
{ {
label: '新增客户数', label: '新增客户数',
prop: 'newlyCount' prop: 'newlyCount',
addHtml: 'newlyCount'
}, },
{ {
label: '留存客户数', label: '留存客户数',
prop: 'newlyKeepCount' prop: 'newlyKeepCount',
addHtml: 'newlyKeepCount'
}, },
{ {
label: '日期', label: '日期',
...@@ -127,6 +155,9 @@ export default { ...@@ -127,6 +155,9 @@ export default {
goback() { goback() {
this.$router.push('/channel/index') this.$router.push('/channel/index')
}, },
handleEmpDetail(scope,status,day) {
this.$refs.empDetailForm.init(scope,status,day)
},
detailChannelCode(id, codeUuid) { detailChannelCode(id, codeUuid) {
let param = { let param = {
id, id,
...@@ -199,6 +230,10 @@ export default { ...@@ -199,6 +230,10 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.link-dialog {
text-decoration: underline;
cursor: pointer;
}
.channel-main { .channel-main {
padding: 20px; padding: 20px;
.remark-row { .remark-row {
...@@ -306,6 +341,17 @@ export default { ...@@ -306,6 +341,17 @@ export default {
color: #333333; color: #333333;
line-height: 26px; line-height: 26px;
margin-top: 28px; margin-top: 28px;
display: inline-block;
cursor: pointer;
text-decoration: underline;
}
.count-item-num2 {
font-size: 26px;
font-weight: 600;
color: #333333;
line-height: 26px;
margin-top: 28px;
display: inline-block;
} }
.count-item-icon { .count-item-icon {
position: absolute; position: absolute;
......
...@@ -8,12 +8,8 @@ ...@@ -8,12 +8,8 @@
> >
<div class="model-panel"> <div class="model-panel">
<div class="model-panel-tab"> <div class="model-panel-tab">
<label>模板类型:</label> <el-input v-model="keyword" placeholder="请输入关键字" width="215px" size="small"></el-input>
<el-tabs v-model="activeName" @tab-click="handleClick" type="card"> <el-button type="primary" @click="handleSearch" size="small">查询</el-button>
<el-tab-pane label="售前" name="1"></el-tab-pane>
<el-tab-pane label="售中" name="2"></el-tab-pane>
<el-tab-pane label="售后" name="3"></el-tab-pane>
</el-tabs>
</div> </div>
<div class="model-item-panel" v-if="modelList.length>0" v-loading="loading"> <div class="model-item-panel" v-if="modelList.length>0" v-loading="loading">
<div class="model-item" v-for="(item, index) in modelList" :key="index"> <div class="model-item" v-for="(item, index) in modelList" :key="index">
...@@ -57,6 +53,7 @@ export default { ...@@ -57,6 +53,7 @@ export default {
name: "activityModel", name: "activityModel",
data() { data() {
return { return {
keyword: '',
dialogVisible: false, dialogVisible: false,
loading: false, loading: false,
activeName: "1", activeName: "1",
...@@ -69,6 +66,7 @@ export default { ...@@ -69,6 +66,7 @@ export default {
}, },
methods: { methods: {
init() { init() {
this.keyword = '';
this.messageRadio = {}; this.messageRadio = {};
this.dialogVisible = true; this.dialogVisible = true;
this.dracImMessage(); this.dracImMessage();
...@@ -85,7 +83,7 @@ export default { ...@@ -85,7 +83,7 @@ export default {
let params = { let params = {
pageSize: this.pageSize, pageSize: this.pageSize,
pageNum: this.pageNum, pageNum: this.pageNum,
type: this.activeName, keyword: this.keyword
}; };
this.$apis.marketing.dracImMessage(params).then((res) => { this.$apis.marketing.dracImMessage(params).then((res) => {
this.messageRadio = {}; this.messageRadio = {};
...@@ -94,6 +92,9 @@ export default { ...@@ -94,6 +92,9 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
handleSearch() {
this.dracImMessage();
},
handleSizeChange(val) { handleSizeChange(val) {
console.log(`每页 ${val} 条`); console.log(`每页 ${val} 条`);
}, },
...@@ -117,8 +118,9 @@ export default { ...@@ -117,8 +118,9 @@ export default {
line-height: 24px; line-height: 24px;
} }
/deep/ { /deep/ {
.el-checkbox:last-of-type { .el-input,.el-input__inner {
margin-right: 8px; width: 320px;
margin-right: 20px;
} }
.el-tabs__nav { .el-tabs__nav {
border: 0; border: 0;
......
...@@ -50,13 +50,19 @@ ...@@ -50,13 +50,19 @@
<div class="form-tips">70字內(含70字)计一条,超过70字,按70字/条计费。</div> <div class="form-tips">70字內(含70字)计一条,超过70字,按70字/条计费。</div>
<div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按{{ content.length }}条短信发送且计费。</div> <div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按{{ content.length }}条短信发送且计费。</div>
</el-form-item> </el-form-item>
<el-form-item label="自动打标签"> <div class="drainage-form-item">
<label style="width: 100px; text-align: left; color: #666">
自动打标签
<el-popover placement="top" width="400" trigger="hover" content="提示:通过该营销活动添加员工企微的客户,将自动使用以下标签进行标记。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</label>
<div class="tag-item-panel" v-if="editStatus"> <div class="tag-item-panel" v-if="editStatus">
<div> <div>
<el-button size="small" @click="handleAddTag">添加</el-button> <el-button size="small" @click="handleAddTag">添加</el-button>
<div class="el-input-tag input-tag-wrapper" v-if="taggingLength"> <div class="el-input-tag input-tag-wrapper" v-if="taggingLength">
<template v-for="(item,index) in tagging"> <template v-for="(item, index) in tagging">
<el-tag type="info" v-for="(tag, idx) in item.labelList" :key="idx" closable :disable-transitions="false" @close="removeTag(item, idx,index)"> <el-tag type="info" v-for="(tag, idx) in item.labelList" :key="idx" closable :disable-transitions="false" @close="removeTag(item, idx, index)">
{{ tag.name }} {{ tag.name }}
</el-tag> </el-tag>
</template> </template>
...@@ -70,12 +76,17 @@ ...@@ -70,12 +76,17 @@
</div> </div>
</template> </template>
</div> </div>
</el-form-item> </div>
</el-form> </el-form>
</div> </div>
</div> </div>
<div class="drainage-form-item" v-if="editStatus"> <div class="drainage-form-item" v-if="editStatus">
<label class="is-require">跟进员工</label> <label class="is-require">
跟进员工
<el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</label>
<div style="position: relative"> <div style="position: relative">
<el-button size="small" @click="handleAddEmp"> <el-button size="small" @click="handleAddEmp">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
...@@ -92,7 +103,12 @@ ...@@ -92,7 +103,12 @@
</div> </div>
</div> </div>
<div class="drainage-form-item" v-else> <div class="drainage-form-item" v-else>
<label>跟进员工</label> <label>
跟进员工
<el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</label>
<div class="drainage-emp"> <div class="drainage-emp">
<div :key="index" v-for="(item, index) in dracImFollowStaffResponses"> <div :key="index" v-for="(item, index) in dracImFollowStaffResponses">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
...@@ -194,6 +210,13 @@ import welcomeWords from '@/components/welcome/welcomeWords.vue' ...@@ -194,6 +210,13 @@ import welcomeWords from '@/components/welcome/welcomeWords.vue'
import selectEmp from '@/components/selectEmp' import selectEmp from '@/components/selectEmp'
import selectTag from '@/components/selectTag' import selectTag from '@/components/selectTag'
import messageModel from './components/messageModel' import messageModel from './components/messageModel'
const validateTime = (rule, value, callback) => {
if ((new Date(`2000-1-1 ${value[1]}`).getTime() - new Date(`2000-1-1 ${value[0]}`).getTime()) / (1000 * 60) < 120) {
callback(new Error('因营销类短信内容需人工审核,建议预留2小时的营销时长。'))
} else {
callback()
}
}
export default { export default {
name: 'config', name: 'config',
components: { components: {
...@@ -215,6 +238,7 @@ export default { ...@@ -215,6 +238,7 @@ export default {
importName: null, importName: null,
exportUrl: null, exportUrl: null,
editStatus: true, editStatus: true,
saveStatus: false,
importStatus: false, importStatus: false,
ExportDracImResponse: {}, ExportDracImResponse: {},
footerLeft: 0, footerLeft: 0,
...@@ -222,7 +246,7 @@ export default { ...@@ -222,7 +246,7 @@ export default {
addForm: { addForm: {
desc: '', desc: '',
content: '', content: '',
time: '' time: ['9:00:00', '18:00:00']
}, },
content: [], content: [],
editId: null, editId: null,
...@@ -235,7 +259,10 @@ export default { ...@@ -235,7 +259,10 @@ export default {
dracImMessageConfigAddRequest: {}, dracImMessageConfigAddRequest: {},
ModelItem: {}, ModelItem: {},
addRules: { addRules: {
time: [{ required: true, message: '请选择营销时间', trigger: 'change' }], time: [
{ required: true, message: '请选择营销时间', trigger: 'change' },
{ validator: validateTime, trigger: 'change' }
],
content: [{ required: true, message: '请选择短信模板', trigger: 'change' }] content: [{ required: true, message: '请选择短信模板', trigger: 'change' }]
} }
} }
...@@ -253,12 +280,43 @@ export default { ...@@ -253,12 +280,43 @@ export default {
} }
} }
}, },
importName: {
handler() {
this.saveStatus = true
},
deep: true
},
imName: {
handler() {
this.saveStatus = true
},
deep: true
},
autoWelcome: {
handler() {
this.saveStatus = true
},
deep: true
},
addForm: {
handler() {
this.saveStatus = true
},
deep: true
},
tagging: { tagging: {
handler: function () { handler: function () {
this.taggingLength = 0 this.taggingLength = 0
this.tagging.forEach(item => { this.tagging.forEach(item => {
this.taggingLength += item.labelList.length this.taggingLength += item.labelList.length
}) })
this.saveStatus = true
},
deep: true
},
dracImFollowStaffResponses: {
handler() {
this.saveStatus = true
}, },
deep: true deep: true
} }
...@@ -271,7 +329,17 @@ export default { ...@@ -271,7 +329,17 @@ export default {
this.importStatus = false this.importStatus = false
}, },
handleCancel() { handleCancel() {
if (this.saveStatus || (this.$refs.welcome.previewList.length > 0 && this.editStatus)) {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$router.push('/market/index')
})
} else {
this.$router.push('/market/index') this.$router.push('/market/index')
}
}, },
selectItem(item) { selectItem(item) {
this.messageItem = item this.messageItem = item
...@@ -323,9 +391,9 @@ export default { ...@@ -323,9 +391,9 @@ export default {
console.log(this.ModelItem) console.log(this.ModelItem)
}, },
handleSaveImport() { handleSaveImport() {
this.loading = true; this.loading = true
let params; let params
let config; let config
if (this.editId) { if (this.editId) {
config = 'exportUpdate' config = 'exportUpdate'
params = { params = {
...@@ -361,7 +429,7 @@ export default { ...@@ -361,7 +429,7 @@ export default {
this.empStatus = true this.empStatus = true
return return
} }
this.loading = true; this.loading = true
this.$refs['configForm'].validate(valid => { this.$refs['configForm'].validate(valid => {
if (valid) { if (valid) {
let startTime, endTime let startTime, endTime
...@@ -478,6 +546,9 @@ export default { ...@@ -478,6 +546,9 @@ export default {
} }
}) })
this.tagging = taggingList this.tagging = taggingList
this.$nextTick(() => {
this.saveStatus = false
})
}) })
} }
}, },
...@@ -682,6 +753,12 @@ export default { ...@@ -682,6 +753,12 @@ export default {
margin-right: 20px; margin-right: 20px;
height: 36px; height: 36px;
line-height: 36px; line-height: 36px;
img {
width: 14px;
height: 14px;
vertical-align: middle;
margin-left: 5px;
}
&.is-require { &.is-require {
&::before { &::before {
content: '*'; content: '*';
......
<template> <template>
<div class="square-main"> <div class="square-main">
<div class="drainage-wrap scrm-box-f"> <div class="drainage-wrap scrm-box-f">
<div class="drainage-title">指定客户</div> <div class="drainage-title">指定客户1</div>
<div class="drainage-form"> <div class="drainage-form">
<div class="drainage-form-item"> <div class="drainage-form-item">
<label>客户信息</label> <label>客户信息1</label>
<div class="upload-box"> <div class="upload-box">
<div class="upload-file-panel"> <div class="upload-file-panel">
<el-upload action="" class="image-uploader" :before-upload="uploadFile"> <el-upload action="" class="image-uploader" :before-upload="uploadFile">
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
<div class="drainage-form"> <div class="drainage-form">
<div class="drainage-form-item" v-if="editStatus"> <div class="drainage-form-item" v-if="editStatus">
<label class="is-require">跟进员工</label> <label class="is-require">跟进员工</label>
<el-popover placement="top" width="400" trigger="hover" content="通过导入的客户,门店可通过智能外呼及智能短信,结合营销活动的需要向离店用户进行智能营销,可实现标准、高效的营销同时实现用户线上化。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
<div> <div>
<el-button size="small" @click="handleAddEmp"> <el-button size="small" @click="handleAddEmp">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
......
...@@ -3,30 +3,30 @@ ...@@ -3,30 +3,30 @@
</template> </template>
<script> <script>
import * as echarts from "echarts"; import * as echarts from 'echarts'
export default { export default {
name: "echartCircle", name: 'echartCircle',
props: { props: {
coustomId: { coustomId: {
type: String, type: String,
default: "", default: ''
}, },
bgColor1: { bgColor1: {
type: String, type: String,
default: "", default: ''
}, },
bgColor2: { bgColor2: {
type: String, type: String,
default: "", default: ''
}, },
coustomCount: { coustomCount: {
type: String, type: String
}, }
}, },
data() { data() {
return {}; return {}
}, },
watch: { watch: {
coustomCount() { coustomCount() {
...@@ -35,33 +35,33 @@ export default { ...@@ -35,33 +35,33 @@ export default {
}, },
methods: { methods: {
getEchart() { getEchart() {
const chartDom = document.getElementById(this.coustomId); const chartDom = document.getElementById(this.coustomId)
const myChart = echarts.init(chartDom); const myChart = echarts.init(chartDom)
let option; let option
option = { option = {
series: [ series: [
{ {
type: "pie", type: 'pie',
radius: ["40%", "70%"], radius: ['40%', '70%'],
hoverAnimation: false, hoverAnimation: false,
avoidLabelOverlap: false, avoidLabelOverlap: false,
color: [this.bgColor1, this.bgColor2], color: [this.bgColor1, this.bgColor2],
label: { label: {
show: false, show: false,
position: "center", position: 'center'
}, },
labelLine: { labelLine: {
show: false, show: false
},
data: [{ value: 100 }, { value: this.coustomCount}],
}, },
], data: [{ value: 100 - this.coustomCount }, { value: this.coustomCount }]
}; }
]
}
option && myChart.setOption(option); option && myChart.setOption(option)
},
} }
}; }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -88,7 +88,14 @@ ...@@ -88,7 +88,14 @@
<div class="form-tips">70字內(含70字)计一条,超过70字,按70字/条计费。</div> <div class="form-tips">70字內(含70字)计一条,超过70字,按70字/条计费。</div>
<div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按{{ content.length }}条短信发送且计费。</div> <div class="form-tips">提示:当前短信已有{{ addForm.content.length }}字,按{{ content.length }}条短信发送且计费。</div>
</el-form-item> </el-form-item>
<el-form-item label="自动打标签"> <div class="drainage-form-item">
<label style="width: 100px; text-align: left; color: #666">
自动打标签
<el-popover placement="top" width="400" trigger="hover" content="提示:通过该营销活动添加员工企微的客户,将自动使用以下标签进行标记。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</label>
<div class="tag-item-panel" v-if="editStatus"> <div class="tag-item-panel" v-if="editStatus">
<div> <div>
<el-button size="small" @click="handleAddTag">添加</el-button> <el-button size="small" @click="handleAddTag">添加</el-button>
...@@ -108,12 +115,17 @@ ...@@ -108,12 +115,17 @@
</div> </div>
</template> </template>
</div> </div>
</el-form-item> </div>
</el-form> </el-form>
</div> </div>
</div> </div>
<div class="drainage-form-item" v-if="editStatus"> <div class="drainage-form-item" v-if="editStatus">
<label class="is-require">跟进员工</label> <label class="is-require">
跟进员工
<el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</label>
<div style="position: relative"> <div style="position: relative">
<el-button size="small" @click="handleAddEmp"> <el-button size="small" @click="handleAddEmp">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
...@@ -130,7 +142,12 @@ ...@@ -130,7 +142,12 @@
</div> </div>
</div> </div>
<div class="drainage-form-item" v-else> <div class="drainage-form-item" v-else>
<label>跟进员工</label> <label>
跟进员工
<el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</label>
<div class="drainage-emp" v-if="addForm.staffIds.length"> <div class="drainage-emp" v-if="addForm.staffIds.length">
<div :key="index" v-for="(item, index) in addForm.staffIds"> <div :key="index" v-for="(item, index) in addForm.staffIds">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
...@@ -192,13 +209,12 @@ ...@@ -192,13 +209,12 @@
</div> </div>
<div <div
class="footer-panel" class="footer-panel"
v-if="editStatus"
:style="{ :style="{
left: footerLeft + 'px', left: footerLeft + 'px',
width: footerWidth + 'px' width: footerWidth + 'px'
}" }"
> >
<el-button type="primary" @click="handleSave">提交</el-button> <el-button type="primary" @click="handleSave" v-if="editStatus">提交</el-button>
<el-button @click="goback">取消</el-button> <el-button @click="goback">取消</el-button>
</div> </div>
<select-emp ref="selectEmpForm" @selectTable="selectTable"></select-emp> <select-emp ref="selectEmpForm" @selectTable="selectTable"></select-emp>
...@@ -275,6 +291,13 @@ import welcomeWords from '@/components/welcome/welcomeWords.vue' ...@@ -275,6 +291,13 @@ import welcomeWords from '@/components/welcome/welcomeWords.vue'
import selectEmp from '@/components/selectEmp' import selectEmp from '@/components/selectEmp'
import selectTag from '@/components/selectTag' import selectTag from '@/components/selectTag'
import messageModel from '../market/components/messageModel' import messageModel from '../market/components/messageModel'
const validateTime = (rule, value, callback) => {
if ((new Date(`2000-1-1 ${value[1]}`).getTime() - new Date(`2000-1-1 ${value[0]}`).getTime()) / (1000 * 60) < 120) {
callback(new Error('因营销类短信内容需人工审核,建议预留2小时的营销时长。'))
} else {
callback()
}
}
export default { export default {
name: 'drainage', name: 'drainage',
components: { components: {
...@@ -289,6 +312,7 @@ export default { ...@@ -289,6 +312,7 @@ export default {
eventBus: new Vue(), eventBus: new Vue(),
autoWelcome: true, autoWelcome: true,
editStatus: false, editStatus: false,
saveStatus: false,
footerLeft: 0, footerLeft: 0,
footerWidth: 0, footerWidth: 0,
taggingLength: 0, taggingLength: 0,
...@@ -302,14 +326,18 @@ export default { ...@@ -302,14 +326,18 @@ export default {
tagging: [], tagging: [],
templateId: '' templateId: ''
}, },
previewListStart: [],
content: [], content: [],
dialogVisible: false, dialogVisible: false,
addValue: false, addValue: false,
empStatus: false, empStatus: false,
value1: false, value1: false,
dracImFollowStaffResponses: [{ codeId: null, imId: 5, staffId: 366, staffName: 'fddfdf' }], dracImFollowStaffResponses: [],
addRules: { addRules: {
time: [{ required: true, message: '请选择营销时间', trigger: 'change' }], time: [
{ required: true, message: '请选择营销时间', trigger: 'change' },
{ validator: validateTime, trigger: 'change' }
],
content: [{ required: true, message: '请选择短信模板', trigger: 'change' }] content: [{ required: true, message: '请选择短信模板', trigger: 'change' }]
} }
} }
...@@ -339,6 +367,12 @@ export default { ...@@ -339,6 +367,12 @@ export default {
} }
}, },
deep: true deep: true
},
addForm: {
handler() {
this.saveStatus = true
},
deep: true
} }
}, },
methods: { methods: {
...@@ -391,7 +425,17 @@ export default { ...@@ -391,7 +425,17 @@ export default {
.catch(() => {}) .catch(() => {})
}, },
goback() { goback() {
this.$router.push('/square/index') if (this.editStatus) {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$router.go(-1)
})
} else {
this.$router.go(-1)
}
}, },
//开关 //开关
handleSwitch() { handleSwitch() {
...@@ -523,6 +567,7 @@ export default { ...@@ -523,6 +567,7 @@ export default {
}) })
this.$refs.welcome.updateList(previewList) this.$refs.welcome.updateList(previewList)
} }
} }
}) })
}, },
...@@ -768,6 +813,11 @@ export default { ...@@ -768,6 +813,11 @@ export default {
margin-right: 20px; margin-right: 20px;
height: 36px; height: 36px;
line-height: 36px; line-height: 36px;
img {
width: 14px;
height: 14px;
vertical-align: middle;
}
&.is-require { &.is-require {
&::before { &::before {
content: '*'; content: '*';
......
...@@ -3,7 +3,7 @@ const packageName = require('./package.json').name ...@@ -3,7 +3,7 @@ const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production' const node_env = process.env.NODE_ENV === 'production'
const publicPath = node_env ? `/child/${packageName}/` : '/' const publicPath = node_env ? `/child/${packageName}/` : '/'
const resolve = dir => path.join(__dirname, dir) const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://cdn.bootcdn.net/' const CDN_DOMAIN = 'https://img02.glsx.com.cn/'
const cdn = { const cdn = {
css: [ css: [
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css` `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!