|
|
@@ -2046,7 +2046,7 @@
|
|
|
<label class="custom-control-label" for="<%- t.id %>_tag"></label>
|
|
|
</div>
|
|
|
</td>
|
|
|
- <td><a href="javascript:void(0);" data-id="<%- t.id %>" class="text-danger remove-tourist-user">移除</a></td>
|
|
|
+ <td><a href="javascript:void(0);" data-remove="<%- t.user_id %>" data-id="<%- t.id %>" class="text-danger remove-tourist-user">移除</a></td>
|
|
|
</tr>
|
|
|
<% } %>
|
|
|
</tbody>
|
|
|
@@ -2259,11 +2259,27 @@
|
|
|
timer2 = setTimeout(() => {
|
|
|
const newVal = $(this).val();
|
|
|
let html = '';
|
|
|
+
|
|
|
+ const currentSelectedIds = new Set();
|
|
|
+ $('#tourist-users tr').each(function() {
|
|
|
+ const rowUserId = parseInt($(this).data('id'), 10);
|
|
|
+ if (!isNaN(rowUserId)) {
|
|
|
+ currentSelectedIds.add(rowUserId);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
if (newVal && newVal === oldSearchVal2) {
|
|
|
accountList.filter(item => item && item.id !== cur_tender_uid && (item.name.indexOf(newVal) !== -1 || (item.mobile && item.mobile.indexOf(newVal) !== -1))).forEach(item => {
|
|
|
+
|
|
|
+ const isSelected = currentSelectedIds.has(item.id);
|
|
|
+ const markDisplayStyle = isSelected ? '' : ' style="display:none;"';
|
|
|
+
|
|
|
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>
|
|
|
+ class="ml-auto">${item.mobile || ''}</span>
|
|
|
+ <span class="selected-mark text-success ml-2"${markDisplayStyle}><i class="fa fa-check"></i></span>
|
|
|
+ </p>
|
|
|
<span class="text-muted">${item.role || ''}</span>
|
|
|
</dd>`
|
|
|
});
|