diff --git a/Application/Home/View/default/Query/dailySummary.html b/Application/Home/View/default/Query/dailySummary.html index 73c5b191a..2358784c8 100644 --- a/Application/Home/View/default/Query/dailySummary.html +++ b/Application/Home/View/default/Query/dailySummary.html @@ -457,20 +457,17 @@ $('#team_leader_id').change(function () { var promoteId = parseInt($(this).val()); var promoteValue = $(this).find("option:selected").text(); + var html = ""; - $.ajax({ - url: "{:U('getChildPromoteList')}", - type: "post", - data: {promote_id:promoteId}, - dataType: 'json', - success: function (data) { - var html = ""; + if (promoteId > 0) { + html += ""; - if (promoteId > 0) { - html += ""; - } - - if (data.status == 1) { + $.ajax({ + url: "{:U('getChildPromoteList')}", + type: "post", + data: {promote_id:promoteId}, + dataType: 'json', + success: function (data) { var promoteData = data.data; if (promoteData.length > 0) { @@ -478,15 +475,22 @@ html += ""; } } - } - $("#promote_id").empty(); - $('#promote_id').html(html); - $("#promote_id").select2(); - } - }); + showPromoteSelect(html); + } + }); + } else { + showPromoteSelect(html); + } }); + function showPromoteSelect(html) + { + $("#promote_id").empty(); + $('#promote_id').html(html); + $("#promote_id").select2(); + } + $('#own').on('click', function () { var ownId = $('#own_id').val(); var checkBox = $(this).children('i'); diff --git a/Application/Home/View/default/Query/recharge.html b/Application/Home/View/default/Query/recharge.html index 3e1c5e4dc..842af2012 100644 --- a/Application/Home/View/default/Query/recharge.html +++ b/Application/Home/View/default/Query/recharge.html @@ -279,20 +279,17 @@ $('#team_leader_id').change(function () { var promoteId = parseInt($(this).val()); var promoteValue = $(this).find("option:selected").text(); + var html = ""; - $.ajax({ - url: "{:U('getChildPromoteList')}", - type: "post", - data: {promote_id:promoteId}, - dataType: 'json', - success: function (data) { - var html = ""; + if (promoteId > 0) { + html += ""; - if (promoteId > 0) { - html += ""; - } - - if (data.status == 1) { + $.ajax({ + url: "{:U('getChildPromoteList')}", + type: "post", + data: {promote_id:promoteId}, + dataType: 'json', + success: function (data) { var promoteData = data.data; if (promoteData.length > 0) { @@ -300,15 +297,22 @@ html += ""; } } - } - $("#promote_id").empty(); - $('#promote_id').html(html); - $("#promote_id").select2(); - } - }); + showPromoteSelect(html); + } + }); + } else { + showPromoteSelect(html); + } }); + function showPromoteSelect(html) + { + $("#promote_id").empty(); + $('#promote_id').html(html); + $("#promote_id").select2(); + } + $('#own').on('click',function () { var ownId = $('#own_id').val(); var checkBox = $(this).children('i'); diff --git a/Application/Home/View/default/Query/register.html b/Application/Home/View/default/Query/register.html index d422f83eb..0d2a5cbf9 100644 --- a/Application/Home/View/default/Query/register.html +++ b/Application/Home/View/default/Query/register.html @@ -188,20 +188,17 @@ $('#team_leader_id').change(function () { var promoteId = parseInt($(this).val()); var promoteValue = $(this).find("option:selected").text(); + var html = ""; - $.ajax({ - url: "{:U('getChildPromoteList')}", - type: "post", - data: {promote_id:promoteId}, - dataType: 'json', - success: function (data) { - var html = ""; + if (promoteId > 0) { + html += ""; - if (promoteId > 0) { - html += ""; - } - - if (data.status == 1) { + $.ajax({ + url: "{:U('getChildPromoteList')}", + type: "post", + data: {promote_id:promoteId}, + dataType: 'json', + success: function (data) { var promoteData = data.data; if (promoteData.length > 0) { @@ -209,15 +206,22 @@ html += ""; } } - } - $("#promote_id").empty(); - $('#promote_id').html(html); - $("#promote_id").select2(); - } - }); + showPromoteSelect(html); + } + }); + } else { + showPromoteSelect(html); + } }); + function showPromoteSelect(html) + { + $("#promote_id").empty(); + $('#promote_id').html(html); + $("#promote_id").select2(); + } + $('#own').on('click',function () { var ownId = $('#own_id').val(); var checkBox = $(this).children('i'); diff --git a/Application/Home/View/default/Query/summary.html b/Application/Home/View/default/Query/summary.html index 507647703..636d00b3f 100644 --- a/Application/Home/View/default/Query/summary.html +++ b/Application/Home/View/default/Query/summary.html @@ -242,22 +242,19 @@ setValue('row', '{:I("get.row",10)}'); $('#team_leader_id').change(function () { - var promoteId = parseInt($(this).val()); - var promoteValue = $(this).find("option:selected").text(); - - $.ajax({ - url: "{:U('getChildPromoteList')}", - type: "post", - data: {promote_id:promoteId}, - dataType: 'json', - success: function (data) { - var html = ""; - - if (promoteId > 0) { - html += ""; - } - - if (data.status == 1) { + var promoteId = parseInt($(this).val()); + var promoteValue = $(this).find("option:selected").text(); + var html = ""; + + if (promoteId > 0) { + html += ""; + + $.ajax({ + url: "{:U('getChildPromoteList')}", + type: "post", + data: {promote_id:promoteId}, + dataType: 'json', + success: function (data) { var promoteData = data.data; if (promoteData.length > 0) { @@ -265,15 +262,22 @@ html += ""; } } - } - $("#promote_id").empty(); - $('#promote_id').html(html); - $("#promote_id").select2(); - } - }); + showPromoteSelect(html); + } + }); + } else { + showPromoteSelect(html); + } }); + function showPromoteSelect(html) + { + $("#promote_id").empty(); + $('#promote_id').html(html); + $("#promote_id").select2(); + } + $('#own').on('click',function () { var ownId = $('#own_id').val(); var checkBox = $(this).children('i');