Merge branch 'release' of 8.136.139.249:wmtx/platform into feature/finance_payment_20210115

master
chenzhi 4 years ago
commit 2e2ff8e1d7

@ -67,6 +67,7 @@ class CompanyStatementOfflineController extends ThinkController
->alias("c")
->field("c.*,p.statement_num,p.verify_status")
->where($map)
->where(['p.verify_status'=>['neq',6]])
->join("tab_company_statement_pool as p ON c.pool_id = p.id")

@ -263,7 +263,7 @@ class CompanyStatementSetController extends Controller {
$statement_end_time = date("Y.m.d",$endtime);
foreach($cpList as $k=>$v){
$add_data=[];
$handleed_data = [];
//1.获取甲乙方信息
if($v['first_company_type'] == 1){
//甲方上游
@ -351,6 +351,22 @@ class CompanyStatementSetController extends Controller {
$game['statement_begin_time']=$statement_begin_time;
$game['statement_end_time']=$statement_end_time;
$game['statement_type']=0;
$RewardRecordRes = $this->getPromoteUserGameRewardRecordCp($add_data['company_id'],$statement_begin_time,$statement_end_time);
if (
($handleed_data[$v['id'].$statement_begin_time.$statement_end_time]['fine'] || $handleed_data[$v['id'].$statement_begin_time.$statement_end_time]['fine'] == '0')
|| ($handleed_data[$v['id'].$statement_begin_time.$statement_end_time]['reward'] || $handleed_data[$v['id'].$statement_begin_time.$statement_end_time]['reward'] == '0')
) {
$game['fine'] = 0;
$game['reward'] = 0;
} else {
$game['fine'] = $RewardRecordRes['fine']?$RewardRecordRes['fine']:0;
$game['reward'] = $RewardRecordRes['reward']?$RewardRecordRes['reward']:0;
$handleed_data[$v['id'].$statement_begin_time.$statement_end_time]['fine'] = (string)$RewardRecordRes['fine'];
$handleed_data[$v['id'].$statement_begin_time.$statement_end_time]['reward'] = (string)$RewardRecordRes['reward'];
}
$add_data['statement_info'][] = $game;
}
}else{
@ -710,6 +726,9 @@ class CompanyStatementSetController extends Controller {
if(!isset($v['game_list'])){continue;}
//获取多段比例
$game_ratio_list = D("CompanyGameRatio")->getPromoteCompanyGameRatio($add_data['company_id'],$v['game_ids'],$begintime,$endtime,$company_belong);
$handleed_data = [];
foreach ($game_ratio_list as $t_game_id => $t_game_ratio) {
$game =[];
$game['game_name'] =$v['game_list'][$t_game_id]['game_name'];
@ -774,6 +793,21 @@ class CompanyStatementSetController extends Controller {
$game['ratio']=$tratio;
}
$RewardRecordRes = $this->getPromoteUserGameRewardRecord($add_data['company_id'],$statement_begin_time,$statement_end_time);
if (
($handleed_data[$v['id'].$statement_begin_time.$statement_end_time]['fine'] || $handleed_data[$v['id'].$statement_begin_time.$statement_end_time]['fine'] == '0')
|| ($handleed_data[$v['id'].$statement_begin_time.$statement_end_time]['reward'] || $handleed_data[$v['id'].$statement_begin_time.$statement_end_time]['reward'] == '0')
) {
$game['fine'] = 0;
$game['reward'] = 0;
} else {
$game['fine'] = $RewardRecordRes['fine']?$RewardRecordRes['fine']:0;
$game['reward'] = $RewardRecordRes['reward']?$RewardRecordRes['reward']:0;
$handleed_data[$v['id'].$statement_begin_time.$statement_end_time]['fine'] = (string)$RewardRecordRes['fine'];
$handleed_data[$v['id'].$statement_begin_time.$statement_end_time]['reward'] = (string)$RewardRecordRes['reward'];
}
$game['sum_money']=round($game['pay_amount']*$tratio*(100-$fax_ratio)/(100*100),2);//结算金额=平台总额*(分成比例+补点比例)*(1-税费费率)
$add_data['statement_money'] += $game['sum_money'];
if ($game['pay_amount'] != '0') {
@ -826,6 +860,22 @@ class CompanyStatementSetController extends Controller {
}else{
$temp_game['ratio']=$tratio;
}
$RewardRecordRes = $this->getPromoteUserGameRewardRecord($add_data['company_id'],$temp_game['statement_begin_time'],$temp_game['statement_end_time']);
if (
($handleed_data[$v['id'].$statement_begin_time.$statement_end_time]['fine'] || $handleed_data[$v['id'].$statement_begin_time.$statement_end_time]['fine'] == '0')
|| ($handleed_data[$v['id'].$statement_begin_time.$statement_end_time]['reward'] || $handleed_data[$v['id'].$statement_begin_time.$statement_end_time]['reward'] == '0')
) {
$game['fine'] = 0;
$game['reward'] = 0;
} else {
$game['fine'] = $RewardRecordRes['fine']?$RewardRecordRes['fine']:0;
$game['reward'] = $RewardRecordRes['reward']?$RewardRecordRes['reward']:0;
$handleed_data[$v['id'].$statement_begin_time.$statement_end_time]['fine'] = (string)$RewardRecordRes['fine'];
$handleed_data[$v['id'].$statement_begin_time.$statement_end_time]['reward'] = (string)$RewardRecordRes['reward'];
}
$temp_game['sum_money']=round($temp_game['pay_amount']*$tratio*(100-$fax_ratio)/(100*100),2);//结算金额=平台总额*(分成比例+补点比例)*(1-税费费率)
$add_data['statement_money'] += $temp_game['sum_money'];
if ($temp_game['pay_amount'] != '0') {
@ -2081,6 +2131,41 @@ class CompanyStatementSetController extends Controller {
}
}
/**
* 获取上游游戏奖罚
*/
protected function getPromoteUserGameRewardRecordCp($cpmpamy_id,$begintime,$endtime)
{
$begintime = strtotime(str_replace('.','-',$begintime));
$endtime = strtotime(str_replace('.','-',$endtime))+86499;
//获取所有公司的奖罚
$rrmap = array(
"d.confirm_time" => ['between', [$begintime,$endtime]],
"d.company_type"=>1,
"d.company_id"=>$cpmpamy_id,
"d.settlement_type"=>2,
// "relation_game_id"=>$relation_game_id,
);
$rfres = M("RewardDetail","tab_")
->alias("d")
->field("
IFNULL(SUM(CASE WHEN type = 1 THEN amount ELSE 0 END),0) as reward,
IFNULL(SUM(CASE WHEN type = 2 THEN amount ELSE 0 END),0) as fine")
->join('tab_reward_record as r on d.record_id = r.id', 'LEFT')
->where($rrmap)
->group("company_id")
->find();
if(empty($rfres)){
return false;
}else{
return $rfres;
}
}
/**
* 获取公司奖罚
*/

@ -5654,6 +5654,7 @@ class ExportController extends Controller
$xlsCell = array(
array('uid','账号ID'),
array('nickname','管理员账号'),
array('real_name','真实姓名'),
array('group_name','角色类型'),
array('login','登录次数'),
array('last_login_time','最后登录时间'),
@ -5666,6 +5667,11 @@ class ExportController extends Controller
}else{
$map['nickname'] = array('like', '%'.(string)$nickname.'%');
}
if(isset($_REQUEST['real_name'])) {
$map['real_name'] = $_REQUEST['real_name'];
}
if(isset($_REQUEST['status'])){
$map['status'] = $_REQUEST['status'];
}

@ -14,6 +14,12 @@ class SocietyInfoController extends ThinkController
{
private $modelName = 'SocietyInfo';
private $admininfo = '';
private $level = [
1=>'S',
2=>'A',
3=>'B',
4=>'其他'
];
public function _initialize()
{
@ -32,6 +38,14 @@ class SocietyInfoController extends ThinkController
$map['create_account'] = $this->admininfo['username'];
}
if ($_REQUEST['text']) {
$map['_string'] = "province like '%{$_REQUEST['text']}%' or city like '%{$_REQUEST['text']}%'
or company_name like '%{$_REQUEST['text']}%' or register_capital like '%{$_REQUEST['text']}%' or functionary like '%{$_REQUEST['text']}%'
or phone like '%{$_REQUEST['text']}%' or wechat like '%{$_REQUEST['text']}%' or qq like '%{$_REQUEST['text']}%' or game_type like '%{$_REQUEST['text']}%'
or game_name like '%{$_REQUEST['text']}%' or join_platform like '%{$_REQUEST['text']}%' or promote_scale like '%{$_REQUEST['text']}%' or turnover= '{$_REQUEST['text']}'
or address like '%{$_REQUEST['text']}%' or league_info like '%{$_REQUEST['text']}%' or remark like '%{$_REQUEST['text']}%' or interface_person like '%{$_REQUEST['text']}%'";
}
$page = intval(I('get.p', 0));
$page = $page ? $page : 1; //默认显示第一页数据
$row = intval(I('row', 0));
@ -56,14 +70,17 @@ class SocietyInfoController extends ThinkController
if (I('time_gap', -1) == 0) {
$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("id desc");
$query = $model->where($map)->order("communication_time desc");
$count = $query->count();
if($is_export){
$parseData = $query->field("province, city, company_name, register_capital, functionary, phone, wechat, qq, game_type, game_name, join_platform, promote_scale, turnover, address, league_info, is_potential, remark, interface_person, create_time, communication_time, create_account")
$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")
->select();
foreach ($parseData as &$v) {
$v['sociaty_level'] = $this->level[$v['sociaty_level']];
if ($v['is_potential'] == 1) $v['is_potential'] = "是";
else $v['is_potential'] = "否";
$v['communication_time'] = date('Y-m-d H:i:s', $v['communication_time']);
@ -74,11 +91,12 @@ class SocietyInfoController extends ThinkController
}
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'url'=>U(CONTROLLER_NAME.'/'.ACTION_NAME, I('get.*')),'menu'=>"推广-公会信息-导出"]);
$head = ["省份", "城市", "公司", "注册资本", "负责人", "电话", "微信", "QQ", "游戏类型", "所做游戏",
"合作平台", "推广规模", "流水", "地址", "联盟信息", "是否为意向客户", "备注信息", "对接人", "录入时间", "最后沟通时间", "录入员"];
"合作平台", "推广规模", "公会等级", "流水", "地址", "联盟信息", "是否为意向客户", "备注信息", "对接人", "录入时间", "最后沟通时间", "录入员"];
$this->export($head, $parseData, "公会信息-".date('Ymd'));
return ;
} else {
$societyInfos = $model->where($map)->order("id desc")->field("*")->page($page,$row)->select();
$societyInfos = $model->where($map)->order("communication_time desc")->field("*")->page($page,$row)->select();
// dump($societyInfos);die();
}
//分页
@ -90,13 +108,31 @@ class SocietyInfoController extends ThinkController
$this->assign('_page', $page);
}
foreach ($societyInfos as &$v) {
if (time() - $v['communication_time'] > $gap * 86400)
foreach ($societyInfos as $k => &$v) {
$v['num'] = $k+1+intval((I('get.p', 0)?I('get.p', 0):1)-1)*$row;
$v['sociaty_level_str'] = $this->level[$v['sociaty_level']];
if (time() - $v['communication_time'] > $gap * 86400
&& $v['is_potential'] == 1
)
$v['is_gap_time'] = 1;
if($gap == 0 && $v['communication_time']!=$v['create_time']) {
$v['is_gap_time'] = 0;
}
}
$this->checkListOrCountAuthRestMap($map,[]);
$this->assign('timeset_check',$this->checkRule("Admin/SocietyInfo/timeset" ,array('in','1,2')));
if (IS_ROOT) {
$this->assign('timeset_check',true);
$this->assign('delset_check',true);
} else {
$this->assign('timeset_check',$this->checkRule("Admin/SocietyInfo/timeset" ,array('in','1,2')));
$this->assign('delset_check',$this->checkRule("Admin/SocietyInfo/delset" ,array('in','1,2')));
}
// $this->assign('time_gap', $config['value']);
$gameTypes = M('game_type', 'tab_')->field("id, type_name")->select();
@ -212,7 +248,6 @@ class SocietyInfoController extends ThinkController
}
$v['partner_info']['company_type'] = $v['partner_info']['company_type'] == 2 ? '个人' : '公司';
$contract_start_time = $v['partner_info']['contract_start_time'] ? time_format($v['partner_info']['contract_start_time'], 'Y/m/d') : '-';
if($v['partner_info']['contract_start_time']){
$contract_end_time = $v['partner_info']['contract_end_time'] ? date('Y/m/d', $v['partner_info']['contract_end_time']) : '永久';
@ -269,9 +304,24 @@ class SocietyInfoController extends ThinkController
if ($_POST) {
$save = I("post.");
if (empty($save['province'])) {
$this->error("省份为必填项");
}
if (empty($save['city'])) {
$this->error("城市为必填项");
}
if (empty($save['company_name'])) {
$this->error("公司为必填项");
}
if (empty($save['game_types'])) {
$this->error("游戏类型为必填项");
}
foreach ($save['game_types'] as $v) {
$save['game_type'] .= $v . "/";
}
$save['game_type'] = trim($save['game_type'], '/');
// dump($save['game_type']);die();
if ($save['province'] == "请选择省份") $save['province'] = '';
if ($save['city'] == "请选择城市") $save['city'] = '';
$save['create_time'] = time();
@ -301,6 +351,15 @@ class SocietyInfoController extends ThinkController
$save['province'] = '';
$save['city'] = '';
}
if (empty($save['city'])) {
$this->error("城市为必填项");
}
if (empty($save['company_name'])) {
$this->error("公司为必填项");
}
if (empty($save['game_type'])) {
$this->error("游戏类型为必填项");
}
$save['game_type'] = trim($save['game_type'], '/');
$save['communication_time'] = time();
@ -344,6 +403,35 @@ class SocietyInfoController extends ThinkController
}
}
//查看
public function view()
{
$model = M($this->modelName, 'tab_');
$id = intval(I('get.id', 0));
$map['id'] = $id;
$data = $model->find($id);
if (empty($data)) {
$this->error('数据异常', U('lists'));
}
$gameTypes = M('game_type', 'tab_')->field("id, type_name")->select();
$myGameTypes = explode('/', $data['game_type']);
foreach ($gameTypes as &$v) {
$v['check'] = 0;
foreach ($myGameTypes as $item) {
if ($item == $v['type_name']) {
$v['check'] = 1;
}
}
}
$this->assign("game_types", $gameTypes);
$this->assign('data', $data);
$this->meta_title = '编辑';
$this->display();
}
//删除
public function del()
{
@ -371,8 +459,40 @@ class SocietyInfoController extends ThinkController
$this->success('删除成功', U('lists'));
}
//批量删除
public function del_check() {
if (!empty($_POST['ids'])) {
if (!is_array($_POST['ids'])) {
$this->ajaxReturn(['status'=>0,'info'=>'参数异常']);
// $this->error('参数异常');
}
$id = implode(',', $_POST['ids']);
} else {
$id = intval(I('get.id', 0));
if ($id == 0) {
$this->ajaxReturn(['status'=>0,'info'=>'参数异常']);
// $this->error('参数异常');
}
}
$res = M($this->modelName, 'tab_')->delete($id);
if ($res === false) {
// $this->error('删除失败');
$this->ajaxReturn(['status'=>0,'info'=>'删除失败']);
}
addOperationLog(array(
"op_type"=>2,
"key"=>$id,
"url"=>U("Society/lists")
));
$this->ajaxReturn(['status'=>1,'info'=>'删除成功']);
}
// 导入
public function excelImport() {
header("Content-Type:text/html;charset=utf-8");
$upload = new \Think\Upload();// 实例化上传类
$upload->maxSize = 3145728 ;// 设置附件上传大小
@ -383,8 +503,10 @@ class SocietyInfoController extends ThinkController
$info = $upload->uploadOne($_FILES['excelData']);
$filename = './Uploads/'.$info['savepath'].$info['savename'];
$exts = $info['ext'];
if(!$info) {// 上传错误提示错误信息
$this->error($upload->getError());
$this->ajaxReturn(['msg'=>$upload->getError(),"status"=>0]);
// $this->error($upload->getError());
}
// 上传成功
$datas = $this->parseExcelIn($filename, $exts);
@ -399,68 +521,88 @@ class SocietyInfoController extends ThinkController
if ($flag == 0) continue;
if ($k == 1) continue;
$inserts[$k-2]['province'] = $v['A'] ?? '';
if (!$v['A']) {
$this->ajaxReturn(['msg'=>"省份不能为空".$k,"status"=>0]);
}
$inserts[$k-2]['city'] = $v['B'] ?? '';
if (!$v['B']) {
$this->ajaxReturn(['msg'=>"城市不能为空".$k,"status"=>0]);
}
$inserts[$k-2]['company_name'] = $v['C'] ?? '';
if (mb_strlen($inserts[$k-2]['company_name'], "utf-8") > 100) {
$this->error("公司名太长".$k);
$this->ajaxReturn(['msg'=>"公司名太长".$k,"status"=>0]);
}
if (!$inserts[$k-2]['company_name']) {
$this->error("公司不能为空".$k);
$this->ajaxReturn(['msg'=>"公司不能为空".$k,"status"=>0]);
}
$inserts[$k-2]['register_capital'] = $v['D'] ?? '';
if (strlen($inserts[$k-2]['register_capital']) > 50) {
$this->error("推荐人太长".$k);
$this->ajaxReturn(['msg'=>"推荐人太长".$k,"status"=>0]);
}
$inserts[$k-2]['functionary'] = $v['E'] ?? '';
if (strlen($inserts[$k-2]['functionary']) > 50) {
$this->error("负责人太长".$k);
$this->ajaxReturn(['msg'=>"负责人太长".$k,"status"=>0]);
}
$inserts[$k-2]['phone'] = $v['F'] ?? '';
if (strlen($inserts[$k-2]['phone']) > 50) {
$this->error("手机号太长".$k);
$this->ajaxReturn(['msg'=>"手机号太长".$k,"status"=>0]);
}
$inserts[$k-2]['wechat'] = $v['G'] ?? '';
if (strlen($inserts[$k-2]['wechat']) > 50) {
$this->error("微信号太长".$k);
$this->ajaxReturn(['msg'=>"微信号太长".$k,"status"=>0]);
}
$inserts[$k-2]['qq'] = $v['H'] ?? '';
if (strlen($inserts[$k-2]['qq']) > 50) {
$this->error("qq号太长".$k);
$this->ajaxReturn(['msg'=>"qq号太长".$k,"status"=>0]);
}
$inserts[$k-2]['game_type'] = $v['I'] ?? '';
$inserts[$k-2]['game_name'] = $v['J'] ?? '';
if (strlen($inserts[$k-2]['game_name']) > 50) {
$this->error("游戏名太长".$k);
$this->ajaxReturn(['msg'=>"游戏名太长".$k,"status"=>0]);
}
$inserts[$k-2]['join_platform'] = $v['K'] ?? '';
if (strlen($inserts[$k-2]['join_platform']) > 50) {
$this->error("合作平台太长".$k);
$this->ajaxReturn(['msg'=>"合作平台太长".$k,"status"=>0]);
}
$inserts[$k-2]['promote_scale'] = $v['L'] ?? '';
if (strlen($inserts[$k-2]['promote_scale']) > 50) {
$this->error("推广规模太长".$k);
$this->ajaxReturn(['msg'=>"推广规模太长".$k,"status"=>0]);
}
$inserts[$k-2]['turnover'] = $v['M'] ?? '';
if (strlen($inserts[$k-2]['turnover']) > 50) {
$this->error("流水太长".$k);
$this->ajaxReturn(['msg'=>"公会等级".$k,"status"=>0]);
}
$inserts[$k-2]['turnover'] = $v['N'] ?? '';
if (strlen($inserts[$k-2]['turnover']) > 50) {
$this->ajaxReturn(['msg'=>"流水太长".$k,"status"=>0]);
}
$inserts[$k-2]['address'] = $v['N'] ?? '';
$inserts[$k-2]['address'] = $v['O'] ?? '';
if (mb_strlen($inserts[$k-2]['address'], 'utf-8') > 100) {
$this->error("地址太长".$k);
$this->ajaxReturn(['msg'=>"地址太长".$k,"status"=>0]);
}
$inserts[$k-2]['league_info'] = $v['O'] ?? '';
$inserts[$k-2]['league_info'] = $v['P'] ?? '';
if (strlen($inserts[$k-2]['league_info']) > 100) {
$this->error("联盟信息太长".$k);
$this->ajaxReturn(['msg'=>"联盟信息太长".$k,"status"=>0]);
}
$inserts[$k-2]['is_potential'] = $v['P']=="是" ? 1 : 0;
$inserts[$k-2]['remark'] = $v['Q'] ?? '';
if ($v['Q']) {
$inserts[$k-2]['is_potential'] = ($v['Q']=="是" ? 1 : 0);
} else {
$inserts[$k-2]['is_potential'] = 1;
}
$inserts[$k-2]['remark'] = $v['R'] ?? '';
if (strlen($inserts[$k-2]['remark']) > 100) {
$this->error("备注太长".$k);
$this->ajaxReturn(['msg'=>"备注太长".$k,"status"=>0]);
}
$inserts[$k-2]['interface_person'] = $v['R'] ?? '';
$inserts[$k-2]['interface_person'] = $v['S'] ?? '';
if (strlen($inserts[$k-2]['interface_person']) > 50) {
$this->error("对接人太长".$k);
$this->ajaxReturn(['msg'=>"对接人太长".$k,"status"=>0]);
}
$inserts[$k-2]['create_time'] = time();
$inserts[$k-2]['update_time'] = time();
$inserts[$k-2]['communication_time'] = time();
@ -469,13 +611,14 @@ class SocietyInfoController extends ThinkController
$gameTypes = explode('/', $v['I']);
foreach ($gameTypes as $gameType) {
if (!M('game_type', 'tab_')->where(["type_name" => $gameType])->find()) {
$this->error("游戏类型有误:{$gameType}");
$this->ajaxReturn(['msg'=>"游戏类型有误:{$gameType}","status"=>0]);
return;
}
}
}
M('society_info', 'tab_')->addAll($inserts);
$this->success("导入成功");
$this->ajaxReturn(['msg'=>"导入成功","status"=>1]);
// $this->success("导入成功");
}
private function parseExcelIn($filename, $exts) {
@ -516,4 +659,32 @@ class SocietyInfoController extends ThinkController
return $data;
}
//模板导出
public function downloadSocial()
{
header("Content-type: text/html; charset=utf-8");
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
Vendor("PHPExcel.PHPExcel");
$objPHPExcel = new \PHPExcel();
$objReader = \PHPExcel_IOFactory::createReader('Excel2007');
//设置模板文件
$objPHPExcel = $objReader->load("Public/Admin/excel/social_template.xls");
$fileName = "公会信息模板";
ob_end_clean();//清除缓冲区,避免乱码
header('pragma:public');
header('Content-type:application/vnd.ms-excel;charset=utf-8;name="' . $fileName .'".xls');
header("Content-Disposition:attachment;filename={$fileName}.xls");//attachment新窗口打印inline本窗口打印
$objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output');
exit;
}
}

@ -10,6 +10,7 @@
namespace Admin\Controller;
use User\Api\UserApi as UserApi;
use function GuzzleHttp\Psr7\str;
use Base\Factory\BaseFactory;
/**
* 后台首页控制器
@ -1545,4 +1546,13 @@ class TimingController extends AdminController {
}
//离职定时器
public function timingleaveMarketMember() {
$instance = BaseFactory::getInstance();
$leavePercentageInstance = $instance->factoryClass("LeavePercentage");
$leavePercentageInstance->leaveTiming();
}
}

@ -31,6 +31,11 @@ class UserController extends AdminController
if (isset($_REQUEST['status'])) {
$map['status'] = $_REQUEST['status'];
}
if(isset($_REQUEST['real_name'])) {
$map['real_name'] = $_REQUEST['real_name'];
}
if (is_numeric($nickname)) {
$map['uid|nickname'] = array(intval($nickname), array('like', '%' . $nickname . '%'), '_multi' => true);
} else {
@ -389,6 +394,22 @@ class UserController extends AdminController
}
}
if (strtotime($_POST['apply_leave_time'])<time()) {
$this->error('申请离职时间不能早于当前时间!');
}
if (strtotime($_POST['leave_time'])<time()) {
$this->error('离职时间不能早于当前时间!');
}
if (strtotime($_POST['apply_leave_time'])>strtotime($_POST['leave_time'])) {
$this->error('申请离职时间不得晚于离职时间!');
}
if ((strtotime($_POST['apply_leave_time'])&&!strtotime($_POST['leave_time']))||!strtotime($_POST['apply_leave_time'])&&strtotime($_POST['leave_time'])) {
$this->error('申请离职时,申请离职时间与离职时间都必须填写!');
}
$group = M('auth_group', 'sys_')->where(['id' => I('auth')])->find();
if (is_null($group)) {
$this->error('角色类型不存在!');
@ -430,6 +451,8 @@ class UserController extends AdminController
$info['second_pwd'] = (empty($spwd) || $spwd == $oldspwd) ? $oldspwd : $spwd;
$info['email'] = $_POST['email'];
$info['mobile'] = isset($_POST['mobile']) ? $_POST['mobile'] : '';
$_POST['apply_leave_time'] ? ($info['apply_leave_time'] = strtotime($_POST['apply_leave_time'])):'';
$_POST['leave_time'] ? ($info['leave_time'] = strtotime($_POST['leave_time'])+86399):'';
if($_POST['work_status']) {
$info['work_status'] = $_POST['work_status'];
}
@ -463,6 +486,9 @@ class UserController extends AdminController
$map['id'] = $_GET['id'];
$Member = D('UcenterMember')->where($map)->find();
$Member['apply_leave_time']?($Member['apply_leave_time'] = date("Y-m-d",$Member['apply_leave_time'])):($Member['apply_leave_time']='');
$Member['leave_time']?($Member['leave_time'] = date("Y-m-d",$Member['leave_time'])):($Member['leave_time']='');
$data = D('Member')->where(array('uid' => $_GET['id']))->find();
$au = D('AuthGroupAccess')->where(array('uid' => $_GET['id']))->find();

@ -86,7 +86,7 @@ class ModelModel extends Model{
return empty($fields) ? '' : json_encode($fields);
}
protected function getAttribute($fields) {
protected function getAttribute($fields="") {
return empty($fields) ? '' : implode(',', $fields);
}

@ -0,0 +1,690 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__STATIC__/jquery.form.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"charset="UTF-8"></script>
<script src="__STATIC__/juicer-min.js" type="text/javascript"></script>
<script src="__STATIC__/table2excel.js"></script>
</head>
<style>
html {
min-width:100%;
}
body {
padding: 0px 10px 150px 10px;
/* width: 960px; */
margin: auto;
}
/* .tabcon1711 table{
width: 480px;
} */
table{
margin: auto;
}
tr{
border-bottom: dotted 1px #c7c7c7;
}
.hidebox{
display: none;
}
.r{
width: 300px;
}
.l{
width: 180px;
}
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;
height: 35px;
height: 28px;
border-radius: 3px;
font-size: 12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height: 35px;
line-height: 28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height: 26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height: 26px;
line-height: 26px;
font-size: 12px;
}
.select2-results__option[aria-selected] {
font-size: 12px;
}
.input-list, .i_list {
float: left;
margin: 0;
}
</style>
<body>
<!-- <div style="width: 100%;line-height: 100px;font-size: 25px;font-weight: 600;text-align: center;">
海南万盟天下科技有限公司
</div> -->
<div class="data_list box_mt" style="margin-top: 10px;">
<div class="">
<form id="form" method="post" class="form-horizontal" action="{:U('editCompanyStatementPoolPc')}" enctype="multipart/form-data" target="rfFrame">
<table id="exporttable">
<!-- 表头 -->
<thead>
<tr>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">合作公司</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">平台</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">结算日期</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">产品</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">平台流水</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">未结算平台流水</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">退款</th>
<th colspan=2 style="border-right: solid 1px #b6cad2;">分成比例</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">渠道费率</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">税费费率</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">合作方待结算分成</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">违规罚款</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">奖励</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">其他扣款</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">周期结算金额</th>
<!-- <th rowspan="2" style="border-right: solid 1px #b6cad2;">周结算金额</th>-->
<th rowspan="2" style="border-right: solid 1px #b6cad2;">合作待结算金额</th>
<th rowspan=2 style="border-right: solid 1px #b6cad2;">是否结算</th>
<th rowspan=2 style="border-right: solid 1px #b6cad2;">是否支付宝打款</th>
<th colspan=3 style="border-right: solid 1px #b6cad2;">账户信息</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">备注</th>
<if condition="!$is_export">
<th rowspan="2" style="border-right: solid 1px #b6cad2;">操作</th>
</if>
</tr>
<tr>
<th style="border-right: solid 1px #b6cad2;min-width: 50px;">合作方</th>
<th style="min-width: 50px;">我方</th>
<th style="border-right: solid 1px #b6cad2;min-width: 50px;">户名</th>
<th style="border-right: solid 1px #b6cad2;min-width: 50px;">账号</th>
<th style="min-width: 50px;">开户行</th>
</tr>
</thead>
<tbody id="statementShow">
<foreach name="data" item="com">
<tr>
<td rowspan="{$com.statement_count}">{$com.company_name}</td>
<td rowspan="{$com.statement_count}">{$com.matche_platform}</td>
<!-- <td rowspan="{$com.statement_count}">{$com.statement_begin_time} ~ {$com.statement_end_time}</td> -->
<td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['time']}</td>
<!-- <td>{$com['statement_info'][0]['statement_begin_time']}-{$com['statement_info'][0]['statement_end_time']}</td>-->
<td>{$com['statement_info'][0]['game_name']}</td>
<td class="pay_amount">{$com['statement_info'][0]['pay_amount']}</td>
<td>{$com['statement_info'][0]['pay_amount']}</td>
<td >
<!-- {$com['statement_info'][0]['refund']|default=0}-->
<if condition="($com.is_reward_fine_split eq 0)">
<input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]">
<else/>
0
</if>
</td>
<td>
{$com['statement_info'][0]['ratio']|showNumPercent}
<if condition="($com.is_reward_fine_split eq 0)">
<input class="ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="ratio[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]" value="{$com['statement_info'][0]['ratio']}" style="width: 25px;display: none">
</if>
</td>
<td>{$com['statement_info'][0]['company_ratio']|showNumPercent}</td>
<td>{$com['statement_info'][0]['promote_ratio']|showNumPercent}</td>
<td>
{$com['statement_info'][0]['fax_ratio']|showNumPercent}
<if condition="($com.is_reward_fine_split eq 0)">
<input class="fax_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="fax_ratio[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]" value="{$com['statement_info'][0]['fax_ratio']}" style="width: 25px;display: none">
</if>
</td>
<td>
<span class="sum_money_span">{$com['statement_info'][0]['d_statement_money']}</span>
<input class="sum_money" name="sum_money[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]" value="{$com['statement_info'][0]['d_statement_money']}" style="width: 20px;display: none">
<input class="st" name="st[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]" value="{$com['st']}" style="width: 20px;display: none">
</td>
<td rowspan="{$com['statement_info'][0]['row']}">{$com['fine']-0}</td>
<td rowspan="{$com['statement_info'][0]['row']}">{$com['reward']-0}</td>
<td rowspan="{$com['statement_info'][0]['row']}">
<if condition="($com.is_reward_fine_split eq 0)">
<input class="withhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['withhold']|default=0}" style="width: 40px;" name="withhold[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]">
<input class="oldwithhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['withhold']|default=0}" style="width: 40px;display: none">
<else/>
0
</if>
</td>
<td rowspan="{$com['statement_info'][0]['row']}">
<span class="week_amount">{$com['statement_info'][0]['week_amount']}</span>
</td>
<!-- <td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['week_amount']}</td>-->
<td rowspan="{$com.statement_count}" class="statement_money">{$com['statement_money']}</td>
<td rowspan="{$com.statement_count}"><if condition="$com['st'] eq 0"><else /></if></td>
<td rowspan="{$com.statement_count}"><if condition="$com['is_payment'] eq 1"><else /></if></td>
<if condition="$com['is_payment'] eq 2">
<td rowspan="{$com.statement_count}">{$com.company_info.payee_name}</td>
<td rowspan="{$com.statement_count}">&nbsp;{$com.company_info.bank_account}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.opening_bank}</td>
</if>
<if condition="$com['is_payment'] eq 1">
<td rowspan="{$com.statement_count}">{$com.company_info.ali_user}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.ali_account}</td>
<td rowspan="{$com.statement_count}"></td>
</if>
<td rowspan="{$com.statement_count}"><textarea name="remark[{$com['id']}][{$com['st']}]">{$com.remark}</textarea></td>
<if condition="!$is_export">
<td rowspan="{$com.statement_count}">
<if condition="($com['st'] eq 1 ) AND ($pool_status lt 1) AND ($com.is_reward_fine_split eq 0)">
<a data-id="{$com['id']}" class='butn no_statement' style="cursor:pointer">不结算</a>
</if>
<if condition="($pool_status lt 1) AND ($com.is_reward_fine_split eq 0)">
<a data-id="{$com['id']}" data-st="{$com['st']}" class='butn split_RewardOrFail' style="cursor:pointer">奖惩分离</a>
</if>
</td>
</if>
</tr>
<foreach name="com.statement_info" item="it" key="k">
<if condition="$k neq 0">
<tr>
<!-- <td>{$it['statement_begin_time']}-{$it['statement_end_time']}</td>-->
<notempty name="it['time']">
<td rowspan="{$it['row']}">{$it['time']}</td>
</notempty>
<td>{$it['game_name']}</td>
<td><span class="pay_amount">{$it['pay_amount']}</span></td>
<td>{$it['pay_amount']}</td>
<td>
<if condition="($com.is_reward_fine_split eq 0)">
<input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$it['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]">
<else/>
0
</if>
</td>
<td>
{$it['ratio']|showNumPercent}
<if condition="($com.is_reward_fine_split eq 0)">
<input class="ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="ratio[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]" value="{$it['ratio']}" style="width: 25px;display: none">
</if>
</td>
<td>{$it['company_ratio']|showNumPercent}</td>
<td>{$it['promote_ratio']|showNumPercent}</td>
<td>
{$it['fax_ratio']|showNumPercent}
<if condition="($com.is_reward_fine_split eq 0)">
<input class="fax_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="fax_ratio[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]" value="{$it['fax_ratio']}" style="width: 25px;display: none">
</if>
</td>
<td>
<span class="sum_money_span">{$it['d_statement_money']}</span>
<input class="sum_money" name="sum_money[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]" value="{$it['d_statement_money']}" style="width: 20px;display: none">
<input class="st" name="st[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]" value="{$com['st']}" style="width: 20px;display: none">
</td>
<notempty name="it['time']">
<td rowspan="{$it['row']}">{$it['fine']-0}</td>
<td rowspan="{$it['row']}">{$it['reward']-0}</td>
<td>
<if condition="($com.is_reward_fine_split eq 0)">
<input class="withhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$it['withhold']|default=0}" style="width: 40px;" name="withhold[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]">
<input class="oldwithhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$it['withhold']|default=0}" style="width: 40px;display: none">
<else/>
0
</if>
</td>
<td rowspan="{$it['row']}"><span class="week_amount">{$it['week_amount']}</span></td>
</notempty>
</tr>
</if>
</foreach>
</foreach>
<tr>
<td colspan=4 >合计:</td>
<td>{$count.platform_amount}</td>
<td>{$count.platform_amount2}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>{$count.d_statement_money}</td>
<td>{$count.fine}</td>
<td>{$count.reward}</td>
<td></td>
<td class="count_sum_money">{$count.statement_money}</td>
<td class="count_sum_money">{$count.statement_money}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<if condition="!$is_export">
<td></td>
</if>
</tr>
<if condition="$is_export">
<tr>
<td ></td>
<td>
<if condition="$pool_data.verify_status eq -3 ">
<div style="line-height: 2;color: red;">
{$pool_data.firstverify}
</div>
<else />
<div style="line-height: 2;">
{$pool_data.firstverify}
</div>
</if>
</td>
<td>
<if condition="$pool_data.verify_status eq -1 ">
<div style="line-height: 2;color: red;">
{$pool_data.verify}
</div>
<else />
<div style="line-height: 2;">
{$pool_data.verify}
</div>
</if>
</td>
<td>
<if condition="$pool_data.verify_status eq -2 ">
<div style="line-height: 2;color: red;">
{$pool_data.payment}
</div>
<else />
<div style="line-height: 2;">
{$pool_data.payment}
</div>
</if>
</td>
</tr>
</if>
</tbody>
</table>
<input type="hidden" name="id" value="{$_GET['id']}">
</form>
<div class="form-item cf" style="float: right;margin-top: 30px;margin-right: 30px;">
<button class="submit_btn" id="submit" style="margin-left:210px;">
保存
</button>
</div>
<iframe id="rfFrame" name="rfFrame" src="about:blank" style="display:none;"></iframe>
</div>
</div>
</body>
<script>
<if condition="$is_export">
$(function(){
$("#exporttable").table2excel({
filename: "{$title}.xls", // do include extension
preserveColors: false // set to true if you want background colors and font colors preserved
});
});
</if>
// $(".no_statement").on("click",function(){
// var id = $(this).data('id');
// $.ajax({
// type: "POST",
// url: "{:U('cancelStatement')}",
// dataType: 'json',
// async: false,
// data: {id:id},
// success:function(data){
// if(data.status==1){
// layer.msg("<font style='color:white'>" + data.info + "</font>");
// setTimeout(function(){
// window.location.reload();
// },1500);
// }else{
// layer.msg("<font style='color:white'>" + data.info + "</font>");
// return false;
// }
// }
// });
// })
var pool_ids = "{$_GET['id']}";
$(".split_RewardOrFail").on("click",function() {
var id = $(this).data('id');
var st = $(this).data('st');
layer.confirm("是否确认对该数据进行奖惩分离", {title: false}, function (index) {
$.ajax({
type: "POST",
url: "{:U('splitRewardOrFailData')}",
dataType: 'json',
async: false,
data: {id: id, st: st, pool_id: pool_ids},
success: function (data) {
if (data.status == 1) {
layer.msg("<font style='color:white'>" + data.msg + "</font>");
setTimeout(function () {
window.location.reload();
}, 1500);
} else {
layer.msg("<font style='color:white'>" + data.msg + "</font>");
return false;
}
}
});
});
});
$(".no_statement").on("click",function(){
var id = $(this).data('id');
saveForm(id);
});
var return_data = "";
function saveForm(id) {
var options = {
url:"{:U('editCompanyStatementPoolPc')}", //同action
type:'post',
beforeSend:function(xhr){
},
success:function(data)
{
return_data = data;
},
complete:function(data){
if(return_data.status==1){
$.ajax({
type: "POST",
url: "{:U('cancelStatement')}",
dataType: 'json',
async: false,
data: {id:id},
success:function(data){
if(data.status==1){
layer.msg("<font style='color:white'>" + data.info + "</font>");
setTimeout(function(){
window.location.reload();
},1500);
}else{
layer.msg("<font style='color:white'>" + data.info + "</font>");
return false;
}
}
});
return;
}else{
layer.msg("<font style='color:white'>" + 保存数据失败 + "</font>");
return false;
}
},
error: function(xhr,status,msg){
//alert("状态码"+status+"; "+msg)
layer.msg('玩命加载中..');
}
};
$("#form").ajaxSubmit(options);
}
$("#submit").click(function(){
var options = {
url:"{:U('editCompanyStatementPoolPc')}", //同action
type:'post',
beforeSend:function(xhr){
},
success:function(data)
{
return_data = data;
},
complete:function(data){
if(return_data.status==1){
layer.msg("<font style='color:white'>" + return_data.info + "</font>");
setTimeout(function(){
parent.location.reload();
},1500);
}else{
layer.msg("<font style='color:white'>" + return_data.info + "</font>");
return false;
}
},
error: function(xhr,status,msg){
//alert("状态码"+status+"; "+msg)
layer.msg('玩命加载中..');
}
};
$("#form").ajaxSubmit(options);
});
$(".refund").on("blur",function () {
caculate_sum_money(this);
changeStatementAmount(this);
changeSumAmount();
});
$(".withhold").on("blur",function () {
caculate_sum_money(this);
changeStatementAmount(this);
changeSumAmount();
});
$(".ratio").on("blur",function () {
caculate_sum_money(this);
changeStatementAmount(this);
changeSumAmount();
});
$(".increment_ratio").on("blur",function () {
caculate_sum_money(this);
changeStatementAmount(this);
changeSumAmount();
});
var withdraw_type = "{$withdraw_type}";
// 分成结算金额重算
function caculate_sum_money(_this) {
var pay_money = $(_this).parent().parent().find(".pay_amount").text();
var ratio = $(_this).parent().parent().find(".ratio").val();
//比例金额
if (!ratio || ratio < 0) {
ratio = 0;
$(_this).parent().parent().find(".ratio").val(ratio);
} else if (ratio > 100) {
ratio = 100;
$(_this).parent().parent().find(".ratio").val(ratio);
}
//退款
var refund = $(_this).parent().parent().find(".refund").val();
if (!refund || refund < 0) {
refund = 0;
$(_this).parent().parent().find(".refund").val(refund);
} else if(parseFloat(refund) > parseFloat(pay_money)) {
refund = pay_money;
$(_this).parent().parent().find(".refund").val(refund);
}
//退款
var withhold = $(_this).parent().parent().find(".withhold").val();
var oldwithhold = $(_this).parent().parent().find(".oldwithhold").val();
// console.log(withhold-oldwithhold);
if (!withhold ) {
withhold = 0;
$(_this).parent().parent().find(".withhold").val(withhold);
}
if (!oldwithhold ) {
oldwithhold = 0;
$(_this).parent().parent().find(".oldwithhold").val(oldwithhold);
}
// else if(parseFloat(withhold) > parseFloat(pay_money)) {
// withhold = pay_money;
// $(_this).parent().parent().find(".withhold").val(withhold);
// }
//补点
var increment_ratio = $(_this).parent().parent().find(".increment_ratio").val();
if (!increment_ratio || increment_ratio < 0) {
increment_ratio = 0;
$(_this).parent().parent().find(".increment_ratio").val(increment_ratio);
} else if(increment_ratio > 100) {
increment_ratio = 100;
$(_this).parent().parent().find(".increment_ratio").val(increment_ratio);
}
var week_amount_find = $(_this).parent().parent();
var old_amount = week_amount_find.find(".sum_money_span").text();
//扣款
pay_money = parseFloat(pay_money) - parseFloat(refund);
if (withdraw_type == 3) {
var value = parseFloat(pay_money)*(parseFloat(increment_ratio)/100);
} else {
var value = (parseFloat(pay_money)*(parseFloat(ratio)/100) + parseFloat(pay_money)*(parseFloat(increment_ratio)/100));
}
// var value = (parseFloat(pay_money)*(parseFloat(ratio)/100) + parseFloat(pay_money)*(parseFloat(increment_ratio)/100));
$(_this).parent().parent().find(".sum_money_span").text(value.toFixed(2));
$(_this).parent().parent().find(".sum_money").val(value.toFixed(2));
var this_amount = week_amount_find.find(".sum_money_span").text();
var week_amount = 0;
var i = 0;
for (;;) {
week_amount = week_amount_find.find(".week_amount").text();
i++;
// console.log(week_amount);
if (week_amount) {
break;
} else {
week_amount_find = week_amount_find.prev();
}
if (i>10) {
break;
}
}
var D_value = parseFloat(old_amount) - parseFloat(this_amount) + parseFloat(withhold-oldwithhold);
// console.log(D_value);
week_amount_find.find(".week_amount").text((parseFloat(week_amount) - D_value).toFixed(2));
$(_this).parent().parent().find(".oldwithhold").val(withhold)
}
//结算金额重算
function changeStatementAmount(_this) {
var _parent = $(_this).parent().parent();
var statement_amount = '';
var num = 0;
for (;;) {
statement_amount = _parent.find(".statement_money").text();
if (!statement_amount ) {
_parent = _parent.prev();
} else {
break;
}
num++;
// if (num>10) {
// break;
// }
}
var row = _parent.find(".statement_money").attr("rowspan");
var get_item = _parent;
var sum_amount = 0;
for (var i =0;i<parseInt(row);i++) {
var amount = get_item.find(".week_amount").text();
if (amount) {
sum_amount = parseFloat(sum_amount) + parseFloat(amount);
get_item = get_item.next();
} else {
get_item = get_item.next();
}
}
// console.log(sum_amount);
_parent.find(".statement_money").text(sum_amount.toFixed(2));
}
//结算金额合计重算
function changeSumAmount() {
var sum_amount = 0;
var st = 0;
$("#statementShow").find(".statement_money").each(function (key,val) {
st = $(val).data('st')
sum_amount = parseFloat(sum_amount) + parseFloat($(val).text());
});
$(".count_sum_money").text(sum_amount.toFixed(2));
}
</script>
</html>

@ -0,0 +1,687 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__STATIC__/jquery.form.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"charset="UTF-8"></script>
<script src="__STATIC__/juicer-min.js" type="text/javascript"></script>
<script src="__STATIC__/table2excel.js"></script>
</head>
<style>
html {
min-width:100%;
}
body {
padding: 0px 10px 150px 10px;
/* width: 960px; */
margin: auto;
}
/* .tabcon1711 table{
width: 480px;
} */
table{
margin: auto;
}
tr{
border-bottom: dotted 1px #c7c7c7;
}
.hidebox{
display: none;
}
.r{
width: 300px;
}
.l{
width: 180px;
}
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;
height: 35px;
height: 28px;
border-radius: 3px;
font-size: 12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height: 35px;
line-height: 28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height: 26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height: 26px;
line-height: 26px;
font-size: 12px;
}
.select2-results__option[aria-selected] {
font-size: 12px;
}
.input-list, .i_list {
float: left;
margin: 0;
}
</style>
<body>
<!-- <div style="width: 100%;line-height: 100px;font-size: 25px;font-weight: 600;text-align: center;">
海南万盟天下科技有限公司
</div> -->
<div class="data_list box_mt" style="margin-top: 10px;">
<div class="">
<form id="form" method="post" class="form-horizontal" action="{:U('editCompanyStatementPoolPc')}" enctype="multipart/form-data" target="rfFrame">
<table id="exporttable">
<!-- 表头 -->
<thead>
<tr>
<th>序号</th>
<th>公司名称</th>
<th>结算日期</th>
<th>合作产品名称</th>
<th>平台总额(元)</th>
<th>退款</th>
<th>下游内团分成比例</th>
<th>补点比例</th>
<th>税费费率</th>
<th>分成金额/元</th>
<th>罚款</th>
<th>奖励</th>
<th>其他扣款</th>
<th>周期结算金额</th>
<th>合计/元</th>
<th>对账人</th>
<!-- <th>结算日期</th>-->
<th>户名</th>
<th>帐号</th>
<th>开户行</th>
<th>是否支付宝打款</th>
<th>是否结算</th>
<th>备注</th>
<if condition="!$is_export">
<th>操作</th>
</if>
</tr>
</thead>
<tbody id="statementShow">
<foreach name="data" item="com">
<tr>
<td rowspan="{$com.statement_count}">{$key-0+1}</td>
<td rowspan="{$com.statement_count}">{$com.company_name}</td>
<td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['time']}</td>
<td>{$com['statement_info'][0]['game_name']}</td>
<td><span class="pay_amount">{$com['statement_info'][0]['pay_amount']}</span></td>
<td>
<if condition="($com.is_reward_fine_split eq 0)">
<input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]">
<else/>
0
</if>
</td>
<td>
{$com['statement_info'][0]['ratio']|showNumPercent}
<if condition="($com.is_reward_fine_split eq 0)">
<input class="ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="ratio[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]" value="{$com['statement_info'][0]['ratio']}" style="width: 25px;display: none">
</if>
</td>
<td>
{$com['statement_info'][0]['increment_ratio']|showNumPercent}
<if condition="($com.is_reward_fine_split eq 0)">
<input class="increment_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="increment_ratio[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]" value="{$com['statement_info'][0]['increment_ratio']}" style="width: 25px;display: none">
</if>
</td>
<td>
{$com['statement_info'][0]['fax_ratio']|showNumPercent}
<if condition="($com.is_reward_fine_split eq 0)">
<input class="fax_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="fax_ratio[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]" value="{$com['statement_info'][0]['fax_ratio']}" style="width: 25px;display: none">
</if>
</td>
<td>
<span class="sum_money_span">{$com['statement_info'][0]['d_statement_money']}</span>
<input class="sum_money" name="sum_money[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]" value="{$com['statement_info'][0]['d_statement_money']}" style="width: 20px;display: none">
<input class="st" name="st[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]" value="{$com['st']}" style="width: 20px;display: none">
</td>
<!-- <td rowspan="{$com.statement_count}">{$com['fine']-0}</td>-->
<!-- <td rowspan="{$com.statement_count}">{$com['reward']-0}</td>-->
<td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['fine']-0}</td>
<td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['reward']-0}</td>
<td rowspan="{$com['statement_info'][0]['row']}">
<if condition="($com.is_reward_fine_split eq 0)">
<input class="withhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['withhold']|default=0}" style="width: 40px;" name="withhold[{$com['id']}][{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['time']}]">
<input class="oldwithhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['withhold']|default=0}" style="width: 40px;display: none">
<else/>
0
</if>
</td>
<td rowspan="{$com['statement_info'][0]['row']}">
<span class="week_amount">{$com['statement_info'][0]['week_amount']}</span>
</td>
<td rowspan="{$com.statement_count}" class="statement_money">
{$com['statement_money']}
</td>
<td rowspan="{$com.statement_count}">{$com.settlement_contact}</td>
<!-- <td>{$com['statement_info'][0]['statement_begin_time']}-{$com['statement_info'][0]['statement_end_time']}</td>-->
<!-- <td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['time']}</td>-->
<if condition="$com['is_payment'] eq 2">
<td rowspan="{$com.statement_count}">{$com.company_info.payee_name}</td>
<td rowspan="{$com.statement_count}">&nbsp;{$com.company_info.bank_account}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.opening_bank}</td>
</if>
<if condition="$com['is_payment'] eq 1">
<td rowspan="{$com.statement_count}">{$com.company_info.ali_user}</td>
<td rowspan="{$com.statement_count}">{$com.company_info.ali_account}</td>
<td rowspan="{$com.statement_count}"></td>
</if>
<td rowspan="{$com.statement_count}"><if condition="$com['is_payment'] eq 1"><else /></if></td>
<td rowspan="{$com.statement_count}"><if condition="$com['st'] eq 0"><else /></if></td>
<td rowspan="{$com.statement_count}"><textarea name="remark[{$com['id']}][{$com['st']}]">{$com.remark}</textarea></td>
<if condition="!$is_export">
<td rowspan="{$com.statement_count}">
<if condition="($com['st'] eq 1 ) AND ($pool_status lt 1) AND ($com.is_reward_fine_split eq 0)">
<a data-id="{$com['id']}" class='butn no_statement' style="cursor:pointer">不结算</a>
</if>
<if condition="($pool_status lt 1) AND ($com.is_reward_fine_split eq 0)">
<a data-id="{$com['id']}" data-st="{$com['st']}" class='butn split_RewardOrFail' style="cursor:pointer">奖惩分离</a>
</if>
</td>
</if>
</tr>
<foreach name="com.statement_info" item="it" key="k">
<if condition="$k neq 0">
<tr>
<notempty name="it['time']">
<td rowspan="{$it['row']}">{$it['time']}</td>
</notempty>
<td>{$it['game_name']}</td>
<td><span class="pay_amount">{$it['pay_amount']}</span></td>
<td>
<if condition="($com.is_reward_fine_split eq 0)">
<input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$it['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]">
<else/>
0
</if>
</td>
<td>
{$it['ratio']|showNumPercent}
<if condition="($com.is_reward_fine_split eq 0)">
<input class="ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="ratio[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]" value="{$it['ratio']}" style="width: 25px;display: none">
</if>
</td>
<td>
{$it['increment_ratio']|showNumPercent}
<if condition="($com.is_reward_fine_split eq 0)">
<input class="increment_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="increment_ratio[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]" value="{$it['increment_ratio']}" style="width: 25px;display: none">
</if>
</td>
<td>
{$it['fax_ratio']|showNumPercent}
<if condition="($com.is_reward_fine_split eq 0)">
<input class="fax_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="fax_ratio[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]" value="{$it['fax_ratio']}" style="width: 25px;display: none">
</if>
</td>
<td>
<span class="sum_money_span">{$it['d_statement_money']}</span>
<input class="sum_money" name="sum_money[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]" value="{$it['d_statement_money']}" style="width: 20px;display: none">
<input class="st" name="st[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]" value="{$com['st']}" style="width: 20px;display: none">
</td>
<!-- <td>{$it['statement_begin_time']}-{$it['statement_end_time']}</td>-->
<notempty name="it['time']">
<td rowspan="{$it['row']}">{$it['fine']-0}</td>
<td rowspan="{$it['row']}">{$it['reward']-0}</td>
<td>
<if condition="($com.is_reward_fine_split eq 0)">
<input class="withhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$it['withhold']|default=0}" style="width: 40px;" name="withhold[{$com['id']}][{$it['game_name']}{$it['time']?$it['time']:$com['statement_info'][0]['time']}]">
<input class="oldwithhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$it['withhold']|default=0}" style="width: 40px;display: none">
<else/>
0
</if>
</td>
<td rowspan="{$it['row']}"><span class="week_amount">{$it['week_amount']}</span></td>
</notempty>
</tr>
</if>
</foreach>
</foreach>
<tr>
<td colspan=3 >合计:</td>
<td></td>
<td>{$count.platform_amount}</td>
<td></td>
<td></td>
<td></td>
<td>{$count.d_statement_money}</td>
<td></td>
<td>{$count.fine}</td>
<td>{$count.reward}</td>
<td></td>
<td class="count_sum_money">{$count.statement_money}</td>
<td class="count_sum_money">{$count.statement_money}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<if condition="!$is_export">
<td></td>
</if>
</tr>
<if condition="$is_export">
<tr>
<td ></td>
<td>
<if condition="$pool_data.verify_status eq -3 ">
<div style="line-height: 2;color: red;">
{$pool_data.firstverify}
</div>
<else />
<div style="line-height: 2;">
{$pool_data.firstverify}
</div>
</if>
</td>
<td>
<if condition="$pool_data.verify_status eq -1 ">
<div style="line-height: 2;color: red;">
{$pool_data.verify}
</div>
<else />
<div style="line-height: 2;">
{$pool_data.verify}
</div>
</if>
</td>
<td>
<if condition="$pool_data.verify_status eq -2 ">
<div style="line-height: 2;color: red;">
{$pool_data.payment}
</div>
<else />
<div style="line-height: 2;">
{$pool_data.payment}
</div>
</if>
</td>
</tr>
</if>
</tbody>
</table>
<input type="hidden" name="id" value="{$_GET['id']}">
</form>
<div class="form-item cf" style="float: right;margin-top: 30px;margin-right: 30px;">
<button class="submit_btn" id="submit" style="margin-left:210px;">
保存
</button>
</div>
<iframe id="rfFrame" name="rfFrame" src="about:blank" style="display:none;"></iframe>
</div>
</div>
</body>
<script>
<if condition="$is_export">
$(function(){
$("#exporttable").table2excel({
filename: "{$title}.xls", // do include extension
preserveColors: false // set to true if you want background colors and font colors preserved
});
});
</if>
// $(".no_statement").on("click",function(){
// var id = $(this).data('id');
// $.ajax({
// type: "POST",
// url: "{:U('cancelStatement')}",
// dataType: 'json',
// async: false,
// data: {id:id},
// success:function(data){
// if(data.status==1){
// layer.msg("<font style='color:white'>" + data.info + "</font>");
// setTimeout(function(){
// window.location.reload();
// },1500);
// }else{
// layer.msg("<font style='color:white'>" + data.info + "</font>");
// return false;
// }
// }
// });
// })
var pool_ids = "{$_GET['id']}";
$(".split_RewardOrFail").on("click",function() {
var id = $(this).data('id');
var st = $(this).data('st');
layer.confirm("是否确认对该数据进行奖惩分离", {title: false}, function (index) {
$.ajax({
type: "POST",
url: "{:U('splitRewardOrFailData')}",
dataType: 'json',
async: false,
data: {id: id, st: st, pool_id: pool_ids},
success: function (data) {
if (data.status == 1) {
layer.msg("<font style='color:white'>" + data.msg + "</font>");
setTimeout(function () {
window.location.reload();
}, 1500);
} else {
layer.msg("<font style='color:white'>" + data.msg + "</font>");
return false;
}
}
});
});
});
$(".no_statement").on("click",function(){
var id = $(this).data('id');
saveForm(id);
});
var return_data = "";
function saveForm(id) {
var options = {
url:"{:U('editCompanyStatementPoolPc')}", //同action
type:'post',
beforeSend:function(xhr){
},
success:function(data)
{
return_data = data;
},
complete:function(data){
if(return_data.status==1){
$.ajax({
type: "POST",
url: "{:U('cancelStatement')}",
dataType: 'json',
async: false,
data: {id:id},
success:function(data){
if(data.status==1){
layer.msg("<font style='color:white'>" + data.info + "</font>");
setTimeout(function(){
window.location.reload();
},1500);
}else{
layer.msg("<font style='color:white'>" + data.info + "</font>");
return false;
}
}
});
return;
}else{
layer.msg("<font style='color:white'>" + 保存数据失败 + "</font>");
return false;
}
},
error: function(xhr,status,msg){
//alert("状态码"+status+"; "+msg)
layer.msg('玩命加载中..');
}
};
$("#form").ajaxSubmit(options);
}
$("#submit").click(function(){
var options = {
url:"{:U('editCompanyStatementPoolPc')}", //同action
type:'post',
beforeSend:function(xhr){
},
success:function(data)
{
return_data = data;
},
complete:function(data){
if(return_data.status==1){
layer.msg("<font style='color:white'>" + return_data.info + "</font>");
setTimeout(function(){
parent.location.reload();
},1500);
}else{
layer.msg("<font style='color:white'>" + return_data.info + "</font>");
return false;
}
},
error: function(xhr,status,msg){
//alert("状态码"+status+"; "+msg)
layer.msg('玩命加载中..');
}
};
$("#form").ajaxSubmit(options);
});
$(".refund").on("blur",function () {
caculate_sum_money(this);
changeStatementAmount(this);
changeSumAmount();
});
$(".withhold").on("blur",function () {
caculate_sum_money(this);
changeStatementAmount(this);
changeSumAmount();
});
$(".ratio").on("blur",function () {
caculate_sum_money(this);
changeStatementAmount(this);
changeSumAmount();
});
$(".increment_ratio").on("blur",function () {
caculate_sum_money(this);
changeStatementAmount(this);
changeSumAmount();
});
var withdraw_type = "{$withdraw_type}";
// 分成结算金额重算
function caculate_sum_money(_this) {
var pay_money = $(_this).parent().parent().find(".pay_amount").text();
var ratio = $(_this).parent().parent().find(".ratio").val();
//比例金额
if (!ratio || ratio < 0) {
ratio = 0;
$(_this).parent().parent().find(".ratio").val(ratio);
} else if (ratio > 100) {
ratio = 100;
$(_this).parent().parent().find(".ratio").val(ratio);
}
//退款
var refund = $(_this).parent().parent().find(".refund").val();
if (!refund || refund < 0) {
refund = 0;
$(_this).parent().parent().find(".refund").val(refund);
} else if(parseFloat(refund) > parseFloat(pay_money)) {
refund = pay_money;
$(_this).parent().parent().find(".refund").val(refund);
}
//退款
var withhold = $(_this).parent().parent().find(".withhold").val();
var oldwithhold = $(_this).parent().parent().find(".oldwithhold").val();
// console.log(withhold-oldwithhold);
if (!withhold ) {
withhold = 0;
$(_this).parent().parent().find(".withhold").val(withhold);
}
if (!oldwithhold ) {
oldwithhold = 0;
$(_this).parent().parent().find(".oldwithhold").val(oldwithhold);
}
// else if(parseFloat(withhold) > parseFloat(pay_money)) {
// withhold = pay_money;
// $(_this).parent().parent().find(".withhold").val(withhold);
// }
//补点
var increment_ratio = $(_this).parent().parent().find(".increment_ratio").val();
if (!increment_ratio || increment_ratio < 0) {
increment_ratio = 0;
$(_this).parent().parent().find(".increment_ratio").val(increment_ratio);
} else if(increment_ratio > 100) {
increment_ratio = 100;
$(_this).parent().parent().find(".increment_ratio").val(increment_ratio);
}
var week_amount_find = $(_this).parent().parent();
var old_amount = week_amount_find.find(".sum_money_span").text();
//扣款
pay_money = parseFloat(pay_money) - parseFloat(refund);
// var value = (parseFloat(pay_money)*(parseFloat(ratio)/100) + parseFloat(pay_money)*(parseFloat(increment_ratio)/100));
if (withdraw_type == 3) {
var value = parseFloat(pay_money)*(parseFloat(increment_ratio)/100);
} else {
var value = (parseFloat(pay_money)*(parseFloat(ratio)/100) + parseFloat(pay_money)*(parseFloat(increment_ratio)/100));
}
// var value = parseFloat(pay_money);
// console.log(value);
$(_this).parent().parent().find(".sum_money_span").text(value.toFixed(2));
$(_this).parent().parent().find(".sum_money").val(value.toFixed(2));
var this_amount = week_amount_find.find(".sum_money_span").text();
var week_amount = 0;
var i = 0;
for (;;) {
week_amount = week_amount_find.find(".week_amount").text();
i++;
// console.log(week_amount);
if (week_amount) {
break;
} else {
week_amount_find = week_amount_find.prev();
}
// if (i>10) {
// break;
// }
}
// console.log(old_amount);
// console.log(this_amount);
// console.log(week_amount);
var D_value = parseFloat(old_amount) - parseFloat(this_amount) + parseFloat(withhold-oldwithhold);
// console.log(D_value);
week_amount_find.find(".week_amount").text((parseFloat(week_amount) - D_value).toFixed(2));
$(_this).parent().parent().find(".oldwithhold").val(withhold)
}
//结算金额重算
function changeStatementAmount(_this) {
var _parent = $(_this).parent().parent();
var statement_amount = '';
var num = 0;
for (;;) {
statement_amount = _parent.find(".statement_money").text();
if (!statement_amount ) {
_parent = _parent.prev();
} else {
break;
}
num++;
// if (num>10) {
// break;
// }
}
var row = _parent.find(".statement_money").attr("rowspan");
var get_item = _parent;
var sum_amount = 0;
for (var i =0;i<parseInt(row);i++) {
var amount = get_item.find(".week_amount").text();
if (amount) {
sum_amount = parseFloat(sum_amount) + parseFloat(amount);
get_item = get_item.next();
} else {
get_item = get_item.next();
}
}
// console.log(sum_amount);
_parent.find(".statement_money").text(sum_amount.toFixed(2));
}
//结算金额合计重算
function changeSumAmount() {
var sum_amount = 0;
var st = 0;
$("#statementShow").find(".statement_money").each(function (key,val) {
st = $(val).data('st')
sum_amount = parseFloat(sum_amount) + parseFloat($(val).text());
});
$(".count_sum_money").text(sum_amount.toFixed(2));
}
</script>
</html>

@ -166,19 +166,42 @@
<td rowspan="{$com['statement_info'][0]['time_row']}">{$com['statement_info'][0]['time']}</td>
<!-- <td>{$com['statement_info'][0]['game_list'][0]['statement_begin_time']}-{$com['statement_info'][0]['game_list'][0]['statement_end_time']}</td>-->
<td><span class="pay_amount">{$com['statement_info'][0]['game_list'][0]['pay_amount']}</span></td>
<td><input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['game_list'][0]['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$com['statement_info'][0]['game_list'][0]['game_name']}{$com['statement_info'][0]['time']}{$com['statement_info'][0]['account']}]"></td>
<td><input class="ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="ratio[{$com['id']}][{$com['statement_info'][0]['game_list'][0]['game_name']}{$com['statement_info'][0]['time']}{$com['statement_info'][0]['account']}]" value="{$com['statement_info'][0]['game_list'][0]['ratio']}" style="width: 25px;">%</td>
<td><input class="increment_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="increment_ratio[{$com['id']}][{$com['statement_info'][0]['game_list'][0]['game_name']}{$com['statement_info'][0]['time']}{$com['statement_info'][0]['account']}]" value="{$com['statement_info'][0]['game_list'][0]['increment_ratio']}" style="width: 25px;">%</td>
<td>
<if condition="($com.is_reward_fine_split eq 0)">
<input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['game_list'][0]['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$com['statement_info'][0]['game_list'][0]['game_name']}{$com['statement_info'][0]['time']}{$com['statement_info'][0]['account']}]">
<else/>
0
</if>
</td>
<td>
<if condition="($com.is_reward_fine_split eq 0)">
<input class="ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="ratio[{$com['id']}][{$com['statement_info'][0]['game_list'][0]['game_name']}{$com['statement_info'][0]['time']}{$com['statement_info'][0]['account']}]" value="{$com['statement_info'][0]['game_list'][0]['ratio']}" style="width: 25px;">%
<else/>
0%
</if>
</td>
<td>
<if condition="($com.is_reward_fine_split eq 0)">
<input class="increment_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="increment_ratio[{$com['id']}][{$com['statement_info'][0]['game_list'][0]['game_name']}{$com['statement_info'][0]['time']}{$com['statement_info'][0]['account']}]" value="{$com['statement_info'][0]['game_list'][0]['increment_ratio']}" style="width: 25px;">%
<else/>
0%
</if>
</td>
<td><span class="sum_money_span">{$com['statement_info'][0]['game_list'][0]['sum_money']}</span>
<input class="sum_money" name="sum_money[{$com['id']}][{$com['statement_info'][0]['game_list'][0]['game_name']}{$com['statement_info'][0]['time']}{$com['statement_info'][0]['account']}]" value="{$com['statement_info'][0]['game_list'][0]['sum_money']}" style="width: 20px;display: none">
<input class="st" name="st[{$com['id']}][{$com['statement_info'][0]['game_list'][0]['game_name']}{$com['statement_info'][0]['time']}{$com['statement_info'][0]['account']}]" value="{$com['st']}" style="width: 20px;display: none"></td>
<input class="st" name="st[{$com['id']}][{$com['statement_info'][0]['game_list'][0]['game_name']}{$com['statement_info'][0]['time']}{$com['statement_info'][0]['account']}]" value="{$com['st']}" style="width: 20px;display: none">
</td>
<!-- <td rowspan="{$com['statement_info'][0]['time_row']}">{$com['reward']}</td>-->
<!-- <td rowspan="{$com['statement_info'][0]['time_row']}">{$com['fine']}</td>-->
<td rowspan="{$com['statement_info'][0]['time_row']}">{$com['statement_info'][0]['reward']||default="0"}</td>
<td rowspan="{$com['statement_info'][0]['time_row']}">{$com['statement_info'][0]['fine']||default="0"}</td>
<td rowspan="{$com['statement_info'][0]['time_row']}">{$com['statement_info'][0]['game_list'][0]['reward']||default="0"}</td>
<td rowspan="{$com['statement_info'][0]['time_row']}">{$com['statement_info'][0]['game_list'][0]['fine']||default="0"}</td>
<td rowspan="{$com['statement_info'][0]['time_row']}">
<input class="withhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['withhold_amount']|default=0}" style="width: 40px;" name="withhold[{$com['id']}][{$com['statement_info'][0]['game_list'][0]['game_name']}{$com['statement_info'][0]['time']}{$com['statement_info'][0]['account']}][{$com['statement_info'][0]['game_list'][0]['statement_begin_time']}]">
<input class="oldwithhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['withhold_amount']|default=0}" style="width: 40px;display: none" >
<if condition="($com.is_reward_fine_split eq 0)">
<input class="withhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['withhold_amount']|default=0}" style="width: 40px;" name="withhold[{$com['id']}][{$com['statement_info'][0]['game_list'][0]['game_name']}{$com['statement_info'][0]['time']}{$com['statement_info'][0]['account']}][{$com['statement_info'][0]['game_list'][0]['statement_begin_time']}]">
<input class="oldwithhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$com['statement_info'][0]['withhold_amount']|default=0}" style="width: 40px;display: none" >
<else/>
0
</if>
</td>
<td rowspan="{$com['statement_info'][0]['time_row']}"><span class="week_amount">{$com['statement_info'][0]['week_amount']}</span><input style="display: none" class="week_amount_input" value="{$com['statement_info'][0]['week_amount']}"></td>
<td rowspan="{$com.row}" data-st="{$com['st']}" class="statement_money">{$com['statement_money']}</td>
@ -215,9 +238,12 @@
<if condition="!$is_export">
<td rowspan="{$com.row}">
<if condition="($com['st'] eq 1 ) AND ($pool_status lt 1)">
<if condition="($com['st'] eq 1 ) AND ($pool_status lt 1) AND ($com.is_reward_fine_split eq 0)">
<a data-id="{$com['id']}" class='butn no_statement' style="cursor:pointer">不结算</a>
</if>
<if condition="($pool_status lt 1) AND ($com.is_reward_fine_split eq 0)">
<a data-id="{$com['id']}" data-st="{$com['st']}" class='butn split_RewardOrFail' style="cursor:pointer">奖惩分离</a>
</if>
</td>
</if>
@ -231,9 +257,27 @@
<td>{$game['game_type_name']}</td>
<!-- <td>{$game['statement_begin_time']}-{$game['statement_end_time']}</td>-->
<td><span class="pay_amount">{$game['pay_amount']}</span></td>
<td><input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$game['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$game['game_name']}{$com['statement_info'][0]['time']}{$com['statement_info'][0]['account']}]"></td>
<td><input class="ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="ratio[{$com['id']}][{$game['game_name']}{$com['statement_info'][0]['time']}{$com['statement_info'][0]['account']}]" value="{$game['ratio']}" style="width: 25px;">%</td>
<td><input class="increment_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="increment_ratio[{$com['id']}][{$game['game_name']}{$com['statement_info'][0]['time']}{$com['statement_info'][0]['account']}]" value="{$game['increment_ratio']}" style="width: 25px;">%</td>
<td>
<if condition="($com.is_reward_fine_split eq 0)">
<input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$game['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$game['game_name']}{$com['statement_info'][0]['time']}{$com['statement_info'][0]['account']}]">
<else/>
0
</if>
</td>
<td>
<if condition="($com.is_reward_fine_split eq 0)">
<input class="ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="ratio[{$com['id']}][{$game['game_name']}{$com['statement_info'][0]['time']}{$com['statement_info'][0]['account']}]" value="{$game['ratio']}" style="width: 25px;">%
<else/>
0%
</if>
</td>
<td>
<if condition="($com.is_reward_fine_split eq 0)">
<input class="increment_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="increment_ratio[{$com['id']}][{$game['game_name']}{$com['statement_info'][0]['time']}{$com['statement_info'][0]['account']}]" value="{$game['increment_ratio']}" style="width: 25px;">%
<else/>
0%
</if>
</td>
<td>
<span class="sum_money_span">{$game['sum_money']}</span><input class="sum_money" name="sum_money[{$com['id']}][{$game['game_name']}{$com['statement_info'][0]['time']}{$com['statement_info'][0]['account']}]" value="{$game['sum_money']}" style="width: 20px;display: none">
<input class="st" name="st[{$com['id']}][{$game['game_name']}{$com['statement_info'][0]['time']}{$com['statement_info'][0]['account']}]" value="{$com['st']}" style="width: 20px;display: none"></td>
@ -264,9 +308,27 @@
<td><span class="pay_amount">{$account['game_list'][0]['pay_amount']}</span></td>
<!-- <td>{$account['game_list'][0]['ratio']|showNumPercent}</td>-->
<!-- <td>{$account['game_list'][0]['increment_ratio']|showNumPercent}</td>-->
<td><input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$account['game_list'][0]['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$account['game_list'][0]['game_name']}{$account['time']?$account['time']:$com['statement_info'][0]['time']}{$account['account']}]"></td>
<td><input class="ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="ratio[{$com['id']}][{$account['game_list'][0]['game_name']}{$account['time']?$account['time']:$com['statement_info'][0]['time']}{$account['account']}]" value="{$account['game_list'][0]['ratio']}" style="width: 25px;">%</td>
<td><input class="increment_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="increment_ratio[{$com['id']}][{$account['game_list'][0]['game_name']}{$account['time']?$account['time']:$com['statement_info'][0]['time']}{$account['account']}]" value="{$account['game_list'][0]['increment_ratio']}" style="width: 25px;">%</td>
<td>
<if condition="($com.is_reward_fine_split eq 0)">
<input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$account['game_list'][0]['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$account['game_list'][0]['game_name']}{$account['time']?$account['time']:$com['statement_info'][0]['time']}{$account['account']}]">
<else/>
0
</if>
</td>
<td>
<if condition="($com.is_reward_fine_split eq 0)">
<input class="ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="ratio[{$com['id']}][{$account['game_list'][0]['game_name']}{$account['time']?$account['time']:$com['statement_info'][0]['time']}{$account['account']}]" value="{$account['game_list'][0]['ratio']}" style="width: 25px;">%
<else/>
0%
</if>
</td>
<td>
<if condition="($com.is_reward_fine_split eq 0)">
<input class="increment_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="increment_ratio[{$com['id']}][{$account['game_list'][0]['game_name']}{$account['time']?$account['time']:$com['statement_info'][0]['time']}{$account['account']}]" value="{$account['game_list'][0]['increment_ratio']}" style="width: 25px;">%
<else/>
0%
</if>
</td>
<td>
<span class="sum_money_span">{$account['game_list'][0]['sum_money']}</span>
<input class="sum_money" name="sum_money[{$com['id']}][{$account['game_list'][0]['game_name']}{$account['time']?$account['time']:$com['statement_info'][0]['time']}{$account['account']}]" value="{$account['game_list'][0]['sum_money']}" style="width: 20px;display: none">
@ -280,8 +342,12 @@
<notempty name="account['time']">
<td rowspan="{$account['time_row']}">
<input class="withhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$account['withhold_amount']|default=0}" style="width: 40px;" name="withhold[{$com['id']}][{$account['game_list'][0]['game_name']}{$account['time']}{$account['account']}][{$account['game_list'][0]['statement_begin_time']}]">
<input class="oldwithhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$account['withhold_amount']|default=0}" style="width: 40px;display: none">
<if condition="($com.is_reward_fine_split eq 0)">
<input class="withhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$account['withhold_amount']|default=0}" style="width: 40px;" name="withhold[{$com['id']}][{$account['game_list'][0]['game_name']}{$account['time']}{$account['account']}][{$account['game_list'][0]['statement_begin_time']}]">
<input class="oldwithhold" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$account['withhold_amount']|default=0}" style="width: 40px;display: none">
<else/>
0
</if>
</td>
<td rowspan="{$account['time_row']}"><span class="week_amount">{$account['week_amount']}</span><input style="display: none" class="week_amount_input" value="{$account['week_amount']}"></td>
</notempty>
@ -309,9 +375,27 @@
<td><span class="pay_amount">{$game['pay_amount']}</span></td>
<!-- <td>{$game['ratio']|showNumPercent}</td>-->
<!-- <td>{$game['increment_ratio']|showNumPercent}</td>-->
<td><input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$game['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$game['game_name']}{$account['time']?$account['time']:$com['statement_info'][0]['time']}{$account['account']}]"></td>
<td><input class="ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="ratio[{$com['id']}][{$game['game_name']}{$account['time']?$account['time']:$com['statement_info'][0]['time']}{$account['account']}]" value="{$game['ratio']}" style="width: 25px;">%</td>
<td><input class="increment_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="increment_ratio[{$com['id']}][{$game['game_name']}{$account['time']?$account['time']:$com['statement_info'][0]['time']}{$account['account']}]" value="{$game['increment_ratio']}" style="width: 25px;">%</td>
<td>
<if condition="($com.is_reward_fine_split eq 0)">
<input class="refund" onkeyup ="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" value="{$game['refund']|default=0}" style="width: 40px;" name="refund[{$com['id']}][{$game['game_name']}{$account['time']?$account['time']:$com['statement_info'][0]['time']}{$account['account']}]">
<else/>
0
</if>
</td>
<td>
<if condition="($com.is_reward_fine_split eq 0)">
<input class="ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="ratio[{$com['id']}][{$game['game_name']}{$account['time']?$account['time']:$com['statement_info'][0]['time']}{$account['account']}]" value="{$game['ratio']}" style="width: 25px;">%
<else/>
0
</if>
</td>
<td>
<if condition="($com.is_reward_fine_split eq 0)">
<input class="increment_ratio" onkeyup ="if(value>100){value=100}else{value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')}if(value.indexOf(0)==0){value=0}" name="increment_ratio[{$com['id']}][{$game['game_name']}{$account['time']?$account['time']:$com['statement_info'][0]['time']}{$account['account']}]" value="{$game['increment_ratio']}" style="width: 25px;">%
<else/>
0
</if>
</td>
<td>
<span class="sum_money_span">{$game['sum_money']}</span><input class="sum_money" name="sum_money[{$com['id']}][{$game['game_name']}{$account['time']?$account['time']:$com['statement_info'][0]['time']}{$account['account']}]" value="{$game['sum_money']}" style="width: 20px;display: none">
<input class="st" name="st[{$com['id']}][{$game['game_name']}{$account['time']?$account['time']:$com['statement_info'][0]['time']}{$account['account']}]" value="{$com['st']}" style="width: 20px;display: none"></td>
@ -380,6 +464,34 @@
saveForm(id);
});
var pool_ids = "{$_GET['id']}";
$(".split_RewardOrFail").on("click",function() {
var id = $(this).data('id');
var st = $(this).data('st');
layer.confirm("是否确认对该数据进行奖惩分离", {title: false}, function (index) {
$.ajax({
type: "POST",
url: "{:U('splitRewardOrFailData')}",
dataType: 'json',
async: false,
data: {id: id, st: st, pool_id: pool_ids},
success: function (data) {
if (data.status == 1) {
layer.msg("<font style='color:white'>" + data.msg + "</font>");
setTimeout(function () {
window.location.reload();
}, 1500);
} else {
layer.msg("<font style='color:white'>" + data.msg + "</font>");
return false;
}
}
});
});
});
var return_data = "";
function saveForm(id) {
@ -560,9 +672,9 @@
} else {
week_amount_find = week_amount_find.prev();
}
if (i>10) {
break;
}
// if (i>10) {
// break;
// }
}
var D_value = parseFloat(old_amount)-parseFloat(this_amount) + parseFloat(withhold-oldwithhold);

@ -217,7 +217,7 @@
</div>
<else />
<div style="line-height: 2;">
{$data.payment}
<span <if condition="$data.verify_status eq 2 or $data.verify_status eq 3">class="unPayment" style="color:blue"</if> data-id="{$data['id']}">{$data.payment}</span>
</div>
</if>
</td>
@ -306,6 +306,19 @@
});
});
$(".unPayment").click(function () {
var id = $(this).data("id");
var url = "{:U('viewUnPaymentPool')}"+"&id="+id
layer.open({
type: 2,
title: "海南万盟天下科技有限公司",
shadeClose: true,
shade: 0.8,
area: ['100%', '100%'],
content: url
});
});
$(".editPool").click(function () {
var id = $(this).data("id");
var url = "{:U('editPool')}"+"&id="+id

@ -103,6 +103,7 @@
<th rowspan="2" style="border-right: solid 1px #b6cad2;">产品</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">平台流水</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">未结算平台流水</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">退款</th>
<th colspan=2 style="border-right: solid 1px #b6cad2;">分成比例</th>
@ -111,6 +112,8 @@
<th rowspan="2" style="border-right: solid 1px #b6cad2;">合作方待结算分成</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">违规罚款</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">奖励</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">其他扣款</th>
<th rowspan="2" style="border-right: solid 1px #b6cad2;">周期结算金额</th>
<!-- <th rowspan="2" style="border-right: solid 1px #b6cad2;">周结算金额</th>-->
<th rowspan="2" style="border-right: solid 1px #b6cad2;">合作待结算金额</th>
@ -135,17 +138,23 @@
</tr>
</thead>
<tbody id="statementShow">
<if condition = "empty($data)">
<tr>
<td colspan="50" class="text-center">aOh! 暂时还没有内容!</td>
</tr>
</if>
<foreach name="data" item="com">
<tr>
<td rowspan="{$com.statement_count}">{$com.company_name}</td>
<td rowspan="{$com.statement_count}">{$com.matche_platform}</td>
<!-- <td rowspan="{$com.statement_count}">{$com.statement_begin_time} ~ {$com.statement_end_time}</td> -->
<!-- <td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['time']}</td>-->
<td>{$com['statement_info'][0]['statement_begin_time']}-{$com['statement_info'][0]['statement_end_time']}</td>
<td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['time']}</td>
<!-- <td>{$com['statement_info'][0]['statement_begin_time']}-{$com['statement_info'][0]['statement_end_time']}</td>-->
<td>{$com['statement_info'][0]['game_name']}</td>
<td>{$com['statement_info'][0]['pay_amount']}</td>
<td>{$com['statement_info'][0]['pay_amount']}</td>
<td >{$com['statement_info'][0]['refund']|default=0}</td>
<td>{$com['statement_info'][0]['ratio']|showNumPercent}</td>
<td>{$com['statement_info'][0]['company_ratio']|showNumPercent}</td>
<td>{$com['statement_info'][0]['promote_ratio']|showNumPercent}</td>
@ -154,6 +163,12 @@
<td rowspan="{$com.statement_count}">{$com['fine']-0}</td>
<td rowspan="{$com.statement_count}">{$com['reward']-0}</td>
<td rowspan="{$com['statement_info'][0]['row']}">
{$com['statement_info'][0]['withhold']|default=0}
</td>
<td rowspan="{$com['statement_info'][0]['row']}">
<span class="week_amount">{$com['statement_info'][0]['week_amount']}</span>
</td>
<!-- <td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['week_amount']}</td>-->
<td rowspan="{$com.statement_count}">{$com['statement_money']}</td>
@ -177,7 +192,7 @@
<if condition="!$is_export">
<td rowspan="{$com.statement_count}">
<if condition="($com['st'] eq 1 ) AND ($pool_status lt 1)">
<if condition="($com['st'] eq 1 ) AND ($pool_status lt 1) AND ($com.is_reward_fine_split eq 0)">
<a data-id="{$com['id']}" class='butn no_statement' style="cursor:pointer">不结算</a>
</if>
</td>
@ -187,18 +202,29 @@
<foreach name="com.statement_info" item="it" key="k">
<if condition="$k neq 0">
<tr>
<td>{$it['statement_begin_time']}-{$it['statement_end_time']}</td>
<!-- <notempty name="it['time']">-->
<!-- <td rowspan="{$it['row']}">{$it['time']}</td>-->
<!-- </notempty>-->
<!-- <td>{$it['statement_begin_time']}-{$it['statement_end_time']}</td>-->
<notempty name="it['time']">
<td rowspan="{$it['row']}">{$it['time']}</td>
</notempty>
<td>{$it['game_name']}</td>
<td>{$it['pay_amount']}</td>
<td>{$it['pay_amount']}</td>
<td rowspan="{$it['row']}">
{$it['refund']|default=0}
</td>
<td>{$it['ratio']|showNumPercent}</td>
<td>{$it['company_ratio']|showNumPercent}</td>
<td>{$it['promote_ratio']|showNumPercent}</td>
<td>{$it['fax_ratio']|showNumPercent}</td>
<td>{$it['d_statement_money']}</td>
<notempty name="it['time']">
<td rowspan="{$it['row']}">{$it['fine']-0}</td>
<td rowspan="{$it['row']}">{$it['reward']-0}</td>
<td rowspan="{$it['row']}">
{$it['withhold']|default=0}
</td>
<td rowspan="{$it['row']}"><span class="week_amount">{$it['week_amount']}</span></td>
</notempty>
</tr>
</if>
@ -212,10 +238,13 @@
<td></td>
<td></td>
<td></td>
<td></td>
<td>{$count.d_statement_money}</td>
<td>{$count.fine}</td>
<td>{$count.reward}</td>
<td></td>
<td>{$count.statement_money}</td>
<td>{$count.statement_money_s}</td>
<td></td>
<td></td>
<td></td>
@ -226,6 +255,51 @@
<td></td>
</if>
</tr>
<if condition="$is_export">
<tr>
<td >初审状态:</td>
<td>
<if condition="$pool_data.verify_status eq -3 ">
<div style="line-height: 2;color: red;">
{$pool_data.firstverify}
</div>
<else />
<div style="line-height: 2;">
{$pool_data.firstverify}
</div>
</if>
</td>
</tr>
<tr>
<td >审批状态:</td>
<td>
<if condition="$pool_data.verify_status eq -1 ">
<div style="line-height: 2;color: red;">
{$pool_data.verify}
</div>
<else />
<div style="line-height: 2;">
{$pool_data.verify}
</div>
</if>
</td>
</tr>
<tr>
<td >打款状态:</td>
<td>
<if condition="$pool_data.verify_status eq -2 ">
<div style="line-height: 2;color: red;">
{$pool_data.payment}
</div>
<else />
<div style="line-height: 2;">
{$pool_data.payment}
</div>
</if>
</td>
</tr>
</if>

