Merge branch 'release' of wmtx/platform into master

版本更新
master
廖金灵 5 years ago committed by Gogs
commit 490d52395f

@ -918,6 +918,7 @@ class ArticleController extends AdminController {
if ($_POST['type'] == 1 ) {
$_POST['pop_time'] = strtotime($_POST['pop_time']);
}
if ($id) {
$pop_rules_model = M('document_pop_rules');//M('$this->$model_name','tab_');
$res = $pop_rules_model->where(['id'=>$id])->save($_POST);
@ -943,11 +944,49 @@ class ArticleController extends AdminController {
if (!$rule) {
return $this->error('记录不存在');
}
if (empty($rule['document_route'])) {
$doc = "当前无文档";
}else {
$document_route_arr = explode("/", $rule['document_route']);
$doc = $document_route_arr[2];
}
$this->assign("doc", $doc);
$rule['pop_time'] = $rule['type'] == 1 ? date("Y-m-d", $rule['pop_time']) : $rule['pop_time'];
$this->assign('rule', $rule);
}
}
$this->display('pop_rule_edit');
}
public function uploadDoc() {
$id = $_REQUEST['id'];
if(@is_uploaded_file($_FILES['file']['tmp_name'])){
$upfile = $_FILES["file"];
$name = $upfile["name"];
$type = $upfile["type"];
$size = $upfile["size"];
$tmp_name = $upfile["tmp_name"];
$savePath = $_SERVER['DOCUMENT_ROOT'].__ROOT__.'/Uploads/Documents/';
if (is_dir($savePath)) {
move_uploaded_file($tmp_name,$savePath.$name);
}else {
mkdir($savePath, 0777, true);
move_uploaded_file($tmp_name,$savePath.$name);
}
$file_name = $savePath.$name;
$error=$upfile["error"];//上传后系统返回的值
$data['document_route'] = 'Uploads/Documents/'.$name;
$updateres = M('document_pop_rules')->where(['id' => $id])->save($data);
if ($updateres) {
$backData['code'] = 10000;
$backData['filename'] = $name;
}else {
$backData['code'] = 10001;
}
$this->ajaxReturn(json_encode($backData,TRUE));
}
}
}

@ -2265,7 +2265,7 @@ class ExportController extends Controller
$re_data['pay_time'] = set_show_time($order_detail['pay_time']);
$re_data['payed_time'] = set_show_time($order_detail['payed_time']);
} elseif($v['tab'] == 'deposit') {
$order_detail = M('deposit', 'tab_')->field('create_time,payed_time,user_account,promote_account,pay_amount,pay_way')->where(['pay_order_number' => $v['pay_order_number']])->find();
$order_detail = M('deposit', 'tab_')->field('create_time,payed_time,user_account,promote_account,pay_amount,pay_way')->where(['pay_order_number' => $v['pay_order_number']])->find();
$re_data['pay_time'] = set_show_time($order_detail['create_time']);
$re_data['payed_time'] = set_show_time($order_detail['payed_time']);
}
@ -2475,7 +2475,7 @@ class ExportController extends Controller
break;
case 28:
$xlsCell = array(
"账号ID","玩家账号", "账户平台币", "累计使用平台币", "累计充值平台币", "后台发放平台币"
"账号ID","玩家账号", "平台币余额", "平台币直充余额", "平台币直充支出", "平台币直充金额", "后台发放平台币"
);
$params = I('get.');
@ -2545,54 +2545,94 @@ class ExportController extends Controller
->field('id, account')
->where($map)
->count();
$perSize = 1000;//每次查询的条数
$pages = ceil($count / $perSize);
for($i = 1; $i <= $pages; $i++) {
$datas = M('user', 'tab_')
->field('id, account')
->where($map)
->limit(($i-1)*$perSize ,$perSize)
->select();
// $datas = M('user', 'tab_')
// ->field('id, account')
// ->where($map)
// ->limit(($i-1)*$perSize ,$perSize)
// ->select();
$map5['v.pay_type'] = 1;
$map5['v.create_time'] = $map['create_time'];
$map5[] = ['u.id = v.user_id'] ;
$map6[] = ['u.id = v.user_id'];
$map6['v.pay_type'] = 2;
$map6['v.create_time'] = $map['create_time'];
$map7[] = ['u.id = v.user_id'];
$map7['v.pay_type'] = 3;
$map7['v.create_time'] = $map['create_time'];
$map8[] = ['u.id = v.user_id'];
$map8['v.create_time'] = $map['create_time'];
$map9[] = ['u.id = v.user_id'];
$map9['v.pay_type'] = 3;
if (!empty($map['create_time'][1][1])) {
$map9['v.create_time'] = ['elt', $map['create_time'][1][1] ];
}
if (!empty($map['create_time'][1][0]) && empty($map['create_time'][1][1])) {
$map9['v.create_time'] = ['egt', $map['create_time'][1][0] ];
}
$valueQuery5 = M('value_detail_log', 'tab_')->alias('v')->field('IFNULL(sum(abs(v.value)), 0) as spend_value')
->where($map5)->buildSql();
$valueQuery6 = M('value_detail_log', 'tab_')->alias('v')->field('sum(v.value) as spend_value')
->where($map6)->buildSql();
$valueQuery7 = M('value_detail_log', 'tab_')->alias('v')->field('sum(v.value) as spend_value')
->where($map7)->buildSql();
$valueQuery8 = M('value_detail_log', 'tab_')->alias('v')->field('after_value')->where($map8)->order('create_time desc')->limit(1)->buildSql();
$valueQuery9 = M('value_detail_log', 'tab_')->alias('v')->field('IFNULL(sum(abs(v.value)), 0) as spend_value')
->where($map9)->buildSql();
$datas = M('user', 'tab_')->alias('u')->field("u.id, u.account, {$valueQuery8} as totalvalue, {$valueQuery5} as spendvalue, {$valueQuery6} as deposit, {$valueQuery7} as promoteCoin , if (({$valueQuery8}) - ({$valueQuery9}) > 0, ({$valueQuery8}) - ({$valueQuery9}), 0) as restvalue")->where($map)->limit(($i-1)*$perSize ,$perSize)->order('restvalue desc')->group('u.id')->select();
$query = M('user', 'tab_')->alias('u')->field("u.id, u.account, {$valueQuery8} as totalvalue, {$valueQuery5} as spendvalue, {$valueQuery6} as deposit, {$valueQuery7} as promoteCoin , if (({$valueQuery8}) - ({$valueQuery9}) > 0, ({$valueQuery8}) - ({$valueQuery9}), 0) as restvalue")->where($map)->order('id desc')->group('u.id')->buildSql();
$allTotalValue1 = M()->alias('t')->table($query)->sum('t.totalvalue');
$allRestValue = M()->alias('rest')->table($query)->sum('rest.restvalue');
$allDatas = [];
foreach($datas as $key => $data) {
$allDatas['user_id'] = $data['id'];
$allDatas['user_account'] = $data['account'];
$spend = M('value_detail_log', 'tab_')->where(['user_id'=>$data['id'], 'pay_type'=>1])->sum('value');
$map5['user_id'] = $data['id'];
$map5['pay_type'] = 1;
$map5['create_time'] = $map['create_time'];
$spend = M('value_detail_log', 'tab_')->where($map5)->sum('value');
// $map5['user_id'] = $data['id'];
// $map5['pay_type'] = 1;
// $map5['create_time'] = $map['create_time'];
// $spend = M('value_detail_log', 'tab_')->where($map5)->sum('value');
$spend = $data['spendvalue'];
if(empty($spend)) {
$spend = '0.00';
}else {
$spend = number_format(abs($spend),2,'.','');
}
$map6['user_id'] = $data['id'];
$map6['pay_type'] = 2;
$map6['create_time'] = $map['create_time'];
$deposit = M('value_detail_log', 'tab_')->where($map6)->sum('value');
// $map6['user_id'] = $data['id'];
// $map6['pay_type'] = 2;
// $map6['create_time'] = $map['create_time'];
// $deposit = M('value_detail_log', 'tab_')->where($map6)->sum('value');
$deposit = $data['deposit'];
if(empty($deposit)) {
$deposit = '0.00';
}
$map7['user_id'] = $id;
$map7['pay_type'] = 3;
$map7['create_time'] = $map['create_time'];
$promoteCoin = M('value_detail_log', 'tab_')->where($map7)->sum('value');
// $map7['user_id'] = $id;
// $map7['pay_type'] = 3;
// $map7['create_time'] = $map['create_time'];
// $promoteCoin = M('value_detail_log', 'tab_')->where($map7)->sum('value');
$promoteCoin = $data['promotecoin'];
if(empty($promoteCoin)) {
$promoteCoin = '0.00';
}
$map8['user_id'] = $data['id'];
$map8['create_time'] = $map['create_time'];
$newValueByTimeDatas = M('value_detail_log', 'tab_')->field('after_value')->where($map8)->order('create_time desc')->limit(1)->select();
if(empty($newValueByTimeDatas)) {
$aValue = '0.00';
}else {
$aValue = $newValueByTimeDatas[0]['after_value'];
$restValue = $data['restvalue'];
if(empty($restValue)) {
$restValue = '0.00';
}
$alltotalvalue = $data['totalvalue'];
if(empty($alltotalvalue)) {
$alltotalvalue = '0.00';
}
$allDatas['bind_balance'] = $aValue;
$allDatas['bind_balance'] = $alltotalvalue;
$allDatas['rest_value'] = $restValue ;
$allDatas['spend_amount'] = $spend;
$allDatas['deposit_amount'] = $deposit;
$allDatas['coin_amount'] = $promoteCoin;
@ -2608,7 +2648,8 @@ class ExportController extends Controller
}
$alldatas1['user_id'] = "汇总(检索时间内所有数据的统计)";
$alldatas1['user_account'] = "";
$alldatas1['bind_balance'] = $banlaceTotal;
$alldatas1['bind_balance'] = $allTotalValue1;
$alldatas1['restvalue'] = $allRestValue;
$alldatas1['spend_amount'] = abs($totalSpend);
$alldatas1['deposit_amount'] = $deposit1;
$alldatas1['coin_amount'] = $promoteCoin;
@ -2679,7 +2720,6 @@ class ExportController extends Controller
->where($map)
->limit(($i-1)*$perSize ,$perSize)
->select();
foreach ($valueDetailDatas as $key => $valueDetailData) {
$vlaueDetailData['order_number'] = $valueDetailData['order_number'];
$vlaueDetailData['create_time'] = date('Y-m-d H:i:s', $valueDetailData['create_time']);
@ -2697,14 +2737,22 @@ class ExportController extends Controller
}
$vlaueDetailData['value'] = $valueDetailData['value'];
$vlaueDetailData['after_value'] = $valueDetailData['after_value'];
$map8['user_id'] = $id;
$map8['create_time'] = $map['create_time'];
$newValueByTimeDatas = M('value_detail_log', 'tab_')->field('after_value')->where($map8)->group('user_id')->select();
$aValue = $newValueByTimeDatas['after_value'];
$allDatas['bind_balance'] = $aValue;
$allDatas['spend_amount'] = $spend;
$allDatas['deposit_amount'] = $deposit;
$allDatas['coin_amount'] = $promoteCoin;
mb_convert_variables('GBK', 'UTF-8', $vlaueDetailData);
fputcsv($fp, $vlaueDetailData);
}
unset($vlaueDetailDatas);//释放变量的内存
//刷新输出缓冲到浏览器
ob_flush();
flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。
// mb_convert_variables('GBK', 'UTF-8', $allDatas);
// fputcsv($fp, $allDatas);
}
if($t >= 0 ) {
$fuhao = '+';
@ -8983,6 +9031,7 @@ class ExportController extends Controller
array('status','状态'),
array('user_account','游戏账号'),
array('creator','创单人'),
array('handler','接单人'),
array('created_time', '创单时间'),
array('score', '分数'),
array('attachment_type', '附件')
@ -8994,6 +9043,7 @@ class ExportController extends Controller
$item['type'] = $item['type'] == 1 ? '资源' : '反馈';
$item['status'] = $item['status'] == 1 ? '完成' : '处理中';
$item['creator'] = get_admin_name($item['creator_id']);
$item['handler'] = get_admin_name($item['handler_id']);
$item['created_time'] = date('Y-m-d H:i:s', $item['created_time']);
$item['attachment_type'] = empty($item['attachment_url']) ? '无' : '有';
$item['order_no'] = "\t{$item['order_no']}";
@ -9024,24 +9074,61 @@ class ExportController extends Controller
$map['p.id'] = I('promote_id');
}
$pdlMap = "";
$pdlMap = "";
$weekMap = '';
if ($startTime = I('create_time_start')) {
$startTime = strtotime($startTime);
$pdlMap .= " and pdl.create_time >={$startTime}";
$pdlMap .= " and pdl.create_time >={$startTime}";
$weekMap .= " and register_time >={$startTime}";
}
if ($endTime = I('create_time_end')) {
$endTime = strtotime($endTime) + 86400;
$pdlMap .= " and pdl.create_time < {$endTime}";
$pdlMap .= " and pdl.create_time < {$endTime}";
$weekMap .= " and register_time < {$endTime}";
}
if ($startTime = I('create_time_start')) {
$startTime = strtotime($startTime);
$pdlMap .= " and pdl.create_time >={$startTime}";
$weekMap .= " and register_time >={$startTime}";
}
if ($info['level'] == PromoteModel::LEVEL_GROUP_LEADER) {
$xlsData = M('promote', 'tab_')->alias('p')
->field('p.id, p.level, p.account, count(pdl.id) as lowerCount, count(if(pdl.type = 1, 1, null)) as signCount, count(if(pdl.type = 2, 1, null)) as tfCount, count(if(pdl.type = 3, 1, null)) as superSignCount')
->join("tab_package_download_log pdl on pdl.promote_id = p.id $pdlMap", 'left')
->where($map)
->group('p.id')
->select();
if ($level == PromoteModel::LEVEL_TEAM_MEMBER) {
$xlsData = M('promote', 'tab_')->alias('p')
->field('p.id, p.level, p.account')
->where($map)
->select();
if ($xlsData) {
$beginThisweek = mktime(0, 0 , 0,date("m"),date("d")-date("w")+1,date("Y"));
$endThisweek = mktime(23,59,59,date("m"),date("d")-date("w")+7,date("Y"));
if (empty($weekMap)) {
$weekMap = " and register_time between $beginThisweek and $endThisweek";
}
foreach ($xlsData as &$item) {
$item['ioscount'] = M('user', 'tab_')->where('device_type = 2 and promote_id = ' . $item['id'])->count();
$item['weekcount'] = M('user', 'tab_')->where("device_type = 2 and promote_id = {$item['id']}" . $weekMap)->count();
$itemCount = M('package_download_log', 'tab_')->alias('pdl')
->field('count(if(pdl.type = 1, 1, null)) as signCount, count(if(pdl.type = 2, 1, null)) as tfCount, count(if(pdl.type = 3, 1, null)) as superSignCount')
->where("promote_id={$item['id']} $pdlMap")->select();
$item['signcount'] = $itemCount[0]['signcount'] ?? 0;
$item['tfcount'] = $itemCount[0]['tfcount'] ?? 0;
$item['supersigncount'] = $itemCount[0]['supersigncount'] ?? 0;
}
// $promoters = M('promote', 'tab_')->alias('p')->field('p.id, p.level, p.account')->where($map)->select();
// $pids = implode(',', array_column($promoters, 'id'));
// $total[0]['ioscount'] = M('user', 'tab_')->where("device_type = 2 and promote_id in ($pids)")->count();
// $total[0]['weekcount'] = M('user', 'tab_')->where("device_type = 2 and promote_id in ($pids)" . $weekMap)->count();
// $totalCount = M('package_download_log', 'tab_')->alias('pdl')
// ->field('count(if(pdl.type = 1, 1, null)) as signCount, count(if(pdl.type = 2, 1, null)) as tfCount, count(if(pdl.type = 3, 1, null)) as superSignCount')
// ->where("promote_id in ($pids) $pdlMap")->select();
// $total[0]['signcount'] = $totalCount[0]['signcount'] ?? 0;
// $total[0]['tfcount'] = $totalCount[0]['tfcount'] ?? 0;
// $total[0]['supersigncount'] = $totalCount[0]['supersigncount'] ?? 0;
}
} else {
$xlsData = M('promote', 'tab_')->alias('p')
->field('p.id, p.level, p.account, count(if(p2.level = '.($level+1).', 1, null)) as lowerCount, count(if(pdl.type = 1, 1, null)) as signCount, count(if(pdl.type = 2, 1, null)) as tfCount, count(if(pdl.type = 3, 1, null)) as superSignCount')
@ -9051,14 +9138,28 @@ class ExportController extends Controller
->group('p.id')
->select();
}
$xlsCell = array(
array('account', PromoteModel::$levelArr[$level]."账号"),
array('lowercount', PromoteModel::$levelArr[$level+1]."数量"),
array('tfcount', 'TF下载数'),
array('supersigncount', "超级签下载数"),
array('signcount', "企业签下载数"),
);
if ($level == PromoteModel::LEVEL_TEAM_MEMBER) {
foreach($xlsData as &$item) {
$item['tfcount'] = $item['tfcount'] . "(" . (empty($item['ioscount']) ? 0 : round( ($item['tfcount'] / $item['ioscount']) * 100 , 2)) . ")%";
}
$xlsCell = array(
array('account', PromoteModel::$levelArr[$level]."账号"),
array('ioscount', "iOS用户总数"),
array('weekcount', "新增iOS用户总数"),
array('tfcount', 'TF下载数/iOS用户总数'),
array('supersigncount', "超级签下载数"),
array('signcount', "企业签下载数"),
);
} else {
$xlsCell = array(
array('account', PromoteModel::$levelArr[$level]."账号"),
array('lowercount', PromoteModel::$levelArr[$level+1]."数量"),
array('tfcount', 'TF下载数'),
array('supersigncount', "超级签下载数"),
array('signcount', "企业签下载数"),
);
}
$this->exportAddOperationLog('Statistics/packDownload','统计-IOS下载统计-导出');
$this->exportExcel($xlsName, $xlsCell, $xlsData);
}
@ -9157,4 +9258,95 @@ class ExportController extends Controller
$this->exportExcel($xlsName, $xlsCell, $list);
}
public function exportWorkOrderStatistics()
{
$order = '';
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);
$order = 'order by ' . $data_order_type . " " . ($data_order == 3 ? 'desc' : 'asc');
}
$map = '1=1';
if (!empty(I('nickname'))) {
$map .= " and t.nickname = '" . I('nickname') . "'";
}
// 获取所有传单或者接单用户id
$userids = M('work_order_info', 'tab_')
->field("concat(creator_id, ',', handler_id) as userid")
->join('sys_member as t on creator_id = t.uid or handler_id = t.uid')
->where($map)
->select();
if (empty($userids)) {
$list = [];
$count = 0;
} else {
$userids = implode(',', array_unique(array_filter(explode(',', implode(',', array_column($userids, 'userid'))))));
$count = count($userids);
$list = M('work_order_info', 'tab_')->query("SELECT
t.id,
t.nickname,
sum(total_create_count) as total_create_count,
sum(total_accepted_count) as total_accepted_count,
sum(total_handle_count) as total_handle_count,
sum(total_complete_count) as total_complete_count
FROM
(
SELECT
u.uid as id,
u.nickname,
count(*) AS total_create_count,
count(
IF (i.`handler_id` > 0, 1, NULL)
) AS total_accepted_count,
NULL AS total_handle_count,
NULL AS total_complete_count
FROM
sys_member u
JOIN tab_work_order_info i ON i.creator_id = u.uid
WHERE
u.uid in ({$userids})
GROUP BY u.uid
UNION
SELECT
u.uid as id,
u.nickname,
NULL AS total_create_count,
NULL AS total_accepted_count,
count(*) AS total_handle_count,
count(IF(i.`status` = 1, 1, NULL)) AS total_complete_count
FROM
sys_member u
JOIN tab_work_order_info i ON i.handler_id = u.uid
WHERE
u.uid in ({$userids})
GROUP BY u.uid
) AS t
where {$map}
GROUP BY t.id
$order");
}
if ($list) {
foreach ($list as &$item)
{
$item['total_create_count'] = $item['total_create_count'] ?? 0;
$item['total_accepted_count'] = $item['total_accepted_count'] ?? 0;
$item['total_handle_count'] = $item['total_handle_count'] ?? 0;
$item['total_complete_count'] = $item['total_complete_count'] ?? 0;
}
}
$xlsName = '工单统计报表';
$xlsCell = array(
array('nickname', "账号"),
array('total_create_count', "发布工单数"),
array('total_accepted_count', '被接手工单数'),
array('total_handle_count', "接手工单数"),
array('total_complete_count', "完成工单数"),
);
$this->exportAddOperationLog('Statistics/exportWorkOrderStatistics','用户-工单统计-导出');
$this->exportExcel($xlsName, $xlsCell, $list);
}
}

