master
yulingwei 5 years ago
commit dfe52865bd

@ -48,7 +48,8 @@ class AdminController extends Controller {
if ( false === $access ) {
$this->error('403:禁止访问');
}elseif(null === $access ){
if(CONTROLLER_NAME !== "Ajax"){//ajax放行
$access_controller = ['Ajax', 'Finance', 'FinancePromote', 'PayChannel'];
if(!in_array(CONTROLLER_NAME, $access_controller)){//ajax放行
//检测访问权限
$rule = strtolower(MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME);
if($rule == "admin/statistics/overview"||$rule == "admin/spend/lists"){//第一级菜单单独判断

@ -191,6 +191,10 @@ class AjaxController extends ThinkController{
foreach ($data as &$item) {
$item['nickname'] = $item['account'] . ($item['nickname'] ? "({$item['nickname']})" : "");
}
if($company_id <= 0){
array_unshift($data,["id"=>0,"nickname"=>"官方渠道","account"=>"官方渠道","company_id"=>0]);
}
$this->ajaxReturn(['code'=>1, 'msg'=>'获取成功', 'data'=>$data]);
}

@ -6,6 +6,7 @@ namespace Admin\Controller;
use Admin\Model\SpendModel;
use Think\Think;
use Base\Tool\Printer;
use Base\Tool\TaskClient;
use Base\Service\PromoteService;
use GuzzleHttp\Client;
@ -324,4 +325,45 @@ class ConsoleController extends Think {
}
);
}
public function divideWarnCheck()
{
$redis = new \Org\RedisSDK\Redis(['host'=>'127.0.0.1','port'=>6379],[]);
$warns = M('partner_divide_warn', 'tab_')->alias('pdw')
->field('pdw.*, cgr.ratio, sum(s.pay_amount) as total_amount, p.partner')
->join('tab_partner p on pdw.partner_id = p.id')
->join('tab_game g on pdw.partner_id = g.partner_id')
->join('tab_cp_game_ratio cgr on cgr.game_id = g.id and begin_total_amount = 0 and is_del = 0')
->join('tab_spend s on s.game_id = g.id')
->where(['pdw.status'=>1, 's.pay_status'=>1])
->group('pdw.id')
->select();
if (!$warns) return;
$taskClient = new TaskClient();
$current_time = date('Y-m-d H:i:s');
foreach ($warns as $info) {
if (!$info['ratio']) return;
$total_amount = ceil(($info['ratio'] / 100) * $info['total_amount']);
$cacheKey = "divide:warn:check:{$info['partner_id']}";
if (!($lastStep = $redis->get($cacheKey))) {
$lastStep = 0;
}
if ((intval($info['advance_amount']) - intval($total_amount)) <= $info['warming_amount']) {
if ($total_amount - $lastStep >= $info['warn_frequency']) { // 达到预警
// 发送预警短信
$content = "{$info['partner']}的预付分成款已于{$current_time}余额不足{$info['warming_amount']}元,请尽快进行充值。";
$sendRes = $taskClient->sendSmsBatch(json_decode($info['phones'], true), $content);
if ($sendRes['code'] != TaskClient::SUCCESS) {
continue;
}
// 变换缓存值如果为0需要设置过期时间
if ($lastStep) {
$redis->set($cacheKey, $total_amount);
} else {
$redis->setex($cacheKey, 86400 * 30, $total_amount);
}
}
}
}
}
}

@ -10,7 +10,7 @@ use User\Api\UserApi as UserApi;
class DepositController extends ThinkController {
const model_name = 'Deposit';
public function lists(){
public function lists($p = 1){
if(isset($_REQUEST['user_account'])){
$map['user_account']=array('like','%'.trim($_REQUEST['user_account']).'%');
unset($_REQUEST['user_account']);
@ -38,16 +38,10 @@ class DepositController extends ThinkController {
}else if(isset($_REQUEST['promote_id']) && $_REQUEST['promote_id']==0){
$map['promote_id']=array('elt',0);
unset($_REQUEST['promote_id']);
unset($_REQUEST['promote_name']);
}elseif(isset($_REQUEST['promote_name'])&&$_REQUEST['promote_id']==-1){
$map['promote_id']=get_promote_id($_REQUEST['promote_name']);
unset($_REQUEST['promote_id']);
unset($_REQUEST['promote_name']);
}else{
$map['promote_id']=$_REQUEST['promote_id'];
unset($_REQUEST['promote_id']);
unset($_REQUEST['promote_name']);
}
if(isset($_REQUEST['time-start'])&&isset($_REQUEST['time-end'])){
$map['create_time'] =array('BETWEEN',array(strtotime($_REQUEST['time-start']),strtotime($_REQUEST['time-end'])+24*60*60-1));
@ -94,6 +88,47 @@ class DepositController extends ThinkController {
$map1=$map;
$map1['pay_status']=1;
// if($_REQUEST['promote_id']||$_REQUEST['promote_id']=='0') {
// $page = intval($p);
// $page = $page ? $page : 1; //默认显示第一页数据
// if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
// $map1['order_status'] = 1;
// unset($map1['pay_status']);
// if ($map['pay_status']) {
// $map['order_status']=$map['pay_status'];
// }
//
// $total=null_to_0(D('coin_pay_order')->where($map1)->sum('pay_amount'));
// $ttotal=null_to_0(D('coin_pay_order')->where('create_time'.total(1))->where(array('pay_status'=>1))->sum('pay_amount'));
// $ytotal=null_to_0(D('coin_pay_order')->where('create_time'.total(5))->where(array('pay_status'=>1))->sum('pay_amount'));
// $this->assign('total',$total);
// $this->assign('ttotal',$ttotal);
// $this->assign('ytotal',$ytotal);
//
// $data = D('coin_pay_order')
// /* 查询指定字段,不指定则查询所有字段 */
// ->field('*,order_status as pay_status')
// // 查询条件
// ->where($map)
// /* 默认通过id逆序排列 */
// ->order("id desc")
// /* 数据分页 */
// ->page($page, $row)
// /* 执行查询 */
// ->select();
//
// /* 查询记录总数 */
// $count = D('coin_pay_order')->where($map)->count();
//
// $page = set_pagination($count,$row);
// if($page) {$this->assign('_page', $page);}
//
// $this->assign('list_data', $data);
// $this->meta_title = '平台币充值列表';
// $this->display('lists');die();
// }
$total=null_to_0(D(self::model_name)->where($map1)->sum('pay_amount'));
$ttotal=null_to_0(D(self::model_name)->where('create_time'.total(1))->where(array('pay_status'=>1))->sum('pay_amount'));
$ytotal=null_to_0(D(self::model_name)->where('create_time'.total(5))->where(array('pay_status'=>1))->sum('pay_amount'));
@ -105,9 +140,122 @@ class DepositController extends ThinkController {
$this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Deposit/lists','status'=>1])->find());
$this->assign("is_admin",is_administrator());
parent::lists(self::model_name,$_GET["p"],$map);
}
public function lists_secord() {
if(isset($_REQUEST['user_account'])){
$map['user_account']=array('like','%'.trim($_REQUEST['user_account']).'%');
unset($_REQUEST['user_account']);
}
if(isset($_REQUEST['order_number'])){
$map['order_number']=array('like','%'.trim($_REQUEST['order_number']).'%');
unset($_REQUEST['order_number']);
}
if(isset($_REQUEST['pay_ip'])){
$map['pay_ip']=array('like','%'.trim($_REQUEST['pay_ip']).'%');
unset($_REQUEST['pay_ip']);
}
setPowerPromoteIds($map,'promote_id');
if(!isset($_REQUEST['promote_id'])){
}else if(isset($_REQUEST['promote_id']) && $_REQUEST['promote_id']==0){
$map['promote_id']=array('elt',0);
}elseif(isset($_REQUEST['promote_name'])&&$_REQUEST['promote_id']==-1){
$map['promote_id']=get_promote_id($_REQUEST['promote_name']);
}else{
$map['promote_id']=$_REQUEST['promote_id'];
}
if(isset($_REQUEST['time-start'])&&isset($_REQUEST['time-end'])){
$map['create_time'] =array('BETWEEN',array(strtotime($_REQUEST['time-start']),strtotime($_REQUEST['time-end'])+24*60*60-1));
unset($_REQUEST['time-start']);unset($_REQUEST['time-end']);
}elseif(isset($_REQUEST['time-start'])){
$map['create_time'] = ['GT',strtotime(I('time-start'))];
unset($_REQUEST['time-start']);
}elseif(isset($_REQUEST['time-end'])){
$map['create_time'] = ['LT',strtotime(I('time-end'))+86399];
unset($_REQUEST['time-end']);
}
if(isset($_REQUEST['start'])&&isset($_REQUEST['end'])){
$map['create_time'] =array('BETWEEN',array(strtotime($_REQUEST['start']),strtotime($_REQUEST['end'])+24*60*60-1));
unset($_REQUEST['start']);unset($_REQUEST['end']);
}elseif(isset($_REQUEST['start'])){
$map['create_time'] = ['GT',strtotime(I('start'))];
unset($_REQUEST['start']);
}elseif(isset($_REQUEST['end'])){
$map['create_time'] = ['LT',strtotime(I('end'))+86399];
unset($_REQUEST['end']);
}
if(isset($_REQUEST['pay_way'])) {
if ($_REQUEST['pay_way'] == "2") {
$map['pay_way'] = ['in', '2,3,4'];
} else {
$map['pay_way'] = $_REQUEST['pay_way'];
}
unset($_REQUEST['pay_way']);
}
if(isset($_REQUEST['pay_status'])){
$map['pay_status']=$_REQUEST['pay_status'];
unset($_REQUEST['pay_status']);
}
if($_REQUEST['data_order']!=''){
$data_order=reset(explode(',',$_REQUEST['data_order']));
$data_order_type=end(explode(',',$_REQUEST['data_order']));
$this->assign('userarpu_order',$data_order);
$this->assign('userarpu_order_type',$data_order_type);
$sort = $data_order==3?'desc':'asc';
$map['order'] = $data_order_type.' '.$sort;
}
$map1=$map;
$map1['pay_status']=1;
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
$map1['order_status'] = 1;
unset($map1['pay_status']);
if ($map['pay_status']) {
$map['order_status']=$map['pay_status'];
}
$total=null_to_0(D('coin_pay_order')->where($map1)->sum('pay_amount'));
$ttotal=null_to_0(D('coin_pay_order')->where('create_time'.total(1))->where(array('pay_status'=>1))->sum('pay_amount'));
$ytotal=null_to_0(D('coin_pay_order')->where('create_time'.total(5))->where(array('pay_status'=>1))->sum('pay_amount'));
$this->assign('total',$total);
$this->assign('ttotal',$ttotal);
$this->assign('ytotal',$ytotal);
$data = D('coin_pay_order')
/* 查询指定字段,不指定则查询所有字段 */
->field('*,order_status as pay_status,order_number as pay_order_number')
// 查询条件
->where($map)
/* 默认通过id逆序排列 */
->order("id desc")
/* 数据分页 */
->page($page, $row)
/* 执行查询 */
->select();
/* 查询记录总数 */
$count = D('coin_pay_order')->where($map)->count();
$page = set_pagination($count,$row);
if($page) {$this->assign('_page', $page);}
$this->assign("is_admin",is_administrator());
$this->assign('list_data', $data);
$this->meta_title = '平台币充值列表';
$this->display();die();
}
public function send_lists(){

@ -1259,16 +1259,10 @@ class ExportController extends Controller
} else if (isset($_REQUEST['promote_id']) && $_REQUEST['promote_id'] == 0) {
$map['promote_id'] = array('elt', 0);
unset($_REQUEST['promote_id']);
unset($_REQUEST['promote_name']);
} elseif (isset($_REQUEST['promote_name']) && $_REQUEST['promote_id'] == -1) {
$map['promote_id'] = get_promote_id($_REQUEST['promote_name']);
unset($_REQUEST['promote_id']);
unset($_REQUEST['promote_name']);
} else {
$map['promote_id'] = $_REQUEST['promote_id'];
unset($_REQUEST['promote_id']);
unset($_REQUEST['promote_name']);
}
if (isset($_REQUEST['time-start']) && isset($_REQUEST['time-end'])) {
$map['create_time'] = array('BETWEEN', array(strtotime($_REQUEST['time-start']), strtotime($_REQUEST['time-end']) + 24 * 60 * 60 - 1));
@ -1290,31 +1284,32 @@ class ExportController extends Controller
}
$map1 = $map;
$map1['pay_status'] = 1;
$total = D('Deposit')->where($map1)->sum('pay_amount');
if (isset($map['pay_status']) && $map['pay_status'] == 0) {
$total = sprintf("%.2f", 0);
} else {
$total = sprintf("%.2f", $total);
}
$xlsCell = array(
array('pay_order_number', "订单号"),
array('user_account', "玩家账号"),
array('promote_account', L('Subordinate_channel')),
array('pay_amount', "充值平台币"),
array('pay_way', "充值方式", 'get_pay_way', '*'),
array('pay_ip', "充值ip"),
array('create_time', "充值时间"),
array('pay_status', L('Order_status'), 'get_info_status', '*', '9'),
array('', "共计充值{$total}"),
);
$xlsData = D('Deposit')
->where($map)
->order('id DESC')
->select();
foreach ($xlsData as $key => $value) {
$xlsData[$key]['create_time'] = date('Y-m-d H:i:s', $value['create_time']);
}
$total = D('Deposit')->where($map1)->sum('pay_amount');
if (isset($map['pay_status']) && $map['pay_status'] == 0) {
$total = sprintf("%.2f", 0);
} else {
$total = sprintf("%.2f", $total);
}
$xlsCell = array(
array('pay_order_number', "订单号"),
array('user_account', "玩家账号"),
array('promote_account', L('Subordinate_channel')),
array('pay_amount', "充值平台币"),
array('pay_way', "充值方式", 'get_pay_way', '*'),
array('pay_ip', "充值ip"),
array('create_time', "充值时间"),
array('pay_status', L('Order_status'), 'get_info_status', '*', '9'),
array('', "共计充值{$total}"),
);
$xlsData = D('Deposit')
->where($map)
->order('id DESC')
->select();
foreach ($xlsData as $key => $value) {
$xlsData[$key]['create_time'] = date('Y-m-d H:i:s', $value['create_time']);
}
// dd($xlsData);
break;
case 9:
@ -2235,6 +2230,104 @@ class ExportController extends Controller
$xlsData[] = $re_data;
}
break;
case 26:
$xlsName = $xlsName?$xlsName:L('Platform_currency_recharge');
if (isset($_REQUEST['user_account'])) {
$map['user_account'] = array('like', '%' . trim($_REQUEST['user_account']) . '%');
unset($_REQUEST['user_account']);
}
if (isset($_REQUEST['order_number'])) {
$map['order_number'] = array('like', '%' . trim($_REQUEST['order_number']) . '%');
unset($_REQUEST['order_number']);
}
if (isset($_REQUEST['pay_ip'])) {
$map['pay_ip'] = array('like', '%' . trim($_REQUEST['pay_ip']) . '%');
unset($_REQUEST['pay_ip']);
}
// $promoteRoot = getPowerPromoteIds();
// $data_empower_type = session('user_auth')['data_empower_type'];
//
// if ($promoteRoot) {
// $map['promote_id'] =array('in',$promoteRoot);
// } else if(!$promoteRoot&&$data_empower_type!=1){
// $map['id'] = array('lt',1);
// }
setPowerPromoteIds($map,'promote_id');
if (!isset($_REQUEST['promote_id'])) {
} else if (isset($_REQUEST['promote_id']) && $_REQUEST['promote_id'] == 0) {
$map['promote_id'] = array('elt', 0);
} elseif (isset($_REQUEST['promote_name']) && $_REQUEST['promote_id'] == -1) {
$map['promote_id'] = get_promote_id($_REQUEST['promote_name']);
} else {
$map['promote_id'] = $_REQUEST['promote_id'];
}
if (isset($_REQUEST['time-start']) && isset($_REQUEST['time-end'])) {
$map['create_time'] = array('BETWEEN', array(strtotime($_REQUEST['time-start']), strtotime($_REQUEST['time-end']) + 24 * 60 * 60 - 1));
unset($_REQUEST['time-start']);
unset($_REQUEST['time-end']);
}
if (isset($_REQUEST['start']) && isset($_REQUEST['end'])) {
$map['create_time'] = array('BETWEEN', array(strtotime($_REQUEST['start']), strtotime($_REQUEST['end']) + 24 * 60 * 60 - 1));
unset($_REQUEST['start']);
unset($_REQUEST['end']);
}
if (isset($_REQUEST['pay_way'])) {
$map['pay_way'] = $_REQUEST['pay_way'];
unset($_REQUEST['pay_way']);
}
if (isset($_REQUEST['pay_status'])) {
$map['pay_status'] = $_REQUEST['pay_status'];
unset($_REQUEST['pay_status']);
}
$map1 = $map;
$map1['pay_status'] = 1;
$map1['order_status'] = 1;
unset($map1['pay_status']);
if ($map['pay_status']) {
$map['order_status']=$map['pay_status'];
}
$total=null_to_0(D('coin_pay_order')->where($map1)->sum('pay_amount'));
if (isset($map['pay_status']) && $map['pay_status'] == 0) {
$total = sprintf("%.2f", 0);
} else {
$total = sprintf("%.2f", $total);
}
$xlsCell = array(
array('pay_order_number', "订单号"),
array('promote_account', L('Subordinate_channel')),
array('pay_amount', "充值平台币"),
array('pay_way', "充值方式"),
array('create_time', "充值时间"),
array('pay_status', L('Order_status'), 'get_info_status', '*', '9'),
array('', "共计充值{$total}"),
);
$xlsData = D('coin_pay_order')
/* 查询指定字段,不指定则查询所有字段 */
->field('*,order_status as pay_status,order_number as pay_order_number')
// 查询条件
->where($map)
/* 默认通过id逆序排列 */
->order("id desc")
/* 执行查询 */
->select();
// var_dump($xlsData);die();
foreach ($xlsData as $key => $value) {
$xlsData[$key]['create_time'] = date('Y-m-d H:i:s', $value['create_time']);
if(!$xlsData[$key]['pay_way']) {
$xlsData[$key]['pay_way'] = '无';
} else {
$xlsData[$key]['pay_way'] = get_pay_way($xlsData[$key]['pay_way'],'*');
}
}
// dd($xlsData);
break;
default:
$xlsName = $xlsCell = $xlsData = [];

@ -241,6 +241,51 @@ class FileController extends AdminController
$this->ajaxReturn($return);
}
/**
* 上传图片
* @author huajie <banhuajie@163.com>
*/
public function uploadPictureNotLimit()
{
//TODO: 用户登录检测
/* 返回标准数据 */
$return = array('status' => 1, 'info' => '上传成功', 'data' => '');
/* 调用文件上传组件上传文件 */
$Picture = D('Picture');
$pic_driver = C('PICTURE_UPLOAD_DRIVER');
$info = $Picture->upload(
$_FILES,
C('PICTURE_UPLOAD'),
C('PICTURE_UPLOAD_DRIVER'),
C("UPLOAD_{$pic_driver}_CONFIG"),
$_REQUEST['flag']
); //TODO:上传到远程服务器
// 添加水印
// if ($_REQUEST['flag']) {
// $this->addWatermarkOnPic($info['download']);
// }
/* 记录图片信息 */
if ($info) {
$return['status'] = 1;
if (empty($info['download'])) {
$file = $info['file'];
} else {
$file = $info['download'];
}
$return = array_merge($file, $return);
} else {
$return['status'] = 0;
$return['info'] = $Picture->getError();
}
ob_clean();
/* 返回JSON数据 */
$this->ajaxReturn($return);
}
public function uploadDoc()
{

@ -2,7 +2,8 @@
namespace Admin\Controller;
class FinancePromoteController extends AdminController
{
public function _initialize(Type $var = null)
public $COMPANY_NAME = "万盟天下科技";
public function _initialize()
{
parent::_initialize();
// echo "<pre>";
@ -114,7 +115,7 @@ class FinancePromoteController extends AdminController
} else {
$v['company_belong']='内团';
}
if(empty($v['company_name'])) $v['company_name']= "万盟天下科技";
if(empty($v['company_name'])) $v['company_name']= $this->COMPANY_NAME;
if(empty($v['p_id'])) $v['p_id']= "0";
if(!array_key_exists('cash_count',$v)) $v['cash_count']=0;
if(!array_key_exists('balance_coin_count',$v)) $v['balance_coin_count']=0;
@ -308,7 +309,7 @@ class FinancePromoteController extends AdminController
foreach($senddata as $k=>$v){
$v['company_belong']?$v['company_belong']='外团':$v['company_belong']='内团';
if(empty($v['company_name'])) $v['company_name']= "万盟天下科技";
if(empty($v['company_name'])) $v['company_name']= $this->COMPANY_NAME;
if(empty($v['promote_account'])) $v['promote_account']= "官方渠道";
if(!array_key_exists('cash_count',$v)) $v['cash_count']=0;
if(!array_key_exists('balance_coin_count',$v)) $v['balance_coin_count']=0;
@ -434,6 +435,8 @@ class FinancePromoteController extends AdminController
}
if (isset($_REQUEST['export'])) {
data2csv($data,$title, array(
"company_name"=>"推广公司",
"account"=>"会长账号",
"partner_name"=>"合作公司",
"game_name"=>"游戏",
"cash_count"=>"游戏现金金额",
@ -585,16 +588,26 @@ class FinancePromoteController extends AdminController
->field("s.game_id,s.game_name,p.partner as partner_name,
SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count,
SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count,
SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as inside_cash_count")
SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as inside_cash_count,
IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',s.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) p_id,
IFNULL(company_name,'{$this->COMPANY_NAME}') company_name")
->join('LEFT JOIN tab_game as g ON s.game_id=g.id')
->join("tab_promote promote ON s.promote_id = promote.id","left")
->join("tab_promote_company company ON promote.company_id = company.id","left")
->join('LEFT JOIN tab_partner as p ON g.partner_id=p.id')
->order("p_id asc,cash_count desc")
->where($map)
->group('s.game_id');
->group('p_id,game_id');
if ($row != 0) {
$query = $query->page($page,$row);
}
$data = $query->select();
// dump($data);die();
$data = $query->select(false);
$data = M()
->table("(".$data.") a")
->field("a.*,IFNULL(promote.account,'官方渠道') account")
->join("tab_promote promote ON a.p_id = promote.id","left")
->select();
return $data;
}
private function totalGameStatisticsData($map, $join = true)
@ -621,27 +634,15 @@ class FinancePromoteController extends AdminController
$map['pay_way'] = $_REQUEST['pay_way'];
$this->assign('pay_way', $map['pay_way']);
}
if (!empty($_REQUEST['pay_order_number'])) {
$map['pay_order_number'] = $_REQUEST['pay_order_number'];
}
// if (!empty(I('partner_id'))&&empty(I("game_id"))) {
// $wherePartner = I('partner_id');
// $gameId = M("game","tab_")->field("id")->where("partner_id={$wherePartner}")->select();
// $gameId = implode(',',array_column($gameId,'id'));
// $map['tab_spend.game_id'] = ['in',$gameId];
// }
if (!empty(I("game_id"))) {
$map['tab_spend.game_id'] = I("game_id");
}
if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type']) || isset($_REQUEST['partner_id'])) {
$map["tab_spend.game_id"] = array("in",implode(',', array_column(getGameidByPartnerNameType($_REQUEST['partner_id'],$_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) );
}
// if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type'])) {
// $map["tab_spend.game_id"] = array("in",implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) );
// }
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
$map['pay_time'] = ['between', [strtotime($_REQUEST['time_start']), strtotime($_REQUEST['time_end']) + 86399]];
} elseif (isset($_REQUEST['time_start'])) {
@ -649,7 +650,6 @@ class FinancePromoteController extends AdminController
} elseif (isset($_REQUEST['time_end'])) {
$map['pay_time'] = ['LT', strtotime($_REQUEST['time_end']) + 86399];
}
if ($_REQUEST['promote_id'] != '') {
if ($_REQUEST['promote_id'] == 0 || $_REQUEST['promote_type'] == 2) {
$map['tab_spend.promote_id'] = $_REQUEST['promote_id'];
@ -725,8 +725,6 @@ class FinancePromoteController extends AdminController
$count = count($count);
$page = set_pagination($count,$row);
// $map['pay_game_status'] = 1;
$total_cost = D('spend')->sumSpend($map, 'cost');//订单金额合计
$total_pay_amount = D('spend')->sumSpend($map, 'pay_amount');//实付金额合计
@ -888,7 +886,7 @@ class FinancePromoteController extends AdminController
$pmap['company_id'] = $_REQUEST['company_id'];
//获取公司名称
if($pmap['company_id'] == 0){
$title .= "万盟天下科技-";
$title .= "{$this->COMPANY_NAME}-";
}else{
$gfflg = false;
$title .= (M('promote_company',"tab_")->field("company_name")->where("id = '{$pmap['company_id']}'")->find()['company_name'] . "-");
@ -921,9 +919,10 @@ class FinancePromoteController extends AdminController
$t_in = implode(',', array_column($promoter_ids, 'id'));
}
$map[$field] = ['in',$t_in];
}else{
$map[$field] = ['in',"-1"];
}
}
//判断是否有推广员
$level = 1;
if ($_REQUEST['promote_id'] != '') {
@ -939,7 +938,6 @@ class FinancePromoteController extends AdminController
}
}
}
// dd($map);
$_POST['promote_level'] = $level;
}

@ -458,6 +458,7 @@ class GameController extends ThinkController
M('Game', 'tab_')->where($map)->data(array('relation_game_id' => $anogame['id']))->save();
}
$pic = M('Picture')->find($gda['icon']);
$count = M('Game', 'tab_')->where(array('icon' => $gda['icon']))->count();//统计icon是否为多个游戏的图标
if ($pic != '' && $count == 1) { //只有一个游戏指向这个图标
@ -780,6 +781,114 @@ class GameController extends ThinkController
}
public function companyGames($id)
{
$games = M('Game', 'tab_')
->where(['partner_id'=>$id])
->join("tab_cp_game_ratio on tab_game.id = tab_cp_game_ratio.game_id and begin_total_amount = 0 and is_del = 0", "left")
->field("relation_game_name, game_id, tab_cp_game_ratio.ratio")
->group('relation_game_id')->select();
echo M()->getLastSql();
var_dump($games);
}
public function devide_warn_list($row = 10, $p = 1)
{
$map = ['pdw.status'=>1];
if (!empty($_GET['partner_id'])) {
$map['pdw.partner_id'] = $_GET['partner_id'];
}
if (!empty($_GET['relation_game_id'])) {
$partner = M('Game', 'tab_')->field('partner_id')->where(['relation_game_id'=>$_GET['relation_game_id']])->find();
$map['pdw.partner_id'] = $partner['partner_id'];
}
$list = M('partner_divide_warn', 'tab_')
->alias('pdw')->field("pdw.*, p.partner, sum(s.pay_amount) as total_amount, group_concat(distinct(g.relation_game_name)) as game_name")
->join("tab_partner p on p.id = pdw.partner_id")
->join("tab_game g on pdw.partner_id = g.partner_id", 'left')
->join('tab_spend s on s.game_id = g.id', 'left')
->where(array_merge($map, ['s.pay_status'=>1]))
->group('pdw.id, p.partner')
->page($p, $row)->select();
$count = M('partner_divide_warn', 'tab_')->alias('pdw')->join("tab_game g on pdw.partner_id = g.partner_id", 'left')->where($map)->count();
// if (!empty($list)) {
// foreach ($list as &$item) {
// $item['create_time'] = date('Y-m-d', $item['create_time']);
// $item['upt_time'] = date('Y-m-d', $item['upt_time']);
// }
// }
$page = set_pagination($count, $row);
if ($page) {
$this->assign('_page', $page);
}
$partners = M('partner', 'tab_')->field("id, partner")->where(['status'=>1])->order('last_up_time desc')->select();
$this->assign('partners', $partners);
$this->assign('list_data', $list);
$this->display();
}
public function devide_warn_edit($id=0, $delete=0)
{
if (IS_POST) {
if (empty($_POST['advance_amount']) || empty($_POST['warming_amount']) || empty($_POST['warn_frequency']) || empty($_POST['phones'])) {
return $this->error("请填写必填数据");
}
if ($_POST['phones']) {
$_POST['phones'] = array_unique($_POST['phones']);
foreach ($_POST['phones'] as $phone) {
if (!preg_match('/^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/', $phone)) {
return $this->error("请输入正确的手机号码:{$phone}");
}
}
$_POST['phones'] = json_encode($_POST['phones']);
} else {
$_POST['phones'] = '[]';
}
if (!is_numeric($_POST['advance_amount']) || !is_numeric($_POST['warming_amount']) || !is_numeric($_POST['warn_frequency'])) {
return $this->error("金额需为数字!");
}
if ($_POST['advance_amount'] < $_POST['warming_amount']) {
return $this->error("预警金额不能大于预付金额");
}
if ($_POST['warming_amount'] < $_POST['warn_frequency']) {
return $this->error("预警金额频率不能大于预警金额");
}
if ($id) {
$_POST['upt_time'] = time();
$_POST['operater_id'] = is_login();
$upt = M('partner_divide_warn', 'tab_')->where(['id'=>$id])->save($_POST);
return $upt ? $this->success("更新成功") : $this->error("更新失败");
} else {
if (M('partner_divide_warn', 'tab_')->where(['partner_id'=>$_POST['partner_id'], 'status'=>1])->find()) {
return $this->error('已有当前合作伙伴的预警设置');
}
$_POST['upt_time'] = $_POST['create_time'] = time();
$_POST['operater_id'] = is_login();
$ins = M('partner_divide_warn', 'tab_')->add($_POST);
return $ins ? $this->success("新增成功") : $this->error("新增失败");
}
} else {
$partners = M('partner', 'tab_')->field("id, partner")->where(['status'=>1])->order('last_up_time desc')->select();
$this->assign('partners', $partners);
if ($id) {
if ($delete) {
$_POST['upt_time'] = $_POST['create_time'] = time();
$_POST['operater_id'] = is_login();
$_POST['status'] = 2;
$del = M('partner_divide_warn', 'tab_')->where(['id'=>$id])->save($_POST);
return $del ? $this->success("删除成功") : $this->error("删除失败");
} else {
$warnInfo = M('partner_divide_warn', 'tab_')->where(['id'=>$id])->find();
if (!$warnInfo) return $this->error('未找到该记录');
$warnInfo['phones'] = json_decode($warnInfo['phones'], true);
$this->assign('warnInfo', $warnInfo);
}
}
$this->display();
}
}
/**
* 编辑CP分成比例
*/

@ -204,16 +204,12 @@ class MemberController extends ThinkController
$v['login_time'] = date('Y-m-d H:i:s',$v['login_time']);
$v['lock_status'] = get_info_status($v['lock_status'],4);
$v['check_status'] = $v['check_status']==1 ? "正常" :"拉黑";
if($v['lock_status'] != '锁定') {
$v['lock_remark'] = '';
}
// dump($v['lock_status']);
// $data[$k] = $v;
}
// die();
$field = array(
"id"=>"账号ID","account"=>"玩家账号","promote_account"=>"所属推广员","balance"=>"账户平台币","recharge_total"=>"累计充值","gold_coin"=>"金币",
"vip_level"=>"VIP等级","register_type"=>"注册方式","register_time"=>"注册时间","register_ip"=>"注册IP","login_time"=>"最后登录时间",
"small_count"=>"小号","vip_level"=>"VIP等级","register_type"=>"注册方式","register_time"=>"注册时间","register_ip"=>"注册IP","login_time"=>"最后登录时间",
"device_number"=>"设备号","lock_remark"=>"锁定备注","lock_status"=>"账号状态","check_status"=>"拉黑状态"
);
data2csv($data,"玩家_玩家列表",$field);

@ -1204,6 +1204,137 @@ class PromoteController extends ThinkController
$this->display();
}
public function certification()
{
if ($_POST) {
$promoteId = intval(I('post.id', 0));
if (empty($promoteId)) {
$this->error('参数异常');
}
$promote = D('promote')->field('real_name, idcard, mobile_phone')->where(array('id' => $promoteId))->find();
if (empty($promote)) {
$this->error('参数异常');
}
if (empty($promote['real_name']) || $promote['real_name'] != I('post.real_name', '')) {
if (empty($_POST['real_name'])) {
$this->error('真实姓名不能为空');
}
$save['real_name'] = I('post.real_name', '');
}
if (empty($promote['idcard']) || $promote['idcard'] != I('post.idcard', '')) {
if (empty($_POST['idcard'])) {
$this->error('身份证号码不能为空');
}
if(!is_idcard($_POST['idcard'])) {
$this->error('证件号码错误');
}
$save['idcard'] = I('post.idcard', '');
}
if (empty($promote['mobile_phone']) || $promote['mobile_phone'] != I('post.mobile_phone', '')) {
if (empty($_POST['mobile_phone'])) {
$this->error('手机号码不能为空');
}
$patternPhone = "/^1[3|5|7|8]\\d{9}$/i";
if(!preg_match($patternPhone, $_POST['mobile_phone'])) {
$this->error("手机号码格式不合法");
}
$save['mobile_phone'] = I('post.mobile_phone', '');
}
if (empty($_POST['idcarpic'])) {
$this->error('身份证证件照不能为空');
}
if (empty($_POST['s_province'])) {
$this->error('联系省份不能为空');
}
if (empty($_POST['s_city'])) {
$this->error('联系地级市不能为空');
}
if (empty($_POST['s_county'])) {
$this->error('联系市、县级市不能为空');
}
if (empty($_POST['s_address'])) {
$this->error('详细地址不能为空');
}
if (empty($_POST['email'])) {
$this->error('邮箱不能为空');
}
$patternEmail = "/^([0-9A-Za-z\\-_\\.]+)@([0-9a-z]+\\.[a-z]{2,3}(\\.[a-z]{2})?)$/i";
if (!preg_match($patternEmail, $_POST['email'])) {
$this->error('邮箱地址错误');
}
if (empty($_POST['account_type'])) {
$this->error('账户类型不能为空');
}
if (empty($_POST['bank_name'])) {
$this->error('开户银行不能为空');
}
if (empty($_POST['bank_account'])) {
$this->error('银行户名不能为空');
}
$patternBankAccount = "/^[\x{4e00}-\x{9fa5}]{2,}$/u";
if (!preg_match($patternBankAccount, $_POST['bank_account'])) {
$this->error('银行卡开户人姓名错误');
}
if (empty($_POST['bank_card'])) {
$this->error('卡号不能为空');
}
$patternBankCard = "/^\d{10,19}$/u";
if (!preg_match($patternBankCard, $_POST['bank_card'])) {
$this->error('卡号格式错误');
}
$save['id'] = $promoteId;
$save['ver_status'] = 1;
$save['idcarpic'] = I('post.idcarpic', '');
$save['address'][] = I('post.s_province', '') . ',' . I('post.s_city', '') . ',' . I('post.s_county', '');
$save['address'][] = I('post.s_address', '');
$save['address'] = json_encode($save['address']);
$save['email'] = I('post.email', '');
$save['account_type'] = intval(I('post.account_type', 1));
$save['bank_name'] = I('post.bank_name', '');
$save['bank_account'] = I('post.bank_account', '');
$save['bank_card'] = I('post.bank_card', '');
if (isset($_POST['businesspic'])) {
$save['businesspic'] = I('post.businesspic', '');
}
if (isset($_POST['agreementpic'])) {
$save['agreementpic'] = I('post.agreementpic', '');
}
if (isset($_POST['anothpic'])) {
$save['anothpic'] = I('post.anothpic', '');
}
$result = D('promote')->save($save);
if ($result === false) {
$this->error('操作失败');
} else {
$this->success('操作成功');
}
} else {
$promoteId = intval(I('id', 0));
if ($promoteId <= 0) {
$this->error('参数错误');
}
$promote = D('promote')->where(array('id' => $promoteId))->find();
$promote['idcarpic_array'] = $promote['idcarpic'] ? explode(',', $promote['idcarpic']) : [];
$promote['businesspic_array'] = $promote['businesspic'] ? explode(',', $promote['businesspic']) : [];
$promote['agreementpic_array'] = $promote['agreementpic'] ? explode(',', $promote['agreementpic']) : [];
$promote['anothpic_array'] = $promote['anothpic'] ? explode(',', $promote['anothpic']) : [];
$promote['address'] = json_decode($promote['address'], true);
if (!empty($promote['address'])) {
foreach ($promote['address'] as &$address) {
$address = explode(',', $address);
}
}
$this->assign('records', $promote);
$this->assign('meta_title', '资质认证');
$this->display();
}
}
/**
*推广公会归属管理
*/

@ -346,7 +346,7 @@ class PublicController extends \Think\Controller
public function telsafecode($phone = '', $delay = 10, $flag = true)
{
$taskClient = new TaskClient();
$result = $taskClient->sendSms($phone, get_client_ip());
$result = $taskClient->sendSmsCode($phone, get_client_ip());
$data = [];
if ($result['code'] == TaskClient::SUCCESS) {
$data['status'] = 1;

@ -1605,6 +1605,7 @@ class QueryController extends ThinkController
$this->display();
}
public function getChannelStream() {
$map = [];

@ -15,6 +15,7 @@ class SettlementController extends ThinkController
// 生成结算单 月结算补点 周结不算
public function generateSettlementSheet($settlement_type = 0, $settlement_time_type = 0, $time_start=0, $time_end = 0)
{
$this->meta_title = '结算单管理';
if (IS_GET) {
$msg = '';
if (empty($settlement_type)) {
@ -79,9 +80,14 @@ class SettlementController extends ThinkController
$data['amount'] = $item['amount'];
$data['self_game_ratio'] = 100 - $data['game_ratio'];
$data['parter_settlement'] = $item['amount'] * $data['game_ratio']/100 - ($item['amount']*$item['channel_rate'] ) + $list[$item['p_id']]['bonuses'] - $list[$item['p_id']]['fine'];
$list[$item['p_id']]['channel'][] = $data;
$list[$item['p_id']]['channels'][] = array_merge($data, [
'company_id'=>$item['p_id'],
'company_name'=>$item['partner'],
'bonuses'=>$list[$item['p_id']]['bonuses'],
'fine'=>$list[$item['p_id']]['fine'],
'channel_rate' => $item['channel_rate'],
'invoice_rate' => $item['invoice_rate']]);
}
echo json_encode($list);exit;
} else if (\in_array($settlement_type, [2, 3])) {
$map = "p.account_type = 1 and p.`level` = 1 and p.company_belong " . ($settlement_type == 2 ? " = 0 " : " in (1, 2) ") ;
if ($settlement_time_type == 1) {
@ -128,6 +134,7 @@ class SettlementController extends ThinkController
'settlement_contact' => $item['settlement_contact'],
'create_time' => time()
];
$list[$item['p_id']]['total_amount'] = $list[$item['p_id']]['bonuses'] - $list[$item['p_id']]['fine'];
}
if ($res) {
@ -138,7 +145,6 @@ class SettlementController extends ThinkController
} else {
$gameRatioMax = $gameRatio;
}
$price = $val['amount']*$gameRatioMax/100 - $val['amount']*$item['fax_ratio']/100;
$list[$item['p_id']]['channels'][] = [
'promote_id' => $item['id'],
@ -147,13 +153,13 @@ class SettlementController extends ThinkController
'relation_game_id'=>$val['relation_game_id'],
'game_ratio'=>$gameRatio,
'game_ratio_max'=>$gameRatioMax-$gameRatio,
'price'=> $val['amount']*$gameRatioMax/100 - $val['amount']*$item['fax_ratio']/100,
'price'=> $price,
'amount' => $val['amount']
];
$list[$item['p_id']]['total_amount'] += $price;
}
}
}
echo json_encode($list);exit;
} else if ($settlement_type == 4) {
$map = "p.account_type = 2 and p.`level` = 1 " ;
if ($settlement_time_type == 1) {
@ -201,6 +207,7 @@ class SettlementController extends ThinkController
'bank_address' => $item['bank_address'],
'create_time' => time()
];
$list[$item['p_id']]['total_amount'] = $list[$item['p_id']]['bonuses'] - $list[$item['p_id']]['fine'];
}
if ($res) {
@ -220,20 +227,25 @@ class SettlementController extends ThinkController
'relation_game_id'=>$val['relation_game_id'],
'game_ratio'=>$gameRatio,
'game_ratio_max'=>$gameRatioMax-$gameRatio,
'price'=> $val['amount']*$gameRatioMax/100,
'price'=> $price,
'amount' => $val['amount'],
'type_name' => '个人',
'company_relation_name' => $item['company_relation'] == 0 ? "自主开发及维护" : ($item['company_relation'] == 1 ? "只维护" : "无"),
'admin_name' => get_admin_nickname($item['admin_id']) ?: '无'
];
$list[$item['p_id']]['total_amount'] += $price;
}
}
}
echo json_encode($list);exit;
} else {
}
}
$this->assign('listData', array_values($list));
$this->assign('msg', $msg);
$this->assign('settlement_type', $settlement_type);
$this->meta_title = '结算单管理';
$this->display();
} else {
// 判断结算时间是否冲突
}

