Merge pull request 'feature/add_item' (#229) from feature/add_item into master

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/229
master
廖金灵 4 years ago
commit 9973e72bf3

@ -649,18 +649,18 @@ class CompanyStatementController extends ThinkController
->select();
$use_data = [
"01"=>["time"=>"01","show_company_name"=>$data[0]["company_name"],"row"=>1],
"02"=>["time"=>"02","show_company_name"=>$data[0]["company_name"],"row"=>1],
"03"=>["time"=>"03","show_company_name"=>$data[0]["company_name"],"row"=>1],
"04"=>["time"=>"04","show_company_name"=>$data[0]["company_name"],"row"=>1],
"05"=>["time"=>"05","show_company_name"=>$data[0]["company_name"],"row"=>1],
"06"=>["time"=>"06","show_company_name"=>$data[0]["company_name"],"row"=>1],
"07"=>["time"=>"07","show_company_name"=>$data[0]["company_name"],"row"=>1],
"08"=>["time"=>"08","show_company_name"=>$data[0]["company_name"],"row"=>1],
"09"=>["time"=>"09","show_company_name"=>$data[0]["company_name"],"row"=>1],
"10"=>["time"=>"10","show_company_name"=>$data[0]["company_name"],"row"=>1],
"11"=>["time"=>"11","show_company_name"=>$data[0]["company_name"],"row"=>1],
"12"=>["time"=>"12","show_company_name"=>$data[0]["company_name"],"row"=>1],
"01"=>["time"=>"01","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.01.01','statement_end_time'=>$time.'.01.'.date('t',strtotime($time.'01'))]]],
"02"=>["time"=>"02","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.02.01','statement_end_time'=>$time.'.02.'.date('t',strtotime($time.'02'))]]],
"03"=>["time"=>"03","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.03.01','statement_end_time'=>$time.'.03.'.date('t',strtotime($time.'03'))]]],
"04"=>["time"=>"04","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.04.01','statement_end_time'=>$time.'.04.'.date('t',strtotime($time.'04'))]]],
"05"=>["time"=>"05","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.05.01','statement_end_time'=>$time.'.05.'.date('t',strtotime($time.'05'))]]],
"06"=>["time"=>"06","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.06.01','statement_end_time'=>$time.'.06.'.date('t',strtotime($time.'06'))]]],
"07"=>["time"=>"07","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.07.01','statement_end_time'=>$time.'.07.'.date('t',strtotime($time.'07'))]]],
"08"=>["time"=>"08","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.08.01','statement_end_time'=>$time.'.08.'.date('t',strtotime($time.'08'))]]],
"09"=>["time"=>"09","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.09.01','statement_end_time'=>$time.'.09.'.date('t',strtotime($time.'09'))]]],
"10"=>["time"=>"10","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.10.01','statement_end_time'=>$time.'.10.'.date('t',strtotime($time.'10'))]]],
"11"=>["time"=>"11","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.11.01','statement_end_time'=>$time.'.11.'.date('t',strtotime($time.'11'))]]],
"12"=>["time"=>"12","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.12.01','statement_end_time'=>$time.'.12.'.date('t',strtotime($time.'12'))]]],
];
$row = 0;
@ -726,10 +726,14 @@ class CompanyStatementController extends ThinkController
$assign_data[] = array_values($use_data);
}
// dump($assign_data);
foreach ($assign_data as $key => $value) {
foreach ($value as $k => $v) {
$assign_data[$key][$k]["row"] = count($v["statement_info"])?count($v["statement_info"]):1;
if (count($v["statement_info"]) > 1) {
unset($assign_data[$key][$k]['statement_info'][0]);
$assign_data[$key][$k]['statement_info'] = array_values($assign_data[$key][$k]['statement_info']);
}
$assign_data[$key][$k]["row"] = count($assign_data[$key][$k]["statement_info"])?count($assign_data[$key][$k]["statement_info"]):1;
}
}

@ -828,19 +828,23 @@ class MarketPercentageController extends ThinkController
$value['company_profit'] = "0.00";
}
//
$data[$key]['should_performance_commission'] = substr(number_format($value["performance_commission"] * ($market_percentage["performance_monthly_ratio"]/100), 4, '.', ''),0,-2)+$this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission'];
$data[$key]['should_month_bonus_ratio'] = substr(number_format($value["achievement_bonus"] * ($market_percentage["month_bonus_ratio"]/100), 4, '.', ''),0,-2) + $this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['achievement_bonus'];
$data[$key]['should_performance_commission'] = number_format($value["performance_commission"] * ($market_percentage["performance_monthly_ratio"]/100), 2, '.', '')+$this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission'];
$data[$key]['extend_commission'] += $this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission']+$this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['achievement_bonus'];
$data[$key]['extend_commission'] = number_format($data[$key]['extend_commission'], 2, '.', '');
$data[$key]['should_month_bonus_ratio'] = $data[$key]['extend_commission'] - $data[$key]['should_performance_commission'];
// dump($this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission']);
// dump($this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['achievement_bonus']);
// $data[$key]['wait_commission'] += $this->returnWaitMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission']+$this->returnWaitMarketPercentageArray[$value['admin_id'].$value['pay_time']]['achievement_bonus'];
$data[$key]['extend_commission'] = number_format($data[$key]['extend_commission'], 2, '.', '');
$data[$key]['wait_commission'] = number_format($data[$key]['wait_commission'], 2, '.', '');
$data[$key]['wait_achievement_commission'] = $data[$key]['wait_commission'] - $data[$key]['wait_performance_commission'];
$data[$key]['achievement_bonus'] = $achievement_bonus;
$sum['performance_revenue'] += $data[$key]['performance_revenue'];

@ -71,14 +71,39 @@ class SocietyInfoController extends ThinkController
$map['communication_time'] = array('elt', time() - $gap * 86400);
}
if (I('sociaty_level') && I('sociaty_level') != '0') $map['sociaty_level'] = I('sociaty_level');
//获取分页数据
$query = $model->where($map)->order("communication_time desc");
$count = $query->count();
if($_REQUEST['ids'] && $is_export) {
$map['id'] = ['in',$_REQUEST['ids']];
}
$order_query = $query
->where($map);
if (I('data_order')) {
$data_order = reset(explode(',', $_REQUEST['data_order']));
$data_order_type = end(explode(',', $_REQUEST['data_order']));
if ($data_order == 4 && $data_order_type == "create_time") {
$order_query = $order_query->order("create_time desc");
} else if($data_order == 3 && $data_order_type == "create_time") {
$order_query = $order_query->order("create_time asc");
}
if ($data_order == 4 && $data_order_type == "communication_time") {
$order_query = $order_query->order("communication_time desc");
} else if($data_order == 3 && $data_order_type == "communication_time") {
$order_query = $order_query->order("communication_time asc");
}
$this->assign('userarpu_order', $data_order);
$this->assign('userarpu_order_type', $data_order_type);
}
if($is_export){
$map['id'] = ['in',$_REQUEST['ids']];
$parseData = $query->field("province, city, company_name, register_capital, functionary, phone, wechat, qq, game_type, game_name, join_platform, promote_scale,sociaty_level, turnover, address, league_info, is_potential, remark, interface_person, create_time, communication_time, create_account")
->where($map)
->order("communication_time desc")
$parseData = $order_query->field("province, city, company_name, register_capital, functionary, phone, wechat, qq, game_type, game_name, join_platform, promote_scale,sociaty_level, turnover, address, league_info, is_potential, remark, interface_person, create_time, communication_time, create_account")
->select();
foreach ($parseData as &$v) {
$v['sociaty_level'] = $this->level[$v['sociaty_level']];
@ -96,7 +121,7 @@ class SocietyInfoController extends ThinkController
$this->export($head, $parseData, "公会信息-".date('Ymd'));
return ;
} else {
$societyInfos = $model->where($map)->order("communication_time desc")->field("*")->page($page,$row)->select();
$societyInfos = $order_query->page($page,$row)->field("*")->select();
// dump($societyInfos);die();
}

@ -529,7 +529,13 @@
var type = $(this).attr("name");
if(!CHECK.number.test(val)){
if(!CHECK.number.test(val)&&type!='other_amount'&&type!="sum_money"){
layer.msg('结算单中的罚款和税率必须是数字,且不能为空');
dom.val(vdata);
return false;
}
if(!CHECK.othernumber.test(val)&&(type=='other_amount'||type=="sum_money")){
layer.msg('结算单中的罚款和税率必须是数字,且不能为空');
dom.val(vdata);
return false;
@ -580,6 +586,7 @@
}
var CHECK = {
number: /^\d+(\.{1}\d+)?$/,
othernumber: /^\-?\d+(\.{1}\d+)?$/,
mobile: /^1[3456789]\d{9}$/,
BankNo: /^([1-9]{1})\d{10,19}$/,
money: /((^[1-9]\d*)|^0)(\.\d{0,2}){0,1}$/

@ -126,9 +126,16 @@
<foreach name="first_data" item="datas">
<tr>
<td rowspan="{$datas['row']}">{$datas['show_company_name']}</td>
<td rowspan="{$datas['row']}">{$time}年{$datas["time"]}月</td>
<if condition="$datas['withdraw_type'] neq 0">
<td rowspan="{$datas['row']}">{$time}年{$datas["time"]}月</td>
</if>
<if condition="$datas['statement_info'][0]['statement_type'] gt 0">
<td>{$datas['statement_info'][0]['game_name']|default="--"}<if condition="$datas['statement_info'][0]['withdraw_type'] eq 0 and $datas['statement_info'][0]['statement_begin_time']">({$datas['statement_info'][0]['statement_begin_time']}-{$datas['statement_info'][0]['statement_end_time']})</if></td>
<if condition="$datas['withdraw_type'] eq 0">
<td>
{$datas['statement_info'][0]['statement_begin_time']}-{$datas['statement_info'][0]['statement_end_time']}
</td>
</if>
<td>{$datas['statement_info'][0]['game_name']|default="--"}</td>
<td>--</td>
<td>--</td>
<td>--</td>
@ -138,7 +145,12 @@
<td>--</td>
<td><if condition="$datas['statement_info'][0]['statement_type'] eq 2">-</if>{$datas['statement_info'][0]['sum_money']|default="--"}</td>
<else/>
<td>{$datas['statement_info'][0]['game_name']|default="--"}<if condition="$datas['statement_info'][0]['withdraw_type'] eq 0 and $datas['statement_info'][0]['statement_begin_time']">({$datas['statement_info'][0]['statement_begin_time']}-{$datas['statement_info'][0]['statement_end_time']})</if></td>
<if condition="$datas['withdraw_type'] eq 0">
<td>
{$datas['statement_info'][0]['statement_begin_time']}-{$datas['statement_info'][0]['statement_end_time']}
</td>
</if>
<td>{$datas['statement_info'][0]['game_name']|default="--"}</td>
<td>{$datas['statement_info'][0]['platform_money']|default="--"}</td>
<td>{$datas['statement_info'][0]['aggregate_money']|default="--"}</td>
<td>{$datas['statement_info'][0]['sum_amount']|default="--"}</td>
@ -154,7 +166,12 @@
<foreach name="datas['statement_info']" item="statement_info" key="skey">
<if condition="$skey gt 0">
<if condition="$statement_info['statement_type'] gt 0">
<td>{$statement_info['game_name']|default="--"}<if condition="$datas['statement_info'][0]['withdraw_type'] eq 0 and $statement_info['statement_begin_time']">({$statement_info['statement_begin_time']}-{$statement_info['statement_end_time']})</if></td>
<if condition="$datas['withdraw_type'] eq 0">
<td>
{$statement_info['statement_begin_time']}-{$statement_info['statement_end_time']}
</td>
</if>
<td>{$statement_info['game_name']|default="--"}</td>
<td>--</td>
<td>--</td>
<td>--</td>
@ -165,7 +182,12 @@
<td><if condition="$statement_info['statement_type'] eq 2">-</if>{$statement_info['sum_money']|default="--"}</td>
<else/>
<tr>
<td>{$statement_info['game_name']|default="--"}<if condition="$datas['statement_info'][0]['withdraw_type'] eq 0 and $statement_info['statement_begin_time']">({$statement_info['statement_begin_time']}-{$statement_info['statement_end_time']})</if></td>
<if condition="$datas['withdraw_type'] eq 0">
<td>
{$statement_info['statement_begin_time']}-{$statement_info['statement_end_time']}
</td>
</if>
<td>{$statement_info['game_name']|default="--"}</td>
<td>{$statement_info['platform_money']|default="--"}</td>
<td>{$statement_info['aggregate_money']|default="--"}</td>
<td>{$statement_info['sum_amount']|default="--"}</td>

@ -89,6 +89,8 @@
<input type="text" name="text" style="width: 200px" class="" placeholder="快速搜索" value="{:I('text')}"/>&nbsp;
</div>
<input type="hidden" name="sortBy" value="" class="sortBy">
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('lists','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
</div>
@ -165,8 +167,28 @@
<th>是否为意向客户</th>
<th>备注信息</th>
<th>对接人</th>
<th>录入时间</th>
<th>最后沟通时间</th>
<th>
<a class="paixu" data-order='create_time'>
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'create_time'">
录入时间▲
<elseif
condition="$userarpu_order eq 3 and $userarpu_order_type eq 'create_time'" />
录入时间▼
<else />录入时间<img src="__IMG__/up-down.png" width="13px">
</if>
</a>
</th>
<th>
<a class="paixu" data-order='communication_time'>
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'communication_time'">
最后沟通时间▲
<elseif
condition="$userarpu_order eq 3 and $userarpu_order_type eq 'communication_time'" />
最后沟通时间▼
<else />最后沟通时间<img src="__IMG__/up-down.png" width="13px">
</if>
</a>
</th>
<th style="width:8%;min-width:10px;">操作</th>
</tr>
@ -429,6 +451,23 @@
return false;
});
$(".paixu").click(function () {
var that = $(this);
$data_order = that.attr('data-order');
$order_type = '{$userarpu_order}';
if ($order_type == '' || $order_type == '4') {
$(".sortBy").attr('name', 'data_order');
val = '3,' + $data_order;
$(".sortBy").attr('value', val);
$("#search").click();
} else if ($order_type == '3') {
$(".sortBy").attr('name', 'data_order');
val = '4,' + $data_order;
$(".sortBy").attr('value', val);
$("#search").click();
}
});
$("#excel_back").click(function () {
$(".search_list").show();
$(".excel_list").hide();

Loading…
Cancel
Save