@ -1243,6 +1243,10 @@ class FinanceController extends ThinkController
$nowTime = date('Y-m-d');
$initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
$initEndTime = date('Y-m-d', time());
$sort = $_REQUEST['sort'];
if (empty($sort)) {
$sort = 13;
}
if(!empty($_REQUEST['user_account'])) {
$map['account'] = $_REQUEST['user_account'];
$map0['account'] = $_REQUEST['user_account'];
@ -1266,11 +1270,102 @@ class FinanceController extends ThinkController
$map['create_time'] = array('between', [strtotime($initBegTime), strtotime($initEndTime) + 86399]);
}
$datas = M('user', 'tab_')
->field('id, account')
->where($map0)
->page($page,$row)
->select();
$order = 'id desc';
if ($sort == 1) {
$order = 'spendvalue desc';
}
if ($sort == 2) {
$order = 'deposit desc';
}
if ($sort == 3 || $sort == 5) {
$order = 'spendvalue desc';
}
if ($sort == 4) {
$order = 'spendvalue asc';
}
if ($sort == 6) {
$order = 'deposit desc';
}
if ($sort == 7) {
$order = 'deposit asc';
}
if ($sort == 9) {
$order = 'promoteCoin desc';
}
if ($sort == 10) {
$order = 'promoteCoin asc';
}
if ($sort == 11) {
$order = 'id asc';
}
if ($sort == 12) {
$order = 'id desc';
}
if ($sort == 16) {
$order = 'restvalue desc';
}
if ($sort == 17) {
$order = 'restvalue asc';
}
if ($sort == 19) {
$order = 'totalvalue desc';
}
if ($sort == 20) {
$order = 'totalvalue asc';
}
$this->assign('sorting', $sort);
$map5['v.pay_type'] = 1;
$map5['v.create_time'] = $map['create_time'];
$map5[] = ['u.id = v.user_id'] ;
$map6[] = ['u.id = v.user_id'];
$map6['v.pay_type'] = 2;
$map6['v.create_time'] = $map['create_time'];
$map7[] = ['u.id = v.user_id'];
$map7['v.pay_type'] = 3;
$map7['v.create_time'] = $map['create_time'];
$map8[] = ['u.id = v.user_id'];
$map8['v.create_time'] = $map['create_time'];
$map9[] = ['u.id = v.user_id'];
$map9['v.pay_type'] = 3;
if (!empty($map['create_time'][1][1])) {
$map9['v.create_time'] = ['elt', $map['create_time'][1][1] ];
}
if (!empty($map['create_time'][1][0]) && empty($map['create_time'][1][1])) {
$map9['v.create_time'] = ['egt', $map['create_time'][1][0] ];
}
$valueQuery5 = M('value_detail_log', 'tab_')->alias('v')->field('IFNULL(sum(abs(v.value)), 0) as spend_value')
->where($map5)->buildSql();
$valueQuery6 = M('value_detail_log', 'tab_')->alias('v')->field('sum(v.value) as spend_value')
->where($map6)->buildSql();
$valueQuery7 = M('value_detail_log', 'tab_')->alias('v')->field('sum(v.value) as spend_value')
->where($map7)->buildSql();
$valueQuery9 = M('value_detail_log', 'tab_')->alias('v')->field('IFNULL(sum(abs(v.value)), 0) as spend_value')
->where($map9)->buildSql();
$valueQuery8 = M('value_detail_log', 'tab_')->alias('v')->field('after_value')->where($map8)->order('create_time desc')->limit(1)->buildSql();
$datas = M('user', 'tab_')->alias('u')->field("u.id, u.account, {$valueQuery8} as totalvalue, {$valueQuery5} as spendvalue, {$valueQuery6} as deposit, {$valueQuery7} as promoteCoin , if (({$valueQuery8}) - ({$valueQuery9}) > 0, ({$valueQuery8}) - ({$valueQuery9}), 0) as restvalue")->where($map0)->page($page,$row)->order($order)->group('u.id')->select();
$query = M('user', 'tab_')->alias('u')->field("u.id, u.account, {$valueQuery8} as totalvalue, {$valueQuery5} as spendvalue, {$valueQuery6} as deposit, {$valueQuery7} as promoteCoin , if (({$valueQuery8}) - ({$valueQuery9}) > 0, ({$valueQuery8}) - ({$valueQuery9}), 0) as restvalue")->where($map0)->order($order)->group('u.id')->buildSql();
$allTotalValue1 = M()->alias('t')->table($query)->sum('t.totalvalue');
$allRestValue = M()->alias('rest')->table($query)->sum('rest.restvalue');
// var_dump($datas);die();
// $datas = M('user', 'tab_')
// ->field('id, account')
// ->where($map0)
// ->page($page,$row)
// ->order('id desc')
// ->select();
$count = M('user', 'tab_')
->field('id, account')
->where($map)
@ -1280,35 +1375,37 @@ class FinanceController extends ThinkController
$ids = [-100];
}
$allDatas = [];
foreach($datas as $key => $data) {
$id = $data['id'];
$account = $data['account'];
$allDatas[$key]['user_id'] = $id;
$allDatas[$key]['user_account'] = $account;
$map5['user_id'] = $id;
$map5['pay_type'] = 1;
$map5['create_time'] = $map['create_time'];
$spend = M('value_detail_log', 'tab_')->where($map5)->sum('value');
$spend = $data['spendvalue'];
if(empty($spend)) {
$spend = '0.00';
}else {
$spend = number_format(abs($spend),2,'.','');
}
$map6['user_id'] = $id;
$map6['pay_type'] = 2;
$map6['create_time'] = $map['create_time'];
$deposit = M('value_detail_log', 'tab_')->where($map6)->sum('value');
$deposit = $data['deposit'];
if(empty($deposit)) {
$deposit = '0.00';
}
$map7['user_id'] = $id;
$map7['pay_type'] = 3;
$map7['create_time'] = $map['create_time'];
$promoteCoin = M('value_detail_log', 'tab_')->where($map7)->sum('value');
$promoteCoin = $data['promotecoin'];
if(empty($promoteCoin)) {
$promoteCoin = '0.00';
}
$restValue = $data['restvalue'];
if(empty($restValue)) {
$restValue = '0.00';
}
$alltotalvalue = $data['totalvalue'];
if(empty($alltotalvalue)) {
$alltotalvalue = '0.00';
}
// $allDatas[$key]['bind_balance'] = $bind_balance;
$allDatas[$key]['after_value'] = $alltotalvalue ;
$allDatas[$key]['rest_value'] = $restValue ;
$allDatas[$key]['spend_amount'] = $spend;
$allDatas[$key]['deposit_amount'] = $deposit;
$allDatas[$key]['coin_amount'] = $promoteCoin;
@ -1327,36 +1424,35 @@ class FinanceController extends ThinkController
$map3['create_time'] = $map['create_time'];
$map3['pay_type'] = 3;
$allpromoteCoin = M('value_detail_log', 'tab_')->where($map3)->sum('value');
$allpromoteCoin = empty($promoteCoin) ? '0.00' : number_format($allpromoteCoin,2,'.','');
$allpromoteCoin = empty($allpromoteCoin) ? '0.00' : number_format($allpromoteCoin,2,'.','');
$map4['create_time'] = $map['create_time'];
if($_REQUEST['user_account']) {
$banlace = M('value_detail_log', 'tab_')->field('user_id, after_value')->where($map4)->order('create_time desc')->limit(1)->select();
}else {
$banlace = M('value_detail_log', 'tab_')->field('user_id, after_value')->where($map4)->order('create_time desc')->select();
}
$banlaceTotal = '0.00';
foreach($banlace as $k222 => $vvv) {
$banlaceTotal += $vvv['after_value'];
}
$banlaceTotal = number_format($banlaceTotal,2,'.','');
// $banlaceTotal = '0.00';
// foreach($banlace as $k222 => $vvv) {
// $banlaceTotal += $vvv['after_value'];
// }
// $banlaceTotal = number_format($banlaceTotal,2,'.','');
$map['user_id'] = ['in', $ids];
$newValueByTimeDatas = M('value_detail_log', 'tab_')->field('user_id, after_value, create_time')->where($map)->order('create_time desc')->limit(1)->select();
// var_dump($newValueByTimeDatas);die();
foreach ($allDatas as $k => $allData) {
$allDatas[$k]['after_value'] = "0.00";
foreach ($newValueByTimeDatas as $key1 => $newValueByTimeData ) {
if (intval($allData['user_id']) == intval($newValueByTimeData['user_id'])) {
$allDatas[$k]['after_value'] = $newValueByTimeData['after_value'];
break;
}else {
$allDatas[$k]['after_value'] = "0.00";
// $newValueByTimeDatas = M('value_detail_log', 'tab_')->field('user_id, after_value, create_time')->where($map)->order('create_time desc')->limit(1)->select();
// var_dump($newValueByTimeDatas);
// // var_dump($newValueByTimeDatas);die();
// foreach ($allDatas as $k => $allData) {
// $allDatas[$k]['after_value'] = "0.00";
// foreach ($newValueByTimeDatas as $key1 => $newValueByTimeData ) {
// if (intval($allData['user_id']) == intval($newValueByTimeData['user_id'])) {
// $allDatas[$k]['after_value'] = $newValueByTimeData['after_value'];
// break;
// }else {
// $allDatas[$k]['after_value'] = "0.00";
}
}
// }
// }
}
// }
$page = set_pagination($count,$row);
if($page) {$this->assign('_page', $page);}
if(empty($_REQUEST['timestart']) && empty($_REQUEST['timeend']) && empty(I('user_account'))) {
@ -1366,12 +1462,12 @@ class FinanceController extends ThinkController
$this->assign('starttime', $_REQUEST['timestart']);
$this->assign('endtime', $_REQUEST['timeend']);
}
$this->assign('banlaceTotal', $banlaceTotal);
$this->assign('banlaceTotal', $allTotalValue1);
$this->assign('total', $totalSpend);
$this->assign('deposit', $deposit);
$this->assign('promoteCoin', $allpromoteCoin);
$this->assign('data', $allDatas);
$this->assign('resttotal', $allRestValue);
$this->display();
}

