* [refac] adjust code for btu style.

This commit is contained in:
tanghucheng
2024-07-26 10:47:05 +08:00
committed by 谢杞钰
parent d8c6ccd7f6
commit 0ac3b9c14b
+4
View File
@@ -77,15 +77,19 @@ window.loadRoadmap = function(product)
let productID = product.val();
let branchID = product.closest('.productBox').find('.linkBranch .pick-value').val();
let link = $.createLink('demand', 'ajaxGetRoadmaps', 'productID=' + productID + '&branch=&param=nolaunched');
const $items = [{text: '', value: '', key: ''}];
const $roadmap = product.closest('.productBox').find('.roadmapBox .pick-value');
$roadmap.closest('.picker-box').removeClass('hidden');
$roadmap.closest('.linkRoadmap').find('[name^=roadmapName]').addClass('hidden');
$roadmap.closest('.linkRoadmap').find('[name^=roadmapName]').attr('disabled', 'disabled');
$roadmap.zui('picker').render({disabled: false});
$roadmap.zui('picker').$.setValue('');
$.getJSON(link, function(data)
{
$roadmap.zui('picker').render({items: data});
if(productID == '' || productID === undefined) $roadmap.zui('picker').render({items: $items});
let optionCount = $roadmap.zui('picker').options.items.length;