Merge branch 'master' of 47.111.118.107:wmtx/platform into feature/finance_statement_three

master
chenzhi 4 years ago
commit e085b6cc78

@ -599,7 +599,7 @@ class AggregateFinanceStatementController extends ThinkController
$invoice_data .= "\n纳税人识别号".$data['second_party_info']['company_tax_no']; $invoice_data .= "\n纳税人识别号".$data['second_party_info']['company_tax_no'];
$invoice_data .= "\n开户银行".$data['second_party_info']['opening_bank']; $invoice_data .= "\n开户银行".$data['second_party_info']['opening_bank'];
$invoice_data .= "\n开户账号".$data['second_party_info']['payee_name']; $invoice_data .= "\n开户账号".$data['second_party_info']['bank_account'];
$invoice_data .= "\n开票内容".$data['second_party_info']['invoice_item']; $invoice_data .= "\n开票内容".$data['second_party_info']['invoice_item'];
$invoice_data .= "\n注册地址及电话".$data['second_party_info']['register_address'].",".$data['second_party_info']['register_phone']; $invoice_data .= "\n注册地址及电话".$data['second_party_info']['register_address'].",".$data['second_party_info']['register_phone'];

@ -567,14 +567,26 @@ class AjaxController extends ThinkController{
*/ */
public function getPromoteGameList() { public function getPromoteGameList() {
$game_ids = I('game_ids'); $company_id = $_REQUEST['company_id'];
$spendData = M("spend use index(user_id)","tab_")
->field("game_id")
->join("left join tab_promote on tab_spend.promote_id=tab_promote.id")
->where([
'company_id'=>$company_id,
'pay_status'=>1,
'pay_way'=>['egt',0]
])
->group("game_id")
->select();
if ($game_ids) { if ($spendData) {
$map['relation_game_id'] = ['in',$game_ids]; $map['id'] = ['in',array_column($spendData,"game_id")];
} else { } else {
$this->ajaxReturn([]); $this->ajaxReturn([]);
} }
$data = M("game","tab_") $data = M("game","tab_")
->field("relation_game_id,relation_game_name") ->field("relation_game_id,relation_game_name")
->where($map) ->where($map)

@ -1470,8 +1470,8 @@ class CompanyStatementController extends ThinkController
$amount_time['pay_way'] = ['egt',0]; $amount_time['pay_way'] = ['egt',0];
foreach ($statement_info as $k => $v) { foreach ($statement_info as $k => $v) {
$statement_begin_time = strtotime($v['statement_begin_time']); $statement_begin_time = strtotime(str_replace('.','-',$v['statement_begin_time']));
$statement_end_time = strtotime($v['statement_end_time'])+86399; $statement_end_time = strtotime(str_replace('.','-',$v['statement_end_time']))+86399;
$amount_time['_string'] = "payed_time between {$statement_begin_time} and {$statement_end_time} and relation_game_id={$v['relation_game_id']}"; $amount_time['_string'] = "payed_time between {$statement_begin_time} and {$statement_end_time} and relation_game_id={$v['relation_game_id']}";
$dataAmount = M("spend","tab_") $dataAmount = M("spend","tab_")

@ -790,8 +790,8 @@ class TimingController extends AdminController {
$compamy_info = M("promote","tab_")->where(['id'=>$promote_id,'company_id'=>$value['company_id']])->find(); $compamy_info = M("promote","tab_")->where(['id'=>$promote_id,'company_id'=>$value['company_id']])->find();
if ($compamy_info) { if ($compamy_info) {
foreach ($statement_info as $k => $v) { foreach ($statement_info as $k => $v) {
$statement_begin_time = strtotime($v['statement_begin_time']); $statement_begin_time = strtotime(str_replace('.','-',$v['statement_begin_time']));
$statement_end_time = strtotime($v['statement_end_time'])+86399; $statement_end_time = strtotime(str_replace('.','-',$v['statement_end_time']))+86399;
$amount_time['tab_spend.pay_status'] = 1; $amount_time['tab_spend.pay_status'] = 1;
$amount_time['pay_way'] = ['egt',0]; $amount_time['pay_way'] = ['egt',0];
$amount_time['_string'] = "payed_time between {$statement_begin_time} and {$statement_end_time} and relation_game_id={$v['relation_game_id']}"; $amount_time['_string'] = "payed_time between {$statement_begin_time} and {$statement_end_time} and relation_game_id={$v['relation_game_id']}";

@ -631,9 +631,11 @@
}); });
var game_id = "{$_GET['game_id']??0}"; var game_id = "{$_GET['game_id']??0}";
$("#company_id").on("change",function(){ $("#company_id").on("change",function(){
layer.load(2);
var data = $(this).find("option:selected").data().value; var data = $(this).find("option:selected").data().value;
var company_id = $(this).find("option:selected").val();
var url = "{:U('Ajax/getPromoteGameList')}"+"&game_ids="+data; var url = "{:U('Ajax/getPromoteGameList')}"+"&game_ids="+data+"&company_id="+company_id;
$.get(url,function(data){ $.get(url,function(data){
var game = data; var game = data;
var gamestr = ''; var gamestr = '';
@ -646,6 +648,7 @@
} }
$("#relation_game_id").html(gamestr); $("#relation_game_id").html(gamestr);
$("#relation_game_id").select2(); $("#relation_game_id").select2();
layer.closeAll("loading");
}) })
}); });

Loading…
Cancel
Save