@ -273,12 +273,12 @@ class PresidentDepositController extends ThinkController
if ($amount > 100000000) {
return $this->error('金额过高');
}
if ($payer == '') {
/* if ($payer == '') {
return $this->error('请输入付款人');
}
if ($payAccount == '') {
return $this->error('请输入付款账号');
}
} */
$data = [];
$data['pay_way'] = $payType == 2 ? 4 : $payWay;

@ -1162,29 +1162,68 @@ class StatisticsController extends ThinkController {
$count = M('promote', 'tab_')->alias('p')->where($map)->count();
$pdlMap = "";
$weekMap = '';
if ($startTime = I('create_time_start')) {
$startTime = strtotime($startTime);
$pdlMap .= " and pdl.create_time >={$startTime}";
$weekMap .= " and register_time >={$startTime}";
}
if ($endTime = I('create_time_end')) {
$endTime = strtotime($endTime) + 86400;
$pdlMap .= " and pdl.create_time < {$endTime}";
$weekMap .= " and register_time <= {$endTime}";
}
if ($info['level'] == PromoteModel::LEVEL_GROUP_LEADER) {
if ($level == PromoteModel::LEVEL_TEAM_MEMBER) {
$beginThisweek = mktime(0, 0 , 0,date("m"),date("d")-date("w")+1,date("Y"));
$endThisweek = mktime(23,59,59,date("m"),date("d")-date("w")+7,date("Y"));
if (empty($weekMap)) {
$weekMap = " and register_time between $beginThisweek and $endThisweek";
}
$list = M('promote', 'tab_')->alias('p')
->field('p.id, p.level, p.account, count(pdl.id) as lowerCount, count(if(pdl.type = 1, 1, null)) as signCount, count(if(pdl.type = 2, 1, null)) as tfCount, count(if(pdl.type = 3, 1, null)) as superSignCount')
->join("tab_package_download_log pdl on pdl.promote_id = p.id $pdlMap", 'left')
->where($map)
->page($p, $row)
->group('p.id')
->select();
$total = M('promote', 'tab_')->alias('p')
->field('count(pdl.id) as lowerCount, count(if(pdl.type = 1, 1, null)) as signCount, count(if(pdl.type = 2, 1, null)) as tfCount, count(if(pdl.type = 3, 1, null)) as superSignCount')
->join("tab_package_download_log pdl on pdl.promote_id = p.id $pdlMap", 'left')
->where($map)
->select();
->field('p.id, p.level, p.account')
->where($map)
->page($p, $row)
->select();
if ($list) {
foreach ($list as &$item) {
$item['ioscount'] = M('user', 'tab_')->where('device_type = 2 and promote_id = ' . $item['id'])->count();
$item['weekcount'] = M('user', 'tab_')->where("device_type = 2 and promote_id = {$item['id']}" . $weekMap)->count();
$itemCount = M('package_download_log', 'tab_')->alias('pdl')
->field('count(if(pdl.type = 1, 1, null)) as signCount, count(if(pdl.type = 2, 1, null)) as tfCount, count(if(pdl.type = 3, 1, null)) as superSignCount')
->where("promote_id={$item['id']} $pdlMap")->select();
$item['signcount'] = $itemCount[0]['signcount'] ?? 0;
$item['tfcount'] = $itemCount[0]['tfcount'] ?? 0;
$item['supersigncount'] = $itemCount[0]['supersigncount'] ?? 0;
}
$promoters = M('promote', 'tab_')->alias('p')->field('p.id, p.level, p.account')->where($map)->select();
$pids = implode(',', array_column($promoters, 'id'));
$total[0]['ioscount'] = M('user', 'tab_')->where("device_type = 2 and promote_id in ($pids)")->count();
$total[0]['weekcount'] = M('user', 'tab_')->where("device_type = 2 and promote_id in ($pids)" . $weekMap)->count();
$totalCount = M('package_download_log', 'tab_')->alias('pdl')
->field('count(if(pdl.type = 1, 1, null)) as signCount, count(if(pdl.type = 2, 1, null)) as tfCount, count(if(pdl.type = 3, 1, null)) as superSignCount')
->where("promote_id in ($pids) $pdlMap")->select();
$total[0]['signcount'] = $totalCount[0]['signcount'] ?? 0;
$total[0]['tfcount'] = $totalCount[0]['tfcount'] ?? 0;
$total[0]['supersigncount'] = $totalCount[0]['supersigncount'] ?? 0;
}
// $list = M('promote', 'tab_')->alias('p')
// ->field('p.id, p.level, p.account, count(u.id) as iosCount, count(if (u.register_time between '. $beginThisweek . ' and ' . $endThisweek .', 1, null)) as weekCount, count(if(pdl.type = 1, 1, null)) as signCount, count(if(pdl.type = 2, 1, null)) as tfCount, count(if(pdl.type = 3, 1, null)) as superSignCount')
// ->join("tab_package_download_log pdl on pdl.promote_id = p.id $pdlMap", 'left')
// ->join("tab_user u on u.promote_id = p.id and u.device_type=2", 'left')
// ->where($map)
// ->page($p, $row)
// ->group('p.id')
// ->select();
// $total = M('promote', 'tab_')->alias('p')
// ->field('count(distinct(u.id)) as iosCount, count(distinct(if (u.register_time between '. $beginThisweek . ' and ' . $endThisweek .', 1, null))) as weekCount, count(if(pdl.type = 1, 1, null)) as signCount, count(if(pdl.type = 2, 1, null)) as tfCount, count(if(pdl.type = 3, 1, null)) as superSignCount')
// ->join("tab_package_download_log pdl on pdl.promote_id = p.id $pdlMap", 'left')
// ->join("tab_user u on u.promote_id = p.id and u.device_type=2")
// ->where($map)
// ->select();
} else {
$list = M('promote', 'tab_')->alias('p')
->field('p.id, p.level, p.account, count(if(p2.level = '.($level+1).', 1, null)) as lowerCount, count(if(pdl.type = 1, 1, null)) as signCount, count(if(pdl.type = 2, 1, null)) as tfCount, count(if(pdl.type = 3, 1, null)) as superSignCount')
@ -1209,7 +1248,12 @@ class StatisticsController extends ThinkController {
$this->assign('_page', $page);
}
$promoters = M('promote', 'tab_')->field('id, account')->where(array_merge(['level'=>$level], $pid ? ['parent_id'=>$pid] : []))->select();
if ($pid && $level) {
$promoters = M('promote', 'tab_')->field('id, account')->where("level= $level and chain like '{$info['chain']}{$pid}/%'")->select();
} else {
$promoters = M('promote', 'tab_')->field('id, account')->where(array_merge(['level'=>$level], $pid ? ['parent_id'=>$pid] : []))->select();
}
unset($typeArr[0]);
$this->assign('promoters', $promoters);
$this->assign('types', $typeArr);
@ -1245,14 +1289,17 @@ class StatisticsController extends ThinkController {
$map['pdl.type'] = I('type');
}
$weekMap = '';
if ($startTime = I('create_time_start')) {
$startTime = strtotime($startTime);
$map['_string'] .= " and pdl.create_time >={$startTime}";
$weekMap .= " and register_time >={$startTime}";
}
if ($endTime = I('create_time_end')) {
$endTime = strtotime($endTime) + 86400;
$map['_string'] .= " and pdl.create_time < {$endTime}";
$weekMap .= " and register_time <= {$endTime}";
}
$list = M('package_download_log', 'tab_')->alias('pdl')
@ -1263,12 +1310,28 @@ class StatisticsController extends ThinkController {
->page($p, $row)
->select();
$beginThisweek = mktime(0, 0 , 0,date("m"),date("d")-date("w")+1,date("Y"));
$endThisweek = mktime(23,59,59,date("m"),date("d")-date("w")+7,date("Y"));
if (empty($weekMap)) {
$weekMap = " and register_time between $beginThisweek and $endThisweek";
}
$total = M('package_download_log', 'tab_')->alias('pdl')
->field('count(if(pdl.type = 1, 1, null)) as signCount, count(if(pdl.type = 2, 1, null)) as tfCount, count(if(pdl.type = 3, 1, null)) as superSignCount')
->join('tab_promote p on p.id = pdl.promote_id')
//->join('tab_user u on u.id = pdl.user_id', 'left')
->where($map)
->select();
$promoters = M('package_download_log', 'tab_')->alias('pdl')
->field('pdl.promote_id')
->join('tab_promote p on p.id = pdl.promote_id')
->join('tab_user u on u.id = pdl.user_id', 'left')
->where($map)
->select();
$pids = implode(',', array_unique(array_filter(array_column($promoters, 'promote_id'))));
$total[0]['ioscount'] = $promoters ? M('user', 'tab_')->where("device_type = 2 and promote_id in ($pids)")->count() : 0;
$total[0]['weekcount'] = $promoters ? M('user', 'tab_')->where("device_type = 2 and promote_id in ($pids)" . $weekMap)->count() : 0;
$count = M('package_download_log', 'tab_')->alias('pdl')
->join('tab_promote p on p.id = pdl.promote_id')

@ -21,6 +21,7 @@ class ToolController extends ThinkController {
{
$name = $_POST['name'];
$config = I('config');
$data = array('config'=>json_encode($config),'template'=>$_POST['template'],'status'=>$_POST['status']);
$map['name']=$name;

@ -103,7 +103,7 @@ class WorkOrderController extends ThinkController
$info['role_name'] = I('role_names')[$i];
$info['resource_num'] = I('apply_resources')[$i];
$info['order_no'] = $info['type'] . date('YmdHis'). $i. rand(10, 99) . $info['creator_id'];
$info['handler_id'] = $info['creator_id'];
//$info['handler_id'] = $info['creator_id'];
$ins = M('work_order_info', 'tab_')->add($info);
if (!$ins) {M('work_order_info', 'tab_')->rollback(); $this->error("创建失败");}
@ -113,7 +113,7 @@ class WorkOrderController extends ThinkController
// 添加一条附件信息
$attachement_info = $data;
$attachement_info['attachment_url'] = I('attachment_url', '');
$attachement_info['handler_id'] = $attachement_info['creator_id'];
//$attachement_info['handler_id'] = $attachement_info['creator_id'];
$attachement_info['order_no'] = $attachement_info['type'] . date('YmdHis'). rand(100, 999) . $attachement_info['creator_id'];
$ins = M('work_order_info', 'tab_')->add($attachement_info);
if (!$ins) {M('work_order_info', 'tab_')->rollback(); $this->error("创建失败");}
@ -126,16 +126,16 @@ class WorkOrderController extends ThinkController
if (empty(I('user_account')) || empty(I('role_name')) || empty(I('feedback'))) {
$this->error('请填写必填的数据');
}
if (empty('handler_id')) {
$this->error('请选择处理人');
}
// if (empty('handler_id')) {
// $this->error('请选择处理人');
// }
$user = M('user', 'tab_')->where(['account'=>I('user_account')])->find();
if (empty($user)) $this->error("账号不存在");
$data['attachment_url'] = I('attachment_url', '');
$data['user_account'] = I('user_account');
$data['role_name'] = I('role_name');
$data['feedback'] = I('feedback');
$data['handler_id'] = I('handler_id');
//$data['handler_id'] = I('handler_id');
$data['remark'] = I('remark', '');
$data['process_log'] = json_encode([['title'=>sprintf('%s于 %s 创建了工单%s,工单状态处理中。', get_admin_name($data['creator_id']), date('Y-m-d H:i:s'), $data['order_no']), 'type'=>1]]);
$ins = M('work_order_info', 'tab_')->add($data);
@ -203,7 +203,7 @@ class WorkOrderController extends ThinkController
private function modifyProcessLog($oldData, $newData)
{
$key = ['game_name'=>'游戏名称', 'server_name'=>'区服名称', 'role_name'=>'角色名称', 'user_account'=>'玩家账号', 'feedback'=>'反馈原因', 'handler_id'=>'处理人', 'remark'=>'备注', 'status'=>'状态', 'attachment_url'=>'附件'];
$key = ['game_name'=>'游戏名称', 'server_name'=>'区服名称', 'role_name'=>'角色名称', 'user_account'=>'玩家账号', 'feedback'=>'反馈原因', 'handler_id'=>'接单人员', 'remark'=>'备注', 'status'=>'状态', 'attachment_url'=>'附件'];
$log = [];
foreach ($newData as $k => $v) {
if (array_key_exists($k, $oldData) && array_key_exists($k, $key) && $oldData[$k] != $newData[$k]) {
@ -254,7 +254,7 @@ class WorkOrderController extends ThinkController
if (!I('resource_num')) $this->error('请填写申请资源数量');
}
$data['handler_id'] = $data['creator_id'] = is_login();
$data['creator_id'] = is_login();
$data['created_time'] = time();
$data['type'] = $info['type'];
$data['server_id'] = $info['server_id'];
@ -314,7 +314,7 @@ class WorkOrderController extends ThinkController
// 删除
public function delete($ids)
{
$delete = M('work_order_info', 'tab_')->where(['id'=>['in', $ids]])->save(['status'=>2]);
$delete = M('work_order_info', 'tab_')->where(['id'=>['in', $ids]])->delete();
return $delete ? $this->success('删除成功') : $this->error('删除失败');
}
@ -329,4 +329,109 @@ class WorkOrderController extends ThinkController
$delete = M('work_order_info', 'tab_')->where(['id'=>$id])->save($data);
return $delete ? $this->success('成功完成工单') : $this->error('更新失败');
}
public function take($id)
{
$info = M('work_order_info', 'tab_')->where(['id'=>$id])->find();
if (empty($info)) $this->error('未找到该资源');
$userid = is_login();
if ($info['status'] == 1) {
$this->error('工单已完成');
}
if (!empty($info['handler_id'])) {
if ($info['handler_id'] != $userid) {
$this->error('工单已被他人领取');
} else {
$this->error('请勿重复领取工单');
}
}
if ($info['type'] == 2) {
$process_log = json_decode($info['process_log'], true) ?: [];
$log = ['title'=>sprintf("%s于%s 接取了工单%s", get_admin_name(is_login()), date('Y-m-d H:i:s'), $info['order_no']), 'detail'=>$log, 'type'=>2];
$data['process_log'] = json_encode(array_merge($process_log, [$log]));
}
$data['handler_id'] = $userid;
$upt = M('work_order_info', 'tab_')->where(['id'=>$id])->save($data);
return $upt ? $this->success('成功接取工单') : $this->error('接单失败');
}
public function statistics($row = 10, $p = 1)
{
$limit = ($p-1)*$row . ", {$row}";
$order = '';
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);
$order = 'order by ' . $data_order_type . " " . ($data_order == 3 ? 'desc' : 'asc');
}
$map = '1=1';
if (!empty(I('nickname'))) {
$map .= " and t.nickname = '" . I('nickname') . "'";
}
// 获取所有传单或者接单用户id
$userids = M('work_order_info', 'tab_')
->field("concat(creator_id, ',', handler_id) as userid")
->join('sys_member as t on creator_id = t.uid or handler_id = t.uid')
->where($map)
->select();
if (empty($userids)) {
$list = [];
$count = 0;
} else {
$userids = implode(',', array_unique(array_filter(explode(',', implode(',', array_column($userids, 'userid'))))));
$count = count($userids);
$list = M('work_order_info', 'tab_')->query("SELECT
t.id,
t.nickname,
sum(total_create_count) as total_create_count,
sum(total_accepted_count) as total_accepted_count,
sum(total_handle_count) as total_handle_count,
sum(total_complete_count) as total_complete_count
FROM
(
SELECT
u.uid as id,
u.nickname,
count(*) AS total_create_count,
count(
IF (i.`handler_id` > 0, 1, NULL)
) AS total_accepted_count,
NULL AS total_handle_count,
NULL AS total_complete_count
FROM
sys_member u
JOIN tab_work_order_info i ON i.creator_id = u.uid
WHERE
u.uid in ({$userids})
GROUP BY u.uid
UNION
SELECT
u.uid as id,
u.nickname,
NULL AS total_create_count,
NULL AS total_accepted_count,
count(*) AS total_handle_count,
count(IF(i.`status` = 1, 1, NULL)) AS total_complete_count
FROM
sys_member u
JOIN tab_work_order_info i ON i.handler_id = u.uid
WHERE
u.uid in ({$userids})
GROUP BY u.uid
) AS t
where {$map}
GROUP BY t.id
$order
limit {$limit}");
}
$page = set_pagination($count, $row);
if ($page) {
$this->assign('_page', $page);
}
$this->assign('list_data', $list);
$this->display('statistics');
}
}

@ -14,6 +14,24 @@
<label>描述</label>
<textarea name="desc" class="" placeholder="描述" >{$rule.desc}</textarea>
</li>
<li>
<label>规则性质</label>
<span class="form_radio"><label><input type="radio" name="belongs" value="1" <?php if ($rule['belongs'] == 1):?>checked<?php endif;?>> 外团</label>
<label><input type="radio" name="belongs" value="2" <?php if ($rule['belongs'] == 2):?>checked<?php endif;?>> 内团</label></span>
<span class="notice-text"></span>
</li>
<li>
<label>上传文档</label>
<input type="file" name="upfile" id="file_doc" style="width:200px"/>
<input type="button" onclick="suba({$rule['id']})" style="background: #3E96C9;color:white;border:none;outline: none;width:70px;height:30px;border-radius: 3px;" value="上传" />
<span class="notice-text" id="aa" style="color:green;margin-left:10px;display: block;">当前文档:{$doc}</span>
<span class="notice-text" id="uploadstatus" style="color:red;margin-left:10px;display: none;">上传成功</span>
<span class="notice-text" id="uploadstatus1" style="color:red;margin-left:10px;display: none;">上传失败,当前文档:{$doc}</span>
</li>
<li>
<label>排序</label>
<input name="sort" type="text" class="txt" placeholder="排序" value="{$rule.sort}" />
@ -65,6 +83,36 @@
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript">
</script>
<script>
function suba(id) {
var file_excel = $('#file_doc')[0].files[0]
var formData = new FormData();
formData.append("file",file_excel);
formData.append("id",id)
$.ajax({
url:"{:U('Article/uploadDoc')}",
dataType:'json',
type:'POST',
async:false,
data:formData,
processData : false, // 使数据不做处理
contentType : false, // 不要设置Content-Type请求头
success:function(res) {
res = JSON.parse(res)
if (res.code == 10000) {
document.getElementById('uploadstatus').style.display = 'block'
document.getElementById('uploadstatus1').style.display = 'none'
document.getElementById('aa').style.display = 'none'
}else {
document.getElementById('uploadstatus1').style.display = 'block'
document.getElementById('uploadstatus').style.display = 'none'
document.getElementById('aa').style.display = 'none'
}
}
})
}
</script>
<script type="text/javascript">
highlight_subnav('{:U('Article/pop_rules')}');
function checkPopTime(first)
@ -90,7 +138,7 @@
} else if (type_val == 2) {
//$('#li-pop-time').show();
$("#li-pop-time").html('<label>弹窗时间</label><select id="pop_time" name="pop_time" class="select_gallery"><option value="1" <?php if ($rule["pop_time"] == 1):?>selected<?php endif;?>>周一</option><option value="2" <?php if ($rule["pop_time"] == 2):?>selected<?php endif;?> >周二</option><option value="3" <?php if ($rule["pop_time"] == 3):?>selected<?php endif;?> >周三</option><option value="4" <?php if ($rule["pop_time"] == 4):?>selected<?php endif;?> >周四</option><option value="5" <?php if ($rule["pop_time"] == 5):?>selected<?php endif;?> >周五</option><option value="6" <?php if ($rule["pop_time"] == 6):?>selected<?php endif;?> >周六</option><option value="7" <?php if ($rule["pop_time"] == 7):?>selected<?php endif;?> >周日</option></select>');
$("#li-pop-time").html('<label>弹窗时间</label><select id="pop_time" name="pop_time" class="select_gallery"><option value="8" <?php if ($rule["pop_time"] == 8):?>selected<?php endif;?>>每周第一次登陆</option><option value="1" <?php if ($rule["pop_time"] == 1):?>selected<?php endif;?>>周一</option><option value="2" <?php if ($rule["pop_time"] == 2):?>selected<?php endif;?> >周二</option><option value="3" <?php if ($rule["pop_time"] == 3):?>selected<?php endif;?> >周三</option><option value="4" <?php if ($rule["pop_time"] == 4):?>selected<?php endif;?> >周四</option><option value="5" <?php if ($rule["pop_time"] == 5):?>selected<?php endif;?> >周五</option><option value="6" <?php if ($rule["pop_time"] == 6):?>selected<?php endif;?> >周六</option><option value="7" <?php if ($rule["pop_time"] == 7):?>selected<?php endif;?> >周日</option></select>');
}
}
checkPopTime(1);

@ -25,6 +25,9 @@
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
.pointer-hand {
cursor: pointer;
}
</style>
<div class="cf main-place top_nav_list navtab_list">
@ -74,6 +77,8 @@
<!-- </div>-->
<input type="hidden" name="" value="" class="sortBy">
<input type="hidden" name="sort" value="" id="sort">
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search"
url="{:U('Finance/valueDetail','model='.$model['name'] . '&row='.I('row'),false)}">搜索</a>
@ -90,12 +95,63 @@
<!-- 表头 -->
<thead>
<tr>
<th>账号ID</th>
<if condition="$sorting eq 13">
<th class="pointer-hand" onclick="idsort(0)" id="zheng">账号ID<img src="__IMG__/paixu.png" width="13px"></th>
<elseif condition="$sorting eq 12" />
<th class="pointer-hand" onclick="idsort(1)" id="dao">账号ID<span ></span></th>
<elseif condition="$sorting eq 11" />
<th class="pointer-hand" onclick="idsort(2)" id="sheng">账号ID<span></span></th>
<else />
<th class="pointer-hand" onclick="idsort(0)" id="zheng">账号ID<img src="__IMG__/paixu.png" width="13px"></th>
</if>
<th>玩家账号</th>
<th>账户平台币</th>
<th>累计使用平台币</th>
<th>累计充值平台币</th>
<th>后台发放平台币</th>
<if condition="$sorting eq 13">
<th class="pointer-hand" onclick="idsort(19)" id="zheng1">平台币余额<img src="__IMG__/paixu.png" width="13px"></th>
<elseif condition="$sorting eq 19" />
<th class="pointer-hand" onclick="idsort(20)" id="dao1">平台币余额<span ></span></th>
<elseif condition="$sorting eq 20" />
<th class="pointer-hand" onclick="idsort(21)" id="sheng1">平台币余额<span ></span></th>
<else />
<th class="pointer-hand" onclick="idsort(19)" id="zheng1">平台币余额<img src="__IMG__/paixu.png" width="13px"></th>
</if>
<if condition="$sorting eq 13">
<th class="pointer-hand" onclick="idsort(16)" id="zheng1">平台币直充余额<img src="__IMG__/paixu.png" width="13px"></th>
<elseif condition="$sorting eq 16" />
<th class="pointer-hand" onclick="idsort(17)" id="dao1">平台币直充余额<span ></span></th>
<elseif condition="$sorting eq 17" />
<th class="pointer-hand" onclick="idsort(18)" id="sheng1">平台币直充余额<span ></span></th>
<else />
<th class="pointer-hand" onclick="idsort(16)" id="zheng1">平台币直充余额<img src="__IMG__/paixu.png" width="13px"></th>
</if>
<if condition="$sorting eq 13">
<th class="pointer-hand" onclick="idsort(3)" id="zheng1">平台币直充支出<img src="__IMG__/paixu.png" width="13px"></th>
<elseif condition="$sorting eq 3" />
<th class="pointer-hand" onclick="idsort(4)" id="dao1">平台币直充支出<span ></span></th>
<elseif condition="$sorting eq 4" />
<th class="pointer-hand" onclick="idsort(5)" id="sheng1">平台币直充支出<span ></span></th>
<else />
<th class="pointer-hand" onclick="idsort(3)" id="zheng1">平台币直充支出<img src="__IMG__/paixu.png" width="13px"></th>
</if>
<if condition="$sorting eq 13">
<th class="pointer-hand" onclick="idsort(6)" id="zheng1">平台币直充金额<img src="__IMG__/paixu.png" width="13px"></th>
<elseif condition="$sorting eq 6" />
<th class="pointer-hand" onclick="idsort(7)" id="dao1">平台币直充金额<span ></span></th>
<elseif condition="$sorting eq 7" />
<th class="pointer-hand" onclick="idsort(8)" id="sheng1">平台币直充金额<span ></span></th>
<else />
<th class="pointer-hand" onclick="idsort(6)" id="zheng1">平台币直充金额<img src="__IMG__/paixu.png" width="13px"></th>
</if>
<if condition="$sorting eq 13">
<th class="pointer-hand" onclick="idsort(9)" id="zheng1">后台发放平台币<img src="__IMG__/paixu.png" width="13px"></th>
<elseif condition="$sorting eq 9" />
<th class="pointer-hand" onclick="idsort(10)" id="dao1">后台发放平台币<span ></span></th>
<elseif condition="$sorting eq 10" />
<th class="pointer-hand" onclick="idsort(15)" id="sheng1">后台发放平台币<span ></span></th>
<else />
<th class="pointer-hand" onclick="idsort(9)" id="zheng1">后台发放平台币<img src="__IMG__/paixu.png" width="13px"></th>
</if>
<th>操作</th>
</tr>
</thead>
@ -110,6 +166,7 @@
<td>{$data.user_id}</td>
<td>{$data.user_account}</td>
<td>{$data.after_value}</td>
<td>{$data.rest_value}</td>
<td><span>{$data.spend_amount}</span></td>
<td>{$data.deposit_amount}</td>
<td>{$data.coin_amount}</td>
@ -123,6 +180,7 @@
<tr>
<td colspan="2">汇总(检索时间内所有数据的统计)</td>
<td>{$banlaceTotal}</td>
<td>{$resttotal}</td>
<td>{$total}</td>
<td>{$deposit}</td>
<td>{$promoteCoin}</td>
@ -377,4 +435,87 @@
});
});
</script>
<script>
function idsort(status) {
if(status == 0) {
document.getElementById('sort').value = 11
document.getElementById('search').click();
}
if (status == 1 ) {
document.getElementById('sort').value = 11
document.getElementById('search').click();
}
if (status == 2 ) {
alert('aaa')
document.getElementById('sort').value = 12
document.getElementById('search').click();
}
if (status == 3) {
document.getElementById('sort').value = 4
document.getElementById('search').click();
}
if (status == 4) {
document.getElementById('sort').value = 4
document.getElementById('search').click();
}
if (status == 5) {
document.getElementById('sort').value = 3
document.getElementById('search').click();
}
if (status == 6) {
document.getElementById('sort').value = 6
document.getElementById('search').click();
}
if (status == 7) {
document.getElementById('sort').value = 7
document.getElementById('search').click();
}
if (status == 8) {
document.getElementById('sort').value = 6
document.getElementById('search').click();
}
if (status == 9) {
document.getElementById('sort').value = 9
document.getElementById('search').click();
}
if (status == 10) {
document.getElementById('sort').value = 10
document.getElementById('search').click();
}
if (status == 15) {
document.getElementById('sort').value = 9
document.getElementById('search').click();
}
if (status == 16) {
document.getElementById('sort').value = 16
document.getElementById('search').click();
}
if (status == 17) {
document.getElementById('sort').value = 17
document.getElementById('search').click();
}
if (status == 18) {
document.getElementById('sort').value = 16
document.getElementById('search').click();
}
if (status == 19) {
document.getElementById('sort').value = 19
document.getElementById('search').click();
}
if (status == 20) {
document.getElementById('sort').value = 20
document.getElementById('search').click();
}
if (status == 21) {
document.getElementById('sort').value = 19
document.getElementById('search').click();
}
}
</script>
</block>

