|
@@ -42,7 +42,7 @@ $(function () {
|
|
|
|
|
|
let timer = null;
|
|
let timer = null;
|
|
let oldSearchVal = null;
|
|
let oldSearchVal = null;
|
|
- $('body').on('input propertychange', '.gr-search', function(e) {
|
|
|
|
|
|
+ $('#process_set').on('input propertychange', '.gr-search', function(e) {
|
|
oldSearchVal = e.target.value;
|
|
oldSearchVal = e.target.value;
|
|
timer && clearTimeout(timer);
|
|
timer && clearTimeout(timer);
|
|
timer = setTimeout(() => {
|
|
timer = setTimeout(() => {
|
|
@@ -648,6 +648,49 @@ $(function () {
|
|
$(this).parents('ul').append(addhtml);
|
|
$(this).parents('ul').append(addhtml);
|
|
$(this).parents('li').remove();
|
|
$(this).parents('li').remove();
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ $(setting.domId).on('input propertychange', '.gr-search', function(e) {
|
|
|
|
+ oldSearchVal = e.target.value;
|
|
|
|
+ timer && clearTimeout(timer);
|
|
|
|
+ timer = setTimeout(() => {
|
|
|
|
+ const newVal = $(this).val();
|
|
|
|
+ const code = $(this).attr('data-trid');
|
|
|
|
+ let html = '';
|
|
|
|
+ if (newVal && newVal === oldSearchVal) {
|
|
|
|
+ accountList
|
|
|
|
+ .filter(item => item && (!self.rptInfo.uid || item.id !== self.rptInfo.uid) && (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}" >
|
|
|
|
+ <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>`
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ if (!$('#' + code + '_dropdownMenu .acc-btn').length) {
|
|
|
|
+ accountGroup.forEach((group, idx) => {
|
|
|
|
+ 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>
|
|
|
|
+ </a> ${group.groupName}</dt>
|
|
|
|
+ <div class="dd-content" data-toggleid="${idx}">`;
|
|
|
|
+ group.groupList.forEach(item => {
|
|
|
|
+ if (!self.rptInfo.uid || item.id !== self.rptInfo.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>';
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ $(this).parents('.dropdown-menu').children('.book-list').empty();
|
|
|
|
+ $(this).parents('.dropdown-menu').children('.book-list').append(html);
|
|
|
|
+ }, 400);
|
|
|
|
+ });
|
|
}
|
|
}
|
|
getAccountHtml(uid) {
|
|
getAccountHtml(uid) {
|
|
const html = [];
|
|
const html = [];
|