Commit 62e5a703 by 王志慧

commit

1 parent a499fecd
...@@ -12,5 +12,15 @@ export default { ...@@ -12,5 +12,15 @@ export default {
data, data,
returnAll returnAll
}) })
} },
//用来判断是否待通过状态
updateCustomerWork (data={}) {
data.method = 'entmicro.api.dracScrmWork.updateCustomerWork'
return window.$HTTP({
url,
data,
returnAll
})
},
} }
...@@ -31,4 +31,6 @@ export default { ...@@ -31,4 +31,6 @@ export default {
returnAll returnAll
}) })
}, },
} }
...@@ -282,6 +282,18 @@ const WxConfig = { ...@@ -282,6 +282,18 @@ const WxConfig = {
}) })
}) })
}, },
/** 打开个人信息页接口 */
openUserProfile(params) {
// "type": 1, //1表示该userid是企业成员,2表示该userid是外部联系人
// "userid": "wmEAlECwAAHrbWYDetiu3Af13xlYDAAA" //可以是企业成员,也可以是外部联系人
return new Promise((resolve) => {
wx.invoke('openUserProfile', params, res => {
if(res.err_msg != "openUserProfile:ok") {
resolve(res)
}
})
})
},
/**使用企业微信内置地图查看位置接口 */ /**使用企业微信内置地图查看位置接口 */
openLocation(obj) { openLocation(obj) {
/** /**
......
...@@ -5,9 +5,11 @@ ...@@ -5,9 +5,11 @@
<template> <template>
<scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView"> <scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView">
<template v-for="(item, index) in customerList"> <template v-for="(item, index) in customerList">
<div :key="index" class="item flex"> <div :key="index" class="item flex" @click="openUserProfile(item)">
<div class="avatar"> <div class="avatar">
<div class="sprite-icon icon-avatar"></div> <div class="sprite-icon icon-avatar">
<img :src="item.avatar" alt="" />
</div>
</div> </div>
<div class="info"> <div class="info">
<div class="phone flex name">{{ item.customerName }}</div> <div class="phone flex name">{{ item.customerName }}</div>
...@@ -27,6 +29,7 @@ ...@@ -27,6 +29,7 @@
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import { groupTag } from '@/api'
export default { export default {
name: '', name: '',
data() { data() {
...@@ -39,144 +42,36 @@ export default { ...@@ -39,144 +42,36 @@ export default {
}, },
methods: { methods: {
onReachBottom() { onReachBottom() {
console.log('触底')
this.$refs.scrollView.loading = false this.$refs.scrollView.loading = false
this.$refs.scrollView.finished = true this.$refs.scrollView.finished = true
}, },
// 消息盒子-好友列表 // 消息盒子-好友列表
init() { init() {
let search = { groupTag.getcustomerList().then(res => {
taskId: 'cb3b9128e620413c931601a6d439d365', if (res.code == 0) {
status: this.status this.customerList = res.data
if (this.customerList.length > 0) {
this.customerList.forEach(item => {
this.$set(item, 'isChecked', false)
})
} }
this.customerList = [ } else {
{ this.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: '曾琪aaaa啊啊啊啊啊啊啊啊aaaaaaaa嗷嗷嗷',
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: '曾琪aaaa啊啊啊啊啊啊啊啊aaaaaaaa嗷嗷嗷',
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: '曾琪aaaa啊啊啊啊啊啊啊啊aaaaaaaa嗷嗷嗷',
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, openUserProfile(data) {
userid: 'wodMreDgAAcjbEcZ4kycsCEeb0sGqDkA', let seach = {
customerName: '李崇源', userIds: data.userid, //参与会话的企业成员列表,格式为userid1;userid2;...,用分号隔开。
customerPhone: '13476670746', type: 1
avatar: 'https://wework.qpic.cn/wwhead/duc2TvpEgSQO4BpE0WZSZ8I5J6rakCVOgvErIPJwQaxPiaq5xiblVNTV8pMYcrcHjRPAvHhZQWxy8/0',
type: 2,
createdTime: '2021-08-24 09:39:05',
status: 1
} }
] console.log(seach)
console.log(this.customerList) window.$wx = wxConfig
groupCustomer.getCustomerList(search).then(res => { window.$wx.init(['openUserProfile']).then(() => {
window.$wx.openUserProfile(seach).then(res => {
console.log(res) console.log(res)
if (res.code == 0) { })
this.customerList = res.data
}
}) })
} }
} }
......
<template> <template>
<div :class="['container-add', copywriting!=''?`page-type-${tabIndex}`:'']" > <div :class="['container-add', copywriting != '' ? `page-type-${tabIndex}` : '']">
<tip :title="title"></tip> <tip :title="title"></tip>
<template v-if="customerList.length > 0"> <template v-if="customerList.length > 0">
<div class="customerList-add"> <div class="customerList-add">
...@@ -114,6 +114,8 @@ export default { ...@@ -114,6 +114,8 @@ export default {
}, },
//加好友 //加好友
addFriend(data) { addFriend(data) {
groupCustomer.updateCustomerWork(() => {})
window.$wx = wxConfig window.$wx = wxConfig
window.$wx.init(['navigateToAddCustomer', 'setClipboardData']).then(() => { window.$wx.init(['navigateToAddCustomer', 'setClipboardData']).then(() => {
this.setClipboardData(data.customerPhone) //复制 this.setClipboardData(data.customerPhone) //复制
......
...@@ -96,6 +96,7 @@ export default { ...@@ -96,6 +96,7 @@ export default {
taskId: this.taskId, taskId: this.taskId,
status: 2 status: 2
} }
this.allChecked = false
groupCustomer.getCustomerList(search).then(res => { groupCustomer.getCustomerList(search).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.customerList = res.data this.customerList = res.data
...@@ -122,7 +123,7 @@ export default { ...@@ -122,7 +123,7 @@ export default {
groupTag.getcustomerList(obj).then(res => { groupTag.getcustomerList(obj).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.customerList = res.data this.customerList = res.data
this.title = `您共有 ${this.customerList.length}位客户可添加标签` this.title = `您共有${this.customerList.length}位客户可添加标签`
if (this.customerList.length > 0) { if (this.customerList.length > 0) {
this.customerList.forEach(item => { this.customerList.forEach(item => {
this.$set(item, 'isChecked', false) this.$set(item, 'isChecked', false)
...@@ -173,7 +174,12 @@ export default { ...@@ -173,7 +174,12 @@ export default {
this.checkList = [] this.checkList = []
this.externalUserIds = [] this.externalUserIds = []
this.keyWord = '' this.keyWord = ''
console.log(this.isTitle)
if (this.isTitle) {
this.init() this.init()
} else {
this.initAll()
}
}, },
//打开会话 //打开会话
gotoInfo(item) { gotoInfo(item) {
...@@ -183,7 +189,6 @@ export default { ...@@ -183,7 +189,6 @@ export default {
groupName: '', // 会话名称。单聊时该参数传入空字符串""即可。 groupName: '', // 会话名称。单聊时该参数传入空字符串""即可。
chatId: '' chatId: ''
} }
console.log(seach)
window.$wx = wxConfig window.$wx = wxConfig
window.$wx.init(['openEnterpriseChat']).then(() => { window.$wx.init(['openEnterpriseChat']).then(() => {
window.$wx.openEnterpriseChat(seach).then(res => { window.$wx.openEnterpriseChat(seach).then(res => {
...@@ -203,8 +208,7 @@ export default { ...@@ -203,8 +208,7 @@ export default {
.customerList { .customerList {
// background: #fff; // background: #fff;
.content { .content {
// height: calc(100vh - 164px); height: calc(100vh - 164px);
height: calc(100vh - 90px);
} }
.customer { .customer {
padding: 0 16px; padding: 0 16px;
......
...@@ -81,7 +81,11 @@ export default { ...@@ -81,7 +81,11 @@ export default {
if (this.tagList[index].taggingList[ids].isChecked) { if (this.tagList[index].taggingList[ids].isChecked) {
this.checkAll.push({ ...this.tagList[index].taggingList[ids] }) this.checkAll.push({ ...this.tagList[index].taggingList[ids] })
} else { } else {
this.checkAll.splice(index, 1) for (let i = 0; i < this.checkAll.length; i++) {
if (this.tagList[index].taggingList[ids].taggingId == this.checkAll[i].taggingId) {
this.checkAll.splice(i--, 1)
}
}
} }
}, },
close(data, value) { close(data, value) {
...@@ -202,7 +206,6 @@ export default { ...@@ -202,7 +206,6 @@ export default {
} }
.tag-container { .tag-container {
padding: 10px 16px; padding: 10px 16px;
overflow-y: auto;
.tag-type { .tag-type {
padding-bottom: 24px; padding-bottom: 24px;
.tag-title { .tag-title {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!