@ -119,14 +119,14 @@
</td>
</tr>
<tr class="need-amount" <?php if($record && $record['pay_type']==3):?>style="display:none;"<?php endif;?>>
<td class="l"><?php if($record):?><i class="mustmark">*</i><?php endif?>付款人:</td>
<td class="l">付款人:</td>
<td class="r table_radio">
<input type="text" class="txt ratio" name="payer" id="payer" value="<?=$record?$record['payer']:''?>" placeholder="请输入付款人">
<span class="notice-text"></span>
</td>
</tr>
<tr class="need-amount" <?php if($record && $record['pay_type']==3):?>style="display:none;"<?php endif;?>>
<td class="l"><?php if($record):?><i class="mustmark">*</i><?php endif?>付款账号:</td>
<td class="l">付款账号:</td>
<td class="r table_radio">
<input type="text" class="txt ratio" name="pay_account" id="pay_account" value="<?=$record?$record['pay_account']:''?>" placeholder="请输入付款账号">
<span class="notice-text"></span>

@ -25,6 +25,46 @@
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
.tooltip {
position: relative;
display: inline-block;
color: #056dae;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 250%;
background-color: #fff;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
bottom: 80%;
left: 0;
margin-left: -70%;
border: #000 solid 1px;
}
.tooltip .tooltiptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: black transparent transparent transparent;
}
.tooltip:hover .tooltiptext {
color: #000;
visibility: visible;
line-height: 20px;
}
</style>
<!-- 标题栏 -->
<div class="cf main-place top_nav_list navtab_list">
@ -80,8 +120,14 @@
<input class="check-all" type="checkbox">
</th> -->
<th>{$level_desc}账号</th>
<?php if($level < 4):?>
<th>{$level_low_desc}数量</th>
<th>TF下载数</th>
<?php else:?>
<th>iOS用户总数</th>
<th>新增iOS用户总数</th>
<th><div class="tooltip">TF下载数<span class="tooltiptext"><span style="margin-left: -10px">TF下载数(TF下载数/iOS用户总数)</span></span></div></th>
<?php endif;?>
<th>超级签下载数</th>
<th>企业签下载数</th>
<th>操作</th>
@ -96,8 +142,15 @@
<tr>
<!-- <td><input class="ids" type="checkbox" value="{$data['id']}" name="ids"></td> -->
<td>{$data.account}</td>
<?php if($data['level'] < 4):?>
<td>{$data.lowercount}</td>
<td >{$data.tfcount}</td>
<?php else:?>
<td>{$data.ioscount}</td>
<td>{$data.weekcount}</td>
<td >{$data.tfcount}(<?php echo $data['ioscount'] ? round( ($data['tfcount']/$data['ioscount']) * 100, 2) : 0?>%)</td>
<?php endif;?>
<td>{$data.supersigncount}</td>
<td>{$data.signcount}</td>
<td>
@ -112,8 +165,14 @@
<tr>
<!-- <td><input class="ids" type="checkbox" value="{$data['id']}" name="ids"></td> -->
<td>汇总</td>
<?php if($level < 4):?>
<td>{$total[0]['lowercount']}</td>
<td >{$total[0]['tfcount']}</td>
<?php else:?>
<td>{$total[0]['ioscount']}</td>
<td>{$total[0]['weekcount']}</td>
<td >{$total[0]['tfcount']}(<?php echo $total[0]['ioscount'] ? round( ($total[0]['tfcount']/$total[0]['ioscount']) * 100, 2) : 0?>%)</td>
<?php endif;?>
<td>{$total[0]['supersigncount']}</td>
<td>{$total[0]['signcount']}</td>
<td>

