|
@@ -47,7 +47,7 @@
|
|
|
<div>
|
|
|
<div class="customer-modal-wrapper">
|
|
|
<div class="search-content mi-search-content">
|
|
|
- <input type="text" v-model="modalObj.keyword" @input="modalObjonFilter" placeholder="输入用户UU">
|
|
|
+ <input type="text" v-model="modalObj.keyword" @input="modalObjonFilter" placeholder="手机号/用户名">
|
|
|
<span @click="modalObjonFilter"><i class="iconfont icon-sousuo"></i></span>
|
|
|
</div>
|
|
|
<div class="customer-modal-content">
|
|
@@ -59,7 +59,7 @@
|
|
|
<span class="item inline-block" style="width: 28%;height:2px" v-else>
|
|
|
|
|
|
</span>
|
|
|
- <span class="item inline-block" style="width: 32%;">用户UU</span>
|
|
|
+ <span class="item inline-block" style="width: 32%;">手机</span>
|
|
|
<span class="item inline-block" style="width: 40%;text-align: center">用户名称</span>
|
|
|
</div>
|
|
|
<template v-if="modalObj.type === 'add'">
|
|
@@ -68,7 +68,7 @@
|
|
|
<span class="item inline-block" style="width: 28%;" @click="checkItem(item)">
|
|
|
<label class="mobile-cart-check" :class="{'active': item.distribute}"></label>
|
|
|
</span>
|
|
|
- <span class="item inline-block" style="width: 32%;">{{item.userUU}}</span>
|
|
|
+ <span class="item inline-block" style="width: 32%;">{{item.userTel}}</span>
|
|
|
<span class="item inline-block" style="width: 40%;text-align: center;">{{item.userName}}</span>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -79,7 +79,7 @@
|
|
|
<span class="item inline-block" style="width: 28%;" @click="checkItem(item)">
|
|
|
<label class="mobile-cart-check" :class="{'active': item.transfer}"></label>
|
|
|
</span>
|
|
|
- <span class="item inline-block" style="width: 32%;">{{item.userUU}}</span>
|
|
|
+ <span class="item inline-block" style="width: 32%;">{{item.userTel}}</span>
|
|
|
<span class="item inline-block" style="width: 40%;text-align: center;">{{item.userName}}</span>
|
|
|
</div>
|
|
|
<!-- 客户转移 && 当前用户是被管理员转移权限时 -->
|
|
@@ -87,7 +87,7 @@
|
|
|
<span class="item inline-block" style="width: 28%;" @click="checkItem(item)">
|
|
|
<label class="mobile-cart-check" :class="{'active': item.transfer}"></label>
|
|
|
</span>
|
|
|
- <span class="item inline-block" style="width: 32%;">{{item.userUU}}</span>
|
|
|
+ <span class="item inline-block" style="width: 32%;">{{item.userTel}}</span>
|
|
|
<span class="item inline-block" style="width: 40%;text-align: center;">{{item.userName}}</span>
|
|
|
</div>
|
|
|
<!-- 客户转移 && 当前用户是非管理员,但有查看权限时 -->
|
|
@@ -95,7 +95,7 @@
|
|
|
<span class="item inline-block" style="width: 28%;" @click="checkItem(item)">
|
|
|
<label class="mobile-cart-check" :class="{'active': item.transfer}"></label>
|
|
|
</span>
|
|
|
- <span class="item inline-block" style="width: 32%;">{{item.userUU}}</span>
|
|
|
+ <span class="item inline-block" style="width: 32%;">{{item.userTel}}</span>
|
|
|
<span class="item inline-block" style="width: 40%;text-align: center;">{{item.userName}}</span>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -129,6 +129,10 @@
|
|
|
count: 10,
|
|
|
page: 1
|
|
|
},
|
|
|
+ modalParams: {
|
|
|
+ count: 100000000,
|
|
|
+ page: 1
|
|
|
+ },
|
|
|
collectResult: '',
|
|
|
timeoutCount: 0,
|
|
|
resourceList: {
|
|
@@ -160,7 +164,7 @@
|
|
|
if (this.modalObj.customer.myEnterprise.uu) {
|
|
|
// 当前用户是管理员时
|
|
|
if (this.thisUser.sys) {
|
|
|
- this.$http.post(`/account/user/transferUserToVendor/${this.modalObj.customer.myEnterprise.uu}`, this.modalObj.originList).then(data => {
|
|
|
+ this.$http.post(`/account/user/transferUserToVendor/${this.modalObj.customer.id}`, this.modalObj.originList).then(data => {
|
|
|
this.onMind('转移成功!')
|
|
|
this.closeModal()
|
|
|
this.setSelect(true)
|
|
@@ -198,9 +202,10 @@
|
|
|
this.closeModal()
|
|
|
}
|
|
|
} else {
|
|
|
- this.$http.post(`/account/user/bindUserToVendor/${this.modalObj.customer.myEnterprise.uu}`, this.modalObj.originList).then(res => {
|
|
|
+ this.$http.post(`/account/user/bindUserToVendor/${this.modalObj.customer.id}`, this.modalObj.originList).then(res => {
|
|
|
this.onMind('分配成功!')
|
|
|
this.closeModal()
|
|
|
+ this.setSelect(true)
|
|
|
}).catch(err => {
|
|
|
this.onMind('保存失败!')
|
|
|
this.closeModal()
|
|
@@ -270,7 +275,7 @@
|
|
|
modalObjonFilter() {
|
|
|
let _arr = []
|
|
|
this.modalObj.originList.forEach(item => {
|
|
|
- if (item.userUU.toString().indexOf(this.modalObj.keyword) > -1) {
|
|
|
+ if ((item.userTel.toString().indexOf(this.modalObj.keyword) > -1) || (item.userName.toString().indexOf(this.modalObj.keyword) > -1)) {
|
|
|
_arr.push(item)
|
|
|
}
|
|
|
})
|
|
@@ -283,8 +288,8 @@
|
|
|
this.$http.get(`/account/user/getEnTransfer/${customer.myEnterprise.uu}`).then(res => {
|
|
|
customer.enTransfer = res.data.result
|
|
|
if (this.enabled || customer.enTransfer) {
|
|
|
- this.$http.post(`/account/user/customer/${customer.myEnterprise.uu}`).then(data => {
|
|
|
- customer.userinfos = data.data
|
|
|
+ this.$http.get(`/account/user/customer/${customer.id}`, {params: this.modalParams}).then(data => {
|
|
|
+ customer.userinfos = data.data.content
|
|
|
this.modalObj.showModal = true
|
|
|
this.modalObj.showModalList = customer.userinfos
|
|
|
this.modalObj.originList = customer.userinfos
|
|
@@ -299,14 +304,14 @@
|
|
|
transferUserInfo(customer) {
|
|
|
this.modalObj.type = 'chance'
|
|
|
this.modalObj.customer = customer
|
|
|
- this.$http.get(`/account/user/getDistribute/${customer.myEnterprise.uu}`).then(res => {
|
|
|
+ this.$http.get(`/account/user/getDistribute/${customer.id}`).then(res => {
|
|
|
customer.enTransfer = res.data.result
|
|
|
if (this.enabled || customer.enTransfer) {
|
|
|
this.$http.get('/authentication').then(res => {
|
|
|
this.thisUser = res.data
|
|
|
})
|
|
|
- this.$http.post(`/account/user/customer/${customer.myEnterprise.uu}`).then(data => {
|
|
|
- customer.userinfos = data.data
|
|
|
+ this.$http.get(`/account/user/customer/${customer.id}`, {params: this.modalParams}).then(data => {
|
|
|
+ customer.userinfos = data.data.content
|
|
|
customer.userinfos.forEach(user => {
|
|
|
if (this.$store.state.option.user.data.userUU === user.userUU && user.transfer) {
|
|
|
this.transfer = true
|