@ -28,6 +28,10 @@
</style>
<div class="cf main-place top_nav_list navtab_list">
<div class="fr">
<a class="tabchose" href="{:U('lists',array('type'=>1))}">平台币充值</a>
<a href="{:U('lists_secord',array('type'=>2))}">推广员充值</a>
</div>
<h3 class="page_title">平台币充值</h3>
<p class="description_text">说明:玩家充值平台币到账户的记录,不包含消费平台币的记录,如需查询平台币使用,请到游戏充值中查询</p>
</div>
@ -160,7 +164,7 @@
</if>
</td>
<td><span>{$data.pay_amount}</span></td>
<td>{:get_pay_way($data['pay_way'])}</td>
<td><if condition="$data['pay_way'] neq ''">{:get_pay_way($data['pay_way'])}<else/></if></td>
<td>{$data.pay_ip}</td>
<td>{:set_show_time($data['create_time'],'','pay')}</td>
<td>
@ -170,7 +174,7 @@
{:get_info_status($data['pay_status'],9)}
</if>
</td>
<td style="text-indent:0;">
<br />
<if condition="$data['pay_status'] eq 0">

@ -0,0 +1,430 @@
<extend name="Public/base"/>
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<style>
.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;}
</style>
<div class="cf main-place top_nav_list navtab_list">
<div class="fr">
<a href="{:U('lists',array('type'=>1))}">平台币充值</a>
<a class="tabchose" href="{:U('lists_secord',array('type'=>2))}">推广员充值</a>
</div>
<h3 class="page_title">平台币充值</h3>
<p class="description_text">说明:玩家充值平台币到账户的记录,不包含消费平台币的记录,如需查询平台币使用,请到游戏充值中查询</p>
</div>
<div class="cf top_nav_list">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<div class="input-list search-title-box">
<label>搜索:</label>
</div>
<div class="input-list">
<input type="text" id="search-input" name="order_number" class="" value="{:I('order_number')}"
placeholder="订单号"/>
</div>
<div class="input-list">
<input type="text" id="time-start" name="time-start" class="" value="{:I('time-start')|I('start')}"
placeholder="充值开始时间"/>
-
<div class="input-append date" id="datetimepicker" style="display:inline-block">
<input type="text" id="time-end" name="time-end" class="" value="{:I('time-end')|I('end')}"
placeholder="充值结束时间"/>
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
<div class="input-list input-list-spend search_label_rehab">
<select id="pay_way_id" name="pay_way" class="select_gallery" style="width:120px;">
<option value="">充值方式</option>
<volist name=":cash_pay_way()" id="vo">
<option value="{$vo.key}">{$vo.value}</option>
</volist>
</select>
</div>
<div class="sleft input-list input-list-spend">
<select name="pay_status" class="select_gallery" id="sel_order">
<option value="">订单状态</option>
<option value="1">充值成功</option>
<option value="0">下单未付款</option>
</select>
</div>
<div class="input-list search_item input-list-gamenoticestatus">
<select name="promote_level" style="color:#444" class="select_gallery" id="promote_level">
<option value="">请选择推广员等级</option>
<option value="1" <?php if ($_POST['promote_level'] == 1):?>selected<?php endif;?>>会长</option>
<option value="2" <?php if ($_POST['promote_level'] == 2):?>selected<?php endif;?>>部门长</option>
<option value="3" <?php if ($_POST['promote_level'] == 3):?>selected<?php endif;?>>组长</option>
<option value="4" <?php if ($_POST['promote_level'] == 4):?>selected<?php endif;?>>组员</option>
</select>
-
</div>
<div class="input-list search_item input-list-gamenoticestatus">
<select name="promote_id" style="color:#444" class="select_gallery" id="promote_id">
<option value="">请选择推广员</option>
</select>
</div>
<input type="hidden" name="" value="" class="sortBy">
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search"
url="{:U('Deposit/lists_secord','model='.$model['name'] . '&row='.I('row'),false)}">搜索</a>
</div>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<div>
<table>
<!-- 表头 -->
<thead>
<tr>
<th>订单号</th>
<th>所属推广员</th>
<th>
<a class="paixu" data-order='pay_amount'>
充值平台币
</a>
</th>
<th>充值方式</th>
<th>
<a class="paixu" data-order='create_time'>
充值时间
</a>
</th>
<th>订单状态</th>
<!-- <th>操作</th>-->
</tr>
</thead>
<!-- 列表 -->
<tbody>
<empty name ="list_data">
<td colspan="11" class="text-center">aOh! 暂时还没有内容!</td>
<else />
<volist name="list_data" id="data">
<tr>
<td>{:$data['pay_order_number']}</td>
<td>
<if condition="$data['promote_account'] eq '自然注册'">
官方渠道
<else/>
<if condition="$is_admin eq true ">
{$data.promote_account}
<else />
{$data.promote_account|encryptStr}
</if>
</if>
</td>
<td><span>{$data.pay_amount}</span></td>
<td><if condition="$data['pay_way'] neq ''">{:get_pay_way($data['pay_way'])}<else/></if></td>
<td>{:set_show_time($data['create_time'],'','pay')}</td>
<td>
<if condition="$data['pay_status'] eq 1">
<span class="order_status_color">{:get_info_status($data['pay_status'],9)}</span>
<else/>
{:get_info_status($data['pay_status'],9)}
</if>
</td>
<!-- <td style="text-indent:0;">-->
<!-- <br />-->
<!-- <if condition="$data['pay_status'] eq 0">-->
<!-- <a class="pay_repair" href="javascript:void(0);"-->
<!-- href-data="{$data.pay_order_number}" href-hhh="{:U('Repair/noticePayed')}" style="width:100%;">通知到账</a>-->
<!-- </if>-->
<!-- </td>-->
</tr>
</volist>
</empty>
<tr class="data_summary">
<td>汇总</td>
<td colspan="7">
当页充值:{:array_sum(array_column(array_status2value('pay_status','',$list_data),'pay_amount'))}
今日充值:{$ttotal}
昨日充值:{$ytotal}
累计充值:{$total}元(此处只汇总充值成功的订单)
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="page">
<a class="sch-btn" href="{:U('Export/expUser',array_merge(array('id'=>26,'xlsname'=>'平台币订单_推广员充值'),I('get.')))}">导出</a>
{$_page|default=''}
</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="{$m_title}">
<input type="hidden" name="url" value="Deposit/lists">
</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">
<php>if(C('COLOR_STYLE')=='blue_color') echo '
<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">
';
</php>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<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>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
$(".select_gallery").select2();
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Deposit/lists')}');
$(function () {
//搜索功能
$("#search").click(function () {
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&" + $('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
query = query.replace(/^&/g, '');
if (url.indexOf('?') > 0) {
url += '&' + query;
} else {
url += '?' + query;
}
var start = $("#time-start").val();
var end = $("#time-end").val();
if (start !='' && end != ''){
if (Date.parse(start) > Date.parse(end)){
layer.msg('开始时间必须小于等于结束时间');
return false;
}
}
window.location.href = url;
});
$(".paixu").click(function () {
var that = $(this);
$data_order = that.attr('data-order');
$order_type = '{$userarpu_order}';
if ($order_type == '' || $order_type == '4') {
$(".sortBy").attr('name', 'data_order');
val = '3,' + $data_order;
$(".sortBy").attr('value', val);
$("#search").click();
} else if ($order_type == '3') {
$(".sortBy").attr('name', 'data_order');
val = '4,' + $data_order;
$(".sortBy").attr('value', val);
$("#search").click();
}
});
//回车自动提交
$('.jssearch').find('input').keyup(function (event) {
if (event.keyCode === 13) {
$("#search").click();
}
});
$('#time-start').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true
});
$('#datetimepicker').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true,
pickerPosition: 'bottom-left'
})
$(".drop-down2").on('click', function (event) {
var navlist = $(this).find('.i_list_li');
if (navlist.hasClass('hidden')) {
navlist.removeClass('hidden');
$('#promoteid').focus().val('');
} else {
navlist.addClass('hidden');
}
$(document).one("click", function () {
navlist.addClass('hidden');
});
event.stopPropagation();
});
var a = $('.i_list_li li a');
$('#promoteid').on('keyup', function (event) {
var val = $.trim($(this).val()).toLowerCase();
$('#promoteid').val(val);
$('#promoteidh').val(-1);
});
$('#promoteidlist').find("a").each(function () {
$(this).click(function () {
var text = $.trim($(this).text()).toLowerCase(),
val = $(this).attr('value');
$('#promoteid').val(text);
$('#promoteidh').val(val);
})
});
$(".d_list").find(".drop-down11").hover(function () {
$(this).find(".nav-list").removeClass("hidden");
}, function () {
$(this).find(".nav-list").addClass("hidden");
});
$(".drop-down11 .nav-list li").find("a").each(function () {
var that = $(".drop-down11");
$(this).click(function () {
var text = $(this).text(), val = $(this).attr("value");
that.find(".sort-txt").text(text).attr("data", val);
that.find(".nav-list").addClass("hidden");
that.siblings('.hiddenvalue').val(val);
})
});
$(".d_list").find(".drop-down12").hover(function () {
$(this).find(".nav-list").removeClass("hidden");
}, function () {
$(this).find(".nav-list").addClass("hidden");
});
$(".drop-down12 .nav-list li").find("a").each(function () {
var that = $(".drop-down12");
$(this).click(function () {
var text = $(this).text(), val = $(this).attr("value");
that.find(".sort-txt").text(text).attr("data", val);
that.find(".nav-list").addClass("hidden");
that.siblings('.hiddenvalue').val(val);
})
});
var promote_id = "{:I('promote_id')}";
$("#promote_level").change(function(){
$.ajax({
url:"{:U('Ajax/getPromotersByLevelOther')}",
type:"get",
data:{level:$("#promote_level option:selected").val()},
dataType:'json',
success:function(response){
str = '<option value="">请选择推广员</option>' +
// '<option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option>' +
// '<option value="UC"'+(promote_id && 'UC' == promote_id?'selected':'')+'>UC渠道</option>' +
'';
// $.each(response.data, function(index, item){
// console.log(item.id);
// str += '<option value="'+item.id+' '+(promote_id && item.id == promote_id?'selected':'')+'">'+item.nickname+'</option>';
// });
data = response.data;
for (var i in data){
str += "<option value='"+data[i].id+"' "+(promote_id && data[i].id == promote_id?'selected':'')+">"+data[i].nickname+"</option>"
}
$("#promote_id").empty();
$("#promote_id").append(str);
$("#promote_id").select2();
}
})
});
$("#promote_level").change();
})
/**
* 初始化select2单选默认带搜索功能。
*/
//初始化页面加载
$(document).ready(function () {
//初始化select2单选
initSelect2WithSearch();
});
function initSelect2WithSearch() {
// $("#sel_order").select2({
// tags: true,
// placeholder: '订单状态',
// allowClear: false, //清空
// minimumResultsForSearch: Infinity, // 永久隐藏搜索框
// });
}
// 充值补单
$(".pay_repair").click(function () {
url = $(this).attr('href-hhh');
data = $(this).attr('href-data');
var pwd2 = prompt("请输入二级密码");
if (!pwd2) {
alert("二级密码不能为空");
return ;
}
$.ajax({
type: 'post',
url: url,
data: {orderNo: data, second: pwd2, type: 'deposit'},
success: function (e) {
if (e.status == 1) {
layer.msg(e.msg, {icon: 1});
setTimeout(function () {
location.reload();
}, 1500);
} else {
if (e.msg) {
var tip_msg = e.msg;
} else {
var tip_msg = e.info ? e.info : "补单失败";
}
layer.msg(tip_msg, {icon: 2});
}
},
});
});
</script>
</block>

