|
|
|
@ -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');
|
|
|
|
|