@ -98,19 +98,21 @@
<tr>
<th>序号</th>
<th>公司名称</th>
<!-- <th>结算日期</th>-->
<th>结算日期</th>
<th>合作产品名称</th>
<th>平台总额(元)</th>
<th>退款</th>
<th>下游内团分成比例</th>
<th>补点比例</th>
<th>税费费率</th>
<th>分成金额/元</th>
<th>罚款</th>
<th>奖励</th>
<!-- <th>周结算金额</th>-->
<th>其他扣款</th>
<th>周期结算金额</th>
<th>合计/元</th>
<th>对账人</th>
<th>结算日期</th>
<!-- <th>结算日期</th>-->
<th>户名</th>
<th>帐号</th>
<th>开户行</th>
@ -124,23 +126,38 @@
</tr>
</thead>
<tbody id="statementShow">
<if condition = "empty($data)">
<tr>
<td colspan="50" class="text-center">aOh! 暂时还没有内容!</td>
</tr>
</if>
<foreach name="data" item="com">
<tr>
<td rowspan="{$com.statement_count}">{$key-0+1}</td>
<td rowspan="{$com.statement_count}">{$com.company_name}</td>
<!-- <td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['time']}</td>-->
<td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['time']}</td>
<td>{$com['statement_info'][0]['game_name']}</td>
<td>{$com['statement_info'][0]['pay_amount']}</td>
<td >{$com['statement_info'][0]['refund']|default=0}</td>
<td>{$com['statement_info'][0]['ratio']|showNumPercent}</td>
<td>{$com['statement_info'][0]['increment_ratio']|showNumPercent}</td>
<td>{$com['statement_info'][0]['fax_ratio']|showNumPercent}</td>
<td>{$com['statement_info'][0]['d_statement_money']}</td>
<td rowspan="{$com.statement_count}">{$com['fine']-0}</td>
<td rowspan="{$com.statement_count}">{$com['reward']-0}</td>
<!-- <td rowspan="{$com.statement_count}">{$com['fine']-0}</td>-->
<!-- <td rowspan="{$com.statement_count}">{$com['reward']-0}</td>-->
<td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['fine']-0}</td>
<td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['reward']-0}</td>
<td rowspan="{$com['statement_info'][0]['row']}">
{$com['statement_info'][0]['withhold']|default=0}
</td>
<td rowspan="{$com['statement_info'][0]['row']}">
<span class="week_amount">{$com['statement_info'][0]['week_amount']}</span>
</td>
<!-- <td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['week_amount']}</td>-->
<td rowspan="{$com.statement_count}">{$com['statement_money']}</td>
<td rowspan="{$com.statement_count}">{$com.settlement_contact}</td>
<td>{$com['statement_info'][0]['statement_begin_time']}-{$com['statement_info'][0]['statement_end_time']}</td>
<!-- <td rowspan="{$com['statement_info'][0]['row']}">{$com['statement_info'][0]['time']}</td>-->
<if condition="$com['is_payment'] eq 2">
@ -157,11 +174,11 @@
<td rowspan="{$com.statement_count}"><if condition="$com['is_payment'] eq 1"><else /></if></td>
<td rowspan="{$com.statement_count}"><if condition="$com['st'] eq 0"><else /></if></td>
<td rowspan="{$com.statement_count}">{$com.renark}</td>
<td rowspan="{$com.statement_count}">{$com.remark}</td>
<if condition="!$is_export">
<td rowspan="{$com.statement_count}">
<if condition="($com['st'] eq 1 ) AND ($pool_status lt 1)">
<if condition="($com['st'] eq 1 ) AND ($pool_status lt 1) AND ($com.is_reward_fine_split eq 0)">
<a data-id="{$com['id']}" class='butn no_statement' style="cursor:pointer">不结算</a>
</if>
</td>
@ -171,14 +188,28 @@
<foreach name="com.statement_info" item="it" key="k">
<if condition="$k neq 0">
<tr>
<notempty name="it['time']">
<td rowspan="{$it['row']}">{$it['time']}</td>
</notempty>
<td>{$it['game_name']}</td>
<td>{$it['pay_amount']}</td>
<td rowspan="{$it['row']}">
{$it['refund']|default=0}
</td>
<td>{$it['ratio']|showNumPercent}</td>
<td>{$it['increment_ratio']|showNumPercent}</td>
<td>{$it['fax_ratio']|showNumPercent}</td>
<td>{$it['d_statement_money']}</td>
<td>{$it['statement_begin_time']}-{$it['statement_end_time']}</td>
<notempty name="it['time']">
<td rowspan="{$it['row']}">{$it['fine']-0}</td>
<td rowspan="{$it['row']}">{$it['reward']-0}</td>
<td rowspan="{$it['row']}">
{$it['withhold']|default=0}
</td>
<td rowspan="{$it['row']}"><span class="week_amount">{$it['week_amount']}</span></td>
</notempty>
<!-- <td>{$it['statement_begin_time']}-{$it['statement_end_time']}</td>-->
<!-- <notempty name="it['time']">-->
<!-- <td rowspan="{$it['row']}">{$it['week_amount']}</td>-->
<!-- </notempty>-->
@ -190,18 +221,17 @@
</foreach>
</foreach>
<tr>
<td colspan=3 >合计:</td>
<td colspan=4 >合计:</td>
<td>{$count.platform_amount}</td>
<td></td>
<td></td>
<td></td>
<td></td><td></td>
<td>{$count.d_statement_money}</td>
<td>{$count.fine}</td>
<td>{$count.reward}</td>
<td>{$count.statement_money}</td>
<!-- <td>{$count.statement_money}</td>-->
<td></td>
<td></td>
<td>{$count.statement_money}</td>
<td>{$count.statement_money_s}</td>
<td></td>
<td></td>
<td></td>
@ -213,6 +243,51 @@
<td></td>
</if>
</tr>
<if condition="$is_export">
<tr>
<td >初审状态:</td>
<td>
<if condition="$pool_data.verify_status eq -3 ">
<div style="line-height: 2;color: red;">
{$pool_data.firstverify}
</div>
<else />
<div style="line-height: 2;">
{$pool_data.firstverify}
</div>
</if>
</td>
</tr>
<tr>
<td >审批状态:</td>
<td>
<if condition="$pool_data.verify_status eq -1 ">
<div style="line-height: 2;color: red;">
{$pool_data.verify}
</div>
<else />
<div style="line-height: 2;">
{$pool_data.verify}
</div>
</if>
</td>
</tr>
<tr>
<td >打款状态:</td>
<td>
<if condition="$pool_data.verify_status eq -2 ">
<div style="line-height: 2;color: red;">
{$pool_data.payment}
</div>
<else />
<div style="line-height: 2;">
{$pool_data.payment}
</div>
</if>
</td>
</tr>
</if>
</tbody>
</table>
</div>

