Merge branch 'feature/group_type' into dev

master
zhengyongxing 5 years ago
commit 1a52a129f2

@ -354,4 +354,28 @@ class AjaxController extends ThinkController{
}
function getPromoteCompanyList() {
$map = [];
if ($_REQUEST['withdraw_number']) {
$map['widthdraw_number'] = $_REQUEST['withdraw_number'];
}
// var_dump($map);die();
if ($_REQUEST['company_id']) {
$map['company_id'] = $_REQUEST['company_id'];
}
$data = M("withdraw","tab_")
->field("widthdraw_number,promote_account,tab_promote_company.id as company_id,company_name,tab_withdraw.settlement_type,mobile_phone,real_name,bank_card,account_openin,address,game_ratio,bank_account")
->join("left join tab_promote on tab_withdraw.promote_id=tab_promote.id")
->join("left join tab_promote_company on tab_promote.company_id=tab_promote_company.id")
->where($map)
->select();
$this->ajaxReturn(['data'=>$data]);
// return $data;
}
}

@ -246,6 +246,26 @@
$("#settlement_type_value").val(data.data.settlement_type);
$("#bank_account_name").val(data.data.bank_account);
var add = '';
$("#company_name").empty();
$.ajax({
url: "{:U('Ajax/getPromoteCompanyList')}",
type: "get",
data: {withdraw_number: ext_field},
dataType: 'json',
success: function (response) {
add +='<option value="">请选择推广公司</option>';
data = response.data;
console.log(data)
for (var i in data){
add += "<option company_id='"+data[i].company_id+"' value='"+data[i].company_id+"' "+('selected')+">"+data[i].company_name+"</option>"
}
$("#company_name").empty();
$("#company_name").append(add);
$("#company_name").select2();
}
});
$("#jfCompany").val(data.data.yfpartner);
$("#jfCompany").next().text(data.data.yfpartner);
$("#jfPerson").val(data.data.yflink_man);
@ -348,6 +368,26 @@
$("#settlement_type_value").val(data.data.settlement_type);
$("#bank_account_name").val(data.data.bank_account);
var add = '';
$("#ext_field").empty();
$.ajax({
url: "{:U('Ajax/getPromoteCompanyList')}",
type: "get",
data: {company_id: ext_field},
dataType: 'json',
success: function (response) {
add +='<option value="">体现单号</option>';
data = response.data;
console.log(data)
for (var i in data){
add += "<option value='"+data[i].widthdraw_number+"' "+('selected')+">"+data[i].widthdraw_number+"</option>"
}
$("#ext_field").empty();
$("#ext_field").append(add);
$("#ext_field").select2();
}
});
$("#jfCompany").val(data.data.yfpartner);
$("#jfCompany").next().text(data.data.yfpartner);
$("#jfPerson").val(data.data.yflink_man);

Loading…
Cancel
Save