let objParam = JSON.parse(decodeURIComponent(getUrlParam('obj'))); let layer, element; layui.use(["layer", 'element'], function () { layer = layui.layer; element = layui.element; // tab 切换事件 element.on('tab(demo-filter-tab)', function (data) { let value = $(this).attr('value'); $('#indexIframe').attr('src', 'contract_supplier_list.html?supId=' + value + '&contractId=' + objParam.id + '&type=' + objParam.type); }); let supList = objParam.supList; getSupplierList(supList); }); // 厂家列表 function getSupplierList(list) { let dataList = []; let html = ''; $.each(list, function (index, item) { dataList.push({ name: item.supName, id: item.supId }) }); $.each(dataList, function (index, item) { html += '