@ -137,7 +137,11 @@
</tr>
</thead>
<tbody id="statementShow">
<if condition = "empty($data)">
<tr>
<td colspan="50" class="text-center">aOh! 暂时还没有内容!</td>
</tr>
</if>
<foreach name="data" item="com">
<tr>
<td rowspan="{$com.row}">{$key-0+1}</td>
@ -169,8 +173,8 @@
<td>{$com['statement_info'][0]['game_list'][0]['increment_ratio']}%</td>
<td><span class="sum_money_span">{$com['statement_info'][0]['game_list'][0]['sum_money']}</span></td>
<td rowspan="{$com['statement_info'][0]['time_row']}">{$com['statement_info'][0]['reward']||default="0"}</td>
<td rowspan="{$com['statement_info'][0]['time_row']}">{$com['statement_info'][0]['fine']||default="0"}</td>
<td rowspan="{$com['statement_info'][0]['time_row']}">{$com['statement_info'][0]['game_list'][0]['reward']||default="0"}</td>
<td rowspan="{$com['statement_info'][0]['time_row']}">{$com['statement_info'][0]['game_list'][0]['fine']||default="0"}</td>
<td rowspan="{$com['statement_info'][0]['time_row']}">{$com['statement_info'][0]['game_list'][0]['withhold']|default=0}</td>
<td rowspan="{$com['statement_info'][0]['time_row']}">{$com['statement_info'][0]['week_amount']||default="0"}</td>
<td rowspan="{$com.row}">{$com['statement_money']}</td>
@ -207,7 +211,7 @@
<if condition="!$is_export">
<td rowspan="{$com.row}">
<if condition="($com['st'] eq 1 ) AND ($pool_status lt 1)">
<if condition="($com['st'] eq 1 ) AND ($pool_status lt 1) AND ($com.is_reward_fine_split eq 0)">
<a data-id="{$com['id']}" class='butn no_statement' style="cursor:pointer">不结算</a>
</if>
</td>
@ -361,7 +365,51 @@
</tr>
</if>
<if condition="$is_export">
<tr>
<td >初审状态:</td>
<td>
<if condition="$pool_data.verify_status eq -3 ">
<div style="line-height: 2;color: red;">
{$pool_data.firstverify}
</div>
<else />
<div style="line-height: 2;">
{$pool_data.firstverify}
</div>
</if>
</td>
</tr>
<tr>
<td >审批状态:</td>
<td>
<if condition="$pool_data.verify_status eq -1 ">
<div style="line-height: 2;color: red;">
{$pool_data.verify}
</div>
<else />
<div style="line-height: 2;">
{$pool_data.verify}
</div>
</if>
</td>
</tr>
<tr>
<td >打款状态:</td>
<td>
<if condition="$pool_data.verify_status eq -2 ">
<div style="line-height: 2;color: red;">
{$pool_data.payment}
</div>
<else />
<div style="line-height: 2;">
{$pool_data.payment}
</div>
</if>
</td>
</tr>
</if>
</tbody>
</table>

