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

master
chenxiaojun 5 years ago
parent c322f6ec7e
commit a5873caf8d

@ -457,20 +457,17 @@
$('#team_leader_id').change(function () {
var promoteId = parseInt($(this).val());
var promoteValue = $(this).find("option:selected").text();
var html = "<option value='' selected>推广员账号</option>";
$.ajax({
url: "{:U('getChildPromoteList')}",
type: "post",
data: {promote_id:promoteId},
dataType: 'json',
success: function (data) {
var html = "<option value='' selected>推广员账号</option>";
if (promoteId > 0) {
html += "<option value='" + promoteId + "'>" + promoteValue + "</option>";
if (promoteId > 0) {
html += "<option value='" + promoteId + "'>" + promoteValue + "</option>";
}
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 += "<option value='" + promoteData[i]['id'] + "'>" + promoteData[i]['account'] + "(" + promoteData[i]['real_name'] + ")</option>";
}
}
}
$("#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');

@ -279,20 +279,17 @@
$('#team_leader_id').change(function () {
var promoteId = parseInt($(this).val());
var promoteValue = $(this).find("option:selected").text();
var html = "<option value='' selected>推广员账号</option>";
$.ajax({
url: "{:U('getChildPromoteList')}",
type: "post",
data: {promote_id:promoteId},
dataType: 'json',
success: function (data) {
var html = "<option value='' selected>推广员账号</option>";
if (promoteId > 0) {
html += "<option value='" + promoteId + "'>" + promoteValue + "</option>";
if (promoteId > 0) {
html += "<option value='" + promoteId + "'>" + promoteValue + "</option>";
}
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 += "<option value='" + promoteData[i]['id'] + "'>" + promoteData[i]['account'] + "(" + promoteData[i]['real_name'] + ")</option>";
}
}
}
$("#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');

@ -188,20 +188,17 @@
$('#team_leader_id').change(function () {
var promoteId = parseInt($(this).val());
var promoteValue = $(this).find("option:selected").text();
var html = "<option value='' selected>推广员账号</option>";
$.ajax({
url: "{:U('getChildPromoteList')}",
type: "post",
data: {promote_id:promoteId},
dataType: 'json',
success: function (data) {
var html = "<option value='' selected>推广员账号</option>";
if (promoteId > 0) {
html += "<option value='" + promoteId + "'>" + promoteValue + "</option>";
if (promoteId > 0) {
html += "<option value='" + promoteId + "'>" + promoteValue + "</option>";
}
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 += "<option value='" + promoteData[i]['id'] + "'>" + promoteData[i]['account'] + "(" + promoteData[i]['real_name'] + ")</option>";
}
}
}
$("#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');

@ -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 = "<option value='' selected>推广员账号</option>";
if (promoteId > 0) {
html += "<option value='" + promoteId + "'>" + promoteValue + "</option>";
}
if (data.status == 1) {
var promoteId = parseInt($(this).val());
var promoteValue = $(this).find("option:selected").text();
var html = "<option value='' selected>推广员账号</option>";
if (promoteId > 0) {
html += "<option value='" + promoteId + "'>" + promoteValue + "</option>";
$.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 += "<option value='" + promoteData[i]['id'] + "'>" + promoteData[i]['account'] + "(" + promoteData[i]['real_name'] + ")</option>";
}
}
}
$("#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');

Loading…
Cancel
Save