Merge remote-tracking branch 'origin/feature/group_type' into feature/group_type

master
liuweiwen 5 years ago
commit a26b0ab53f

@ -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;
}
} }

@ -104,7 +104,7 @@ class StatementController extends ThinkController
"statement_end_time"=>array("EGT",strtotime($_REQUEST['time_start'])), "statement_end_time"=>array("EGT",strtotime($_REQUEST['time_start'])),
"company_id"=>$CompanyId "company_id"=>$CompanyId
); );
$bres = $Statement->field("statement_begin_time,statement_end_time")->where($checkmap)->find(); $bres = $Statement->field("id,statement_begin_time,statement_end_time")->where($checkmap)->find();
if($bres){ if($bres){
$repart=true; $repart=true;
$begin = $_REQUEST['time_start']; $begin = $_REQUEST['time_start'];
@ -122,6 +122,9 @@ class StatementController extends ThinkController
"statement_end_time"=>array("EGT",strtotime($_REQUEST['time_end'])), "statement_end_time"=>array("EGT",strtotime($_REQUEST['time_end'])),
"company_id"=>$CompanyId "company_id"=>$CompanyId
); );
if($repart){
$checkmap["id"]=array("NEQ",$bres["id"]);
}
$bres = $Statement->field("statement_begin_time,statement_end_time")->where($checkmap)->find(); $bres = $Statement->field("statement_begin_time,statement_end_time")->where($checkmap)->find();
if($bres){ if($bres){
$repart=true; $repart=true;

@ -246,6 +246,26 @@
$("#settlement_type_value").val(data.data.settlement_type); $("#settlement_type_value").val(data.data.settlement_type);
$("#bank_account_name").val(data.data.bank_account); $("#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").val(data.data.yfpartner);
$("#jfCompany").next().text(data.data.yfpartner); $("#jfCompany").next().text(data.data.yfpartner);
$("#jfPerson").val(data.data.yflink_man); $("#jfPerson").val(data.data.yflink_man);
@ -348,6 +368,26 @@
$("#settlement_type_value").val(data.data.settlement_type); $("#settlement_type_value").val(data.data.settlement_type);
$("#bank_account_name").val(data.data.bank_account); $("#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").val(data.data.yfpartner);
$("#jfCompany").next().text(data.data.yfpartner); $("#jfCompany").next().text(data.data.yfpartner);
$("#jfPerson").val(data.data.yflink_man); $("#jfPerson").val(data.data.yflink_man);

Loading…
Cancel
Save