@ -148,6 +148,7 @@ text-indent:0;
</th>
<th>游戏ID</th>
<th>游戏名称</th>
<th>归属识别号</th>
<th>运营平台</th>
<th>混服管理</th>
<th>游戏类型</th>
@ -173,6 +174,7 @@ text-indent:0;
<td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td>
<td>{$data.id}</td>
<td>{$data.game_name}</td>
<td>{$data.unique_code|default="无"}</td>
<td class="">{:get_systems_name($data['sdk_version'])}</td>
<td>{:getServerType($data['server_type'])}</td>

@ -104,6 +104,9 @@
<button class="submit_btn" id="submit_btn">
保存
</button>
<a class="submit_btn " alt="下载模板" title="下载模板" href="{:U('downloadCoefficient')}">
下载模板
</a>
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back();">
返回
</a>

@ -194,6 +194,7 @@
<th><input class="check-all" type="checkbox"></th>
<th>时间</th>
<th>市场专员</th>
<th>离职时间</th>
<th>级别</th>
<th><div class="tooltip">开发总流水<span class="tooltiptext"><span style="margin-left: -10px">当月自主开发下渠道游戏内充值总和</span></span></div></th>
<th><div class="tooltip">维护总流水<span class="tooltiptext"><span style="margin-left: -10px">当月只维护下渠道游戏内充值总和</span></span></div></th>
@ -222,6 +223,7 @@
<td><input class="ids" type="checkbox" value="{$data['id']} "data-coefficient_check="{$data['coefficient_check']}" data-market_check="{$data['market_check']}" data-finance_check="{$data['finance_check']}" name="ids[]"></td>
<td>{$data.pay_time|default='无'}</td>
<td>{$data.real_name|default='无'}</td>
<td>{$data.leave_time|default='--'}</td>
<td>{$data.level|default='无'}</td>
<td><a href="{:U('FinancePromote/index',array('time_start'=>$data['start_time'],'time_end'=>$data['end_time'],'admin_id'=>$data['admin_id'],'develop_type'=>'1'))}" >{$data.performance_revenue|default='0.00'}</a></td>