@ -133,7 +133,7 @@
<tr>
<!-- <td><input class="ids" type="checkbox" value="{$data['id']}" name="ids"></td> -->
<td>汇总</td>
<td colspan="8" style="text-align: left;">TF下载{$total[0]['tfcount']} 超级签下载:{$total[0]['supersigncount']} 企业签下载:{$total[0]['signcount']}</td>
<td colspan="8" style="text-align: left;">iOS用户总数:{$total[0]['ioscount']}&nbsp;&nbsp;新增iOS用户总数:{$total[0]['weekcount']}&nbsp;&nbsp;TF下载(TF下载/iOS用户总数){$total[0]['tfcount']}(<?php echo $total[0]['ioscount'] ? round( ($total[0]['tfcount']/$total[0]['ioscount']) * 100, 2) : 0?>%) &nbsp;&nbsp;&nbsp;&nbsp;超级签下载:{$total[0]['supersigncount']}&nbsp;&nbsp;企业签下载:{$total[0]['signcount']}</td>
</tr>
</empty>
</tbody>

@ -31,7 +31,7 @@
<li data-tab="tab11"><a href="javascript:void(0);" >绑币支付</a></li>
<li data-tab="tab14"><a href="javascript:void(0);" >易宝支付</a></li>
<li data-tab="tab12"><a href="javascript:void(0);" >双乾支付</a></li>
<li data-tab="tab13"><a href="javascript:void(0);" >威富通支付</a></li>
<li data-tab="tab13"><a href="javascript:void(0);" >汇付宝支付</a></li>
</ul>
<h3 class="page_title">{$meta_title}</h3>
@ -1681,7 +1681,7 @@
<input name="config[partner]" type="text" value="{$heepay['partner']}" class="">
<span class="notice-text">威富通商户号(汇付宝)</span>
<span class="notice-text">汇付宝商户号(汇付宝)</span>
</td>
@ -1689,13 +1689,13 @@
<tr>
<td class="l noticeinfo">威富通密钥key</td>
<td class="l noticeinfo">汇付宝密钥key</td>
<td class="r table_radio">
<input name="config[key]" type="text" value="{$heepay['key']}" class="">
<span class="notice-text">威富通秘钥</span>
<span class="notice-text">汇付宝秘钥</span>
</td>
@ -1710,10 +1710,18 @@
</label></span>
<span class="notice-text" style="margin-left:5px;margin-right: 15px;width: 70px;">支付宝</span>
-->
<span class="form_checkbox">
<label><input name="config[wxp]" type="checkbox" value="1" <eq name="heepay['wxp']" value="1">checked="checked"</eq> class="">
<!-- <span class="form_checkbox">-->
<!-- <label><input name="config[wxp]" type="checkbox" value="1" <eq name="heepay['wxp']" value="1">checked="checked"</eq> class="">-->
<!-- </label></span>-->
<!-- <span class="notice-text" style="margin-left:5px;margin-right: 15px;width: 70px;">微信小程序</span>-->
<span class="form_checkbox">
<label><input name="config[alipay]" type="checkbox" value="1" <eq name="heepay['alipay']" value="1">checked="checked"</eq> class="">
</label></span>
<span class="notice-text" style="margin-left:5px;margin-right: 15px;width: 70px;">微信小程序</span>
<span class="notice-text" style="margin-left:5px;margin-right: 15px;width: 70px;">支付宝</span>
<span class="form_checkbox">
<label><input name="config[wxpay]" type="checkbox" value="1" <eq name="heepay['wxpay']" value="1">checked="checked"</eq> class="">
</label></span>
<span class="notice-text" style="margin-left:5px;margin-right: 15px;width: 70px;">微信</span>
</td>
</tr>

@ -71,7 +71,7 @@
</td>
</tr>
<tr>
<td class="l noticeinfo">处理人</td>
<td class="l noticeinfo">接单人员</td>
<td class="r table_radio">
<label>{:get_admin_name($data['handler_id'])}</label>
</td>

@ -69,7 +69,7 @@
</td>
</tr>
<tr>
<td class="l noticeinfo">处理人</td>
<td class="l noticeinfo">接单人员</td>
<td class="r table_radio">
<label>{:get_admin_name($data['handler_id'])}</label>
</td>

@ -98,7 +98,7 @@
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="handler_id" name="handler_id" class="select_gallery">
<option value="">单人员选择</option>
<option value="">单人员选择</option>
<?php foreach ($admin_users as $user):?>
<option value="{$user['uid']}" <?php if ($user['uid'] == I('handler_id')):?>selected<?php endif;?> >{$user.nickname}</option>
<?php endforeach;?>
@ -156,6 +156,7 @@
<th>状态</th>
<th>游戏账号</th>
<th>创单人员</th>
<th>接单人员</th>
<th>创建时间</th>
<th>评价分数</th>
<th>附件</th>
@ -177,12 +178,14 @@
<td>{$data.status_desc}</td>
<td>{$data.user_account}</td>
<td>{:get_admin_nickname($data['creator_id'])}</td>
<td>{:get_admin_nickname($data['handler_id'])}</td>
<td>{$data.created_time|date='Y-m-d H:i:s',###}</td>
<td>{$data.score}</td>
<td><?php echo $data['attachment_url'] ? '有' : '无'?></td>
<td>
<a href="{:U('workOrder/modify',array('id'=>$data['id']))}">编辑 </a>
<?php if ($data['type'] == 1):?><a href="{:U('workOrder/resourceApply',array('id'=>$data['id']))}">申请 </a><?php endif;?>
<?php if ($data['status'] != 1 && empty($data['handler_id'])):?><a class="ajax-get" href="{:U('workOrder/take',array('id'=>$data['id']))}">接单 </a><?php endif;?>
<?php if ($data['type'] == 2):?><a href="{:U('workOrder/feedbackProcessLogStore',array('id'=>$data['id']))}">更新 </a><?php endif;?>
<?php if ($data['status'] != 1):?><a class="ajax-get" href="{:U('workOrder/finish',array('id'=>$data['id']))}">完成</a><?php endif;?>
<a href="{:U('workOrder/evaluate',array('id'=>$data['id']))}">评价 </a>

@ -102,6 +102,27 @@
<if condition="$data['server_name'] neq ''"><option value="{$data['server_name']}">{$data['server_name']}</option></if>
</select>
</div>
<?php if ($data['type'] == 1): ?>
<div class="input-list search-title-box">
<label>状态选择:</label>
</div>
<div class="input-list input-list-server search_label_rehab">
<select id="" name="resource[status]" class="select_gallery" style="width:120px;">
<option value="1" <?php if ($data['status'] == 1):?>selected<?php endif;?>>完成</option>
<option value="3" <?php if ($data['status'] == 3):?>selected<?php endif;?>>处理中</option>
</select>
</div>
<div class="input-list search-title-box">
<label>接单人员</label>
</div>
<div class="input-list input-list-server search_label_rehab">
<select name="resource[handler_id]" id="handler_id">
<?php foreach ($admin_users as $user):?>
<option value="{$user['uid']}"<?php if ($user['uid'] == $data['handler_id']):?>selected<?php endif;?> >{$user.nickname}</option>
<?php endforeach;?>
</select>
</div>
<?php endif;?>
<?php if (!empty($data['attachment_url']) || $data['type'] == 2):?>
<div class="input-list">
<div id="uploader" class="wu-example">
@ -209,7 +230,7 @@
</td>
</tr>
<tr>
<td class="l noticeinfo">处理人</td>
<td class="l noticeinfo">接单人员</td>
<td class="r table_radio">
<span class="form_select"><select name="feedback[handler_id]" id="handler_id">
<?php foreach ($admin_users as $user):?>

@ -0,0 +1,293 @@
<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;}
.layui-layer-dialog .layui-layer-content{color:red}
.butnbox {padding:10px 0 10px;}
.butnbox .butnlist {overflow:hidden;clear:both;}
.butnbox .butnlist .butn,.butnbox .butnlist .butn:hover {text-decoration:none;border:none;}
.butnbox .butnlist .butn {display:inline-block;width:120px;height:28px;line-height:28px;text-align:center;color:#FFF;background:#3C95C8;border-radius:3px;}
.butnbox .butnlist .butn.last {background:#009900;}
.butnbox .butnlist .butn~.butn {margin-left:20px;}
.data_list table tbody tr a.disabled,.data_list table tbody tr a.disabled:hover {color:#999;cursor:default;}
.layui-layer-title {
text-align: center;
height: 80px;
line-height: 80px;
font-weight: 600;
font-size: 18px;
}
</style>
<!-- 标题栏 -->
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">工单管理列表</h3>
</div>
<div class="cf top_nav_list">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<div class="input-list search-title-box">
<label>搜索:</label>
<input id="serverid" name="server_id" type="text" value="{:I('server_id')}" style="display:none">
</div>
<div class="input-list input-list-game search_label_rehab">
<input type="text" name="nickname" value="{$_GET['nickname']}" placeholder="账号">
</div>
<input type="hidden" name="" value="" class="sortBy">
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search"
url="{:U('workOrder/statistics','model='.$model['name'],false)}">
搜索
</a>
</div>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th>账号</th>
<th>
<a class="paixu" data-order='total_create_count'>
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'total_create_count'">发布工单数▲
<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'total_create_count'"/>发布工单数▼
<else />发布工单数<img src="__IMG__/up-down.png" width="13px">
</if>
</a>
</th>
<th>
<a class="paixu" data-order='total_accepted_count'>
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'total_accepted_count'">被接工单数
<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'total_accepted_count'"/>被接工单数
<else />被接工单数<img src="__IMG__/up-down.png" width="13px">
</if>
</a>
</th>
<th>
<a class="paixu" data-order='total_handle_count'>
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'total_handle_count'">接取工单数
<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'total_handle_count'"/>接取工单数
<else />接取工单数<img src="__IMG__/up-down.png" width="13px">
</if>
</a>
</th>
<th>
<a class="paixu" data-order='total_complete_count'>
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'total_complete_count'">完成工单数
<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'total_complete_count'"/>完成工单数
<else />完成工单数<img src="__IMG__/up-down.png" width="13px">
</if>
</a>
</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<empty name="list_data">
<td colspan="99" class="text-center">aOh! 暂时还没有内容!</td>
<else/>
<volist name="list_data" id="data">
<tr>
<td>{$data.nickname}</td>
<td><?php echo $data['total_create_count'] ?? 0;?></td>
<td><?php echo $data['total_accepted_count'] ?? 0;?></td>
<td><?php echo $data['total_handle_count'] ?? 0;?></td>
<td><?php echo $data['total_complete_count'] ?? 0;?></td>
</tr>
</volist>
</empty>
</tbody>
</table>
</div>
</div>
<div class="page">
<if condition="$is_admin eq true ">
<a class="sch-btn" href="{:U('Export/exportWorkOrderStatistics',I('get.'))}">导出</a>
</if>
{$_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="settlement/sheetList">
</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 src="__STATIC__/layer/layer.js"></script>
<script src="__STATIC__/layer/extend/layer.ext.js"></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>
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js" ></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>
<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>
<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 type="text/javascript">
//导航高亮
highlight_subnav('{:U('WorkOrder/statistics')}');
$(function () {
$(".select_gallery").select2();
//搜索功能
$("#search").click(function () {
var sdate = Date.parse($('#time-start').val()) / 1000;
var edate = Date.parse($('#time-end').val()) / 1000;
if (sdate > edate) {
layer.msg('开始时间必须小于等于结束时间');
return false;
}
if ((edate - sdate) > 2592000) {
layer.msg('时间间隔不能超过31天请重新选择日期');
return false;
}
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();
}
});
$('#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'
})
$("#server_id").change(function () {
var g_server_id = $("#server_id option:selected").attr('server-id');
$("#serverid").val(g_server_id);
});
var server_id = "{:I('server_id')}";
$("#game_id").change(function(){
var addData = '';
$.ajax({
url:"{:U('Ajax/getServer')}",
type:"post",
data:{game_id:$("#game_id option:selected").attr('game-id')},
dataType:'json',
success:function(data){
str = "<option value=''>请选择区服</option>";
for (var i in data){
if (data[i].id == server_id) {
str += "<option value='"+data[i].server_name+"' server-id='"+data[i].id+"' selected >"+data[i].server_name+"</option>"
} else {
str += "<option value='"+data[i].server_name+"' server-id='"+data[i].id+"'>"+data[i].server_name+"</option>"
}
}
var g_game_id = $("#game_id option:selected").attr('game-id');
$("#gameid").val(g_game_id);
$("#server_id").empty();
$("#server_id").append(str);
$("#server_id").select2();
}
})
});
$("#game_id").change();
})
$(".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();
}
});
//点击排序
$('.list_sort').click(function(){
var url = $(this).attr('url');
var ids = $('.ids:checked');
var param = '';
if(ids.length > 0){
var str = new Array();
ids.each(function(){
str.push($(this).val());
});
param = str.join(',');
}
if(url != undefined && url != ''){
window.location.href = url.replace(".html","") + '/ids/' + param;
}
});
</script>
</block>

