Commit 35ff2c93 by ym

new

1 parent d94870db
Showing 44 changed files with 4308 additions and 294 deletions
...@@ -7,8 +7,131 @@ ...@@ -7,8 +7,131 @@
* @returns * @returns
*/ */
import { http } from '@/main' import { http } from '@/main'
let session = 'mini-38b46ad7-4b83-4ee2-97d2-c18757812ca1-rop'
const getListApi = params => { const getListApi = params => {
params.method = 'cn.com.glsx.entmicro.staff.listFollowerStaffByPage' params.method = 'cn.com.glsx.entmicro.staff.listFollowerStaffByPage'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const getFollower = params => {
params.method = 'cn.com.glsx.entmicro.staff.listFollowerStaffByPage'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const querylabeltree = params => {
params.method = 'datahub.api.label.querylabeltree'
params.sessionId = session
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
const deleteChannelCodeBill = params => {
params.method = 'cn.com.glsx.entmicro.code.deleteChannelCodeBill'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const getSubCodeChannelCodeBill = params => {
params.method = 'cn.com.glsx.entmicro.code.getSubCodeChannelCodeBill'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const saveChannelCodeBill = params => {
params.method = 'cn.com.glsx.entmicro.code.saveChannelCodeBill'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const updateChannelCodeBill = params => {
params.method = 'cn.com.glsx.entmicro.code.updateChannelCodeBill'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const listChannelCodeBill = params => {
params.method = 'cn.com.glsx.entmicro.code.listChannelCodeBill'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const deleteChannelCode = params => {
params.method = 'cn.com.glsx.entmicro.code.deleteChannelCode'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const detailChannelCode = params => {
params.method = 'cn.com.glsx.entmicro.code.detailChannelCode'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const listChannelCodeByPage = params => {
params.method = 'cn.com.glsx.entmicro.code.listChannelCodeByPage'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const saveChannelCode = params => {
params.method = 'cn.com.glsx.entmicro.code.saveChannelCode'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const updateChannelCode = params => {
params.method = 'cn.com.glsx.entmicro.code.updateChannelCode'
params.sessionId = session
return http({ return http({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
...@@ -18,5 +141,16 @@ const getListApi = params => { ...@@ -18,5 +141,16 @@ const getListApi = params => {
} }
export default { export default {
getListApi, getListApi,
getFollower,
querylabeltree,
saveChannelCodeBill,
getSubCodeChannelCodeBill,
deleteChannelCodeBill,
updateChannelCode,
saveChannelCode,
listChannelCodeByPage,
detailChannelCode,
deleteChannelCode,
updateChannelCodeBill,
listChannelCodeBill
} }
\ No newline at end of file \ No newline at end of file
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
* @param {*} params * @param {*} params
* @returns * @returns
*/ */
import { http } from '@/main' import { http_common } from '@/main'
const pictureUpload = params => { const pictureUpload = params => {
params.method = "glsx.accounts.biz.common.pictureUpload" params.method = "glsx.accounts.biz.common.pictureUpload"
return http({ return http_common({
url: '/router?method=glsx.accounts.biz.common.pictureUpload', url: '/router?method=glsx.accounts.biz.common.pictureUpload',
method: 'POST', method: 'POST',
data: params, data: params,
......
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
let session = 'mini-38b46ad7-4b83-4ee2-97d2-c18757812ca1-rop'
const getCoupon = params => {
params.method = 'scrm.api.boutiquecoupon.coupon.page'
return http({
url: '/rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
const getMerchant = params => {
params.method = 'scrm.api.coupon.list.merchant'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
const getCard = params => {
params.method = 'scrm.api.equity.card.class.list.with.page'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const findAllByPage = params => {
params.method = 'org.ore.api.dracIm.findAllByPage'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const exportAdd = params => {
params.method = 'org.ore.api.dracIm.exportAdd'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const findById = params => {
params.method = 'org.ore.api.dracIm.findById'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const dracImMessage = params => {
params.method = 'org.ore.api.dracImMessage.findAllByCondition'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const listChannelCodeBill = params => {
params.method = 'cn.com.glsx.entmicro.code.listChannelCodeBill'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const addConfig = params => {
params.method = 'org.ore.api.dracImConfig.addConfig'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const findConfig = params => {
params.method = 'org.ore.api.dracImConfig.findConfig'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const updateConfig = params => {
params.method = 'org.ore.api.dracImConfig.updateConfig'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getCoupon,
getMerchant,
getCard,
listChannelCodeBill,
findAllByPage,
dracImMessage,
exportAdd,
findById,
updateConfig,
findConfig,
addConfig
}
\ No newline at end of file \ No newline at end of file
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
let session = 'mini-38b46ad7-4b83-4ee2-97d2-c18757812ca1-rop'
const codeDefault = params => {
params.method = 'org.ore.api.drac.statistic.code.default'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const listStaff = params => {
params.method = 'org.ore.api.drac.statistic.code.detail.list.staff'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const listTime = params => {
params.method = 'org.ore.api.drac.statistic.code.detail.list.time'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const detailTotal = params => {
params.method = 'org.ore.api.drac.statistic.code.detail.total'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const codeSearch = params => {
params.method = 'org.ore.api.drac.statistic.code.search'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const codeTrend = params => {
params.method = 'org.ore.api.drac.statistic.code.trend'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const dayTrend = params => {
params.method = 'org.ore.api.drac.statistic.day.trend'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const overview = params => {
params.method = 'org.ore.api.drac.statistic.overview'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
codeDefault,
listStaff,
listTime,
detailTotal,
codeSearch,
codeTrend,
dayTrend,
overview
}
\ No newline at end of file \ No newline at end of file
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
let session = 'mini-38b46ad7-4b83-4ee2-97d2-c18757812ca1-rop'
const importsUpload = params => {
params.method = 'org.ore.api.imports.upload'
params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const downloadModel = params => {
params.method = 'org.ore.api.imports.download.model'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const importsRecord = params => {
params.method = 'org.ore.api.imports.record.page'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const importsCount = params => {
params.method = 'org.ore.api.imports.count'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const importsKey = params => {
params.method = 'org.ore.api.imports.record.key'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
importsUpload,
downloadModel,
importsRecord,
importsCount,
importsKey
}
\ No newline at end of file \ No newline at end of file
<template>
<div>
<el-dialog :title="title" :visible.sync="isVisible" :before-close="handleClose" :close-on-click-modal="false" :width="width" :show-close="isShowCloseBtn" class="app-dialog">
<!-- :modal-append-to-body="false"
:append-to-body="true" -->
<div class="container">
<slot></slot>
</div>
<div slot="footer">
<slot name="btn-front"></slot>
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="handleConfirm" :loading="btnLoading">{{ btnOkLabel }}</el-button>
<el-button v-if="isShowThirdBtn" @click="btnClick">创建标签</el-button>
<slot name="btn-behind"></slot>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'basic-dialog',
props: {
title: {
type: String,
default: ''
},
isShowCloseBtn: {
type: Boolean,
default: false
},
isShowThirdBtn: {
type: Boolean,
default: false
},
isVisible: {
type: Boolean,
default: false
},
btnOkLabel: {
type: String,
default: '确定'
},
width: {
type: String,
default: '580px'
},
btnLoading: {
type: Boolean,
default: false
}
},
methods: {
handleClose() {
this.$emit('closeDialog')
},
handleConfirm() {
this.$emit('confirmDialog')
},
btnClick() {
this.$emit('btnEvent')
}
}
}
</script>
<style lang="scss">
.app-dialog {
.el-dialog__header {
padding: 20px 20px 10px;
}
.el-dialog__footer {
padding: 15px;
background: #fff;
}
.el-dialog__body {
padding: 0;
border-top: 1px solid #eaeefb;
border-bottom: 1px solid #eaeefb;
min-height: 250px;
max-height: 636px;
overflow-y: auto;
.container {
> span {
display: block;
}
overflow-y: auto;
// max-height: 638px;
padding: 20px 20px;
}
&::-webkit-scrollbar {
width: 10px;
height: 10px;
}
/*正常情况下滑块的样式*/
&::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.05);
border-radius: 10px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在该类指向的控件上时滑块的样式*/
&::-webkit-scrollbar-thumb {
// background-color: rgba(0, 0, 0, 0.2);
background: #e9e8ff;
border-radius: 10px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在滑块上时滑块的样式*/
// &::-webkit-scrollbar-thumb:hover {
// background-color: rgba(0, 0, 0, 0.4);
// box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
// }
/*正常时候的主干部分*/
&::-webkit-scrollbar-track {
border-radius: 10px;
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
background-color: white;
}
/*鼠标悬浮在滚动条上的主干部分*/
&::-webkit-scrollbar-track:hover {
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4);
background-color: rgba(0, 0, 0, 0.01);
}
}
}
</style>
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
import Vue from 'vue' import Vue from 'vue'
// 导入权限按钮 // 导入权限按钮
import _button from '@/components/glsx-button/index' import _button from '@/components/glsx-button/index'
import glsxTable from '@/components/glsx-table/index.vue' Vue.component('basic-dialog', () =>
import ('./basic-dialog/index.vue'))
Vue.component('glsx-button', _button) Vue.component('glsx-button', _button)
// Vue.component('glsx-table', glsxTable) // Vue.component('glsx-table', glsxTable)
\ No newline at end of file \ No newline at end of file
<template>
<div class="square-main">
<el-dialog
title="选择跟进专员"
:visible.sync="dialogVisible"
width="50%"
:before-close="handleClose"
>
<el-form :inline="true" :model="tableSearchForm" label-width="80px">
<el-form-item size="small" label="员工">
<el-input
v-model="tableSearchForm.staffName"
placeholder="请输入员工姓名"
></el-input>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable
ref="table"
:layout="layout"
:tableData="tableData"
:tableTotal="tableTotal"
:pageConf="pageConf"
:tableParams="tableParams"
@refreshTable="handleSearch"
@selectionTable="selectionTable"
>
</GLTable>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "selectEmp",
data() {
return {
dialogVisible: false,
tableSearchForm: {},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "total" },
tableParams: {
listName: "data",
tableOption: false,
// 行数据的key
mutiSelectUniqueKey: "id",
// 多选ref的名称
mutiSelectName: "salelist",
tableColumns: [
{
label: "姓名",
prop: "staffName",
},
{
label: "部门",
prop: "departmentName",
},
{
label: "测试专员类型",
prop: "followerTypeName",
},
],
},
layout: "sizes, prev, pager, next, jumper, ->, total",
tableData: [],
tableTotal: 0,
selectItem: [],
};
},
methods: {
getFollower() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
};
this.$apis.channel.getFollower(params).then((res) => {
console.log(res);
this.tableData = res.data;
this.tableTotal = res.count;
});
},
init() {
this.dialogVisible = true;
this.$nextTick(() => {
this.getFollower();
});
},
handleSearch() {
this.getFollower();
},
selectionTable(val) {
this.selectItem = val;
},
handleSelect() {
this.dialogVisible = false;
this.$emit("selectTable", this.selectItem);
},
},
};
</script>
<style lang="scss" scoped></style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="tag-main">
<el-dialog
title="选择标签"
:visible.sync="dialogVisible"
width="70%"
:before-close="handleClose"
>
<div class="tag-panel">
<div class="tag-panel-select">
<div class="tag-title">预选标签</div>
<div class="tag-select-box">
<div class="tag-box-header">
<el-input
size="small"
v-model="labelGroupName"
placeholder="请输入搜索内容"
>
</el-input>
<el-button size="small" type="primary" @click="handleSearch"
>查询</el-button
>
</div>
<div class="checkbox-group-box" :style="{ 'max-height': heightBox + 'px' }">
<div 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>
<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
>
<div style="margin: 15px 0"></div>
<el-checkbox-group
class="tag-group"
v-model="item.tagChecked"
@change="handleCheckedChange(item.tagChecked, index)"
v-show="item.checked"
>
<el-checkbox
v-for="(itm, idx) in item.labelList"
:label="itm"
:key="idx"
>{{ itm.name }}</el-checkbox
>
</el-checkbox-group>
</div>
</div>
</div>
</div>
<div class="tag-panel-selected">
<div class="tag-title">已选标签</div>
<div class="tag-select-box">
<div class="tag-box-header">标签名称({{ selectNum }}项)</div>
<div class="tag-selected-box">
<template v-for="item in labelTreeRets">
<el-tag
class="tag-selected-item"
v-for="(tag, idx) in item.tagChecked"
:key="idx"
closable
:disable-transitions="false"
@close="remove(item, idx)"
>
{{ tag.name }}
</el-tag>
</template>
</div>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="dialogVisible = false"
>确 定</el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "activityModel",
data() {
return {
heightBox: 200,
dialogVisible: false,
labelGroupName: "",
selectNum: 0,
labelTreeRets: [
{
labelGroup: { id: "109", name: "湖口123" },
labelList: [
{ id: "372", name: "12345678" },
{ id: "371", name: "7654321" },
{ id: "370", name: "1234567" },
],
checked: false,
tagChecked: [],
isIndeterminate: false,
checkAll: false,
},
{
labelGroup: { id: "65", name: "自店标签111" },
labelList: [
{ id: "179", name: "标签44" },
{ id: "178", name: "标签33" },
{ id: "176", name: "标签1112" },
],
checked: false,
tagChecked: [],
isIndeterminate: false,
checkAll: false,
},
],
};
},
watch: {
labelTreeRets: {
handler() {
this.selectNum = 0;
this.labelTreeRets.forEach((item) => {
this.selectNum += item.tagChecked.length;
});
},
deep: true,
},
},
methods: {
init() {
this.dialogVisible = true;
this.querylabeltree();
},
handleSearch() {
this.querylabeltree();
},
querylabeltree() {
this.$apis.channel
.querylabeltree({
labelTreeReq: {
pageNum: 1,
pageSize: 1000,
shopId: this.$globalState.session.merchantId,
labelGroupName: this.labelGroupName,
},
})
.then((res) => {
console.log(res);
this.labelTreeRets = res.labelTreeRets.map((item) => {
return {
labelGroup: item.labelGroup,
labelList: item.labelList,
checked: false,
tagChecked: [],
isIndeterminate: false,
checkAll: false,
};
});
});
},
remove(item, idx) {
item.tagChecked.splice(idx, 1);
if (item.tagChecked.length == 0) item.checkAll = false;
},
//全选
handleCheckAllChange(val, index) {
if (val) {
this.labelTreeRets[index].tagChecked = [];
for (let i in this.labelTreeRets[index].labelList) {
this.labelTreeRets[index].tagChecked.push(
this.labelTreeRets[index].labelList[i]
);
}
} else {
this.labelTreeRets[index].tagChecked = [];
}
this.labelTreeRets[index].isIndeterminate = false;
},
//选中
handleCheckedChange(value, index) {
let checkedCount = value.length;
this.labelTreeRets[index].checkAll =
checkedCount === this.labelTreeRets[index].labelList.length;
this.labelTreeRets[index].isIndeterminate =
checkedCount > 0 && checkedCount < this.labelTreeRets[index].labelList.length;
},
},
mounted() {
let clientHeight = document.documentElement.clientHeight;
this.heightBox = clientHeight - 0.15 * clientHeight - 300;
},
};
</script>
<style lang="scss" scoped>
.tag-panel {
display: flex;
.tag-panel-select {
width: 60%;
/deep/ {
.el-checkbox__label {
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
word-wrap: break-word;
}
}
}
.tag-panel-selected {
width: 40%;
margin-left: 10px;
.tag-box-header {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
padding-left: 20px !important;
}
}
.tag-title {
font-size: 16px;
font-weight: 400;
color: #333333;
line-height: 22px;
}
.tag-select-box {
margin-top: 10px;
border-radius: 2px;
border: 1px solid #eeeeee;
padding: 6px;
.tag-box-header {
box-sizing: border-box;
display: flex;
height: 56px;
align-items: center;
border-bottom: 1px solid #eeeeee;
margin: -6px;
margin-bottom: 10px;
padding: 0px 6px;
/deep/ {
.el-input {
width: 60%;
margin-right: 10px;
}
}
}
.tag-selected-item {
margin: 0px 6px 6px 0px;
height: 26px;
line-height: 22px;
}
.el-tree-node__expand-icon {
color: #5850ff;
font-size: 16px;
}
.tag-group {
margin-left: 40px;
.el-checkbox {
width: 40%;
margin-bottom: 6px;
display: flex;
align-items: center;
}
}
}
}
.checkbox-group-box {
overflow: auto;
}
.tag-selected-box {
min-height: 200px;
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -17,7 +17,7 @@ export const fetchConfig = function(isEnv = true) { ...@@ -17,7 +17,7 @@ export const fetchConfig = function(isEnv = true) {
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
// return Promise.resolve(cfg) // return Promise.resolve(cfg)
// } // }
return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config') return new Http().get(' https://oss-config.test.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config')
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -18,3 +18,4 @@ start() ...@@ -18,3 +18,4 @@ start()
export { bootstrap, mount, unmount } export { bootstrap, mount, unmount }
from '@/setup' from '@/setup'
export const http = params => Vue.prototype.$http(params) export const http = params => Vue.prototype.$http(params)
export const http_common = params => Vue.prototype.$http_common(params)
\ No newline at end of file \ No newline at end of file
...@@ -5,17 +5,17 @@ const staticRoutes = Object.freeze([{ ...@@ -5,17 +5,17 @@ const staticRoutes = Object.freeze([{
meta: {}, meta: {},
}, { }, {
name: 'channel', name: 'channel',
path: '/channel/store', path: '/channel/store/:id?/:codeUuid?',
component: resolve => require([`@/views/channel/store.vue`], resolve), component: resolve => require([`@/views/channel/store.vue`], resolve),
meta: {} meta: {}
}, { }, {
name: 'addCode', name: 'addCode',
path: '/channel/addCode', path: '/channel/addCode/:id?/:codeUuid?',
component: resolve => require([`@/views/channel/addCode.vue`], resolve), component: resolve => require([`@/views/channel/addCode.vue`], resolve),
meta: {} meta: {}
}, { }, {
name: 'poster', name: 'poster',
path: '/channel/poster', path: '/channel/poster/:id?',
component: resolve => require([`@/views/channel/poster.vue`], resolve), component: resolve => require([`@/views/channel/poster.vue`], resolve),
meta: {} meta: {}
}, { }, {
...@@ -30,7 +30,7 @@ const staticRoutes = Object.freeze([{ ...@@ -30,7 +30,7 @@ const staticRoutes = Object.freeze([{
meta: {} meta: {}
}, { }, {
name: 'importResult', name: 'importResult',
path: '/square/importResult', path: '/square/importResult/:id?',
component: resolve => require([`@/views/square/importResult.vue`], resolve), component: resolve => require([`@/views/square/importResult.vue`], resolve),
meta: {} meta: {}
}, { }, {
...@@ -44,9 +44,19 @@ const staticRoutes = Object.freeze([{ ...@@ -44,9 +44,19 @@ const staticRoutes = Object.freeze([{
component: resolve => require([`@/views/marketing/index.vue`], resolve), component: resolve => require([`@/views/marketing/index.vue`], resolve),
meta: {} meta: {}
}, { }, {
name: 'config',
path: '/marketing/config/:id?',
component: resolve => require([`@/views/marketing/config.vue`], resolve),
meta: {}
}, {
name: 'overview', name: 'overview',
path: '/overview/index', path: '/overview/index',
component: resolve => require([`@/views/overview/index.vue`], resolve), component: resolve => require([`@/views/overview/index.vue`], resolve),
meta: {} meta: {}
}, {
name: 'friends',
path: '/friends/index',
component: resolve => require([`@/views/friends/index.vue`], resolve),
meta: {}
}]) }])
export default staticRoutes export default staticRoutes
\ No newline at end of file \ No newline at end of file
...@@ -15,13 +15,13 @@ let routes = [] ...@@ -15,13 +15,13 @@ let routes = []
let router = null let router = null
let instance = null let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState }) { export async function bootstrap({ name, id, history, common, messenger, globalState }) {
const { response, request, sign, secret } = await fetchConfig() const { response, request, sign, secret, request_common, sign_common } = await fetchConfig()
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
Vue.prototype.$common = common Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers) const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData) routes = getRoutes(routesData)
......
...@@ -17,7 +17,7 @@ import { routes } from '@/router' ...@@ -17,7 +17,7 @@ import { routes } from '@/router'
export async function start() { export async function start() {
if (window.__POWERED_BY_QIANKUN__) return if (window.__POWERED_BY_QIANKUN__) return
const { response, request, sign, secret } = await fetchConfig() const { response, request, sign, secret } = await fetchConfig()
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: '1112223333444' } }) Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error })
// Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) // Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
render('/', routes) render('/', routes)
} }
\ No newline at end of file \ No newline at end of file
...@@ -32,5 +32,36 @@ util.getBeforeMonth = function(days) { ...@@ -32,5 +32,36 @@ util.getBeforeMonth = function(days) {
month-- month--
} }
return arr; return arr;
}
/**
* 格式化时间
* @param {Array} time
*/
util.formatTime = function(time) {
return {
startTime: time ? time[0] + ' ' + '00:00:00' : '',
endTime: time ? time[1] + ' ' + '23:59:59' : ''
}
}
util.downloadIamge = function(imgsrc, name = new Date().getTime()) {
//下载图片地址和图片名
var image = new Image();
// 解决跨域 Canvas 污染问题
image.setAttribute("crossOrigin", "anonymous");
image.onload = function() {
var canvas = document.createElement("canvas");
canvas.width = image.width;
canvas.height = image.height;
var context = canvas.getContext("2d");
context.drawImage(image, 0, 0, image.width, image.height);
var url = canvas.toDataURL("image/png"); //得到图片的base64编码数据
var a = document.createElement("a"); // 生成一个a元素
var event = new MouseEvent("click"); // 创建一个单击事件
a.download = name || "photo"; // 设置图片名称
a.href = url; // 将生成的URL设置为a.href属性
a.dispatchEvent(event); // 触发a的单击事件
};
image.src = imgsrc;
} }
export default util export default util
\ No newline at end of file \ No newline at end of file
...@@ -8,13 +8,13 @@ ...@@ -8,13 +8,13 @@
:model="addCodeForm" :model="addCodeForm"
class="code-body-form" class="code-body-form"
label-width="120px" label-width="120px"
:rules="baseRules" :rules="codeRules"
> >
<el-row> <el-row>
<el-form-item label="渠道名称" prop="name"> <el-form-item label="渠道名称" prop="codeState">
<el-input <el-input
size="small" size="small"
v-model="addCodeForm.name" v-model="addCodeForm.codeState"
placeholder="请输入渠道名称" placeholder="请输入渠道名称"
></el-input> ></el-input>
</el-form-item> </el-form-item>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<el-form-item label="备注"> <el-form-item label="备注">
<el-input <el-input
size="small" size="small"
v-model="addCodeForm.name" v-model="addCodeForm.codeRemark"
placeholder="请输入备注" placeholder="请输入备注"
></el-input> ></el-input>
<div class="form-tips">设置备注,便于后续管理查找</div> <div class="form-tips">设置备注,便于后续管理查找</div>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<el-row> <el-row>
<el-form-item label="自动通过验证"> <el-form-item label="自动通过验证">
<el-switch <el-switch
v-model="addCodeForm.value" v-model="addCodeForm.autoAdd"
active-color="#5850FF" active-color="#5850FF"
inactive-color="#999999" inactive-color="#999999"
> >
...@@ -42,20 +42,25 @@ ...@@ -42,20 +42,25 @@
</el-row> </el-row>
<el-row> <el-row>
<el-form-item label="选择标签"> <el-form-item label="选择标签">
<el-button size="small" @click="handleAddEmp" <el-button size="small" @click="handleAddTag"
><i class="el-icon-plus"></i> 选择标签</el-button ><i class="el-icon-plus"></i> 选择标签</el-button
> >
<span class="form-tips-btn">已选择<span>8</span>个标签</span> <span class="form-tips-btn"
>已选择<span>{{ taggingLength }}</span
>个标签</span
>
<div class="el-input-tag input-tag-wrapper"> <div class="el-input-tag input-tag-wrapper">
<template v-for="item in tagging">
<el-tag <el-tag
v-for="(tag, idx) in innerTags" v-for="(tag, idx) in item.labelList"
:key="idx" :key="idx"
closable closable
:disable-transitions="false" :disable-transitions="false"
@close="remove(tag)" @close="removeTag(item.labelList, idx)"
> >
{{ tag.staffName }} {{ tag.name }}
</el-tag> </el-tag>
</template>
</div> </div>
</el-form-item> </el-form-item>
</el-row> </el-row>
...@@ -64,14 +69,17 @@ ...@@ -64,14 +69,17 @@
<el-button size="small" @click="handleAddEmp" <el-button size="small" @click="handleAddEmp"
><i class="el-icon-plus"></i> 选择专员</el-button ><i class="el-icon-plus"></i> 选择专员</el-button
> >
<span class="form-tips-btn">已选择<span>8</span>人</span> <span class="form-tips-btn"
>已选择<span>{{ staffInfo.length }}</span
>人</span
>
<div class="el-input-tag input-tag-wrapper"> <div class="el-input-tag input-tag-wrapper">
<el-tag <el-tag
v-for="(tag, idx) in innerTags" v-for="(tag, idx) in staffInfo"
:key="idx" :key="idx"
closable closable
:disable-transitions="false" :disable-transitions="false"
@close="remove(tag)" @close="removeStaff(idx)"
> >
{{ tag.staffName }} {{ tag.staffName }}
</el-tag> </el-tag>
...@@ -82,7 +90,8 @@ ...@@ -82,7 +90,8 @@
</div> </div>
</div> </div>
<div class="channel-main-welcome scrm-box-f"> <div class="channel-main-welcome scrm-box-f">
<div class="chanel-form-title">欢迎语</div> <!-- <div class="chanel-form-title">欢迎语</div> -->
<WelcomeWords :eventBus="eventBus"></WelcomeWords>
</div> </div>
<div <div
class="footer-panel" class="footer-panel"
...@@ -91,42 +100,129 @@ ...@@ -91,42 +100,129 @@
width: footerWidth + 'px', width: footerWidth + 'px',
}" }"
> >
<el-button type="primary">返回</el-button> <el-button type="primary" @click="goback">返回</el-button>
<el-button type="primary">提交</el-button> <el-button type="primary" @click="handleSave">提交</el-button>
<el-button type="primary">取消</el-button> <el-button type="primary" @click="goback">取消</el-button>
<el-button
type="primary"
v-show="active == 2 && statusQrcode != 'SUCCESS'"
@click="handleNext"
>确定</el-button
>
<el-button
type="primary"
v-show="active == 2 && statusQrcode == 'SUCCESS'"
@click="handleNext"
>下一步</el-button
>
</div> </div>
<select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp>
<select-tag ref="selectTagForm"></select-tag>
</div> </div>
</template> </template>
<script> <script>
import Vue from "vue";
import selectEmp from "@/components/selectEmp";
import selectTag from "@/components/selectTag";
import welcomeWords from "./components/welcomeWords.vue";
export default { export default {
name: "addCode", name: "addCode",
components: { welcomeWords, selectEmp, selectTag },
data() { data() {
return { return {
addCodeForm: {}, eventBus: new Vue(),
addCodeForm: {
codeState: "",
codeRemark: "",
autoAdd: false,
welcomeInfo: [],
},
staffInfo: [
{
id: null,
codeId: 2,
staffId: 365,
staffName: "杨林龙",
delFlag: 0,
createdBy: null,
createdTime: null,
},
],
tagging: [],
taggingLength: 0,
codeId: null,
footerLeft: 0, footerLeft: 0,
footerWidth: 0, footerWidth: 0,
innerTags: [{ staffName: "等级考试" }], codeRules: {
codeState: [{ required: true, message: "请输入渠道名称", trigger: "blur" }],
},
};
},
watch: {
tagging: {
handler() {
this.taggingLength = 0;
this.tagging.forEach((item) => {
this.taggingLength += item.labelList.length;
});
},
deep: true,
},
},
methods: {
goback() {
this.$router.push("/channel/index");
},
removeTag(item, idx) {
item.splice(idx, 1);
},
removeStaff(index) {
this.staffInfo.splice(index, 1);
},
handleAddEmp() {
this.$refs.selectEmpForm.init();
},
handleAddTag() {
this.$refs.selectTagForm.init();
},
selectTable(item) {
this.staffInfo = item;
},
handleSave() {
this.$refs['codeForm'].validate((valid) => {
if (valid) {
let param = Object.assign({ id: this.codeId }, this.addCodeForm);
param.tagging = JSON.stringify(this.tagging);
param.autoWelcome = 0;
let staffId = [];
this.staffInfo.forEach((item) => {
staffId.push(item.relationId);
});
let channel;
if (this.codeId) {
channel = "updateChannelCode";
} else {
channel = "saveChannelCode";
}
delete param.staffInfo;
param.staffId = staffId.join(",");
param.autoAdd ? (param.autoAdd = 1) : (param.autoAdd = 0);
this.$apis.channel[channel](param).then((res) => {
if (res) this.$router.push("/channel/index");
});
}
});
},
detailChannelCode(id, codeUuid) {
let param = {
id,
codeUuid,
}; };
this.$apis.channel.detailChannelCode(param).then((res) => {
this.addCodeForm = Object.assign({}, res);
this.staffInfo = res.staffInfo;
this.tagging = eval("(" + res.tagging + ")");
});
},
}, },
methods: {},
mounted() { mounted() {
const { id, codeUuid } = this.$route.params;
if (id) {
this.codeId = id;
this.detailChannelCode(id, codeUuid);
}
this.footerLeft = document.querySelector(".base-container-right").offsetLeft; this.footerLeft = document.querySelector(".base-container-right").offsetLeft;
this.footerWidth = document.documentElement.clientWidth - this.footerLeft; this.footerWidth = document.documentElement.clientWidth - this.footerLeft;
} },
}; };
</script> </script>
...@@ -154,6 +250,7 @@ export default { ...@@ -154,6 +250,7 @@ export default {
} }
.code-body-form { .code-body-form {
padding: 20px; padding: 20px;
width: 60%;
.form-tips { .form-tips {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
......
<template> <template>
<div> <div>
<div class="form-header"> <div class="form-header">
<el-button type="primary" size="small" icon="el-icon-add">新建渠道活码</el-button> <el-button type="primary" size="small" icon="el-icon-add" @click="handleAddCode"
>新建渠道活码</el-button
>
</div> </div>
<div class="form-panel scrm-box-f"> <div class="form-panel scrm-box-f">
<el-form <el-form
...@@ -14,7 +16,7 @@ ...@@ -14,7 +16,7 @@
<el-form-item size="small" label="渠道名称"> <el-form-item size="small" label="渠道名称">
<el-input <el-input
size="small" size="small"
v-model="tableSearchForm.merchantLoginAccount" v-model="tableSearchForm.codeStateAndRemark"
placeholder="请输入渠道名称" placeholder="请输入渠道名称"
> >
</el-input> </el-input>
...@@ -34,72 +36,91 @@ ...@@ -34,72 +36,91 @@
> >
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">数据</el-button> <el-button type="text" @click="handleDetail(scope.scope)">数据</el-button>
<el-button type="text" @click="handleEdit(2, scope.scope)">修改</el-button> <el-button type="text" @click="handleEdit(scope.scope)">修改</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> <el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
<el-button type="text" @click="handleAddPoster(scope.scope)"
>活码海报</el-button
>
</div>
<div slot="staffInfo" slot-scope="scope">
<div
class="accountType-row"
v-for="(item, index) in scope.scope.staffInfo"
:key="index"
>
{{ item.staffName }}
</div>
</div>
<div slot="qrCode" slot-scope="scope">
<img :src="scope.scope.qrCode" style="width: 80px; height: 80px" />
<div class="download-link" @click="downloadIamge(scope.scope.qrCode)">
下载二维码
</div>
</div> </div>
<template slot="otherOptions" slot-scope="scope"> <div slot="tagging" slot-scope="scope">
<el-popover placement="top" width="180" trigger="hover"> <template v-if="scope.scope.tagging">
<p>启用前,你可先为该员工创建角色,配置其所需的功能权限。如下所示:</p> <!-- <div v-for="(item,index) in scope.scope.tagging)" :key="index">
<p>1. 角色管理-创建角色</p> <span v-for="(tag, idx) in item.labelList" :key="idx">{{tag.name}}</span>
<p>2. 选择员工账户-修改角色</p> </div> -->
<el-switch
:size="size"
slot="reference"
v-model="scope.scope.statusName"
active-value="启用"
inactive-value="禁用"
@change="(e) => handleSwitchChange(e, scope.scope)"
></el-switch>
</el-popover>
</template> </template>
</div>
<div slot="codeRemark" slot-scope="scope">
<div class="codeState">{{ scope.scope.codeState }}</div>
<div class="codeRemark">备注:{{ scope.scope.codeRemark }}</div>
</div>
</GLTable> </GLTable>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import util from "@/utils/util";
export default { export default {
name: "channelList", name: "channelList",
data() { data() {
return { return {
tableSearchForm: {}, tableSearchForm: {},
getListApi: this.$apis.channel.getListApi, getListApi: this.$apis.channel.listChannelCodeByPage,
tableParams: { tableParams: {
listName: "data", listName: "data",
tableOption: false, tableOption: false,
otherOptions: {
label: "启用开关",
},
tableColumns: [ tableColumns: [
{ {
label: "渠道名称", label: "渠道名称",
prop: "staffName", prop: "codeRemark",
addHtml: "codeRemark",
}, },
{ {
label: "昨日新增客户数", label: "昨日新增客户数",
prop: "entmicroName", prop: "yesterdayNum",
minWidth: "100px", width: "120px",
}, },
{ {
label: "总新增客户数", label: "总新增客户数",
prop: "roleName", prop: "totalNum",
width: "150px",
}, },
{ {
label: "使用人员", label: "使用人员",
prop: "staffPhone", prop: "staffInfo",
width: "130px", width: "130px",
addHtml: "staffInfo",
align: 'left'
}, },
{ {
label: "活码", label: "活码",
prop: "merchantName", prop: "qrCode",
addHtml: "qrCode",
}, },
{ {
label: "标签", label: "标签",
prop: "belongingEntmicroName", prop: "tagging",
addHtml: "tagging",
}, },
{ {
label: "创建时间", label: "创建时间",
prop: "statusName", prop: "createdTime",
width: "160px",
}, },
{ {
label: "操作", label: "操作",
...@@ -107,14 +128,7 @@ export default { ...@@ -107,14 +128,7 @@ export default {
width: "140px", width: "140px",
addHtml: "optionBtns", addHtml: "optionBtns",
fixed: "right", fixed: "right",
}, }
{
label: "启用开关",
prop: "otherOptions",
width: "80px",
addHtml: "otherOptions",
fixed: "right",
},
], ],
}, },
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" }, pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
...@@ -126,7 +140,68 @@ export default { ...@@ -126,7 +140,68 @@ export default {
}; };
}, },
methods: { methods: {
handleSearch() {}, handleDetail(scope) {
this.$router.push("/channel/store/" + scope.id + "/" + scope.codeUuid);
},
handleEdit(scope) {
this.$router.push("/channel/addCode/" + scope.id + "/" + scope.codeUuid);
},
handleSearch() {
this.$refs.employeeRef.refreshTable();
},
handleAddCode() {
this.$router.push("/channel/addCode");
},
handleAddPoster(scope) {
this.$router.push("/channel/poster/" + scope.id);
},
downloadIamge(imgsrc) {
util.downloadIamge(imgsrc);
},
handleSwitchChange(scope) {
this.$confirm("是否删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$apis.channel.deleteChannelCode({ id: scope.id }).then((res) => {
if (res) {
this.$message({
type: "success",
message: "删除成功!",
});
}
this.handleSearch();
});
})
.catch(() => {});
},
handleDelete(scope) {
this.$confirm("是否删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$apis.channel
.deleteChannelCode({
id: scope.id,
codeUuid: scope.codeUuid,
configId: scope.configId,
})
.then((res) => {
if (res) {
this.$message({
type: "success",
message: "删除成功!",
});
}
this.handleSearch();
});
})
.catch(() => {});
},
}, },
}; };
</script> </script>
...@@ -138,4 +213,33 @@ export default { ...@@ -138,4 +213,33 @@ export default {
.form-panel { .form-panel {
padding: 10px; padding: 10px;
} }
.download-link {
cursor: pointer;
margin-top: 6px;
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
}
.codeRemark {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
.accountType-row {
text-align: left;
position: relative;
padding-left: 15px;
&::before {
content: "";
position: absolute;
width: 6px;
height: 6px;
background: #5850ff;
border-radius: 8px;
left: 0px;
top: 7px;
}
}
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -49,87 +49,110 @@ ...@@ -49,87 +49,110 @@
<div class="chart-title-time">昨日</div> <div class="chart-title-time">昨日</div>
<div class="chart-title-num">各渠道新增客户数</div> <div class="chart-title-num">各渠道新增客户数</div>
</div> </div>
<div class="chart-desc-item" v-for="(item,index) in chartItem" :key="index"> <div class="chart-desc-item" v-for="(item, index) in selectItem" :key="index">
<div class="chart-item-title"><span>-</span> {{item.name}}</div> <div class="chart-item-title"><span>-</span> {{ item.codeState }}</div>
<div class="chart-item-num">{{item.num}}</div> <div class="chart-item-num">{{ item.newlyCount }}</div>
</div> </div>
</div> </div>
<div> <div>
<div class="chart-desc-add">+选择查看渠道</div> <div class="chart-desc-add" @click="handleChannel">+选择查看渠道</div>
<div class="chart-desc-addNum">最多同时查看8个渠道数据</div> <div class="chart-desc-addNum">最多同时查看8个渠道数据</div>
</div> </div>
</div> </div>
</div> </div>
<GLTable <GLTable
ref="employeeRef" ref="table"
:getListApi="getListApi" :layout="layout"
:searchForm="tableSearchForm" :tableData="tableData"
:tableParams="tableParams" :tableTotal="tableTotal"
:pageConf="pageConf" :pageConf="pageConf"
:beforeSearchFn="beforeSearchFn" :tableParams="tableParams"
@refreshTable="handleSearch"
> >
</GLTable> </GLTable>
<select-channel ref="channelForm" @selectTable="selectTable"></select-channel>
</div> </div>
</template> </template>
<script> <script>
import linechart from "./linechart"; import linechart from "./linechart";
import selectChannel from "./selectChannel";
export default { export default {
name: "channelStatistics", name: "channelStatistics",
components: { components: {
linechart linechart,
selectChannel,
}, },
data() { data() {
return { return {
chartItem: [{
name: '到店咨询客户',
num: 10
},{
name: '到店咨询客户',
num: 10
},{
name: '到店咨询客户',
num: 10
}],
timeRadio: 1, timeRadio: 1,
tableSearchForm: {}, tableSearchForm: {},
getListApi: this.$apis.channel.getListApi,
tableParams: { tableParams: {
listName: "data", listName: "data",
tableOption: false, tableOption: false,
otherOptions: {
label: "启用开关",
},
tableColumns: [ tableColumns: [
{ {
label: "渠道名称", label: "渠道名称",
prop: "staffName", prop: "codeState",
}, },
{ {
label: "新增客户数", label: "新增客户数",
prop: "entmicroName", prop: "newlyCount",
minWidth: "100px",
}, },
{ {
label: "留存客户数", label: "留存客户数",
prop: "roleName", prop: "newlyKeepCount",
}, },
{ {
label: "日期", label: "日期",
prop: "staffPhone", prop: "timeFrame",
width: "130px",
}, },
], ],
}, },
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" }, pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
baseData: { layout: "sizes, prev, pager, next, jumper, ->, total",
allMerchantList: [], tableData: [],
roleList: [], tableTotal: 0,
staffStatusList: [], selectItem: [],
};
},
methods: {
handleSearch() {
this.getListChannel();
}, },
getListChannel() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
}; };
this.$apis.overview.codeSearch(params).then((res) => {
this.tableData = res.data;
this.tableTotal = res.count;
});
this.$apis.overview.codeDefault({}).then((res) => {
console.log(res);
this.selectItem = res;
this.selectItem.forEach((item) => {
this.codeTrend(item.codeId);
});
});
},
codeTrend(codeId) {
this.$apis.overview.codeTrend({ codeId }).then((res) => {
console.log(res);
});
},
selectTable(item) {
console.log(item);
},
handleChannel() {
this.$refs.channelForm.init();
},
},
mounted() {
this.getListChannel();
}, },
methods: {},
}; };
</script> </script>
......
...@@ -20,6 +20,10 @@ export default { ...@@ -20,6 +20,10 @@ export default {
option = { option = {
legend: { legend: {
left: "auto", left: "auto",
icon: "stack",
itemHeight: 2,
textStyle: { color: ["#5850FF", "#FF6D00"] },
itemWidth: 12,
}, },
grid: { grid: {
left: "3%", left: "3%",
......
<template>
<div class="img-bg">
<div class="preview-content">
<div class="preview-time">{{ currentTime }}</div>
<div class="preview-info" v-for="item in previewList" :key="item.id">
<!-- <img class="avatar" src="@/assets/img/logo.png" alt="" /> -->
<template v-if="item.type == 'text'">
<div class="preview-text text">{{ item.content }}</div>
</template>
<template v-else-if="item.type == 'link'">
<div class="preview-text preview-link">
{{ item.url }}
<img src="@/assets/img/guestCustom/preview-link.png" alt="" />
</div>
</template>
<template v-else-if="item.type == 'img'">
<el-image style="width: 100px" :src="item.url" fit="contain"></el-image>
</template>
<template v-else-if="item.type == 'applet'">
<div class="preview-text text preview-applet">
<div class="preview-applet-title">
<img :src="item.appleIcon" alt="" />
<span>{{ item.title }}</span>
</div>
{{ item.content }}
</div>
</template>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'Preview',
props: { eventBus: Object },
data() {
return {
previewList: [],
currentTime: ''
}
},
created() {
this.eventBus.$on('update', val => {
console.log(val)
this.previewList = val
})
},
mounted() {
const date = new Date()
let hours = date.getHours()
hours = hours < 10 ? `0${hours}` : hours
let minutes = date.getMinutes()
minutes = minutes < 10 ? `0${minutes}` : minutes
this.currentTime = `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日 ${hours}:${minutes}`
}
}
</script>
<style lang="scss" scope>
.img-bg {
position: relative;
width: 290px;
height: 566px;
background-image: url(../../../assets/img/guestCustom/iphone-bg.png);
background-size: 100%;
.preview-content {
position: absolute;
width: 250px;
height: 350px;
overflow-y: auto;
top: 115px;
left: 20px;
// background-color: cornflowerblue;
.preview-time {
font-size: 10px;
color: #999;
text-align: center;
margin-bottom: 15px;
}
.preview-info {
display: flex;
padding: 0 44px 20px 9px;
.avatar {
width: 26px;
height: 26px;
margin-right: 8px;
}
.preview-text {
position: relative;
max-width: 190px;
color: #333;
background-color: #fff;
border-radius: 4px;
}
.text {
font-size: 16px;
padding: 8px 11px;
}
.preview-link {
display: inline-flex;
word-break: break-all;
font-size: 14px;
padding: 8px 8px 8px 11px;
img {
width: 34px;
height: 34px;
margin-left: 10px;
}
}
.preview-text::before {
content: '';
position: absolute;
left: -10px;
top: 20%;
border-width: 5px;
border-style: dashed solid dashed dashed;
border-color: transparent #fff transparent transparent;
// background-color: cornflowerblue;
}
.preview-applet {
img {
width: 20px;
height: 20px;
margin-right: 4px;
}
&-title {
display: flex;
align-self: center;
color: #999;
margin-bottom: 5px;
}
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="square-main">
<el-dialog
title="选择渠道"
:visible.sync="dialogVisible"
width="50%"
:before-close="handleClose"
>
<GLTable
ref="table"
:layout="layout"
:tableData="tableData"
:tableTotal="tableTotal"
:pageConf="pageConf"
:tableParams="tableParams"
@refreshTable="handleSearch"
@selectionTable="selectionTable"
>
</GLTable>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "selectEmp",
data() {
return {
dialogVisible: false,
tableSearchForm: {},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "total" },
tableParams: {
listName: "data",
tableOption: false,
// 行数据的key
mutiSelectUniqueKey: "id",
// 多选ref的名称
mutiSelectName: "salelist",
tableColumns: [
{
label: "渠道名称",
prop: "codeState",
},
{
label: "备注",
prop: "codeRemark",
}
],
},
layout: "sizes, prev, pager, next, jumper, ->, total",
tableData: [],
tableTotal: 0,
selectItem: [],
};
},
methods: {
getFollower() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
};
this.$apis.channel.listChannelCodeByPage(params).then((res) => {
console.log(res);
this.tableData = res.data;
this.tableTotal = res.count;
});
},
init() {
this.dialogVisible = true;
this.$nextTick(() => {
this.getFollower();
});
},
handleSearch() {
this.getFollower();
},
selectionTable(val) {
this.selectItem = val;
},
handleSelect() {
this.dialogVisible = false;
this.$emit("selectTable", this.selectItem);
},
},
};
</script>
<style lang="scss" scoped></style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="welcome-box">
<div class="required">欢迎语</div>
<div class="content">
<el-input type="textarea" :rows="9" maxlength="600" show-word-limit v-model="guestForm.name" placeholder="请输入内容"></el-input>
<div>
<div class="welcome-file" v-for="itm in previewList" :key="itm.id">
<template v-if="itm.type == 'img'">
<img src="@/assets/img/guestCustom/icon-img.png" alt="" />
<span>{{ itm.name }}</span>
</template>
<template v-else-if="itm.type == 'link'">
<img src="@/assets/img/guestCustom/icon-link.png" alt="" />
<span>{{ itm.url }}</span>
</template>
<template v-else-if="itm.type == 'applet'">
<img src="@/assets/img/guestCustom/icon-applet.png" alt="" />
<span>{{ itm.title }}</span>
</template>
<i class="el-icon-circle-close" @click="close(index)"></i>
</div>
</div>
<div class="btn-group">
<div class="add-btn" v-for="item in btnList" :key="item.id">
<i class="el-icon-circle-plus-outline"></i>
<span>{{ item.name }}</span>
<input v-if="item.type == 'img'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input" :accept="item.accept || 'image/png, image/jpeg, image/jpg'" @change="e => handleImgChange(e, item)" />
<el-link v-if="item.type == 'popup'" style="opacity: 0" @click="switchDailog(item.funName)">{{ item.name }}</el-link>
</div>
</div>
<div class="tips-text">
<img src="@/assets/img/guestCustom/tips.png" class="tips-icon" alt="" />
<span>欢迎语将在客户进群时发送一次,不设置时不发送入群欢迎语。</span>
</div>
</div>
<basic-dialog :title="dialogTitle" :width="'712px'" :isVisible="dialogVisible" @confirmDialog="handleConfirm" @closeDialog="dialogVisible = !dialogVisible">
<slot>
<el-form v-if="dialogTitle == '添加网页消息'" :model="linkForm" :rules="linkRules" ref="linkForm" label-width="120px">
<el-form-item label="网页标题" prop="name">
<el-input v-model="linkForm.name" placeholder="请输入网页标题"></el-input>
</el-form-item>
<el-form-item label="添加网页链接" prop="link">
<el-input v-model="linkForm.link" placeholder="以http或https开头"></el-input>
</el-form-item>
</el-form>
<el-form v-else-if="dialogTitle == '添加小程序'" :model="appletForm" :rules="appletRules" ref="appletForm" label-width="120px">
<el-form-item label="小程序标题" prop="name">
<el-input v-model="appletForm.name" placeholder="请输入小程序标题"></el-input>
</el-form-item>
<el-form-item label="小程序appID" prop="link">
<el-input v-model="appletForm.link" placeholder="请输入小程序appID"></el-input>
</el-form-item>
<el-form-item label="小程序路径" prop="link">
<el-input v-model="appletForm.url" placeholder="请输入小程序路径"></el-input>
<div class="form-tips">注意:小程序路径以html作为后缀</div>
</el-form-item>
<el-form-item label="小程序路径" prop="link">
<div class="upload-bg">
<i class="el-icon-circle-plus"></i>
<div>上传封面</div>
<input type="file" style="opacity: 0" ref="file" class="form-upload img-w-h" accept="image/png, image/jpeg, image/gif, image/jpg" @change="handleImg" />
</div>
<div class="form-tips">建议图片大小在2M以内,建议尺寸:352*282px</div>
</el-form-item>
</el-form>
</slot>
</basic-dialog>
</div>
</template>
<script>
export default {
name: 'WelcomeWords',
props: { eventBus: Object },
data() {
return {
btnList: [
{
id: 1,
name: '图片',
funcName: '',
type: 'img',
limitSize: 10
},
{
id: 2,
name: '视频',
funcName: '',
type: 'img',
accept: 'video/*',
limitSize: 10
},
{
id: 3,
name: '链接',
type: 'popup',
funName: 'link'
},
{
id: 4,
name: '小程序',
type: 'popup',
funName: 'applet'
}
],
guestForm: {},
dialogTitle: '',
dialogVisible: false,
linkForm: {},
linkRules: {
name: [{ required: true, message: '请输入网页标题', trigger: 'blur' }],
link: [{ required: true, message: '请输入网页链接', trigger: 'blur' }]
},
appletForm: {},
appletRules: {
name: [{ required: true, message: '请输入网页标题', trigger: 'blur' }],
link: [{ required: true, message: '请输入网页链接', trigger: 'blur' }],
url: [{ required: true, message: '请输入小程序路径', trigger: 'blur' }]
},
previewList: [
{
id: 1,
type: 'text',
content: 'fasf'
},
{
id: 2,
type: 'link',
url: 'https://baidu.comdfasdfasdfa'
},
{
id: 3,
type: 'img',
name: 'hdjkashfajk',
url: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fhbimg.b0.upaiyun.com%2F945cad7c7105d352aa3c513c94846bb0c2f1a61342067-OWFZcE_fw658&refer=http%3A%2F%2Fhbimg.b0.upaiyun.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1639018450&t=a60f5defc48c980674edcf9a8d5981df'
},
{
id: 4,
type: 'applet',
appleIcon: '@/assets/img/logo.png',
title: '我的智慧门店',
content: '我的智慧门店'
},
{
id: 5,
type: 'text',
content: 'fasf'
},
{
id: 6,
type: 'text',
content: 'fasf'
},
{
id: 7,
type: 'text',
content: 'fasf'
},
{
id: 8,
type: 'text',
content: 'fasf'
},
{
id: 9,
type: 'text',
content: 'fasf'
}
]
}
},
methods: {
handleImgChange(e, targetItem) {
console.log(e, targetItem)
var reader = new FileReader()
var file = e.srcElement.files[0]
console.log(file)
// // 默认1MB
const limitSize = targetItem.limitSize || 1
const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) {
this.$message.error('上传图片大小不能超过' + limitSize + 'MB!')
return true
}
reader.readAsDataURL(file)
reader.onload = e => {
var image = new Image()
image.src = e.target.result
image.onload = () => {
console.log(file, targetItem)
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
console.log(res)
}
})
}
}
this.guestForm.imgUrl = 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fhbimg.b0.upaiyun.com%2F945cad7c7105d352aa3c513c94846bb0c2f1a61342067-OWFZcE_fw658&refer=http%3A%2F%2Fhbimg.b0.upaiyun.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1639018450&t=a60f5defc48c980674edcf9a8d5981df'
},
handleImg(e) {},
switchDailog(funName) {
console.log(funName)
if (funName == 'link') {
this.dialogTitle = '添加网页消息'
} else if (funName == 'applet') {
this.dialogTitle = '添加小程序'
}
this.dialogVisible = !this.dialogVisible
},
handleConfirm() {
const { dialogTitle } = this
switch (dialogTitle) {
case '添加网页消息':
this.$refs.linkForm.validate(valid => {
if (valid) {
alert('submit!')
} else {
console.log('error submit!!')
return false
}
})
break
case '添加小程序':
this.$refs.appletForm.validate(valid => {
if (valid) {
alert('submit!')
} else {
console.log('error submit!!')
return false
}
})
break
default:
console.log(dialogTitle)
}
},
close(index) {
this.previewList.splice(index, 1)
this.eventBus.$emit('update', this.previewList)
}
},
mounted() {
this.eventBus.$emit('update', this.previewList)
}
};
</script>
<style lang="scss" scoped>
.welcome-box {
padding-top: 20px;
margin-left: 87px;
}
.content {
display: inline-block;
vertical-align: text-top;
width: calc(100% - 103px);
margin-left: 12px;
background-color: #f7f7f7;
.welcome-file {
display: flex;
align-items: center;
color: #999;
padding: 10px;
margin-bottom: 10px;
border-left: 1px solid #dcdfe6;
border-right: 1px solid #dcdfe6;
img {
width: 20px;
height: 20px;
margin-right: 5px;
}
span {
display: inline-block;
margin-right: 20px;
max-width: 200px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 14px;
}
i {
font-size: 16px;
}
&:last-child {
margin-bottom: 0;
}
}
.btn-group {
padding: 6px 0 6px 20px;
border: 1px solid #dcdfe6;
border-top: 0;
.add-btn {
display: inline-flex;
position: relative;
align-items: center;
padding-right: 25px;
font-size: 16px;
color: #666;
cursor: pointer;
span {
font-size: 14px;
margin-left: 5px;
}
input {
position: absolute;
width: 100%;
cursor: pointer;
}
.el-link {
position: absolute;
width: 100%;
}
}
}
}
.required {
display: inline-block;
line-height: 40px;
}
.required::before {
content: '*';
color: #f56c6c;
margin-right: 4 px;
}
.form-tips {
font-size: 12px;
color: #999;
}
.form-upload {
position: absolute;
width: 100%;
height: 100%;
cursor: pointer;
}
/deep/ {
.el-textarea__inner {
background-color: #f7f7f7;
border-radius: 0;
}
.el-textarea__inner:focus {
border-color: #dcdfe6;
}
.el-textarea .el-input__count {
background-color: #f7f7f7;
}
}
.upload-bg {
position: relative;
width: 140px;
height: 140px;
background-color: #f7f7f7;
color: #999;
border: 1px dashed #dcdfe6;
i {
position: absolute;
top: 40px;
left: 50%;
transform: translateX(-50%);
font-size: 30px;
}
div {
position: absolute;
bottom: 40px;
left: 50%;
transform: translateX(-50%);
font-size: 12px;
}
}
.tips-text {
display: flex;
align-self: center;
justify-self: center;
color: #000;
font-size: 14px;
padding: 13px 16px;
margin-top: 10px;
background-color: rgba(230, 233, 255, 0.49);
border: 1px solid rgba(88, 80, 255, 0.49);
border-radius: 4px;
.tips-icon {
width: 14px;
height: 14px;
margin-right: 8px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -13,24 +13,28 @@ ...@@ -13,24 +13,28 @@
import channelList from "./components/channelList"; import channelList from "./components/channelList";
import channelStatistics from "./components/channelStatistics"; import channelStatistics from "./components/channelStatistics";
export default { export default {
name: 'channel', name: "channel",
components: { components: {
channelList, channelList,
channelStatistics channelStatistics,
}, },
data() { data() {
return { return {
activeName: 'first' activeName: "first",
} };
}, },
methods: { methods: {
handleClick() { handleClick() {},
},
};
</script>
<style lang="scss" scoped>
.channel-main {
/deep/ {
.el-tabs__nav-wrap::after {
height: 0px;
} }
} }
} }
</script>
<style lang="scss" scoped>
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -9,25 +9,25 @@ ...@@ -9,25 +9,25 @@
<div class="poster-body"> <div class="poster-body">
<div <div
class="poster-item" class="poster-item"
@dblclick="setPoster" @dblclick="setPoster(item)"
@mouseenter="item.show = true" @mouseenter="item.show = true"
@mouseleave="item.show = false" @mouseleave="item.show = false"
v-for="(item, index) in posterList" v-for="(item, index) in posterList"
:key="index" :key="index"
> >
<div class="poster-del" v-show="item.show"> <div class="poster-del" v-show="item.show" @click="handleDelete(item.id)">
<img src="@/assets/img/del.png" /> <img src="@/assets/img/del.png" />
</div> </div>
<div class="poster-item-box"> <div class="poster-item-box">
<div <img
:src="item.autoUrl"
class="poster-image" class="poster-image"
v-if="imgWidth" v-if="item.imgWidth"
:style="{ :style="{
background: 'url(' + img_url + ')', width: item.imgWidth + 'px',
width: imgWidth + 'px', height: item.imgHeight + 'px',
height: imgHeight + 'px',
}" }"
></div> />
</div> </div>
<div class="poster-item-link">下载海报</div> <div class="poster-item-link">下载海报</div>
</div> </div>
...@@ -44,18 +44,21 @@ ...@@ -44,18 +44,21 @@
class="poster-image" class="poster-image"
v-if="dragHeight" v-if="dragHeight"
:style="{ :style="{
background: 'url(' + img_url + ')', 'background-image': 'url(' + backUrl + ')',
height: dragHeight + 'px', height: dragHeight + 'px',
}" }"
> >
<vue-draggable-resizable <vue-draggable-resizable
:w="w1" :w="width"
:h="h1" :h="height"
:x="x1" :x="x"
:y="y1" :y="y"
:min-width="20" :min-width="20"
:min-height="20" :min-height="20"
class="img_cl" class="img_cl"
:style="{
'background-image': 'url(' + codeUrl + ')',
}"
:parent="true" :parent="true"
@dragging="onDrag" @dragging="onDrag"
@resizing="onResize" @resizing="onResize"
...@@ -67,9 +70,7 @@ ...@@ -67,9 +70,7 @@
</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="dialogVisible = false" <el-button size="small" type="primary" @click="savePoster">确 定</el-button>
>确 定</el-button
>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -88,21 +89,37 @@ export default { ...@@ -88,21 +89,37 @@ export default {
data() { data() {
return { return {
dialogVisible: false, dialogVisible: false,
posterList: [{ show: false }, { show: false }], posterList: [],
img_url: "", img_url: "",
dragHeight: 0, dragHeight: 0,
imgWidth: 0, imgWidth: 0,
imgHeight: 0, imgHeight: 0,
x1: 0, x: 0,
y1: 0, y: 0,
w1: 50, width: 50,
h1: 50, height: 50,
backUrl: "",
codeUrl: "",
}; };
}, },
methods: { methods: {
goBack() {}, goBack() {
setPoster() { this.$router.push("/channel/index");
},
handleDelete(id) {
this.$apis.channel.deleteChannelCodeBill({ id }).then((res) => {
if (res) this.getPoster();
});
},
setPoster(item) {
this.id = item.id
this.x = item.x;
this.y = item.y;
this.width = item.width;
this.height = item.height;
this.backUrl = item.backUrl;
this.getDraggable(this.backUrl);
this.dialogVisible = true; this.dialogVisible = true;
}, },
enterPoster() {}, enterPoster() {},
...@@ -135,40 +152,81 @@ export default { ...@@ -135,40 +152,81 @@ export default {
}) })
.then((res) => { .then((res) => {
if (res) { if (res) {
self.accountAddForm.merchantFiles.push({ self.id = null;
fileUrl: res, self.x = 0;
fileName: "", self.y = 0;
}); self.width = 50;
self.height = 50;
self.backUrl = res;
self.getDraggable(res);
self.dialogVisible = true;
} }
}); });
}; };
} }
}, },
onDrag(a, b, c, d, e) { onDrag(x, y) {
console.log(a, b, c, d, e); this.x = x;
this.y = y;
}, },
onActivated(index) { onActivated(index) {
console.log(index); console.log(index);
}, },
onResize() {}, onResize(x, y, width, height) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
},
savePoster() {
let { x, y, width, height, backUrl, codeUrl,id } = this;
let params = {
x,
y,
id,
width,
height,
backUrl,
codeUrl,
};
let code;
if(id) {
code = 'updateChannelCodeBill'
}else {
code = 'saveChannelCodeBill'
}
this.$apis.channel[code](params).then((res) => {
if (res) {
this.dialogVisible = false;
this.getPoster();
}
});
},
getPoster() { getPoster() {
let img_url = "https://img1.baidu.com/it/u=3246628741,3439955235&fm=26&fmt=auto"; let { id } = this.$route.params;
this.img_url = img_url; this.$apis.channel.getSubCodeChannelCodeBill({ codeId:id }).then((res) => {
let listChannelCodeBill = res.channelCodeBillInfo;
this.codeUrl = res.qrCode
listChannelCodeBill.forEach((item) => {
item.show = false;
let backUrl = item.autoUrl;
this.backUrl = backUrl;
let img = new Image(); let img = new Image();
img.src = img_url; img.src = backUrl;
let self = this;
img.onload = function () { img.onload = function () {
if (img.width > img.height) { if (img.width > img.height) {
self.imgWidth = 280; item.imgWidth = 280;
self.imgHeight = (img.height * 280) / img.width; item.imgHeight = (img.height * 280) / img.width;
} else { } else {
self.imgHeight = 280; item.imgHeight = 280;
self.imgWidth = (img.width * 280) / img.height; item.imgWidth = (img.width * 280) / img.height;
} }
}; };
});
this.posterList = listChannelCodeBill;
});
}, },
getDraggable() { getDraggable(img_url) {
let img_url = "https://img1.baidu.com/it/u=3246628741,3439955235&fm=26&fmt=auto";
let img = new Image(); let img = new Image();
img.src = img_url; img.src = img_url;
let self = this; let self = this;
...@@ -180,7 +238,6 @@ export default { ...@@ -180,7 +238,6 @@ export default {
mounted() { mounted() {
this.getPoster(); this.getPoster();
this.getDraggable();
}, },
}; };
</script> </script>
...@@ -208,7 +265,6 @@ export default { ...@@ -208,7 +265,6 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
width: 375px; width: 375px;
.img_cl { .img_cl {
background-image: url("../../assets/img/qrcode.png");
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
......
...@@ -2,21 +2,27 @@ ...@@ -2,21 +2,27 @@
<div class="channel-main scrm-box-f"> <div class="channel-main scrm-box-f">
<div><el-button type="primary" size="small" @click="goback">返回</el-button></div> <div><el-button type="primary" size="small" @click="goback">返回</el-button></div>
<div class="detail-form"> <div class="detail-form">
<el-form :inline="true" :model="detailForm" label-width="120px"> <el-form :inline="true" :model="detailCodeForm" label-width="120px">
<el-row><el-form-item size="small" label="渠道名称:"> </el-form-item></el-row> <el-row><el-form-item size="small" label="渠道名称:"> {{detailCodeForm.codeState}}</el-form-item></el-row>
<el-row><el-form-item size="small" label="备注:"> </el-form-item></el-row> <el-row><el-form-item size="small" label="备注:"> {{detailCodeForm.codeRemark}}</el-form-item></el-row>
<el-row <el-row
><el-form-item size="small" label="使用员工:"> ><el-form-item size="small" label="使用员工:">
<div class="form-row"> <div class="form-row">
<div class="emp-item">收到回复</div> <div class="emp-item" v-for="(item,index) in detailCodeForm.staffInfo" :key="index">{{item.staffName}}</div>
<div class="emp-item">收到回复</div>
</div> </el-form-item </div> </el-form-item
></el-row> ></el-row>
<el-row <el-row
><el-form-item size="small" label="标签:"> ><el-form-item size="small" label="标签:">
<div class="form-row"> <div class="form-row">
<div class="tag-item">龙湖</div> <template v-for="item in tagging">
<div class="tag-item">龙湖龙湖龙湖</div> <div
class="tag-item"
v-for="(tag, idx) in item.labelList"
:key="idx"
>
{{ tag.name }}
</div>
</template>
</div> </div>
</el-form-item></el-row </el-form-item></el-row
> >
...@@ -24,12 +30,12 @@ ...@@ -24,12 +30,12 @@
<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">75人</div> <div class="count-item-num">{{totalNum.newlyTotalCount}}人</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 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">75人</div> <div class="count-item-num">{{totalNum.todayNewlyCount}}人</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,18 +55,30 @@ ...@@ -49,18 +55,30 @@
/> />
</el-popover> </el-popover>
</div> </div>
<div class="count-item-num">75人</div> <div class="count-item-num">{{totalNum.keepTotalCount}}人</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> </div>
</div> </div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="按日期查看" name="1"></el-tab-pane>
<el-tab-pane label="按成员查看" name="2"></el-tab-pane>
</el-tabs>
<GLTable <GLTable
ref="employeeRef" v-show="activeName == 1"
:getListApi="getListApi" ref="timeTable"
:searchForm="tableSearchForm" :getListApi="getTimeApi"
:tableParams="tableParams" :tableParams="tableParams"
:pageConf="pageConf" :pageConf="pageConf"
:beforeSearchFn="beforeSearchFn" :hasNum="false"
>
</GLTable>
<GLTable
v-show="activeName == 2"
ref="memberTabel"
:getListApi="getMemberApi"
:tableParams="tableMemberParams"
:pageConf="pageMemberConf"
:hasNum="false" :hasNum="false"
> >
</GLTable> </GLTable>
...@@ -72,36 +90,55 @@ export default { ...@@ -72,36 +90,55 @@ export default {
name: "store", name: "store",
data() { data() {
return { return {
totalNum: {},
activeName: '1',
detailCodeForm:{},
tableSearchForm: {}, tableSearchForm: {},
getListApi: this.$apis.channel.getListApi, getMemberApi: this.$apis.overview.listStaff,
getTimeApi: this.$apis.overview.listTime,
tableParams: { tableParams: {
listName: "data", listName: "data",
tableOption: false, tableOption: false,
otherOptions: { tableColumns: [
label: "启用开关", {
label: "新增客户数",
prop: "newlyTotalCount"
},
{
label: "留存客户数",
prop: "keepTotalCount",
}, },
{
label: "日期",
prop: "dayTime"
},
],
},
tableMemberParams: {
listName: "data",
tableOption: false,
tableColumns: [ tableColumns: [
{ {
label: "渠道名称", label: "员工姓名",
prop: "staffName", prop: "staffName",
}, },
{ {
label: "新增客户数", label: "新增客户数",
prop: "entmicroName", prop: "newlyTotalCount",
minWidth: "100px",
}, },
{ {
label: "留存客户数", label: "留存客户数",
prop: "roleName", prop: "keepTotalCount",
}, },
{ {
label: "日期", label: "日期",
prop: "staffPhone", prop: "dayTime"
width: "130px",
}, },
], ],
}, },
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" }, pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
pageMemberConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
tagging: [],
baseData: { baseData: {
allMerchantList: [], allMerchantList: [],
roleList: [], roleList: [],
...@@ -110,7 +147,29 @@ export default { ...@@ -110,7 +147,29 @@ export default {
}; };
}, },
methods: { methods: {
goback() {}, goback() {
this.$router.push('/channel/index')
},
detailChannelCode(id, codeUuid) {
let param = {
id,
codeUuid,
};
this.$apis.channel.detailChannelCode(param).then((res) => {
this.detailCodeForm = Object.assign({}, res);
this.tagging = eval("(" + res.tagging + ")");
});
},
detailTotal(codeId) {
this.$apis.overview.detailTotal({codeId}).then((res) => {
this.totalNum = res;
})
}
},
mounted() {
const {id,codeUuid} = this.$route.params;
this.detailChannelCode(id,codeUuid)
this.detailTotal();
}, },
}; };
</script> </script>
......
<template>
<div class="square-main">
<div class="drainage-wrap scrm-box-f">
<div class="drainage-title">批量加好友</div>
<div class="drainage-panel">
<div class="drainage-config-wrap">
<div class="drainage-item-label">
通过企微魔方导入客户数据后,平台将识别尚未添加企微的客户,并自动发送消息提醒对应员工跟进。
</div>
<div class="drainage-item-switch">
<el-switch
v-model="addValue"
@change="handleAddSwitch"
active-color="#5850FF"
inactive-color="#999999"
>
</el-switch>
</div>
</div>
<div class="config-title">
<span v-if="!editStatus" @click="editStatus = true"
><label>编辑配置</label> <i class="el-icon-edit-outline"></i
></span>
</div>
<div class="config-market">
<div class="config-market-item checked">
<div class="config-market-title">首次提醒</div>
<div class="config-market-select">
<div class="config-market-s1">
<div class="config-line"></div>
<div class="config-market-icon">
<img src="@/assets/img/square/icon1.png" />
</div>
<div class="config-market-name">未添加企微的客户</div>
</div>
<div class="config-market-s1">
<div class="config-line"></div>
<div class="config-market-icon">
<img src="@/assets/img/square/icon2.png" />
</div>
<div class="config-market-name">魔方导入客户数据后3天后</div>
</div>
<div class="config-market-s1">
<div class="config-market-icon">
<img src="@/assets/img/square/icon3.png" />
</div>
<div class="config-market-name">首次提醒</div>
</div>
</div>
</div>
<div class="config-market-item checked">
<!-- <el-switch
v-model="remindValue"
active-color="#5850FF"
inactive-color="#999999"
class="config-switch-icon"
></el-switch> -->
<div class="config-market-title">重复提醒</div>
<div class="config-market-select">
<div class="config-market-s1">
<div class="config-line"></div>
<div class="config-market-icon">
<img src="@/assets/img/square/icon1.png" />
</div>
<div class="config-market-name">未添加企微的客户</div>
</div>
<div class="config-market-s1">
<div class="config-line"></div>
<div class="config-market-icon">
<img src="@/assets/img/square/icon6.png" />
</div>
<div class="config-market-name">每周一</div>
</div>
<div class="config-market-s1">
<div class="config-market-icon">
<img src="@/assets/img/square/icon5.png" />
</div>
<div class="config-market-name">再次提醒</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="drainage-wrap scrm-box-f">
<div class="drainage-title">营销配置</div>
<div class="drainage-form">
<div class="drainage-form-item" v-if="editStatus">
<label>跟进员工</label>
<div class="el-input-tag input-tag-wrapper" v-if="editStatus">
<el-tag
v-for="(tag, idx) in staffIds"
:key="idx"
closable
:disable-transitions="false"
@close="remove(idx)"
>
{{ tag.staffName }}
</el-tag>
</div>
<el-button size="small" @click="handleAddEmp"
><i class="el-icon-plus"></i> 选择跟进专员</el-button
>
<div class="drainage-coutom-count">已经选择{{ staffIds.length }}人</div>
</div>
<div class="drainage-form-item" v-else>
<label>跟进员工</label>
<div class="drainage-emp">
<template v-for="item in staffIds">
{{ item.staffName }}
</template>
</div>
</div>
</div>
</div>
<div
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px',
}"
>
<el-button type="primary" @click="goback">取消</el-button>
<el-button type="primary" @click="handleSave">确定</el-button>
</div>
<select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp>
</div>
</template>
<script>
import selectEmp from "@/components/selectEmp";
export default {
name: "friends",
components: {
selectEmp,
},
data() {
return {
editStatus: false,
configItem: {},
footerLeft: 0,
footerWidth: 0,
dialogVisible: true,
addValue: false,
remindValue: false,
staffIds: [{ staffName: "都是" }],
};
},
methods: {
handleAddSwitch() {
if (this.addValue) {
this.$alert("启动前,先完善营销配置", "提示", {
confirmButtonText: "知道了",
callback: (action) => {
console.log(111);
},
});
} else {
this.$alert("系统将停止此类营销,营销配置仍然保留", "提示", {
confirmButtonText: "知道了",
callback: (action) => {
console.log(111);
},
});
}
},
remove(index) {
this.staffIds.splice(index, 1);
},
selectTable(item) {
this.staffIds = item.map((item) => {
return {
staffId: item.relationId,
staffName: item.staffName,
};
});
},
handleAddEmp() {
this.$refs.selectEmpForm.init();
},
handleSave() {
let params = {
configType: 1,
id: this.configItem.id,
staffIds: JSON.stringify(this.staffIds),
};
let config;
if (this.configItem.id) {
config = "updateConfig";
params.delFlag = this.addValue ? 1 : 0;
} else {
config = "addConfig";
}
this.$apis.marketing[config](params).then((res) => {
if (res) {
this.$message({
message: "操作成功",
type: "success",
});
this.findConfig();
}
});
},
findConfig() {
this.$apis.marketing.findConfig({ configType: 1 }).then((res) => {
if (res) {
this.configItem = res;
this.addValue = res.delFlag ? true : false;
this.staffIds = eval(res.staffIds);
}
});
},
},
mounted() {
this.findConfig();
},
};
</script>
<style lang="scss" scoped>
.footer-panel {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0px;
height: 64px;
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
.drainage-wrap {
margin-bottom: 20px;
.drainage-title {
padding-left: 20px;
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 57px;
height: 57px;
border-bottom: 1px solid #d8d8d8;
}
.drainage-form {
padding: 20px;
.drainage-form-item {
display: flex;
label {
width: 120px;
text-align: right;
margin-right: 20px;
height: 36px;
line-height: 36px;
}
}
.drainage-emp {
height: 36px;
line-height: 36px;
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #606266;
display: inline-block;
outline: none;
padding: 0 10px 0 5px;
flex-wrap: wrap;
line-height: 36px;
height: 36px;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 350px;
display: flex;
align-items: center;
margin-right: 20px;
}
.el-tag {
margin-right: 4px;
height: 26px;
line-height: 24px;
}
.drainage-coutom-count {
font-size: 14px;
font-weight: 400;
color: #7d7d7d;
line-height: 36px;
margin-left: 20px;
}
}
.drainage-panel {
padding: 20px;
.drainage-config-wrap {
display: flex;
justify-content: space-between;
align-items: center;
.drainage-item-label {
width: 50%;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
}
}
.config-title {
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 40px;
height: 40px;
span {
cursor: pointer;
}
i {
margin-left: 6px;
}
}
.config-market {
display: flex;
&-item {
position: relative;
padding: 10px;
width: 50%;
height: 150px;
background: #f6f6ff;
border-radius: 4px;
opacity: 0.8;
box-sizing: border-box;
&:first-child {
margin-right: 20px;
}
&.checked {
border: 1px solid #5850ff;
.config-market-title {
color: #5850ff;
}
.config-market-icon {
background: linear-gradient(
153deg,
#8085ef 0%,
#6f76ee 100%,
#6f76ee 100%
) !important;
}
.config-market-name {
color: #333333 !important;
}
.config-line {
border: 1px solid #5850ff !important;
}
}
.config-market-title {
font-size: 16px;
font-weight: 400;
color: #999999;
line-height: 22px;
text-align: center;
}
.config-switch-icon {
position: absolute;
right: 10px;
top: 10px;
}
.config-market-select {
display: flex;
.config-market-s1 {
width: 33.33%;
margin: 0 auto;
text-align: center;
position: relative;
.config-line {
position: absolute;
top: 45px;
right: -30%;
width: 60%;
border: 1px solid #999999;
}
.config-market-icon {
width: 56px;
height: 56px;
background: #999999;
border-radius: 50%;
margin: 20px auto 10px;
}
.config-market-name {
font-size: 14px;
font-weight: 400;
color: #adadad;
line-height: 20px;
}
}
}
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="square-main">
<el-dialog
title="选择活动"
:visible.sync="dialogVisible"
width="70%"
:before-close="handleClose"
>
<div class="model-panel">
<div class="model-panel-tab">
<label>活动类型:</label>
<el-tabs v-model="activeName" @tab-click="handleClick" type="card">
<el-tab-pane label="券营销" name="1"></el-tab-pane>
<el-tab-pane label="预约有礼" name="2"></el-tab-pane>
<el-tab-pane label="权益卡" name="3"></el-tab-pane>
<el-tab-pane label="活码海报" name="4"></el-tab-pane>
</el-tabs>
</div>
<div class="model-item-panel" v-if="modelList.length>0">
<div class="model-item" :class="{'checked': selectItem == item}" v-for="(item, index) in modelList" :key="index" @click="handleSelectItem(item)">
<div class="model-item-title" v-show="activeName == 3">
{{ item.cardClassName }}
</div>
<div class="model-item-title" v-show="activeName == 2">
{{ item.couponName }}
</div>
<div class="model-item-content" v-show="item.type == 1">数量:9999</div>
<div
class="model-item-content"
v-show="activeName == 3 && item.effectiveType == 2"
>
有效期:{{ item.effectiveNum }}天
</div>
<div
class="model-item-content"
v-show="activeName == 3 && item.effectiveType == 1"
>
有效期:无限制
</div>
<div
class="model-item-content"
v-show="activeName == 2 && item.effectiveType == 1"
>
有效期:{{ item.effectiveStartTime }}~{{ item.effectiveEndTime }}
</div>
<div
class="model-item-content"
v-show="activeName == 2 && item.effectiveType == 1"
>
有效期:{{ item.effectiveDays }}天
</div>
<div
class="model-item-content"
v-show="activeName == 2 && item.effectiveType == 3"
>
有效期:无限制
</div>
<div class="model-item-content" v-show="activeName == 2">
类型:{{
item.discountType == 1
? "满减劵"
: item.discountType == 2
? "折扣券"
: item.discountType == 3
? "代金券"
: item.discountType == 4
? "实物券"
: item.discountType == 5
? "购车代金券"
: item.discountType == 6
? "商品折扣券"
: item.discountType == 7
? "会员服务"
: ""
}}
</div>
<div class="model-item-content" v-show="activeName == 1"> 类型:精品卷</div>
<div class="model-item-content" v-show="activeName == 3"> 类型:权益卡</div>
<div class="model-item-content" v-show="activeName == 4"> 类型:活码海报</div>
<div class="model-item-qrcode" v-show="activeName == 4">
<img :src="item.autoUrl">
</div>
</div>
</div>
<div class="model-item-panel" v-else>
<img src="@/assets/img/empty.png" />
<div class="empty-item">暂无数据</div>
</div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="tableTotal"
layout="total, sizes, prev, pager, next, jumper"
></el-pagination>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect"
>确 定</el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "activityModel",
data() {
return {
dialogVisible: false,
activeName: "1",
modelList: [
{ type: 1 },
{ type: 2 },
{ type: 3 },
{ type: 1 },
{ type: 1 },
{ type: 1 },
{ type: 1 },
],
pageNum: 1,
pageSize: 10,
tableTotal: 0,
selectItem: {},
};
},
methods: {
handleSelectItem(item) {
this.selectItem = item;
},
handleSelect() {
this.dialogVisible = false;
this.$emit('selectActivity', {id:this.selectItem.id,marketingType: this.activeName});
},
handleSizeChange(val) {
this.pageSize = val;
this.getModelList();
},
handleCurrentChange(val) {
this.pageNum = val;
this.getModelList();
},
getModelList() {
let market = "";
switch (this.activeName) {
case "1":
market = "getCoupon";
break;
case "2":
market = "getMerchant";
break;
case "3":
market = "getCard";
break;
case "4":
market = "listChannelCodeBill";
break;
}
let params = {
pageSize: this.pageSize,
pageNum: this.pageNum,
};
this.$apis.marketing[market](params).then((res) => {
console.log(res)
this.modelList = res.list?res.list:res.data;
this.tableTotal = res.count;
});
},
init() {
this.dialogVisible = true;
this.getModelList();
},
handleClick() {
this.getModelList();
},
},
};
</script>
<style lang="scss" scoped>
.model-panel {
.model-panel-tab {
display: flex;
align-items: center;
margin-bottom: 18px;
label {
font-size: 16px;
font-weight: 400;
color: #000000;
line-height: 24px;
}
/deep/ {
.el-checkbox:last-of-type {
margin-right: 8px;
}
.el-tabs__nav {
border: 0;
}
.el-tabs__header {
border: 0;
background-color: #f4f6fc;
margin: 0px;
}
.el-tabs__item {
border: none;
width: 180px;
height: 32px;
line-height: 32px;
margin: 2px;
text-align: center;
}
.el-tabs__item.is-active {
background-color: #fff;
border-radius: 4px;
}
}
}
.model-item-panel {
display: flex;
flex-wrap: wrap;
> img {
display: block;
margin: 50px auto 0px;
width: 60px;
height: auto;
}
.empty-item {
text-align: center;
font-size: 14px;
font-weight: 400;
color: #000000;
line-height: 22px;
margin-bottom: 30px;
}
.model-item {
position: relative;
width: 250px;
height: 128px;
background: #ffffff;
border-radius: 4px;
border: 2px solid #e6e6e6;
padding: 14px 24px;
box-sizing: border-box;
margin: 0px 20px 20px 0px;
&:nth-child(4n) {
margin-right: 0px;
}
&.checked {
border: 2px solid #5850FF;
}
&-qrcode {
position: absolute;
right: 10px;
bottom: 10px;
width: 60px;
height: 60px;
border: 1px solid #979797;
}
&-title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
margin-bottom: 5px;
}
&-content {
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
margin-top: 6px;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="square-main">
<el-dialog
title="选择模板"
:visible.sync="dialogVisible"
width="70%"
:before-close="handleClose"
>
<div class="model-panel">
<div class="model-panel-tab">
<label>模板类型:</label>
<el-tabs v-model="activeName" @tab-click="handleClick" type="card">
<el-tab-pane label="售前" name="1"></el-tab-pane>
<el-tab-pane label="售中" name="2"></el-tab-pane>
<el-tab-pane label="售后" name="3"></el-tab-pane>
</el-tabs>
</div>
<div class="model-item-panel" v-if="modelList.length>0">
<div class="model-item" v-for="(item, index) in modelList" :key="index">
<div class="model-item-radio">
<el-radio v-model="radio" :label="item"></el-radio>
</div>
<div class="model-item-title">
<div class="model-title-h1">{{ item.title }}</div>
<div class="model-title-h2">{{ item.content }}</div>
</div>
<div class="model-item-content">
<div class="model-content">创建人:巴拉巴拉</div>
<div class="model-content">创建日期:{{ item.createdTime }}</div>
</div>
</div>
</div>
<div class="model-item-panel" v-else>
<img src="@/assets/img/empty.png" />
<div class="empty-item">暂无数据</div>
</div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="tableTotal"
layout="total, sizes, prev, pager, next, jumper"
></el-pagination>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="selectModelItem">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "activityModel",
data() {
return {
dialogVisible: false,
activeName: "1",
radio: "",
modelList: [],
pageNum: 1,
pageSize: 10,
tableTotal: 0,
};
},
methods: {
init() {
this.dialogVisible = true;
this.dracImMessage();
},
selectModelItem() {
this.dialogVisible = false;
this.$emit("selectItem", this.radio);
},
handleClick() {
this.dracImMessage();
},
dracImMessage() {
let params = {
pageSize: this.pageSize,
pageNum: this.pageNum,
type: this.activeName,
};
this.$apis.marketing.dracImMessage(params).then((res) => {
console.log(res);
this.modelList = res.data;
this.tableTotal = res.count;
});
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
},
},
};
</script>
<style lang="scss" scoped>
.model-panel {
.model-panel-tab {
display: flex;
align-items: center;
margin-bottom: 18px;
label {
font-size: 16px;
font-weight: 400;
color: #000000;
line-height: 24px;
}
/deep/ {
.el-checkbox:last-of-type {
margin-right: 8px;
}
.el-tabs__nav {
border: 0;
}
.el-tabs__header {
border: 0;
background-color: #f4f6fc;
margin: 0px;
}
.el-tabs__item {
border: none;
width: 180px;
height: 32px;
line-height: 32px;
margin: 2px;
text-align: center;
}
.el-tabs__item.is-active {
background-color: #fff;
border-radius: 4px;
}
}
}
.model-item-panel {
> img {
display: block;
margin: 50px auto 0px;
width: 60px;
height: auto;
}
.empty-item {
text-align: center;
font-size: 14px;
font-weight: 400;
color: #000000;
line-height: 22px;
margin-bottom: 30px;
}
.model-item {
display: flex;
padding: 20px;
border-bottom: 1px solid #e9e9e9;
&-radio {
width: 80px;
/deep/ {
.el-radio__input {
margin-top: 10px;
}
.el-radio__label {
display: none;
}
}
}
&-content {
width: 210px;
.model-content {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
}
&-title {
flex: 1;
.model-title-h1 {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
}
.model-title-h2 {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="square-main">
<div class="drainage-wrap scrm-box-f">
<div class="drainage-title">指定客户</div>
<div class="drainage-form">
<div class="drainage-form-item">
<label>客户信息</label>
<div class="upload-box">
<div class="upload-file-panel">
<el-upload action="" class="image-uploader" :before-upload="uploadFile">
<div class="upload-btn"><i class="el-icon-upload2"></i>上传文件</div>
</el-upload>
<a class="download-url">下载导入模版</a>
</div>
<div class="upload-tips">支持扩展名:xlsx、xls、csv</div>
</div>
</div>
</div>
</div>
<div class="drainage-wrap scrm-box-f">
<div class="drainage-title">营销配置</div>
<div class="form-main">
<div class="drainage-form">
<div class="drainage-form-item" v-if="editStatus">
<label class="is-require">跟进员工</label>
<div class="el-input-tag input-tag-wrapper">
<el-tag
v-for="(tag, idx) in dracImFollowStaffResponses"
:key="idx"
closable
:disable-transitions="false"
@close="remove(idx)"
>
{{ tag.staffName }}
</el-tag>
</div>
<el-button size="small" @click="handleAddEmp"
><i class="el-icon-plus"></i> 选择跟进专员</el-button
>
<div class="drainage-coutom-count">
已经选择{{ dracImFollowStaffResponses.length }}人
</div>
</div>
<div class="drainage-form-item" v-else>
<label>跟进员工</label>
<div class="drainage-emp">
<template v-for="item in dracImFollowStaffResponses">
{{ item.staffName }}
</template>
</div>
</div>
<div class="drainage-form-item">
<label>群发短信</label>
<div class="message-panel">
<el-form
ref="configForm"
label-position="left"
label-width="100px"
:model="addForm"
:rules="addRules"
class="code-body-form"
>
<el-form-item label="推送时间:">
系统将在「开始营销时间」之后启动智能外呼任务,并在「截止营销时间」之后停止该营销活动
</el-form-item>
<el-form-item size="small" label="营销时间" prop="time">
<el-time-picker
is-range
:disabled="!editStatus"
value-format="HH:mm:ss"
v-model="addForm.time"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围"
>
</el-time-picker>
</el-form-item>
<el-form-item label="短信内容" prop="content">
<el-input
type="textarea"
v-model="addForm.content"
rows="5"
:disabled="!editStatus"
maxlength="250"
show-word-limit
></el-input>
<div class="select-panel">
<div @click="handleSelectMessage">
<i class="el-icon-circle-plus-outline"><span>选择模板</span></i>
</div>
<div @click="handleSelectModel">
<i class="el-icon-circle-plus-outline"><span>活动</span></i>
</div>
</div>
<div class="form-tips">
共可输入341字,70字內(含70字)计一条,超过70字,按70字/条计费。
</div>
<div class="form-tips">
提示:当前短信已有{{
addForm.content.length
}}字,按1条短信发送且计费。
</div>
</el-form-item>
<el-form-item label="审核通知人:"
>短信内容审核结果会通过企微消息的形式发送给设置的员工,员工可以及时跟进。</el-form-item
>
<el-form-item label="自动打标签">
<div class="tag-item-panel" v-if="editStatus">
<div class="el-input-tag input-tag-wrapper">
<template v-for="item in tagging">
<el-tag
v-for="(tag, idx) in item.labelList"
:key="idx"
closable
:disable-transitions="false"
@close="removeTag(item.labelList, idx)"
>
{{ tag.name }}
</el-tag>
</template>
</div>
<el-button size="small" @click="handleAddTag">添加</el-button>
</div>
<div v-else>
<template v-for="item in tagging">
<template v-for="tag in item.labelList">
{{ tag.name }}
</template>
</template>
</div>
</el-form-item>
</el-form>
</div>
</div>
</div>
<div class="form-image"><img src="@/assets/img/marketing/phone.png" /></div>
</div>
</div>
<div
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px',
}"
>
<el-button type="primary" @click="goback">取消</el-button>
<el-button type="primary" @click="handleSave">提交</el-button>
</div>
<select-emp ref="selectEmpForm" @selectTable="selectTable"></select-emp>
<select-tag ref="selectTagForm"></select-tag>
<activity-model ref="selectModelForm"></activity-model>
<message-model ref="selectMessageForm" @selectItem="selectItem"></message-model>
</div>
</template>
<script>
import selectEmp from "@/components/selectEmp";
import selectTag from "@/components/selectTag";
import activityModel from "./components/activityModel";
import messageModel from "./components/messageModel";
export default {
name: "config",
components: {
selectEmp,
selectTag,
activityModel,
messageModel,
},
data() {
return {
editStatus: true,
footerLeft: 0,
footerWidth: 0,
addForm: {
desc: "",
content: "",
},
tagging: [],
messageItem: {},
dialogVisible: true,
value: false,
value1: false,
dracImFollowStaffResponses: [
{ codeId: null, imId: 5, staffId: 366, staffName: "fddfdf" },
],
dracImMessageConfigAddRequest: {},
ModelItem: {},
addRules: {
time: [{ required: true, message: "请选择营销时间", trigger: "change" }],
content: [{ required: true, message: "请选择短信模板", trigger: "blur" }],
},
};
},
methods: {
selectItem(item) {
this.messageItem = item;
this.addForm.content = item.content;
},
uploadFile(file) {
let AllImgExt = ".csv|.xls|.xlsx";
let extName = file.name.substring(file.name.lastIndexOf(".")).toLowerCase();
console.log(extName);
if (AllImgExt.indexOf(extName) === -1) {
this.$message.error("上传格式不正确");
return false;
}
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = (event) => {
const imgFile = event.target.result;
const arrBase64 = imgFile.split(",");
const fileUrl = file.name.split(".")[1] + "@" + arrBase64[1];
this.$apis.square.importsUpload({ fileUrl }).then((res) => {});
};
},
selectTable(item) {
this.dracImFollowStaffResponses = item.map((item) => {
return {
staffId: item.relationId,
staffName: item.staffName,
};
});
},
remove(index) {
this.dracImFollowStaffResponses.splice(index, 1);
},
removeTag(item, idx) {
item.splice(idx, 1);
},
handleSave() {
this.$refs["configForm"].validate((valid) => {
if (valid) {
let startTime, endTime;
if (this.addForm.time) {
startTime = this.addForm.time[0];
endTime = this.addForm.time[1];
}
let templateId = this.messageItem.id;
const content = this.addForm.content;
const { marketingType, marketingUrl, marketingId } = this.ModelItem;
let params = {
imType: 2,
tagging: JSON.stringify([
{
labelGroup: { id: "36", name: "是否新车客户" },
labelList: [
{ id: "101", name: "非新车客户" },
{ id: "100", name: "新车客户" },
],
},
]),
exportUrl:
"https://qcwx.glsx.com.cn/upload/biz/4e99ce79-a443-4ead-a6a1-ae5285d4aabd.xlsx",
dracImFollowStaffRequestList: this.dracImFollowStaffResponses,
dracImMessageConfigRequest: {
startTime,
endTime,
templateId,
content,
marketingType,
marketingUrl,
marketingId,
},
};
this.$apis.marketing.exportAdd(params).then((res) => {
if (res) this.$router.push("/marketing/index");
});
}
});
},
handleAddEmp() {
this.$refs.selectEmpForm.init();
},
handleAddTag() {
this.$refs.selectTagForm.init();
},
handleSelectMessage() {
this.$refs.selectMessageForm.init();
},
handleSelectModel() {
this.$refs.selectModelForm.init();
},
findById(id) {
this.$apis.marketing.findById({ id }).then((res) => {
this.dracImFollowStaffResponses = res.dracImFollowStaffResponses;
this.addForm.time = [
res.dracImMessageConResponse.startTime,
res.dracImMessageConResponse.endTime,
];
this.addForm.content = res.dracImMessageConResponse.content;
this.tagging = eval(res.tagging);
this.$nextTick(()=>{
this.$refs.configForm.validate()
});
});
},
},
mounted() {
let { id } = this.$route.params;
if (id) {
this.findById(id);
this.editStatus = false;
}
},
};
</script>
<style lang="scss" scoped>
.footer-panel {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0px;
height: 64px;
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
.drainage-wrap {
margin-bottom: 20px;
.drainage-title {
padding-left: 20px;
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 57px;
height: 57px;
border-bottom: 1px solid #d8d8d8;
}
.form-main {
display: flex;
.form-image {
width: 280px;
margin: 20px 10px;
}
.drainage-form {
flex: 1;
}
}
.form-tips {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
margin-top: 5px;
}
.drainage-form {
padding: 20px;
.drainage-form-item {
display: flex;
margin-top: 20px;
label {
width: 120px;
text-align: right;
margin-right: 20px;
height: 36px;
line-height: 36px;
&.is-require {
&::before {
content: "*";
color: #f56c6c;
margin-right: 4px;
}
}
}
}
/deep/ {
.el-textarea__inner {
border-radius: 0px;
border: 1px solid #dcdfe6;
}
}
.select-panel {
padding-left: 20px;
background: #fff;
display: flex;
font-size: 14px;
font-weight: 400;
color: #717171;
line-height: 30px;
border: 1px solid #dcdfe6;
border-top: 0px;
> div {
cursor: pointer;
margin-right: 10px;
span {
margin-left: 3px;
}
}
}
.upload-box {
margin-bottom: 10px;
.upload-file-panel {
display: flex;
align-items: center;
> a {
margin-left: 10px;
text-decoration: underline;
font-size: 12px;
font-weight: 400;
color: #5850ff;
line-height: 17px;
}
}
.upload-btn {
text-align: center;
width: 96px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #dcdfe6;
font-size: 14px;
font-weight: 400;
color: #999999;
padding: 6px 0px;
}
.upload-tips {
margin-top: 6px;
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
}
.message-panel {
background: #f7f7f7;
border: 1px solid #dcdfe6;
padding: 20px;
flex: 1;
box-sizing: border-box;
font-size: 14px;
color: #3a3a3a;
}
.drainage-emp {
height: 36px;
line-height: 36px;
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #606266;
display: inline-block;
outline: none;
padding: 0 10px 0 5px;
flex-wrap: wrap;
line-height: 36px;
height: 36px;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 350px;
display: flex;
align-items: center;
margin-right: 20px;
}
.tag-item-panel {
display: flex;
}
.el-tag {
margin-right: 4px;
height: 26px;
line-height: 24px;
}
.drainage-coutom-count {
font-size: 14px;
font-weight: 400;
color: #7d7d7d;
line-height: 36px;
margin-left: 20px;
}
}
.drainage-panel {
padding: 20px;
.drainage-config-wrap {
display: flex;
justify-content: space-between;
align-items: center;
.drainage-item-label {
width: 50%;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
}
}
.config-title {
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 20px;
margin: 20px 0px;
i {
margin-left: 6px;
}
}
.config-market {
display: flex;
&-item {
position: relative;
padding: 10px;
width: 50%;
height: 150px;
background: #f6f6ff;
border-radius: 4px;
opacity: 0.8;
box-sizing: border-box;
&:first-child {
margin-right: 20px;
}
&.checked {
border: 1px solid #5850ff;
.config-market-title {
color: #5850ff;
}
.config-market-icon {
background: linear-gradient(
153deg,
#8085ef 0%,
#6f76ee 100%,
#6f76ee 100%
) !important;
}
.config-market-name {
color: #333333 !important;
}
.config-line {
border: 1px solid #5850ff !important;
}
}
.config-market-title {
font-size: 16px;
font-weight: 400;
color: #999999;
line-height: 22px;
text-align: center;
}
.config-switch-icon {
position: absolute;
right: 10px;
top: 10px;
}
.config-market-select {
display: flex;
.config-market-s1 {
width: 33.33%;
margin: 0 auto;
text-align: center;
position: relative;
.config-line {
position: absolute;
top: 45px;
right: -30%;
width: 60%;
border: 1px solid #999999;
}
.config-market-icon {
width: 56px;
height: 56px;
background: #999999;
border-radius: 50%;
margin: 20px auto 10px;
}
.config-market-name {
font-size: 14px;
font-weight: 400;
color: #adadad;
line-height: 20px;
}
}
}
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="square-main"> <div class="square-main">
<div class="square-main-header"> <div class="square-main-header">
<el-button size="small" type="primary" @click="handleSearch" <el-button type="primary" size="small" @click="addConfig"
><i class="el-icon-plus"></i> 导入魔方</el-button ><i class="el-icon-plus"></i> 新增营销</el-button
> >
<label>结合门店营销活动,指定客户创建智能营销,提高活动转化率</label> <label>结合门店营销活动,指定客户创建智能营销,提高活动转化率</label>
<el-popover <el-popover
...@@ -25,20 +25,21 @@ ...@@ -25,20 +25,21 @@
:inline="true" :inline="true"
:model="tableSearchForm" :model="tableSearchForm"
class="follow-form-item" class="follow-form-item"
label-width="120px" label-width="100px"
> >
<el-form-item size="small" label="添加时间"> <el-form-item size="small" label="添加时间">
<el-date-picker <el-date-picker
v-model="tableSearchForm.time" v-model="createTime"
type="daterange" type="daterange"
range-separator="至" range-separator="至"
value-format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item size="small" label="状态"> <el-form-item size="small" label="状态">
<el-select v-model="tableSearchForm.status" placeholder="请选择"> <el-select v-model="tableSearchForm.imStatus" placeholder="请选择">
<el-option <el-option
v-for="item in optionstatus" v-for="item in optionstatus"
:key="item.value" :key="item.value"
...@@ -49,7 +50,7 @@ ...@@ -49,7 +50,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item size="small" label="ID"> <el-form-item size="small" label="ID">
<el-input v-model="tableSearchForm.id" placeholder="请输入ID"></el-input> <el-input v-model="tableSearchForm.imUid" placeholder="请输入ID"></el-input>
</el-form-item> </el-form-item>
<el-form-item size="small" style="float: right"> <el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button> <el-button type="primary" @click="handleSearch">查询</el-button>
...@@ -80,37 +81,42 @@ export default { ...@@ -80,37 +81,42 @@ export default {
optionstatus: [ optionstatus: [
{ {
value: "1", value: "1",
label: "进行中", label: "待处理",
}, },
{ {
value: "2", value: "2",
label: "已完成", label: "处理中",
},
{
value: "3",
label: "已处理",
}, },
], ],
createTime: "",
dialogVisible: true, dialogVisible: true,
tableSearchForm: {}, tableSearchForm: {},
getListApi: this.$apis.channel.getListApi, getListApi: this.$apis.marketing.findAllByPage,
tableParams: { tableParams: {
listName: "data", listName: "data",
tableOption: false, tableOption: false,
tableColumns: [ tableColumns: [
{ {
label: "ID", label: "ID",
prop: "staffName", prop: "uuid",
}, },
{ {
label: "营销客户数", label: "营销客户数",
prop: "entmicroName", prop: "customerCount",
minWidth: "100px", minWidth: "100px",
}, },
{ {
label: "状态", label: "状态",
prop: "roleName", prop: "imStatusName",
}, },
{ {
label: "创建时间", label: "创建时间",
prop: "staffPhone", prop: "createdTime",
width: "130px", width: "160px",
}, },
{ {
label: "创建人", label: "创建人",
...@@ -134,24 +140,36 @@ export default { ...@@ -134,24 +140,36 @@ export default {
}, },
}; };
}, },
watch: {
createTime(value) {
this.tableSearchForm.beginTime = value[0].split(" ")[0];
this.tableSearchForm.endTime = value[1].split(" ")[0];
},
},
methods: { methods: {
handleSearch() {}, handleSearch() {
handleDetail() {}, this.$refs.employeeRef.refreshTable();
},
handleImport() {},
addConfig() {
this.$router.push("/marketing/config");
},
handleDetail(scope) {
this.$router.push("/marketing/config/" + scope.id);
},
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.square-main-header { .square-main-header {
display: flex;
align-items: center;
label { label {
margin: 0px 20px 0px 10px; margin: 0px 20px 0px 10px;
} }
img { img {
width: 14px; width: 14px;
height: 14px; height: 14px;
vertical-align: middle; margin-top: 8px;
} }
} }
.dialog-wrap-box { .dialog-wrap-box {
......
...@@ -123,7 +123,10 @@ export default { ...@@ -123,7 +123,10 @@ export default {
}, },
methods: { methods: {
handleSearch() {}, handleSearch() {},
handleDetail(scope) {
this.$alert('短信内容')
}, },
}
}; };
</script> </script>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<div class="store-item"> <div class="store-item">
<div class="store-item-s"> <div class="store-item-s">
<div class="store-item-title">到店用户线上化</div> <div class="store-item-title">到店用户线上化</div>
<el-button type="primary" size="small">配置活码</el-button> <el-button type="primary" size="small" @click="jumpChannel">配置活码</el-button>
</div> </div>
<div class="store-item-s"> <div class="store-item-s">
<div class="store-item-icon"> <div class="store-item-icon">
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<div class="store-item"> <div class="store-item">
<div class="store-item-s"> <div class="store-item-s">
<div class="store-item-title">离店用户线上化</div> <div class="store-item-title">离店用户线上化</div>
<el-button type="primary" size="small">企微魔方</el-button> <el-button type="primary" size="small" @click="jumpSquare">企微魔方</el-button>
</div> </div>
<div class="store-item-s"> <div class="store-item-s">
<div class="store-item-icon"> <div class="store-item-icon">
...@@ -86,14 +86,14 @@ ...@@ -86,14 +86,14 @@
<div class="echart-icon"><img src="@/assets/img/overview/h5.png" /></div> <div class="echart-icon"><img src="@/assets/img/overview/h5.png" /></div>
<div class="echart-num-desc"> <div class="echart-num-desc">
<div class="echart-num-1">客户总数</div> <div class="echart-num-1">客户总数</div>
<div class="echart-num-2">1,242,323人</div> <div class="echart-num-2">{{totalCount}}人</div>
</div> </div>
</div> </div>
<div class="echart-count-item"> <div class="echart-count-item">
<div class="echart-icon"><img src="@/assets/img/overview/h6.png" /></div> <div class="echart-icon"><img src="@/assets/img/overview/h6.png" /></div>
<div class="echart-num-desc"> <div class="echart-num-desc">
<div class="echart-num-1">匹配企微客户数</div> <div class="echart-num-1">匹配企微客户数</div>
<div class="echart-num-2">1,242,323人</div> <div class="echart-num-2">{{qyTotalCount}}人</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -130,11 +130,28 @@ export default { ...@@ -130,11 +130,28 @@ export default {
data() { data() {
return { return {
activeName: "first", activeName: "first",
totalCount: 0,
qyTotalCount: 0,
}; };
}, },
methods: { methods: {
jumpChannel() {
this.$router.push('/channel/index')
},
jumpSquare() {
this.$router.push('/square/import')
},
overview() {
this.$apis.overview.overview({}).then(res=>{
this.qyTotalCount = res.qyTotalCount;
this.totalCount = res.totalCount;
})
},
handleClick() {}, handleClick() {},
}, },
mounted() {
this.overview()
}
}; };
</script> </script>
...@@ -257,6 +274,13 @@ export default { ...@@ -257,6 +274,13 @@ export default {
} }
} }
} }
.statistics-main {
/deep/ {
.el-tabs__nav-wrap::after {
height: 0px;
}
}
}
@media screen and (max-width: 1340px) { @media screen and (max-width: 1340px) {
.store-item-ul { .store-item-ul {
font-size: 12px!important; font-size: 12px!important;
......
...@@ -8,13 +8,14 @@ ...@@ -8,13 +8,14 @@
平台通过智能外呼精准获取客户意向,结束通话后自动下发引流短信,用户一键接入微信生态。用户接入企微后可领取会员权益卡,实现高效锁客及后续营销策略提供精准触达的通道。 平台通过智能外呼精准获取客户意向,结束通话后自动下发引流短信,用户一键接入微信生态。用户接入企微后可领取会员权益卡,实现高效锁客及后续营销策略提供精准触达的通道。
</div> </div>
<div class="drainage-item-switch"> <div class="drainage-item-switch">
<el-switch v-model="value" active-color="#5850FF" inactive-color="#999999"> <el-switch v-model="addValue" active-color="#5850FF" inactive-color="#999999">
</el-switch> </el-switch>
</div> </div>
</div> </div>
<div class="config-title"> <div class="config-title">
<label>编辑配置</label> <span v-if="!editStatus" @click="editStatus = true"
<i class="el-icon-edit-outline"></i> ><label>编辑配置</label> <i class="el-icon-edit-outline"></i
></span>
</div> </div>
<div class="config-market"> <div class="config-market">
<div class="config-market-item checked"> <div class="config-market-item checked">
...@@ -42,13 +43,7 @@ ...@@ -42,13 +43,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="config-market-item"> <div class="config-market-item checked">
<el-switch
v-model="value1"
active-color="#5850FF"
inactive-color="#999999"
class="config-switch-icon"
></el-switch>
<div class="config-market-title">二次营销</div> <div class="config-market-title">二次营销</div>
<div class="config-market-select"> <div class="config-market-select">
<div class="config-market-s1"> <div class="config-market-s1">
...@@ -78,16 +73,17 @@ ...@@ -78,16 +73,17 @@
</div> </div>
<div class="drainage-wrap scrm-box-f"> <div class="drainage-wrap scrm-box-f">
<div class="drainage-title">营销配置</div> <div class="drainage-title">营销配置</div>
<div class="form-main">
<div class="drainage-form"> <div class="drainage-form">
<div class="drainage-form-item"> <div class="drainage-form-item">
<label>跟进员工</label> <label class="is-require">跟进员工</label>
<div class="el-input-tag input-tag-wrapper"> <div class="el-input-tag input-tag-wrapper">
<el-tag <el-tag
v-for="(tag, idx) in innerTags" v-for="(tag, idx) in addForm.staffIds"
:key="idx" :key="idx"
closable closable
:disable-transitions="false" :disable-transitions="false"
@close="remove(tag)" @close="remove(idx)"
> >
{{ tag.staffName }} {{ tag.staffName }}
</el-tag> </el-tag>
...@@ -95,39 +91,395 @@ ...@@ -95,39 +91,395 @@
<el-button size="small" @click="handleAddEmp" <el-button size="small" @click="handleAddEmp"
><i class="el-icon-plus"></i> 选择跟进专员</el-button ><i class="el-icon-plus"></i> 选择跟进专员</el-button
> >
<div class="drainage-coutom-count">已经选择2人</div> <div class="drainage-coutom-count">
已经选择{{ addForm.staffIds.length }}人
</div>
</div>
<div class="drainage-form-item">
<label>群发短信</label>
<div class="message-panel">
<el-form
ref="configForm"
label-position="left"
label-width="100px"
:model="addForm"
:rules="addRules"
class="code-body-form"
>
<el-form-item label="推送时间:">
系统将在「开始营销时间」之后启动智能外呼任务,并在「截止营销时间」之后停止该营销活动
</el-form-item>
<el-form-item size="small" label="营销时间" prop="time">
<el-time-picker
is-range
value-format="HH:mm:ss"
v-model="addForm.time"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围"
>
</el-time-picker>
</el-form-item>
<el-form-item label="短信内容" prop="content">
<el-input
type="textarea"
v-model="addForm.content"
rows="5"
maxlength="250"
show-word-limit
></el-input>
<div class="select-panel">
<div @click="handleSelectMessage">
<i class="el-icon-circle-plus-outline"><span>选择模板</span></i>
</div>
<div @click="handleSelectModel">
<i class="el-icon-circle-plus-outline"><span>活动</span></i>
</div>
</div>
<div class="form-tips">
共可输入341字,70字內(含70字)计一条,超过70字,按70字/条计费。
</div>
<div class="form-tips">
提示:当前短信已有{{
addForm.content.length
}}字,按1条短信发送且计费。
</div>
</el-form-item>
<el-form-item label="审核通知人:"
>短信内容审核结果会通过企微消息的形式发送给设置的员工,员工可以及时跟进。</el-form-item
>
<el-form-item label="自动打标签">
<el-button size="small" @click="handleAddTag">添加</el-button>
</el-form-item>
</el-form>
</div>
</div>
</div>
<div class="form-image"><img src="@/assets/img/marketing/phone.png" /></div>
</div>
</div>
<div
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px',
}"
>
<el-button type="primary" @click="goback">取消</el-button>
<el-button type="primary" @click="handleSave">提交</el-button>
</div>
<select-emp ref="selectEmpForm" @selectTable="selectTable"></select-emp>
<select-tag ref="selectTagForm"></select-tag>
<activity-model
ref="selectModelForm"
@selectActivity="selectActivity"
></activity-model>
<message-model ref="selectMessageForm" @selectItem="selectItem"></message-model>
<div class="dialog-wrap-box" v-show="dialogVisible">
<div class="dialog-wrap-panel">
<div class="dialog-step">
<div class="el-steps el-steps--horizontal">
<div class="el-step is-horizontal" style="flex-basis: 50%; margin-right: 0px">
<div class="el-step__head is-finish">
<div class="el-step__line" style="margin-right: 0px">
<i
class="el-step__line-inner"
style="transition-delay: 0ms; border-width: 0px; width: 0%"
></i>
</div>
<div class="el-step__icon is-text">
<div class="el-step__icon-inner">1</div>
</div>
<div class="el-step__main el-step__desc">
<div class="el-step__title">智能外呼</div>
<div class="el-step__title">精准触达</div>
</div>
</div>
</div>
<div class="el-step is-horizontal" style="flex-basis: 50%; margin-right: 0px">
<div class="el-step__head is-finish">
<div class="el-step__line" style="margin-right: 0px">
<i
class="el-step__line-inner"
style="transition-delay: -150ms; border-width: 0px; width: 0%"
></i>
</div>
<div class="el-step__icon is-text">
<!---->
<div class="el-step__icon-inner">2</div>
</div>
<div class="el-step__main el-step__desc">
<div class="el-step__title">智能短信</div>
<div class="el-step__title">快速引流</div>
</div>
</div>
</div>
<div
class="el-step is-horizontal is-flex"
style="flex-basis: 50%; max-width: 33.3333%"
>
<div class="el-step__head is-finish">
<div class="el-step__line"><i class="el-step__line-inner"></i></div>
<div class="el-step__icon is-text">
<!---->
<div class="el-step__icon-inner">3</div>
</div>
<div class="el-step__main el-step__desc">
<div class="el-step__title">会员权益</div>
<div class="el-step__title">留存锁客</div>
</div>
</div>
</div>
</div>
</div>
<div class="dialog-wrap-items">
<div class="dialog-wrap-item"></div>
<div class="dialog-wrap-item"></div>
<div class="dialog-wrap-item"></div>
</div>
<div class="dialog-wrap-footer">
<el-button type="primary" @click="open">一键体验</el-button>
<el-button type="primary" @click="dialogVisible = false">创建配置</el-button>
</div> </div>
</div> </div>
</div> </div>
<select-emp ref="selectEmpForm"></select-emp>
</div> </div>
</template> </template>
<script> <script>
import selectEmp from "./components/selectEmp"; import { utils } from "glsx-common";
import selectEmp from "@/components/selectEmp";
import selectTag from "@/components/selectTag";
import activityModel from "../marketing/components/activityModel";
import messageModel from "../marketing/components/messageModel";
export default { export default {
name: "drainage", name: "drainage",
components: { components: {
selectEmp selectEmp,
selectTag,
activityModel,
messageModel,
}, },
data() { data() {
return { return {
editStatus: false,
footerLeft: 0,
footerWidth: 0,
addForm: {
configType: 3,
content: "",
endTime: "",
id: "",
marketingId: "",
marketingType: "",
marketingUrl: "",
staffIds: [],
startTime: "",
tagging: [
{
labelGroup: { id: "36", name: "是否新车客户" },
labelList: [
{ id: "101", name: "非新车客户" },
{ id: "100", name: "新车客户" },
],
},
],
templateId: "",
},
dialogVisible: true, dialogVisible: true,
value: false, addValue: false,
value1: false, value1: false,
innerTags: [{ staffName: "都是" }], dracImFollowStaffResponses: [
{ codeId: null, imId: 5, staffId: 366, staffName: "fddfdf" },
],
}; };
}, },
methods: { methods: {
remove() {}, selectItem(item) {
this.addForm.templateId = item.id;
this.addForm.content = item.content;
},
selectActivity(item) {
this.addForm.marketingId = item.id;
this.addForm.marketingType = item.marketingType;
console.log(this.addForm);
},
selectTable(item) {
this.addForm.staffIds = item.map((item) => {
return {
staffId: item.relationId,
staffName: item.staffName,
};
});
console.log(this.addForm.staffIds);
},
remove(index) {
this.addForm.staffIds.splice(index, 1);
},
handleAddEmp() { handleAddEmp() {
this.$refs.selectEmpForm.init() this.$refs.selectEmpForm.init();
},
handleAddTag() {
this.$refs.selectTagForm.init();
},
handleSelectMessage() {
this.$refs.selectMessageForm.init();
},
handleSelectModel() {
this.$refs.selectModelForm.init();
},
open() {
this.dialogVisible = false;
this.$prompt("请输入手机号", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
inputPattern: /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/,
inputErrorMessage: "手机号格式不正确",
})
.then(({ value }) => {})
.catch(() => {});
},
handleSave() {
let params = utils.deepClone(this.addForm);
params.startTime = this.addForm.time[0];
params.endTime = this.addForm.time[1];
params.tagging = JSON.stringify(params.tagging);
params.staffIds = JSON.stringify(params.staffIds);
let config;
if (this.addForm.id) {
config = "updateConfig";
params.delFlag = this.addValue ? 1 : 0;
} else {
config = "addConfig";
} }
this.$apis.marketing[config](params).then((res) => {
if (res) {
this.$message({
message: "操作成功",
type: "success",
});
this.findConfig();
}
});
},
findConfig() {
this.$apis.marketing.findConfig({ configType: 3 }).then((res) => {
if (res) {
this.addForm = res;
this.addForm.staffIds = eval( this.addForm.staffIds);
}
});
},
},
mounted() {
this.findConfig();
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.dialog-step {
width: 80%;
margin: 0 auto 20px;
}
.el-steps {
transform: translateX(-30px);
}
.el-step.is-vertical .el-step__head {
width: 32px;
}
.el-step__line {
background: rgba(0, 0, 0, 0.15);
}
.el-step__icon {
width: 32px;
height: 32px;
border: 1px solid rgba(0, 0, 0, 0.15);
}
.el-step.is-horizontal .el-step__line {
top: 14px;
left: 120px;
right: 4%;
}
.el-step__icon-inner {
color: rgba(0, 0, 0, 0.25);
}
.el-step__head.is-finish {
color: #ffffff;
border-color: #5850ff;
}
.el-step__desc {
position: absolute;
display: inline-block;
top: -5px;
left: 36px;
width: 134px;
font-size: 16px;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
line-height: 24px;
}
.el-step__head.is-finish .el-step__icon-inner {
color: #ffffff;
}
.el-step__head.is-finish .el-step__line {
background: #5850ff;
}
.el-step__head.is-finish .el-step__icon.is-text {
background-color: #5850ff;
}
.el-step__title {
font-size: 16px;
line-height: 24px;
}
.el-step__description {
font-size: 13px;
}
.el-step__title.is-wait {
color: #999999;
}
.el-step__title.is-finish {
color: #333333;
font-weight: 700;
}
.dialog-wrap-box {
z-index: 2001;
position: fixed;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
background: rgba(0, 0, 0, 0.5);
.dialog-wrap-panel {
background: #ffffff;
position: absolute;
top: 50%;
left: 10%;
transform: translateY(-50%);
width: 80%;
padding: 40px;
box-sizing: border-box;
.dialog-wrap-items {
margin-top: 60px;
display: flex;
justify-content: space-between;
.dialog-wrap-item {
width: 200px;
height: 350px;
border: 1px solid #999999;
}
}
.dialog-wrap-footer {
display: flex;
justify-content: space-between;
width: 80%;
margin: 30px auto 0px;
}
}
}
.drainage-wrap { .drainage-wrap {
margin-bottom: 20px; margin-bottom: 20px;
.drainage-title { .drainage-title {
...@@ -139,17 +491,109 @@ export default { ...@@ -139,17 +491,109 @@ export default {
height: 57px; height: 57px;
border-bottom: 1px solid #d8d8d8; border-bottom: 1px solid #d8d8d8;
} }
.form-main {
display: flex;
.form-image {
width: 280px;
margin: 20px 10px;
}
.drainage-form {
flex: 1;
}
}
.form-tips {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
margin-top: 5px;
}
.drainage-form { .drainage-form {
padding: 20px; padding: 20px;
.drainage-form-item { .drainage-form-item {
display: flex; display: flex;
margin-top: 20px;
label { label {
width: 120px; width: 120px;
text-align: right; text-align: right;
margin-right: 20px; margin-right: 20px;
height: 36px; height: 36px;
line-height: 36px; line-height: 36px;
&.is-require {
&::before {
content: "*";
color: #f56c6c;
margin-right: 4px;
}
}
}
}
/deep/ {
.el-textarea__inner {
border-radius: 0px;
border: 1px solid #dcdfe6;
}
} }
.select-panel {
padding-left: 20px;
background: #fff;
display: flex;
font-size: 14px;
font-weight: 400;
color: #717171;
line-height: 30px;
border: 1px solid #dcdfe6;
border-top: 0px;
> div {
cursor: pointer;
margin-right: 10px;
span {
margin-left: 3px;
}
}
}
.upload-box {
margin-bottom: 10px;
.upload-file-panel {
display: flex;
align-items: center;
> a {
margin-left: 10px;
text-decoration: underline;
font-size: 12px;
font-weight: 400;
color: #5850ff;
line-height: 17px;
}
}
.upload-btn {
text-align: center;
width: 96px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #dcdfe6;
font-size: 14px;
font-weight: 400;
color: #999999;
padding: 6px 0px;
}
.upload-tips {
margin-top: 6px;
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
}
.message-panel {
background: #f7f7f7;
border: 1px solid #dcdfe6;
padding: 20px;
flex: 1;
box-sizing: border-box;
font-size: 14px;
color: #3a3a3a;
} }
.input-tag-wrapper { .input-tag-wrapper {
position: relative; position: relative;
...@@ -203,8 +647,11 @@ export default { ...@@ -203,8 +647,11 @@ export default {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #5850ff; color: #5850ff;
line-height: 20px; line-height: 40px;
margin: 20px 0px; height: 40px;
span {
cursor: pointer;
}
i { i {
margin-left: 6px; margin-left: 6px;
} }
...@@ -288,4 +735,14 @@ export default { ...@@ -288,4 +735,14 @@ export default {
} }
} }
} }
.footer-panel {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0px;
height: 64px;
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
<el-button type="primary" size="small" @click="goBack">返回</el-button> <el-button type="primary" size="small" @click="goBack">返回</el-button>
<div class="squre-safe-panel scrm-box-f"> <div class="squre-safe-panel scrm-box-f">
<div class="safe-upload-panel" id="drop_area"> <div class="safe-upload-panel" id="drop_area">
<el-upload action="" class="image-uploader" :before-upload="upLoadImg"> <el-upload action="" class="image-uploader" :before-upload="uploadFile">
<div class="safe-upload-icon"><i class="el-icon-tickets"></i></div> <div class="safe-upload-icon"><i class="el-icon-tickets"></i></div>
</el-upload> </el-upload>
<div class="safe-upload-tips">点击或将文件拖拽到这里上传</div> <div class="safe-upload-tips">点击或将文件拖拽到这里上传</div>
<div class="safe-upload-xl">支持扩展名:.csv .xls .xlsl</div> <div class="safe-upload-xl">支持扩展名:.csv .xls .xlsl</div>
<div class="safe-upload-link">下载模版</div> <div class="safe-upload-link" @click="downloadModel">下载模版</div>
</div> </div>
<div class="safe-upload-footer"> <div class="safe-upload-footer">
<el-button type="primary" size="small">提交</el-button> <el-button type="primary" size="small" @click="handleSubmit">提交</el-button>
<el-button size="small">返回</el-button> <el-button size="small">返回</el-button>
</div> </div>
</div> </div>
...@@ -46,10 +46,18 @@ export default { ...@@ -46,10 +46,18 @@ export default {
borderhover: false, //文件拖拖动到区域的hover效果 borderhover: false, //文件拖拖动到区域的hover效果
imgArr: [], imgArr: [],
fileData: [], fileData: [],
fileInfo: ''
}; };
}, },
methods: { methods: {
goBack() {}, goBack() {
this.$router.push("/square/index");
},
downloadModel() {
this.$apis.square.downloadModel({}).then((res) => {
window.open(res);
});
},
enentDrop(e) { enentDrop(e) {
this.borderhover = false; this.borderhover = false;
e.stopPropagation(); e.stopPropagation();
...@@ -58,17 +66,35 @@ export default { ...@@ -58,17 +66,35 @@ export default {
console.log(fileData); console.log(fileData);
this.uploadFile(fileData); this.uploadFile(fileData);
}, },
uploadFile(file) { uploadFile(e) {
let AllImgExt = ".csv|.xls|.xlsl"; let AllImgExt = ".csv|.xls|.xlsx";
let extName = file[0].name.substring(file[0].name.lastIndexOf(".")).toLowerCase(); let extName = e.name.substring(e.name.lastIndexOf(".")).toLowerCase();
if (file.length > 1) { console.log(extName);
this.$message.error("只能上传一个文件"); if (AllImgExt.indexOf(extName) === -1) {
return false;
}
if (AllImgExt.indexOf(extName + "|") === -1) {
this.$message.error("上传格式不正确"); this.$message.error("上传格式不正确");
return false; return false;
} }
const size = e.size / 1024 / 1024
if (size < 9) {
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e)
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
const fileInfo = e.name.split('.')[1] + '@' + arrBase64[1];
this.$apis.common.pictureUpload({file: fileInfo} ).then((res) => {
this.fileInfo = res
});
}
} else {
this.$message.error("上传文件不可超过9M");
}
},
handleSubmit() {
this.$apis.square.importsUpload({fileUrl:'https://qcwx.glsx.com.cn/upload/biz/777fa90a-cded-468a-85b6-6cc19a10a0ae.xlsx'}).then(res=>{
console.log(res)
})
}, },
}, },
mounted() { mounted() {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<el-button type="primary" size="small" @click="goBack">返回</el-button> <el-button type="primary" size="small" @click="goBack">返回</el-button>
<div class="squre-success-panel scrm-box-f"> <div class="squre-success-panel scrm-box-f">
<div class="contact-us-wrap"> <div class="contact-us-wrap">
<img src="@/assets/img/qrcode.png"> <img src="@/assets/img/qrcode.png" />
<div class="contact-us-about">联系我们</div> <div class="contact-us-about">联系我们</div>
</div> </div>
<div class="squre-success-image"><i class="el-icon-success"></i></div> <div class="squre-success-image"><i class="el-icon-success"></i></div>
...@@ -17,15 +17,17 @@ ...@@ -17,15 +17,17 @@
<div class="squre-success-footer"> <div class="squre-success-footer">
<div class="squre-success-item"> <div class="squre-success-item">
<div class="success-item-title">本次导入总客户数</div> <div class="success-item-title">本次导入总客户数</div>
<div class="success-item-num">1,000</div> <div class="success-item-num">{{ detailInfo.importNumber }}</div>
</div> </div>
<div class="squre-success-item"> <div class="squre-success-item">
<div class="success-item-title">新导入客户数</div> <div class="success-item-title">新导入客户数</div>
<div class="success-item-num">1,000</div> <div class="success-item-num">{{ detailInfo.newCustomerNumber }}</div>
</div> </div>
<div class="squre-success-item"> <div class="squre-success-item">
<div class="success-item-title">企微客户占比</div> <div class="success-item-title">企微客户占比</div>
<div class="success-item-num">1,000</div> <div class="success-item-num">
{{ detailInfo.entmicroNumber }}/{{ detailInfo.importNumber }}
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -37,17 +39,17 @@ ...@@ -37,17 +39,17 @@
<div class="custom-wrap-sta"> <div class="custom-wrap-sta">
<div class="custom-count-item"> <div class="custom-count-item">
<div class="custom-count-title">属于本次导入</div> <div class="custom-count-title">属于本次导入</div>
<div class="custom-count-num">107人</div> <div class="custom-count-num">{{ detailInfo.waitAddEntmicroNumber }}人</div>
</div> </div>
<div class="custom-count-item"> <div class="custom-count-item">
<div class="custom-count-title">人群累计人数</div> <div class="custom-count-title">人群累计人数</div>
<div class="custom-count-num">107人</div> <div class="custom-count-num">{{ detailInfo.waitAddEntmicroTotal }}人</div>
</div> </div>
</div> </div>
<div class="custom-wrap-content"> <div class="custom-wrap-content">
当前客户池中,尚未匹配到企微账号的数量。推荐使用以下营销策略,吸引用户添加企微。 当前客户池中,尚未匹配到企微账号的数量。推荐使用以下营销策略,吸引用户添加企微。
</div> </div>
<div class="custom-wrap-config">营销配置</div> <div class="custom-wrap-config" @click="jumpDrainage">营销配置</div>
</div> </div>
</div> </div>
<div class="custom-wrap-item"> <div class="custom-wrap-item">
...@@ -56,11 +58,11 @@ ...@@ -56,11 +58,11 @@
<div class="custom-wrap-sta"> <div class="custom-wrap-sta">
<div class="custom-count-item"> <div class="custom-count-item">
<div class="custom-count-title">属于本次导入</div> <div class="custom-count-title">属于本次导入</div>
<div class="custom-count-num">107人</div> <div class="custom-count-num">{{ detailInfo.waitRenewalNumber }}人</div>
</div> </div>
<div class="custom-count-item"> <div class="custom-count-item">
<div class="custom-count-title">人群累计人数</div> <div class="custom-count-title">人群累计人数</div>
<div class="custom-count-num">107人</div> <div class="custom-count-num">{{ detailInfo.waitTotal }}人</div>
</div> </div>
</div> </div>
<div class="custom-wrap-content"> <div class="custom-wrap-content">
...@@ -75,11 +77,15 @@ ...@@ -75,11 +77,15 @@
<div class="custom-wrap-sta"> <div class="custom-wrap-sta">
<div class="custom-count-item"> <div class="custom-count-item">
<div class="custom-count-title">属于本次导入</div> <div class="custom-count-title">属于本次导入</div>
<div class="custom-count-num">107人</div> <div class="custom-count-num">
{{ detailInfo.waitRegularMaintainNumber }}人
</div>
</div> </div>
<div class="custom-count-item"> <div class="custom-count-item">
<div class="custom-count-title">人群累计人数</div> <div class="custom-count-title">人群累计人数</div>
<div class="custom-count-num">107人</div> <div class="custom-count-num">
{{ detailInfo.waitRegularMaintainTotal }}人
</div>
</div> </div>
</div> </div>
<div class="custom-wrap-content"> <div class="custom-wrap-content">
...@@ -96,10 +102,26 @@ ...@@ -96,10 +102,26 @@
export default { export default {
name: "importResult", name: "importResult",
data() { data() {
return {}; return {
detailInfo: {},
};
}, },
methods: { methods: {
goBack() {}, goBack() {
this.$router.push("/square/index");
},
jumpDrainage() {
this.$router.push("/square/drainage");
},
importsKey() {
let { id } = this.$route.params;
this.$apis.square.importsKey({ id }).then((res) => {
this.detailInfo = res;
});
},
},
mounted() {
this.importsKey();
}, },
}; };
</script> </script>
...@@ -125,9 +147,9 @@ export default { ...@@ -125,9 +147,9 @@ export default {
} }
.contact-us-about { .contact-us-about {
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
line-height: 20px; line-height: 20px;
} }
} }
.squre-success-image { .squre-success-image {
...@@ -232,6 +254,7 @@ line-height: 20px; ...@@ -232,6 +254,7 @@ line-height: 20px;
height: 110px; height: 110px;
} }
.custom-wrap-config { .custom-wrap-config {
cursor: pointer;
margin: 10px auto; margin: 10px auto;
display: inline-block; display: inline-block;
border-radius: 4px; border-radius: 4px;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<el-popover <el-popover
placement="top" placement="top"
title="说明" title="说明"
width="200" width="400"
trigger="hover" trigger="hover"
content="通过导入的客户基础信息,过滤出系统策略所匹配的目标营销人群,从而引导门店分门别类的配置营销方案,并监控实施效果。" content="通过导入的客户基础信息,过滤出系统策略所匹配的目标营销人群,从而引导门店分门别类的配置营销方案,并监控实施效果。"
> >
...@@ -19,15 +19,15 @@ ...@@ -19,15 +19,15 @@
<div class="square-num-box"> <div class="square-num-box">
<div class="square-num-item"> <div class="square-num-item">
<div class="square-num-title">客户总数</div> <div class="square-num-title">客户总数</div>
<div class="square-num-count">1,230,000</div> <div class="square-num-count">{{countAll.totalCount}}</div>
</div> </div>
<div class="square-num-item"> <div class="square-num-item">
<div class="square-num-title">企微客户数</div> <div class="square-num-title">企微客户数</div>
<div class="square-num-count">1,230,000</div> <div class="square-num-count">{{countAll.qyCount}}</div>
</div> </div>
<div class="square-num-item"> <div class="square-num-item">
<div class="square-num-title">魔方导入客户数</div> <div class="square-num-title">魔方导入客户数</div>
<div class="square-num-count">1,230,000</div> <div class="square-num-count">{{countAll.magicCount}}</div>
</div> </div>
</div> </div>
<div class="square-title">客户分群营销</div> <div class="square-title">客户分群营销</div>
...@@ -38,13 +38,13 @@ ...@@ -38,13 +38,13 @@
<echart-circle bgColor="#6395FA" coustomId="coustomId_1"></echart-circle> <echart-circle bgColor="#6395FA" coustomId="coustomId_1"></echart-circle>
<div class="coustom-echart-desc"> <div class="coustom-echart-desc">
<div class="coustom-echart-title">人群数量</div> <div class="coustom-echart-title">人群数量</div>
<div class="coustom-echart-num">107</div> <div class="coustom-echart-num">{{countAll.unQyCount}}</div>
</div> </div>
</div> </div>
<div class="coustom-box-content"> <div class="coustom-box-content">
当前客户池中,尚未匹配到企微账号的数量。推荐使用以下营销策略,吸引用户添加企微。 当前客户池中,尚未匹配到企微账号的数量。推荐使用以下营销策略,吸引用户添加企微。
</div> </div>
<div class="coustom-box-config">营销配置</div> <div class="coustom-box-config" @click="jumpDrainage">营销配置</div>
</div> </div>
<div class="coustom-box-item"> <div class="coustom-box-item">
<div class="coustom-box-title">信息待完善客户</div> <div class="coustom-box-title">信息待完善客户</div>
...@@ -52,13 +52,13 @@ ...@@ -52,13 +52,13 @@
<echart-circle bgColor="#5AD8A6" coustomId="coustomId_2"></echart-circle> <echart-circle bgColor="#5AD8A6" coustomId="coustomId_2"></echart-circle>
<div class="coustom-echart-desc"> <div class="coustom-echart-desc">
<div class="coustom-echart-title">人群数量</div> <div class="coustom-echart-title">人群数量</div>
<div class="coustom-echart-num">107</div> <div class="coustom-echart-num">{{countAll.unInfoCount}}</div>
</div> </div>
</div> </div>
<div class="coustom-box-content"> <div class="coustom-box-content">
当前客户池中,有企微客户尚未维护手机号码。建议批量通知对应的销售顾问维护此类客户信息。 当前客户池中,有企微客户尚未维护手机号码。建议批量通知对应的销售顾问维护此类客户信息。
</div> </div>
<div class="coustom-box-config">营销配置</div> <div class="coustom-box-config" @click="jumpDrainage">营销配置</div>
</div> </div>
<div class="coustom-box-item"> <div class="coustom-box-item">
<div class="coustom-box-title">待续保客户</div> <div class="coustom-box-title">待续保客户</div>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<echart-circle bgColor="#5D7092" coustomId="coustomId_3"></echart-circle> <echart-circle bgColor="#5D7092" coustomId="coustomId_3"></echart-circle>
<div class="coustom-echart-desc"> <div class="coustom-echart-desc">
<div class="coustom-echart-title">人群数量</div> <div class="coustom-echart-title">人群数量</div>
<div class="coustom-echart-num">107</div> <div class="coustom-echart-num">{{countAll.unRenewCount}}</div>
</div> </div>
</div> </div>
<div class="coustom-box-content"> <div class="coustom-box-content">
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<echart-circle bgColor="#5B8FF9" coustomId="coustomId_4"></echart-circle> <echart-circle bgColor="#5B8FF9" coustomId="coustomId_4"></echart-circle>
<div class="coustom-echart-desc"> <div class="coustom-echart-desc">
<div class="coustom-echart-title">人群占比</div> <div class="coustom-echart-title">人群占比</div>
<div class="coustom-echart-num">10%</div> <div class="coustom-echart-num">{{countAll.unRegularCount}}</div>
</div> </div>
</div> </div>
<div class="coustom-box-content"> <div class="coustom-box-content">
...@@ -97,18 +97,17 @@ ...@@ -97,18 +97,17 @@
class="follow-form-item" class="follow-form-item"
label-width="120px" label-width="120px"
> >
<el-button size="small" type="primary" @click="handleSearch" <el-button size="small" type="primary" @click="handleImport"
><i class="el-icon-plus"></i> 导入魔方</el-button ><i class="el-icon-plus"></i> 导入魔方</el-button
> >
<el-form-item size="small" label="导入时间"> <el-form-item size="small" label="导入时间">
<el-date-picker <el-date-picker
v-model="tableSearchForm.time" v-model='createTime'
type="daterange" type='datetimerange'
range-separator="至" value-format='yyyy-MM-dd HH:mm:ss'
start-placeholder="开始日期" start-placeholder='开始时间'
end-placeholder="结束日期" end-placeholder='结束时间'
> ></el-date-picker>
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item size="small" style="float: right"> <el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button> <el-button type="primary" @click="handleSearch">查询</el-button>
...@@ -122,6 +121,12 @@ ...@@ -122,6 +121,12 @@
:pageConf="pageConf" :pageConf="pageConf"
:beforeSearchFn="beforeSearchFn" :beforeSearchFn="beforeSearchFn"
> >
<div slot="importNumber" slot-scope="scope">
{{scope.scope.entmicroNumber}} | {{scope.scope.importNumber}}
</div>
<div slot="newCostomerNumber" slot-scope="scope">
{{scope.scope.newCustomerNumber}} | {{scope.scope.importNumber}}
</div>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button> <el-button type="text" @click="handleDetail(scope.scope)">详情</el-button>
</div> </div>
...@@ -174,9 +179,11 @@ export default { ...@@ -174,9 +179,11 @@ export default {
}, },
data() { data() {
return { return {
createTime: '',
countAll: {},
dialogVisible: true, dialogVisible: true,
tableSearchForm: {}, tableSearchForm: {},
getListApi: this.$apis.channel.getListApi, getListApi: this.$apis.square.importsRecord,
tableParams: { tableParams: {
listName: "data", listName: "data",
tableOption: false, tableOption: false,
...@@ -186,20 +193,22 @@ export default { ...@@ -186,20 +193,22 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: "导入时间", label: "导入时间",
prop: "staffName", prop: "createdTime",
}, },
{ {
label: "企微客户数 | 导入客户数", label: "企微客户数 | 导入客户数",
prop: "entmicroName", prop: "importNumber",
minWidth: "100px", minWidth: "100px",
addHtml: "importNumber",
}, },
{ {
label: "新增客户数 | 导入客户数", label: "新增客户数 | 导入客户数",
prop: "roleName", prop: "newCostomerNumber",
addHtml: "newCostomerNumber",
}, },
{ {
label: "导入人员", label: "导入人员",
prop: "staffPhone", prop: "importStaffName",
width: "130px", width: "130px",
}, },
{ {
...@@ -219,9 +228,37 @@ export default { ...@@ -219,9 +228,37 @@ export default {
}, },
}; };
}, },
watch: {
'createTime'(value) {
this.tableSearchForm.startTime = value[0]
this.tableSearchForm.endTime = value[1]
}
},
methods: { methods: {
handleSearch() {}, importsCount() {
handleDetail() {}, let params = {
merchantId: "1",
};
this.$apis.square.importsCount({}).then((res) => {
console.log(res)
this.countAll = res;
});
},
handleSearch() {
this.$refs.employeeRef.refreshTable();
},
jumpDrainage() {
this.$router.push("/square/drainage");
},
handleDetail(scope) {
this.$router.push("/square/importResult/" + scope.id);
},
handleImport() {
this.$router.push("/square/import");
},
},
mounted() {
this.importsCount();
}, },
}; };
</script> </script>
...@@ -300,7 +337,8 @@ export default { ...@@ -300,7 +337,8 @@ export default {
img { img {
width: 14px; width: 14px;
height: 14px; height: 14px;
margin-top: 5px; margin-top: 3px;
margin-left: 18px;
} }
} }
.square-num-box { .square-num-box {
...@@ -375,6 +413,7 @@ export default { ...@@ -375,6 +413,7 @@ export default {
height: 110px; height: 110px;
} }
.coustom-box-config { .coustom-box-config {
cursor: pointer;
margin: 10px auto; margin: 10px auto;
display: inline-block; display: inline-block;
border-radius: 4px; border-radius: 4px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!