@ -32,7 +32,7 @@
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l">省份:</td>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>省份:</td>
<td class="r" style="width: 50px;">
<select name="province" id="province" class="select_gallery">
</select>
@ -40,7 +40,7 @@
</td>
</tr>
<tr>
<td class="l">城市:</td>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>城市:</td>
<td class="r" style="width: 50px;">
<select name="city" id="city" class="select_gallery">
</select>
@ -84,8 +84,8 @@
</td>
</tr>
<tr>
<td class="l">游戏类型:</td>
<input id="game_type" name="game_type" type="hidden" value="{$game_types[0]['type_name']}">
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>游戏类型:</td>
<!-- <input id="game_type" name="game_type" type="hidden" value="{$game_types[0]['type_name']}">-->
<td class="r" style="">
<volist name="game_types" id="vo">
<span style="margin-right:18px;">{$vo['type_name']}: <input type="checkbox" name="game_types[]" value="{$vo['type_name']}"></span>
@ -111,6 +111,20 @@
<input type="text" name="promote_scale" id="promote_scale" class="input" placeholder="请输入推广规模" maxlength="50">
</td>
</tr>
<tr>
<td class="l">公会等级:</td>
<td class="r" style="width: 50px;">
<select name="sociaty_level" id="sociaty_level" class="select_gallery">
<option>请选择公会等级</option>
<option value="1">S</option>
<option value="2">A</option>
<option value="3">B</option>
<option value="4">其他</option>
</select>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<tr>
<td class="l">流水:</td>
<td class="r table_radio">
@ -222,10 +236,10 @@
var cres = $('form').serializeArray();
console.log(cres);
if ($("#province").val() == "请选择省份" || !$("#province").val()) {
// layer.msg('请选择省份');return ;
layer.msg('请选择省份');return ;
}
if (!$("#city").val()) {
// layer.msg('请选择城市');return ;
layer.msg('请选择城市');return ;
}
if (!$("#company_name").val()) {
layer.msg('请输入公司名');return ;

@ -33,7 +33,7 @@
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l">省份:</td>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>省份:</td>
<td class="r" style="width: 50px;">
<select name="province" id="province" class="select_gallery">
</select>
@ -41,7 +41,7 @@
</td>
</tr>
<tr>
<td class="l">城市:</td>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>城市:</td>
<td class="r" style="width: 50px;">
<select name="city" id="city" class="select_gallery">
</select>
@ -49,7 +49,7 @@
</td>
</tr>
<tr>
<td class="l">公司:</td>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>公司:</td>
<td class="r table_radio">
<input type="text" value="{$data['company_name']}" name="company_name" id="company_name" class="input" placeholder="请输入公司名称" maxlength="50">
</td>
@ -85,7 +85,7 @@
</td>
</tr>
<tr>
<td class="l">游戏类型:</td>
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>游戏类型:</td>
<!--<input id="game_type" name="game_type" type="hidden" value="{$game_types[0]['type_name']}">-->
<td class="r" style="">
<volist name="game_types" id="vo">
@ -120,6 +120,19 @@
<input type="text" value="{$data['promote_scale']}" name="promote_scale" id="promote_scale" class="input" placeholder="请输入推广规模" maxlength="50">
</td>
</tr>
<tr>
<td class="l">公会等级:</td>
<td class="r" style="width: 50px;">
<select name="sociaty_level" id="sociaty_level" class="select_gallery">
<option>请选择公会等级</option>
<option value="1" <if condition="$data['sociaty_level'] eq 1">selected</if>>S</option>
<option value="2" <if condition="$data['sociaty_level'] eq 2">selected</if>>A</option>
<option value="3" <if condition="$data['sociaty_level'] eq 3">selected</if>>B</option>
<option value="4" <if condition="$data['sociaty_level'] eq 4">selected</if>>其他</option>
</select>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l">流水:</td>
<td class="r table_radio">
@ -255,10 +268,10 @@
$("#submit").on("click",function(){
var cres = $('form').serializeArray();
if ($("#province").val() == "请选择省份" || !$("#province").val()) {
// layer.msg('请选择省份');return ;
layer.msg('请选择省份');return ;
}
if (!$("#city").val()) {
// layer.msg('请选择城市');return ;
layer.msg('请选择城市');return ;
}
if (!$("#company_name").val()) {
layer.msg('请输入公司名');return ;

@ -75,6 +75,20 @@
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select name="sociaty_level" id="sociaty_level" class="select_gallery">
<option value="0">请选择公会等级</option>
<option value="1">S</option>
<option value="2">A</option>
<option value="3">B</option>
<option value="4">其他</option>
</select>
</div>
<div class="input-list">
<input type="text" name="text" style="width: 200px" class="" placeholder="快速搜索" value="{:I('text')}"/>&nbsp;
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('lists','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
</div>
@ -96,6 +110,11 @@
<a class="sch-btn" href="javascript:;" id="downloadexcel" url="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}">导出</a>
</if>
</div>
<div class="input-list">
<if condition="$delset_check eq true ">
<a class="sch-btn" id="del_check" style="background:red">删除</a>
</if>
</div>
<div class="input-list">
<if condition="$timeset_check eq true ">
<a style="width: 100px;" class="sch-btn" href="javascript:;" id="timeset" data-url="{:U('timeset')}">时间间隔设置</a>
@ -107,7 +126,8 @@
<form id="form" action="{:U('excelImport')}" method="post" class="form-horizontal" enctype="multipart/form-data">
<div class="input-list">
<input type="file" id="excelData" name="excelData" accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
<button class="submit_btn" id="submit" type="submit" target-form="form-horizontal">确 定</button>
<button class="submit_btn " id="submit" type="submit" target-form="form-horizontal" url="{:U('excelImport')}">确 定</button>
<button id="downloads" class="submit_btn" type="text" url="{:U('downloadSocial')}" target-form="form-horizontal" >下载模板</button>
<button id="excel_back" class="submit_btn" type="text" target-form="form-horizontal">返 回</button>
</div>
</form>
@ -124,6 +144,8 @@
<!-- 表头 -->
<thead>
<tr>
<th><input class="check-all" type="checkbox"></th>
<th>序号</th>
<th>省份</th>
<th>城市</th>
<th>公司</th>
@ -136,6 +158,7 @@
<th>所做游戏</th>
<th>合作平台</th>
<th>推广规模</th>
<th>公会等级</th>
<th>流水</th>
<th>地址</th>
<th>联盟信息</th>
@ -155,10 +178,12 @@
<td colspan="22" class="text-center">aOh! 暂时还没有内容!</td>
<else />
<volist name="listData" id="data">
<tr <if condition="$data['is_gap_time'] eq 1"> style="background: yellow;" </if> >
<tr >
<td ><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td>
<td rowspan="{$data.row}">{$data.num}</td>
<td rowspan="{$data.row}">{$data.province}</td>
<td rowspan="{$data.row}">{$data.city}</td>
<td rowspan="{$data.row}">{$data.company_name}</td>
<td rowspan="{$data.row}"><if condition="$data['is_gap_time'] eq 1"> <span style="color: red"></span> </if>{$data.company_name}</td>
<td rowspan="{$data.row}">{$data.register_capital}</td>
<td rowspan="{$data.row}">{$data.functionary}</td>
<td rowspan="{$data.row}">{$data.phone}</td>
@ -168,6 +193,7 @@
<td rowspan="{$data.row}">{$data.game_name}</td>
<td rowspan="{$data.row}">{$data.join_platform}</td>
<td rowspan="{$data.row}">{$data.promote_scale}</td>
<td rowspan="{$data.row}">{$data.sociaty_level_str}</td>
<td rowspan="{$data.row}">{$data.turnover}</td>
<td rowspan="{$data.row}">{$data.address}</td>
<td rowspan="{$data.row}">{$data.league_info}</td>
@ -182,7 +208,10 @@
<td rowspan="{$data.row}">
<a href="{:U('edit',array('id'=>$data['id']))}">编辑</a>
<a href="{:U('del',array('id'=>$data['id']))}" class="confirm ajax-get">删除</a>
<a href="{:U('view',array('id'=>$data['id']))}">查看</a>
<if condition="$delset_check eq true ">
<a href="{:U('del',array('id'=>$data['id']))}" class="confirm ajax-get">删除</a>
</if>
</td>
</tr>
@ -192,58 +221,58 @@
</table>
</div>
</div>
<div class="data_list data_game_list model" style="display: none;">
<div class="" style="margin-top: 25px;">
<table border="1">
<!-- 表头 -->
<thead>
<tr>
<th>省份</th>
<th>城市</th>
<th>公司</th>
<th>注册资本</th>
<th>负责人</th>
<th>电话</th>
<th>微信</th>
<th>QQ</th>
<th>游戏类型</th>
<th>所做游戏</th>
<th>合作平台</th>
<th>推广规模</th>
<th>流水</th>
<th>地址</th>
<th>联盟信息</th>
<th>是否为意向客户</th>
<th>备注信息</th>
<th>对接人</th>
</tr>
</thead>
<!-- <div class="data_list data_game_list model" style="display: none;">-->
<!-- <div class="" style="margin-top: 25px;">-->
<!-- <table border="1">-->
<!-- &lt;!&ndash; 表头 &ndash;&gt;-->
<!-- <thead>-->
<!-- <tr>-->
<!-- <th>省份</th>-->
<!-- <th>城市</th>-->
<!-- <th>公司</th>-->
<!-- <th>注册资本</th>-->
<!-- <th>负责人</th>-->
<!-- <th>电话</th>-->
<!-- <th>微信</th>-->
<!-- <th>QQ</th>-->
<!-- <th>游戏类型</th>-->
<!-- <th>所做游戏</th>-->
<!-- <th>合作平台</th>-->
<!-- <th>推广规模</th>-->
<!-- <th>流水</th>-->
<!-- <th>地址</th>-->
<!-- <th>联盟信息</th>-->
<!-- <th>是否为意向客户</th>-->
<!-- <th>备注信息</th>-->
<!-- <th>对接人</th>-->
<!-- </tr>-->
<!-- </thead>-->
<!-- 列表 -->
<tbody>
<td rowspan="{$data.row}">--</td>
<td rowspan="{$data.row}">--</td>
<td rowspan="{$data.row}">--</td>
<td rowspan="{$data.row}">--</td>
<td rowspan="{$data.row}">--</td>
<td rowspan="{$data.row}">--</td>
<td rowspan="{$data.row}">--</td>
<td rowspan="{$data.row}">--</td>
<td rowspan="{$data.row}">--</td>
<td rowspan="{$data.row}">--</td>
<td rowspan="{$data.row}">--</td>
<td rowspan="{$data.row}">--</td>
<td rowspan="{$data.row}">--</td>
<td rowspan="{$data.row}">--</td>
<td rowspan="{$data.row}">--</td>
<td rowspan="{$data.row}">--</td>
<td rowspan="{$data.row}">--</td>
<td rowspan="{$data.row}">--</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- &lt;!&ndash; 列表 &ndash;&gt;-->
<!-- <tbody>-->
<!-- <td rowspan="{$data.row}">&#45;&#45;</td>-->
<!-- <td rowspan="{$data.row}">&#45;&#45;</td>-->
<!-- <td rowspan="{$data.row}">&#45;&#45;</td>-->
<!-- <td rowspan="{$data.row}">&#45;&#45;</td>-->
<!-- <td rowspan="{$data.row}">&#45;&#45;</td>-->
<!-- <td rowspan="{$data.row}">&#45;&#45;</td>-->
<!-- <td rowspan="{$data.row}">&#45;&#45;</td>-->
<!-- <td rowspan="{$data.row}">&#45;&#45;</td>-->
<!-- <td rowspan="{$data.row}">&#45;&#45;</td>-->
<!-- <td rowspan="{$data.row}">&#45;&#45;</td>-->
<!-- <td rowspan="{$data.row}">&#45;&#45;</td>-->
<!-- <td rowspan="{$data.row}">&#45;&#45;</td>-->
<!-- <td rowspan="{$data.row}">&#45;&#45;</td>-->
<!-- <td rowspan="{$data.row}">&#45;&#45;</td>-->
<!-- <td rowspan="{$data.row}">&#45;&#45;</td>-->
<!-- <td rowspan="{$data.row}">&#45;&#45;</td>-->
<!-- <td rowspan="{$data.row}">&#45;&#45;</td>-->
<!-- <td rowspan="{$data.row}">&#45;&#45;</td>-->
<!-- </tr>-->
<!-- </tbody>-->
<!-- </table>-->
<!-- </div>-->
<!-- </div>-->
<div class="page">
{$_page|default=''}
@ -302,6 +331,42 @@
});
}
$("#del_check").click(function () {
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
return $(elem).val();
}).get();
if(text.length < 1){
layer.msg("<font style='color:white'>" + '没有需要删除的数据' + "</font>");
return;
}
layer.confirm('删除后将无法恢复,请慎重选择', {
btn: ['确认','取消'],
title:false
}, function(){
$.ajax({
type: "POST",
url: "{:U('del_check')}",
dataType: 'json',
async: false,
data: {ids:text},
success:function(data){
if(data.status==1){
layer.msg("<font style='color:white'>" + data.info + "</font>");
setTimeout(function(){
window.location.reload();
},1500);
}else{
layer.msg("<font style='color:white'>" + data.info + "</font>");
return false;
}
}
});
});
});
$(function() {
areaInit();
mapInit();
@ -311,6 +376,12 @@
//导航高亮
highlight_subnav("{:U('lists')}");
$(function(){
$("#downloads").on("click",function(){
var url = $(this).attr("url");
window.location.href = url;
return false;;
});
$("#excel_in").click(function () {
$(".search_list").hide();
$(".excel_list").show();
@ -318,6 +389,46 @@
$(".model").show();
return false;
});
$("#submit").click(function () {
var fileObj = document.getElementById("excelData").files[0]; // js 获取文件对象
var url = $(this).attr('url');
var oReq = new XMLHttpRequest();
var formFile = new FormData();
formFile.append("excelData", fileObj); //加入文件对象
layer.confirm('【提示】是否确认导入公会信息', {
btn: ['确认','取消'],
title:false
}, function(index){
$.ajax({
url:url,
type:"post",
data:formFile,
dataType:'json',
cache: false,
processData: false,
contentType: false,
success:function(data){
if (data.status == 1) {
layer.msg(data.msg);
setTimeout(function(){
// window.parent.reload()
window.location.href = "{:U('lists')}";
},2000)
} else {
layer.msg(data.msg);
}
}
})
});
return false;
});
$("#excel_back").click(function () {
$(".search_list").show();
$(".excel_list").hide();

@ -0,0 +1,300 @@
<extend name="Public/base" />
<block name="css">
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<link rel="stylesheet" type="text/css" href="__STATIC__/webuploader/webuploader.css" media="all">
<style>
#form .txt_area.download_url {width:400px;}
.tabcon1711 .table_radio2 .table_btn {width:215px;}
.tabcon1711 td:first-child{width: 20px; padding-left: 20px;}
</style>
</block>
<block name="body">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script src="__STATIC__/md5.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="__STATIC__/webuploader/webuploader.js"></script>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js"></script>
<script src="__STATIC__/juicer-min.js" type="text/javascript"></script>
<script src="__STATIC__/area.js" type="text/javascript" charset="utf-8"></script>
<!-- 标签页导航 -->
<div class="tab-wrap">
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">{$meta_title}</h3>
</div>
<div class="tab-content tabcon1711">
<!-- 表单 -->
<form id="form" action="{:U('edit')}" method="post" class="form-horizontal" autocomplete="off">
<input value="{$data['id']}" name="id" type="hidden">
<!-- 基础 -->
<div id="tab1" class="tab1">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l">省份:</td>
<td class="r" style="width: 50px;">
<select name="province" id="province" class="select_gallery" disabled>
</select>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l">城市:</td>
<td class="r" style="width: 50px;">
<select name="city" id="city" class="select_gallery" disabled>
</select>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l">公司:</td>
<td class="r table_radio">
<input type="text" value="{$data['company_name']}" name="company_name" id="company_name" class="input" placeholder="请输入公司名称" maxlength="50" disabled>
</td>
</tr>
<tr>
<td class="l">注册资本:</td>
<td class="r table_radio">
<input type="text" value="{$data['register_capital']}" name="register_capital" id="register_capital" class="input" placeholder="请输入注册资本" maxlength="50" disabled>
</td>
</tr>
<tr>
<td class="l">负责人:</td>
<td class="r table_radio">
<input type="text" value="{$data['functionary']}" name="functionary" id="functionary" class="input" placeholder="请输入负责人" maxlength="50" disabled>
</td>
</tr>
<tr>
<td class="l">电话:</td>
<td class="r table_radio">
<input type="text" value="{$data['phone']}" name="phone" id="phone" class="input" placeholder="请输入电话" maxlength="50" disabled>
</td>
</tr>
<tr>
<td class="l">微信:</td>
<td class="r table_radio">
<input type="text" value="{$data['wechat']}" name="wechat" id="wechat" class="input" placeholder="请输入微信" maxlength="50" disabled>
</td>
</tr>
<tr>
<td class="l">QQ</td>
<td class="r table_radio">
<input type="text" value="{$data['qq']}" name="qq" id="qq" class="input" placeholder="请输入QQ" maxlength="50" disabled>
</td>
</tr>
<tr>
<td class="l">游戏类型:</td>
<!--<input id="game_type" name="game_type" type="hidden" value="{$game_types[0]['type_name']}">-->
<td class="r" style="">
<volist name="game_types" id="vo">
<span style="margin-right:18px;">{$vo['type_name']}: <input type="checkbox" name="game_types[]" value="{$vo['type_name']}" <if condition="$vo['check'] eq 1">checked</if> disabled></span>
</volist>
<!--<select name="game_type_id" id="game_type_id" class="select_gallery">
<volist name="game_types" id="vo">
<option value="<?=$vo['id']?>" <if condition="$data['game_type_id'] eq $vo['id']">selected</if> >{$vo['type_name']}</option>
</volist>
</select>-->
<span class="notice-text"></span>
</td>
<!--<script>$("#game_type_id").change(function() {
$("#game_type").val($("#game_type_id option:selected").text());
});</script>-->
</tr>
<tr>
<td class="l">所做游戏:</td>
<td class="r table_radio">
<input type="text" value="{$data['game_name']}" name="game_name" id="game_name" class="input" placeholder="请输入所做游戏" maxlength="50" disabled>
</td>
</tr>
<tr>
<td class="l">合作平台:</td>
<td class="r table_radio">
<input type="text" value="{$data['join_platform']}" name="join_platform" id="join_platform" class="input" placeholder="请输入合作平台" maxlength="50" disabled>
</td>
</tr>
<tr>
<td class="l">推广规模:</td>
<td class="r table_radio">
<input type="text" value="{$data['promote_scale']}" name="promote_scale" id="promote_scale" class="input" placeholder="请输入推广规模" maxlength="50" disabled>
</td>
</tr>
<tr>
<td class="l">公会等级:</td>
<td class="r" style="width: 50px;">
<select name="sociaty_level" id="sociaty_level" class="select_gallery" disabled>
<option>请选择公会等级</option>
<option value="1" <if condition="$data['sociaty_level'] eq 1">selected</if>>S</option>
<option value="2" <if condition="$data['sociaty_level'] eq 2">selected</if>>A</option>
<option value="3" <if condition="$data['sociaty_level'] eq 3">selected</if>>B</option>
<option value="4" <if condition="$data['sociaty_level'] eq 4">selected</if>>其他</option>
</select>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l">流水:</td>
<td class="r table_radio">
<input type="text" value="{$data['turnover']}" name="turnover" id="turnover" class="input" placeholder="请输入流水" maxlength="50" disabled>
</td>
</tr>
<tr>
<td class="l">地址:</td>
<td class="r table_radio">
<input type="text" value="{$data['address']}" name="address" id="address" class="input" placeholder="请输入地址" maxlength="100" disabled>
</td>
</tr>
<tr>
<td class="l">联盟信息:</td>
<td class="r table_radio">
<input type="text" value="{$data['league_info']}" name="league_info" id="league_info" class="input" placeholder="请输入联盟信息" maxlength="50" disabled>
</td>
</tr>
<tr>
<td class="l noticeinfo">是否为意向客户:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label>
<input type="radio" class="inp_radio" value="0" name="is_potential" <if condition="$data['is_potential'] eq 0">checked</if> disabled> 否
</label>
<label>
<input type="radio" class="inp_radio" value="1" name="is_potential" <if condition="$data['is_potential'] eq 1">checked</if> disabled> 是
</label>
</span>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l">备注信息:</td>
<td class="r">
<textarea name="remark" class="txt" placeholder="请输入备注信息" maxlength="100" disabled>{$data['remark']}</textarea>
</td>
</tr>
<!--<tr>
<td class="l">沟通时间:</td>
<td class="r">
<input type="text" class="txt time time1" name="communication_time" value="" placeholder="请选择沟通时间">
</td>
</tr>-->
<tr>
<td class="l">对接人:</td>
<td class="r">
<input type="text" class="txt" name="interface_person" value="{$data['interface_person']}" placeholder="对接人" disabled>
</td>
</tr>
</tbody>
</table>
</div>
<div class="form-item cf">
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="{:U('SocietyInfo/lists')}" >
返回
</a>
</div>
</form>
</div>
</div>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$meta_title}">
<input type="hidden" name="url" value="SocietyInfo/add">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script type="text/javascript">
$(function() {
areaInit();
var province = document.getElementById('province');
//给选择框一个高度可直接写进数据不然要先创建dom元素option再录值
province.length=provinces.length;
for(var i=0;i<provinces.length;i++){
if (province.options[i].text == "{$data['province']}"
|| province.options[i].text.substring(0, 2) == "{$data['province']}".substring(0, 2)
) {
province.selectedIndex = province.options[i].index;
province.options[i].selected = true;
$("#province").change();
break;
}
}
var city = document.getElementById('city');
city.length=citys.length;
for(var i=0;i<citys.length;i++){
if (city.options[i].text == "{$data['city']}"
|| city.options[i].text.substring(0, 2) == "{$data['city']}".substring(0, 2)
) {
city.selectedIndex = city.options[i].index;
city.options[i].selected = true;
break;
}
}
});
$('.time1').datetimepicker({
format: 'yyyy-mm-dd H:i:0',
language:"zh-CN",
minView: 0,
autoclose:true,
showClear: true,
});
//导航高亮
highlight_subnav("{:U('SocietyInfo/lists')}");
</script>
<script>
$("#submit").on("click",function(){
var cres = $('form').serializeArray();
if ($("#province").val() == "请选择省份" || !$("#province").val()) {
// layer.msg('请选择省份');return ;
}
if (!$("#city").val()) {
// layer.msg('请选择城市');return ;
}
if (!$("#company_name").val()) {
layer.msg('请输入公司名');return ;
}
//添加
$.ajax({
url:"{:U('SocietyInfo/edit')}",
type:"post",
data:cres,
dataType:"json",
success:function(data){
if(data.status == 1){
layer.msg(data.info,function(){
window.location.href="{:U('SocietyInfo/lists')}";
});
}else{
layer.msg(data.info);
}
},
error:function(e){
}
});
});
</script>
</block>

@ -68,17 +68,29 @@
<!-- </if>-->
</td>
</tr>
<tr>
<td class="l">申请离职时间:</td>
<td class="r">
<input type="text" id="apply_leave_time" name="apply_leave_time" class="" value="{$list['apply_leave_time']}" placeholder="申请离职时间" autocomplete="off"/>
</td>
</tr>
<tr>
<td class="l">离职时间:</td>
<td class="r">
<input type="text" id="leave_time" name="leave_time" class="" value="{$list['leave_time']}" placeholder="离职时间" autocomplete="off"/>
</td>
</tr>
<tr>
<td class="l noticeinfo">离职状态</td>
<td class="r table_radio table_radio2">
<span class="table_btn">
<label>
<input type="radio" class="inp_radio" value="1" name="work_status" <if condition="$list['work_status'] eq 1"> checked</if>> 离职
<input disabled type="radio" class="inp_radio" value="1" name="work_status" <if condition="$list['work_status'] eq 1"> checked</if>> 离职
</label>
<label>
<input type="radio" class="inp_radio" value="0" name="work_status" <if condition="$list['work_status'] eq 0"> checked</if> > 未离职
<input disabled type="radio" class="inp_radio" value="0" name="work_status" <if condition="$list['work_status'] eq 0"> checked</if> > 未离职
</label></span>
<span class="notice-text" style="line-height:1.4;width:68%;">离职状态,市场专员离职发放后自动标志未离职</span>
<!-- <span class="notice-text" style="line-height:1.4;width:68%;">离职状态,市场专员离职发放后自动标志未离职</span>-->
</td>
</tr>
@ -119,6 +131,11 @@
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js" ></script>
<script src="__STATIC__/jquery.cookie.js" charset="utf-8"></script>
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<div class="common_settings">
@ -134,6 +151,29 @@
<block name="script">
<script>
$('#apply_leave_time').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
showMeridian:true,
pickDate:true,
minView: 2,
autoclose: true,
pickTime:true,
todayBtn:true,
});
$('#leave_time').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
showMeridian:true,
pickDate:true,
minView: 2,
autoclose: true,
pickTime:true,
todayBtn:true,
});
$bind_wx=$("#bind_wx").prop('checked');
if($bind_wx){
cpsw=check(1);

@ -22,6 +22,9 @@
<div class="sleft">
<input type="text" name="nickname" class="" value="{:I('nickname')}" placeholder="管理员账号">
</div>
<div class="sleft">
<input type="text" name="real_name" class="" value="{:I('real_name')}" placeholder="真实姓名">
</div>
<div class="sleft">
<select name="status">
<option value="">状态</option>
@ -42,6 +45,7 @@
<th class="">账号ID</th>
<th class="">管理员账号</th>
<th class="">真实姓名</th>
<th class="">角色类型</th>
<th class="">登录次数</th>
<th class="">最后登录时间</th>
@ -56,6 +60,7 @@
<tr>
<td>{$vo.uid} </td>
<td>{$vo.nickname}</td>
<td>{$vo.real_name}</td>
<td>
{:get_auth_group_name($vo['uid'])}
</td>

@ -0,0 +1,45 @@
<?php
namespace Base\Factory;
use Base\Factory\LeavePercentageFactory;
class BaseFactory {
private static $instance ;
private $suffix = "Factory";
public $classes = [
'LeavePercentageFactory' => LeavePercentageFactory::class,
];
public function __construct()
{
}
//获取实例化接口
static function getInstance() {
if (!(self::$instance instanceof self)) {
self::$instance = new self();
}
return self::$instance;
}
//工厂类返回实例化类
public function factoryClass($name = '') {
if (!$name) {
return false;
}
$className = "{$name}{$this->suffix}";
if ($this->classes[$className]) {
return (new $this->classes[$className]);
} else {
return false;
}
}
}

@ -0,0 +1,106 @@
<?php
namespace base\Factory;
class LeavePercentageFactory
{
// private $isLeave = [0=>''];
private $model;
static $arrUnSettlementList = [];
public function __construct()
{
$this->model = M("ucenter_member");
}
/**
* 不结算的管理员列表
* @return array
*/
public function unSettlementList() {
if (self::$arrUnSettlementList) {
return;
}
$data = $this->model ->where(['work_status'=>1])->select();
$returnData = [];
foreach ($data as $key => $value) {
$returnData[$value['id']] = $value['leave_time'];
}
self::$arrUnSettlementList = $returnData;
}
public function returnUnSettlementList() {
if (!self::$arrUnSettlementList) {
$this->unSettlementList();
}
return self::$arrUnSettlementList;
}
/**
* 判断是否结算绩效
* @param string $date
* @param int $admin_id
* @return bool
*/
public function isSettlement($date = '',$admin_id= 0) {
//未离职结算
if (!isset(self::$arrUnSettlementList[$admin_id])) {
return true;
}
//判断往后日期都不结算
if (self::$arrUnSettlementList[$admin_id]
&&date("Y-m",self::$arrUnSettlementList[$admin_id])!=$date
&&strtotime($date)>self::$arrUnSettlementList[$admin_id]) {
return false;
}
//当月离职时间在职时间小于30天不结算
if (self::$arrUnSettlementList[$admin_id]
&&date("Y-m",self::$arrUnSettlementList[$admin_id])==$date
&&(strtotime(date("Y-m-t",strtotime($date)))-self::$arrUnSettlementList[$admin_id])<86400*30) {
return false;
}
return true;
}
/**
* 离职定时器方法
*/
public function leaveTiming() {
$memberData = $this->model->where(['leave_time'=>['gt',0],"work_status"=>0])->select();
$where = [];
foreach ($memberData as $key => $value) {
//判断离职时间是否已经达到
if (time() >= $value['leave_time']) {
array_push($where,$value['id']);
}
}
//离职时间达到列表
if($where) {
$this->model
->where(['id'=>['in',$where]])
->save(['work_status'=>1]);
}
}
}

@ -534,4 +534,32 @@ class ExcelPaymentController extends BaseController
}
//模板导出
public function downloadTemplate()
{
header("Content-type: text/html; charset=utf-8");
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
Vendor("PHPExcel.PHPExcel");
$objPHPExcel = new \PHPExcel();
$objReader = \PHPExcel_IOFactory::createReader('Excel2007');
//设置模板文件
$objPHPExcel = $objReader->load("Public/Admin/excel/underPayment.xlsx");
$fileName = "线下打款导入模板";
ob_end_clean();//清除缓冲区,避免乱码
header('pragma:public');
header('Content-type:application/vnd.ms-excel;charset=utf-8;name="' . $fileName .'".xls');
header("Content-Disposition:attachment;filename={$fileName}.xls");//attachment新窗口打印inline本窗口打印
$objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output');
exit;
}
}

