Commit 599dc5b0 by 前端

Merge branch 'v2.10.0' into 'master'

V2.10.0

See merge request !355
2 parents c92063cd 2ec5173a
......@@ -2078,6 +2078,17 @@
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"cliui": {
"version": "6.0.0",
"resolved": "https://registry.npmmirror.com/cliui/-/cliui-6.0.0.tgz",
......@@ -2119,6 +2130,13 @@
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
......@@ -2160,6 +2178,28 @@
"ansi-regex": "^5.0.1"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
},
"wrap-ansi": {
"version": "6.2.0",
"resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
......@@ -12764,75 +12804,6 @@
}
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": {
"version": "3.5.4",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.5.4.tgz",
......
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-09-16 14:23:36
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-09-19 10:54:45
* @FilePath: \scrm-micro-marketing\src\App.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div id="app">
<!-- <h2>
......@@ -69,9 +77,6 @@ export default {
color: #fff;
z-index: -1111;
}
.el-switch__core {
width: 50px !important;
}
.el-switch__label--right {
position: relative;
right: 46px;
......
......@@ -137,7 +137,7 @@ const staffList = params => {
}
// 客户群发客户列表
const customerDetailList = params => {
params.method = `${path}customer.list`
params.method = `${path}customer.list.page`
return http({
url: URL,
method: 'GET',
......

60.5 KB | W: | H:

144 KB | W: | H:

src/assets/guestCustom/friend-bg.png
src/assets/guestCustom/friend-bg.png
src/assets/guestCustom/friend-bg.png
src/assets/guestCustom/friend-bg.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -28,7 +28,7 @@
<el-form-item v-for="(item, index) in formList" :key="index" :label="item.label || ''">
<template>
<template v-if="item.type === 'input'">
<el-input v-model="formModel[item.prop]" :type="item.inputType || 'text'" :placeholder="item.placeholder || '请输入'" :clearable="item.clearable || false" :readonly="item.readonly || false" @keyup.enter.native="onInput" ></el-input>
<el-input v-model="formModel[item.prop]" :type="item.inputType || 'text'" :placeholder="item.placeholder || '请输入'" :clearable="item.clearable || false" :readonly="item.readonly || false" @keyup.enter.native="onInput"></el-input>
</template>
<template v-else-if="item.type === 'select'">
<el-select size="small" v-model="formModel[item.prop]" :placeholder="item.placeholder || '请选择'" :filterable="!item.noFilter">
......@@ -83,7 +83,7 @@ export default {
type: Boolean,
default: false
},
isThreeRowShow:{
isThreeRowShow: {
type: Boolean,
default: false
},
......@@ -99,7 +99,7 @@ export default {
type: Boolean,
default: false
},
isNeedThreeBtns:{
isNeedThreeBtns: {
type: Boolean,
default: true
}
......@@ -118,34 +118,31 @@ export default {
//调用默认时间(30天)
this.getPassMonthFormatDate()
}
this.$nextTick(()=>{
var sf = document.getElementById('searchForm')
if (sf.clientWidth < 1280 && this.isHasSyncBtn) {
document.querySelector('.itemWidth').style.maxWidth = 700 + 'px'
}
if (sf.clientWidth < 952 && this.isHasSyncBtn) {
this.isShowBtns = false
}
this.$nextTick(() => {
var sf = document.getElementById('searchForm')
let lineHeight = 75 //75
if (document.getElementById('searchForm').offsetHeight > lineHeight * 2) {
this.expande = false
this.needShowExpande = true
} else {
this.needShowExpande = false
this.expande = true
}
if (sf.clientWidth < 1280 && this.isHasSyncBtn) {
document.querySelector('.itemWidth').style.maxWidth = 700 + 'px'
}
if (sf.clientWidth < 952 && this.isHasSyncBtn) {
this.isShowBtns = false
}
if( sf.clientWidth< 840 && this.isThreeRowShow){
document.querySelector('.itemWidth').style.minHeight= document.querySelector('.itemWidth').offsetHeight + 50 + 'px'
// 客户群里面四个表做特殊处理,当为苹果笔记本电脑尺寸时,不是现实展开收起按钮
this.needShowExpande = false
this.expande = true
}
let lineHeight = 75 //75
if (document.getElementById('searchForm').offsetHeight > lineHeight * 2) {
this.expande = false
this.needShowExpande = true
} else {
this.needShowExpande = false
this.expande = true
}
if (sf.clientWidth < 840 && this.isThreeRowShow) {
document.querySelector('.itemWidth').style.minHeight = document.querySelector('.itemWidth').offsetHeight + 50 + 'px'
// 客户群里面四个表做特殊处理,当为苹果笔记本电脑尺寸时,不是现实展开收起按钮
this.needShowExpande = false
this.expande = true
}
})
//有数据不算表格高度,没数据算高度
......@@ -160,7 +157,7 @@ export default {
// $(window).bind('resize', function() {
// if (resizeTimer) clearTimeout(resizeTimer)
// resizeTimer = setTimeout(function() {
//
//
// }, 100)
// })
// window.onresize = () => {
......@@ -215,8 +212,8 @@ export default {
syncClick() {
this.$emit('syncClick')
},
handleExport(){
this.$emit('handleExport')
handleExport() {
this.$emit('handleExport')
},
expandeClick() {
......@@ -264,7 +261,7 @@ this.$emit('handleExport')
}
}
</script>
<style lang="scss">
<style lang="scss" scoped>
@import '@/styles/variables.scss';
.search-form {
padding: 18px 0 0 0;
......@@ -324,7 +321,7 @@ this.$emit('handleExport')
.el-select {
width: 215px;
}
.el-select>.el-input{
.el-select > .el-input {
width: 215px;
}
.el-form-item__content {
......
......@@ -3,8 +3,8 @@
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-02-18 19:05:02
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-09-26 17:25:16
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
......
......@@ -37,8 +37,13 @@
></i>
</div>
</div>
<div class="activity-name-tips">注:1. 手机号码、车牌号、车架号 至少填写一项,系统将用于匹配客户;</div>
<div class="activity-name-tips" style="margin-left: 26px">2. 导入招揽员工号码前,请确保该员工已加入企业微信,并且备注号码。</div>
<div class="activity-tips-panel">
<div class="activity-tips-l">注:</div>
<div class="activity-tips-r">
<div class="activity-name-tips">1. 手机号码、车牌号、车架号 至少填写一项,系统将用于匹配客户;</div>
<div class="activity-name-tips">2. 导入招揽员工号码前,请确保该员工已加入企业微信,并且备注号码。</div>
</div>
</div>
</template>
</el-form-item>
<template v-if="addForm.selectType == 1">
......@@ -81,8 +86,10 @@
</div>
</template>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleConfig(scope.scope)"><div class="config">配置</div></el-button>
<el-button type="text" @click="handleReset(scope.scope)" v-if="scope.scope.welcomeDTOS && scope.scope.welcomeDTOS.length"><div class="config">重置</div></el-button>
<div class="gl-table-button">
<el-button type="text" @click="handleConfig(scope.scope)"><div class="config">配置</div></el-button>
<el-button type="text" @click="handleReset(scope.scope)" v-if="scope.scope.welcomeDTOS && scope.scope.welcomeDTOS.length"><div class="config">重置</div></el-button>
</div>
</div>
</GLTable>
<div class="activity-name-tips">
......@@ -112,7 +119,7 @@
<span>{{ ImportResult.successCount }}</span>
条,匹配失败
<span>{{ ImportResult.errorCount }}</span>
条
条。
</div>
<div class="import-reason">
<div class="import-reason-content">失败分析:</div>
......@@ -571,7 +578,6 @@ export default {
border-bottom: 1px solid #d8d8d8;
}
.activity-box-form {
width: 50%;
padding-top: 30px;
.form-w40 {
width: 80%;
......@@ -633,8 +639,6 @@ export default {
.edit-group {
color: #5850ff;
cursor: pointer;
margin-left: 15px;
line-height: 32px;
}
}
.activity-status {
......@@ -651,6 +655,9 @@ export default {
vertical-align: middle;
margin-top: -1px;
}
.activity-tips-panel {
display: flex;
}
.activity-name-tips {
font-size: 14px;
line-height: 14px;
......
......@@ -227,7 +227,7 @@ export default {
label: '跟进员工',
prop: 'followName',
addHtml: 'followName',
width: 120
minWidth: 120
},
{
......
......@@ -90,7 +90,8 @@ export default {
},
{
label: '客户总数',
prop: 'customerCount'
prop: 'customerCount',
width: 200
},
{
label: '已跟进',
......
......@@ -90,33 +90,35 @@ export default {
{
label: '活动名称',
prop: 'configName',
width: 300,
minWidth: 300,
line: 1
},
{
label: '人群类型',
prop: 'custTypeName',
width: 200,
minWidth: 200,
line: 1
},
{
label: '推送日期',
prop: 'sendDate'
prop: 'sendDate',
minWidth: 120
},
{
label: '创建人',
prop: 'createdByName'
prop: 'createdByName',
minWidth: 150
},
{
label: '创建日期',
prop: 'createdTime',
width: '180px'
minWidth: '180px'
},
{
label: '状态',
prop: 'status',
addHtml: 'status',
width: '140px'
minWidth: '140px'
},
{
label: '操作',
......
......@@ -48,14 +48,14 @@
<div class="detail-modular">
<div class="title">客户详情</div>
<div class="detail-info">
<el-menu :default-active="customIndex" class="el-menu-demo" mode="horizontal" @select="handleCustomSelect">
<el-menu :default-active="customIndex" class="el-menu-demo" mode="horizontal" @select="handleCustomSelect" infinite-scroll-distance="10">
<el-menu-item index>全部</el-menu-item>
<el-menu-item index="1">已送达客户</el-menu-item>
<el-menu-item index="0">未送达客户</el-menu-item>
<el-menu-item index="2">客户送达失败</el-menu-item>
</el-menu>
<div class="detail-total">共 {{ customerlist.length || 0 }} 人</div>
<div v-if="customerlist.length != 0" class="info-list">
<div class="detail-total">共 {{ customerCount || 0 }} 人</div>
<div v-if="customerCount != 0" class="info-list" v-infinite-scroll="customerDetailLoad" immediate-check="false">
<div class="info-item" v-for="item in customerlist" :key="item.id">
<img class="info-avatar" :src="item.avatar ? item.avatar : require('@/assets/guestCustom/default-avatar.png')" alt />
<div class="info-content info-custom">
......@@ -108,7 +108,14 @@ export default {
eventBus: new Vue(),
isDisabled: false,
footerLeft: 0,
footerWidth: 0
footerWidth: 0,
// 客户详情分页
customerPage: {
pageSize: 10,
pageNum: 1
},
// 客户详情总数
customerCount: 0
}
},
mounted() {
......@@ -126,8 +133,19 @@ export default {
this.activeIndex = val
this.getStaffList(val)
},
// 客户详情选择切换
handleCustomSelect(val) {
this.customIndex = val
this.customerlist = []
// 获取滑动高度清0,防止tab切换时记录滚动条位置问题
var scrolltopList = document.querySelectorAll('.info-list')
if (scrolltopList) {
scrolltopList[1] ? (scrolltopList[1].scrollTop = 0) : ''
}
this.customerPage = {
pageSize: 10,
pageNum: 1
}
this.getCustomerList(val)
},
remind(data, index) {
......@@ -163,10 +181,28 @@ export default {
this.employeelist = res ? res : []
})
},
// 客户详情下拉加载
customerDetailLoad() {
// 详情列表有数据时才触发
if (this.customerlist.length > 0) {
this.customerPage.pageNum++
// 详情数组数量小于总数才触发,带上切换的tab值
if (this.customerlist.length < this.customerCount) this.getCustomerList(this.customIndex)
}
},
// 获取客户详情列表
getCustomerList(status = null) {
const id = this.$route.params.id
this.$apis.customerTransform.customerDetailList({ id, status }).then(res => {
this.customerlist = res ? res : []
var params = JSON.parse(JSON.stringify(this.customerPage))
params.status = status
params.id = id
this.$apis.customerTransform.customerDetailList(params).then(res => {
this.customerCount = res.count
if (!res.data.length) {
this.customerlist = []
return
}
this.customerlist.push(...res.data)
})
},
remindUserGroup() {
......@@ -276,7 +312,7 @@ export default {
margin-top: 0;
margin-left: 10px;
&.send {
width: 70px;
width: 80px;
}
span {
vertical-align: middle;
......
......@@ -15,11 +15,11 @@
<GLButton type="primary" :size="size" icon="el-icon-plus" fn="新建客户群发" @click="btnClick('create', 1)">新建群发</GLButton>
<div class="text">企业统一选择要发送的客户,由添加客户的成员确认后发送给客户,消息内容仅管理员和负责人可创建。</div>
<div class="renew">
<div style="cursor:pointer;" @click="refreshData('1')">
<i class="el-icon-refresh-right"></i>
<span style="margin-right: 8px;">更新数据</span>
</div>
<span style="color: #999;" v-if="time">更新于 {{time}}</span>
<div style="cursor:pointer;" @click="refreshData('1')">
<i class="el-icon-refresh-right"></i>
<span style="margin-right: 8px;">更新数据</span>
</div>
<span style="color: #999;" v-if="time">更新于 {{ time }}</span>
</div>
</div>
<!-- 表格区域 开始 -->
......@@ -54,11 +54,11 @@
<GLButton type="primary" :size="size" fn="新建客户群群发" icon="el-icon-plus" @click="btnClick('create', 2)">新建群发</GLButton>
<div class="text">管理员或负责人统一创建内容,群主收到通知后,可选择他管理的客户群并群发。</div>
<div class="renews">
<div style="cursor:pointer;" @click="refreshData('2')">
<i class="el-icon-refresh-right"></i>
<span style="margin-right: 8px;">更新数据</span>
</div>
<span style="color: #999;" v-if="times">更新于 {{times}}</span>
<div style="cursor:pointer;" @click="refreshData('2')">
<i class="el-icon-refresh-right"></i>
<span style="margin-right: 8px;">更新数据</span>
</div>
<span style="color: #999;" v-if="times">更新于 {{ times }}</span>
</div>
</div>
<!-- 表格区域 开始 -->
......@@ -97,8 +97,8 @@ export default {
}
return {
timeId: Function,
time:'',
times:'',
time: '',
times: '',
ATT_TYPE,
activeIndex: 1,
// 表格按钮
......@@ -336,9 +336,10 @@ export default {
},
mounted() {
// this.wxTips()
this.refreshData(this.activeIndex)
},
watch: {
activeIndex (newVal,oldVal) {
activeIndex(newVal, oldVal) {
if (newVal == 2) {
this.times = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
} else if (newVal == 1) {
......@@ -354,12 +355,12 @@ export default {
clearTimeout(this.timeId)
this.timeId = setTimeout(() => {
this.$apis.customerTransform.renewDetailList({}).then(res => {
if(res.code == '0'){
if(type == 1) {
this.time = res.data.createdTime
if (res.code == '0') {
if (type == 1) {
this.time = res.data.createdTime
this.$refs.customer.refreshTable()
} else if(type == 2) {
this.times = res.data.createdTime
} else if (type == 2) {
this.times = res.data.createdTime
this.$refs.customerGroup.refreshTable()
}
}
......@@ -495,12 +496,13 @@ export default {
color: #999;
margin-left: 20px;
}
.renew,.renews {
.renew,
.renews {
display: flex;
position: absolute;
right: 44px;
font-size: 14px;
color: #5850FF
color: #5850ff;
}
}
}
......
......@@ -135,7 +135,7 @@ export default {
width: 250px;
height: 350px;
overflow-y: auto;
top: 125px;
top: 90px;
left: 20px;
// background-color: cornflowerblue;
.preview-time {
......
......@@ -445,6 +445,10 @@ export default {
border: 1px solid rgba(88, 80, 255, 0.49);
border-radius: 4px;
line-height: 24px;
min-width: 488px;
max-width: 844px;
width: auto;
box-sizing: border-box;
.tips-icon {
width: 14px;
height: 14px;
......@@ -457,8 +461,11 @@ export default {
padding-bottom: 30px;
align-items: flex-end;
justify-content: space-between;
.preview {
flex: 1;
}
.info-content {
width: calc(100% - 360px);
width: 66%;
.filter-box {
// margin-left: 120px;
margin-bottom: 10px;
......@@ -533,7 +540,7 @@ export default {
.sale-select {
display: flex;
align-items: center;
margin-left: 80px;
margin-left: 154px;
}
.input-tag-wrapper {
max-height: 75px;
......@@ -604,10 +611,21 @@ export default {
padding-bottom: 10px;
}
.welcome-box {
display: inline-block;
min-width: 488px;
max-width: 844px;
width: auto !important;
margin-left: 154px;
}
}
.group-content {
padding: 22px 0 20px;
}
.date-picker {
margin-left: 150px;
/deep/ {
.el-date-editor {
width: 136px;
}
}
}
</style>
......@@ -308,6 +308,7 @@ export default {
mounted() {
this.handleRefresh()
this.getListData()
this.getOptionsList('searchFormData')
},
......@@ -319,10 +320,11 @@ export default {
this.refreshStatus = false
}, 1000)
}, 1000),
createStatus() {
this.$apis.friendGroup.createStatus({}).then(res => {
this.getListData()
})
async createStatus() {
this.updatedTime = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
await this.$apis.friendGroup.createStatus({})
await this.$apis.friendGroup.publicStatus({})
this.getListData()
},
getListData() {
this.loading = true
......@@ -337,7 +339,6 @@ export default {
}
this.$apis.friendGroup.getListApi(params).then(res => {
this.loading = false
this.updatedTime = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
if (res) {
this.tableData = res.data
this.tableData.forEach(listM => {
......
......@@ -66,10 +66,10 @@
<el-radio :label="2">指定车架号后6位</el-radio>
</el-radio-group>
<div :style="{ 'margin-left': defaultLabelWidth }">
<el-input :style="editForm.receiveRule === 4?'margin-top: -22px;margin-left: 8px;':''" @blur="formatPhone" type="textarea" v-model="phone" :placeholder="placeholder"></el-input>
<el-input :style="editForm.receiveRule === 4 ? 'margin-top: -22px;margin-left: 8px;' : ''" @blur="formatPhone" type="textarea" v-model="phone" :placeholder="placeholder"></el-input>
<p v-if="editForm.receiveRule !== 4" class="approval-tip">客户需准确输入该{{ receiveWay == 1 ? '手机号码' : '车架号后6位' }}才能成功领取</p>
<div :style="editForm.receiveRule === 4 ? 'margin-left: 7px;' : ''">
<div :class="['tel-item', !item.valid ? 'valid-tel': receiveWay == 1?'realTel':'realNum']" v-for="(item, index) in phoneList" :key="index">
<div :class="['tel-item', !item.valid ? 'valid-tel' : receiveWay == 1 ? 'realTel' : 'realNum']" v-for="(item, index) in phoneList" :key="index">
{{ item.tel }}
<i style="cursor:pointer" class="el-icon-close" @click="delPhone(item.tel)"></i>
</div>
......@@ -130,7 +130,18 @@
<el-button type="primary" @click="handleConfirm" size="medium" :loading="loading">提交</el-button>
</GLFooter>
<select-gift-dialog v-if="isSelectGiftVisible" :isSelectGiftVisible="isSelectGiftVisible" :selectedGiftList="selectedGiftList" @handleGiftConfirm="handleGiftConfirm" @handleGiftClose="handleGiftClose"></select-gift-dialog>
<select-staff-dialog v-if="isMutiSelectVisible" :isMutiSelectVisible="isMutiSelectVisible" :searchForm="searchStaffForm" :selectedStaffList="selectedStaffList" @handleMutiSelectConfirm="handleMutiSelectConfirm" @handleMutiSelectClose="handleMutiSelectClose"></select-staff-dialog>
<select-staff-dialog ref="staffDialog" :searchForm="tableSearchForm" v-if="isMutiSelectVisible" :isMutiSelectVisible="isMutiSelectVisible" :selectedStaffList="selectedStaffList" @handleMutiSelectConfirm="handleMutiSelectConfirm" @handleMutiSelectClose="handleMutiSelectClose">
<div slot="search">
<el-form class="search-staff" :inline="true" :model="tableSearchForm">
<el-form-item size="small" label="员工">
<el-input clearable v-model.trim="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item size="small" class="emp-form-btn">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
</div>
</select-staff-dialog>
</div>
</template>
<script>
......@@ -144,6 +155,7 @@ export default {
phone: '',
isLoaded: true,
loading: false,
tableSearchForm: { staffName: '' },
phoneList: [],
size: 'small',
title: '新增礼包',
......@@ -153,7 +165,6 @@ export default {
},
// 选择员工弹窗
isMutiSelectVisible: false,
searchStaffForm: {},
selectedStaffList: [],
// 选择定向礼包弹窗
isSelectGiftVisible: false,
......@@ -290,13 +301,13 @@ export default {
label: '库存数量',
name: 'stock',
addHtml: 'stockNumInput',
isHide: false,
isHide: false
},
{
label: '审批要求',
name: 'approveFlag',
addHtml: 'approvalSlot',
isHide: false,
isHide: false
},
{
label: '领取规则设置',
......@@ -328,7 +339,7 @@ export default {
}
],
suffixSlot: 'configSlot',
handleRadioChange: (e) => {
handleRadioChange: e => {
if (e == 4) {
this.receiveWay = 1
}
......@@ -369,7 +380,7 @@ export default {
label: '发放员工',
name: 'staffList',
addHtml: 'selectStaffBtn',
isHide: false,
isHide: false
},
{
label: '',
......@@ -429,7 +440,7 @@ export default {
this.editForm.staffList = []
this.editForm.stock = 1
}
},
}
},
computed: {
placeholder() {
......@@ -454,6 +465,10 @@ export default {
}
},
methods: {
//员工查询
handleSearch() {
this.$refs?.staffDialog?.getList({}, true)
},
resetTextArea() {
this.phone = ''
this.phoneList = []
......@@ -616,6 +631,7 @@ export default {
},
handleMutiSelectClose() {
this.isMutiSelectVisible = !this.isMutiSelectVisible
this.tableSearchForm.staffName = ''
},
handleMutiSelectConfirm(selectedData) {
this.editForm.staffList = []
......@@ -694,7 +710,7 @@ export default {
lock: true,
text: '正在Loading···',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)',
background: 'rgba(0, 0, 0, 0.3)',
customClass: 'loadingClass'
})
this.$apis.giftBag
......@@ -728,7 +744,7 @@ export default {
.then(() => {
this.cancelJump()
})
.catch(() => { })
.catch(() => {})
} else {
this.cancelJump()
}
......@@ -976,4 +992,9 @@ export default {
}
}
}
</style>
\ No newline at end of file
.search-staff {
.el-form-item {
margin-right: 20px;
}
}
</style>
<!-- 选择员工弹窗 -->
<template>
<GLDialog class="muti-pro" bigTitle="选择员工" mode="big" :before-close="handleMutiSelectClose" :visible.sync="isMutiSelectVisible" @onOk="handleMutiSelectConfirm" @onCancel="handleMutiSelectClose" v-loading="loading">
<div class="noproDiv" v-show="!staffList.length && fnCallBack">
<GLDialog class="muti-pro" :close-on-click-modal="false" bigTitle="选择员工" mode="big" :before-close="handleMutiSelectClose" :visible.sync="isMutiSelectVisible" @onOk="handleMutiSelectConfirm" @onCancel="handleMutiSelectClose" v-loading="loading">
<!-- <div class="noproDiv" v-show="!staffList.length && fnCallBack">
<img src="@/assets/noPro.png" />
<p class="noproP">系统暂无已创建的员工</p>
</div>
<div v-show="staffList.length">
</div> -->
<div>
<slot name="search"></slot>
<GLTable v-loading="loading" ref="mutiProRef" :tableData="staffList" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList"></GLTable>
</div>
......@@ -25,6 +25,9 @@ export default {
fnCallBack: false,
url: url,
loading: true,
tableSearchForm: {
staffName: ''
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
......@@ -58,7 +61,7 @@ export default {
},
searchForm: {
type: Object,
default: () => { }
default: () => {}
},
selectedStaffList: {
type: Array,
......@@ -69,7 +72,7 @@ export default {
mounted() {
this.userInfo = this.$globalState.session
this.selectList = JSON.parse(JSON.stringify(this.selectedStaffList))
this.selectList.map(item => item.userOneId = item.staffUUID)
this.selectList.map(item => (item.userOneId = item.staffUUID))
this.getList({}, true)
},
......@@ -102,7 +105,6 @@ export default {
this.selectedStaffList.forEach(row => {
row.userOneId = row.staffUUID
this.$nextTick(() => {
let idx = this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].data.findIndex(item => item.userOneId == row.staffUUID)
if (idx > -1) {
try {
......
......@@ -6,10 +6,10 @@
<div class="title">基础信息</div>
<div class="info-box">
<div class="info-content">
<div class="tips-text">
<!-- <div class="tips-text">
<img src="@/assets/guestCustom/tips.png" class="tips-icon" alt />
<span>企业主体信息需要认证,才可使用该功能。</span>
</div>
</div> -->
<el-form :model="basicForm" :rules="basicRules" ref="basicForm" label-width="124px">
<el-form-item label="自定义群名" prop="groupName">
<el-input v-model.trim="basicForm.groupName" size="small" placeholder="为群聊设个自定义组名,如“VIP服务群”" maxlength="10"></el-input>
......@@ -87,13 +87,15 @@
</div>
</div>
</div>
<GLFooter>
<el-button @click="handleCancel">取消</el-button>
<GLFooter>
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleSubmit">确定</el-button>
</GLFooter>
<GLDialog :title="'选择成员'" :visible.sync="membersVisible">
<!-- <SelectMembers islord="false" :selectData="selectData" ref="membersForm"></SelectMembers> -->
<SelectMember ref="membersForm" v-if="membersVisible" :selectData="selectData" :followData="followData"></SelectMember>
<div style="width:100%;overflow:hidden">
<SelectMember ref="membersForm" v-if="membersVisible" :selectData="selectData" :followData="followData"></SelectMember>
</div>
<span slot="footer" class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="membersVisible = false">取消</el-button>
<el-button type="primary" size="small" @click="handleConfirm">确定</el-button>
......@@ -120,7 +122,6 @@ export default {
},
data() {
const validatorUser = (rule, value, callback) => {
const followList = this.basicForm.followList
let userList = []
if (this.basicForm.userList && this.basicForm.userList.length) {
......@@ -128,11 +129,10 @@ export default {
} else {
userList = this.basicForm.followList
}
if (!this.basicForm.followList.length) {
callback(new Error('请选择跟进专员'))
} else {
if (userList.length < 2) {
this.$message({
type: 'error',
......@@ -145,7 +145,7 @@ export default {
}
}
// const nameVaild = (rule, value, callback) => {
//
//
// if (value) {
// const params = {
// templateName: value
......@@ -209,6 +209,9 @@ export default {
followVisible: false
}
},
beforeDestroy() {
this.$message.closeAll()
},
watch: {
basicForm: {
handler(val) {
......@@ -217,13 +220,14 @@ export default {
deep: true
}
// membersVisible(val) {
//
//
// if (!val) {
// this.$refs.membersForm.resetSearch()
// }
// }
},
mounted() {
this.wxTips()
if (this.$route.params) {
const id = this.$route.params.id
if (id != -1) this.getDetail(id)
......@@ -234,6 +238,31 @@ export default {
this.boxHeight = clientHeight - 200
},
methods: {
wxTips() {
const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
menu.forEach(item => {
if (!item.children) {
return
}
item.children.forEach(itm => {
if (itm.path == '/enterpriseWechat/index') {
this.$apis.groupGuest.getStatus({}).then(res => {
if (res.status != 'SUCCESS') {
const h = this.$createElement
this.$message({
showClose: true,
duration: 0,
message: h('p', null, [h('span', null, '此功能需完成【企业微信授权】后方可使用! '), h('span', { on: { click: this.jumpWx }, style: { marginRight: '150px', cursor: 'pointer', color: '#5850ff' } }, ['企业微信授权 ', h('i', { class: 'el-icon-d-arrow-right' }, '')])])
})
}
})
}
})
})
},
jumpWx() {
this.$history.push('/settings/enterpriseWechat/index')
},
openMembers() {
this.membersVisible = !this.membersVisible
},
......@@ -271,7 +300,7 @@ export default {
apiName = 'update'
params.id = this.basicForm.id
}
this.$apis.groupGuest[apiName](params)
.then(res => {
if (res) {
......@@ -310,7 +339,7 @@ export default {
this.basicForm.userList = this.selectData
this.basicForm.followList = res.userList.filter(item => item.follow == 1)
}
// this.selectData = res.userList
this.$nextTick(() => {
this.editStatus = false
......@@ -335,7 +364,6 @@ export default {
}
},
remove(val, idx) {
if (this.$refs.membersForm) {
this.$refs.membersForm.remove(val)
this.$set(this.basicForm, 'userList', this.$refs.membersForm.innerTags)
......@@ -380,7 +408,7 @@ export default {
.container {
margin-bottom: 20px;
background: #ffffff;
// padding: 20px;
.title {
padding: 20px 0 17px 20px;
......
......@@ -8,42 +8,13 @@
<div class="member-content">
<el-form :inline="true" class="member-form" :model="searchForm" @submit.native.prevent>
<el-form-item label="所在门店/部门" style="margin-bottom: 0;">
<el-popover
ref="popover"
placement="bottom"
width="215"
trigger="click"
v-model="popoverVisible"
@show="onShowPopover"
@hide="onHidePopover"
>
<el-tree
class="select-tree"
:data="treeData"
:props="defaultProps"
default-expand-all
@node-click="handleNodeClick"
></el-tree>
<el-input
v-model="searchForm.department"
slot="reference"
:size="size"
readonly
placeholder="请选择所在门店/部门"
:class="{ 'rotate': popoverVisible }"
suffix-icon="el-icon-arrow-down"
@keyup.enter.native="search"
></el-input>
<el-popover ref="popover" placement="bottom" width="215" trigger="click" v-model="popoverVisible" @show="onShowPopover" @hide="onHidePopover">
<el-tree class="select-tree" :data="treeData" :props="defaultProps" default-expand-all @node-click="handleNodeClick"></el-tree>
<el-input v-model="searchForm.department" slot="reference" :size="size" readonly placeholder="请选择所在门店/部门" :class="{ rotate: popoverVisible }" suffix-icon="el-icon-arrow-down" @keyup.enter.native="search"></el-input>
</el-popover>
</el-form-item>
<el-form-item label="姓名" style="margin-bottom: 0;">
<el-input
:size="size"
v-model.trim="searchForm.name"
@keyup.enter.native="search"
clearable
placeholder="请输入姓名搜索"
></el-input>
<el-input :size="size" v-model.trim="searchForm.name" @keyup.enter.native="search" clearable placeholder="请输入姓名搜索"></el-input>
</el-form-item>
<!-- <el-form-item>
<el-checkbox v-model="searchForm.checked">仅看跟进专员</el-checkbox>
......@@ -53,21 +24,10 @@
</el-form-item>
</el-form>
<div class="table-content">
<GLTable
:key="key"
v-loading="loading"
ref="empTable"
:tableData="tableEmpData"
:tableParams="tableParams"
:hasNum="false"
:hasPage="false"
:noDataImg="url"
@selectionTable="selectionTable"
@row-click="rowClick"
>
<GLTable v-loading="loading" ref="empTable" :tableData="tableEmpData" :tableParams="tableParams" :hasNum="false" :hasPage="false" :noDataImg="url" @selectionTable="selectionTable" @row-click="rowClick">
<div slot="staffName" slot-scope="scope">
<span>{{scope.scope.staffName}}</span>
<span class="staff-title" v-show="scope.scope.staffTitle">{{scope.scope.staffTitle}}</span>
<span>{{ scope.scope.staffName }}</span>
<span class="staff-title" v-show="scope.scope.staffTitle">{{ scope.scope.staffTitle }}</span>
</div>
</GLTable>
</div>
......@@ -78,19 +38,12 @@
</div>
<div class="member-right">
<div class="member-title">已选</div>
<div class="member-name">成员名称({{innerTags.length}}项)</div>
<div class="member-name">成员名称({{ innerTags.length }}项)</div>
<div class="input-tag-wrapper">
<div class="tag-box">
<el-tag
v-for="(tag, idx) in innerTags"
:key="idx"
type="info"
closable
:disable-transitions="false"
@close="remove(tag)"
>
<el-tag v-for="(tag, idx) in innerTags" :key="idx" type="info" closable :disable-transitions="false" @close="remove(tag)">
<!-- <i class="el-icon-user-solid"></i> -->
<img class="headPortrait" src="@/assets/headPortrait.png" />
<img class="headPortrait" src="@/assets/headPortrait.png" />
{{ tag.staffName }}
</el-tag>
</div>
......@@ -146,7 +99,6 @@ export default {
},
mounted() {
this.listDepartmentTree()
},
methods: {
selectionTable(val) {
......@@ -180,7 +132,7 @@ export default {
this.allTreeData = this.getEmployee(res)
this.currentTreeData = this.getEmployee(res)
this.treeData = res
this.tableEmpData.length ? (this.$refs.empTable.tableHeightValues = '250px') : this.$refs.empTable.setTableHeightFun()
// this.tableEmpData.length && (this.$refs.empTable.tableHeightValues = '250px')
if (this.selectData && this.selectData.length) {
this.selectData.forEach(item => {
this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(item)
......@@ -298,6 +250,7 @@ export default {
}
}
.member-wrapper {
width: 100%;
display: flex;
.member-title {
font-size: 16px;
......@@ -312,8 +265,6 @@ export default {
}
}
.member-left {
width: 800px;
.member-content {
border: 1px solid #eee;
.member-form {
......
......@@ -147,17 +147,15 @@ export default {
}
},
mounted() {
this.eventBus.$emit('update', this.previewList)
// this.updateList(this.previewList)
// obj.init('video')
},
methods: {
handleImgChange(e, targetItem) {
var reader = new FileReader()
var file = e.srcElement.files[0]
// 默认1MB
const limitSize = targetItem.limitSize || 1
const isLt = file.size / 1024 / 1024 < limitSize
......@@ -170,12 +168,10 @@ export default {
var image = new Image()
image.src = e.target.result
image.onload = () => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
this.previewList.push({
attType: ATT_TYPE.IMAGE,
attContent: res
......@@ -198,10 +194,9 @@ export default {
reader.readAsDataURL(file)
reader.onload = e => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
this.previewList.push({
attType: ATT_TYPE.VEDIO,
attContent: res
......@@ -213,7 +208,7 @@ export default {
handleImg(e) {
var reader = new FileReader()
var file = e.srcElement.files[0]
// 默认1MB
const limitSize = 10
const isLt = file.size / 1024 / 1024 < limitSize
......@@ -227,11 +222,10 @@ export default {
image.src = e.target.result
image.onload = () => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$set(this.appletForm, 'picUrl', 'dfasdfasfa')
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
this.$set(this.appletForm, 'picUrl', res)
}
})
......@@ -239,7 +233,6 @@ export default {
}
},
switchDailog(funName) {
if (funName == 'link') {
this.dialogTitle = '添加网页消息'
} else if (funName == 'applet') {
......@@ -253,7 +246,6 @@ export default {
case '添加网页消息':
this.$refs.linkForm.validate(valid => {
if (valid) {
this.previewList.push({
attType: ATT_TYPE.URL,
attContent: this.linkForm
......@@ -264,16 +256,13 @@ export default {
// this.linkForm = {}
// this.$refs.linkForm.clearValidate()
} else {
return false
}
})
break
case '添加小程序':
this.$refs.appletForm.validate(valid => {
if (valid) {
this.previewList.push({
attType: ATT_TYPE.MINIPROGRAM,
attContent: this.appletForm
......@@ -283,25 +272,21 @@ export default {
// this.appletForm = {}
// this.$refs.appletForm.clearValidate()
} else {
return false
}
})
break
default:
}
},
close(index) {
// this.previewList
this.previewList.splice(index, 1)
this.eventBus.$emit('update', this.previewList)
},
textInput(val) {
const hasText = this.previewList.some(item => item.attType == 1)
if (hasText) {
this.$set(this.previewList, 0, {
attContent: val,
......@@ -313,7 +298,6 @@ export default {
attType: ATT_TYPE.TEXT
})
}
},
closeDialog() {
if (this.dialogVisible) {
......@@ -342,7 +326,7 @@ export default {
<style lang="scss" scoped>
.welcome-box {
display: inline-block !important;
display: inline-block !important;
// padding-top: 20px;
// margin-left: 87px;
}
......
......@@ -88,7 +88,7 @@ export default {
{
label: '群聊名称',
prop: 'groupName',
width:250,
width: 250,
line: 1
},
{
......@@ -300,7 +300,6 @@ export default {
})
break
default:
}
},
setTableFinishFun() {
......@@ -345,12 +344,12 @@ export default {
}
}
.btn-header {
margin-bottom: 10px;
margin-bottom: 16px;
}
.container {
margin-bottom: 20px;
background: #ffffff;
padding: 20px;
}
.addBtn {
......@@ -367,7 +366,7 @@ export default {
.toptips {
display: inline-block;
position: relative;
margin-left: 10px;
margin-left: 16px;
height: 20px;
font-size: 14px;
font-weight: 400;
......
......@@ -407,7 +407,7 @@ export default {
.border {
padding: 20px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
}
.orange {
......
......@@ -420,7 +420,8 @@ export default {
reader.readAsDataURL(file)
reader.onload = e => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
// const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.slice(-3) + '@' + imgFile.split(',')[1]
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
this.pdfUrl = res
......@@ -448,7 +449,7 @@ export default {
reader.readAsDataURL(file)
reader.onload = e => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
// console.log(res)
......
......@@ -43,7 +43,7 @@ export default {
this.$emit('focus')
}
// 上传图片
this.editor.config.customUploadImg = function (resultFiles, insertImgFn) {
this.editor.config.customUploadImg = function(resultFiles, insertImgFn) {
var file = resultFiles[0]
var reader = new FileReader()
// 默认1MB
......@@ -56,7 +56,7 @@ export default {
reader.readAsDataURL(file)
reader.onload = e => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
_this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
// console.log(res)
......@@ -69,7 +69,7 @@ export default {
}
}
// 上传视频
this.editor.config.customUploadVideo = function (resultFiles, insertVideoFn) {
this.editor.config.customUploadVideo = function(resultFiles, insertVideoFn) {
var file = resultFiles[0]
var reader = new FileReader()
// 默认1MB
......@@ -82,7 +82,7 @@ export default {
reader.readAsDataURL(file)
reader.onload = e => {
const videoFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + videoFile.split(',')[1]
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + videoFile.split(',')[1]
_this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
// console.log(res)
......
......@@ -13,7 +13,7 @@
</span>
<div class="container">
<div class="search-form">
<GLCombiForm ref="showSearch" :rowNumber="2" :formObj="searchForm" :formData="materialFormData" @handleOk="getListApi" @handleRest="handleReset"></GLCombiForm>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="materialFormData" @handleOk="getListApi" @handleRest="handleReset"></GLCombiForm>
</div>
<div class="tabelList">
<el-row>
......
......@@ -175,7 +175,6 @@ export default {
getBaseInfo() {
this.$apis.sop.getSopBaseInfoApi({ sopId: this.sopId }).then(res => {
this.sopInfo = res
console.log(this.sopInfo)
this.sopInfo.completedPercent = Math.round((this.sopInfo.sopStatistics.finishEventCount / this.sopInfo.sopStatistics.eventCount) * 100).toFixed(0) + '%'
this.drawPie()
})
......
......@@ -160,7 +160,7 @@ export default {
getBaseInfo() {
this.$apis.sop.getSopBaseInfoApi({ sopId: this.sopId }).then(res => {
this.sopInfo = res
this.sopInfo.touchPercent = this.baseData.sopEventList.length ? Math.round((this.selectedEventInfo.eventStatistics.reachCustomerCount / this.sopInfo.customerCount) * 100).toFixed(0) + '%' : '-'
this.sopInfo.touchPercent = this.baseData.sopEventList.length && this.sopInfo.customerCount ? Math.round((this.selectedEventInfo.eventStatistics.reachCustomerCount / this.sopInfo.customerCount) * 100).toFixed(0) + '%' : '-'
this.drawPie()
})
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!