|
@@ -34,7 +34,7 @@ $(document).ready(function () {
|
|
const newVal = $('#gr-search').val()
|
|
const newVal = $('#gr-search').val()
|
|
let html = ''
|
|
let html = ''
|
|
if (newVal && newVal === oldSearchVal) {
|
|
if (newVal && newVal === oldSearchVal) {
|
|
- accountList.filter(item => item.name.indexOf(newVal) !== -1 || item.mobile === newVal).forEach(item => {
|
|
|
|
|
|
+ accountList.filter(item => item && cur_uid !== item.id && (item.name.indexOf(newVal) !== -1 || (item.mobile && item.mobile.indexOf(newVal) !== -1))).forEach(item => {
|
|
html += `<dd class="border-bottom p-2 mb-0 " data-id="${item.id}" >
|
|
html += `<dd class="border-bottom p-2 mb-0 " data-id="${item.id}" >
|
|
<p class="mb-0 d-flex"><span class="text-primary">${item.name}</span><span
|
|
<p class="mb-0 d-flex"><span class="text-primary">${item.name}</span><span
|
|
class="ml-auto">${item.mobile || ''}</span></p>
|
|
class="ml-auto">${item.mobile || ''}</span></p>
|
|
@@ -45,19 +45,19 @@ $(document).ready(function () {
|
|
$('.book-list').append(html)
|
|
$('.book-list').append(html)
|
|
} else {
|
|
} else {
|
|
if (!$('.acc-btn').length) {
|
|
if (!$('.acc-btn').length) {
|
|
- console.log('accountGroup', accountGroup)
|
|
|
|
accountGroup.forEach((group, idx) => {
|
|
accountGroup.forEach((group, idx) => {
|
|
if (!group) return
|
|
if (!group) return
|
|
html += `<dt><a href="javascript: void(0);" class="acc-btn" data-groupid="${idx}" data-type="hide"><i class="fa fa-plus-square"></i>
|
|
html += `<dt><a href="javascript: void(0);" class="acc-btn" data-groupid="${idx}" data-type="hide"><i class="fa fa-plus-square"></i>
|
|
</a> ${group.groupName}</dt>
|
|
</a> ${group.groupName}</dt>
|
|
<div class="dd-content" data-toggleid="${idx}">`
|
|
<div class="dd-content" data-toggleid="${idx}">`
|
|
group.groupList.forEach(item => {
|
|
group.groupList.forEach(item => {
|
|
- html += `<dd class="border-bottom p-2 mb-0 " data-id="${item.id}" >
|
|
|
|
- <p class="mb-0 d-flex"><span class="text-primary">${item.name}</span><span
|
|
|
|
- class="ml-auto">${item.mobile || ''}</span></p>
|
|
|
|
- <span class="text-muted">${item.role || ''}</span>
|
|
|
|
- </dd>`
|
|
|
|
-
|
|
|
|
|
|
+ if (item.id !== cur_uid) {
|
|
|
|
+ html += `<dd class="border-bottom p-2 mb-0 " data-id="${item.id}" >
|
|
|
|
+ <p class="mb-0 d-flex"><span class="text-primary">${item.name}</span><span
|
|
|
|
+ class="ml-auto">${item.mobile || ''}</span></p>
|
|
|
|
+ <span class="text-muted">${item.role || ''}</span>
|
|
|
|
+ </dd>`
|
|
|
|
+ }
|
|
});
|
|
});
|
|
html += '</div>'
|
|
html += '</div>'
|
|
})
|
|
})
|