@ -53,6 +53,9 @@
<button class="submit_btn" id="submit_btn">
保存
</button>
<a class="submit_btn " alt="下载模板" title="下载模板" href="{:U('downloadTemplate')}">
下载模板
</a>
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back();">
返回
</a>

@ -2781,3 +2781,14 @@ ALTER TABLE `tab_testing_resource_batch`
ADD COLUMN `verify_admin_id` int(11) NOT NULL DEFAULT 0 COMMENT '審核管理員ID' AFTER `verify_status`;
ALTER TABLE `tab_testing_resource_batch`
ADD COLUMN `apply_admin_id` int(11) NOT NULL DEFAULT 0 COMMENT '申請管理員ID' AFTER `apply_promote_id`;
ALTER TABLE `tab_society_info`
ADD COLUMN `sociaty_level` tinyint(2) NOT NULL DEFAULT 0 COMMENT '公会等级 1S 2A 3B 4其他 ' AFTER `create_account`;
ALTER TABLE `sys_ucenter_member`
ADD COLUMN `apply_leave_time` int(11) NOT NULL DEFAULT 0 COMMENT '申请离职时间' AFTER `work_status`,
ADD COLUMN `leave_time` int(11) NOT NULL DEFAULT 0 COMMENT '离职时间' AFTER `apply_leave_time`;
ALTER TABLE `tab_company_statement_info`
ADD COLUMN `is_reward_fine_split` tinyint(255) NULL DEFAULT 0 COMMENT '是否是奖罚分离生成 0 否 1 是' AFTER `pay_check_time`;

