|
|
@ -457,6 +457,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>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (promoteId > 0) {
|
|
|
|
|
|
|
|
html += "<option value='" + promoteId + "'>" + promoteValue + "</option>";
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
url: "{:U('getChildPromoteList')}",
|
|
|
|
url: "{:U('getChildPromoteList')}",
|
|
|
@ -464,13 +468,6 @@
|
|
|
|
data: {promote_id:promoteId},
|
|
|
|
data: {promote_id:promoteId},
|
|
|
|
dataType: 'json',
|
|
|
|
dataType: 'json',
|
|
|
|
success: function (data) {
|
|
|
|
success: function (data) {
|
|
|
|
var html = "<option value='' selected>推广员账号</option>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (promoteId > 0) {
|
|
|
|
|
|
|
|
html += "<option value='" + promoteId + "'>" + promoteValue + "</option>";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (data.status == 1) {
|
|
|
|
|
|
|
|
var promoteData = data.data;
|
|
|
|
var promoteData = data.data;
|
|
|
|
|
|
|
|
|
|
|
|
if (promoteData.length > 0) {
|
|
|
|
if (promoteData.length > 0) {
|
|
|
@ -478,14 +475,21 @@
|
|
|
|
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>";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
showPromoteSelect(html);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
showPromoteSelect(html);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function showPromoteSelect(html)
|
|
|
|
|
|
|
|
{
|
|
|
|
$("#promote_id").empty();
|
|
|
|
$("#promote_id").empty();
|
|
|
|
$('#promote_id').html(html);
|
|
|
|
$('#promote_id').html(html);
|
|
|
|
$("#promote_id").select2();
|
|
|
|
$("#promote_id").select2();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#own').on('click', function () {
|
|
|
|
$('#own').on('click', function () {
|
|
|
|
var ownId = $('#own_id').val();
|
|
|
|
var ownId = $('#own_id').val();
|
|
|
|