diff --git a/js/demandPlan/child/early_info_list.js b/js/demandPlan/child/early_info_list.js index 7379025..5a68f17 100644 --- a/js/demandPlan/child/early_info_list.js +++ b/js/demandPlan/child/early_info_list.js @@ -8,19 +8,17 @@ function setParams(type) { element = layui.element; // tab 切换事件 element.on('tab(demo-filter-tab)', function (data) { - element.on('tab(demo-filter-tab)', function (data) { - let value = $(this).attr('value'); - if (value === '1') { // 超库存量 - $('#indexIframe').attr('src', 'excess_inventory_list.html'); - } else if (value === '2') { // 计划外量 - $('#indexIframe').attr('src', 'unplanned_quantity_list.html'); - } - }); + let value = $(this).attr('value'); + if (value === '1') { // 超库存量 + $('#indexIframe').attr('src', 'excess_inventory_list.html'); + } else if (value === '2') { // 计划外量 + $('#indexIframe').attr('src', 'unplanned_quantity_list.html'); + } }); $('.layui-tab-title li').eq(typeParam - 1).addClass('layui-this'); - if(typeParam === 1){ + if (typeParam === 1) { $('#indexIframe').attr('src', 'excess_inventory_list.html'); - }else{ + } else { $('#indexIframe').attr('src', 'unplanned_quantity_list.html'); } });