推广员后台->检索bug修复

master
chenxiaojun 5 years ago
commit bb23bb2a03

@ -457,20 +457,17 @@
$('#team_leader_id').change(function () { $('#team_leader_id').change(function () {
var promoteId = parseInt($(this).val()); var promoteId = parseInt($(this).val());
var promoteValue = $(this).find("option:selected").text(); var promoteValue = $(this).find("option:selected").text();
var html = "<option value='' selected>推广员账号</option>";
$.ajax({ if (promoteId > 0) {
url: "{:U('getChildPromoteList')}", html += "<option value='" + promoteId + "'>" + promoteValue + "</option>";
type: "post",
data: {promote_id:promoteId},
dataType: 'json',
success: function (data) {
var html = "<option value='' selected>推广员账号</option>";
if (promoteId > 0) { $.ajax({
html += "<option value='" + promoteId + "'>" + promoteValue + "</option>"; url: "{:U('getChildPromoteList')}",
} type: "post",
data: {promote_id:promoteId},
if (data.status == 1) { dataType: 'json',
success: function (data) {
var promoteData = data.data; var promoteData = data.data;
if (promoteData.length > 0) { if (promoteData.length > 0) {
@ -478,15 +475,22 @@
html += "<option value='" + promoteData[i]['id'] + "'>" + promoteData[i]['account'] + "(" + promoteData[i]['real_name'] + ")</option>"; html += "<option value='" + promoteData[i]['id'] + "'>" + promoteData[i]['account'] + "(" + promoteData[i]['real_name'] + ")</option>";
} }
} }
}
$("#promote_id").empty(); showPromoteSelect(html);
$('#promote_id').html(html); }
$("#promote_id").select2(); });
} } else {
}); showPromoteSelect(html);
}
}); });
function showPromoteSelect(html)
{
$("#promote_id").empty();
$('#promote_id').html(html);
$("#promote_id").select2();
}
$('#own').on('click', function () { $('#own').on('click', function () {
var ownId = $('#own_id').val(); var ownId = $('#own_id').val();
var checkBox = $(this).children('i'); var checkBox = $(this).children('i');

@ -279,20 +279,17 @@
$('#team_leader_id').change(function () { $('#team_leader_id').change(function () {
var promoteId = parseInt($(this).val()); var promoteId = parseInt($(this).val());
var promoteValue = $(this).find("option:selected").text(); var promoteValue = $(this).find("option:selected").text();
var html = "<option value='' selected>推广员账号</option>";
$.ajax({ if (promoteId > 0) {
url: "{:U('getChildPromoteList')}", html += "<option value='" + promoteId + "'>" + promoteValue + "</option>";
type: "post",
data: {promote_id:promoteId},
dataType: 'json',
success: function (data) {
var html = "<option value='' selected>推广员账号</option>";
if (promoteId > 0) { $.ajax({
html += "<option value='" + promoteId + "'>" + promoteValue + "</option>"; url: "{:U('getChildPromoteList')}",
} type: "post",
data: {promote_id:promoteId},
if (data.status == 1) { dataType: 'json',
success: function (data) {
var promoteData = data.data; var promoteData = data.data;
if (promoteData.length > 0) { if (promoteData.length > 0) {
@ -300,15 +297,22 @@
html += "<option value='" + promoteData[i]['id'] + "'>" + promoteData[i]['account'] + "(" + promoteData[i]['real_name'] + ")</option>"; html += "<option value='" + promoteData[i]['id'] + "'>" + promoteData[i]['account'] + "(" + promoteData[i]['real_name'] + ")</option>";
} }
} }
}
$("#promote_id").empty(); showPromoteSelect(html);
$('#promote_id').html(html); }
$("#promote_id").select2(); });
} } else {
}); showPromoteSelect(html);
}
}); });
function showPromoteSelect(html)
{
$("#promote_id").empty();
$('#promote_id').html(html);
$("#promote_id").select2();
}
$('#own').on('click',function () { $('#own').on('click',function () {
var ownId = $('#own_id').val(); var ownId = $('#own_id').val();
var checkBox = $(this).children('i'); var checkBox = $(this).children('i');

@ -188,20 +188,17 @@
$('#team_leader_id').change(function () { $('#team_leader_id').change(function () {
var promoteId = parseInt($(this).val()); var promoteId = parseInt($(this).val());
var promoteValue = $(this).find("option:selected").text(); var promoteValue = $(this).find("option:selected").text();
var html = "<option value='' selected>推广员账号</option>";
$.ajax({ if (promoteId > 0) {
url: "{:U('getChildPromoteList')}", html += "<option value='" + promoteId + "'>" + promoteValue + "</option>";
type: "post",
data: {promote_id:promoteId},
dataType: 'json',
success: function (data) {
var html = "<option value='' selected>推广员账号</option>";
if (promoteId > 0) { $.ajax({
html += "<option value='" + promoteId + "'>" + promoteValue + "</option>"; url: "{:U('getChildPromoteList')}",
} type: "post",
data: {promote_id:promoteId},
if (data.status == 1) { dataType: 'json',
success: function (data) {
var promoteData = data.data; var promoteData = data.data;
if (promoteData.length > 0) { if (promoteData.length > 0) {
@ -209,15 +206,22 @@
html += "<option value='" + promoteData[i]['id'] + "'>" + promoteData[i]['account'] + "(" + promoteData[i]['real_name'] + ")</option>"; html += "<option value='" + promoteData[i]['id'] + "'>" + promoteData[i]['account'] + "(" + promoteData[i]['real_name'] + ")</option>";
} }
} }
}
$("#promote_id").empty(); showPromoteSelect(html);
$('#promote_id').html(html); }
$("#promote_id").select2(); });
} } else {
}); showPromoteSelect(html);
}
}); });
function showPromoteSelect(html)
{
$("#promote_id").empty();
$('#promote_id').html(html);
$("#promote_id").select2();
}
$('#own').on('click',function () { $('#own').on('click',function () {
var ownId = $('#own_id').val(); var ownId = $('#own_id').val();
var checkBox = $(this).children('i'); var checkBox = $(this).children('i');

@ -242,22 +242,19 @@
setValue('row', '{:I("get.row",10)}'); setValue('row', '{:I("get.row",10)}');
$('#team_leader_id').change(function () { $('#team_leader_id').change(function () {
var promoteId = parseInt($(this).val()); var promoteId = parseInt($(this).val());
var promoteValue = $(this).find("option:selected").text(); var promoteValue = $(this).find("option:selected").text();
var html = "<option value='' selected>推广员账号</option>";
$.ajax({
url: "{:U('getChildPromoteList')}", if (promoteId > 0) {
type: "post", html += "<option value='" + promoteId + "'>" + promoteValue + "</option>";
data: {promote_id:promoteId},
dataType: 'json', $.ajax({
success: function (data) { url: "{:U('getChildPromoteList')}",
var html = "<option value='' selected>推广员账号</option>"; type: "post",
data: {promote_id:promoteId},
if (promoteId > 0) { dataType: 'json',
html += "<option value='" + promoteId + "'>" + promoteValue + "</option>"; success: function (data) {
}
if (data.status == 1) {
var promoteData = data.data; var promoteData = data.data;
if (promoteData.length > 0) { if (promoteData.length > 0) {
@ -265,15 +262,22 @@
html += "<option value='" + promoteData[i]['id'] + "'>" + promoteData[i]['account'] + "(" + promoteData[i]['real_name'] + ")</option>"; html += "<option value='" + promoteData[i]['id'] + "'>" + promoteData[i]['account'] + "(" + promoteData[i]['real_name'] + ")</option>";
} }
} }
}
$("#promote_id").empty(); showPromoteSelect(html);
$('#promote_id').html(html); }
$("#promote_id").select2(); });
} } else {
}); showPromoteSelect(html);
}
}); });
function showPromoteSelect(html)
{
$("#promote_id").empty();
$('#promote_id').html(html);
$("#promote_id").select2();
}
$('#own').on('click',function () { $('#own').on('click',function () {
var ownId = $('#own_id').val(); var ownId = $('#own_id').val();
var checkBox = $(this).children('i'); var checkBox = $(this).children('i');

Loading…
Cancel
Save