From 4a9ec58e4ab3585b058d33559239efa04ce263f2 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 22 Oct 2025 11:17:33 +0800 Subject: [PATCH] * [bug#66312,done,1.5h] add link plans field. --- lib/zin/wg/productsbox/js/v1.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/zin/wg/productsbox/js/v1.js b/lib/zin/wg/productsbox/js/v1.js index 02d159f31a..a7a3051248 100644 --- a/lib/zin/wg/productsbox/js/v1.js +++ b/lib/zin/wg/productsbox/js/v1.js @@ -243,13 +243,16 @@ window.updateItems = function() productItems[allItems[i].value].i = i; } - $(".productsBox [name^='products']").each(function() + if($('.productsBox .linkProduct').length > 0) { - 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; + $(".productsBox [name^='products']").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}); - }); + $product.render({items: currentProductItems}); + }); + } }