@ -95,6 +95,23 @@
<div class="input-list search-title-box">
<a class="sch-btn" href="javascript:history.go(-1)" style="background:#fff;color: #000;border: #000 solid 1px;width: 100px">返回</a>
</div>
<div class="input-list input-list-resway search_label_rehab">
<select id="company_id" name="company_id" class="select_gallery" style="width:150px;">
<option value="">请选择推广公司</option>
<volist name=":getPromoteCompany()" id="vo">
<option value="{$vo.id}" <if condition="I('company_id') && $vo.id eq I('company_id')">selected
</if> >{$vo.company_name}</option>
</volist>
</select>
</div>
<div class="input-list search_item input-list-gamenoticestatus">
<select name="promote_id" style="color:#444" class="select_gallery" id="promote_id">
<option value="">请选择会长</option>
<option value="0" <?php if ($_POST['promote_id'] == 0):?>selected<?php endif;?>>官方渠道</option>
<option value="UC" <?php if ($_POST['promote_id'] == 'UC'):?>selected<?php endif;?>>UC用户</option>
</select>
</div>
<div class="input-list input-list-server search_label_rehab">
<select id="partner_id" name="partner_id" class="select_gallery" style="width:120px;">
<option value="">请选择合作公司</option>
@ -126,10 +143,10 @@
</div>
</div>
<input type="hidden" name="from" value="{$_GET['from']}"/>
<input type="hidden" name="promote_id" value="{$_GET['promote_id']}"/>
<!-- <input type="hidden" name="from" value="{$_GET['from']}"/> -->
<!-- <input type="hidden" name="promote_id" value="{$_GET['promote_id']}"/> -->
<input type="hidden" name="promote_type" value="{$_GET['promote_type']}"/>
<input type="hidden" name="company_id" value="{$_GET['company_id']}"/>
<!-- <input type="hidden" name="company_id" value="{$_GET['company_id']}"/> -->
<input type="hidden" name="company_belong" value="{$_GET['company_belong']}"/>
<div class="input-list">
@ -150,6 +167,8 @@
<!-- 表头 -->
<thead>
<tr>
<th>推广公司</th>
<th>会长账号</th>
<th>合作公司</th>
<th >游戏</th>
@ -172,39 +191,41 @@
.data-table tbody td{border-right:1px solid #DDDDDD;}
.d_list .drop-down ul {z-index:999;}
</style>
<if condition = "empty($data)">
<tr>
<td colspan="14" class="text-center">aOh! 暂时还没有内容!</td>
</tr>
</if>
<notemtpy name = "data">
<volist name="data" id="data">
<if condition = "empty($data)">
<tr>
<td colspan="14" class="text-center">aOh! 暂时还没有内容!</td>
</tr>
<else/>
<notemtpy name = "data">
<volist name="data" id="data">
<tr>
<td >{$data.company_name}</td>
<td >{$data.account}</td>
<td >{$data.partner_name}</td>
<td >{$data.game_name}</td>
<td >{$data.cash_count}</td>
<td class="coin-detail" data-pay_type="0" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>0,'promote_id'=>$data['p_id'],'game_id'=>$data['game_id'],p=>1,row=>10]))}">{$data.balance_coin_count}</td>
<td class="coin-detail" data-pay_type="-1" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>-1,'promote_id'=>$data['p_id'],'game_id'=>$data['game_id'],p=>1,row=>10]))}">
{$data.inside_cash_count}
</td>
<td >{$data.all_cash_count}</td>
<td >
<a href="{:U('FinancePromote/gameStatisticsDetail',array_merge(I('get.'),['game_id'=>$data['game_id'],'promote_id'=>$data['p_id'],'game_name'=>$data['game_name'],'promote_level'=>$promote_level]))}" >订单查看</a>
</td>
</tr>
</volist>
<tr>
<td >{$data.partner_name}</td>
<td >{$data.game_name}</td>
<td >{$data.cash_count}</td>
<td class="coin-detail" data-pay_type="0" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>0,'game_id'=>$data['game_id'],p=>1,row=>10]))}">{$data.balance_coin_count}</td>
<td class="coin-detail" data-pay_type="-1" style="color: #0066cc;cursor: pointer" data-url="{:U('FinancePromote/gameCoinDetail',array_merge(I('get.'),['pay_way'=>-1,'game_id'=>$data['game_id'],p=>1,row=>10]))}">
{$data.inside_cash_count}
</td>
<td >{$data.all_cash_count}</td>
<td >
<a href="{:U('FinancePromote/gameStatisticsDetail',array_merge(I('get.'),['game_id'=>$data['game_id'],'game_name'=>$data['game_name'],'promote_level'=>$promote_level]))}" >订单查看</a>
<td colspan="4" ><span>总计</span></td>
<td ><span><if condition="$sumCash neq ''">{$sumCash}<else/>0</if></span></td>
<td><if condition="$sumBalance neq ''">{$sumBalance}<else/>0</if></td>
<td><if condition="$sumInside neq ''">{$sumInside}<else/>0</if></td>
<td><if condition="$sumAll neq ''">{$sumAll}<else/>0</if></td>
<td>
<a href="{:U('FinancePromote/gameStatisticsDetail',array_merge(I('get.'),['promote_level'=>1]))}" >订单查看</a>
</td>
</tr>
</volist>
<tr>
<td colspan="2" ><span>总计</span></td>
<td ><span><if condition="$sumCash neq ''">{$sumCash}<else/>0</if></span></td>
<td><if condition="$sumBalance neq ''">{$sumBalance}<else/>0</if></td>
<td><if condition="$sumInside neq ''">{$sumInside}<else/>0</if></td>
<td><if condition="$sumAll neq ''">{$sumAll}<else/>0</if></td>
<td>
<a href="{:U('FinancePromote/gameStatisticsDetail',array_merge(I('get.'),['promote_level'=>1]))}" >订单查看</a>
</td>
</tr>
</notemtpy>
</notemtpy>
</if>
</tbody>
</table>
</div>
@ -250,7 +271,7 @@
});
$('.page a:eq(1)').click(function () {
$('.page a').click(function () {
var href = $(this).attr('href');
$(this).removeAttr('href');
window.location.replace(href)
@ -348,6 +369,35 @@
}
})
}
var promote_id = "{:I('promote_id')}";
var company_id = "{:I('company_id')}";
function getPromotersByCompanyid() {
var company_id = $("#company_id option:selected").val();
if(!company_id){
company_id = -1;
}
$.ajax({
url: "{:U('Ajax/getPromotersByCompanyid')}",
type: "get",
data: { company_id:company_id},
dataType: 'json',
success: function (response) {
str = '<option value="">请选择会长</option>';
data = response.data;
for (var i in data) {
str += "<option value='" + data[i].id + "' " + (promote_id && data[i].id == promote_id ? 'selected' : '') + ">" + data[i].nickname + "</option>"
}
$("#promote_id").empty();
$("#promote_id").append(str);
$("#promote_id").select2();
}
})
}
getPromotersByCompanyid();
$("#company_id").change(function(){
getPromotersByCompanyid();
})
// $("#game_name, #game_type").change(function(){
// get_partnet_list();
// });