@ -204,16 +204,6 @@
<label>{:get_admin_name(is_login())}</label>
</td>
</tr>
<tr>
<td class="l noticeinfo">处理人</td>
<td class="r table_radio">
<span class="form_select"><select name="handler_id" id="handler_id">
<?php foreach ($admin_users as $user):?>
<option value="{$user['uid']}" >{$user.nickname}</option>
<?php endforeach;?>
</select></span>
</td>
</tr>
<tr>
<td class="l noticeinfo">备注</td>
<td class="r table_radio">

@ -206,19 +206,15 @@ class DownloadController extends BaseController {
$map['type'] = $type;
}
if ($createTime != '') {
$createTimeRow = explode(' 至 ', $createTime);
$createTimeBegin = 0;
$createTimeEnd = 0;
if (count($createTimeRow) == 2) {
$createTimeBegin = strtotime($createTimeRow[0] . ' 00:00:00');
$createTimeEnd = strtotime($createTimeRow[1] . ' 23:59:59');
} else {
$createTimeBegin = strtotime($createTimeRow[0] . ' 00:00:00');
$createTimeEnd = strtotime($createTimeRow[0] . ' 23:59:59');
}
$map['create_time'] = ['between', [$createTimeBegin, $createTimeEnd]];
}
$nowTime = date('Y-m-d');
$initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
$initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime');
$initEndTime = $nowTime;
$initEndTime = empty(I('endtime')) ? $initEndTime : I('endtime');
$begTime = strtotime($initBegTime);
$endTime = strtotime($initEndTime);
$endTime += 3600 * 24;
$map['create_time'] = ['between', [$begTime, $endTime]];
$conditions = json_encode($map,TRUE);
$addtime = time();
$data = [
@ -248,6 +244,7 @@ class DownloadController extends BaseController {
public function ios_data_export() {
$levelPromote = $this->getLevelPromote();
$queryPromote = $this->getQueryPromote($levelPromote);
$localId = $queryPromote['id'];
$map = [];
if ($queryPromote['level'] == 4) {
$map['id'] = $queryPromote['id'];
@ -255,20 +252,19 @@ class DownloadController extends BaseController {
$map['chain'] = ['like', $queryPromote['chain'] . $queryPromote['id'] . '/%'];
}
$createTime = I('create_time', '');
if ($createTime != '') {
$createTimeRow = explode(' 至 ', $createTime);
$createTimeBegin = 0;
$createTimeEnd = 0;
if (count($createTimeRow) == 2) {
$createTimeBegin = strtotime($createTimeRow[0] . ' 00:00:00');
$createTimeEnd = strtotime($createTimeRow[1] . ' 23:59:59');
} else {
$createTimeBegin = strtotime($createTimeRow[0] . ' 00:00:00');
$createTimeEnd = strtotime($createTimeRow[0] . ' 23:59:59');
}
$map['create_time'] = ['between', [$createTimeBegin, $createTimeEnd]];
}
$nowTime = date('Y-m-d');
$initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
$initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime');
$initEndTime = $nowTime;
$initEndTime = empty(I('endtime')) ? $initEndTime : I('endtime');
$begTime = strtotime($initBegTime);
$endTime = strtotime($initEndTime);
$endTime += 3600 * 24;
$map['create_time'] = ['between', [$begTime, $endTime]];
$map['pid'] = PID;
if ($localId !== PID) {
$map['localId'] = $localId;
}
$conditions = json_encode($map,TRUE);
$addtime = time();
$data = [
@ -2252,9 +2248,9 @@ public function iosDetailExcelInfo($id,$map) {
}
if (!empty($map['create_time'])) {
$map1['create_time'] = $map['create_time'];
$tfMap['create_time'] = $map['craete_time'];
$superMap['create_time'] = $map['craete_time'];
$companyMap['create_time'] = $map['craete_time'];
$tfMap['create_time'] = $map['create_time'];
$superMap['create_time'] = $map['create_time'];
$companyMap['create_time'] = $map['create_time'];
}
$belongs_president = '';
@ -2271,8 +2267,10 @@ public function iosDetailExcelInfo($id,$map) {
}
if (!empty($map['promote_id'])) {
$promote_id = $map['promote_id'];
$map1['promote_id'] = $map['promote_id'];
}
$rs = M('package_download_log', 'tab_')->field('id,game_id,user_id,type,create_time')->where($map1)->select();
$tfMap['promote_id'] = $promote_id;
$tfMap['type'] = 2;
$TFCounts = M('package_download_log', 'tab_')->where($tfMap)->count();
@ -2343,7 +2341,8 @@ public function iosDetailExcelInfo($id,$map) {
$xlsName ="IOS下载数统计";
$xlsCell = array(
'推广员账号',
'玩家人数',
'IOS用户总数',
'新增IOS用户总数',
'TF下载次数',
'超级签下载次数',
'企业签下载次数',
@ -2357,31 +2356,56 @@ public function iosDetailExcelInfo($id,$map) {
$map1['chain'] = $map['chain'];
}
if (!empty($map['create_time'])) {
$map1['create_time'] = $map['create_time'];
// $map1['create_time'] = $map['create_time'];
$tfMap['create_time'] = $map['create_time'];
$companyMap['create_time'] = $map['create_time'];
$superMap['create_time'] = $map['create_time'];
$allTFMap['create_time'] = $map['create_time'];
$companyMap['create_time'] = $map['create_time'];
$allSuperMap['create_time'] = $map['create_time'];
// $iosTimeMap['register_time'] = $map['create_time'];
$map10['register_time'] = $map['create_time'];
$alliosMap['register_time'] = $map['create_time'];
$allUserMap['register_time'] = $map['create_time'];
$allTFMap['create_time'] = $map['create_time'];
$allSuperMap['create_time'] = $map['create_time'];
$companyMap['create_time'] = $map['create_time'];
$sunday = strtotime('-1 sunday', $map['create_time'][1][1]) + 24 * 3600;
$m['create_time'] = ['between', [$sunday, $map['create_time'][1][1]]];
$iosTimeMap['register_time'] = $m['create_time'];
$alliosMap['register_time'] = $m['create_time'];
}
if (!empty($map['id'])) {
$map1['id'] = $map['id'];
$tfMap['create_time'] = $map['craete_time'];
$superMap['create_time'] = $map['craete_time'];
$companyMap['create_time'] = $map['craete_time'];
$tfMap['create_time'] = $map['create_time'];
$superMap['create_time'] = $map['create_time'];
$companyMap['create_time'] = $map['create_time'];
}
$rs = M('promote', 'tab_')->field(['id'])->where($map1)->select();
$allids = array_column($rs, 'id');
if (!empty($map['localId'])) {
array_push($allids, $map['localId']);
}
array_push($allids, PID);
$allUserMap['promote_id'] = ['in', $allids];
$allUserMap['device_type'] = 2;
$allTFMap['promote_id'] = ['in', $allids];
$allTFMap['type'] = 2;
$allSuperMap['promote_id'] = ['in', $allids];
$allSuperMap['type'] = 3;
$companyMap['promote_id'] = ['in', $allids];
$companyMap['type'] = 1;
$allUsersCounts = M('user', 'tab_')->where($allUserMap)->count();
$allTFCounts = M('package_download_log', 'tab_')->where($allTFMap)->count();
$allSuperCounts = M('package_download_log', 'tab_')->where($allSuperMap)->count();
$allCompanyCounts = M('package_download_log', 'tab_')->where($companyMap)->count();
$alliosMap['promote_id'] = ['in', $allids];
$alliosMap['device_type'] = 2;
$allIosCounts = M('user', 'tab_')->where($alliosMap)->count();
$csvFileName = $xlsName.'.csv';
header('Content-Description: File Transfer');
header('Content-Type: application/vnd.ms-excel');
@ -2395,24 +2419,40 @@ public function iosDetailExcelInfo($id,$map) {
$accessNum = count($rs)?:0 ;
$perSize = 5000;//每次查询的条数
$pages = ceil($accessNum / $perSize);
if ($pages == 0) {
$pages = 1;
}
for($i = 1; $i <= $pages; $i++) {
$data = M('promote', 'tab_')->field(['id'])->where($map1)
->limit(($i-1)*$perSize ,$perSize)->select();
$ids = array_column($data, 'id');
if (in_array($map['localId'], $ids)) {
}else {
}
if ($i == 1) {
array_unshift($ids, PID);
if (!empty($map['localId']) && !in_array($map['localId'], $ids)) {
array_unshift($ids,$map['localId'] );
}
if (!in_array(PID, $ids)) {
array_unshift($ids, PID);
}
}
foreach($ids as $key => $id) {
$promote1 = M('promote', 'tab_')->field('account, level, parent_id, chain')->where(['id' => $id])->select();
$promote = $promote1[0];
$chain = $promote['chain'];
//$csvData['promote_id'] = $id;
if($id == PID) {
$csvData['account'] = $promote['account'].'[自己]';
}else {
$csvData['account'] = $promote['account'];
}
$iosTimeMap['promote_id'] = $id;
$iosTimeMap['device_type'] = 2;
$iosCount = M('user', 'tab_')->where($iosTimeMap)->count();
$tfMap['promote_id'] = $id;
$tfMap['type'] = 2;
$companyMap['promote_id'] = $id;
@ -2422,9 +2462,17 @@ public function iosDetailExcelInfo($id,$map) {
$tfCounts = M('package_download_log', 'tab_')->where($tfMap)->count(); //TF下载量
$companyCounts = M('package_download_log', 'tab_')->where($companyMap)->count(); //企业签下载量
$superCounts = M('package_download_log', 'tab_')->where($superMap)->count(); //超级签下载量
$usersCounts = M('user', 'tab_')->where(['promote_id' => $id])->count();
$map10['promote_id'] = $id;
$map10['device_type'] = 2;
$usersCounts = M('user', 'tab_')->where($map10)->count();
$tfpercent = number_format((intval($tfCounts) / intval($usersCounts)),2,'.','') * 100;
if (intval($usersCounts) == 0) {
$tfpercent = 0;
}
$csvData['userscounts'] = intval($usersCounts);
$csvData['tfcounts'] = intval($tfCounts);
$csvData['ioscount'] = $iosCount;
$csvData['tfcounts'] = intval($tfCounts).'('.$tfpercent.'%)';
$csvData['supercounts'] = intval($superCounts);
$csvData['companycounts'] = intval($companyCounts);
@ -2435,7 +2483,7 @@ public function iosDetailExcelInfo($id,$map) {
}
if ($promote['level'] == 2) {
$parentPromote = M('promote', 'tab_')->field('account')->where(['id'=>$promote['parent_id']])->select();
$csvData['belongs_president'] = $parentPromote['account'];
$csvData['belongs_president'] = $parentPromote[0]['account'];
$csvData['belongs_department'] = $promote['account'];
$csvData['belongs_group'] = "无所属组长";
}
@ -2467,7 +2515,8 @@ public function iosDetailExcelInfo($id,$map) {
}
$allData['account'] = '汇总';
$allData['userscounts'] = $allUsersCounts;
$allData['tfcounts'] = $allTFCounts;
$allData['iosycounts'] = $allIosCounts;
$allData['tfcounts'] = $allTFCounts.'('.(number_format((intval($allTFCounts) / intval($allUsersCounts)),2,'.','') * 100).'%)';
$allData['supercounts'] = $allSuperCounts;
$allData['companycounts'] = $allCompanyCounts;
@ -2907,7 +2956,7 @@ public function iosDetailExcelInfo($id,$map) {
$allGameIs = array_column($allGameIs, 'game_id');
$records = [];
if (!empty($data)) {
if (intval($endTime - $begTime) / (24 * 3600) <= 30) {
if (intval($endTime - $begTime) / (24 * 3600) <= 31) {
$gameIds = [];
foreach ($data as $list) {
$gameIds[] = $list['game_id'];

@ -232,23 +232,64 @@ class PromoteController extends BaseController
$this->assign("rules", $rules);
$this->assign("rules_count", count($rules));
$redis = new \Org\RedisSDK\Redis(['host'=>'127.0.0.1','port'=>6379],[]);
$cacheKey = "pop:rule:set";
if (!$redis->sIsMember($cacheKey, get_pid())) {
$currentTime = strtotime(date('Y-m-d'));
$weekArray = [7,1,2,3,4,5,6];
$week = $weekArray[date("w")];
$match_rules = M("document_pop_rules")
->field('id')
->where("(type = 1 and pop_time = {$currentTime}) or (type = 2 and pop_time = {$week})")
->order("sort asc, id desc")
->select();
} else {
$promoteBelong = M('promote', 'tab_')->where(['id'=>get_pid()])->getField('company_belong');
if ($promoteBelong == 1 || $promoteBelong == 2) {
$compang_belongs = 1;
}else {
$compang_belongs = 2;
}
$belongs = M("document_pop_rules")
->where(['belongs' => $compang_belongs])->count();
if (intval($belongs) > 0) {
$redis = new \Org\RedisSDK\Redis(['host'=>'127.0.0.1','port'=>6379],[]);
$cacheKey = "pop:rule:set";
if (!$redis->sIsMember($cacheKey, get_pid())) {
$currentTime = strtotime(date('Y-m-d'));
$weekArray = [7,1,2,3,4,5,6];
$week = $weekArray[date("w")];
$match_rules = M("document_pop_rules")
->field('id,document_route,pop_time')
->where("(type = 1 and pop_time = {$currentTime}) or (type = 2 and pop_time = {$week}) or (type = 2 and pop_time = 8)")
->order("sort asc, id desc")
->select();
} else {
$match_rules = [];
}
}else {
$match_rules = [];
}
// if (intval($promoteBelong) == $belongs_tag) {
// $redis = new \Org\RedisSDK\Redis(['host'=>'127.0.0.1','port'=>6379],[]);
// $newcacheKey = "pop:newrule:set";
// if (!$redis->sIsMember($newcacheKey, get_pid())) {
// $currentTime = strtotime(date('Y-m-d'));
// $weekArray = [7,1,2,3,4,5,6];
// $week = $weekArray[date("w")];
// $match_newrules = M("document_pop_rules")
// ->field('id')
// ->where(['id' => 2])
// ->order("sort asc, id desc")
// ->select();
// } else {
// $match_newrules = [];
// }
// } else {
// $match_newrules = [];
// }
// $match_newrules_route = M("document_pop_rules")
// ->where(['id' => 2])
// ->getField('document_route');
$this->assign("match_rules_id", $match_rules ? json_encode(array_column($match_rules, 'id')) : 'null');
//$this->assign("match_newrules_id", $match_newrules ? json_encode(array_column($match_newrules, 'id')) : 'null');
$this->assign("match_rules_route", $match_rules ? json_encode(array_column($match_rules, 'document_route')) : 'null');
$this->assign("pop_time1", $match_rules ? json_encode(array_column($match_rules, 'pop_time')) : 'null');
$this->assign("user_count", $user_count);
$this->assign("total_money", $total_money);
@ -276,8 +317,40 @@ class PromoteController extends BaseController
$this->display();
}
public function popRuleDetail($id=0, $p=1, $row=1, $force=false)
public function popRuleDetail($id=0, $p=1, $row=1, $force=false, $pop = false)
{
$promoteBelong = M('promote', 'tab_')->where(['id'=>get_pid()])->getField('company_belong');
if ($promoteBelong == 1 || $promoteBelong == 2) {
$belongs = 1;
}else {
$belongs = 2;
}
$map1['id'] = ['in', $id];
$map1['belongs'] = $belongs;
$result = M("document_pop_rules")->where($map1)->page($p, $row)->select();
if (empty($result)) {
return $this->error("未找到数据", [], true);
}
$count = M("document_pop_rules")->where($map1)->count();
if ($p + 1 <= $count) {
$this->assign("next_page",$p+1);
}
if ($p - 1 >= 0) {
$this->assign("preview_page",$p-1);
}
if ($p + 1 > $count) {
$this->assign("close_btn", true);
}
$this->assign("count", $count);
$this->assign("force", $force);
$this->assign("pop", $pop);
// return $this->success("获取数据成功", $result, true);
//$this->show("<h2 style='text-align: center;'>{$result['title']}</h2>".$result['content']);
$this->assign("rule",$result[0]);
$this->display('pop_rule_detail');
}
public function popNewRuleDetail($id=0, $p=1, $row=1, $force=false) {
$result = M("document_pop_rules")->where("id in ({$id})")->page($p, $row)->select();
if (empty($result)) {
return $this->error("未找到数据", [], true);
@ -297,10 +370,24 @@ class PromoteController extends BaseController
// return $this->success("获取数据成功", $result, true);
//$this->show("<h2 style='text-align: center;'>{$result['title']}</h2>".$result['content']);
$this->assign("rule",$result[0]);
$this->display('pop_rule_detail');
$this->display('pop_newrule_detail');
}
public function popNewRuleFinish()
{
$redis = new \Org\RedisSDK\Redis(['host'=>'127.0.0.1','port'=>6379],[]);
$cacheKey = "pop:newrule:set";
if ($redis->exists($cacheKey)) {
$redis->sadd($cacheKey, get_pid());
} else {
$redis->sadd($cacheKey, get_pid());
$redis->exprieAt($cacheKey, strtotime('next sunday') + 24*3600);
}
return $this->success("成功", [], true);
}
public function popRuleFinish()
public function popRuleFinish($pop = false)
{
$redis = new \Org\RedisSDK\Redis(['host'=>'127.0.0.1','port'=>6379],[]);
$cacheKey = "pop:rule:set";
@ -308,7 +395,12 @@ class PromoteController extends BaseController
$redis->sadd($cacheKey, get_pid());
} else {
$redis->sadd($cacheKey, get_pid());
$redis->exprieAt($cacheKey, strtotime(date('Y-m-d')) + 86400);
if ($pop) {
$redis->exprieAt($cacheKey, strtotime('next sunday') + 24*3600);
}else {
$redis->exprieAt($cacheKey, strtotime(date('Y-m-d')) + 86400);
}
}
return $this->success("成功", [], true);
}
@ -2049,7 +2141,7 @@ class PromoteController extends BaseController
$gameId = $_POST['game_id'];
$promoteId = $_POST['promote_id'];
$applyService = new ApplyService();
$applyService->cancelGame($gameId, $promoteId);
$applyService->offlineGame($gameId, $promoteId);
recordPromoteLogs('游戏管理','专服管理下架游戏');
$this->ajaxReturn(['status' => true, 'msg' => '下架成功']);
}

@ -2491,46 +2491,53 @@ class QueryController extends BaseController
}
public function iosDownLoadData() {
$page = intval(I('get.p', 1));
$page = $page ? $page : 1; //默认显示第一页数据arraypage
$row = intval(I('get.row', 10));
$levelPromote = $this->getLevelPromote();
$queryPromote = $this->getQueryPromote($levelPromote);
$localId = $queryPromote['id'];
$loginPromote = $this->getLoginPromote();
$map = [];
if ($queryPromote['level'] == 4) {
$map['id'] = $queryPromote['id'];
}else {
$map['chain'] = ['like', $queryPromote['chain'] . $queryPromote['id'] . '/%'];
$map['chain'] = ['like', $queryPromote['chain'] . $queryPromote['id'] . '%'];
}
$createTime = I('create_time', '');
if ($createTime != '') {
$createTimeRow = explode(' 至 ', $createTime);
$createTimeBegin = 0;
$createTimeEnd = 0;
if (count($createTimeRow) == 2) {
$createTimeBegin = strtotime($createTimeRow[0] . ' 00:00:00');
$createTimeEnd = strtotime($createTimeRow[1] . ' 23:59:59');
} else {
$createTimeBegin = strtotime($createTimeRow[0] . ' 00:00:00');
$createTimeEnd = strtotime($createTimeRow[0] . ' 23:59:59');
}
$tfMap['create_time'] = ['between', [$createTimeBegin, $createTimeEnd]];
$companyMap['create_time'] = ['between', [$createTimeBegin, $createTimeEnd]];
$superMap['create_time'] = ['between', [$createTimeBegin, $createTimeEnd]];
$iostime = time();
$sunday = strtotime('-1 sunday', $iostime) + 24 * 3600;
if (I('begtime') && I('endtime')) {
$iostime = strtotime(I('endtime'));
}
$iosTimeMap['register_time'] = ['between', [$sunday, $iostime]];
$createTime = I('create_time', '');
$nowTime = date('Y-m-d');
$initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
$initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime');
$initEndTime = $nowTime;
$initEndTime = empty(I('endtime')) ? $initEndTime : I('endtime');
$begTime = strtotime($initBegTime);
$endTime = strtotime($initEndTime);
$endTime += 3600 * 24;
$tfMap['create_time'] = ['between', [$begTime, $endTime]];
$companyMap['create_time'] = ['between', [$begTime, $endTime]];
$superMap['create_time'] = ['between', [$begTime, $endTime]];
$map10['register_time'] = ['between', [$begTime, $endTime]];
//var_dump($map);die();
$query = M('promote', 'tab_')->field(['id'])->where($map);
list($promotes, $pagination, $count) = $this->paginate($query);
$ids = array_column($promotes, 'id');
if ($page == 1) {
if ($localId !== PID && !in_array($localId, $ids)) {
array_push($ids, $localId);
}
if ($page == 1 && !in_array(PID, $ids)) {
array_push($ids, PID);
}
// var_dump($ids);die();
// $ids = M('promote', 'tab_')->where($map)->getField('id', true);
// $ids[] = $queryPromote['id'];
$allPromote = M('promote', 'tab_')->field(['id'])->where($map)->select();
$allids = array_column($allPromote, 'id');
if ($localId !== PID) {
array_push($allids, $localId);
}
array_push($allids, PID);
$map = [];
$map['tab_package_download_log.promote_id'] = ['in', $ids];
@ -2538,13 +2545,23 @@ class QueryController extends BaseController
// $data = M('package_download_log','tab_')->where($map)->select();
$listData = [];
$allUserMap['promote_id'] = ['in', $allids];
$allUserMap['device_type'] = 2;
$allUserMap['register_time'] = ['between', [$begTime, $endTime]];
$allTFMap['promote_id'] = ['in', $allids];
$allTFMap['type'] = 2;
$allTFMap['create_time'] = ['between', [$begTime, $endTime]];
$allSuperMap['promote_id'] = ['in', $allids];
$allSuperMap['type'] = 3;
$allSuperMap['create_time'] = ['between', [$begTime, $endTime]];
$companyMap['promote_id'] = ['in', $allids];
$companyMap['type'] = 1;
$companyMap['create_time'] = ['between', [$begTime, $endTime]];
$alliosMap['promote_id'] = ['in', $allids];
$alliosMap['device_type'] = 2;
$alliosMap['register_time'] = ['between', [$sunday, $iostime]];
$allUsersCounts = M('user', 'tab_')->where($allUserMap)->count();
$allIosCounts = M('user', 'tab_')->where($alliosMap)->count();
$allTFCounts = M('package_download_log', 'tab_')->where($allTFMap)->count();
$allSuperCounts = M('package_download_log', 'tab_')->where($allSuperMap)->count();
$allCompanyCounts = M('package_download_log', 'tab_')->where($companyMap)->count();
@ -2559,6 +2576,10 @@ class QueryController extends BaseController
}else {
$listData[$key]['account'] = $promote['account'];
}
$iosTimeMap['promote_id'] = $id;
$iosTimeMap['device_type'] = 2;
$iosCount = M('user', 'tab_')->where($iosTimeMap)->count();
$listData[$key]['ioscount'] = $iosCount;
$tfMap['promote_id'] = $id;
$tfMap['type'] = 2;
$companyMap['promote_id'] = $id;
@ -2568,11 +2589,18 @@ class QueryController extends BaseController
$tfCounts = M('package_download_log', 'tab_')->where($tfMap)->count(); //TF下载量
$companyCounts = M('package_download_log', 'tab_')->where($companyMap)->count(); //企业签下载量
$superCounts = M('package_download_log', 'tab_')->where($superMap)->count(); //超级签下载量
$listData[$key]['tfcounts'] = intval($tfCounts);
$listData[$key]['companycounts'] = intval($companyCounts);
$listData[$key]['supercounts'] = intval($superCounts);
$usersCounts = M('user', 'tab_')->where(['promote_id' => $id])->count();
$map10['promote_id'] = $id;
$map10['device_type'] = 2;
$usersCounts = M('user', 'tab_')->where($map10)->count();
$listData[$key]['userscounts'] = intval($usersCounts);
$listData[$key]['tfcounts'] = intval($tfCounts);
$listData[$key]['tfpercent'] = number_format((intval($tfCounts) / intval($usersCounts)),2,'.','') * 100;
if (intval($usersCounts) == 0) {
$listData[$key]['tfpercent'] = 0;
}
if($promote['level'] == 1) {
$listData[$key]['belongs_president'] = $promote['account'];
$listData[$key]['belongs_department'] = "无所属部门长";
@ -2580,7 +2608,7 @@ class QueryController extends BaseController
}
if ($promote['level'] == 2) {
$parentPromote = M('promote', 'tab_')->field('account')->where(['id'=>$promote['parent_id']])->select();
$listData[$key]['belongs_president'] = $parentPromote['account'];
$listData[$key]['belongs_president'] = $parentPromote[0]['account'];
$listData[$key]['belongs_department'] = $promote['account'];
$listData[$key]['belongs_group'] = "无所属组长";
}
@ -2603,13 +2631,21 @@ class QueryController extends BaseController
$listData[$key]['belongs_group'] = $groupAccount;
}
}
$totalpercent = number_format($allTFCounts/$allUsersCounts,2,'.','') * 100;
if ($allUsersCounts == 0) {
$totalpercent = '0';
}
$this->assign('totalpercent', $totalpercent);
$this->assign('listdata', $listData);
$this->assign('totaluserscounts', $allUsersCounts);
$this->assign('totaltfcounts', $allTFCounts);
$this->assign('totalsupercounts', $allSuperCounts);
$this->assign('pagination', $pagination);
$this->assign('totalcompanycounts', $allCompanyCounts);
$this->assign('initBegTime', $initBegTime);
$this->assign('initEndTime', $initEndTime);
$this->assign('allIosCounts', $allIosCounts);
$this->assign('tfpercent', $tfpercent);
$this->display();
}
@ -2618,23 +2654,22 @@ class QueryController extends BaseController
$belongs_president = $_REQUEST['belongs_president'];
$belongs_department = $_REQUEST['belongs_department'];
$belongs_group = $_REQUEST['belongs_group'];
$createTime = I('create_time', '');
if ($createTime != '') {
$createTimeRow = explode(' 至 ', $createTime);
$createTimeBegin = 0;
$createTimeEnd = 0;
if (count($createTimeRow) == 2) {
$createTimeBegin = strtotime($createTimeRow[0] . ' 00:00:00');
$createTimeEnd = strtotime($createTimeRow[1] . ' 23:59:59');
} else {
$createTimeBegin = strtotime($createTimeRow[0] . ' 00:00:00');
$createTimeEnd = strtotime($createTimeRow[0] . ' 23:59:59');
}
$map['create_time'] = ['between', [$createTimeBegin, $createTimeEnd]];
$tfMap['create_time'] = ['between', [$createTimeBegin, $createTimeEnd]];
$superMap['create_time'] = ['between', [$createTimeBegin, $createTimeEnd]];
$companyMap['create_time'] = ['between', [$createTimeBegin, $createTimeEnd]];
}
// $createTime = I('create_time', '');
$nowTime = date('Y-m-d');
$initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
$initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime');
$initEndTime = $nowTime;
$initEndTime = empty(I('endtime')) ? $initEndTime : I('endtime');
$begTime = strtotime($initBegTime);
$endTime = strtotime($initEndTime);
$endTime += 3600 * 24;
$map['create_time'] = ['between', [$begTime, $endTime]];
$tfMap['create_time'] = ['between', [$begTime, $endTime]];
$superMap['create_time'] = ['between', [$begTime, $endTime]];
$companyMap['create_time'] = ['between', [$begTime, $endTime]];
if(!empty(I('user_account'))) {
$user_id = M('user', 'tab_')->where(['account'=>I('user_account')])->getField('id');
$map['user_id'] = $user_id;
@ -2692,6 +2727,8 @@ class QueryController extends BaseController
$this->assign('belongs_group', $belongs_group);
$this->assign('pagination', $pagination);
$this->assign('datas', $packAges);
$this->assign('initBegTime', $initBegTime);
$this->assign('initEndTime', $initEndTime);
$this->display();
}
}

@ -284,7 +284,7 @@
function reload(id) {
$('input[name=lid]').val(id);
document.getElementById('downloadForm').submit()
setTimeout(function(){ window.location.reload(); }, 7000);
setTimeout(function(){ window.location.reload(); }, 20000);
}
</script>
</block>

@ -204,6 +204,7 @@
</empty>
</table>
</div>
<input type="hidden" id = "a" value="{$match_rules_route}">
<div class="pagenation clearfix">
{$_page}
</div>
@ -215,6 +216,15 @@
<script>
var pop_ids = {$match_rules_id};
var match_rules_route ={$match_rules_route};
var pop_time = {$pop_time1};
var pop_time1 = pop_time[0]
if (pop_time1 < 8 ) {
var pop = false;
}else {
var pop = true;
}
console.log(pop_time)
function pop_rulus_content(id, force = false)
{
if (id instanceof Array) {
@ -224,10 +234,45 @@
type: 2,
title: '平台规则',
area:['60%', '80%'],
btn:['下载文档'],
closeBtn: 0,
shadeClose: false,
skin: 'yourclass',
content: "{:U('Promote/popRuleDetail')}&id="+id+"&force="+force+"&pop="+pop,
yes:function(){window.location.href= match_rules_route[0]},
});
} else {
layer.open({
type: 2,
title: '平台规则',
area:['60%', '80%'],
closeBtn: 0,
shadeClose: false,
skin: 'yourclass',
btn:['下载文档'],
content: "{:U('Promote/popRuleDetail')}&id="+id+"&force="+force+"&pop="+pop,
end:function(){
return false;
},
yes:function(){window.location.href= match_rules_route[0]},
});
}
}
function pop_newrulus_content(id, force = false)
{
if (id instanceof Array) {
console.log(id)
var index = 0;
layer.open({
type: 2,
closeBtn: 0,
title: '平台规则',
area:['60%', '80%'],
shadeClose: false,
skin: 'yourclass',
content: "{:U('Promote/popRuleDetail')}&id="+id+"&force="+force
btn:['下载文档'],
content: "{:U('Promote/popNewRuleDetail')}&id="+id+"&force="+force,
yes:function(){window.location.href= match_newrules_route},
});
} else {
layer.open({
@ -237,8 +282,8 @@
closeBtn: 0,
shadeClose: false,
skin: 'yourclass',
//btn:['返回'],
content: "{:U('Promote/popRuleDetail')}&id="+id+"&force="+force,
btn:['下载文档'],
content: "{:U('Promote/popNewRuleDetail')}&id="+id+"&force="+force,
end:function(){
return false;
}

@ -0,0 +1,123 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title>充值查询列表|----软件管理平台</title>
<link href="http://admin.vlcms.com/Public/icon.ico" type="image/x-icon" rel="shortcut icon">
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/module.css">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css"/>
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__JS__/jquery.mousewheel.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
</head>
<style>
html {
min-width:100%;
}
body {
padding: 0px;
}
.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;}
* {
margin: 0;
padding: 0;
}
footer {
background-color: white;
position:fixed;
bottom:0px;
width: 100%;
}
</style>
<body>
<div id="main" class="main" style="min-height: 342px;width: 96%;">
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<h2 style="text-align: center;">{$rule.title}</h2>
<div>{$rule.content}</div>
</div>
</body>
<footer>
<div style="text-align: right;margin-right: 10px;">
<?php if ($close_btn):?>
<a onclick="<?php if ($force):?>checkClose();<?php else:?>parent.layer.closeAll();<?php endif;?>" class="submit btn" style="line-height: 15px"><i class="add_qudao"></i><span>关闭</span></a>
<?php endif;?>
</div>
</footer>
<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>
var isAble = false;
var force = '{$force}';
setTimeout(function (){
isAble = true;
}, 5000);
function checkClose()
{
if (isAble == false) {
layer.msg("请浏览5秒后再点击111");
return false;
} else {
// 查看完成
$.ajax({
url:"{:U('Promote/popNewRuleFinish')}",
method : "POST",
success:function(){
parent.layer.closeAll();
}
});
return true;
}
}
function checkJump(url)
{
if (isAble == false) {
layer.msg("请浏览5秒后再点击");
return false;
} else {
window.location.href = url;
return true;
}
}
</script>
</html>

@ -91,7 +91,7 @@
<script>
var isAble = false;
var force = '{$force}';
var pop = '{$pop}';
setTimeout(function (){
isAble = true;
}, 5000);
@ -106,6 +106,7 @@
$.ajax({
url:"{:U('Promote/popRuleFinish')}",
method : "POST",
data: {'pop':pop},
success:function(){
parent.layer.closeAll();
}

@ -10,6 +10,9 @@
line-height: 34px;
height: 34px;
}
.pointer-hand {
cursor: pointer;
}
</style>
</block>
<block name="body">
@ -25,9 +28,15 @@
<div class="trunk-content article">
<div class="trunk-search clearfix jssearch">
<include file="Public/promote_select" />
<div class="form-group normal_space fr">
<label>创建时间:</label>
<input type="text" class="txt range-date" name="create_time" placeholder="创建时间" value="{:I('create_time')}" >
<div class="form-group normal_space fr" style="display: flex;">
<label class="form-title select-title" style="position: relative;">创建时间:</label>
<div class="select-time">
<input type="text" readonly id="sdate" class="txt" name="begtime" placeholder="开始时间" value="{$initBegTime}">
</div>
<label class="form-title select-title zhi_color">&nbsp;&nbsp;</label>
<div class="select-time">
<input type="text" readonly id="edate" class="txt" name="endtime" placeholder="结束时间" value="{$initEndTime}">
</div>
</div>
<div class="form-group normal_space">
<input type="submit" class="submit" id='submit' url="{:U('Query/iosDownLoadData','model='.$model['name'],false)}"
@ -38,8 +47,9 @@
<table class="table normal_table">
<tr class="odd">
<th>推广员账号</th>
<th>玩家人数</th>
<th>TF下载次数</th>
<th>IOS用户总数</th>
<th>新增IOS用户总数</th>
<th class="pointer-hand" title="TF下载次数/IOS用户总数">TF下载次数</th>
<th>超级签下载次数</th>
<th>企业签下载次数</th>
<th>所属会长</th>
@ -54,7 +64,8 @@
<tr>
<td>{$data.account}</td>
<td>{$data.userscounts}</td>
<td>{$data.tfcounts}</td>
<td>{$data.ioscount}</td>
<td>{$data.tfcounts}({$data.tfpercent}%)</td>
<td>{$data.supercounts}</td>
<td>{$data.companycounts}</td>
<td>{$data.belongs_president}</td>
@ -68,7 +79,8 @@
<tr>
<td>汇总(所有数据)</td>
<td>{$totaluserscounts}</td>
<td>{$totaltfcounts}</td>
<td>{$allIosCounts}</td>
<td>{$totaltfcounts}({$totalpercent}%)</td>
<td>{$totalsupercounts}</td>
<td>{$totalcompanycounts}</td>
<td></td>
@ -99,23 +111,58 @@
</div>
</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"
charset="UTF-8"></script>
<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>
<script type="text/javascript" src="__JS__/common.js"></script>
<script>
setValue('row', '{:I("get.row",10)}');
$(".select_gallery").select2();
var date = "{$setdate}";
console.log(date);
$('#sdate').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true,
scrollMonth: false,
scrollTime: false,
scrollInput: false,
endDate: date
});
$('#edate').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true,
pickerPosition: 'bottom-left',
scrollMonth: false,
scrollTime: false,
scrollInput: false,
endDate: date
});
</script>
<script type="text/javascript">
$(function() {
setValue('row', '{:I("get.row",10)}');
var defaultDate = $('.range-date').val()
defaultDate = defaultDate == '' ? [] : defaultDate.split(' 至 ')
$('.range-date').flatpickr({
mode: 'range',
locale: 'zh',
dateFormat: "Y-m-d",
defaultDate: defaultDate,
})
//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();

@ -35,9 +35,19 @@
<option value="3" <if condition="I('type') === '3'">selected</if>>超级签下载</option>
</select>
</div>
<div class="form-group normal_space fr">
<!-- <div class="form-group normal_space fr">
<label>创建时间:</label>
<input type="text" class="txt range-date" name="create_time" placeholder="创建时间" value="{:I('create_time')}" >
</div> -->
<div class="form-group normal_space fr" style="display: flex;">
<label class="form-title select-title" style="position: relative;">创建时间:</label>
<div class="select-time">
<input type="text" readonly id="sdate" class="txt" name="begtime" placeholder="开始时间" value="{$initBegTime}">
</div>
<label class="form-title select-title zhi_color">&nbsp;&nbsp;</label>
<div class="select-time">
<input type="text" readonly id="edate" class="txt" name="endtime" placeholder="结束时间" value="{$initEndTime}">
</div>
</div>
<div class="form-group normal_space">
<input type="submit" class="submit" id='submit' url="{:U('Query/iosDownLoadDetail',['promote_id'=>$promote_id,'belongs_president'=>$belongs_president, 'belongs_department'=>$belongs_department, 'belongs_group'=>$belongs_group])}"
@ -79,7 +89,7 @@
</div>
<div class="pagenation clearfix">
<?php if ($loginer['level'] !== 4) :?>
<a id="sch-btn" data-href="{:U('download/iosdetail_data_export',array_merge(['xlsname'=>'ceshi'],I('get.')))}" class="ajax-get">导出</a>
<a id="sch-btn" data-href="{:U('download/iosdetail_data_export',array_merge(['xlsname'=>'ceshi','begtime'=>$initBegTime,'endtime'=>$initEndTime],I('get.')))}" class="ajax-get">导出</a>
<?php endif ;?>
{$pagination}
</div>
@ -95,22 +105,57 @@
</block>
<block name="script">
<link rel="stylesheet" href="__STATIC__/flatpickr/flatpickr.min.css">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"
charset="UTF-8"></script>
<script 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>
<script type="text/javascript" src="__JS__/common.js"></script>
<script>
setValue('row', '{:I("get.row",10)}');
$(".select_gallery").select2();
var date = "{$setdate}";
console.log(date);
$('#sdate').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true,
scrollMonth: false,
scrollTime: false,
scrollInput: false,
endDate: date
});
$('#edate').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true,
pickerPosition: 'bottom-left',
scrollMonth: false,
scrollTime: false,
scrollInput: false,
endDate: date
});
</script>
<script type="text/javascript">
$(function() {
setValue('row', '{:I("get.row",10)}');
var defaultDate = $('.range-date').val()
defaultDate = defaultDate == '' ? [] : defaultDate.split(' 至 ')
$('.range-date').flatpickr({
mode: 'range',
locale: 'zh',
dateFormat: "Y-m-d",
defaultDate: defaultDate,
})
// 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();

@ -13,10 +13,10 @@
</style>
<!-- heard -->
<div class="home_swiper">
<!-- <img src="__IMG__/lunbo.png" alt=""> -->
<img src="__IMG__/lunbo1.jpg" alt="">
<img src="__IMG__/lunbo.png" alt="">
<!-- <img src="__IMG__/lunbo1.jpg" alt=""> -->
</div>
<div class="home_text" style="margin: -0rem auto 0.81rem">
<div class="home_text">
<div class="home_pad">
<div class="title">公司介绍</div>
<div class="del">COMPANY PROFILE</div>

@ -6,6 +6,7 @@ use User\Api\SuserApi;
use Think\Log;
use Base\Service\ApplyService;
use Base\Tool\TaskClient;
use Base\Facade\Request;
class CommonController extends BaseController {
const USER_NOT_ILLEGAL = -1; //用户名不合法
@ -208,6 +209,8 @@ class CommonController extends BaseController {
}
}
$data = [
'account' => $account,
'password' => think_ucenter_md5($password, UC_AUTH_KEY),
@ -222,8 +225,14 @@ class CommonController extends BaseController {
'parent_name' => get_parent_name($promote_id),
'register_time' => time(),
'check_time' => time(),
];
if (Request::isIOS()) {
$data['device_type'] = 2;
} elseif (Request::isAndroid()) {
$data['device_type'] = 1;
}
if ($game_id) {//关联游戏
$game = M('game', 'tab_')->where(['id' => $game_id])->find();
if ($game) {

@ -7,6 +7,7 @@ use Base\Tool\TaskClient;
use Think\Log;
use Base\Service\GameService;
use Base\Service\PackageDownloadLogService;
use Base\Facade\Request;
class SsgController extends BaseController {
const USER_NOT_ILLEGAL = -1; //用户名不合法
@ -293,8 +294,14 @@ class SsgController extends BaseController {
'parent_name'=>get_parent_name($promote_id),
'register_time'=>time(),
'check_time' => time(),
);
if (Request::isIOS()) {
$data['device_type'] = 2;
} elseif (Request::isAndroid()) {
$data['device_type'] = 1;
}
if ($game_id) {//关联游戏
$game = M('game', 'tab_')->where(['id' => $game_id])->find();
if ($game) {

@ -0,0 +1 @@
Subproject commit 4c40f58e6c0c9afe8a505f404b4df11a98f15653

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Loading…
Cancel
Save