Commit 2fa5fb1d by zhouzy
2 parents f4c16bf0 e98b2f90
const url = 'http://192.168.3.191:8064/rop-scrm-entmicro/router'
// const url = 'http://192.168.3.191:8064/rop-scrm-entmicro/router'
const url = '/rop-scrm-entmicro/router'
const returnAll = true
export default {
/**消息盒子-好友列表 */
getCustomerList(data) {
data.method = 'org.ore.api.dracScrmWork.findWorkDetail'
getCustomerList(data={}) {
data.method = 'entmicro.api.dracScrmWork.findWorkDetail'
return window.$HTTP({
url,
data,
......
const url = 'http://192.168.3.191:8064/rop-scrm-entmicro/router'
// const url = 'http://192.168.3.191:8064/rop-scrm-entmicro/router'
const url = '/rop-scrm-entmicro/router'
const returnAll = true
export default {
/**获取打标签的客户列表 */
getcustomerList(data) {
data.method = 'org.ore.api.qywechat.tagging.customer.list'
getcustomerList(data={}) {
data.method = 'entmicro.api.qywechat.tagging.customer.list'
return window.$HTTP({
url,
data,
......@@ -13,8 +14,8 @@ export default {
})
},
/**标签数据获取 */
gettaggingList(data) {
data.method = 'org.ore.api.qywechat.tagging.info'
gettaggingList(data={}) {
data.method = 'entmicro.api.qywechat.tagging.info'
return window.$HTTP({
url,
data,
......
......@@ -18,5 +18,15 @@ export default {
data,
returnAll
})
}
},
/** 获取userid */
getuserInfo(data={}) {
data.method = 'scrm.api.sso.user.getLoginInfo'
return window.$HTTP({
url,
data,
returnAll
})
}
}
\ No newline at end of file
......@@ -61,12 +61,3 @@ img {
.sticky {
position: static;
}
.buttomLine {
position: absolute;
left: 0;
bottom: 0;
width: 375px;
height: 1px;
opacity: 0.3;
background-color: #c3c3c3;
}
\ No newline at end of file
<template>
<div class="hint">
<div class="tip">{{ title }}</div>
<div class="date" v-if="time">{{ time }}</div>
<div class="hint-tip">
<div class="tip-title">{{ title }}</div>
<div class="tip-date" v-if="time">{{ time }}</div>
</div>
</template>
<script>
......@@ -26,7 +26,7 @@ export default {
}
</script>
<style lang="scss" scoped>
.hint {
.hint-tip {
padding: 10px 16px;
width: 375px;
height: 40px;
......@@ -36,14 +36,14 @@ export default {
display: flex;
justify-content: center;
justify-content: space-between;
.tip {
.tip-title {
color: #545454;
font-size: 16px;
line-height: 20px;
text-align: left;
letter-spacing: 0px;
}
.date {
.tip-date {
font-size: 12px;
font-weight: 500;
color: #545454;
......
......@@ -124,10 +124,10 @@ const setClipboardData = data => {
wx.setClipboardData({
data,
success(res) {
console.log(res)
Toast('复制成功')
},
fail(res){
console.log(res)
}
})
}
......
<template>
<div :class="['container-add', `page-type-${tabIndex}`]">
<tip :title="title"></tip>
<template v-if="data.length > 0">
<template v-if="customerList.length > 0">
<div class="customerList-add">
<scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView">
<div class="customer-add" v-for="(item, index) in data" :key="index">
<div class="customer-add" v-for="(item, index) in customerList" :key="index">
<div class="customer-add-portrait" v-if="tabIndex == 3">
<img :src="item.avatar" />
</div>
......@@ -14,14 +14,12 @@
</div>
<template v-if="item.status == 0">
<div class="customer-add-friend flex">
<div class="sprite-icon icon-customer-add" @click="addFriend(item)">
</div>
<div class="sprite-icon icon-customer-add" @click="addFriend(item)"></div>
<div class="customer-add-friend-text">加好友</div>
</div>
<div class="line"></div>
<div class=" customer-add-friend flex" @click="callPhone(item.customerPhone)">
<div class="sprite-icon icon-customer-phone">
</div>
<div class="line"></div>
<div class="customer-add-friend flex" @click="callPhone(item.customerPhone)">
<div class="sprite-icon icon-customer-phone"></div>
<div class="customer-add-friend-text">拨打电话</div>
</div>
</template>
......@@ -44,12 +42,15 @@
</template>
<script>
import { wxConfig } from '@/api'
import { groupCustomer } from '@/api'
export default {
name: 'customerDetails',
data() {
return {
check: true,
customerList: this.data,
customerList: [],
status: 0,
taskId: this.$route.query.taskId ? this.$route.query.taskId : 'e0e1a10cf50f427bb6d35906cf3dbf21',
copywriting: '我是深圳福田宝马4S店的售后经理王俊凯,添加企业微信,帮你解决您购车售后任何问题。'
}
},
......@@ -63,21 +64,51 @@ export default {
default: 0
}
},
created() {
this.customerList = this.data
},
computed: {
title() {
switch (this.tabIndex) {
case 0:
return `您共有${this.data.length}位客户待添加!`
return `您共有${this.customerList.length}位客户待添加!`
case 1:
return `您共有${this.data.length}位客户待通过!`
return `您共有${this.customerList.length}位客户待通过!`
case 3:
return `您共有${this.data.length}位客户!`
return `您共有${this.customerList.length}位客户!`
default:
return `您共有${this.data.length}位客户待添加!`
return `您共有${this.customerList.length}位客户待添加!`
}
}
},
watch: {
tabIndex: {
handler(newVal) {
if (newVal == 3) {
this.status = ''
} else {
this.status = newVal
}
this.init()
},
immediate: true
}
},
methods: {
init() {
let search = {
taskId: this.taskId,
status: this.status
}
groupCustomer.getCustomerList(search).then(res => {
if (res.code == 0) {
this.customerList = res.data
} else {
this.customerList = []
}
})
},
onReachBottom() {
this.$refs.scrollView.loading = false
this.$refs.scrollView.finished = true
......@@ -90,8 +121,7 @@ export default {
addFriend(data) {
window.$wx = wxConfig
window.$wx.init(['navigateToAddCustomer', 'setClipboardData']).then(() => {
//获取userId
this.setClipboardData({ data: data.customerPhone }) //复制
this.setClipboardData(data.customerPhone) //复制
window.$wx.navigateToAddCustomer().then(res => {
console.log(res)
})
......@@ -101,7 +131,7 @@ export default {
copy() {
window.$wx = wxConfig
window.$wx.init(['setClipboardData']).then(() => {
this.setClipboardData({ data: this.copywriting }) //复制
this.setClipboardData(this.copywriting) //复制
})
}
}
......@@ -196,14 +226,13 @@ export default {
white-space: nowrap;
margin-top: 7px;
}
}
.line {
margin: 0 13px 0 16px;
width: 1px;
height: 42px;
background: rgba(0, 0, 0, 0.1);
}
.line {
margin: 0 13px 0 16px;
width: 1px;
height: 42px;
background: rgba(0, 0, 0, 0.1);
}
.customer-add-stay {
font-size: 12px;
font-weight: 400;
......@@ -253,6 +282,15 @@ export default {
margin-bottom: 16px;
}
}
.buttomLine {
position: absolute;
left: 0;
bottom: 0;
width: 375px!important;
height: 1px;
opacity: 0.3;
background-color: #c3c3c3!important;
}
}
.page-type-0 {
.content {
......
......@@ -2,7 +2,7 @@
<div class="container-wrap">
<tab :list="list" :sticky="sticky" :index="tabIndex" @change="changeTabs"></tab>
<!-- 添加 待通过 全部-->
<add v-if="tabIndex == 0 || tabIndex == 1 || tabIndex == 3" :tabIndex="tabIndex" :data="customerList"></add>
<add v-if="tabIndex == 0 || tabIndex == 1 || tabIndex == 3" :tabIndex="tabIndex" :data="customerList"></add>
<!-- 已通过 -->
<tag :isTitle="isTitle" v-else-if="tabIndex == 2" :data="customerList"></tag>
</div>
......@@ -10,7 +10,6 @@
<script>
import add from './add'
import tag from '../tag/index.vue'
import { groupCustomer } from '@/api'
export default {
name: 'customerDetails',
data() {
......@@ -20,130 +19,8 @@ export default {
isTitle: false, //是否显示search组件
tabIndex: 0,
status: 0,
taskId: this.$route.query.taskId?this.$route.query.taskId:'',
customerList: [],
// customerList : [
// {
// id: null,
// userid: 'wmdMreDgAAY_3bc9griISYSmgyx_FuQw',
// customerName: '王欣伟',
// customerPhone: '13476670746',
// avatar: 'http://wx.qlogo.cn/mmhead/Q3auHgzwzM7CwgjO4zXia5tmwgfKRK1IXhialS5hiaVMt15SlniciaRRHDA/0',
// type: 1,
// createdTime: '2021-11-14 17:17:38',
// status: 2
// },
// {
// id: null,
// userid: 'wodMreDgAAJ4g8Q6XpoIcNFXtr_M42xA',
// customerName: '曾琪',
// customerPhone: '13476670746',
// avatar: 'http://wework.qpic.cn/bizmail/TzKjFfYqwUNTjchjy3lQW3u9HibSkzuicPdrkZWhP7p9KTSysersUWWA/0',
// type: 2,
// createdTime: '2021-09-18 14:27:35',
// status: 1
// },
// {
// id: null,
// userid: 'wmdMreDgAAvkJ7PZmeph-HYoSLmkMUFQ',
// customerName: '爱就在一起',
// customerPhone: '13476670746',
// avatar: 'http://wx.qlogo.cn/mmhead/A7sq8BD8oexpibZTkv1gC7uib0sOrUZuhfPgrK7aicuib4JqRDq1bed4kQ/0',
// type: 1,
// createdTime: '2021-08-31 14:51:06',
// status: 0
// },
// {
// id: null,
// userid: 'wodMreDgAAcjbEcZ4kycsCEeb0sGqDkA',
// customerName: '李崇源',
// customerPhone: '13476670746',
// avatar: 'https://wework.qpic.cn/wwhead/duc2TvpEgSQO4BpE0WZSZ8I5J6rakCVOgvErIPJwQaxPiaq5xiblVNTV8pMYcrcHjRPAvHhZQWxy8/0',
// type: 2,
// createdTime: '2021-08-24 09:39:05',
// status: 1
// },
// {
// id: null,
// userid: 'wmdMreDgAAY_3bc9griISYSmgyx_FuQw',
// customerName: '王欣伟',
// customerPhone: '13476670746',
// avatar: 'http://wx.qlogo.cn/mmhead/Q3auHgzwzM7CwgjO4zXia5tmwgfKRK1IXhialS5hiaVMt15SlniciaRRHDA/0',
// type: 1,
// createdTime: '2021-11-14 17:17:38',
// status: 2
// },
// {
// id: null,
// userid: 'wodMreDgAAJ4g8Q6XpoIcNFXtr_M42xA',
// customerName: '曾琪',
// customerPhone: '13476670746',
// avatar: 'http://wework.qpic.cn/bizmail/TzKjFfYqwUNTjchjy3lQW3u9HibSkzuicPdrkZWhP7p9KTSysersUWWA/0',
// type: 2,
// createdTime: '2021-09-18 14:27:35',
// status: 1
// },
// {
// id: null,
// userid: 'wmdMreDgAAvkJ7PZmeph-HYoSLmkMUFQ',
// customerName: '爱就在一起',
// customerPhone: '13476670746',
// avatar: 'http://wx.qlogo.cn/mmhead/A7sq8BD8oexpibZTkv1gC7uib0sOrUZuhfPgrK7aicuib4JqRDq1bed4kQ/0',
// type: 1,
// createdTime: '2021-08-31 14:51:06',
// status: 0
// },
// {
// id: null,
// userid: 'wodMreDgAAcjbEcZ4kycsCEeb0sGqDkA',
// customerName: '李崇源',
// customerPhone: '13476670746',
// avatar: 'https://wework.qpic.cn/wwhead/duc2TvpEgSQO4BpE0WZSZ8I5J6rakCVOgvErIPJwQaxPiaq5xiblVNTV8pMYcrcHjRPAvHhZQWxy8/0',
// type: 2,
// createdTime: '2021-08-24 09:39:05',
// status: 1
// },
// {
// id: null,
// userid: 'wmdMreDgAAY_3bc9griISYSmgyx_FuQw',
// customerName: '王欣伟',
// customerPhone: '13476670746',
// avatar: 'http://wx.qlogo.cn/mmhead/Q3auHgzwzM7CwgjO4zXia5tmwgfKRK1IXhialS5hiaVMt15SlniciaRRHDA/0',
// type: 1,
// createdTime: '2021-11-14 17:17:38',
// status: 2
// },
// {
// id: null,
// userid: 'wodMreDgAAJ4g8Q6XpoIcNFXtr_M42xA',
// customerName: '曾琪',
// customerPhone: '13476670746',
// avatar: 'http://wework.qpic.cn/bizmail/TzKjFfYqwUNTjchjy3lQW3u9HibSkzuicPdrkZWhP7p9KTSysersUWWA/0',
// type: 2,
// createdTime: '2021-09-18 14:27:35',
// status: 1
// },
// {
// id: null,
// userid: 'wmdMreDgAAvkJ7PZmeph-HYoSLmkMUFQ',
// customerName: '爱就在一起',
// customerPhone: '13476670746',
// avatar: 'http://wx.qlogo.cn/mmhead/A7sq8BD8oexpibZTkv1gC7uib0sOrUZuhfPgrK7aicuib4JqRDq1bed4kQ/0',
// type: 1,
// createdTime: '2021-08-31 14:51:06',
// status: 0
// },
// {
// id: null,
// userid: 'wodMreDgAAcjbEcZ4kycsCEeb0sGqDkA',
// customerName: '李崇源',
// customerPhone: '13476670746',
// avatar: 'https://wework.qpic.cn/wwhead/duc2TvpEgSQO4BpE0WZSZ8I5J6rakCVOgvErIPJwQaxPiaq5xiblVNTV8pMYcrcHjRPAvHhZQWxy8/0',
// type: 2,
// createdTime: '2021-08-24 09:39:05',
// status: 1
// }
// ],
customerList: []
}
},
components: {
......@@ -151,30 +28,26 @@ export default {
tag
},
created() {
this.init()
// this.init()
},
methods: {
// 消息盒子-好友列表
init() {
let search = {
taskId:this.taskId,
status: this.status
}
groupCustomer.getCustomerList(search).then(res => {
console.log(res)
if (res.code == 0) {
this.customerList = res.data
}
})
},
// init() {
// let search = {
// taskId: this.taskId,
// status: this.status
// }
// groupCustomer.getCustomerList(search).then(res => {
// if (res.code == 0) {
// this.customerList = res.data
// } else {
// this.customerList = []
// }
// })
// },
changeTabs(e) {
if (e == 3) {
this.status = ''
} else {
this.status = e
}
this.tabIndex = e
this.init()
// this.init()
}
}
}
......
......@@ -57,138 +57,17 @@
</template>
<script>
import make from './make.vue'
import { groupTag, wxConfig } from '@/api'
import { groupTag, ssoApi, groupCustomer, wxConfig } from '@/api'
export default {
components: { make },
data() {
return {
keyword: '',
customerList: [],
// customerList: [
// {
// id: null,
// userid: 'wmdMreDgAAY_3bc9griISYSmgyx_FuQw',
// customerName: '王欣伟',
// customerPhone: '13476670746',
// avatar: 'http://wx.qlogo.cn/mmhead/Q3auHgzwzM7CwgjO4zXia5tmwgfKRK1IXhialS5hiaVMt15SlniciaRRHDA/0',
// type: 1,
// createdTime: '2021-11-14 17:17:38',
// status: 2
// },
// {
// id: null,
// userid: 'wodMreDgAAJ4g8Q6XpoIcNFXtr_M42xA',
// customerName: '曾琪',
// customerPhone: '13476670746',
// avatar: 'http://wework.qpic.cn/bizmail/TzKjFfYqwUNTjchjy3lQW3u9HibSkzuicPdrkZWhP7p9KTSysersUWWA/0',
// type: 2,
// createdTime: '2021-09-18 14:27:35',
// status: 1
// },
// {
// id: null,
// userid: 'wmdMreDgAAvkJ7PZmeph-HYoSLmkMUFQ',
// customerName: '爱就在一起',
// customerPhone: '13476670746',
// avatar: 'http://wx.qlogo.cn/mmhead/A7sq8BD8oexpibZTkv1gC7uib0sOrUZuhfPgrK7aicuib4JqRDq1bed4kQ/0',
// type: 1,
// createdTime: '2021-08-31 14:51:06',
// status: 0
// },
// {
// id: null,
// userid: 'wodMreDgAAcjbEcZ4kycsCEeb0sGqDkA',
// customerName: '李崇源',
// customerPhone: '13476670746',
// avatar: 'https://wework.qpic.cn/wwhead/duc2TvpEgSQO4BpE0WZSZ8I5J6rakCVOgvErIPJwQaxPiaq5xiblVNTV8pMYcrcHjRPAvHhZQWxy8/0',
// type: 2,
// createdTime: '2021-08-24 09:39:05',
// status: 1
// },
// {
// id: null,
// userid: 'wmdMreDgAAY_3bc9griISYSmgyx_FuQw',
// customerName: '王欣伟',
// customerPhone: '13476670746',
// avatar: 'http://wx.qlogo.cn/mmhead/Q3auHgzwzM7CwgjO4zXia5tmwgfKRK1IXhialS5hiaVMt15SlniciaRRHDA/0',
// type: 1,
// createdTime: '2021-11-14 17:17:38',
// status: 2
// },
// {
// id: null,
// userid: 'wodMreDgAAJ4g8Q6XpoIcNFXtr_M42xA',
// customerName: '曾琪',
// customerPhone: '13476670746',
// avatar: 'http://wework.qpic.cn/bizmail/TzKjFfYqwUNTjchjy3lQW3u9HibSkzuicPdrkZWhP7p9KTSysersUWWA/0',
// type: 2,
// createdTime: '2021-09-18 14:27:35',
// status: 1
// },
// {
// id: null,
// userid: 'wmdMreDgAAvkJ7PZmeph-HYoSLmkMUFQ',
// customerName: '爱就在一起',
// customerPhone: '13476670746',
// avatar: 'http://wx.qlogo.cn/mmhead/A7sq8BD8oexpibZTkv1gC7uib0sOrUZuhfPgrK7aicuib4JqRDq1bed4kQ/0',
// type: 1,
// createdTime: '2021-08-31 14:51:06',
// status: 0
// },
// {
// id: null,
// userid: 'wodMreDgAAcjbEcZ4kycsCEeb0sGqDkA',
// customerName: '李崇源',
// customerPhone: '13476670746',
// avatar: 'https://wework.qpic.cn/wwhead/duc2TvpEgSQO4BpE0WZSZ8I5J6rakCVOgvErIPJwQaxPiaq5xiblVNTV8pMYcrcHjRPAvHhZQWxy8/0',
// type: 2,
// createdTime: '2021-08-24 09:39:05',
// status: 1
// },
// {
// id: null,
// userid: 'wmdMreDgAAY_3bc9griISYSmgyx_FuQw',
// customerName: '王欣伟',
// customerPhone: '13476670746',
// avatar: 'http://wx.qlogo.cn/mmhead/Q3auHgzwzM7CwgjO4zXia5tmwgfKRK1IXhialS5hiaVMt15SlniciaRRHDA/0',
// type: 1,
// createdTime: '2021-11-14 17:17:38',
// status: 2
// },
// {
// id: null,
// userid: 'wodMreDgAAJ4g8Q6XpoIcNFXtr_M42xA',
// customerName: '曾琪',
// customerPhone: '13476670746',
// avatar: 'http://wework.qpic.cn/bizmail/TzKjFfYqwUNTjchjy3lQW3u9HibSkzuicPdrkZWhP7p9KTSysersUWWA/0',
// type: 2,
// createdTime: '2021-09-18 14:27:35',
// status: 1
// },
// {
// id: null,
// userid: 'wmdMreDgAAvkJ7PZmeph-HYoSLmkMUFQ',
// customerName: '爱就在一起',
// customerPhone: '13476670746',
// avatar: 'http://wx.qlogo.cn/mmhead/A7sq8BD8oexpibZTkv1gC7uib0sOrUZuhfPgrK7aicuib4JqRDq1bed4kQ/0',
// type: 1,
// createdTime: '2021-08-31 14:51:06',
// status: 0
// },
// {
// id: null,
// userid: 'wodMreDgAAcjbEcZ4kycsCEeb0sGqDkA',
// customerName: '李崇源',
// customerPhone: '13476670746',
// avatar: 'https://wework.qpic.cn/wwhead/duc2TvpEgSQO4BpE0WZSZ8I5J6rakCVOgvErIPJwQaxPiaq5xiblVNTV8pMYcrcHjRPAvHhZQWxy8/0',
// type: 2,
// createdTime: '2021-08-24 09:39:05',
// status: 1
// }
// ],
checkList: [],
allChecked: false,
title: ''
title: '',
userIds: ''
}
},
name: 'tag',
......@@ -196,33 +75,48 @@ export default {
isTitle: {
type: Boolean,
default: true
},
data: {
type: Array,
default: () => []
}
},
created() {
//初始化数据
if (this.isTitle) {
this.init()
} else {
this.customerList = this.data
this.title = `已有${this.customerList.length}位客户已通过您的好友申请!`
this.customerList.forEach(item => {
this.$set(item, 'isChecked', false)
})
created() {
//获取userid
this.taskId = this.$route.query.taskId ? this.$route.query.taskId : 'e0e1a10cf50f427bb6d35906cf3dbf21';
this.getuserInfo()
//初始化数据
if (this.isTitle) {
this.init()
} else {
this.initAll()
}
},
methods: {
initAll() {
let search = {
taskId: this.taskId,
status: 2
}
groupCustomer.getCustomerList(search).then(res => {
if (res.code == 0) {
this.customerList = res.data
this.title = `已有${this.customerList.length}位客户已通过您的好友申请!`
this.customerList.forEach(item => {
this.$set(item, 'isChecked', false)
})
} else {
this.customerList = []
}
})
},
getuserInfo() {
ssoApi.getuserInfo().then(res => {
this.workUserId = res.data.workUserId
})
},
methods: {
init() {
//获取打标签客户列表
let seacrh = {
keyword: this.keyword,
sessionId: 'mini-31ff1fff-c432-46d9-b94e-9f4ab76086fd-rop'
keyword: this.keyword
}
groupTag.getcustomerList(seacrh).then(res => {
console.log(res)
if (res.code == 0) {
this.customerList = res.data
this.title = `您共有 ${this.customerList.length}位客户暂未添加标签`
......@@ -268,17 +162,16 @@ export default {
//打开会话
gotoInfo(item) {
let seach = {
userIds: [], //参与会话的企业成员列表,格式为userid1;userid2;...,用分号隔开。
externalUserIds: ['wm-ZewEAAALezLnqhZLNLvXgwqvx6BOw'], // 参与会话的外部联系人列表,格式为userId1;userId2;…,用分号隔开。
userIds: [this.workUserId], //参与会话的企业成员列表,格式为userid1;userid2;...,用分号隔开。
externalUserIds: [item.userid], // 参与会话的外部联系人列表,格式为userId1;userId2;…,用分号隔开。
groupName: '', // 会话名称。单聊时该参数传入空字符串""即可。
chatId: ''
}
console.log(seach)
window.$wx = wxConfig
window.$wx.init(['openEnterpriseChat']).then(() => {
//获取userId
window.$wx.openEnterpriseChat(seach).then(res => {
console.log(res)
// console.log(res)
})
})
},
......@@ -403,6 +296,15 @@ export default {
}
}
}
.buttomLine {
position: absolute;
left: 0;
bottom: 0;
width: 375px!important;
height: 1px;
opacity: 0.3;
background-color: #c3c3c3!important;
}
}
.container /deep/ .van-checkbox__icon--checked .van-icon {
color: #fff;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!