@ -1,39 +1,41 @@
var provinces = ['请选择省份','北京市','上海市','天津市','重庆市','河北省','山西省','内蒙古省','辽宁省','吉林省','黑龙江省','江苏省','浙江省','安徽省','福建省','江西省','山东省','河南省','湖北省','湖南省','广东省','广西省','海南省','四川省','贵州省','云南省','西藏省','陕西省','甘肃省','宁夏省','青海省','新疆省','香港','澳门','台湾'];
var provinces = ['请选择省份','北京市','上海市','天津市','重庆市','河北省','山西省','内蒙古省','辽宁省','吉林省','黑龙江省','江苏省','浙江省','安徽省','福建省','江西省','山东省','河南省','湖北省','湖南省','广东省','广西省','海南省','四川省','贵州省','云南省','西藏省','陕西省','甘肃省','宁夏省','青海省','新疆省','香港','澳门','台湾','其他'];
var citys = [['请选择城市'],
["东城区", "西城区", "崇文区", "宣武区", "朝阳区", "丰台区", "石景山区", "海淀区", "门头沟区", "房山区", "通州区", "顺义区", "昌平区", "大兴区", "怀柔区", "平谷区", "密云县", "延庆县"],
["黄浦区", "卢湾区", "徐汇区", "长宁区", "静安区", "普陀区", "虹口区", "杨浦区", "闵行区", "宝山区", "嘉定区", "浦东新区", "金山区", "松江区", "青浦区", "南汇区", "奉贤区", "崇明县"],
["和平区", "河东区", "河西区", "南开区", "河北区", "红桥区", "塘沽区", "汉沽区", "大港区", "东丽区", "西青区", "津南区", "北辰区", "武清区", "宝坻区", "宁河县", "静海县", "蓟县"],
["万州区", "涪陵区", "渝中区", "大渡口区", "江北区", "沙坪坝区", "九龙坡区", "南岸区", "北碚区", "万盛区", "双桥区", "渝北区", "巴南区", "黔江区", "长寿区", "綦江县", "潼南县", "铜梁县", "大足县", "荣昌县", "璧山县", "梁平县", "城口县", "丰都县", "垫江县", "武隆县", "忠县", "开县", "云阳县", "奉节县", "巫山县", "巫溪县", "石柱土家族自治县", "秀山土家族苗族自治县", "酉阳土家族苗族自治县", "彭水苗族土家族自治县", "江津市", "合川市", "永川市", "南川市"],
["石家庄市","张家口市","承德市","秦皇岛市","唐山市","廊坊市","保定市","衡水市","沧州市","邢台市","邯郸市"],
["太原市","朔州市","大同市","阳泉市","长治市","晋城市","忻州市","晋中市","临汾市","吕梁市","运城市"],
["呼和浩特市","包头市","乌海市","赤峰市","通辽市","呼伦贝尔市","鄂尔多斯市","乌兰察布市","巴彦淖尔市","兴安盟","锡林郭勒盟","阿拉善盟"],
["沈阳市","朝阳市","阜新市","铁岭市","抚顺市","本溪市","辽阳市","鞍山市","丹东市","大连市","营口市","盘锦市","锦州市","葫芦岛市"],
["长春市","白城市","松原市","吉林市","四平市","辽源市","通化市","白山市","延边州"],
["哈尔滨市","齐齐哈尔市","七台河市","黑河市","大庆市","鹤岗市","伊春市","佳木斯市","双鸭山市","鸡西市","牡丹江市","绥化市","大兴安岭地区"],
["南京市","徐州市","连云港市","宿迁市","淮安市","盐城市","扬州市","泰州市","南通市","镇江市","常州市","无锡市","苏州市"],
["杭州市","湖州市","嘉兴市","舟山市","宁波市","绍兴市","衢州市","金华市","台州市","温州市","丽水市"],
["合肥市","宿州市","淮北市","亳州市","阜阳市","蚌埠市","淮南市","滁州市","马鞍山市","芜湖市","铜陵市","安庆市","黄山市","六安市","巢湖市","池州市","宣城市"],
["福州市","南平市","莆田市","三明市","泉州市","厦门市","漳州市","龙岩市","宁德市"],
["南昌市","九江市","景德镇市","鹰潭市","新余市","萍乡市","赣州市","上饶市","抚州市","宜春市","吉安市"],
["济南市","青岛市","聊城市","德州市","东营市","淄博市","潍坊市","烟台市","威海市","日照市","临沂市","枣庄市","济宁市","泰安市","莱芜市","滨州市","菏泽市"],
["郑州市","开封市","三门峡市","洛阳市","焦作市","新乡市","鹤壁市","安阳市","濮阳市","商丘市","许昌市","漯河市","平顶山市","南阳市","信阳市","周口市","驻马店市","济源市"],
["武汉市","十堰市","襄樊市","荆门市","孝感市","黄冈市","鄂州市","黄石市","咸宁市","荆州市","宜昌市","随州市","省直辖县级行政单位","恩施州"],
["长沙市","张家界市","常德市","益阳市","岳阳市","株洲市","湘潭市","衡阳市","郴州市","永州市","邵阳市","怀化市","娄底市","湘西州"],
["广州市","深圳市","清远市","韶关市","河源市","梅州市","潮州市","汕头市","揭阳市","汕尾市","惠州市","东莞市","珠海市","中山市","江门市","佛山市","肇庆市","云浮市","阳江市","茂名市","湛江市"],
["南宁市","桂林市","柳州市","梧州市","贵港市","玉林市","钦州市","北海市","防城港市","崇左市","百色市","河池市","来宾市","贺州市"],
["海口市","三亚市","省直辖县级行政单位"],
["成都市","广元市","绵阳市","德阳市","南充市","广安市","遂宁市","内江市","乐山市","自贡市","泸州市","宜宾市","攀枝花市","巴中市","达州市","资阳市","眉山市","雅安市","阿坝州","甘孜州","凉山州"],
["贵阳市","六盘水市","遵义市","安顺市","毕节地区","铜仁地区","黔东南州","黔南州","黔西南州"],
["昆明市","曲靖市","玉溪市","保山市","昭通市","丽江市","思茅市","临沧市","德宏州","怒江州","迪庆州","大理州","楚雄州","红河州","文山州","西双版纳州"],
["拉萨市","那曲地区","昌都地区","林芝地区","山南地区","日喀则地区","阿里地区"],
["西安市","延安市","铜川市","渭南市","咸阳市","宝鸡市","汉中市","榆林市","安康市","商洛市"],
["兰州市","嘉峪关市","白银市","天水市","武威市","酒泉市","张掖市","庆阳市","平凉市","定西市","陇南市","临夏州","甘南州"],
["西宁市","海东地区","海北州","海南州","黄南州","果洛州","玉树州","海西州"],
["银川市","石嘴山市","吴忠市","固原市","中卫市"],
["乌鲁木齐市","克拉玛依市","自治区直辖县级行政单位","喀什地区","阿克苏地区","和田地区","吐鲁番地区","哈密地区","克孜勒苏柯州","博尔塔拉州","昌吉州","巴音郭楞州","伊犁州","塔城地区","阿勒泰地区"],
["香港"],
["澳门"],
["台北市","高雄市","台中市","花莲市","基隆市","嘉义市","金门市","连江市","苗栗市","南投市","澎湖市","屏东市","台东市","台南市","桃园市","新竹市","宜兰市","云林市","彰化市"]];
["东城区", "西城区", "崇文区", "宣武区", "朝阳区", "丰台区", "石景山区", "海淀区", "门头沟区", "房山区", "通州区", "顺义区", "昌平区", "大兴区", "怀柔区", "平谷区", "密云县", "延庆县","其他"],
["黄浦区", "卢湾区", "徐汇区", "长宁区", "静安区", "普陀区", "虹口区", "杨浦区", "闵行区", "宝山区", "嘉定区", "浦东新区", "金山区", "松江区", "青浦区", "南汇区", "奉贤区", "崇明县","其他"],
["和平区", "河东区", "河西区", "南开区", "河北区", "红桥区", "塘沽区", "汉沽区", "大港区", "东丽区", "西青区", "津南区", "北辰区", "武清区", "宝坻区", "宁河县", "静海县", "蓟县","其他"],
["万州区", "涪陵区", "渝中区", "大渡口区", "江北区", "沙坪坝区", "九龙坡区", "南岸区", "北碚区", "万盛区", "双桥区", "渝北区", "巴南区", "黔江区", "长寿区", "綦江县", "潼南县", "铜梁县", "大足县", "荣昌县", "璧山县", "梁平县", "城口县", "丰都县", "垫江县", "武隆县", "忠县", "开县", "云阳县", "奉节县", "巫山县", "巫溪县", "石柱土家族自治县", "秀山土家族苗族自治县", "酉阳土家族苗族自治县", "彭水苗族土家族自治县", "江津市", "合川市", "永川市", "南川市","其他"],
["石家庄市","张家口市","承德市","秦皇岛市","唐山市","廊坊市","保定市","衡水市","沧州市","邢台市","邯郸市","其他"],
["太原市","朔州市","大同市","阳泉市","长治市","晋城市","忻州市","晋中市","临汾市","吕梁市","运城市","其他"],
["呼和浩特市","包头市","乌海市","赤峰市","通辽市","呼伦贝尔市","鄂尔多斯市","乌兰察布市","巴彦淖尔市","兴安盟","锡林郭勒盟","阿拉善盟","其他"],
["沈阳市","朝阳市","阜新市","铁岭市","抚顺市","本溪市","辽阳市","鞍山市","丹东市","大连市","营口市","盘锦市","锦州市","葫芦岛市","其他"],
["长春市","白城市","松原市","吉林市","四平市","辽源市","通化市","白山市","延边州","其他"],
["哈尔滨市","齐齐哈尔市","七台河市","黑河市","大庆市","鹤岗市","伊春市","佳木斯市","双鸭山市","鸡西市","牡丹江市","绥化市","大兴安岭地区","其他"],
["南京市","徐州市","连云港市","宿迁市","淮安市","盐城市","扬州市","泰州市","南通市","镇江市","常州市","无锡市","苏州市","其他"],
["杭州市","湖州市","嘉兴市","舟山市","宁波市","绍兴市","衢州市","金华市","台州市","温州市","丽水市","其他"],
["合肥市","宿州市","淮北市","亳州市","阜阳市","蚌埠市","淮南市","滁州市","马鞍山市","芜湖市","铜陵市","安庆市","黄山市","六安市","巢湖市","池州市","宣城市","其他"],
["福州市","南平市","莆田市","三明市","泉州市","厦门市","漳州市","龙岩市","宁德市","其他"],
["南昌市","九江市","景德镇市","鹰潭市","新余市","萍乡市","赣州市","上饶市","抚州市","宜春市","吉安市","其他"],
["济南市","青岛市","聊城市","德州市","东营市","淄博市","潍坊市","烟台市","威海市","日照市","临沂市","枣庄市","济宁市","泰安市","莱芜市","滨州市","菏泽市","其他"],
["郑州市","开封市","三门峡市","洛阳市","焦作市","新乡市","鹤壁市","安阳市","濮阳市","商丘市","许昌市","漯河市","平顶山市","南阳市","信阳市","周口市","驻马店市","济源市","其他"],
["武汉市","十堰市","襄樊市","荆门市","孝感市","黄冈市","鄂州市","黄石市","咸宁市","荆州市","宜昌市","随州市","省直辖县级行政单位","恩施州","其他"],
["长沙市","张家界市","常德市","益阳市","岳阳市","株洲市","湘潭市","衡阳市","郴州市","永州市","邵阳市","怀化市","娄底市","湘西州","其他"],
["广州市","深圳市","清远市","韶关市","河源市","梅州市","潮州市","汕头市","揭阳市","汕尾市","惠州市","东莞市","珠海市","中山市","江门市","佛山市","肇庆市","云浮市","阳江市","茂名市","湛江市","其他"],
["南宁市","桂林市","柳州市","梧州市","贵港市","玉林市","钦州市","北海市","防城港市","崇左市","百色市","河池市","来宾市","贺州市","其他"],
["海口市","三亚市","省直辖县级行政单位","其他"],
["成都市","广元市","绵阳市","德阳市","南充市","广安市","遂宁市","内江市","乐山市","自贡市","泸州市","宜宾市","攀枝花市","巴中市","达州市","资阳市","眉山市","雅安市","阿坝州","甘孜州","凉山州","其他"],
["贵阳市","六盘水市","遵义市","安顺市","毕节地区","铜仁地区","黔东南州","黔南州","黔西南州","其他"],
["昆明市","曲靖市","玉溪市","保山市","昭通市","丽江市","思茅市","临沧市","德宏州","怒江州","迪庆州","大理州","楚雄州","红河州","文山州","西双版纳州","其他"],
["拉萨市","那曲地区","昌都地区","林芝地区","山南地区","日喀则地区","阿里地区","其他"],
["西安市","延安市","铜川市","渭南市","咸阳市","宝鸡市","汉中市","榆林市","安康市","商洛市","其他"],
["兰州市","嘉峪关市","白银市","天水市","武威市","酒泉市","张掖市","庆阳市","平凉市","定西市","陇南市","临夏州","甘南州","其他"],
["西宁市","海东地区","海北州","海南州","黄南州","果洛州","玉树州","海西州","其他"],
["银川市","石嘴山市","吴忠市","固原市","中卫市","其他"],
["乌鲁木齐市","克拉玛依市","自治区直辖县级行政单位","喀什地区","阿克苏地区","和田地区","吐鲁番地区","哈密地区","克孜勒苏柯州","博尔塔拉州","昌吉州","巴音郭楞州","伊犁州","塔城地区","阿勒泰地区","其他"],
["香港","其他"],
["澳门","其他"],
["台北市","高雄市","台中市","花莲市","基隆市","嘉义市","金门市","连江市","苗栗市","南投市","澎湖市","屏东市","台东市","台南市","桃园市","新竹市","宜兰市","云林市","彰化市","其他"],
["其他"]
];
function areaInit(){
// 注意这里是要通过 id 获取元素,而不是通过 class 获取

Loading…
Cancel
Save