Revert "+ [task#137378,dong,1h] add updateItems."
This reverts commit 6b3642b02fdbcf336b9823317cfbe14dd897e302.
This commit is contained in:
@@ -209,17 +209,6 @@ window.updateItems = function(currentProduct = '', currentBranch = '')
|
||||
{
|
||||
if($('[name^=product][value="' + productID + '"]').length > 0)
|
||||
{
|
||||
const $branch = $('[name^=product][value="' + productID + '"]').closest('.productBox').find('[name^="branch"]');
|
||||
const branchItems = $branch.zui('picker').options.items
|
||||
|
||||
if(!chosenBranches[productID]) chosenBranches[productID] = [];
|
||||
$('[name^=product][value="' + productID + '"]').closest('.productBox').find('[name^="branch"]').each(function()
|
||||
{
|
||||
const branchID = $(this).val().toString();
|
||||
if(!isNaN(branchID) && !chosenBranches[productID].includes(branchID) && branchID !== '') chosenBranches[productID].push(branchID);
|
||||
});
|
||||
|
||||
if(chosenBranches[productID].length != branchItems.length) allItems[i].disabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -227,15 +216,4 @@ window.updateItems = function(currentProduct = '', currentBranch = '')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(".productsBox [name^='product']").each(function()
|
||||
{
|
||||
const $product = $(this).zui('picker');
|
||||
const productID = $(this).val();
|
||||
let currentProductItems = JSON.parse(JSON.stringify(allItems));
|
||||
|
||||
if(productID != 0) currentProductItems[productItems[productID].i].disabled = false;
|
||||
|
||||
$product.render({items: currentProductItems});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user