@ -11,6 +11,21 @@ use User\Api\UserApi as UserApi;
class MarketPercentageController extends ThinkController
{
protected $coefficient = [];
protected function _initialize()
{
$coefficient_data = M("coefficient","tab_")->where("1=1")->select();
foreach ($coefficient_data as $key => $value) {
$this->coefficient[$value['pay_time']][$value['admin_id']] = $value['coefficient']/100;
}
parent::_initialize();
}
public function index($row = 10, $p = 1){
$map = [];
@ -367,6 +382,173 @@ class MarketPercentageController extends ThinkController
}
public function addcoefficient() {
$batch = date('Ymd').date('His').sp_random_num(3);
$this->assign("batch",$batch);
$this->meta_title = 'EXCEL导入';
$this->display();
}
public function loopAdd()
{
$p = $_REQUEST;
// $batch = $p['batch'];
$checkarr = $p['checkarr'];
//循环获取添加
if(count($checkarr) < 1 ) {
$this->ajaxReturn(["status"=>1,"msg"=>"ok"]);
}
$data = M("auth_group")
->where(['title'=>['like','%市场专员%']])
->select(false);
$member = M("auth_group_access")
->field("sys_member.nickname,sys_member.real_name,sys_member.uid,sys_auth_group_access.group_id")
->join("left join ({$data}) auth on auth.id = sys_auth_group_access.group_id")
->join("left join sys_member on sys_member.uid = sys_auth_group_access.uid")
->where("auth.title is not null")
->select();
$handle_member = [];
foreach($member as $key => $value) {
$handle_member[$value['real_name']] = $value;
}
$save = [];
$coefficient = M('coefficient',"tab_");
foreach ($checkarr as $k => $v) {
if(!strtotime($v['pay_time'])) {
$this->ajaxReturn(["status"=>0,"msg"=>"导入失败,序号{$v['sort']}行日期格式错误"]);
}
if ($handle_member[$v['nickname']]) {
if ($save[$v['nickname'].$v['pay_time']]) {
$this->ajaxReturn(["status"=>0,"msg"=>"导入失败,序号{$v['sort']}行存在重复记录"]);
}
$hav_coefficient = $coefficient
->where(['admin_id'=>$handle_member[$v['nickname']]['uid'],'pay_time'=>$v['pay_time']])
->find();
if ($hav_coefficient) {
$this->ajaxReturn(["status"=>0,"msg"=>"导入失败,日期{$v['pay_time']}市场员{$handle_member[$v['nickname']]['real_name']}已经存在,请勿重复导入"]);
}
$save[$v['nickname'].$v['pay_time']]['pay_time'] = $v['pay_time'];
$save[$v['nickname'].$v['pay_time']]['real_name'] = $handle_member[$v['nickname']]['real_name'];
$save[$v['nickname'].$v['pay_time']]['admin_id'] = $handle_member[$v['nickname']]['uid'];
$save[$v['nickname'].$v['pay_time']]['nickname'] = $handle_member[$v['nickname']]['nickname'];
$save[$v['nickname'].$v['pay_time']]['coefficient'] = $v['coefficient']*100;
if ($v['coefficient'] > 1) {
$this->ajaxReturn(["status"=>0,"msg"=>"导入失败,序号{$v['sort']}行系数错误,系数超过最大值1"]);
}
} else {
$this->ajaxReturn(["status"=>0,"msg"=>"导入失败,导入的市场员{$v['nickname']}不存在"]);
}
}
$save = array_values($save);
if ($coefficient->addAll($save)) {
$this->ajaxReturn(["status"=>1,"msg"=>"导入成功"]);
}
}
public function coefficientSave() {
$pay_time =date('Y-m',strtotime(date('Y',time()).'-'.(date('m',time())-1).'-01'));
if ($_REQUEST['is_get']) {
unset($_GET['is_get']);
$data = $_GET;
$admin = $_SESSION['onethink_admin']['user_auth']['username'];
$coefficient_check_detail = "已审批({$admin}) < br > ".date("Y-m-d H:i:s",time());
$marketSave['coefficient_check'] = 1;
$marketSave['coefficient_check_detail'] = $coefficient_check_detail;
foreach ($data as $key => $value) {
//解析键值信息
$info = explode('-',$key);
$save['nickname'] = $info[0];
$save['admin_id'] = $info[1];
$save['real_name'] = $info[2];
$save['coefficient'] = $value*100;
$save['pay_time'] = $pay_time;
$is_hav = M("coefficient","tab_")
->where([
'pay_time'=>$save['pay_time'],
'admin_id'=>$save['admin_id']
])
->find();
if ($is_hav) {
if ($is_hav['coefficient'] != $save['coefficient']) {
$save['update_time'] = time();
M("coefficient","tab_")
->where([
'pay_time'=>$save['pay_time'],
'admin_id'=>$save['admin_id']
])->save(['coefficient'=>$save['coefficient']]);
M("market_altogether","tab_")->where([
'pay_time'=>$save['pay_time'],
'admin_id'=>$save['admin_id']
])->save($marketSave);
}
} else {
$save['create_time'] = time();
M("coefficient","tab_")->add($save);
M("market_altogether","tab_")->where([
'pay_time'=>$save['pay_time'],
'admin_id'=>$save['admin_id']
])->save($marketSave);
}
}
$this->ajaxReturn(['status'=>1,'msg'=>"绩效编辑成功"]);
} else {
$data = M("auth_group")
->where(['title'=>['like','%市场专员%']])
->select(false);
$data = M("auth_group_access")
->field("sys_member.nickname,sys_member.real_name,sys_member.uid,sys_auth_group_access.group_id,IF(coefficient is not NULL, coefficient, 100) coefficient")
->join("left join ({$data}) auth on auth.id = sys_auth_group_access.group_id")
->join("left join sys_member on sys_member.uid = sys_auth_group_access.uid")
->join("left join tab_coefficient on tab_coefficient.admin_id = sys_member.uid and pay_time='{$pay_time}'")
->where("auth.title is not null")
->select();
$this->assign('list_data',$data);
$this->display("coefficient");
}
}
public function marketStaffSettle($row = 10, $p = 1) {
$map = [];
@ -493,13 +675,19 @@ class MarketPercentageController extends ThinkController
$this->checkListOrCountAuthRestMap($map,[]);
if(IS_ROOT){
$this->assign('coefficient_check',true);
$this->assign('market_check',true);
$this->assign('finance_check',true);
$this->assign('coefficient_in_check',true);
}else {
$exportRule = strtolower(MODULE_NAME . '/' . CONTROLLER_NAME . '/' . ACTION_NAME . "_coefficient_check");
$this->assign('coefficient_check',$this->checkRule($exportRule,array('in','1,2')));
$exportRule = strtolower(MODULE_NAME . '/' . CONTROLLER_NAME . '/' . ACTION_NAME . "_market_check");
$this->assign('market_check',$this->checkRule($exportRule,array('in','1,2')));
$exportRule = strtolower(MODULE_NAME . '/' . CONTROLLER_NAME . '/' . ACTION_NAME . "_finance_check");
$this->assign('finance_check',$this->checkRule($exportRule,array('in','1,2')));
$exportRule = strtolower(MODULE_NAME . '/' . CONTROLLER_NAME . '/' . ACTION_NAME . "_coefficient_in_check");
$this->assign('coefficient_in_check',$this->checkRule($exportRule,array('in','1,2')));
}
$all_data = M("market_altogether","tab_")
@ -546,17 +734,20 @@ class MarketPercentageController extends ThinkController
if(!$value['market_check']) {
$data[$key]['market_check_detail'] = "-----";
//( {$admin}) < br > ".date("Y-m-d H:m:s",time());
}
if (!$value['finance_check']) {
$data[$key]['finance_check_detail'] = "-----";
//( {$admin}) < br > ".date("Y-m-d H:m:s",time());
}
if (!$value['coefficient_check']) {
$data[$key]['coefficient_check_detail'] = "-----";
}
if ($_REQUEST['export']) {
$data[$key]['market_check_detail'] = str_replace("< br > ",'',$data[$key]['market_check_detail']);
$data[$key]['finance_check_detail'] = str_replace("< br > ",'',$data[$key]['finance_check_detail']);
$data[$key]['coefficient_check_detail'] = str_replace("< br > ",'',$data[$key]['coefficient_check_detail']);
}
$market_percentage = json_decode($value['market_percentage'],true);
@ -569,11 +760,18 @@ class MarketPercentageController extends ThinkController
//维护奖金考核比例
$data[$key]['maintain_appraisal_bonuses_ratio'] = $market_percentage['maintain_appraisal_bonuses_ratio'];
$data[$key]['coefficient'] = $this->coefficient[$value['pay_time']][$value['admin_id']];
$month = date("m",strtotime($value['pay_time']));
$yes = date("Y",strtotime($value['pay_time']));
$achievement_bonus = number_format($data[$key]['achievement_bonus'], 2, '.', '');
//绩效系数计算
$data[$key]['achievement_bonus'] = number_format($data[$key]['achievement_bonus'] * ($this->coefficient[$value['pay_time']][$value['admin_id']]?$this->coefficient[$value['pay_time']][$value['admin_id']]:1), 2, '.', '');
$data[$key]['commission'] = number_format($data[$key]['performance_commission'] + $data[$key]['achievement_bonus'], 2, '.', '');
$data[$key]['wait_commission'] = substr(number_format($value['wait_performance_commission'] + $value['wait_achievement_commission'], 4, '.', ''),0,-2);
$data[$key]['wait_commission'] = substr(number_format($value['wait_performance_commission'] + $value['wait_achievement_commission']*($this->coefficient[$value['pay_time']][$value['admin_id']]?$this->coefficient[$value['pay_time']][$value['admin_id']]:1) , 4, '.', ''),0,-2);
$data[$key]['extend_commission'] = $data[$key]['commission'] - $data[$key]['wait_commission'];
//两个起提流水都没达到时,不展示税后毛利
@ -583,7 +781,6 @@ class MarketPercentageController extends ThinkController
$value['company_profit'] = "0.00";
}
if ($market_percentage['time'] == 1) {
if ($month == '07') {
@ -688,6 +885,8 @@ class MarketPercentageController extends ThinkController
$data[$key]['extend_commission'] = number_format($data[$key]['extend_commission'],2,'.','');
$data[$key]['wait_commission'] = number_format($data[$key]['wait_commission'],2,'.','');
$data[$key]['achievement_bonus'] = $achievement_bonus;
$sum['performance_revenue'] += $data[$key]['performance_revenue'];
$sum['appraisal_bonuses'] += $data[$key]['appraisal_bonuses'];
$sum['performance_commission'] += $data[$key]['performance_commission'];
@ -696,6 +895,8 @@ class MarketPercentageController extends ThinkController
$sum['extend_commission'] += $data[$key]['extend_commission'];
$sum['company_profit'] += $data[$key]['company_profit'];
}
$sum['wait_commission'] = '-------';
$sum['pay_time'] = '总计';
@ -715,9 +916,11 @@ class MarketPercentageController extends ThinkController
'performance_profit'=>'维护税后毛利',
'performance_commission' => '业绩提成',
'achievement_bonus' => '绩效考核奖金',
'coefficient'=>'绩效系数',
'commission' => '当月合计',
'extend_commission' => '应发金额',
'wait_commission' => '待发金额',
'coefficient_check_detail'=>'绩效确认',
'market_check_detail' => '市场部确认',
'finance_check_detail' => '财务部审批'];
@ -786,7 +989,7 @@ class MarketPercentageController extends ThinkController
// $data[$key]['performance_commission'] = "=ROUND(J{$line}*(F{$line}/100)+J{$line}*(G{$line}/100),2)";
// $data[$key]['achievement_bonus'] = "=ROUND(J{$line}*(H{$line}/100)+J{$line}*(I{$line}/100),2)";
$data[$key]['commission'] = "=ROUND(L{$line}+M{$line},2)";
$data[$key]['commission'] = "=ROUND(L{$line}+M{$line}*N{$line} ,2)";
}
$data = array_merge($data,[$sum]);
@ -952,21 +1155,30 @@ class MarketPercentageController extends ThinkController
$value['company_profit'] = "0.00";
}
$data[$key]['coefficient'] = $this->coefficient[$value['pay_time']][$value['admin_id']]?$this->coefficient[$value['pay_time']][$value['admin_id']]:1;
$data[$key]['wait_commission'] =
number_format($value['wait_performance_commission'] + $value['wait_achievement_commission'], 2, '.', '');
number_format($value['wait_performance_commission'] + $value['wait_achievement_commission']*($this->coefficient[$value['pay_time']][$value['admin_id']]?$this->coefficient[$value['pay_time']][$value['admin_id']]:1), 2, '.', '');
$achievement_bonus = number_format($data[$key]['achievement_bonus'], 2, '.', '');
$data[$key]['commission'] = $data[$key]['performance_commission'] + $data[$key]['achievement_bonus'];
//绩效系数计算
$data[$key]['achievement_bonus'] = number_format($data[$key]['achievement_bonus'] * ($this->coefficient[$value['pay_time']][$value['admin_id']]?$this->coefficient[$value['pay_time']][$value['admin_id']]:1), 2, '.', '');
$data[$key]['commission'] = number_format($data[$key]['performance_commission'] + $data[$key]['achievement_bonus'], 2, '.', '');;
$data[$key]['extend_commission'] = $data[$key]['commission'] - $data[$key]['wait_commission'];
$sum['performance_revenue'] += $value['performance_revenue'];
$sum['appraisal_bonuses'] += $value['appraisal_bonuses'];
$data[$key]['achievement_bonus'] = $achievement_bonus;
$sum['company_profit'] += $value['company_profit'];
$sum['performance_commission'] += $value['performance_commission'];
$sum['achievement_bonus'] += $value ['achievement_bonus'];
$sum['achievement_bonus'] += $data[$key] ['achievement_bonus'];
$sum['commission'] += $data[$key]['commission'];
$sum['extend_commission'] += $data[$key]['extend_commission'] ;
$sum['wait_commission'] += $value['wait_performance_commission'] + $value['wait_achievemen t_commission'];
$sum['wait_commission'] += $data[$key]['wai t_commission'];
}
@ -993,6 +1205,7 @@ class MarketPercentageController extends ThinkController
'company_profit'=>'税后毛利',
'performance_commission' => '业绩提成',
'achievement_bonus' => '绩效考核奖金',
'coefficient'=>'绩效系数',
'commission' => '当月总提成',
'extend_commission' => '本月发放',
'wait_commission' => '本月未发',
@ -1053,51 +1266,6 @@ class MarketPercentageController extends ThinkController
}
}
// $group_config = M("auth_group_access access")
// ->field("market_percentage")
// ->join("left join sys_auth_group auth on access.group_id=auth.id")
// ->where(['uid'=>$_REQUEST['admin_id']])
// ->find();
// $group_config = json_decode($group_config['market_percentage'],true);
// $month = date("m",strtotime($_REQUEST['pay_time']));
// $yes = date("Y",strtotime($_REQUEST['pay_time']));
// if ($group_config['time'] == 1) {
// if ($month == '07') {
// $where = [$yes.'-'.'01',$yes.'-'.'02',$yes.'-'.'03'];
// if ($_REQUEST['all']) {
// $where = array_merge($where,[$yes.'-'.'04',$yes.'-'.'05',$yes.'-'.'06']);
// }
// } elseif($month == '10') {
// $where = [$yes.'-'.'04',$yes.'-'.'05',$yes.'-'.'06'];
// if ($_REQUEST['all']) {
// $where = array_merge($where,[$yes.'-'.'07',$yes.'-'.'08',$yes.'-'.'09']);
// }
// } elseif($month == '04') {
// $where = [($yes-1).'-'.'10',($yes-1).'-'.'11',($yes-1).'-'.'12'];
// if ($_REQUEST['all']) {
// $where = array_merge($where,[$yes.'-'.'01',$yes.'-'.'02',$yes.'-'.'03']);
// }
// } elseif($month == '01') {
// $where = [($yes-1).'-'.'07',($yes-1).'-'.'08',($yes-1).'-'.'09'];
// if ($_REQUEST['all']) {
// $where = array_merge($where,[$yes.'-'.'10',$yes.'-'.'11',$yes.'-'.'12']);
// }
// }
//
// } elseif($group_config['time'] == 2) {
// if ($month == '07') {
// $where = [$yes.'-'.'01',$yes.'-'.'02',$yes.'-'.'03',$yes.'-'.'04',$yes.'-'.'05',$yes.'-'.'06'];
// } elseif($month == '01') {
// $where = [($yes-1).'-'.'07',($yes-1).'-'.'08',($yes-1).'-'.'09',($yes-1).'-'.'10',($yes-1).'-'.'11',($yes-1).'-'.'12'];
// }
// } elseif($group_config['time'] == 3) {
// if ($month == '01') {
// $where = [($yes-1).'-'.'01',($yes-1).'-'.'02',($yes-1).'-'.'03',($yes-1).'-'.'04',($yes-1).'-'.'05',($yes-1).'-'.'06',
// ($yes-1).'-'.'07',($yes-1).'-'.'08',($yes-1).'-'.'09',($yes-1).'-'.'10',($yes-1).'-'.'11',($yes-1).'-'.'12'];
// }
// } else {
// $where = [date("Y-m",strtotime("last month",strtotime($_REQUEST['pay_time'])))];
// }
$save['status'] = 1;
$save['remark'] = '手动发放';
if ($_REQUEST['all']) {
@ -1150,12 +1318,12 @@ class MarketPercentageController extends ThinkController
->where(['group_id'=>['in','11,12,21']])
->select();
if ($admin_data) {
$map['admin_id'] = ['in',array_column($admin_data,'admin_id')];
$map['tab_market_altogether. admin_id'] = ['in',array_column($admin_data,'admin_id')];
}
$_REQUEST['pay_time']?$map['pay_time'] = $_REQUEST['pay_time']:'';
$_REQUEST['real_name']?$map['real_name'] = $_REQUEST['real_name']:'';
$_REQUEST['nickname']?$map['nickname'] = $_REQUEST['nickname']:'';
$_REQUEST['pay_time']?$map['tab_market_altogether. pay_time'] = $_REQUEST['pay_time']:'';
$_REQUEST['real_name']?$map['tab_market_altogether. real_name'] = $_REQUEST['real_name']:'';
$_REQUEST['nickname']?$map['tab_market_altogether.. nickname'] = $_REQUEST['nickname']:'';
$_REQUEST['level']?$map['level'] = $_REQUEST['level']:'';
@ -1172,7 +1340,7 @@ class MarketPercentageController extends ThinkController
}while ($date < date ( ' Y-m ' , strtotime ( " { $ end } " ) ) ) ;
if ($search_date) {
$map['pay_time'] = ['in', $search_date];
$map['tab_market_altogether. pay_time'] = ['in', $search_date];
}
} elseif (isset($_REQUEST['time_start'])) {
@ -1187,7 +1355,7 @@ class MarketPercentageController extends ThinkController
}while ($date < date ( ' Y-m ' , strtotime ( " { $ end } " ) ) ) ;
if ($search_date) {
$map['pay_time'] = ['in', $search_date];
$map['tab_market_altogether. pay_time'] = ['in', $search_date];
}
} elseif (isset($_REQUEST['time_end'])) {
@ -1202,51 +1370,62 @@ class MarketPercentageController extends ThinkController
}while ($date < date ( ' Y-m ' , strtotime ( " { $ end } " ) ) ) ;
if ($search_date) {
$map['pay_time'] = ['in', $search_date];
$map['tab_market_altogether. pay_time'] = ['in', $search_date];
}
}
if($_REQUEST['pay_time']) {
if (in_array($_REQUEST['pay_time'],$search_date)) {
$map['pay_time'] = $_REQUEST['pay_time'];
$map['tab_market_altogether. pay_time'] = $_REQUEST['pay_time'];
} elseif(isset($_REQUEST['time_start']) || isset($_REQUEST['time_end'])) {
$this->checkListOrCountAuthRestMap($map,[]);
$this->assign("list_data",[]);
$this->display("showbonuslist");
die();
} else {
$map['pay_time'] = $_REQUEST['pay_time'];
$map['tab_market_altogether. pay_time'] = $_REQUEST['pay_time'];
}
}
$data = M("market_altogether","tab_")
->field("max(pay_time) pay_time,real_name,admin_id,nickname,level,sum(pay_amount) pay_amount,sum(extend_commission) extend_commission,
sum(performance_commission) performance_commission,sum(achievement_bonus) achievement_bonus,
->field("max(tab_market_altogether. pay_time) pay_time,tab_market_altogether. real_name,tab_market_altogether. admin_id,tab_market_altogether. nickname,level,sum(pay_amount) pay_amount,sum(extend_commission) extend_commission,
sum(performance_commission) performance_commission,sum(achievement_bonus* IF(coefficient is not NULL, coefficient, 100)/100 ) achievement_bonus,
sum(wait_performance_commission)+sum(wait_achievement_commission) wait_amount,
sum(if(status > 0, wait_performance_commission, '0.00')) + sum(if(status > 0, wait_achievement_commission,'0.00')) wait_extend_commission,
sum(if(status = 0, wait_performance_commission, '0.00')) + sum(if(status = 0, wait_achievement_commission, '0.00')) wait_commission, remark,level ,status")
sum(if(status > 0, wait_performance_commission, '0.00')) + sum(if(status > 0, wait_achievement_commission,'0.00') * IF(coefficient is not NULL, coefficient, 100)/100 ) wait_extend_commission,
sum(if(status = 0, wait_performance_commission, '0.00')) + round( sum(if(status = 0, wait_achievement_commission,'0.00') * IF(coefficient is not NULL, coefficient, 100)/100),2 ) wait_commission, remark,status")
->where($map);
if ($_REQUEST['export']) {
$data = $data
->order("pay_time DESC,company_profit DESC")
->group("admin_id")
->select();
->join("left join tab_coefficient on tab_market_altogether.admin_id=tab_coefficient.admin_id and tab_coefficient.pay_time=tab_market_altogether.pay_time")
->order("tab_market_altogether.pay_time DESC,company_profit DESC")
->group("tab_market_altogether.admin_id,tab_market_altogether.pay_time")
->select(false);
} else {
$data = $data
// ->page($p, $row)
->order("pay_time DESC,company_profit DESC")
->group("admin_id")
->select();
->join("left join tab_coefficient on tab_market_altogether.admin_id=tab_coefficient.admin_id and tab_coefficient.pay_time=tab_market_altogether.pay_time")
->order("tab_market_altogether.pay_time DESC,company_profit DESC")
->group("tab_market_altogether.admin_id,tab_market_altogether.pay_time")
->select(false);
}
$data = M()->table("({$data})a")
->field("max(pay_time) pay_time,real_name,admin_id,nickname,level,sum(pay_amount) pay_amount,sum(extend_commission) extend_commission,
sum(performance_commission) performance_commission,sum(achievement_bonus) achievement_bonus,sum(wait_amount) wait_amount,
sum(wait_extend_commission) wait_extend_commission,sum(wait_commission) wait_commission,remark,status")
->group("admin_id")
->select();
// var_dump($data);die();
$sum = [];
$sum['pay_amount'] = 0;
$sum['extend_commission'] = 0;
$sum['wait_commission'] = 0;
foreach($data as $key => $value) {
// dump($value);
if ($value['level'] == 21) {
$data[$key]['level'] = '初级';
} else if ($value['level'] == 11) {
@ -1255,7 +1434,13 @@ class MarketPercentageController extends ThinkController
$data[$key]['level'] = '高级';
}
$data[$key]['commission'] = $data[$key]['performance_commission'] + $data[$key]['achievement_bonus'];
//绩效系数计算
// $data[$key]['achievement_bonus'] = $data[$key]['achievement_bonus'] * ($this->coefficient[$value['pay_time']][$value['admin_id']]?$this->coefficient[$value['pay_time']][$value['admin_id']]:1);
$data[$key]['commission'] = number_format($data[$key]['performance_commission'] + $data[$key]['achievement_bonus'], 2, '.', '');
// $data[$key]['wait_commission'] =
// number_format($value['wait_performance_commission'] + $value['wait_achievement_commission']*($this->coefficient[$value['pay_time']][$value['admin_id']]?$this->coefficient[$value['pay_time']][$value['admin_id']]:1), 2, '.', '');
$data[$key]['extend_commission'] = number_format($data[$key]['commission'] - $data[$key]['wait_commission'], 2, '.', '');
$data[$key]['pay_amount'] = number_format($data[$key]['pay_amount'] , 2, '.', '');
@ -1374,7 +1559,7 @@ class MarketPercentageController extends ThinkController
$this->ajaxReturn(['status'=>0,'info'=>'操作失败,id不能为空']);
}
$admin = $_SESSION['onethink_admin']['user_auth']['username'];
$market_check_detail = "市场部已确认({$admin}) < br > ".date("Y-m-d H:m :s",time());
$market_check_detail = "市场部已确认({$admin}) < br > ".date("Y-m-d H:i :s",time());
$is_save = M("market_altogether","tab_")
->where(['id'=>['in',$ids],'market_check'=>0])
@ -1397,7 +1582,7 @@ class MarketPercentageController extends ThinkController
}
$admin = $_SESSION['onethink_admin']['user_auth']['username'];
$finance_check_detail = "财务部已审批({$admin}) < br > ".date("Y-m-d H:m :s",time());
$finance_check_detail = "财务部已审批({$admin}) < br > ".date("Y-m-d H:i :s",time());
$is_save = M("market_altogether","tab_")
->where(['id'=>['in',$ids],'finance_check'=>0])