* [task#119971,done,0.3h] product selection cannot be repeated.

This commit is contained in:
liumengyi
2024-06-04 16:54:32 +08:00
parent 76bb41baef
commit 4a76c72599
+2 -3
View File
@@ -175,9 +175,8 @@ window.updateItems = function()
{
const $product = $(this).zui('picker');
const productID = $(this).val();
if(productID == 0) return true;
let currentProductItems = allItems.map(obj => ({ ...obj }));
currentProductItems[productItems[productID].i].disabled = false;
let currentProductItems = JSON.parse(JSON.stringify(allItems));
if(productID != 0) currentProductItems[productItems[productID].i].disabled = false;
$product.render({items: currentProductItems});
});