@ -244,7 +244,7 @@
highlight_subnav('{:U("FinancePromote/index")}');
$(function(){
$('.page a:eq(1)').click(function () {
$('.page a').click(function () {
var href = $(this).attr('href');
$(this).removeAttr('href');
window.location.replace(href)

@ -307,7 +307,7 @@
window.location.replace(url);
// window.location.href = url;
});
$('.page a:eq(1)').click(function () {
$('.page a').click(function () {
var href = $(this).attr('href');
$(this).removeAttr('href');
window.location.replace(href)

@ -0,0 +1,131 @@
<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;}
.bnt_add,.bnt_remove,.bnt_save{
height: 30px;
width: 20px;
font-size: 20px;
line-height: 10px;
color: #3399ff;
background: none;
border: none;
margin-left: 20px;
cursor: pointer;
}
.bnt_remove{
color: #F70909;
}
.bnt_save{
color: #4DB361;
}
</style>
<style>
.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;}
</style>
</block>
<!-- 管理员用户组新增和编辑页面 -->
<block name="body">
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script src="__STATIC__/layer/extend/layer.ext.js" type="text/javascript"></script>
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<form action="{:U('Game/devide_warn_edit')}" enctype="application/x-www-form-urlencoded" method="POST"
class="form-horizontal form_info_ml">
<div class="formtitle"><span>预警编辑</span></div>
<ul class="form_info ">
<input type="hidden" name="id" value="{$warnInfo.id}" />
<li>
<label>预警对象</label>
<select id="partner_id" name="partner_id" class="select_gallery">
<?php foreach ($partners as $p):?>
<option value="{$p['id']}" <?php if ($p['id'] == $warnInfo['id']):?>selected<?php endif;?> >{$p.partner}</option>
<?php endforeach;?>
</select>
</li>
<li>
<label>预付金额</label>
<input name="advance_amount" type="text" class="txt" placeholder="预付金额" value="{$warnInfo.advance_amount}" /><span style="color: red;">*</span>
</li>
<li>
<label>预警金额</label>
<input name="warming_amount" type="text" class="txt" placeholder="预警金额" value="{$warnInfo.warming_amount}" /><span style="color: red;">*</span>
</li>
<li>
<label>预警金额频率</label>
<input name="warn_frequency" type="text" class="txt" placeholder="当达到预警值时,每扣除多少流水短信提醒一次" value="{$warnInfo.warn_frequency}" /><span style="color: red;">*</span>
</li>
<?php if ($warnInfo['phones']):?>
<?php foreach ($warnInfo['phones'] as $k => $phone):?>
<?php if ($k == 0):?>
<li class="warn-phone">
<label>手机号</label>
<input type="text" class="txt table_text_input" name="phones[]" value="{$phone}" placeholder=""><span style="color: red;">*</span>
<button type="button" class="bnt_add"></button>
</li>
<?php else:?>
<li class="warn-phone">
<label>通知手机号</label>
<input type="text" class="txt table_text_input" name="phones[]" value="{$phone}" placeholder="">
<button type="button" class="bnt_remove"></button>
</li>
<?php endif;?>
<?php endforeach;?>
<?php else:?>
<li class="warn-phone">
<label>手机号</label>
<input type="text" class="txt table_text_input" name="phones[]" value="" placeholder=""><span style="color: red;">*</span>
<button type="button" class="bnt_add"></button>
</li>
<?php endif;?>
<li>
<label>&nbsp;</label><input type="submit" id="submit" value="确认保存" target-form="form-horizontal" class="form_btn ajax-post">
<input type="button" value="返 回" target-form="form-horizontal" class="form_btn ajax-post" onclick="javascript:void(window.history.go(-1))">
</li>
</ul>
</form>
<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="{$m_title}">
<input type="hidden" name="url" value="AuthManager/index">
</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">
<script type="text/javascript">
highlight_subnav('{:U('Game/devide_warn_list')}');
$(".bnt_add").bind("click",function(){
var a= '<li class="warn-phone"><label>手机号</label><input type="text" class="txt table_text_input" name="phones[]" value="" placeholder=""><button type="button" class="bnt_remove"></button></li>';
$(".warn-phone:last").after(a);
});
$(document).on('click', '.bnt_remove', function(){
$(this).parents('li').remove();
});
</script>
</block>

@ -0,0 +1,205 @@
<extend name="Public/base"/>
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css"/>
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<style>
.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;}
</style>
<!-- 标题栏 -->
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">预警管理</h3>
<p class="description_text">说明:此处显示预警管理记录</p>
</div>
<div class="cf top_nav_list">
<!-- <div class="fl button_list">
<a class="confirm ajax-post" id="dtnn" target-form="ids" url="{:U('Member/delprovide')}"><span class="button_icon button_icon2 "></span>批量删除</a>
</div> -->
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<div class="input-list search-title-box">
<label>搜索:</label>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="relation_game_id" name="relation_game_id" class="select_gallery">
<option value="">游戏</option>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="partner_id" name="partner_id" class="select_gallery">
<option value="">预警对象</option>
<?php foreach ($partners as $p):?>
<option value="{$p['id']}" <?php if ($p['id'] == $_GET['id']):?>selected<?php endif;?> >{$p.partner}</option>
<?php endforeach;?>
</select>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search"
url="{:U('Game/devide_warn_list','model='.$model['name'] . '&row=' . I('row'),false)}">
搜索
</a>
</div>
<div class="input-list">
<a class="sch-btn" href="{:U('Game/devide_warn_edit')}">
新增
</a>
</div>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<!-- <th class="">
<input class="check-all" type="checkbox">
</th> -->
<th>预警对象</th>
<th>游戏名称</th>
<th>游戏总流水</th>
<th>预付金额</th>
<th>预警金额</th>
<th>预警金额频率</th>
<th>预警手机号</th>
<th>修改时间</th>
<th>创建时间</th>
<th>操作人</th>
<th>操作</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<empty name="list_data">
<td colspan="11" class="text-center">aOh! 暂时还没有内容!</td>
<else/>
<volist name="list_data" id="data">
<tr>
<!-- <td><input class="ids" type="checkbox" value="{$data['id']}" name="ids"></td> -->
<td>{$data.partner}</td>
<td>{$data.game_name}</td>
<td>{$data.total_amount}</td>
<td>{$data.advance_amount}</td>
<td>{$data.warming_amount}</td>
<td>{$data.warn_frequency}</td>
<td><?php echo implode(',', json_decode($data['phones'], true))?></td>
<td>{$data.upt_time|date='Y-m-d H:i:s',###}</td>
<td>{$data.create_time|date='Y-m-d H:i:s',###}</td>
<td>{:get_admin_nickname($data['operater_id'])}</td>
<td>
<a href="{:U('Game/devide_warn_edit',array('id'=>$data['id']))}">编辑 </a>
<a class="ajax-get confirm" href="{:U('Game/devide_warn_edit',array('id'=>$data['id'], 'delete'=>1))}">解除 </a>
</td>
</tr>
</volist>
</empty>
</tbody>
</table>
</div>
</div>
<div class="page">
{$_page|default=''}
</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="{$m_title}">
<input type="hidden" name="url" value="Member/login_record">
</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">
<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>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript">
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Game/devide_warn_list')}');
$(function () {
<volist name = ":I('get.')" id = "vo" > Think.setValue('{$key}', "{$vo}");
</volist >
$(".select_gallery").select2();
//搜索功能
$("#search").click(function () {
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&" + $('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
query = query.replace(/^&/g, '');
if (url.indexOf('?') > 0) {
url += '&' + query;
} else {
url += '?' + query;
}
var start = $("#time-start").val();
var end = $("#time-end").val();
if (start !='' && end != ''){
if (Date.parse(start) > Date.parse(end)){
layer.msg('开始时间必须小于等于结束时间');
return false;
}
}
window.location.href = url;
});
var game_id = "{:I('relation_game_id')}";
$.ajax({
url:"{:U('Ajax/getGameList')}",
type:"get",
data:{sdk_type:$("#relation_game_id option:selected").val()},
dataType:'json',
success:function(response){
str = '<option value="">游戏名称</option>';
data = response.data;
for (var i in data){
str += "<option value='"+data[i].relation_game_id+"' "+(game_id && data[i].relation_game_id == game_id?'selected':'')+">"+data[i].relation_game_name+"</option>"
}
$("#relation_game_id").empty();
$("#relation_game_id").append(str);
$("#relation_game_id").select2();
}
})
})
</script>
</block>

@ -50,7 +50,7 @@
<tr>
<td class="l">会长账号:</td>
<td class="r">
<select id="promote_id" name="" class="select_gallery" style="width:120px;" disabled>
<select id="promote_id" name="promote_id" class="select_gallery" style="width:120px;">
<option value="">请选择会长账号</option>
<volist name=":promote_listsOther(1)" id="vo">
<option promote_id-id="{$vo.id}" value="{$vo.id}" <if condition="$vo.id eq $data['promote_id']">selected=selected</if>>{$vo.account}</option>

@ -0,0 +1,916 @@
<extend name="Public/base" />
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/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">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" src="__STATIC__/provincecityarea/AreaData_min.js"></script>
<script src="__STATIC__/layer/layer.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/webuploader/webuploader.js"></script>
<style>
.tabcon1711 input.time {
width: 150px;
}
#form .txt_area1 {
width: 300px;
height: 150px;
}
.tabcon1711 .form_unit {
margin-left: 2px;
}
.tabcon1711 .mustmark {
margin-left:-7px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
color: #000;
line-height: 30px;
}
.select2-container--default .select2-selection--single {
border-radius: 4px;
height: 30px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height: 30px;
}
.tabcon1711 input[type=text]:read-only {
background: #CCCCCC;
}
.tabcon1711 .span-btn {
float: left;
margin-left: 30px;
height: 30px;
line-height: 30px;
color: #fff;
background-color: #3d96c8;
border: 0;
border-radius: 3px;
cursor: pointer;
align-content: center;
padding-left: 10px;
padding-right: 10px;
}
.tabcon1711 .edit-btn {
background-color: #3d96c8;
}
.tabcon1711 .cancel-btn {
background-color: #999;
display: none;
}
.tabcon1711 .edit-btn:hover {
background-color: #589dc8;
}
.tabcon1711 .cancel-btn {
background-color: #ababab;
}
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">{$meta_title}</h3>
<!-- <p class="description_text">说明:此功是创建推广员时所需填写信息</p>-->
</div>
<!-- 标签页导航 -->
<div class="tab-wrap">
<div class="tab-content tabcon1711">
<!-- 表单 -->
<form id="form" action="{:U('certification?model='.$model['id'])}" method="post" class="form-horizontal">
<!-- 基础文档模型 -->
<div id="tab1" class="tab-pane in tab1">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l">会长账号:</td>
<td class="r">
<input type="text" class="txt" disabled="disabled" style="background: #CCCCCC;" value="{$records['account']|default=''}">
<span class="notice-text">通过推广员后台注册申请或者管理后台创建的账号</span>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>真实姓名:</td>
<td class="r">
<empty name="records['real_name']">
<input type="text" class="txt" name="real_name" value="{$records['real_name']|default=''}">
<else/>
<input type="text" class="txt" name="real_name" value="{$records['real_name']|default=''}" readonly="readonly">
<span class="span-btn edit-btn">修改</span>
<span class="span-btn cancel-btn">取消</span>
</empty>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>身份证号码:</td>
<td class="r">
<empty name="records['real_name']">
<input type="text" class="txt" name="idcard" value="{$records['idcard']|default=''}">
<else/>
<input type="text" class="txt" name="idcard" value="{$records['idcard']|default=''}" readonly="readonly">
<span class="span-btn edit-btn">修改</span>
<span class="span-btn cancel-btn">取消</span>
</empty>
<span class="notice-text"></span>
</td>
</tr>
<tr class="picbox">
<td class="l noticeinfo"><i class="mustmark">*</i>身份证照:</td>
<td class="r">
<span class="table_btn table_upload" style="float: none;">
<input type="hidden" name="idcarpic" value="{$records['idcarpic']}" />
<div id="uploadImg" class="wu-example">
<div class="btns">
<div id="idcarpic">上传图片</div>
</div>
<!--用来存放文件信息-->
<div id="idcarpic_thelist" class="uploader-list" style="display: flex;">
</div>
</div>
</span>
<span class="notice-text">请上传身份证正反面图片为jpg、png格式(不超过2M)</span>
</td>
</tr>
<tr class="picbox">
<td class="l noticeinfo">营业执照:</td>
<td class="r">
<span class="table_btn table_upload" style="float: none;">
<input type="hidden" name="businesspic" value="{$records['businesspic']}" />
<div id="uploadImg" class="wu-example">
<div class="btns">
<div id="businesspic">上传图片</div>
</div>
<!--用来存放文件信息-->
<div id="businesspic_thelist" class="uploader-list" style="display: flex;">
</div>
</div>
</span>
<span class="notice-text">如果是公司请上传营业执照</span>
</td>
</tr>
<tr class="picbox">
<td class="l noticeinfo">合作合同:</td>
<td class="r">
<span class="table_btn table_upload" style="float: none;">
<input type="hidden" name="agreementpic" value="{$records['agreementpic']}" />
<div id="uploadImg" class="wu-example">
<div class="btns">
<div id="agreementpic">上传图片</div>
</div>
<!--用来存放文件信息-->
<div id="agreementpic_thelist" class="uploader-list" style="display: flex;">
</div>
</div>
</span>
<span class="notice-text">须上传平台与贵公司(工作室)签署的合作合同</span>
</td>
</tr>
<tr class="picbox">
<td class="l noticeinfo">补充认证:</td>
<td class="r">
<span class="table_btn table_upload" style="float: none;">
<input type="hidden" name="anothpic" value="{$records['anothpic']}" />
<div id="uploadImg" class="wu-example">
<div class="btns">
<div id="anothpic">上传图片</div>
</div>
<!--用来存放文件信息-->
<div id="anothpic_thelist" class="uploader-list" style="display: flex;">
</div>
</div>
</span>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>电话:</td>
<td class="r">
<empty name="records['real_name']">
<input type="text" class="txt" name="mobile_phone" value="{$records['mobile_phone']|default=''}">
<else/>
<input type="text" class="txt" name="mobile_phone" value="{$records['mobile_phone']|default=''}" readonly="readonly">
<span class="span-btn edit-btn">修改</span>
<span class="span-btn cancel-btn">取消</span>
</empty>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>联系地址</td>
<td class="r1 table_select3">
<div class="info">
<div style="display: flex;">
<select id="s_province" name="s_province" class="select_gallery"></select>  
<select id="s_city" name="s_city" class="select_gallery" style="margin-left: 10px;"></select>  
<select id="s_county" name="s_county" class="select_gallery" style="margin-left: 10px;"></select>
<input type="text" class="txt" name="s_address" style="margin-left: 10px;width: 300px;" value="{$records['address'][1][0]|default=''}" placeholder="详细地址">
<script class="resources library" src="__STATIC__/provincecityarea/area1.js" type="text/javascript"></script>
<script type="text/javascript">
var pro ="{$records['address'][0]['0']|default=''}";
var city ="{$records['address'][0]['1']|default=''}";
var are ="{$records['address'][0]['2']|default=''}";
_init_area(pro, city, are);
</script>
</div>
<div id="show"></div>
</div>
<script type="text/javascript">
var showArea = function() {
$('#show').innerHTML = "<h3>省" + $('#s_province').value + " - 市" +
$('#s_city').value + " - 县/区" +
$('#s_county').value + "</h3>"
}
$('#s_county').attr('onchange', 'showArea()');
</script>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>邮箱:</td>
<td class="r">
<input type="text" class="txt" name="email" value="{$records['email']|default=''}">
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>账户类型:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label>
<input type="radio" value="1" name="account_type" <eq name="records['account_type']" value="1">checked="checked"</eq>>公司
</label >
<label>
<input type="radio" value="2" name="account_type" <eq name="records['account_type']" value="2">checked="checked"</eq>>个人
</label>
</span>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>开户银行:</td>
<td class="r">
<input type="text" class="txt" name="bank_name" value="{$records['bank_name']|default=''}">
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>银行户名:</td>
<td class="r">
<input type="text" class="txt" name="bank_account" value="{$records['bank_account']|default=''}">
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>银行账号:</td>
<td class="r">
<input type="text" class="txt" name="bank_card" value="{$records['bank_card']|default=''}">
<span class="notice-text"></span>
</td>
</tr>
</tbody>
</table>
</div>
<input type="hidden" name="id" id="id" value="{$records['id']|default=''}" />
<div class="form-item cf">
<button class="submit_btn ajax-post mlspacing" id="submit" type="submit" target-form="form-horizontal">
审核
</button>
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back();" >
返回
</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="{$m_title}">
<input type="hidden" name="url" value="Promote/lists/type/1">
</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">
<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>
<script type="text/javascript">
//导航高亮
highlight_subnav("{:U('Promote/lists')}");
$(".select_gallery").select2();
$(function() {
showTab();
$('.edit-btn').click(function () {
var thisInput = $(this).prev();
thisInput.val('');
thisInput.removeAttr('readonly');
thisInput.focus();
$(this).hide();
$(this).next().show();
});
$('.cancel-btn').click(function () {
var thisInput = $(this).parent().children('input');
switch (thisInput.attr('name')) {
case 'real_name':
thisInput.val("{$records['real_name']}");
break;
case 'idcard':
thisInput.val("{$records['idcard']}");
break;
case 'mobile_phone':
thisInput.val("{$records['mobile_phone']}");
break;
}
thisInput.attr('readonly', 'readonly');
$(this).hide();
$(this).prev().show();
});
});
var userInfo = {userId:"kazaff", md5:"",icon:1}; //用户会话信息
</script>
<script>
var uploaderIdCarPic = WebUploader.create({
// 选完文件后,是否自动上传。
auto: true,
// swf文件路径
swf: '__STATIC__/webuploader/Uploader.swf',
// 文件接收服务端。
server: "{:U('File/uploadPictureNotLimit', array('session_id'=>session_id(), 'flag'=>true))}",
// 选择文件的按钮。可选。
// 内部根据当前运行是创建可能是input元素也可能是flash.
pick: {
id:'#idcarpic',
multiple:true
},
paste: document.body,
accept: {
title: '图片',
extensions: 'png,gif,jpg,jpeg,bmp',
mimeTypes: '.png,.gif,.jpg,.jpeg,.bmp',
},
// 不压缩image, 默认如果是jpeg文件上传前会压缩一把再上传
resize: false,
disableGlobalDnd: true,
fileNumLimit:2,
threads:5,
thumb:true,
compress:false,
prepareNextFile: true,
formData: function(){return $.extend(true, {}, userInfo);},
chunked:false,
duplicate: true
});
var imgIdCarPicData = [];
var imgIdCarPicList = $("#idcarpic_thelist");
uploaderIdCarPic.on( 'fileQueued', function( file ) {
var html = '';
html += '<div id="' + file.id + '" class="item" style="margin-right: 10px;">';
html += '<a href="javascript:;"><img src="" style="width: 100px;height: 100px;cursor: move;"></a>';
html += '<h4 class="info">' + file.name + '</h4>';
html += '<p class="state">等待上传...</p>';
html += '</div>';
imgIdCarPicList.append(html);
imgIdCarPicList.css('margin-top','10px');
var img2 = imgIdCarPicList.children('#'+file.id).find('img');
uploaderIdCarPic.makeThumb(file, function (error, src) {
if (error) {
return;
}
img2.attr('src', src);
}, 300, 300);
});
// 文件上传过程中创建进度条实时显示。
uploaderIdCarPic.on( 'uploadProgress', function( file, percentage ) {
var $li = $( '#'+file.id ),
$percent = $li.find('.progress .progress-bar');
// 避免重复创建
if ( !$percent.length ) {
$percent = $('<div class="progress progress-striped active">' +
'<div class="progress-bar" role="progressbar" style="width: 0%">' +
'</div>' +
'</div>').appendTo( $li ).find('.progress-bar');
}
$li.find('p.state').text('上传中');
$percent.css( 'width', percentage * 100 + '%' );
$percent.text( (percentage * 100).toFixed(0) + '%' );
});
uploaderIdCarPic.on( 'uploadSuccess', function( file , response) {
imgIdCarPicData.push(Number(response.id));
setIconVal();
console.log(response)
$( '#'+file.id ).find('p.state').text('已上传').fadeOut(800);
//alert(JSON.stringify(response));
$('#'+file.id).find('h4.info').append('<a href="javascript:;" class="jsdelzip table_click" style="float:none;display:inline-block;margin-left:10px;">删除</a>');
$('#'+file.id).find('.jsdelzip').on('click',function() {
uploaderIdCarPic.removeFile( file.id );
$('#'+file.id).remove();
$.each(imgIdCarPicData,function(index, item) {
if (response.id == item) {
imgIdCarPicData.splice(index,1);
return false;
}
});
setIconVal();
return false;
});
if (response.status == 1001) {
return false;
alert('图片大小不得超过2M');
$('#idcarpic_thelist').children().last().remove();
location.reload()
}
});
function setIconVal()
{
var icon = '';
$.each(imgIdCarPicData,function(index, item) {
icon += item + ',';
});
icon = icon.substring(0, icon.length - 1);
$('input[name=idcarpic]').val(icon);
}
<?php if (!empty($records['idcarpic_array'])) :?>
var html = '';
$('#idcarpic_thelist').css('margin-top','10px');
<?php foreach ($records['idcarpic_array'] as $value3) { ?>
<?php $value3 = (int)$value3; ?>
imgIdCarPicData.push(<?=$value3?>);
html += '<div id="' + <?=$value3?> + '" class="item" style="margin-right: 10px;">';
html += '<a href="javascript:;"><img src="<?=get_cover($value3,"path")?>" style="width: 100px;height: 100px;cursor: move;"></a>';
html += '<h4 class="info" style="text-align: center;">';
html += '<a href="javascript:;" class="jsdelzip table_click" style="float:none;display:inline-block;" img-id="' + <?=$value3?> + '">删除</a>';
html += '</h4>';
html += '<div class="progress progress-striped active" style="display: none;">';
html += '<div class="progress-bar" role="progressbar" style="width: 100%;">100%</div>';
html += '</div>';
html += '</div>';
<?php }?>
$('#idcarpic_thelist').html(html);
$('#idcarpic_thelist').children().children('h4').children('.jsdelzip').on('click', function() {
var thisId = $(this).attr('img-id');
$(this).parent().parent().remove();
$.each(imgIdCarPicData,function(index, item) {
if (thisId == item) {
imgIdCarPicData.splice(index,1);
return false;
}
});
setIconVal();
});
<?php endif ;?>
</script>
<script>
var uploaderImgbusinesspic = WebUploader.create({
// 选完文件后,是否自动上传。
auto: true,
// swf文件路径
swf: '__STATIC__/webuploader/Uploader.swf',
// 文件接收服务端。
server: "{:U('File/uploadPicture',array('session_id'=>session_id(),'flag'=>true))}",
// 选择文件的按钮。可选。
// 内部根据当前运行是创建可能是input元素也可能是flash.
pick: {
id:'#businesspic',
multiple:true
},
// dnd: false,
paste: document.body,
accept: {
title: '图片',
extensions: 'png,gif,jpg,jpeg,bmp',
mimeTypes: '.png,.gif,.jpg,.jpeg,.bmp',
},
// 不压缩image, 默认如果是jpeg文件上传前会压缩一把再上传
resize: false,
disableGlobalDnd: true,
fileNumLimit:5,
threads:5,
thumb:true,
compress:false,
prepareNextFile: true,
formData: function(){return $.extend(true, {}, userInfo);},
chunked:false,
duplicate: true
});
var imgListbusinesspicData = [];
var thisIndex1 = 0;
var imgbusinesspicList = $("#businesspic_thelist");
uploaderImgbusinesspic.on( 'fileQueued', function( file ) {
var html = '';
html += '<div id="' + file.id + '" class="item" style="margin-right: 10px;">';
html += '<a href="javascript:;"><img src="" style="width: 100px;height: 100px;cursor: move;"></a>';
html += '<h4 class="info">' + file.name + '</h4>';
html += '<p class="state">等待上传...</p>';
html += '</div>';
imgbusinesspicList.append(html);
imgbusinesspicList.css('margin-top','10px');
var img1 = imgbusinesspicList.children('#'+file.id).find('img');
uploaderImgbusinesspic.makeThumb(file, function (error, src) {
if (error) {
return;
}
img1.attr('src', src);
}, 300, 300);
});
// 文件上传过程中创建进度条实时显示。
uploaderImgbusinesspic.on( 'uploadProgress', function( file, percentage ) {
var $li = $( '#'+file.id ),
$percent = $li.find('.progress .progress-bar');
// 避免重复创建
if ( !$percent.length ) {
$percent = $('<div class="progress progress-striped active">' +
'<div class="progress-bar" role="progressbar" style="width: 0%">' +
'</div>' +
'</div>').appendTo( $li ).find('.progress-bar');
}
$li.find('p.state').text('上传中');
$percent.css( 'width', percentage * 100 + '%' );
$percent.text( (percentage * 100).toFixed(0) + '%' );
});
uploaderImgbusinesspic.on( 'uploadSuccess', function( file , response) {
imgListbusinesspicData.push(Number(response.id));
setbusinesspicVal();
console.log(response)
$( '#'+file.id ).find('p.state').text('已上传').fadeOut(800);
//alert(JSON.stringify(response));
$('#'+file.id).find('h4.info').append('<a href="javascript:;" class="jsdelzip table_click" style="float:none;display:inline-block;margin-left:10px;">删除</a>');
$('#'+file.id).find('.jsdelzip').on('click',function() {
uploaderImgbusinesspic.removeFile( file.id );
$('#'+file.id).remove();
$.each(imgListbusinesspicData,function(index, item) {
if (response.id == item) {
imgListbusinesspicData.splice(index,1);
return false;
}
});
setbusinesspicVal();
return false;
});
});
function setbusinesspicVal()
{
var businesspic = '';
$.each(imgListbusinesspicData,function(index, item) {
businesspic += item + ',';
});
businesspic = businesspic.substring(0, businesspic.length - 1);
$('input[name=businesspic]').val(businesspic);
}
<?php if (!empty($records['businesspic_array'])) :?>
var html = '';
$('#businesspic_thelist').css('margin-top','10px');
<?php foreach ($records['businesspic_array'] as $value1) { ?>
<?php $value1 = (int)$value1; ?>
imgListbusinesspicData.push(<?=$value1?>);
html += '<div id="' + <?=$value1?> + '" class="item" style="margin-right: 10px;">';
html += '<a href="javascript:;"><img src="<?=get_cover($value1,"path")?>" style="width: 100px;height: 100px;cursor: move;"></a>';
html += '<h4 class="info" style="text-align: center;">';
html += '<a href="javascript:;" class="jsdelzip table_click" style="float:none;display:inline-block;" img-id="' + <?=$value1?> + '">删除</a>';
html += '</h4>';
html += '<div class="progress progress-striped active" style="display: none;">';
html += '<div class="progress-bar" role="progressbar" style="width: 100%;">100%</div>';
html += '</div>';
html += '</div>';
<?php }?>
$('#businesspic_thelist').html(html);
$('#businesspic_thelist').children().children('h4').children('.jsdelzip').on('click', function() {
var thisId = $(this).attr('img-id');
$(this).parent().parent().remove();
$.each(imgListbusinesspicData,function(index, item) {
if (thisId == item) {
imgListbusinesspicData.splice(index,1);
return false;
}
});
setbusinesspicVal();
});
<?php endif ;?>
</script>
<script>
var uploaderImgagreementpic = WebUploader.create({
// 选完文件后,是否自动上传。
auto: true,
// swf文件路径
swf: '__STATIC__/webuploader/Uploader.swf',
// 文件接收服务端。
server: "{:U('File/uploadPicture',array('session_id'=>session_id(),'flag'=>true))}",
// 选择文件的按钮。可选。
// 内部根据当前运行是创建可能是input元素也可能是flash.
pick: {
id:'#agreementpic',
multiple:true
},
// dnd: false,
paste: document.body,
accept: {
title: '图片',
extensions: 'png,gif,jpg,jpeg,bmp',
mimeTypes: '.png,.gif,.jpg,.jpeg,.bmp',
},
// 不压缩image, 默认如果是jpeg文件上传前会压缩一把再上传
resize: false,
disableGlobalDnd: true,
fileNumLimit:5,
threads:5,
thumb:true,
compress:false,
prepareNextFile: true,
formData: function(){return $.extend(true, {}, userInfo);},
chunked:false,
duplicate: true
});
var imgListagreementpicData = [];
var thisIndex1 = 0;
var imgagreementpicList = $("#agreementpic_thelist");
uploaderImgagreementpic.on( 'fileQueued', function( file ) {
var html = '';
html += '<div id="' + file.id + '" class="item" style="margin-right: 10px;">';
html += '<a href="javascript:;"><img src="" style="width: 100px;height: 100px;cursor: move;"></a>';
html += '<h4 class="info">' + file.name + '</h4>';
html += '<p class="state">等待上传...</p>';
html += '</div>';
imgagreementpicList.append(html);
imgagreementpicList.css('margin-top','10px');
var img1 = imgagreementpicList.children('#'+file.id).find('img');
uploaderImgagreementpic.makeThumb(file, function (error, src) {
if (error) {
return;
}
img1.attr('src', src);
}, 300, 300);
});
// 文件上传过程中创建进度条实时显示。
uploaderImgagreementpic.on( 'uploadProgress', function( file, percentage ) {
var $li = $( '#'+file.id ),
$percent = $li.find('.progress .progress-bar');
// 避免重复创建
if ( !$percent.length ) {
$percent = $('<div class="progress progress-striped active">' +
'<div class="progress-bar" role="progressbar" style="width: 0%">' +
'</div>' +
'</div>').appendTo( $li ).find('.progress-bar');
}
$li.find('p.state').text('上传中');
$percent.css( 'width', percentage * 100 + '%' );
$percent.text( (percentage * 100).toFixed(0) + '%' );
});
uploaderImgagreementpic.on( 'uploadSuccess', function( file , response) {
imgListagreementpicData.push(Number(response.id));
setagreementpicVal();
console.log(response);
$( '#'+file.id ).find('p.state').text('已上传').fadeOut(800);
//alert(JSON.stringify(response));
$('#'+file.id).find('h4.info').append('<a href="javascript:;" class="jsdelzip table_click" style="float:none;display:inline-block;margin-left:10px;">删除</a>');
$('#'+file.id).find('.jsdelzip').on('click',function() {
uploaderImgagreementpic.removeFile( file.id );
$('#'+file.id).remove();
$.each(imgListagreementpicData,function(index, item) {
if (response.id == item) {
imgListagreementpicData.splice(index,1);
return false;
}
});
setagreementpicVal();
return false;
});
});
function setagreementpicVal()
{
var agreementpic = '';
$.each(imgListagreementpicData,function(index, item) {
agreementpic += item + ',';
});
agreementpic = agreementpic.substring(0, agreementpic.length - 1);
$('input[name=agreementpic]').val(agreementpic);
}
<?php if (!empty($records['agreementpic_array'])) :?>
var html = '';
$('#agreementpic_thelist').css('margin-top','10px');
<?php foreach ($records['agreementpic_array'] as $value1) { ?>
<?php $value1 = (int)$value1; ?>
imgListagreementpicData.push(<?=$value1?>);
html += '<div id="' + <?=$value1?> + '" class="item" style="margin-right: 10px;">';
html += '<a href="javascript:;"><img src="<?=get_cover($value1,"path")?>" style="width: 100px;height: 100px;cursor: move;"></a>';
html += '<h4 class="info" style="text-align: center;">';
html += '<a href="javascript:;" class="jsdelzip table_click" style="float:none;display:inline-block;" img-id="' + <?=$value1?> + '">删除</a>';
html += '</h4>';
html += '<div class="progress progress-striped active" style="display: none;">';
html += '<div class="progress-bar" role="progressbar" style="width: 100%;">100%</div>';
html += '</div>';
html += '</div>';
<?php }?>
$('#agreementpic_thelist').html(html);
$('#agreementpic_thelist').children().children('h4').children('.jsdelzip').on('click', function() {
var thisId = $(this).attr('img-id');
$(this).parent().parent().remove();
$.each(imgListagreementpicData,function(index, item) {
if (thisId == item) {
imgListagreementpicData.splice(index,1);
return false;
}
});
setagreementpicVal();
});
<?php endif ;?>
</script>
<script>
var uploaderImganothpic = WebUploader.create({
// 选完文件后,是否自动上传。
auto: true,
// swf文件路径
swf: '__STATIC__/webuploader/Uploader.swf',
// 文件接收服务端。
server: "{:U('File/uploadPicture',array('session_id'=>session_id(),'flag'=>true))}",
// 选择文件的按钮。可选。
// 内部根据当前运行是创建可能是input元素也可能是flash.
pick: {
id:'#anothpic',
multiple:true
},
// dnd: false,
paste: document.body,
accept: {
title: '图片',
extensions: 'png,gif,jpg,jpeg,bmp',
mimeTypes: '.png,.gif,.jpg,.jpeg,.bmp',
},
// 不压缩image, 默认如果是jpeg文件上传前会压缩一把再上传
resize: false,
disableGlobalDnd: true,
fileNumLimit:5,
threads:5,
thumb:true,
compress:false,
prepareNextFile: true,
formData: function(){return $.extend(true, {}, userInfo);},
chunked:false,
duplicate: true
});
var imgListanothpicData = [];
var thisIndex1 = 0;
var imganothpicList = $("#anothpic_thelist");
uploaderImganothpic.on( 'fileQueued', function( file ) {
var html = '';
html += '<div id="' + file.id + '" class="item" style="margin-right: 10px;">';
html += '<a href="javascript:;"><img src="" style="width: 100px;height: 100px;cursor: move;"></a>';
html += '<h4 class="info">' + file.name + '</h4>';
html += '<p class="state">等待上传...</p>';
html += '</div>';
imganothpicList.append(html);
imganothpicList.css('margin-top','10px');
var img1 = imganothpicList.children('#'+file.id).find('img');
uploaderImganothpic.makeThumb(file, function (error, src) {
if (error) {
return;
}
img1.attr('src', src);
}, 300, 300);
});
// 文件上传过程中创建进度条实时显示。
uploaderImganothpic.on( 'uploadProgress', function( file, percentage ) {
var $li = $( '#'+file.id ),
$percent = $li.find('.progress .progress-bar');
// 避免重复创建
if ( !$percent.length ) {
$percent = $('<div class="progress progress-striped active">' +
'<div class="progress-bar" role="progressbar" style="width: 0%">' +
'</div>' +
'</div>').appendTo( $li ).find('.progress-bar');
}
$li.find('p.state').text('上传中');
$percent.css( 'width', percentage * 100 + '%' );
$percent.text( (percentage * 100).toFixed(0) + '%' );
});
uploaderImganothpic.on( 'uploadSuccess', function( file , response) {
imgListanothpicData.push(Number(response.id));
setanothpicVal();
console.log(response);
$( '#'+file.id ).find('p.state').text('已上传').fadeOut(800);
//alert(JSON.stringify(response));
$('#'+file.id).find('h4.info').append('<a href="javascript:;" class="jsdelzip table_click" style="float:none;display:inline-block;margin-left:10px;">删除</a>');
$('#'+file.id).find('.jsdelzip').on('click',function() {
uploaderImganothpic.removeFile( file.id );
$('#'+file.id).remove();
$.each(imgListanothpicData,function(index, item) {
if (response.id == item) {
imgListanothpicData.splice(index,1);
return false;
}
});
setanothpicVal();
return false;
});
});
function setanothpicVal()
{
var anothpic = '';
$.each(imgListanothpicData,function(index, item) {
anothpic += item + ',';
});
anothpic = anothpic.substring(0, anothpic.length - 1);
$('input[name=anothpic]').val(anothpic);
}
<?php if (!empty($records['anothpic_array'])) :?>
var html = '';
$('#anothpic_thelist').css('margin-top','10px');
<?php foreach ($records['anothpic_array'] as $value1) { ?>
<?php $value1 = (int)$value1; ?>
imgListanothpicData.push(<?=$value1?>);
html += '<div id="' + <?=$value1?> + '" class="item" style="margin-right: 10px;">';
html += '<a href="javascript:;"><img src="<?=get_cover($value1,"path")?>" style="width: 100px;height: 100px;cursor: move;"></a>';
html += '<h4 class="info" style="text-align: center;">';
html += '<a href="javascript:;" class="jsdelzip table_click" style="float:none;display:inline-block;" img-id="' + <?=$value1?> + '">删除</a>';
html += '</h4>';
html += '<div class="progress progress-striped active" style="display: none;">';
html += '<div class="progress-bar" role="progressbar" style="width: 100%;">100%</div>';
html += '</div>';
html += '</div>';
<?php }?>
$('#anothpic_thelist').html(html);
$('#anothpic_thelist').children().children('h4').children('.jsdelzip').on('click', function() {
var thisId = $(this).attr('img-id');
$(this).parent().parent().remove();
$.each(imgListanothpicData,function(index, item) {
if (thisId == item) {
imgListanothpicData.splice(index,1);
return false;
}
});
setanothpicVal();
});
<?php endif ;?>
</script>
</block>

@ -0,0 +1,405 @@
<extend name="Public/base"/>
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<style>
.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;}
.data_list table td{
text-indent:0;
}
.data_game_list table td{
line-height:1;
padding: 3px;
}
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">{$meta_title}</h3>
<p class="description_text">说明:该功能是用于录入工会所属的推广公司名称</p>
</div>
<div class="jssearch search_list fl cf">
<div class="cf top_nav_list">
<!-- 高级搜索 -->
<div class="cf top_nav_list">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<div class="input-list">
<input style="width: 200px;" type="text" name="company_name" class="search-input" value="{:I('company_name')}" placeholder="请输入公司名称搜索">&nbsp;
</div>
<div class="input-list input-list-promote search_label_rehab">
<select id="promote_id" name="promote_id" class="select_gallery" style="width: 200px;">
<option value="">推广员账号</option>
<volist name="promoteList" id="vo">
<option promote-id="{$vo.id}" value="{$vo.id}">{$vo.account}({$vo.real_name})</option>
</volist>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="company_type" name="company_type" class="select_gallery">
<option value="">请选择公司性质</option>
<option value="1" <?php echo I('company_type') === 1 ? "selected" : ''?>>公司</option>
<option value="2" <?php echo I('company_type') == 2 ? "selected" : ''?>>个人</option>
</select>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('PromoteCompany/lists','model='.$model['name'].'&row='.I('row'),false)}">生成</a>
</div>
</div>
</div>
</div>
<?php if ($msg):?>
{$msg}
<div class="data_list data_game_list">
<div class="">
<table border="1">
<!-- 表头 -->
<thead>
<tr>
<th style="width:10%;min-width:150px;">平台</th>
<th>时间</th>
<th>游戏名称</th>
<th>平台流水</th>
<th>分成比例</th>
<th>我方比例</th>
<th>渠道费率</th>
<th>税费费率</th>
<th>合作方结算分成</th>
<th>违规罚款</th>
<th>奖励</th>
<th>备注</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<tr>
<td rowspan="3"></td>
<td></td>
<td></td>
<td></td>
<td rowspan="3"></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
<?php elseif ($settlement_type == 1):?>
<span style="color: red;">上游-汇总结算单</span>
<div class="data_list data_game_list">
<div class="">
<table border="1">
<!-- 表头 -->
<thead>
<tr>
<th style="width:10%;min-width:150px;">平台</th>
<th>时间</th>
<th>游戏名称</th>
<th>平台流水</th>
<th>分成比例</th>
<th>我方比例</th>
<th>渠道费率</th>
<th>税费费率</th>
<th>合作方结算分成</th>
<th>违规罚款</th>
<th>奖励</th>
<th style="width:20%;min-width:150px;">备注</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<empty name ="listData">
<td colspan="99" class="text-center">aOh! 暂时还没有可结算内容!</td>
<else />
<?php foreach ($listData as $item): ?>
<?php foreach ($item['channels'] as $k => $channel): ?>
<?php if ($k == 0) :?>
<tr>
<td rowspan="{:sizeof($item['channels'])}">{$item.company_name}</td>
<td>123</td>
<td>{$channel['relation_game_name']}</td>
<td>{$channel['amount']}</td>
<td>{$channel['game_ratio']}%</td>
<td>{$channel['self_game_ratio']}%</td>
<td rowspan="{:sizeof($item['channels'])}">{$item['channel_rate']*100}%</td>
<td rowspan="{:sizeof($item['channels'])}">{$item['invoice_rate']*100}%</td>
<td>{$channel['parter_settlement']}</td>
<td rowspan="{:sizeof($item['channels'])}">{$item['fine']}</td>
<td rowspan="{:sizeof($item['channels'])}">{$item['bonuses']}</td>
<td rowspan="{:sizeof($item['channels'])}">备注</td>
</tr>
<?php else :?>
<tr>
<td>123</td>
<td>{$channel['relation_game_name']}</td>
<td>{$channel['amount']}</td>
<td>{$channel['game_ratio']}%</td>
<td>{$channel['self_game_ratio']}%</td>
<td>{$channel['parter_settlement']}</td>
</tr>
<?php endif;?>
<?php endforeach;?>
<?php endforeach;?>
</empty>
</tbody>
</table>
</div>
</div>
<?php elseif (in_array($settlement_type, [2, 3])):?>
<!-- 下游-内团/外团汇总结算单 -->
<span style="color: red;">下游-<?php echo $settlement_type == 2 ? "内团" : "外团"?>汇总结算单</span>
<div class="data_list data_game_list">
<div class="">
<table border="1">
<!-- 表头 -->
<thead>
<tr>
<th>排序</th>
<th style="width:10%;">平台</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 style="width:20%;min-width:150px;">备注</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<empty name ="listData">
<td colspan="99" class="text-center">aOh! 暂时还没有可结算内容!</td>
<else />
<?php foreach ($listData as $index => $item): ?>
<?php foreach ($item['channels'] as $k => $channel): ?>
<?php if ($k == 0) :?>
<tr>
<td rowspan="{:sizeof($item['channels'])}">{$index+1}</td>
<td rowspan="{:sizeof($item['channels'])}">{$item.company_name}</td>
<td>{$channel['account']}</td>
<td>{$channel['relation_game_name']}</td>
<td>{$channel['amount']}</td>
<td>{$channel['game_ratio']}%</td>
<td>{$channel['game_ratio_max']}%</td>
<td rowspan="{:sizeof($item['channels'])}">{$item['fax_ratio']*100}%</td>
<td>{$channel['price']}</td>
<td rowspan="{:sizeof($item['channels'])}">{$item['fine']}</td>
<td rowspan="{:sizeof($item['channels'])}">{$item['bonuses']}</td>
<td rowspan="{:sizeof($item['channels'])}">{$item['total_amount']}</td>
<td rowspan="{:sizeof($item['channels'])}">{$item['settlement_contact']}</td>
<td>时间</td>
<td rowspan="{:sizeof($item['channels'])}">备注</td>
</tr>
<?php else :?>
<tr>
<td>{$channel['account']}</td>
<td>{$channel['relation_game_name']}</td>
<td>{$channel['amount']}</td>
<td>{$channel['game_ratio']}%</td>
<td>{$channel['game_ratio_max']}%</td>
<td>{$channel['price']}</td>
<td>时间</td>
</tr>
<?php endif;?>
<?php endforeach;?>
<?php endforeach;?>
</empty>
</tbody>
</table>
</div>
</div>
<?php elseif ($settlement_type == 4):?>
<span style="color: red;">下游-个人汇总结算单</span>
<div class="data_list data_game_list">
<div class="">
<table border="1">
<!-- 表头 -->
<thead>
<tr>
<th>排序</th>
<th style="width:10%;min-width:150px;">公司名称</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>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<empty name ="listData">
<td colspan="99" class="text-center">aOh! 暂时还没有可结算内容!</td>
<else />
<?php foreach ($listData as $index => $item): ?>
<?php foreach ($item['channels'] as $k => $channel): ?>
<?php if ($k == 0) :?>
<tr>
<td rowspan="{:sizeof($item['channels'])}">{$index+1}</td>
<td rowspan="{:sizeof($item['channels'])}">{$item.company_name}</td>
<td>{$channel['account']}</td>
<td>{$channel['admin_name']}</td>
<td>{$channel['company_relation_name']}</td>
<td>{$channel['type_name']}</td>
<td>{$channel['relation_game_name']}</td>
<td >结算时间</td>
<td>{$channel['amount']}</td>
<td>{$channel['game_ratio']}%</td>
<td>{$channel['game_ratio_max']}%</td>
<td>{$channel['price']}</td>
<td rowspan="{:sizeof($item['channels'])}">{$item['bonuses']}</td>
<td rowspan="{:sizeof($item['channels'])}">{$item['fine']}</td>
<td rowspan="{:sizeof($item['channels'])}">{$item['total_amount']}</td>
<td rowspan="{:sizeof($item['channels'])}">{$item['settlement_contact']}</td>
<td rowspan="{:sizeof($item['channels'])}">{$item['bank_card']}</td>
<td rowspan="{:sizeof($item['channels'])}">{$item['bank_address']}</td>
</tr>
<?php else :?>
<tr>
<td>{$channel['account']}</td>
<td>{$channel['admin_name']}</td>
<td>{$channel['company_relation_name']}</td>
<td>{$channel['type_name']}</td>
<td>{$channel['relation_game_name']}</td>
<td >结算时间</td>
<td>{$channel['amount']}</td>
<td>{$channel['game_ratio']}%</td>
<td>{$channel['game_ratio_max']}%</td>
<td>{$channel['price']}</td>
</tr>
<?php endif;?>
<?php endforeach;?>
<?php endforeach;?>
</empty>
</tbody>
</table>
</div>
</div>
<?php endif;?>
<div >
<label>请选择审核人</label>
</div>
</block>
<block name="script">
<script src="__STATIC__/layer/layer.js"></script>
<script src="__STATIC__/layer/extend/layer.ext.js"></script>
<style>
.layui-layer-demo .layui-layer-title {background:#F0F5F7;font-weight:bold;}
.layui-layer-demo .layui-layer-content {}
.layui-layer-demo .layui-layer-content table{width:100%;border:0;border-spacing:0;padding:0;}
.layui-layer-demo .layui-layer-content td {height:42px;padding-left:20px;}
.layui-layer-demo .layui-layer-content tr:hover {background:#F0F5F7;}
.layui-layer-demo .layui-layer-content tr~tr {border-top:1px solid #ccc;}
.layui-layer-demo .layui-layer-content td~td {border-left:1px solid #ccc;}
.layui-layer-demo .layui-layer-content tr:last-child td {}
</style>
<script>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
$(".select_gallery").select2();
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav("{:U('lists')}");
$(function(){
//搜索功能
$("#search").click(function(){
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&"+$('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
query = query.replace(/^&/g,'');
if( url.indexOf('?')>0 ){
url += '&' + query;
}else{
url += '?' + query;
}
window.location.href = url;
});
//回车自动提交
$('.jssearch').find('input').keyup(function(event){
if(event.keyCode===13){
$("#search").click();
}
});
});
</script>
</block>

@ -155,6 +155,34 @@
</td>
</tr>
<tr>
<td class="l noticeinfo">公钥</td>
<td class="r table_radio">
<input name="config[pub_secret]" type="text" value="{$alipay['pub_secret']}" class="">
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l noticeinfo">私钥</td>
<td class="r table_radio">
<input name="config[pri_secret]" type="text" value="{$alipay['pri_secret']}" class="">
<span class="notice-text"></span>
</td>
</tr>
<tr>

@ -45,7 +45,10 @@ class PromoteRepository {
if (isset($params['sdk_version'])) {
$map['sdk_version'] = $params['sdk_version'];
}
if (isset($params['begin_time']) && isset($params['begin_time']) && isset($params['time_column'])) {
if (isset($params['role_level'])) {
$map['role_level'] = $params['role_level'];
}
if (isset($params['begin_time']) && isset($params['end_time']) && isset($params['time_column'])) {
$map[$params['time_column']] = ['between', [$params['begin_time'], $params['end_time']]];
}
if (isset($params['lock_status'])) {

@ -28,9 +28,27 @@ class TaskClient
return json_decode($result, true);
}
public function sendSms($mobile, $clientIp, $type = 'common')
public function sendSmsCode(string $mobile, string $clientIp)
{
return $this->post('/message/sms-send', ['mobile' => $mobile, 'type' => $type, 'client_ip' => $clientIp]);
$options = ['type' => 'code', 'client_ip' => $clientIp];
return $this->sendSms($mobile, $options);
}
public function sendSmsContent(string $mobile, string $content)
{
$options = ['type' => 'content', 'content' => $content];
return $this->sendSms($mobile, $options);
}
public function sendSmsBatch(array $mobiles, string $content)
{
$options = ['type' => 'batch', 'content' => $content];
return $this->sendSms($mobiles, $options);
}
private function sendSms($mobile, array $options)
{
return $this->post('/message/sms-send', ['mobile' => $mobile, 'options' => $options]);
}
public function checkSms($mobile, $code)

@ -2209,4 +2209,206 @@ class QueryController extends BaseController
$this->ajaxReturn($data);
}
//推广员指标管理
public function promoteQuota()
{
$time = I('time', date('Y-m-d'));
if (!empty($time)) {
$defaultTime = $time;
} else {
$nowTime = date('Y-m-d', time());
$defaultTime = date('Y-m-d', strtotime('-6 day', time())) . " 至 " . $nowTime;
$time = $defaultTime;
}
$sdkVersion = I('sdk_version', 0);
$relationGameId = I('relation_game_id', 0);
$serverId = I('server_id', 0);
$parentId = I('parent_id', 0);
$promoteId = I('promote_id', 0);
$levelBegin = I('level_begin', '');
$levelEnd = I('level_end', '');
$prevParentId = 0;
$promoteService = new PromoteService();
$loginPromote = $this->getLoginPromote();
$parent = null;
if ($parentId > 0) {
$parent = M('promote', 'tab_')->where(['id' => $parentId])->find();
$currentDisplay = $promoteService->getLevelName($parent['level']) . '推广';
$prevParentId = $parent['parent_id'] == $loginPromote['parent_id'] ? 0 : $parent['parent_id'];
} else {
$parent = $loginPromote;
$currentDisplay = '自己';
}
$searchLevel = $parent['level'] + 1;
$searchLevelName = $promoteService->getLevelName($searchLevel);
$games = get_promote_serach_game();
$subPromotes = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $parent['id']])->select();
$map = ['parent_id' => $parent['id']];
if ($promoteId > 0) {
$map['id'] = $promoteId;
}
$query = M('promote', 'tab_')->field(['id', 'account', 'real_name', 'level'])->where($map);
list($promotes, $pagination, $count) = $this->paginate($query);
$ids = array_column($promotes, 'id');
$rows = [];
if (count($ids) > 0) {
$rows = M('promote', 'tab_')
->field(['id', 'chain'])
->where(['chain' => ['like', [$parent['chain'] . $parent['id'] . '/%']], 'level' => ['gt', $parent['level'] + 1]])
->select();
}
$basicPromotes = [];
foreach ($ids as $id) {
foreach ($rows as $row) {
$needChain = $parent['chain'] . $parent['id'] . '/' . $id . '/';
if (strpos($row['chain'], $needChain) !== false) {
$basicPromotes[$row['id']] = $id;
}
}
}
$params = [
'isContainSubs' => true,
'basicPromotes' => $basicPromotes,
];
if ($relationGameId != 0 || $sdkVersion != 0) {
$gameIds = gameSearch($relationGameId, $sdkVersion);
$params['game_id'] = ['in', $gameIds];
}
if ($serverId > 0) {
$params['server_id'] = $serverId;
}
$where = $params;
if ($sdkVersion != 0) {
$where['sdk_version'] = $sdkVersion;
}
$game = $this->getGame($where);
if ($levelBegin !== '' || $levelEnd !== '') {
if ($levelBegin !== '' && $levelEnd !== '') {
$levelBegin = intval($levelBegin);
$levelEnd = intval($levelEnd);
if ($levelBegin > $levelEnd) {
$this->error('角色等级范围错误');
}
$params['role_level'] = ['between', [$levelBegin, $levelEnd]];
} elseif ($levelBegin !== '' && $levelEnd === '') {
$levelBegin = intval($levelBegin);
$params['role_level'] = ['egt', $levelBegin];
} elseif ($levelBegin === '' && $levelEnd !== '') {
$levelEnd = intval($levelEnd);
$params['role_level'] = ['elt', $levelEnd];
}
}
list($beginTime, $endTime) = $this->getBetweenTime($time);
$params['begin_time'] = $beginTime;
$params['end_time'] = $endTime;
$records = [];
$promoteRepository = new PromoteRepository();
$createRoleCountList = $promoteRepository->getCreateRoleCountByIds($ids, $params);
if (I('p', 1) == 1) {
$selfParams = $params;
$selfParams['isContainSubs'] = false;
$selfCreateRoleCountList = $promoteRepository->getCreateRoleCountByIds([$parent['id']], $selfParams);
$record = [
'id' => $parent['id'],
'account' => $parent['account'],
'real_name' => mb_strlen($parent['real_name'],'utf-8') == 2 ? mb_substr($parent['real_name'],0,1,'utf-8').'*':mb_substr($parent['real_name'],0,1,'utf-8').'**',
'level' => $parent['level'],
'game_name' => $game['game_name'],
'sdk_version_text' => $game['sdk_version_text'],
'server_name' => $game['server_name'],
'role_num' => $selfCreateRoleCountList[$parent['id']],
'current_display' => $currentDisplay,
];
$records[] = $record;
}
foreach ($promotes as $promote) {
$id = $promote['id'];
$record = [
'id' => $id,
'account' => $promote['account'],
'real_name' => mb_strlen($promote['real_name'],'utf-8') == 2 ? mb_substr($promote['real_name'],0,1,'utf-8').'*':mb_substr($promote['real_name'],0,1,'utf-8').'**',
'level' => $promote['level'],
'game_name' => $game['game_name'],
'sdk_version_text' => $game['sdk_version_text'],
'server_name' => $game['server_name'],
'role_num' => $createRoleCountList[$id],
'current_display' => '',
];
$records[] = $record;
}
$this->assign('prevParentId', $prevParentId);
$this->assign('searchLevelName', $searchLevelName);
$this->assign('games', $games);
$this->assign('parent', $parent);
$this->assign('subPromotes', $subPromotes);
$this->assign('records', $records);
$this->assign('pagination', $pagination);
$this->assign('parentId', $parentId);
$this->assign('count', $count);
$this->assign('time', $defaultTime);
$this->assign('meta_title', '推广员指标管理');
$this->display();
}
private function getGame($map = [])
{
$gameName = '全部游戏';
$sdkVersionText = getSDKTypeName(0, true);
$serverName = '--';
if (isset($map['game_id']) || isset($map['sdk_version'])) {
$where = [];
if (!isset($map['game_id'])) {
$sdkVersionText = getSDKTypeName($map['sdk_version'], true);
} elseif (!isset($map['sdk_version'])) {
$where['id'] = $map['game_id'];
$gameName = M('game', 'tab_')->where($where)->getField('relation_game_name');
if (isset($map['server_id'])) {
$serverName = $this->getServerName($map['game_id'], 0, $map['server_id']);
}
} else {
$where['id'] = $map['game_id'];
$where['sdk_version'] = $map['sdk_version'];
$gameName = M('game', 'tab_')->where($where)->getField('game_name');
$sdkVersionText = getSDKTypeName($map['sdk_version'], true);
if (isset($map['server_id'])) {
$serverName = $this->getServerName($map['game_id'], $map['sdk_version'], $map['server_id']);
}
}
}
$game = [
'game_name' => $gameName,
'sdk_version_text' => $sdkVersionText,
'server_name' => $serverName,
];
return $game;
}
private function getServerName($gameIds, $serverVersion, $serverId)
{
$map['_string'] = '1 = 1';
if ($gameIds) {
$map['game_id'] = $gameIds;
}
if ($serverVersion) {
$map['server_version'] = $serverVersion;
}
if ($serverId) {
$map['server_id'] = $serverId;
}
return M('server', 'tab_')->where($map)->getField('server_name');
}
}

@ -167,7 +167,6 @@ class SafeController extends BaseController{
$modelList = ['基础信息', $metaTitle];
$this->verifyPasswordView($modelList);
$ver_status = M('promote','tab_')->where(['id'=>$id])->getField('ver_status',true);
if($ver_status[0] == 1) {
//return $this->display('editModify');
$this->redirect('editModify');

@ -0,0 +1,184 @@
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/account.css" rel="stylesheet" >
<style>
.form-group {
float: left;
margin-bottom: 10px;
}
.form-group label {
line-height: 34px;
height: 34px;
}
</style>
</block>
<block name="body">
<div class="page-list normal_list promote-mychlid-list">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>数据管理></span><span>{$meta_title}</span></div>
</div>
<img src="__IMG__/20180207/icon_normal_game.png">
<span class="title_main">{$meta_title}</span>
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<form action="{:U('Query/promoteQuota',['row'=>I('get.row')])}" method="post" enctype="multipart/form-data">
<input type="hidden" name="parent_id" value="{:I('parent_id', 0)}">
<div class="form-group normal_space">
<select name="promote_id" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择{$searchLevelName}</option>
<volist name="subPromotes" id="promote">
<option ba-id="{$promote.id}" value="{$promote.id}" <if condition="I('promote_id') == $promote['id']">selected</if>>{$promote.account}({$promote.real_name})</option>
</volist>
</select>
</div>
<div class="form-group normal_space">
<select id="game-select" name="relation_game_id" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择游戏</option>
<volist name="games" id="game">
<option value="{$game.relation_game_id}" <if condition="I('relation_game_id') eq $game['relation_game_id']">selected</if>>{$game.relation_game_name}</option>
</volist>
</select>
</div>
<div class="form-group normal_space">
<select id="sdk_version" name="sdk_version" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择设备类型</option>
<option value="1" <if condition="I('sdk_version') === '1'">selected</if>>Andriod</option>
<option value="2" <if condition="I('sdk_version') === '2'">selected</if>>IOS</option>
</select>
</div>
<div class="form-group normal_space">
<select id="server-select" name="server_id" class="reselect select_gallery" style="width: 220px;" data-server="{:I('server_id', 0)}" >
<option value="0">请选择区服</option>
</select>
</div>
<div class="form-group normal_space fr">
<input type="text" class="txt range-date" name="time" placeholder="创角时间" value="{$time}" >
</div>
<div class="form-group normal_space fr">
<label>角色等级:</label>
<input type="text" class="txt float-input" name="level_begin" style="width: 50px" value="{:I('level_begin')}" >
<label> ~ </label>
<input type="text" class="txt float-input" name="level_end" style="width: 50px" value="{:I('level_end')}" >
</div>
<div class="form-group">
<input type="submit" class="submit normal_space" value="查询">
</div>
<?php if ($prevParentId > 0):?>
<div class="form-group">
<a class="submit normal_space" href="{:U('Query/promoteQuota', ['row'=>I('get.row'), 'parent_id' => $prevParentId,'time'=>$time])}" style="line-height: 36px; display: inline-block; text-align: center; background: #E5E5E5; color: #2bd8ed; cursor: pointer;">返回上级</a>
</div>
<?php endif;?>
</form>
</div>
<div class="trunk-list list_normal">
<table class="table normal_table">
<tr class="odd">
<th>推广员</th>
<th>游戏名称</th>
<th>平台</th>
<th>游戏区服</th>
<th>角色数量</th>
<?php if($parent['level'] < 4):?>
<th>操作</th>
<?php endif;?>
</tr>
<empty name="records">
<tr><td colspan="14" style="text-align: center;height: 45vh;"><img src="__IMG__/20180207/icon_wushujv2.png"/><p style="line-height: 40px;color: #A5A5A5;">暂无数据</p></td></tr>
<else />
<volist name="records" id="record" mod="2">
<tr data-id="{$vo.id}" class="<eq name='mod' value='1'>odd</eq>">
<td>{$record.account}({$record.real_name})
<?php if($record['current_display'] != ''):?>
<span style="color: #06C;">[{$record['current_display']}]</span>
<?php endif;?>
</td>
<td>{$record.game_name}</td>
<td>{$record.sdk_version_text}</td>
<td>{$record.server_name}</td>
<td>{$record.role_num}</td>
<?php if($parent['level'] < 4):?>
<td>
<?php if($record['current_display'] == '' && $record['level'] < 4):?>
<a href="{:U('Query/promoteQuota', ['parent_id' => $record['id'], 'time' => $time])}">查看下级</a>
<?php endif;?>
</td>
<?php endif;?>
</tr>
</volist>
</empty>
</table>
</div>
<div class="pagenation clearfix">
<?php if ($loginer['level'] !== 4) :?>
<a id="sch-btn" href="{:U('download/achievement_data_export',array_merge(['parent_id'=>$parentId,'time'=>$time],I('post.')))}" class="ajax-get">导出</a>
<?php endif ;?>
{$pagination}
</div>
</div>
<div class="page-explain promote-mychlid-explain">
<div class="trunk-content article border_normal">
<!-- <table class="desccontent">
<tr><td class="title" style="width: 100px;display: inline-block;">二级渠道说明:</td><td class="det">推广员默认为一级渠道,一级渠道可通过推广员后台新增二级渠道;二级渠道由一级渠道管理开启权限,并由一级渠道给二级渠道结算,结算可到财务管理操作。</td></tr>
</table>-->
</div>
</div>
</div>
</block>
<block name="script">
<link rel="stylesheet" href="__STATIC__/flatpickr/flatpickr.min.css">
<script src="__STATIC__/flatpickr/flatpickr.min.js"></script>
<script src="__STATIC__/flatpickr/l10n/zh.js"></script>
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<eq name='timeout' value='1'>
<script>
layer.msg('时间间隔不能超过7天');
</script>
</eq>
<script type="text/javascript">
$(function() {
var defaultDate = $('.range-date').val()
defaultDate = defaultDate == '' ? [] : defaultDate.split(' 至 ')
$('.range-date').flatpickr({
mode: 'range',
locale: 'zh',
dateFormat: "Y-m-d",
defaultDate: defaultDate,
})
$('.select_gallery').select2()
var gameId = $('#game-select').val();
var sdkVersion = $('#sdk_version').val();
var defaultServerId = $('#server-select').attr('data-server');
getGameServers(gameId, sdkVersion, defaultServerId)
$('#game-select,#sdk_version').on({
change: function name() {
gameId = $('#game-select').val();
sdkVersion = $('#sdk_version').val();
getGameServers(gameId, sdkVersion, 0);
}
});
function getGameServers(gameId, sdkVersion, defaultServerId) {
$.ajax({
url: "{:U('Query/getGameServers')}",
dataType: 'json',
data: {game_id: gameId, sdk_version: sdkVersion},
success: function(response) {
var options = '<option value="0">请选择区服</option>'
for (var i in response.data.servers) {
var server = response.data.servers[i]
var selected = ''
if (defaultServerId > 0 && server.id==defaultServerId) {
selected = 'selected'
}
options += '<option value="' + server.server_id + '"' + selected + '>' + server.server_name + '</option>'
}
$('#server-select').html(options)
$("#server-select").val(defaultServerId).trigger("change")
}
})
}
})
</script>
</block>

@ -220,7 +220,7 @@ class CommonController extends BaseController {
{
$phone = I('phone');
$taskClient = new TaskClient();
$result = $taskClient->sendSms($phone, get_client_ip());
$result = $taskClient->sendSmsCode($phone, get_client_ip());
$data = [];
if ($result['code'] == TaskClient::SUCCESS) {
$this->respondSuccess('发送成功');

@ -414,7 +414,7 @@ class SsgController extends BaseController {
{
$phone = I('phone');
$taskClient = new TaskClient();
$result = $taskClient->sendSms($phone, get_client_ip());
$result = $taskClient->sendSmsCode($phone, get_client_ip());
$data = [];
if ($result['code'] == TaskClient::SUCCESS) {
$data['status'] = 1;

@ -581,7 +581,7 @@ class UserController extends BaseController
public function telsafecode($phone = '', $delay = 10, $flag = true)
{
$taskClient = new TaskClient();
$result = $taskClient->sendSms($phone, get_client_ip());
$result = $taskClient->sendSmsCode($phone, get_client_ip());
$data = [];
if ($result['code'] == TaskClient::SUCCESS) {
$data['status'] = 1;

@ -974,6 +974,31 @@ CREATE TABLE `tab_statement` (
KEY `link_phone` (`link_phone`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='cp/公会对账单';
-- 2020-01-02
-- 提现结算类型 cxj
ALTER TABLE `tab_withdraw`
ADD COLUMN `settlement_type` tinyint(3) NOT NULL DEFAULT 3 COMMENT '结算类型1-周结 2-月结 3-管理员提现 4-推广员提现 5-其他';
-- 2020 01-03 cxj
ALTER TABLE `sys_file`
MODIFY COLUMN `mime` char(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '文件mime类型';
ALTER TABLE `tab_spend`
MODIFY COLUMN `selle_status` int(11) NOT NULL DEFAULT 0 COMMENT '渠道结算 0未结算1 结算',
MODIFY COLUMN `selle_ratio` double(5, 2) DEFAULT 0.00 COMMENT '渠道分成比例';
-- 2020 01-06 cxj
ALTER TABLE `tab_promote_game_ratio`
ADD COLUMN `turnover_ratio` varchar(2000) NOT NULL COMMENT '流水分成比例' AFTER `last_ratio_status`;
ALTER TABLE `tab_promote_game_ratio`
ADD COLUMN `last_turnover_ratio` varchar(2000) NOT NULL COMMENT '上次流水分成比例' AFTER `turnover_ratio`;
-- 2020 01-07 cxj
ALTER TABLE `tab_withdraw`
ADD COLUMN `game_ratio` varchar(5000) NOT NULL COMMENT '游戏提现实际分成比例';
ALTER TABLE `tab_withdraw`
MODIFY COLUMN `settlement_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '结算类型1-周结 2-月结 9-其他';
-- 新增CP游戏分成比例表 2020-01-09 郑昌隆
@ -1219,3 +1244,17 @@ ALTER TABLE `tab_promote_company`
ADD COLUMN `is_sign_contact` tinyint(3) NOT NULL DEFAULT 0 COMMENT '是否签署合同:0-未签署 1-签署' AFTER `company_type`,
ADD COLUMN `company_belong` tinyint(1) UNSIGNED NOT NULL DEFAULT 3 COMMENT '工会归属0-内团1-外团 2-分发联盟 3 无' AFTER `is_sign_contact`,
ADD COLUMN `resources` VARCHAR(2000) NULL DEFAULT '' COMMENT '文档' AFTER `company_belong`;
-- 预付款预警
CREATE TABLE `tab_partner_divide_warn` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '公司预警表',
`partner_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '公司ID',
`advance_amount` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预付款',
`warming_amount` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预警金额',
`phones` json DEFAULT NULL,
`warn_frequency` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预警金额频率',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态 1正常 2删除',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`upt_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
`operater_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作者ID',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

@ -0,0 +1,135 @@
{
"id": "1392920",
"name": "project",
"font_family": "iconfont",
"css_prefix_text": "icon",
"description": "",
"glyphs": [
{
"icon_id": "577306",
"name": "方形未选中",
"font_class": "fangxingweixuanzhong",
"unicode": "e720",
"unicode_decimal": 59168
},
{
"icon_id": "577307",
"name": "方形选中-fill",
"font_class": "fangxingxuanzhongfill",
"unicode": "e721",
"unicode_decimal": 59169
},
{
"icon_id": "577313",
"name": "加号1",
"font_class": "jiahao1",
"unicode": "e727",
"unicode_decimal": 59175
},
{
"icon_id": "577315",
"name": "减号",
"font_class": "jianhao",
"unicode": "e729",
"unicode_decimal": 59177
},
{
"icon_id": "1718321",
"name": "返回",
"font_class": "fanhui",
"unicode": "e600",
"unicode_decimal": 58880
},
{
"icon_id": "1718323",
"name": "更多",
"font_class": "gengduo",
"unicode": "e601",
"unicode_decimal": 58881
},
{
"icon_id": "2674472",
"name": "返回",
"font_class": "fanhui1",
"unicode": "e625",
"unicode_decimal": 58917
},
{
"icon_id": "2674473",
"name": "关闭",
"font_class": "guanbi",
"unicode": "e624",
"unicode_decimal": 58916
},
{
"icon_id": "4765734",
"name": "plus-circle",
"font_class": "plus-circle",
"unicode": "e781",
"unicode_decimal": 59265
},
{
"icon_id": "4765972",
"name": "minus-square",
"font_class": "minus-square",
"unicode": "e796",
"unicode_decimal": 59286
},
{
"icon_id": "4765973",
"name": "plus-square",
"font_class": "plus-square",
"unicode": "e797",
"unicode_decimal": 59287
},
{
"icon_id": "4936531",
"name": "minus-square-fill",
"font_class": "minus-square-fill",
"unicode": "e84b",
"unicode_decimal": 59467
},
{
"icon_id": "4936538",
"name": "plus-square-fill",
"font_class": "plus-square-fill",
"unicode": "e84c",
"unicode_decimal": 59468
},
{
"icon_id": "6151304",
"name": "reply",
"font_class": "reply",
"unicode": "e82f",
"unicode_decimal": 59439
},
{
"icon_id": "6151371",
"name": "sort",
"font_class": "sort",
"unicode": "e842",
"unicode_decimal": 59458
},
{
"icon_id": "6151377",
"name": "sort-down",
"font_class": "sort-down",
"unicode": "e843",
"unicode_decimal": 59459
},
{
"icon_id": "6151384",
"name": "sort-up",
"font_class": "sort-up",
"unicode": "e844",
"unicode_decimal": 59460
},
{
"icon_id": "8776842",
"name": "search",
"font_class": "icon-test",
"unicode": "e63c",
"unicode_decimal": 58940
}
]
}
Loading…
Cancel
Save