* [bug#59023,done,0.2h] fix can't add deleted member.

This commit is contained in:
tianshujie
2025-01-08 13:42:15 +08:00
committed by 刘梦艺
parent d1b75464cc
commit 937ae35208
+21
View File
@@ -72,8 +72,29 @@ window.addItem = function(obj)
*/
window.deleteItem = function(obj)
{
let currentAccount = $(obj).closest('tr').find('input[name^=account]').val();
$(obj).closest('tr').remove();
if($('#teamForm .table tbody tr').length < 2) $('#teamForm .table tbody tr .actions-list .btn-link').eq(1).addClass('hidden');
if(!currentAccount) return true;
let accountItems = JSON.parse(JSON.stringify(users));
$('#teamForm [name^=account]').each(function()
{
if(!$(this).val()) return true;
delete accountItems[$(this).val()];
});
const userItems = [];
for(let key in accountItems) userItems.push({text: accountItems[key], value: key});
$('#teamForm [name^=account]').each(function()
{
let $accountPicker = $(this).closest('input[name^=account]').zui('picker');
if(typeof $accountPicker == 'undefined') return true;
$accountPicker.render({items: userItems});
});
}
/**