123 changed files with 25462 additions and 0 deletions
@ -0,0 +1,26 @@ |
|||
<?php |
|||
/** |
|||
* Comment: 打印请求 |
|||
* Author: zzw |
|||
*/ |
|||
|
|||
//前置操作 |
|||
define('IN_UNIAPP', true); |
|||
header('Access-Control-Allow-Origin:*'); |
|||
require '../../../framework/bootstrap.inc.php'; |
|||
require '../../../addons/'.MODULE_NAME.'/core/common/defines.php'; |
|||
require PATH_MODULE . "/vendor/autoload.php"; |
|||
require PATH_MODULE . "core/common/autoload.php"; |
|||
Func_loader::core('global'); |
|||
global $_W, $_GPC; |
|||
load()->model('attachment'); |
|||
$_W['siteroot'] = str_replace(array('/addons/'.MODULE_NAME.'/payment','/addons/weliam_smartcity/payment'), '', $_W['siteroot']); |
|||
//获取打印数据 |
|||
Util::wl_log('printing_request', PATH_MODULE."log/",$_REQUEST,'请求打印 —— 接收信息'); //写入日志记录 |
|||
$tid = $_REQUEST['tid']; |
|||
$data = Printing::getPrintingData($tid); |
|||
$jsonInfo = json_encode($data,JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES); |
|||
Util::wl_log('printing_request', PATH_MODULE."log/",$jsonInfo,'请求打印 —— 输出打印信息'); //写入日志记录 |
|||
header('Content-type: rjson'); |
|||
echo $jsonInfo; |
|||
|
|||
@ -0,0 +1,48 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
define('IN_SYS', true); |
|||
global $_W, $_GPC; |
|||
file_exists(VERSION_PATH) && require_once VERSION_PATH; |
|||
Func_loader::core('tpl'); |
|||
|
|||
$_W['aid'] = 0; |
|||
$_W['wlcloud']['authinfo'] = Cloud::wl_syssetting_read('authinfo'); |
|||
if(empty($_W['highest_role'])){ |
|||
header("Location: " . url('user/login')); |
|||
} |
|||
if ($_W['isfounder'] && $_W['plugin'] != 'cloud' && ($_W['wlcloud']['authinfo']['status'] == 0 && $_W['wlcloud']['authinfo']['endtime'] > time()) && !IS_DEV) { |
|||
$version = pdo_getcolumn('modules', array('name' => MODULE_NAME), 'version'); |
|||
if ($version != WELIAM_VERSION) { |
|||
header("Location: " . web_url('cloud/auth/upgrade', ['up' => 'now'])); |
|||
exit; |
|||
} |
|||
} |
|||
|
|||
if(!empty(strstr($_W['siteroot'],'zbczc.com'))){ |
|||
wl_message("此域名被禁止访问!请联系管理员。"); |
|||
} |
|||
|
|||
|
|||
//以下是代理商员工权限的操作。当前登录的账号为员工账号.进行权限判断 |
|||
$ESession = json_decode(base64_decode($_GPC['__wlsystem_staff_session']), true); |
|||
if($ESession){ |
|||
//判断该员工账号是否存在 Employee information 。并且获取该员工的权限信息 |
|||
if(!$ESession['uniacid'] && $_W['uniacid'] > 0) $ESession['uniacid'] = $_W['uniacid']; |
|||
$_W['EInfor'] = $EInfo = pdo_get(PDO_NAME."agentadmin",$ESession); |
|||
if(!$EInfo){ |
|||
//员工不存在/已被删除 |
|||
isetcookie('__session', '', -10000);//删除代理商登录信息 |
|||
isetcookie('__wlsystem_staff_session', '', -10000);//删除员工登录信息 |
|||
wl_message("您的信息不存在!请联系管理员。", web_url('user/login/adminStaffLogin')); |
|||
} |
|||
//判断是否存在uniacid |
|||
if(!$_W['uniacid']) $_W['uniacid'] = $EInfo['uniacid']; |
|||
|
|||
|
|||
//获取当前员工的权限路径列表 判断是否拥有访问权限 |
|||
$_W['jurisdiction'] = unserialize($EInfo['jurisdiction']); |
|||
if(count($_W['jurisdiction']) <= 0) wl_message("对不起!您没有访问权限。", getenv("HTTP_REFERER")); |
|||
//调用权限方法 获取跳转地址 |
|||
Jurisdiction::judge(); |
|||
} |
|||
|
|||
@ -0,0 +1,21 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
class Plugins_WeliamController { |
|||
/* |
|||
* 入口函数 |
|||
*/ |
|||
public function index() { |
|||
global $_W, $_GPC; |
|||
if (is_agent()) { |
|||
$category = App::get_cate_plugins('agent'); |
|||
}else if(is_store()){ |
|||
$category = App::get_cate_plugins('store'); |
|||
} else { |
|||
$category = App::get_cate_plugins('sys'); |
|||
} |
|||
|
|||
include wl_template('app/plugins_list'); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,319 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
set_time_limit(0); |
|||
load()->func('file'); |
|||
|
|||
class Auth_WeliamController { |
|||
|
|||
public function __construct() { |
|||
global $_W; |
|||
if (!$_W['isfounder']) { |
|||
wl_message('无权访问!'); |
|||
} |
|||
} |
|||
|
|||
public function auth() { |
|||
global $_W, $_GPC; |
|||
$auth = Cloud::auth_info(); |
|||
if (is_error($auth)) { |
|||
wl_message($auth['message'], referer(), 'warning'); |
|||
} |
|||
if (!empty($auth['plugins']) && $auth['encrypt'] == 1 && !file_exists(PATH_MODULE . 'check.php')) { |
|||
Cloud::files_plugin_exit($auth['plugins']); |
|||
} |
|||
|
|||
$auth['status'] = ($auth['status'] == 1) ? '禁用中' : ($auth['endtime'] < time() ? '已过期' : '已授权'); |
|||
$auth['number'] = '不限制'; |
|||
$auth['version'] = 'V' . $auth['version']; |
|||
$auth['endtime'] = date("Y-m-d", $auth['endtime']); |
|||
|
|||
if(Customized::init('distributionText') > 0){ |
|||
$auth['name'] = str_replace('智慧城市同城','门店共享系统',$auth['name']); |
|||
} |
|||
|
|||
include wl_template('cloud/auth'); |
|||
} |
|||
|
|||
public function upgrade() { |
|||
global $_W, $_GPC; |
|||
if ($_W['isajax']) { |
|||
if (file_exists(PATH_MODULE . 'check.php')) { |
|||
wl_json(1, '开发环境禁止更新'); |
|||
} |
|||
|
|||
//获取最新版本的文件 |
|||
$files_md5 = Cloud::api_post(array('do' => 'files_md5', 'url' => $_W['siteroot'])); |
|||
if ($files_md5['code'] != 0) { |
|||
wl_json($files_md5['code'], $files_md5['message']); |
|||
} |
|||
|
|||
$files = array(); |
|||
if (!empty($files_md5['data'])) { |
|||
foreach ($files_md5['data'] as $file) { |
|||
if(IMS_FAMILY == 'wl'){ |
|||
$entry = IA_ROOT.'/'.$file['path']; |
|||
}else{ |
|||
$entry = PATH_MODULE . $file['path']; |
|||
} |
|||
//判断当前文件是否需要进行更新 |
|||
if($this->notUpgradeFile($entry)) continue; |
|||
//储存需要更新的文件信息 |
|||
if (!is_file($entry) || md5_file($entry) != $file['md5']) { |
|||
$files[] = array('path' => $file['path'], 'download' => 0, 'entry' => $entry); |
|||
} |
|||
} |
|||
} |
|||
if (!empty($files)) { |
|||
file_put_contents(FILES_UP_PATH, json_encode($files)); |
|||
wl_json(0, '', ['count' => count($files)]); |
|||
} |
|||
pdo_update('modules', array('version' => WELIAM_VERSION), array('name' => MODULE_NAME)); |
|||
wl_json(1, '已是最新版本,无需进行更新'); |
|||
} |
|||
|
|||
$log = []; |
|||
$update_logs = Cloud::api_post(array('do' => 'get_update_log', 'url' => $_W['siteroot'], 'page' => intval($_GPC['page']))); |
|||
if ($update_logs['code'] == 0) { |
|||
$log = $update_logs['data']['logs'][0]; |
|||
} |
|||
if (file_exists(PATH_MODULE . 'manifest.xml') && !IS_DEV) { |
|||
unlink(PATH_MODULE . 'manifest.xml'); |
|||
} |
|||
|
|||
include wl_template('cloud/upgrade'); |
|||
} |
|||
|
|||
public function upgrade_download() { |
|||
|
|||
global $_W, $_GPC; |
|||
// wl_debug(MODULE_NAME); |
|||
if (!file_exists(FILES_UP_PATH)) { |
|||
wl_json(1, '不存在需要更新的文件或更新异常'); |
|||
} |
|||
//清理opcache缓存 |
|||
if (ini_get('opcache.enable') || ini_get('opcache.enable_cli')) { |
|||
opcache_reset(); |
|||
} |
|||
|
|||
$files = json_decode(file_get_contents(FILES_UP_PATH), true); |
|||
$count_files = count($files); |
|||
//判断是否存在需要更新的文件 |
|||
$key = $path = $success = 0; |
|||
foreach ($files as $k => &$f) { |
|||
if (empty($f['download'])) { |
|||
$path = $f['path']; |
|||
$key = $k; |
|||
break; |
|||
} else { |
|||
$success++; |
|||
} |
|||
} |
|||
|
|||
if (!empty($path)) { |
|||
|
|||
$files_up = Cloud::api_post(array('do' => 'files_get', 'url' => $_W['siteroot'], 'path' => $path)); |
|||
if ($files_up['code'] != 0) { |
|||
wl_json(1, $files_up['message'], array('total' => $count_files, 'success' => $success)); |
|||
} |
|||
$content = base64_decode(trim($files_up['data'])); |
|||
//根据路径创建目录和文件 |
|||
if(IMS_FAMILY == 'wl'){ |
|||
FilesHandle::file_mkdirs(dirname(IA_ROOT.'/'. $path)); |
|||
}else{ |
|||
FilesHandle::file_mkdirs(dirname(PATH_MODULE . $path)); |
|||
} |
|||
//修改文件内容 |
|||
$fileName = basename($path,'.'.pathinfo($path)['extension']); |
|||
$fileName = ucfirst(preg_replace_callback('/([-_]+([a-z]{1}))/i', function ($matches) { |
|||
return strtoupper($matches[2]); |
|||
}, $fileName)); |
|||
$funName = "update{$fileName}Content"; |
|||
if(method_exists($this,$funName)) $content = $this->$funName($content); |
|||
//替换 h5中模块标志 |
|||
if ((strpos($path, 'index.html') !== false || strpos($path, 'static/js/index.') !== false) && MODULE_NAME != 'weliam_smartcity') { |
|||
$content = str_replace('weliam_smartcity', MODULE_NAME, $content); |
|||
} |
|||
//覆盖更新文件内容 |
|||
if(strpos($path, 'auth.ctrl.php') === false){ |
|||
if(IMS_FAMILY == 'wl'){ |
|||
file_put_contents(IA_ROOT.'/' . $path, $content); |
|||
}else{ |
|||
file_put_contents(PATH_MODULE . $path, $content); |
|||
} |
|||
} |
|||
// wl_debug($content); |
|||
//修改文件下载状态 |
|||
$files[$key]['download'] = 1; |
|||
file_put_contents(FILES_UP_PATH, json_encode($files)); |
|||
|
|||
wl_json(0, '', array('total' => $count_files, 'success' => $success + 1)); |
|||
} else { |
|||
//更新版本号 |
|||
touch(VERSION_PATH); |
|||
pdo_update('modules', array('version' => WELIAM_VERSION), array('name' => MODULE_NAME)); |
|||
//删除更新文件列表 |
|||
unlink(FILES_UP_PATH); |
|||
wl_json(2, ''); |
|||
} |
|||
} |
|||
|
|||
public function upgrade_db() { |
|||
global $_W, $_GPC; |
|||
$sqlcache = Cache::getCache('upgrade', 'db'); |
|||
if (empty($sqlcache)) { |
|||
$sqls = Cloud::auth_up_data(); |
|||
$sqlcache = ['total' => count($sqls), 'success' => 0, 'sqls' => $sqls]; |
|||
} |
|||
|
|||
if (!empty($sqlcache['sqls'])) { |
|||
if (is_array($sqlcache['sqls'][0])) { |
|||
switch ($sqlcache['sqls'][0]['type']) { |
|||
case 'store_cate': |
|||
Cloud::data_store_cate($sqlcache['sqls'][0]['sid']); |
|||
break; |
|||
} |
|||
} else { |
|||
pdo_query($sqlcache['sqls'][0]); |
|||
} |
|||
|
|||
$sqlcache['success'] = $sqlcache['success'] + 1; |
|||
unset($sqlcache['sqls'][0]); |
|||
$sqlcache['sqls'] = array_values($sqlcache['sqls']); |
|||
Cache::setCache('upgrade', 'db', $sqlcache); |
|||
|
|||
wl_json(0, '', array('total' => $sqlcache['total'], 'success' => $sqlcache['success'])); |
|||
} |
|||
|
|||
Cache::deleteCache('upgrade', 'db'); |
|||
wl_json(1, ''); |
|||
} |
|||
|
|||
public function upgrade_log() { |
|||
global $_W, $_GPC; |
|||
if ($_W['isajax']) { |
|||
$update_logs = Cloud::api_post(array('do' => 'get_update_log', 'url' => $_W['siteroot'], 'page' => intval($_GPC['page']))); |
|||
if ($update_logs['code'] != 0) { |
|||
wl_json(1, $update_logs['message']); |
|||
} |
|||
foreach ($update_logs['data']['logs'] as &$log) { |
|||
$log['content'] = htmlspecialchars_decode($log['content']); |
|||
$log['year'] = date('Y-m', $log['updated_at']); |
|||
$log['day'] = date('d', $log['updated_at']); |
|||
$log['hour'] = date('H:i:s', $log['updated_at']); |
|||
} |
|||
|
|||
wl_json(0, '', $update_logs['data']); |
|||
} |
|||
include wl_template('cloud/upgrade_log'); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* Comment: 判断当前文件是否需要进行更新 |
|||
* Author: zzw |
|||
* Date: 2020/8/21 12:12 |
|||
* @param $path |
|||
* @return bool |
|||
*/ |
|||
public function notUpgradeFile($path){ |
|||
$status = false; |
|||
if(strpos($path, '/plugin/weliam_house') !== false){ |
|||
//无需更新文件 |
|||
$notFile = [ |
|||
'.txt' , |
|||
'.zip' , |
|||
'check.php' , |
|||
'.md' , |
|||
'LICENSE' , |
|||
'.gitignore' ,//git限制更新文件 |
|||
'runtime' ,//缓存文件 |
|||
'public/file/image' ,//本地图片储存路径 |
|||
'public/file/qrcode' ,//二维码储存地址 |
|||
'public/file/video' ,//本地视频储存地址 |
|||
'public/file/log' ,//日志信息记录 |
|||
'public/w7_wl_house_install.zip' ,//微擎版安装包 |
|||
'public/uploads' ,//本地图片储存地址(已弃用) |
|||
]; |
|||
foreach($notFile as $notFilePath){ |
|||
if(strpos($path, $notFilePath) !== false) { |
|||
$status = true; |
|||
break; |
|||
} |
|||
} |
|||
//只在第一次进入时更新的文件(需要安装单不能更新的文件) |
|||
$oneFile = [ |
|||
'addons/address/config.php' ,//fastadmin第三方插件 - 地图插件配置文件, |
|||
'addons/alisms/config.php' ,//fastadmin第三方插件 - 阿里云短信配置文件, |
|||
'application/system/sys_config.php' ,//总后台配置文件 |
|||
'application/database.php' ,//数据库配置文件 |
|||
]; |
|||
if(!$status){ |
|||
foreach($oneFile as $noeFilePath){ |
|||
if(strpos($path, $noeFilePath) !== false && file_exists($path)){ |
|||
$status = true; |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return $status; |
|||
} |
|||
/** |
|||
* Comment: 数据库文件初始化内容 |
|||
* Author: zzw |
|||
* Date: 2020/8/21 14:46 |
|||
* @param $content |
|||
* @return string |
|||
*/ |
|||
protected function updateDatabaseContent($content){ |
|||
//内容替换 |
|||
$html = ' |
|||
<?php |
|||
// +---------------------------------------------------------------------- |
|||
|
|||
use think\Env; |
|||
|
|||
return [ |
|||
// 数据库类型 |
|||
\'type\' => Env::get(\'database.type\', \'mysql\'), |
|||
\'hostname\' => Env::get(\'database.hostname\', \'__HOSTNAME__\'), // 服务器地址 |
|||
\'database\' => Env::get(\'database.database\', \'__DATABASE__\'),// 数据库名 |
|||
\'username\' => Env::get(\'database.username\', \'__USERNAME__\'),// 用户名 |
|||
\'password\' => Env::get(\'database.password\', \'__PASSWORD__\'),// 密码 |
|||
\'hostport\' => Env::get(\'database.hostport\', \'__HOSTPORT__\'),// 端口 |
|||
// 连接dsn |
|||
\'dsn\' => \'\', |
|||
// 数据库连接参数 |
|||
\'params\' => [], |
|||
// 数据库编码默认采用utf8 |
|||
\'charset\' => Env::get(\'database.charset\', \'utf8\'), |
|||
// 数据库表前缀 |
|||
\'prefix\' => Env::get(\'database.prefix\', \'__PREFIX__\'), |
|||
// 数据库调试模式 |
|||
\'debug\' => Env::get(\'database.debug\', false), |
|||
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) |
|||
\'deploy\' => 0, |
|||
// 数据库读写是否分离 主从式有效 |
|||
\'rw_separate\' => false, |
|||
// 读写分离后 主服务器数量 |
|||
\'master_num\' => 1, |
|||
// 指定从服务器序号 |
|||
\'slave_no\' => \'\', |
|||
// 是否严格检查字段是否存在 |
|||
\'fields_strict\' => true, |
|||
// 数据集返回类型 |
|||
\'resultset_type\' => \'array\', |
|||
// 自动写入时间戳字段 |
|||
\'auto_timestamp\' => true, |
|||
// 时间字段取出后的默认时间格式,默认为Y-m-d H:i:s |
|||
\'datetime_format\' => false, |
|||
// 是否需要进行SQL性能分析 |
|||
\'sql_explain\' => false, |
|||
];'; |
|||
|
|||
return $html; |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,956 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
set_time_limit(0); |
|||
|
|||
class Database_WeliamController |
|||
{ |
|||
|
|||
public function __construct() |
|||
{ |
|||
global $_W; |
|||
if (!$_W['isfounder']) { |
|||
wl_message('无权访问!'); |
|||
} |
|||
} |
|||
|
|||
public function settlement_error() |
|||
{ |
|||
global $_W, $_GPC; |
|||
$allmoney = array( |
|||
'allagentmoney' => 0, |
|||
'alldismoney' => 0, |
|||
'allstoremoney' => 0, |
|||
); |
|||
$commentSql = "select checkcode,merchantid,type,orderno,goodsid,goodsid,agentmoney,createtime,merchantmoney,distrimoney,aid,count(id) as count from" . tablename(PDO_NAME . "autosettlement_record") . "group by checkcode having count > 1 AND checkcode > 0 "; |
|||
$lists = pdo_fetchall($commentSql); |
|||
if (!empty($lists)) { |
|||
foreach ($lists as $key => &$va) { |
|||
$va['storename'] = pdo_getcolumn(PDO_NAME . 'merchantdata', array('id' => $va['merchantid']), 'storename'); |
|||
$va['agentname'] = pdo_getcolumn(PDO_NAME . 'agentusers', array('id' => $va['aid']), 'agentname'); |
|||
$va['count'] = $va['count'] - 1; //重复核销次数 |
|||
$va['allstoremoney'] = $va['merchantmoney'] * $va['count']; //总的结算给商户的错误金额 |
|||
$va['alldismoney'] = $va['distrimoney'] * $va['count'];//总的结算给分销商的错误金额 |
|||
$va['allagentmoney'] = $va['agentmoney'] * $va['count'];//总的结算给代理的错误金额 |
|||
$va['nowstoremoney'] = pdo_getcolumn(PDO_NAME . 'merchantdata', array('id' => $va['merchantid']), 'nowmoney'); //目前商户的金额 |
|||
$va['nowagentmoney'] = pdo_getcolumn(PDO_NAME . 'agentusers', array('id' => $va['aid']), 'nowmoney'); //目前代理的金额 |
|||
if ($va['alldismoney'] > 0) { |
|||
$checkcode = pdo_get('wlmerchant_smallorder', array('checkcode' => $va['checkcode']), array('plugin', 'oneleadid', 'twoleadid', 'onedismoney', 'twodismoney')); |
|||
if ($checkcode['plugin'] == 'coupon') { |
|||
$dissettime = pdo_getcolumn(PDO_NAME . 'couponlist', array('id' => $va['goodsid']), 'dissettime'); |
|||
} else if ($checkcode['plugin'] == 'wlfightgroup') { |
|||
$dissettime = pdo_getcolumn(PDO_NAME . 'fightgroup_goods', array('id' => $va['goodsid']), 'dissettime'); |
|||
} else if ($checkcode['plugin'] == 'groupon') { |
|||
$dissettime = pdo_getcolumn(PDO_NAME . 'groupon_activity', array('id' => $va['goodsid']), 'dissettime'); |
|||
} else if ($checkcode['plugin'] == 'rush') { |
|||
$dissettime = pdo_getcolumn(PDO_NAME . 'rush_activity', array('id' => $va['goodsid']), 'dissettime'); |
|||
} else if ($checkcode['plugin'] == 'bargain') { |
|||
$dissettime = pdo_getcolumn(PDO_NAME . 'bargain_activity', array('id' => $va['goodsid']), 'dissettime'); |
|||
} |
|||
$va['oneleadid'] = $checkcode['oneleadid']; |
|||
$va['twoleadid'] = $checkcode['twoleadid']; |
|||
$va['onedisname'] = pdo_getcolumn(PDO_NAME . 'member', array('distributorid' => $checkcode['oneleadid']), 'nickname'); |
|||
if ($checkcode['twoleadid'] > 0) { |
|||
$va['twodisname'] = pdo_getcolumn(PDO_NAME . 'member', array('distributorid' => $checkcode['twoleadid']), 'nickname'); |
|||
} else { |
|||
$va['twodisname'] = '无二级分销商'; |
|||
} |
|||
if ($dissettime) { |
|||
$va['alldismoney'] = 0; |
|||
$va['oneerrormoney'] = $va['twoerrormoney'] = 0; |
|||
$va['onenowmoney'] = $va['twonowmoney'] = 0; |
|||
$va['tip'] = '佣金支付时结算,无错误'; |
|||
} else { |
|||
$va['oneerrormoney'] = $checkcode['onedismoney'] * $va['count']; |
|||
$va['twoerrormoney'] = $checkcode['twodismoney'] * $va['count']; |
|||
$va['onenowmoney'] = pdo_getcolumn(PDO_NAME . 'distributor', array('id' => $checkcode['oneleadid']), 'nowmoney'); |
|||
$va['twonowmoney'] = pdo_getcolumn(PDO_NAME . 'distributor', array('id' => $checkcode['twoleadid']), 'nowmoney'); |
|||
} |
|||
} else { |
|||
$va['alldismoney'] = 0; |
|||
$va['oneleadid'] = $va['twoleadid'] = 0; |
|||
$va['onedisname'] = $va['twodisname'] = '无'; |
|||
$va['oneerrormoney'] = $va['twoerrormoney'] = 0; |
|||
$va['onenowmoney'] = $va['twonowmoney'] = 0; |
|||
} |
|||
$allmoney['allstoremoney'] += $va['allstoremoney']; |
|||
$allmoney['alldismoney'] += $va['alldismoney']; |
|||
$allmoney['allagentmoney'] += $va['allagentmoney']; |
|||
} |
|||
} |
|||
include wl_template('cloud/settlement_error'); |
|||
} |
|||
|
|||
public function repair_settlement_error() |
|||
{ |
|||
global $_W, $_GPC; |
|||
$checkcode = $_GPC['checkcode']; |
|||
$commentSql = "select id,checkcode,merchantid,type,orderno,goodsid,goodsid,agentmoney,createtime,merchantmoney,distrimoney,aid,count(id) as count from" . tablename(PDO_NAME . "autosettlement_record") . "WHERE checkcode = '{$checkcode}'"; |
|||
$record = pdo_fetch($commentSql); |
|||
$record['count'] = $record['count'] - 1; //重复核销次数 |
|||
|
|||
//修复商户金额 |
|||
$record['allstoremoney'] = $record['merchantmoney'] * $record['count']; //总的结算给商户的错误金额 |
|||
pdo_fetch("update" . tablename('wlmerchant_merchantdata') . "SET allmoney=allmoney-{$record['allstoremoney']},nowmoney=nowmoney-{$record['allstoremoney']} WHERE id = {$record['merchantid']}"); |
|||
$firstsid = pdo_getcolumn(PDO_NAME . 'current', array('remark' => $checkcode, 'status' => 1, 'objid' => $record['merchantid']), 'id'); |
|||
pdo_delete(PDO_NAME . 'current', array('id >' => $firstsid, 'remark' => $checkcode, 'status' => 1, 'objid' => $record['merchantid'])); |
|||
|
|||
|
|||
//修复代理金额 |
|||
$record['allagentmoney'] = $record['agentmoney'] * $record['count'];//总的结算给代理的错误金额 |
|||
pdo_fetch("update" . tablename('wlmerchant_agentusers') . "SET allmoney=allmoney-{$record['allagentmoney']},nowmoney=nowmoney-{$record['allagentmoney']} WHERE id = {$record['aid']}"); |
|||
$firstaid = pdo_getcolumn(PDO_NAME . 'current', array('remark' => $checkcode, 'status' => 2, 'objid' => $record['aid']), 'id'); |
|||
pdo_delete(PDO_NAME . 'current', array('id >' => $firstaid, 'remark' => $checkcode, 'status' => 2, 'objid' => $record['aid'])); |
|||
|
|||
|
|||
//修复分销金额 |
|||
$record['alldismoney'] = $record['distrimoney'] * $record['count'];//总的结算给分销商的错误金额 |
|||
if ($record['alldismoney'] > 0) { |
|||
$smallorder = pdo_get('wlmerchant_smallorder', array('checkcode' => $record['checkcode']), array('plugin', 'oneleadid', 'twoleadid', 'onedismoney', 'twodismoney')); |
|||
if ($smallorder['plugin'] == 'coupon') { |
|||
$dissettime = pdo_getcolumn(PDO_NAME . 'couponlist', array('id' => $record['goodsid']), 'dissettime'); |
|||
} else if ($smallorder['plugin'] == 'wlfightgroup') { |
|||
$dissettime = pdo_getcolumn(PDO_NAME . 'fightgroup_goods', array('id' => $record['goodsid']), 'dissettime'); |
|||
} else if ($smallorder['plugin'] == 'groupon') { |
|||
$dissettime = pdo_getcolumn(PDO_NAME . 'groupon_activity', array('id' => $record['goodsid']), 'dissettime'); |
|||
} else if ($smallorder['plugin'] == 'rush') { |
|||
$dissettime = pdo_getcolumn(PDO_NAME . 'rush_activity', array('id' => $record['goodsid']), 'dissettime'); |
|||
} else if ($smallorder['plugin'] == 'bargain') { |
|||
$dissettime = pdo_getcolumn(PDO_NAME . 'bargain_activity', array('id' => $record['goodsid']), 'dissettime'); |
|||
} |
|||
if (empty($dissettime)) { |
|||
$oneerrormoney = $smallorder['onedismoney'] * $record['count']; |
|||
pdo_fetch("update" . tablename('wlmerchant_distributor') . "SET dismoney=dismoney-{$oneerrormoney},nowmoney=nowmoney-{$oneerrormoney} WHERE id = {$smallorder['oneleadid']}"); |
|||
$onemid = pdo_getcolumn(PDO_NAME . 'distributor', array('id' => $smallorder['oneleadid']), 'mid'); |
|||
$firstoneid = pdo_getcolumn(PDO_NAME . 'disdetail', array('checkcode' => $checkcode, 'leadid' => $onemid), 'id'); |
|||
pdo_delete(PDO_NAME . 'disdetail', array('id >' => $firstoneid, 'checkcode' => $checkcode, 'leadid' => $onemid)); |
|||
if ($smallorder['twoleadid']) { |
|||
$twoerrormoney = $smallorder['twodismoney'] * $record['count']; |
|||
pdo_fetch("update" . tablename('wlmerchant_distributor') . "SET dismoney=dismoney-{$twoerrormoney},nowmoney=nowmoney-{$twoerrormoney} WHERE id = {$smallorder['twoleadid']}"); |
|||
$twomid = pdo_getcolumn(PDO_NAME . 'distributor', array('id' => $smallorder['twoleadid']), 'mid'); |
|||
$firsttwoid = pdo_getcolumn(PDO_NAME . 'disdetail', array('checkcode' => $checkcode, 'leadid' => $twomid), 'id'); |
|||
pdo_delete(PDO_NAME . 'disdetail', array('id >' => $firsttwoid, 'checkcode' => $checkcode, 'leadid' => $twomid)); |
|||
} |
|||
} |
|||
} |
|||
pdo_delete(PDO_NAME . 'autosettlement_record', array('id >' => $record['id'], 'checkcode' => $checkcode)); |
|||
|
|||
show_json(1, array('url' => referer())); |
|||
} |
|||
|
|||
public function updateOpenid() |
|||
{ |
|||
global $_W, $_GPC; |
|||
$account_api = WeAccount::create(); |
|||
$token = $account_api->getAccessToken(); |
|||
$url = 'http://api.weixin.qq.com/cgi-bin/changeopenid?access_token=' . $token; |
|||
$res = $fail = 0; |
|||
for ($page = 0; $page < 10; $page++) { |
|||
$sql = "select openid from ims_wlmerchant_member where uniacid = 1 AND openid LIKE '%oR9%' AND changeflag = 0 ORDER BY `id` DESC limit 0,100;"; |
|||
$openidlist = pdo_fetchall($sql); |
|||
foreach ($openidlist as $row) { |
|||
$openid[] = $row['openid']; |
|||
} |
|||
if (!empty($openid)) { |
|||
$data = json_encode(array('from_appid' => 'wxdef947e212d31c82', 'openid_list' => $openid)); |
|||
$resarray = ihttp_post($url, $data); |
|||
$resarray = json_decode($resarray['content'], true); |
|||
$resarray = $resarray['result_list']; |
|||
foreach ($resarray as $item) { |
|||
if ($item['err_msg'] == 'ok') { |
|||
pdo_update('wlmerchant_member', array('openid' => $item['new_openid']), array('openid' => $item['ori_openid'])); |
|||
pdo_update('mc_mapping_fans', array('openid' => $item['new_openid']), array('openid' => $item['ori_openid'])); |
|||
$res++; |
|||
} else { |
|||
file_put_contents(PATH_DATA . "error_openid.log", var_export($item, true) . PHP_EOL, FILE_APPEND); |
|||
pdo_update('wlmerchant_member', array('changeflag' => 1), array('openid' => $item['ori_openid'])); |
|||
$fail++; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
echo('成功' . $res . '失败' . $fail); |
|||
} |
|||
|
|||
function sendSelfFormatOrderInfo($device_no, $key, $times = 1, $orderInfo) |
|||
{ // $times打印次数 |
|||
$selfMessage = array( |
|||
'deviceNo' => $device_no, |
|||
'printContent' => $orderInfo, |
|||
'key' => $key, |
|||
'times' => $times |
|||
); |
|||
$url = "http://open.printcenter.cn:8080/addOrder"; |
|||
$options = array( |
|||
'http' => array( |
|||
'header' => "Content-type: application/x-www-form-urlencoded ", |
|||
'method' => 'POST', |
|||
'content' => http_build_query($selfMessage), |
|||
), |
|||
); |
|||
$context = stream_context_create($options); |
|||
$result = file_get_contents($url, false, $context); |
|||
|
|||
return $result; |
|||
} |
|||
|
|||
|
|||
function test($arr,$A,$B,$C,$D) |
|||
{ |
|||
$orderInfo = '<CB>飞鹅云测试</CB><BR>'; |
|||
$orderInfo .= '名称 单价 数量 金额<BR>'; |
|||
$orderInfo .= '--------------------------------<BR>'; |
|||
foreach ($arr as $k5 => $v5) { |
|||
$name = $v5['title']; |
|||
$price = $v5['price']; |
|||
$num = $v5['num']; |
|||
$prices = $v5['price']*$v5['num']; |
|||
$kw3 = ''; |
|||
$kw1 = ''; |
|||
$kw2 = ''; |
|||
$kw4 = ''; |
|||
$str = $name; |
|||
$blankNum = $A;//名称控制为14个字节 |
|||
$lan = mb_strlen($str,'utf-8'); |
|||
$m = 0; |
|||
$j=1; |
|||
$blankNum++; |
|||
$result = array(); |
|||
if(strlen($price) < $B){ |
|||
$k1 = $B - strlen($price); |
|||
for($q=0;$q<$k1;$q++){ |
|||
$kw1 .= ' '; |
|||
} |
|||
$price = $price.$kw1; |
|||
} |
|||
if(strlen($num) < $C){ |
|||
$k2 = $C - strlen($num); |
|||
for($q=0;$q<$k2;$q++){ |
|||
$kw2 .= ' '; |
|||
} |
|||
$num = $num.$kw2; |
|||
} |
|||
if(strlen($prices) < $D){ |
|||
$k3 = $D - strlen($prices); |
|||
for($q=0;$q<$k3;$q++){ |
|||
$kw4 .= ' '; |
|||
} |
|||
$prices = $prices.$kw4; |
|||
} |
|||
for ($i=0;$i<$lan;$i++){ |
|||
$new = mb_substr($str,$m,$j,'utf-8'); |
|||
$j++; |
|||
if(mb_strwidth($new,'utf-8')<$blankNum) { |
|||
if($m+$j>$lan) { |
|||
$m = $m+$j; |
|||
$tail = $new; |
|||
$lenght = iconv("UTF-8", "GBK//IGNORE", $new); |
|||
$k = $A - strlen($lenght); |
|||
for($q=0;$q<$k;$q++){ |
|||
$kw3 .= ' '; |
|||
} |
|||
if($m==$j){ |
|||
$tail .= $kw3.' '.$price.' '.$num.' '.$prices; |
|||
}else{ |
|||
$tail .= $kw3.'<BR>'; |
|||
} |
|||
break; |
|||
}else{ |
|||
$next_new = mb_substr($str,$m,$j,'utf-8'); |
|||
if(mb_strwidth($next_new,'utf-8')<$blankNum) continue; |
|||
else{ |
|||
$m = $i+1; |
|||
$result[] = $new; |
|||
$j=1; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
$head = ''; |
|||
foreach ($result as $key=>$value) { |
|||
if($key < 1){ |
|||
$v_lenght = iconv("UTF-8", "GBK//IGNORE", $value); |
|||
$v_lenght = strlen($v_lenght); |
|||
if($v_lenght == 13) $value = $value." "; |
|||
$head .= $value.' '.$price.' '.$num.' '.$prices; |
|||
}else{ |
|||
$head .= $value.'<BR>'; |
|||
} |
|||
} |
|||
$orderInfo .= $head.$tail; |
|||
@$nums += $prices; |
|||
} |
|||
$time = date('Y-m-d H:i:s',time()); |
|||
$orderInfo .= '--------------------------------<BR>'; |
|||
$orderInfo .= '合计:'.number_format($nums, 1).'元<BR>'; |
|||
$orderInfo .= '送货地点:广州市南沙区xx路xx号<BR>'; |
|||
$orderInfo .= '联系电话:020-39004606<BR>'; |
|||
$orderInfo .= '订餐时间:'.$time.'<BR>'; |
|||
$orderInfo .= '备注:加辣<BR><BR>'; |
|||
$orderInfo .= '<QR>http://www.feieyun.com</QR>';//把解析后的二维码生成的字符串用标签套上即可自动生成二维码 |
|||
return $orderInfo; |
|||
} |
|||
|
|||
|
|||
|
|||
public function run() |
|||
{ |
|||
global $_W, $_GPC; |
|||
//亿奇达接口 |
|||
$time = time(); |
|||
$admin = 'weliam'; |
|||
$key = 'dccb26ebc60c7923e90506d9c46c4cd7'; |
|||
//获取分组信息 |
|||
//$sign = md5($time.$key); |
|||
//$url = "http://open.yiqida.cn/api/UserCommdity/GetCatalogList?timestamp={$time}&userName={$admin}&sign={$sign}"; |
|||
//$yqdInfo = curlPostRequest($url,[]); |
|||
|
|||
//获取分组商品列表 |
|||
// $data = [ |
|||
// 'page' => 1, |
|||
// 'size' => 60, |
|||
// 'catalogId' => 10625 |
|||
// ]; |
|||
// $data = json_encode($data); |
|||
// $sign = md5($time.$data.$key); |
|||
// $url = "http://open.yiqida.cn/api/UserCommdity/GetCommodityList?timestamp={$time}&userName={$admin}&sign={$sign}"; |
|||
// $yqdInfo = curlPostRequest($url,$data); |
|||
|
|||
//获取商品信息 |
|||
// $data = [ |
|||
// 'id' => 30181 |
|||
// ]; |
|||
// $data = json_encode($data); |
|||
// $sign = md5($time.$data.$key); |
|||
// $url = "http://open.yiqida.cn/api/UserCommdity/GetCommodityInfo?timestamp={$time}&userName={$admin}&sign={$sign}"; |
|||
// $yqdInfo = curlPostRequest($url,$data); |
|||
|
|||
//订单提交 |
|||
// $template = [urlencode('13658059596')]; |
|||
// $callurl = $_W['siteroot'].'addons/'.MODULE_NAME.'/plugin/pftapimod/yqdAsyNotify.php'; |
|||
// $orderno = 'wl_'.'2022030310300900013918966342'; |
|||
// $data = [ |
|||
// 'commodityId' => 30230, |
|||
// 'external_orderno' => $orderno, |
|||
// 'buyCount' => 1, |
|||
// 'remark' => 'okok', |
|||
// 'callbackUrl' => $callurl, |
|||
// 'externalSellPrice' => 3, |
|||
// 'template' => $template |
|||
// ]; |
|||
// |
|||
// $data = json_encode($data); |
|||
// $sign = md5($time.$data.$key); |
|||
// $url = "http://open.yiqida.cn/api/UserOrder/CreateOrder?timestamp={$time}&userName={$admin}&sign={$sign}"; |
|||
//$yqdInfo = curlPostRequest($url,$data); |
|||
//wl_debug($yqdInfo); |
|||
|
|||
|
|||
|
|||
//飞鹅测试 |
|||
// $keyword = '株洲县'; |
|||
// $city_name = '株洲市'; |
|||
// $res = MapService::guide_search($keyword , "region(" . urlencode($city_name) . ",0)"); |
|||
// wl_debug($res); |
|||
// $url = 'http://api.feieyun.cn/Api/Open/'; |
|||
// $user = '937991452@qq.com'; |
|||
// $ukey = '4k9xB8eE6QDvV3b3'; |
|||
// $SN = '917508610'; |
|||
// $time = time(); |
|||
// $sig = sha1($user.$ukey.$time); |
|||
// |
|||
// $arr[] = [ |
|||
// 'title' => '苹果', |
|||
// 'price' => 10, |
|||
// 'num' => 5 |
|||
// ]; |
|||
// |
|||
// $arr[] = [ |
|||
// 'title' => '梨子', |
|||
// 'price' => 5, |
|||
// 'num' => 3 |
|||
// ]; |
|||
// |
|||
// $arr[] = [ |
|||
// 'title' => '橘子', |
|||
// 'price' => 6, |
|||
// 'num' => 4 |
|||
// ]; |
|||
// $content = $this->test($arr,14,6,3,6);//名称14 单价6 数量3 金额6-->这里的字节数可按自己需求自由改写,14+6+3+6再加上代码写的3个空格就是32了,58mm打印机一行总占32字节 |
|||
// |
|||
// $data = [ |
|||
// 'user' => $user, |
|||
// 'stime' => $time, |
|||
// 'sig' => $sig, |
|||
// 'apiname' => 'Open_printMsg', |
|||
// 'debug' => 1, |
|||
// 'sn' => $SN, |
|||
// 'content' => $content |
|||
// ]; |
|||
// |
|||
// |
|||
// $dadaInfo = curlPostRequest($url,$data); |
|||
// wl_debug($dadaInfo); |
|||
|
|||
|
|||
|
|||
|
|||
// $res = Pftapimod::getTicketDetail(298611,1200053); |
|||
// wl_debug($res); |
|||
//36鲸接口测试 |
|||
// $jnumber = '30000451'; |
|||
// $appkey = 'OWFtzFJjCtt0kIf_kqusxpX6tylsN4ON'; |
|||
// $admin = 'http://81.69.6.74:9099'; |
|||
// |
|||
// //下单 |
|||
// $sloworderurl = '/v1/mobile/sloworder'; |
|||
// $posturl = $admin.$sloworderurl; |
|||
// |
|||
// $data = [ |
|||
// 'appKey' => $jnumber, |
|||
// 'orderId' => '2021110114372400013969664264', |
|||
// 'mobile' => '13658059596', |
|||
// 'amount' => 5.12, |
|||
// 'notifyUrl' => $_W['siteroot'].'addons/'.MODULE_NAME.'/plugin/pftapimod/pftAsyNotify.php' |
|||
// ]; |
|||
// |
|||
// //签名 |
|||
// ksort($data); |
|||
// $arr = []; |
|||
// foreach ($data as $key => $value) { |
|||
// $arr[] = $key.'='.$value; |
|||
// } |
|||
// |
|||
// $arr[] = 'key='.$appkey; |
|||
// $str = implode('&', $arr); |
|||
// $str = strtoupper(md5($str)); |
|||
// $data['sign'] = $str; |
|||
// |
|||
// $Info = curlPostRequest($posturl,$data); |
|||
// wl_debug($Info); |
|||
|
|||
|
|||
|
|||
// $orders = pdo_getall('wlmerchant_smallorder',array('status' => 2,'dissettletime'=> 0,'disorderid >'=>0,'settletime >' => 1634608805)); |
|||
// wl_debug($orders); |
|||
// foreach ($orders as $order){ |
|||
// if($order['disorderid']){ |
|||
// $disorder = pdo_get('wlmerchant_disorder',array('id' => $order['disorderid'])); |
|||
// $nosetflag = pdo_getcolumn('wlmerchant_disdetail',array('checkcode' => $order['checkcode'],'status'=>0),'id'); |
|||
// if(empty($nosetflag)){ |
|||
// if($order['onedismoney'] > 0){ |
|||
// $oneres = pdo_query("update" . tablename('wlmerchant_distributor') . "SET dismoney=dismoney+{$order['onedismoney']},nowmoney=nowmoney+{$order['onedismoney']} WHERE id = {$order['oneleadid']}"); |
|||
// if($oneres){ |
|||
// $leadid = pdo_getcolumn('wlmerchant_distributor',array('id'=> $order['oneleadid']),'mid'); |
|||
// $onenowmoney = pdo_getcolumn(PDO_NAME.'distributor',array('id'=> $order['oneleadid']),'nowmoney'); |
|||
// Distribution::adddisdetail($order['disorderid'],$leadid,$disorder['buymid'],1,$order['onedismoney'],$disorder['plugin'],1,'分销订单结算',$onenowmoney,$order['checkcode'],0,$order['aid']); |
|||
// } |
|||
// } |
|||
// if($order['twodismoney'] > 0){ |
|||
// $twores = pdo_query("update" . tablename('wlmerchant_distributor') . "SET dismoney=dismoney+{$order['twodismoney']},nowmoney=nowmoney+{$order['twodismoney']} WHERE id = {$order['twoleadid']}"); |
|||
// if($twores){ |
|||
// $leadid = pdo_getcolumn('wlmerchant_distributor',array('id'=> $order['twoleadid']),'mid'); |
|||
// $twonowmoney = pdo_getcolumn(PDO_NAME.'distributor',array('id'=> $order['twoleadid']),'nowmoney'); |
|||
// Distribution::adddisdetail($order['disorderid'],$leadid,$disorder['buymid'],1,$order['twodismoney'],$disorder['plugin'],2,'分销订单结算',$twonowmoney,$order['checkcode'],0,$order['aid']); |
|||
// } |
|||
// } |
|||
// $sdata['dissettletime'] = time(); |
|||
// } |
|||
// } |
|||
// pdo_update('wlmerchant_smallorder',$sdata,array('id' => $order['id'])); |
|||
// } |
|||
|
|||
// $merchantNo = '94734160742A3RD'; |
|||
// $terminalNo = '72002165'; |
|||
// $key = '3B3B79F217DD9705DEE9EF3C496B6134'; |
|||
// //签到接口调试 |
|||
// //退款 |
|||
// $url = 'https://wxtest2.ahrcu.com:3443/cposp/pay/refund'; |
|||
// $data['merchantNo'] = $merchantNo; |
|||
// $data['terminalNo'] = $terminalNo; |
|||
// $yun_signIn = Payment::yunSignIn($merchantNo,$terminalNo); |
|||
// $data['batchNo'] = $yun_signIn['batchNo']; |
|||
// $data['traceNo'] = $yun_signIn['traceNo']; |
|||
// $data['itpOrderId'] = '11002021072378214482'; |
|||
// $data['nonceStr'] = random(16); |
|||
// $data['refundAmount'] = 2; |
|||
// $data['mchtRefundNo'] = 'R'.rand(0,9).'2021072318584100001842462671'; |
|||
// $data['sign'] = Payment::getYunSign($data,$key); |
|||
// $data = json_encode($data); |
|||
// $res = curlPostRequest($url,$data,["Content-type: application/json;charset='utf-8'"]); |
|||
// wl_debug($res); |
|||
// |
|||
// //退款查询 |
|||
// $url = 'https://wxtest2.ahrcu.com:3443/cposp/pay/refundQuery'; |
|||
// $data['merchantNo'] = $merchantNo; |
|||
// $data['terminalNo'] = $terminalNo; |
|||
// $yun_signIn = Payment::yunSignIn($merchantNo,$terminalNo); |
|||
// $data['batchNo'] = $yun_signIn['batchNo']; |
|||
// $data['traceNo'] = $yun_signIn['traceNo']; |
|||
// $data['itpOrderId'] = '11002021072378214482'; |
|||
// $data['nonceStr'] = random(16); |
|||
// |
|||
// $data['sign'] = Payment::getYunSign($data,$key); |
|||
// $data = json_encode($data); |
|||
// $res = curlPostRequest($url,$data,["Content-type: application/json;charset='utf-8'"]); |
|||
// wl_debug($res); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
//查询零点用户数据/导入 |
|||
// $users = pdo_fetchall("SELECT session_key,user_id as zeroid,open_id as wechat_openid,nickName as nickname,avatarUrl as avatar,mobile FROM ".tablename('weliam_user')."WHERE wxapp_id = 3 ORDER BY user_id DESC limit 500"); |
|||
// foreach ($users as $rrr){ |
|||
// $rrr['isvip'] = 1; |
|||
// $rrr['createtime'] =time(); |
|||
// $rrr['dotime'] =time(); |
|||
// $rrr['tokey'] = strtoupper(MD5(sha1(time() . random(12)))); |
|||
// $rrr['uniacid'] = 1; |
|||
// $res = pdo_insert('wlmerchant_member', $rrr); |
|||
// if($res){ |
|||
// pdo_update('weliam_user',array('wxapp_id' => 300),array('user_id' => $rrr['zeroid'])); |
|||
// } |
|||
// } |
|||
|
|||
//查询零点分销数据/导入 |
|||
// $users = pdo_fetchall("SELECT user_id as zeroid,create_time as createtime,update_time as updatetime,real_name as realname FROM ".tablename('weliam_dealer_user')."WHERE wxapp_id = 3 ORDER BY user_id DESC"); |
|||
|
|||
// foreach ($users as &$us){ |
|||
// $us['uniacid'] = 1; |
|||
// $member = pdo_get('wlmerchant_member',array('zeroid' => $us['zeroid']),array('nickname','id','mobile')); |
|||
// $us['disflag'] = 1; |
|||
// $us['mid'] = $member['id']; |
|||
// $us['nickname'] = $member['nickname']; |
|||
// $us['mobile'] = $member['mobile']; |
|||
// pdo_insert('wlmerchant_distributor', $us); |
|||
// } |
|||
// wl_debug($users); |
|||
|
|||
|
|||
//插入关系表 |
|||
// $users = pdo_fetchall("SELECT dealer_id,user_id,create_time,id FROM ".tablename('weliam_dealer_referee')."WHERE wxapp_id = 3 ORDER BY user_id DESC limit 300"); |
|||
// foreach ($users as $ues){ |
|||
// $dis = pdo_getcolumn('wlmerchant_distributor',array('zeroid' => $ues['user_id']),'id'); |
|||
// wl_debug($dis); |
|||
// if($dis > 0){ |
|||
// $leadid = pdo_getcolumn('wlmerchant_member',array('zeroid' => $ues['dealer_id']),'id'); |
|||
// pdo_update('wlmerchant_distributor',array('leadid' => $leadid),array('id' => $dis)); |
|||
// }else{ |
|||
// $leadid = pdo_getcolumn('wlmerchant_member',array('zeroid' => $ues['dealer_id']),'id'); |
|||
// $member = pdo_get('wlmerchant_member',array('zeroid' => $ues['user_id']),array('mobile','nickname','realname','id',)); |
|||
// $data = [ |
|||
// 'uniacid' => 1, |
|||
// 'mid' => $member['id'], |
|||
// 'leadid' => $leadid, |
|||
// 'nickname' => $member['nickname'], |
|||
// 'realname' => $member['realname'], |
|||
// 'mobile' => $member['mobile'], |
|||
// 'createtime' => time() |
|||
// ]; |
|||
// pdo_insert('wlmerchant_distributor',$data); |
|||
// } |
|||
// pdo_update('weliam_dealer_referee',array('wxapp_id' => 300),array('id' => $ues['id'])); |
|||
// } |
|||
// wl_debug($users); |
|||
// $users = pdo_fetchall("SELECT id,nickname FROM ".tablename('wlmerchant_member')."WHERE uid = 0 ORDER BY id DESC limit 500"); |
|||
// foreach ($users as $uss){ |
|||
// $uid = Member::createUserInfo($uss['nickname']); |
|||
// pdo_update('wlmerchant_member',array('uid' => $uid),array('id' => $uss['id'])); |
|||
// } |
|||
|
|||
|
|||
|
|||
// $info = [ |
|||
// 'type' => 2 ,//支付方式 |
|||
// 'tid' => '2021042720491900009167214842' ,//订单号 |
|||
// 'transaction_id' => '4200001036202104275279675636', |
|||
// 'time' => '20210427204920', |
|||
// 'pay_order_no' => '2021042720491900009167214842', |
|||
// 'bank_type' => 'OTHERS', |
|||
// ]; |
|||
// PayResult::main($info);//调用方法处理订单 |
|||
|
|||
// $order = pdo_fetchall("SELECT * FROM ".tablename('wlmerchant_order')."WHERE orderno = 'undefined' ORDER BY id DESC"); |
|||
// foreach($order as $or){ |
|||
// $moduleid = pdo_getcolumn("modules", array('name' => 'weliam_smartcity'), 'mid'); |
|||
// $moduleid = empty($moduleid) ? '000000' : sprintf("%06d", $moduleid); |
|||
// $uniontid = date('YmdHis',$or['createtime']) . $moduleid . random(8, 1); |
|||
// pdo_update('wlmerchant_order',array('orderno' => $uniontid),array('id' => $or['id'])); |
|||
// pdo_update('wlmerchant_delivery_order',array('tid' => $uniontid),array('orderid' => $or['id'])); |
|||
// } |
|||
|
|||
// $weixin = NEW WeixinPay(); |
|||
// $res = $weixin->allocationMulti(6717,1,'',0); |
|||
// wl_debug($res); |
|||
//分销商重复数据 |
|||
// $commentSql = "select mid,count(*) as count from" . tablename(PDO_NAME . "distributor") . "group by mid having count > 1 AND mid > 0"; |
|||
// $comment = pdo_fetchall($commentSql); |
|||
// wl_debug($comment); |
|||
// foreach ($comment as $com){ |
|||
// $member = pdo_get('wlmerchant_member',array('id' => $com['mid']),array('distributorid')); |
|||
// pdo_delete('wlmerchant_distributor',array('mid'=>$com['mid'],'id !=' => $member['distributorid'],'nowmoney <'=> '0.01')); |
|||
// } |
|||
|
|||
// $commentSql = "select checkcode,count(*) as count from".tablename(PDO_NAME."autosettlement_record")."group by checkcode having count > 1 AND checkcode > 0 "; |
|||
// $comment = pdo_fetchall($commentSql); |
|||
// foreach ($comment as $com){ |
|||
// $list = pdo_fetchall("SELECT * FROM ".tablename(PDO_NAME.'autosettlement_record')."WHERE checkcode = {$com['checkcode']} ORDER BY id DESC"); |
|||
// $num = count($list) - 1; |
|||
// for ($i=0;$i<$num;$i++){ |
|||
// if($list[$i]['merchantmoney']>0){ |
|||
// pdo_fetch("update" . tablename('wlmerchant_merchantdata') . "SET allmoney=allmoney-{$list[$i]['merchantmoney']},nowmoney=nowmoney-{$list[$i]['merchantmoney']} WHERE id = {$list[$i]['merchantid']}"); |
|||
// } |
|||
// if($list[$i]['agentmoney']>0){ |
|||
// pdo_fetch("update" . tablename('wlmerchant_agentusers') . "SET allmoney=allmoney+{$list[$i]['agentmoney']},nowmoney=nowmoney+{$list[$i]['agentmoney']} WHERE id = {$list[$i]['aid']}"); |
|||
// } |
|||
// pdo_delete('wlmerchant_autosettlement_record',array('id'=>$list[$i]['id'])); |
|||
// } |
|||
// } |
|||
// $commentSql = "SELECT a.id,a.mid,a.uniacid FROM ". tablename(PDO_NAME."distributor") |
|||
// ." as a LEFT JOIN ".tablename(PDO_NAME."member") |
|||
// ." as b ON a.mid = b.id WHERE |
|||
// CASE |
|||
// WHEN a.uniacid != b.uniacid THEN 1 |
|||
// ELSE 0 |
|||
// END = 1 ORDER BY id DESC"; |
|||
// $comment = pdo_fetchall($commentSql); |
|||
// wl_debug($comment); |
|||
// foreach ($comment as $com){ |
|||
// $uniacid = pdo_getcolumn(PDO_NAME.'member',array('id'=>$com['mid']),'uniacid'); |
|||
// pdo_update(PDO_NAME."distributor",array('uniacid' => $uniacid),array('id' => $com['id'])); |
|||
// } |
|||
// set_time_limit(0); |
|||
// $times = pdo_fetchall("SELECT id,merchantid,aid FROM ".tablename('wlmerchant_timecardrecord')."WHERE createtime > 1559318400"); |
|||
// foreach ($times as $key => $time){ |
|||
// $aid = pdo_getcolumn(PDO_NAME.'merchantdata',array('id'=>$time['merchantid']),'aid'); |
|||
// if($aid!=$time['aid']){ |
|||
// pdo_update('wlmerchant_timecardrecord',array('aid' => $aid),array('id' => $time['id'])); |
|||
// } |
|||
// } |
|||
|
|||
// $success = 0; |
|||
// $current = pdo_fetchall("SELECT * FROM ".tablename('wlmerchant_current')."WHERE status = 2 AND type = 1 AND fee > 0 ORDER BY id DESC"); |
|||
// foreach ($current as $key => $curr) { |
|||
// $order = pdo_get('wlmerchant_rush_order',array('id' => $curr['orderid']),array('aid')); |
|||
// if($order['aid'] != $curr['aid']){ |
|||
// $curr['taid'] = $order['aid']; |
|||
// $res1 = pdo_update('wlmerchant_agentusers', array('allmoney -=' => $curr['fee'],'nowmoney -=' => $curr['fee']), array('id' =>$curr['aid'])); |
|||
// $res2 = pdo_update('wlmerchant_agentusers', array('allmoney +=' => $curr['fee'],'nowmoney +=' => $curr['fee']), array('id' =>$curr['taid'])); |
|||
// if($res1 && $res2){ |
|||
// $res3 = pdo_delete('wlmerchant_current',array('id'=>$curr['id'])); |
|||
// $success ++; |
|||
// } |
|||
// if($res3){ |
|||
// $nowmoney = pdo_getcolumn(PDO_NAME.'agentusers',array('id'=>$curr['taid']),'nowmoney'); |
|||
// $data = array( |
|||
// 'uniacid' => $curr['uniacid'], |
|||
// 'status' => 2, |
|||
// 'type' => 1, |
|||
// 'objid' => $curr['taid'], |
|||
// 'fee' => $curr['fee'], |
|||
// 'nowmoney' => $nowmoney, |
|||
// 'orderid' => $curr['orderid'], |
|||
// 'remark' => '错误结算到其他代理,重结算', |
|||
// 'createtime' => time(), |
|||
// 'aid' => $curr['taid'], |
|||
// ); |
|||
// pdo_insert(PDO_NAME.'current',$data); |
|||
// } |
|||
// } |
|||
// } |
|||
// wl_debug($success); |
|||
|
|||
|
|||
if (checksubmit()) { |
|||
$sql = $_POST['sql']; |
|||
pdo_run($sql); |
|||
wl_message('查询执行成功.', 'refresh'); |
|||
} |
|||
include wl_template('cloud/database'); |
|||
} |
|||
|
|||
public function data_fix() |
|||
{ |
|||
global $_W, $_GPC; |
|||
wl_debug($_GPC); |
|||
|
|||
// $fix_orders = []; |
|||
// $orders = pdo_getall('wlmerchant_smallorder', array('uniacid' => 141, 'twoleadid !=' => 0, 'status' => 1), ['orderno', 'orderid', 'oneleadid', 'twoleadid', 'checkcode']); |
|||
// foreach ($orders as $order) { |
|||
// $distor = pdo_get('wlmerchant_distributor', ['id' => $order['twoleadid']], ['leadid']); |
|||
// if ($order['oneleadid'] != $distor['leadid']) { |
|||
// $order['one'] = $distor['leadid']; |
|||
// $fix_orders[$order['orderid']][] = $order; |
|||
// } |
|||
// } |
|||
// wl_debug(['data' => $fix_orders, 'count' => count($fix_orders)]); |
|||
//Order::createSmallorder(62704,1); |
|||
} |
|||
|
|||
public function upgrade() |
|||
{ |
|||
global $_W, $_GPC; |
|||
$tables = []; |
|||
$tablenames = WeliamDb::get_tables_name('wlmerchant', $_W['config']['db']['tablepre']); |
|||
foreach ($tablenames as $tablename) { |
|||
$tableinfo = WeliamDb::get_table_schema($tablename); |
|||
$tables[] = $tableinfo; |
|||
} |
|||
wl_debug($tables); |
|||
} |
|||
|
|||
public function upgrade_file() |
|||
{ |
|||
global $_W; |
|||
$tables = []; |
|||
$tablenames = WeliamDb::get_tables_name($_W['config']['db']['tablepre'], $_W['config']['db']['tablepre']); |
|||
foreach ($tablenames as $tablename) { |
|||
$tables[] = WeliamDb::get_table_schema($tablename); |
|||
} |
|||
file_put_contents(PATH_CORE . "common/dbfile.php", base64_encode(json_encode($tables))); |
|||
if(IMS_FAMILY == 'wl'){ |
|||
$lct = 'wl'; |
|||
}else{ |
|||
$lct = 0; |
|||
} |
|||
wl_message('数据更新文件生成成功', web_url('cloud/database/datemana',['lct'=> $lct]), 'success'); |
|||
|
|||
} |
|||
|
|||
public function datemana() |
|||
{ |
|||
global $_W, $_GPC; |
|||
include wl_template('cloud/datemana'); |
|||
} |
|||
|
|||
public function areadata() |
|||
{ |
|||
global $_W, $_GPC, $GLOBALS; |
|||
if(IMS_FAMILY == 'wl'){ |
|||
$lct = 'wl'; |
|||
}else{ |
|||
$lct = 0; |
|||
} |
|||
$type = !empty($_GPC['type']) ? $_GPC['type'] : 'install'; |
|||
if ($type == 'install') { |
|||
$this->areadatainit(); |
|||
wl_message('地区数据安装成功.', web_url('cloud/database/datemana',['lct'=> $lct]), 'success'); |
|||
} |
|||
if ($type == 'clear') { |
|||
$id = pdo_getcolumn(PDO_NAME . 'area', array('id' => 110000), 'id'); |
|||
if (empty($id)) { |
|||
wl_message('不存在地区数据,无需再清除.', web_url('cloud/database/datemana',['lct'=> $lct]), 'warning'); |
|||
} |
|||
pdo_query("TRUNCATE TABLE " . tablename('wlmerchant_area') . ";"); |
|||
wl_message('地区数据清除成功.', web_url('cloud/database/datemana',['lct'=> $lct]), 'success'); |
|||
} |
|||
} |
|||
|
|||
public function areadataup() |
|||
{ |
|||
$t1 = microtime(true); |
|||
ini_set('display_errors', '1'); |
|||
error_reporting(E_ALL ^ E_NOTICE); |
|||
$this->areadatainit(); |
|||
$t2 = microtime(true); |
|||
wl_debug('执行完成,耗时' . round($t2 - $t1, 3) . '秒'); |
|||
} |
|||
|
|||
public function permission() |
|||
{ |
|||
if(IMS_FAMILY == 'wl'){ |
|||
$lct = 'wl'; |
|||
}else{ |
|||
$lct = 0; |
|||
} |
|||
$permission_file = IA_ROOT . '/web/common/permission.inc.php'; |
|||
$permission = require $permission_file; |
|||
if (!in_array('file', $permission['utility']['direct'])) { |
|||
$permission['utility']['direct'][] = 'file'; |
|||
$permission_str = var_export($permission, true); |
|||
$verdat = <<<VER |
|||
<?php |
|||
/** |
|||
* [WeEngine System] Copyright (c) 2014 WE7.CC |
|||
* WeEngine is NOT a free software, it under the license terms, visited http://www.w7.cc/ for more details. |
|||
*/ |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
\$we7_file_permission = {$permission_str}; |
|||
return \$we7_file_permission; |
|||
VER; |
|||
file_put_contents($permission_file, trim($verdat)); |
|||
} |
|||
wl_message('修复成功.', web_url('cloud/database/datemana',['lct'=> $lct]), 'success'); |
|||
} |
|||
|
|||
/** |
|||
* 迁移公众号数据 |
|||
*/ |
|||
public function movedata() |
|||
{ |
|||
global $_W, $_GPC; |
|||
if(IMS_FAMILY == 'wl'){ |
|||
$lct = 'wl'; |
|||
}else{ |
|||
$lct = 0; |
|||
} |
|||
if (checksubmit('submit')) { |
|||
$from = intval($_GPC['from']); |
|||
$to = intval($_GPC['to']); |
|||
if (empty($from) || empty($to)) { |
|||
wl_message('请填写公众号ID', referer(), 'warning'); |
|||
} |
|||
|
|||
$tablenames = pdo_fetchall("SHOW TABLES LIKE :tablename", array(":tablename" => "%wlmerchant%")); |
|||
foreach ($tablenames as $tablename) { |
|||
$table = str_replace($_W['config']['db']['tablepre'], '', end($tablename)); |
|||
pdo_update($table, array('uniacid' => $to), array('uniacid' => $from)); |
|||
} |
|||
wl_message('数据迁移成功.', web_url('cloud/database/movedata',['lct'=> $lct]), 'success'); |
|||
} |
|||
include wl_template('cloud/movedata'); |
|||
} |
|||
|
|||
public function backup() |
|||
{ |
|||
global $_W, $_GPC; |
|||
if(IMS_FAMILY == 'wl'){ |
|||
$lct = 'wl'; |
|||
}else{ |
|||
$lct = 0; |
|||
} |
|||
load()->func('db'); |
|||
if ($_GPC['status']) { |
|||
$sql = "SHOW TABLE STATUS LIKE '{$_W['config']['db']['tablepre']}wlmerchant_%'"; |
|||
$tables = pdo_fetchall($sql); |
|||
if (empty($tables)) { |
|||
itoast('数据已经备份完成', web_url('cloud/database/datemana',['lct'=> $lct]), 'success'); |
|||
} |
|||
$series = max(1, intval($_GPC['series'])); |
|||
$volume_suffix = md5(complex_authkey()); |
|||
if (!empty($_GPC['folder_suffix']) && !preg_match('/[^0-9A-Za-z-_]/', $_GPC['folder_suffix'])) { |
|||
$folder_suffix = $_GPC['folder_suffix']; |
|||
} else { |
|||
$folder_suffix = TIMESTAMP . '_' . random(8); |
|||
} |
|||
$bakdir = IA_ROOT . '/data/' . MODULE_NAME . '/backup/' . $folder_suffix; |
|||
if (trim($_GPC['start'])) { |
|||
$result = mkdirs($bakdir); |
|||
} |
|||
$size = 300; |
|||
$volumn = 1024 * 1024 * 2; |
|||
$dump = ''; |
|||
if (empty($_GPC['last_table'])) { |
|||
$last_table = ''; |
|||
$catch = true; |
|||
} else { |
|||
$last_table = $_GPC['last_table']; |
|||
$catch = false; |
|||
} |
|||
foreach ($tables as $table) { |
|||
$table = array_shift($table); |
|||
if (!empty($last_table) && $table == $last_table) { |
|||
$catch = true; |
|||
} |
|||
if (!$catch) { |
|||
continue; |
|||
} |
|||
if (!empty($dump)) { |
|||
$dump .= "\n\n"; |
|||
} |
|||
if ($table != $last_table) { |
|||
$row = db_table_schemas($table); |
|||
$dump .= $row; |
|||
} |
|||
$index = 0; |
|||
if (!empty($_GPC['index'])) { |
|||
$index = intval($_GPC['index']); |
|||
$_GPC['index'] = 0; |
|||
} |
|||
while (true) { |
|||
$start = $index * $size; |
|||
$result = WeliamDb::get_table_insert_sql($table, $_W['uniacid'], $start, $size); |
|||
if (!empty($result)) { |
|||
$dump .= $result['data']; |
|||
if (strlen($dump) > $volumn) { |
|||
$bakfile = $bakdir . "/volume-{$volume_suffix}-{$series}.sql"; |
|||
$dump .= "\n\n"; |
|||
file_put_contents($bakfile, $dump); |
|||
++$series; |
|||
++$index; |
|||
$current = array( |
|||
'last_table' => $table, |
|||
'index' => $index, |
|||
'series' => $series, |
|||
'folder_suffix' => $folder_suffix, |
|||
'status' => 1, |
|||
); |
|||
$current_series = $series - 1; |
|||
message('正在导出数据, 请不要关闭浏览器, 当前第 ' . $current_series . ' 卷.', web_url('cloud/database/backup/', $current), 'info'); |
|||
} |
|||
} |
|||
if (empty($result) || count($result['result']) < $size) { |
|||
break; |
|||
} |
|||
++$index; |
|||
} |
|||
} |
|||
$bakfile = $bakdir . "/volume-{$volume_suffix}-{$series}.sql"; |
|||
$dump .= "\n\n----Weliam MySQL Dump End"; |
|||
file_put_contents($bakfile, $dump); |
|||
itoast('数据已经备份完成', web_url('cloud/database/datemana',['lct'=> $lct]), 'success'); |
|||
} |
|||
} |
|||
|
|||
|
|||
private function areadatainit() |
|||
{ |
|||
$address = json_decode(file_get_contents(PATH_WEB . 'resource/download/aliarea.json'), true); |
|||
$locations = json_decode(file_get_contents(PATH_WEB . 'resource/download/locations.json'), true); |
|||
|
|||
foreach ($address['children'] as $province) { |
|||
$province['divisionLevel'] == 2 && $this->aliareainsert($province, $locations); |
|||
|
|||
foreach ($province['children'] as $city) { |
|||
if ($city['divisionLevel'] == 4) { |
|||
$city['divisionLevel'] = 3; |
|||
} |
|||
$this->aliareainsert($city, $locations); |
|||
if ($city['divisionCode'] != $city['divisionId'] && $city['divisionLevel'] == 3) { |
|||
$errnoarray[] = $city; |
|||
} |
|||
if (!empty($city['children'])) { |
|||
foreach ($city['children'] as $district) { |
|||
$district['divisionLevel'] == 4 && $this->aliareainsert($district, $locations); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
foreach ($errnoarray as $errcity) { |
|||
pdo_update('wlmerchant_area', array('pid' => $errcity['divisionCode']), array('pid' => $errcity['divisionId'])); |
|||
} |
|||
} |
|||
|
|||
private function aliareainsert($item, $location) |
|||
{ |
|||
$name = pdo_getcolumn('wlmerchant_area', array('id' => $item['divisionCode']), 'name'); |
|||
$data = array( |
|||
'id' => $item['divisionCode'], |
|||
'pid' => $item['parentId'] == 1 ? 0 : $item['parentId'], |
|||
'name' => $item['divisionName'], |
|||
'visible' => 2, |
|||
'level' => $item['divisionLevel'] - 1, |
|||
'lat' => $location[$item['divisionCode']]['lat'], |
|||
'lng' => $location[$item['divisionCode']]['lng'], |
|||
'pinyin' => $item['pinyin'] ? str_replace(' ', '', $item['pinyin']) : '', |
|||
'initial' => $item['pinyin'] ? strtoupper(substr($item['pinyin'], 0, 1)) : '' |
|||
); |
|||
if (empty($name)) { |
|||
pdo_insert('wlmerchant_area', $data); |
|||
} else { |
|||
pdo_update('wlmerchant_area', $data, array('id' => $item['divisionCode'])); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,111 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
class Plugin_WeliamController { |
|||
|
|||
public function index() { |
|||
global $_W, $_GPC; |
|||
if ($_W["ispost"]) { |
|||
if (!empty($_GPC["ids"])) { |
|||
$statuss = $_GPC["statuss"]; |
|||
foreach ($_GPC["ids"] as $k => $v) { |
|||
$status = 0; |
|||
if (!empty($statuss) && in_array($v, $statuss)) { |
|||
$status = 1; |
|||
} |
|||
|
|||
$data = array("title" => trim($_GPC["titles"][$k]), "ability" => trim($_GPC["abilitys"][$k]), "status" => $status, "displayorder" => intval($_GPC["displayorders"][$k])); |
|||
if (!empty($_GPC["pluginimgs"][$k])) { |
|||
$data["thumb"] = $_GPC["pluginimgs"][$k]; |
|||
} |
|||
|
|||
pdo_update("wlmerchant_plugin", $data, array("id" => intval($v))); |
|||
} |
|||
} |
|||
show_json(1, '修改成功'); |
|||
} |
|||
|
|||
App::getPlugins(3); |
|||
$condition = " where 1 "; |
|||
$type = trim($_GPC["type"]); |
|||
if (!empty($type)) { |
|||
$condition .= " and type = :type"; |
|||
$params[":type"] = $type; |
|||
} |
|||
|
|||
$keyword = trim($_GPC["keyword"]); |
|||
if (!empty($keyword)) { |
|||
$condition .= " and (name like :keyword or title like :keyword)"; |
|||
$params[":keyword"] = "%" . $keyword . "%"; |
|||
} |
|||
|
|||
$plugins = pdo_fetchall("select * from " . tablename("wlmerchant_plugin") . $condition, $params); |
|||
$types = App::getCategory(); |
|||
|
|||
include wl_template('cloud/plugin'); |
|||
} |
|||
|
|||
public function return_plugin() { |
|||
global $_W; |
|||
pdo_query("TRUNCATE TABLE " . tablename('wlmerchant_plugin') . ";"); |
|||
show_json(1, array('url' => web_url('cloud/plugin/index'))); |
|||
} |
|||
|
|||
public function account_list() { |
|||
global $_W, $_GPC; |
|||
$condition = " where 1"; |
|||
$keyword = trim($_GPC["keyword"]); |
|||
if (!empty($keyword)) { |
|||
$condition .= " and b.name like :keyword"; |
|||
$params[":keyword"] = "%" . $keyword . "%"; |
|||
} |
|||
|
|||
$pindex = max(1, intval($_GPC["page"])); |
|||
$psize = 20; |
|||
$total = pdo_fetchcolumn("select count(*) from " . tablename("wlmerchant_perm_account") . " as a left join " . tablename("account_wechats") . " as b on a.uniacid = b.uniacid " . $condition, $params); |
|||
$accounts = pdo_fetchall("select a.*, b.name from " . tablename("wlmerchant_perm_account") . " as a left join " . tablename("account_wechats") . " as b on a.uniacid = b.uniacid " . $condition . " LIMIT " . ($pindex - 1) * $psize . "," . $psize, $params); |
|||
if (!empty($accounts)) { |
|||
foreach ($accounts as &$row) { |
|||
$row["plugins"] = iunserializer($row["plugins"]); |
|||
} |
|||
} |
|||
|
|||
$pager = wl_pagination($total, $pindex, $psize); |
|||
$plugins = App::getPlugins(); |
|||
|
|||
include wl_template('cloud/account'); |
|||
} |
|||
|
|||
public function account_post() { |
|||
global $_W, $_GPC; |
|||
$uniacid = intval($_GPC["uniacid"]); |
|||
$perm = App::get_account_perm("", $uniacid); |
|||
|
|||
if ($_W["ispost"]) { |
|||
if (empty($uniacid)) { |
|||
show_json(-1, '请先选择公众号'); |
|||
} |
|||
|
|||
$data = array("uniacid" => $uniacid, "plugins" => iserializer($_GPC["plugins"])); |
|||
if (empty($perm["id"])) { |
|||
pdo_insert("wlmerchant_perm_account", $data); |
|||
} else { |
|||
pdo_update("wlmerchant_perm_account", $data, array("id" => $perm["id"])); |
|||
} |
|||
show_json(1, array('message'=>'编辑公众号权限成功','url'=>web_url("cloud/plugin/account_list", array("uniacid" => $uniacid,'lct'=> $_GPC['lct'])))); |
|||
} |
|||
|
|||
$plugins = App::getPlugins(); |
|||
$all_wechats = pdo_fetchall("select a.uniacid, b.name from " . tablename("account") . " as a left join " . tablename("account_wechats") . " as b on a.uniacid = b.uniacid WHERE a.isdeleted = 0 AND a.type = 1 "); |
|||
|
|||
include wl_template('cloud/account'); |
|||
} |
|||
|
|||
public function account_del() { |
|||
global $_W, $_GPC; |
|||
$id = intval($_GPC["id"]); |
|||
pdo_delete("wlmerchant_perm_account", array("id" => $id)); |
|||
show_json(1, '删除公众号权限成功'); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,85 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
class Wlsysset_WeliamController{ |
|||
function taskcover(){ |
|||
global $_W,$_GPC; |
|||
$sets = Cloud::wl_syssetting_read('taskcover'); |
|||
if($sets['passiveid']){ |
|||
$passiveid = unserialize($sets['passiveid']); |
|||
}else{ |
|||
$passiveid = []; |
|||
} |
|||
$settings['url'] = $_W['siteroot']."addons/".MODULE_NAME."/core/common/task.php"; |
|||
$settings['name'] = '计划任务入口'; |
|||
$lock = cache_read(MODULE_NAME.':task:status'); |
|||
if(empty($lock)){ |
|||
$lock = unserialize(pdo_getcolumn('core_cache',array('key' => MODULE_NAME.':task:status'),'value')); |
|||
} |
|||
if(empty($lock)){ |
|||
$status = 1; |
|||
}else if($lock['expire'] < (time() - 600 )){ |
|||
$status = 3; |
|||
}else{ |
|||
$status = 2; |
|||
} |
|||
$all_wechats = pdo_fetchall("select a.uniacid, b.name from " . tablename("account") . " as a left join " . tablename("account_wechats") . " as b on a.uniacid = b.uniacid WHERE a.isdeleted = 0 AND a.type = 1 "); |
|||
if (checksubmit('submit')) { |
|||
$passiveid = $_GPC['passiveid']; |
|||
if(!empty($passiveid)){ |
|||
$passiveid = serialize($passiveid); |
|||
} |
|||
$base['passiveid'] = $passiveid; |
|||
Cloud::wl_syssetting_save($base,'taskcover'); |
|||
wl_message('操作完成', 'referer', 'success'); |
|||
} |
|||
include wl_template('cloud/taskcover'); |
|||
} |
|||
|
|||
function base(){ |
|||
global $_W,$_GPC; |
|||
if(IMS_FAMILY == 'wl'){ |
|||
$lct = 'wl'; |
|||
}else{ |
|||
$lct = 0; |
|||
} |
|||
$settings = Cloud::wl_syssetting_read('base'); |
|||
if (checksubmit('submit')) { |
|||
$base = array( |
|||
'name'=>$_GPC['name'], |
|||
'logo'=>$_GPC['logo'], |
|||
'copyright'=>$_GPC['copyright'] |
|||
); |
|||
Cloud::wl_syssetting_save($base, 'base'); |
|||
wl_message('更新设置成功!', web_url('cloud/wlsysset/base',['lct'=> $lct])); |
|||
} |
|||
include wl_template('cloud/base'); |
|||
} |
|||
|
|||
function jumpadmin(){ |
|||
global $_W,$_GPC; |
|||
if(IMS_FAMILY == 'wl'){ |
|||
$lct = 'wl'; |
|||
}else{ |
|||
$lct = 0; |
|||
} |
|||
$settings = Cloud::wl_syssetting_read('jumpadmin'); |
|||
if (checksubmit('submit')) { |
|||
$base = array( |
|||
'targetDmain'=>$_GPC['targetDmain'], |
|||
'endDmain'=>$_GPC['endDmain'] |
|||
); |
|||
Cloud::wl_syssetting_save($base, 'jumpadmin'); |
|||
wl_message('更新设置成功!', web_url('cloud/wlsysset/jumpadmin',['lct'=> $lct])); |
|||
} |
|||
include wl_template('cloud/jumpadmin'); |
|||
} |
|||
|
|||
function restartqueen(){ |
|||
global $_W,$_GPC; |
|||
$queue = new Queue; |
|||
$queue -> deleteLock(); |
|||
show_json(1); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,666 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
class Datacenter_WeliamController { |
|||
|
|||
//运营分析 |
|||
public function stat_operate() { |
|||
global $_W, $_GPC; |
|||
if (!is_agent()) { |
|||
$agents = pdo_getall('wlmerchant_agentusers', array('uniacid' => $_W['uniacid']), array('id', 'agentname')); |
|||
} |
|||
$store_where = is_agent() ? array('uniacid' => $_W['uniacid'], 'aid' => $_W['aid'], 'enabled' => 1) : array('uniacid' => $_W['uniacid'], 'enabled' => 1); |
|||
$stores = pdo_getall('wlmerchant_merchantdata', $store_where, array('id', 'storename')); |
|||
|
|||
$condition = is_agent() ? "WHERE uniacid = {$_W['uniacid']} AND aid = {$_W['aid']}" : "WHERE uniacid = {$_W['uniacid']}"; |
|||
if(is_store()){ |
|||
$sid = $_W['storeid']; |
|||
$condition .= " AND sid = {$sid} "; |
|||
} |
|||
//时间 |
|||
$days = isset($_GPC['days']) ? intval($_GPC['days']) : 0; |
|||
if ($days == -1) { |
|||
$starttime = strtotime(trim($_GPC['stat_day']['start'])); |
|||
$endtime = strtotime(trim($_GPC['stat_day']['end'])); |
|||
$lenth = ceil((time() - $starttime) / 86400); |
|||
$i = ceil((time() - $endtime) / 86400); |
|||
$lenth = $lenth - $i + 1; |
|||
} else { |
|||
$todaytime = strtotime(date('Y-m-d')); |
|||
$starttime = strtotime("-{$days} days", $todaytime); |
|||
$endtime = $todaytime + 86399; |
|||
$lenth = $days + 1; |
|||
$i = 0; |
|||
} |
|||
|
|||
$selstarttime = date('Y-m-d', $starttime); |
|||
$selendtime = date('Y-m-d', $endtime); |
|||
|
|||
if (intval($_GPC['agentid']) && $_GPC['type'] == 2) { |
|||
$aid = intval($_GPC['agentid']); |
|||
if($aid == -1){ |
|||
$aid = 0; |
|||
} |
|||
$condition .= " AND aid = {$aid} "; |
|||
} |
|||
|
|||
if (intval($_GPC['sid']) && $_GPC['type'] == 1) { |
|||
$sid = intval($_GPC['sid']); |
|||
$condition .= " AND sid = {$sid} "; |
|||
} |
|||
|
|||
$daycon = $condition; |
|||
$condition .= " AND paytime > {$starttime} AND paytime < {$endtime}"; |
|||
if ($_W['isajax']) { |
|||
//营业总额 |
|||
$rushmoney = pdo_fetchcolumn('SELECT SUM(actualprice) FROM ' . tablename('wlmerchant_rush_order') . $condition); |
|||
if (empty($sid)) { |
|||
$halfmoney = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_halfcard_record') . $condition); |
|||
} else { |
|||
$halfmoney = 0; |
|||
} |
|||
$otherallmoney = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition); |
|||
$data['allmoney'] = sprintf("%.2f", $rushmoney + $otherallmoney + $halfmoney); |
|||
//支付客户数 |
|||
$rushpaymember = pdo_fetchall('SELECT distinct mid FROM ' . tablename('wlmerchant_rush_order') . $condition); |
|||
$otherpaymember = pdo_fetchall('SELECT distinct mid FROM ' . tablename('wlmerchant_order') . $condition); |
|||
if (empty($sid)) { |
|||
$halfpaymember = pdo_fetchall('SELECT distinct mid FROM ' . tablename('wlmerchant_halfcard_record') . $condition); |
|||
} else { |
|||
$halfpaymember = 0; |
|||
} |
|||
$data['paymember'] = count($rushpaymember) + count($otherpaymember) + count($halfpaymember); |
|||
//有效订单量 |
|||
$rushorder = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_rush_order') . $condition . " AND status NOT IN (0,5,6,7)"); |
|||
$otherorder = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_order') . $condition . " AND status NOT IN (0,5,6,7)"); |
|||
if (empty($sid)) { |
|||
$halforder = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_halfcard_record') . $condition . " AND status = 1"); |
|||
} else { |
|||
$halforder = 0; |
|||
} |
|||
$data['ordernum'] = $rushorder + $otherorder + $halforder; |
|||
$rushyxmoney = pdo_fetchcolumn('SELECT SUM(actualprice) FROM ' . tablename('wlmerchant_rush_order') . $condition . " AND status NOT IN (0,5,6,7)"); |
|||
$otheryxmoney = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND status NOT IN (0,5,6,7)"); |
|||
if (empty($sid)) { |
|||
$halfyxmoney = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_halfcard_record') . $condition . " AND status = 1 "); |
|||
} else { |
|||
$halfyxmoney = 0; |
|||
} |
|||
$data['orderyxmoney'] = sprintf("%.2f", $rushyxmoney + $otheryxmoney + $halfyxmoney); |
|||
//退款订单量 |
|||
$rushreorder = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_rush_order') . $condition . " AND status IN (6,7)"); |
|||
$otherreorder = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_order') . $condition . " AND status IN (6,7)"); |
|||
$data['reordernum'] = $rushreorder + $otherreorder + $halfreorder; |
|||
$rushremoney = pdo_fetchcolumn('SELECT SUM(actualprice) FROM ' . tablename('wlmerchant_rush_order') . $condition . " AND status IN (6,7)"); |
|||
$otherremoney = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND status IN (6,7)"); |
|||
$data['reordermoney'] = sprintf("%.2f", $rushremoney + $otherremoney); |
|||
|
|||
if (empty($sid)) { |
|||
//一卡通支付金额 |
|||
$data['halfmoney'] = $halfmoney; |
|||
//掌上信息 |
|||
if(p('pocket')){ |
|||
$data['pocketmoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'pocket'"); |
|||
} |
|||
//付费入驻 |
|||
$data['chargemoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'store'"); |
|||
//分销申请 |
|||
if(p('distribution')) { |
|||
$data['dismoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'distribution'"); |
|||
} |
|||
//余额充值 |
|||
$data['recmoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'member'"); |
|||
//积分兑换 |
|||
if(p('consumption')){ |
|||
$data['conmoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'consumption'"); |
|||
} |
|||
//同城名片 |
|||
if(p('citycard')){ |
|||
$data['citycardmoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'citycard'"); |
|||
} |
|||
|
|||
if ($_W['wlsetting']['distribution']['seetstatus'] && is_agent()) { |
|||
$data['allmoney'] = sprintf("%.2f", $data['allmoney'] - $data['dismoney']); |
|||
$data['dismoney'] = 0; |
|||
} |
|||
if(is_agent()){ |
|||
$data['allmoney'] = sprintf("%.2f", $data['allmoney'] - $data['conmoney']); |
|||
$data['conmoney'] = 0; |
|||
} |
|||
|
|||
} |
|||
//抢购 |
|||
$data['rushmoney'] = $rushmoney; |
|||
//拼团 |
|||
$data['fightmoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'wlfightgroup'"); |
|||
//卡券 |
|||
$data['couponmoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'coupon'"); |
|||
//团购 |
|||
$data['grouponmoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'groupon'"); |
|||
//活动 |
|||
$data['actmoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'activity'"); |
|||
//买单 |
|||
$data['onlinemoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'halfcard'"); |
|||
//砍价 |
|||
$data['bargainmoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'bargain'"); |
|||
//同城配送 |
|||
$data['citydeliverymoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'citydelivery'"); |
|||
|
|||
foreach ($data as $key => &$va) { |
|||
if (empty($va)) { |
|||
$va = 0; |
|||
} |
|||
} |
|||
die(json_encode($data)); |
|||
} |
|||
//账单 |
|||
|
|||
$list = array(); |
|||
for ($i; $i < $lenth; $i++) { |
|||
$li = array(); |
|||
$testday = date('d') - $i; |
|||
$teststa = mktime(0, 0, 0, date('m'), $testday, date('Y')); |
|||
$testend = mktime(23, 59, 59, date('m'), $testday, date('Y')); |
|||
|
|||
if (empty($sid)) { |
|||
$li['half'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_halfcard_record') . $daycon . " AND paytime > {$teststa} AND paytime < {$testend}"); |
|||
$li['chagre'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $daycon . " AND paytime > {$teststa} AND paytime < {$testend} AND plugin = 'store'"); |
|||
if(p('distribution')){ |
|||
$li['dismoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $daycon . " AND paytime > {$teststa} AND paytime < {$testend} AND plugin = 'distribution'"); |
|||
}else{ |
|||
$li['dismoney'] = 0; |
|||
} |
|||
$li['recmoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $daycon . " AND paytime > {$teststa} AND paytime < {$testend} AND plugin = 'member'"); |
|||
if(p('pocket')){ |
|||
$li['pocket'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $daycon . " AND paytime > {$teststa} AND paytime < {$testend} AND plugin = 'pocket'"); |
|||
}else{ |
|||
$li['pocket'] = 0; |
|||
} |
|||
if(p('citycard')){ |
|||
$li['citycard'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $daycon . " AND paytime > {$teststa} AND paytime < {$testend} AND plugin = 'citycard'"); |
|||
}else{ |
|||
$li['citycard'] = 0; |
|||
} |
|||
if(!is_agent() && p('consumption')){ |
|||
$li['consumption'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $daycon . " AND paytime > {$teststa} AND paytime < {$testend} AND plugin = 'consumption'"); |
|||
}else{ |
|||
$li['consumption'] = 0; |
|||
} |
|||
} |
|||
|
|||
if ($_W['wlsetting']['distribution']['seetstatus'] && is_agent() && ! is_store() ) { |
|||
$li['dismoney'] = 0; |
|||
} |
|||
|
|||
$li['rush'] = pdo_fetchcolumn('SELECT SUM(actualprice) FROM ' . tablename('wlmerchant_rush_order') . $daycon . " AND paytime > {$teststa} AND paytime < {$testend}"); |
|||
$li['fight'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $daycon . " AND paytime > {$teststa} AND paytime < {$testend} AND plugin = 'wlfightgroup'"); |
|||
$li['groupon'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $daycon . " AND paytime > {$teststa} AND paytime < {$testend} AND plugin = 'groupon'"); |
|||
$li['coupon'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $daycon . " AND paytime > {$teststa} AND paytime < {$testend} AND plugin = 'coupon'"); |
|||
$li['activity'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $daycon . " AND paytime > {$teststa} AND paytime < {$testend} AND plugin = 'activity'"); |
|||
$li['payonline'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $daycon . " AND paytime > {$teststa} AND paytime < {$testend} AND plugin = 'halfcard'"); |
|||
$li['bargain'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $daycon . " AND paytime > {$teststa} AND paytime < {$testend} AND plugin = 'bargain'"); |
|||
$li['citydelivery'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $daycon . " AND paytime > {$teststa} AND paytime < {$testend} AND plugin = 'citydelivery'"); |
|||
|
|||
//退款 |
|||
$rushre = pdo_fetchcolumn('SELECT SUM(actualprice) FROM ' . tablename('wlmerchant_rush_order') . $daycon . " AND paytime > {$teststa} AND paytime < {$testend} AND status IN (6,7)"); |
|||
$otherr = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $daycon . " AND paytime > {$teststa} AND paytime < {$testend} AND status IN (6,7)"); |
|||
$li['reordermoney'] = sprintf("%.2f", $rushre + $otherr); |
|||
//订单 |
|||
$rusho = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_rush_order') . $daycon . " AND paytime > {$teststa} AND paytime < {$testend}"); |
|||
$othero = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_order') . $daycon . " AND paytime > {$teststa} AND paytime < {$testend}"); |
|||
$halfo = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_halfcard_record') . $daycon . " AND paytime > {$teststa} AND paytime < {$testend}"); |
|||
$li['ordernum'] = $rusho + $othero + $halfo; |
|||
foreach ($li as $key => &$l) { |
|||
if (empty($l)) { |
|||
$l = 0; |
|||
} |
|||
} |
|||
$li['date'] = date('Y-m-d', $testend); |
|||
$li['allmoney'] = sprintf("%.2f", $li['consumption'] + $li['citycard'] + $li['citydelivery'] + $li['bargain'] + $li['half'] + $li['pocket'] + $li['chagre'] + $li['dismoney'] + $li['recmoney'] + $li['rush'] + $li['fight'] + $li['groupon'] + $li['coupon'] + $li['activity'] + $li['payonline']); |
|||
$list[] = $li; |
|||
} |
|||
|
|||
foreach ($list as $key => $va) { |
|||
foreach ($va as $k => $vv) { |
|||
if ($k != 'date' && $k != 'reordermoney' && $k != 'ordernum' && $k != 'allmoney') { |
|||
$imgdata = array(); |
|||
$imgdata['dates'] = $va['date']; |
|||
switch ($k) { |
|||
case 'half' : |
|||
$imgdata['name'] = '一卡通'; |
|||
break; |
|||
case 'chagre' : |
|||
$imgdata['name'] = '付费入驻'; |
|||
break; |
|||
case 'dismoney' : |
|||
$imgdata['name'] = '分销商申请'; |
|||
break; |
|||
case 'recmoney' : |
|||
$imgdata['name'] = '余额充值'; |
|||
break; |
|||
case 'consumption' : |
|||
$imgdata['name'] = '积分兑换'; |
|||
break; |
|||
case 'pocket' : |
|||
$imgdata['name'] = '掌上信息'; |
|||
break; |
|||
case 'citycard' : |
|||
$imgdata['name'] = '同城名片'; |
|||
break; |
|||
case 'rush' : |
|||
$imgdata['name'] = '抢购'; |
|||
break; |
|||
case 'fight' : |
|||
$imgdata['name'] = '拼团'; |
|||
break; |
|||
case 'groupon' : |
|||
$imgdata['name'] = '团购'; |
|||
break; |
|||
case 'coupon' : |
|||
$imgdata['name'] = '卡券'; |
|||
break; |
|||
case 'activity' : |
|||
$imgdata['name'] = '活动'; |
|||
break; |
|||
case 'payonline' : |
|||
$imgdata['name'] = '买单'; |
|||
break; |
|||
case 'bargain' : |
|||
$imgdata['name'] = '砍价'; |
|||
break; |
|||
case 'citydelivery' : |
|||
$imgdata['name'] = '同城配送'; |
|||
break; |
|||
default : |
|||
$imgdata['name'] = '未知插件'; |
|||
break; |
|||
} |
|||
$imgdata['money'] = (float)$vv; |
|||
$imgdatas[] = $imgdata; |
|||
} |
|||
} |
|||
} |
|||
|
|||
$imgdatas = json_encode($imgdatas); |
|||
|
|||
include wl_template('datacenter/stat_operate'); |
|||
} |
|||
|
|||
//店铺统计 |
|||
public function stat_store() { |
|||
global $_W, $_GPC; |
|||
$store_where = is_agent() ? array('uniacid' => $_W['uniacid'], 'aid' => $_W['aid'], 'enabled' => 1) : array('uniacid' => $_W['uniacid'], 'enabled' => 1); |
|||
$stores = pdo_getall('wlmerchant_merchantdata', $store_where, array('id', 'storename')); |
|||
|
|||
$condition = is_agent() ? "WHERE uniacid = {$_W['uniacid']} AND aid = {$_W['aid']}" : "WHERE uniacid = {$_W['uniacid']}"; |
|||
//时间 |
|||
$days = isset($_GPC['days']) ? intval($_GPC['days']) : 0; |
|||
if ($days == -1) { |
|||
$starttime = strtotime(trim($_GPC['stat_day']['start'])); |
|||
$endtime = strtotime(trim($_GPC['stat_day']['end'])); |
|||
$lenth = ceil((time() - $starttime) / 86400); |
|||
$i = ceil((time() - $endtime) / 86400); |
|||
$lenth = $lenth - $i + 1; |
|||
} else { |
|||
$todaytime = strtotime(date('Y-m-d')); |
|||
$starttime = strtotime("-{$days} days", $todaytime); |
|||
$endtime = $todaytime + 86399; |
|||
$lenth = $days + 1; |
|||
$i = 0; |
|||
} |
|||
|
|||
$selstarttime = date('Y-m-d', $starttime); |
|||
$selendtime = date('Y-m-d', $endtime); |
|||
|
|||
$condition .= " AND paytime > {$starttime} AND paytime < {$endtime}"; |
|||
|
|||
if (intval($_GPC['sid'])) { |
|||
$sid = intval($_GPC['sid']); |
|||
$condition .= " AND sid = {$sid}"; |
|||
} |
|||
|
|||
$orderby = $_GPC['orderby'] ? $_GPC['orderby'] : 'money'; |
|||
|
|||
if ($_W['isajax']) { |
|||
//总营业额 |
|||
$data['rushmoney'] = pdo_fetchcolumn('SELECT SUM(actualprice) FROM ' . tablename('wlmerchant_rush_order') . $condition); |
|||
//抢购 |
|||
$data['fightmoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'wlfightgroup' "); |
|||
$data['couponmoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'coupon' "); |
|||
$data['groupmoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'groupon' "); |
|||
$data['actmoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'activity' "); |
|||
$data['paymoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'halfcard' "); |
|||
$data['barmoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'bargain' "); |
|||
$data['citydeliverymoney'] = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'citydelivery' "); |
|||
|
|||
//订单量 |
|||
$data['rushorder'] = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_rush_order') . $condition); |
|||
$data['fightorder'] = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'wlfightgroup' "); |
|||
$data['couponorder'] = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'coupon' "); |
|||
$data['grouponorder'] = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'groupon' "); |
|||
$data['actorder'] = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'activity' "); |
|||
$data['payorder'] = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'halfcard' "); |
|||
$data['barorder'] = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'bargain' "); |
|||
$data['citydeliveryorder'] = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_order') . $condition . " AND plugin = 'citydelivery' "); |
|||
|
|||
foreach ($data as $key => &$da) { |
|||
if (empty($da)) { |
|||
$da = 0; |
|||
} |
|||
} |
|||
$data['allmoney'] = sprintf("%.2f", $data['citydeliverymoney'] + $data['rushmoney'] + $data['fightmoney'] + $data['couponmoney'] + $data['groupmoney'] + $data['actmoney'] + $data['paymoney'] + $data['barmoney']); |
|||
$data['allorder'] = $data['citydeliveryorder'] + $data['rushorder'] + $data['fightorder'] + $data['couponorder'] + $data['grouponorder'] + $data['actorder'] + $data['payorder'] + $data['barorder']; |
|||
|
|||
//趋势图和排名 |
|||
if (empty($sid)) { |
|||
$rushstores = pdo_fetchall('select distinct sid from ' . tablename(PDO_NAME . 'rush_order') . $condition); |
|||
$othertores = pdo_fetchall('select distinct sid from ' . tablename(PDO_NAME . 'order') . $condition . " AND plugin != 'store' "); |
|||
|
|||
$stores = array_merge($rushstores, $othertores); |
|||
$storeids = array(); |
|||
foreach ($stores as $key => $va) { |
|||
if ($va['sid']) { |
|||
$storeids[] = $va['sid']; |
|||
} |
|||
} |
|||
$storeids = array_unique($storeids); |
|||
|
|||
$storelist = array(); |
|||
foreach ($storeids as $key => $storeid) { |
|||
$store = array(); |
|||
$store['name'] = pdo_getcolumn(PDO_NAME . 'merchantdata', array('id' => $storeid), 'storename'); |
|||
//营业额 |
|||
$rushmoney = pdo_fetchcolumn('SELECT SUM(actualprice) FROM ' . tablename('wlmerchant_rush_order') . $condition . " AND sid = {$storeid}"); |
|||
$othermoney = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND sid = {$storeid} AND plugin != 'store' "); |
|||
$store['money'] = sprintf("%.2f", $rushmoney + $othermoney); |
|||
$store['moneyrate'] = sprintf("%.2f", $store['money'] / $data['allmoney'] * 100); |
|||
//订单量 |
|||
$rushorder = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_rush_order') . $condition . " AND sid = {$storeid}"); |
|||
$otherorder = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_order') . $condition . " AND sid = {$storeid} AND plugin != 'store' "); |
|||
$store['order'] = $rushorder + $otherorder; |
|||
$store['orderrate'] = sprintf("%.2f", $store['order'] / $data['allorder'] * 100); |
|||
$storelist[] = $store; |
|||
} |
|||
|
|||
if ($orderby == 'money') { |
|||
$storelist = Store::wl_sort($storelist, 'money', SORT_DESC, SORT_NUMERIC); |
|||
foreach ($storelist as $key => $st) { |
|||
$li = array('year' => $st['name'], '数据' => (float)$st['money']); |
|||
$list[] = $li; |
|||
} |
|||
|
|||
} else { |
|||
$storelist = Store::wl_sort($storelist, 'order', SORT_DESC, SORT_NUMERIC); |
|||
foreach ($storelist as $key => $st) { |
|||
$li = array('year' => $st['name'], '数据' => (float)$st['order']); |
|||
$list[] = $li; |
|||
} |
|||
} |
|||
$data['list'] = $list; |
|||
$data['storelist'] = $storelist; |
|||
} else { |
|||
$store = array(); |
|||
$store['name'] = pdo_getcolumn(PDO_NAME . 'merchantdata', array('id' => $sid), 'storename'); |
|||
//营业额 |
|||
$rushmoney = pdo_fetchcolumn('SELECT SUM(actualprice) FROM ' . tablename('wlmerchant_rush_order') . $condition . " AND sid = {$sid}"); |
|||
$othermoney = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . $condition . " AND sid = {$sid} AND plugin != 'store' "); |
|||
$store['money'] = sprintf("%.2f", $rushmoney + $othermoney); |
|||
$store['moneyrate'] = sprintf("%.2f", $store['money'] / $data['allmoney'] * 100); |
|||
//订单量 |
|||
$rushorder = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_rush_order') . $condition . " AND sid = {$sid}"); |
|||
$otherorder = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_order') . $condition . " AND sid = {$sid} AND plugin != 'store' "); |
|||
$store['order'] = $rushorder + $otherorder; |
|||
$store['orderrate'] = sprintf("%.2f", $store['order'] / $data['allorder'] * 100); |
|||
$storelist[] = $store; |
|||
|
|||
if ($orderby == 'money') { |
|||
$li = array('year' => $store['name'], '数据' => (float)$store['money']); |
|||
$list[] = $li; |
|||
} else { |
|||
$li = array('year' => $store['name'], '数据' => (float)$store['order']); |
|||
$list[] = $li; |
|||
} |
|||
$data['list'] = $list; |
|||
$data['storelist'] = $storelist; |
|||
} |
|||
die(json_encode($data)); |
|||
} |
|||
|
|||
include wl_template('datacenter/stat_store'); |
|||
} |
|||
|
|||
//分销统计 |
|||
public function stat_distri() { |
|||
global $_W, $_GPC; |
|||
|
|||
//统计分销商总人数 |
|||
$distributornum = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_distributor') . " WHERE uniacid = {$_W['uniacid']} AND disflag IN (-1,1) "); |
|||
//分销商人数 |
|||
$distributor = pdo_fetchall("SELECT * FROM " . tablename('wlmerchant_distributor') . "WHERE uniacid = {$_W['uniacid']} AND disflag IN (1,-1) ORDER BY id DESC"); |
|||
|
|||
|
|||
$condition = " WHERE uniacid = {$_W['uniacid']}"; |
|||
|
|||
if ($_GPC['disid']) { |
|||
$disid = $_GPC['disid']; |
|||
$condition .= " AND ( oneleadid = {$disid} or twoleadid = {$disid})"; |
|||
} |
|||
|
|||
$orderby = $_GPC['orderby'] ? $_GPC['orderby'] : 'money'; |
|||
$daycon = $condition; |
|||
//时间 |
|||
$days = isset($_GPC['days']) ? intval($_GPC['days']) : 0; |
|||
if ($days == -1) { |
|||
$starttime = strtotime(trim($_GPC['stat_day']['start'])); |
|||
$endtime = strtotime(trim($_GPC['stat_day']['end'])); |
|||
$lenth = ceil((time() - $starttime) / 86400); |
|||
$i = ceil((time() - $endtime) / 86400); |
|||
$lenth = $lenth - $i + 1; |
|||
} else { |
|||
$todaytime = strtotime(date('Y-m-d')); |
|||
$starttime = strtotime("-{$days} days", $todaytime); |
|||
$endtime = $todaytime + 86399; |
|||
$lenth = $days + 1; |
|||
$i = 0; |
|||
} |
|||
|
|||
$selstarttime = date('Y-m-d', $starttime); |
|||
$selendtime = date('Y-m-d', $endtime); |
|||
|
|||
$condition .= " AND createtime > {$starttime} AND createtime < {$endtime}"; |
|||
|
|||
if ($_W['isajax']) { |
|||
$data = array( |
|||
'disnum' => 0, 'allmoney' => 0, 'dismoney' => 0, 'rushmoney' => 0, 'rushnum' => 0, 'grouponmoney' => 0, 'grouponnum' => 0, |
|||
'fightmoney' => 0, 'fightnum' => 0, 'couponmoney' => 0, 'couponnum' => 0, 'chargemoney' => 0, 'chargenum' => 0, 'halfmoney' => 0, 'halfnum' => 0, |
|||
'distrimoney' => 0, 'distrinum' => 0, 'pocketmoney' => 0, 'pocketnum' => 0,'bargainnum' => 0,'citydeliverynum' => 0,'citycardnum' => 0,'citydeliverymoney'=>0, |
|||
'citycardmoney' => 0,'bargainmoney' => 0 |
|||
); |
|||
$disorders = pdo_fetchall('SELECT orderprice,leadmoney,plugin,oneleadid,twoleadid FROM ' . tablename('wlmerchant_disorder') . $condition); |
|||
$data['disnum'] = count($disorders); |
|||
$list = array(); |
|||
if ($disorders) { |
|||
foreach ($disorders as $key => $dis) { |
|||
$data['allmoney'] += $dis['orderprice']; |
|||
$disleadmoney = unserialize($dis['leadmoney']); |
|||
$leadmoney = $disleadmoney['one']; |
|||
if ($orderby == 'money') { |
|||
$list[$dis['oneleadid']] += $disleadmoney['one']; |
|||
} else { |
|||
$list[$dis['oneleadid']] += 1; |
|||
} |
|||
|
|||
if ($disleadmoney['two']) { |
|||
$leadmoney += $disleadmoney['two']; |
|||
if ($orderby == 'money') { |
|||
$list[$dis['twoleadid']] += $disleadmoney['two']; |
|||
} else if ($dis['twoleadid'] != $dis['oneleadid']) { |
|||
$list[$dis['twoleadid']] += 1; |
|||
} |
|||
} |
|||
$data['dismoney'] += $leadmoney; |
|||
if ($dis['plugin'] == 'rush') { |
|||
$data['rushmoney'] += $leadmoney; |
|||
$data['rushnum'] += 1; |
|||
} else if ($dis['plugin'] == 'groupon') { |
|||
$data['grouponmoney'] += $leadmoney; |
|||
$data['grouponnum'] += 1; |
|||
} else if ($dis['plugin'] == 'fightgroup') { |
|||
$data['fightmoney'] += $leadmoney; |
|||
$data['fightnum'] += 1; |
|||
} else if ($dis['plugin'] == 'coupon') { |
|||
$data['couponmoney'] += $leadmoney; |
|||
$data['couponnum'] += 1; |
|||
} else if ($dis['plugin'] == 'charge') { |
|||
$data['chargemoney'] += $leadmoney; |
|||
$data['chargenum'] += 1; |
|||
} else if ($dis['plugin'] == 'halfcard') { |
|||
$data['halfmoney'] += $leadmoney; |
|||
$data['halfnum'] += 1; |
|||
} else if ($dis['plugin'] == 'distribution') { |
|||
$data['distrimoney'] += $leadmoney; |
|||
$data['distrinum'] += 1; |
|||
} else if ($dis['plugin'] == 'pocket') { |
|||
$data['pocketmoney'] += $leadmoney; |
|||
$data['pocketnum'] += 1; |
|||
} else if ($dis['plugin'] == 'bargain') { |
|||
$data['bargainmoney'] += $leadmoney; |
|||
$data['bargainnum'] += 1; |
|||
} else if ($dis['plugin'] == 'citycard') { |
|||
$data['citycardmoney'] += $leadmoney; |
|||
$data['citycardnum'] += 1; |
|||
} else if ($dis['plugin'] == 'citydelivery') { |
|||
$data['citydeliverymoney'] += $leadmoney; |
|||
$data['citydeliverynum'] += 1; |
|||
} |
|||
} |
|||
|
|||
arsort($list); |
|||
$newlist = array(); |
|||
$ii = 1; |
|||
foreach ($list as $key => &$l) { |
|||
$nickname = pdo_getcolumn(PDO_NAME . 'distributor', array('id' => $key), 'nickname'); |
|||
if (empty($nickname) || !$nickname) { |
|||
$nickname = '未知' . $ii; |
|||
$ii++; |
|||
} |
|||
$li = array('year' => $nickname, '数据' => (float)$l); |
|||
$newlist[] = $li; |
|||
} |
|||
$newlist = array_slice($newlist, 0, 20); |
|||
} |
|||
|
|||
|
|||
$data['list'] = $newlist; |
|||
|
|||
die(json_encode($data)); |
|||
} |
|||
|
|||
//数据表 |
|||
$list = array(); |
|||
for ($i; $i < $lenth; $i++) { |
|||
$li = array( |
|||
'ordernum' => 0, 'dismoney' => 0, 'rush' => 0, 'groupon' => 0, 'fight' => 0, |
|||
'coupon' => 0, 'charge' => 0, 'half' => 0, 'distri' => 0, 'pocket' => 0, |
|||
'bargain' => 0, 'citycard' => 0, 'citydelivery' => 0 |
|||
); |
|||
$testday = date('d') - $i; |
|||
$teststa = mktime(0, 0, 0, date('m'), $testday, date('Y')); |
|||
$testend = mktime(23, 59, 59, date('m'), $testday, date('Y')); |
|||
|
|||
$disorders = pdo_fetchall('SELECT orderprice,leadmoney,plugin FROM ' . tablename('wlmerchant_disorder') . $daycon . " AND createtime > {$teststa} AND createtime < {$testend}"); |
|||
if ($disorders) { |
|||
$li['ordernum'] = count($disorders); |
|||
foreach ($disorders as $key => $dis) { |
|||
$disleadmoney = unserialize($dis['leadmoney']); |
|||
$leadmoney = $disleadmoney['one']; |
|||
if ($disleadmoney['two']) { |
|||
$leadmoney += $disleadmoney['two']; |
|||
} |
|||
$li['dismoney'] += $leadmoney; |
|||
if ($dis['plugin'] == 'rush') { |
|||
$li['rush'] += $leadmoney; |
|||
} else if ($dis['plugin'] == 'groupon') { |
|||
$li['groupon'] += $leadmoney; |
|||
} else if ($dis['plugin'] == 'fightgroup') { |
|||
$li['fight'] += $leadmoney; |
|||
} else if ($dis['plugin'] == 'coupon') { |
|||
$li['coupon'] += $leadmoney; |
|||
} else if ($dis['plugin'] == 'charge') { |
|||
$li['charge'] += $leadmoney; |
|||
} else if ($dis['plugin'] == 'halfcard') { |
|||
$li['half'] += $leadmoney; |
|||
} else if ($dis['plugin'] == 'distribution') { |
|||
$li['distri'] += $leadmoney; |
|||
} else if ($dis['plugin'] == 'pocket') { |
|||
$li['pocket'] += $leadmoney; |
|||
} else if ($dis['plugin'] == 'bargain') { |
|||
$li['bargain'] += $leadmoney; |
|||
} else if ($dis['plugin'] == 'citycard') { |
|||
$li['citycard'] += $leadmoney; |
|||
} else if ($dis['plugin'] == 'citydelivery') { |
|||
$li['citydelivery'] += $leadmoney; |
|||
} |
|||
} |
|||
} |
|||
$li['date'] = date('Y-m-d', $testend); |
|||
$list[] = $li; |
|||
} |
|||
|
|||
include wl_template('datacenter/stat_distri'); |
|||
} |
|||
|
|||
public function stat_store_card() { |
|||
global $_W, $_GPC; |
|||
$condition = is_agent() ? ['uniacid' => $_W['uniacid'], 'aid' => $_W['aid']] : ['uniacid' => $_W['uniacid']]; |
|||
//时间 |
|||
$days = isset($_GPC['days']) ? intval($_GPC['days']) : 6; |
|||
if ($days == -1) { |
|||
$starttime = strtotime(trim($_GPC['stat_day']['start'])); |
|||
$endtime = strtotime(trim($_GPC['stat_day']['end'])); |
|||
$lenth = ceil((time() - $starttime) / 86400); |
|||
$i = ceil((time() - $endtime) / 86400); |
|||
$lenth = $lenth - $i + 1; |
|||
} else { |
|||
$todaytime = strtotime(date('Y-m-d')); |
|||
$starttime = strtotime("-{$days} days", $todaytime); |
|||
$endtime = $todaytime + 86399; |
|||
$lenth = $days + 1; |
|||
$i = 0; |
|||
} |
|||
$daystext = ($days == 6) ? '近7天' : (($days == 29) ? '近30天' : date('Y-m-d', $starttime) . '-' . date('Y-m-d', $endtime)); |
|||
$where = ['createtime >' => $starttime, 'createtime <' => $endtime]; |
|||
|
|||
//代理列表增长数据 |
|||
if (!is_agent() && $_W['ispost']) { |
|||
$agents = pdo_getall('wlmerchant_agentusers', array('uniacid' => $_W['uniacid']), ['id', 'agentname']); |
|||
foreach ($agents as &$agent) { |
|||
$condition['aid'] = $agent['id']; |
|||
$adata = $this->stat_sc_get($condition, $where, 2); |
|||
$agent = array_merge($agent, $adata); |
|||
$agent['areaname'] = pdo_getcolumn('wlmerchant_area', ['id' => pdo_getcolumn('wlmerchant_oparea', ['uniacid' => $_W['uniacid'], 'aid' => $agent['id']], 'areaid')], 'name'); |
|||
unset($adata); |
|||
} |
|||
die(json_encode($agents)); |
|||
} |
|||
|
|||
$data = $this->stat_sc_get($condition, $where, 1); |
|||
|
|||
include wl_template('datacenter/stat_store_card'); |
|||
} |
|||
|
|||
private function stat_sc_get($condition, $where, $status = 1) { |
|||
$data = []; |
|||
$data['storenum'] = pdo_getcolumn('wlmerchant_merchantdata', array_merge($condition, ['enabled' => 1]), "count(id)"); |
|||
$data['cardnum'] = pdo_getcolumn('wlmerchant_halfcardmember', array_merge($condition), "count(id)"); |
|||
$data['storenew'] = pdo_getcolumn('wlmerchant_merchantdata', array_merge($condition, $where, ['enabled' => 1]), "count(id)"); |
|||
$data['cardnew'] = pdo_getcolumn('wlmerchant_halfcardmember', array_merge($condition, $where), "count(id)"); |
|||
if ($status == 1) { |
|||
$data['cardnew0'] = pdo_getcolumn('wlmerchant_halfcardmember', array_merge($condition, $where, ['from' => 0]), "count(id)"); |
|||
$data['cardnew1'] = pdo_getcolumn('wlmerchant_halfcardmember', array_merge($condition, $where, ['from' => 1]), "count(id)"); |
|||
$data['cardnew2'] = pdo_getcolumn('wlmerchant_halfcardmember', array_merge($condition, $where, ['from' => 2]), "count(id)"); |
|||
$data['cardnew3'] = pdo_getcolumn('wlmerchant_halfcardmember', array_merge($condition, $where, ['from' => 3]), "count(id)"); |
|||
} |
|||
return $data; |
|||
} |
|||
} |
|||
@ -0,0 +1,385 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
|
|||
/** |
|||
* Comment: 账单明细 |
|||
* Author: zzw |
|||
* Date: 2021/1/7 17:43 |
|||
* Class newCash_WeliamController |
|||
*/ |
|||
class FinaceBill_WeliamController { |
|||
//账单明细 |
|||
public function cashrecord() { |
|||
global $_W, $_GPC; |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$psize = 10; |
|||
$where = is_agent() ? array('uniacid' => $_W['uniacid'], 'aid' => $_W['aid']) : array('uniacid' => $_W['uniacid']); |
|||
if(is_store()){ |
|||
$where['merchantid'] = $_W['storeid']; |
|||
} |
|||
if (!empty($_GPC['keyword'])) { |
|||
if (!empty($_GPC['keywordtype'])) { |
|||
switch($_GPC['keywordtype']) { |
|||
case 1 : |
|||
$where['@orderno@'] = $_GPC['keyword']; |
|||
break; |
|||
case 2 : |
|||
$where['orderprice>'] = $_GPC['keyword']; |
|||
break; |
|||
case 3 : |
|||
$where['orderprice<'] = $_GPC['keyword']; |
|||
break; |
|||
case 4 : |
|||
$where['agentmoney>'] = $_GPC['keyword']; |
|||
break; |
|||
case 5 : |
|||
$where['agentmoney<'] = $_GPC['keyword']; |
|||
break; |
|||
default : |
|||
break; |
|||
} |
|||
if ($_GPC['keywordtype'] == 6) { |
|||
$keyword = $_GPC['keyword']; |
|||
$params[':storename'] = "%{$keyword}%"; |
|||
$stores = pdo_fetchall("SELECT * FROM " . tablename('wlmerchant_merchantdata') . "WHERE uniacid = {$_W['uniacid']} AND storename LIKE :storename", $params); |
|||
if ($stores) { |
|||
$storesids = "("; |
|||
foreach ($stores as $key => $v) { |
|||
if ($key == 0) { |
|||
$storesids .= $v['id']; |
|||
} else { |
|||
$storesids .= "," . $v['id']; |
|||
} |
|||
} |
|||
$storesids .= ")"; |
|||
$where['merchantid#'] = $storesids; |
|||
} else { |
|||
$where['merchantid#'] = "(0)"; |
|||
} |
|||
} |
|||
if ($_GPC['keywordtype'] == 7) { |
|||
$keyword = $_GPC['keyword']; |
|||
if($keyword == '总后台'){ |
|||
$where['aid'] = 0; |
|||
}else{ |
|||
$params[':agentname'] = "%{$keyword}%"; |
|||
$agents = pdo_fetchall("SELECT * FROM " . tablename('wlmerchant_agentusers') . "WHERE uniacid = {$_W['uniacid']} AND agentname LIKE :agentname", $params); |
|||
if ($agents) { |
|||
$agentids = "("; |
|||
foreach ($agents as $key => $v) { |
|||
if ($key == 0) { |
|||
$agentids .= $v['id']; |
|||
} else { |
|||
$agentids .= "," . $v['id']; |
|||
} |
|||
} |
|||
$agentids .= ")"; |
|||
$where['aid#'] = $agentids; |
|||
} else { |
|||
$where['aid'] = "-1"; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
$cashtype = trim($_GPC['cashtype']); |
|||
if (!empty($cashtype)) { |
|||
$where['type'] = $cashtype; |
|||
} |
|||
$where['type>'] = 1; |
|||
if ($_GPC['time_limit']) { |
|||
$time_limit = $_GPC['time_limit']; |
|||
$starttime = strtotime($_GPC['time_limit']['start']); |
|||
$endtime = strtotime($_GPC['time_limit']['end']); |
|||
$where['createtime>'] = $starttime; |
|||
$where['createtime<'] = $endtime; |
|||
} |
|||
|
|||
if (empty($starttime) || empty($endtime)) { |
|||
$starttime = strtotime('-1 month'); |
|||
$endtime = time()+86400; |
|||
} |
|||
|
|||
if ($_GPC['export'] != '') { |
|||
$this -> export($where); |
|||
} |
|||
$records = Util::getNumData('*', 'wlmerchant_autosettlement_record', $where, 'ID DESC', $pindex, $psize, 1); |
|||
$pager = $records[1]; |
|||
$records = $records[0]; |
|||
foreach ($records as $key => &$va) { |
|||
$va['storename'] = pdo_getcolumn(PDO_NAME . 'merchantdata', array('id' => $va['merchantid']), 'storename'); |
|||
if($va['aid'] > 0){ |
|||
$va['agentuser'] = pdo_getcolumn(PDO_NAME . 'agentusers', array('id' => $va['aid']), 'agentname'); |
|||
}else{ |
|||
$va['agentuser'] = '总后台'; |
|||
} |
|||
if (empty($va['orderno'])) { |
|||
$va['orderno'] = $va['orderid']; |
|||
} |
|||
if ($va['type'] == 1) { |
|||
$va['typename'] = '抢购'; |
|||
$va['title'] = pdo_getcolumn(PDO_NAME . 'rush_activity', array('id' => $va['goodsid']), 'name'); |
|||
$va['orderurl'] = web_url('order/wlOrder/orderdetail', array('type' => 1, 'orderid' => $va['orderid'])); |
|||
}else if($va['type'] == 10) { |
|||
$va['typename'] = '团购'; |
|||
$va['title'] = pdo_getcolumn(PDO_NAME . 'groupon_activity', array('id' => $va['goodsid']), 'name'); |
|||
$va['orderurl'] = web_url('order/wlOrder/orderdetail', array('type' => 10, 'orderid' => $va['orderid'])); |
|||
} else if ($va['type'] == 2) { |
|||
$va['typename'] = '拼团'; |
|||
$va['title'] = pdo_getcolumn(PDO_NAME . 'fightgroup_goods', array('id' => $va['goodsid']), 'name'); |
|||
$va['orderurl'] = web_url('order/wlOrder/orderdetail', array('type' => 2, 'orderid' => $va['orderid'])); |
|||
} else if ($va['type'] == 3) { |
|||
$va['typename'] = '卡券'; |
|||
$va['title'] = pdo_getcolumn(PDO_NAME . 'couponlist', array('id' => $va['goodsid']), 'title'); |
|||
$va['orderurl'] = web_url('order/wlOrder/orderdetail', array('type' => 3, 'orderid' => $va['orderid'])); |
|||
} else if ($va['type'] == 4) { |
|||
$va['typename'] = '一卡通'; |
|||
$va['title'] = pdo_getcolumn(PDO_NAME . 'halfcard_type', array('id' => $va['goodsid']), 'name'); |
|||
$va['orderurl'] = web_url('order/wlOrder/orderdetail', array('type' => 4, 'orderid' => $va['orderid'])); |
|||
} else if ($va['type'] == 5) { |
|||
$va['typename'] = '掌上信息'; |
|||
$va['title'] = '付费发帖'; |
|||
$va['orderurl'] = web_url('order/wlOrder/orderdetail', array('type' => 5, 'orderid' => $va['orderid'])); |
|||
} else if ($va['type'] == 6) { |
|||
$va['typename'] = '付费入驻'; |
|||
$va['title'] = pdo_getcolumn(PDO_NAME . 'chargelist', array('id' => $va['goodsid']), 'name'); |
|||
$va['orderurl'] = web_url('order/wlOrder/orderdetail', array('type' => 6, 'orderid' => $va['orderid'])); |
|||
} else if ($va['type'] == 7) { |
|||
if($va['merchantid']){ |
|||
if ($va['merchantmoney'] < 0) { |
|||
$va['typename'] = '提现申请'; |
|||
$va['title'] = '商户申请提现'; |
|||
} else { |
|||
$va['typename'] = '提现申请驳回'; |
|||
$va['title'] = '商户申请被驳回'; |
|||
} |
|||
}else{ |
|||
if ($va['agentmoney'] < 0) { |
|||
$va['typename'] = '提现申请'; |
|||
$va['title'] = '代理申请提现'; |
|||
} else { |
|||
$va['typename'] = '提现申请驳回'; |
|||
$va['title'] = '代理申请被驳回'; |
|||
} |
|||
} |
|||
if(is_agent()){ |
|||
$va['orderurl'] = web_url('finace/finaceWithdrawal/cashApplyAgentRecord',array('orderid' => $va['orderid'])); |
|||
}else{ |
|||
$va['orderurl'] = web_url('finace/finaceWithdrawalApply/cashApply',array('orderid' => $va['orderid'])); |
|||
} |
|||
}else if ($va['type'] == 8) { |
|||
if(Customized::init('distributionText') > 0){ |
|||
$va['typename'] = '共享股东'; |
|||
$va['title'] = '付费成为共享股东'; |
|||
}else{ |
|||
$va['typename'] = '分销合伙人'; |
|||
$va['title'] = '付费成为分销商'; |
|||
} |
|||
$va['orderurl'] = web_url('order/wlOrder/orderdetail', array('type' => 8, 'orderid' => $va['orderid'])); |
|||
}else if ($va['type'] == 9) { |
|||
$va['typename'] = '商户活动'; |
|||
$va['title'] = pdo_getcolumn(PDO_NAME.'activitylist',array('id' => $va['goodsid']),'title'); |
|||
$va['orderurl'] = web_url('order/wlOrder/orderdetail', array('type' => 9, 'orderid' => $va['orderid'])); |
|||
}else if ($va['type'] == 11) { |
|||
$va['typename'] = '在线买单'; |
|||
$va['title'] = pdo_getcolumn(PDO_NAME.'halfcardlist',array('id' => $va['goodsid']),'title'); |
|||
$va['title'] = $va['title']?$va['title']:'买家在线买单'; |
|||
$va['orderurl'] = web_url('order/wlOrder/orderdetail', array('type' => 11, 'orderid' => $va['orderid'])); |
|||
}else if ($va['type'] == 12) { |
|||
$va['typename'] = '砍价商品'; |
|||
$va['title'] = pdo_getcolumn(PDO_NAME.'bargain_activity',array('id' => $va['goodsid']),'name'); |
|||
$va['orderurl'] = web_url('order/wlOrder/orderdetail', array('type' => 12, 'orderid' => $va['orderid'])); |
|||
}else if ($va['type'] == 13) { |
|||
$va['typename'] = '同城名片'; |
|||
$fightstatus = pdo_getcolumn(PDO_NAME.'order',array('id' => $va['orderid']),'fightstatus'); |
|||
if($fightstatus == 1){ |
|||
$va['title'] = pdo_getcolumn(PDO_NAME.'citycard_meals',array('id' => $va['goodsid']),'name'); |
|||
}else{ |
|||
$va['title'] = pdo_getcolumn(PDO_NAME.'citycard_tops',array('id' => $va['goodsid']),'name'); |
|||
} |
|||
$va['orderurl'] = web_url('citycard/citycard/order_lists', array('keywordtype' => 3, 'keyword' => $va['orderno'])); |
|||
}else if ($va['type'] == 14) { |
|||
$va['typename'] = '同城配送'; |
|||
$smallorder = pdo_getall('wlmerchant_delivery_order',array('tid'=>$va['orderno']),array('gid','num','specid')); |
|||
$va['title'] = ''; |
|||
foreach ($smallorder as $ke => &$orr){ |
|||
$goods = pdo_get('wlmerchant_delivery_activity',array('id' => $orr['gid']),array('name')); |
|||
if($orr['specid']>0){ |
|||
$specname = pdo_getcolumn(PDO_NAME.'delivery_spec',array('id'=>$orr['specid']),'name'); |
|||
$goods['name'] .= '/'.$specname; |
|||
} |
|||
$va['title'] .= '['.$goods['name'].'X'.$orr['num'].']'; |
|||
} |
|||
$va['orderurl'] = web_url('order/wlOrder/orderdetail', array('type' => 14, 'orderid' => $va['orderid'])); |
|||
}else if($va['type'] == 15){ |
|||
$va['typename'] = '黄页114'; |
|||
$order = pdo_get('wlmerchant_order',array('id' => $va['orderid']),array('fightstatus')); |
|||
$yellow = pdo_get('wlmerchant_yellowpage_lists' , ['id' => $va['goodsid']],['name']); |
|||
switch ($order['fightstatus']) { |
|||
case '1': |
|||
$va['title'] = '页面['.$yellow['name'].']认领'; |
|||
break; |
|||
case '2': |
|||
$va['title'] = '页面['.$yellow['name'].']查阅'; |
|||
break; |
|||
case '3': |
|||
$va['title'] = '页面['.$yellow['name'].']入驻'; |
|||
break; |
|||
case '4': |
|||
$va['title'] = '页面['.$yellow['name'].']续费'; |
|||
break; |
|||
} |
|||
$va['orderurl'] = web_url('order/wlOrder/orderdetail', array('type' => 15, 'orderid' => $va['orderid'])); |
|||
}else if($va['type'] == 16){ |
|||
$va['typename'] = '求职招聘'; |
|||
$order = pdo_get('wlmerchant_order',array('id' => $va['orderid']),array('fightstatus')); |
|||
switch ($order['fightstatus']) { |
|||
case '1': |
|||
$va['title'] = '招聘信息发布'; |
|||
break; |
|||
case '2': |
|||
$va['title'] = '招聘信息置顶'; |
|||
break; |
|||
} |
|||
$va['orderurl'] = web_url('order/wlOrder/orderdetail', array('type' => 16, 'orderid' => $va['orderid'])); |
|||
} |
|||
|
|||
} |
|||
include wl_template('finace/cashrecord'); |
|||
} |
|||
//导出账单明细 |
|||
public function export($where) { |
|||
|
|||
if (empty($where)){ |
|||
return FALSE; |
|||
} |
|||
set_time_limit(0); |
|||
$records = Util::getNumData('*', 'wlmerchant_autosettlement_record', $where, 'ID DESC', 0, 0, 1); |
|||
$records = $records[0]; |
|||
foreach ($records as $key => &$rec) { |
|||
$rec['storename'] = pdo_getcolumn(PDO_NAME . 'merchantdata', array('id' => $rec['merchantid']), 'storename'); |
|||
if($rec['aid'] > 0){ |
|||
$rec['agentname'] = pdo_getcolumn(PDO_NAME . 'agentusers', array('id' => $rec['aid']), 'agentname'); |
|||
}else{ |
|||
$rec['agentname'] = '总后台'; |
|||
} |
|||
if (empty($rec['orderno'])) { |
|||
$rec['orderno'] = $rec['orderid']; |
|||
} |
|||
if ($rec['type'] == 1) { |
|||
$rec['typename'] = '抢购'; |
|||
$rec['title'] = pdo_getcolumn(PDO_NAME . 'rush_activity', array('id' => $rec['goodsid']), 'name'); |
|||
} else if ($rec['type'] == 2) { |
|||
$rec['typename'] = '拼团'; |
|||
$rec['title'] = pdo_getcolumn(PDO_NAME . 'fightgroup_goods', array('id' => $rec['goodsid']), 'name'); |
|||
} else if ($rec['type'] == 3) { |
|||
$rec['typename'] = '卡券'; |
|||
$rec['title'] = pdo_getcolumn(PDO_NAME . 'couponlist', array('id' => $rec['goodsid']), 'title'); |
|||
} else if ($rec['type'] == 4) { |
|||
$rec['typename'] = '一卡通'; |
|||
$rec['title'] = pdo_getcolumn(PDO_NAME . 'halfcard_type', array('id' => $rec['goodsid']), 'name'); |
|||
} else if ($rec['type'] == 5) { |
|||
$rec['typename'] = '掌上信息'; |
|||
$rec['title'] = '付费发帖'; |
|||
} else if ($rec['type'] == 6) { |
|||
$rec['typename'] = '付费入驻'; |
|||
$rec['title'] = pdo_getcolumn(PDO_NAME . 'chargelist', array('id' => $rec['goodsid']), 'name'); |
|||
} else if ($rec['type'] == 7) { |
|||
if ($rec['agentmoney'] < 0) { |
|||
$rec['typename'] = '提现申请'; |
|||
$rec['title'] = '代理申请提现'; |
|||
} else { |
|||
$rec['typename'] = '提现申请驳回'; |
|||
$rec['title'] = '代理申请被驳回'; |
|||
} |
|||
}else if ($rec['type'] == 8) { |
|||
if(Customized::init('distributionText') > 0){ |
|||
$rec['typename'] = '共享股东'; |
|||
$rec['title'] = '付费成为共享股东'; |
|||
}else{ |
|||
$rec['typename'] = '分销合伙人'; |
|||
$rec['title'] = '付费成为分销商'; |
|||
} |
|||
}else if ($rec['type'] == 9) { |
|||
$rec['typename'] = '商户活动'; |
|||
$rec['title'] = pdo_getcolumn(PDO_NAME.'activitylist',array('id' => $rec['goodsid']),'title'); |
|||
}else if($rec['type'] == 10) { |
|||
$rec['typename'] = '团购'; |
|||
$rec['title'] = pdo_getcolumn(PDO_NAME . 'groupon_activity', array('id' => $rec['goodsid']), 'name'); |
|||
} else if ($rec['type'] == 11) { |
|||
$rec['typename'] = '在线买单'; |
|||
$rec['title'] = pdo_getcolumn(PDO_NAME.'halfcardlist',array('id' => $rec['goodsid']),'title'); |
|||
$rec['title'] = $rec['title']?$rec['title']:'买家在线买单'; |
|||
}else if ($rec['type'] == 12) { |
|||
$rec['typename'] = '砍价商品'; |
|||
$rec['title'] = pdo_getcolumn(PDO_NAME.'bargain_activity',array('id' => $rec['goodsid']),'name'); |
|||
}else if ($rec['type'] == 13) { |
|||
$rec['typename'] = '同城名片'; |
|||
$fightstatus = pdo_getcolumn(PDO_NAME.'order',array('id' => $rec['orderid']),'fightstatus'); |
|||
if($fightstatus == 1){ |
|||
$rec['title'] = pdo_getcolumn(PDO_NAME.'citycard_meals',array('id' => $rec['goodsid']),'name'); |
|||
}else{ |
|||
$rec['title'] = pdo_getcolumn(PDO_NAME.'citycard_tops',array('id' => $rec['goodsid']),'name'); |
|||
} |
|||
}else if ($rec['type'] == 14) { |
|||
$rec['typename'] = '同城配送'; |
|||
$smallorder = pdo_getall('wlmerchant_delivery_order',array('tid'=>$rec['orderno']),array('gid','specid','num')); |
|||
$rec['title'] = ''; |
|||
foreach ($smallorder as $ke => &$orr){ |
|||
$goods = pdo_get('wlmerchant_delivery_activity',array('id' => $orr['gid']),array('name')); |
|||
if($orr['specid']>0){ |
|||
$specname = pdo_getcolumn(PDO_NAME.'delivery_spec',array('id'=>$orr['specid']),'name'); |
|||
$goods['name'] .= '/'.$specname; |
|||
} |
|||
$rec['title'] .= '['.$goods['name'].'X'.$orr['num'].']'; |
|||
} |
|||
} |
|||
$rec['createtime'] = date('Y-m-d H:i:s', $rec['createtime']); |
|||
$rec['title'] = str_replace(",",",",$rec['title']); |
|||
} |
|||
|
|||
/* 输入到CSV文件 */ |
|||
$html = "\xEF\xBB\xBF"; |
|||
/* 输出表头 */ |
|||
$filter['orderno'] = '订单号'; |
|||
$filter['title'] = '商品名称'; |
|||
$filter['agentname'] = '代理名称'; |
|||
$filter['storename'] = '所属商家'; |
|||
$filter['typename'] = '结算类型'; |
|||
$filter['orderprice'] = '订单金额'; |
|||
$filter['merchantmoney'] = '商户收入'; |
|||
if(Customized::init('distributionText') > 0){ |
|||
$filter['distrimoney'] = '共享股东佣金'; |
|||
}else{ |
|||
$filter['distrimoney'] = '分销佣金'; |
|||
} |
|||
if(p('salesman')) $filter['salesmoney'] = '业务员佣金'; |
|||
$filter['agentmoney'] = '代理收入'; |
|||
$filter['agentnowmoney'] = '结算后代理余额'; |
|||
$filter['createtime'] = '结算时间'; |
|||
|
|||
foreach ($filter as $key => $title) { |
|||
$html .= $title . "\t,"; |
|||
} |
|||
$html .= "\n"; |
|||
|
|||
foreach ($records as $k => $v) { |
|||
foreach ($filter as $key => $title) { |
|||
if ($key == 'orderprice' || $key == 'merchantmoney' || $key == 'agentmoney' || $key == 'agentnowmoney') { |
|||
$html .= trim($v[$key]) . trim("\t") . ","; |
|||
} else { |
|||
$html .= $v[$key] . "\t, "; |
|||
} |
|||
} |
|||
$html .= "\n"; |
|||
} |
|||
/* 输出CSV文件 */ |
|||
header("Content-type:text/csv"); |
|||
header("Content-Disposition:attachment; filename=结算记录.csv"); |
|||
echo $html; |
|||
exit(); |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,282 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
|
|||
/** |
|||
* Comment: 退款记录 |
|||
* Author: zzw |
|||
* Date: 2021/1/7 17:56 |
|||
* Class newCash_WeliamController |
|||
*/ |
|||
class FinaceRefundRecord_WeliamController { |
|||
//退款记录 |
|||
public function refundrecord(){ |
|||
global $_W,$_GPC; |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$psize = 10; |
|||
$where['uniacid'] = $_W['uniacid']; |
|||
if(is_agent()){ |
|||
$where['aid'] = $_W['aid']; |
|||
} |
|||
|
|||
//支付方式 |
|||
if($_GPC['paytype']){ |
|||
$where['paytype'] = $_GPC['paytype']; |
|||
} |
|||
//退款方式 |
|||
if($_GPC['type']){ |
|||
$where['type'] = $_GPC['type']; |
|||
} |
|||
//插件 |
|||
if($_GPC['plugin'] && $_GPC['plugin'] != 'all'){ |
|||
$where['plugin'] = $_GPC['plugin']; |
|||
} |
|||
//订单筛选 |
|||
if (!empty($_GPC['keyword'])) { |
|||
if (!empty($_GPC['keywordtype'])) { |
|||
switch($_GPC['keywordtype']) { |
|||
case 1 : |
|||
$where['@orderno@'] = $_GPC['keyword']; |
|||
break; |
|||
case 2 : |
|||
$where['@transid@'] = $_GPC['keyword']; |
|||
break; |
|||
default : |
|||
break; |
|||
} |
|||
if ($_GPC['keywordtype'] == 3) { |
|||
$keyword = $_GPC['keyword']; |
|||
$params[':name'] = "%{$keyword}%"; |
|||
$stores = pdo_fetchall("SELECT * FROM " . tablename('wlmerchant_member') . "WHERE uniacid = {$_W['uniacid']} AND nickname LIKE :name", $params); |
|||
if ($stores) { |
|||
$storesids = "("; |
|||
foreach ($stores as $key => $v) { |
|||
if ($key == 0) { |
|||
$storesids .= $v['id']; |
|||
} else { |
|||
$storesids .= "," . $v['id']; |
|||
} |
|||
} |
|||
$storesids .= ")"; |
|||
$where['mid#'] = $storesids; |
|||
} else { |
|||
$where['mid#'] = "(0)"; |
|||
} |
|||
} |
|||
if ($_GPC['keywordtype'] == 4) { |
|||
$keyword = $_GPC['keyword']; |
|||
$params[':mobile'] = "%{$keyword}%"; |
|||
$stores = pdo_fetchall("SELECT * FROM " . tablename('wlmerchant_member') . "WHERE uniacid = {$_W['uniacid']} AND mobile LIKE :mobile", $params); |
|||
if ($stores) { |
|||
$storesids = "("; |
|||
foreach ($stores as $key => $v) { |
|||
if ($key == 0) { |
|||
$storesids .= $v['id']; |
|||
} else { |
|||
$storesids .= "," . $v['id']; |
|||
} |
|||
} |
|||
$storesids .= ")"; |
|||
$where['mid#'] = $storesids; |
|||
} else { |
|||
$where['mid#'] = "(0)"; |
|||
} |
|||
} |
|||
if ($_GPC['keywordtype'] == 5) { |
|||
$keyword = $_GPC['keyword']; |
|||
$params[':storename'] = "%{$keyword}%"; |
|||
$stores = pdo_fetchall("SELECT * FROM " . tablename('wlmerchant_merchantdata') . "WHERE uniacid = {$_W['uniacid']} AND storename LIKE :storename", $params); |
|||
if ($stores) { |
|||
$storesids = "("; |
|||
foreach ($stores as $key => $v) { |
|||
if ($key == 0) { |
|||
$storesids .= $v['id']; |
|||
} else { |
|||
$storesids .= "," . $v['id']; |
|||
} |
|||
} |
|||
$storesids .= ")"; |
|||
$where['sid#'] = $storesids; |
|||
} else { |
|||
$where['sid#'] = "(0)"; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
|
|||
//时间 |
|||
if ($_GPC['time_limit']) { |
|||
$time_limit = $_GPC['time_limit']; |
|||
$starttime = strtotime($_GPC['time_limit']['start']); |
|||
$endtime = strtotime($_GPC['time_limit']['end']); |
|||
$where['createtime>'] = $starttime; |
|||
$where['createtime<'] = $endtime; |
|||
} |
|||
|
|||
if (empty($starttime) || empty($endtime)) { |
|||
$starttime = strtotime('-1 month'); |
|||
$endtime = time()+86400; |
|||
} |
|||
if ($_GPC['export'] != '') { |
|||
$this -> exportrefund($where); |
|||
} |
|||
|
|||
$records = Util::getNumData('*','wlmerchant_refund_record',$where,'createtime DESC',$pindex,$psize,1); |
|||
$pager = $records[1]; |
|||
$records = $records[0]; |
|||
foreach ($records as $key => &$re) { |
|||
$re['createtime'] = date('Y-m-d H:i:s',$re['createtime']); |
|||
$re['storename'] = pdo_getcolumn(PDO_NAME.'merchantdata',array('id'=>$re['sid']),'storename'); |
|||
$member = pdo_get('wlmerchant_member',array('id' => $re['mid']),array('avatar','nickname')); |
|||
$re['avatar'] = $member['avatar']; |
|||
$re['nickname'] = $member['nickname']; |
|||
if($re['plugin'] == 'rush'){ |
|||
$goodsid = pdo_getcolumn(PDO_NAME.'rush_order',array('id'=>$re['orderid']),'activityid'); |
|||
$re['goodsname'] = pdo_getcolumn(PDO_NAME.'rush_activity',array('id'=>$goodsid),'name'); |
|||
$re['pluginname'] = '抢购'; |
|||
}else if($re['plugin'] == 'wlfightgroup'){ |
|||
$goodsid = pdo_getcolumn(PDO_NAME.'order',array('id'=>$re['orderid']),'fkid'); |
|||
$re['goodsname'] = pdo_getcolumn(PDO_NAME.'fightgroup_goods',array('id'=>$goodsid),'name'); |
|||
$re['pluginname'] = '拼团'; |
|||
}else if($re['plugin'] == 'groupon'){ |
|||
$goodsid = pdo_getcolumn(PDO_NAME.'order',array('id'=>$re['orderid']),'fkid'); |
|||
$re['goodsname'] = pdo_getcolumn(PDO_NAME.'groupon_activity',array('id'=>$goodsid),'name'); |
|||
$re['pluginname'] = '团购'; |
|||
}else if($re['plugin'] == 'bargain'){ |
|||
$goodsid = pdo_getcolumn(PDO_NAME.'order',array('id'=>$re['orderid']),'fkid'); |
|||
$re['goodsname'] = pdo_getcolumn(PDO_NAME.'bargain_activity',array('id'=>$goodsid),'name'); |
|||
$re['pluginname'] = '砍价'; |
|||
} |
|||
switch ($re['paytype']){ |
|||
case '2': |
|||
$re['paytype'] = '微信支付'; |
|||
break; |
|||
case '1': |
|||
$re['paytype'] = '余额支付'; |
|||
break; |
|||
case '3': |
|||
$re['paytype'] = '支付宝'; |
|||
break; |
|||
case '4': |
|||
$re['paytype'] = '货到付款'; |
|||
break; |
|||
case '5': |
|||
$re['paytype'] = '小程序'; |
|||
break; |
|||
default: |
|||
$re['paytype'] = '未知方式'; |
|||
break; |
|||
} |
|||
switch ($re['type']) { |
|||
case '1': |
|||
$re['type'] = '手机端退款'; |
|||
break; |
|||
case '2': |
|||
$re['type'] = '后台退款'; |
|||
break; |
|||
case '3': |
|||
$re['type'] = '自动退款'; |
|||
break; |
|||
default: |
|||
$re['type'] = '其他'; |
|||
break; |
|||
} |
|||
} |
|||
include wl_template('finace/refundrecord'); |
|||
} |
|||
//导出退款记录 |
|||
public function exportrefund($where){ |
|||
if (empty($where)){ |
|||
return FALSE; |
|||
} |
|||
set_time_limit(0); |
|||
$records = Util::getNumData('*','wlmerchant_refund_record',$where,'createtime DESC',0,0,1); |
|||
$records = $records[0]; |
|||
foreach ($records as $key => &$re) { |
|||
$re['createtime'] = date('Y-m-d H:i:s',$re['createtime']); |
|||
$re['storename'] = pdo_getcolumn(PDO_NAME.'merchantdata',array('id'=>$re['sid']),'storename'); |
|||
$member = pdo_get('wlmerchant_member',array('id' => $re['mid']),array('nickname')); |
|||
$re['nickname'] = $member['nickname']; |
|||
$re['status'] = $re['status'] > 0 ? '成功':'失败'; |
|||
$re['orderno'] = "\t".$re['orderno']."\t"; |
|||
if($re['plugin'] == 'rush'){ |
|||
$goodsid = pdo_getcolumn(PDO_NAME.'rush_order',array('id'=>$re['orderid']),'activityid'); |
|||
$re['goodsname'] = pdo_getcolumn(PDO_NAME.'rush_activity',array('id'=>$goodsid),'name'); |
|||
$re['pluginname'] = '抢购'; |
|||
}else if($re['plugin'] == 'wlfightgroup'){ |
|||
$goodsid = pdo_getcolumn(PDO_NAME.'order',array('id'=>$re['orderid']),'fkid'); |
|||
$re['goodsname'] = pdo_getcolumn(PDO_NAME.'fightgroup_goods',array('id'=>$goodsid),'name'); |
|||
$re['pluginname'] = '拼团'; |
|||
}else if($re['plugin'] == 'groupon'){ |
|||
$goodsid = pdo_getcolumn(PDO_NAME.'order',array('id'=>$re['orderid']),'fkid'); |
|||
$re['goodsname'] = pdo_getcolumn(PDO_NAME.'groupon_activity',array('id'=>$goodsid),'name'); |
|||
$re['pluginname'] = '团购'; |
|||
}else if($re['plugin'] == 'bargain'){ |
|||
$goodsid = pdo_getcolumn(PDO_NAME.'order',array('id'=>$re['orderid']),'fkid'); |
|||
$re['goodsname'] = pdo_getcolumn(PDO_NAME.'bargain_activity',array('id'=>$goodsid),'name'); |
|||
$re['pluginname'] = '砍价'; |
|||
} |
|||
switch ($re['paytype']){ |
|||
case '2': |
|||
$re['paytype'] = '微信支付'; |
|||
break; |
|||
case '1': |
|||
$re['paytype'] = '余额支付'; |
|||
break; |
|||
case '3': |
|||
$re['paytype'] = '支付宝'; |
|||
break; |
|||
case '4': |
|||
$re['paytype'] = '货到付款'; |
|||
break; |
|||
case '5': |
|||
$re['paytype'] = '小程序'; |
|||
break; |
|||
default: |
|||
$re['paytype'] = '未知方式'; |
|||
break; |
|||
} |
|||
switch ($re['type']) { |
|||
case '1': |
|||
$re['type'] = '手机端退款'; |
|||
break; |
|||
case '2': |
|||
$re['type'] = '后台退款'; |
|||
break; |
|||
case '3': |
|||
$re['type'] = '自动退款'; |
|||
break; |
|||
default: |
|||
$re['type'] = '其他'; |
|||
break; |
|||
} |
|||
} |
|||
|
|||
/* 输出表头 */ |
|||
$filter = array( |
|||
'id' => '记录id',//U |
|||
'orderno' => '订单号',//A |
|||
'pluginname' => '所属应用',//B |
|||
'goodsname' => '商品名称',//C |
|||
'storename' => '所属商家',//F |
|||
'nickname' => '买家昵称',//G |
|||
'status' => '退款状态',//I |
|||
'paytype' => '支付方式',//J |
|||
'createtime' => '退款时间',//K |
|||
'refundfee' => '退款金额',//M |
|||
'remark' => '退款备注',//N |
|||
'type' => '退款方式',//O |
|||
'errmsg' => '退款描述'//P |
|||
); |
|||
$data = array(); |
|||
for ($i=0; $i < count($records) ; $i++) { |
|||
foreach ($filter as $key => $title) { |
|||
$data[$i][$key] = $records[$i][$key]; |
|||
} |
|||
} |
|||
util_csv::export_csv_2($data, $filter, '退款记录表.csv'); |
|||
exit(); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,574 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
|
|||
/** |
|||
* Comment: 提现申请 |
|||
* Author: zzw |
|||
* Date: 2021/1/7 18:18 |
|||
* Class FinaceWithdrawalApply_WeliamController |
|||
*/ |
|||
class FinaceWithdrawalApply_WeliamController { |
|||
//提现申请 |
|||
public function cashApply(){ |
|||
global $_W, $_GPC; |
|||
$cashsets = Setting::wlsetting_read('cashset'); |
|||
//提现申请 |
|||
if ($_GPC['type'] == 'submit' && !empty($_GPC['id'])) { |
|||
$trade_no = time().random(4, true); |
|||
pdo_update(PDO_NAME . 'settlement_record', array('status' => 3, 'updatetime' => TIMESTAMP, 'trade_no' => $trade_no), array('id' => $_GPC['id'])); |
|||
//模板消息 |
|||
$record = pdo_get(PDO_NAME.'settlement_record',array('id'=> $_GPC['id']),array('id','type','payment_type','uniacid','sapplymoney','sopenid','sid','mid')); |
|||
if($record['type'] == 3){ |
|||
$url = h5_url('pages/subPages/dealer/withdraw/withdrawrecord',['draw_id'=>$_GPC['id']]); |
|||
Distribution::distriNotice($record['mid'],$url,4,0,$record['sapplymoney']); |
|||
}else{ |
|||
if($record['type'] == 1){ |
|||
$merchant = pdo_get('wlmerchant_merchantdata' , ['id' => $record['sid']] , ['autocash']); |
|||
if ($cashsets['autocash'] && $record['payment_type'] != 3 && $merchant['autocash']) { |
|||
Queue::addTask(4 , $record['id'] , time() , $record['id']); |
|||
} |
|||
$record['mid'] = pdo_getcolumn(PDO_NAME . 'merchantuser', array('storeid' => $record['sid'],'ismain' => 1), 'mid'); |
|||
}else if($record['type'] == 2){ |
|||
if ($cashsets['agentautocash'] && $record['payment_type'] != 3) { |
|||
Queue::addTask(4 , $record['id'] , time() , $record['id']); |
|||
} |
|||
$record['mid'] = pdo_getcolumn(PDO_NAME . 'member', array('openid' => $record['sopenid']), 'id'); |
|||
}else if($record['type'] == 5){ |
|||
$set = Setting::wlsetting_read('dating_set'); |
|||
if($set['automatic_payment'] == 1){ |
|||
//开启自动打款 调用计划任务进行自动打款 |
|||
Queue::addTask(4, $record['id'] , time(), $record['id']); |
|||
} |
|||
} |
|||
$first = '您的提现申请已通过审核'; |
|||
$type = '提现申请'; |
|||
$status = '已通过审核'; |
|||
$content = '申请金额:¥'.$record['sapplymoney']; |
|||
if($record['sid']){ |
|||
$remark = '系统管理员会尽快打款,点击查看申请记录'; |
|||
$url = ''; |
|||
}else{ |
|||
$remark = '系统管理员会尽快打款'; |
|||
$url = ''; |
|||
} |
|||
News::jobNotice($record['mid'],$first,$type,$content,$status,$remark,time(),$url); |
|||
if($record['type'] == 1){ |
|||
News::addSysNotice($record['uniacid'],3,$record['sid'],0,$_GPC['id'],1); |
|||
} |
|||
} |
|||
show_json(1,'提交成功'); |
|||
} else if ($_GPC['type'] == 'reject' && !empty($_GPC['id'])) { |
|||
//返回提现金额给提现申请人 |
|||
$record = pdo_get(PDO_NAME . 'settlement_record', array('id' => $_GPC['id']), array('uniacid','sopenid','type', 'sid', 'aid', 'sapplymoney', 'id','mid')); |
|||
if ($record['type'] == 1) { |
|||
$res = Store::settlement($record['id'], 0, $record['sid'], $record['sapplymoney'], 0, $record['sapplymoney'],7,0,0,$record['aid']); |
|||
$status = -1; |
|||
} else if ($record['type'] == 2) { |
|||
$res = Store::settlement($record['id'], 0, 0, $record['sapplymoney'], 0, 0,7,0,0,$record['aid']); |
|||
$status = -1; |
|||
}else if($record['type'] == 3){ |
|||
$nowmoney = pdo_getcolumn(PDO_NAME."distributor",array('mid'=>$record['mid']),'nowmoney'); |
|||
$totalNowMonet = $nowmoney+$record['sapplymoney']; |
|||
$res = pdo_update(PDO_NAME."distributor",array('nowmoney'=>$totalNowMonet),array('mid'=>$record['mid'])); |
|||
if(Customized::init('distributionText') > 0){ |
|||
$Cremark = '共享股东佣金提现申请驳回'; |
|||
}else{ |
|||
$Cremark = '分销佣金提现申请驳回'; |
|||
} |
|||
Distribution::adddisdetail($record['id'],$record['mid'],$record['mid'], 1, $record['sapplymoney'], 'cash', 1, $Cremark, $totalNowMonet); |
|||
$status = 11; |
|||
} else if ($record['type'] == 4) { |
|||
$res = Member::credit_update_credit2($record['mid'],$record['sapplymoney'],'用户提现被驳回',$record['id']); |
|||
$status = -1; |
|||
}else if($record['type'] == 5){ |
|||
$commission = pdo_getcolumn(PDO_NAME."dating_matchmaker",['mid' => $record['mid'],'uniacid' => $_W['uniacid']],'commission'); |
|||
$totalCommission = sprintf("%.2f",$commission + $record['sapplymoney']); |
|||
pdo_update(PDO_NAME."dating_matchmaker",['commission' => $totalCommission],['mid' => $record['mid']]); |
|||
Dating::commissionChangeRecord($record['mid'],$record['sapplymoney'],'提现申请被驳回',1); |
|||
$status = 17; |
|||
} |
|||
pdo_update(PDO_NAME . 'settlement_record', array('status' => $status, 'updatetime' => TIMESTAMP), array('id' => $_GPC['id'])); |
|||
//模板消息 |
|||
if($record['type'] == 3){ |
|||
$url = h5_url('pages/subPages/dealer/withdraw/withdrawrecord',['draw_id'=>$_GPC['id']]); |
|||
Distribution::distriNotice($record['mid'],$url,5,0,$record['sapplymoney']); |
|||
}else { |
|||
$first = '您的提现申请已被驳回'; |
|||
$type = '提现申请'; |
|||
$status = '申请被驳回'; |
|||
$content = '申请金额:¥' . $record['sapplymoney']; |
|||
if ($record['sid']) { |
|||
$remark = '您可以重新提交申请,点击查看申请记录'; |
|||
} else { |
|||
$remark = '您可以在后台重新提交申请'; |
|||
} |
|||
News::jobNotice($record['mid'], $first, $type, $content, $status, $remark, time()); |
|||
if ($record['type'] == 1) { |
|||
News::addSysNotice($record['uniacid'], 3, $record['sid'], 0, $_GPC['id'], 2); |
|||
} |
|||
} |
|||
show_json(1,'驳回成功'); |
|||
} else { |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$psize = 10; |
|||
$where = array('uniacid' => $_W['uniacid']); |
|||
if (!empty($_GPC['status'])) { |
|||
switch ($_GPC['status']){ |
|||
case 1:break;//不限 |
|||
case 2:$where['status'] = array(2,6,7,15);break;//待审核 |
|||
case 3:$where['status'] = array(3,8,16);break;//待打款 |
|||
case 4:$where['status'] = array(4,5,9,18);break;//已完成 |
|||
case 5:$where['status'] = array(-1,10,11,17);break;//未通过 |
|||
} |
|||
} |
|||
if (!empty($_GPC['type'])) { |
|||
$where['type'] = intval($_GPC['type']); |
|||
} |
|||
if(!empty($_GPC['orderid'])){ |
|||
$where['id'] = intval($_GPC['orderid']); |
|||
} |
|||
if($_GPC['type'] == 3 && !empty($_GPC['disid'])){ |
|||
$where['disid'] = intval($_GPC['disid']); |
|||
} |
|||
|
|||
//时间 |
|||
if (!empty($_GPC['time'])){ |
|||
$starttime = strtotime($_GPC['time']['start']); |
|||
$endtime = strtotime($_GPC['time']['end']); |
|||
$where['applytime >'] = $starttime; |
|||
$where['applytime <'] = $endtime+86400; |
|||
} |
|||
|
|||
if (empty($starttime) || empty($endtime)) { |
|||
$starttime = strtotime('-1 month'); |
|||
$endtime = time(); |
|||
} |
|||
|
|||
//如果是导出记录则查询所有信息 |
|||
if($_GPC['export']){ |
|||
$list = pdo_getslice(PDO_NAME . 'settlement_record', $where, '', $total, array(), '', 'id DESC'); |
|||
}else{ |
|||
$list = pdo_getslice(PDO_NAME . 'settlement_record', $where, array($pindex, $psize), $total, array(), '', 'id DESC'); |
|||
} |
|||
foreach ($list as $key => &$relue) { |
|||
$relue['spercent'] = sprintf("%.2f", $relue['spercent']); |
|||
//获取提现人基本信息 |
|||
if ($relue['type'] == 1) { |
|||
//获取商户收款账号信息 |
|||
$accountInfo = Store::getShopOwnerInfo($relue['sid'],$relue['aid']); |
|||
$relue['name'] = Util::idSwitch('sid', 'sName', $relue['sid']); |
|||
$relue['currurl'] = web_url('finace/newCash/currentlist',array('type'=>'store','objid'=>$relue['sid'])); |
|||
} else if ($relue['type'] == 2) { |
|||
//获取代理商收款账号信息 |
|||
$accountInfo = pdo_get(PDO_NAME."agentusers",array('id'=>$relue['aid'],'uniacid'=>$_W['uniacid']),array('alipay','bank_name','card_number','bank_username')); |
|||
$relue['name'] = Util::idSwitch('aid', 'aName', $relue['aid']); |
|||
$relue['currurl'] = web_url('finace/newCash/currentlist',array('type'=>'agent','objid'=>$relue['aid'])); |
|||
}else if($relue['type'] == 3){ |
|||
//获取分销商收款账号信息 |
|||
$accountInfo = pdo_get(PDO_NAME."member",array('id'=>$relue['mid'],'uniacid'=>$_W['uniacid']),array('alipay','bank_name','card_number','nickname','bank_username')); |
|||
$relue['name'] = $accountInfo['nickname']; |
|||
$relue['currurl'] = web_url('distribution/dissysbase/disdetail',array('keywordtype'=>'1','keyword'=>$relue['mid'])); |
|||
}else if($relue['type'] == 4){ |
|||
//获取用户提现收款账号信息 |
|||
$accountInfo = pdo_get(PDO_NAME."member",array('id'=>$relue['mid'],'uniacid'=>$_W['uniacid']),array('alipay','bank_name','card_number','nickname','bank_username')); |
|||
$relue['name'] = $accountInfo['nickname']; |
|||
$relue['currurl'] = web_url('member/memberFinancialDetails/balance',array('keywordtype'=>'1','keyword'=>$relue['mid'])); |
|||
}else if($relue['type'] == 5){ |
|||
//获取用户提现收款账号信息 |
|||
$accountInfo = pdo_get(PDO_NAME."member",['id'=> $relue['mid'],'uniacid' => $_W['uniacid']],['alipay','bank_name','card_number','nickname','bank_username']); |
|||
$relue['name'] = $accountInfo['nickname']; |
|||
$relue['currurl'] = 'javascript:;'; |
|||
} |
|||
//获取商家的支付宝 银行卡信息 |
|||
if($relue['payment_type'] == 1 || $relue['payment_type'] == 3 || $relue['payment_type'] == 5) { |
|||
if($accountInfo){ |
|||
$relue['alipay'] = $accountInfo['alipay']; |
|||
$relue['bank_name'] = $accountInfo['bank_name']; |
|||
$relue['card_number'] = $accountInfo['card_number']; |
|||
$relue['bank_username'] = $accountInfo['bank_username']; |
|||
} |
|||
} |
|||
//如果是导出操作 需要进行数据的重新组装 |
|||
if($_GPC['export']){ |
|||
$data[$key]['name'] = $relue['name'];//提现人信息 |
|||
$data[$key]['sapplymoney'] = $relue['sapplymoney'];//申请提现金额 |
|||
$data[$key]['spercentmoney'] = $relue['spercentmoney'];//手续费 |
|||
$data[$key]['sgetmoney'] = $relue['sgetmoney'];//实际到账金额 |
|||
$data[$key]['applytime'] = date("Y-m-d H:i:s",$relue['applytime']);//申请时间 |
|||
$data[$key]['updatetime'] = $relue['updatetime']?date("Y-m-d H:i:s",$relue['updatetime']):'';//操作时间 |
|||
|
|||
//获取打款状态 |
|||
switch ($relue['status']){ |
|||
case 1:$statueRes = '审核中';break; |
|||
case 2:case 6:case 7:$statueRes = '待审核';break; |
|||
case 3:case 8:$statueRes = '待打款';break; |
|||
case 4:case 5:case 9:$statueRes = '提现成功';break; |
|||
case -1:case 10:case 11:$statueRes = '驳回申请';break; |
|||
} |
|||
$data[$key]['status'] = $statueRes; |
|||
//获取提现类型 |
|||
switch ($relue['type']){ |
|||
case 1:$typeRes = '商家提现';break; |
|||
case 2:$typeRes = '代理提现';break; |
|||
case 3: |
|||
if(Customized::init('distributionText') > 0){ |
|||
$typeRes = '共享股东提现'; |
|||
}else{ |
|||
$typeRes = '分销提现'; |
|||
} |
|||
break; |
|||
} |
|||
$data[$key]['type'] = $typeRes;//提现类型 |
|||
//获取提现方式 |
|||
switch ($relue['payment_type']){ |
|||
case 1:$paymentTypeRes = '支付宝';break; |
|||
case 2:$paymentTypeRes = '微信';break; |
|||
case 3:$paymentTypeRes = '银行卡';break; |
|||
case 4:$paymentTypeRes = '余额';break; |
|||
case 5:$paymentTypeRes = '任意';break; |
|||
default:$paymentTypeRes = '微信';break; |
|||
} |
|||
$data[$key]['payment_type'] = $paymentTypeRes;//提现类型 |
|||
//获取到账类型 |
|||
switch ($relue['settletype']){ |
|||
case 1:case 3:$settleTypeRes = '手动处理';break; |
|||
case 2:$settleTypeRes = '微信零钱';break; |
|||
case 4:$settleTypeRes = '余额到账';break; |
|||
case 5:$settleTypeRes = '微信红包';break; |
|||
case 6:$settleTypeRes = '支付宝打款';break; |
|||
default:$settleTypeRes = '未打款';break; |
|||
} |
|||
$data[$key]['settletype'] = $settleTypeRes;//到账类型 |
|||
$data[$key]['alipay'] = $relue['alipay']; |
|||
$data[$key]['bank_name'] = $relue['bank_name']; |
|||
$data[$key]['card_number'] = "\t".$relue['card_number']."\t"; |
|||
$data[$key]['bank_username'] = $relue['bank_username']; |
|||
} |
|||
} |
|||
//进行导出操作 |
|||
if($_GPC['export']){ |
|||
//设置表格的标题信息 |
|||
$titleInfo = array( |
|||
'name' => '提现人信息', |
|||
'sapplymoney' => '申请提现金额', |
|||
'spercentmoney' => '手续费', |
|||
'sgetmoney' => '实际到账金额', |
|||
'applytime' => '申请时间', |
|||
'updatetime' => '操作时间', |
|||
'status' => '打款状态', |
|||
'type' => '提现类型', |
|||
'payment_type' => '提现方式', |
|||
'settletype' => '到账类型', |
|||
'alipay' => '支付宝账号', |
|||
'bank_name' => '开户行名字', |
|||
'card_number' => '银行卡号', |
|||
'bank_username' => '开户人姓名' |
|||
); |
|||
//开始导出.cvs文件 |
|||
util_csv::export_csv_2($data, $titleInfo, '提现申请信息.csv'); |
|||
exit(); |
|||
} |
|||
$pager = wl_pagination($total, $pindex, $psize); |
|||
} |
|||
|
|||
include wl_template('finace/cashConfirm'); |
|||
} |
|||
//导出记录 |
|||
public function output() { |
|||
global $_W, $_GPC; |
|||
|
|||
$where['id'] = $_GPC['id']; |
|||
$settlementRecord = Util::getSingelData('*', PDO_NAME . 'settlement_record', $where); |
|||
$orders = unserialize($settlementRecord['ids']); |
|||
$list = array(); |
|||
if ($settlementRecord['type'] == 1) { |
|||
foreach ($orders as $id) { |
|||
if ($settlementRecord['type2'] == 1) { |
|||
$v = Util::getSingelData('*', PDO_NAME . 'order', array('id' => $id)); |
|||
$coupon = pdo_get('wlmerchant_couponlist', array('id' => $v['fkid']), array('title', 'logo')); |
|||
$merchant = pdo_get('wlmerchant_merchantdata', array('id' => $v['sid']), array('storename')); |
|||
$member = Member::wl_member_get($v['mid'], array('nickname', 'avatar', 'mobile')); |
|||
$v['title'] = $coupon['title']; |
|||
$v['gimg'] = tomedia($coupon['logo']); |
|||
$v['storename'] = $merchant['storename']; |
|||
$v['nickname'] = $member['nickname']; |
|||
$v['headimg'] = $member['avatar']; |
|||
$v['mobile'] = $member['mobile']; |
|||
$v['actualprice'] = $v['price']; |
|||
$v['gname'] = $v['title']; |
|||
$list[] = $v; |
|||
} else { |
|||
$list[] = Rush::getSingleOrder($id, "*"); |
|||
} |
|||
} |
|||
} |
|||
if ($settlementRecord['type'] == 2) { |
|||
foreach ($orders as $id) { |
|||
$order = Util::getSingelData("*", PDO_NAME . 'vip_record', array('id' => $id)); |
|||
$member = Member::wl_member_get($order['mid']); |
|||
$order['nickname'] = $member['nickname']; |
|||
$order['actualprice'] = $order['price']; |
|||
$order['mobile'] = $member['mobile']; |
|||
$order['gname'] = 'VIP充值'; |
|||
$list[] = $order; |
|||
} |
|||
} |
|||
if ($settlementRecord['type'] == 3) { |
|||
foreach ($orders as $id) { |
|||
$order = Util::getSingelData("*", PDO_NAME . 'halfcard_record', array('id' => $id)); |
|||
$member = Member::wl_member_get($order['mid']); |
|||
$order['nickname'] = $member['nickname']; |
|||
$order['actualprice'] = $order['price']; |
|||
$order['mobile'] = $member['mobile']; |
|||
$order['gname'] = '一卡通充值'; |
|||
$list[] = $order; |
|||
} |
|||
} |
|||
$orders = $list; |
|||
if ($settlementRecord['status'] == 1) |
|||
$settleStatus = '代理审核中'; |
|||
if ($settlementRecord['status'] == 2) |
|||
$settleStatus = '系统审核中'; |
|||
if ($settlementRecord['status'] == 3) |
|||
$settleStatus = '系统审核通过,待结算'; |
|||
if ($settlementRecord['status'] == 4) |
|||
$settleStatus = '已结算到代理'; |
|||
if ($settlementRecord['status'] == 5) |
|||
$settleStatus = '已结算到商家'; |
|||
if ($settlementRecord['status'] == -1) |
|||
$settleStatus = '系统审核不通过'; |
|||
if ($settlementRecord['status'] == -2) |
|||
$settleStatus = '代理审核不通过'; |
|||
$html = "\xEF\xBB\xBF"; |
|||
$filter = array('aa' => '商户单号', 'bb' => '昵称', 'cc' => '电话', 'dd' => '支付金额', 'ee' => '订单状态', 'jj' => '结算状态', 'ff' => '支付时间', 'gg' => '商品名称', 'hh' => '微信订单号'); |
|||
foreach ($filter as $key => $title) { |
|||
$html .= $title . "\t,"; |
|||
} |
|||
$html .= "\n"; |
|||
foreach ($orders as $k => $v) { |
|||
if ($v['status'] == '0') |
|||
$thisstatus = '未支付'; |
|||
if ($v['status'] == '1') |
|||
$thisstatus = '已支付'; |
|||
if ($v['status'] == '2') |
|||
$thisstatus = '已消费'; |
|||
$time = date('Y-m-d H:i:s', $v['paytime']); |
|||
$orders[$k]['aa'] = $v['orderno']; |
|||
$orders[$k]['bb'] = $v['nickname']; |
|||
$orders[$k]['cc'] = $v['mobile']; |
|||
$orders[$k]['dd'] = $v['actualprice']; |
|||
$orders[$k]['ee'] = $thisstatus; |
|||
$orders[$k]['jj'] = $settleStatus; |
|||
$orders[$k]['ff'] = $time; |
|||
$orders[$k]['gg'] = $v['gname']; |
|||
$orders[$k]['hh'] = $v['transid']; |
|||
foreach ($filter as $key => $title) { |
|||
$html .= $orders[$k][$key] . "\t,"; |
|||
} |
|||
$html .= "\n"; |
|||
} |
|||
$str = '未结算订单_' . time(); |
|||
header("Content-type:text/csv"); |
|||
header("Content-Disposition:attachment; filename={$str}.csv"); |
|||
echo $html; |
|||
exit(); |
|||
|
|||
} |
|||
/** |
|||
* Comment: 打款操作 |
|||
* Author: zzw |
|||
* Date: 2019/10/9 17:42 |
|||
*/ |
|||
public function settlementing(){ |
|||
global $_W, $_GPC; |
|||
#1、获取基本参数 |
|||
$id = $_GPC['id'] OR show_json(0,'id错误,请刷新重试!'); |
|||
$type = $_GPC['type'] OR wl_message(0,'打款类型错误,请刷新重试!');//1=手动处理;2=微信打款;3=分销商提现(手动处理);4=分销商提现(余额到账);5=红包打款;6=支付宝转账 |
|||
$phone = $_GPC['phone'];//支付宝提现手机号信息 |
|||
$info = pdo_get(PDO_NAME . "settlement_record" , [ 'id' => $id ] |
|||
, [ 'type' , 'status' ,'uniacid','sgetmoney' , 'spercent' , 'sapplymoney','spercentmoney','sopenid','sid','aid','mid','trade_no','source']); |
|||
#2、先判断是否已结算 |
|||
if($info['status'] != 3 && $info['status'] != 8 && $info['status'] != 16) show_json(0,'该申请未审核或已打款'); |
|||
#2、结算金额计算,判断提现申请金额是否合法 |
|||
$sgetmoney = sprintf("%.2f" , $info['sgetmoney']);//实际结算给商户 |
|||
$spercent = sprintf("%.2f" , $info['spercent']); //佣金百分比 |
|||
$spercentmoney = sprintf("%.2f" , $info['spercentmoney']);//佣金 |
|||
if($sgetmoney <= 0 || !is_numeric($sgetmoney)) show_json(0,'结算金额错误'); |
|||
#3、生成基本数据信息 1=商家提现申请;2=代理提现申请;3=分销商申请提现;4=用户余额提现 |
|||
$data = [ |
|||
'updatetime' => TIMESTAMP ,//最后操作时间 |
|||
'sgetmoney' => $sgetmoney ,//实际得到金额 |
|||
'spercent' => $spercent ,//系统抽成比例 |
|||
'spercentmoney' => $spercentmoney ,//系统抽成金额 |
|||
]; |
|||
switch ($info['type']){ |
|||
case 1: |
|||
$userName = pdo_getcolumn(PDO_NAME."merchantdata",['id'=>$info['sid']],'storename'); |
|||
$rem = '商家提现:'.$userName; |
|||
$data['status'] = 5; |
|||
$info['mid'] = pdo_getcolumn(PDO_NAME . 'merchantuser', array('storeid' => $info['sid'],'ismain' => 1), 'mid'); |
|||
break;//商家提现申请 |
|||
case 2: |
|||
$userName = pdo_getcolumn(PDO_NAME."agentusers",['id'=>$info['aid']],'agentname'); |
|||
$rem = '代理商提现:'.$userName; |
|||
$data['status'] = 4; |
|||
$info['mid'] = pdo_getcolumn(PDO_NAME . 'member', array('openid' => $info['sopenid']), 'id'); |
|||
break;//代理提现申请 |
|||
case 3: |
|||
$userName = pdo_getcolumn(PDO_NAME."distributor",['mid'=>$info['mid']],'nickname'); |
|||
if(Customized::init('distributionText') > 0){ |
|||
$rem = '共享股东提现:'.$userName; |
|||
}else{ |
|||
$rem = '分销商提现:'.$userName; |
|||
} |
|||
$data['status'] = 9; |
|||
break;//分销商申请提现 |
|||
case 4: |
|||
$userName = pdo_getcolumn(PDO_NAME."member",['id'=>$info['mid']],'nickname'); |
|||
$rem = '用户提现:'.$userName; |
|||
$data['status'] = 5; |
|||
break;//用户余额提现 |
|||
case 5: |
|||
$userName = pdo_getcolumn(PDO_NAME."member",['id'=>$info['mid']],'nickname'); |
|||
$rem = '红娘提现:'.$userName; |
|||
$data['status'] = 18; |
|||
break;//红娘提现 |
|||
} |
|||
#3、根据结算类型进行打款结算 微信提现/手动处理/微信红包 |
|||
switch ($type){ |
|||
case 1:case 3: |
|||
$data['settletype'] = 1; |
|||
$res = 1;//手动处理直接成功 |
|||
$cashtype = '手动处理'; |
|||
break;//手动处理 |
|||
case 2: |
|||
if ($sgetmoney < 1) show_json(0,'实际到账金额需要大于1元'); |
|||
$cashtype = '微信零钱'; |
|||
if (empty($info['sopenid'])) { |
|||
if($info['type'] == 2){ |
|||
$info['sopenid'] = pdo_getcolumn(PDO_NAME . 'agentusers', array('id' => $info['aid']), 'cashopenid'); |
|||
}else if($info['type'] == 1){ |
|||
$mid = pdo_getcolumn(PDO_NAME . 'merchantuser', array('storeid' => $info['sid'],'ismain' => 1), 'mid'); |
|||
if($info['source'] == 3){ |
|||
$info['sopenid'] = pdo_getcolumn(PDO_NAME . 'member', array('id' => $mid), 'wechat_openid'); |
|||
if (empty($info['sopenid'])){ |
|||
$info['sopenid'] = pdo_getcolumn(PDO_NAME . 'member', array('id' => $mid), 'openid'); |
|||
} |
|||
}else{ |
|||
$info['sopenid'] = pdo_getcolumn(PDO_NAME . 'member', array('id' => $mid), 'openid'); |
|||
if (empty($info['sopenid'])){ |
|||
$info['sopenid'] = pdo_getcolumn(PDO_NAME . 'member', array('id' => $mid), 'wechat_openid'); |
|||
} |
|||
} |
|||
}else if($info['type'] == 3){ |
|||
if($info['source'] == 3){ |
|||
$info['sopenid'] = pdo_getcolumn(PDO_NAME . 'member', array('id' => $info['mid']), 'wechat_openid'); |
|||
if (empty($info['sopenid'])){ |
|||
$info['sopenid'] = pdo_getcolumn(PDO_NAME . 'member', array('id' => $info['mid']), 'openid'); |
|||
} |
|||
}else{ |
|||
$info['sopenid'] = pdo_getcolumn(PDO_NAME . 'member', array('id' => $info['mid']), 'openid'); |
|||
if (empty($info['sopenid'])){ |
|||
$info['sopenid'] = pdo_getcolumn(PDO_NAME . 'member', array('id' => $info['mid']), 'wechat_openid'); |
|||
} |
|||
} |
|||
}else if($info['type'] == 4){ |
|||
if($info['source'] == 3){ |
|||
$info['sopenid'] = pdo_getcolumn(PDO_NAME . 'member', array('id' => $info['mid']), 'wechat_openid'); |
|||
if (empty($info['sopenid'])){ |
|||
$info['sopenid'] = pdo_getcolumn(PDO_NAME . 'member', array('id' => $info['mid']), 'openid'); |
|||
} |
|||
}else{ |
|||
$info['sopenid'] = pdo_getcolumn(PDO_NAME . 'member', array('id' => $info['mid']), 'openid'); |
|||
if (empty($info['sopenid'])){ |
|||
$info['sopenid'] = pdo_getcolumn(PDO_NAME . 'member', array('id' => $info['mid']), 'wechat_openid'); |
|||
} |
|||
} |
|||
} |
|||
if (empty($info['sopenid'])) { |
|||
show_json(0,'该用户未绑定提现微信号'); |
|||
} |
|||
} |
|||
$data['settletype'] = 2; |
|||
//请求进行微信打款操作 |
|||
$params = [ |
|||
'openid' => $info['sopenid'] , |
|||
'money' => $sgetmoney , |
|||
'rem' => $rem , |
|||
'name' => 'weliam' , |
|||
'order_no' => $info['trade_no'], |
|||
'source' => $info['source'] ? : 1, |
|||
'mid' => $info['mid'] |
|||
]; |
|||
$res = Payment::presentationInit($params,1); |
|||
if(!$res) $tips = '微信打款失败,请保证微信商户号余额充足并且开通企业付款功能'; |
|||
break;//微信打款 |
|||
case 4: |
|||
//打款到余额 仅分销商可以申请打款到余额 |
|||
$data['settletype'] = 4; |
|||
$cashtype = '余额到账'; |
|||
$res = Member::credit_update_credit2($info['mid'],$info['sgetmoney'],$rem); |
|||
break;//余额到账 |
|||
case 5: |
|||
if ($sgetmoney < 1) show_json(0,'实际到账金额需要大于1元'); |
|||
$data['settletype'] = 5; |
|||
//请求进行微信打款操作 |
|||
$params = [ |
|||
'openid' => $info['sopenid'] , |
|||
'money' => $sgetmoney , |
|||
'rem' => $rem , |
|||
'name' => 'weliam' , |
|||
'order_no' => $info['trade_no'], |
|||
'source' => $info['source'] ? : 1, |
|||
'mid' => $info['mid'] |
|||
]; |
|||
$res = Payment::presentationInit($params,2); |
|||
if(!$res) $tips = '红包打款失败,请保证微信商户号余额充足'; |
|||
$cashtype = '微信红包'; |
|||
break;//红包打款 |
|||
case 6: |
|||
if ($sgetmoney < 1) show_json(0,'实际到账金额需要大于1元'); |
|||
if (empty($phone)) show_json(0,'未获取支付宝账号信息'); |
|||
$data['settletype'] = 6; |
|||
$realname = pdo_getcolumn(PDO_NAME.'member',array('id'=>$info['mid']),'realname'); |
|||
//请求进行微信打款操作 |
|||
$params = [ |
|||
'money' => $sgetmoney , |
|||
'order_no' => $info['trade_no'], |
|||
'phone' => $phone, |
|||
'source' => $info['source'] ? : 1, |
|||
'mid' => $info['mid'], |
|||
'realname' => $realname |
|||
]; |
|||
$res = Payment::presentationInit($params,3); |
|||
if(!$res) $tips = '支付宝打款失败,请保证微信账户余额充足并且开通对应功能'; |
|||
$cashtype = '支付宝转账'; |
|||
break;//支付宝转账 |
|||
} |
|||
#3、修改提现信息 |
|||
if($res){ |
|||
pdo_update(PDO_NAME . 'settlement_record' , $data , [ 'id' => $_GPC['id'] ]); |
|||
//发送模板消息 |
|||
if($info['type'] == 3){ |
|||
$url = h5_url('pages/subPages/dealer/withdraw/withdrawrecord',['draw_id'=>$_GPC['id']]); |
|||
Distribution::distriNotice($info['mid'],$url,6,0,$info['sapplymoney'],$cashtype); |
|||
}else{ |
|||
$first = '您的提现申请打款'; |
|||
$type = '提现申请'; |
|||
$status = '已打款'; |
|||
$content = '到账金额:¥'.$info['sgetmoney']; |
|||
$remark = '谢谢您对平台的支持'; |
|||
News::jobNotice($info['mid'],$first,$type,$content,$status,$remark,time()); |
|||
if($info['type'] == 1){ |
|||
News::addSysNotice($info['uniacid'],3,$info['sid'],0,$_GPC['id'],1); |
|||
} |
|||
} |
|||
|
|||
show_json(1,'已结算给'.str_replace('提现:',':',$rem)); |
|||
}else{ |
|||
$tips = $tips ? : '结算失败,请刷新重试!'; |
|||
show_json(0,$tips); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,248 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
class newCash_WeliamController { |
|||
//账户列表 |
|||
public function currentlist(){ |
|||
global $_W, $_GPC; |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$psize = 10; |
|||
$where = is_agent() ? array('uniacid' => $_W['uniacid'], 'aid' => $_W['aid']) : array('uniacid' => $_W['uniacid']); |
|||
|
|||
$type = trim($_GPC['type']); |
|||
$where['status'] = ($type == 'store') ? 1 : 2; |
|||
if ($type == 'store') { |
|||
if(is_agent()){ |
|||
$stores = pdo_getall('wlmerchant_merchantdata',array('uniacid' => $_W['uniacid'],'aid' => $_W['aid']),array('storename','id')); |
|||
}else{ |
|||
$stores = pdo_getall('wlmerchant_merchantdata',array('uniacid' => $_W['uniacid']),array('storename','id')); |
|||
} |
|||
} else { |
|||
$agents = pdo_getall('wlmerchant_agentusers',array('uniacid' => $_W['uniacid']),array('agentname','id')); |
|||
} |
|||
|
|||
if(is_store()){ |
|||
$where['objid'] = $_W['storeid']; |
|||
} |
|||
|
|||
$objid = intval($_GPC['objid']); |
|||
if($objid){ |
|||
$where['objid'] = $objid; |
|||
} elseif($type == 'agent' && is_agent()) { |
|||
$where['objid'] = $_W['aid']; |
|||
} |
|||
|
|||
$trade_type = intval($_GPC['trade_type']); |
|||
if($trade_type){ |
|||
$where['type'] = $trade_type; |
|||
} |
|||
|
|||
$days = (isset($_GPC["days"]) ? intval($_GPC["days"]) : -2); |
|||
$todaytime = strtotime(date("Y-m-d")); |
|||
$starttime = $todaytime; |
|||
$endtime = $starttime + 86399; |
|||
if($days > -2){ |
|||
if($days == -1 ){ |
|||
if(empty($_GPC["addtime"])){ |
|||
$days = -2; |
|||
}else{ |
|||
$starttime = strtotime($_GPC["addtime"]["start"]); |
|||
$endtime = strtotime($_GPC["addtime"]["end"]); |
|||
$where['createtime>'] = $starttime; |
|||
$where['createtime<'] = $endtime; |
|||
} |
|||
}else{ |
|||
$starttime = strtotime("-" . $days . " days",$todaytime); |
|||
$where['createtime>'] = $starttime; |
|||
} |
|||
} |
|||
|
|||
if($_GPC['outflag']){ |
|||
$this -> outCurrent($where); |
|||
} |
|||
|
|||
$records = Util::getNumData('*','wlmerchant_current', $where, 'ID DESC', $pindex, $psize, 1); |
|||
$pager = $records[1]; |
|||
$records = $records[0]; |
|||
foreach ($records as $key => &$re) { |
|||
if($re['status'] == 1){ |
|||
$re['objname'] = pdo_getcolumn(PDO_NAME . 'merchantdata', array('id' => $re['objid']), 'storename'); |
|||
}else if($re['status'] == 2){ |
|||
if(empty($re['objid'])){ |
|||
$re['objname'] = '总后台'; |
|||
}else{ |
|||
$re['objname'] = pdo_getcolumn(PDO_NAME.'agentusers',array('id'=>$re['objid']),'agentname'); |
|||
} |
|||
} |
|||
if ($re['type'] == 1) { |
|||
$re['typename'] = '抢购订单结算'; |
|||
$re['css'] = 'success'; |
|||
}else if($re['type'] == 10) { |
|||
$re['typename'] = '团购订单结算'; |
|||
$re['css'] = 'info'; |
|||
} else if ($re['type'] == 2) { |
|||
$re['typename'] = '拼团订单结算'; |
|||
$re['css'] = 'warning'; |
|||
} else if ($re['type'] == 3) { |
|||
$re['typename'] = '卡券订单结算'; |
|||
$re['css'] = 'success'; |
|||
} else if ($re['type'] == 4) { |
|||
$re['typename'] = '一卡通订单结算'; |
|||
$re['css'] = 'info'; |
|||
} else if ($re['type'] == 5) { |
|||
$re['typename'] = '掌上信息订单结算'; |
|||
$re['css'] = 'success'; |
|||
} else if ($re['type'] == 6) { |
|||
$re['typename'] = '付费入驻订单结算'; |
|||
$re['css'] = 'info'; |
|||
} else if ($re['type'] == 7) { |
|||
if ($re['fee'] < 0) { |
|||
$re['typename'] = '提现申请'; |
|||
$re['css'] = 'default'; |
|||
} else { |
|||
$re['typename'] = '提现申请驳回'; |
|||
$re['css'] = 'danger'; |
|||
} |
|||
}else if ($re['type'] == 8) { |
|||
if(Customized::init('distributionText') > 0){ |
|||
$re['typename'] = '共享股东订单结算'; |
|||
}else{ |
|||
$re['typename'] = '分销合伙人订单结算'; |
|||
} |
|||
$re['css'] = 'warning'; |
|||
}else if ($re['type'] == 9) { |
|||
$re['typename'] = '商户活动订单结算'; |
|||
$re['css'] = 'warning'; |
|||
}else if ($re['type'] == -1) { |
|||
$re['typename'] = '后台修改'; |
|||
$re['css'] = 'default'; |
|||
}else if ($re['type'] == 11) { |
|||
$re['typename'] = '在线买单'; |
|||
$re['css'] = 'warning'; |
|||
}else if ($re['type'] == 12) { |
|||
$re['typename'] = '砍价订单结算'; |
|||
$re['css'] = 'success'; |
|||
}else if ($re['type'] == 13) { |
|||
$re['typename'] = '同城名片订单结算'; |
|||
$re['css'] = 'warning'; |
|||
}else if ($re['type'] == 14) { |
|||
$re['typename'] = '礼包核销结算'; |
|||
$re['css'] = 'warning'; |
|||
}else if ($re['type'] == 140) { |
|||
$re['typename'] = '同城配送订单结算'; |
|||
$re['css'] = 'info'; |
|||
}else if ($re['type'] == 15) { |
|||
$re['typename'] = '支付返现修改金额'; |
|||
$re['css'] = 'warning'; |
|||
$re['remark'] = pdo_getcolumn(PDO_NAME.'payback_record',array('id'=>$re['orderid']),'remark'); |
|||
}else if ($re['type'] == 150) { |
|||
$re['typename'] = '黄页114'; |
|||
$re['css'] = 'warning'; |
|||
} |
|||
} |
|||
|
|||
include wl_template('finace/currentlist'); |
|||
} |
|||
//导出账户明细 |
|||
public function outCurrent($where){ |
|||
global $_W; |
|||
$records = Util::getNumData('*','wlmerchant_current', $where, 'ID DESC', 0, 0, 1); |
|||
$records = $records[0]; |
|||
foreach ($records as $key => &$re) { |
|||
$re['createtime'] = "\t".date('Y-m-d H:i:s',$re['createtime'])."\t"; |
|||
if($re['status'] == 1){ |
|||
$re['objname'] = pdo_getcolumn(PDO_NAME . 'merchantdata', array('id' => $re['objid']), 'storename'); |
|||
}else if($re['status'] == 2){ |
|||
if(empty($re['objid'])){ |
|||
$re['objname'] = '总后台'; |
|||
}else{ |
|||
$re['objname'] = pdo_getcolumn(PDO_NAME.'agentusers',array('id'=>$re['objid']),'agentname'); |
|||
} |
|||
} |
|||
if ($re['type'] == 1) { |
|||
$re['typename'] = '抢购订单结算'; |
|||
}else if($re['type'] == 10) { |
|||
$re['typename'] = '团购订单结算'; |
|||
} else if ($re['type'] == 2) { |
|||
$re['typename'] = '拼团订单结算'; |
|||
} else if ($re['type'] == 3) { |
|||
$re['typename'] = '卡券订单结算'; |
|||
} else if ($re['type'] == 4) { |
|||
$re['typename'] = '一卡通订单结算'; |
|||
} else if ($re['type'] == 5) { |
|||
$re['typename'] = '掌上信息订单结算'; |
|||
} else if ($re['type'] == 6) { |
|||
$re['typename'] = '付费入驻订单结算'; |
|||
} else if ($re['type'] == 7) { |
|||
if ($re['fee'] < 0) { |
|||
$re['typename'] = '提现申请'; |
|||
} else { |
|||
$re['typename'] = '提现申请驳回'; |
|||
} |
|||
}else if ($re['type'] == 8) { |
|||
if(Customized::init('distributionText') > 0){ |
|||
$re['typename'] = '共享股东订单结算'; |
|||
}else{ |
|||
$re['typename'] = '分销合伙人订单结算'; |
|||
} |
|||
}else if ($re['type'] == 9) { |
|||
$re['typename'] = '商户活动订单结算'; |
|||
}else if ($re['type'] == -1) { |
|||
$re['typename'] = '后台修改'; |
|||
}else if ($re['type'] == 11) { |
|||
$re['typename'] = '在线买单'; |
|||
}else if ($re['type'] == 12) { |
|||
$re['typename'] = '砍价订单结算'; |
|||
}else if ($re['type'] == 13) { |
|||
$re['typename'] = '同城名片订单结算'; |
|||
}else if ($re['type'] == 14) { |
|||
$re['typename'] = '礼包核销结算'; |
|||
}else if ($re['type'] == 140) { |
|||
$re['typename'] = '同城配送订单结算'; |
|||
}else if ($re['type'] == 15) { |
|||
$re['typename'] = '支付返现修改金额'; |
|||
$re['remark'] = pdo_getcolumn(PDO_NAME.'payback_record',array('id'=>$re['orderid']),'remark'); |
|||
}else if ($re['type'] == 150) { |
|||
$re['typename'] = '黄页114'; |
|||
} |
|||
} |
|||
/* 输出表头 */ |
|||
$filter = array( |
|||
'createtime' => '记录时间', |
|||
'objname' => '账户名称', |
|||
'typename' => '类型', |
|||
'fee' => '收入|支出(元)', |
|||
'nowmoney' => '账户余额', |
|||
'remark' => '核销码/备注', |
|||
); |
|||
|
|||
$data = array(); |
|||
foreach ($records as $k => $v) { |
|||
foreach ($filter as $key => $title) { |
|||
$data[$k][$key] = $v[$key]; |
|||
} |
|||
} |
|||
util_csv::export_csv_2($data,$filter, '金额变更记录表.csv'); |
|||
exit; |
|||
|
|||
} |
|||
|
|||
//修改备注 |
|||
public function editremark(){ |
|||
global $_W,$_GPC; |
|||
$id = intval($_GPC['id']); |
|||
$remark = trim($_GPC['value']); |
|||
$type = $_GPC['type']; |
|||
if($type == 1){ |
|||
$res = pdo_update('wlmerchant_rush_order',array('adminremark' => $remark),array('id' => $id)); |
|||
}else{ |
|||
$res = pdo_update('wlmerchant_order',array('remark' => $remark),array('id' => $id)); |
|||
} |
|||
if($res){ |
|||
show_json(1, '备注修改成功'); |
|||
}else{ |
|||
show_json(0, '备注修改失败,请刷新页面重试!'); |
|||
} |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,95 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
class WlCash_WeliamController { |
|||
//财务概况 |
|||
public function cashSurvey() { |
|||
global $_W, $_GPC; |
|||
$refresh = $_GPC['refresh'] ? 1 : 0; |
|||
$timetype = $_GPC['timetype']; |
|||
$time_limit = $_GPC['time_limit']; |
|||
if ($time_limit) { |
|||
$starttime = strtotime($_GPC['time_limit']['start']); |
|||
$endtime = strtotime($_GPC['time_limit']['end']); |
|||
} |
|||
|
|||
if (empty($starttime) || empty($endtime)) { |
|||
$starttime = strtotime('-1 month'); |
|||
$endtime = time(); |
|||
} |
|||
|
|||
$data = Merchant::sysCashSurvey(1, $timetype, $starttime, $endtime); |
|||
$agents = $data[0]; |
|||
$children = $data[1]; |
|||
$max = $data[2]; |
|||
$allMoney = $data[3]; |
|||
$time = $data[4]; |
|||
$newdata = $data[5]; |
|||
// wl_debug($newdata); |
|||
include wl_template('finace/cashSurvey'); |
|||
} |
|||
//财务设置 |
|||
public function cashset() { |
|||
global $_W, $_GPC; |
|||
if ($_W['ispost']) { |
|||
$set = $_GPC['cashset']; |
|||
if($set['allocationtype'] > 0){ //分账 |
|||
// if($set['wxsysalltype'] == 1){ |
|||
// if(empty($set['wxmerchantid'])){ |
|||
// show_json(0,'请设置公众号平台分账商户号'); |
|||
// } |
|||
// if(empty($set['wxmerchantname'])){ |
|||
// show_json(0,'请设置公众号平台分账商户名称'); |
|||
// } |
|||
// }else if($set['wxsysalltype'] == 2){ |
|||
// if(empty($set['wxallmid'])){ |
|||
// show_json(0,'请设置公众号平台分账个人微信号'); |
|||
// }else{ |
|||
// $member = pdo_get('wlmerchant_member',array('id' => $set['wxallmid']),array('openid')); |
|||
// if(empty($member['openid'])){ |
|||
// show_json(0,'所选用户无微信公众号账户信息,请重选'); |
|||
// } |
|||
// } |
|||
// } |
|||
// if($set['appsysalltype'] == 1){ |
|||
// if(empty($set['appmerchantid'])){ |
|||
// show_json(0,'请设置小程序平台分账商户号'); |
|||
// } |
|||
// if(empty($set['appmerchantname'])){ |
|||
// show_json(0,'请设置小程序平台分账商户名称'); |
|||
// } |
|||
// }else if($set['appsysalltype'] == 2){ |
|||
// if(empty($set['appallmid'])){ |
|||
// show_json(0,'请设置小程序平台分账个人微信号'); |
|||
// }else{ |
|||
// $member = pdo_get('wlmerchant_member',array('id' => $set['appallmid']),array('wechat_openid')); |
|||
// if(empty($member['wechat_openid'])){ |
|||
// show_json(0,'所选用户无微信小程序账户信息,请重选'); |
|||
// } |
|||
// } |
|||
// } |
|||
}else{ |
|||
if($set['maxsetmoney'] > 0 && $set['maxsetmoney'] < $set['lowsetmoney']){ |
|||
show_json(0,'最大提现金额必须大于最小提现金额'); |
|||
} |
|||
} |
|||
|
|||
$res1 = Setting::wlsetting_save($set, 'cashset'); |
|||
if ($res1) { |
|||
show_json(1); |
|||
} else { |
|||
show_json(0,'保存设置失败,请重试'); |
|||
} |
|||
} |
|||
//获取设置信息 |
|||
$cashset = Setting::wlsetting_read('cashset'); |
|||
#1、获取微信支付方式列表 |
|||
$weChat = pdo_getall(PDO_NAME."payment",['uniacid'=>$_W['uniacid'],'type'=>1],['id','name']); |
|||
#2、获取支付宝支付方式列表 |
|||
$aliPay = pdo_getall(PDO_NAME."payment",['uniacid'=>$_W['uniacid'],'type'=>2],['id','name']); |
|||
//校验权限 |
|||
$isAuth = Customized::init('allocation'); |
|||
|
|||
include wl_template('finace/cashset'); |
|||
} |
|||
} |
|||
@ -0,0 +1,200 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
class campusActivities_WeliamController { |
|||
|
|||
public function index() { |
|||
global $_W, $_GPC; |
|||
|
|||
$where = []; |
|||
|
|||
$where = []; |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$psize = 10; |
|||
|
|||
if (!empty($_GPC['title'])) { |
|||
$where['title@'] = '%' . trim($_GPC['title'] .'%'); |
|||
} |
|||
if (is_numeric($_GPC['status'])) $where['status'] = $_GPC['status']; |
|||
if (!empty($_GPC['create_place'])) $where['create_place'] = $_GPC['create_place']; |
|||
|
|||
$memberData = Util::getNumData("*", PDO_NAME . 'member_campus_activities', $where, 'id desc', $pindex, $psize, 1); |
|||
$list = $memberData[0]; |
|||
$pager = $memberData[1]; |
|||
|
|||
foreach ($list as &$item) { |
|||
if (!empty($item['cc_id'])) { |
|||
$ccRes = Category::getSingleCategory($item['cc_id'],'name'); |
|||
$item['cc_name'] = $ccRes['name']; |
|||
} |
|||
$item['promotional_img'] = tomedia($item['promotional_img']); |
|||
$item['nickname'] = '小粤'; |
|||
$item['avatar'] = $_W['wlsetting']['base']['logo'] ? tomedia($_W['wlsetting']['base']['logo']) : tomedia('headimg_'.$_W['account']['acid'].'.jpg'); |
|||
if ($item['create_place'] == 2) Member::getMemberInfo($item,$item['create_user_id']); |
|||
} |
|||
|
|||
include wl_template('member/campus_activities/index'); |
|||
} |
|||
|
|||
/** |
|||
* 保存活动宣传内容 |
|||
* @return void |
|||
*/ |
|||
public function edit () { |
|||
global $_W, $_GPC; |
|||
|
|||
$id = $_GPC['id']; |
|||
|
|||
if (checksubmit('submit')) { |
|||
|
|||
$data = $_GPC['register']; |
|||
if (empty($data['title'])) wl_message('请填写活动标题','refresh','error'); |
|||
if (strlen($data['title']) > 128) wl_message('活动标题不得超过128个字符','refresh','error'); |
|||
if (empty($data['describe'])) wl_message('请填写活动描述','refresh','error'); |
|||
if (empty($data['promotional_img'])) wl_message('请填写上传活动宣传图','refresh','error'); |
|||
|
|||
$data['uniacid'] = $_W['uniacid']; |
|||
$data['title'] = trim($data['title']); |
|||
$data['recommend'] = $data['recommend'] ?: 0; |
|||
$data['promotional_img'] = trim($data['promotional_img']); |
|||
$data['describe'] = htmlspecialchars_decode($data['describe']); |
|||
|
|||
$where = ['title' => $data['title']]; |
|||
if ($id) $where['id!='] = $id; |
|||
$query_res = pdo_get(PDO_NAME . 'member_campus_activities',$where); |
|||
if ($query_res) wl_message('该活动标题已存在,请换一个','refresh','error'); |
|||
|
|||
if (empty($id)) { |
|||
$data['create_user_id'] = $_W['uid']; |
|||
$data['create_time'] = time(); |
|||
$result = pdo_insert(PDO_NAME . 'member_campus_activities',$data); |
|||
} else { |
|||
$data['update_time'] = time(); |
|||
$result = pdo_update(PDO_NAME . 'member_campus_activities',$data,['id' => $id]); |
|||
} |
|||
|
|||
if (!$result) wl_message('活动保存失败,请重试', web_url('member/campus_activities/edit',['id' => $id]), 'error'); |
|||
|
|||
wl_message('活动保存成功',web_url('member/campusActivities/index',['active' => 1]),'success'); |
|||
} |
|||
|
|||
$register = []; |
|||
if (!empty($id)) { |
|||
$register = pdo_get(PDO_NAME . 'member_campus_activities', ['id' => $id]); |
|||
} |
|||
|
|||
$category = Category::getChildCategoryAll(6,'*',true); |
|||
|
|||
include wl_template('member/campus_activities/edit'); |
|||
} |
|||
|
|||
public function publish() { |
|||
global $_W, $_GPC; |
|||
|
|||
$id = $_GPC['id']; |
|||
if (empty($id) || !is_numeric($id)) show_json(0,'参数错误'); |
|||
$data = [ |
|||
'status' => 1, |
|||
'publish_time' => time(), |
|||
'publish_user_id' => $_W['uid'] |
|||
]; |
|||
$result = pdo_update(PDO_NAME . 'member_campus_activities',$data,['id' => $id]); |
|||
if (!$result) show_json(0,'发布失败'); |
|||
show_json(1,['message' => '发布成功','button' => '已发布']); |
|||
} |
|||
|
|||
public function reject() { |
|||
global $_W, $_GPC; |
|||
|
|||
$id = $_GPC['id']; |
|||
$reject = $_GPC['reject']; |
|||
if (empty($id) || !is_numeric($id)) wl_message('参数错误'); |
|||
if (empty($reject)) wl_message('驳回原因不能为空'); |
|||
$data = ['status' => 2,'reject' => $reject]; |
|||
$result = pdo_update(PDO_NAME . 'member_campus_activities',$data,['id' => $id]); |
|||
if (!$result) wl_message('驳回失败'); |
|||
wl_message('驳回成功',web_url('member/campusActivities/index',['active' => 1]),'success'); |
|||
} |
|||
|
|||
public function delete() { |
|||
global $_W, $_GPC; |
|||
|
|||
$id = $_GPC['id']; |
|||
if (empty($id) || !is_numeric($id)) show_json(0,'参数错误'); |
|||
$del_res = pdo_delete(PDO_NAME . 'member_campus_activities',['id' => $id]); |
|||
if (!$del_res) { |
|||
show_json(0,'删除失败'); |
|||
} |
|||
pdo_delete(PDO_NAME . 'member_evaluation_activities',['campus_activities_id' => $id]); |
|||
|
|||
show_json(1,'删除成功'); |
|||
} |
|||
|
|||
/** |
|||
* Comment: 修改状态 |
|||
* Author: zzw |
|||
* Date: 2023/5/6 13:52 |
|||
*/ |
|||
public function changeRecommend() |
|||
{ |
|||
global $_W, $_GPC; |
|||
#1、获取参数信息 |
|||
$id = $_GPC['id'] or Commons::sRenderError('缺少参数:导航id'); |
|||
$recommend = $_GPC['status'] ?: 0; |
|||
#1、修改操作 |
|||
$res = pdo_update(PDO_NAME . "member_campus_activities", ['recommend' => $recommend], ['id' => $id]); |
|||
if ($res) Commons::sRenderSuccess('修改成功'); |
|||
else Commons::sRenderError('修改失败,请刷新重试!'); |
|||
} |
|||
|
|||
public function commentIndex() |
|||
{ |
|||
global $_W, $_GPC; |
|||
|
|||
$where = []; |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$psize = 10; |
|||
|
|||
if (is_numeric($_GPC['status'])) $where['status'] = $_GPC['status']; |
|||
|
|||
$pageData = Util::getNumData("*", PDO_NAME . 'member_evaluation_activities', $where, 'status asc,create_time asc', $pindex, $psize, 1); |
|||
$list = $pageData[0]; |
|||
$pager = $pageData[1]; |
|||
|
|||
foreach ($list as &$item) { |
|||
|
|||
Member::getMemberInfo($item,$item['mid']); |
|||
if (is_base64($item['content'])) $item['content'] = base64_decode($item['content']); |
|||
$item['create_time'] = date("Y-m-d H:i:s",$item['create_time']); |
|||
|
|||
} |
|||
|
|||
include wl_template('member/campus_activities/commentIndex'); |
|||
} |
|||
|
|||
public function checkComment() |
|||
{ |
|||
global $_W, $_GPC; |
|||
$id = $_GPC['id']; |
|||
if (empty($id)) { |
|||
wl_message('缺少参数:id',web_url('member/campusActivities/commentIndex',['active' => 2]),'error'); |
|||
} |
|||
$status = $_GPC['status']; |
|||
if (empty($status)) { |
|||
wl_message('缺少参数:status',web_url('member/campusActivities/commentIndex',['active' => 2]),'error'); |
|||
} |
|||
$updateArr = ['status' => $status]; |
|||
$checkRes = pdo_update(PDO_NAME . 'member_evaluation_activities',$updateArr,['id' => $id]); |
|||
if (!$checkRes) wl_message('审核失败',web_url('member/campusActivities/commentIndex',['active' => 2]),'error'); |
|||
wl_message('审核成功',web_url('member/campusActivities/commentIndex',['active' => 2]),'success'); |
|||
} |
|||
|
|||
public function deleteComment() |
|||
{ |
|||
global $_W, $_GPC; |
|||
|
|||
if (Member::commentDelete($_GPC['id'])) wl_message('删除成功', web_url('member/campusActivities/commentIndex',['active' => 2]), 'success'); |
|||
|
|||
wl_message('删除失败', referer(), 'error'); |
|||
} |
|||
} |
|||
@ -0,0 +1,300 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
class checkMember_WeliamController |
|||
{ |
|||
|
|||
public function checkStudentIndex() { |
|||
global $_W, $_GPC; |
|||
|
|||
$where = []; |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$psize = 10; |
|||
|
|||
if (!empty($_GPC['username'])) { |
|||
$where['name@'] = '%' . trim($_GPC['username'] .'%'); |
|||
} |
|||
|
|||
$memberData = Util::getNumData("*", PDO_NAME . 'member_student_info', $where, 'id desc', $pindex, $psize, 1); |
|||
$list = $memberData[0]; |
|||
$pager = $memberData[1]; |
|||
|
|||
include wl_template('member/check/checkStudentIndex'); |
|||
} |
|||
|
|||
public function checkStudentEdit() |
|||
{ |
|||
global $_W, $_GPC; |
|||
|
|||
$id = $_GPC['id']; |
|||
|
|||
if (checksubmit('submit')) { |
|||
|
|||
if (empty($_GPC['name'])) wl_message('请输入姓名'); |
|||
if (empty($_GPC['mobile'])) wl_message('请输入手机号'); |
|||
if (!preg_match("/^1[3-9]\d{9}$/",$_GPC['mobile'])) wl_message('请输入正确的手机号'); |
|||
if (empty($_GPC['code'])) wl_message('请输入学号'); |
|||
if (empty($_GPC['school_name'])) wl_message('请输入学校名称'); |
|||
if (empty($_GPC['department_name'])) wl_message('请输入院系'); |
|||
if (empty($_GPC['start_date'])) wl_message('请选择入学时间'); |
|||
if (empty($_GPC['certificate_img'])) wl_message('请上传证件'); |
|||
|
|||
$data = []; |
|||
$data['name'] = trim($_GPC['name']); |
|||
$data['mobile'] = trim($_GPC['mobile']); |
|||
$data['code'] = trim($_GPC['code']); |
|||
$data['school_name'] = trim($_GPC['school_name']); |
|||
$data['department_name'] = trim($_GPC['department_name']); |
|||
$data['certificate_img'] = trim($_GPC['certificate_img']); |
|||
$data['start_date'] = trim($_GPC['start_date']); |
|||
$data['update_time'] = time(); |
|||
|
|||
$result = pdo_update(PDO_NAME . 'member_student_info',$data,['id' => $id]); |
|||
if (!$result) wl_message('编辑失败'); |
|||
|
|||
wl_message('编辑成功', web_url('member/checkMember/checkStudentIndex'), 'success'); |
|||
} |
|||
|
|||
$data = pdo_get(PDO_NAME . 'member_student_info',['id' => $id]); |
|||
|
|||
include wl_template('member/check/checkStudentEdit'); |
|||
} |
|||
|
|||
/* |
|||
* 学历认证审核审核 |
|||
*/ |
|||
public function checkStudentInfo() { |
|||
global $_W, $_GPC; |
|||
|
|||
if ($_W['ispost']) { |
|||
$id = $_GPC['data']['id']; |
|||
$check_result = $_GPC['data']['result']; |
|||
$reason = $_GPC['data']['reason']?:''; |
|||
if (!in_array($check_result,['reject','pass'])) show_json(0,'参数错误'); |
|||
if ($check_result == 'reject' && empty($reason)) show_json(0,'请填写不通过的原因'); |
|||
|
|||
$query_res = pdo_get(PDO_NAME . 'member_student_info',['id' => $id, 'check_status' => 0]); |
|||
if (!$query_res) show_json(0,'已审核,请勿重复审核'); |
|||
|
|||
$check_status = $check_result == 'pass' ? 1 : 2; |
|||
$update_arr = [ |
|||
'check_status' => $check_status, |
|||
'check_cause' => $reason, |
|||
'check_user_id' => $_W['uid'], |
|||
'check_time' => time(), |
|||
]; |
|||
pdo_begin(); // 开始事务 |
|||
$up_res = pdo_update(PDO_NAME . 'member_student_info',$update_arr,['id' => $id]); |
|||
|
|||
if (!$up_res) { |
|||
pdo_rollback(); // 回滚 |
|||
show_json(0,'失败'); |
|||
} |
|||
|
|||
// 通过修改为学生身份 |
|||
if ($check_status == 1) { |
|||
$up_res2 = pdo_update(PDO_NAME . 'member',['identity_id' => 2],['id' => $query_res['mid']]); |
|||
if (!$up_res2) { |
|||
pdo_rollback(); // 回滚 |
|||
show_json(0,'失败'); |
|||
} |
|||
} else { |
|||
$content = '驳回原因:' . truncate_chinese_string($reason) . '...'; |
|||
$link = h5_url('pagesA/studentIdentification/studentIdentification'); |
|||
News::jobNotice($query_res['mid'], '您好,您的学生认证审核已完成', '学生认证审核通知', $content, '未通过', '点击重新申请', time(), $link); |
|||
} |
|||
|
|||
pdo_commit(); // 提交事务 |
|||
show_json(1,['message' => '成功', 'span' => $check_result == 'pass' ? '审核通过' : '审核失败']); |
|||
} |
|||
show_json(0,'请求失败'); |
|||
} |
|||
|
|||
/* |
|||
* 教师认证列表 |
|||
*/ |
|||
public function checkTeacherIndex() |
|||
{ |
|||
global $_W, $_GPC; |
|||
|
|||
$where = []; |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$psize = 10; |
|||
|
|||
if (!empty($_GPC['keyword'])) { |
|||
if ($_GPC['keywordtype'] == 1) { |
|||
$where['mid'] = trim($_GPC['keyword']); |
|||
} else if ($_GPC['keywordtype'] == 2) { |
|||
$memberIdArr = []; |
|||
$memberAll = pdo_getall(PDO_NAME . 'member',['nickname like' => '%'.trim($_GPC['keyword']).'%'],'id'); |
|||
foreach ($memberAll as $memberRow) $memberIdArr[] = $memberRow['id']; |
|||
$where['mid#'] = $memberIdArr ? implode(",",$memberIdArr) : '0'; |
|||
} else if ($_GPC['keywordtype'] == 3) { |
|||
$where['@name@'] = trim($_GPC['keyword']); |
|||
} |
|||
} |
|||
|
|||
if (is_numeric($_GPC['status'])) $where['status'] = trim($_GPC['status']); |
|||
|
|||
$memberData = Util::getNumData("*", PDO_NAME . 'member_teacher_certified', $where, 'id desc', $pindex, $psize, 1); |
|||
$list = $memberData[0]; |
|||
$pager = $memberData[1]; |
|||
foreach ($list as &$item) { |
|||
$member = Member::getMemberInfo($item,$item['mid']); |
|||
$item['documents'] = tomedia($item['documents']); |
|||
$item['create_time'] = date("Y-m-d H:i:s",$item['create_time']); |
|||
} |
|||
|
|||
include wl_template('member/check/checkTeacherIndex'); |
|||
} |
|||
|
|||
/* |
|||
* 教师信息认证 |
|||
*/ |
|||
public function checkTeacherInfo() { |
|||
global $_W, $_GPC; |
|||
|
|||
if ($_W['ispost']) { |
|||
|
|||
try { |
|||
|
|||
$id = $_GPC['data']['id']; |
|||
$check_result = $_GPC['data']['result']; |
|||
$reason = $_GPC['data']['reason']?:''; |
|||
if (empty($id) || !is_numeric($id)) show_json('缺少id参数'); |
|||
if (!in_array($check_result,['reject','pass'])) show_json(0,'参数错误'); |
|||
if ($check_result == 'reject' && empty($reason)) show_json(0,'请填写不通过的原因'); |
|||
|
|||
$query_res = pdo_get(PDO_NAME . 'member_teacher_certified',['id' => $id, 'status' => 0]); |
|||
if (!$query_res) show_json(0,'已审核,请勿重复审核'); |
|||
|
|||
$status = $check_result == 'pass' ? 1 : 2; |
|||
$update_arr = [ |
|||
'status' => $status, |
|||
'remark' => $reason, |
|||
'certified_userid' => $_W['uid'], |
|||
'certified_time' => time() |
|||
]; |
|||
|
|||
pdo_begin(); // 开始事务 |
|||
$up_res = pdo_update(PDO_NAME . 'member_teacher_certified',$update_arr,['id' => $id]); |
|||
|
|||
if (!$up_res) throw new Exception('失败'); |
|||
|
|||
// 通过修改为教师身份 |
|||
if ($status == 1) { |
|||
$up_res2 = pdo_update(PDO_NAME . 'member',['identity_id' => 6],['id' => $query_res['mid']]); |
|||
if (!$up_res2) throw new Exception('失败'); |
|||
} else { |
|||
$content = '驳回原因:' . truncate_chinese_string($reason) . '...'; |
|||
$link = h5_url('pagesA/identityList/teacherCertification'); |
|||
News::jobNotice($query_res['mid'], '您好,您的教师认证审核已完成', '教师认证审核通知', $content, '未通过', '点击重新申请', time(), $link); |
|||
} |
|||
|
|||
pdo_commit(); // 提交事务 |
|||
|
|||
show_json(1,['message' => '成功', 'span' => $check_result == 'pass' ? '认证成功' : '认证失败']); |
|||
} catch (Exception $e) { |
|||
pdo_rollback(); // 回滚 |
|||
show_json(0,$e->getMessage()); |
|||
} |
|||
|
|||
} |
|||
show_json(0,'请求失败'); |
|||
} |
|||
|
|||
/* |
|||
* 达人认证列表 |
|||
*/ |
|||
public function checkBloggerIndex() |
|||
{ |
|||
global $_W, $_GPC; |
|||
|
|||
$where = []; |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$psize = 10; |
|||
|
|||
if (!empty($_GPC['keyword'])) { |
|||
if ($_GPC['keywordtype'] == 1) { |
|||
$where['storeid'] = trim($_GPC['keyword']); |
|||
} else if ($_GPC['keywordtype'] == 2) { |
|||
$memberIdArr = []; |
|||
$memberAll = pdo_getall(PDO_NAME . 'member',['nickname like' => '%'.trim($_GPC['keyword']).'%'],'id'); |
|||
foreach ($memberAll as $memberRow) $memberIdArr[] = $memberRow['id']; |
|||
$where['mid#'] = $memberIdArr ? implode(",",$memberIdArr) : '0'; |
|||
} else if ($_GPC['keywordtype'] == 3) { |
|||
$where['@name@'] = trim($_GPC['keyword']); |
|||
} else if ($_GPC['keywordtype'] == 4) { |
|||
$where['mobile'] = trim($_GPC['keyword']); |
|||
} |
|||
} |
|||
|
|||
if (is_numeric($_GPC['status'])) $where['status'] = trim($_GPC['status']); |
|||
|
|||
$memberData = Util::getNumData("*", PDO_NAME . 'member_daren_certified', $where, 'id desc', $pindex, $psize, 1); |
|||
$list = $memberData[0]; |
|||
$pager = $memberData[1]; |
|||
foreach ($list as &$item) { |
|||
$member = Member::getMemberInfo($item,$item['mid']); |
|||
$item['screenshot'] = tomedia($item['screenshot']); |
|||
$item['create_time'] = date("Y-m-d H:i:s",$item['create_time']); |
|||
} |
|||
|
|||
include wl_template('member/check/checkBloggerIndex'); |
|||
} |
|||
|
|||
/* |
|||
* 达人信息认证 |
|||
*/ |
|||
public function checkBloggerInfo() { |
|||
global $_W, $_GPC; |
|||
|
|||
if ($_W['ispost']) { |
|||
|
|||
try { |
|||
|
|||
$id = $_GPC['data']['id']; |
|||
$check_result = $_GPC['data']['result']; |
|||
$reason = $_GPC['data']['reason']?:''; |
|||
if (empty($id) || !is_numeric($id)) show_json('缺少id参数'); |
|||
if (!in_array($check_result,['reject','pass'])) show_json(0,'参数错误'); |
|||
if ($check_result == 'reject' && empty($reason)) show_json(0,'请填写不通过的原因'); |
|||
|
|||
$query_res = pdo_get(PDO_NAME . 'member_daren_certified',['id' => $id, 'status' => 0]); |
|||
if (!$query_res) show_json(0,'已审核,请勿重复审核'); |
|||
|
|||
$status = $check_result == 'pass' ? 1 : 2; |
|||
$update_arr = [ |
|||
'status' => $status, |
|||
'remark' => $reason, |
|||
'certified_userid' => $_W['uid'], |
|||
'certified_time' => time() |
|||
]; |
|||
|
|||
pdo_begin(); // 开始事务 |
|||
$up_res = pdo_update(PDO_NAME . 'member_daren_certified',$update_arr,['id' => $id]); |
|||
|
|||
if (!$up_res) throw new Exception('失败'); |
|||
|
|||
// 通过修改为达人身份 |
|||
if ($status == 1) { |
|||
$up_res2 = pdo_update(PDO_NAME . 'member',['identity_id' => 7],['id' => $query_res['mid']]); |
|||
if (!$up_res2) throw new Exception('失败'); |
|||
} else { |
|||
$content = '驳回原因:' . truncate_chinese_string($reason) . '...'; |
|||
$link = h5_url('pagesA/identityList/bloggerCertification'); |
|||
News::jobNotice($query_res['mid'], '您好,您的达人认证审核已完成', '达人认证审核通知', $content, '未通过', '点击重新申请', time(), $link); |
|||
} |
|||
|
|||
pdo_commit(); // 提交事务 |
|||
|
|||
show_json(1,['message' => '成功', 'span' => $check_result == 'pass' ? '认证成功' : '认证失败']); |
|||
} catch (Exception $e) { |
|||
pdo_rollback(); // 回滚 |
|||
show_json(0,$e->getMessage()); |
|||
} |
|||
|
|||
} |
|||
show_json(0,'请求失败'); |
|||
} |
|||
} |
|||
@ -0,0 +1,291 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
|
|||
/** |
|||
* Comment: 用户财务明细 |
|||
* Author: zzw |
|||
* Date: 2021/1/8 10:59 |
|||
* Class MemberFinancialDetails_WeliamController |
|||
*/ |
|||
class MemberFinancialDetails_WeliamController { |
|||
//充值明细 |
|||
public function recharge() { |
|||
global $_W, $_GPC; |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$psize = 10; |
|||
$where['uniacid'] = $_W['uniacid']; |
|||
$where['status'] = 3; |
|||
$where['plugin'] = 'member'; |
|||
|
|||
if ($_GPC['paytype']) { |
|||
$where['paytype'] = $_GPC['paytype']; |
|||
} |
|||
if ($_GPC['time_limit']) { |
|||
$time_limit = $_GPC['time_limit']; |
|||
$starttime = strtotime($_GPC['time_limit']['start']); |
|||
$endtime = strtotime($_GPC['time_limit']['end']); |
|||
$where['createtime>'] = $starttime; |
|||
$where['createtime<'] = $endtime; |
|||
} |
|||
|
|||
if($_GPC['export']){ |
|||
$this -> exportRecharge($where); |
|||
} |
|||
|
|||
if (empty($starttime) || empty($endtime)) { |
|||
$starttime = strtotime('-1 month'); |
|||
$endtime = time(); |
|||
} |
|||
|
|||
$details = Util::getNumData('orderno,paytype,mid,paytime,price', PDO_NAME . 'order', $where, 'ID DESC', $pindex, $psize, 1); |
|||
$pager = $details[1]; |
|||
$details = $details[0]; |
|||
if ($details) { |
|||
foreach ($details as $key => &$det) { |
|||
$member = Member::wl_member_get($det['mid'], array('nickname', 'avatar','encodename')); |
|||
$det['nickname'] = $member['nickname']; |
|||
$det['avatar'] = tomedia($member['avatar']); |
|||
$det['paytime'] = date('Y-m-d H:i:s', $det['paytime']); |
|||
} |
|||
} |
|||
|
|||
include wl_template('member/rechargelist'); |
|||
} |
|||
//积分明细 |
|||
public function integral() { |
|||
global $_W, $_GPC; |
|||
#1、获取基本参数 |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$psize = 20; |
|||
$keyword = $_GPC['keyword'];//关键字 |
|||
$keywordtype = $_GPC['keywordtype'];//关键字类型 |
|||
$type = $_GPC['type'];//类型 |
|||
$timeLimit = $_GPC['time_limit'];//时间段 |
|||
#2、获取条件信息 |
|||
$where = " a.credittype = 'credit1' AND a.uniacid = {$_W['uniacid']} "; |
|||
if ($type) { |
|||
if ($type == 1) { |
|||
$where .= " AND a.num >= 0 "; |
|||
} else { |
|||
$where .= " AND a.num <= 0 "; |
|||
} |
|||
} |
|||
if ($timeLimit) { |
|||
$starttime = strtotime($timeLimit['start']); |
|||
$endtime = strtotime($timeLimit['end']); |
|||
$where .= " AND a.createtime >= {$starttime} "; |
|||
$where .= " AND a.createtime <= {$endtime} "; |
|||
} |
|||
if ($keyword) { |
|||
if ($keywordtype == 1) { |
|||
$where .= " AND b.id LIKE '%{$keyword}%'"; |
|||
} else if ($keywordtype == 2) { |
|||
$where .= " AND b.nickname LIKE '%{$keyword}%'"; |
|||
} else if ($keywordtype == 3) { |
|||
$where .= " AND b.mobile LIKE '%{$keyword}%'"; |
|||
} |
|||
} |
|||
|
|||
if($_GPC['export']){ |
|||
$this -> exportIntegral($where); |
|||
} |
|||
|
|||
if (empty($starttime) || empty($endtime)) { |
|||
$starttime = strtotime('-1 month'); |
|||
$endtime = time(); |
|||
} |
|||
$start = $pindex * $psize - $psize; |
|||
$limit = " LIMIT {$start},{$psize} "; |
|||
#3、获取信息数据 |
|||
$sql = "SELECT a.id,a.num,a.createtime,a.uid,a.remark,b.nickname,b.avatar,b.encodename FROM " |
|||
. tablename("mc_credits_record") |
|||
. " a LEFT JOIN " . tablename(PDO_NAME . "member") . " b ON a.uid = b.uid WHERE {$where} AND b.id > 0 ORDER BY createtime DESC"; |
|||
$total = pdo_fetchcolumn('SELECT count(*) FROM '.tablename('mc_credits_record') . " a LEFT JOIN " . tablename(PDO_NAME . "member") . " b ON a.uid = b.uid WHERE {$where} AND b.id > 0"); |
|||
//wl_debug($total); |
|||
$details = pdo_fetchall($sql . $limit); |
|||
if ($details) { |
|||
foreach ($details as $key => &$det) { |
|||
$det['avatar'] = tomedia($det['avatar']); |
|||
$det['nickname'] = base64_decode($det['encodename']); |
|||
$det['createtime'] = date('Y-m-d H:i:s', $det['createtime']); |
|||
} |
|||
} |
|||
$pager = wl_pagination($total, $pindex, $psize); |
|||
include wl_template('member/integrallist'); |
|||
} |
|||
//余额明细 |
|||
public function balance() { |
|||
global $_W, $_GPC; |
|||
#1、获取基本参数 |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$psize = 20; |
|||
$keyword = $_GPC['keyword'];//关键字 |
|||
$keywordtype = $_GPC['keywordtype'];//关键字类型 |
|||
$type = $_GPC['type'];//类型 |
|||
$timeLimit = $_GPC['time_limit'];//时间段 |
|||
#2、获取条件信息 |
|||
$where = " a.credittype = 'credit2' AND a.uniacid = {$_W['uniacid']} AND b.uniacid = {$_W['uniacid']} "; |
|||
if ($type) { |
|||
if ($type == 1) { |
|||
$where .= " AND a.num >= 0 "; |
|||
} else { |
|||
$where .= " AND a.num <= 0 "; |
|||
} |
|||
} |
|||
if ($timeLimit) { |
|||
$starttime = strtotime($timeLimit['start']); |
|||
$endtime = strtotime($timeLimit['end']); |
|||
$where .= " AND a.createtime >= {$starttime} "; |
|||
$where .= " AND a.createtime <= {$endtime} "; |
|||
} |
|||
if ($keyword) { |
|||
if ($keywordtype == 1) { |
|||
$where .= " AND b.id LIKE '%{$keyword}%'"; |
|||
} else if ($keywordtype == 2) { |
|||
$where .= " AND b.nickname LIKE '%{$keyword}%'"; |
|||
} else if ($keywordtype == 3) { |
|||
$where .= " AND b.mobile LIKE '%{$keyword}%'"; |
|||
} |
|||
} |
|||
if($_GPC['export']){ |
|||
$this -> exportBalance($where); |
|||
} |
|||
if (empty($starttime) || empty($endtime)) { |
|||
$starttime = strtotime('-1 month'); |
|||
$endtime = time(); |
|||
} |
|||
$start = $pindex * $psize - $psize; |
|||
$limit = " LIMIT {$start},{$psize} "; |
|||
|
|||
#3、获取信息数据 |
|||
$sql = "SELECT a.id,a.num,a.createtime,a.uid,a.remark,b.nickname,b.avatar,b.encodename FROM " |
|||
. tablename("mc_credits_record") |
|||
. " a LEFT JOIN " . tablename(PDO_NAME . "member") . " b ON a.uid = b.uid WHERE {$where} AND b.id > 0 ORDER BY createtime DESC"; |
|||
$total = pdo_fetchcolumn('SELECT count(a.id) FROM ' . tablename('mc_credits_record') . " a LEFT JOIN " . tablename(PDO_NAME . "member") . " b ON a.uid = b.uid WHERE {$where} AND b.id > 0 "); |
|||
$details = pdo_fetchall($sql . $limit); |
|||
if ($details) { |
|||
foreach ($details as $key => &$det) { |
|||
$det['avatar'] = tomedia($det['avatar']); |
|||
$det['nickname'] = base64_decode($det['encodename']); |
|||
$det['createtime'] = date('Y-m-d H:i:s', $det['createtime']); |
|||
} |
|||
} |
|||
$pager = wl_pagination($total, $pindex, $psize); |
|||
include wl_template('member/balancelist'); |
|||
} |
|||
|
|||
public function exportBalance($where){ |
|||
global $_W, $_GPC; |
|||
$limit = " LIMIT 20000"; |
|||
$sql = "SELECT a.id,a.num,a.createtime,a.uid,a.remark,b.nickname,b.id as mid FROM " |
|||
. tablename("mc_credits_record") |
|||
. " a LEFT JOIN " . tablename(PDO_NAME . "member") . " b ON a.uid = b.uid WHERE {$where} AND b.id > 0 ORDER BY createtime DESC"; |
|||
$total = pdo_fetchcolumn('SELECT count(a.id) FROM ' . tablename('mc_credits_record') . " a LEFT JOIN " . tablename(PDO_NAME . "member") . " b ON a.uid = b.uid WHERE {$where} AND b.id > 0 "); |
|||
$details = pdo_fetchall($sql . $limit); |
|||
if ($details) { |
|||
foreach ($details as $key => &$det) { |
|||
$det['createtime'] = date('Y-m-d H:i:s', $det['createtime']); |
|||
} |
|||
} |
|||
|
|||
/* 输出表头 */ |
|||
$filter = array( |
|||
'mid' => '用户mid',//U |
|||
'nickname' => '用户昵称',//A |
|||
'num' => '变更数量',//B |
|||
'remark' => '变更详情',//C |
|||
'createtime' => '变更时间',//D |
|||
); |
|||
|
|||
$data = array(); |
|||
for ($i=0; $i < count($details) ; $i++) { |
|||
foreach ($filter as $key => $title) { |
|||
$data[$i][$key] = $details[$i][$key]; |
|||
} |
|||
} |
|||
util_csv::export_csv_2($data, $filter, '余额变更记录表.csv'); |
|||
exit(); |
|||
|
|||
} |
|||
|
|||
public function exportIntegral($where){ |
|||
global $_W, $_GPC; |
|||
$limit = " LIMIT 20000"; |
|||
$sql = "SELECT a.id,a.num,a.createtime,a.uid,a.remark,b.nickname,b.id as mid FROM " |
|||
. tablename("mc_credits_record") |
|||
. " a LEFT JOIN " . tablename(PDO_NAME . "member") . " b ON a.uid = b.uid WHERE {$where} AND b.id > 0 ORDER BY createtime DESC"; |
|||
$total = count(pdo_fetchall($sql)); |
|||
$details = pdo_fetchall($sql . $limit); |
|||
if ($details) { |
|||
foreach ($details as $key => &$det) { |
|||
$det['createtime'] = date('Y-m-d H:i:s', $det['createtime']); |
|||
} |
|||
} |
|||
/* 输出表头 */ |
|||
$filter = array( |
|||
'mid' => '用户mid',//U |
|||
'nickname' => '用户昵称',//A |
|||
'num' => '变更数量',//B |
|||
'remark' => '变更详情',//C |
|||
'createtime' => '变更时间',//D |
|||
); |
|||
$data = array(); |
|||
for ($i=0; $i < count($details) ; $i++) { |
|||
foreach ($filter as $key => $title) { |
|||
$data[$i][$key] = $details[$i][$key]; |
|||
} |
|||
} |
|||
util_csv::export_csv_2($data, $filter, '积分变更记录表.csv'); |
|||
exit(); |
|||
} |
|||
|
|||
public function exportRecharge($where){ |
|||
global $_W, $_GPC; |
|||
$details = Util::getNumData('orderno,paytype,mid,paytime,price', PDO_NAME . 'order', $where, 'ID DESC', 0, 0, 1); |
|||
$details = $details[0]; |
|||
if ($details) { |
|||
foreach ($details as $key => &$det) { |
|||
$member = Member::wl_member_get($det['mid'], array('nickname', 'avatar')); |
|||
$det['nickname'] = $member['nickname']; |
|||
$det['avatar'] = tomedia($member['avatar']); |
|||
$det['paytime'] = date('Y-m-d H:i:s', $det['paytime']); |
|||
$det['orderno'] = "\t".$det['orderno']."\t"; |
|||
} |
|||
} |
|||
/* 输出表头 */ |
|||
$filter = array( |
|||
'orderno' => '充值单号', |
|||
'mid' => '用户mid',//U |
|||
'nickname' => '用户昵称',//A |
|||
'price' => '充值金额',//B |
|||
'paytype' => '支付方式',//C |
|||
'paytime' => '充值时间',//D |
|||
); |
|||
|
|||
$data = array(); |
|||
for ($i=0; $i < count($details) ; $i++) { |
|||
foreach ($filter as $key => $title) { |
|||
if($key == 'paytype'){ |
|||
switch ($details[$i][$key]) { |
|||
case '2': |
|||
$data[$i][$key] = '微信支付'; |
|||
break; |
|||
case '3': |
|||
$data[$i][$key] = '支付宝'; |
|||
break; |
|||
default: |
|||
$data[$i][$key] = '其他方式'; |
|||
break; |
|||
} |
|||
}else{ |
|||
$data[$i][$key] = $details[$i][$key]; |
|||
} |
|||
} |
|||
} |
|||
util_csv::export_csv_2($data, $filter, '充值记录表.csv'); |
|||
exit(); |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,190 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
class UserIm_WeliamController { |
|||
/** |
|||
* Comment: 获取通讯信息列表 |
|||
* Author: zzw |
|||
* Date: 2020/9/9 14:34 |
|||
*/ |
|||
public function index(){ |
|||
global $_W,$_GPC; |
|||
//参数信息获取 |
|||
$page = max(1, intval($_GPC['page'])); |
|||
$pageIndex = intval($_GPC['page_index'] ? : 10); |
|||
$pageStart = $page * $pageIndex - $pageIndex; |
|||
$sendType = $_GPC['send_type'] ? : 1;//发送方类型 1=用户;2=商户 |
|||
$receiveType = $_GPC['receive_type'] ? : 1;//接收人类型 1=用户;2=商户 |
|||
$searchType = $_GPC['search_type'] ? : 0;//搜索类型:1=发送方昵称,2=接收方昵称,3=通信内容 |
|||
$search = $_GPC['search'] ? : '';//搜索内容 |
|||
|
|||
$userTable = tablename(PDO_NAME."member"); |
|||
$shopTable = tablename(PDO_NAME."merchantdata"); |
|||
//生成查询相关信息 |
|||
$order = " ORDER BY i.create_time DESC"; |
|||
$limit = " LIMIT {$pageStart},{$pageIndex} "; |
|||
//条件生成 |
|||
$where = " WHERE i.uniacid = {$_W['uniacid']} AND i.send_type = {$sendType} AND i.receive_type = {$receiveType} ";//条件生成 |
|||
if($search){ |
|||
switch ($searchType) { |
|||
case 1: |
|||
if ($sendType == 1) $where .= " AND send_m.nickname LIKE '%{$search}%' "; |
|||
else $where .= " AND send_s.storename LIKE '%{$search}%' "; |
|||
break; |
|||
case 2: |
|||
if ($sendType == 1) $where .= " AND receive_m.nickname LIKE '%{$search}%' "; |
|||
else $where .= " AND receive_s.storename LIKE '%{$search}%' "; |
|||
break; |
|||
case 3: |
|||
$where .= " AND i.content LIKE '%{$search}%' "; |
|||
break; |
|||
} |
|||
} |
|||
//生成需要获取的字段 |
|||
$field = "i.id,i.send_type,i.send_id,i.receive_type,i.receive_id,i.type,i.content,"; |
|||
if($sendType == 1) $field .= "send_m.nickname as send_user,send_m.encodename as send_encodename,send_m.avatar as send_logo,";//用户发送 |
|||
else $field .= "send_s.storename as send_user,send_s.logo as send_logo,";//商户发送 |
|||
if($receiveType == 1) $field .= "receive_m.nickname as receive_user,receive_m.encodename as receive_encodename,receive_m.avatar as receive_logo ";//用户接收 |
|||
else $field .= "receive_s.storename as receive_user,receive_s.logo as receive_logo ";//商户接收 |
|||
//生成sql语句 |
|||
$sql = " SELECT {$field} FROM ".tablename(PDO_NAME."im")." as i "; |
|||
if($sendType == 1) $sql .= " LEFT JOIN ".$userTable." send_m ON i.send_id = send_m.id AND i.send_type = 1 ";//用户发送 |
|||
else $sql .= " LEFT JOIN ".$shopTable." send_s ON i.send_id = send_s.id AND i.send_type = 2 ";//商户发送 |
|||
if($receiveType == 1) $sql .= " LEFT JOIN ".$userTable." receive_m ON i.receive_id = receive_m.id AND i.receive_type = 1 ";//用户接收 |
|||
else $sql .= " LEFT JOIN ".$shopTable." receive_s ON i.receive_id = receive_s.id AND i.receive_type = 2 ";//商户接收 |
|||
//信息列表获取 |
|||
$list = pdo_fetchall($sql.$where.$order.$limit); |
|||
foreach($list as $key => &$val){ |
|||
//发送方类型1=用户;2=商户 |
|||
if($val['send_type'] == 1) $val['send_type_text'] = '用户'; |
|||
else if($val['send_type'] == 2) $val['send_type_text'] = '商户'; |
|||
//接收人类型1=用户;2=商户 |
|||
if($val['receive_type'] == 1) $val['receive_type_text'] = '用户'; |
|||
else if($val['receive_type'] == 2) $val['receive_type_text'] = '商户'; |
|||
//图片信息处理 |
|||
$val['send_logo'] = tomedia($val['send_logo']); |
|||
$val['receive_logo'] = tomedia($val['receive_logo']); |
|||
$val['new_send_user'] = $val['send_user']; |
|||
if ($val['send_encodename']) $val['send_user'] = base64_decode($val['send_encodename']); |
|||
if ($val['receive_encodename']) $val['receive_user'] = base64_decode($val['receive_encodename']); |
|||
//信息处理 |
|||
if(is_base64($val['content'])) { |
|||
$val['content'] = base64_decode($val['content'],true); |
|||
$val['content'] = strip_tags($val['content']); |
|||
} |
|||
switch ($val['type']){ |
|||
case 1: $val['content'] = '[图片]';break; |
|||
case 2: $val['content'] = '[视频]';break; |
|||
case 3: $val['content'] = '[名片]';break; |
|||
case 4: $val['content'] = '[简历]';break; |
|||
case 5: $val['content'] = '[其他]';break; |
|||
} |
|||
//删除多余的信息 |
|||
unset($val['send_type']); |
|||
unset($val['receive_type']); |
|||
} |
|||
//分页操作 |
|||
$totalSql = str_replace($field,'count(*)',$sql); |
|||
$total = pdo_fetchcolumn($totalSql.$where.$order); |
|||
$pager = pagination($total , $page , $pageIndex); |
|||
|
|||
include wl_template('member/im/index'); |
|||
} |
|||
/** |
|||
* Comment: 获取通讯记录详细信息 |
|||
* Author: zzw |
|||
* Date: 2020/9/10 10:00 |
|||
*/ |
|||
public function record(){ |
|||
global $_W,$_GPC; |
|||
//参数信息获取 |
|||
$id = $_GPC['id'] OR show_json(0, '参数错误,请刷新重试!'); |
|||
$page = max(1, intval($_GPC['page'])); |
|||
$pageIndex = 10; |
|||
if($_W['ispost']){ |
|||
//获取当前通讯记录信息 |
|||
$info = pdo_get(PDO_NAME."im",['id'=>$id],['send_id','send_type','receive_id','receive_type']); |
|||
$data = Im::imRecord($page,$pageIndex,$info); |
|||
//信息排序 |
|||
$sortArr = array_column($data['list'], 'create_time'); |
|||
array_multisort($sortArr, SORT_ASC, $data['list']); |
|||
//循环处理信息 |
|||
foreach($data['list'] as $index => &$item){ |
|||
//获取名片和简历信息 内容类型:0=文本内容,1=图片信息,2=视频信息,3=名片信息,4=简历信息,5=其他信息(数组) |
|||
if($item['type'] == 3){ |
|||
//名片信息 |
|||
$field = ['name','logo','position','company','branch']; |
|||
$card = pdo_get(PDO_NAME."citycard_lists",['id' => $item['content']],$field); |
|||
$card['logo'] = tomedia($card['logo']); |
|||
$item['other'] = $card; |
|||
}else if($item['type'] == 4){ |
|||
//简历信息 |
|||
$field = ['name','avatar','birth_time','experience_label_id','education_label_id','expect_position']; |
|||
$resume = pdo_get(PDO_NAME."recruit_resume",['id' => $item['content']],$field); |
|||
$resume = Recruit::handleResumeInfo($resume); |
|||
$resume['name'] = mb_substr($resume['name'],0,1); |
|||
//删除多余的内容 |
|||
unset($resume['birth_time'],$resume['experience_label_id'],$resume['education_label_id'],$resume['expect_position']); |
|||
|
|||
$item['other'] = $resume; |
|||
} |
|||
} |
|||
|
|||
Commons::sRenderSuccess("通讯记录列表",$data); |
|||
} |
|||
|
|||
include wl_template('member/im/record'); |
|||
} |
|||
/** |
|||
* Comment: 删除单条通讯信息 |
|||
* Author: zzw |
|||
* Date: 2020/9/10 10:24 |
|||
*/ |
|||
public function deleteOneInfo(){ |
|||
global $_W,$_GPC; |
|||
//参数信息获取 |
|||
$id = $_GPC['id'] OR show_json(0, '参数错误,请刷新重试!'); |
|||
//开始进行删除操作 |
|||
pdo_delete(PDO_NAME."im",['id'=>$id]); |
|||
|
|||
show_json(1); |
|||
} |
|||
/** |
|||
* Comment: 清除某个对话的所有通信信息 |
|||
* Author: zzw |
|||
* Date: 2020/9/10 11:27 |
|||
*/ |
|||
public function clearRecord(){ |
|||
global $_W,$_GPC; |
|||
//参数信息获取 |
|||
$id = $_GPC['id'] OR show_json(0, '参数错误,请刷新重试!'); |
|||
//信息获取 |
|||
$info = pdo_get(PDO_NAME."im",['id'=>$id],['send_id','receive_id']); |
|||
//删除操作 |
|||
$res = Im::deleteRecord($info['send_id'],$info['receive_id']); |
|||
if($res) show_json(1, '操作成功!'); |
|||
else show_json(0, '清除失败,请刷新重试!'); |
|||
} |
|||
/** |
|||
* Comment: 通信设置 |
|||
* Author: zzw |
|||
* Date: 2021/3/8 10:59 |
|||
*/ |
|||
public function imSet(){ |
|||
global $_W,$_GPC; |
|||
$name = 'im_set'; |
|||
if($_W['ispost']){ |
|||
$data = $_GPC['data']; |
|||
|
|||
Setting::wlsetting_save($data,$name); |
|||
wl_message('设置成功!' , referer() , 'success'); |
|||
} |
|||
//获取已存在的设置信息 |
|||
$set = Setting::wlsetting_read($name); |
|||
|
|||
include wl_template('member/im/set'); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,59 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
class Userlabel_WeliamController { |
|||
|
|||
public function labellist() { |
|||
global $_W, $_GPC; |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$psize = 20; |
|||
$where['uniacid'] = $_W['uniacid']; |
|||
if ($_GPC['keyword']) { |
|||
$where['name@'] = trim($_GPC['keyword']); |
|||
} |
|||
$list = Util::getNumData('*', 'wlmerchant_userlabel', $where, 'sort DESC', $pindex, $psize, 1); |
|||
$pager = $list[1]; |
|||
$list = $list[0]; |
|||
|
|||
include wl_template('member/labellist'); |
|||
} |
|||
|
|||
public function add() { |
|||
global $_W, $_GPC; |
|||
$data['name'] = trim($_GPC['name']); |
|||
$data['sort'] = trim($_GPC['sort']); |
|||
$data['status'] = trim($_GPC['status']); |
|||
$data['uniacid'] = $_W['uniacid']; |
|||
$data['createtime'] = time(); |
|||
if (empty($data['name'])) { |
|||
show_json(0, '标签名称为空!'); |
|||
} |
|||
$res = pdo_insert('wlmerchant_userlabel', $data); |
|||
if ($res) { |
|||
show_json(1); |
|||
} else { |
|||
show_json(0, '保存失败,请重试'); |
|||
} |
|||
} |
|||
|
|||
public function changelabel() { |
|||
global $_W, $_GPC; |
|||
$id = $_GPC['id']; |
|||
$type = $_GPC['type']; |
|||
$newvalue = trim($_GPC['value']); |
|||
if ($type == 1) { |
|||
$res = pdo_update('wlmerchant_userlabel', array('name' => $newvalue), array('id' => $id)); |
|||
} elseif ($type == 2) { |
|||
$res = pdo_update('wlmerchant_userlabel', array('sort' => $newvalue), array('id' => $id)); |
|||
} elseif ($type == 3) { |
|||
$res = pdo_update('wlmerchant_userlabel', array('status' => $newvalue), array('id' => $id)); |
|||
} else if ($type == 4) { |
|||
$res = pdo_delete('wlmerchant_userlabel', array('id' => $id)); |
|||
} |
|||
if ($res) { |
|||
show_json(1, '修改成功'); |
|||
} else { |
|||
show_json(0, '修改失败,请重试'); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,816 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
class wlMember_WeliamController { |
|||
//客户概况 |
|||
public function index() { |
|||
global $_W, $_GPC; |
|||
//清理过期登录数据 |
|||
pdo_delete('wlmerchant_login',array('end_time <'=>time())); |
|||
// $allmembers = pdo_fetchall("select id,openid from `ims_wlmerchant_member` WHERE `openid` in ( select `openid` from `ims_wlmerchant_member` group by `openid` having count(`openid`)>1);"); |
|||
// $newdata = []; |
|||
// foreach ($allmembers as $key => $allmember) { |
|||
// if (!empty($allmember['openid'])) { |
|||
// $delmember = pdo_getall('wlmerchant_member', array('openid' => $allmember['openid'], 'uniacid' => $_W['uniacid']), ['id', 'openid', 'uniacid']); |
|||
// if (count($delmember) >= 1) { |
|||
// pdo_delete('wlmerchant_member', ['id' => $delmember[1]['id']]); |
|||
// $newdata[] = $delmember; |
|||
// } |
|||
// } |
|||
// } |
|||
$start = ($_GPC["start"] ? strtotime($_GPC["start"]) : strtotime(date("Y-m"))); |
|||
$end = ($_GPC["end"] ? strtotime($_GPC["end"]) + 86399 : strtotime(date("Y-m-d")) + 86399); |
|||
$day_num = ($end - $start) / 86400; |
|||
|
|||
if ($_W['isajax']) { |
|||
$days = array(); |
|||
for ($i = 0; $i < $day_num; $i++) { |
|||
$key = date("m-d", $start + 86400 * $i); |
|||
$days[$key] = 0; |
|||
} |
|||
$where = $_W['aid'] ? " AND aid = " . $_W['aid'] : ''; |
|||
|
|||
$data = pdo_fetchall("SELECT createtime FROM " . tablename("wlmerchant_member") . "WHERE uniacid = :uniacid AND createtime >= :starttime and createtime <= :endtime" . $where, array(":uniacid" => $_W["uniacid"], ":starttime" => $start, ":endtime" => $end)); |
|||
foreach ($data as $da) { |
|||
$key = date("m-d", $da["createtime"]); |
|||
if (in_array($key, array_keys($days))) { |
|||
$days[$key]++; |
|||
} |
|||
} |
|||
|
|||
$newdata = array(); |
|||
foreach ($days as $k => $val) { |
|||
$newdata[] = array('day' => $k, '新增客户' => $val); |
|||
} |
|||
|
|||
die(json_encode($newdata)); |
|||
} |
|||
|
|||
$stat = Merchant::sysMemberSurvey(); |
|||
|
|||
include wl_template('member/summary'); |
|||
} |
|||
//客户列表 |
|||
public function memberIndex() { |
|||
global $_W, $_GPC; |
|||
$where = $_W['aid'] ? ['aid' => $_W['aid']] : []; |
|||
static $account_api; |
|||
if (empty($account_api)) { |
|||
$account_api = WeAccount::create(); |
|||
} |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$psize = 10; |
|||
if ($_GPC['keyword'] && $_GPC['type']) { |
|||
if (!empty($_GPC['keyword'])) { |
|||
switch ($_GPC['type']) { |
|||
case 2 : |
|||
$where['@mobile@'] = $_GPC['keyword']; |
|||
break; |
|||
case 3 : |
|||
$where['@realname@'] = $_GPC['keyword']; |
|||
break; |
|||
case 5 : |
|||
$where['id'] = $_GPC['keyword']; |
|||
break; |
|||
default : |
|||
$where['@nickname@'] = $_GPC['keyword']; |
|||
} |
|||
} |
|||
} |
|||
|
|||
//时间 |
|||
if (!empty($_GPC['time_limit']) && $_GPC['timetype'] > 0) { |
|||
$starttime = strtotime($_GPC['time_limit']['start']); |
|||
$endtime = strtotime($_GPC['time_limit']['end']); |
|||
$where['createtime>'] = $starttime; |
|||
$where['createtime<'] = $endtime; |
|||
} |
|||
if (empty($starttime) || empty($endtime)) { |
|||
$starttime = strtotime('-1 month'); |
|||
$endtime = time(); |
|||
} |
|||
|
|||
if ($_GPC['mid']) { |
|||
$where['id'] = $_GPC['mid']; |
|||
} |
|||
//黑名单 |
|||
if ($_GPC['blackflag']) { |
|||
if ($_GPC['blackflag'] == 1) { |
|||
$where['blackflag'] = 1; |
|||
} else { |
|||
$where['blackflag'] = 0; |
|||
} |
|||
} |
|||
//用户身份 |
|||
if (!empty($_GPC['identity_id'])) $where['identity_id'] = $_GPC['identity_id']; |
|||
|
|||
//用户列表导出 |
|||
if($_GPC['export']){ |
|||
$this -> exportMmberList($where); |
|||
} |
|||
|
|||
$memberData = Util::getNumData("*", PDO_NAME . 'member', $where, 'id desc', $pindex, $psize, 1); |
|||
$list = $memberData[0]; |
|||
$pager = $memberData[1]; |
|||
|
|||
load()->model('mc'); |
|||
foreach ($list as $key => &$value) { |
|||
if (empty($value['openid']) && $value['uid']) { |
|||
$mfans = pdo_get('mc_mapping_fans', array('uid' => $value['uid'], 'uniacid' => $_W['uniacid']), array('openid')); |
|||
if ($mfans['openid']) { |
|||
$value['openid'] = $mfans['openid']; |
|||
pdo_update('wlmerchant_member', array('openid' => $mfans['openid']), array('id' => $value['id'])); |
|||
} |
|||
} |
|||
$result = mc_fansinfo($value['openid']); |
|||
$credit = pdo_get('mc_members', array('uid' => $value['uid']), array('credit1', 'credit2')); |
|||
$value['follow'] = $result['follow']; |
|||
$value['unfollowtime'] = $result['unfollowtime']; |
|||
$value['credit1'] = $credit['credit1']; |
|||
$value['credit2'] = $credit['credit2']; |
|||
$fans = pdo_get('mc_mapping_fans', array('openid' => $value['openid']), array('tag')); |
|||
$fans = base64_decode($fans['tag']); |
|||
$fans = unserialize($fans); |
|||
if(!empty($fans['headimgurl'])){ |
|||
$value['avatar'] = $fans['headimgurl']; |
|||
} |
|||
if(!empty($fans['nickname'])) { |
|||
$value['nickname'] = $fans['nickname']; |
|||
} |
|||
//pdo_update('wlmerchant_member', array('avatar' => $value['avatar'], 'nickname' => $value['nickname']), array('id' => $value['id'])); |
|||
if(!empty($value['encodename'])){ |
|||
$value['nickname'] = base64_decode($value['encodename']); |
|||
} |
|||
//推荐人 |
|||
if(empty($value['distributorid'])){ |
|||
$value['distributorid'] = pdo_getcolumn(PDO_NAME.'distributor',array('mid'=>$value['id']),'id'); |
|||
if( $value['distributorid'] > 0 ){ |
|||
pdo_update(PDO_NAME.'member',array('distributorid' => $value['distributorid']),array('id' => $value['id'])); |
|||
} |
|||
} |
|||
if ($value['distributorid']) { |
|||
$tjmid = pdo_getcolumn(PDO_NAME . 'distributor', array('id' => $value['distributorid']), 'leadid'); |
|||
$value['tjmid'] = $tjmid; |
|||
if ($tjmid > 0) { |
|||
$value['tjname'] = pdo_getcolumn(PDO_NAME . 'member', array('id' => $tjmid), 'nickname'); |
|||
} |
|||
} |
|||
|
|||
$identity_data = pdo_get(PDO_NAME . 'member_identity',['id' => $value['identity_id']]); // 获取身份 |
|||
$value['identity'] = $identity_data['name'] ?: '未知'; // 身份 |
|||
$value['is_show_identity'] = in_array($value['identity_id'],array(2,6)) ? true : false; // 是否显示达人赋予按钮 |
|||
|
|||
//统计订单和金额 |
|||
$dealnum1 = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_rush_order') . " WHERE mid = {$value['id']} AND uniacid = {$_W['uniacid']} AND status IN (1,2,3,4,6,8,9)"); |
|||
$dealnum2 = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_order') . " WHERE mid = {$value['id']} AND uniacid = {$_W['uniacid']} AND status IN (1,2,3,4,6,8,9)"); |
|||
$dealnum = $dealnum2 + $dealnum1; |
|||
|
|||
$dealmoney1 = pdo_fetchcolumn('SELECT SUM(actualprice) FROM ' . tablename('wlmerchant_rush_order') . " WHERE mid = {$value['id']} AND uniacid = {$_W['uniacid']} AND status IN (1,2,3,4,6,8,9)"); |
|||
$dealmoney2 = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . " WHERE mid = {$value['id']} AND uniacid = {$_W['uniacid']} AND status IN (1,2,3,4,6,8,9)"); |
|||
$dealmoney = $dealmoney1 + $dealmoney2; |
|||
$value['dealnum'] = $dealnum; |
|||
$value['dealmoney'] = $dealmoney; |
|||
pdo_update('wlmerchant_member', array('dealnum' => $dealnum, 'dealmoney' => $dealmoney), array('id' => $value['id'])); |
|||
} |
|||
|
|||
$identityList = pdo_getall(PDO_NAME . 'member_identity',['status' => 1],['id','name']); |
|||
include wl_template('member/listIndex'); |
|||
} |
|||
//导出用户信息 |
|||
public function exportMmberList($where) { |
|||
global $_W; |
|||
$memberData = Util::getNumData("*", PDO_NAME . 'member', $where, 'id desc', 0, 0, 1); |
|||
$list = $memberData[0]; |
|||
load()->model('mc'); |
|||
foreach ($list as $key => &$value) { |
|||
if (empty($value['openid']) && $value['uid']) { |
|||
$mfans = pdo_get('mc_mapping_fans', array('uid' => $value['uid'], 'uniacid' => $_W['uniacid']), array('openid')); |
|||
if ($mfans['openid']) { |
|||
$value['openid'] = $mfans['openid']; |
|||
pdo_update('wlmerchant_member', array('openid' => $mfans['openid']), array('id' => $value['id'])); |
|||
} |
|||
} |
|||
$result = mc_fansinfo($value['openid']); |
|||
$credit = pdo_get('mc_members', array('uid' => $value['uid']), array('credit1', 'credit2')); |
|||
$value['follow'] = $result['follow']; |
|||
$value['unfollowtime'] = $result['unfollowtime']; |
|||
$value['credit1'] = $credit['credit1']; |
|||
$value['credit2'] = $credit['credit2']; |
|||
if($value['follow'] > 0){ |
|||
$value['followst'] = '已关注'; |
|||
}else if($value['unfollowtime'] > 0){ |
|||
$value['followst'] = '取消关注'; |
|||
}else{ |
|||
$value['followst'] = '未关注'; |
|||
} |
|||
if(!empty($value['openid']) && !empty($value['wechat_openid'])){ |
|||
$value['source'] = '双渠道'; |
|||
}else if(!empty($value['openid'])){ |
|||
$value['source'] = '公众号'; |
|||
}else if(!empty($value['openid'])){ |
|||
$value['source'] = '小程序'; |
|||
} |
|||
if (empty($value['avatar']) || empty($value['nickname'])) { |
|||
$fans = pdo_get('mc_mapping_fans', array('openid' => $value['openid']), array('tag')); |
|||
$fans = base64_decode($fans['tag']); |
|||
$fans = unserialize($fans); |
|||
$value['avatar'] = $fans['headimgurl']; |
|||
$value['nickname'] = $fans['nickname']; |
|||
pdo_update('wlmerchant_member', array('avatar' => $value['avatar'], 'nickname' => $value['nickname']), array('id' => $value['id'])); |
|||
} |
|||
if ($value['distributorid']>0) { |
|||
$tjmid = pdo_getcolumn(PDO_NAME . 'distributor', array('id' => $value['distributorid']), 'leadid'); |
|||
if ($tjmid > 0) { |
|||
$value['tjname'] = pdo_getcolumn(PDO_NAME . 'member', array('id' => $tjmid), 'nickname'); |
|||
}else{ |
|||
$value['tjname'] = "- 无 -"; |
|||
} |
|||
} |
|||
//统计订单和金额 |
|||
$dealnum1 = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_rush_order') . " WHERE mid = {$value['id']} AND uniacid = {$_W['uniacid']} AND status IN (1,2,3,4,6,8,9)"); |
|||
$dealnum2 = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_order') . " WHERE mid = {$value['id']} AND uniacid = {$_W['uniacid']} AND status IN (1,2,3,4,6,8,9)"); |
|||
$dealnum = $dealnum2 + $dealnum1; |
|||
|
|||
$dealmoney1 = pdo_fetchcolumn('SELECT SUM(actualprice) FROM ' . tablename('wlmerchant_rush_order') . " WHERE mid = {$value['id']} AND uniacid = {$_W['uniacid']} AND status IN (1,2,3,4,6,8,9)"); |
|||
$dealmoney2 = pdo_fetchcolumn('SELECT SUM(price) FROM ' . tablename('wlmerchant_order') . " WHERE mid = {$value['id']} AND uniacid = {$_W['uniacid']} AND status IN (1,2,3,4,6,8,9)"); |
|||
$dealmoney = $dealmoney1 + $dealmoney2; |
|||
$value['dealnum'] = $dealnum; |
|||
$value['dealmoney'] = $dealmoney; |
|||
pdo_update('wlmerchant_member', array('dealnum' => $dealnum, 'dealmoney' => $dealmoney), array('id' => $value['id'])); |
|||
} |
|||
|
|||
/* 输出表头 */ |
|||
$filter = array( |
|||
'id' => '用户MID',//U |
|||
'nickname' => '用户昵称',//A |
|||
'realname' => '真实姓名',//B |
|||
'mobile' => '手机号',//E |
|||
'source' => '渠道', |
|||
'credit1' => '积分',//C |
|||
'credit2' => '余额',//D |
|||
'createtime' => '注册时间',//F |
|||
'dealnum' => '商品订单量',//G |
|||
'dealmoney' => '商品订单金额',//H |
|||
'followst' => '关注状态', |
|||
'card_number' => '银行卡账号', |
|||
'bank_name' => '开户行', |
|||
'alipay' => '支付宝账号', |
|||
'tjname' => '推荐人' |
|||
); |
|||
|
|||
$data = array(); |
|||
for ($i=0; $i < count($list) ; $i++) { |
|||
foreach ($filter as $key => $title) { |
|||
$data[$i][$key] = $list[$i]['id']; |
|||
if ($key == 'createtime') { |
|||
$data[$i][$key] = "\t".date('Y-m-d H:i:s', $list[$i][$key])."\t"; |
|||
}else { |
|||
$data[$i][$key] = $list[$i][$key]; |
|||
} |
|||
} |
|||
} |
|||
util_csv::export_csv_2($data, $filter, '用户表.csv'); |
|||
exit(); |
|||
} |
|||
//用户详细信息 |
|||
public function memberDetail() { |
|||
global $_W, $_GPC; |
|||
$id = intval($_GPC['id']); |
|||
|
|||
if ($_W['ispost']) { |
|||
$data = is_array($_GPC['data']) ? $_GPC['data'] : array(); |
|||
|
|||
if (!empty($data['mobile'])) { |
|||
$m = pdo_fetch('select id from ' . tablename('wlmerchant_member') . ' where mobile=:mobile and uniacid=:uniaicd limit 1 ', array(':mobile' => $data['mobile'], ':uniaicd' => $_W['uniacid'])); |
|||
if (!empty($m) && $m['id'] != $id) { |
|||
show_json(0, '此手机号已绑定其他用户!(mid:' . $m['id'] . ')'); |
|||
} |
|||
} |
|||
|
|||
$data['password'] = trim($data['password']); |
|||
if (!empty($data['password'])) { |
|||
$salt = pdo_getcolumn(PDO_NAME . 'member', array('id' => $id, 'uniacid' => $_W['uniacid']), 'salt'); |
|||
if (empty($salt)) { |
|||
$salt = random(8); |
|||
} |
|||
$data['password'] = md5($data['password'] . $salt); |
|||
$data['salt'] = $salt; |
|||
} else { |
|||
unset($data['password']); |
|||
unset($data['salt']); |
|||
} |
|||
|
|||
pdo_update('wlmerchant_member', $data, array('id' => $id, 'uniacid' => $_W['uniacid'])); |
|||
show_json(1); |
|||
} |
|||
$member = Member::wl_member_get($id); |
|||
$result = mc_fansinfo($member['openid']); |
|||
if (!empty($result)) { |
|||
$member['follow'] = $result['follow']; |
|||
$member['unfollowtime'] = $result['unfollowtime']; |
|||
} |
|||
if($member['distributorid']>0){ |
|||
$member['leadid'] = pdo_getcolumn(PDO_NAME.'distributor',array('id'=>$member['distributorid']),'leadid'); |
|||
$member['leadname'] = pdo_getcolumn(PDO_NAME.'member',array('id'=>$member['leadid']),'nickname'); |
|||
} |
|||
|
|||
include wl_template('member/listDetail'); |
|||
} |
|||
//拉黑用户 |
|||
public function toblack() { |
|||
global $_W, $_GPC; |
|||
$id = intval($_GPC['id']); |
|||
$flag = intval($_GPC['flag']); |
|||
pdo_update('wlmerchant_member', array('blackflag' => $flag), array('id' => $id, 'uniacid' => $_W['uniacid'])); |
|||
//同时删除所有帖子 |
|||
if ($flag) { |
|||
pdo_update('wlmerchant_pocket_informations', array('status' => 3), array('mid' => $id, 'uniacid' => $_W['uniacid'])); |
|||
} |
|||
show_json(1, array('url' => referer())); |
|||
} |
|||
//删除用户 |
|||
public function memberDelete() { |
|||
global $_W, $_GPC; |
|||
$id = intval($_GPC['id']); |
|||
pdo_delete('wlmerchant_distributor', array('mid' => $id, 'uniacid' => $_W['uniacid'])); |
|||
pdo_delete('wlmerchant_member', array('id' => $id, 'uniacid' => $_W['uniacid'])); |
|||
//同步删除相关招聘信息 |
|||
pdo_delete(PDO_NAME."recruit_recruit",['recruitment_type'=>1,'release_mid'=>$id]); |
|||
|
|||
show_json(1, array('url' => referer())); |
|||
} |
|||
//用户账户 |
|||
public function memberRecharge() { |
|||
global $_W, $_GPC; |
|||
$type = trim($_GPC['type']); |
|||
$id = intval($_GPC['id']); |
|||
$profile = Member::wl_member_get($id); |
|||
|
|||
if ($_W['ispost']) { |
|||
$typestr = $type == 'credit1' ? '积分' : '余额'; |
|||
$num = floatval($_GPC['num']); |
|||
$remark = trim($_GPC['remark']) ? trim($_GPC['remark']) : '后台手动操作'; |
|||
|
|||
if ($num <= 0) { |
|||
show_json(0, array('message' => '请填写大于0的数字!')); |
|||
} |
|||
|
|||
$changetype = intval($_GPC['changetype']); |
|||
if ($changetype == 0) { |
|||
$changenum = $num; |
|||
} else { |
|||
$changenum = 0 - $num; |
|||
} |
|||
|
|||
$data = ($type == 'credit1') ? Member::credit_update_credit1($id, $changenum, $remark) : Member::credit_update_credit2($id, $changenum, $remark); |
|||
if (is_error($data)) { |
|||
show_json(0, array('message' => $data['message'])); |
|||
} |
|||
|
|||
show_json(1, array('url' => referer())); |
|||
} |
|||
|
|||
include wl_template('member/listRecharge'); |
|||
} |
|||
//合并用户信息 |
|||
public function membermerge() { |
|||
global $_W, $_GPC; |
|||
if ($_W['ispost']) { |
|||
$cache_data = Cache::getCache('member', 'mergedata'); |
|||
if ($cache_data['total'] == $cache_data['success']) { |
|||
Cache::deleteCache('member', 'mergedata'); |
|||
wl_json(1); |
|||
} |
|||
|
|||
$datas = ['mobile', 'unionid']; |
|||
foreach ($datas as $data) { |
|||
if (!empty($cache_data['data'][$data])) { |
|||
Member::wl_member_merge($cache_data['data'][$data][0], $data); |
|||
unset($cache_data['data'][$data][0]); |
|||
$cache_data['data'][$data] = array_values($cache_data['data'][$data]); |
|||
$cache_data['success'] = $cache_data['success'] + 1; |
|||
break; |
|||
} |
|||
} |
|||
|
|||
Cache::setCache('member', 'mergedata', $cache_data); |
|||
wl_json(0, '', array('total' => $cache_data['total'], 'success' => $cache_data['success'])); |
|||
} |
|||
$mobiles = $this->membermerge_sql('mobile'); |
|||
$nomobile = pdo_getcolumn('wlmerchant_member', array('uniacid' => $_W['uniacid'], 'mobile' => ''), 'COUNT(id)'); |
|||
$unionids = $this->membermerge_sql('unionid'); |
|||
$nounionid = pdo_getcolumn('wlmerchant_member', array('uniacid' => $_W['uniacid'], 'unionid' => ''), 'COUNT(id)'); |
|||
|
|||
$cache_data = ['total' => count($mobiles) + count($unionids), 'success' => 0, 'data' => ['mobile' => $mobiles, 'unionid' => $unionids]]; |
|||
Cache::setCache('member', 'mergedata', $cache_data); |
|||
|
|||
include wl_template('member/membermerge'); |
|||
} |
|||
//执行用户合并操作 |
|||
private function membermerge_sql($field) { |
|||
global $_W; |
|||
// $members = pdo_fetchall("select `id`,`{$field}` from " . tablename('wlmerchant_member') . " WHERE `uniacid` = {$_W['uniacid']} AND `{$field}` in ( select `{$field}` from " . tablename('wlmerchant_member') . " WHERE `uniacid` = {$_W['uniacid']} AND `{$field}` <> '' group by `{$field}` having count(`mobile`) > 1);"); |
|||
// if (empty($members)) { |
|||
// return []; |
|||
// } |
|||
$merge_data = []; |
|||
// foreach ($members as $member) { |
|||
// if (!in_array($member[$field], $merge_data)) { |
|||
// array_push($merge_data, $member[$field]); |
|||
// } |
|||
// } |
|||
$members = pdo_fetchall("select `{$field}`,count(*) as count from".tablename('wlmerchant_member')." WHERE uniacid = {$_W['uniacid']} group by `{$field}` having count>1 "); |
|||
foreach ($members as $mem){ |
|||
if(strlen($mem[$field])>1){ |
|||
$merge_data[] = $mem[$field]; |
|||
} |
|||
} |
|||
return $merge_data; |
|||
} |
|||
//同步用户信息 |
|||
public function membersync() { |
|||
global $_W, $_GPC; |
|||
if ($_W['ispost']) { |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$sync_fans = pdo_getslice('wlmerchant_member', array('uniacid' => $_W['uniacid']), array($pindex, 50), $total, array('id', 'openid')); |
|||
$total = ceil($total / 50); |
|||
foreach ($sync_fans as $sync_fan) { |
|||
if (!empty($sync_fan['openid'])) { |
|||
$userinfo = Member::wl_fans_info($sync_fan['openid']); |
|||
Member::wl_member_update($userinfo, $sync_fan['id']); |
|||
} |
|||
} |
|||
wl_json(0, '', array('pindex' => $pindex, 'total' => $total)); |
|||
} |
|||
include wl_template('member/membersync'); |
|||
} |
|||
//导入系统粉丝 |
|||
public function memberImport() { |
|||
global $_W, $_GPC; |
|||
if ($_W['ispost']) { |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$sync_fans = pdo_getslice('mc_mapping_fans', array('uniacid' => $_W['uniacid']), array($pindex, 50), $total, array('openid')); |
|||
$total = ceil($total / 50); |
|||
foreach ($sync_fans as $sync_fan) { |
|||
if (!empty($sync_fan['openid'])) { |
|||
$userinfo = Member::wl_fans_info($sync_fan['openid']); |
|||
Member::wl_member_create($userinfo); |
|||
} |
|||
} |
|||
wl_json(0, '', array('pindex' => $pindex, 'total' => $total)); |
|||
} |
|||
include wl_template('member/memberImport'); |
|||
} |
|||
//选择用户 |
|||
public function selectMember() { |
|||
global $_W, $_GPC; |
|||
$where = array(); |
|||
$keyword = trim($_GPC['keyword']); |
|||
if ($keyword != '') |
|||
$where['nickname^openid^uid'] = $keyword; |
|||
$dsData = Util::getNumData('nickname,avatar,openid', PDO_NAME . 'member', $where, 'id desc', 0, 0, 0); |
|||
$ds = $dsData[0]; |
|||
include wl_template('member/selectMember'); |
|||
} |
|||
|
|||
|
|||
//用户设置 |
|||
public function userset() { |
|||
global $_W, $_GPC; |
|||
$settings = Setting::wlsetting_read('userset'); |
|||
$settings['plugin'] = unserialize($settings['plugin']); |
|||
if (checksubmit('submit')) { |
|||
$base = Util::trimWithArray($_GPC['userset']); |
|||
$base['plugin'] = serialize($_GPC['plugin']); |
|||
Setting::wlsetting_save($base, 'userset'); |
|||
show_json(1); |
|||
} |
|||
|
|||
include wl_template('member/userset'); |
|||
} |
|||
|
|||
|
|||
|
|||
//转赠列表 |
|||
public function transferlist(){ |
|||
global $_W, $_GPC; |
|||
#1、获取基本参数 |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$psize = 20; |
|||
$start = $pindex * $psize - $psize; |
|||
$keyword = $_GPC['keyword'];//关键字 |
|||
$keywordtype = $_GPC['keywordtype'];//关键字类型 |
|||
$timeLimit = $_GPC['time_limit'];//时间段 |
|||
$where = " a.uniacid = {$_W['uniacid']} "; |
|||
|
|||
if ($keyword) { |
|||
if ($keywordtype == 1) { |
|||
$where .= " AND b.id LIKE '%{$keyword}%'"; |
|||
} else if ($keywordtype == 2) { |
|||
$where .= " AND b.nickname LIKE '%{$keyword}%'"; |
|||
} else if ($keywordtype == 3) { |
|||
$where .= " AND b.mobile LIKE '%{$keyword}%'"; |
|||
} else if ($keywordtype == 4) { |
|||
$where .= " AND a.allmoney > '{$keyword}'"; |
|||
} else if ($keywordtype == 5) { |
|||
$where .= " AND a.allmoney < '{$keyword}'"; |
|||
} else if ($keywordtype == 6) { |
|||
$where .= " AND a.id LIKE '%{$keyword}%'"; |
|||
} else if ($keywordtype == 7) { |
|||
$where .= " AND a.title LIKE '%{$keyword}%'"; |
|||
} |
|||
} |
|||
|
|||
if ($timeLimit) { |
|||
$starttime = strtotime($timeLimit['start']); |
|||
$endtime = strtotime($timeLimit['end']); |
|||
$where .= " AND a.createtime >= {$starttime} "; |
|||
$where .= " AND a.createtime <= {$endtime} "; |
|||
} |
|||
if (empty($starttime) || empty($endtime)) { |
|||
$starttime = strtotime('-1 month'); |
|||
$endtime = time(); |
|||
} |
|||
$limit = " LIMIT {$start},{$psize}"; |
|||
$sql = "SELECT a.id,a.mid,a.allnum,a.title,a.surplus,a.allmoney,a.money,a.createtime,b.nickname,b.avatar FROM " |
|||
. tablename("wlmerchant_transfer_list") |
|||
. " a LEFT JOIN " . tablename(PDO_NAME . "member") . " b ON a.mid = b.id WHERE {$where} ORDER BY a.createtime DESC"; |
|||
|
|||
$total = pdo_fetchcolumn('SELECT count(a.id) FROM ' . tablename('wlmerchant_transfer_list') . " a LEFT JOIN " . tablename(PDO_NAME . "member") . " b ON a.mid = b.id WHERE {$where}"); |
|||
$pager = wl_pagination($total, $pindex, $psize); |
|||
$lists = pdo_fetchall($sql . $limit); |
|||
|
|||
|
|||
include wl_template('member/transferlist'); |
|||
} |
|||
//转赠记录 |
|||
public function transferrecord(){ |
|||
global $_W, $_GPC; |
|||
#1、获取基本参数 |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$psize = 20; |
|||
$start = $pindex * $psize - $psize; |
|||
$keyword = $_GPC['keyword'];//关键字 |
|||
$keywordtype = $_GPC['keywordtype'];//关键字类型 |
|||
$timeLimit = $_GPC['time_limit'];//时间段 |
|||
$where = " a.uniacid = {$_W['uniacid']} "; |
|||
|
|||
if ($keyword) { |
|||
if ($keywordtype == 1) { |
|||
$where .= " AND b.id LIKE '%{$keyword}%'"; |
|||
} else if ($keywordtype == 2) { |
|||
$where .= " AND b.nickname LIKE '%{$keyword}%'"; |
|||
} else if ($keywordtype == 3) { |
|||
$where .= " AND b.mobile LIKE '%{$keyword}%'"; |
|||
} else if ($keywordtype == 4) { |
|||
$where .= " AND d.id LIKE '%{$keyword}%'"; |
|||
} else if ($keywordtype == 5) { |
|||
$where .= " AND d.title LIKE '%{$keyword}%'"; |
|||
} |
|||
} |
|||
|
|||
if ($timeLimit) { |
|||
$starttime = strtotime($timeLimit['start']); |
|||
$endtime = strtotime($timeLimit['end']); |
|||
$where .= " AND a.createtime >= {$starttime} "; |
|||
$where .= " AND a.createtime <= {$endtime} "; |
|||
} |
|||
if (empty($starttime) || empty($endtime)) { |
|||
$starttime = strtotime('-1 month'); |
|||
$endtime = time(); |
|||
} |
|||
$limit = " LIMIT {$start},{$psize}"; |
|||
$sql = "SELECT a.tid,a.mid,a.money,d.title,a.realname,a.mobile,a.createtime,b.nickname,b.avatar FROM " |
|||
. tablename("wlmerchant_transfer_record") |
|||
. " as a LEFT JOIN " . tablename(PDO_NAME . "member") . " as b ON a.mid = b.id " |
|||
. " LEFT JOIN " . tablename(PDO_NAME . "transfer_list") . " as d ON a.tid = d.id WHERE {$where} ORDER BY a.createtime DESC"; |
|||
|
|||
$total = pdo_fetchcolumn('SELECT count(a.id) FROM ' . tablename('wlmerchant_transfer_record') . " as a LEFT JOIN " . tablename(PDO_NAME . "member") . " as b ON a.mid = b.id LEFT JOIN " . tablename(PDO_NAME . "transfer_list") . " as d ON a.tid = d.id WHERE {$where}"); |
|||
|
|||
|
|||
$pager = wl_pagination($total, $pindex, $psize); |
|||
$lists = pdo_fetchall($sql . $limit); |
|||
|
|||
|
|||
include wl_template('member/transferrecord'); |
|||
} |
|||
|
|||
|
|||
//导出可转赠记录 |
|||
|
|||
public function exportTransfer(){ |
|||
global $_W, $_GPC; |
|||
$mid = $_GPC['mid']; |
|||
$nickname = pdo_getcolumn(PDO_NAME.'member',array('id'=>$mid),'nickname'); |
|||
$transfer = []; |
|||
//获取卡券列表 |
|||
$coupons = pdo_getall('wlmerchant_member_coupons',array('status' => 1,'uniacid' => $_W['uniacid'],'mid' => $mid),array('transferflag','id','parentid','title','sub_title'),'','ID DESC'); |
|||
if(!empty($coupons)){ |
|||
foreach ($coupons as $cou){ |
|||
$parentcoupons = pdo_get('wlmerchant_couponlist',array('id' => $cou['parentid']),array('transferstatus','transfermore')); |
|||
if($parentcoupons['transferstatus'] > 0){ |
|||
if(empty($cou['transferflag']) || $parentcoupons['transfermore'] > 0) { |
|||
$obj = [ |
|||
'id' => $cou['id'], |
|||
'type' => 1, |
|||
'title' => $cou['title'], |
|||
'desc' => $cou['sub_title'], |
|||
'mobile' => '' |
|||
]; |
|||
$transfer[] = $obj; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
//获取红包列表 |
|||
$redpacks = pdo_getall('wlmerchant_redpack_records',array('status' => 0,'uniacid' => $_W['uniacid'],'mid' => $mid),array('transferflag','id','packid'),'','ID DESC'); |
|||
if(!empty($redpacks)){ |
|||
foreach ($redpacks as $red){ |
|||
$parent = pdo_get('wlmerchant_redpacks',array('id' => $red['packid']),array('title','transferstatus','transfermore','full_money','cut_money')); |
|||
if($parent['transferstatus'] > 0){ |
|||
if(empty($red['transferflag']) || $parent['transfermore'] > 0) { |
|||
if($parent['full_money'] > 0){ |
|||
$desc = '满'.$parent['full_money'].'元减'.$parent['cut_money'].'元'; |
|||
}else{ |
|||
$desc = '立减'.$parent['cut_money'].'元'; |
|||
} |
|||
$obj = [ |
|||
'id' => $red['id'], |
|||
'type' => 2, |
|||
'title' => $parent['title'], |
|||
'desc' => $desc, |
|||
'mobile' => '' |
|||
]; |
|||
$transfer[] = $obj; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
if(empty($transfer)){ |
|||
wl_message('用户无可转赠卡券与红包'); |
|||
} |
|||
//导出 |
|||
/* 输出表头 */ |
|||
$filter = array( |
|||
'id' => '对象id',//U |
|||
'type' => '对象类型(1卡券2红包)',//A |
|||
'title' => '名称',//B |
|||
'desc' => '描述',//E |
|||
'mobile' => '被转赠手机号' |
|||
); |
|||
util_csv::export_csv_2($transfer, $filter, $nickname.'可转增列表.csv'); |
|||
exit(); |
|||
} |
|||
|
|||
|
|||
public function transferSend(){ |
|||
global $_W, $_GPC; |
|||
#1、将获取基本信息 |
|||
$name = $_GPC['name'];//文件储存路径 |
|||
$fullName = PATH_ATTACHMENT . $name;//文件在本地服务器暂存地址 |
|||
#2、读取excel中的内容 |
|||
$info = util_csv::read_csv_lines($fullName, 999, 0); |
|||
unlink($fullName);//获取文件信息后将.cvs文件删除 |
|||
#3、对读取到的信息进行处理 |
|||
foreach ($info as $k => &$v) { |
|||
//3-1 判断是否存在数据 不存在是空行,不进行任何操作 |
|||
if (!is_array($v)) { |
|||
unset($info[$k]); |
|||
continue; |
|||
} |
|||
//3-2 编码转换 由gbk转为urf-8 |
|||
$separator = '*separator*';//分割符 写成长字符串 防止出错 |
|||
$encodres = mb_detect_encoding(implode($separator, $v), array("ASCII","GB2312","GBK","UTF-8")); |
|||
if($encodres != 'UTF-8'){ |
|||
$v = explode($separator, iconv('gbk', 'utf-8', implode($separator, $v))); |
|||
} |
|||
//处理转赠送 |
|||
$inRes = 0; |
|||
if (empty($v[4])){ |
|||
$v['send_result'] = '无手机号,不转赠'; |
|||
continue; |
|||
} |
|||
$getMember = pdo_get('wlmerchant_member',array('mobile' => $v[4],'uniacid' => $_W['uniacid']),array('id','nickname')); |
|||
if(empty($getMember)){ |
|||
$v['send_result'] = '手机号不存在,无法转赠'; |
|||
continue; |
|||
} |
|||
if($v[1] == 1){ |
|||
$coupon = pdo_get('wlmerchant_member_coupons',array('id' => $v[0]),array('mid','parentid','status','title','orderno','transferflag')); |
|||
$omid = $coupon['mid']; |
|||
if($getMember['id'] == $coupon['mid']){ |
|||
$v['send_result'] = '不能转赠给自己'; |
|||
continue; |
|||
} |
|||
if($coupon['status'] != 1){ |
|||
$v['send_result'] = '卡券状态错误,无法转赠'; |
|||
continue; |
|||
} |
|||
if(empty($coupon['transferflag'])){ |
|||
pdo_update('wlmerchant_order',array('status' => 2),array('orderno' => $coupon['orderno'],'status' => 1)); //修改订单状态 |
|||
} |
|||
$res1 = pdo_update('wlmerchant_member_coupons',array('mid' => $getMember['id'],'transferflag' => 1),array('id' => $v[0])); //修改卡券所属用户 |
|||
$res3 = pdo_update('wlmerchant_smallorder',array('mid' => $getMember['id']),array('orderno' => $coupon['orderno'])); //修改子订单状态 |
|||
if(empty($res1) || empty($res3)){ |
|||
$v['send_result'] = '转赠失败,请联系管理员'; |
|||
continue; |
|||
} |
|||
}else{ |
|||
$redapck = pdo_get('wlmerchant_redpack_records',array('id' => $v[0]),array('mid','packid','status','transferflag')); |
|||
$omid = $redapck['mid']; |
|||
if($getMember['id'] == $redapck['mid']){ |
|||
$v['send_result'] = '不能转赠给自己'; |
|||
continue; |
|||
} |
|||
if($redapck['status'] != 0){ |
|||
$v['send_result'] = '红包状态错误,无法转赠'; |
|||
continue; |
|||
} |
|||
$res1 = pdo_update('wlmerchant_redpack_records',array('mid' => $getMember['id'],'transferflag' => 1),array('id' => $v[0])); //修改红包所属用户 |
|||
if(empty($res1)){ |
|||
$v['send_result'] = '转赠失败,请联系管理员'; |
|||
continue; |
|||
} |
|||
} |
|||
//生成转赠记录 |
|||
$data = [ |
|||
'uniacid' => $_W['uniacid'], |
|||
'type' => $v[1], |
|||
'objid' => $v[0], |
|||
'omid' => $omid, |
|||
'nmid' => $getMember['id'], |
|||
'status' => 1, |
|||
'createtime' => time(), |
|||
'gettime' => time(), |
|||
'transfermode' => 3, |
|||
'mobile' => $v[4] |
|||
]; |
|||
$inRes = pdo_insert(PDO_NAME . 'transferRecord', $data); |
|||
if($inRes > 0){ |
|||
$v['send_result'] = '转赠成功'; |
|||
}else{ |
|||
$v['send_result'] = '转赠失败,请联系管理员'; |
|||
} |
|||
} |
|||
|
|||
#4、定义结果表格的标题 |
|||
$filter = array( |
|||
0 => '对象id', |
|||
1 => '对象类型', |
|||
2 => '名称', |
|||
3 => '描述', |
|||
4 => '转赠人手机号', |
|||
'send_result' => '转赠结果', |
|||
); |
|||
#5、返回批量发货的结果信息表 |
|||
util_csv::save_csv($info, $filter, $_W['uniacid'].'/'.date('Y-m-d',time()).'/'.'批量转赠结果信息'.date('Y-m-d',time()).'.csv'); |
|||
util_csv::export_csv_2($info, $filter, '批量转赠结果信息'.date('Y-m-d',time()).'.csv'); |
|||
} |
|||
|
|||
/* |
|||
* 变更为达人 |
|||
*/ |
|||
public function changeUserIdentity(){ |
|||
global $_W, $_GPC; |
|||
|
|||
$id = intval($_GPC['id']); |
|||
if (empty($id) || !is_numeric($id)) show_json(0, '参数有误'); |
|||
$member_res = pdo_get(PDO_NAME . 'member',array( |
|||
'id' => $id, |
|||
'identity_id' => array(2,6) |
|||
),'identity_id'); |
|||
if (!$member_res) show_json(0,'数据有误,请重试'); |
|||
$identity_id = 7; |
|||
$result = pdo_update(PDO_NAME . 'member', array('identity_id' => $identity_id), array('id' => $id)); |
|||
if ($result) { |
|||
show_json(1,[ |
|||
'message' => '成功', |
|||
'url' => referer() |
|||
]); |
|||
} |
|||
show_json(0,'失败'); |
|||
} |
|||
|
|||
// 个人权限 |
|||
public function memberRights() |
|||
{ |
|||
global $_W, $_GPC; |
|||
$id = intval($_GPC['id']); |
|||
$profile = Member::wl_member_get($id); |
|||
$rights = unserialize($profile['rights']); |
|||
if ($_W['ispost']) { |
|||
|
|||
$rights = $_GPC['rights']; |
|||
|
|||
$update = pdo_update(PDO_NAME . 'member',['rights' => serialize($rights)],['id' => $id]); |
|||
if (!$update) show_json(0, array('message' => '提交失败')); |
|||
|
|||
show_json(1, array('url' => referer())); |
|||
} |
|||
|
|||
include wl_template('member/rightsIndex'); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,247 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
|
|||
/** |
|||
* Comment: 售后信息处理 |
|||
* Author: zzw |
|||
* Date: 2021/1/7 17:28 |
|||
* Class OrderAfterSales_WeliamController |
|||
*/ |
|||
class OrderAfterSales_WeliamController { |
|||
/** |
|||
* Comment: 售后记录表 |
|||
* Author: wlf |
|||
*/ |
|||
public function afterlist(){ |
|||
global $_W,$_GPC; |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$psize = 10; |
|||
$where['uniacid'] = $_W['uniacid']; |
|||
if(is_agent()) { |
|||
$where['aid'] = $_W['aid']; |
|||
} |
|||
if(is_store()) { |
|||
$where['sid'] = $_W['storeid']; |
|||
} |
|||
if(!empty($_GPC['plugin'])){ |
|||
$where['plugin'] = $_GPC['plugin']; |
|||
} |
|||
if(!empty($_GPC['status'])){ |
|||
$where['status'] = $_GPC['status']; |
|||
} |
|||
if(!empty($_GPC['keyword'])){ |
|||
$keyword = $_GPC['keyword']; |
|||
if($_GPC['keywordtype'] == 1){ |
|||
$where['orderno@']= trim($keyword); |
|||
}else if($_GPC['keywordtype'] == 2){ |
|||
$where['sid']= trim($keyword); |
|||
}else if($_GPC['keywordtype'] == 3){ |
|||
$where['mid']= trim($keyword); |
|||
} |
|||
} |
|||
//时间 |
|||
if (!empty($_GPC['time_limit']) && $_GPC['timetype'] ) { |
|||
$starttime = strtotime($_GPC['time_limit']['start']); |
|||
$endtime = strtotime($_GPC['time_limit']['end']); |
|||
if($_GPC['timetype'] == 1){ |
|||
$where['createtime>'] = $starttime; |
|||
$where['createtime<'] = $endtime; |
|||
}else{ |
|||
$where['dotime>'] = $starttime; |
|||
$where['dotime<'] = $endtime; |
|||
} |
|||
} |
|||
if (empty($starttime) || empty($endtime)) { |
|||
$starttime = strtotime('-1 month'); |
|||
$endtime = time(); |
|||
} |
|||
|
|||
|
|||
$afterData = Util::getNumData("*", PDO_NAME . 'aftersale', $where, 'createtime desc', $pindex, $psize, 1); |
|||
$afterlist = $afterData[0]; |
|||
$pager = $afterData[1]; |
|||
foreach ($afterlist as &$after){ |
|||
$member = pdo_get('wlmerchant_member',array('id' => $after['mid']),array('mobile','nickname','realname')); |
|||
$store = ''; |
|||
if($after['plugin'] == 'rush'){ |
|||
$order = pdo_get('wlmerchant_rush_order',array('id' => $after['orderid']),array('sid','blendcredit','activityid','price','expressid','paytype','actualprice','num','optionid')); |
|||
$goods = pdo_get('wlmerchant_rush_activity',array('id' => $order['activityid']),array('name','thumb')); |
|||
// if($order['expressid']){ |
|||
// $expressprice = pdo_getcolumn(PDO_NAME.'express',array('id'=>$order['expressid']),'expressprice'); |
|||
// $rushprice = $order['price'] - $expressprice; |
|||
// }else{ |
|||
// $rushprice = $order['price']; |
|||
// } |
|||
$after['goodsprice'] = sprintf("%.2f",$order['price']/$order['num']); |
|||
if($order['optionid']){ |
|||
$after['optiontitle'] = pdo_getcolumn(PDO_NAME.'goods_option',array('id'=>$order['optionid']),'title'); |
|||
} |
|||
$after['orderprice'] = $order['actualprice']; |
|||
$after['plugintext'] = '抢购'; |
|||
$after['plugincss'] = 'success'; |
|||
$after['goodsid'] = $order['activityid']; |
|||
$after['ordertype'] = 'a'; |
|||
$after['detailurl'] = web_url('order/wlOrder/orderdetail',array('orderid'=>$after['orderid'],'type'=>1,'is_jurisdiction'=>1)); |
|||
}else if($after['plugin'] == 'groupon'){ |
|||
$order = pdo_get('wlmerchant_order',array('id' => $after['orderid']),array('sid','blendcredit','fkid','price','expressid','paytype','goodsprice','num','specid')); |
|||
$goods = pdo_get('wlmerchant_groupon_activity',array('id' => $order['fkid']),array('name','thumb')); |
|||
$after['goodsprice'] = sprintf("%.2f",$order['goodsprice']/$order['num']); |
|||
if($order['specid']){ |
|||
$after['optiontitle'] = pdo_getcolumn(PDO_NAME.'goods_option',array('id'=>$order['specid']),'title'); |
|||
} |
|||
$after['orderprice'] = $order['price']; |
|||
$after['plugintext'] = '团购'; |
|||
$after['plugincss'] = 'info'; |
|||
$after['goodsid'] = $order['fkid']; |
|||
$after['ordertype'] = 'b'; |
|||
$after['detailurl'] = web_url('order/wlOrder/orderdetail',array('orderid'=>$after['orderid'],'type'=>10,'is_jurisdiction'=>1)); |
|||
}else if($after['plugin'] == 'activity'){ |
|||
$order = pdo_get('wlmerchant_order',array('id' => $after['orderid']),array('sid','blendcredit','fkid','price','expressid','paytype','goodsprice','num','specid')); |
|||
$goods = pdo_get('wlmerchant_activitylist',array('id' => $order['fkid']),array('title','thumb')); |
|||
$goods['name'] = $goods['title']; |
|||
$after['goodsprice'] = sprintf("%.2f",$order['goodsprice']/$order['num']); |
|||
if($order['specid']){ |
|||
$after['optiontitle'] = pdo_getcolumn(PDO_NAME.'activity_spec',array('id'=>$order['specid']),'name'); |
|||
} |
|||
$after['orderprice'] = $order['price']; |
|||
$after['plugintext'] = '活动'; |
|||
$after['plugincss'] = 'info'; |
|||
$after['goodsid'] = $order['fkid']; |
|||
$after['ordertype'] = 'b'; |
|||
$after['detailurl'] = web_url('order/wlOrder/orderdetail',array('orderid'=>$after['orderid'],'type'=>9,'is_jurisdiction'=>1)); |
|||
}else if($after['plugin'] == 'wlfightgroup'){ |
|||
$order = pdo_get('wlmerchant_order',array('id' => $after['orderid']),array('sid','blendcredit','fkid','price','expressid','paytype','goodsprice','num','specid')); |
|||
$goods = pdo_get('wlmerchant_fightgroup_goods',array('id' => $order['fkid']),array('name','logo')); |
|||
$after['goodsprice'] = sprintf("%.2f",$order['goodsprice']/$order['num']); |
|||
if($order['specid']){ |
|||
$after['optiontitle'] = pdo_getcolumn(PDO_NAME.'goods_option',array('id'=>$order['specid']),'title'); |
|||
} |
|||
$after['orderprice'] = $order['price']; |
|||
$after['plugintext'] = '拼团'; |
|||
$after['plugincss'] = 'warning'; |
|||
$after['goodsid'] = $order['fkid']; |
|||
$after['ordertype'] = 'b'; |
|||
$after['detailurl'] = web_url('order/wlOrder/orderdetail',array('orderid'=>$after['orderid'],'type'=>2,'is_jurisdiction'=>1)); |
|||
}else if($after['plugin'] == 'coupon'){ |
|||
$order = pdo_get('wlmerchant_order',array('id' => $after['orderid']),array('sid','blendcredit','fkid','price','expressid','paytype','goodsprice','num','specid')); |
|||
$goods = pdo_get('wlmerchant_couponlist',array('id' => $order['fkid']),array('title','logo')); |
|||
$after['goodsprice'] = sprintf("%.2f",$order['goodsprice']/$order['num']); |
|||
$after['orderprice'] = $order['price']; |
|||
$after['plugintext'] = '卡券'; |
|||
$after['plugincss'] = 'danger'; |
|||
$after['goodsid'] = $order['fkid']; |
|||
$after['ordertype'] = 'b'; |
|||
$after['detailurl'] = web_url('order/wlOrder/orderdetail',array('orderid'=>$after['orderid'],'type'=>3,'is_jurisdiction'=>1)); |
|||
}else if($after['plugin'] == 'bargain'){ |
|||
$order = pdo_get('wlmerchant_order',array('id' => $after['orderid']),array('sid','blendcredit','fkid','price','expressid','paytype','goodsprice','num','specid')); |
|||
$goods = pdo_get('wlmerchant_bargain_activity',array('id' => $order['fkid']),array('name','thumb')); |
|||
$after['goodsprice'] = sprintf("%.2f",$order['goodsprice']/$order['num']); |
|||
$after['orderprice'] = $order['price']; |
|||
$after['plugintext'] = '砍价'; |
|||
$after['plugincss'] = 'primary'; |
|||
$after['goodsid'] = $order['fkid']; |
|||
$after['ordertype'] = 'b'; |
|||
$after['detailurl'] = web_url('order/wlOrder/orderdetail',array('orderid'=>$after['orderid'],'type'=>12,'is_jurisdiction'=>1)); |
|||
}else if($after['plugin'] == 'citydelivery'){ |
|||
$order = pdo_get('wlmerchant_order',array('id' => $after['orderid']),array('id','blendcredit','sid','fkid','price','expressid','paytype','goodsprice','num','specid')); |
|||
$order['num'] = 1; |
|||
$store = pdo_get('wlmerchant_merchantdata',array('id' => $order['sid']),array('storename','logo','id')); |
|||
$goods['name'] = '['.$store['storename'].']配送商品'; |
|||
$goods['thumb'] = tomedia($store['logo']); |
|||
$after['goodsprice'] = sprintf("%.2f",$order['goodsprice']); |
|||
$after['orderprice'] = $order['price']; |
|||
$after['plugintext'] = '同城配送'; |
|||
$after['plugincss'] = 'primary'; |
|||
$after['ordertype'] = 'b'; |
|||
$after['detailurl'] = web_url('order/wlOrder/orderdetail',array('orderid'=>$after['orderid'],'type'=>14,'is_jurisdiction'=>1)); |
|||
}else if($after['plugin'] == 'housekeep'){ |
|||
$order = pdo_get('wlmerchant_order',array('id' => $after['orderid']),array('id','blendcredit','sid','fkid','price','expressid','paytype','goodsprice','num','specid')); |
|||
$order['num'] = 1; |
|||
if($order['specid'] == 1){ |
|||
$store = pdo_get('wlmerchant_merchantdata',array('id' => $order['sid']),array('storename','logo','id')); |
|||
}else{ |
|||
$store = pdo_get('wlmerchant_housekeep_artificer',array('id' => $order['sid']),array('name','mid','id')); |
|||
$store['storename'] = $store['name']; |
|||
$store['logo'] = pdo_getcolumn(PDO_NAME.'member',array('uniacid'=>$store['mid']),'avatar'); |
|||
} |
|||
$service = pdo_get('wlmerchant_housekeep_service',array('id' => $order['fkid']),array('title','thumb')); |
|||
$goods['name'] = $service['title']; |
|||
$goods['thumb'] = tomedia($service['thumb']); |
|||
$after['goodsprice'] = sprintf("%.2f",$order['price']); |
|||
$after['orderprice'] = $order['price']; |
|||
$after['plugintext'] = '家政服务'; |
|||
$after['plugincss'] = 'primary'; |
|||
$after['ordertype'] = 'b'; |
|||
//$after['detailurl'] = web_url('order/wlOrder/orderdetail',array('orderid'=>$after['orderid'],'type'=>14,'is_jurisdiction'=>1)); |
|||
} |
|||
if(empty($store)){ |
|||
$store = pdo_get('wlmerchant_merchantdata',array('id' => $after['sid']),array('storename')); |
|||
} |
|||
$after['paytype'] = $order['paytype']; |
|||
$after['nickname'] = $member['nickname']; |
|||
$after['mobile'] = $member['mobile']; |
|||
$after['realname'] = $member['realname']; |
|||
$after['goodsname'] = $goods['name']?$goods['name']:$goods['title']; |
|||
$after['goodsimg'] = $goods['thumb']?$goods['thumb']:$goods['logo']; |
|||
$after['storename'] = $store['storename']; |
|||
$after['num'] = $order['num']; |
|||
//混合支付 |
|||
if($order['blendcredit'] > 0){ |
|||
$after['paytype'] = 7; |
|||
} |
|||
|
|||
} |
|||
|
|||
include wl_template('order/afterlist'); |
|||
} |
|||
/** |
|||
* Comment: 售后申请驳回 |
|||
* Author: wlf |
|||
*/ |
|||
public function rejectafter(){ |
|||
global $_W,$_GPC; |
|||
$id = $_GPC['id']; |
|||
if($_W['ispost']) { |
|||
$after = pdo_get('wlmerchant_aftersale' , ['id' => $id] , ['checkcodes','mid']); |
|||
$checkcodes = unserialize($after['checkcodes']); |
|||
foreach ($checkcodes as $code){ |
|||
pdo_update('wlmerchant_smallorder',array('status' => 1),array('checkcode' => $code)); |
|||
} |
|||
$data = array( |
|||
'reply' => $_GPC['reply'], |
|||
'status' => 3, |
|||
'dotime' => time() |
|||
); |
|||
$journal = array( |
|||
'time' => time(), |
|||
'title' => '申请被驳回', |
|||
'detail' => '驳回原因:'.$data['reply'], |
|||
); |
|||
$journals = Order::addjournal($journal,$id); |
|||
$data['journal'] = $journals; |
|||
$res = pdo_update('wlmerchant_aftersale',$data,array('id' => $id)); |
|||
if($res){ |
|||
//发送模板消息 通知用户 |
|||
$modelData = [ |
|||
'first' => '' , |
|||
'type' => '售后结果通知' ,//业务类型 |
|||
'content' => $journal['detail'] ,//业务内容 |
|||
'status' => '驳回' ,//处理结果 |
|||
'time' => date("Y-m-d H:i:s" , $journal['time']) ,//操作时间$store['createtime'] |
|||
'remark' => '' |
|||
]; |
|||
TempModel::sendInit('service' , $after['mid'] , $modelData , 1); |
|||
|
|||
show_json(1,'驳回成功'); |
|||
}else { |
|||
show_json(0,'驳回失败,请重试'); |
|||
} |
|||
} |
|||
|
|||
|
|||
include wl_template('order/rejectafter'); |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,102 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
|
|||
/** |
|||
* Comment: 运费模板 |
|||
* Author: zzw |
|||
* Date: 2021/1/7 17:28 |
|||
* Class orderFreightTemplate_WeliamController |
|||
*/ |
|||
class orderFreightTemplate_WeliamController { |
|||
//运费模板列表 |
|||
public function freightlist() { |
|||
global $_W, $_GPC; |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$psize = 10; |
|||
$wheres = array(); |
|||
$wheres['uniacid'] = $_W['uniacid']; |
|||
$wheres['aid'] = $_W['aid']; |
|||
if(is_store()){ |
|||
$wheres['sid'] = $_W['storeid']; |
|||
} |
|||
$freightlist = Store::getNumExpress('*',$wheres,'ID DESC',$pindex, $psize, 1); |
|||
$pager = $freightlist[1]; |
|||
$list = $freightlist[0]; |
|||
|
|||
include wl_template('order/freightlist'); |
|||
} |
|||
//新建运费模板 |
|||
public function creatfreight(){ |
|||
global $_W, $_GPC; |
|||
$id = $_GPC['id']; |
|||
if (!is_agent()) { |
|||
$agents = pdo_getall('wlmerchant_agentusers', array('uniacid' => $_W['uniacid']), array('id', 'agentname')); |
|||
} |
|||
if($id){ |
|||
$info = pdo_get('wlmerchant_express_template',array('id' => $id)); |
|||
$info['expressarray'] = unserialize($info['expressarray']); |
|||
} |
|||
if (checksubmit('submit')){ |
|||
|
|||
$data['name'] = htmlspecialchars($_GPC['expressname']); |
|||
$data['defaultnum'] = intval($_GPC['defaultnum']); |
|||
$data['defaultmoney'] = sprintf('%.2f',$_GPC['defaultmoney']); |
|||
$data['defaultnumex'] = intval($_GPC['defaultnumex']); |
|||
$data['defaultmoneyex'] = sprintf('%.2f',$_GPC['defaultmoneyex']); |
|||
$data['freenumber'] = intval($_GPC['freenumber']); |
|||
|
|||
|
|||
if(!empty($_GPC['express']['area']) && is_array($_GPC['express']['area'])){ |
|||
foreach($_GPC['express']['area'] as $k=>$v){ |
|||
$expressarray[] = array( |
|||
'area'=>$v, |
|||
'num'=> intval($_GPC['express']['num'][$k]), |
|||
'money'=>sprintf('%.2f',$_GPC['express']['money'][$k]), |
|||
'numex'=>intval($_GPC['express']['numex'][$k]), |
|||
'moneyex'=>sprintf('%.2f',$_GPC['express']['moneyex'][$k]), |
|||
'freenumber'=>intval($_GPC['express']['freenumber'][$k]), |
|||
); |
|||
} |
|||
} |
|||
|
|||
$data['expressarray'] = serialize($expressarray); |
|||
$data['createtime'] = time(); |
|||
|
|||
if($_GPC['aid']){ |
|||
$data['aid'] = $_GPC['aid']; |
|||
}else{ |
|||
$data['aid'] = $_W['aid']; |
|||
} |
|||
$data['sid'] = $_W['storeid']; |
|||
if($id){ |
|||
$res = Store::updateExpress($data,$id); |
|||
if ($res) { |
|||
wl_message('更新运费模板成功', web_url('order/orderFreightTemplate/freightlist'), 'success'); |
|||
} else { |
|||
wl_message('更新运费模板失败', referer(),'error'); |
|||
} |
|||
}else { |
|||
$res = Store::saveExpress($data); |
|||
if ($res) { |
|||
wl_message('创建运费模板成功', web_url('order/orderFreightTemplate/freightlist'), 'success'); |
|||
} else { |
|||
wl_message('创建运费模板失败', referer(), 'error'); |
|||
} |
|||
} |
|||
} |
|||
include wl_template('order/creatfreight'); |
|||
} |
|||
//删除运费模板 |
|||
public function deleteExpress(){ |
|||
global $_W, $_GPC; |
|||
$id = $_GPC['id']; |
|||
$res = Store::deteleExpress($id); |
|||
if($res){ |
|||
die(json_encode(array('errno'=>0,'message'=>$res,'id'=>$id))); |
|||
}else { |
|||
die(json_encode(array('errno'=>2,'message'=>$res,'id'=>$id))); |
|||
} |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,188 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
/** |
|||
* Comment: 在线买单信息 |
|||
* Author: zzw |
|||
* Date: 2021/1/7 16:41 |
|||
* Class OrderPayOnline_WeliamController |
|||
*/ |
|||
class OrderPayOnline_WeliamController { |
|||
//在线买单信息列表 |
|||
public function payonlinelist() { |
|||
global $_W, $_GPC; |
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$psize = 20; |
|||
|
|||
$store_where = is_agent() ? array('uniacid' => $_W['uniacid'], 'aid' => $_W['aid']) : array('uniacid' => $_W['uniacid']); |
|||
$stores = pdo_getall('wlmerchant_merchantdata', $store_where, array('id', 'storename')); |
|||
|
|||
$where = array(); |
|||
$where['uniacid'] = $_W['uniacid']; |
|||
$where['plugin'] = 'halfcard'; |
|||
$where['status>'] = 1; |
|||
$where['status!='] = 5; |
|||
if(is_agent()){ |
|||
$where['aid'] = $_W['aid']; |
|||
} |
|||
if(is_store()){ |
|||
$where['sid'] = $_W['storeid']; |
|||
}else{ |
|||
$sid = intval($_GPC['sid']); |
|||
if($sid){ |
|||
$where['sid'] = $sid; |
|||
} |
|||
} |
|||
if($_GPC['orderid'] > 0){ |
|||
$where['id'] = $_GPC['orderid']; |
|||
} |
|||
if($_GPC['paytype']){ |
|||
$where['paytype'] = $_GPC['paytype']; |
|||
} |
|||
|
|||
if($_GPC['keyword']){ |
|||
$keyword = $_GPC['keyword']; |
|||
if($_GPC['keywordtype'] == 1){ |
|||
$params[':name'] = "%{$keyword}%"; |
|||
$members = pdo_fetchall("SELECT * FROM ".tablename('wlmerchant_member')." WHERE uniacid = {$_W['uniacid']} AND nickname LIKE :name",$params); |
|||
if($members){ |
|||
$mids = "("; |
|||
foreach ($members as $key => $v) { |
|||
if($key == 0){ |
|||
$mids.= $v['id']; |
|||
}else{ |
|||
$mids.= ",".$v['id']; |
|||
} |
|||
} |
|||
$mids.= ")"; |
|||
$where['mid#'] = $mids; |
|||
} |
|||
}else if($_GPC['keywordtype'] == 2){ |
|||
$params[':name'] = "%{$keyword}%"; |
|||
$members = pdo_fetchall("SELECT * FROM ".tablename('wlmerchant_member')." WHERE uniacid = {$_W['uniacid']} AND mobile LIKE :name",$params); |
|||
if($members){ |
|||
$mids = "("; |
|||
foreach ($members as $key => $v) { |
|||
if($key == 0){ |
|||
$mids.= $v['id']; |
|||
}else{ |
|||
$mids.= ",".$v['id']; |
|||
} |
|||
} |
|||
$mids.= ")"; |
|||
$where['mid#'] = $mids; |
|||
} |
|||
} |
|||
} |
|||
|
|||
if($_GPC['time_limit']){ |
|||
$time_limit = $_GPC['time_limit']; |
|||
$starttime = strtotime($_GPC['time_limit']['start']); |
|||
$endtime = strtotime($_GPC['time_limit']['end']) ; |
|||
$where['paytime>'] = $starttime; |
|||
$where['paytime<'] = $endtime+86400; |
|||
} |
|||
if (empty($starttime) || empty($endtime)) { |
|||
$starttime = strtotime('-1 month'); |
|||
$endtime = time(); |
|||
} |
|||
|
|||
//导出 |
|||
if($_GPC['export']){ |
|||
$this -> exportpayonline($where); |
|||
} |
|||
|
|||
$payonlinelist = Util::getNumData('*','wlmerchant_order',$where,'paytime DESC',$pindex,$psize,1); |
|||
$pager = $payonlinelist[1]; |
|||
$list = $payonlinelist[0]; |
|||
foreach ($list as $key => &$li) { |
|||
$member = pdo_get('wlmerchant_member',array('id' => $li['mid']),array('avatar','nickname')); |
|||
$li['avatar'] = tomedia($member['avatar']); |
|||
$li['nickname'] = $member['nickname']; |
|||
$store = pdo_get(PDO_NAME.'merchantdata',array('uniacid'=>$_W['uniacid'],'id'=>$li['sid']),array('logo','storename')); |
|||
$li['logo'] = tomedia($store['logo']); |
|||
if($li['fkid']){ |
|||
$li['title'] = pdo_getcolumn(PDO_NAME.'halfcardlist',array('uniacid'=>$_W['uniacid'],'id'=>$li['fkid']),'title'); |
|||
}else{ |
|||
$li['title'] = $store['storename'].'买家在线买单'; |
|||
} |
|||
$li['paytime'] = date('Y-m-d H:i:s',$li['paytime']); |
|||
} |
|||
|
|||
include wl_template('order/payonlinelist'); |
|||
} |
|||
//导出买单信息列表 |
|||
public function exportpayonline($where){ |
|||
global $_W, $_GPC; |
|||
$payonlinelist = Util::getNumData('*','wlmerchant_order',$where,'paytime DESC',0,0,1); |
|||
$pager = $payonlinelist[1]; |
|||
$list = $payonlinelist[0]; |
|||
foreach ($list as $key => &$li) { |
|||
$member = pdo_get('wlmerchant_member',array('id' => $li['mid']),array('mobile','nickname')); |
|||
$li['mobile'] = $member['mobile']; |
|||
$li['nickname'] = $member['nickname']; |
|||
$store = pdo_get(PDO_NAME.'merchantdata',array('uniacid'=>$_W['uniacid'],'id'=>$li['sid']),array('logo','storename')); |
|||
if($li['fkid']){ |
|||
$li['title'] = pdo_getcolumn(PDO_NAME.'halfcardlist',array('uniacid'=>$_W['uniacid'],'id'=>$li['fkid']),'title'); |
|||
}else{ |
|||
$li['title'] = $store['storename'].'买家在线买单'; |
|||
} |
|||
$li['paytime'] = date('Y-m-d H:i:s',$li['paytime']); |
|||
$li['orderno'] = "\t".$li['orderno']."\t"; |
|||
} |
|||
|
|||
/* 输出表头 */ |
|||
$filter = array( |
|||
'orderno' => '订单号', |
|||
'title' => '所属商家', |
|||
'nickname' => '买家昵称', |
|||
'mobile' => '买家电话', |
|||
'goodsprice' => '订单金额', |
|||
'oprice' => '不可优惠金额', |
|||
'spec' => '优惠折扣', |
|||
'card_fee' => '已优惠金额', |
|||
'price' => '实付金额', |
|||
'paytype' => '支付方式', |
|||
'paytime' => '支付时间' |
|||
); |
|||
|
|||
$data = array(); |
|||
for ($i=0; $i < count($list) ; $i++) { |
|||
foreach ($filter as $key => $title) { |
|||
if($key == 'paytype'){ |
|||
switch ($list[$i][$key]) { |
|||
case '1': |
|||
$data[$i][$key] = '余额支付'; |
|||
break; |
|||
case '2': |
|||
$data[$i][$key] = '微信支付'; |
|||
break; |
|||
case '3': |
|||
$data[$i][$key] = '支付宝支付'; |
|||
break; |
|||
case '4': |
|||
$data[$i][$key] = '货到付款'; |
|||
break; |
|||
default: |
|||
$data[$i][$key] = '其他或未支付'; |
|||
break; |
|||
} |
|||
}else if($key == 'spec'){ |
|||
if($list[$i][$key] < 10){ |
|||
$data[$i][$key] = $list[$i][$key].'折'; |
|||
}else{ |
|||
$data[$i][$key] = '无折扣'; |
|||
} |
|||
} else { |
|||
$data[$i][$key] = $list[$i][$key]; |
|||
} |
|||
|
|||
} |
|||
} |
|||
util_csv::export_csv_2($data,$filter,'在线买单记录表.csv'); |
|||
exit(); |
|||
|
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
|
|||
/** |
|||
* Comment: 订单设置 |
|||
* Author: zzw |
|||
* Date: 2021/1/7 17:32 |
|||
* Class WlOrder_WeliamController |
|||
*/ |
|||
class OrderSet_WeliamController { |
|||
//订单设置 |
|||
function orderset(){ |
|||
global $_W, $_GPC; |
|||
$settings = Setting::wlsetting_read('orderset'); |
|||
if (checksubmit('submit')) { |
|||
$base = Util::trimWithArray($_GPC['shop']); |
|||
Setting::wlsetting_save($base,'orderset'); |
|||
wl_message('更新设置成功!', web_url('order/orderSet/orderset')); |
|||
} |
|||
|
|||
include wl_template('order/orderset'); |
|||
} |
|||
|
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,27 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
class Comment_WeliamController |
|||
{ |
|||
public function set() |
|||
{ |
|||
global $_W, $_GPC; |
|||
|
|||
$settings = Setting::wlsetting_read('comment_set'); |
|||
$campusActivities = $settings['campusActivities'] ?: 0; |
|||
$videoComment = $settings['videoComment'] ?: 0; |
|||
|
|||
if ($_W['ispost']) { |
|||
|
|||
$data['campusActivities'] = $_GPC['campusActivities']; |
|||
$data['videoComment'] = $_GPC['videoComment']; |
|||
|
|||
Setting::wlsetting_save($data,'comment_set'); |
|||
|
|||
|
|||
show_json(1, array('url' => referer())); |
|||
} |
|||
|
|||
include wl_template('setting/comment/set'); |
|||
} |
|||
} |
|||
@ -0,0 +1,178 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
class Pay_WeliamController{ |
|||
/** |
|||
* Comment: 进入设置首页 |
|||
* Author: zzw |
|||
* Date: 2019/8/27 15:24 |
|||
*/ |
|||
public function index(){ |
|||
global $_W,$_GPC; |
|||
$name = $_GPC['name'] ? : ''; |
|||
#1、获取已保存的设置信息 |
|||
$setInfo = Setting::wlsetting_read('payment_set'); |
|||
#2、保存设置信息 |
|||
if($name){ |
|||
$set = $_GPC['set'] ? : []; |
|||
$setInfo[$name] = $set; |
|||
|
|||
Setting::wlsetting_save($setInfo,'payment_set'); |
|||
} |
|||
#3、判断支付方式是否存在 不存在则变更为未开启 |
|||
if(is_array($setInfo) && count($setInfo) > 0){ |
|||
foreach($setInfo as $key => &$val){ |
|||
//判断微信支付方式是否存在 |
|||
$weChat = pdo_getcolumn(PDO_NAME."payment",['id'=>$val['wechat']],'id'); |
|||
$val['wechat'] = $weChat > 0 ? $weChat : -1; |
|||
//判断支付宝支付方式是否存在 |
|||
$aliPay = pdo_getcolumn(PDO_NAME."payment",['id'=>$val['alipay']],'id'); |
|||
$val['alipay'] = $aliPay > 0 ? $aliPay : -1; |
|||
} |
|||
} |
|||
|
|||
|
|||
include wl_template('setting/pay_set'); |
|||
} |
|||
/** |
|||
* Comment: 支付方式列表 |
|||
* Author: zzw |
|||
* Date: 2019/8/27 15:25 |
|||
*/ |
|||
public function infoList(){ |
|||
global $_GPC,$_W; |
|||
#1、参数获取 |
|||
$name = $_GPC['name'] ? : ''; |
|||
#2、获取已保存的设置信息 |
|||
$setInfo = Setting::wlsetting_read('payment_set'); |
|||
$set = $setInfo[$name]; |
|||
#3、获取微信支付方式列表 |
|||
$weChat = pdo_getall(PDO_NAME."payment",['uniacid'=>$_W['uniacid'],'type'=>1],['id','name']); |
|||
#4、获取支付宝支付方式列表 |
|||
$aliPay = pdo_getall(PDO_NAME."payment",['uniacid'=>$_W['uniacid'],'type'=>2],['id','name']); |
|||
//云收单支付方式 |
|||
if(Customized::init('yunmis160') > 0){ |
|||
$yunPay = pdo_getall(PDO_NAME."payment",['uniacid'=>$_W['uniacid'],'type'=>3],['id','name']); |
|||
} |
|||
#5、定义模块信息 |
|||
$plugin = Payment::getBalanceModel(); |
|||
//881定制内容 |
|||
$isAuth = Customized::init('diy_userInfo'); |
|||
|
|||
include wl_template('setting/pay_list'); |
|||
} |
|||
/** |
|||
* Comment: 进入支付管理页面 |
|||
* Author: zzw |
|||
* Date: 2019/8/27 15:26 |
|||
*/ |
|||
public function administration(){ |
|||
global $_W,$_GPC; |
|||
#1、获取支付设置信息 |
|||
$setInfo = Setting::wlsetting_read('payment_set'); |
|||
$data = []; |
|||
if(is_array($setInfo) && count($setInfo) > 0){ |
|||
foreach ($setInfo as $index => $item){ |
|||
$data = array_merge($data,array_values($item)); |
|||
} |
|||
} |
|||
//设置商户设置项 |
|||
$wxstorepaysetids = pdo_fetchall('select distinct wxallid from ' . tablename(PDO_NAME.'merchantdata')."WHERE uniacid = {$_W['uniacid']}"); |
|||
if(is_array($wxstorepaysetids) && count($wxstorepaysetids) > 0){ |
|||
foreach ($wxstorepaysetids as $index => $swx){ |
|||
$data = array_merge($data,array_values($swx)); |
|||
} |
|||
} |
|||
$appstorepaysetids = pdo_fetchall('select distinct appallid from ' . tablename(PDO_NAME.'merchantdata')."WHERE uniacid = {$_W['uniacid']}"); |
|||
if(is_array($appstorepaysetids) && count($appstorepaysetids) > 0){ |
|||
foreach ($appstorepaysetids as $index => $sapp){ |
|||
$data = array_merge($data,array_values($sapp)); |
|||
} |
|||
} |
|||
//设置代理设置项 |
|||
$wxagentpaysetids = pdo_fetchall('select distinct wxpaysetid from ' . tablename(PDO_NAME.'agentusers')."WHERE uniacid = {$_W['uniacid']}"); |
|||
if(is_array($wxagentpaysetids) && count($wxagentpaysetids) > 0){ |
|||
foreach ($wxagentpaysetids as $index => $awx){ |
|||
$data = array_merge($data,array_values($awx)); |
|||
} |
|||
} |
|||
$appagentpaysetids = pdo_fetchall('select distinct apppaysetid from ' . tablename(PDO_NAME.'agentusers')."WHERE uniacid = {$_W['uniacid']}"); |
|||
if(is_array($appagentpaysetids) && count($appagentpaysetids) > 0){ |
|||
foreach ($appagentpaysetids as $index => $aapp){ |
|||
$data = array_merge($data,array_values($aapp)); |
|||
} |
|||
} |
|||
|
|||
#1、获取支付列表 |
|||
$list = pdo_fetchall("SELECT id,name,type,status,FROM_UNIXTIME(create_time,'%Y-%m-%d %H:%i:%S') as create_time FROM ".tablename(PDO_NAME."payment") |
|||
." WHERE uniacid = {$_W['uniacid']} ORDER BY create_time DESC "); |
|||
include wl_template('setting/pay_admin'); |
|||
} |
|||
/** |
|||
* Comment: 编辑支付方式 |
|||
* Author: zzw |
|||
* Date: 2019/8/28 9:49 |
|||
*/ |
|||
public function editInfo(){ |
|||
global $_W,$_GPC; |
|||
$id = $_GPC['id'] ? : ''; |
|||
if($_W['ispost']){ |
|||
#1、参数接收 |
|||
$info = $_GPC['info'] ? : []; |
|||
$data['uniacid'] = $_W['uniacid']; |
|||
$data['name'] = $info['name'];//名称 |
|||
$data['type'] = $info['type'];//支付类型1微信支付2支付宝支付 |
|||
$data['param'] = json_encode($info);//支付参数 |
|||
#2、修改/添加操作 |
|||
if($id){ |
|||
//id 存在,修改操作 |
|||
$res = pdo_update(PDO_NAME."payment",$data,['id'=>$id]); |
|||
}else{ |
|||
//id 不存在,添加操作 |
|||
$data['create_time'] = time(); |
|||
$res = pdo_insert(PDO_NAME."payment",$data); |
|||
} |
|||
#2、判断是否成功 |
|||
if($res) wl_json(0,'操作成功'); |
|||
else wl_json(1,'操作失败'); |
|||
} |
|||
|
|||
include wl_template('setting/pay_edit'); |
|||
} |
|||
/** |
|||
* Comment: 获取某条支付方式的配置详情 |
|||
* Author: zzw |
|||
* Date: 2019/8/28 15:03 |
|||
*/ |
|||
public function getInfo(){ |
|||
global $_W,$_GPC; |
|||
#1、参数获取 |
|||
$id = $_GPC['id'] ? : 0; |
|||
#2、信息获取 |
|||
$info = pdo_get(PDO_NAME."payment",['id'=>$id]); |
|||
$params = json_decode($info['param'],true); |
|||
|
|||
wl_json(0,'信息内容',$params); |
|||
} |
|||
/** |
|||
* Comment: 删除支付方式 |
|||
* Author: zzw |
|||
* Date: 2019/8/28 14:53 |
|||
*/ |
|||
public function delete(){ |
|||
global $_W,$_GPC; |
|||
$id = $_GPC['id'] ? : ''; |
|||
$res = pdo_delete(PDO_NAME."payment",['id'=>$id]); |
|||
if($res) show_json(1,'成功'); |
|||
else show_json(0,'删除失败,请重试!'); |
|||
} |
|||
/** |
|||
* Comment: 上传证书 |
|||
* Author: zzw |
|||
* Date: 2019/8/28 9:50 |
|||
*/ |
|||
public function uploadCertificate(){ |
|||
global $_W,$_GPC; |
|||
UploadFile::uploadIndex($_FILES,1,0); |
|||
} |
|||
} |
|||
@ -0,0 +1,54 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
class Payset_WeliamController { |
|||
function index() { |
|||
global $_W, $_GPC; |
|||
$payset = Setting::wlsetting_read('payset'); |
|||
$value = unserialize($payset['value']); |
|||
$status = unserialize($payset['status']); |
|||
$partner = unserialize($payset['partner']); |
|||
$cert = file_exists(PATH_DATA . "cert/" . $_W['uniacid'] . "/wechat/apiclient_cert.pem"); |
|||
$key = file_exists(PATH_DATA . "cert/" . $_W['uniacid'] . "/wechat/apiclient_key.pem"); |
|||
$path = is_dir(PATH_DATA . "cert/" . $_W['uniacid'] . "/wechat/") ? PATH_DATA . "cert/" . $_W['uniacid'] . "/wechat/" : mkdir(PATH_DATA . "cert/" . $_W['uniacid'] . "/wechat/", 0777, true); |
|||
$message = Setting::wlsetting_read('payset'); |
|||
$moduels = uni_modules(); |
|||
if (checksubmit('submit')) { |
|||
if (!empty($_FILES["cert"]["tmp_name"])) { |
|||
if ($_FILES["cert"]["error"] > 0) { |
|||
wl_message("上传失败!", '', 'error'); |
|||
} else { |
|||
if ($cert) { |
|||
unlink($_FILES["cert"]["name"]); |
|||
$r1 = move_uploaded_file($_FILES["cert"]["tmp_name"], $path . $_FILES["cert"]["name"]); |
|||
} else { |
|||
$r1 = move_uploaded_file($_FILES["cert"]["tmp_name"], $path . $_FILES["cert"]["name"]); |
|||
} |
|||
} |
|||
} |
|||
if (!empty($_FILES["key"]["tmp_name"])) { |
|||
if ($_FILES["key"]["error"] > 0) { |
|||
wl_message("上传失败!", '', 'error'); |
|||
} else { |
|||
if ($key) { |
|||
unlink($_FILES["key"]["name"]); |
|||
$r2 = move_uploaded_file($_FILES["key"]["tmp_name"], $path . $_FILES["key"]["name"]); |
|||
} else { |
|||
$r2 = move_uploaded_file($_FILES["key"]["tmp_name"], $path . $_FILES["key"]["name"]); |
|||
} |
|||
} |
|||
} |
|||
$partner = $_GPC['partner']; |
|||
$value = $_GPC['value']; |
|||
$p_status = $_GPC['p_status']; |
|||
$data1['wechatstatus'] = $_GPC['wechatstatus']; |
|||
$data1['status'] = iserializer($p_status); |
|||
$data1['value'] = iserializer($value); |
|||
$data1['partner'] = iserializer($partner); |
|||
Setting::wlsetting_save($data1, 'payset'); |
|||
wl_message("提交成功!", '', 'success'); |
|||
} |
|||
include wl_template('setting/payset'); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,433 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
class rights_WeliamController |
|||
{ |
|||
|
|||
public function index() |
|||
{ |
|||
global $_W, $_GPC; |
|||
|
|||
$level = $_GPC['level'] ?: 0; |
|||
$levelList = Rights::$levelList; |
|||
$dateUnitList = Rights::$dateUnit; |
|||
$rightsBag = Rights::getRightsBagAll(); |
|||
|
|||
$sum_price = 0; |
|||
foreach ($rightsBag as $row) { |
|||
$levelList[$row['id']] = $row['title']; |
|||
if ($row['id'] == $level) $sum_price = $row['price']; |
|||
} |
|||
|
|||
$list = pdo_getall(PDO_NAME . 'rights'); |
|||
|
|||
foreach ($list as &$item) { |
|||
$specField = 'id as specid,amount,amount_unit,date_amount,date_unit'; |
|||
$rightsSpec = pdo_fetch("select {$specField} from ims_" . PDO_NAME |
|||
. "rights_spec where rightsid = {$item['id']} and rights_bagid = '{$level}'"); |
|||
if ($rightsSpec) { |
|||
$item = array_merge($item, $rightsSpec); |
|||
$item['amountUnitStr'] = Rights::$amountUnit[$item['amount_unit']]; |
|||
$item['dateUnitStr'] = Rights::$dateUnit[$item['date_unit']]; |
|||
} |
|||
} |
|||
|
|||
include wl_template('setting/rights/index'); |
|||
} |
|||
|
|||
public function save() |
|||
{ |
|||
global $_W, $_GPC; |
|||
|
|||
$data = $_GPC['data']; |
|||
$level = $_GPC['level']; |
|||
if (!is_array($data)) wl_message('请求数据有误'); |
|||
|
|||
try { |
|||
pdo_begin(); |
|||
switch ($level) { |
|||
case 0: |
|||
foreach ($data as $id => $value) { |
|||
if (empty($id) || !is_numeric($id)) throw new Exception('缺少id参数'); |
|||
$price = trim($value['price']); |
|||
$content = trim($value['content']); |
|||
if ($price < 0 || !is_numeric($price)) throw new Exception('价格不能为负数,且必须为数字'); |
|||
$updateArr = ['price' => $price, 'content' => $content]; |
|||
$result = pdo_update(PDO_NAME . 'rights', $updateArr, ['id' => $id]); |
|||
if ($result === false) throw new Exception('保存失败'); |
|||
} |
|||
break; |
|||
case 1: |
|||
case 2: |
|||
$temp_specid = ''; |
|||
foreach ($data as $specid => $value) { |
|||
|
|||
if (empty($temp_specid)) $temp_specid = $specid; |
|||
|
|||
$amount = (int)$value['amount']; |
|||
|
|||
if (empty($specid) || !is_numeric($specid)) throw new Exception('缺少id参数'); |
|||
if ($amount < 0 || !is_numeric($amount)) throw new Exception('个数不能为负数,且必须为数字整形'); |
|||
$updateArr = ['amount' => trim($amount)]; |
|||
|
|||
if (isset($value['date_amount'])) { |
|||
$date_amount = (int)$value['date_amount']; |
|||
if ($date_amount < 0 || !is_numeric($date_amount)) throw new Exception('天数不能为负数,且必须为数字整形'); |
|||
$updateArr['date_amount'] = $date_amount; |
|||
} |
|||
|
|||
$result = pdo_update(PDO_NAME . 'rights_spec', $updateArr, ['id' => $specid]); |
|||
if ($result === false) throw new Exception('保存失败'); |
|||
} |
|||
|
|||
if (isset($_GPC['sum_price']) && !empty($temp_specid)) { |
|||
$sum_price = trim($_GPC['sum_price']); |
|||
if ($sum_price < 0 || !is_numeric($sum_price)) throw new Exception('总价不能为负数,且必须为数字'); |
|||
$spec = pdo_get(PDO_NAME . 'rights_spec', ['id' => $temp_specid], ['rights_bagid']); |
|||
if ($spec) { |
|||
pdo_update(PDO_NAME . 'rights_bag', ['price' => $sum_price], ['id' => $spec['rights_bagid']]); |
|||
} |
|||
} |
|||
break; |
|||
} |
|||
} catch (Exception $e) { |
|||
pdo_rollback(); |
|||
wl_message($e->getMessage()); |
|||
} |
|||
pdo_commit(); |
|||
wl_message('设置成功!', web_url('setting/rights/index', array('level' => $level)), 'success'); |
|||
} |
|||
|
|||
public function useRightsIndex() |
|||
{ |
|||
global $_W, $_GPC; |
|||
|
|||
$levelList = pdo_getall(PDO_NAME . 'rights', ['id' => [1, 5]]); |
|||
$_GPC['level'] = $_GPC['level'] ?: 1; |
|||
$unit = $_GPC['level'] == 1 ? '天' : '份'; |
|||
|
|||
$where = ['rightsid' => $_GPC['level']]; |
|||
|
|||
if (!empty($_GPC['keyword'])) { |
|||
$midArr = []; |
|||
$keyword = trim($_GPC['keyword']); |
|||
if ($_GPC['keywordtype'] == 1) { |
|||
$storeUser = pdo_getall(PDO_NAME . 'merchantuser', ['storeid' => $keyword]); |
|||
foreach ($storeUser as $user) $midArr[] = $user['mid']; |
|||
} else if ($_GPC['keywordtype'] == 2) { |
|||
$storeidArr = []; |
|||
$storeData = pdo_getall(PDO_NAME . 'merchantdata', " storename like '%{$keyword}%'", ['id']); |
|||
foreach ($storeData as $storeVal) $storeidArr[] = $storeVal['id']; |
|||
if ($storeidArr) { |
|||
$storeUser = pdo_getall(PDO_NAME . 'merchantuser', ['storeid' => $storeidArr]); |
|||
foreach ($storeUser as $user) $midArr[] = $user['mid']; |
|||
} |
|||
} else if ($_GPC['keywordtype'] == 3) { |
|||
$midArr[] = $keyword; |
|||
} else if ($_GPC['keywordtype'] == 4) { |
|||
$member = pdo_getall(PDO_NAME . 'member', " nickname like '%{$keyword}%'", ['id']); |
|||
foreach ($member as $memberVal) $midArr[] = $memberVal['id']; |
|||
} |
|||
if (!empty($midArr)) { |
|||
$memberRightsQueryWhere = ['rightsid' => $_GPC['level'], 'mid' => $midArr]; |
|||
$memberRightsQuery = pdo_getall(PDO_NAME . 'member_rights', $memberRightsQueryWhere, ['id']); |
|||
if ($memberRightsQuery) { |
|||
foreach ($memberRightsQuery as $memberRightsVal) $where['member_rightsid'][] = $memberRightsVal['id']; |
|||
} else { |
|||
$where['id'] = 0; |
|||
} |
|||
} else { |
|||
$where['id'] = 0; |
|||
} |
|||
} |
|||
|
|||
if (is_numeric($_GPC['status'])) $where['status'] = $_GPC['status']; |
|||
|
|||
$pindex = max(1, intval($_GPC['page'])); |
|||
$psize = 10; |
|||
|
|||
$memberData = Util::getNumData("*", PDO_NAME . 'member_rights_use', $where, 'id desc', $pindex, $psize, 1); |
|||
$list = $memberData[0]; |
|||
$pager = $memberData[1]; |
|||
|
|||
foreach ($list as &$item) { |
|||
|
|||
$item['remaining_amount'] = $item['use_total_amount'] - $item['use_amount']; |
|||
|
|||
$memberRights = pdo_get(PDO_NAME . 'member_rights', ['id' => $item['member_rightsid']]); |
|||
$item['mid'] = $memberRights['mid']; |
|||
Member::getMemberInfo($item, $memberRights['mid']); |
|||
|
|||
$storeUser = pdo_get(PDO_NAME . 'merchantuser', ['mid' => $memberRights['mid']], ['storeid']); |
|||
if ($storeUser) { |
|||
$item['storeid'] = $storeUser['storeid']; |
|||
$store = pdo_get(PDO_NAME . 'merchantdata', ['id' => $storeUser['storeid']], ['id', 'storename', 'logo', 'mobile']); |
|||
if ($store) { |
|||
$item['storename'] = $store['storename']; |
|||
$item['logo'] = tomedia($store['logo']); |
|||
$item['store_mobile'] = tomedia($store['mobile']); |
|||
} |
|||
} |
|||
|
|||
if (!empty($item['start_time'])) $item['start_time'] = date("Y-m-d H:i:s", $item['start_time']); |
|||
if (!empty($item['end_time'])) $item['end_time'] = date("Y-m-d H:i:s", $item['end_time']); |
|||
|
|||
if ($item['rightsid'] == 5) { |
|||
$title = pdo_getcolumn(PDO_NAME . 'recruit_recruit',['id' => $item['relation_id']],'title'); |
|||
$item['recruit_title'] = $title; |
|||
} |
|||
} |
|||
|
|||
include wl_template('setting/rights/useRightsIndex'); |
|||
} |
|||
|
|||
/** |
|||
* 开始使用 注:暂时只供广告曝光使用 |
|||
* @return void |
|||
*/ |
|||
public function beginRightsUse() |
|||
{ |
|||
global $_W, $_GPC; |
|||
|
|||
$rightsUseId = $_GPC['id']; |
|||
if (empty($rightsUseId)) wl_message('缺少参数ID'); |
|||
|
|||
$where = ['id' => $rightsUseId, 'status' => 0, 'rightsid' => 1]; |
|||
$rightsUse = pdo_get(PDO_NAME . 'member_rights_use', $where, ['id', 'status']); |
|||
if (!$rightsUse) wl_message('开始失败,请检查状态是否待开始'); |
|||
|
|||
$updateData = ['status' => 1, 'start_time' => time()]; |
|||
$updateRes = pdo_update(PDO_NAME . 'member_rights_use', $updateData, ['id' => $rightsUse['id']]); |
|||
if (!$updateRes) wl_message('开始失败'); |
|||
|
|||
wl_message('开始成功!', web_url('setting/rights/useRightsIndex', array('level' => $_GPC['level'])), 'success'); |
|||
} |
|||
|
|||
/** |
|||
* 手动推送简历 (展示企业需要的简历) |
|||
* @return void |
|||
*/ |
|||
public function pushRecruitIndex() |
|||
{ |
|||
global $_W, $_GPC; |
|||
|
|||
$rightsUseId = $_GPC['id']; |
|||
$page = $_GPC['page'] ?: 1; |
|||
$pageSize = $_GPC['pageSize'] ?: 20; |
|||
|
|||
// 用户使用权益信息 |
|||
$rightsUse = pdo_get(PDO_NAME . 'member_rights_use', ['id' => $rightsUseId]); |
|||
|
|||
// 权益类型 |
|||
$rights = pdo_get(PDO_NAME . 'rights', ['id' => $rightsUse['rightsid']]); |
|||
|
|||
// 已推荐简历id(去除已推送过简历) |
|||
$resume_where = ''; |
|||
$filter = []; |
|||
if (!empty($rightsUse['filter'])) { |
|||
$filter = unserialize($rightsUse['filter']); |
|||
if (!empty($filter['resume_id'])) { |
|||
$str = "'" . implode("','", $filter['resume_id']) . "'"; |
|||
$resume_where .= " and id not in ({$str})"; |
|||
} |
|||
} |
|||
// 用户权益信息 |
|||
$memberRights = pdo_get(PDO_NAME . 'member_rights', ['id' => $rightsUse['member_rightsid']]); |
|||
|
|||
// 企业招聘信息 |
|||
$recruit = pdo_get(PDO_NAME . 'recruit_recruit', ['id' => $rightsUse['relation_id']]); |
|||
// 企业信息 |
|||
$store = pdo_get(PDO_NAME . 'merchantdata', ['id' => $recruit['release_sid']], ['storename', 'id']); |
|||
// 推荐简历查询条件 |
|||
$where = ''; |
|||
$industryPid = $recruit['industry_pid'] ? : 0;//上级行业id |
|||
$industryId = $recruit['industry_id'] ? : 0;//子行业id |
|||
$educational = $_GPC['educational_experience'] ? : 0;//最高学历 |
|||
$position_id = $recruit['position_id'];//职位id |
|||
// 获取行业下面的所有职位 |
|||
$positionWhere = []; |
|||
if (!empty($industryPid)) $positionWhere['industry_pid'] = $industryPid; |
|||
if (!empty($industryId)) $positionWhere['industry_id'] = $industryId; |
|||
$positionIdArr = []; |
|||
// 查询改简历同行业职位信息 |
|||
$positionRes = pdo_getall(PDO_NAME . 'recruit_position',$positionWhere,'id'); |
|||
if ($positionRes) { |
|||
foreach ($positionRes as $positionRow) $positionIdArr[] = $positionRow['id']; |
|||
} |
|||
if (!empty($position_id)) $positionIdArr[] = $position_id; |
|||
$positionIdArr = array_unique($positionIdArr); |
|||
// 获取职位的所有简历信息 |
|||
$find_in_set_arr = []; |
|||
foreach ($positionIdArr as $positionId) $find_in_set_arr[] = " find_in_set('{$positionId}',expect_position) "; |
|||
if ($find_in_set_arr) $where .= implode(" or ",$find_in_set_arr); |
|||
if (!empty($recruit['job_type'])) $where .= ($where ? ' and' : '') . " job_type = '{$recruit['job_type']}'"; |
|||
|
|||
// 推荐简历列表 |
|||
$recruit_resume = pdo_getall(PDO_NAME . 'recruit_resume', "{$where} ", '*', '', 'id desc', [$page, $pageSize]); |
|||
$graduated_school = '';#毕业院校 |
|||
$experience = '';#优先选项 |
|||
foreach ($recruit_resume as $key => &$item) { |
|||
|
|||
// 是否是重点院校内 |
|||
if (!empty($filter['graduated_school']) && is_numeric($filter['graduated_school'])) { |
|||
$educational_experience = unserialize($item['educational_experience']); |
|||
$graduated_school = Rights::$graduatedSchool[$filter['graduated_school']]; |
|||
$is_continue = $this->isContinue($graduated_school,$educational_experience,'graduated_school'); |
|||
if ($is_continue) { |
|||
unset($recruit_resume[$key]); |
|||
continue; |
|||
} |
|||
} |
|||
// 优先选项 |
|||
if (!empty($filter['experience']) && is_numeric($filter['experience'])) { |
|||
$experience = Rights::$experience[$filter['experience']]; |
|||
// 是否有在校职务 |
|||
if ($filter['experience'] == 1) { |
|||
$school_office = unserialize($item['school_office']); |
|||
if (empty($school_office)) { |
|||
unset($recruit_resume[$key]); |
|||
continue; |
|||
} |
|||
// 是否有在校经历 |
|||
} elseif ($filter['experience'] == 2) { |
|||
$work_experience = unserialize($item['work_experience']); |
|||
if (empty($work_experience)) { |
|||
unset($recruit_resume[$key]); |
|||
continue; |
|||
} |
|||
} |
|||
} |
|||
$item['is_push'] = false; |
|||
if (!empty($filter['resume_id']) && in_array($item['id'],$filter['resume_id'])) $item['is_push'] = true; |
|||
// 用户头像及昵称 |
|||
Member::getMemberInfo($item, $item['mid']); |
|||
} |
|||
|
|||
include wl_template('setting/rights/pushRecruitIndex'); |
|||
} |
|||
|
|||
/** |
|||
* 判断是否跳过 |
|||
* @param $value |
|||
* @param $array |
|||
* @param $array_key |
|||
* @return bool |
|||
*/ |
|||
protected function isContinue($value,$array,$array_key) |
|||
{ |
|||
if (!$value) return false; |
|||
if ($array_key == 'graduated_school' && is_numeric($value)) $value = Rights::$graduatedSchool[$value]; |
|||
|
|||
if (!is_array($array)) return true; |
|||
|
|||
$is_continue = true; |
|||
foreach ($array as $val) { |
|||
if ($value == $val[$array_key]) { |
|||
$is_continue = false; |
|||
break; |
|||
} |
|||
} |
|||
return $is_continue; |
|||
} |
|||
|
|||
/** |
|||
* 推送简历 |
|||
* @return void |
|||
*/ |
|||
public function pushRecruit() |
|||
{ |
|||
global $_W, $_GPC; |
|||
|
|||
$resume_id = $_GPC['id']; |
|||
$recruit_id = $_GPC['recruit_id']; |
|||
$rights_use_id = $_GPC['rights_use_id']; |
|||
if (empty($resume_id)) wl_message('缺少简历ID'); |
|||
if (empty($recruit_id)) wl_message('缺少招聘ID'); |
|||
if (empty($rights_use_id)) wl_message('缺少权益ID'); |
|||
|
|||
// $recruit_resume = pdo_get(PDO_NAME . 'recruit_resume',['id' => $resume_id]); |
|||
$rightsUseRes = pdo_get(PDO_NAME . 'member_rights_use',['id' => $rights_use_id]); |
|||
$rightsid = $rightsUseRes['rightsid']; |
|||
$memberRights = pdo_get(PDO_NAME . 'member_rights', ['id' => $rightsUseRes['member_rightsid']]); |
|||
$mid = $memberRights['mid']; |
|||
|
|||
// $submitData = [ |
|||
// 'uniacid' => $_W['uniacid'], |
|||
// 'mid' => $mid, |
|||
// 'resume_id' => $resume_id, |
|||
// 'recruit_id' => $recruit_id, |
|||
// 'create_time' => time(), |
|||
// 'status' => 0 |
|||
// ]; |
|||
// pdo_insert(PDO_NAME."recruit_submit",$submitData); |
|||
|
|||
$useRights = Rights::useMemberRights($rightsid,$mid,$recruit_id,'recruit_resume'); |
|||
if (!$useRights['status']) wl_message($useRights['msg']); |
|||
|
|||
$filter = unserialize($rightsUseRes['filter']); |
|||
if (empty($filter['resume_id']) || !in_array($resume_id,$filter['resume_id'])) { |
|||
$filter['resume_id'][] = $resume_id; |
|||
} |
|||
|
|||
$useRightsUpdate = ['filter' => serialize($filter)]; |
|||
pdo_update(PDO_NAME . 'member_rights_use',$useRightsUpdate,['id' => $rights_use_id]); |
|||
|
|||
wl_message('开始成功!' , web_url('setting/rights/pushRecruitIndex',array('id' => $rights_use_id,'level' => $rightsid)) , 'success'); |
|||
} |
|||
|
|||
/** |
|||
* 权益订单管理 |
|||
* @return void |
|||
*/ |
|||
public function rightsOrderIndex() |
|||
{ |
|||
global $_W,$_GPC; |
|||
//参数信息获取 |
|||
$page = $_GPC['page'] ? : 1; |
|||
$pageIndex = $_GPC['page_index'] ? : 10; |
|||
$startPage = $page * $pageIndex - $pageIndex; |
|||
|
|||
$where = ['uniacid' => $_W['uniacid'], 'aid' => $_W['aid'], 'plugin' => 'rights']; |
|||
|
|||
if ($_GPC['rightsid'] == 99) { |
|||
$rightsid = $_GPC['rightsid']; |
|||
$_GPC['rights_bagid'] = ''; |
|||
} |
|||
if (!empty($_GPC['rightsid']) && $_GPC['rightsid'] != 99) { |
|||
$_GPC['rights_bagid'] = ''; |
|||
$rightsid = $_GPC['rightsid']; |
|||
$where['fkid'] = $rightsid; |
|||
$where['payfor'] = 'rights'; |
|||
} |
|||
if (!empty($_GPC['rights_bagid'])) { |
|||
$_GPC['rightsid'] = ''; |
|||
$rights_bagid = $_GPC['rights_bagid']; |
|||
$where['fkid'] = $rights_bagid; |
|||
$where['payfor'] = 'rightsBag'; |
|||
} |
|||
|
|||
$field = "id,orderno,status,paytype,payfor,paytime,price,fightstatus,fkid,mid"; |
|||
$orderData = Util::getNumData($field, PDO_NAME . 'order', $where, 'id desc', $page, $pageIndex, 1); |
|||
|
|||
$list = $orderData[0]; |
|||
$pager = $orderData[1]; |
|||
|
|||
$rightsList = Rights::getRightsList(); |
|||
|
|||
foreach($list as $index => &$item){ |
|||
if ($item['payfor'] == 'rightsBag') { |
|||
|
|||
$rightsBag = pdo_get(PDO_NAME . 'rights_bag',['id' => $item['fkid']]); |
|||
$item['rights_type'] = $rightsBag['title']; |
|||
} else { |
|||
$rights = pdo_get(PDO_NAME . 'rights',['id' => $item['fkid']]); |
|||
$item['rights_type'] = $rights['rights_type']; |
|||
} |
|||
|
|||
Member::getMemberInfo($item,$item['mid']); |
|||
} |
|||
|
|||
|
|||
include wl_template('setting/rights/rightsOrderIndex'); |
|||
} |
|||
} |
|||
@ -0,0 +1,46 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
|
|||
/** |
|||
* Comment: 交易管理 |
|||
* Author: zzw |
|||
* Date: 2021/1/8 10:36 |
|||
* Class SettingTransaction_WeliamController |
|||
*/ |
|||
class SettingTransaction_WeliamController { |
|||
//充值设置 |
|||
public function recharge() { |
|||
global $_W, $_GPC; |
|||
$settings = Setting::wlsetting_read('recharge'); |
|||
$count = count($settings['kilometre']); |
|||
for ($i = 0; $i < $count; $i++) { |
|||
$array[$i]['kilometre'] = $settings['kilometre'][$i]; |
|||
$array[$i]['kilmoney'] = $settings['kilmoney'][$i]; |
|||
} |
|||
|
|||
if (checksubmit('submit')) { |
|||
$base = Util::trimWithArray($_GPC['recharge']); |
|||
Setting::wlsetting_save($base, 'recharge'); |
|||
wl_message('更新设置成功!', web_url('setting/settingTransaction/recharge')); |
|||
} |
|||
|
|||
$isAuth = Customized::init('diy_userInfo'); |
|||
|
|||
include wl_template('setting/recharge'); |
|||
} |
|||
//积分设置 |
|||
public function creditset() { |
|||
global $_W, $_GPC; |
|||
$settings = Setting::wlsetting_read('creditset'); |
|||
if (checksubmit('submit')) { |
|||
$base = Util::trimWithArray($_GPC['data']); |
|||
$base['integralsxf'] = sprintf("%.2f",$base['integralsxf']); |
|||
Setting::wlsetting_save($base, 'creditset'); |
|||
wl_message('更新设置成功!', web_url('setting/settingTransaction/creditset')); |
|||
} |
|||
|
|||
include wl_template('setting/creditset'); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,192 @@ |
|||
<?php |
|||
defined('IN_IA') or exit('Access Denied'); |
|||
|
|||
class Shopset_WeliamController { |
|||
//基础设置 |
|||
public function base() { |
|||
global $_W, $_GPC; |
|||
$settings = Setting::wlsetting_read('base'); |
|||
$settings['plugin'] = unserialize($settings['plugin']); |
|||
$settings['copytext'] = unserialize($settings['copytext']); |
|||
$settings['copyurl'] = unserialize($settings['copyurl']); |
|||
$urlnum = count($settings['copyurl']) + 1; |
|||
if(empty($settings['serbgw'])){ |
|||
$settings['serbgw'] = "#FFD93F"; |
|||
} |
|||
if(empty($settings['serbgn'])){ |
|||
$settings['serbgn'] = "#FFF4C4"; |
|||
} |
|||
|
|||
if (checksubmit('submit')) { |
|||
$base = Util::trimWithArray($_GPC['shop']); |
|||
$base['copytext'] = serialize($_GPC['copytext']); |
|||
$urltext = $_GPC['urltext']; |
|||
$copyurl = $_GPC['copyurl']; |
|||
$redIds = array(); |
|||
$len = count($urltext); |
|||
for ($k = 0; $k < $len; $k++) { |
|||
$redIds[$k]['text'] = $urltext[$k]; |
|||
$redIds[$k]['url'] = $copyurl[$k]; |
|||
} |
|||
$base['copyurl'] = serialize($redIds); |
|||
Setting::wlsetting_save($base, 'base'); |
|||
wl_message('更新设置成功!', web_url('setting/shopset/base')); |
|||
} |
|||
include wl_template('setting/shopBase'); |
|||
} |
|||
|
|||
public function copytext(){ |
|||
include wl_template('setting/copytext'); |
|||
} |
|||
|
|||
public function copyurl(){ |
|||
global $_W, $_GPC; |
|||
$kk = $_GPC['kw']; |
|||
include wl_template('setting/copyurl'); |
|||
} |
|||
|
|||
//分享与关注设置 |
|||
public function share() { |
|||
global $_W, $_GPC; |
|||
$settings = Setting::wlsetting_read('share');; |
|||
if (checksubmit('submit')) { |
|||
$base = Util::trimWithArray($_GPC['share']); |
|||
$base['forcefollow'] = $_GPC['forcefollow']; |
|||
Setting::wlsetting_save($base, 'share'); |
|||
wl_message('更新设置成功!', web_url('setting/shopset/share')); |
|||
} |
|||
include wl_template('setting/shopShare'); |
|||
} |
|||
|
|||
//客服设置 |
|||
public function customer() { |
|||
global $_W, $_GPC; |
|||
$settings = Setting::wlsetting_read('customer'); |
|||
if (checksubmit('submit')) { |
|||
$base = Util::trimWithArray($_GPC['customer']); |
|||
Setting::wlsetting_save($base, 'customer'); |
|||
Setting::agentsetting_save($base, 'agentcustomer'); |
|||
wl_message('更新设置成功!', web_url('setting/shopset/customer')); |
|||
} |
|||
include wl_template('setting/customer'); |
|||
} |
|||
|
|||
/** |
|||
* Comment: api接口信息设置 |
|||
* Author: zzw |
|||
* Date: 2019/10/8 16:09 |
|||
*/ |
|||
public function api() { |
|||
global $_W, $_GPC; |
|||
#1、参数获取 |
|||
$type = $_GPC['type'] ?: ''; |
|||
#2、根据type进行不同的操作 |
|||
if ($type == 'get') { |
|||
//获取设置信息 |
|||
$set = Setting::wlsetting_read('api'); |
|||
Commons::sRenderSuccess('api设置信息', $set); |
|||
} else if ($type == 'set') { |
|||
//储存设置信息 |
|||
$info = $_GPC['info'] OR Commons::sRenderError('非法提交'); |
|||
Setting::wlsetting_save($info, 'api'); |
|||
Commons::sRenderSuccess('api设置修改成功'); |
|||
} |
|||
|
|||
include wl_template('setting/shopApi'); |
|||
} |
|||
//文字设置 |
|||
public function trade() { |
|||
global $_W, $_GPC; |
|||
$settings = Setting::wlsetting_read('trade');; |
|||
if (checksubmit('submit')) { |
|||
$base = Util::trimWithArray($_GPC['data']); |
|||
Setting::wlsetting_save($base,'trade'); |
|||
wl_message('更新设置成功!', web_url('setting/shopset/trade')); |
|||
} |
|||
include wl_template('setting/tradeset'); |
|||
} |
|||
|
|||
//附件设置 |
|||
public function enclosure() { |
|||
global $_W, $_GPC; |
|||
$settings = Setting::wlsetting_read('enclosure'); |
|||
$alioss = $settings['alioss']; |
|||
$qiniu = $settings['qiniu']; |
|||
$tengxun = $settings['tengxun']; |
|||
|
|||
if (checksubmit('submit')) { |
|||
$base = Util::trimWithArray($_GPC['data']); |
|||
$alioss = Util::trimWithArray($_GPC['alioss']); |
|||
$qiniu = Util::trimWithArray($_GPC['qiniu']); |
|||
$tengxun = Util::trimWithArray($_GPC['cos']); |
|||
|
|||
if($base['service'] == 2){ |
|||
if ('' == trim($alioss['key'])) { |
|||
wl_json(-1, '阿里云OSS-Access Key ID不能为空'); |
|||
} |
|||
if ('' == trim($alioss['secret'])) { |
|||
wl_json(-1, '阿里云OSS-Access Key Secret不能为空'); |
|||
} |
|||
$buckets = attachment_alioss_buctkets($alioss['key'], $alioss['secret']); |
|||
if (is_error($buckets)) { |
|||
wl_json(-1, 'OSS-Access Key ID 或 OSS-Access Key Secret错误,请重新填写'); |
|||
} |
|||
list($alioss['bucket'], $alioss['url']) = explode('@@', $_GPC['alioss']['bucket']); |
|||
if (empty($buckets[$alioss['bucket']])) { |
|||
wl_json(-1, 'Bucket不存在或是已经被删除'); |
|||
} |
|||
$alioss['url'] = 'http://' . $alioss['bucket'] . '.' . $buckets[$alioss['bucket']]['location'] . '.aliyuncs.com'; |
|||
$alioss['ossurl'] = $buckets[$alioss['bucket']]['location'] . '.aliyuncs.com'; |
|||
if (!empty($_GPC['custom']['url'])) { |
|||
$url = trim($_GPC['custom']['url'], '/'); |
|||
if (!strexists($url, 'http://') && !strexists($url, 'https://')) { |
|||
$url = 'http://' . $url; |
|||
} |
|||
$alioss['url'] = $url; |
|||
} |
|||
} |
|||
|
|||
if($base['service'] == 3){ |
|||
if (empty($qiniu['accesskey'])) { |
|||
wl_json(-1, '请填写Accesskey.'); |
|||
} |
|||
if (empty($qiniu['secretkey'])) { |
|||
wl_json(-1, '请填写secretkey.'); |
|||
} |
|||
if (empty($qiniu['bucket'])) { |
|||
wl_json(-1, '请填写bucket.'); |
|||
} |
|||
if (empty($qiniu['url'])) { |
|||
wl_json(-1, '请填写url.'); |
|||
} else { |
|||
$qiniu['url'] = strexists($qiniu['url'], 'http') ? trim($qiniu['url'], '/') : 'http://' . trim($qiniu['url'], '/'); |
|||
} |
|||
} |
|||
|
|||
if($base['service'] == 4){ |
|||
if (empty($tengxun['appid'])) { |
|||
wl_json(-1, '请填写APPID'); |
|||
} |
|||
if (empty($tengxun['secretid'])) { |
|||
wl_json(-1, '请填写SECRETID'); |
|||
} |
|||
if (empty($tengxun['secretkey'])) { |
|||
wl_json(-1, '请填写SECRETKEY'); |
|||
} |
|||
if (empty($tengxun['bucket'])) { |
|||
wl_json(-1, '请填写BUCKET'); |
|||
} |
|||
} |
|||
|
|||
$base['alioss'] = $alioss; |
|||
$base['qiniu'] = $qiniu; |
|||
$base['tengxun'] = $tengxun; |
|||
|
|||
Setting::wlsetting_save($base,'enclosure'); |
|||
wl_message('更新设置成功!', web_url('setting/shopset/enclosure')); |
|||
} |
|||
include wl_template('setting/enclosure'); |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,43 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="{php echo web_url('app/plugins');}">应用插件库</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-body"> |
|||
<div class="product-list"> |
|||
{loop $category $ck $cate} |
|||
{if !empty($cate['plugins'])} |
|||
<div class="data-box"> |
|||
<div class="data-hd"> |
|||
<h3>{$cate['name']}</h3> |
|||
</div> |
|||
<div class="data-bd"> |
|||
<div class="list-view"> |
|||
<ul class="clr"> |
|||
{loop $cate['plugins'] $pk $plug} |
|||
<li status="1" pid="2"> |
|||
<a href="{$plug['cover']}" target="{$plug['target']}"> |
|||
{if strexists($plug['thumb'], 'addons/'.MODULE_NAME.'/plugin') || strexists($plug['thumb'], 'addons/weliam_merchant/plugin')} |
|||
<span class="icon" style="background:{$cate['color']}"> |
|||
<img src="{$plug['thumb']}" alt=""> |
|||
</span> |
|||
{else} |
|||
<span class="icon" style="background-image:url({php echo tomedia($plug['thumb'])});background-repeat:no-repeat; background-size:100% 100%;-moz-background-size:100% 100%;"></span> |
|||
{/if} |
|||
<h4 class="title">{$plug['name']}</h4> |
|||
<p class="desc">{$plug['des']}</p> |
|||
</a> |
|||
</li> |
|||
{/loop} |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{/loop} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,112 @@ |
|||
{php include wl_template('common/header');} |
|||
{if $_W['method'] == 'account_list'} |
|||
{if empty($_GPC['lct'])} |
|||
<ul class="nav nav-tabs" id="myTab"> |
|||
<li class="active"><a href="javascript:;">公众号权限</a></li> |
|||
</ul> |
|||
{/if} |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-action"> |
|||
<a href="{php echo web_url('cloud/plugin/account_post',['lct'=> $_GPC['lct']])}" class="btn btn-primary">添加新权限</a> |
|||
</div> |
|||
<div class="filter-list"> |
|||
<form action="./index.php?" class="form-horizontal form-filter" id="form1"> |
|||
{php echo tpl_form_filter_hidden('cloud/plugin/account_list');} |
|||
<input type="hidden" name="lct" value="{$_GPC['lct']}"/> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">关键字</label> |
|||
<div class="col-sm-9"> |
|||
<input class="form-control" name="keyword" placeholder="公众号名称" type="text" value="{$_GPC['keyword']}"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary">筛选</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="alert alert-warning">如果没有设置公众号权限,默认拥有全部插件权限</div> |
|||
{if empty($accounts)} |
|||
<div class="no-result"> |
|||
<p>还没有相关数据</p> |
|||
</div> |
|||
{else} |
|||
<div class="table-responsive js-table"> |
|||
<table class="table table-hover"> |
|||
<thead> |
|||
<tr> |
|||
<th>公众号</th> |
|||
<th>应用权限</th> |
|||
<th class="text-right">操作</th> |
|||
</tr> |
|||
</thead> |
|||
{loop $accounts $account} |
|||
<tr> |
|||
<td>{$account['name']}</td> |
|||
<td> |
|||
{loop $account['plugins'] $plugin} |
|||
{if $plugins[$plugin]['name']}{$plugins[$plugin]['name']};{/if} |
|||
{/loop} |
|||
</td> |
|||
<td class="text-right"> |
|||
<a href="{php echo web_url('cloud/plugin/account_post', array('uniacid' => $account['uniacid'],'lct'=> $_GPC['lct']))}" class="btn btn-primary btn-sm">编辑</a> |
|||
<a href="{php echo web_url('cloud/plugin/account_del', array('id' => $account['id']))}" class="btn btn-default btn-sm" data-toggle="ajaxRemove" data-confirm="删除后,公众号将获得全部插件权限,确定删除吗?">删除</a> |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
</table> |
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
|
|||
{if $_W['method'] == 'account_post'} |
|||
{if empty($_GPC['lct'])} |
|||
<ul class="nav nav-tabs" id="myTab"> |
|||
<li class="active"><a href="javascript:;">公众号权限</a></li> |
|||
</ul> |
|||
{/if} |
|||
<div class="app-content"> |
|||
<div class="app-form"> |
|||
<form class="form-horizontal form form-validate" id="form1" action="" method="post" enctype="multipart/form-data"> |
|||
<div class="form-group-title">公众号权限</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">公众号</label> |
|||
<div class="col-sm-9"> |
|||
<select name="uniacid" class="form-control select2"> |
|||
{loop $all_wechats $wechat} |
|||
<option value="{$wechat['uniacid']}" {if $wechat['uniacid'] == $perm['uniacid']}selected{/if}>{$wechat['name']}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">开放插件</label> |
|||
<div class="col-sm-9"> |
|||
{loop $plugins $plugin} |
|||
<label class="checkbox checkbox-inline"> |
|||
<input type="checkbox" name="plugins[]" value="{$plugin['ident']}" {if in_array($plugin['ident'], $perm['plugins'])}checked{/if}/>{$plugin['name']} |
|||
</label> |
|||
{/loop} |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<input type="submit" value="提交" class="btn btn-primary min-width"> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,47 @@ |
|||
{php include wl_template('common/header');} |
|||
<style> |
|||
.weliam-auth .alert-warning{background: #fff7cc;border: 1px solid #feb;color: #333;} |
|||
.weliam-auth .alert-warning a{color: #3296fa;} |
|||
.weliam-auth .auth-panel{background: #f7faff;-webkit-box-shadow:none;box-shadow: none;border: none;} |
|||
.weliam-auth .auth-panel .auth-heading{padding: 15px!important;border-radius: 4px 4px 0 0;color: #ffffff;background-color: #3296fa;} |
|||
.weliam-auth .auth-panel .auth-body{padding: 40px 50px 0;} |
|||
.weliam-auth .auth-panel .auth-body .col-md-4{margin-bottom: 40px;font-weight: bold;} |
|||
.weliam-auth .auth-panel .auth-body .col-md-4 span{margin-left: 15px;font-weight: normal;} |
|||
</style> |
|||
{if empty($_GPC['lct'])} |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="{php echo web_url('cloud/auth');}">系统授权</a></li> |
|||
</ul> |
|||
{/if} |
|||
<div class="app-content"> |
|||
<div class="app-form"> |
|||
<div class="weliam-auth"> |
|||
<!--<div class="alert alert-warning" role="alert">官方网站:<a href='https://www.weliam.cn' target='_blank'>https://www.weliam.cn</a>,每个站点享受一年免费更新服务,更新时间到期不影响程序使用。</div>--> |
|||
<div class="auth-panel"> |
|||
<div class="auth-heading">授权信息</div> |
|||
<div class="auth-body"> |
|||
{if empty($auth)} |
|||
|
|||
{else} |
|||
<div class="row"> |
|||
<div class="col-md-4">产品名称:<span>{$auth['name']}</span></div> |
|||
<div class="col-md-4">平台数量:<span>{$auth['number']}</span></div> |
|||
<div class="col-md-4">最新版本:<span>{$auth['version']}</span></div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-md-4">授权域名:<span>{$auth['siteurl']}</span></div> |
|||
<div class="col-md-4">授权IP:<span>{$auth['ip']}</span></div> |
|||
<div class="col-md-4">授权码:<span>{$auth['code']}</span></div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-md-4">授权状态:<span>{$auth['status']}</span></div> |
|||
<div class="col-md-4">到期时间:<span>{$auth['endtime']}</span></div> |
|||
<div class="col-md-4">站点ID:<span>{$auth['siteid']}</span></div> |
|||
</div> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,46 @@ |
|||
{php include wl_template('common/header');} |
|||
{if empty($_GPC['lct'])} |
|||
<ul class="nav nav-tabs" id="myTab"> |
|||
<li class="active"><a href="#tab_basic">基本设置</a></li> |
|||
</ul> |
|||
{/if} |
|||
<div class="app-content"> |
|||
<div class="app-form"> |
|||
<form action="" method="post" class="form-horizontal form" id="setting-form"> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-heading">基本设置</div> |
|||
<div class="panel-body"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">系统名称</label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="name" class="form-control" value="{$settings['name']}" /> |
|||
<span class="help-block">默认:{if Customized::init('distributionText') > 0}门店共享系统{else}智慧城市O2O{/if}</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">LOGO</label> |
|||
<div class="col-sm-9"> |
|||
{php echo attachment_select('logo', $settings['logo']);} |
|||
<span class="help-block">建议大小190X50</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">系统版权</label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="copyright" class="form-control" value="{$settings['copyright']}" /> |
|||
<span class="help-block">默认调用公众号名称</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<input type="submit" name="submit" value="提交" class="btn btn-primary min-width" /> |
|||
<input type="hidden" name="token" value="{$_W['token']}" /> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,40 @@ |
|||
{php include wl_template('common/header');} |
|||
{if empty($_GPC['lct'])} |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="{php echo url('cloud/database/run');}">运行SQL</a></li> |
|||
</ul> |
|||
{/if} |
|||
<div class="app-content"> |
|||
<div class="app-form"> |
|||
<form action="" method="post" class="form-horizontal form" onsubmit="return confirm('请确保你已经了解这些语句的作用, 并自愿承担风险.');"> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-heading">运行SQL语句</div> |
|||
<div class="panel-body"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">运行说明</label> |
|||
<div class="col-sm-9"> |
|||
<div class="help-block">通过此功能可以直接在数据库中执行特定语句, 用于调试错误. 或者系统管理员特定排错. 注意, 这里运行的语句不会有任何返回结果.</div> |
|||
<div class="help-block"><strong>注意: 此功能可能造成数据破坏, 请谨慎使用. 如果你不清楚他的功能, 请不要使用.</strong></div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">SQL</label> |
|||
<div class="col-sm-9"> |
|||
<textarea name="sql" class="form-control" rows="8"></textarea> |
|||
<div class="help-block">多条语句请使用 ; 隔开</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button type="submit" class="btn btn-primary min-width" name="submit" value="提交">运行SQL</button> |
|||
<input type="hidden" name="token" value="{$_W['token']}" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
|
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,114 @@ |
|||
{php include wl_template('common/header');} |
|||
{if empty($_GPC['lct'])} |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="#">数据管理</a></li> |
|||
</ul> |
|||
{/if} |
|||
<div class="app-content"> |
|||
<div class="app-form"> |
|||
<!-- 安装地区数据--> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-heading">安装地区数据</div> |
|||
<div class="panel-body"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">使用说明</label> |
|||
<div class="col-sm-9"> |
|||
<div class="help-block">使用前,请先安装地区数据,如您已执行过地区数据可不用重复执行</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button type="button" class="btn btn-w-m btn-primary" onclick="location.href='{php echo web_url('cloud/database/areadata',array('type'=>'install'))}'">安装地区数据</button> |
|||
<button type="button" class="btn btn-w-m btn-danger" onclick="location.href='{php echo web_url('cloud/database/areadata',array('type'=>'clear'))}'">清空地区数据</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- 数据更新--> |
|||
<div class="panel panel-default margin-t-20"> |
|||
<div class="panel-heading">数据更新</div> |
|||
<div class="panel-body"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">使用说明</label> |
|||
<div class="col-sm-9"> |
|||
<div class="help-block">当您由于缺少字段导致系统错误时,请执行一次数据更新</div> |
|||
<button type="button" class="btn btn-w-m btn-primary" onclick="upgrade_db()">数据更新</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="panel panel-default margin-t-20"> |
|||
<div class="panel-heading">上传修复</div> |
|||
<div class="panel-body"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">使用说明</label> |
|||
<div class="col-sm-9"> |
|||
<div class="help-block">当您由于代理或商户后台无法上传,显示图片时,请执行一次修复</div> |
|||
<a href="{php echo web_url('cloud/database/permission')}" class="btn btn-w-m btn-primary">修复上传</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{if file_exists(PATH_MODULE . 'check.php')} |
|||
<!--生成数据更新文件--> |
|||
<div class="panel panel-default margin-t-20"> |
|||
<div class="panel-heading">生成数据库更新文件</div> |
|||
<div class="panel-body"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">更新文件</label> |
|||
<div class="col-sm-9"> |
|||
{if file_exists(PATH_CORE . "common/dbfile.php")} |
|||
<div class="help-block">已生成,最近生成时间:<span class="label label-warning">{php echo date('Y-m-d H:i:s', filemtime(PATH_CORE . "common/dbfile.php"))}</span></div> |
|||
{else} |
|||
<div class="help-block">未生成数据库更新文件</div> |
|||
{/if} |
|||
<a href="{php echo web_url('cloud/database/upgrade_file')}" class="btn btn-w-m btn-primary">生成更新文件</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
<div class="upgrade-modal-page"> |
|||
<div class="upgrade-modal-mask"> |
|||
<div class="upgrade-modal"> |
|||
<div> |
|||
<img src="{URL_WEB_RESOURCE}images/upgrade.png"/> |
|||
</div> |
|||
<div class="progress"> |
|||
<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div> |
|||
</div> |
|||
<div class="upgrade-modal-tip"> |
|||
系统正在为您更新数据库,请耐心等待~~~ |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
function upgrade_db() { |
|||
var db = function() { |
|||
$.post("{php echo web_url('cloud/auth/upgrade_db');}", function (data) { |
|||
if(data.errno == 0){ |
|||
$('.upgrade-modal-page').show(); |
|||
upgrade_pragress(data.data.success/data.data.total*100); |
|||
db(); |
|||
} else if (data.errno == 1) { |
|||
$('.upgrade-modal-page').hide(); |
|||
tip.alert('数据更新成功', function () { |
|||
//location.href = "{php echo web_url('cloud/database/datemana');}"; |
|||
location.reload(); |
|||
}); |
|||
} |
|||
},'json'); |
|||
}; |
|||
db(); |
|||
} |
|||
|
|||
function upgrade_pragress(pragress) { |
|||
$('.progress-bar').css('width', pragress + '%'); |
|||
$('.progress-bar').html(pragress.toFixed(2) + '%'); |
|||
} |
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,75 @@ |
|||
{php include wl_template('common/header');} |
|||
{if empty($_GPC['lct'])} |
|||
<ul class="nav nav-tabs" id="myTab"> |
|||
<li class="active"><a href="#tab_basic">域名跳转</a></li> |
|||
</ul> |
|||
{/if} |
|||
<div class="app-content"> |
|||
<div class="app-form"> |
|||
<form action="" method="post" class="form-horizontal form" id="setting-form"> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-heading">域名跳转</div> |
|||
<div class="panel-body"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">入口域名</label> |
|||
<div class="col-sm-9"> |
|||
<div id="datas"> |
|||
{if empty($settings['targetDmain'])} |
|||
<div class="input-group data-item" style="margin-top: 10px;"> |
|||
<input type="text" name="targetDmain[]" class="form-control" value=""> |
|||
<span onclick="removes(this)" class="input-group-addon btn btn-default data-item-delete"><i class="fa fa-remove"></i> 删除</span> |
|||
</div> |
|||
{else} |
|||
{loop $settings['targetDmain'] $domain} |
|||
<div class="input-group data-item" style="margin-top: 10px;"> |
|||
<input type="text" name="targetDmain[]" class="form-control" value="{$domain}"> |
|||
<span onclick="removes(this)" class="input-group-addon btn btn-default data-item-delete"><i class="fa fa-remove"></i> 删除</span> |
|||
</div> |
|||
{/loop} |
|||
{/if} |
|||
</div> |
|||
<span class="help-block">填入需要被跳转的旧域名,以"/"结尾,如“https://www.baidu.com/”。</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<a class="btn btn-info btn-add-type" href="javascript:;" onclick="addType();"> |
|||
<i class="fa fa-plus" title=""></i>增加一个入口域名 |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">目标域名</label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="endDmain" class="form-control" value="{$settings['endDmain']}"> |
|||
<span class="help-block">填入需要跳入的域名,以"/"结尾,如“https://www.baidu.com/”。</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<input type="submit" name="submit" value="提交" class="btn btn-primary min-width" /> |
|||
<input type="hidden" name="token" value="{$_W['token']}" /> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
function addType() { |
|||
$(".btn-add-type").button("loading"); |
|||
var html = " <div class='input-group data-item' style='margin-top: 10px;'>"+ |
|||
"<input type='text' name='targetDmain[]' class='form-control' value=''>"+ |
|||
"<span onclick='removes(this)' class='input-group-addon btn btn-default data-item-delete'><i class='fa fa-remove'></i> 删除</span>"+ |
|||
"</div>"; |
|||
$("#datas").append(html); |
|||
$(".btn-add-type").button("reset"); |
|||
} |
|||
function removes(asd){ |
|||
$(asd).closest('.data-item').remove(); |
|||
} |
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,34 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs" id="myTab"> |
|||
<li class="active"><a href="#tab_basic">迁移数据</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-form"> |
|||
<form action="" method="post" class="form-horizontal form form-validate"> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-heading">迁移数据</div> |
|||
<div class="panel-body"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">公众号ID</label> |
|||
<div class="col-sm-9"> |
|||
<div class="input-group"> |
|||
<span class="input-group-addon">从</span> |
|||
<input class="form-control" type="number" value="" name="from" required> |
|||
<span class="input-group-addon">到</span> |
|||
<input class="form-control" type="number" value="" name="to" required> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<input type="submit" name="submit" value="提交" class="btn btn-primary min-width" /> |
|||
<input type="hidden" name="token" value="{$_W['token']}" /> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,131 @@ |
|||
{php include wl_template('common/header');} |
|||
{if empty($_GPC['lct'])} |
|||
<ul class="nav nav-tabs" id="myTab"> |
|||
<li class="active"><a href="javascript:;">应用信息</a></li> |
|||
</ul> |
|||
{/if} |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-action" style="padding-top:10px;"> |
|||
<a href="javascript:;" class="btn btn-primary js-pass" >还原应用信息</a> |
|||
</div> |
|||
<div class="filter-list"> |
|||
<form action="./index.php?" class="form-horizontal form-filter" id="form1"> |
|||
{php echo tpl_form_filter_hidden('cloud/plugin/index');} |
|||
<input type="hidden" name="type" value="{$type}"/> |
|||
<input type="hidden" name="lct" value="{$_GPC['lct']}"/> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">类型</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo ifilter_url('type:');}" class="btn {if $type == ''}btn-primary{else}btn-default{/if}">不限</a> |
|||
{loop $types $key $row} |
|||
<a href="{php echo ifilter_url('type:' . $key);}" class="btn {if $type == $key}btn-primary{else}btn-default{/if}">{$row['name']}</a> |
|||
{/loop} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">关键字</label> |
|||
<div class="col-sm-9"> |
|||
<input class="form-control" name="keyword" placeholder="插件名称/插件标识" type="text" value="{$_GPC['keyword']}"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary">筛选</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<form action="" class="form-table form form-validate" method="post"> |
|||
{if empty($plugins)} |
|||
<div class="no-result"> |
|||
<p>还没有相关数据</p> |
|||
</div> |
|||
{else} |
|||
<div class="table-responsive js-table"> |
|||
<table class="table table-hover"> |
|||
<thead> |
|||
<tr> |
|||
<th>开关</th> |
|||
<th>图标</th> |
|||
<th>标识</th> |
|||
<th>插件名称</th> |
|||
<th>插件简介</th> |
|||
<th>排序</th> |
|||
</tr> |
|||
</thead> |
|||
{loop $plugins $plugin} |
|||
<tr> |
|||
<input type="hidden" name="ids[]" value="{$plugin['id']}"> |
|||
<td> |
|||
<div class="checkbox checkbox-inline"> |
|||
<input type="checkbox" name="statuss[]" value="{$plugin['id']}" {if $plugin['status'] == 1}checked{/if}> |
|||
<label></label> |
|||
</div> |
|||
</td> |
|||
<td> |
|||
<div class="js-selectAttachment img-item" style="width: 50px; height: 50px; background: #1ab394;"> |
|||
<img src="{php echo tomedia($plugin['thumb']);}" width="50" height="50"/> |
|||
<input type="hidden" name="pluginimgs[]"> |
|||
</div> |
|||
</td> |
|||
<td>{$plugin['name']}</td> |
|||
<td> |
|||
<input type="text" name="titles[]" value="{$plugin['title']}" class="form-control with200"/> |
|||
</td> |
|||
<td> |
|||
<input type="text" name="abilitys[]" value="{$plugin['ability']}" class="form-control"/> |
|||
</td> |
|||
<td> |
|||
<input type="text" name="displayorders[]" value="{$plugin['displayorder']}" class="form-control with100"/> |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
</table> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
<input name="token" type="hidden" value="{$_W['token']}" /> |
|||
<input type="submit" class="btn btn-primary" name="submit" value="提交修改" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<script language="javascript"> |
|||
$(function(){ |
|||
require(['jquery', 'util'], function ($, util) { |
|||
$('.js-selectImg').unbind('click').click(function () { |
|||
var imgitem = $(this).closest('.img-item'); |
|||
util.image('', function (data) { |
|||
imgitem.find('img').attr('src', data['url']); |
|||
imgitem.find('input').val(data['attachment']); |
|||
}); |
|||
}); |
|||
}); |
|||
}); |
|||
|
|||
$('.js-pass').click(function(e){ |
|||
e.stopPropagation(); |
|||
var id = $(this).attr('order-id'); |
|||
util.nailConfirm(this, function(state) { |
|||
if (!state) return; |
|||
$.post("{php echo web_url('cloud/plugin/return_plugin')}", {}, function(data) { |
|||
if(!data.errno){ |
|||
util.tips('还原成功'); |
|||
location.reload(); |
|||
}else{ |
|||
util.tips('还原失败'); |
|||
}; |
|||
}, 'json'); |
|||
}, {html:'确认还原所有应用信息吗?', placement:'right'}); |
|||
}); |
|||
|
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,72 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="javascript:;">重复结算数据</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="alert alert-warning"> |
|||
累计重复结算金额:<span class="text-danger">¥{php echo $allmoney['allagentmoney'] + $allmoney['alldismoney'] + $allmoney['allstoremoney']}</span>,其中商户累计重复结算金额:<span class="text-danger">¥{$allmoney['allstoremoney']}</span>,代理累计重复结算金额:<span class="text-danger">¥{$allmoney['allagentmoney']}</span>,分销累计重复结算金额:<span class="text-danger">¥{$allmoney['alldismoney']}</span> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
{if !empty($lists)} |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover table-bordered"> |
|||
<thead> |
|||
<tr> |
|||
<th class="text-center">订单号 \ 核销码</th> |
|||
<th class="text-center">重复总次数 \ 重复总金额</th> |
|||
<th class="text-center">商户结算错误金额 \ 商户当前余额 \ 商户名称</th> |
|||
<th class="text-center">代理结算错误金额 \ 代理当前余额 \ 代理名称</th> |
|||
<th class="text-center">分销结算错误金额</th> |
|||
<th class="text-center">一级分销结算错误金额 \ 分销商当前余额 \ 分销商名称</th> |
|||
<th class="text-center">二级分销结算错误金额 \ 分销商当前余额 \ 分销商名称</th> |
|||
<th class="text-center">操作</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $lists $list} |
|||
<tr class="text-center"> |
|||
<td> |
|||
{$list['orderno']} \ {$list['checkcode']} |
|||
</td> |
|||
<td> |
|||
{$list['count']} \ ¥{php echo $list['allstoremoney'] + $list['allagentmoney'] + $list['alldismoney'];} |
|||
</td> |
|||
<td> |
|||
¥{$list['allstoremoney']} \ ¥{$list['nowstoremoney']} \ {$list['storename']} |
|||
</td> |
|||
<td> |
|||
¥{$list['allagentmoney']} \ ¥{$list['nowagentmoney']} \ {$list['agentname']} |
|||
</td> |
|||
<td> |
|||
¥{$list['alldismoney']} |
|||
</td> |
|||
<td> |
|||
¥{$list['oneerrormoney']} \ ¥{$list['onenowmoney']} \ {$list['onedisname']} |
|||
</td> |
|||
<td> |
|||
¥{$list['twoerrormoney']} \ ¥{$list['twonowmoney']} \ {$list['twodisname']} |
|||
</td> |
|||
<td> |
|||
<a class="btn btn-sm btn-primary" data-toggle="ajaxPost" href="{php echo web_url('cloud/database/repair_settlement_error', array('checkcode' => $list['checkcode']))}" data-confirm="修复以后,商户余额变更为¥{php echo $list['nowstoremoney'] - $list['allstoremoney'];},{if !empty($list['allagentmoney'])}代理余额变更为¥{php echo $list['nowagentmoney'] - $list['allagentmoney'];},{/if}确定修复?">修复结算</a> |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
</div> |
|||
<div class="pull-right"> |
|||
</div> |
|||
</div> |
|||
{else} |
|||
<div class="no-result"> |
|||
<p>还没有相关数据</p> |
|||
</div> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,59 @@ |
|||
{php include wl_template('common/header');} |
|||
{if empty($_GPC['lct'])} |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="javascript:;">计划任务</a></li> |
|||
</ul> |
|||
{/if} |
|||
<div class="app-content"> |
|||
<div class="bs-callout bs-callout-danger" id="callout-glyphicons-empty-only"> |
|||
<h4>{$settings['name']}设置</h4> |
|||
<p>计划任务只需设置一次,所有公众号均可使用</p> |
|||
</div> |
|||
<div class="app-form"> |
|||
<form action="" method="post" class="form-horizontal form form-validate" > |
|||
<div class="panel"> |
|||
<div class="panel-body"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">直接链接</label> |
|||
<div class="col-sm-9"> |
|||
<p class='form-control-static'><a href='javascript:;' class="js-clip" title='点击复制链接' data-url="{php echo $settings['url']}" >{php echo $settings['url']}</a></p> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">计划任务状态</label> |
|||
<div class="col-sm-9"> |
|||
{if $status==2}<button type="button" class="btn btn-primary min-width">正常</button>{else if $status==3}<button type="button" class="btn btn-warning min-width">锁死</button>{else}<button type="button" class="btn btn-danger min-width">异常</button>{/if} |
|||
</div> |
|||
</div> |
|||
{if $status == 3} |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">重启计划任务</label> |
|||
<div class="col-sm-9"> |
|||
<a class="label label-info" data-toggle="ajaxPost" data-confirm="确认重启计划任务?" href="{php echo web_url('cloud/wlsysset/restartqueen')}" style="position: relative;top: 6px;">重启</a> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">适用公众号</label> |
|||
<div class="col-sm-9"> |
|||
<select name ='passiveid[]' class="form-control select2" multiple="multiple"> |
|||
{loop $all_wechats $pp} |
|||
<option value="{$pp['uniacid']}" {if in_array($pp['uniacid'],$passiveid)} selected {/if} >{$pp['name']}</option> |
|||
{/loop} |
|||
</select> |
|||
<span class="help-block">不选择任何公众号即对所有公众号生效</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<input type="submit" name="submit" value="提交" class="btn btn-primary min-width" /> |
|||
<input type="hidden" name="token" value="{$_W['token']}" /> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,107 @@ |
|||
{php include wl_template('common/header');} |
|||
{if empty($_GPC['lct'])} |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="{php echo web_url('cloud/auth/upgrade');}">系统升级</a></li> |
|||
</ul> |
|||
{/if} |
|||
<div class="app-content"> |
|||
<div class="app-form"> |
|||
<div class="system-upgrade"> |
|||
<div class="upgrade-body flex-col flex-align-c"> |
|||
{if WELIAM_VERSION == $log['version'] && !empty($log)} |
|||
<img src="{URL_WEB_RESOURCE}images/chenggong.png" height="180" width="230" alt=""> |
|||
<p class="main-title">恭喜您,当前系统版本是最新版本!</p> |
|||
{else} |
|||
<img src="{URL_WEB_RESOURCE}images/gengxin.png" height="180" width="230" alt=""> |
|||
<p class="main-title">有新的系统版本更新,是否更新?</p> |
|||
{/if} |
|||
<div><span>当前版本:</span> |
|||
<el-tag>{WELIAM_VERSION}</el-tag><span style="margin-left:20px;">最近更新时间:{php echo date('Y-m-d H:i:s', filectime(VERSION_PATH));}</span> |
|||
</div> |
|||
<button type="primary" class="btn btn-primary" style="margin:30px 0;" onclick="upgrade_check();">{if WELIAM_VERSION == $log['version'] && !empty($log)}立即检查新版本{else}立即更新{/if}</button> |
|||
{if !empty($log)} |
|||
<div class="new-text"> |
|||
<p class="title"><span class="f-600">最新版本:</span><span class="orders-blue">{$log['version']}</span><span class="f-600" style="margin-left:20px;">发布时间:{php echo date('Y-m-d H:i:s', $log['updated_at']);}</span></p> |
|||
{php echo htmlspecialchars_decode($log['content']);} |
|||
</div> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
<div class="upgrade-modal-page"> |
|||
<div class="upgrade-modal-mask"> |
|||
<div class="upgrade-modal"> |
|||
<div> |
|||
<img src="{URL_WEB_RESOURCE}images/upgrade.png"/> |
|||
</div> |
|||
<div class="progress"> |
|||
<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div> |
|||
</div> |
|||
<div class="upgrade-modal-tip"> |
|||
系统正在为您更新文件,请耐心等待~~~ |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
{if $_GPC['up'] == 'now'} |
|||
window.onload = function () { |
|||
upgrade_check(); |
|||
} |
|||
{/if} |
|||
|
|||
function upgrade_check() { |
|||
layer.load(2, { |
|||
shade: [0.1,'#383838'] |
|||
}); |
|||
$.post("{php echo web_url('cloud/auth/upgrade');}", function (file) { |
|||
layer.closeAll('loading'); |
|||
if (file.errno == 0) { |
|||
$('.upgrade-modal-page').show(); |
|||
upgrade_download(); |
|||
} else { |
|||
tip.alert(file.message); |
|||
} |
|||
},'json'); |
|||
}; |
|||
|
|||
function upgrade_download() { |
|||
var download = function() { |
|||
$.post("{php echo web_url('cloud/auth/upgrade_download');}", function (data) { |
|||
if(data.errno == 0 || data.errno == 1){ |
|||
upgrade_pragress(data.data.success/data.data.total*100); |
|||
download(); |
|||
} else if (data.errno == 2) { |
|||
$('.upgrade-modal-tip').html('系统正在为您更新数据库,请耐心等待~~~'); |
|||
upgrade_db(); |
|||
} |
|||
},'json'); |
|||
}; |
|||
download(); |
|||
} |
|||
|
|||
function upgrade_db() { |
|||
var db = function() { |
|||
$.post("{php echo web_url('cloud/auth/upgrade_db');}", function (data) { |
|||
if(data.errno == 0){ |
|||
upgrade_pragress(data.data.success/data.data.total*100); |
|||
db(); |
|||
} else if (data.errno == 1) { |
|||
$('.upgrade-modal-page').hide(); |
|||
tip.alert('恭喜您,系统更新成功', function () { |
|||
//location.href = "{php echo web_url('cloud/auth/upgrade');}"; |
|||
location.reload(); |
|||
}); |
|||
} |
|||
},'json'); |
|||
}; |
|||
db(); |
|||
} |
|||
|
|||
function upgrade_pragress(pragress) { |
|||
$('.progress-bar').css('width', pragress + '%'); |
|||
$('.progress-bar').html(pragress.toFixed(2) + '%'); |
|||
} |
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,61 @@ |
|||
{php include wl_template('common/header');} |
|||
{if empty($_GPC['lct'])} |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="{php echo web_url('cloud/auth/upgrade');}">更新日志</a></li> |
|||
</ul> |
|||
{/if} |
|||
<div class="app-content"> |
|||
<div class="update-log" id="mainContent"> |
|||
{if empty($_GPC['lct'])} |
|||
<div class="update-title">更新日志</div> |
|||
{/if} |
|||
<div class="updata-content flex-row" v-for="(item,index) in logs" :key="index"> |
|||
<div class="left flex-col main-height"> |
|||
<p class="orders-blue f-20">{{item.day}}</p> |
|||
<p>{{item.year}}</p> |
|||
</div> |
|||
<div class="right flex-col"> |
|||
<div class="dian"></div> |
|||
<div class="flex-row flex-justify-b"> |
|||
<div class="f-20 title main-height big">版本号:{{item.version}}</div> |
|||
<p class="orders-gray">{{item.hour}}</p> |
|||
</div> |
|||
<div class="item" v-html="item.content"></div> |
|||
</div> |
|||
</div> |
|||
<div class="loadmore" v-if="state"> |
|||
<button class="btn btn-primary btn-sm" @click="getLogs()">查看更多更新日志</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
let obj = new Vue({ |
|||
el:"#mainContent", |
|||
data:{ |
|||
page: 0, |
|||
logs: [], |
|||
state:1//1=显示;0=隐藏 |
|||
}, |
|||
methods:{ |
|||
//更新日志 |
|||
getLogs(){ |
|||
let _this = this; |
|||
_this.page++; |
|||
$.post("{php echo web_url('cloud/auth/upgrade_log');}",{page:_this.page}, function (file) { |
|||
if (file.errno == 0) { |
|||
_this.logs = [..._this.logs,...file.data.logs]; |
|||
if(file.data.logs.length < 10){ |
|||
_this.state = 0; |
|||
} |
|||
} else { |
|||
tip.alert(file.message); |
|||
} |
|||
},'json'); |
|||
}, |
|||
}, |
|||
mounted() { |
|||
this.getLogs(); |
|||
} |
|||
}); |
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,343 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="#">{if Customized::init('distributionText') > 0}共享股东{else}分销{/if}统计</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="./index.php" method="get" class="form-horizontal" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="{$_W['plugin']}" /> |
|||
<input type="hidden" name="ac" value="{$_W['controller']}" /> |
|||
<input type="hidden" name="do" value="{$_W['method']}" /> |
|||
<input type="hidden" name="days" value="{$days}"/> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">时间</label> |
|||
<div class="col-sm-9 js-daterange" data-form="#form1"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('days:0');}" class="btn {if $days == 0}btn-primary{else}btn-default{/if}">今天</a> |
|||
<a href="{php echo wl_filter_url('days:6');}" class="btn {if $days == 6}btn-primary{else}btn-default{/if}">最近7天</a> |
|||
<a href="{php echo wl_filter_url('days:29');}" class="btn {if $days == 29}btn-primary{else}btn-default{/if}">最近30天</a> |
|||
<a href="javascript:;" class="btn js-btn-custom {if $days == -1}btn-primary{else}btn-default{/if}">自定义</a> |
|||
</div> |
|||
<span class="btn-daterange js-btn-daterange {if $days != -1}hide{/if}"> |
|||
{php echo tpl_select_time_info('stat_day', array('start' => $selstarttime, 'end' => $selendtime));} |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">{if Customized::init('distributionText') > 0}共享股东{else}分销商{/if}</label> |
|||
<div class="col-sm-9"> |
|||
<select name="disid" class="form-control select2 js-select2 width-130" id="select-sid"> |
|||
<option value="0" {if !$disid}selected{/if}>全部</option> |
|||
{loop $distributor $dis} |
|||
<option value="{$dis['id']}" {if $dis['id'] == $disid}selected{/if}>{$dis['nickname']}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">柱状图</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('orderby: money')}" class="btn {if $orderby == 'money'}btn-primary{else}btn-default{/if}">佣金金额</a> |
|||
<a href="{php echo wl_filter_url('orderby: ordernum')}" class="btn {if $orderby == 'ordernum'}btn-primary{else}btn-default{/if}">订单数量</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="panel panel-stat"> |
|||
<div class="panel-heading"> |
|||
<h3>总览</h3> |
|||
</div> |
|||
<div class="panel-body"> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
佣金总额(元) |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-all-fee">¥--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
订单总数 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-all-order">--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
订单总额(元) |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-all-money">--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
{if Customized::init('distributionText') > 0}共享股东{else}分销商{/if}总人数 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-all-num">{$distributornum}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="panel-body"> |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
抢购佣金 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-rush-fee">¥--</span> |
|||
</a> |
|||
<span class="info" id="html-total-rush-order">--</span> |
|||
</div> |
|||
</div> |
|||
{if p('wlfightgroup')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
拼团佣金 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-fight-fee">¥--</span> |
|||
</a> |
|||
<span class="info" id="html-total-fight-order">--</span> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if p('wlcoupon')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
卡券佣金 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-coupon-fee">¥--</span> |
|||
</a> |
|||
<span class="info" id="html-total-coupon-order">--</span> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if p('groupon')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
团购佣金 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-groupon-fee">¥--</span> |
|||
</a> |
|||
<span class="info" id="html-total-groupon-order">--</span> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if p('bargain')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
砍价佣金 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-bargain-fee">¥--</span> |
|||
</a> |
|||
<span class="info" id="html-total-bargain-order">--</span> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if p('citydelivery')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
同城配送佣金 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-citydelivery-fee">¥--</span> |
|||
</a> |
|||
<span class="info" id="html-total-citydelivery-order">--</span> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if p('pocket')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
掌上信息佣金 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-pocket-fee">¥--</span> |
|||
</a> |
|||
<span class="info" id="html-total-pocket-order">--</span> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
一卡通佣金 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-half-fee">¥--</span> |
|||
</a> |
|||
<span class="info" id="html-total-half-order">--</span> |
|||
</div> |
|||
</div> |
|||
{if p('citycard')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
同城名片佣金 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-citycard-fee">¥--</span> |
|||
</a> |
|||
<span class="info" id="html-total-citycard-order">--</span> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
付费入驻佣金 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-charge-fee">¥--</span> |
|||
</a> |
|||
<span class="info" id="html-total-charge-order">--</span> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
申请{if Customized::init('distributionText') > 0}共享股东{else}分销商{/if}佣金 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-distri-fee">¥--</span> |
|||
</a> |
|||
<span class="info" id="html-total-distri-order">--</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="panel panel-trend"> |
|||
<div class="panel-heading"> |
|||
<h3>柱状图</h3> |
|||
</div> |
|||
<div class="panel-body"> |
|||
<div id="chart-order-holder" style="width: 100%;height:400px;"></div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-bordered table-hover"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th>日期</th> |
|||
<th>订单数</th> |
|||
<th>总佣金额</th> |
|||
<th>抢购</th> |
|||
{if p('groupon')}<th>团购</th>{/if} |
|||
{if p('wlfightgroup')}<th>拼团</th>{/if} |
|||
{if p('wlcoupon')}<th>卡券</th>{/if} |
|||
{if p('bargain')}<th>砍价</th>{/if} |
|||
{if p('citydelivery')}<th>同城配送</th>{/if} |
|||
<th>一卡通</th> |
|||
{if p('pocket')}<th>掌上信息</th>{/if} |
|||
{if p('citycard')}<th>同城名片</th>{/if} |
|||
<th>付费入驻</th> |
|||
<th>申请{if Customized::init('distributionText') > 0}共享股东{else}分销商{/if}</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $list $record} |
|||
<tr> |
|||
<td><strong>{$record['date']}</strong></td> |
|||
<td><strong>{$record['ordernum']}</strong></td> |
|||
<td><strong>¥{$record['dismoney']}</strong></td> |
|||
<td><span class="text-success">¥{$record['rush']}</span></td> |
|||
{if p('groupon')}<td><span class="text-success">¥{$record['groupon']}</span></td>{/if} |
|||
{if p('wlfightgroup')}<td><span class="text-success">¥{$record['fight']}</span></td>{/if} |
|||
{if p('wlcoupon')}<td><span class="text-success">¥{$record['coupon']}</span></td>{/if} |
|||
{if p('bargain')}<td><span class="text-success">¥{$record['bargain']}</span></td>{/if} |
|||
{if p('citydelivery')}<td><span class="text-success">¥{$record['citydelivery']}</span></td>{/if} |
|||
<td><span class="text-info">¥{$record['half']}</span></td> |
|||
{if p('pocket')}<td><span class="text-info">¥{$record['pocket']}</span></td>{/if} |
|||
{if p('citycard')}<td><span class="text-info">¥{$record['citycard']}</span></td>{/if} |
|||
<td><span class="text-info">¥{$record['charge']}</span></td> |
|||
<td><span class="text-info">¥{$record['distri']}</span></td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
$(function(){ |
|||
myrequire(['g2','data-set'],function(){ |
|||
$.post(location.href, function(stat){ |
|||
var data = $.parseJSON(stat); |
|||
|
|||
//柱状图 |
|||
var chart = new G2.Chart({ |
|||
container: 'chart-order-holder', |
|||
forceFit: true, |
|||
height: 500 |
|||
}); |
|||
chart.source(data.list); |
|||
chart.scale('数据', {}); |
|||
chart.interval().position('year*数据'); |
|||
chart.render(); |
|||
|
|||
$('#html-all-fee').html('¥'+ data.dismoney.toFixed(2)); |
|||
$('#html-total-all-money').html(data.allmoney.toFixed(2)); |
|||
$('#html-total-all-order').html(data.disnum); |
|||
|
|||
$('#html-total-rush-fee').html('¥'+data.rushmoney.toFixed(2)); |
|||
$('#html-total-fight-fee').html('¥'+data.fightmoney.toFixed(2)); |
|||
$('#html-total-coupon-fee').html('¥'+data.couponmoney.toFixed(2)); |
|||
$('#html-total-groupon-fee').html('¥'+data.grouponmoney.toFixed(2)); |
|||
$('#html-total-charge-fee').html('¥'+data.chargemoney.toFixed(2)); |
|||
$('#html-total-half-fee').html('¥'+data.halfmoney.toFixed(2)); |
|||
$('#html-total-distri-fee').html('¥'+data.distrimoney.toFixed(2)); |
|||
$('#html-total-pocket-fee').html('¥'+data.pocketmoney.toFixed(2)); |
|||
$('#html-total-bargain-fee').html('¥'+data.bargainmoney.toFixed(2)); |
|||
$('#html-total-citydelivery-fee').html('¥'+data.citydeliverymoney.toFixed(2)); |
|||
$('#html-total-citycard-fee').html('¥'+data.citycardmoney.toFixed(2)); |
|||
|
|||
$('#html-total-rush-order').html(data.rushnum); |
|||
$('#html-total-fight-order').html(data.fightnum); |
|||
$('#html-total-coupon-order').html(data.couponnum); |
|||
$('#html-total-groupon-order').html(data.grouponnum); |
|||
$('#html-total-charge-order').html(data.chargenum); |
|||
$('#html-total-half-order').html(data.halfnum); |
|||
$('#html-total-distri-order').html(data.distrinum); |
|||
$('#html-total-pocket-order').html(data.pocketnum); |
|||
$('#html-total-bargain-order').html(data.bargainnum); |
|||
$('#html-total-citydelivery-order').html(data.citydeliverynum); |
|||
$('#html-total-citycard-order').html(data.citycardnum); |
|||
|
|||
|
|||
}); |
|||
}); |
|||
}); |
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,463 @@ |
|||
{php include wl_template('common/header');} |
|||
<style> |
|||
.select2-container{min-width: 180px;} |
|||
</style> |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="#">运营统计</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="datacenter" /> |
|||
<input type="hidden" name="ac" value="datacenter" /> |
|||
<input type="hidden" name="do" value="stat_operate" /> |
|||
<input type="hidden" name="days" value="{$days}"/> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">时间</label> |
|||
<div class="col-sm-9 js-daterange" data-form="#form1"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('days:0');}" class="btn {if $days == 0}btn-primary{else}btn-default{/if}">今天</a> |
|||
<a href="{php echo wl_filter_url('days:6');}" class="btn {if $days == 6}btn-primary{else}btn-default{/if}">最近7天</a> |
|||
<a href="{php echo wl_filter_url('days:29');}" class="btn {if $days == 29}btn-primary{else}btn-default{/if}">最近30天</a> |
|||
<a href="javascript:;" class="btn js-btn-custom {if $days == -1}btn-primary{else}btn-default{/if}">自定义</a> |
|||
</div> |
|||
<span class="btn-daterange js-btn-daterange {if $days != -1}hide{/if}"> |
|||
{php echo tpl_select_time_info('stat_day', array('start' => $selstarttime, 'end' => $selendtime));} |
|||
</span> |
|||
</div> |
|||
</div> |
|||
{if !is_store()} |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">选项</label> |
|||
<div class="col-sm-9"> |
|||
<select name="type" class="form-control" id="typese" onchange="changeobj()" > |
|||
{if !is_agent()}<option {if $_GPC['type'] == 2 || empty($_GPC['type'])} selected {/if} value="2">代理</option>{/if} |
|||
<option {if $_GPC['type'] == 1 } selected {/if} value="1">商户</option> |
|||
</select> |
|||
{if !is_agent()} |
|||
<div style="display:inline-block;" id="select-agentid"> |
|||
<select name="agentid" class="select2 js-select2 form-control width-130" > |
|||
<option value="0">所有代理</option> |
|||
<option value="-1" {if $_GPC['agentid'] == -1}selected{/if}>总后台</option> |
|||
{loop $agents $agent} |
|||
<option value="{$agent['id']}" {if $_GPC['agentid'] == $agent['id']}selected{/if}>{$agent['agentname']}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
{/if} |
|||
<div id="select-sid" style="display: inline-block;"> |
|||
<select name="sid" class="form-control select2 js-select2 width-130" > |
|||
<option value="0" {if !$sid}selected{/if}>全部店铺</option> |
|||
{loop $stores $store} |
|||
<option value="{$store['id']}" {if $store['id'] == $sid}selected{/if}>{$store['storename']}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
</form> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="panel panel-stat"> |
|||
<div class="panel-heading"> |
|||
<h3>总览</h3> |
|||
</div> |
|||
<div class="panel-body"> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
营业总额(元) |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-fee">¥--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
支付客户数 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-final-fee">--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
有效订单量 |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="有效订单量(参考公式:有效订单=支付订单 - 退款订单)"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-success-order">--</span> |
|||
</a> |
|||
<span class="info" id="html-avg-pre-order">¥--</span> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
退款订单量 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-cancel-order">--</span> |
|||
</a> |
|||
<span class="info" id="html-total-cancel-fee">¥--</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{if empty($sid)} |
|||
<div class="panel-body"> |
|||
{if p('halfcard')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
一卡通支付金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-half-fee">¥--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if p('pocket')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
掌上信息支付金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-pocket-fee">¥--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if p('citycard')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
同城名片支付金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-citycard-fee">¥--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
付费入驻支付金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-charge-fee">¥--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
{if p('distribution')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
分销申请支付金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-distributor-fee">¥--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if !is_agent() && p('consumption')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
积分兑换支付金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-consumption-fee">¥--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
余额充值支付金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-recharge-fee">¥--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
<div class="panel-body"> |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
抢购支付金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-rush-fee">¥--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
{if p('wlfightgroup')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
拼团支付金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-fight-fee">¥--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if p('wlcoupon')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
卡券支付金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-coupon-fee">¥--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if p('groupon')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
团购支付金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-groupon-fee">¥--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if p('activity')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
活动支付金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-activity-fee">¥--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
在线买单 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-payonline-fee">¥--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
{if p('bargain')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
砍价活动 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-bargain-fee">¥--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if p('citydelivery')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
同城配送 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-citydelivery-fee">¥--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="panel panel-trend {if !$days}hide{/if}"> |
|||
<div class="panel-heading"> |
|||
<h3>趋势图</h3> |
|||
</div> |
|||
<div class="panel-body"> |
|||
<div id="chart-order-holder" style="width: 100%;height:400px;"></div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-bordered table-hover"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th>日期</th> |
|||
<th>订单数</th> |
|||
<th>总营业额</th> |
|||
{if empty($sid)} |
|||
<th>一卡通</th> |
|||
{if p('pocket')} |
|||
<th>掌上信息</th> |
|||
{/if} |
|||
{if p('citycard')} |
|||
<th>同城名片</th> |
|||
{/if} |
|||
<th>付费入驻</th> |
|||
{if p('distribution')} |
|||
<th>分销商申请</th> |
|||
{/if} |
|||
<th>余额充值</th> |
|||
{if !is_agent() && p('consumption')} |
|||
<th>积分兑换</th> |
|||
{/if} |
|||
{/if} |
|||
<th>抢购</th> |
|||
{if p('groupon')} |
|||
<th>团购</th> |
|||
{/if} |
|||
{if p('wlfightgroup')} |
|||
<th>拼团</th> |
|||
{/if} |
|||
{if p('wlcoupon')} |
|||
<th>卡券</th> |
|||
{/if} |
|||
{if p('activity')} |
|||
<th>活动</th> |
|||
{/if} |
|||
<th>买单</th> |
|||
{if p('bargain')} |
|||
<th>砍价</th> |
|||
{/if} |
|||
{if p('citydelivery')} |
|||
<th>同城配送</th> |
|||
{/if} |
|||
<th>总退款</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $list $record} |
|||
<tr> |
|||
<td><strong>{$record['date']}</strong></td> |
|||
<td><strong>{$record['ordernum']}</strong></td> |
|||
<td><strong>{$record['allmoney']}</strong></td> |
|||
{if empty($sid)} |
|||
<td><span class="text-info">¥{$record['half']}</span></td> |
|||
{if p('pocket')}<td><span class="text-info">¥{$record['pocket']}</span></td>{/if} |
|||
{if p('citycard')}<td><span class="text-info">¥{$record['citycard']}</span></td>{/if} |
|||
<td><span class="text-info">¥{$record['chagre']}</span></td> |
|||
{if p('distribution')}<td><span class="text-info">¥{$record['dismoney']}</span></td>{/if} |
|||
<td><span class="text-info">¥{$record['recmoney']}</span></td> |
|||
{if !is_agent() && p('consumption')} |
|||
<td><span class="text-info">¥{$record['consumption']}</span></td> |
|||
{/if} |
|||
{/if} |
|||
<td><span class="text-success">¥{$record['rush']}</span></td> |
|||
{if p('groupon')}<td><span class="text-success">¥{$record['groupon']}</span></td>{/if} |
|||
{if p('wlfightgroup')}<td><span class="text-success">¥{$record['fight']}</span></td>{/if} |
|||
{if p('wlcoupon')}<td><span class="text-success">¥{$record['coupon']}</span></td>{/if} |
|||
{if p('activity')}<td><span class="text-success">¥{$record['activity']}</span></td>{/if} |
|||
<td><span class="text-success">¥{$record['payonline']}</span></td> |
|||
{if p('bargain')}<td><span class="text-success">¥{$record['bargain']}</span></td>{/if} |
|||
{if p('citydelivery')}<td><span class="text-success">¥{$record['citydelivery']}</span></td>{/if} |
|||
<td><strong class="text-danger">¥{$record['reordermoney']}</strong></td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
$(function(){ |
|||
changeobj(); |
|||
|
|||
$.post(location.href, function(stat){ |
|||
var data = $.parseJSON(stat); |
|||
|
|||
$('#html-total-fee').html('¥'+data.allmoney); |
|||
$('#html-final-fee').html(data.paymember); |
|||
$('#html-total-success-order').html(data.ordernum); |
|||
$('#html-avg-pre-order').html('¥'+data.orderyxmoney); |
|||
$('#html-total-cancel-order').html(data.reordernum); |
|||
$('#html-total-cancel-fee').html('¥'+data.reordermoney); |
|||
$('#html-total-half-fee').html('¥'+data.halfmoney); |
|||
$('#html-total-pocket-fee').html('¥'+data.pocketmoney); |
|||
$('#html-total-citycard-fee').html('¥'+data.citycardmoney); |
|||
|
|||
$('#html-total-charge-fee').html('¥'+data.chargemoney); |
|||
$('#html-total-distributor-fee').html('¥'+data.dismoney); |
|||
$('#html-total-recharge-fee').html('¥'+data.recmoney); |
|||
$('#html-total-consumption-fee').html('¥'+data.conmoney); |
|||
|
|||
$('#html-total-rush-fee').html('¥'+data.rushmoney); |
|||
$('#html-total-fight-fee').html('¥'+data.fightmoney); |
|||
$('#html-total-coupon-fee').html('¥'+data.couponmoney); |
|||
$('#html-total-groupon-fee').html('¥'+data.grouponmoney); |
|||
$('#html-total-activity-fee').html('¥'+data.actmoney); |
|||
$('#html-total-payonline-fee').html('¥'+data.onlinemoney); |
|||
$('#html-total-bargain-fee').html('¥'+data.bargainmoney); |
|||
$('#html-total-citydelivery-fee').html('¥'+data.citydeliverymoney); |
|||
}); |
|||
}); |
|||
|
|||
function changeobj(){ |
|||
var flag = $('#typese').val(); |
|||
if(flag == 1){ |
|||
$('#select-agentid').hide(); |
|||
$('#select-sid').show(); |
|||
}else if(flag == 2){ |
|||
$('#select-agentid').show(); |
|||
$('#select-sid').hide(); |
|||
} |
|||
} |
|||
|
|||
myrequire(['g2','data-set'],function(){ |
|||
var data = {$imgdatas}; |
|||
var chart = new G2.Chart({ |
|||
container: 'chart-order-holder', |
|||
forceFit: true, |
|||
height: 400 |
|||
}); |
|||
chart.source(data, { |
|||
dates: { |
|||
range: [0, 1] |
|||
} |
|||
}); |
|||
chart.tooltip({ |
|||
crosshairs: { |
|||
type: 'line' |
|||
} |
|||
}); |
|||
chart.axis('money', { |
|||
label: { |
|||
formatter: function formatter(val) { |
|||
return val; |
|||
} |
|||
} |
|||
}); |
|||
chart.areaStack().position('dates*money').color('name').shape('smooth'); |
|||
chart.lineStack().position('dates*money').color('name').shape('smooth'); |
|||
chart.point().position('dates*money').color('name').size(4).shape('circle').style({ |
|||
stroke: '#fff', |
|||
lineWidth: 1 |
|||
}); |
|||
chart.render(); |
|||
}) |
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,270 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="#">运营统计</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="{if is_agent()}./cityagent.php{else}./index.php{/if}" method="get" class="form-horizontal" id="form1"> |
|||
{if !is_agent()} |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
{/if} |
|||
<input type="hidden" name="p" value="{$_W['plugin']}" /> |
|||
<input type="hidden" name="ac" value="{$_W['controller']}" /> |
|||
<input type="hidden" name="do" value="{$_W['method']}" /> |
|||
<input type="hidden" name="days" value="{$days}"/> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">时间</label> |
|||
<div class="col-sm-9 js-daterange" data-form="#form1"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('days:0');}" class="btn {if $days == 0}btn-primary{else}btn-default{/if}">今天</a> |
|||
<a href="{php echo wl_filter_url('days:6');}" class="btn {if $days == 6}btn-primary{else}btn-default{/if}">最近7天</a> |
|||
<a href="{php echo wl_filter_url('days:29');}" class="btn {if $days == 29}btn-primary{else}btn-default{/if}">最近30天</a> |
|||
<a href="javascript:;" class="btn js-btn-custom {if $days == -1}btn-primary{else}btn-default{/if}">自定义</a> |
|||
</div> |
|||
<span class="btn-daterange js-btn-daterange {if $days != -1}hide{/if}"> |
|||
{php echo tpl_select_time_info('stat_day', array('start' => $selstarttime, 'end' => $selendtime));} |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">其他</label> |
|||
<div class="col-sm-9"> |
|||
<select name="sid" class="form-control select2 js-select2 width-130" id="select-sid"> |
|||
<option value="0" {if !$sid}selected{/if}>全部门店</option> |
|||
{loop $stores $store} |
|||
<option value="{$store['id']}" {if $store['id'] == $sid}selected{/if}>{$store['storename']}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">排序</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('orderby: money')}" class="btn {if $orderby == 'money'}btn-primary{else}btn-default{/if}">营业额</a> |
|||
<a href="{php echo wl_filter_url('orderby: ordernum')}" class="btn {if $orderby == 'ordernum'}btn-primary{else}btn-default{/if}">订单量</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="panel panel-stat"> |
|||
<div class="panel-heading"> |
|||
<h3>总览</h3> |
|||
</div> |
|||
<div class="panel-body"> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
营业总额(元) |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-all-fee">¥--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
总订单 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-all-order">--</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="panel-body"> |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
抢购支付金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-rush-fee">¥--</span> |
|||
</a> |
|||
<span class="info" id="html-total-rush-order">--</span> |
|||
</div> |
|||
</div> |
|||
{if p('wlfightgroup')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
拼团支付金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-fight-fee">¥--</span> |
|||
</a> |
|||
<span class="info" id="html-total-fight-order">--</span> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if p('wlcoupon')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
卡券支付金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-coupon-fee">¥--</span> |
|||
</a> |
|||
<span class="info" id="html-total-coupon-order">--</span> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if p('groupon')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
团购支付金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-groupon-fee">¥--</span> |
|||
</a> |
|||
<span class="info" id="html-total-groupon-order">--</span> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if p('bargain')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
砍价支付金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-bargain-fee">¥--</span> |
|||
</a> |
|||
<span class="info" id="html-total-bargain-order">--</span> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if p('citydelivery')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
同城配送支付金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-citydelivery-fee">¥--</span> |
|||
</a> |
|||
<span class="info" id="html-total-citydelivery-order">--</span> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if p('activity')} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
活动支付金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-activity-fee">¥--</span> |
|||
</a> |
|||
<span class="info" id="html-total-activity-order">--</span> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
<div class="col-md-2"> |
|||
<div class="title"> |
|||
在线买单金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-payonline-fee">¥--</span> |
|||
</a> |
|||
<span class="info" id="html-total-payonline-order">--</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="panel panel-trend"> |
|||
<div class="panel-heading"> |
|||
<h3>趋势图</h3> |
|||
</div> |
|||
<div class="panel-body"> |
|||
<div id="chart-order-holder" style="width: 100%;height:400px;"></div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-bordered table-hover"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th>排名</th> |
|||
<th>商户</th> |
|||
<th>订单量</th> |
|||
<th>订单量占比</th> |
|||
<th>营业额</th> |
|||
<th>营业额占比</th> |
|||
<!--<th class="text-right">操作</th>--> |
|||
</tr> |
|||
</thead> |
|||
<tbody id="storelist"> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
|
|||
$(function(){ |
|||
myrequire(['g2','data-set'],function(){ |
|||
$.post(location.href, function(stat){ |
|||
var data = $.parseJSON(stat); |
|||
var chart = new G2.Chart({ |
|||
container: 'chart-order-holder', |
|||
forceFit: true, |
|||
height: 500 |
|||
}); |
|||
chart.source(data.list); |
|||
chart.scale('数据', {}); |
|||
chart.interval().position('year*数据'); |
|||
chart.render(); |
|||
|
|||
$('#html-all-fee').html('¥'+data.allmoney); |
|||
$('#html-total-all-order').html(data.allorder); |
|||
|
|||
$('#html-total-rush-fee').html('¥'+data.rushmoney); |
|||
$('#html-total-rush-order').html('订单数:'+data.rushorder); |
|||
$('#html-total-fight-fee').html('¥'+data.fightmoney); |
|||
$('#html-total-fight-order').html('订单数:'+data.fightorder); |
|||
$('#html-total-coupon-fee').html('¥'+data.couponmoney); |
|||
$('#html-total-coupon-order').html('订单数:'+data.couponorder); |
|||
$('#html-total-groupon-fee').html('¥'+data.groupmoney); |
|||
$('#html-total-groupon-order').html('订单数:'+data.grouponorder); |
|||
$('#html-total-bargain-fee').html('¥'+data.barmoney); |
|||
$('#html-total-bargain-order').html('订单数:'+data.barorder); |
|||
$('#html-total-citydelivery-fee').html('¥'+data.citydeliverymoney); |
|||
$('#html-total-citydelivery-order').html('订单数:'+data.citydeliveryorder); |
|||
$('#html-total-activity-fee').html('¥'+data.actmoney); |
|||
$('#html-total-activity-order').html('订单数:'+data.actorder); |
|||
$('#html-total-payonline-fee').html('¥'+data.paymoney); |
|||
$('#html-total-payonline-order').html('订单数:'+data.payorder); |
|||
//表格 |
|||
var hh=''; |
|||
var lenth = data.storelist.length; |
|||
for (var i=0;i < data.storelist.length;i++) { |
|||
var rank = i+1; |
|||
hh += '<tr>'; |
|||
hh += '<td><strong>'+rank+'</strong></td>'; |
|||
hh += '<td><strong>'+data.storelist[i].name+'</strong></td>'; |
|||
hh += '<td><span class="text-danger">'+data.storelist[i].order+'</span></td>'; |
|||
hh += '<td><span class="text-danger">'+data.storelist[i].orderrate+'%</span></td>'; |
|||
hh += '<td><span class="text-success">¥'+data.storelist[i].money+'</span></td>'; |
|||
hh += '<td><span class="text-success">'+data.storelist[i].moneyrate+'%</span></td>'; |
|||
hh += '</tr>'; |
|||
} |
|||
$('#storelist').html(hh); |
|||
}); |
|||
}); |
|||
}); |
|||
|
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,169 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="#">商户会员</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="{if is_agent()}./cityagent.php{else}./index.php{/if}" method="get" class="form-horizontal" id="form1"> |
|||
{if !is_agent()} |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
{/if} |
|||
<input type="hidden" name="p" value="{$_W['plugin']}" /> |
|||
<input type="hidden" name="ac" value="{$_W['controller']}" /> |
|||
<input type="hidden" name="do" value="{$_W['method']}" /> |
|||
<input type="hidden" name="days" value="{$days}"/> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">时间</label> |
|||
<div class="col-sm-9 js-daterange" data-form="#form1"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('days:6');}" class="btn {if $days == 6}btn-primary{else}btn-default{/if}">近7天</a> |
|||
<a href="{php echo wl_filter_url('days:29');}" class="btn {if $days == 29}btn-primary{else}btn-default{/if}">近30天</a> |
|||
<a href="javascript:;" class="btn js-btn-custom {if $days == -1}btn-primary{else}btn-default{/if}">自定义</a> |
|||
</div> |
|||
<span class="btn-daterange js-btn-daterange {if $days != -1}hide{/if}"> |
|||
{php echo tpl_select_time_info('stat_day', array('start' => date('Y-m-d', $starttime), 'end' => date('Y-m-d', $endtime)));} |
|||
</span> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="panel panel-stat"> |
|||
<div class="panel-heading"> |
|||
<h3>总览</h3> |
|||
</div> |
|||
<div class="panel-body"> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
新增商户({$daystext}) |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span>{$data['storenew']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
总商户数 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span>{$data['storenum']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
新增会员({$daystext}) |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span>{$data['cardnew']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
总会员数 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span>{$data['cardnum']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="panel-body"> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
付费开通会员({$daystext}) |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span>{$data['cardnew0']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
激活码开通会员({$daystext}) |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span>{$data['cardnew1']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
实卡开通会员({$daystext}) |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span>{$data['cardnew2']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
积分兑换开通会员({$daystext}) |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span>{$data['cardnew3']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{if !is_agent()} |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-bordered table-hover"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th>代理名称</th> |
|||
<th>代理地区</th> |
|||
<th>新增商户({$daystext})</th> |
|||
<th>总商户数</th> |
|||
<th>新增会员({$daystext})</th> |
|||
<th>总会员数</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody id="storelist"> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
</div> |
|||
{if !is_agent()} |
|||
<script> |
|||
$(function(){ |
|||
$.post(location.href, function(stat){ |
|||
var data = $.parseJSON(stat); |
|||
//表格 |
|||
var hh=''; |
|||
var lenth = data.length; |
|||
for (var i=0;i < data.length;i++) { |
|||
var rank = i+1; |
|||
hh += '<tr>'; |
|||
hh += '<td><strong>'+data[i].agentname+'</strong></td>'; |
|||
hh += '<td><strong>'+data[i].areaname+'</strong></td>'; |
|||
hh += '<td><span class="text-danger">'+data[i].storenew+'</span></td>'; |
|||
hh += '<td><span class="text-danger">'+data[i].storenum+'</span></td>'; |
|||
hh += '<td><span class="text-success">'+data[i].cardnew+'</span></td>'; |
|||
hh += '<td><span class="text-success">'+data[i].cardnum+'</span></td>'; |
|||
hh += '</tr>'; |
|||
} |
|||
$('#storelist').html(hh); |
|||
}); |
|||
}); |
|||
</script> |
|||
{/if} |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,357 @@ |
|||
{php include wl_template('common/header');} |
|||
{if $_GPC['type']=='settlement'} |
|||
<ul class="nav nav-tabs"> |
|||
<li {if $_GPC['type']=='settlement' && $_GPC['accountType']=='f2f' }class="active"{/if}><a href="{php echo web_url('finace/wlCash/settlement', array('id'=>$id,'accountType'=>'f2f'));}">手动结算</a></li> |
|||
<li {if $_GPC['type']=='settlement' && $_GPC['accountType']=='weixin'}class="active"{/if}><a href="{php echo web_url('finace/wlCash/settlement', array('id'=>$id,'accountType'=>'weixin'));}">结算到微信钱包</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
{if $_GPC['type']=='settlement' && $_GPC['accountType']=='weixin'} |
|||
<div class="app-table-list"> |
|||
<div class="panel panel-default"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover" style="min-width: 300px;"> |
|||
<thead class="navbar-inner"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th class="col-sm-2">{if $settlementRecord['type']==1}商户{else}代理{/if}信息</th> |
|||
<th class="col-sm-2">申请金额</th> |
|||
<th class="col-sm-2">系统提成</th> |
|||
<th class="col-sm-3">提现</th> |
|||
<th class="col-sm-3">申请时间</th> |
|||
<th class="col-sm-3">操作时间</th> |
|||
<th class="col-sm-3">状态</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr> |
|||
<td>{if $settlementRecord['type']==1}{$settlementRecord['sName']}{else}{$settlementRecord['aName']}{/if}</td> |
|||
<td>{$settlementRecord['sapplymoney']}元</td> |
|||
<td>{$settlementRecord['spercent']}%</td> |
|||
<td> |
|||
{if $settlementRecord['type']==1}<label class="label label-default label-danger">商家提现</label>{/if} |
|||
{if $settlementRecord['type']==2}<label class="label label-default label-danger">代理提现</label>{/if} |
|||
<br> |
|||
<br> |
|||
{if $settlementRecord['settletype']==1}<label class="label label-default label-success">手动处理{elseif $settlementRecord['settletype']==2}<label class="label label-default label-info">微信零钱{else}<label class="label label-default">未结算{/if}</label> |
|||
</td> |
|||
<td>{php echo date('Y-m-d',$settlementRecord['applytime'])}<br>{php echo date('H:i:s',$settlementRecord['applytime'])}</td> |
|||
<td>{php echo date('Y-m-d',$settlementRecord['updatetime'])}<br>{php echo date('H:i:s',$settlementRecord['updatetime'])}</td> |
|||
<td>{if $settlementRecord['status']==1}<label class="label label-default label-info">代理审核中</label>{/if} |
|||
{if $settlementRecord['status']==2}<label class="label label-default label-danger">系统审核中</label>{/if} |
|||
{if $settlementRecord['status']==3}<label class="label label-default label-success">系统审核通过,待结算</label>{/if} |
|||
{if $settlementRecord['status']==4}<label class="label label-default label-success">已结算到代理</label>{/if} |
|||
{if $settlementRecord['status']==5}<label class="label label-default label-success">已结算到商家</label>{/if} |
|||
{if $settlementRecord['status']==-1}<label class="label label-default label-default">系统审核不通过</label>{/if} |
|||
{if $settlementRecord['status']==-2}<label class="label label-default label-default">代理审核不通过</label>{/if} |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="app-form"> |
|||
<div id="weixin"> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-heading">结算注意</div> |
|||
<div class="panel-body"> |
|||
<div class="form-group"> |
|||
<label class="col-xs-12 col-sm-2 col-md-2 col-lg-12 control-label" style="text-align: left;padding-right: 30px;"> 接口调用规则:<br> |
|||
|
|||
◆ 给同一个实名用户付款,单笔单日限额2W/2W<br> |
|||
|
|||
◆ 给同一个非实名用户付款,单笔单日限额2000/2000<br> |
|||
|
|||
◆ 一个商户同一日付款总额限额100W<br> |
|||
|
|||
◆ 单笔最小金额默认为1元<br> |
|||
|
|||
◆ 每个用户每天最多可付款10次,可以在商户平台--API安全进行设置<br> |
|||
|
|||
◆ 给同一个用户付款时间间隔不得低于15秒 |
|||
</label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<form action="" method="post" class="form-horizontal form" enctype="multipart/form-data"> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-body"> |
|||
<div class="panel-body"> |
|||
<!--结算给代理--> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">代理名</label> |
|||
<div class="col-sm-9"> |
|||
<div class="form-control-static">{$settlementRecord['aName']}</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">申请商家</label> |
|||
<div class="col-sm-9"> |
|||
<div class="form-control-static">{$settlementRecord['sName']}</div> |
|||
</div> |
|||
</div> |
|||
<div class="page-heading"> |
|||
<h4>系统</h4> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label" >系统提成</label> |
|||
<div class="col-md-4"> |
|||
<div class="input-group"> |
|||
<input type="text" name="spercent" class="form-control" value="{$settlementRecord['spercent']}" /> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label" >系统所得佣金</label> |
|||
<div class="col-md-4"> |
|||
<div class="input-group"> |
|||
<span class="input-group-addon">¥</span> |
|||
<input type="text" name="spercentmoney" class="form-control" value="{php echo sprintf("%.2f", $settlementRecord['spercent']*$settlementRecord['sapplymoney']/100)}" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<style type="text/css"> |
|||
.page-heading { |
|||
padding: 5px 0; |
|||
border-bottom: 1px solid #ccc; |
|||
margin-bottom: 20px; |
|||
position: relative; |
|||
margin-left: 15px; |
|||
</style> |
|||
<div class="page-heading"> |
|||
<h4>结算</h4> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label" >实际结算给{if $settlementRecord['type']==1}商户{else}代理{/if}</label> |
|||
<div class="col-md-4"> |
|||
<div class="input-group"> |
|||
<span class="input-group-addon">¥</span> |
|||
<input type="text" name="sgetmoney" class="form-control" value="{php echo sprintf("%.2f",$settlementRecord['sapplymoney'] - $settlementRecord['spercent']*$settlementRecord['sapplymoney']/100)}" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<input type="hidden" name="id" value="{$id}"> |
|||
<input type="hidden" name="accountType" value="{$_GPC['accountType']}"> |
|||
<input type="hidden" name="token" value="{$_W['token']}"> |
|||
<input name="submit" type="submit" value="确定" class="btn btn-primary span2" onclick="return confirm('确认?');return false;"> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</form> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if $_GPC['type']=='settlement' && $_GPC['accountType']=='f2f'} |
|||
<div class="app-table-list"> |
|||
<form action="" method="post" class="form-horizontal form" enctype="multipart/form-data"> |
|||
<div class="panel panel-default"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover" style="min-width: 300px;"> |
|||
<thead class="navbar-inner"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th class="col-sm-2">{if $settlementRecord['type']==1}商户{else}代理{/if}信息</th> |
|||
<th class="col-sm-2">申请金额</th> |
|||
<th class="col-sm-2">系统提成</th> |
|||
<th class="col-sm-3">提现</th> |
|||
<th class="col-sm-3">申请时间</th> |
|||
<th class="col-sm-3">操作时间</th> |
|||
<th class="col-sm-3">状态</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr> |
|||
<td>{if $settlementRecord['type']==1}{$settlementRecord['sName']}{else}{$settlementRecord['aName']}{/if}</td> |
|||
<td>{$settlementRecord['sapplymoney']}元</td> |
|||
<td>{$settlementRecord['spercent']}%</td> |
|||
<td> |
|||
{if $settlementRecord['type']==1}<label class="label label-default label-danger">商家提现</label>{/if} |
|||
{if $settlementRecord['type']==2}<label class="label label-default label-danger">代理提现</label>{/if} |
|||
<br> |
|||
<br> |
|||
{if $settlementRecord['settletype']==1}<label class="label label-default label-success">手动处理{elseif $settlementRecord['settletype']==2}<label class="label label-default label-info">微信零钱{else}<label class="label label-default">未结算{/if}</label> |
|||
</td> |
|||
<td>{php echo date('Y-m-d',$settlementRecord['applytime'])}<br>{php echo date('H:i:s',$settlementRecord['applytime'])}</td> |
|||
<td>{php echo date('Y-m-d',$settlementRecord['updatetime'])}<br>{php echo date('H:i:s',$settlementRecord['updatetime'])}</td> |
|||
<td>{if $settlementRecord['status']==1}<label class="label label-default label-info">代理审核中</label>{/if} |
|||
{if $settlementRecord['status']==2}<label class="label label-default label-danger">系统审核中</label>{/if} |
|||
{if $settlementRecord['status']==3}<label class="label label-default label-success">系统审核通过,待结算</label>{/if} |
|||
{if $settlementRecord['status']==4}<label class="label label-default label-success">已结算到代理</label>{/if} |
|||
{if $settlementRecord['status']==5}<label class="label label-default label-success">已结算到商家</label>{/if} |
|||
{if $settlementRecord['status']==-1}<label class="label label-default label-default">系统审核不通过</label>{/if} |
|||
{if $settlementRecord['status']==-2}<label class="label label-default label-default">代理审核不通过</label>{/if} |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="panel-body"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">申请代理</label> |
|||
<div class="col-sm-9"> |
|||
<div class="form-control-static">{$settlementRecord['aName']}</div> |
|||
</div> |
|||
</div> |
|||
{if $settlementRecord['sName']} |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">申请商家</label> |
|||
<div class="col-sm-9"> |
|||
<div class="form-control-static">{$settlementRecord['sName']}</div> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label" >系统提成</label> |
|||
<div class="col-md-4"> |
|||
<div class="input-group"> |
|||
<input type="text" name="spercent" class="form-control" value="{$settlementRecord['spercent']}" /> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label" >系统提成金额</label> |
|||
<div class="col-md-4"> |
|||
<div class="input-group"> |
|||
<span class="input-group-addon">¥</span> |
|||
<input type="text" name="spercentmoney" class="form-control" value="{php echo sprintf("%.2f", $settlementRecord['spercent']*$settlementRecord['sapplymoney']/100)}" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label" >实际结算给{if $settlementRecord['type']==1}商户{else}代理{/if}</label> |
|||
<div class="col-md-4"> |
|||
<div class="input-group"> |
|||
<span class="input-group-addon">¥</span> |
|||
<input type="text" name="sgetmoney" class="form-control" value="{php echo sprintf("%.2f",$settlementRecord['sapplymoney'] - $settlementRecord['spercent']*$settlementRecord['sapplymoney']/100)}" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<input type="hidden" name="id" value="{$id}"> |
|||
<input type="hidden" name="accountType" value="{$_GPC['accountType']}"> |
|||
<input type="hidden" name="token" value="{$_W['token']}"> |
|||
<input name="submit" type="submit" value="确定" class="btn btn-primary span2" onclick="return confirm('确认?');return false;"> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</form> |
|||
</div> |
|||
{/if} |
|||
{elseif $_GPC['type']=='settlementRecord'} |
|||
<!--<div class="panel panel-default"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover" style="min-width: 300px;"> |
|||
<tbody> |
|||
<tr> |
|||
<td><image src="{php echo tomedia($merchant['thumb']);}" style="max-width: 48px; max-height: 48px; border: 1px dotted gray"></td> |
|||
<td>{$merchant['name']}</td> |
|||
<td>总成交额:{if $merchant['amount']}{$merchant['amount']}元{else}0.00元{/if}</td> |
|||
<td>目前可结算金额:{if $merchant['no_money']}{$merchant['no_money']}元{else}0.00元{/if}</td> |
|||
<td>需上缴佣金:{php echo currency_format($merchant['no_money']*$merchant['percent']*0.01);}元</td> |
|||
<td>佣金百分比:{if !empty($merchant['percent'])}{$merchant['percent']}%{else}0.00%{/if}</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div>--> |
|||
<div class="app-table-list"> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-body table-responsive"> |
|||
<table class="table table-hover"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th style="width:80px;">处理状态</th> |
|||
<th style="width:80px;">结算金额</th> |
|||
<th style="width:80px;">到账金额</th> |
|||
<th style="width:80px;">佣金</th> |
|||
<th style="width:80px;">佣金百分比</th> |
|||
<th style="width:80px;">操作时间</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $list $item} |
|||
<tr> |
|||
<td> |
|||
{if $item['status']==1}<label class="label label-default label-default">待确认</label>{/if} |
|||
{if $item['status']==2}<label class="label label-default label-danger">已确认,待打款</label>{/if} |
|||
{if $item['status']==3}<label class="label label-default label-success">已打款</label>{/if} |
|||
</td> |
|||
<td>{$item['money']}元</td> |
|||
<td>{$item['get_money']}元</td> |
|||
<td>{if $item['commission']}{$item['commission']}{else}0.00{/if}</td> |
|||
<td>{if $item['percent']}{$item['percent']}{else}0.00{/if}%</td> |
|||
<td>{php echo date("Y-m-d H:i:s",$item['createtime'])}</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
{$pager} |
|||
</div> |
|||
{elseif $_GPC['type'] == 'moneyRecord'} |
|||
<!--<div class="panel panel-default"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover" style="min-width: 300px;"> |
|||
<tbody> |
|||
<tr> |
|||
<td><image src="{php echo tomedia($merchant['logo']);}" style="max-width: 48px; max-height: 48px; border: 1px dotted gray"></td> |
|||
<td>{$merchant['storename']}</td> |
|||
<td>总成交额:{if $merchant['amount']}{$merchant['amount']}元{else}0.00元{/if}</td> |
|||
<td>目前可结算金额:{if $merchant['no_money']}{$merchant['no_money']}元{else}0.00元{/if}</td> |
|||
<td>佣金百分比:{if !empty($merchant['percent'])}{$merchant['percent']}%{else}0.00%{/if}</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div>--> |
|||
<div class="app-table-list"> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-body table-responsive"> |
|||
<table class="table table-hover"> |
|||
{loop $moneyRecord $item1} |
|||
<tr> |
|||
<td>{if !empty($item1['order'])} |
|||
订单支付 ID:<a href="#">{$item1['orderid']}</a><br> |
|||
{$item1['order']['name']} |
|||
{else}商家结算{/if} |
|||
</td> |
|||
<td>{if $item1['type']==1}支付成功,总金额 |
|||
{elseif $item1['type']==2 || $item['type']==9}发货(核销)成功,可结算金额 |
|||
{elseif $item1['type']==3}取消发货(核销),可结算金额 |
|||
{elseif $item1['type']==4}商家结算,可结算金额 |
|||
{elseif $item1['type']==5}退款,总金额 |
|||
{/if} <span style="color: #F26C4F;font-size: 20px;"><b>{if $item1['money']>0}+{/if}</b>{$item1['money']}</span> |
|||
|
|||
</td> |
|||
<td>{$item1['detail']}</td> |
|||
<td>{php echo date("Y-m-d H:i:s",$item1['createtime']);}</td> |
|||
</tr> |
|||
{/loop} |
|||
</table> |
|||
</div> |
|||
</div> |
|||
{$pager} |
|||
</div> |
|||
{/if} |
|||
</div> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,65 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="">提现记录</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover"> |
|||
<thead> |
|||
<tr> |
|||
<th class="text-left" width="15%">申请信息</th> |
|||
<th class="text-left" width="15%">申请金额</th> |
|||
<th class="text-left" width="15%">系统提成</th> |
|||
<th class="text-left" width="10%">提现</th> |
|||
<th class="text-left" width="15%">申请时间</th> |
|||
<th class="text-left" width="15%">操作时间</th> |
|||
<th class="text-left" width="15%">状态</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $list $merchant} |
|||
<tr> |
|||
<td>代理:{$merchant['aName']}</td> |
|||
<td>{$merchant['sapplymoney']}元</td> |
|||
<td>{$merchant['spercent']}%</td> |
|||
<td> |
|||
{if $merchant['type']==2}<label class="label label-default label-danger">代理申请提现</label>{/if} |
|||
<br><br>{if $merchant['settletype']==1}<label class="label label-default label-success">手动处理{elseif $merchant['settletype']==2}<label class="label label-default label-info">微信零钱{else}<label class="label label-default">未结算{/if}</label> |
|||
</td> |
|||
<td>{php echo date('Y-m-d',$merchant['applytime'])}<br>{php echo date('H:i:s',$merchant['applytime'])}</td> |
|||
<td>{php echo date('Y-m-d',$merchant['updatetime'])}<br>{php echo date('H:i:s',$merchant['updatetime'])}</td> |
|||
<td>{if $merchant['status']==1} |
|||
<label class="label label-default label-default">代理审核中</label> |
|||
{elseif $merchant['status']==2} |
|||
<label class="label label-default label-info">系统审核中</label> |
|||
{elseif $merchant['status']==3} |
|||
<label class="label label-default label-warning">系统审核通过,待结算</label> |
|||
{elseif $merchant['status']==4} |
|||
<label class="label label-default label-danger">已结算给代理</label> |
|||
{elseif $merchant['status']==5} |
|||
<label class="label label-default label-success">已结算到商家</label> |
|||
{elseif $merchant['status']==-1} |
|||
<label class="label label-default label-danger">被系统驳回</label> |
|||
{/if} |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
{if empty($list)} |
|||
<div class="panel-body" style="text-align: center;padding:30px;"> |
|||
暂时没有任何数据! |
|||
</div> |
|||
{/if} |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,243 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="#">提现列表</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="finace" /> |
|||
<input type="hidden" name="ac" value="finaceWithdrawalApply" /> |
|||
<input type="hidden" name="do" value="cashApply" /> |
|||
<input type="hidden" name="status" value="{$_GPC['status']}" /> |
|||
<input type="hidden" name="type" value="{$_GPC['type']}" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">提现状态</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('status:1');}" class="btn {if intval($_GPC['status']) == 0 || intval($_GPC['status']) == 1}btn-primary{else}btn-default{/if}">不限</a> |
|||
<a href="{php echo wl_filter_url('status:2');}" class="btn {if $_GPC['status'] == 2}btn-primary{else}btn-default{/if}">待审核</a> |
|||
<a href="{php echo wl_filter_url('status:3');}" class="btn {if $_GPC['status'] == 3}btn-primary{else}btn-default{/if}">待打款</a> |
|||
<a href="{php echo wl_filter_url('status:4');}" class="btn {if $_GPC['status'] == 4}btn-primary{else}btn-default{/if}">已完成</a> |
|||
<a href="{php echo wl_filter_url('status:5');}" class="btn {if $_GPC['status'] == 5}btn-primary{else}btn-default{/if}">未通过</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">提现类型</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('type:0');}" class="btn {if intval($_GPC['type']) == 0}btn-primary{else}btn-default{/if}">不限</a> |
|||
<a href="{php echo wl_filter_url('type:1');}" class="btn {if $_GPC['type'] == 1}btn-primary{else}btn-default{/if}">商家提现</a> |
|||
<a href="{php echo wl_filter_url('type:2');}" class="btn {if $_GPC['type'] == 2}btn-primary{else}btn-default{/if}">代理提现</a> |
|||
{if p(distribution)} |
|||
<a href="{php echo wl_filter_url('type:3');}" class="btn {if $_GPC['type'] == 3}btn-primary{else}btn-default{/if}"> |
|||
{if Customized::init('distributionText') > 0}共享股东{else}分销{/if}提现 |
|||
</a> |
|||
{/if} |
|||
<a href="{php echo wl_filter_url('type:4');}" class="btn {if $_GPC['type'] == 4}btn-primary{else}btn-default{/if}">用户余额提现</a> |
|||
{if p('dating')} |
|||
<a href="{php echo wl_filter_url('type:5');}" class="btn {if $_GPC['type'] == 5}btn-primary{else}btn-default{/if}">红娘提现</a> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">申请时间段</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
{php echo tpl_select_time_info('time', array('starttime' => date('Y-m-d',$starttime), 'endtime' => date('Y-m-d', $endtime)));} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary" type="submit">筛选</button> |
|||
<button class="btn btn-default" type="submit" name="export" value="export"><i class="fa fa-download"></i> 导出记录</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th>提现人信息</th> |
|||
<th>提现类型</th> |
|||
<th>提现金额</th> |
|||
<th>申请渠道</th> |
|||
<th>提现方式</th> |
|||
<th>手续费</th> |
|||
<th>到账金额</th> |
|||
<th>到账类型</th> |
|||
<th>申请时间</th> |
|||
<th>操作时间</th> |
|||
<th>状态</th> |
|||
<th class="text-center">操作</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $list $merchant} |
|||
<tr> |
|||
<td> |
|||
<a href="{$merchant['currurl']}"> |
|||
{if $merchant['type']==1} |
|||
商家:{$merchant['name']} |
|||
{elseif $merchant['type']==2} |
|||
代理:{$merchant['name']} |
|||
{elseif $merchant['type']==3} |
|||
{if Customized::init('distributionText') > 0}共享股东{else}分销商{/if}:{$merchant['name']} |
|||
{elseif $merchant['type']==4} |
|||
用户:{$merchant['name']} |
|||
{elseif $merchant['type']==5} |
|||
红娘:{$merchant['name']} |
|||
{/if} |
|||
</a> |
|||
</td> |
|||
<td> |
|||
{if $merchant['type']==1}<label class="label label-default label-primary">商家提现</label>{/if} |
|||
{if $merchant['type']==2}<label class="label label-default label-danger">代理提现</label>{/if} |
|||
{if $merchant['type']==3}<label class="label label-default label-warning">{if Customized::init('distributionText') > 0}共享股东{else}分销{/if}提现</label>{/if} |
|||
{if $merchant['type']==4}<label class="label label-default label-info">用户余额提现</label>{/if} |
|||
{if $merchant['type']==5}<label class="label label-default label-inverse">红娘提现</label>{/if} |
|||
</td> |
|||
<td>{$merchant['sapplymoney']}元</td> |
|||
<td> |
|||
{if $merchant['source'] == 1} |
|||
<label class="label label-default label-success">微信公众号</label> |
|||
{else if $merchant['source'] == 3} |
|||
<label class="label label-default label-info">微信小程序</label> |
|||
{else if $merchant['source'] == 2} |
|||
<label class="label label-default label-warning">H5网页端</label> |
|||
{/if} |
|||
</td> |
|||
<td> |
|||
{if $merchant['payment_type'] == 1} |
|||
<label class="label label-default label-warning">支付宝:{$merchant['alipay']}</label> |
|||
{elseif $merchant['payment_type'] == 2} |
|||
<label class="label label-default label-info">微信</label> |
|||
{elseif $merchant['payment_type'] == 3} |
|||
<label class="label label-default label-success">银行卡:{$merchant['card_number']}</label><br /> |
|||
<label class="label label-default label-success">开户行:{$merchant['bank_name']}</label><br /> |
|||
<label class="label label-default label-success">开户人:{$merchant['bank_username']}</label> |
|||
{elseif $merchant['payment_type'] == 4} |
|||
<label class="label label-default">余额</label><br /> |
|||
{elseif $merchant['payment_type'] == 5} |
|||
<label class="label label-default label-danger">任意</label><br /> |
|||
{if $merchant['alipay']} |
|||
<label class="label label-default label-warning">支付宝:{$merchant['alipay']}</label><br /> |
|||
{/if} |
|||
{if $merchant['card_number'] && $merchant['bank_name']} |
|||
<label class="label label-default label-success">银行卡:{$merchant['card_number']}</label><br /> |
|||
<label class="label label-default label-success">开户行:{$merchant['bank_name']}</label><br /> |
|||
<label class="label label-default label-success">开户人:{$merchant['bank_username']}</label> |
|||
{/if} |
|||
{else} |
|||
<!--这里是未添加红包打款前的提现信息 默认为微信--> |
|||
<label class="label label-default label-info">微信</label> |
|||
<!--<label class="label label-default label-danger">未选择提现方式</label>--> |
|||
{/if} |
|||
</td> |
|||
<td>{$merchant['spercentmoney']}元</td> |
|||
<td>{$merchant['sgetmoney']}元</td> |
|||
<td> |
|||
{if $merchant['settletype']==1 || $merchant['settletype']==3 } |
|||
<label class="label label-success">手动处理 |
|||
{elseif $merchant['settletype']==2} |
|||
<label class="label label-info">微信零钱 |
|||
{elseif $merchant['settletype']==4} |
|||
<label class="label label-default">余额到账 |
|||
{elseif $merchant['settletype']==5} |
|||
<label class="label label-warning">红包打款 |
|||
{elseif $merchant['settletype']==6} |
|||
<label class="label label-danger">支付宝转账 |
|||
{else} |
|||
<label class="label label-default">未打款 |
|||
{/if} |
|||
</label> |
|||
</td> |
|||
<td>{php echo date('Y-m-d',$merchant['applytime'])}<br>{php echo date('H:i:s',$merchant['applytime'])}</td> |
|||
<td> |
|||
{if $merchant['updatetime']} |
|||
{php echo date('Y-m-d',$merchant['updatetime'])}<br>{php echo date('H:i:s',$merchant['updatetime'])} |
|||
{/if} |
|||
</td> |
|||
<td> |
|||
<!--15=红娘提现审核中,16=红娘提现审核通过(待打款),17=红娘提现驳回,18=红娘提现已完成(打款完成)--> |
|||
{if $merchant['status']==1} |
|||
<label class="label label-default label-default">审核中</label> |
|||
{elseif $merchant['status']==2 || $merchant['status']==6 || $merchant['status']==7 || $merchant['status']==15} |
|||
<label class="label label-default label-info">待审核</label> |
|||
{elseif $merchant['status']==3 || $merchant['status']==8 || $merchant['status']==16} |
|||
<label class="label label-default label-warning">待打款</label> |
|||
{elseif $merchant['status']==4 || $merchant['status']==5 || $merchant['status']==9 || $merchant['status']==18} |
|||
<label class="label label-default label-success">提现成功</label> |
|||
{elseif $merchant['status']== -1 || $merchant['status']== 10 || $merchant['status']==11 || $merchant['status']==17} |
|||
<label class="label label-default label-danger">驳回申请</label> |
|||
{/if} |
|||
</td> |
|||
<td style="text-align: center;"> |
|||
{if $merchant['status']==2 || $merchant['status']==6 || $merchant['status']==7 || $merchant['status']==15} |
|||
<a href="{php echo web_url('finace/finaceWithdrawalApply/cashApply',array('id'=>$merchant['id'],'type'=>'submit'));}" title="审核通过" class="btn btn-default btn-sm" data-toggle="ajaxRemove" data-confirm="警告:此操作不可逆,确认审核通过?">审核通过</a> |
|||
<a href="{php echo web_url('finace/finaceWithdrawalApply/cashApply',array('id'=>$merchant['id'],'type'=>'reject'));}" title="申请驳回" class="btn btn-danger btn-sm" data-toggle="ajaxRemove" data-confirm="警告:此操作不可逆,确认驳回提现申请?">申请驳回</a> |
|||
{/if} |
|||
{if $merchant['status']==3 || $merchant['status']==8 || $merchant['status']==16} |
|||
{if $merchant['payment_type'] == 1} |
|||
<a href="{php echo web_url('finace/finaceWithdrawalApply/settlementing', array('id'=>$merchant['id'],'type'=>6,'phone'=>$merchant['alipay']));}" title="支付宝打款" class="btn btn-default btn-sm" data-toggle="ajaxRemove" data-confirm="此操作不可逆,确认使用支付宝打款?">支付宝打款</a> |
|||
{elseif $merchant['payment_type'] == 2} |
|||
<a href="{php echo web_url('finace/finaceWithdrawalApply/settlementing', array('id'=>$merchant['id'],'type'=>2));}" title="微信打款" class="btn btn-primary btn-sm" data-toggle="ajaxRemove" data-confirm="此操作不可逆,确认通过微信打款给申请人?">微信打款</a> |
|||
{if $merchant['sgetmoney'] < 200 && $merchant['sgetmoney'] > 1} |
|||
<a href="{php echo web_url('finace/finaceWithdrawalApply/settlementing', array('id'=>$merchant['id'],'type'=>5));}" title="微信红包" class="btn btn-primary btn-sm" data-toggle="ajaxRemove" data-confirm="此操作不可逆,确认通过微信红包打款给申请人?">微信红包</a> |
|||
{/if} |
|||
{elseif $merchant['payment_type'] == 3} |
|||
<!--<a href="{php echo web_url('finace/wlCash/settlementing', array('id'=>$merchant['id'],'type'=>1));}" title="设为已处理" class="btn btn-default btn-sm" data-toggle="ajaxRemove" data-confirm="此操作不可逆,确认修改申请状态为已完成?">银行卡手动处理</a>--> |
|||
{elseif $merchant['payment_type'] == 4} |
|||
<a href="{php echo web_url('finace/finaceWithdrawalApply/settlementing', array('id'=>$merchant['id'],'type'=>4));}" title="余额打款" class="btn btn-default btn-sm" data-toggle="ajaxRemove" data-confirm="此操作不可逆,确认通过余额打款给申请人?">余额打款</a> |
|||
{elseif $merchant['payment_type'] == 5} |
|||
<a href="{php echo web_url('finace/finaceWithdrawalApply/settlementing', array('id'=>$merchant['id'],'type'=>2));}" title="微信打款" class="btn btn-primary btn-sm" data-toggle="ajaxRemove" data-confirm="此操作不可逆,确认通过微信打款给申请人?">微信打款</a> |
|||
{if $merchant['sgetmoney'] < 200 && $merchant['sgetmoney'] > 1} |
|||
<a href="{php echo web_url('finace/finaceWithdrawalApply/settlementing', array('id'=>$merchant['id'],'type'=>5));}" title="微信红包" class="btn btn-primary btn-sm" data-toggle="ajaxRemove" data-confirm="此操作不可逆,确认通过微信红包打款给申请人?">微信红包</a> |
|||
{/if} |
|||
{if $merchant['alipay']} |
|||
<a href="{php echo web_url('finace/finaceWithdrawalApply/settlementing', array('id'=>$merchant['id'],'type'=>6,'phone'=>$merchant['alipay']));}" title="支付宝打款" class="btn btn-default btn-sm" data-toggle="ajaxRemove" data-confirm="此操作不可逆,确认使用支付宝打款?">支付宝打款</a> |
|||
{/if} |
|||
{if $merchant['card_number'] && $merchant['bank_name']} |
|||
<!--<a href="{php echo web_url('finace/wlCash/settlementing', array('id'=>$merchant['id'],'type'=>1));}" title="设为已处理" class="btn btn-default btn-sm" data-toggle="ajaxRemove" data-confirm="此操作不可逆,确认修改申请状态为已完成?">银行卡手动处理</a>--> |
|||
{/if} |
|||
{else} |
|||
<!--未添加红包打款前的提现操作 默认为微信--> |
|||
<a href="{php echo web_url('finace/finaceWithdrawalApply/settlementing', array('id'=>$merchant['id'],'type'=>2));}" title="微信打款" class="btn btn-primary btn-sm" data-toggle="ajaxRemove" data-confirm="此操作不可逆,确认通过微信打款给申请人?">微信打款</a> |
|||
{if $merchant['sgetmoney'] < 200 && $merchant['sgetmoney'] > 1} |
|||
<a href="{php echo web_url('finace/finaceWithdrawalApply/settlementing', array('id'=>$merchant['id'],'type'=>5));}" title="微信红包" class="btn btn-primary btn-sm" data-toggle="ajaxRemove" data-confirm="此操作不可逆,确认通过微信红包打款给申请人?">微信红包</a> |
|||
{/if} |
|||
{/if} |
|||
<a href="{php echo web_url('finace/finaceWithdrawalApply/settlementing', array('id'=>$merchant['id'],'type'=>1));}" title="设为已处理" class="btn btn-default btn-sm"data-toggle="ajaxRemove" data-confirm="此操作不可逆,确认修改申请状态为已完成?">设为已处理</a> |
|||
{/if} |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
{if empty($list)} |
|||
<div class="panel-body" style="text-align: center;padding:30px;"> |
|||
暂时没有任何数据! |
|||
</div> |
|||
{/if} |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,295 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="#">提现订单</a></li> |
|||
</ul> |
|||
<style type='text/css'> |
|||
.trbody td {text-align: center; vertical-align:top;border-left:1px solid #ccc; border-bottom: 1px solid #ddd;} |
|||
</style> |
|||
<style> |
|||
.order-rank img{width:16px; height:16px;} |
|||
.js-remark,.js-admin-remark{word-break:break-all; overflow:hidden; background: #FDEEEE;color: #ED5050;padding: 5px 10px;} |
|||
td.goods-info{position:relative; padding-left:60px;} |
|||
.goods-info .img{position:absolute;top:50%; margin-top:-25px; background: url({IMAGE_LOADING}) center center no-repeat; width:50px;height:50px; } |
|||
.goods-info span {white-space: nowrap;overflow: hidden;text-overflow: ellipsis;display: block;} |
|||
.status-text{cursor:pointer;} |
|||
.table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td {border-top: 1px solid rgba(221, 221, 221, 0);} |
|||
</style> |
|||
<div class="app-content"> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover" style="min-width: 300px;"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th class="col-sm-2">申请信息</th> |
|||
<th class="col-sm-2">申请金额</th> |
|||
<th class="col-sm-2">总提成</th> |
|||
<th class="col-sm-2">代理提成<br>系统提成</th> |
|||
<th class="col-sm-9">提现</th> |
|||
<th class="col-sm-2">申请时间</th> |
|||
<th class="col-sm-2">操作时间</th> |
|||
<th class="col-sm-3">状态</th> |
|||
<th class="col-sm-1">单数</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr> |
|||
<td>{if $settlementRecord['type']==1}商家:{$settlementRecord['sName']}{else}代理:{$settlementRecord['aName']}{/if}</td> |
|||
<td>{if $settlementRecord['type']==1}{$settlementRecord['sapplymoney']}{else}{$settlementRecord['aapplymoney']}{/if}元</td> |
|||
<td>{if $settlementRecord['type']==1}{$settlementRecord['spercent']}{else}{$settlementRecord['apercent']}{/if}%</td> |
|||
<td>{if $settlementRecord['type']==1}{php echo sprintf("%.4f", $settlementRecord['spercent'] - $settlementRecord['apercent'])}%<br>{$settlementRecord['apercent']}%{else}0.0000%<br>{$settlementRecord['apercent']}%{/if}</td> |
|||
<td>{if $settlementRecord['type']==1}<label class="label label-default label-danger">商家销售提现</label>【{if $settlementRecord['type2']==1}超级券{elseif $settlementRecord['type2']==2}拼团{else}抢购{/if}】{/if} |
|||
{if $settlementRecord['type']==2}<label class="label label-default label-danger">VIP申请提现</label>{/if} |
|||
{if $settlementRecord['type']==4}<label class="label label-default label-danger">掌上信息申请提现</label>{/if} |
|||
{if $settlementRecord['type']==3}<label class="label label-default label-danger">一卡通申请提现,待结算</label>{/if}<br><br>{if $settlementRecord['settletype']==1}<label class="label label-default label-success">手动处理{elseif $settlementRecord['settletype']==2}<label class="label label-default label-info">微信零钱{else}<label class="label label-default">未结算{/if}</label> |
|||
</td> |
|||
<td>{php echo date('Y-m-d',$settlementRecord['applytime'])}<br>{php echo date('H:i:s',$settlementRecord['applytime'])}</td> |
|||
<td>{php echo date('Y-m-d',$settlementRecord['updatetime'])}<br>{php echo date('H:i:s',$settlementRecord['updatetime'])}</td> |
|||
<td>{if $settlementRecord['status']==1}<label class="label label-default label-info">代理审核中</label>{/if} |
|||
{if $settlementRecord['status']==2}<label class="label label-default label-danger">系统审核中</label>{/if} |
|||
{if $settlementRecord['status']==3}<label class="label label-default label-success">系统审核通过,待结算</label>{/if} |
|||
{if $settlementRecord['status']==4}<label class="label label-default label-success">已结算到代理</label>{/if} |
|||
{if $settlementRecord['status']==5}<label class="label label-default label-success">已结算到商家</label>{/if} |
|||
{if $settlementRecord['status']==-1}<label class="label label-default label-default">系统审核不通过</label>{/if} |
|||
{if $settlementRecord['status']==-2}<label class="label label-default label-default">代理审核不通过</label>{/if} |
|||
</td> |
|||
<td> |
|||
{$settlementRecord['ordernum']} |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
<a href="{php echo web_url('finace/finaceWithdrawalApply/output', array( 'id'=>$settlementRecord['id']));}" class="btn btn-success min-width js-batch js-off-shelves">导出订单核算</a> |
|||
</div> |
|||
<div class="pull-right"> |
|||
|
|||
</div> |
|||
</div> |
|||
{if $settlementRecord['type']==1} |
|||
<div class="order-list"> |
|||
<div class="panel-body table-responsive collapse in" id="order-template-item-4" style="padding: 0;"> |
|||
<table class="table table-bordered"> |
|||
<thead style="background-color: #FFFFFF;"> |
|||
<tr> |
|||
<th style="width:50px;" class="text-center"><input type="checkbox" onclick="var ck = this.checked;$(':checkbox').each(function(){this.checked = ck});" />全选</th> |
|||
<th style="width:50px">序号</th> |
|||
<th style="width:220px;">商品</th> |
|||
<th style="width:220px; text-align:center;">买家</th> |
|||
<th style="width:120px; text-align:center;">结算状态</th> |
|||
<th style="width:120px; text-align:center;">订单状态</th> |
|||
<th style="width:130px; text-align:center;">金额</th> |
|||
</tr> |
|||
</thead> |
|||
|
|||
</table> |
|||
</div> |
|||
{loop $list $y $item} |
|||
<div class="panel panel-default"> |
|||
<div class="panel-heading clearfix" style="padding: 10px 15px;"> |
|||
<div class="pull-left"> |
|||
<b>商户单号: {$item['orderno']}</b> |
|||
<b> <a href="javascript:;" data-id="{$item['id']}" data-url="{$item['transid']}" id="js-copy{$item['id']}" class="js-copy"> | 交易单号: {if $item['transid']}{$item['transid']}{else}暂无{/if}</a> </b> |
|||
</div> |
|||
</div> |
|||
<div class="panel-body table-responsive" style="padding: 0px;"> |
|||
<table class="table table-bordered"> |
|||
<tbody > |
|||
<tr> |
|||
<td class="text-center" style="width:50px;"> |
|||
<center><input type="checkbox" name="checkbox[]" class="checkbox" value="{$item['id']}" /></center> |
|||
</td> |
|||
<td style="width: 50px;" ><center>{php echo $y+1}</center></td> |
|||
<td class="goods-info line-feed" style="width:220px;padding-left: 10px;"> |
|||
<div class="img"> |
|||
<img class="scrollLoading" src="{IMAGE_PIXEL}" data-url="{php echo tomedia($item['gimg'])}" height="50" width="50" onerror="this.src='{IMAGE_NOPIC_SMALL}'" > |
|||
</div> |
|||
<div class="title" style="padding-left: 60px;"> |
|||
<span>商品ID:{$item['id']}</span><br> |
|||
<span>{$item['gname']}</span> |
|||
</div> |
|||
</td> |
|||
<td class="goods-info line-feed" style="width:220px;padding-left: 10px;"> |
|||
<div class="img"><img class="scrollLoading" style="width: 100%;height: 100%;" src="{IMAGE_PIXEL}" data-url="{php echo tomedia($item['headimg'])}"></div> |
|||
<div class="title" style="padding-left: 60px;"> |
|||
<span>{$item['nickname']}</span> |
|||
<span>{$item['mobile']}</span> |
|||
</div> |
|||
</td> |
|||
<td class="text-center" style="width:120px;"> |
|||
{if $item['issettlement']==1}<span class="label label-info">待结算</span>{/if} |
|||
{if $item['issettlement']==2}<span class="label label-success">已结算</span>{/if} |
|||
{if $item['issettlement']==0}<span class="label label-default">未申请</span>{/if} |
|||
</td> |
|||
<td class="text-center" style="width:120px;"> |
|||
{if $item['paytype']==2}<span class="label label-danger">微信支付</span>{/if} |
|||
{if $item['paytype']==1}<span class="label label-info">余额支付</span>{/if} |
|||
</td> |
|||
<td class="text-center" style="width:130px;"> |
|||
总额:{$item['price']}<br> |
|||
实付:{$item['actualprice']}<br> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
{/loop} |
|||
</div> |
|||
{/if} |
|||
{if $settlementRecord['type']==2} |
|||
<div class="panel-body table-responsive"> |
|||
<table class="table table-hover"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th style="width:120px;">用户mid</th> |
|||
<th style="width:120px;">粉丝信息</th> |
|||
<th style="width:180px;">开通时长</th> |
|||
<th style="width:180px;">充值金额</th> |
|||
<th style="width:180px;">所属地区</th> |
|||
<th style="width:120px;">结算状态</th> |
|||
<th style="width:100px;">本次到期时间</th> |
|||
<th style="width:100px;">充值时间</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $list $item1} |
|||
<tr> |
|||
<td>{$item1['mid']}</td> |
|||
<td>{$item1['member']['nickname']}<br>{$item1['member']['realname']}<br>{$item1['member']['mobile']}</td> |
|||
<td><span style="color: #F26C4F;font-size: 20px;"><b>+</b>{$item1['howlong']} 天</span></td> |
|||
<td>{$item1['price']}</td> |
|||
<td>{$item1['areaName']}</td> |
|||
<td class="text-center" style="width:120px;"> |
|||
{if $item1['issettlement']==0}<span class="label label-default">未申请</span>{/if} |
|||
{if $item1['issettlement']==1}<span class="label label-info">待结算</span>{/if} |
|||
{if $item1['issettlement']==2}<span class="label label-success">已结算</span>{/if} |
|||
</td> |
|||
<td>{php echo date("Y-m-d",$item1['limittime']);}</td> |
|||
<td>{php echo date("Y-m-d",$item1['createtime']);}</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
{/if} |
|||
{if $settlementRecord['type']==3} |
|||
<div class="order-list"> |
|||
<div class="panel-body table-responsive collapse in" id="order-template-item-4" style="padding: 0;"> |
|||
<table class="table table-bordered"> |
|||
<thead style="background-color: #FFFFFF;"> |
|||
<tr> |
|||
<th style="width:150px;text-align:center;">用户信息</th> |
|||
<th style="width:150px;text-align: center;">用户电话</th> |
|||
<th style="width:100px; text-align:center;">充值时长</th> |
|||
<th style="width:100px; text-align:center;">订单金额</th> |
|||
<th style="width:100px; text-align:center;">结算状态</th> |
|||
<th style="width:110px; text-align: center;">支付时间</th> |
|||
</tr> |
|||
</thead> |
|||
</table> |
|||
</div> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-body table-responsive" style="padding: 0px;"> |
|||
<table class="table table-bordered"> |
|||
<tbody > |
|||
{loop $list $y $item} |
|||
<tr> |
|||
<!--一卡通内容--> |
|||
<td class="goods-info line-feed" style="width:150px;padding-left: 10px;height: 60px;"> |
|||
<div class="img"><img src="{IMAGE_PIXEL}" class="scrollLoading" data-url="{php echo tomedia($item['avatar'])}" height="50" width="50" ></div> |
|||
<div class="all-tips" style="margin-left: 50px;"> |
|||
<p class="" style="font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif;">{$item['nickname']}</p> |
|||
</div> |
|||
</td> |
|||
<!--用户信息--> |
|||
<td class="text-center" style="width:150px;font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif;"> |
|||
{$item['mobile']} |
|||
</td> |
|||
<!--创建时间--> |
|||
<td class="text-center" style="width:100px;font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif;"> |
|||
{$item['howlong']}天 |
|||
</td> |
|||
<!--核销时间--> |
|||
<td class="text-center" style="width:100px;font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif;" > |
|||
{$item['price']}元 |
|||
</td> |
|||
<td class="text-center" style="width:100px;font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif;" > |
|||
{if $item['issettlement']==0}<span class="label label-info">未申请</span>{/if} |
|||
{if $item['issettlement']==1}<span class="label label-info">待结算</span>{/if} |
|||
{if $item['issettlement']==2}<span class="label label-success">已结算</span>{/if} |
|||
</td> |
|||
<!--验证码--> |
|||
<td class="text-center" style="width: 110px;"> |
|||
{php echo date('Y-m-d H:i:s',$item['paytime'])} |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if $settlementRecord['type'] == 4} |
|||
<div class="order-list"> |
|||
<div class="panel-body table-responsive collapse in" id="order-template-item-4" style="padding: 0;"> |
|||
<table class="table table-bordered"> |
|||
<thead style="background-color: #FFFFFF;"> |
|||
<tr> |
|||
<th style="width:150px;text-align:center;">用户信息</th> |
|||
<th style="width:150px;text-align: center;">用户电话</th> |
|||
<th style="width:100px; text-align:center;">发帖分类</th> |
|||
<th style="width:100px; text-align:center;">订单金额</th> |
|||
<th style="width:100px; text-align:center;">结算状态</th> |
|||
<th style="width:110px; text-align: center;">支付时间</th> |
|||
</tr> |
|||
</thead> |
|||
</table> |
|||
</div> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-body table-responsive" style="padding: 0px;"> |
|||
<table class="table table-bordered"> |
|||
<tbody > |
|||
{loop $list $y $item} |
|||
<tr> |
|||
<!--一卡通内容--> |
|||
<td class="goods-info line-feed" style="width:150px;padding-left: 10px;height: 60px;"> |
|||
<div class="img"><img src="{IMAGE_PIXEL}" class="scrollLoading" data-url="{php echo tomedia($item['avatar'])}" height="50" width="50" ></div> |
|||
<div class="all-tips" style="margin-left: 50px;"> |
|||
<p class="" style="font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif;">{$item['nickname']}</p> |
|||
</div> |
|||
</td> |
|||
<!--用户信息--> |
|||
<td class="text-center" style="width:150px;font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif;"> |
|||
{$item['mobile']} |
|||
</td> |
|||
<!--创建时间--> |
|||
<td class="text-center" style="width:100px;font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif;"> |
|||
{$item['typename']} |
|||
</td> |
|||
<!--核销时间--> |
|||
<td class="text-center" style="width:100px;font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif;" > |
|||
{$item['price']}元 |
|||
</td> |
|||
<td class="text-center" style="width:100px;font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif;" > |
|||
{if $item['issettlement']==0}<span class="label label-info">未申请</span>{/if} |
|||
{if $item['issettlement']==1}<span class="label label-info">待结算</span>{/if} |
|||
{if $item['issettlement']==2}<span class="label label-success">已结算</span>{/if} |
|||
</td> |
|||
<!--验证码--> |
|||
<td class="text-center" style="width: 110px;"> |
|||
{php echo date('Y-m-d H:i:s',$item['paytime'])} |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,622 @@ |
|||
{php include wl_template('common/header');} |
|||
<style type="text/css"> |
|||
.page-heading { |
|||
padding: 5px 0; |
|||
border-bottom: 1px solid #ccc; |
|||
margin-bottom: 20px; |
|||
position: relative; |
|||
margin-left: 15px; |
|||
</style> |
|||
<style> |
|||
td>i{cursor:pointer; display:inline-block; width:100%; height:100%; color:#428bca;} |
|||
.category-caret{display:inline-block; width:20px; margin: 0 10px; text-align:center; cursor:pointer; color:#d9534f;} |
|||
.add.add_level0{cursor:pointer;} |
|||
.panel-stat .panel-heading strong{font-size: 14px} |
|||
.panel-stat{border: #ddd;} |
|||
.panel-stat .panel-heading, .panel-display .panel-heading, .panel-trend .panel-heading{border-color: #DDDDDD; background-color: #F5F5F5;} |
|||
.panel-stat .panel-heading h3, .panel-trend .panel-heading h3, .panel-display .panel-heading h3{display: inline-block; margin-top: 0; margin-bottom: 0; padding-left: 10px; font-size: 14px; font-weight: bold; border-left: 4px solid #06c1ae} |
|||
.panel-stat .panel-heading .pull-right a{color: #2A2A2A} |
|||
.panel-stat .panel-body, .panel-trend .panel-body{margin-top: 15px; background-color: #f8f8f8;} |
|||
.panel-stat .panel-body>div[class*=col-]{border-right: 1px dotted #ccc; background-color: #F5F5F5;padding-top: 5px;} |
|||
.panel-stat .panel-body>div[class*=col-]:last-child{border-right: none} |
|||
.panel-stat .panel-body .title{text-align: center} |
|||
.panel-stat .panel-body .num-wrapper{text-align: center; } |
|||
.panel-stat .panel-body .num{color: #333; font-size: 40px; display: block} |
|||
.panel-stat .panel-body .info{display: inline-block; color: #999} |
|||
.panel-stat .panel-body{width: 100%; margin: 0 auto; padding: 10px;} |
|||
</style> |
|||
<ul class="nav nav-tabs" id="myTab"> |
|||
<li class="active"><a href="#tab_basic">财务概况</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-action"> |
|||
<a class="btn btn-primary btn-sm" href="{php echo web_url('finace/wlCash/cashSurvey',array('refresh'=>1));}"><i class="fa fa-refresh"></i> 刷新</a> |
|||
<span class="label label-danger"> {$time}更新</span> |
|||
</div> |
|||
<div class="filter-list"> |
|||
<form action="./index.php" method="get" class="form-horizontal" role="form"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="finace" /> |
|||
<input type="hidden" name="ac" value="wlCash" /> |
|||
<input type="hidden" name="do" value="cashSurvey" /> |
|||
<input type="hidden" name="timetype" value="{$_GPC['timetype']}" id="timetype"/> |
|||
<input type="submit" id="submitButton" style="display: none"/> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">时间筛选</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo filter_url('timetype:1');}" class="btn {if $timetype == 1} btn-primary {else}btn-default {/if}">今天</a> |
|||
<a href="{php echo filter_url('timetype:2');}" class="btn {if $timetype == 2} btn-primary {else}btn-default {/if}">最近7天</a> |
|||
<a href="{php echo filter_url('timetype:3');}" class="btn {if $timetype == 3} btn-primary {else}btn-default {/if}">最近30天</a> |
|||
<a href="{php echo filter_url('timetype:0');}" class="btn {if empty($timetype)} btn-primary {else}btn-default {/if}">全部</a> |
|||
<a href="javascript:;" class="btn {if $timetype == 5} btn-primary {else}btn-default {/if} timeslot" >时间段</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<div class="timess" style="{if $timetype != 5}display: none;{/if}"> |
|||
{php echo tpl_select_time_info('time_limit', array('starttime' => date('Y-m-d',$starttime), 'endtime' => date('Y-m-d', $endtime)));} |
|||
<span class="btn btn-default" id="search">查询</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-form"> |
|||
<form action="" method="post" > |
|||
<div class="clearfix"> |
|||
<div class="panel panel-stat"> |
|||
<div class="panel-heading"> |
|||
<h3>总览</h3> |
|||
</div> |
|||
<div class="panel-body"> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
订单总额(元) |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="所有支付过的订单的总金额,包括已退款订单。"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-fee">¥{$newdata['all']['allmoney']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
订单总数 |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="已完成订单:{$newdata['all']['fishorder']}个,未完成订单:{$newdata['all']['ingorder']}个。"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-final-fee">{$newdata['all']['allorder']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
已完成订单金额 |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="被标记为已完成或待评价的订单。"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-success-order">¥{$newdata['all']['fishordermoney']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
未完成订单金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-cancel-order">¥{$newdata['all']['ingordermoney']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="panel-body"> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
平台佣金收入 |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="只计算了已结算订单的抽成"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-serve-fee">¥{$newdata['all']['sysincome']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
已结算金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-delivery-fee">¥{$newdata['all']['fishSettlement']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
未结算金额 |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="不包括未完成订单的金额"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-deliveryer-fee">¥{$newdata['all']['ingSettlement']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
总退款 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-total-refund-fee">¥{$newdata['all']['refund']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="clearfix"> |
|||
<div class="panel panel-stat"> |
|||
<div class="panel-heading"> |
|||
<h3>团购</h3><span class="pull-right"><a style="color: #428bca;" href="javascript:;" flag="1" plugin="groupon" class="js-plugin-hide">隐藏</a></span> |
|||
</div> |
|||
<div class="panel-body" id="groupon-body"> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
订单总额(元) |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="所有支付过的订单的总金额,包括已退款订单。"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-groupon-fee">¥{$newdata['groupon']['grouponallmoney']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
订单总数 |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="已完成订单:{$newdata['groupon']['grouponfishorder']}个,未完成订单:{$newdata['groupon']['grouponingorder']}个。"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-final-fee">{$newdata['groupon']['grouponallorder']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
已完成订单金额 |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="被标记为已完成或待评价的订单。"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-groupon-success-order">¥{$newdata['groupon']['grouponfishordermoney']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
未完成订单金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-groupon-cancel-order">¥{$newdata['groupon']['grouponingordermoney']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="clearfix"> |
|||
<div class="panel panel-stat"> |
|||
<div class="panel-heading"> |
|||
<h3>抢购</h3><span class="pull-right"><a style="color: #428bca;" href="javascript:;" flag="1" plugin="rush" class="js-plugin-hide">隐藏</a></span> |
|||
</div> |
|||
<div class="panel-body" id="rush-body"> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
订单总额(元) |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="所有支付过的订单的总金额,包括已退款订单。"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-rush-fee">¥{$newdata['rush']['rushallmoney']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
订单总数 |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="已完成订单:{$newdata['rush']['rushfishorder']}个,未完成订单:{$newdata['rush']['rushingorder']}个。"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-final-fee">{$newdata['rush']['rushallorder']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
已完成订单金额 |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="被标记为已完成或待评价的订单。"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-rush-success-order">¥{$newdata['rush']['rushfishordermoney']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
未完成订单金额 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-rush-cancel-order">¥{$newdata['rush']['rushingordermoney']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="clearfix"> |
|||
<div class="panel panel-stat"> |
|||
<div class="panel-heading"> |
|||
<h3>拼团</h3><span class="pull-right"><a style="color: #428bca;" href="javascript:;" flag="1" plugin="fight" class="js-plugin-hide">隐藏</a></span> |
|||
</div> |
|||
<div class="panel-body" id="fight-body"> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
订单总额(元) |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="所有支付过的订单的总金额,包括已退款订单。"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-fight-fee">¥{$newdata['fight']['fightallmoney']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
订单总数 |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="已完成订单:{$newdata['fight']['fightfishorder']}个,未完成订单:{$newdata['fight']['fightingorder']}个。"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-final-fee">{$newdata['fight']['fightallorder']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
已完成订单金额 |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="被标记为已完成或待评价的订单。"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-fight-success-order">¥{$newdata['fight']['fightfishordermoney']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
成团数量 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-fight-cancel-order">{$newdata['fight']['successnum']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="clearfix"> |
|||
<div class="panel panel-stat"> |
|||
<div class="panel-heading"> |
|||
<h3>卡券</h3><span class="pull-right"><a style="color: #428bca;" href="javascript:;" flag="1" plugin="coupon" class="js-plugin-hide">隐藏</a></span> |
|||
</div> |
|||
<div class="panel-body" id="coupon-body"> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
已完成订单金额(元) |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="被标记为已完成或待评价的订单。"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-coupon-fee">¥{$newdata['coupon']['couponallmoney']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
订单总数 |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="已完成订单:{$newdata['coupon']['couponfishorder']}个,未完成订单:{$newdata['coupon']['couponingorder']}个。"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-final-fee">{$newdata['coupon']['couponallorder']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
已结算订单金额(元) |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="已结算的卡券订单金额"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-coupon-success-order">¥{$newdata['coupon']['couponfishordermoney']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
已使用卡券总数 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-coupon-cancel-order">{$newdata['coupon']['couponnum']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="clearfix"> |
|||
<div class="panel panel-stat"> |
|||
<div class="panel-heading"> |
|||
<h3>一卡通</h3><span class="pull-right"><a style="color: #428bca;" href="javascript:;" flag="1" plugin="halfcard" class="js-plugin-hide">隐藏</a></span> |
|||
</div> |
|||
<div class="panel-body" id="halfcard-body"> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
开通订单金额(元) |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="一卡通所有统计订单都为已完成订单。"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-halfcard-fee">¥{$newdata['halfcard']['halfcardallmoney']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
开通次数 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-final-fee">{$newdata['halfcard']['halfcardallorder']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
已结算订单金额(元) |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="已结算的开通一卡通订单金额"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-halfcard-success-order">¥{$newdata['halfcard']['halfcardfishordermoney']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
一卡通用户数量 |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="现有的一卡通用户人数,不会随时间条件改变。"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-halfcard-cancel-order">{$newdata['halfcard']['halfcardnum']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="clearfix"> |
|||
<div class="panel panel-stat"> |
|||
<div class="panel-heading"> |
|||
<h3>掌上信息</h3><span class="pull-right"><a style="color: #428bca;" href="javascript:;" flag="1" plugin="pocket" class="js-plugin-hide">隐藏</a></span> |
|||
</div> |
|||
<div class="panel-body" id="pocket-body"> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
订单金额(元) |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="掌上信息所有统计订单都为已完成订单。"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-pocket-fee">¥{$newdata['pocket']['pocketallmoney']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
订单数量 |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-final-fee">{$newdata['pocket']['pocketallorder']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
已结算订单金额(元) |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="已结算的开通一卡通订单金额"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-pocket-success-order">¥{$newdata['pocket']['pocketfishordermoney']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title"> |
|||
掌上信息帖子数量 |
|||
<i class="fa fa-info-circle" data-toggle="popover" data-placement="top" data-content="现有的帖子数量,不会随时间条件改变。"></i> |
|||
</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;"> |
|||
<span id="html-pocket-cancel-order">{$newdata['pocket']['pocketnum']}</span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-heading clearfix"><span style="display: inline-block;border-left: 4px solid #06c1ae;padding-left: 10px;" class="pull-left">代理与商户</span><span class="pull-right"><a href="javascript:;" class="js-category-all">全部展开 </a></span></div> |
|||
<div class="panel-body table-responsive"> |
|||
<table class="table table-hover"> |
|||
<thead> |
|||
<tr> |
|||
<th style="width:200px;">代理名称</th> |
|||
<th style="width:120px; text-align:center;">交易额</th> |
|||
<th style="width:200px; text-align:center;">所占比例</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $agents $item} |
|||
<tr> |
|||
<td class="text-left"> |
|||
<input type="text" class="form-control" maxlength="50" style='display:inline;width:150px;'name="name[{$item['id']}]" value="{$item['agentname']}" /> |
|||
<span class="category-caret"> |
|||
<i class="fa fa-caret-down js-category-down" pid="{$item['id']}">商家</i> |
|||
<i class="fa fa-caret-up js-category-up" style="display:none;" pid="{$item['id']}">商家</i> |
|||
</span> |
|||
</td> |
|||
<td class="text-center"> |
|||
{$item['aMoney']}元 |
|||
</td> |
|||
<td> |
|||
<div class="progress" style="max-width:500px;height:30px;line-height:30px;"> |
|||
<div style="width: {$item['forpercent']}%;" class="progress-bar progress-bar-info"><span style="color:#000">{$item['forpercent']}%</span></div> |
|||
</div> |
|||
</td> |
|||
</tr> |
|||
{loop $children[$item['id']] $ccate} |
|||
<tr class="js-collpase js-child-category" pid="{$item['id']}"> |
|||
<td class="text-left"> |
|||
<div style="padding-left:50px;height:30px;line-height:30px;background:url('./resource/images/bg_repno.gif') no-repeat -245px -545px;"> |
|||
<img src="{php echo tomedia($ccate['logo']);}" width='45' height="45" onerror="$(this).remove()" class="scrollLoading" style='float:left;' /> |
|||
<input type="text" class="form-control" maxlength="50" style='display:inline;width:150px;'name="name[{$ccate['id']}]" value="{$ccate['storename']}" /> |
|||
</div> |
|||
</a> |
|||
</td> |
|||
<td class="text-center"> |
|||
{$ccate['sMoney']}元 |
|||
</td> |
|||
<td> |
|||
<div class="progress" style="max-width:500px;"> |
|||
<div style="width: {$ccate['forpercent']}%;background-color: #78D09F;" class="progress-bar progress-bar-info" ><span style="color:#000">{$ccate['forpercent']}%</span></div> |
|||
</div> |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
{$pager} |
|||
{/loop} |
|||
<!--<tr> |
|||
<td colspan="4"><div class="add add_level0"><i class="fa fa-plus-circle"></i> 添加分类</div></td> |
|||
</tr>--> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
<h5>总成交金额:{$allMoney} 最高成交额:{$max}</h5> |
|||
</div> |
|||
<div class="pull-right"> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
$('.timeslot').click(function(){ |
|||
$('.timess').show(); |
|||
}); |
|||
$("#search").click(function(){ |
|||
$("#timetype").val(5); |
|||
$('#submitButton').click(); |
|||
}); |
|||
</script> |
|||
<script type="text/javascript"> |
|||
require(['jquery', 'util'], function($, util){ |
|||
$('.js-copy').each(function(){ |
|||
var id=$(this).attr('data-id'); |
|||
util.clip($("#js-copy"+id), $(this).attr('data-url')); |
|||
}); |
|||
}); |
|||
</script> |
|||
<script> |
|||
$(function(){ |
|||
$('.js-child-category').hide(); |
|||
//添加父分类 |
|||
//控制显示 |
|||
$('.js-category-all').click(function() { |
|||
if($(this).hasClass('js-collapse')) { |
|||
$('.js-child-category').fadeOut("slow"); |
|||
$('.fa-caret-up').hide(); |
|||
$('.fa-caret-down').show(); |
|||
$(this).text('全部展开').removeClass('js-collapse'); |
|||
} else { |
|||
$('.js-child-category').fadeIn("slow"); |
|||
$('.fa-caret-up').show(); |
|||
$('.fa-caret-down').hide(); |
|||
$(this).text('全部折叠').addClass('js-collapse'); |
|||
} |
|||
}); |
|||
|
|||
$('.js-category-up').click(function() { |
|||
var parentId = $(this).attr('pid'); |
|||
console.log(parentId); |
|||
$('tr[pid="'+parentId+'"]').fadeOut("slow"); |
|||
$(this).prev().show(); |
|||
$(this).hide(); |
|||
}); |
|||
$('.js-category-down').click(function() { |
|||
var parentId = $(this).attr('pid'); |
|||
console.log(parentId); |
|||
$('tr[pid="'+parentId+'"]').fadeIn("slow"); |
|||
$(this).next().show(); |
|||
$(this).hide(); |
|||
}); |
|||
$('[data-toggle="popover"]').hover(function() { |
|||
$(this).popover("show"); |
|||
}, |
|||
function() { |
|||
$(this).popover("hide"); |
|||
}); |
|||
$('.js-plugin-hide').click(function(){ |
|||
var flag = $(this).attr('flag'); |
|||
var pg = $(this).attr('plugin'); |
|||
if(flag>0){ |
|||
$(this).attr('flag',0); |
|||
$('#'+pg+'-body').hide(); |
|||
$(this).text('显示'); |
|||
}else{ |
|||
$(this).attr('flag',1); |
|||
$('#'+pg+'-body').show(); |
|||
$(this).text('隐藏'); |
|||
} |
|||
}); |
|||
}); |
|||
</script> |
|||
|
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,172 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="{php echo web_url('finace/finaceBill/cashrecord')}">账单明细</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="finace" /> |
|||
<input type="hidden" name="ac" value="finaceBill" /> |
|||
<input type="hidden" name="do" value="cashrecord" /> |
|||
<input type="hidden" name="cashtype" value="{$cashtype}" /> |
|||
<div class="form-group max-with-all"> |
|||
<label class="col-sm-2 control-label">结算类型</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('cashtype:0');}" class="btn {if $cashtype == 0}btn-primary{else}btn-default{/if}">全部</a> |
|||
{if p('rush')} |
|||
<a href="{php echo wl_filter_url('cashtype:1');}" class="btn {if $cashtype == 1}btn-primary{else}btn-default{/if}">抢购</a> |
|||
{/if} |
|||
{if p('wlfightgroup')} |
|||
<a href="{php echo wl_filter_url('cashtype:2');}" class="btn {if $cashtype == 2}btn-primary{else}btn-default{/if}">拼团</a> |
|||
{/if} |
|||
{if p('wlcoupon')} |
|||
<a href="{php echo wl_filter_url('cashtype:3');}" class="btn {if $cashtype == 3}btn-primary{else}btn-default{/if}">卡券</a> |
|||
{/if} |
|||
{if !is_store()} |
|||
{if p('halfcard')} |
|||
<a href="{php echo wl_filter_url('cashtype:4');}" class="btn {if $cashtype == 4}btn-primary{else}btn-default{/if}">一卡通</a> |
|||
{/if} |
|||
{if p('pocket')} |
|||
<a href="{php echo wl_filter_url('cashtype:5');}" class="btn {if $cashtype == 5}btn-primary{else}btn-default{/if}">掌上信息</a> |
|||
{/if} |
|||
<a href="{php echo wl_filter_url('cashtype:6');}" class="btn {if $cashtype == 6}btn-primary{else}btn-default{/if}">付费入驻</a> |
|||
<a href="{php echo wl_filter_url('cashtype:7');}" class="btn {if $cashtype == 7}btn-primary{else}btn-default{/if}">提现或驳回</a> |
|||
{if p('distribution')} |
|||
<a href="{php echo wl_filter_url('cashtype:8');}" class="btn {if $cashtype == 8}btn-primary{else}btn-default{/if}">{if Customized::init('distributionText') > 0}共享股东{else}分销合伙人{/if}</a> |
|||
{/if} |
|||
{if p('activity')} |
|||
<a href="{php echo wl_filter_url('cashtype:9');}" class="btn {if $cashtype == 9}btn-primary{else}btn-default{/if}">同城活动</a> |
|||
{/if} |
|||
{/if} |
|||
{if p('groupon')} |
|||
<a href="{php echo wl_filter_url('cashtype:10');}" class="btn {if $cashtype == 10}btn-primary{else}btn-default{/if}">团购</a> |
|||
{/if} |
|||
<a href="{php echo wl_filter_url('cashtype:11');}" class="btn {if $cashtype == 11}btn-primary{else}btn-default{/if}">买单</a> |
|||
{if p('bargain')} |
|||
<a href="{php echo wl_filter_url('cashtype:12');}" class="btn {if $cashtype == 12}btn-primary{else}btn-default{/if}">砍价</a> |
|||
{/if} |
|||
{if p('citycard')} |
|||
<a href="{php echo wl_filter_url('cashtype:13');}" class="btn {if $cashtype == 13}btn-primary{else}btn-default{/if}">同城名片</a> |
|||
{/if} |
|||
{if p('citydelivery')} |
|||
<a href="{php echo wl_filter_url('cashtype:14');}" class="btn {if $cashtype == 14}btn-primary{else}btn-default{/if}">同城配送</a> |
|||
{/if} |
|||
{if p('yellowpage')} |
|||
<a href="{php echo wl_filter_url('cashtype:15');}" class="btn {if $cashtype == 15}btn-primary{else}btn-default{/if}">黄页114</a> |
|||
{/if} |
|||
{if p('recruit')} |
|||
<a href="{php echo wl_filter_url('cashtype:16');}" class="btn {if $cashtype == 16}btn-primary{else}btn-default{/if}">求职招聘</a> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">搜索内容</label> |
|||
<div class="col-sm-9"> |
|||
<select name="keywordtype" class="form-control"> |
|||
<option value="">关键字类型</option> |
|||
<option value="1" {if $_GPC['keywordtype']==1}selected="selected"{/if}>订单编号</option> |
|||
<option value="2" {if $_GPC['keywordtype']==2}selected="selected"{/if}>订单金额大于</option> |
|||
<option value="3" {if $_GPC['keywordtype']==3}selected="selected"{/if}>订单金额小于</option> |
|||
<option value="4" {if $_GPC['keywordtype']==4}selected="selected"{/if}>代理收入大于</option> |
|||
<option value="5" {if $_GPC['keywordtype']==5}selected="selected"{/if}>代理收入小于</option> |
|||
{if !is_store()} |
|||
{if !is_agent()} |
|||
<option value="7" {if $_GPC['keywordtype']==7}selected="selected"{/if}>代理名称</option> |
|||
{/if} |
|||
<option value="6" {if $_GPC['keywordtype']==6}selected="selected"{/if}>商家名称</option> |
|||
{/if} |
|||
</select> |
|||
<input type="text" name="keyword" class="form-control" value="{$_GPC['keyword']}" placeholder="请输入关键字"/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">时间段</label> |
|||
<div class="col-sm-9"> |
|||
{php echo tpl_select_time_info('time_limit',array('starttime' => date('Y-m-d H:i',$starttime),'endtime' => date('Y-m-d H:i',$endtime)));} |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary">筛选</button> |
|||
<button class="btn btn-default min-width" name="export" type="submit" value="export"><i class="fa fa-download"></i> 导出记录</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover table-bordered"> |
|||
<thead> |
|||
<tr> |
|||
<th>订单编号(核销码)</th> |
|||
<th>订单类型{if !is_agent() && !is_store()}/所属代理{/if}</th> |
|||
<th>商品信息</th> |
|||
<th>订单总金额</th> |
|||
<th>商户收入</th> |
|||
<th>分销佣金{if p('salesman')}/业务员佣金{/if}</th> |
|||
<th>{if is_agent()}实际到账{else}代理收入{/if}</th> |
|||
<th>结算时间</th> |
|||
<th>操作</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $records $item} |
|||
<tr> |
|||
<td> |
|||
{$item['orderno']}{if $item['checkcode']}({$item['checkcode']}){/if} |
|||
</td> |
|||
<td> |
|||
<p><span class="label label-info">{$item['typename']}</span></p> |
|||
<p>{$item['agentuser']}</p> |
|||
</td> |
|||
<td> |
|||
<p>{$item['title']}</p> |
|||
{if $item['storename']}<p>商家:{$item['storename']}</p>{/if} |
|||
</td> |
|||
<td> |
|||
¥{$item['orderprice']} |
|||
{if $item['specialstatus'] == 1}<br /><span class="label label-warning">过期订单</span>{/if} |
|||
</td> |
|||
<td> |
|||
{if $item['merchantmoney']>0}+{/if}{$item['merchantmoney']} |
|||
{if $item['merchantnowmoney']>0}<br /><span style="color: goldenrod;">({$item['merchantnowmoney']})</span> {/if} |
|||
</td> |
|||
<td> |
|||
+{$item['distrimoney']}<br/> |
|||
+{$item['salesmoney']} |
|||
</td> |
|||
<td> |
|||
<span style="color:{if $item['agentmoney']>0} orangered {else} green {/if};"> {if $item['agentmoney']>0}+{/if}{$item['agentmoney']}</span><br /> |
|||
<span style="color: goldenrod;">({$item['agentnowmoney']})</span> |
|||
</td> |
|||
<td> |
|||
{php echo date('Y-m-d H:i:s',$item['createtime'])} |
|||
</td> |
|||
<td> |
|||
<a href="{$item['orderurl']}" class="btn btn-default btn-sm" target="_blank">查看订单</a> |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,344 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs" id="myTab"> |
|||
<li class="active"><a href="#tab_basic">提现设置</a></li> |
|||
<li class="sysallocation"><a href="#tab_cash">结算设置</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-form"> |
|||
<form action="" method="post" class="form-horizontal form form-validate" > |
|||
<div class="panel-heading">财务设置</div> |
|||
<div class="tab-content"> |
|||
<div class="tab-pane active" id="tab_basic"> |
|||
<div class="sysallocation"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">商户预留金额</label> |
|||
<div class="col-sm-9"> |
|||
<div class="input-group"> |
|||
<span class="input-group-addon">¥</span> |
|||
<input type="text" name="cashset[reservemoney]" class="form-control" value="{$cashset['reservemoney']}" /> |
|||
</div> |
|||
<div class="help-block">提现后,商户账户余额必须大于预留金额。</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label" >提现金额限制</label> |
|||
<div class="col-sm-9"> |
|||
<div class="input-group"> |
|||
<span class="input-group-addon">最小¥</span> |
|||
<input type="number" mid="0" name="cashset[lowsetmoney]" class="form-control" value="{$cashset['lowsetmoney']}" /> |
|||
<span class="input-group-addon">最大¥</span> |
|||
<input type="number" mid="0" name="cashset[maxsetmoney]" class="form-control" value="{$cashset['maxsetmoney']}" /> |
|||
</div> |
|||
<div class="help-block">设置为0时,没有金额的大小限制。</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label" >提现间隔时间</label> |
|||
<div class="col-sm-9"> |
|||
<div class="input-group"> |
|||
<input type="text" name="cashset[shopIntervalTime]" class="form-control" value="{$cashset['shopIntervalTime']}" /> |
|||
<span class="input-group-addon">天</span> |
|||
</div> |
|||
<div class="help-block">为0天时,则没有间隔时间!</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">打款方式</label> |
|||
<div class="col-sm-9"> |
|||
<label class="checkbox-inline"> |
|||
<input type="checkbox" name="cashset[payment_type][alipay]" value="1" {if $cashset['payment_type']['alipay'] == 1}checked{/if}> 支付宝 |
|||
</label> |
|||
<label class="checkbox-inline"> |
|||
<input type="checkbox" name="cashset[payment_type][we_chat]" value="1" {if $cashset['payment_type']['we_chat'] == 1}checked{/if}> 微信 |
|||
</label> |
|||
<label class="checkbox-inline"> |
|||
<input type="checkbox" name="cashset[payment_type][bank_card]" value="1" {if $cashset['payment_type']['bank_card'] == 1}checked{/if}> 银行卡 |
|||
</label> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">微信打款账号</label> |
|||
<div class="col-sm-9"> |
|||
<select name="cashset[wechat_payment]" class="form-control"> |
|||
<option value="-1">请选择微信打款账号</option> |
|||
{loop $weChat $item} |
|||
<option value="{$item['id']}" {if $item['id'] == $cashset['wechat_payment']} selected="selected" {/if}>{$item['name']}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">支付宝打款账号</label> |
|||
<div class="col-sm-9"> |
|||
<select name="cashset[alipay_payment]" class="form-control"> |
|||
<option value="-1">请选择支付宝打款账号</option> |
|||
{loop $aliPay $item} |
|||
<option value="{$item['id']}" {if $item['id'] == $cashset['alipay_payment']} selected="selected" {/if}>{$item['name']}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label" >默认商家提现手续费</label> |
|||
<div class="col-sm-9"> |
|||
<div class="input-group"> |
|||
<input type="text" name="cashset[syssalepercent]" class="form-control" value="{$cashset['syssalepercent']}" /> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
<div class="help-block">代理详情中未设置时,会调用这里的默认比例</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label" >默认代理提现手续费</label> |
|||
<div class="col-sm-9"> |
|||
<div class="input-group"> |
|||
<input type="text" name="cashset[agentpercent]" class="form-control" value="{$cashset['agentpercent']}" /> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
<div class="help-block">代理详情中未设置时,会调用这里的默认比例</div> |
|||
</div> |
|||
</div> |
|||
{if !empty($isAuth)} |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">微信分账</label> |
|||
<div class="col-sm-9"> |
|||
<label class="radio-inline" onclick="$('.wxallocation').hide();"> |
|||
<input type="radio" value="0" name="cashset[allocationtype]" {if $cashset['allocationtype'] == 0 || empty($cashset['allocationtype'])} checked {/if} /> 关闭 |
|||
</label> |
|||
<label class="radio-inline" onclick="$('.wxallocation').show();"> |
|||
<input type="radio" value="1" name="cashset[allocationtype]" {if $cashset['allocationtype'] == 1} checked {/if} /> 微信服务商分账 |
|||
</label> |
|||
<div class="help-block">服务商分账时微信商户官方提供的分账方式,需要为每个商家、代理单独设置支付子商户,目前微信只开放了低比例分账,请注意平台,代理{if Customized::init('distributionText') > 0}共享股东{else}分销商{/if}分账比例之和不能超过30%,开启此项设置后,如果未设置商户与代理支付项,会按照之前方式结算。</div> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
</div> |
|||
<div class="wxallocation" {if $cashset['allocationtype'] == 0 || empty($cashset['allocationtype'])} style="display: none;" {/if}> |
|||
{if p('wxplatform')} |
|||
<!-- <div class="panel-heading">微信公众号设置</div>--> |
|||
<!-- <div class="form-group">--> |
|||
<!-- <label class="col-sm-2 control-label">平台分账方账户类型</label>--> |
|||
<!-- <div class="col-sm-9">--> |
|||
<!-- <select name="cashset[wxsysalltype]" onchange="changewx(this)" class="form-control">--> |
|||
<!-- <option value="0" > - 请选择账户类型 - </option>--> |
|||
<!-- <option value="1" {if $cashset['wxsysalltype'] == 1} selected="selected" {/if}>微信商户</option>--> |
|||
<!-- <option value="2" {if $cashset['wxsysalltype'] == 2} selected="selected" {/if}>个人零钱</option>--> |
|||
<!-- </select>--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<!-- <div class="form-group wxsysalldiv1" {if $cashset['wxsysalltype'] != 1} style="display: none;" {/if} >--> |
|||
<!-- <label class="col-sm-2 control-label">微信商户号</label>--> |
|||
<!-- <div class="col-sm-9">--> |
|||
<!-- <div class="input-group" style="width:100%">--> |
|||
<!-- <input type="number" name="cashset[wxmerchantid]" class="form-control" value="{$cashset['wxmerchantid']}" />--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<!-- <div class="form-group wxsysalldiv1" {if $cashset['wxsysalltype'] != 1} style="display: none;" {/if} >--> |
|||
<!-- <label class="col-sm-2 control-label">微信商户名称</label>--> |
|||
<!-- <div class="col-sm-9">--> |
|||
<!-- <div class="input-group" style="width:100%">--> |
|||
<!-- <input type="text" name="cashset[wxmerchantname]" class="form-control" value="{$cashset['wxmerchantname']}" />--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<!-- <div class="form-group wxsysalldiv2" {if $cashset['wxsysalltype'] != 2} style="display: none;" {/if} >--> |
|||
<!-- <label class="col-sm-2 control-label">分账微信用户</label>--> |
|||
<!-- <div class="col-sm-9">--> |
|||
<!-- {php echo tpl_select_user('cashset[wxallmid]', $cashset['wxallmid']);}--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label" >平台公众号端分成比例</label> |
|||
<div class="col-sm-9"> |
|||
<div class="input-group"> |
|||
<input type="number" name="cashset[wxsyspercent]" class="form-control" value="{$cashset['wxsyspercent']}" /> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
<div class="help-block">公众号订单的平台分成比例。</div> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if p('wxapp')} |
|||
<!-- <div class="panel-heading">微信小程序设置</div>--> |
|||
<!-- <div class="form-group">--> |
|||
<!-- <label class="col-sm-2 control-label">平台分账方账户类型</label>--> |
|||
<!-- <div class="col-sm-9">--> |
|||
<!-- <select name="cashset[appsysalltype]" onchange="changeapp(this)" class="form-control">--> |
|||
<!-- <option value="0" > - 请选择账户类型 - </option>--> |
|||
<!-- <option value="1" {if $cashset['appsysalltype'] == 1} selected="selected" {/if}>微信商户</option>--> |
|||
<!-- <option value="2" {if $cashset['appsysalltype'] == 2} selected="selected" {/if}>个人零钱</option>--> |
|||
<!-- </select>--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<!-- <div class="form-group appsysalldiv1" {if $cashset['appsysalltype'] != 1} style="display: none;" {/if} >--> |
|||
<!-- <label class="col-sm-2 control-label">微信商户号</label>--> |
|||
<!-- <div class="col-sm-9">--> |
|||
<!-- <div class="input-group" style="width:100%">--> |
|||
<!-- <input type="number" name="cashset[appmerchantid]" class="form-control" value="{$cashset['appmerchantid']}" />--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<!-- <div class="form-group appsysalldiv1" {if $cashset['appsysalltype'] != 1} style="display: none;" {/if} >--> |
|||
<!-- <label class="col-sm-2 control-label">微信商户名称</label>--> |
|||
<!-- <div class="col-sm-9">--> |
|||
<!-- <div class="input-group" style="width:100%">--> |
|||
<!-- <input type="text" name="cashset[appmerchantname]" class="form-control" value="{$cashset['appmerchantname']}" />--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<!-- <div class="form-group appsysalldiv2" {if $cashset['appsysalltype'] != 2} style="display: none;" {/if} >--> |
|||
<!-- <label class="col-sm-2 control-label">分账微信用户</label>--> |
|||
<!-- <div class="col-sm-9">--> |
|||
<!-- {php echo tpl_select_user('cashset[appallmid]', $cashset['appallmid']);}--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label" >平台小程序端分成比例</label> |
|||
<div class="col-sm-9"> |
|||
<div class="input-group"> |
|||
<input type="number" name="cashset[appsyspercent]" class="form-control" value="{$cashset['appsyspercent']}" /> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
<div class="help-block">小程序订单的平台分成比例。</div> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
</div> |
|||
<!--用户余额提现设置到时候写到用户设置--> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">用户余额提现</label> |
|||
<div class="col-sm-9"> |
|||
<label class="radio-inline" onclick="$('#withdrawals').show()"> |
|||
<input type="radio" value="1" name="cashset[withdrawals]" {if $cashset['withdrawals'] == 1} checked {/if} /> 开启 |
|||
</label> |
|||
<label class="radio-inline" onclick="$('#withdrawals').hide()"> |
|||
<input type="radio" value="0" name="cashset[withdrawals]" {if $cashset['withdrawals'] == 0 || empty($cashset['withdrawals'])} checked {/if} /> 禁用 |
|||
</label> |
|||
<div class="help-block">开启后,用户可以提现自己的余额。</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group" id="withdrawals" {if $cashset['withdrawals'] == 0 || empty($cashset['withdrawals'])} style="display: none;" {/if} > |
|||
<label class="col-sm-2 control-label" >用户提现余额手续费比例</label> |
|||
<div class="col-sm-9"> |
|||
<div class="input-group"> |
|||
<input type="text" name="cashset[memberpercent]" class="form-control" value="{$cashset['memberpercent']}" /> |
|||
<span class="input-group-addon">%</span> |
|||
</div> |
|||
<div class="help-block">用户余额提现的比例</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="tab-pane" id="tab_cash"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">商户代理提现免审核</label> |
|||
<div class="col-sm-9"> |
|||
<label class="radio-inline"> |
|||
<input type="radio" value="1" name="cashset[noaudit]" {if $cashset['noaudit'] == 1} checked {/if} /> 开启 |
|||
</label> |
|||
<label class="radio-inline"> |
|||
<input type="radio" value="0" name="cashset[noaudit]" {if $cashset['noaudit'] == 0 || empty($cashset['noaudit'])} checked {/if} /> 禁用 |
|||
</label> |
|||
<div class="help-block">开启后,商户代理提现申请会自动标记为待打款订单。</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">{if Customized::init('distributionText') > 0}共享股东{else}分销{/if}提现免审核</label> |
|||
<div class="col-sm-9"> |
|||
<label class="radio-inline"> |
|||
<input type="radio" value="1" name="cashset[disnoaudit]" {if $cashset['disnoaudit'] == 1} checked {/if} /> 开启 |
|||
</label> |
|||
<label class="radio-inline"> |
|||
<input type="radio" value="0" name="cashset[disnoaudit]" {if $cashset['disnoaudit'] == 0 || empty($cashset['disnoaudit'])} checked {/if} /> 禁用 |
|||
</label> |
|||
<div class="help-block">开启后,{if Customized::init('distributionText') > 0}共享股东{else}分销{/if}提现申请会自动标记为待打款订单。</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">代理自动打款</label> |
|||
<div class="col-sm-9"> |
|||
<label class="radio-inline"> |
|||
<input type="radio" value="1" name="cashset[agentautocash]" {if $cashset['agentautocash'] == 1} checked {/if} /> 开启 |
|||
</label> |
|||
<label class="radio-inline"> |
|||
<input type="radio" value="0" name="cashset[agentautocash]" {if $cashset['agentautocash'] == 0 || empty($cashset['agentautocash'])} checked {/if} /> 禁用 |
|||
</label> |
|||
<div class="help-block">开启后,待打款记录会自动打款给代理,只对实际到账金额大于1元的微信提现和支付宝转账有效</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">商户自动打款</label> |
|||
<div class="col-sm-9"> |
|||
<label class="radio-inline"> |
|||
<input type="radio" value="1" name="cashset[autocash]" {if $cashset['autocash'] == 1} checked {/if} /> 开启 |
|||
</label> |
|||
<label class="radio-inline"> |
|||
<input type="radio" value="0" name="cashset[autocash]" {if $cashset['autocash'] == 0 || empty($cashset['autocash'])} checked {/if} /> 禁用 |
|||
</label> |
|||
<div class="help-block">开启后,待打款记录会自动打款给商家,只对实际到账金额大于1元的微信提现和支付宝转账有效</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">{if Customized::init('distributionText') > 0}共享股东{else}分销{/if}自动打款</label> |
|||
<div class="col-sm-9"> |
|||
<label class="radio-inline"> |
|||
<input type="radio" value="1" name="cashset[disautocash]" {if $cashset['disautocash'] == 1} checked {/if} /> 开启 |
|||
</label> |
|||
<label class="radio-inline"> |
|||
<input type="radio" value="0" name="cashset[disautocash]" {if $cashset['disautocash'] == 0 || empty($cashset['disautocash'])} checked {/if} /> 禁用 |
|||
</label> |
|||
<div class="help-block">开启后,待打款记录会自动打款给{if Customized::init('distributionText') > 0}共享股东{else}分销商{/if},只对实际到账金额大于1元的微信提现,余额提现和支付宝转账有效</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<input type="submit" name="submit" value="提交" class="btn btn-primary min-width" /> |
|||
<input type="hidden" name="token" value="{$_W['token']}" /> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
|
|||
<script> |
|||
$(function () { |
|||
$('#myTab a').click(function (e) { |
|||
e.preventDefault();//阻止a链接的跳转行为 |
|||
$('.spec_item_item .layui-unselect').remove(); //挽救规格页面的错误css |
|||
$(this).tab('show');//显示当前选中的链接及关联的content |
|||
}); |
|||
}); |
|||
|
|||
function changewx(asd){ |
|||
var type = $(asd).val(); |
|||
if(type == 1){ |
|||
$('.wxsysalldiv2').hide(); |
|||
$('.wxsysalldiv1').show(); |
|||
}else if(type == 2){ |
|||
$('.wxsysalldiv1').hide(); |
|||
$('.wxsysalldiv2').show(); |
|||
}else{ |
|||
$('.wxsysalldiv1').hide(); |
|||
$('.wxsysalldiv2').hide(); |
|||
} |
|||
} |
|||
|
|||
function changeapp(asd){ |
|||
var type = $(asd).val(); |
|||
if(type == 1){ |
|||
$('.appsysalldiv2').hide(); |
|||
$('.appsysalldiv1').show(); |
|||
}else if(type == 2){ |
|||
$('.appsysalldiv1').hide(); |
|||
$('.appsysalldiv2').show(); |
|||
}else{ |
|||
$('.appsysalldiv1').hide(); |
|||
$('.appsysalldiv2').hide(); |
|||
} |
|||
} |
|||
|
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,182 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="">结算记录</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal form" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="{$_W['plugin']}" /> |
|||
<input type="hidden" name="ac" value="{$_W['controller']}" /> |
|||
<input type="hidden" name="do" value="{$_W['method']}" /> |
|||
<input type="hidden" name="type" value="{$type}"/> |
|||
<input type="hidden" name="days" id="days" value="{$days}"/> |
|||
<input type="hidden" name="trade_type" value="{$trade_type}"/> |
|||
<div class="form-group max-with-all"> |
|||
<label class="col-sm-2 control-label">类型</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('trade_type:0');}" class="btn {if $trade_type == 0}btn-primary{else}btn-default{/if}">全部</a> |
|||
{if p('rush')} |
|||
<a href="{php echo wl_filter_url('trade_type:1');}" class="btn {if $trade_type == 1}btn-primary{else}btn-default{/if}">抢购</a> |
|||
{/if} |
|||
{if p('citydelivery')} |
|||
<a href="{php echo wl_filter_url('trade_type:140');}" class="btn {if $trade_type == 140}btn-primary{else}btn-default{/if}">同城配送</a> |
|||
{/if} |
|||
{if p('wlfightgroup')} |
|||
<a href="{php echo wl_filter_url('trade_type:2');}" class="btn {if $trade_type == 2}btn-primary{else}btn-default{/if}">拼团</a> |
|||
{/if} |
|||
{if p('wlcoupon')} |
|||
<a href="{php echo wl_filter_url('trade_type:3');}" class="btn {if $trade_type == 3}btn-primary{else}btn-default{/if}">卡券</a> |
|||
{/if} |
|||
{if p('activity')} |
|||
<a href="{php echo wl_filter_url('trade_type:9');}" class="btn {if $trade_type == 9}btn-primary{else}btn-default{/if}">活动</a> |
|||
{/if} |
|||
{if p('groupon')} |
|||
<a href="{php echo wl_filter_url('trade_type:10');}" class="btn {if $trade_type == 10}btn-primary{else}btn-default{/if}">团购</a> |
|||
{/if} |
|||
{if !is_store()} |
|||
{if p('halfcard')} |
|||
<a href="{php echo wl_filter_url('trade_type:4');}" class="btn {if $trade_type == 4}btn-primary{else}btn-default{/if}">一卡通</a> |
|||
{/if} |
|||
{if p('pocket')} |
|||
<a href="{php echo wl_filter_url('trade_type:5');}" class="btn {if $trade_type == 5}btn-primary{else}btn-default{/if}">掌上信息</a> |
|||
{/if} |
|||
<a href="{php echo wl_filter_url('trade_type:6');}" class="btn {if $trade_type == 6}btn-primary{else}btn-default{/if}">付费入驻</a> |
|||
{if p('distribution')} |
|||
<a href="{php echo wl_filter_url('trade_type:8');}" class="btn {if $trade_type == 8}btn-primary{else}btn-default{/if}">{if Customized::init('distributionText') > 0}共享股东{else}分销{/if}申请</a> |
|||
{/if} |
|||
<a href="{php echo wl_filter_url('trade_type:7');}" class="btn {if $trade_type == 7}btn-primary{else}btn-default{/if}">提现申请</a> |
|||
{/if} |
|||
<a href="{php echo wl_filter_url('trade_type:-1');}" class="btn {if $trade_type == -1}btn-primary{else}btn-default{/if}">后台修改</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">结算时间</label> |
|||
<div class="col-sm-9 js-daterange" data-form="#form1"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('days:-2');}" class="btn {if $days == -2}btn-primary{else}btn-default{/if}">不限</a> |
|||
<a href="{php echo wl_filter_url('days:7');}" class="btn {if $days == 7}btn-primary{else}btn-default{/if}">近一周</a> |
|||
<a href="{php echo wl_filter_url('days:30');}" class="btn {if $days == 30}btn-primary{else}btn-default{/if}">近一月</a> |
|||
<a href="{php echo wl_filter_url('days:90');}" class="btn {if $days == 90}btn-primary{else}btn-default{/if}">近三月</a> |
|||
<a href="javascript:;" class="btn js-btn-custom {if $days == -1}btn-primary{else}btn-default{/if}">自定义</a> |
|||
</div> |
|||
<span class="btn-daterange js-btn-daterange {if $days != -1}hide{/if}"> |
|||
{php echo tpl_select_time_info('addtime', array('start' => date('Y-m-d H:i',$starttime), 'end' => date('Y-m-d H:i', $endtime)));} |
|||
</span> |
|||
</div> |
|||
</div> |
|||
{if (!is_agent() || $type != 'agent') && !is_store() } |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">其他</label> |
|||
<div class="col-sm-9"> |
|||
{if $type == 'store'} |
|||
<select name="objid" class="form-control select2"> |
|||
<option value="0" {if !$objid}selected{/if}>所有店铺</option> |
|||
{loop $stores $store} |
|||
<option value="{$store['id']}" {if $objid == $store['id']}selected{/if}>{$store['storename']}</option> |
|||
{/loop} |
|||
</select> |
|||
{else} |
|||
<select name="objid" class="select2 form-control"> |
|||
<option value="0">所有代理</option> |
|||
{loop $agents $agent} |
|||
<option value="{$agent['id']}" {if $objid == $agent['id']}selected{/if}>{$agent['agentname']}</option> |
|||
{/loop} |
|||
</select> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
{if (!is_agent() || $type != 'agent') && !is_store() } |
|||
<button class="btn btn-primary">搜索</button> |
|||
{/if} |
|||
<button class="btn btn-default" id="output">导出</button> |
|||
<input type="hidden" value="0" name="outflag" id="outflag" /> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-bordered table-hover"> |
|||
<thead> |
|||
<tr> |
|||
<th style="text-align:center;">时间</th> |
|||
{if !is_agent() || $type != 'agent'} |
|||
<th style="text-align:center;">账户名称</th> |
|||
{/if} |
|||
<th style="text-align:center;">类型</th> |
|||
<th style="text-align:center;">收入|支出(元)</th> |
|||
<th style="text-align:center;">账户余额</th> |
|||
<th style="text-align:center;">详情/备注</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody > |
|||
{loop $records $item} |
|||
<tr> |
|||
<!--时间--> |
|||
<td class="goods-info line-feed" style="padding-left: 10px;"> |
|||
{php echo date('Y-m-d H:i:s',$item['createtime'])} |
|||
</td> |
|||
{if !is_agent() || $type != 'agent'} |
|||
<td class="text-center" style="height:60px;font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif ;"> |
|||
{$item['objname']} |
|||
</td> |
|||
{/if} |
|||
<!--类型--> |
|||
<td class="text-center" style="font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif;"> |
|||
<span class="label label-{$item['css']}">{$item['typename']}</span> |
|||
</td> |
|||
<!--代理收入|支出--> |
|||
<td class="text-center" style="font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif;"> |
|||
<span style="color:{if $item['fee']>0} green {else} orangered {/if};"> {if $item['fee']>0}+{/if}{$item['fee']}</span><br /> |
|||
</td> |
|||
<td class="text-center" style="font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif;"> |
|||
{$item['nowmoney']} |
|||
</td> |
|||
<td class="text-center" style="font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif;"> |
|||
{if $item['type'] == -1 || $item['type'] == 15} |
|||
备注:{$item['remark']} |
|||
{else if $item['type'] == 7} |
|||
申请提现或驳回申请 |
|||
{else if $item['type'] == 14} |
|||
{if is_agent()} |
|||
<a href="{php echo web_url('halfcard/halfcard_web/userhalfcardlist',array('type'=>2,'reid'=>$item['orderid'],'is_jurisdiction'=>1))}" class="btn btn-default btn-sm">查看详情</a> |
|||
{else} |
|||
<a href="{php echo web_url('halfcard/halftype/uselists',array('type'=>2,'reid'=>$item['orderid'],'is_jurisdiction'=>1))}" class="btn btn-default btn-sm">查看详情</a> |
|||
{/if} |
|||
{else} |
|||
<a href="{php echo web_url('order/wlOrder/orderdetail',array('currentid'=>$item['id'],'is_jurisdiction'=>1))}" class="btn btn-default btn-sm">查看详情</a> |
|||
{/if} |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
$("#output").click(function(){ |
|||
$('#outflag').val(1); |
|||
$('#form1')[0].submit(); |
|||
}); |
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,506 @@ |
|||
{php include wl_template('common/header');} |
|||
<style type='text/css'> |
|||
.certification-materials{cursor: pointer} |
|||
</style> |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="">订单详情</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="order-detail"> |
|||
<div class="col-md-6 padding-0"> |
|||
<div class="panel panel-display"> |
|||
<div class="panel-heading"><h3>订单信息</h3></div> |
|||
<div class="panel-body"> |
|||
<table class="table"> |
|||
<tr> |
|||
<td width="150">下单人微信:</td> |
|||
<td><img src="{php echo tomedia($order['avatar'])}" style="width: 30px;height: 30px;margin-right: 5px;" >{$member['nickname']}</td> |
|||
</tr> |
|||
{if $member['mobile']} |
|||
<tr> |
|||
<td width="150">下单人手机:</td> |
|||
<td>{$member['mobile']}</td> |
|||
</tr> |
|||
{/if} |
|||
{if $order['username']} |
|||
<tr> |
|||
<td width="150">提货人姓名:</td> |
|||
<td>{$order['username']}</td> |
|||
</tr> |
|||
{/if} |
|||
{if $order['mobile']} |
|||
<tr> |
|||
<td width="150">提货人电话:</td> |
|||
<td>{$order['mobile']}</td> |
|||
</tr> |
|||
{/if} |
|||
{if $order['address']} |
|||
<tr> |
|||
<td width="150">提货人地址:</td> |
|||
<td>{$order['address']}</td> |
|||
</tr> |
|||
{/if} |
|||
<tr> |
|||
<td width="150">订单编号:</td> |
|||
<td>{$order['orderno']}</td> |
|||
</tr> |
|||
{if $order['transid']} |
|||
<tr> |
|||
<td width="150">第三方支付单号:</td> |
|||
<td>{$order['transid']}</td> |
|||
</tr> |
|||
{/if} |
|||
<tr> |
|||
<td>下单时间:</td> |
|||
<td>{php echo date('Y-m-d H:i:s', $order['createtime']);}</td> |
|||
</tr> |
|||
<tr> |
|||
<td>订单状态:</td> |
|||
<td><span class="label label-{$order['statuscss']}">{$order['statustext']}</span></td> |
|||
</tr> |
|||
<tr> |
|||
<td>付款方式:</td> |
|||
<td> |
|||
{if !$order['paytype']} |
|||
<span class="label label-danger">未支付</span> |
|||
{else} |
|||
<span class="label label-{$order['paytypecss']}">{$order['paytypetext']}</span>{if $order['paytype'] == 7}(微信{$order['blendwx']}+余额{$order['blendcredit']}){/if} |
|||
{/if} |
|||
</td> |
|||
</tr> |
|||
{if $order['checkcode']} |
|||
<tr> |
|||
<td width="150">订单核销码:</td> |
|||
<td>{$order['checkcode']}</td> |
|||
</tr> |
|||
{/if} |
|||
<tr> |
|||
<td>买家备注:</td> |
|||
<td> |
|||
{if !empty($order['buyremark'])}{$order['buyremark']}{else}无{/if} |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>卖家备注:</td> |
|||
<td> |
|||
<a href='javascript:;' data-toggle='ajaxEdit' data-href="{php echo web_url('finace/newCash/editremark',array('id'=>$order['id'],'type'=>$type))}"> |
|||
{if !empty($order['remark'])}{$order['remark']}{else}无{/if} |
|||
</a> |
|||
</td> |
|||
</tr> |
|||
{if !empty($moinfo)} |
|||
{loop $moinfo $key $mo} |
|||
<tr> |
|||
<td>{$mo['title']}:</td> |
|||
<td> |
|||
{if $mo['id'] == 'text'} |
|||
{$mo['data']} |
|||
{elseif $mo['id'] == 'textarea'} |
|||
<textarea style="width: 100%;height: 150px;resize: none;" disabled="disabled">{$mo['data']}</textarea> |
|||
{elseif $mo['id'] == 'select'} |
|||
<span class="label label-primary">{$mo['data']}</span> |
|||
{elseif $mo['id'] == 'checkbox'} |
|||
{loop $mo['data'] $moItem} |
|||
<span class="label label-primary">{$moItem}</span> |
|||
{/loop} |
|||
{elseif $mo['id'] == 'img'} |
|||
{loop $mo['data'] $moItem} |
|||
<img src="{php echo tomedia($moItem)}" data-img="{php echo tomedia($moItem)}" style="float: left;margin: 2.5px;width: 80px;"> |
|||
{/loop} |
|||
{elseif $mo['id'] == 'time'} |
|||
{$mo['data']} |
|||
{elseif $mo['id'] == 'datetime'} |
|||
{$mo['data'][0]}~{$mo['data'][1]} |
|||
{elseif $mo['id'] == 'city'} |
|||
{if is_array($mo['data'])} |
|||
{loop $mo['data'] $moItem} |
|||
{$moItem} |
|||
{/loop} |
|||
{else} |
|||
{$mo['data']} |
|||
{/if} |
|||
{/if} |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
{/if} |
|||
</table> |
|||
</div> |
|||
</div> |
|||
<div class="panel panel-display"> |
|||
<div class="panel-heading"><h3>订单日志</h3></div> |
|||
<div class="panel-body"> |
|||
<table class="table"> |
|||
{loop $logs $log} |
|||
<tr> |
|||
<td> |
|||
<p><i class="fa fa-info-circle"></i> <strong>{php echo date('Y-m-d H:i:s', $log['time']);} {$log['title']}</strong></p> |
|||
<p style="padding-left:15px;"> |
|||
{$log['detail']} |
|||
</p> |
|||
{if !empty($log['thumbs'])} |
|||
<p style="padding-left:15px;"> |
|||
{loop $log['thumbs'] $logimg} |
|||
<a href="{php echo tomedia($logimg)}" target="_blank"><img width="50" height = "50" src="{php echo tomedia($logimg)}"></a> |
|||
{/loop} |
|||
</p> |
|||
{/if} |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-6 padding-r-0"> |
|||
<div class="panel panel-display"> |
|||
<div class="panel-heading"><h3>订单费用</h3></div> |
|||
<div class="panel-body"> |
|||
<table class="table"> |
|||
<tr> |
|||
<td width="150">商品价格:</td> |
|||
<td>+¥ {$goodsprice}</td> |
|||
</tr> |
|||
{if $order['packingmoney']>0} |
|||
<tr> |
|||
<td width="150">包装费:</td> |
|||
<td>+¥{$order['packingmoney']}</td> |
|||
</tr> |
|||
{/if} |
|||
{if $expressprice>0} |
|||
<tr> |
|||
<td width="150">{if $type == 14}配送费{else}快递费{/if}:</td> |
|||
<td>+¥{$expressprice}</td> |
|||
</tr> |
|||
{/if} |
|||
{if $vipCardPrice>0} |
|||
<tr> |
|||
<td width="150">会员开通:</td> |
|||
<td>+¥{$vipCardPrice}</td> |
|||
</tr> |
|||
{/if} |
|||
{if $vipdiscount>0} |
|||
<tr> |
|||
<td width="150">会员减免:</td> |
|||
<td>-¥{$vipdiscount}</td> |
|||
</tr> |
|||
{/if} |
|||
{if $dkmoney>0} |
|||
<tr> |
|||
<td width="150">积分抵扣:</td> |
|||
<td>-¥{$dkmoney} (花费{$dkcredit}积分)</td> |
|||
</tr> |
|||
{/if} |
|||
{if $fullreducemoney>0} |
|||
<tr> |
|||
<td width="150">满减优惠:</td> |
|||
<td>-¥{$fullreducemoney}</td> |
|||
</tr> |
|||
{/if} |
|||
{if $redpackmoney > 0} |
|||
<tr> |
|||
<td width="150">红包[{$packname}]:</td> |
|||
<td>-¥{$redpackmoney}</td> |
|||
</tr> |
|||
{/if} |
|||
{if $order['issettlement']} |
|||
<tr> |
|||
<td width="150">代理{if $agentmoney>0}抽佣{else}补贴{/if}:</td> |
|||
<td>{if $agentmoney>0}-¥{$agentmoney}{else}+¥{php echo abs($agentmoney)}{/if}</td> |
|||
</tr> |
|||
{if $distrimoney>0} |
|||
<tr> |
|||
<td width="150">分销抽佣:</td> |
|||
<td>-¥{$distrimoney}{if $disorder['oneleadid']} (一级:{$onename}¥{$leadmoney['one']} {if $disorder['twoleadid']}二级:{$twoname}¥{$leadmoney['two']} {/if}) {/if}</td> |
|||
</tr> |
|||
{/if} |
|||
{if $salesmoney>0} |
|||
<tr> |
|||
<td width="150">业务员抽佣:</td> |
|||
<td>-¥{$salesmoney} |
|||
({loop $salesarray $sa} |
|||
{$sa['nickname']}¥{$sa['salemoney']}, |
|||
{/loop}) |
|||
</td> |
|||
</tr> |
|||
{/if} |
|||
{if $sharemoney>0} |
|||
<tr> |
|||
<td width="150">分享{if $shares['type'] == 1}立减{else}分佣{/if}:</td> |
|||
<td>-¥{$sharemoney}{if $shares['type'] == 2}(分享人:{$sharename}){/if}</td> |
|||
</tr> |
|||
{/if} |
|||
{/if} |
|||
{if $refundmoney>0} |
|||
<tr> |
|||
<td width="150">退款金额</td> |
|||
<td> |
|||
-¥{$refundmoney} |
|||
</td> |
|||
</tr> |
|||
{/if} |
|||
{if $type != 4 && $type != 5 && $type != 6 && $type != 8 && $type != 15} |
|||
<tr> |
|||
<td width="150">商户实际收入:</td> |
|||
<td> |
|||
{if $order['issettlement'] || ( $order['status'] == 7 && $order['neworderflag']) }¥{$merchantmoney}{else}暂未结算{/if} (本单客户实际支付:¥{$actualprice})</td> |
|||
</tr> |
|||
{else} |
|||
<tr> |
|||
<td width="150">代理订单</td> |
|||
<td> |
|||
本单客户实际支付:¥{$actualprice} |
|||
</td> |
|||
</tr> |
|||
{/if} |
|||
|
|||
</table> |
|||
</div> |
|||
</div> |
|||
<div class="panel panel-display"> |
|||
<div class="panel-heading"><h3>商品信息</h3></div> |
|||
<div class="panel-body"> |
|||
<table class="table table-hover"> |
|||
<thead> |
|||
<tr> |
|||
<th style="width: 20rem;">商品</th> |
|||
<th>规格</th> |
|||
<th>份数</th> |
|||
<th>小计(元)</th> |
|||
<th></th> |
|||
</tr> |
|||
</thead> |
|||
{if $type == 14} |
|||
{loop $delivery_orders $deli} |
|||
<tr> |
|||
<td><img src="{php echo tomedia($deli['good']['thumb'])}" style="width: 30px;height: 30px;margin-right: 5px;">{$deli['good']['name']}</td> |
|||
<td>{if !empty($deli['good']['specname'])} {$deli['good']['specname']} {else} 无 {/if}</td> |
|||
<td>{$deli['num']} 份</td> |
|||
<td>{$deli['price']} 元</td> |
|||
<td class="text-right"> |
|||
<a class="btn btn-primary btn-sm" target="_blank" href="{$deli['good']['editurl']}">商品信息</a> |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
{else} |
|||
<tr> |
|||
<td>{if $goods['thumb']}<img src="{php echo tomedia($goods['thumb'])}" style="width: 30px;height: 30px;margin-right: 5px;"> {/if}{$goods['name']}</td> |
|||
<td>{if !empty($order['optiontitle'])} {$order['optiontitle']} {else} 无 {/if}</td> |
|||
<td>{$order['num']} 份</td> |
|||
<td>{$goodsprice} 元</td> |
|||
{if $editurl} |
|||
<td class="text-right"> |
|||
<a class="btn btn-primary btn-sm" target="_blank" href="{$editurl}">商品信息</a> |
|||
</td> |
|||
{/if} |
|||
</tr> |
|||
{/if} |
|||
</table> |
|||
</div> |
|||
</div> |
|||
{if !empty($smallorders)} |
|||
<div class="panel panel-display"> |
|||
<div class="panel-heading"><h3>核销码信息</h3></div> |
|||
<div class="panel-body"> |
|||
<table class="table table-hover"> |
|||
<thead> |
|||
<tr> |
|||
<th style="width: 20rem;">核销码</th> |
|||
<th>状态</th> |
|||
<th>金额</th> |
|||
<th>操作人</th> |
|||
<th>操作时间</th> |
|||
<th>操作</th> |
|||
</tr> |
|||
</thead> |
|||
{loop $smallorders $smaa} |
|||
<tr> |
|||
<td>{$smaa['checkcode']}</td> |
|||
<td> |
|||
{if $smaa['status'] == 1} |
|||
<span class='label label-success'>待核销</span> |
|||
{else if $smaa['status'] == 2} |
|||
<span class='label label-info'>已核销</span> |
|||
{else if $smaa['status'] == 3} |
|||
<span class='label label-primary'>已退款</span> |
|||
{else if $smaa['status'] == 4} |
|||
<span class='label label-danger'>申请退款</span> |
|||
{/if} |
|||
</td> |
|||
<td style="color: orangered">¥{$smaa['orderprice']}</td> |
|||
<td>{$smaa['douser']}</td> |
|||
<td>{$smaa['dotime']}</td> |
|||
<td> |
|||
{if $smaa['status'] == 1 || $smaa['status'] == 4} |
|||
<a class='op' data-toggle='ajaxPost' href="{php echo web_url('order/wlOrder/fetchcheck',array('checkcode'=>$smaa['checkcode']))}" data-confirm="确认核销此核销码?" >核销</a> |
|||
- <a class='op' data-toggle='ajaxModal' href="{php echo web_url('order/wlOrder/refund',array('id'=>$smaa['orderid'],'type'=>$order['ordera'],'checkcode'=>$smaa['checkcode']))}">退款</a> |
|||
{else} |
|||
- 无 - |
|||
{/if} |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
</table> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if $order['expressid']} |
|||
<div class="panel panel-display"> |
|||
<div class="panel-heading"><h3>快递信息</h3></div> |
|||
<div class="panel-body"> |
|||
<table class="table"> |
|||
<tr> |
|||
<td width="150">买家:</td> |
|||
<td><a href="{php echo web_url('member/wlMember/memberIndex',array('mid'=>$order['mid']))}" target='_blank'> {$member['nickname']}</a> <a data-toggle='popover' data-trigger="hover" data-html='true' data-placement='right' |
|||
data-content="<table style='width:100%;'> |
|||
<tr> |
|||
<td style='border:none;text-align:right;' colspan='2'><img src='{php echo tomedia($member['avatar'])}' style='width:100px;height:100px;padding:1px;border:1px solid #ccc' /></td> |
|||
</tr> |
|||
<tr> |
|||
<td style='border:none;text-align:right;'>ID:</td> |
|||
<td style='border:none;text-align:right;'>{$member['id']}</td> |
|||
</tr> |
|||
<tr> |
|||
<td style='border:none;text-align:right;'>昵称:</td> |
|||
<td style='border:none;text-align:right;'>{$member['nickname']}</td> |
|||
</tr> |
|||
<tr> |
|||
<td style='border:none;text-align:right;'>姓名:</td> |
|||
<td style='border:none;text-align:right;'>{if $member['realname']}{$member['realname']}{else}未填写{/if}</td> |
|||
</tr> |
|||
<tr> |
|||
<td style='border:none;text-align:right;'>手机号:</td> |
|||
<td style='border:none;text-align:right;'>{if $member['mobile']}{$member['mobile']}{else}未填写{/if}</td> |
|||
</tr> |
|||
</table> |
|||
"><i class='fa fa-question-circle'></i></a></td> |
|||
</tr> |
|||
<tr> |
|||
<td width="150">配送方式:</td> |
|||
<td>{if $type == 14}{if $order['fightstatus'] == 1}商家{else if $order['fightstatus'] == 2}平台{/if}配送{else}快递{/if}</td> |
|||
</tr> |
|||
<tr> |
|||
<td width="150">收货人:</td> |
|||
<td>{$express['address']},{$express['name']},{$express['tel']} <div style="display: inline;position: relative;"> <a href='javascript:;' class="js-clip" title='点击复制' data-url="{$express['address']},{$express['name']},{$express['tel']}">[复制]</a></div></td> |
|||
</tr> |
|||
<tr> |
|||
<td width="150"></td> |
|||
{if $type == 14} |
|||
<td> |
|||
{if $order['status'] == 4} |
|||
<a class="btn btn-primary btn-xs" data-toggle='ajaxModal' href="{php echo web_url('order/wlOrder/changeexpress', array('expressid' => $express['id']))}">修改订单配送信息</a> |
|||
<a class="btn btn-primary btn-xs" data-toggle='ajaxPost' data-confirm="确定此订单商品已送达买家?" href="{php echo web_url('order/wlOrder/finishdelivery', array('id' => $order['id']))}">确认送达</a> |
|||
{/if} |
|||
{if $order['status'] == 1} |
|||
<a class="btn btn-primary btn-xs" data-toggle='ajaxPost' data-confirm="确定此订单商品买家已提货?" href="{php echo web_url('order/wlOrder/finishdelivery', array('id' => $order['id']))}">确认提货</a> |
|||
{/if} |
|||
</td> |
|||
{else} |
|||
<td> |
|||
<a class="btn btn-primary btn-xs" data-toggle='ajaxModal' href="{php echo web_url('order/wlOrder/changeexpress', array('expressid' => $express['id']))}">修改订单收货信息</a> |
|||
{if $order['status'] == 8} |
|||
<a class="btn btn-primary btn-xs" data-toggle="ajaxModal" href="{php echo web_url('order/wlOrder/send', array('id' => $order['id'],'type' => $order['ordera']))}">确认发货</a> |
|||
{/if} |
|||
{if $order['status'] == 4} |
|||
<a class="btn btn-warning btn-xs" data-toggle="ajaxModal" href="{php echo web_url('order/wlOrder/send', array('id' => $order['id'],'type' => $order['ordera'],'edit_flag'=>1))}">修改物流</a> |
|||
<a class="btn btn-danger btn-xs" data-toggle='ajaxPost' href="{php echo web_url('order/wlOrder/sendcancel', array('id' => $order['id'],'type' => $order['ordera']))}" data-confirm="确认取消发货?">取消发货</a> |
|||
<a class="btn btn-primary btn-xs" data-toggle="ajaxPost" href="{php echo web_url('order/wlOrder/collect', array('id' => $order['id'],'type' => $order['ordera']))}" data-confirm="确认买家收货?">确认收货</a> |
|||
{/if} |
|||
</td> |
|||
{/if} |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
<!--售后--> |
|||
{if !empty($afters)} |
|||
<div class="panel panel-display"> |
|||
<div class="panel-heading"><h3>售后信息</h3></div> |
|||
{loop $afters $aft} |
|||
<div class="panel-body"> |
|||
<table class="table"> |
|||
<tr> |
|||
<td width="150">申请时间:</td> |
|||
<td>{php echo date('Y-m-d H:i:s',$aft['createtime'])}</td> |
|||
</tr> |
|||
<tr> |
|||
<td width="150">售后状态:</td> |
|||
<td>{if $aft['status'] == 1} |
|||
<span class='label label-warning'>待处理</span> |
|||
{else if $aft['status'] == 2} |
|||
<span class='label label-success'>已完成</span> |
|||
{else if $aft['status'] == 3} |
|||
<span class='label label-danger'>已拒绝</span> |
|||
{else if $aft['status'] == 4} |
|||
<span class='label label-primary'>用户取消</span> |
|||
{/if} |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td width="150">申请原因:</td> |
|||
<td>{$aft['reason']}</td> |
|||
</tr> |
|||
<tr> |
|||
<td width="150">详细描述:</td> |
|||
<td>{$aft['detail']}</td> |
|||
</tr> |
|||
{if !empty($aft['checkcodes'])} |
|||
<tr> |
|||
<td width="150">售后核销码:</td> |
|||
<td> |
|||
{loop $aft['checkcodes'] $code} |
|||
{$code}, |
|||
{/loop} |
|||
</td> |
|||
</tr> |
|||
{/if} |
|||
{if $aft['status'] == 1} |
|||
<tr> |
|||
<td width="150">操作:</td> |
|||
<td> |
|||
<a class='op' data-toggle='ajaxModal' href="{$af['refundurl']}">退款</a> |
|||
- <a href="{php echo web_url('order/orderAfterSales/rejectafter',array('id'=>$aft['id']))}" data-toggle="ajaxModal">驳回</a> |
|||
</td> |
|||
</tr> |
|||
{/if} |
|||
{if $aft['status'] == 3} |
|||
<tr> |
|||
<td width="150">驳回原因:</td> |
|||
<td>{$aft['reply']}</td> |
|||
</tr> |
|||
{/if} |
|||
{if $aft['dotime'] > 0} |
|||
<tr> |
|||
<td width="150">操作时间:</td> |
|||
<td>{php echo date('Y-m-d H:i:s',$aft['dotime'])}</td> |
|||
</tr> |
|||
{/if} |
|||
{if !empty($aft['thumbs'])} |
|||
<tr> |
|||
<td width="150">上传图片:</td> |
|||
<td> |
|||
{loop $aft['thumbs'] $img} |
|||
<a href="{php echo tomedia($img)}" target="_blank"><img width="50" height = "50" src="{php echo tomedia($img)}"></a> |
|||
{/loop} |
|||
</td> |
|||
</tr> |
|||
{/if} |
|||
</table> |
|||
</div> |
|||
{/loop} |
|||
</div> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
$(".certification-materials").on('click',function () { |
|||
let _this = $(this), |
|||
link = _this.data("url"); |
|||
window.open(link,"_blank"); |
|||
}); |
|||
</script> |
|||
|
|||
|
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,101 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs" id="myTab"> |
|||
<li><a href="javascript:;">在线买单</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="member" /> |
|||
<input type="hidden" name="ac" value="wlMember" /> |
|||
<input type="hidden" name="do" value="recharge" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">支付方式</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('paytype:0');}" class="btn {if intval($_GPC['paytype']) == 0}btn-primary{else}btn-default{/if}">全部</a> |
|||
<a href="{php echo wl_filter_url('paytype:1');}" class="btn {if $_GPC['paytype'] == 2}btn-primary{else}btn-default{/if}">余额支付</a> |
|||
<a href="{php echo wl_filter_url('paytype:2');}" class="btn {if $_GPC['paytype'] == 2}btn-primary{else}btn-default{/if}">微信支付</a> |
|||
<a href="{php echo wl_filter_url('paytype:3');}" class="btn {if $_GPC['paytype'] == 3}btn-primary{else}btn-default{/if}">支付宝</a> |
|||
<a href="{php echo wl_filter_url('paytype:5');}" class="btn {if $_GPC['paytype'] == 3}btn-primary{else}btn-default{/if}">小程序</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">时间</label> |
|||
<div class="col-sm-9"> |
|||
{php echo tpl_select_time_info('time_limit', array('starttime' => date('Y-m-d',$starttime), 'endtime' => date('Y-m-d', $endtime)));} |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary" id="search">筛选</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th style="width:15%;">买单单号</th> |
|||
<th style="width:10%;">用户信息</th> |
|||
<th style="width:15%;">商户信息</th> |
|||
<th style="width:10%;">订单金额</th> |
|||
<th style="width:10%;">不可优惠金额</th> |
|||
<th style="width:10%;">已优惠金额</th> |
|||
<th style="width:10%;">支付金额</th> |
|||
<th style="width:5%;">充值方式</th> |
|||
<th style="width:15%;">充值时间</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $list $de} |
|||
<tr> |
|||
<td>{$de['orderno']}</td> |
|||
<td><img src="{$de['avatar']}" style="width: 30px;height: 30px;"> {$de['nickname']}</td> |
|||
<td><img src="{$de['logo']}" style="width: 30px;height: 30px;"> {$de['title']}</td> |
|||
<td >¥{$de['goodsprice']}</td> |
|||
<td >¥{$de['oprice']}</td> |
|||
<td style="color: green;">¥{$de['card_fee']}</td> |
|||
<td style="color: red;">¥{$de['price']}</td> |
|||
<td> |
|||
{if $de['paytype'] == 2} |
|||
<span class="label label-success">微信支付</span> |
|||
{else if $de['paytype'] == 3} |
|||
<span class="label label-info">支付宝</span> |
|||
{else} |
|||
{else if $de['paytype'] == 1} |
|||
<span class="label label-warning">余额支付</span> |
|||
{else} |
|||
{else if $de['paytype'] == 5} |
|||
<span class="label label-default">小程序</span> |
|||
{else} |
|||
<span class="label label-danger">其他方式</span> |
|||
{/if} |
|||
</td> |
|||
<td>{$de['paytime']}</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,135 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs" id="myTab"> |
|||
<li><a href="javascript:;">退款记录</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="finace" /> |
|||
<input type="hidden" name="ac" value="finaceRefundRecord" /> |
|||
<input type="hidden" name="do" value="refundrecord" /> |
|||
<input type="hidden" name="paytype" value="{$_GPC['paytype']}" /> |
|||
<input type="hidden" name="type" value="{$_GPC['type']}" /> |
|||
<input type="hidden" name="plugin" value="{$_GPC['plugin']}" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">支付方式</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('paytype:0');}" class="btn {if intval($_GPC['paytype']) == 0}btn-primary{else}btn-default{/if}">全部</a> |
|||
<a href="{php echo wl_filter_url('paytype:1');}" class="btn {if $_GPC['paytype'] == 1}btn-primary{else}btn-default{/if}">余额支付</a> |
|||
<a href="{php echo wl_filter_url('paytype:2');}" class="btn {if $_GPC['paytype'] == 2}btn-primary{else}btn-default{/if}">微信支付</a> |
|||
<a href="{php echo wl_filter_url('paytype:3');}" class="btn {if $_GPC['paytype'] == 3}btn-primary{else}btn-default{/if}">支付宝</a> |
|||
<a href="{php echo wl_filter_url('paytype:5');}" class="btn {if $_GPC['paytype'] == 5}btn-primary{else}btn-default{/if}">小程序</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">退款方式</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('type:0');}" class="btn {if intval($_GPC['type']) == 0}btn-primary{else}btn-default{/if}">全部</a> |
|||
<a href="{php echo wl_filter_url('type:1');}" class="btn {if $_GPC['type'] == 1}btn-primary{else}btn-default{/if}">手机端退款</a> |
|||
<a href="{php echo wl_filter_url('type:2');}" class="btn {if $_GPC['type'] == 2}btn-primary{else}btn-default{/if}">后台退款</a> |
|||
<a href="{php echo wl_filter_url('type:3');}" class="btn {if $_GPC['type'] == 3}btn-primary{else}btn-default{/if}">自动退款</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">所属插件</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('plugin:all');}" class="btn {if $_GPC['plugin'] == 'all' || empty($_GPC['plugin'])}btn-primary{else}btn-default{/if}">全部</a> |
|||
<a href="{php echo wl_filter_url('plugin:rush');}" class="btn {if $_GPC['plugin'] == 'rush'}btn-primary{else}btn-default{/if}">抢购</a> |
|||
<a href="{php echo wl_filter_url('plugin:groupon');}" class="btn {if $_GPC['plugin'] == 'groupon'}btn-primary{else}btn-default{/if}">团购</a> |
|||
<a href="{php echo wl_filter_url('plugin:wifightgroup');}" class="btn {if $_GPC['plugin'] == 'wifightgroup'}btn-primary{else}btn-default{/if}">拼团</a> |
|||
<a href="{php echo wl_filter_url('plugin:bargain');}" class="btn {if $_GPC['plugin'] == 'bargain'}btn-primary{else}btn-default{/if}">砍价</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">记录搜索</label> |
|||
<div class="col-sm-9"> |
|||
<select name="keywordtype" class="form-control"> |
|||
<option value="1" {if $_GPC['keywordtype']==1}selected="selected"{/if}>订单号</option> |
|||
<option value="2" {if $_GPC['keywordtype']==2}selected="selected"{/if}>三方单号</option> |
|||
<option value="3" {if $_GPC['keywordtype']==3}selected="selected"{/if}>买家昵称</option> |
|||
<option value="4" {if $_GPC['keywordtype']==4}selected="selected"{/if}>买家电话</option> |
|||
<option value="5" {if $_GPC['keywordtype']==5}selected="selected"{/if}>商户名称</option> |
|||
</select> |
|||
<input type="text" name="keyword" class="form-control" value="{$_GPC['keyword']}" placeholder="请输入关键字"/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">退款时间</label> |
|||
<div class="col-sm-9"> |
|||
{php echo tpl_select_time_info('time_limit', array('starttime' => date('Y-m-d',$starttime), 'endtime' => date('Y-m-d', $endtime)));} |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary" id="search">筛选</button> |
|||
<button class="btn btn-default min-width" name="export" type="submit" value="export"><i class="fa fa-download"></i> 导出记录</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th style="width:15%;">订单编号(三方单号)</th> |
|||
<th style="width:15%;">用户信息</th> |
|||
<th style="width:15%;">商品信息</th> |
|||
<th style="width:5%;">支付金额</th> |
|||
<th style="width:5%;">支付方式</th> |
|||
<th style="width:5%;">退款金额</th> |
|||
<th style="width:5%;">退款方式</th> |
|||
<th style="width:5%;">退款状态</th> |
|||
<th style="width:10%;">退款备注</th> |
|||
<th style="width:10%;">退款描述</th> |
|||
<th style="width:15%;">退款时间</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $records $de} |
|||
<tr> |
|||
<td>{$de['orderno']}{if $de['transid']}<br/>({$de['transid']}){/if}</td> |
|||
<td><img src="{$de['avatar']}" style="width: 30px;height: 30px;"> {$de['nickname']}</td> |
|||
<td>{$de['goodsname']}</br>商户:{$de['storename']}</td> |
|||
<td style="color: green;">¥{$de['payfee']}</td> |
|||
<td>{$de['paytype']}</td> |
|||
<td style="color: red;">¥{$de['refundfee']}</td> |
|||
<td>{$de['type']}</td> |
|||
<td> |
|||
{if $de['status'] == 1} |
|||
<span class="label label-success">退款成功</span> |
|||
{else} |
|||
<span class="label label-danger">退款失败</span> |
|||
{/if} |
|||
</td> |
|||
<td>{$de['remark']}</td> |
|||
<td>{if $de['errmsg']}{$de['errmsg']}{else}退款成功{/if}</td> |
|||
<td>{$de['createtime']}</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,95 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs" id="myTab"> |
|||
<li><a href="javascript:;">余额明细</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="member" /> |
|||
<input type="hidden" name="ac" value="memberFinancialDetails" /> |
|||
<input type="hidden" name="do" value="balance" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">变更类型</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('type:0');}" class="btn {if intval($_GPC['type']) == 0}btn-primary{else}btn-default{/if}">不限</a> |
|||
<a href="{php echo wl_filter_url('type:1');}" class="btn {if $_GPC['type'] == 1}btn-primary{else}btn-default{/if}">增加</a> |
|||
<a href="{php echo wl_filter_url('type:2');}" class="btn {if $_GPC['type'] == 2}btn-primary{else}btn-default{/if}">减少</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">时间</label> |
|||
<div class="col-sm-9"> |
|||
{php echo tpl_select_time_info('time_limit', array('starttime' => date('Y-m-d',$starttime), 'endtime' => date('Y-m-d', $endtime)));} |
|||
</div> |
|||
</div> |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">记录搜索</label> |
|||
<div class="col-sm-9"> |
|||
<select name="keywordtype" class="form-control"> |
|||
<option value="1" {if $_GPC['keywordtype']==1}selected="selected"{/if}>用户ID</option> |
|||
<option value="2" {if $_GPC['keywordtype']==2}selected="selected"{/if}>用户昵称</option> |
|||
<option value="3" {if $_GPC['keywordtype']==3}selected="selected"{/if}>用户手机</option> |
|||
</select> |
|||
<input type="text" name="keyword" class="form-control" value="{$_GPC['keyword']}" placeholder="请输入关键字"/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary" id="search">筛选</button> |
|||
<button class="btn btn-default min-width" name="export" type="submit" value="export"><i class="fa fa-download"></i> 导出记录</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th style="width:25%;">用户信息</th> |
|||
<th style="width:10%;">变更数值</th> |
|||
<th style="width:10%;">变更类型</th> |
|||
<th style="width:30%;">变更描述</th> |
|||
<th style="width:25%;">变更时间</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $details $de} |
|||
<tr> |
|||
<td><img src="{$de['avatar']}" style="width: 30px;height: 30px;"> {$de['nickname']}</td> |
|||
<td style="color: red;">¥{$de['num']}</td> |
|||
<td> |
|||
{if $de['num'] > 0} |
|||
<span class="label label-success">增加</span> |
|||
{else} |
|||
<span class="label label-danger">减少</span> |
|||
{/if} |
|||
</td> |
|||
<td>{$de['remark']}</td> |
|||
<td>{$de['createtime']}</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,103 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs"> |
|||
<li {if $_GPC['active'] == 1}class="active"{/if} ><a href="{php echo web_url('member/campusActivities/index',array('active' => 1))}">校园活动</a></li> |
|||
<li {if $_GPC['active'] == 2}class="active"{/if} ><a href="{php echo web_url('member/campusActivities/commentIndex',array('active' => 2))}">评论审核</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-action"> |
|||
<a class="btn btn-primary" data-toggle="ajaxModal" href="{php echo web_url('setting/comment/set')}">评论设置</a> |
|||
</div> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form" id="form1"> |
|||
<input type="hidden" name="c" value="site"/> |
|||
<input type="hidden" name="a" value="entry"/> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}"/> |
|||
<input type="hidden" name="p" value="member"/> |
|||
<input type="hidden" name="ac" value="campusActivities"/> |
|||
<input type="hidden" name="do" value="index"/> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">审核状态</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('status:""');}" class="btn {if !is_numeric($_GPC['status'])}btn-primary{else}btn-default{/if}">全部</a> |
|||
<a href="{php echo wl_filter_url('status:0');}" class="btn {if $_GPC['status'] == '0'}btn-primary{else}btn-default{/if}">待审核</a> |
|||
<a href="{php echo wl_filter_url('status:1');}" class="btn {if $_GPC['status'] == 1}btn-primary{else}btn-default{/if}">通过</a> |
|||
<a href="{php echo wl_filter_url('status:2');}" class="btn {if $_GPC['status'] == 2}btn-primary{else}btn-default{/if}">不通过</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary" type="submit">筛选</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-responsive"> |
|||
<thead> |
|||
<tr> |
|||
<th style="width: 10%;">评论人</th> |
|||
<th style="width: 50%;">评论信息</th> |
|||
<th style="width: 10%;">评论时间</th> |
|||
<th style="width: 10%;">状态</th> |
|||
<th style="width: 20%;text-align: right;">操作</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $list $row} |
|||
<tr> |
|||
<td style="overflow: visible"> |
|||
{if $row['avatar']} |
|||
<img class="scrollLoading" src="{$row['avatar']}" data-url="{php echo $row['avatar'];}" height="50" width="50"/> |
|||
{/if} |
|||
{$row['nickname']} |
|||
</td> |
|||
<td style="overflow: visible"><span style="word-break: break-word;">{php echo $row['content'];}</span></td> |
|||
<td style="overflow: visible"><span style="word-break: break-word;">{php echo $row['create_time'];}</span></td> |
|||
<td style="overflow: visible"> |
|||
<span style="word-break: break-word;"> |
|||
{if $row['status']==0}<label class="label label-primary">待审核</label> |
|||
{elseif $row['status']==1}<label class="label label-info">通过</label> |
|||
{elseif $row['status']==2}<label class="label label-danger">不通过</label> |
|||
{/if} |
|||
</span> |
|||
</td> |
|||
<td style="overflow:visible;text-align: right;"> |
|||
{if $row['status'] == '0'} |
|||
<a class="btn btn-info btn-sm" href="{php echo web_url('member/campusActivities/checkComment',array('id' => $row['id'],'status' => 1));}" title="">通过</a> |
|||
<a class="btn btn-danger btn-sm" href="{php echo web_url('member/campusActivities/checkComment',array('id' => $row['id'],'status' => 2));}" title="">不通过</a> |
|||
{else} |
|||
<a href="{php echo web_url('member/campusActivities/deleteComment',array('id'=>$row['id']))}" class="btn btn-danger btn-sm" onclick="confirmLink(event)" data-toggle="tooltip" data-placement="top" title=""> |
|||
删除 |
|||
</a> |
|||
{/if} |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
function confirmLink(event) { |
|||
var answer = confirm("确认要删除吗?"); |
|||
if (!answer) { |
|||
event.preventDefault(); |
|||
} |
|||
} |
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,66 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="#">添加活动</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-form"> |
|||
<form action="" method="post" class="form-horizontal form form-validate"> |
|||
<div class="tab-content"> |
|||
<div class="tab-pane active" id="tab_basic"> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-body"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">活动标题<span class="must-fill">*</span></label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="register[title]" required class="form-control" value="{$register['title']}"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">活动分类<span class="must-fill">*</span></label> |
|||
<div class="col-sm-9"> |
|||
<select name="register[cc_id]" class="form-control"> |
|||
{loop $category $cateVal} |
|||
<option {if $register['cc_id'] == $cateVal['id']}selected{/if} value="{$cateVal['id']}">{$cateVal['name']}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">活动描述<span class="must-fill">*</span></label> |
|||
<div class="col-sm-9"> |
|||
{php echo tpl_diy_editor_create('register[describe]', $register['describe']);} |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
|
|||
<label class="col-sm-2 control-label">活动宣传图<span class="must-fill">*</span></label> |
|||
<div class="col-sm-9"> |
|||
{php echo attachment_select('register[promotional_img]', $register['promotional_img'])} |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">是否推荐</label> |
|||
<div class="col-sm-9"> |
|||
<label class="radio-inline"> |
|||
<input type="radio" name='register[recommend]' value='0' {if $register['recommend']==0}checked{/if}>关闭 |
|||
</label> |
|||
<label class="radio-inline"> |
|||
<input type="radio" name='register[recommend]' value='1' {if $register['recommend']==1}checked{/if}>开启 |
|||
</label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<input type="submit" name="submit" value="提交" class="btn btn-primary min-width" /> |
|||
<input type="hidden" name="token" value="{$_W['token']}" /> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,232 @@ |
|||
{php include wl_template('common/header');} |
|||
<style> |
|||
.content-clamp { |
|||
display:-webkit-box; |
|||
overflow:hidden; |
|||
text-overflow:ellipsis; |
|||
-webkit-line-clamp:2; |
|||
-webkit-box-orient:vertical; |
|||
word-break: break-word; |
|||
} |
|||
.content-clamp img { |
|||
display: none; |
|||
} |
|||
.content-clamp p { |
|||
width: 400px; |
|||
} |
|||
</style> |
|||
<ul class="nav nav-tabs"> |
|||
<li {if $_GPC['active'] == 1}class="active"{/if} ><a href="{php echo web_url('member/campusActivities/index',array('active' => 1))}">校园活动</a></li> |
|||
<li {if $_GPC['active'] == 2}class="active"{/if} ><a href="{php echo web_url('member/campusActivities/commentIndex',array('active' => 2))}">评论审核</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-action"> |
|||
<a href="{php echo web_url('member/campusActivities/edit')}" class="btn btn-primary">添加活动</a> |
|||
</div> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form" id="form1"> |
|||
<input type="hidden" name="c" value="site"/> |
|||
<input type="hidden" name="a" value="entry"/> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}"/> |
|||
<input type="hidden" name="p" value="member"/> |
|||
<input type="hidden" name="ac" value="campusActivities"/> |
|||
<input type="hidden" name="do" value="index"/> |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">活动标题</label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="title" class="form-control" value="{$_GPC['title']}" |
|||
placeholder="请输入活动标题"/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">发布状态</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('status:""');}" class="btn {if !is_numeric($_GPC['status'])}btn-primary{else}btn-default{/if}">全部</a> |
|||
<a href="{php echo wl_filter_url('status:0');}" class="btn {if $_GPC['status'] == '0'}btn-primary{else}btn-default{/if}">未发布</a> |
|||
<a href="{php echo wl_filter_url('status:1');}" class="btn {if $_GPC['status'] == 1}btn-primary{else}btn-default{/if}">已发布</a> |
|||
<a href="{php echo wl_filter_url('status:2');}" class="btn {if $_GPC['status'] == 2}btn-primary{else}btn-default{/if}">驳回</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">发布人</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('create_place:0');}" class="btn {if $_GPC['create_place'] == 0}btn-primary{else}btn-default{/if}">全部</a> |
|||
<a href="{php echo wl_filter_url('create_place:1');}" class="btn {if $_GPC['create_place'] == 1}btn-primary{else}btn-default{/if}">管理员</a> |
|||
<a href="{php echo wl_filter_url('create_place:2');}" class="btn {if $_GPC['create_place'] == 2}btn-primary{else}btn-default{/if}">绑定微信用户</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary" type="submit">筛选</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-responsive"> |
|||
<thead> |
|||
<tr> |
|||
<th style="width: 10%;">创建人</th> |
|||
<th style="width: 15%;">活动标题</th> |
|||
<!-- <th style="width: 20%;">活动内容</th>--> |
|||
<th style="width: 8%;">活动分类</th> |
|||
<th style="width: 10%;">活动发布时间</th> |
|||
<th style="width: 8%;">宣传海报</th> |
|||
<th style="width: 5%;">推荐</th> |
|||
<th style="width: 6%;">发布状态</th> |
|||
<th style="width: 10%;">驳回原因</th> |
|||
<th style="width: 15%;text-align: right;">操作</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $list $row} |
|||
<tr> |
|||
|
|||
<td style="overflow: visible"> |
|||
{if $row['avatar']} |
|||
<img class="scrollLoading" src="{$row['avatar']}" data-url="{php echo $row['avatar'];}" height="50" width="50"/> |
|||
{/if} |
|||
{$row['nickname']} |
|||
</td> |
|||
<td style="overflow: visible"><span style="word-break: break-word;">{php echo $row['title'];}</span></td> |
|||
<!-- <td style="overflow: visible"><span class="content-clamp">{php echo $row['describe'];}</span></td>--> |
|||
<td style="overflow: visible">{php echo $row['cc_name'];}</td> |
|||
<td style="overflow: visible">{if $row['publish_time']}{php echo date('Y-m-d H:i:s',$row['publish_time']);}{/if}</td> |
|||
<td style="overflow: visible;"> |
|||
<a href="{$row['promotional_img']}" target="_blank"> |
|||
<img class="scrollLoading" src="{$row['promotional_img']}" data-url="{$row['promotional_img']}" height="50" width="50"/> |
|||
</a> |
|||
</td> |
|||
<td style="overflow: visible"> |
|||
{php echo tpl_change_status('member/campusActivities/changeRecommend&id='.$row['id'],$row['recommend'])} |
|||
</td> |
|||
<td style="overflow: visible"> |
|||
<span id="publish-status-{php echo $row['id'];}"> |
|||
{if $row['status'] == '0'} |
|||
<span class="label label-primary">未发布</span> |
|||
{elseif $row['status'] == '1'} |
|||
<span class="label label-info">已发布</span> |
|||
{elseif $row['status'] == '2'} |
|||
<span class="label label-danger">驳回</span> |
|||
{/if} |
|||
</span> |
|||
</td> |
|||
<td style="overflow: visible"> |
|||
{$row['reject']} |
|||
</td> |
|||
<td style="overflow:visible;text-align: right;"> |
|||
{if $row['status'] == '0'} |
|||
<a class="btn btn-info btn-sm" href="#" onclick="publishInfo(this,{php echo $row['id'];})" title="">发布</a> |
|||
{if $row['create_place'] == 2} |
|||
<a href="#" class="btn btn-danger btn-sm" data-toggle="modal" data-target="#modal-reject{$row['id']}" data-placement="top" title="驳回">驳回</a> |
|||
{/if} |
|||
{/if} |
|||
<a class="btn btn-primary btn-sm" href="{php echo web_url('member/campusActivities/edit',array('id' => $row['id']));}" title="">编辑</a> |
|||
<a class="btn btn-danger btn-sm" href="#" onclick="deleteInfo(this,{php echo $row['id'];},{php echo $row['status'];})" title="">删除</a> |
|||
</td> |
|||
</tr> |
|||
<div id="modal-reject{$row['id']}" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true" style="margin:0px auto;"> |
|||
<div class="modal-dialog"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button> |
|||
<h3>驳回原因</h3> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<textarea name="rejectCommon" cols="50" id="reject{$row['id']}" class="form-control" value="" style="margin: 0px -1px 0px 0px; height: 233px; width: 570px;"></textarea> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button class="btn btn-primary span2" onclick="rejectById({$row['id']})">保存</button> |
|||
<a href="#" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
function publishInfo(obj,id) { |
|||
$.ajax({ |
|||
url: "{php echo web_url('member/campusActivities/publish');}", |
|||
type: 'post', |
|||
data: {id:id}, |
|||
dataType: 'json', |
|||
async:false, |
|||
success:function(res){ |
|||
if (res.status===1) { |
|||
$(obj).remove(); |
|||
$("#publish-status-"+id).html(res.result.button); |
|||
tip.alert(res.result.message) |
|||
} else { |
|||
tip.alert(res.result.message); |
|||
} |
|||
}, |
|||
error:function(){ |
|||
tip.alert("网络错误,请重试!!"); |
|||
} |
|||
}) |
|||
} |
|||
function deleteInfo(obj,id,status) { |
|||
let content = '确认删除这条数据吗?'; |
|||
if (status == 1) { |
|||
content = '该数据已发布,确认还要删除吗'; |
|||
} |
|||
layer.open({ |
|||
title: '删除', |
|||
content: content, |
|||
btn: ['确认','取消'], |
|||
yes: function (index) { |
|||
$.ajax({ |
|||
url: "{php echo web_url('member/campusActivities/delete');}", |
|||
type: 'post', |
|||
data: {id:id}, |
|||
dataType: 'json', |
|||
success:function(res){ |
|||
if (res.status===1) { |
|||
$(obj).parents('tr').remove(); |
|||
} else { |
|||
tip.alert(res.result.message); |
|||
} |
|||
}, |
|||
error:function(){ |
|||
tip.alert("网络错误,请重试!!"); |
|||
} |
|||
}) |
|||
layer.close(index); |
|||
}, |
|||
btn2: function (index) { |
|||
layer.close(index); |
|||
} |
|||
}) |
|||
} |
|||
//驳回申请 |
|||
function rejectById(id){ |
|||
var rejectcomm = $('#reject'+id).val(); |
|||
if(rejectcomm==''){ |
|||
layer.msg('请填写驳回原因', {icon: 5}); |
|||
return false; |
|||
} |
|||
location.href = "{php echo web_url('member/campusActivities/reject')}&id="+id+"&reject="+rejectcomm; |
|||
} |
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,213 @@ |
|||
{php include wl_template('common/header');} |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="member" /> |
|||
<input type="hidden" name="ac" value="checkMember" /> |
|||
<input type="hidden" name="do" value="checkBloggerIndex" /> |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">搜索内容</label> |
|||
<div class="col-sm-9"> |
|||
<select name="keywordtype" class="form-control"> |
|||
<option value="1" {if $_GPC['keywordtype']==1}selected="selected"{/if}>微信用户ID</option> |
|||
<option value="2" {if $_GPC['keywordtype']==2}selected="selected"{/if}>微信用户昵称</option> |
|||
<option value="3" {if $_GPC['keywordtype']==3}selected="selected"{/if}>姓名</option> |
|||
<option value="4" {if $_GPC['keywordtype']==4}selected="selected"{/if}>手机号</option> |
|||
</select> |
|||
<input type="text" name="keyword" class="form-control" value="{$_GPC['keyword']}" placeholder="请输入关键字"/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">认证状态</label> |
|||
<div class="col-sm-9"> |
|||
<select name="status" class="form-control"> |
|||
<option value="">全部</option> |
|||
<option value="0" {if $_GPC['status']=='0'}selected="selected"{/if}>未认证</option> |
|||
<option value="1" {if $_GPC['status']==1}selected="selected"{/if}>认证成功</option> |
|||
<option value="2" {if $_GPC['status']==2}selected="selected"{/if}>认证失败</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary" type="submit">筛选</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-responsive"> |
|||
<thead> |
|||
<tr> |
|||
<th style="width: 7%;">微信用户ID</th> |
|||
<th style="width: 13%;">微信用户昵称</th> |
|||
<th style="width: 10%;">姓名/昵称</th> |
|||
<th style="width: 10%;">手机号</th> |
|||
<th style="width: 15%;">其他平台粉丝截图</th> |
|||
<th style="width: 15%;">申请时间</th> |
|||
<th style="width: 10%;">申请状态</th> |
|||
<th style="width: 10%;">失败原因</th> |
|||
<th style="width: 10%;text-align: right;">操作</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $list $row} |
|||
<tr> |
|||
<td style="overflow: visible">{$row['mid']}</td> |
|||
<td style="overflow: visible"> |
|||
<img class="scrollLoading" src="{$row['avatar']}" data-url="{php echo $row['avatar'];}" height="50" width="50"/> |
|||
{php echo $row['nickname'];} |
|||
</td> |
|||
<td style="overflow: visible">{php echo $row['name'];}</td> |
|||
<td style="overflow: visible">{php echo $row['mobile'];}</td> |
|||
<td style="overflow: visible"> |
|||
<a href="{php echo $row['screenshot']}" target="_blank"> |
|||
<img class="scrollLoading" src="{$row['screenshot']}" data-url="{php echo $row['screenshot'];}" height="50" width="50"/> |
|||
</a> |
|||
</td> |
|||
<td style="overflow: visible">{php echo $row['create_time'];}</td> |
|||
<td style="overflow: visible"> |
|||
{if $row['status'] == '0'} |
|||
<label class="label label-primary check-result{php echo $row['id'];}">未认证</label> |
|||
{elseif $row['status'] == '1'} |
|||
<label class="label label-success check-result{php echo $row['id'];}">认证成功</label> |
|||
{elseif $row['status'] == '2'} |
|||
<label class="label label-warning check-result{php echo $row['id'];}">认证失败</label> |
|||
{/if} |
|||
</td> |
|||
<td style="overflow: visible" id="remark{php echo $row['id'];}">{$row['remark']}</td> |
|||
<td style="overflow: visible;text-align: right;"> |
|||
{if empty($row['status'])} |
|||
<a class="btn btn-primary btn-sm" href="#" id="show-audit-{php echo $row['id'];}" onclick="showAudit({php echo $row['id'];})" title="">认证</a> |
|||
{/if} |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
<!-- 认证弹窗模板 --> |
|||
<div class="modal fade" id="audit-modal" tabindex="-1" role="dialog" aria-labelledby="audit-modal-title" aria-hidden="true"> |
|||
<div class="modal-dialog modal-sm" role="document"> |
|||
<div class="modal-content"> |
|||
<form id="audit-form"> |
|||
<div class="modal-header"> |
|||
<h5 class="modal-title" id="audit-modal-title">认证</h5> |
|||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
|||
<span aria-hidden="true">×</span> |
|||
</button> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<div class="form-group"> |
|||
<div class="form-check form-check-inline"> |
|||
<input class="form-check-input" type="radio" name="result" id="result-pass" value="pass" checked> |
|||
<label class="form-check-label" for="result-pass">通过</label> |
|||
</div> |
|||
<div class="form-check form-check-inline" style="display: inline-block;"> |
|||
<input class="form-check-input" type="radio" name="result" id="result-reject" value="reject"> |
|||
<label class="form-check-label" for="result-reject">不通过</label> |
|||
</div> |
|||
</div> |
|||
<div class="form-group" id="reject-reason" style="display:none"> |
|||
<label for="reject-reason-input">不通过原因</label> |
|||
<textarea class="form-control" id="reject-reason-input" name="reason" rows="3"></textarea> |
|||
</div> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<input type="hidden" id="hidden_id" value=""> |
|||
<button type="submit" class="btn btn-primary">确定</button> |
|||
<button type="button" class="btn btn-secondary" data-dismiss="modal" onclick="resetFrom()">取消</button> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
$(function() { |
|||
// 监听认证结果选项 |
|||
$('input[name="result"]').on('change', function() { |
|||
var value = $(this).val(); |
|||
if (value === 'reject') { |
|||
$('#reject-reason').show(); |
|||
} else { |
|||
$('#reject-reason').hide(); |
|||
} |
|||
}); |
|||
|
|||
// 监听表单提交 |
|||
$('#audit-form').on('submit', function(e) { |
|||
e.preventDefault(); |
|||
var result = $('input[name="result"]:checked').val(); |
|||
var reason = $('textarea[name="reason"]').val(); |
|||
let data = {}; |
|||
data.id = $("#hidden_id").val(); |
|||
data.result = result; |
|||
if (result == 'reject' && reason.length == 0) { |
|||
tip.alert('请填写不通过的原因'); |
|||
return false; |
|||
} |
|||
if (reason) { |
|||
data.reason = reason; |
|||
} |
|||
$.ajax({ |
|||
url:"{php echo web_url('member/checkMember/checkBloggerInfo')}", |
|||
type:"post", |
|||
data: {data:data}, |
|||
dataType:"json", |
|||
async:false, |
|||
success:function(res){ |
|||
if (res.status===1) { |
|||
$('#show-audit-'+data.id).css('display','none'); |
|||
$('.check-result'+data.id).html(res.result.span); |
|||
if (result == 'reject') { |
|||
$('.check-result'+data.id).prop("class","label label-warning check-result"+data.id); |
|||
$('#remark'+data.id).html(reason); |
|||
} else { |
|||
$('.check-result'+data.id).prop("class","label label-success check-result"+data.id); |
|||
} |
|||
} else { |
|||
tip.alert(res.result.message); |
|||
} |
|||
}, |
|||
error:function(){ |
|||
tip.alert("网络错误,请重试!!"); |
|||
} |
|||
}); |
|||
$('#audit-modal').modal('hide'); |
|||
resetFrom(); |
|||
}); |
|||
}); |
|||
|
|||
// 弹出认证弹窗 |
|||
function showAudit(id) { |
|||
$('#audit-modal').modal({ |
|||
show: true |
|||
}); |
|||
$('#hidden_id').val(id); |
|||
} |
|||
|
|||
function resetFrom() { |
|||
$('#result-pass').prop('checked', true); |
|||
$('#result-reject').prop('checked', false); |
|||
$('#reject-reason').hide(); |
|||
$('#reject-reason-input').val(''); |
|||
} |
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,69 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="#">编辑学生信息</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-form"> |
|||
<form action="" method="post" class="form-horizontal form form-validate"> |
|||
<div class="tab-content"> |
|||
<div class="tab-pane active" id="tab_basic"> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-body"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">姓名<span class="must-fill">*</span></label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="name" required class="form-control" value="{$data['name']}"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">学号<span class="must-fill">*</span></label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="code" required class="form-control" value="{$data['code']}"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">手机号<span class="must-fill">*</span></label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="mobile" required class="form-control" value="{$data['mobile']}"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">学校名称<span class="must-fill">*</span></label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="school_name" required class="form-control" value="{$data['school_name']}"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">院系名称<span class="must-fill">*</span></label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="department_name" required class="form-control" value="{$data['department_name']}"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">入学时间<span class="must-fill">*</span></label> |
|||
<div class="col-sm-9"> |
|||
<input type="date" name="start_date" value="{$data['start_date']}"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">学生证件<span class="must-fill">*</span></label> |
|||
<div class="col-sm-9"> |
|||
{php echo attachment_select('certificate_img',$data['certificate_img']);} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<input type="submit" name="submit" value="提交" class="btn btn-primary min-width" /> |
|||
<input type="hidden" name="token" value="{$_W['token']}" /> |
|||
<input type="hidden" name="id" value="{$data['id']}"> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,223 @@ |
|||
{php include wl_template('common/header');} |
|||
<style> |
|||
#reject-reason {margin-top: 10px;} |
|||
.image-container { |
|||
position: relative; |
|||
display: inline-block; |
|||
} |
|||
.tip { |
|||
display: none; |
|||
position: absolute; |
|||
top: -30px; |
|||
left: 100%; |
|||
padding: 5px; |
|||
background-color: #fff; |
|||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); |
|||
border: 1px solid #ccc; |
|||
border-radius: 4px; |
|||
} |
|||
.image-container:hover .tip { |
|||
display: block; |
|||
} |
|||
</style> |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="#">学生认证</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="member" /> |
|||
<input type="hidden" name="ac" value="checkMember" /> |
|||
<input type="hidden" name="do" value="checkStudentIndex" /> |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">姓名</label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="username" class="form-control" value="{$_GPC['username']}" placeholder="请输入姓名"/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary" type="submit">筛选</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-responsive"> |
|||
<thead> |
|||
<tr> |
|||
<th style="width: 10%;">姓名</th> |
|||
<th style="width: 10%;">学号</th> |
|||
<th style="width: 10%;">手机号</th> |
|||
<th style="width: 15%;">学校名称</th> |
|||
<th style="width: 15%;">院系名称</th> |
|||
<th style="width: 10%;">入学时间</th> |
|||
<th style="width: 10%;">学生证件</th> |
|||
<th style="width: 10%;">审核状态</th> |
|||
<th style="width: 10%;text-align: right;">操作</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $list $row} |
|||
<tr> |
|||
<td style="overflow: visible">{php echo $row['name'];}</td> |
|||
<td style="overflow: visible">{php echo $row['code'];}</td> |
|||
<td style="overflow: visible">{php echo $row['mobile'];}</td> |
|||
<td style="overflow: visible">{php echo $row['school_name'];}</td> |
|||
<td style="overflow: visible">{php echo $row['department_name'];}</td> |
|||
<td style="overflow: visible">{php echo $row['start_date'];}</td> |
|||
<td style="overflow: visible"> |
|||
<a href="{php echo tomedia($row['certificate_img'])}" target="_blank"> |
|||
<div class="image-container"> |
|||
<img class="img-40 image" src="{php echo tomedia($row['certificate_img'])}" style='border:1px solid #efefef;' onerror="this.src='{IMAGE_NOPIC_SMALL}'" height="40" width="40" alt="image"/> |
|||
<div class="tip"></div> |
|||
</div> |
|||
</a> |
|||
</td> |
|||
<td style="overflow: visible"> |
|||
{if $row['check_status'] == '0'} |
|||
<span class="check-result{php echo $row['id'];}">未审核</span> |
|||
{elseif $row['check_status'] == '1'} |
|||
<span class="check-result{php echo $row['id'];}">审核通过</span> |
|||
{elseif $row['check_status'] == '2'} |
|||
<span class="check-result{php echo $row['id'];}">审核失败</span> |
|||
{/if} |
|||
</td> |
|||
<td style="overflow:visible;text-align: right;"> |
|||
{if empty($row['check_status'])} |
|||
<a class="btn btn-primary btn-sm" href="#" id="show-audit-{php echo $row['id'];}" onclick="showAudit({php echo $row['id'];})" title="">审核</a> |
|||
{/if} |
|||
<a class="btn btn-sm btn-default" href="{php echo web_url('member/checkMember/checkStudentEdit',array('id'=>$row['id']))}">编辑</a> |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
<!-- 审核弹窗模板 --> |
|||
<div class="modal fade" id="audit-modal" tabindex="-1" role="dialog" aria-labelledby="audit-modal-title" aria-hidden="true"> |
|||
<div class="modal-dialog modal-sm" role="document"> |
|||
<div class="modal-content"> |
|||
<form id="audit-form"> |
|||
<div class="modal-header"> |
|||
<h5 class="modal-title" id="audit-modal-title">审核</h5> |
|||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
|||
<span aria-hidden="true">×</span> |
|||
</button> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<div class="form-group"> |
|||
<div class="form-check form-check-inline"> |
|||
<input class="form-check-input" type="radio" name="result" id="result-pass" value="pass" checked> |
|||
<label class="form-check-label" for="result-pass">通过</label> |
|||
</div> |
|||
<div class="form-check form-check-inline" style="display: inline-block;"> |
|||
<input class="form-check-input" type="radio" name="result" id="result-reject" value="reject"> |
|||
<label class="form-check-label" for="result-reject">不通过</label> |
|||
</div> |
|||
</div> |
|||
<div class="form-group" id="reject-reason" style="display:none"> |
|||
<label for="reject-reason-input">不通过原因</label> |
|||
<textarea class="form-control" id="reject-reason-input" name="reason" rows="3"></textarea> |
|||
</div> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<input type="hidden" id="hidden_id" value=""> |
|||
<button type="submit" class="btn btn-danger">确定</button> |
|||
<button type="button" class="btn btn-secondary" data-dismiss="modal" onclick="resetFrom()">取消</button> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
$(function() { |
|||
// 监听审核结果选项 |
|||
$('input[name="result"]').on('change', function() { |
|||
var value = $(this).val(); |
|||
if (value === 'reject') { |
|||
$('#reject-reason').show(); |
|||
} else { |
|||
$('#reject-reason').hide(); |
|||
} |
|||
}); |
|||
|
|||
// 图片放大 |
|||
$('.image-container').hover(function() { |
|||
var src = $(this).find('.image').attr('src'); |
|||
$(this).find('.tip').html('<img src="' + src + '" style="width: 200px;height:200px;">'); |
|||
}, function() { |
|||
$(this).find('.tip').empty(); |
|||
}); |
|||
|
|||
// 监听表单提交 |
|||
$('#audit-form').on('submit', function(e) { |
|||
e.preventDefault(); |
|||
var result = $('input[name="result"]:checked').val(); |
|||
var reason = $('textarea[name="reason"]').val(); |
|||
let data = {}; |
|||
data.id = $("#hidden_id").val(); |
|||
data.result = result; |
|||
if (result == 'reject' && reason.length == 0) { |
|||
tip.alert('请填写不通过的原因'); |
|||
return false; |
|||
} |
|||
if (reason) { |
|||
data.reason = reason; |
|||
} |
|||
$.ajax({ |
|||
url:"{php echo web_url('member/checkMember/checkStudentInfo')}", |
|||
type:"post", |
|||
data: {data:data}, |
|||
dataType:"json", |
|||
async:false, |
|||
success:function(res){ |
|||
if (res.status===1) { |
|||
$('#show-audit-'+data.id).css('display','none'); |
|||
$('.check-result'+data.id).html(res.result.span); |
|||
} else { |
|||
tip.alert(res.result.message); |
|||
} |
|||
}, |
|||
error:function(){ |
|||
tip.alert("网络错误,请重试!!"); |
|||
} |
|||
}); |
|||
$('#audit-modal').modal('hide'); |
|||
resetFrom(); |
|||
}); |
|||
}); |
|||
|
|||
// 弹出审核弹窗 |
|||
function showAudit(id) { |
|||
$('#audit-modal').modal({ |
|||
show: true |
|||
}); |
|||
$('#hidden_id').val(id); |
|||
} |
|||
|
|||
function resetFrom() { |
|||
$('#result-pass').prop('checked', true); |
|||
$('#result-reject').prop('checked', false); |
|||
$('#reject-reason').hide(); |
|||
$('#reject-reason-input').val(''); |
|||
} |
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,216 @@ |
|||
{php include wl_template('common/header');} |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="member" /> |
|||
<input type="hidden" name="ac" value="checkMember" /> |
|||
<input type="hidden" name="do" value="checkTeacherIndex" /> |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">搜索内容</label> |
|||
<div class="col-sm-9"> |
|||
<select name="keywordtype" class="form-control"> |
|||
<option value="1" {if $_GPC['keywordtype']==1}selected="selected"{/if}>微信用户ID</option> |
|||
<option value="2" {if $_GPC['keywordtype']==2}selected="selected"{/if}>微信用户昵称</option> |
|||
<option value="3" {if $_GPC['keywordtype']==3}selected="selected"{/if}>姓名</option> |
|||
</select> |
|||
<input type="text" name="keyword" class="form-control" value="{$_GPC['keyword']}" placeholder="请输入关键字"/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">认证状态</label> |
|||
<div class="col-sm-9"> |
|||
<select name="status" class="form-control"> |
|||
<option value="">全部</option> |
|||
<option value="0" {if $_GPC['status']=='0'}selected="selected"{/if}>未认证</option> |
|||
<option value="1" {if $_GPC['status']==1}selected="selected"{/if}>认证成功</option> |
|||
<option value="2" {if $_GPC['status']==2}selected="selected"{/if}>认证失败</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary" type="submit">筛选</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-responsive"> |
|||
<thead> |
|||
<tr> |
|||
<th style="width: 7%;">微信用户ID</th> |
|||
<th style="width: 13%;">商户</th> |
|||
<th style="width: 7%;">姓名</th> |
|||
<th style="width: 8%;">手机号</th> |
|||
<th style="width: 10%;">学校名称</th> |
|||
<th style="width: 10%;">院系</th> |
|||
<th style="width: 10%;">教师工作证件</th> |
|||
<th style="width: 10%;">申请时间</th> |
|||
<th style="width: 5%;">申请状态</th> |
|||
<th style="width: 10%;">失败原因</th> |
|||
<th style="width: 10%;text-align: right;">操作</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $list $row} |
|||
<tr> |
|||
<td style="overflow: visible">{$row['mid']}</td> |
|||
<td style="overflow: visible"> |
|||
<img class="scrollLoading" src="{$row['avatar']}" data-url="{php echo $row['avatar'];}" height="50" width="50"/> |
|||
{php echo $row['nickname'];} |
|||
</td> |
|||
<td style="overflow: visible">{php echo $row['name'];}</td> |
|||
<td style="overflow: visible">{php echo $row['mobile'];}</td> |
|||
<td style="overflow: visible">{php echo $row['school_name'];}</td> |
|||
<td style="overflow: visible">{php echo $row['faculty'];}</td> |
|||
<td style="overflow: visible"> |
|||
<a href="{php echo $row['documents']}" target="_blank"> |
|||
<img class="scrollLoading" src="{$row['documents']}" data-url="{php echo $row['documents'];}" height="50" width="50"/> |
|||
</a> |
|||
</td> |
|||
<td style="overflow: visible">{php echo $row['create_time'];}</td> |
|||
<td style="overflow: visible"> |
|||
{if $row['status'] == '0'} |
|||
<label class="label label-primary check-result{php echo $row['id'];}">未认证</label> |
|||
{elseif $row['status'] == '1'} |
|||
<label class="label label-success check-result{php echo $row['id'];}">认证成功</label> |
|||
{elseif $row['status'] == '2'} |
|||
<label class="label label-warning check-result{php echo $row['id'];}">认证失败</label> |
|||
{/if} |
|||
</td> |
|||
<td style="overflow: visible" id="remark{php echo $row['id'];}">{$row['remark']}</td> |
|||
<td style="overflow: visible;text-align: right;"> |
|||
{if empty($row['status'])} |
|||
<a class="btn btn-primary btn-sm" href="#" id="show-audit-{php echo $row['id'];}" onclick="showAudit({php echo $row['id'];})" title="">认证</a> |
|||
{/if} |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
<!-- 认证弹窗模板 --> |
|||
<div class="modal fade" id="audit-modal" tabindex="-1" role="dialog" aria-labelledby="audit-modal-title" aria-hidden="true"> |
|||
<div class="modal-dialog modal-sm" role="document"> |
|||
<div class="modal-content"> |
|||
<form id="audit-form"> |
|||
<div class="modal-header"> |
|||
<h5 class="modal-title" id="audit-modal-title">认证</h5> |
|||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
|||
<span aria-hidden="true">×</span> |
|||
</button> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<div class="form-group"> |
|||
<div class="form-check form-check-inline"> |
|||
<input class="form-check-input" type="radio" name="result" id="result-pass" value="pass" checked> |
|||
<label class="form-check-label" for="result-pass">通过</label> |
|||
</div> |
|||
<div class="form-check form-check-inline" style="display: inline-block;"> |
|||
<input class="form-check-input" type="radio" name="result" id="result-reject" value="reject"> |
|||
<label class="form-check-label" for="result-reject">不通过</label> |
|||
</div> |
|||
</div> |
|||
<div class="form-group" id="reject-reason" style="display:none"> |
|||
<label for="reject-reason-input">不通过原因</label> |
|||
<textarea class="form-control" id="reject-reason-input" name="reason" rows="3"></textarea> |
|||
</div> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<input type="hidden" id="hidden_id" value=""> |
|||
<button type="submit" class="btn btn-primary">确定</button> |
|||
<button type="button" class="btn btn-secondary" data-dismiss="modal" onclick="resetFrom()">取消</button> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
$(function() { |
|||
// 监听认证结果选项 |
|||
$('input[name="result"]').on('change', function() { |
|||
var value = $(this).val(); |
|||
if (value === 'reject') { |
|||
$('#reject-reason').show(); |
|||
} else { |
|||
$('#reject-reason').hide(); |
|||
} |
|||
}); |
|||
|
|||
// 监听表单提交 |
|||
$('#audit-form').on('submit', function(e) { |
|||
e.preventDefault(); |
|||
var result = $('input[name="result"]:checked').val(); |
|||
var reason = $('textarea[name="reason"]').val(); |
|||
let data = {}; |
|||
data.id = $("#hidden_id").val(); |
|||
data.result = result; |
|||
if (result == 'reject' && reason.length == 0) { |
|||
tip.alert('请填写不通过的原因'); |
|||
return false; |
|||
} |
|||
if (reason) { |
|||
data.reason = reason; |
|||
} |
|||
$.ajax({ |
|||
url:"{php echo web_url('member/checkMember/checkTeacherInfo')}", |
|||
type:"post", |
|||
data: {data:data}, |
|||
dataType:"json", |
|||
async:false, |
|||
success:function(res){ |
|||
if (res.status===1) { |
|||
$('#show-audit-'+data.id).css('display','none'); |
|||
$('.check-result'+data.id).html(res.result.span); |
|||
if (result == 'reject') { |
|||
$('.check-result'+data.id).prop("class","label label-warning check-result"+data.id); |
|||
$('#remark'+data.id).html(reason); |
|||
} else { |
|||
$('.check-result'+data.id).prop("class","label label-success check-result"+data.id); |
|||
} |
|||
} else { |
|||
tip.alert(res.result.message); |
|||
} |
|||
}, |
|||
error:function(){ |
|||
tip.alert("网络错误,请重试!!"); |
|||
} |
|||
}); |
|||
$('#audit-modal').modal('hide'); |
|||
resetFrom(); |
|||
}); |
|||
}); |
|||
|
|||
// 弹出认证弹窗 |
|||
function showAudit(id) { |
|||
$('#audit-modal').modal({ |
|||
show: true |
|||
}); |
|||
$('#hidden_id').val(id); |
|||
} |
|||
|
|||
function resetFrom() { |
|||
$('#result-pass').prop('checked', true); |
|||
$('#result-reject').prop('checked', false); |
|||
$('#reject-reason').hide(); |
|||
$('#reject-reason-input').val(''); |
|||
} |
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,142 @@ |
|||
{php include wl_template('common/header');} |
|||
<style> |
|||
.user-block .avatar{ |
|||
width: 50px; |
|||
height: 50px; |
|||
float: left; |
|||
margin-left: 25%; |
|||
} |
|||
.user-block .avatar img{ |
|||
width: 100%; |
|||
height: 100%; |
|||
border-radius: 50%; |
|||
} |
|||
.user-block .nickname{ |
|||
margin-left: 5px; |
|||
height: 50px; |
|||
line-height: 20px; |
|||
float: left; |
|||
} |
|||
.user-block .nickname label{ |
|||
font-size: 12px; |
|||
padding: 1px 5px; |
|||
} |
|||
textarea{ |
|||
width: 100%; |
|||
min-height: 50px; |
|||
font-size: 12px; |
|||
resize: none; |
|||
text-indent: 2em; |
|||
cursor: pointer; |
|||
line-height: 15px; |
|||
} |
|||
</style> |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="#">通信管理</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<!--顶部信息内容--> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="member" /> |
|||
<input type="hidden" name="ac" value="userIm" /> |
|||
<input type="hidden" name="do" value="index" /> |
|||
<input type="hidden" name="send_type" value="{$sendType}" /> |
|||
<input type="hidden" name="receive_type" value="{$receiveType}" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">发送方类型</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('send_type:1');}" class="btn {if $sendType == 1}btn-primary{else}btn-default{/if}">用户</a> |
|||
<a href="{php echo wl_filter_url('send_type:2');}" class="btn {if $sendType == 2}btn-primary{else}btn-default{/if}">商户</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">接收人类型</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('receive_type:1');}" class="btn {if $receiveType == 1}btn-primary{else}btn-default{/if}">用户</a> |
|||
<a href="{php echo wl_filter_url('receive_type:2');}" class="btn {if $receiveType == 2}btn-primary{else}btn-default{/if}">商户</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">筛选</label> |
|||
<div class="col-sm-9"> |
|||
<select name="search_type" class="form-control"> |
|||
<option value="1" {if $searchType == 1}selected{/if}>发送方昵称</option> |
|||
<option value="2" {if $searchType == 2}selected{/if}>接收方昵称</option> |
|||
<option value="3" {if $searchType == 3}selected{/if}>通信内容</option> |
|||
</select> |
|||
<input type="text" name="search" class="form-control" value="{$search}" placeholder="请输入关键字"/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary" type="submit">筛选</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<!--列表信息--> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-responsive"> |
|||
<thead> |
|||
<tr> |
|||
<th width="20%" class="text-center">发送方</th> |
|||
<th width="20%" class="text-center">接收方</th> |
|||
<th width="40%" class="text-center">最新消息</th> |
|||
<th width="20%" class="text-center">操作</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $list $vo} |
|||
<tr class="text-center"> |
|||
<td class="user-block"> |
|||
<div class="avatar"> |
|||
<img src="{$vo['send_logo']}" /> |
|||
</div> |
|||
<div class="nickname text-left"> |
|||
<div>{$vo['send_user']}</div> |
|||
<label class="label label-warning label-sm">{$vo['send_type_text']}</label> |
|||
</div> |
|||
</td> |
|||
<td class="user-block"> |
|||
<div class="avatar"> |
|||
<img src="{$vo['receive_logo']}" /> |
|||
</div> |
|||
<div class="nickname text-left"> |
|||
<div>{$vo['receive_user']}</div> |
|||
<label class="label label-warning label-sm">{$vo['receive_type_text']}</label> |
|||
</div> |
|||
</td> |
|||
<td class="text-left"> |
|||
<textarea disabled="disabled">{$vo['new_send_user']}:{$vo['content']}</textarea> |
|||
</td> |
|||
<td> |
|||
<a class="btn btn-warning btn-sm" data-toggle="ajaxModal" href="{php echo web_url('member/userIm/record',['id' => $vo['id']]);}">通信记录</a> |
|||
<a class="btn btn-info btn-sm" data-toggle='ajaxRemove' href="{php echo web_url('member/userIm/clearRecord',['id' => $vo['id']]);}" |
|||
data-confirm="确定要清空【{$vo['send_user']}】与【{$vo['receive_user']}】的所有通信记录吗?">清空</a> |
|||
<a class="btn btn-danger btn-sm" data-toggle='ajaxRemove' href="{php echo web_url('member/userIm/deleteOneInfo',['id' => $vo['id']]);}" |
|||
data-confirm="确定要删除当前信息吗?">删除</a> |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"></div> |
|||
<div class="pull-right">{$pager}</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,315 @@ |
|||
<style> |
|||
#im-content{ |
|||
height: 80vh; |
|||
margin-top: calc(10vh - 30px); |
|||
} |
|||
#im{ |
|||
width: 500px; |
|||
height: 100%; |
|||
background: #f8f8f8; |
|||
margin: auto; |
|||
border-radius: 30px; |
|||
overflow: hidden; |
|||
position: relative; |
|||
} |
|||
#im #list{ |
|||
width: 100%; |
|||
height: 100%; |
|||
overflow-y: auto; |
|||
padding: 20px 10px; |
|||
} |
|||
#im .block{ |
|||
width: 100%; |
|||
padding: 5px 0px; |
|||
display: inline-block; |
|||
} |
|||
#im .block .avatar{ |
|||
width: 80px; |
|||
height: 80px; |
|||
display: inline-block; |
|||
padding: 5px; |
|||
position: relative; |
|||
} |
|||
#im .block .avatar img{ |
|||
width: 100%; |
|||
height: 100%; |
|||
border-radius: 50%; |
|||
} |
|||
#im .block .content{ |
|||
max-width: calc(100% - 160px); |
|||
margin-top: 10px; |
|||
} |
|||
#im .block .content .time{ |
|||
font-size: 12px; |
|||
} |
|||
#im .block .content .info{ |
|||
padding: 5px 10px; |
|||
font-size: 13px; |
|||
width: 100%; |
|||
word-wrap: break-word; |
|||
word-break: break-all; |
|||
text-align: left; |
|||
} |
|||
#im .block .content .contentImg{ |
|||
max-width: 80%; |
|||
max-height: 200px; |
|||
} |
|||
#im .block .content .contentVideo{ |
|||
max-height: 300px!important; |
|||
max-width: 80%!important; |
|||
} |
|||
/*名片样式*/ |
|||
#im .block .content .contentCard{ |
|||
width: 300px; |
|||
height: 125px; |
|||
background-color: #FFF; |
|||
border-radius: 10px; |
|||
padding: 15px; |
|||
} |
|||
#im .block .content .contentCard .avatar{ |
|||
width: 60px; |
|||
height: 60px; |
|||
} |
|||
#im .block .content .contentCard .baseInfo{ |
|||
width: calc(100% - 60px); |
|||
} |
|||
#im .block .content .contentCard .baseInfo .baseInfoTop{ |
|||
height: 40px; |
|||
line-height: 40px; |
|||
} |
|||
#im .block .content .contentCard .baseInfo .baseInfoTop .cardName{ |
|||
max-width: 50%; |
|||
font-size: 17px; |
|||
font-weight: 600; |
|||
border-bottom: 1px solid #000; |
|||
padding: 0 10px; |
|||
height: 100%; |
|||
} |
|||
#im .block .content .contentCard .baseInfo .baseInfoTop .positionName{ |
|||
max-width: 45%; |
|||
color: #CCC; |
|||
font-size: 13px; |
|||
line-height: 43px; |
|||
height: 100%; |
|||
} |
|||
#im .block .content .contentCard .baseInfo .baseInfoBottom{ |
|||
height: 35px; |
|||
line-height: 35px; |
|||
width: 100%; |
|||
font-size: 13px; |
|||
} |
|||
#im .block .content .contentCard .cardLabel{ |
|||
height: 20px; |
|||
line-height: 20px; |
|||
font-size: 12px; |
|||
color: #CCC; |
|||
width: 100%; |
|||
border-top: 1px solid #EFEFEF; |
|||
} |
|||
/*简历样式*/ |
|||
#im .block .content .contentResume{ |
|||
width: 300px; |
|||
height: 125px; |
|||
background-color: #FFF; |
|||
border-radius: 10px; |
|||
padding: 15px; |
|||
} |
|||
#im .block .content .contentResume .avatar{ |
|||
width: 60px; |
|||
height: 60px; |
|||
} |
|||
#im .block .content .contentResume .baseInfo{ |
|||
width: calc(100% - 60px); |
|||
float: left; |
|||
} |
|||
#im .block .content .contentResume .baseInfo .nickname{ |
|||
font-size: 17px; |
|||
font-weight: 600; |
|||
height: 30px; |
|||
line-height: 30px; |
|||
} |
|||
#im .block .content .contentResume .baseInfo .desc{ |
|||
font-size: 14px; |
|||
height: 25px; |
|||
line-height: 25px; |
|||
color: #BBB; |
|||
} |
|||
#im .block .content .contentResume .baseInfo .labelList{ |
|||
height: 30px; |
|||
line-height: 30px; |
|||
width: 100%; |
|||
overflow: hidden; |
|||
} |
|||
#im .block .content .contentResume .baseInfo .labelList .labelItem{ |
|||
background-color: #f1f1f1; |
|||
display: inline-block; |
|||
padding: 0px 5px; |
|||
font-size: 12px; |
|||
height: 20px; |
|||
line-height: 20px; |
|||
border-radius: 3px; |
|||
margin: 0 3px; |
|||
} |
|||
#im .block .content .contentResume .cardLabel{ |
|||
height: 20px; |
|||
line-height: 20px; |
|||
font-size: 12px; |
|||
color: #CCC; |
|||
float: left; |
|||
width: 100%; |
|||
border-top: 1px solid #EFEFEF; |
|||
} |
|||
/*通讯方向*/ |
|||
#im .fl .avatar{ |
|||
float: left; |
|||
} |
|||
#im .fl .content{ |
|||
float: left; |
|||
padding-right: 10px; |
|||
margin-left: 10px; |
|||
text-align: left; |
|||
} |
|||
#im .fl .content .info{ |
|||
background-color: #f8ac59; |
|||
position: relative; |
|||
border-radius: 0px 15px 0px 15px; |
|||
} |
|||
#im .fr .avatar{ |
|||
float: right; |
|||
} |
|||
#im .fr .content{ |
|||
float: right; |
|||
padding-left: 10px; |
|||
margin-right: 10px; |
|||
text-align: right; |
|||
} |
|||
#im .fr .content .info{ |
|||
background-color: #f44; |
|||
position: relative; |
|||
border-radius: 15px 0px 15px 0px; |
|||
color: #FFF; |
|||
} |
|||
#im .floatLeft{ |
|||
float: left; |
|||
} |
|||
#im .floatRight{ |
|||
float: right; |
|||
} |
|||
#closeButton{ |
|||
position: absolute; |
|||
top: 15px; |
|||
right: 30px; |
|||
z-index: 999; |
|||
opacity: 0.8; |
|||
} |
|||
</style> |
|||
<div class="app-content" id="im-content"> |
|||
<div id="im"> |
|||
<div id="list" ref="Box" @scroll="orderScroll"> |
|||
<!-- 列表信息 --> |
|||
<div v-for="(item,index) in list" :class="{fl:(item.is_my == 0),fr:(item.is_my == 1),'block':true}"> |
|||
<div class="avatar"> |
|||
<img :src="item.avatar" /> |
|||
</div> |
|||
<div class="content"> |
|||
<div class="time">{{ item.date_time }}</div> |
|||
<!--内容类型:0=文本内容(可带表情),1=图片信息(不可带表情),2=视频信息(不可带表情),3=名片信息(不可带表情),4=简历信息(不可带表情),5=其他信息(数组)--> |
|||
<!--文本内容--> |
|||
<div class="info" v-if="item.type == 0" v-html="item.content">{{item.content}}</div> |
|||
<!--图片--> |
|||
<img v-if="item.type == 1" :src="item.content" class="contentImg" /> |
|||
<!--视频--> |
|||
<video v-if="item.type == 2" :src="item.content" controls="controls" class="contentVideo">您的浏览器不支持 video 标签。</video> |
|||
<!--名片--> |
|||
<div v-if="item.type == 3" class="contentCard"> |
|||
<div class="avatar"> |
|||
<img :src="item.other.logo" /> |
|||
</div> |
|||
<div :class="{floatLeft:(item.is_my == 0),floatRight:(item.is_my == 1),'baseInfo':true}"> |
|||
<div class="baseInfoTop"> |
|||
<div :class="{floatLeft:(item.is_my == 0),floatRight:(item.is_my == 1),'cardName':true}">{{ item.other.name }}</div> |
|||
<div :class="{floatLeft:(item.is_my == 0),floatRight:(item.is_my == 1),'positionName':true}">{{ item.other.position }}</div> |
|||
</div> |
|||
<div :class="{floatLeft:(item.is_my == 0),floatRight:(item.is_my == 1),'baseInfoBottom':true}">{{ item.other.company }} | {{ item.other.branch }}</div> |
|||
</div> |
|||
<div :class="{floatLeft:(item.is_my == 0),floatRight:(item.is_my == 1),'cardLabel':true}">个人名片</div> |
|||
</div> |
|||
<!--简历--> |
|||
<div v-if="item.type == 4" class="contentResume"> |
|||
<div class="avatar"> |
|||
<img :src="item.other.avatar" /> |
|||
</div> |
|||
<div class="baseInfo"> |
|||
<div class="nickname">{{item.other.name}}**</div> |
|||
<div class="desc">{{item.other.age}}岁 · {{item.other.experience}} · {{item.other.education}}</div> |
|||
<div class="labelList"> |
|||
<span class="labelItem" v-for="(val,key) in item.other.expect_position_list">{{val}}</span> |
|||
</div> |
|||
</div> |
|||
<div class="cardLabel">个人简历</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- 按钮信息 --> |
|||
<button data-dismiss="modal" class="btn btn-danger btn-sm" type="button" id="closeButton">取消</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
new Vue({ |
|||
el:"#im", |
|||
data:{ |
|||
id:"{$id}", |
|||
page:"{$page}", |
|||
total: 0, |
|||
scrollBottom: 0, |
|||
list: [], |
|||
}, |
|||
methods:{ |
|||
//获取列表信息 |
|||
getRecordList() { |
|||
let link = biz.url('member/userIm/record'), |
|||
_this = this, |
|||
_page = _this.page; |
|||
$.post(link, {page: _page, id: _this.id}, function (res) { |
|||
let data = res.data; |
|||
_this.total = data.total; |
|||
_this.list = [...data.list,..._this.list]; |
|||
_this.$forceUpdate(); |
|||
//根据分页内容 对滚动条进行操作 |
|||
setTimeout(()=>{ |
|||
_this.positionScroll(); |
|||
},0) |
|||
},'json'); |
|||
}, |
|||
//监听滚动条 进行分页操作 |
|||
orderScroll(){ |
|||
let box = this.$refs.Box, |
|||
scrollTop = box.scrollTop; |
|||
this.scrollBottom = box.scrollHeight - box.scrollTop - box.clientHeight; |
|||
if(this.page < this.total && scrollTop <= 0){ |
|||
this.page++; |
|||
this.getRecordList(); |
|||
} |
|||
}, |
|||
//定位滚动条 进行滚动条操作 |
|||
positionScroll(){ |
|||
if(this.page <= 1){ |
|||
//进入页面 滚动条自动到达底部 |
|||
$("#list").scrollTop(9999); |
|||
}else{ |
|||
//分页后 固定滚动条位置 |
|||
let box = this.$refs.Box, |
|||
height = box.scrollHeight - box.clientHeight; |
|||
$("#list").scrollTop((height - this.scrollBottom)); |
|||
} |
|||
}, |
|||
}, |
|||
mounted() { |
|||
//初始化列表 |
|||
this.getRecordList(); |
|||
// 监听滚动事件,然后用handleScroll这个方法进行相应的处理 |
|||
document.addEventListener('scroll',this.orderScroll) |
|||
}, |
|||
}); |
|||
</script> |
|||
@ -0,0 +1,147 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs" id="myTab"> |
|||
<li class="active"><a href="#tab_basic">通信设置</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-form"> |
|||
<form action="" method="post" class="form-horizontal form form-validate"> |
|||
<div class="panel panel-default"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">通信方式</label> |
|||
<div class="col-sm-9"> |
|||
<label class="radio-inline"> |
|||
<input type="radio" name="data[type]" onclick="$('#imParams').addClass('hide')" value="0" {if $set['type'] != 1} checked {/if}> 普通通信 |
|||
</label> |
|||
<label class="radio-inline"> |
|||
<input type="radio" name="data[type]" onclick="$('#imParams').removeClass('hide')" value="1" {if $set['type'] == 1} checked {/if}> 多功能通信 |
|||
</label> |
|||
<div class="help-block"> |
|||
普通通信:即旧的通讯方式,仅支持发送文本信息。<br /> |
|||
多功能通信:新的通讯方式支持文本、表情、图片、视频等等。但是配置复杂,需要修改服务器配置。多功能通信必须配置ssl证书! |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- 多功能通知基本设置内容 --> |
|||
<div id="imParams" class="{if $set['type'] != 1}hide{/if}"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">请求端口</label> |
|||
<div class="col-sm-9"> |
|||
<input type="number" name="data[port]" class="form-control" value="{$set['port']}"> |
|||
<span class="help-block">请求时使用的端口。需要在服务器放行</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">公钥文件路径(.pem文件)</label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="data[pem_path]" class="form-control" value="{$set['pem_path']}"> |
|||
<div class="help-block">公钥在服务器的绝对路径,例如:/www/server/data/ssl/pem.pem</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">私钥文件路径(.key文件)</label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="data[key_path]" class="form-control" value="{$set['key_path']}"> |
|||
<div class="help-block">私钥在服务器的绝对路径,例如:/www/server/data/ssl/pem.key</div> |
|||
</div> |
|||
</div> |
|||
{if $set['port'] && $set['key_path'] && $set['pem_path']} |
|||
<div class="form-group" id="testSocket"> |
|||
<label class="col-sm-2 control-label">通信测试</label> |
|||
<div class="col-sm-9"> |
|||
<input v-if="status != 1 && status != 2" type="button" @click="startLink()" value="链接测试" class="btn btn-info min-width" /> |
|||
<div class="help-block" style="display: inline-block;color: #f16060;font-weight: bolder;"> |
|||
<!-- 状态:0=未链接,1=链接中,2=通讯中,3=断开链接,可重连 --> |
|||
<span v-if="status == 0">未链接...</span> |
|||
<span v-if="status == 1">正在请求,链接中...</span> |
|||
<span v-if="status == 2">请求成功,通讯中...</span> |
|||
<span v-if="status == 3">断开链接...</span> |
|||
<span v-if="status == 4">链接失败,通讯不可用...</span> |
|||
<span v-if="status == 5">链接失败,当前浏览器不支持WebSocket通讯...</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<input type="submit" name="submit" value="提交" class="btn btn-primary min-width" /> |
|||
<input type="hidden" name="token" value="{$_W['token']}" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
let port = "{$set['port']}"; |
|||
//判断是否支持websocket |
|||
new Vue({ |
|||
el:"#testSocket", |
|||
data:{ |
|||
wsUrl: '', |
|||
status: 0,//状态 0=未链接,1=链接中,2=通讯中,3=断开链接,可重连,4=链接失败,通讯不可用,5=不支持WebSocket |
|||
linkTimes: 0,//当前重连次数 |
|||
max: 3,//最大重连次数 |
|||
}, |
|||
watch: { |
|||
'status'(){ |
|||
//根据状态进行对应的操作 |
|||
if(this.status == 0 && this.max > this.linkTimes){ |
|||
this.linkTimes++; |
|||
this.startLink(); |
|||
} |
|||
}, |
|||
}, |
|||
methods:{ |
|||
//开始链接 |
|||
startLink(){ |
|||
//判断是否支持webSocket |
|||
if(!'WebSocket' in window) { |
|||
_this.status = 5; |
|||
return false; |
|||
} |
|||
//开始通信操作 |
|||
let _this = this; |
|||
_this.status = 1; |
|||
_this.ws = new WebSocket(_this.wsUrl); |
|||
//链接成功 |
|||
_this.ws.onopen = function (){ |
|||
_this.status = 2; |
|||
console.log("通讯成功"); |
|||
} |
|||
//获取返回的数据信息 |
|||
_this.ws.onmessage = function(event){ |
|||
//信息拼接 |
|||
console.log(event); |
|||
} |
|||
//链接已关闭 |
|||
_this.ws.onclose = function(event){ |
|||
console.log(event); |
|||
//再次请求 |
|||
if(_this.max > _this.linkTimes){ |
|||
if(_this.status == 1) { |
|||
_this.status = 0;//链接中断开 请求运行PHP文件 |
|||
} else { |
|||
_this.status = 3; //通讯中断开 断开链接,可以从新链接 |
|||
} |
|||
}else{ |
|||
//重连超出 链接失败 通讯不可用 |
|||
_this.status = 4; |
|||
} |
|||
} |
|||
//错误抛出 |
|||
_this.ws.error = function (e){ |
|||
console.log('链接报错'); |
|||
console.log(e); |
|||
} |
|||
}, |
|||
}, |
|||
mounted() { |
|||
//获取请求地址 |
|||
let domain = document.domain; |
|||
this.wsUrl = 'wss://'+domain+':'+port; |
|||
} |
|||
}); |
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,95 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs" id="myTab"> |
|||
<li><a href="javascript:;">积分明细</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="member" /> |
|||
<input type="hidden" name="ac" value="memberFinancialDetails" /> |
|||
<input type="hidden" name="do" value="integral" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">变更类型</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('type:0');}" class="btn {if intval($_GPC['type']) == 0}btn-primary{else}btn-default{/if}">不限</a> |
|||
<a href="{php echo wl_filter_url('type:1');}" class="btn {if $_GPC['type'] == 1}btn-primary{else}btn-default{/if}">增加</a> |
|||
<a href="{php echo wl_filter_url('type:2');}" class="btn {if $_GPC['type'] == 2}btn-primary{else}btn-default{/if}">减少</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">时间</label> |
|||
<div class="col-sm-9"> |
|||
{php echo tpl_select_time_info('time_limit', array('starttime' => date('Y-m-d',$starttime), 'endtime' => date('Y-m-d', $endtime)));} |
|||
</div> |
|||
</div> |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">记录搜索</label> |
|||
<div class="col-sm-9"> |
|||
<select name="keywordtype" class="form-control"> |
|||
<option value="1" {if $_GPC['keywordtype']==1}selected="selected"{/if}>用户ID</option> |
|||
<option value="2" {if $_GPC['keywordtype']==2}selected="selected"{/if}>用户昵称</option> |
|||
<option value="3" {if $_GPC['keywordtype']==3}selected="selected"{/if}>用户手机</option> |
|||
</select> |
|||
<input type="text" name="keyword" class="form-control" value="{$_GPC['keyword']}" placeholder="请输入关键字"/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary" id="search">筛选</button> |
|||
<button class="btn btn-default min-width" name="export" type="submit" value="export"><i class="fa fa-download"></i> 导出记录</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th style="width:25%;">用户信息</th> |
|||
<th style="width:10%;">变更数值</th> |
|||
<th style="width:10%;">变更类型</th> |
|||
<th style="width:30%;">变更描述</th> |
|||
<th style="width:25%;">变更时间</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $details $de} |
|||
<tr> |
|||
<td><img src="{$de['avatar']}" style="width: 30px;height: 30px;"> {$de['nickname']}</td> |
|||
<td style="color: red;">{$de['num']}</td> |
|||
<td> |
|||
{if $de['num'] > 0} |
|||
<span class="label label-success">增加</span> |
|||
{else} |
|||
<span class="label label-danger">减少</span> |
|||
{/if} |
|||
</td> |
|||
<td>{$de['remark']}</td> |
|||
<td>{$de['createtime']}</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,158 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="javascript:;">标签列表</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-action"> |
|||
<span class="btn btn-primary" id="addCate"><i class="fa fa-plus"></i> 新建标签</span> |
|||
</div> |
|||
<div class="filter-list"> |
|||
<form action="./index.php" method="get"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="member" /> |
|||
<input type="hidden" name="ac" value="userlabel" /> |
|||
<input type="hidden" name="do" value="labellist" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">关键字</label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="keyword" class="form-control" value="{$_GPC['keyword']}" placeholder="请输入关键字"/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary">筛选</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover table-bordered"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th style="width: 50px;">ID</th> |
|||
<th style="width: 120px;">标签名称(点击编辑)</th> |
|||
<th style="width: 50px;">排序(点击编辑)</th> |
|||
<th style="width: 50px;">状态(点击编辑)</th> |
|||
<th style="width: 80px">操作</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $list $item} |
|||
<tr> |
|||
<td>{$item['id']}</td> |
|||
<td> |
|||
<a href='javascript:;' data-toggle='ajaxEdit' data-href="{php echo web_url('member/userlabel/changelabel',array('type'=>1,'id'=>$item['id']))}"> |
|||
{$item['name']} |
|||
</a> |
|||
</td> |
|||
<td> |
|||
<a href='javascript:;' data-toggle='ajaxEdit' data-href="{php echo web_url('member/userlabel/changelabel',array('type'=>2,'id'=>$item['id']))}"> |
|||
{$item['sort']} |
|||
</a> |
|||
</td> |
|||
<td> |
|||
<span class="change"> |
|||
<span style="float: left;" class='label {if $item['status']==1}label label-primary {else}label-default{/if}' |
|||
data-toggle='ajaxSwitch' |
|||
data-switch-value='{$item['status']}' |
|||
data-switch-value0='0|禁用|label label-default|{php echo web_url('member/userlabel/changelabel',array('type'=>3,'value'=>1,'id'=>$item['id']))}' |
|||
data-switch-value1='1|启用|label label-primary|{php echo web_url('member/userlabel/changelabel',array('type'=>3,'value'=>0,'id'=>$item['id']))}'> |
|||
{if $item['status']==1}启用{else}禁用{/if} |
|||
</span> |
|||
</span> |
|||
</td> |
|||
<td style="position: relative;"> |
|||
<a class="btn btn-sm btn-danger" data-toggle="ajaxRemove" href="{php echo web_url('member/userlabel/changelabel', array('type'=>4,'id'=>$item['id']))}" data-confirm="删除标签会删除所有对应的标签记录,确认删除此标签?">删除</a> |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="modal fade" id="addCateModal" aria-hidden="false"> |
|||
<div class="modal-dialog"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<button data-dismiss="modal" class="close" type="button">×</button> |
|||
<h4 class="modal-title">新建标签</h4> |
|||
</div> |
|||
<div class="modal-body form-horizontal"> |
|||
<div class="form-group"> |
|||
<div class="col-sm-2 control-label">标签名称</div> |
|||
<div class="col-sm-9"> |
|||
<input class="form-control" placeholder="请输入标签名称" id="saveTempName" value="" /> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<div class="col-sm-2 control-label">标签排序</div> |
|||
<div class="col-sm-9"> |
|||
<input class="form-control" type="tel" placeholder="请输入标签排序" id="saveSort" value="" /> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<div class="col-sm-2 control-label">标签状态</div> |
|||
<div class="col-sm-9"> |
|||
<label class="radio-inline"><input type="radio" value="1" name="saveStatus" checked="checked">启用</label> |
|||
<label class="radio-inline"><input type="radio" value="0" name="saveStatus">禁用</label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<div class="btn btn-primary" id="saveCate">保存</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script type="text/javascript"> |
|||
$("#addCate").unbind('click').click(function () { |
|||
$("#addCateModal").modal(); |
|||
$("#saveCate").unbind('click').click(function () { |
|||
var status = $(this).data('status'); |
|||
if(status) { |
|||
tip.msgbox.err("正在保存,请稍候。"); |
|||
return; |
|||
} |
|||
var name = $.trim($("#saveTempName").val()); |
|||
if(!name) { |
|||
tip.msgbox.err("请填写标签名称!"); |
|||
$("#saveTempName").focus(); |
|||
return; |
|||
} |
|||
var sort = $.trim($("#saveSort").val()); |
|||
var status = $('input[name="saveStatus"]:checked').val(); |
|||
$(this).data('status',1).text('保存中'); |
|||
$.post("{php echo web_url('member/userlabel/add')}", { |
|||
name: name, |
|||
sort: sort, |
|||
status: status |
|||
}, function (ret) { |
|||
if(ret.status==0){ |
|||
tip.msgbox.err(ret.result.message); |
|||
}else{ |
|||
tip.msgbox.suc("保存成功!"); |
|||
} |
|||
$("#addCateModal .close").trigger('click'); |
|||
setTimeout(function () { |
|||
location.reload(); |
|||
}, 500); |
|||
}, 'json'); |
|||
}); |
|||
}); |
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,162 @@ |
|||
{php include wl_template('common/header');} |
|||
<style> |
|||
.form-group{margin-bottom: 10px!important;} |
|||
</style> |
|||
<ul class="nav nav-tabs"> |
|||
<li ><a href="{php echo web_url('member/wlMember/memberIndex')}">客户列表</a></li> |
|||
<li class="active"><a href="{php echo web_url('member/wlMember/memberDetail',array('id'=>intval($_GPC['id'])))}">客户详情</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-form"> |
|||
<form action="" method="post" class="form-horizontal form form-validate" enctype="multipart/form-data"> |
|||
<div class="row"> |
|||
<div class="col-md-6"> |
|||
<div class="form-group-title">用户信息</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">粉丝</label> |
|||
<div class="col-sm-9"> |
|||
<img class="radius50" src="{$member['avatar']}" style='width:50px;height:50px;padding:1px;border:1px solid #ccc' onerror="this.src='{IMAGE_NOPIC_SMALL}'"/> |
|||
{if strexists($member['openid'],'sns_wa')}<i class="icow icow-xiaochengxu" style="color: #7586db;vertical-align: middle;" data-toggle="tooltip" data-placement="bottom" data-original-title="来源: 小程序"></i>{/if} |
|||
{if strexists($member['openid'],'sns_qq')||strexists($member['openid'],'sns_wx')||strexists($member['openid'],'wap_user')}<i class="icow icow-app" style="color: #44abf7;vertical-align: middle;" data-toggle="tooltip" data-placement="bottom" data-original-title="来源: 全网通({if strexists($member['openid'],'wap_user')}手机号注册{else}APP{/if})"></i>{/if} |
|||
{$member['nickname']} |
|||
</div> |
|||
</div> |
|||
{if !empty($member['openid'])} |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">公众号OPENID</label> |
|||
<div class="col-sm-9"> |
|||
<div class="form-control-static js-clip text-primary" data-url="{$member['openid']}">{$member['openid']}</div> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if !empty($member['wechat_openid'])} |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">小程序OPENID</label> |
|||
<div class="col-sm-9"> |
|||
<div class="form-control-static js-clip text-primary" data-url="{$member['wechat_openid']}">{$member['wechat_openid']}</div> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
{if !empty($member['unionid'])} |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">统一用户ID</label> |
|||
<div class="col-sm-9"> |
|||
<div class="form-control-static js-clip text-primary" data-url="{$member['unionid']}">{$member['unionid']}</div> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">积分</label> |
|||
<div class="col-sm-3"> |
|||
<div class='form-control-static'>{$member['credit1']} |
|||
<a data-toggle='ajaxModal' href="{php echo web_url('member/wlMember/memberRecharge', array('type'=>'credit1','id'=>$member['id']))}" style="padding-left: 5px;">充值</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">余额</label> |
|||
<div class="col-sm-3"> |
|||
<div class='form-control-static'>{$member['credit2']} |
|||
<a data-toggle='ajaxModal' href="{php echo web_url('member/wlMember/memberRecharge', array('type'=>'credit2','id'=>$member['id']))}" style="padding-left: 5px;">充值</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">注册时间</label> |
|||
<div class="col-sm-9"> |
|||
<div class='form-control-static'>{php echo date("Y-m-d H:i:s",$member['createtime'])}</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">关注状态</label> |
|||
<div class="col-sm-9"> |
|||
<div class='form-control-static'> |
|||
{if empty($member['follow'])} |
|||
{if empty($member['unfollowtime'])} |
|||
<label class='label label-default'>未关注</label> |
|||
{else} |
|||
<label class='label label-warning'>取消关注</label> |
|||
{/if} |
|||
{else} |
|||
<label class='label label-success'>已关注</label> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{if p('distribution')} |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">推荐人</label> |
|||
<div class="col-sm-6"> |
|||
<div class='form-control-static'> |
|||
{$member['leadname']} |
|||
<a href="{php echo web_url('distribution/dissysbase/changeleadid',array('id'=>$member['id']))}" onclick="setTimeout(de,1500);" data-toggle="ajaxModal"> - 修改</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
</div> |
|||
<div class="col-md-6"> |
|||
<div class="form-group-title">用户绑定</div> |
|||
<div class="alert alert-warning">以下信息修改后会可能导致用户无法登录WAP端,如需更改请告知该用户!</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">真实姓名</label> |
|||
<div class="col-sm-9"> |
|||
{php echo tpl_form_field_editor(array('name'=>'data[realname]', 'value'=>$member['realname']))} |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">手机号码</label> |
|||
<div class="col-sm-9"> |
|||
|
|||
{if empty($member['mobile'])} |
|||
{php echo tpl_form_field_editor(array('name'=>'data[mobile]', 'value'=>$member['mobile']))} |
|||
{else} |
|||
<input type="text" name="data[mobile]" class="form-control" value="{$member['mobile']}" /> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">用户密码</label> |
|||
<div class="col-sm-9"> |
|||
{php echo tpl_form_field_editor(array('name'=>'data[password]', 'value'=>''))} |
|||
<div class="form-control-static">密码留空则不修改</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<input type="submit" value="提交" class="btn btn-primary min-width" /> |
|||
<input type="hidden" name="token" value="{$_W['token']}" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
function de(){ |
|||
myrequire(['select2'], function() { |
|||
console.log('111'); |
|||
$('.chosen-select').select2({ |
|||
ajax: { |
|||
url: "{php echo web_url('distribution/dissysbase/getuser')}", |
|||
dataType: 'json', |
|||
data: function (params) { |
|||
var query = { //请求的参数, 关键字和搜索条件之类的 |
|||
search: params.term //select搜索框里面的value |
|||
} |
|||
// Query paramters will be ?search=[term]&page=[page] |
|||
return query; |
|||
}, |
|||
processResults: function (data) { |
|||
return { |
|||
results: data //必须赋值给results并且必须返回一个obj |
|||
}; |
|||
} |
|||
} |
|||
}); |
|||
}); |
|||
} |
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,275 @@ |
|||
{php include wl_template('common/header');} |
|||
<style> |
|||
.nickname{display: inline-block;max-width:200px;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;vertical-align: middle;} |
|||
.none-bottom{display: none;} |
|||
</style> |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="#">客户列表</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="member" /> |
|||
<input type="hidden" name="ac" value="wlMember" /> |
|||
<input type="hidden" name="do" value="memberIndex" /> |
|||
<input type="hidden" name="vipstatus" value="{$_GPC['vipstatus']}" /> |
|||
<input type="hidden" name="blackflag" value="{$_GPC['blackflag']}" /> |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">会员筛选</label> |
|||
<div class="col-sm-9"> |
|||
<select name="type" class="form-control"> |
|||
<option value="5" {if $_GPC['type'] == 5}selected{/if}>MID</option> |
|||
<option value="2" {if $_GPC['type'] == 2}selected{/if}>手机号</option> |
|||
<option value="3" {if $_GPC['type'] == 3}selected{/if}>真实姓名</option> |
|||
<option value="4" {if $_GPC['type'] == 4}selected{/if}>昵称</option> |
|||
</select> |
|||
<input type="text" name="keyword" class="form-control" value="{$_GPC['keyword']}" placeholder="请输入关键字"/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">会员状态</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('blackflag:0');}" class="btn {if intval($_GPC['blackflag']) == 0}btn-primary{else}btn-default{/if}">不限</a> |
|||
<a href="{php echo wl_filter_url('blackflag:2');}" class="btn {if $_GPC['blackflag'] == 2}btn-primary{else}btn-default{/if}">正常</a> |
|||
<a href="{php echo wl_filter_url('blackflag:1');}" class="btn {if $_GPC['blackflag'] == 1}btn-primary{else}btn-default{/if}">黑名单</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">用户身份</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('identity_id:0');}" class="btn {if intval($_GPC['identity_id']) == 0}btn-primary{else}btn-default{/if}">不限</a> |
|||
{loop $identityList $identityValue} |
|||
<a href="{php echo wl_filter_url('identity_id:'.$identityValue['id']);}" class="btn {if intval($_GPC['identity_id']) == $identityValue['id']}btn-primary{else}btn-default{/if}">{$identityValue['name']}</a> |
|||
{/loop} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">注册时间</label> |
|||
<div class="col-md-2"> |
|||
<select name="timetype" class="form-control"> |
|||
<option value="0" {if $_GPC['timetype']!=1}selected="selected"{/if}>关闭</option> |
|||
<option value="1" {if $_GPC['timetype']==1}selected="selected"{/if}>开启</option> |
|||
</select> |
|||
</div> |
|||
<div class="col-md-2"> |
|||
{php echo tpl_select_time_info('time_limit', array('starttime' => date('Y-m-d H:i',$starttime), 'endtime' => date('Y-m-d H:i', $endtime)));} |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary" type="submit">筛选</button> |
|||
<button class="btn btn-default min-width" name="export" type="submit" value="export"><i class="fa fa-download"></i>导出用户</button> |
|||
<a class="btn btn-default" data-toggle="ajaxModal" href="{php echo web_url('member/wlMember/memberImport')}">导入系统粉丝</a> |
|||
<a class="btn btn-default" data-toggle="ajaxModal" href="{php echo web_url('member/wlMember/membersync')}">同步用户信息</a> |
|||
<a class="btn btn-default" data-toggle="ajaxModal" href="{php echo web_url('member/wlMember/membermerge')}">合并重复用户</a> |
|||
{if Customized::init('transfergift') > 0} |
|||
<button style="background-color: #586061;border-color: #586061;" class="btn btn-warning min-width" onclick="$('#excelUpload').click();return false;"><i class="fa fa-upload"></i> 转赠导入</button> |
|||
<input type="file" id="excelUpload" class="hide"/> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-responsive"> |
|||
<thead> |
|||
<tr> |
|||
<th style="width: 20%;">用户</th> |
|||
<th style="width: 10%;">手机号</th> |
|||
<th style="width: 10%;">积分/余额</th> |
|||
<th style="width: 10%;">注册时间</th> |
|||
<!--<th style="">客户来源</th>--> |
|||
<th style="width: 10%;">成交</th> |
|||
<th style="width: 10%;">身份</th> |
|||
<th style="width: 30%;text-align: right;">操作</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $list $row} |
|||
<tr> |
|||
<td style="overflow: visible"> |
|||
<div rel="pop" style="display: flex" data-content=" <span>ID: </span>{$row['id']} </br> <span>真实姓名:</span> {if empty($row['realname'])}未填写{else}{$row['realname']}{/if}<br/> |
|||
<span>手机号:</span>{if !empty($row['mobile'])}{$row['mobile']}{else}未绑定{/if} <br/> |
|||
<span>开户行:</span>{if !empty($row['bank_name'])}{$row['bank_name']}{else}未填写{/if} <br/> |
|||
<span>银行卡账号:</span>{if !empty($row['card_number'])}{$row['card_number']}{else}未填写{/if} <br/> |
|||
<span>支付宝账号:</span>{if !empty($row['alipay'])}{$row['alipay']}{else}未填写{/if} <br/> |
|||
<span>推荐人:</span>{if !empty($row['distributorid'])}{$row['tjname']}(MID:{$row['tjmid']}){else}暂无{/if} <br/> |
|||
<span>是否关注:</span> |
|||
{if empty($row['follow'])} |
|||
{if empty($row['unfollowtime'])} |
|||
<i>未关注</i> |
|||
{else} |
|||
<i>取消关注</i> |
|||
{/if} |
|||
{else} |
|||
<i>已关注</i> |
|||
{/if}<br/> |
|||
<span>状态:</span>{if $row['blackflag']==1}黑名单{else}正常{/if}"> |
|||
|
|||
<img class="img-40" src="{php echo tomedia($row['avatar'])}" style='border-radius:50%;border:1px solid #efefef;' onerror="this.src='{IMAGE_NOPIC_SMALL}'" height="40" width="40" /> |
|||
<span style="display: flex;flex-direction: column;justify-content: center;align-items: flex-start;padding-left: 5px"> |
|||
<span class="nickname"> |
|||
{if empty($row['nickname'])}未授权{else}{php echo base64_decode($row['encodename']);}{/if} |
|||
</span> |
|||
<div style="display: flex;"> |
|||
{if !empty($row['openid'])} |
|||
<svg class="icon" style="display: flex;width: 1em; height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1544"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#1BB723" p-id="1545"></path><path d="M831.890286 585.603657c0-90.528914-90.594743-164.322743-192.336457-164.322743-107.739429 0-192.599771 73.793829-192.599772 164.322743 0 90.682514 84.860343 164.322743 192.599772 164.322743 22.542629 0 45.282743-5.6832 67.935085-11.359086l62.112915 34.004115-17.020343-56.590629c45.443657-34.091886 79.3088-79.316114 79.3088-130.377143z m-254.785829-28.335543c-11.278629 0-22.652343-11.227429-22.652343-22.674285 0-11.278629 11.373714-22.637714 22.652343-22.637715 17.122743 0 28.350171 11.359086 28.350172 22.637715 0 11.446857-11.227429 22.674286-28.350172 22.674285z m124.5696 0c-11.2128 0-22.498743-11.227429-22.498743-22.674285 0-11.278629 11.285943-22.637714 22.498743-22.637715 16.954514 0 28.328229 11.359086 28.328229 22.637715 0 11.446857-11.373714 22.674286-28.328229 22.674285z" fill="#FFFFFF" p-id="1546"></path><path d="M418.552686 251.428571c-124.481829 0-226.442971 84.845714-226.442972 192.577829 0 62.193371 33.923657 113.261714 90.609372 152.861257l-22.652343 68.117943 79.162514-39.701943c28.328229 5.610057 51.0464 11.373714 79.316114 11.373714 7.109486 0 14.153143-0.3584 21.138286-0.899657-4.425143-15.125943-6.992457-30.990629-6.992457-47.440457 0-98.933029 84.955429-179.214629 192.519314-179.214628 7.336229 0 14.606629 0.548571 21.803886 1.338514-19.587657-91.223771-117.116343-159.012571-228.461714-159.012572zM344.992914 404.319086c-16.969143 0-34.0992-11.373714-34.0992-28.342857 0-17.042286 17.130057-28.2624 34.0992-28.2624s28.2624 11.220114 28.2624 28.2624c0 16.969143-11.293257 28.342857-28.2624 28.342857z m158.471315 0c-16.976457 0-34.004114-11.373714-34.004115-28.342857 0-17.042286 17.027657-28.2624 34.004115-28.2624 17.0496 0 28.342857 11.220114 28.342857 28.2624 0.007314 16.969143-11.293257 28.342857-28.342857 28.342857z" fill="#FFFFFF" p-id="1547"></path></svg> |
|||
{/if} |
|||
{if !empty($row['wechat_openid'])} |
|||
<svg class="icon" style="display: flex;width: 1em; height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;color: #605ab0;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2253"><path d="M512 1024C229.248 1024 0 794.752 0 512S229.248 0 512 0s512 229.248 512 512-229.248 512-512 512z m-151.338667-213.333333a189.44 189.44 0 0 0 133.376-53.973334 185.045333 185.045333 0 0 0 56.362667-124.586666h0.256V357.632c0-61.226667 50.517333-110.933333 112.682667-110.933333s112.64 49.706667 112.64 110.933333-50.474667 110.933333-112.64 110.933333a38.485333 38.485333 0 0 0-38.741334 38.144c0 21.077333 17.493333 38.144 38.741334 38.144 104.746667 0 189.994667-83.968 189.994666-187.093333S768.085333 170.666667 663.338667 170.666667a190.464 190.464 0 0 0-133.589334 54.229333 184.832 184.832 0 0 0-56.149333 125.013333h-0.256v273.792c0 61.226667-50.517333 110.933333-112.682667 110.933334s-112.64-49.706667-112.64-110.933334 50.474667-110.933333 112.64-110.933333a38.4 38.4 0 0 0 38.741334-38.144 38.485333 38.485333 0 0 0-38.741334-38.144C255.914667 436.48 170.666667 520.448 170.666667 623.573333S255.914667 810.666667 360.661333 810.666667z" p-id="2254"></path></svg> |
|||
{/if} |
|||
</div> |
|||
</span> |
|||
</div> |
|||
</td> |
|||
<td> |
|||
{if !empty($row['mobile'])}{$row['mobile']}{else}--{/if} |
|||
</td> |
|||
<td><span class="label label-info">积分 {php echo $row['credit1']}</span> |
|||
<br/><span class="label label-warning" style="display: inline-block;margin-top: 5px;">余额 {php echo $row['credit2']}</span> |
|||
</td> |
|||
<td>{php echo date("Y-m-d",$row['createtime'])}<br/>{php echo date("H:i:s",$row['createtime'])}</td> |
|||
<!--<td>{if empty($row['levelname'])}普通会员{else}{$row['levelname']}{/if}</td>--> |
|||
<td><span>订单:<span class="text-info">{$row['dealnum']}</span></span> |
|||
<br/><span> 金额:<span class="text-warning">{php echo floatval($row['dealmoney'])}</span></span> |
|||
</td> |
|||
<td><span id="identity{php echo $row['id'];}">{$row['identity']}</span></td> |
|||
<td style="overflow:visible;text-align: right;"> |
|||
{if $row['is_show_identity']} |
|||
<a class="btn btn-link btn-sm {php echo $row['is_show_identity'] ?: 'none-bottom'}" onclick="changeIdentity(this,{php echo $row['id'];})" href="#">{php echo $row['bottom'];}</a> |
|||
{/if} |
|||
{if $row['identity_id'] == 7} |
|||
<a class="btn btn-info btn-sm" data-toggle="ajaxModal" href="{php echo web_url('member/wlMember/memberRights', array('id'=>$row['id']))}">权限</a> |
|||
{/if} |
|||
{if $row['is_show_identity']} |
|||
<a class="btn btn-danger btn-sm" data-toggle='ajaxRemove' href="{php echo web_url('member/wlMember/changeUserIdentity',array('id' => $row['id']));}" data-confirm="确定要修改身份为达人吗?修改后无法变回当前身份">成为达人</a> |
|||
{/if} |
|||
{if Customized::init('transfergift') > 0} |
|||
<a class="btn btn-primary btn-sm" style="background-color: #586061;border-color: #586061;" href="{php echo web_url('member/wlMember/exportTransfer',['mid' => $row['id']]);}">批量转赠</a> |
|||
{/if} |
|||
{if empty($_W['aid'])} |
|||
<a class="btn btn-primary btn-sm" href="{php echo web_url('member/wlMember/memberDetail',array('id' => $row['id']));}" title="">客户详情</a> |
|||
{/if} |
|||
<a class="btn btn-info btn-sm" href="{php echo web_url('order/wlOrder/orderlist', array('keywordtype'=>'3','keyword'=>$row['id']))}">客户订单</a> |
|||
{if empty($_W['aid'])} |
|||
<a class="btn btn-warning btn-sm" data-toggle="ajaxModal" href="{php echo web_url('member/wlMember/memberRecharge', array('type'=>'credit1','id'=>$row['id']))}">账户</a> |
|||
{if empty($row['blackflag'])} |
|||
<a class="btn btn-default btn-sm" data-toggle='ajaxRemove' href="{php echo web_url('member/wlMember/toblack',array('id' => $row['id'],'flag'=>1));}" data-confirm="被加入黑名单的用户无法再访问并被删除所有发布的掌上信息帖子,确认要拉黑用户吗?">拉黑</a> |
|||
{else} |
|||
<a class="btn btn-success btn-sm" data-toggle='ajaxRemove' href="{php echo web_url('member/wlMember/toblack',array('id' => $row['id'],'flag'=>0));}" data-confirm="确认要解除用户黑名单吗?">解封</a> |
|||
{/if} |
|||
<a class="btn btn-danger btn-sm" data-toggle='ajaxRemove' href="{php echo web_url('member/wlMember/memberDelete',array('id' => $row['id']));}" data-confirm="确定要删除该会员吗?">删除</a> |
|||
{/if} |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
$(function(){ |
|||
require(['bootstrap'], function () { |
|||
$("[rel=pop]").popover({ |
|||
trigger: 'manual', |
|||
placement: 'right', |
|||
title: $(this).data('title'), |
|||
html: 'true', |
|||
content: $(this).data('content'), |
|||
animation: false |
|||
}).on("mouseenter", function () { |
|||
var _this = this; |
|||
$(this).popover("show"); |
|||
$(this).siblings(".popover").on("mouseleave", function () { |
|||
$(_this).popover('hide'); |
|||
}); |
|||
}).on("mouseleave", function () { |
|||
var _this = this; |
|||
setTimeout(function () { |
|||
if (!$(".popover:hover").length) { |
|||
$(_this).popover("hide") |
|||
} |
|||
}, 100); |
|||
}); |
|||
}); |
|||
}); |
|||
|
|||
$("#excelUpload").on('change',function () { |
|||
var val = $("#excelUpload").get(0).files[0];//文件内容 |
|||
var type = val['name'].split(".");//文件名称+文件后缀 |
|||
type = $.trim(type[type.length - 1]);//文件后缀 |
|||
$("#excelUpload").val(''); |
|||
if(type == 'csv'){ |
|||
var fd = new FormData(); |
|||
fd.append("file",val);//上传的文件file |
|||
tip.confirm("内容处理中,请不要刷新页面/离开页面!<br />确定后开始处理",function () { |
|||
$.ajax({ |
|||
url:"{php echo web_url('order/wlOrder/bulkShipment')}", |
|||
type:"post", |
|||
data:fd, |
|||
dataType:"json", |
|||
cache: false, |
|||
processData: false, |
|||
contentType: false, |
|||
async:false, |
|||
success:function(data){ |
|||
tip.alert(data.message,function () { |
|||
if(data.errno == 1){ |
|||
var url = "{php echo web_url('member/wlMember/transferSend')}"+"name="+data.data; |
|||
window.location.href = url; |
|||
} |
|||
}); |
|||
}, |
|||
error:function(){ |
|||
tip.alert("网络错误,请重试!!"); |
|||
} |
|||
}); |
|||
}); |
|||
}else{ |
|||
tip.alert("只能上传csv类型的表格文件"); |
|||
} |
|||
}); |
|||
|
|||
function changeIdentity(obj,id) { |
|||
$.ajax({ |
|||
url:"{php echo web_url('member/wlMember/changeUserIdentity')}", |
|||
type:"post", |
|||
data: {data:{id:id}}, |
|||
dataType:"json", |
|||
async:false, |
|||
success:function(data){ |
|||
if (data.status===1) { |
|||
$(obj).html(data.result.bottom) |
|||
$("#identity"+id).html(data.result.identity); |
|||
} else { |
|||
tip.alert(data.result.message); |
|||
} |
|||
}, |
|||
error:function(){ |
|||
tip.alert("网络错误,请重试!!"); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,126 @@ |
|||
<style> |
|||
.recharge_info{display: -webkit-box;display: -webkit-flex;display: -ms-flexbox;display: flex;justify-content: space-around;margin-bottom: 10px;} |
|||
.recharge_info>div{-webkit-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;border:1px solid #efefef;padding:10px 22px;line-height: 25px;color: #333;} |
|||
.recharge_info>div:first-child{margin-right: 10px;} |
|||
.recharge_info>div:last-child{margin-left: 10px;} |
|||
</style> |
|||
<form action="" method="post" class="form-horizontal form-validate" enctype="multipart/form-data"> |
|||
|
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="member" /> |
|||
<input type="hidden" name="ac" value="wlMember" /> |
|||
<input type="hidden" name="do" value="memberRecharge" /> |
|||
<input type='hidden' name='type' value="{$type}" /> |
|||
<input type='hidden' name='id' value="{$id}" /> |
|||
|
|||
<div class="modal-dialog"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<button data-dismiss="modal" class="close" type="button">×</button> |
|||
<h4 class="modal-title">会员充值</h4> |
|||
</div> |
|||
<div class="modal-body"> |
|||
|
|||
<div class="recharge_info"> |
|||
<div> |
|||
<label class="pull-left" style="margin-right: 25px">粉丝</label> |
|||
<div class="pull-left"> |
|||
<img class="radius50" src='{$profile['avatar']}' style='width:20px;height:20px;padding:1px;border:1px solid #ccc' onerror="this.src='{IMAGE_NOPIC_SMALL}'"/> |
|||
{$profile['nickname']} |
|||
</div> |
|||
</div> |
|||
<div> |
|||
<label class="pull-left " style="margin-right: 25px">会员信息</label> |
|||
<div class="pull-left"> |
|||
ID: {$profile['id']}</br> |
|||
姓名: {$profile['realname']}</br> |
|||
手机号: {$profile['mobile']} |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
<div class="tabs-container"> |
|||
<div class="tabs"> |
|||
<ul class="nav nav-tabs"> |
|||
<li {if $type=='credit1'}class="active"{/if}><a data-toggle="tab" href="#tab-1" data-rechargetype="credit1" aria-expanded="true"> 充值积分</a></li> |
|||
|
|||
<li {if $type=='credit2'}class="active"{/if}><a data-toggle="tab" href="#tab-2" data-rechargetype="credit2" aria-expanded="false"> 充值余额</a></li> |
|||
</ul> |
|||
<div class="tab-content "> |
|||
<div id="tab-1" class="tab-pane {if $type=='credit1'}active{/if}"> |
|||
<div class="form-group"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">当前积分</label> |
|||
<div class="col-sm-9"> |
|||
<div class="form-control-static">{$profile['credit1']}</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
<div id="tab-2" class="tab-pane {if $type=='credit2'}active{/if}"> |
|||
<div class="form-group"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">当前余额</label> |
|||
<div class="col-sm-9"> |
|||
<div class="form-control-static">{$profile['credit2']}</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">变化</label> |
|||
<div class="col-sm-9"> |
|||
<label class='radio-inline'> |
|||
<input type='radio' name='changetype' value='0' checked /> 增加 |
|||
</label> |
|||
<label class='radio-inline'> |
|||
<input type='radio' name='changetype' value='1' /> 减少 |
|||
</label> |
|||
<!--<label class='radio-inline'> |
|||
<input type='radio' name='changetype' value='2' /> 最终<span class='name'>{if $type=='credit1'}积分{else}余额{/if}</span> |
|||
</label>--> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label mustl">充值数目</label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="num" class="form-control" value="" data-rule-number='true' data-rule-required='true' data-rule-min='0.01' /> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">备注</label> |
|||
<div class="col-sm-9"> |
|||
<textarea name="remark" class="form-control richtext" cols="70"></textarea> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> <div class="modal-footer"> |
|||
<button class="btn btn-primary btn-submit" type="submit">确认充值{if $type=='credit1'}积分{else}余额{/if}</button> |
|||
<button data-dismiss="modal" class="btn btn-default" type="button">取消</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</form> |
|||
<script language='javascript'> |
|||
$(function(){ |
|||
$('[data-toggle="tab"]').click(function(){ |
|||
var type =$(this).data('rechargetype'); |
|||
if(type=='credit1') { |
|||
$('.name').html('积分'); |
|||
$(".btn-submit").text('确认充值积分'); |
|||
}else{ |
|||
$('.name').html('余额'); |
|||
$(".btn-submit").text('确认充值余额'); |
|||
} |
|||
$(':hidden[name=type]').val( type) ; |
|||
}); |
|||
}) |
|||
</script> |
|||
@ -0,0 +1,33 @@ |
|||
<div class="modal-dialog"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<h4 class="modal-title">导入总系统平台粉丝用户数据</h4> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<div class="progress"> |
|||
<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div> |
|||
</div> |
|||
<div class="modal-tip"> |
|||
系统正在为您导入粉丝用户数据,请耐心等待~~~ |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script language='javascript'> |
|||
var sync = function(pindex) { |
|||
$.post("{php echo web_url('member/wlMember/memberImport');}", {page:pindex},function (result) { |
|||
if(result.data.pindex < result.data.total){ |
|||
var pragress = result.data.pindex/result.data.total*100; |
|||
$('.progress-bar').css('width', pragress + '%'); |
|||
$('.progress-bar').html(pragress.toFixed(2) + '%'); |
|||
++pindex; |
|||
sync(pindex); |
|||
} else { |
|||
tip.alert('导入粉丝用户数据成功!', function () { |
|||
location.href = "{php echo web_url('member/wlMember/memberIndex');}"; |
|||
}); |
|||
} |
|||
},'json'); |
|||
}; |
|||
sync(1); |
|||
</script> |
|||
@ -0,0 +1,77 @@ |
|||
<div class="modal-dialog"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<button data-dismiss="modal" class="close" type="button">×</button> |
|||
<h4 class="modal-title">用户合并</h4> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<div role="alert" class="alert alert-warning"> |
|||
系统通过手机号或统一用户unionid来判断用户唯一性,来合并重复的用户信息 |
|||
</div> |
|||
<div class="panel panel-stat"> |
|||
<div class="panel-body"> |
|||
<div class="col-md-3"> |
|||
<div class="title">手机号重复(人)</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;">{php echo count($mobiles)}</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title">手机号为空(人)</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;">{$nomobile}</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title">unionid重复(人)</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;">{php echo count($unionids)}</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title">unionid为空(人)</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;">{$nounionid}</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="text-center"> |
|||
<div class="member-merge-progress" style="display: none;"> |
|||
<div class="progress"> |
|||
<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div> |
|||
</div> |
|||
<div class="modal-tip"> |
|||
系统正在为您合并重复用户,请耐心等待~~~ |
|||
</div> |
|||
</div> |
|||
{if !empty($mobiles) || !empty($unionids)} |
|||
<button class="btn btn-primary btn-member-merge" onclick="member_merge();">开始合并用户</button> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script language='javascript'> |
|||
function member_merge() { |
|||
$('.btn-member-merge').hide(); |
|||
$('.member-merge-progress').show(); |
|||
|
|||
var merge = function() { |
|||
$.post("{php echo web_url('member/wlMember/membermerge');}", function (data) { |
|||
if(data.errno == 0){ |
|||
var pragress = data.data.success/data.data.total*100; |
|||
$('.progress-bar').css('width', pragress + '%'); |
|||
$('.progress-bar').html(pragress.toFixed(2) + '%'); |
|||
merge(); |
|||
} else if (data.errno == 1) { |
|||
$('.member-merge-progress').hide(); |
|||
tip.alert('重复用户合并成功', function () { |
|||
location.href = "{php echo web_url('member/wlMember/memberIndex');}"; |
|||
}); |
|||
} |
|||
},'json'); |
|||
}; |
|||
merge(); |
|||
} |
|||
</script> |
|||
@ -0,0 +1,33 @@ |
|||
<div class="modal-dialog"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<h4 class="modal-title">同步用户信息</h4> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<div class="progress"> |
|||
<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div> |
|||
</div> |
|||
<div class="modal-tip"> |
|||
系统正在为您同步用户信息,请耐心等待~~~ |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script language='javascript'> |
|||
var sync = function(pindex) { |
|||
$.post("{php echo web_url('member/wlMember/membersync');}", {page:pindex},function (result) { |
|||
if(result.data.pindex < result.data.total){ |
|||
var pragress = result.data.pindex/result.data.total*100; |
|||
$('.progress-bar').css('width', pragress + '%'); |
|||
$('.progress-bar').html(pragress.toFixed(2) + '%'); |
|||
++pindex; |
|||
sync(pindex); |
|||
} else { |
|||
tip.alert('同步用户信息完成!', function () { |
|||
location.href = "{php echo web_url('member/wlMember/memberIndex');}"; |
|||
}); |
|||
} |
|||
},'json'); |
|||
}; |
|||
sync(1); |
|||
</script> |
|||
@ -0,0 +1,86 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs" id="myTab"> |
|||
<li><a href="javascript:;">充值明细</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="member" /> |
|||
<input type="hidden" name="ac" value="memberFinancialDetails" /> |
|||
<input type="hidden" name="do" value="recharge" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">支付方式</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('paytype:0');}" class="btn {if intval($_GPC['paytype']) == 0}btn-primary{else}btn-default{/if}">全部</a> |
|||
<a href="{php echo wl_filter_url('paytype:2');}" class="btn {if $_GPC['paytype'] == 2}btn-primary{else}btn-default{/if}">微信支付</a> |
|||
<a href="{php echo wl_filter_url('paytype:3');}" class="btn {if $_GPC['paytype'] == 3}btn-primary{else}btn-default{/if}">支付宝</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">时间</label> |
|||
<div class="col-sm-9"> |
|||
{php echo tpl_select_time_info('time_limit', array('starttime' => date('Y-m-d',$starttime), 'endtime' => date('Y-m-d', $endtime)));} |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary" id="search">筛选</button> |
|||
<button class="btn btn-default min-width" name="export" type="submit" value="export"><i class="fa fa-download"></i> 导出记录</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th style="width:25%;">充值单号</th> |
|||
<th style="width:25%;">用户信息</th> |
|||
<th style="width:10%;">充值金额</th> |
|||
<th style="width:15%;">充值方式</th> |
|||
<th style="width:25%;">充值时间</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $details $de} |
|||
<tr> |
|||
<td>{$de['orderno']}</td> |
|||
<td><img src="{$de['avatar']}" style="width: 30px;height: 30px;"> {$de['nickname']}</td> |
|||
<td style="color: red;">¥{$de['price']}</td> |
|||
<td> |
|||
{if $de['paytype'] == 2} |
|||
<span class="label label-success">微信支付</span> |
|||
{else if $de['paytype'] == 3} |
|||
<span class="label label-info">支付宝</span> |
|||
{else} |
|||
<span class="label label-danger">其他方式</span> |
|||
{/if} |
|||
</td> |
|||
<td>{$de['paytime']}</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,58 @@ |
|||
<style> |
|||
.recharge_info{display: -webkit-box;display: -webkit-flex;display: -ms-flexbox;display: flex;justify-content: space-around;margin-bottom: 10px;} |
|||
.recharge_info>div{-webkit-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;border:1px solid #efefef;padding:10px 22px;line-height: 25px;color: #333;} |
|||
.recharge_info>div:first-child{margin-right: 10px;} |
|||
.recharge_info>div:last-child{margin-left: 10px;} |
|||
</style> |
|||
<form action="" method="post" class="form-horizontal form-validate" enctype="multipart/form-data"> |
|||
|
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="member" /> |
|||
<input type="hidden" name="ac" value="wlMember" /> |
|||
<input type="hidden" name="do" value="memberRights" /> |
|||
<input type='hidden' name='id' value="{$id}" /> |
|||
|
|||
<div class="modal-dialog"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<button data-dismiss="modal" class="close" type="button">×</button> |
|||
<h4 class="modal-title">用户权限</h4> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label mustl">校园活动-发布</label> |
|||
<div class="col-sm-9"> |
|||
<label class="radio-inline"> |
|||
<input type="radio" name='rights[campus_activities]' value='1' {if $rights['campus_activities']==1}checked{/if}>开启 |
|||
</label> |
|||
<label class="radio-inline"> |
|||
<input type="radio" name='rights[campus_activities]' value='0' {if $rights['campus_activities']==0}checked{/if}>关闭 |
|||
</label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button class="btn btn-primary btn-submit" type="submit">提交</button> |
|||
<button data-dismiss="modal" class="btn btn-default" type="button">取消</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</form> |
|||
<script language='javascript'> |
|||
$(function(){ |
|||
$('[data-toggle="tab"]').click(function(){ |
|||
var type =$(this).data('rechargetype'); |
|||
if(type=='credit1') { |
|||
$('.name').html('积分'); |
|||
$(".btn-submit").text('确认充值积分'); |
|||
}else{ |
|||
$('.name').html('余额'); |
|||
$(".btn-submit").text('确认充值余额'); |
|||
} |
|||
$(':hidden[name=type]').val( type) ; |
|||
}); |
|||
}) |
|||
</script> |
|||
@ -0,0 +1,17 @@ |
|||
<div style='max-height:500px;overflow:auto;min-width:580px;'> |
|||
<table class="table table-hover" style="min-width:580px;"> |
|||
<tbody> |
|||
{loop $ds $row} |
|||
<tr> |
|||
<td><img src='{$row['avatar']}' style='width:30px;height:30px;padding1px;border:1px solid #ccc' /> {$row['nickname']}</td> |
|||
<td style="width:80px;"><a href="javascript:;" data-dismiss="modal" onclick='select_member({php echo json_encode($row);});'>选择</a></td> |
|||
</tr> |
|||
{/loop} |
|||
{if count($ds)<=0} |
|||
<tr> |
|||
<td colspan='4' align='center'>未找到</td> |
|||
</tr> |
|||
{/if} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
@ -0,0 +1,96 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="#">客户概况</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="panel panel-stat"> |
|||
<div class="panel-heading"> |
|||
<h3>客户概括</h3> |
|||
</div> |
|||
<div class="panel-body"> |
|||
<div class="col-md-3"> |
|||
<div class="title">今日新增(人)</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;">{$stat['today_num']}</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title">昨日新增(人)</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;">{$stat['yesterday_num']}</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title">本月新增(人)</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;">{$stat['month_num']}</a> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-3"> |
|||
<div class="title">总客户(人)</div> |
|||
<div class="num-wrapper"> |
|||
<a class="num" href="javascript:;">{$stat['total_num']}</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="panel panel-trend"> |
|||
<div class="panel-heading"> |
|||
<h3>客户增长趋势</h3> |
|||
</div> |
|||
<form action="" id="trade"> |
|||
{php echo tpl_select_time_info('time', array('start' => date('Y-m-d', $start),'end' => date('Y-m-d', $end)), '')} |
|||
</form> |
|||
<div class="panel-body"> |
|||
<div id="chart-container" style="margin: 20px 0 -60px -25px;height: 500px;"></div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
require(['daterangepicker'], function() { |
|||
myrequire(['g2','data-set'], function(){ |
|||
|
|||
$('.daterange').on('apply.daterangepicker', function(ev, picker) { |
|||
refresh(); |
|||
}); |
|||
|
|||
function refresh() { |
|||
$('#chart-container').html(''); |
|||
var url = location.href + '&#aaaa'; |
|||
var params = { |
|||
'start': $('#trade input[name="time[start]"]').val(), |
|||
'end': $('#trade input[name="time[end]"]').val() |
|||
}; |
|||
$.post(url, params, function(data){ |
|||
var data = $.parseJSON(data) |
|||
var chart = new G2.Chart({ |
|||
container: 'chart-container', |
|||
forceFit: true, |
|||
height: 500 |
|||
}); |
|||
chart.source(data); |
|||
chart.scale('新增客户', { |
|||
min: 0 |
|||
}); |
|||
chart.scale('day', { |
|||
range: [0, 1] |
|||
}); |
|||
chart.tooltip({ |
|||
crosshairs: { |
|||
type: 'line' |
|||
} |
|||
}); |
|||
chart.area().position('day*新增客户').shape('smooth'); |
|||
chart.line().position('day*新增客户').shape('smooth'); |
|||
chart.point().position('day*新增客户').size(4).shape('circle').style({ |
|||
stroke: '#fff', |
|||
lineWidth: 1 |
|||
}); |
|||
chart.render(); |
|||
}); |
|||
} |
|||
refresh(); |
|||
}); |
|||
}); |
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,92 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs" id="myTab"> |
|||
<li><a href="javascript:;">转赠活动</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="member" /> |
|||
<input type="hidden" name="ac" value="wlMember" /> |
|||
<input type="hidden" name="do" value="transferlist" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">时间</label> |
|||
<div class="col-sm-9"> |
|||
{php echo tpl_select_time_info('time_limit', array('starttime' => date('Y-m-d',$starttime), 'endtime' => date('Y-m-d', $endtime)));} |
|||
</div> |
|||
</div> |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">记录搜索</label> |
|||
<div class="col-sm-9"> |
|||
<select name="keywordtype" class="form-control"> |
|||
<option value="1" {if $_GPC['keywordtype']==1}selected="selected"{/if}>创建者MID</option> |
|||
<option value="2" {if $_GPC['keywordtype']==2}selected="selected"{/if}>创建者昵称</option> |
|||
<option value="3" {if $_GPC['keywordtype']==3}selected="selected"{/if}>创建者手机</option> |
|||
<option value="6" {if $_GPC['keywordtype']==6}selected="selected"{/if}>活动ID</option> |
|||
<option value="7" {if $_GPC['keywordtype']==7}selected="selected"{/if}>活动标题</option> |
|||
<option value="4" {if $_GPC['keywordtype']==4}selected="selected"{/if}>总金额大于</option> |
|||
<option value="5" {if $_GPC['keywordtype']==5}selected="selected"{/if}>总金额小于</option> |
|||
</select> |
|||
<input type="text" name="keyword" class="form-control" value="{$_GPC['keyword']}" placeholder="请输入关键字"/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary" id="search">筛选</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th style="width:5%;">活动ID</th> |
|||
<th style="width:15%;">活动标题</th> |
|||
<th style="width:15%;">创建者信息</th> |
|||
<th style="width:15%;">金额/总额</th> |
|||
<th style="width:15%;">剩余/总量</th> |
|||
<th style="width:20%;">创建时间</th> |
|||
<th style="width:15%;">操作</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $lists $de} |
|||
<tr> |
|||
<td>{$de['id']}</td> |
|||
<td>{$de['title']}</td> |
|||
<td> |
|||
<img src="{$de['avatar']}" style="width: 35px;height: 35px;position: relative;top: -10px;"> |
|||
<div style="width: 75%;display: inline-block;"> |
|||
{$de['nickname']} |
|||
<br/>MID:{$de['mid']} |
|||
</div> |
|||
</td> |
|||
<td><span style="color: orange;font-weight: bolder;">{$de['money']} </span>/ <span style="color: orangered;font-weight: bolder;">{$de['allmoney']}</span></td> |
|||
<td><span style="color: orangered;font-weight: bolder;">{$de['surplus']}</span> / <span style="color: green;font-weight: bolder;">{$de['allnum']}</span></td> |
|||
<td>{php echo date('Y-m-d H:i:s',$de['createtime']);}</td> |
|||
<td><a href="{php echo web_url('member/wlMember/transferrecord',array('keywordtype'=>4,'keyword'=>$de['id']))}">查看领取记录</a></td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,90 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs" id="myTab"> |
|||
<li><a href="javascript:;">转赠活动</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="member" /> |
|||
<input type="hidden" name="ac" value="wlMember" /> |
|||
<input type="hidden" name="do" value="transferrecord" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">时间</label> |
|||
<div class="col-sm-9"> |
|||
{php echo tpl_select_time_info('time_limit', array('starttime' => date('Y-m-d',$starttime), 'endtime' => date('Y-m-d', $endtime)));} |
|||
</div> |
|||
</div> |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">记录搜索</label> |
|||
<div class="col-sm-9"> |
|||
<select name="keywordtype" class="form-control"> |
|||
<option value="1" {if $_GPC['keywordtype']==1}selected="selected"{/if}>领取人MID</option> |
|||
<option value="2" {if $_GPC['keywordtype']==2}selected="selected"{/if}>领取人昵称</option> |
|||
<option value="3" {if $_GPC['keywordtype']==3}selected="selected"{/if}>领取人手机</option> |
|||
<option value="4" {if $_GPC['keywordtype']==4}selected="selected"{/if}>活动ID</option> |
|||
<option value="5" {if $_GPC['keywordtype']==5}selected="selected"{/if}>活动标题</option> |
|||
</select> |
|||
<input type="text" name="keyword" class="form-control" value="{$_GPC['keyword']}" placeholder="请输入关键字"/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary" id="search">筛选</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th style="width:5%;">活动ID</th> |
|||
<th style="width:15%;">活动标题</th> |
|||
<th style="width:15%;">领取人信息</th> |
|||
<th style="width:15%;">录入实名</th> |
|||
<th style="width:15%;">录入手机号</th> |
|||
<th style="width:15%;">领取金额</th> |
|||
<th style="width:20%;">领取时间</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $lists $de} |
|||
<tr> |
|||
<td>{$de['tid']}</td> |
|||
<td>{$de['title']}</td> |
|||
<td> |
|||
<img src="{$de['avatar']}" style="width: 35px;height: 35px;position: relative;top: -10px;"> |
|||
<div style="width: 75%;display: inline-block;"> |
|||
{$de['nickname']} |
|||
<br/>MID:{$de['mid']} |
|||
</div> |
|||
</td> |
|||
<td>{$de['realname']}</td> |
|||
<td>{$de['mobile']}</td> |
|||
<td><span style="color: orangered;font-weight: bolder;">{$de['money']}</span></td> |
|||
<td>{php echo date('Y-m-d H:i:s',$de['createtime']);}</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,165 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs" id="myTab"> |
|||
<li class="active"><a href="#tab_basic">用户设置</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-form"> |
|||
<form action="" method="post" class="form-horizontal form form-validate"> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-heading">用户设置</div> |
|||
<div class="panel-body"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">短信验证码</label> |
|||
<div class="col-sm-9"> |
|||
<label class="radio-inline"><input type="radio" name="userset[smsver]" value="1" {if $settings['smsver'] == 1} checked {/if}>禁用</label> |
|||
<label class="radio-inline"><input type="radio" name="userset[smsver]" value="0" {if $settings['smsver'] != 1} checked {/if}>启用</label> |
|||
<span class="help-block">启用短信验证可以保证用户所填手机号码的真实性,在用户注册时生效。</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">图形验证码</label> |
|||
<div class="col-sm-9"> |
|||
<label class="radio-inline"><input type="radio" name="userset[verifycode]" value="0" {if $settings['verifycode'] != 1} checked {/if}>禁用</label> |
|||
<label class="radio-inline"><input type="radio" name="userset[verifycode]" value="1" {if $settings['verifycode'] == 1} checked {/if}>启用</label> |
|||
<span class="help-block">启用图形验证码能有效防止短信被恶意消耗,在用户注册时生效。</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">要求绑定手机</label> |
|||
<div class="col-sm-9"> |
|||
{if p('rush')} |
|||
<label class="checkbox-inline"> |
|||
<input type="checkbox" {if in_array('rush',$settings['plugin'])} checked="checked" {/if} name="plugin[]" value="rush" id="wk1">抢购活动 |
|||
</label> |
|||
{/if} |
|||
{if p('groupon')} |
|||
<label class="checkbox-inline"> |
|||
<input type="checkbox" {if in_array('groupon',$settings['plugin'])} checked="checked" {/if} name="plugin[]" value="groupon" >团购活动 |
|||
</label> |
|||
{/if} |
|||
{if p('wlfightgroup')} |
|||
<label class="checkbox-inline"> |
|||
<input type="checkbox" {if in_array('wlfightgroup',$settings['plugin'])} checked="checked" {/if} name="plugin[]" value="wlfightgroup" id="wk2">拼团商城 |
|||
</label> |
|||
{/if} |
|||
{if p('wlcoupon')} |
|||
<label class="checkbox-inline"> |
|||
<input type="checkbox" {if in_array('coupon',$settings['plugin'])} checked="checked" {/if} name="plugin[]" value="coupon" id="wk5">超级券 |
|||
</label> |
|||
{/if} |
|||
{if p('activity')} |
|||
<label class="checkbox-inline"> |
|||
<input type="checkbox" {if in_array('activity',$settings['plugin'])} checked="checked" {/if} name="plugin[]" value="activity" id="wk6">同城活动 |
|||
</label> |
|||
{/if} |
|||
{if p('halfcard')} |
|||
<label class="checkbox-inline"> |
|||
<input type="checkbox" {if in_array('halfcard',$settings['plugin'])} checked="checked" {/if} name="plugin[]" value="halfcard" id="wk3">一卡通 |
|||
</label> |
|||
{/if} |
|||
{if p('pocket')} |
|||
<label class="checkbox-inline"> |
|||
<input type="checkbox" {if in_array('pocket',$settings['plugin'])} checked="checked" {/if} name="plugin[]" value="pocket" id="wk4">掌上信息 |
|||
</label> |
|||
{/if} |
|||
<label class="checkbox-inline"> |
|||
<input type="checkbox" {if in_array('charge',$settings['plugin'])} checked="checked" {/if} name="plugin[]" value="charge" >付费入驻 |
|||
</label> |
|||
{if p('distribution')} |
|||
<label class="checkbox-inline"> |
|||
<input type="checkbox" {if in_array('distribution',$settings['plugin'])} checked="checked" {/if} name="plugin[]" value="distribution" >申请分销商 |
|||
</label> |
|||
{/if} |
|||
{if p('bargain')} |
|||
<label class="checkbox-inline"> |
|||
<input type="checkbox" {if in_array('bargain',$settings['plugin'])} checked="checked" {/if} name="plugin[]" value="bargain" >发起砍价 |
|||
</label> |
|||
<label class="checkbox-inline"> |
|||
<input type="checkbox" {if in_array('helpbargain',$settings['plugin'])} checked="checked" {/if} name="plugin[]" value="helpbargain" >帮忙砍价 |
|||
</label> |
|||
{/if} |
|||
{if p('consumption')} |
|||
<label class="checkbox-inline"> |
|||
<input type="checkbox" {if in_array('consumption',$settings['plugin'])} checked="checked" {/if} name="plugin[]" value="consumption" >积分兑换 |
|||
</label> |
|||
{/if} |
|||
{if p('draw')} |
|||
<label class="checkbox-inline"> |
|||
<input type="checkbox" {if in_array('draw',$settings['plugin'])} checked="checked" {/if} name="plugin[]" value="draw" >幸运抽奖 |
|||
</label> |
|||
{/if} |
|||
<label class="checkbox-inline"> |
|||
<input type="checkbox" {if in_array('private',$settings['plugin'])} checked="checked" {/if} name="plugin[]" value="private">评论回复私信 |
|||
</label> |
|||
{if p('housekeep')} |
|||
<label class="checkbox-inline"> |
|||
<input type="checkbox" {if in_array('housekeep',$settings['plugin'])} checked="checked" {/if} name="plugin[]" value="housekeep" >家政需求发布 |
|||
</label> |
|||
{/if} |
|||
{if uniacid_p('dating')} |
|||
<label class="checkbox-inline"> |
|||
<input type="checkbox" {if in_array('dating',$settings['plugin'])} checked="checked" {/if} name="plugin[]" value="dating" >相亲资料提交 |
|||
</label> |
|||
{/if} |
|||
{if uniacid_p('luckydraw')} |
|||
<label class="checkbox-inline"> |
|||
<input type="checkbox" {if in_array('luckydraw',$settings['plugin'])} checked="checked" {/if} name="plugin[]" value="luckydraw" >锦鲤抽奖广告和分享 |
|||
</label> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">同手机绑定方式</label> |
|||
<div class="col-sm-9"> |
|||
<label class="radio-inline"><input type="radio" name="userset[onemobiletype]" value="0" {if $settings['onemobiletype'] == 0 || empty($settings['onemobiletype'])} checked {/if}>合并用户数据</label> |
|||
<label class="radio-inline"><input type="radio" name="userset[onemobiletype]" value="1" {if $settings['onemobiletype'] == 1} checked {/if}>改绑新用户</label> |
|||
<label class="radio-inline"><input type="radio" name="userset[onemobiletype]" value="2" {if $settings['onemobiletype'] == 2} checked {/if}>禁止绑定</label> |
|||
<span class="help-block">几条用户数据同时绑定一个手机号时的处理方式。</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">黑名单提示语</label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="userset[black_desc]" placeholder="您被禁止访问,请联系客服" class="form-control" value="{$settings['black_desc']}" > |
|||
<span class="help-block">被加入黑名单的用户访问时看到的提示文字。</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">个人中心背景</label> |
|||
<div class="col-sm-9"> |
|||
{php echo attachment_select('userset[userbg]', $settings['userbg']);} |
|||
<span class="help-block">建议图片大小750*500,<a href="{URL_MODULE}h5/resource/image/userCenterImg.png" target="_blank">默认背景参考点击查看</a></span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">个人主页背景</label> |
|||
<div class="col-sm-9"> |
|||
{php echo attachment_select('userset[usermainbg]', $settings['usermainbg']);} |
|||
<span class="help-block">建议图片大小750*520,<a href="{URL_MODULE}h5/resource/image/mainbgimg.png" target="_blank">默认背景参考点击查看</a></span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">用户协议</label> |
|||
<div class="col-sm-9"> |
|||
{php echo tpl_diy_editor_create('userset[describe]',$settings['describe']);} |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">隐私政策</label> |
|||
<div class="col-sm-9"> |
|||
{php echo tpl_diy_editor_create('userset[privacy]',$settings['privacy']);} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<input type="submit" name="submit" value="提交" class="btn btn-primary min-width" /> |
|||
<input type="hidden" name="token" value="{$_W['token']}" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,255 @@ |
|||
{php include wl_template('common/header');} |
|||
<style type='text/css'> |
|||
.trhead td{background:#efefef;text-align: center} |
|||
.trbody td{text-align: center;vertical-align:top;border-left:1px solid #f2f2f2;overflow: hidden;font-size:12px;} |
|||
.trorder{background:#f8f8f8;border:1px solid #f2f2f2;text-align:left;} |
|||
.ops{border-right:1px solid #f2f2f2;text-align: center;} |
|||
.ops a,.ops span{margin: 3px 0;} |
|||
.table-top{padding: 0 20px;background: #f7f7f7;border-bottom: 1px solid #e5e5e5;} |
|||
.table-top .op:hover{color: #000;} |
|||
.tables{border:1px solid #e5e5e5;font-size: 14px;line-height: 18px;} |
|||
.tables:hover{border:1px solid #1ab394;} |
|||
.table-row,.table-header,.table-footer,.table-top{display: -webkit-box;display: -webkit-flex;display: -ms-flexbox;display: flex;justify-content: center;-webkit-justify-content: center;-webkit-align-content: space-around;align-content: space-around;} |
|||
.tables .table-row.table-top>div{padding: 10.5px 0;} |
|||
.tables .table-row .ops.list-inner{border-right:none;} |
|||
.tables .table-row .buyremark{background:#fdeeee;color:red;flex: 1;padding: 10px 20px!important;} |
|||
.tables .table-row .remark{background:#ffffcc;color:red;flex: 1;padding: 10px 20px!important;} |
|||
.tables .list-inner{border-right: 1px solid #efefef;vertical-align: middle;} |
|||
.table-row .goods-des .title{width:180px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;} |
|||
.table-row .goods-des{border-right: 1px solid #efefef;vertical-align: middle;width:400px;text-align: left;padding: 14px 0;} |
|||
.table-row .list-inner{-webkit-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;text-align: center;display: -webkit-box;display: -webkit-flex;display: -ms-flexbox;display: flex;-webkit-align-items: center;align-items: center;-webkit-justify-content: center;justify-content: center;-webkit-flex-direction: column;flex-direction: column;} |
|||
.saler>div{width:130px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;} |
|||
.table-row .list-inner.ops, .table-row .list-inner.paystyle{-webkit-flex-direction: column;flex-direction: column;-webkit-justify-content: center;justify-content: center;} |
|||
.table-header{background:#f8f8f8;height: 40px;line-height: 40px;padding: 0 20px;font-weight: 600;} |
|||
.table-header .others{-webkit-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;text-align: center;} |
|||
.table-footer{border-top: 1px solid #efefef;margin:0 20px;padding: 10.5px 0;} |
|||
.table-footer>div, .table-top>div{-webkit-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;height:100%;} |
|||
.fixed-header div{padding:0;} |
|||
.fixed-header.table-header{display: none;} |
|||
.fixed-header.table-header.active{display: -webkit-box;display: -webkit-flex;display: -ms-flexbox;display: flex;} |
|||
.shop{display: inline-block;width:48px;height:18px;text-align: center;border:1px solid #1b86ff;color: #1b86ff;margin-right: 10px;} |
|||
.min_program{display: inline-block;width:48px;height:18px;text-align: center;border:1px solid #ff5555;color: #ff5555;margin-right: 10px;} |
|||
.ordertype{display: inline-block;height:18px;margin-right: 10px;border-radius: 0;font-weight: 500;} |
|||
.popover{border: 1px solid #efefef;border: 1px solid #efefef;border-radius: 6px;-webkit-filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));-moz-filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .1));-o-filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .1));filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));padding: 0!important;} |
|||
.popover-content{padding: 10px!important;font-size:12px;} |
|||
.popover-content table{margin-bottom: 0!important;} |
|||
.popover.right>.arrow{border-right-color: #efefef;} |
|||
.cored{color: orangered;} |
|||
</style> |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="javascript:;">售后记录</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="order" /> |
|||
<input type="hidden" name="ac" value="orderAfterSales" /> |
|||
<input type="hidden" name="do" value="afterlist" /> |
|||
<input type="hidden" name="plugin" value="{$_GPC['plugin']}" /> |
|||
<input type="hidden" name="status" value="{$_GPC['status']}" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">售后状态</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('status:');}" class="btn {if empty($_GPC['status'])}btn-primary{else}btn-default{/if}">不限</a> |
|||
<a href="{php echo wl_filter_url('status:1');}" class="btn {if $_GPC['status'] == '1'}btn-primary{else}btn-default{/if}">待处理</a> |
|||
<a href="{php echo wl_filter_url('status:2');}" class="btn {if $_GPC['status'] == '2'}btn-primary{else}btn-default{/if}">已完成</a> |
|||
<a href="{php echo wl_filter_url('status:3');}" class="btn {if $_GPC['status'] == '3'}btn-primary{else}btn-default{/if}">已驳回</a> |
|||
<a href="{php echo wl_filter_url('status:4');}" class="btn {if $_GPC['status'] == '4'}btn-primary{else}btn-default{/if}">用户取消</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">订单类型</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('plugin:');}" class="btn {if empty($_GPC['plugin'])}btn-primary{else}btn-default{/if}">不限</a> |
|||
<a href="{php echo wl_filter_url('plugin:rush');}" class="btn {if $_GPC['plugin'] == 'rush'}btn-primary{else}btn-default{/if}">抢购</a> |
|||
{if p('groupon')} |
|||
<a href="{php echo wl_filter_url('plugin:groupon');}" class="btn {if $_GPC['plugin'] == 'groupon'}btn-primary{else}btn-default{/if}">团购</a> |
|||
{/if} |
|||
<a href="{php echo wl_filter_url('plugin:wlfightgroup');}" class="btn {if $_GPC['plugin'] == 'wlfightgroup'}btn-primary{else}btn-default{/if}">拼团</a> |
|||
<a href="{php echo wl_filter_url('plugin:coupon');}" class="btn {if $_GPC['plugin'] == 'coupon'}btn-primary{else}btn-default{/if}">卡券</a> |
|||
{if p('bargain')} |
|||
<a href="{php echo wl_filter_url('plugin:bargain');}" class="btn {if $_GPC['plugin'] == 'bargain'}btn-primary{else}btn-default{/if}">砍价</a> |
|||
{/if} |
|||
{if p('activity')} |
|||
<a href="{php echo wl_filter_url('plugin:activity');}" class="btn {if $_GPC['plugin'] == 'activity'}btn-primary{else}btn-default{/if}">活动</a> |
|||
{/if} |
|||
{if p('citydelivery')} |
|||
<a href="{php echo wl_filter_url('plugin:citydelivery');}" class="btn {if $_GPC['plugin'] == 'citydelivery'}btn-primary{else}btn-default{/if}">同城配送</a> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">售后搜索</label> |
|||
<div class="col-sm-9"> |
|||
<select name="keywordtype" class="form-control"> |
|||
<option value="1" {if $_GPC['keywordtype']==1}selected="selected"{/if}>订单号</option> |
|||
<option value="2" {if $_GPC['keywordtype']==2}selected="selected"{/if}>商户ID</option> |
|||
<option value="3" {if $_GPC['keywordtype']==3}selected="selected"{/if}>买家ID</option> |
|||
</select> |
|||
<input type="text" name="keyword" class="form-control" value="{$_GPC['keyword']}" placeholder="请输入关键字"/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">时间筛选</label> |
|||
<div class="col-md-3"> |
|||
<select name="timetype" class="form-control"> |
|||
<option value="">请选择时间类型</option> |
|||
<option value="1" {if $_GPC['timetype']==1}selected="selected"{/if}>申请时间</option> |
|||
<option value="2" {if $_GPC['timetype']==2}selected="selected"{/if}>处理时间</option> |
|||
</select> |
|||
</div> |
|||
<div class="col-md-2"> |
|||
{php echo tpl_select_time_info('time_limit', array('starttime' => date('Y-m-d',$starttime), 'endtime' => date('Y-m-d', $endtime)));} |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary" id="search">筛选</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="row"> |
|||
<div class="col-md-12"> |
|||
<div class=""> |
|||
<div class="table-header"> |
|||
<div style='width: 400px;text-align: left;'>商品</div> |
|||
<div class="others">买家</div> |
|||
<div class="others">商家</div> |
|||
<div class="others">价格/支付</div> |
|||
<div class="others">状态</div> |
|||
<div class="others">操作</div> |
|||
</div> |
|||
{loop $afterlist $item} |
|||
<div class="table-row"><div style='height:20px;padding:0;border-top:none;'></div></div> |
|||
<div class="tables"> |
|||
<!-- 头部 --> |
|||
<div class='table-row table-top'> |
|||
<div style="text-align: left;color: #8f8e8e;"> |
|||
<span style="font-weight: bold;margin-right: 10px;color: #2d2d31"> |
|||
<span class="label label-{$item['plugincss']} ordertype">{$item['plugintext']}</span>申请时间:{php echo date('Y-m-d H:i:s',$item['createtime'])} |
|||
</span> |
|||
订单编号:{$item['orderno']} |
|||
{if $item['type'] == 1} |
|||
<span class='label label-warning'>要求退款</span> |
|||
{else if $item['type'] == 2} |
|||
<span class='label label-info'>要求换货</span> |
|||
{else if $item['type'] == 2} |
|||
<span class='label label-info'>要求退货退款</span> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
<!-- 主体 --> |
|||
<div class='table-row' style="margin:0 20px"> |
|||
<!-- 商品信息 --> |
|||
<div class="goods-des"> |
|||
<div style="display: -webkit-box;display: -webkit-flex;display: -ms-flexbox;display: flex;margin: 10px 0"> |
|||
<img src="{php echo tomedia($item['goodsimg'])}" style='width:70px;height:70px;border:1px solid #efefef; padding:1px;'onerror="this.src='../addons/weliam_smartcity/web/resource/images/nopic.jpg'"> |
|||
<div style="-webkit-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;margin-left: 10px;text-align: left;display: flex;align-items: center"> |
|||
<div> |
|||
<div class="title"> |
|||
{$item['goodsname']}<br/> |
|||
{if $item['goodsid']>0}ID:{$item['goodsid']}<br/>{/if} |
|||
<span style="color: #999"> |
|||
{if !empty($item['optiontitle'])}规格:{$item['optiontitle']}{/if} |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<span style="float: right;text-align: right;display: inline-block;width:130px;"> |
|||
¥{$item['goodsprice']}<br/> |
|||
x{$item['num']} |
|||
</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- 买家信息 --> |
|||
<div class="list-inner saler" style='text-align: center;' > |
|||
<div> |
|||
<a {if $_W['aid']} href="javascript:;" {else} href="{php echo web_url('member/wlMember/memberIndex',array('mid'=>$item['mid']))}" {/if} > {$item['nickname']}</a> |
|||
<br/> |
|||
{$item['realname']}<br/>{$item['mobile']}<br/>MID:{$item['mid']} |
|||
</div> |
|||
</div> |
|||
<!-- 商户 --> |
|||
<div class="list-inner saler" style='text-align: center;' > |
|||
<div> |
|||
{$item['storename']}<br/>SID:{$item['sid']} |
|||
</div> |
|||
</div> |
|||
<!-- 支付 --> |
|||
<div class="list-inner paystyle" style='text-align:center;' > |
|||
<span style="color:orangered;display: inline">¥{$item['orderprice']}</span> |
|||
<!-- 已支付 --> |
|||
{if $item['paytype']==1} |
|||
<span> <i class="icow icow-yue text-warning" style="font-size: 17px;"></i><span>余额支付</span></span> |
|||
{elseif $item['paytype']==6} |
|||
<span> <i class="icow icow-kuajingzhifuiconfukuan text-danger" style="font-size: 17px"></i>后台付款</span> |
|||
{elseif $item['paytype']==2} |
|||
<span> <i class="icow icow-weixinzhifu text-success" style="font-size: 17px"></i>微信支付</span> |
|||
{elseif $item['paytype']==3} |
|||
<span><i class="icow icow-zhifubaozhifu text-primary" style="font-size: 17px"></i>支付宝支付</span> |
|||
{elseif $item['paytype']==5} |
|||
<span><i class="icow icow-zhifubaozhifu text-primary" style="font-size: 17px"></i>小程序支付</span> |
|||
{elseif $item['paytype']==4} |
|||
<span><i class="icow icow-zhifubaozhifu text-primary" style="font-size: 17px"></i>货到付款</span> |
|||
{elseif empty($item['paytype']) && $item['actualprice'] == 0 } |
|||
<span><i class="icow icow-zhifubaozhifu text-primary" style="font-size: 17px"></i>0元购</span> |
|||
{elseif $item['paytype']==7} |
|||
<span><i class="icow icow-zhifubaozhifu text-primary" style="font-size: 17px"></i>混合支付</span> |
|||
{else} |
|||
<label class='label label-danger'>未知方式</label> |
|||
{/if} |
|||
</div> |
|||
<!--状态--> |
|||
<div class='list-inner' style='line-height:20px;text-align:center' > |
|||
{if $item['status'] == 1} |
|||
<span class='label label-warning'>待处理</span> |
|||
{else if $item['status'] == 2} |
|||
<span class='label label-success'>已完成</span> |
|||
{else if $item['status'] == 3} |
|||
<span class='label label-danger'>已拒绝</span> |
|||
{else if $item['status'] == 4} |
|||
<span class='label label-primary'>用户取消</span> |
|||
{/if} |
|||
{if $item['dotime']} |
|||
{php echo date('Y-m-d H:i:s',$item['dotime'])} |
|||
{/if} |
|||
</div> |
|||
<!--操作--> |
|||
<div class="ops list-inner" style='text-align:center' > |
|||
{if $item['status'] == 1} |
|||
{if !is_store() || $_W['wlsetting']['orderset']['storerefund'] > 0} |
|||
<a class='op' data-toggle='ajaxModal' href="{php echo web_url('order/wlOrder/refund',array('id'=>$item['orderid'],'afterid'=>$item['id'],'type'=>$item['ordertype'],'is_jurisdiction'=>1))}">退款</a> |
|||
{/if} |
|||
<a href="{php echo web_url('order/orderAfterSales/rejectafter',array('id'=>$item['id']))}" data-toggle="ajaxModal">驳回</a> |
|||
{/if} |
|||
{if !empty($item['detailurl'])} |
|||
<a class='op' href="{$item['detailurl']}" target='_blank' >订单详情</a> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/loop} |
|||
<div style="padding: 20px 0;text-align: right" > |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
|
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,218 @@ |
|||
{php include wl_template('common/header');} |
|||
<style type='text/css'> |
|||
.trhead td{background:#efefef;text-align: center} |
|||
.trbody td{text-align: center;vertical-align:top;border-left:1px solid #f2f2f2;overflow: hidden;font-size:12px;} |
|||
.trorder{background:#f8f8f8;border:1px solid #f2f2f2;text-align:left;} |
|||
.ops{border-right:1px solid #f2f2f2;text-align: center;} |
|||
.ops a,.ops span{margin: 3px 0;} |
|||
.table-top{padding: 0 20px;background: #f7f7f7;border-bottom: 1px solid #e5e5e5;} |
|||
.table-top .op:hover{color: #000;} |
|||
.tables{border:1px solid #e5e5e5;font-size: 14px;line-height: 18px;} |
|||
.tables:hover{border:1px solid #1ab394;} |
|||
.table-row,.table-header,.table-footer,.table-top{display: -webkit-box;display: -webkit-flex;display: -ms-flexbox;display: flex;justify-content: center;-webkit-justify-content: center;-webkit-align-content: space-around;align-content: space-around;} |
|||
.tables .table-row.table-top>div{padding: 10.5px 0;} |
|||
.tables .table-row .ops.list-inner{border-right:none;} |
|||
.tables .table-row .buyremark{background:#fdeeee;color:red;flex: 1;padding: 10px 20px!important;} |
|||
.tables .table-row .remark{background:#ffffcc;color:red;flex: 1;padding: 10px 20px!important;} |
|||
.tables .list-inner{border-right: 1px solid #efefef;vertical-align: middle;} |
|||
.table-row .goods-des .title{width:180px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;} |
|||
.table-row .goods-des{border-right: 1px solid #efefef;vertical-align: middle;width:400px;text-align: left;padding: 14px 0;} |
|||
.table-row .list-inner{-webkit-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;text-align: center;display: -webkit-box;display: -webkit-flex;display: -ms-flexbox;display: flex;-webkit-align-items: center;align-items: center;-webkit-justify-content: center;justify-content: center;-webkit-flex-direction: column;flex-direction: column;} |
|||
.saler>div{width:130px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;} |
|||
.table-row .list-inner.ops, .table-row .list-inner.paystyle{-webkit-flex-direction: column;flex-direction: column;-webkit-justify-content: center;justify-content: center;} |
|||
.table-header{background:#f8f8f8;height: 40px;line-height: 40px;padding: 0 20px;font-weight: 600;} |
|||
.table-header .others{-webkit-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;text-align: center;} |
|||
.table-footer{border-top: 1px solid #efefef;margin:0 20px;padding: 10.5px 0;} |
|||
.table-footer>div, .table-top>div{-webkit-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;height:100%;} |
|||
.fixed-header div{padding:0;} |
|||
.fixed-header.table-header{display: none;} |
|||
.fixed-header.table-header.active{display: -webkit-box;display: -webkit-flex;display: -ms-flexbox;display: flex;} |
|||
.shop{display: inline-block;width:48px;height:18px;text-align: center;border:1px solid #1b86ff;color: #1b86ff;margin-right: 10px;} |
|||
.min_program{display: inline-block;width:48px;height:18px;text-align: center;border:1px solid #ff5555;color: #ff5555;margin-right: 10px;} |
|||
.ordertype{display: inline-block;height:18px;margin-right: 10px;border-radius: 0;font-weight: 500;} |
|||
.popover{border: 1px solid #efefef;border: 1px solid #efefef;border-radius: 6px;-webkit-filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));-moz-filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .1));-o-filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .1));filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));padding: 0!important;} |
|||
.popover-content{padding: 10px!important;font-size:12px;} |
|||
.popover-content table{margin-bottom: 0!important;} |
|||
.popover.right>.arrow{border-right-color: #efefef;} |
|||
.cored{color: orangered;} |
|||
</style> |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="javascript:;">售后记录</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="order" /> |
|||
<input type="hidden" name="ac" value="wlOrder" /> |
|||
<input type="hidden" name="do" value="appointlist" /> |
|||
<input type="hidden" name="plugin" value="{$_GPC['plugin']}" /> |
|||
<input type="hidden" name="status" value="{$_GPC['status']}" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">预约状态</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('status:10');}" class="btn {if $_GPC['status'] == '10'}btn-primary{else}btn-default{/if}">不限</a> |
|||
<a href="{php echo wl_filter_url('status:0');}" class="btn {if empty($_GPC['status'])}btn-primary{else}btn-default{/if}">申请中</a> |
|||
<a href="{php echo wl_filter_url('status:1');}" class="btn {if $_GPC['status'] == '1'}btn-primary{else}btn-default{/if}">已预约</a> |
|||
<a href="{php echo wl_filter_url('status:2');}" class="btn {if $_GPC['status'] == '2'}btn-primary{else}btn-default{/if}">已驳回</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">订单类型</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('plugin:');}" class="btn {if empty($_GPC['plugin'])}btn-primary{else}btn-default{/if}">不限</a> |
|||
<a href="{php echo wl_filter_url('plugin:1');}" class="btn {if $_GPC['plugin'] == '1'}btn-primary{else}btn-default{/if}">抢购</a> |
|||
{if p('groupon')} |
|||
<a href="{php echo wl_filter_url('plugin:2');}" class="btn {if $_GPC['plugin'] == '2'}btn-primary{else}btn-default{/if}">团购</a> |
|||
{/if} |
|||
<a href="{php echo wl_filter_url('plugin:3');}" class="btn {if $_GPC['plugin'] == '3'}btn-primary{else}btn-default{/if}">拼团</a> |
|||
{if p('bargain')} |
|||
<a href="{php echo wl_filter_url('plugin:7');}" class="btn {if $_GPC['plugin'] == '7'}btn-primary{else}btn-default{/if}">砍价</a> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">条件搜索</label> |
|||
<div class="col-sm-9"> |
|||
<select name="keywordtype" class="form-control"> |
|||
<option value="1" {if $_GPC['keywordtype']==1}selected="selected"{/if}>订单号</option> |
|||
<option value="2" {if $_GPC['keywordtype']==2}selected="selected"{/if}>商户ID</option> |
|||
<option value="3" {if $_GPC['keywordtype']==3}selected="selected"{/if}>买家ID</option> |
|||
</select> |
|||
<input type="text" name="keyword" class="form-control" value="{$_GPC['keyword']}" placeholder="请输入关键字"/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">时间筛选</label> |
|||
<div class="col-md-3"> |
|||
<select name="timetype" class="form-control"> |
|||
<option value="">请选择时间类型</option> |
|||
<option value="1" {if $_GPC['timetype']==1}selected="selected"{/if}>预约申请时间</option> |
|||
<option value="2" {if $_GPC['timetype']==2}selected="selected"{/if}>预约消费时间</option> |
|||
</select> |
|||
</div> |
|||
<div class="col-md-2"> |
|||
{php echo tpl_select_time_info('time_limit', array('starttime' => date('Y-m-d',$starttime), 'endtime' => date('Y-m-d', $endtime)));} |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary" id="search">筛选</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="row"> |
|||
<div class="col-md-12"> |
|||
<div class=""> |
|||
<div class="table-header"> |
|||
<div style='width: 400px;text-align: left;'>商品</div> |
|||
<div class="others">买家</div> |
|||
<div class="others">商家</div> |
|||
<div class="others">预约消费时间/数量</div> |
|||
<div class="others">状态</div> |
|||
<div class="others">操作</div> |
|||
</div> |
|||
{loop $appointlist $item} |
|||
<div class="table-row"><div style='height:20px;padding:0;border-top:none;'></div></div> |
|||
<div class="tables"> |
|||
<!-- 头部 --> |
|||
<div class='table-row table-top'> |
|||
<div style="text-align: left;color: #8f8e8e;"> |
|||
<span style="font-weight: bold;margin-right: 10px;color: #2d2d31"> |
|||
<span class="label label-{$item['plugincss']} ordertype">{$item['plugintext']}</span>预约申请时间:{php echo date('Y-m-d H:i:s',$item['appointtime'])} |
|||
</span> |
|||
订单编号:{$item['orderno']} |
|||
</div> |
|||
</div> |
|||
<!-- 主体 --> |
|||
<div class='table-row' style="margin:0 20px"> |
|||
<!-- 商品信息 --> |
|||
<div class="goods-des"> |
|||
<div style="display: -webkit-box;display: -webkit-flex;display: -ms-flexbox;display: flex;margin: 10px 0"> |
|||
<img src="{php echo tomedia($item['goodsimg'])}" style='width:70px;height:70px;border:1px solid #efefef; padding:1px;'onerror="this.src='../addons/weliam_smartcity/web/resource/images/nopic.jpg'"> |
|||
<div style="-webkit-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;margin-left: 10px;text-align: left;display: flex;align-items: center"> |
|||
<div> |
|||
<div class="title"> |
|||
{$item['goodsname']}<br/> |
|||
{if $item['goodsid']>0}ID:{$item['goodsid']}<br/>{/if} |
|||
<span style="color: #999"> |
|||
{if !empty($item['optiontitle'])}规格:{$item['optiontitle']}{/if} |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<span style="float: right;text-align: right;display: inline-block;width:130px;"> |
|||
¥{$item['goodsprice']}<br/> |
|||
x{$item['num']} |
|||
</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- 买家信息 --> |
|||
<div class="list-inner saler" style='text-align: center;' > |
|||
<div> |
|||
<a {if $_W['aid']} href="javascript:;" {else} href="{php echo web_url('member/wlMember/memberIndex',array('mid'=>$item['mid']))}" {/if} > {$item['nickname']}</a> |
|||
<br/> |
|||
{$item['realname']}<br/>{$item['mobile']}<br/>MID:{$item['mid']} |
|||
</div> |
|||
</div> |
|||
<!-- 商户 --> |
|||
<div class="list-inner saler" style='text-align: center;' > |
|||
<div> |
|||
{$item['storename']}<br/>SID:{$item['sid']} |
|||
</div> |
|||
</div> |
|||
<!-- 支付 --> |
|||
<div class="list-inner paystyle" style='text-align:center;' > |
|||
<span style="color:orangered;display: inline">{$item['date']}</span> |
|||
<span style="color:orangered;display: inline">{$item['starttime']} ~ {$item['endtime']}</span> |
|||
<span class='label label-success'>{$item['num']}份</span> |
|||
</div> |
|||
<!--状态--> |
|||
<div class='list-inner' style='line-height:20px;text-align:center' > |
|||
{if $item['status'] == 0} |
|||
<span class='label label-warning'>待处理</span> |
|||
{else if $item['status'] == 1} |
|||
<span class='label label-success'>已预约</span> |
|||
{else if $item['status'] == 2} |
|||
<span class='label label-danger'>已拒绝</span> |
|||
{else if $item['status'] == 3} |
|||
<span class='label label-primary'>用户取消</span> |
|||
{/if} |
|||
{if $item['dotime']} |
|||
{php echo date('Y-m-d H:i:s',$item['dotime'])} |
|||
{/if} |
|||
</div> |
|||
<!--操作--> |
|||
<div class="ops list-inner" style='text-align:center' > |
|||
{if $item['status'] == 0} |
|||
<a class='op' data-confirm="确认完成预约?" data-toggle='ajaxPost' href="{php echo web_url('order/wlOrder/examineAppoint',array('id'=>$item['id']))}">确认</a> |
|||
<a href="{php echo web_url('order/wlOrder/rejectAppoint',array('id'=>$item['id']))}" data-toggle="ajaxModal">驳回</a> |
|||
{/if} |
|||
<a class='op' href="{$item['detailurl']}" target='_blank' >订单详情</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/loop} |
|||
<div style="padding: 20px 0;text-align: right" > |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
|
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,45 @@ |
|||
<form class="form-horizontal form-validate" action="{php echo web_url('order/wlOrder/changecommission')}" method="post" enctype="multipart/form-data"> |
|||
<input type='hidden' name='id' value='{$id}' /> |
|||
<div class="modal-dialog" style='width: 920px;'> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button> |
|||
<h3>修改佣金</h3> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<style> |
|||
.table{margin-bottom: 0} |
|||
.table td, .table th{text-align: center;} |
|||
</style> |
|||
<table class="table table-hover table-bordered"> |
|||
<tbody> |
|||
<tr> |
|||
<th>一级分销商</th> |
|||
<td> |
|||
{$order['onemember']} |
|||
</td> |
|||
<td colspan="2"> |
|||
<input type="text" name="onemoney" value="{$leadmoney['one']}" class="form-control"> |
|||
</td> |
|||
</tr> |
|||
{if $order['twoleadid']} |
|||
<tr> |
|||
<th>二级分销商</th> |
|||
<td> |
|||
{$order['twomember']} |
|||
</td> |
|||
<td colspan="2"> |
|||
<input type="text" name="twomoney" value="{$leadmoney['two']}" class="form-control"> |
|||
</td> |
|||
</tr> |
|||
{/if} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button class="btn btn-primary" type="submit">确定</button> |
|||
<input type="hidden" name="token" value="{$_W['token']}" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
@ -0,0 +1,39 @@ |
|||
<form class="form-horizontal form-validate" action="{php echo web_url('order/wlOrder/changeexpress')}" method="post" enctype="multipart/form-data"> |
|||
<input type='hidden' name='expressid' value='{$expressid}' /> |
|||
<div class="modal-dialog" style='width: 920px;'> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button> |
|||
<h3>修改收货信息</h3> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<table class="table table-hover table-bordered"> |
|||
<tbody> |
|||
<tr> |
|||
<th>收货人姓名</th> |
|||
<td colspan="2"> |
|||
<input type="text" name="name" value="{$express['name']}" class="form-control"> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th>收货人电话</th> |
|||
<td colspan="2"> |
|||
<input type="text" name="tel" value="{$express['tel']}" class="form-control"> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th>收货人地址</th> |
|||
<td colspan="2"> |
|||
<input type="text" name="address" value="{$express['address']}" class="form-control"> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button class="btn btn-primary" type="submit">确定</button> |
|||
<input type="hidden" name="token" value="{$_W['token']}" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
@ -0,0 +1,48 @@ |
|||
<form class="form-horizontal form-validate" action="{php echo web_url('order/wlOrder/changeprice')}" method="post" enctype="multipart/form-data"> |
|||
<input type='hidden' name='id' value='{$id}' /> |
|||
<input type='hidden' name='type' value='{$type}' /> |
|||
<div class="modal-dialog" style='width: 920px;'> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button> |
|||
<h3>订单改价</h3> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<style> |
|||
.table{margin-bottom: 0} |
|||
.table td, .table th{text-align: center;} |
|||
</style> |
|||
<table class="table table-hover table-bordered"> |
|||
<tbody> |
|||
<tr> |
|||
<th>商品改价</th> |
|||
<td> |
|||
<label class="radio-inline"><input type="radio" name="price_type" value="2" {if $order['changeprice'] < 0 || $order['changeprice'] == 0} checked="" {/if}> 减少</label> |
|||
<label class="radio-inline"><input type="radio" name="price_type" value="1" {if $order['changeprice'] > 0 } checked="" {/if}> 增加</label> |
|||
</td> |
|||
<td colspan="2"> |
|||
<input type="text" name="price_value" value="{php echo abs($order['changeprice']) }" class="form-control"> |
|||
</td> |
|||
</tr> |
|||
{if $order['expressid']} |
|||
<tr> |
|||
<th>运费改价</th> |
|||
<td> |
|||
<label class="radio-inline"><input type="radio" name="express_type" value="2" {if $order['changedispatchprice'] < 0 || $order['changedispatchprice'] == 0} checked="" {/if}> 减少</label> |
|||
<label class="radio-inline"><input type="radio" name="express_type" value="1" {if $order['changedispatchprice'] > 0 } checked="" {/if}> 增加</label> |
|||
</td> |
|||
<td colspan="2"> |
|||
<input type="text" name="express_value" value="{php echo abs($order['changedispatchprice'])}" class="form-control"> |
|||
</td> |
|||
</tr> |
|||
{/if} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button class="btn btn-primary" type="submit">确定</button> |
|||
<input type="hidden" name="token" value="{$_W['token']}" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
@ -0,0 +1,39 @@ |
|||
<form class="form-horizontal form-validate" action="{php echo web_url('order/wlOrder/changetime')}" method="post" enctype="multipart/form-data"> |
|||
<input type='hidden' name='id' value='{$id}' /> |
|||
<input type='hidden' name='type' value='{$type}' /> |
|||
<div class="modal-dialog" style='width: 920px;'> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button> |
|||
<h3>修改时限</h3> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<style> |
|||
.table{margin-bottom: 0} |
|||
.table td, .table th{text-align: center;} |
|||
</style> |
|||
<table class="table table-hover table-bordered"> |
|||
<tbody> |
|||
<tr> |
|||
<th>修改过期时间</th> |
|||
<td> |
|||
{php echo tpl_form_field_date('estimatetime', date('Y-m-d H:i:s',$order['estimatetime']),true);} |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th>适用范围</th> |
|||
<td> |
|||
<label class="radio-inline"><input type="radio" name="classtype" value="0" checked="">仅本订单</label> |
|||
<label class="radio-inline"><input type="radio" name="classtype" value="1" >同商品所有订单</label> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button class="btn btn-primary" type="submit">确定</button> |
|||
<input type="hidden" name="token" value="{$_W['token']}" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
@ -0,0 +1,282 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs" id="myTab"> |
|||
<li><a href="javascript:;">销售详情</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="order" /> |
|||
<input type="hidden" name="ac" value="wlOrder" /> |
|||
<input type="hidden" name="do" value="checkcodeList" /> |
|||
<input type="hidden" name="id" value="{$id}" /> |
|||
<input type="hidden" name="plugin" value="{$plugin}" /> |
|||
<input type="hidden" name="type" value="{$type}" /> |
|||
<input type="hidden" name="status" value="{$status}" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">商品信息</label> |
|||
<div class="col-sm-9"> |
|||
<img src="{$goodinfo['thumb']}" style="width: 30px;height: 30px;"> {$goodinfo['name']}(ID:{$id}) |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">商户</label> |
|||
<div class="col-sm-9"> |
|||
<img src="{$merchant['logo']}" style="width: 30px;height: 30px;"> {$merchant['storename']}(SID:{$goodinfo['sid']}) |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">销售类型</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('type:1');}" class="btn {if $type == 1}btn-primary{else}btn-default{/if}">核销订单</a> |
|||
{if $plugin != 'coupon' && $plugin != 'activity'} |
|||
<a href="{php echo wl_filter_url('type:2');}" class="btn {if $type == 2}btn-primary{else}btn-default{/if}">其他订单</a> |
|||
{/if} |
|||
{if $plugin == 'wlfightgroup'} |
|||
<a href="{php echo wl_filter_url('type:3');}" class="btn {if $type == 3}btn-primary{else}btn-default{/if}">组团中订单</a> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{if $type != 3} |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">销售状态</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('status:1');}" class="btn {if $status == 1}btn-primary{else}btn-default{/if}">已下单</a> |
|||
<a href="{php echo wl_filter_url('status:2');}" class="btn {if $status == 2}btn-primary{else}btn-default{/if}">已支付</a> |
|||
<a href="{php echo wl_filter_url('status:3');}" class="btn {if $status == 3}btn-primary{else}btn-default{/if}">已完成</a> |
|||
<a href="{php echo wl_filter_url('status:4');}" class="btn {if $status == 4}btn-primary{else}btn-default{/if}">已退款</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">筛选</label> |
|||
<div class="col-sm-9"> |
|||
<select name="keywordtype" class="form-control"> |
|||
<option value="1" {if $_GPC['keywordtype']==1}selected="selected"{/if}>订单号</option> |
|||
{if $type == 1} |
|||
<option value="2" {if $_GPC['keywordtype']==2}selected="selected"{/if}>核销码</option> |
|||
{/if} |
|||
<option value="3" {if $_GPC['keywordtype']==3}selected="selected"{/if}>购买人昵称</option> |
|||
<option value="4" {if $_GPC['keywordtype']==4}selected="selected"{/if}>购买人MID</option> |
|||
<option value="5" {if $_GPC['keywordtype']==5}selected="selected"{/if}>规格spid</option> |
|||
</select> |
|||
<input type="text" name="keyword" class="form-control" value="{$_GPC['keyword']}" placeholder="请输入关键字"/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">时间</label> |
|||
<div class="col-sm-9"> |
|||
<select name="timetype" class="form-control" style = "width:120px;display:inline-block;"> |
|||
<option value="0" {if $_GPC['timetype']==0 || empty($_GPC['timetype'])}selected="selected"{/if}>关闭</option> |
|||
<option value="1" {if $_GPC['timetype']==1}selected="selected"{/if}>支付时间</option> |
|||
{if $type == 1} |
|||
<option value="2" {if $_GPC['timetype']==2}selected="selected"{/if}>核销时间</option> |
|||
{else if $type == 2} |
|||
<option value="3" {if $_GPC['timetype']==3}selected="selected"{/if}>发货时间</option> |
|||
<option value="4" {if $_GPC['timetype']==4}selected="selected"{/if}>收货时间</option> |
|||
{else} |
|||
<option value="5" {if $_GPC['timetype']==5}selected="selected"{/if}>即将失败时间</option> |
|||
{/if} |
|||
</select> |
|||
{php echo tpl_select_time_info('time_limit', array('starttime' => date('Y-m-d',$starttime), 'endtime' => date('Y-m-d', $endtime)));} |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary" id="search">筛选</button> |
|||
<button class="btn btn-default min-width" name="export" type="submit" value="export"><i class="fa fa-download"></i> 导出记录</button> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<div>共计商品<span style="color:red;">{$tatal}</span>个</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
{if $type == 1} |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th style="width:15%;">订单编号</th> |
|||
<th style="width:5%;">规格</th> |
|||
<th style="width:15%;">用户信息</th> |
|||
<th style="width:10%;">核销码</th> |
|||
<th style="width:5%;">订单金额</th> |
|||
<th style="width:5%;">状态</th> |
|||
<th style="width:10%;">核销时间</th> |
|||
<th style="width:5%;">核销方式</th> |
|||
<th style="width:15%;">核销员</th> |
|||
<th style="width:10%;">创建时间</th> |
|||
<th style="width:5%;">操作</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $list $de} |
|||
<tr> |
|||
<td>{$de['orderno']}</td> |
|||
<td>{$de['specname']}</td> |
|||
<td><img src="{$de['avatar']}" style="width: 30px;height: 30px;"> {$de['nickname']}(MID:{$de['mid']})</td> |
|||
<td>{$de['checkcode']}</td> |
|||
<td>¥{$de['orderprice']}</td> |
|||
<td> |
|||
<span class="label label-{$de['statuscss']}">{$de['statustext']}</span> |
|||
</td> |
|||
<td style="color: red;"> |
|||
{if $de['hexiaotime']>0} |
|||
{$de['hexiaotime']} |
|||
{else} |
|||
- 无 - |
|||
{/if} |
|||
</td> |
|||
<td style="color: green;"> |
|||
{if $de['hexiaotype']>0} |
|||
<span class="label label-{$de['hxtypecss']}">{$de['hxtypetext']}</span> |
|||
{else} |
|||
- 无 - |
|||
{/if} |
|||
</td> |
|||
<td> |
|||
{if $de['hxuid']>0} |
|||
<img src="{$de['hxuserimg']}" style="width: 30px;height: 30px;"> {$de['hxuser']} |
|||
{else} |
|||
- 无 - |
|||
{/if} |
|||
</td> |
|||
<td>{$de['createtime']}</td> |
|||
<td><a href="{$de['orderurl']}">查看订单</a></td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
{else if $type == 2} |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th style="width:15%;">订单编号</th> |
|||
<th style="width:10%;">规格</th> |
|||
<th style="width:15%;">用户信息</th> |
|||
<th style="width:10%;">商品数量</th> |
|||
<th style="width:5%;">支付金额</th> |
|||
<th style="width:5%;">状态</th> |
|||
<th style="width:8%;">支付时间</th> |
|||
<th style="width:8%;">发货时间</th> |
|||
<th style="width:8%;">收货时间</th> |
|||
<th style="width:8%;">下单时间</th> |
|||
<th style="width:8%;">操作</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $list $de} |
|||
<tr> |
|||
<td>{$de['orderno']}</td> |
|||
<td>{$de['specname']}</td> |
|||
<td><img src="{$de['avatar']}" style="width: 30px;height: 30px;"> {$de['nickname']}(MID:{$de['mid']})</td> |
|||
<td>{$de['num']}</td> |
|||
<td>¥{$de['price']}</td> |
|||
<td> |
|||
<span class="label label-{$de['statuscss']}">{$de['statustext']}</span> |
|||
</td> |
|||
<td style="color: red;"> |
|||
{if $de['paytime']>0} |
|||
{$de['paytime']} |
|||
{else} |
|||
- 无 - |
|||
{/if} |
|||
</td> |
|||
<td style="color: green;"> |
|||
{if $de['sendtime']>0} |
|||
{$de['sendtime']} |
|||
{else} |
|||
- 无 - |
|||
{/if} |
|||
</td> |
|||
<td> |
|||
{if $de['receivetime']>0} |
|||
{$de['receivetime']} |
|||
{else} |
|||
- 无 - |
|||
{/if} |
|||
</td> |
|||
<td>{$de['createtime']}</td> |
|||
<td><a href="{$de['orderurl']}">查看订单</a></td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
{else} |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th style="width:15%;">订单编号</th> |
|||
<th style="width:10%;">规格</th> |
|||
<th style="width:15%;">用户信息</th> |
|||
<th style="width:10%;">商品数量</th> |
|||
<th style="width:5%;">支付金额</th> |
|||
<th style="width:5%;">状态</th> |
|||
<th style="width:10%;">支付时间</th> |
|||
<th style="width:10%;">预计失败时间</th> |
|||
<th style="width:10%;">下单时间</th> |
|||
<th style="width:10%;">操作</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $list $de} |
|||
<tr> |
|||
<td>{$de['orderno']}</td> |
|||
<td>{$de['specname']}</td> |
|||
<td><img src="{$de['avatar']}" style="width: 30px;height: 30px;"> {$de['nickname']}(MID:{$de['mid']})</td> |
|||
<td>{$de['num']}</td> |
|||
<td>¥{$de['price']}</td> |
|||
<td> |
|||
<span class="label label-{$de['statuscss']}">{$de['statustext']}</span> |
|||
</td> |
|||
<td style="color: red;"> |
|||
{if $de['paytime']>0} |
|||
{$de['paytime']} |
|||
{else} |
|||
- 无 - |
|||
{/if} |
|||
</td> |
|||
<td> |
|||
{if $de['failtime']>0} |
|||
{$de['failtime']} |
|||
{else} |
|||
- 无 - |
|||
{/if} |
|||
</td> |
|||
<td>{$de['createtime']}</td> |
|||
<td><a href="{$de['orderurl']}">查看订单</a></td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
{/if} |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,245 @@ |
|||
{php include wl_template('common/header');} |
|||
<style> |
|||
.express_main{border: 1px solid #f3f4f9;} |
|||
.express_body_top{background:#f4f5f9;padding:10px;} |
|||
.express_btn_out,.area_item{line-height: 34px;} |
|||
.area_item{padding-left: 130px;} |
|||
.express_btn_money{padding: 0 10px;} |
|||
.express_main_item{padding: 10px;border-bottom: 1px solid #f7f7f7;} |
|||
.express_main_item:last-child{border-bottom:0px;} |
|||
.express_modal .province{padding: 5px 10px;border: 1px solid #eee;color: #666666;white-space: nowrap;overflow: hidden;cursor: pointer;margin-bottom: 0;font-weight: normal;border-radius: 2px;} |
|||
.express_modal .province input{display:none;} |
|||
.modal-body{overflow:hidden;} |
|||
.express_modal .province_btn{margin-bottom: 9px;} |
|||
.area_selected{background: #44b549;color: #fff!important;border: 1px solid #44b549!important;} |
|||
.item_cell_box{display: flex;} |
|||
.item_cell_flex{-webkit-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;} |
|||
.form-group{max-width: 1980px!important;} |
|||
</style> |
|||
<ul class="nav nav-tabs"> |
|||
<li ><a href="{php echo web_url('order/orderFreightTemplate/freightlist')}">模板列表</a></li> |
|||
<li class="active"><a href="{php echo web_url('order/orderFreightTemplate/creatfreight')}">添加模板</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-form"> |
|||
<form method="post" action="" class="form-horizontal form form-validate"> |
|||
<div class="form-group-title">运费模板</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-1 control-label">运费名称</label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" class="form-control" name="expressname" value="{$info['name']}"> |
|||
<p class="help-block"> 填入文字,便于辨识</p> |
|||
</div> |
|||
</div> |
|||
{if empty($_W['aid']) && !is_store()} |
|||
<div class="form-group"> |
|||
<label class="col-sm-1 control-label">适用代理</label> |
|||
<div class="col-sm-10"> |
|||
<select name="aid" class="form-control"> |
|||
<option value="0"{if $info['aid'] == $agent['id'] }selected="selected"{/if}>总平台</option> |
|||
{loop $agents $agent} |
|||
<option value="{$agent['id']}" {if $info['aid'] == $agent['id'] }selected="selected"{/if}>{$agent['agentname']}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
<div class="form-group"> |
|||
<label class="col-sm-1 control-label"></label> |
|||
<div class="col-sm-10 express_body"> |
|||
<div class="express_body_top"> |
|||
设置运费 |
|||
</div> |
|||
<div class="express_main"> |
|||
<div class="express_main_item"> |
|||
<div class="item_cell_box"> |
|||
<li class="item_cell_flex express_btn_out">默认区域</li> |
|||
<li class="express_btn_money input-group col-sm-10"> |
|||
<span class="input-group-addon">下单量</span> |
|||
<input type="number" class="form-control" name="defaultnum" value="{$info['defaultnum']}"> |
|||
<span class="input-group-addon">件内,邮费</span> |
|||
<input type="number" class="form-control" name="defaultmoney" value="{$info['defaultmoney']}"> |
|||
<span class="input-group-addon">元,每增加</span> |
|||
<input type="number" class="form-control" name="defaultnumex" value="{$info['defaultnumex']}"> |
|||
<span class="input-group-addon">件,加邮费</span> |
|||
<input type="number" class="form-control" name="defaultmoneyex" value="{$info['defaultmoneyex']}"> |
|||
<span class="input-group-addon">元,订单满</span> |
|||
<input type="number" class="form-control" name="freenumber" value="{$info['freenumber']}"> |
|||
<span class="input-group-addon">件包邮</span> |
|||
</li> |
|||
</div> |
|||
</div> |
|||
{if $info['expressarray']} |
|||
{loop $info['expressarray'] $list} |
|||
<div class="express_main_item"> |
|||
<div class="item_cell_box"> |
|||
<li class="item_cell_flex express_btn_out"> |
|||
<a href="javascript:;" class="a_href edit_province" data-toggle="modal" data-target="#myModal">编辑地区 </a> |
|||
<input type="hidden" name="express[area][]" class="col-sm-2 area_value_input" value="{$list['area']}" /> |
|||
- <a href="javascript:;" class="delete_express">删除</a> |
|||
</li> |
|||
<li class="express_btn_money input-group col-sm-10"> |
|||
<span class="input-group-addon"> 下单量 </span> |
|||
<input type="number" class="form-control" name="express[num][]" value="{$list['num']}"> |
|||
<span class="input-group-addon"> 件内,邮费 </span> |
|||
<input type="number" class="form-control" name="express[money][]" value="{$list['money']}"> |
|||
<span class="input-group-addon"> 元,每增加 </span> |
|||
<input type="number" class="form-control" name="express[numex][]" value="{$list['numex']}"> |
|||
<span class="input-group-addon"> 件,加邮费 </span> |
|||
<input type="number" class="form-control" name="express[moneyex][]" value="{$list['moneyex']}"> |
|||
<span class="input-group-addon">元,订单满</span> |
|||
<input type="number" class="form-control" name="express[freenumber][]" value="{$list['freenumber']}"> |
|||
<span class="input-group-addon">件包邮</span> |
|||
</li> |
|||
</div> |
|||
<div class="area_item"> |
|||
<span class="help-block">{$list['area']}</span> |
|||
</div> |
|||
</div> |
|||
{/loop} |
|||
{/if} |
|||
</div> |
|||
<p class="help-block">提示:当下单地址不在相应区域内时,会使用默认区域费用。</p> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<input class="btn btn-success btn-sm min-width" value="增加一个区域" type="button" id="addonearea"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<input type="submit" name="submit" value="提交" class="btn btn-primary min-width" /> |
|||
<input type="hidden" name="token" value="{$_W['token']}" /> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
{php $areaArray = array('北京','天津','河北','山西','内蒙古自治区','辽宁','吉林','黑龙江','上海','江苏','浙江','安徽','福建','江西','山东','河南','湖北','湖南','广东','广西壮族自治区','海南','重庆','四川','贵州','云南','西藏自治区','陕西','甘肃','青海','宁夏回族自治区','新疆维吾尔自治区','台湾','香港特别行政区','澳门特别行政区','海外')}; |
|||
<div class="modal fade express_modal " id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> |
|||
<div class="modal-dialog" role="document"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
|||
<h4 class="modal-title" id="myModalLabel">选择地区</h4> |
|||
</div> |
|||
<div class="modal-body"> |
|||
{loop $areaArray $item} |
|||
<div class="col-sm-3 province_btn"><label class="province">{$item} <input type="checkbox" value="{$item}"></label></div> |
|||
{/loop} |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button type="button"data-dismiss="modal" aria-label="Close" class="btn btn-primary area_confirm">确定</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
/*运费模板*/ |
|||
var province = ['北京市','天津市','河北','山西','内蒙古','辽宁','吉林','黑龙江','上海市','江苏','浙江','安徽','福建','江西','山东','河南','湖北','湖南','广东','广西','海南','重庆市','四川','贵州','云南','西藏','陕西','甘肃','青海','宁夏','新疆','台湾','香港','澳门','海外']; |
|||
|
|||
//添加一个地区 |
|||
$('#addonearea').click(function(){ |
|||
var addstr = |
|||
'<div class="express_main_item">' |
|||
+'<div class="item_cell_box">' |
|||
+'<li class="item_cell_flex express_btn_out">' |
|||
+'<a href="javascript:;" class="a_href edit_province" data-toggle="modal" data-target="#myModal">编辑地区 </a>' |
|||
+'<input type="hidden" name="express[area][]" class="col-sm-2 area_value_input" value="" />' |
|||
+' - <a href="javascript:;" class="a_href delete_express">删除</a>' |
|||
+'</li>' |
|||
+'<li class="express_btn_money input-group col-sm-10">' |
|||
+'<span class="input-group-addon"> 下单量 </span>' |
|||
+'<input type="number" class="form-control" name="express[num][]" value="">' |
|||
+'<span class="input-group-addon"> 件内,邮费 </span>' |
|||
+'<input type="number" class="form-control" name="express[money][]" value="">' |
|||
+'<span class="input-group-addon"> 元,每增加 </span>' |
|||
+'<input type="number" class="form-control" name="express[numex][]" value="">' |
|||
+'<span class="input-group-addon"> 件,加邮费 </span>' |
|||
+'<input type="number" class="form-control" name="express[moneyex][]" value="">' |
|||
+'<span class="input-group-addon"> 元,订单满 </span>' |
|||
+'<input type="number" class="form-control" name="express[freenumber][]" value="">' |
|||
+'<span class="input-group-addon">件包邮</span>' |
|||
+'</li>' |
|||
+'</div>' |
|||
+'<div class="area_item">' |
|||
+'<span class="help-block"></span>' |
|||
+'</div>' |
|||
+'</div>'; |
|||
$('.express_main').append(addstr); |
|||
}); |
|||
|
|||
//删除地区选择项 |
|||
$('body').on('click','.delete_express',function(){ |
|||
$(this).parents('.express_main_item').remove(); |
|||
}) |
|||
|
|||
//编辑地区 |
|||
$('body').on('click','.edit_province',function(){ |
|||
thisclass = $(this); |
|||
thisinput = thisclass.next(); |
|||
var areaArrayed = []; |
|||
var selected = ''; |
|||
$('.area_value_input').not(thisinput).each(function(){ |
|||
selected += $(this).val(); |
|||
}); |
|||
selected = selected.replace(/,$/,''); |
|||
selectedArray=selected.split(","); //其余的值,数组 |
|||
|
|||
selfvalue = thisinput.val(); |
|||
selfvalue = selfvalue.replace(/,$/,''); |
|||
selfArray=selfvalue.split(","); //自己的值,数组 |
|||
|
|||
$('.express_modal .province').each(function(){ |
|||
$(this).removeClass('area_selected'); |
|||
if($.inArray($(this).find('input').val(),selectedArray) >= 0){ |
|||
|
|||
$(this).parent().hide(); |
|||
} |
|||
if($.inArray($(this).find('input').val(),selfArray) >= 0){ |
|||
$(this).addClass('area_selected').find('input').attr('checked',true); |
|||
$(this).parent().show(); |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
$('body').on('click','.express_modal .province',function(){ |
|||
var ischecked = $(this).find('input').is(':checked'); |
|||
if(ischecked){ |
|||
$(this).addClass('area_selected'); |
|||
}else{ |
|||
$(this).removeClass('area_selected'); |
|||
} |
|||
|
|||
}); |
|||
$('.area_confirm').click(function(){ |
|||
var str = ''; |
|||
$('.express_modal .area_selected input:checked').each(function(){ |
|||
str += $(this).val() + ','; |
|||
}); |
|||
thisclass.next().val(str); |
|||
thisclass.parents('.express_main_item').find('.area_item span').text(str); |
|||
//$('#myModal').modal('hide'); |
|||
}); |
|||
|
|||
//提交 |
|||
$('input[name=addexpress').click(function(){ |
|||
var expressname = $('input[name=expressname]').val(); |
|||
if(expressname == ''){ |
|||
alert('请填写模板名称');return false; |
|||
} |
|||
var isempty = 0; |
|||
$('.express_main_item input').each(function(){ |
|||
if($(this).val() == ''){ |
|||
isempty = 1;return; |
|||
} |
|||
}); |
|||
if(isempty == 1){ |
|||
alert('区域运费不能存在空项');return false; |
|||
} |
|||
}); |
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,44 @@ |
|||
|
|||
|
|||
<div class="modal-dialog"> |
|||
<div class="modal-content" style="overflow: auto;"> |
|||
<div class="modal-header"> |
|||
<button data-dismiss="modal" class="close" type="button">×</button> |
|||
<h4 class="modal-title">查看物流</h4> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<style type="text/css"> |
|||
.list-main {min-height:100px; background:#fff; padding:10px;} |
|||
.list {border-left:1px solid #eee; padding-left:20px; position:relative;} |
|||
.list .info {border-top:1px solid #eee; padding:10px; font-size:14px; color:#666;} |
|||
.list .infoon { color:#25ae5e} |
|||
.list .dot {height:10px; width:10px; border-radius:10px; background:#ddd; position:absolute; left:-6px; top:12px;} |
|||
.list .doton {height:12px; width:12px; background:#25ae5e; border-radius:12px; border:1px solid #bbe2c9; left:-8px;} |
|||
</style> |
|||
{if empty($list)} |
|||
{if empty($reason)} |
|||
<p>未查询到物流信息</p> |
|||
{else} |
|||
<p>接口调用错误:{$reason}</p> |
|||
{/if} |
|||
{else} |
|||
<div class="list-main"> |
|||
{loop $list $index $row} |
|||
<div class="list"> |
|||
<div class="info {if $index==0}infoon{/if}" {if $index==0}style='border:none'{/if}> |
|||
<div class='step'>{$row['AcceptStation']}</div> |
|||
<div class='time'>{$row['AcceptTime']}</div> |
|||
</div> |
|||
<div class="dot {if $index==0}doton{/if}"></div> |
|||
</div> |
|||
{/loop} |
|||
</div> |
|||
{/if} |
|||
|
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button data-dismiss="modal" class="btn btn-default" type="button">关闭</button> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
@ -0,0 +1,80 @@ |
|||
{php include wl_template('common/header');} |
|||
<style> |
|||
.prstyle{color: orangered;} |
|||
</style> |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="{php echo web_url('order/orderFreightTemplate/freightlist')}">模板列表</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-action"> |
|||
<a href="{php echo web_url('order/orderFreightTemplate/creatfreight')}" class="btn btn-primary">添加模板</a> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table id="de1" class="table table-hover table-bordered"> |
|||
<thead> |
|||
<tr> |
|||
<th class="text-center" style="width:50px;">序号</th> |
|||
<th class="text-center" style="width:100px;">模板名称</th> |
|||
<th class="text-center" style="width:250px;">默认区域邮费</th> |
|||
<th class="text-center" style="width:120px;">最新修改时间</th> |
|||
<th class="text-center" style="width:80px;">操作</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $list $k $item} |
|||
<tr class="text-center" > |
|||
<td> |
|||
<center>{php echo $k+1}</center> |
|||
</td> |
|||
<!--模板名称--> |
|||
<td> |
|||
{$item['name']} |
|||
</td> |
|||
<!--默认地区邮费--> |
|||
<td> |
|||
下单量在<span class="prstyle">{$item['defaultnum']}</span>件内,运费<span class="prstyle">{$item['defaultmoney']}</span>元,每增加<span class="prstyle">{$item['defaultnumex']}</span>件,加运费<span class="prstyle">{$item['defaultmoneyex']}</span>元 |
|||
{if $item['freenumber'] > 0},订单满<span class="prstyle">{$item['freenumber']}</span>件包邮。{/if} |
|||
</td> |
|||
<!--最新修改时间--> |
|||
<td> |
|||
{php echo date('Y-m-d H:i:s',$item['createtime'])} |
|||
</td> |
|||
<!--操作--> |
|||
<td> |
|||
<a href="{php echo web_url('order/orderFreightTemplate/creatfreight',array('id'=>$item['id']))}">编辑</a> - |
|||
<a href="javascript:;" itemid="{$item['id']}" class="shanchu">删除</a> |
|||
</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
$('#de1').delegate('.shanchu','click',function(e){ |
|||
e.stopPropagation(); |
|||
var id = $(this).attr('itemid'); |
|||
util.nailConfirm(this, function(state) { |
|||
if(!state) return; |
|||
$.post("{php echo web_url('order/orderFreightTemplate/deleteExpress')}", { id : id }, function(data){ |
|||
if(!data.errno){ |
|||
util.tips("删除成功!"); |
|||
location.reload(); |
|||
}; |
|||
}, 'json'); |
|||
}, {html: '确认删除?'}); |
|||
}); |
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,50 @@ |
|||
|
|||
|
|||
<div class="modal-dialog"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<button data-dismiss="modal" class="close" type="button">×</button> |
|||
<h4 class="modal-title">核销记录</h4> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<style type="text/css"> |
|||
.list-main {min-height:100px; background:#fff; padding:10px;} |
|||
.list {height:75px; border-left:1px solid #eee; padding-left:20px; position:relative;} |
|||
.list .info {height:75px; border-top:1px solid #eee; padding:10px; font-size:14px; color:#666;} |
|||
.list .info .step { height:40px;} |
|||
.list .info .time { height:20px;} |
|||
.list .infoon { color:#25ae5e} |
|||
.list .dot {height:10px; width:10px; border-radius:10px; background:#ddd; position:absolute; left:-6px; top:12px;} |
|||
.list .doton {height:12px; width:12px; background:#25ae5e; border-radius:12px; border:1px solid #bbe2c9; left:-8px;} |
|||
</style> |
|||
<p>剩余核销次数:{$usetimes}次</p> |
|||
{if empty($usedtime)} |
|||
<p>订单未开始核销</p> |
|||
{else} |
|||
<div class="list-main"> |
|||
{loop $usedtime $row} |
|||
<div class="list"> |
|||
<div class="info"> |
|||
{if $row['status'] == 1} |
|||
<div class='step'>订单待使用:核销码:{$row['checkcode']}</div> |
|||
{else if $row['status'] == 2} |
|||
<div class='step'>订单核销;核销方式:{$row['type']};核销人:{$row['ver']}{if $row['checkcode']};核销码:{$row['checkcode']}{/if}</div> |
|||
<div class='time'>{$row['time']}</div> |
|||
{else if $row['status'] == 3} |
|||
<div class='step'>订单已退款:核销码:{$row['checkcode']}</div> |
|||
<div class='time'>{$row['time']}</div> |
|||
{/if} |
|||
</div> |
|||
<div class="dot"></div> |
|||
</div> |
|||
{/loop} |
|||
</div> |
|||
{/if} |
|||
|
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button data-dismiss="modal" class="btn btn-default" type="button">关闭</button> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
@ -0,0 +1,481 @@ |
|||
{php include wl_template('common/header');} |
|||
<style type='text/css'> |
|||
.trhead td{background:#efefef;text-align: center} |
|||
.trbody td{text-align: center;vertical-align:top;border-left:1px solid #f2f2f2;overflow: hidden;font-size:12px;} |
|||
.trorder{background:#f8f8f8;border:1px solid #f2f2f2;text-align:left;} |
|||
.ops{border-right:1px solid #f2f2f2;text-align: center;} |
|||
.ops a,.ops span{margin: 3px 0;} |
|||
.table-top{padding: 0 20px;background: #f7f7f7;border-bottom: 1px solid #e5e5e5;} |
|||
.table-top .op:hover{color: #000;} |
|||
.tables{border:1px solid #e5e5e5;font-size: 14px;line-height: 18px;} |
|||
.tables:hover{border:1px solid #1ab394;} |
|||
.table-row,.table-header,.table-footer,.table-top{display: -webkit-box;display: -webkit-flex;display: -ms-flexbox;display: flex;justify-content: center;-webkit-justify-content: center;-webkit-align-content: space-around;align-content: space-around;} |
|||
.tables .table-row.table-top>div{padding: 10.5px 0;} |
|||
.tables .table-row .ops.list-inner{border-right:none;} |
|||
.tables .table-row .buyremark{background:#fdeeee;color:red;flex: 1;padding: 10px 20px!important;} |
|||
.tables .table-row .remark{background:#ffffcc;color:red;flex: 1;padding: 10px 20px!important;} |
|||
.tables .list-inner{border-right: 1px solid #efefef;vertical-align: middle;} |
|||
.table-row .goods-des .title{width:180px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;} |
|||
.table-row .goods-des{border-right: 1px solid #efefef;vertical-align: middle;width:400px;text-align: left;padding: 14px 0;} |
|||
.table-row .list-inner{-webkit-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;text-align: center;display: -webkit-box;display: -webkit-flex;display: -ms-flexbox;display: flex;-webkit-align-items: center;align-items: center;-webkit-justify-content: center;justify-content: center;-webkit-flex-direction: column;flex-direction: column;} |
|||
.saler>div{width:130px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;} |
|||
.table-row .list-inner.ops, .table-row .list-inner.paystyle{-webkit-flex-direction: column;flex-direction: column;-webkit-justify-content: center;justify-content: center;} |
|||
.table-header{background:#f8f8f8;height: 40px;line-height: 40px;padding: 0 20px;font-weight: 600;} |
|||
.table-header .others{-webkit-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;text-align: center;} |
|||
.table-footer{border-top: 1px solid #efefef;margin:0 20px;padding: 10.5px 0;} |
|||
.table-footer>div, .table-top>div{-webkit-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;height:100%;} |
|||
.fixed-header div{padding:0;} |
|||
.fixed-header.table-header{display: none;} |
|||
.fixed-header.table-header.active{display: -webkit-box;display: -webkit-flex;display: -ms-flexbox;display: flex;} |
|||
.shop{display: inline-block;width:48px;height:18px;text-align: center;border:1px solid #1b86ff;color: #1b86ff;margin-right: 10px;} |
|||
.min_program{display: inline-block;width:48px;height:18px;text-align: center;border:1px solid #ff5555;color: #ff5555;margin-right: 10px;} |
|||
.ordertype{display: inline-block;height:18px;margin-right: 10px;border-radius: 0;font-weight: 500;} |
|||
.popover{border: 1px solid #efefef;border: 1px solid #efefef;border-radius: 6px;-webkit-filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));-moz-filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .1));-o-filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .1));filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));padding: 0!important;} |
|||
.popover-content{padding: 10px!important;font-size:12px;} |
|||
.popover-content table{margin-bottom: 0!important;} |
|||
.popover.right>.arrow{border-right-color: #efefef;} |
|||
.cored{color: orangered;} |
|||
</style> |
|||
<ul class="nav nav-tabs"> |
|||
<li class="active"><a href="javascript:;">商品订单</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="alert alert-warning"> |
|||
注意一:批量发货功能在同一时间最大处理单数是999单,超过将出现不可估计的错误!<br /> |
|||
注意二:批量发货表中填写的物流公司名称需要与确认返回中的物流名称一致,否则将发货失败!<br /> |
|||
注意三:请将批量发货表中的单元格的格式设置为文本格式,否则可能读取错误导致发货失败!<br /> |
|||
注意四:订单统计信息仅统计商品信息(抢购、团购、卡券、砍价、拼团) |
|||
</div> |
|||
<div class="filter-action"> |
|||
当前订单:<span class="cored">{$total}</span>个,<!--共计商品<span class="cored">{$goodtotal}</span>份,--><span class="cored">{$allprice}</span>元; |
|||
</div> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="order" /> |
|||
<input type="hidden" name="ac" value="wlOrder" /> |
|||
<input type="hidden" name="do" value="orderlist" /> |
|||
<input type="hidden" name="plugin" value="{$_GPC['plugin']}" /> |
|||
<input type="hidden" name="paytype" value="{$_GPC['paytype']}" /> |
|||
<input type="hidden" name="status" value="{$_GPC['status']}" /> |
|||
<input type="hidden" name="fightgroupid" value="{$_GPC['fightgroupid']}" /> |
|||
<input type="hidden" name="agentid" value="{$_GPC['agentid']}" /> |
|||
<div class="form-group" style="max-width: 1180px;"> |
|||
<label class="col-sm-2 control-label">订单状态</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('status:');}" class="btn {if empty($_GPC['status'])}btn-primary{else}btn-default{/if}">不限</a> |
|||
<a href="{php echo wl_filter_url('status:zero');}" class="btn {if $_GPC['status'] == 'zero'}btn-primary{else}btn-default{/if}">未支付</a> |
|||
<a href="{php echo wl_filter_url('status:1');}" class="btn {if $_GPC['status'] == '1'}btn-primary{else}btn-default{/if}">已支付</a> |
|||
<a href="{php echo wl_filter_url('status:8');}" class="btn {if $_GPC['status'] == '8'}btn-primary{else}btn-default{/if}">待发货</a> |
|||
<a href="{php echo wl_filter_url('status:4');}" class="btn {if $_GPC['status'] == '4'}btn-primary{else}btn-default{/if}">待收货</a> |
|||
<a href="{php echo wl_filter_url('status:2');}" class="btn {if $_GPC['status'] == '2'}btn-primary{else}btn-default{/if}">待评价</a> |
|||
<a href="{php echo wl_filter_url('status:3');}" class="btn {if $_GPC['status'] == '3'}btn-primary{else}btn-default{/if}">已评价</a> |
|||
<a href="{php echo wl_filter_url('status:5');}" class="btn {if $_GPC['status'] == '5'}btn-primary{else}btn-default{/if}">已取消</a> |
|||
<a href="{php echo wl_filter_url('status:6');}" class="btn {if $_GPC['status'] == '6'}btn-primary{else}btn-default{/if}">待退款</a> |
|||
<a href="{php echo wl_filter_url('status:7');}" class="btn {if $_GPC['status'] == '7'}btn-primary{else}btn-default{/if}">已退款</a> |
|||
<a href="{php echo wl_filter_url('status:9');}" class="btn {if $_GPC['status'] == '9'}btn-primary{else}btn-default{/if}">已过期</a> |
|||
<a href="{php echo web_url('order/orderAfterSales/afterlist');}" class="btn btn-default">申请退款</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">订单类型</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('plugin:');}" class="btn {if empty($_GPC['plugin'])}btn-primary{else}btn-default{/if}">不限</a> |
|||
<a href="{php echo wl_filter_url('plugin:rush');}" class="btn {if $_GPC['plugin'] == 'rush'}btn-primary{else}btn-default{/if}">抢购</a> |
|||
<a href="{php echo wl_filter_url('plugin:groupon');}" class="btn {if $_GPC['plugin'] == 'groupon'}btn-primary{else}btn-default{/if}">团购</a> |
|||
<a href="{php echo wl_filter_url('plugin:wlfightgroup');}" class="btn {if $_GPC['plugin'] == 'wlfightgroup'}btn-primary{else}btn-default{/if}">拼团</a> |
|||
<a href="{php echo wl_filter_url('plugin:coupon');}" class="btn {if $_GPC['plugin'] == 'coupon'}btn-primary{else}btn-default{/if}">卡券</a> |
|||
{if p('bargain')} |
|||
<a href="{php echo wl_filter_url('plugin:bargain');}" class="btn {if $_GPC['plugin'] == 'bargain'}btn-primary{else}btn-default{/if}">砍价</a> |
|||
{/if} |
|||
{if p('activity')} |
|||
<a href="{php echo wl_filter_url('plugin:activity');}" class="btn {if $_GPC['plugin'] == 'activity'}btn-primary{else}btn-default{/if}">活动</a> |
|||
{/if} |
|||
{if p('citydelivery')} |
|||
<a href="{php echo wl_filter_url('plugin:citydelivery');}" class="btn {if $_GPC['plugin'] == 'citydelivery'}btn-primary{else}btn-default{/if}">同城配送</a> |
|||
{/if} |
|||
<a href="{php echo wl_filter_url('plugin:rights');}" class="btn {if $_GPC['plugin'] == 'rights'}btn-primary{else}btn-default{/if}">权益</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">支付方式</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('paytype:0');}" class="btn {if intval($_GPC['paytype']) == 0}btn-primary{else}btn-default{/if}">不限</a> |
|||
<a href="{php echo wl_filter_url('paytype:2');}" class="btn {if $_GPC['paytype'] == 2}btn-primary{else}btn-default{/if}">微信支付</a> |
|||
<a href="{php echo wl_filter_url('paytype:1');}" class="btn {if $_GPC['paytype'] == 1}btn-primary{else}btn-default{/if}">余额支付</a> |
|||
<a href="{php echo wl_filter_url('paytype:3');}" class="btn {if $_GPC['paytype'] == 3}btn-primary{else}btn-default{/if}">支付宝</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{if empty($_W['aid'])} |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">所属代理</label> |
|||
<div class="col-sm-9"> |
|||
<select name="agentid" class="form-control" style="width: 300px;"> |
|||
<option value="0" {if empty($_GPC['agentid'])}selected="selected"{/if}>所有代理</option> |
|||
<option value="-1" {if $_GPC['agentid']== -1 }selected="selected"{/if}>总后台</option> |
|||
{loop $agentlist $agent} |
|||
<option value="{$agent['id']}" {if $_GPC['agentid' ]== $agent['id'] }selected="selected"{/if}>{$agent['agentname']}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">订单搜索</label> |
|||
<div class="col-sm-9"> |
|||
<select name="keywordtype" class="form-control"> |
|||
<option value="1" {if $_GPC['keywordtype']==1}selected="selected"{/if}>订单号</option> |
|||
{if !is_store()} |
|||
<option value="4" {if $_GPC['keywordtype']==4}selected="selected"{/if}>商户ID</option> |
|||
{/if} |
|||
<option value="2" {if $_GPC['keywordtype']==2}selected="selected"{/if}>商品ID</option> |
|||
<option value="3" {if $_GPC['keywordtype']==3}selected="selected"{/if}>买家ID</option> |
|||
<option value="5" {if $_GPC['keywordtype']==5}selected="selected"{/if}>买家昵称</option> |
|||
<option value="6" {if $_GPC['keywordtype']==6}selected="selected"{/if}>买家电话</option> |
|||
<option value="9" {if $_GPC['keywordtype']==9}selected="selected"{/if}>预留电话</option> |
|||
{if !is_store()} |
|||
<option value="7" {if $_GPC['keywordtype']==7}selected="selected"{/if}>商家名称</option> |
|||
{/if} |
|||
<option value="8" {if $_GPC['keywordtype']==8}selected="selected"{/if}>核销码</option> |
|||
{if p('salesman')} |
|||
<option value="10" {if $_GPC['keywordtype']==10}selected="selected"{/if}>业务员ID</option> |
|||
{/if} |
|||
</select> |
|||
<input type="text" name="keyword" class="form-control" value="{$_GPC['keyword']}" placeholder="请输入关键字"/> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">时间筛选</label> |
|||
<div class="col-md-3"> |
|||
<select name="timetype" class="form-control"> |
|||
<option value="">请选择时间类型</option> |
|||
<option value="1" {if $_GPC['timetype']==1}selected="selected"{/if}>下单时间</option> |
|||
<option value="2" {if $_GPC['timetype']==2}selected="selected"{/if}>支付时间</option> |
|||
</select> |
|||
</div> |
|||
<div class="col-md-2"> |
|||
{php echo tpl_select_time_info('time_limit', array('starttime' => date('Y-m-d H:i',$starttime), 'endtime' => date('Y-m-d H:i', $endtime)));} |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary" id="search">筛选</button> |
|||
<button class="btn btn-warning min-width" onclick="$('#excelUpload').click();return false;"><i class="fa fa-upload"></i> 批量发货</button> |
|||
<input type="file" id="excelUpload" class="hide"/> |
|||
<button class="btn btn-default min-width" name="export" type="submit" value="export"><i class="fa fa-download"></i> 导出记录</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="row"> |
|||
<div class="col-md-12"> |
|||
<div class=""> |
|||
<div class="table-header"> |
|||
<div style='width: 400px;text-align: left;'>商品</div> |
|||
{if empty($_W['aid'])} |
|||
<div class="others">所属代理</div> |
|||
{/if} |
|||
<div class="others">买家</div> |
|||
<div class="others">支付/配送</div> |
|||
<div class="others">价格</div> |
|||
<div class="others">操作</div> |
|||
<div class="others">状态</div> |
|||
</div> |
|||
{loop $orderlist $item} |
|||
<div class="table-row"><div style='height:20px;padding:0;border-top:none;'> </div></div> |
|||
<div class="tables"> |
|||
<div class='table-row table-top'> |
|||
<div style="text-align: left;color: #8f8e8e;"> |
|||
<span style="font-weight: bold;margin-right: 10px;color: #2d2d31"> |
|||
<span class="label label-{$item['plugincss']} ordertype">{$item['plugintext']}</span>{if $item['pftflag'] > 0} <span class="label label-warning">票务订单</span> {/if}{php echo date('Y-m-d H:i:s',$item['createtime'])} |
|||
</span> |
|||
订单编号:{$item['orderno']} |
|||
{if $item['refundflag'] > 0} |
|||
<label class='label label-danger'>用户申请售后</label> |
|||
<a class='op' href="{php echo web_url('order/orderAfterSales/afterlist',array('keywordtype'=>1,'keyword'=>$item['orderno']))}"> |
|||
查看售后申请 |
|||
</a> |
|||
{/if} |
|||
</div> |
|||
<div class='aops text-right'> |
|||
{if $item['merchid'] == 0} |
|||
<a class='op' data-toggle="ajaxModal" href="{php echo web_url('order/wlOrder/remarksaler', array('id' => $item['id'],'type'=>$item['a']))}" > |
|||
{if !empty($item['remark'])} |
|||
<i class="icow icow-flag-o" style="color: #df5254;display: inline-block;vertical-align: middle" title=" 查看备注"></i> |
|||
备注 |
|||
  |
|||
{else} |
|||
<i class="icow icow-yibiaoji" style="color: #999;display: inline-block;vertical-align: middle" title=" 添加备注" ></i> |
|||
备注 |
|||
  |
|||
{/if} |
|||
</a> |
|||
{/if} |
|||
{if empty($item['status']) && !is_store() } |
|||
<a class='op' data-toggle='ajaxModal' href="{php echo web_url('order/wlOrder/changeprice',array('id'=>$item['id'],'type'=>$item['a']))}"> |
|||
<i class="icow icow-gaijia" title="订单改价" style="color: #999;display: inline-block;vertical-align: middle"></i> |
|||
订单改价 |
|||
  |
|||
</a> |
|||
<a class='op' data-toggle='ajaxPost' href="{php echo web_url('order/wlOrder/close',array('id'=>$item['id'],'type'=>$item['a']))}" data-confirm="确认关闭订单吗?" > |
|||
<i class="icow icow-shutDown" title="关闭订单" style="color: #999;margin-right: 3px;display: inline-block;vertical-align: middle"></i> |
|||
关闭订单 |
|||
  |
|||
</a> |
|||
{/if} |
|||
{if $item['status'] != 0 && $item['status'] != 3 && $item['status'] != 2 && $item['status'] != 5 && $item['status'] != 7} |
|||
{if !is_store() || $_W['wlsetting']['orderset']['storerefund'] > 0} |
|||
<a class='op' data-toggle='ajaxModal' href="{php echo web_url('order/wlOrder/refund',array('id'=>$item['id'],'type'=>$item['a']))}"> |
|||
<i class="icow icow-shutDown" title="订单退款" style="color: #999;margin-right: 3px;display: inline-block;vertical-align: middle"></i> |
|||
订单退款 |
|||
  |
|||
</a> |
|||
{/if} |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
<div class='table-row' style="margin:0 20px"> |
|||
<div class="goods-des"> |
|||
<div style="display: -webkit-box;display: -webkit-flex;display: -ms-flexbox;display: flex;margin: 10px 0"> |
|||
<img src="{php echo tomedia($item['goodsimg'])}" style='width:70px;height:70px;border:1px solid #efefef; padding:1px;'onerror="this.src='../addons/{MODULE_NAME}/web/resource/images/nopic.jpg'"> |
|||
<div style="-webkit-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;margin-left: 10px;text-align: left;display: flex;align-items: center"> |
|||
<div> |
|||
<div class="title" {if mb_strlen($item['goodsname']) > 10} data-toggle='popover' data-html='true' data-placement='right' data-trigger="hover" data-content="<div style='width:150px;border:1px solid #efefef;padding:5px;' >{$item['goodsname']}</div>" {/if} > |
|||
{$item['goodsname']}<br/> |
|||
{if $item['goods_id']>0}ID:{$item['goods_id']}<br/>{/if} |
|||
<span style="color: #999"> {if !empty($item['optiontitle'])}规格:{$item['optiontitle']}{/if}</span> |
|||
</div> |
|||
</div> |
|||
<span style="float: right;text-align: right;display: inline-block;width:130px;"> |
|||
¥{$item['goodsprice']} |
|||
{if $item['plugin']!='citydelivery'}<br/> |
|||
x{$item['num']}{/if} |
|||
</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
{if empty($_W['aid'])} |
|||
<div class="list-inner" style='text-align: center;' > |
|||
<div> |
|||
{$item['agentname']} |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
|
|||
<div class="list-inner saler" style='text-align: center;' > |
|||
<div> |
|||
<a {if $_W['aid']} href="javascript:;" {else} href="{php echo web_url('member/wlMember/memberIndex',array('mid'=>$item['mid']))}" {/if} > {$item['member']['nickname']}</a> |
|||
<br/> |
|||
{$item['member']['realname']}<br/>{$item['member']['mobile']}<br/>MID:{$item['mid']} |
|||
</div> |
|||
</div> |
|||
<div class="list-inner paystyle" style='text-align:center;' > |
|||
|
|||
<!-- 已支付 --> |
|||
{if $item['status'] > 0 && $item['status'] != 5} |
|||
{if $item['paytype']==1} |
|||
<span> <i class="icow icow-yue text-warning" style="font-size: 17px;"></i><span>余额支付</span></span> |
|||
{elseif $item['paytype']==6} |
|||
<span> <i class="icow icow-kuajingzhifuiconfukuan text-danger" style="font-size: 17px"></i>0元购</span> |
|||
{elseif $item['paytype']==2} |
|||
<span> <i class="icow icow-weixinzhifu text-success" style="font-size: 17px"></i>微信支付</span> |
|||
{elseif $item['paytype']==3} |
|||
<span><i class="icow icow-zhifubaozhifu text-primary" style="font-size: 17px"></i>支付宝支付</span> |
|||
{elseif $item['paytype']==5} |
|||
<span><i class="icow icow-zhifubaozhifu text-primary" style="font-size: 17px"></i>小程序支付</span> |
|||
{elseif $item['paytype']==4} |
|||
<span><i class="icow icow-zhifubaozhifu text-primary" style="font-size: 17px"></i>货到付款</span> |
|||
{elseif empty($item['paytype']) && $item['actualprice'] == 0 } |
|||
<span><i class="icow icow-zhifubaozhifu text-primary" style="font-size: 17px"></i>0元购</span> |
|||
{elseif $item['paytype']==7} |
|||
<span><i class="icow icow-zhifubaozhifu text-primary" style="font-size: 17px"></i>混合支付</span> |
|||
(微信{$item['blendwx']} + 余额{$item['blendcredit']}) |
|||
{else} |
|||
<label class='label label-danger'>未知方式</label> |
|||
{/if} |
|||
{else} |
|||
<!-- 未支付 --> |
|||
<label class='label label-default'>未支付</label> |
|||
{/if} |
|||
</div> |
|||
|
|||
<a class="list-inner" data-toggle='popover' data-html='true' data-placement='right' data-trigger="hover" data-content="<table style='width:100%;'> |
|||
<tr> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'>商品小计:</td> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'>¥{php echo number_format($item['goodsprice']*$item['num'],2)}</td> |
|||
</tr> |
|||
{if $item['packingmoney'] > 0} |
|||
<tr> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'>包装费:</td> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'>¥{php echo number_format($item['packingmoney'],2)}</td> |
|||
</tr> |
|||
{/if} |
|||
<tr> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'>运费:</td> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'>¥{php echo number_format($item['express']['expressprice'],2)}</td> |
|||
</tr> |
|||
{if $item['vipCardPrice'] > 0} |
|||
<tr> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'>开通会员:</td> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'>¥{$item['vipCardPrice']}</td> |
|||
</tr> |
|||
{/if} |
|||
{if $item['vipdiscount']>0} |
|||
<tr> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'>会员减免:</td> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'>-¥{php echo number_format( $item['vipdiscount'],2)}</td> |
|||
</tr> |
|||
{/if} |
|||
{if $item['dkmoney']>0} |
|||
<tr> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'>积分抵扣:</td> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'>-¥{php echo number_format( $item['dkmoney'],2)}</td> |
|||
</tr> |
|||
{/if} |
|||
{if $item['redpackmoney']>0} |
|||
<tr> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'>红包优惠:</td> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'>-¥{php echo number_format( $item['redpackmoney'],2)}</td> |
|||
</tr> |
|||
{/if} |
|||
{if $item['fullreducemoney']>0} |
|||
<tr> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'>满减优惠:</td> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'>-¥{php echo number_format( $item['fullreducemoney'],2)}</td> |
|||
</tr> |
|||
{/if} |
|||
{if $item['changeprice'] != 0} |
|||
<tr> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'>卖家改价:</td> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'><span style='{if 0<$item['changeprice']}color:green{else}color:red{/if}'>{if 0<$item['changeprice']}+{else}-{/if}¥{php echo number_format(abs($item['changeprice']),2)}</span></td> |
|||
</tr> |
|||
{/if} |
|||
{if $item['changedispatchprice'] != 0} |
|||
<tr> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'>卖家改运费:</td> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'><span style='{if 0<$item['changedispatchprice']}color:green{else}color:red{/if}'>{if 0<$item['changedispatchprice']}+{else}-{/if}¥{php echo number_format(abs($item['changedispatchprice']),2)}</span></td> |
|||
</tr> |
|||
{/if} |
|||
<tr> |
|||
<td style='border:none;text-align:right;padding: 5px!important;'>应收款:</td> |
|||
<td style='border:none;text-align:right;color:green;padding: 5px!important;'>¥{php echo number_format($item['actualprice'],2)}</td> |
|||
</tr> |
|||
|
|||
</table> |
|||
" |
|||
> |
|||
<div style='text-align:center' > |
|||
¥{php echo number_format($item['actualprice'],2)} |
|||
{if $item['express']['expressprice']>0} |
|||
<br/>(含运费:¥{php echo number_format( $item['express']['expressprice'],2)}) |
|||
{/if} |
|||
</div> |
|||
</a> |
|||
|
|||
<div class="list-inner" style='text-align:center' > |
|||
<a class='op' href="{$item['detailurl']}" target='_blank' >查看详情</a> |
|||
{if !empty($item['refundid'])} |
|||
<a class='op' href="{php echo web_url('order/op/refund', array('id' => $item['id']))}" >维权{if $item['refundstate']>0}处理{else}详情{/if}</a> |
|||
{/if} |
|||
{if $item['expressid'] && !empty($item['express']['expresssn']) } |
|||
<a class='op' data-toggle="ajaxModal" href="{php echo web_url('order/wlOrder/logisticsrecord',array('id' => $item['expressid']))}">物流信息</a> |
|||
{/if} |
|||
{if empty($item['expressid'])} |
|||
{if ($item['status'] == 1 || $item['status'] == 2 || $item['status'] == 3 || $item['status'] == 9) && $item['plugin'] != 'citydelivery' } |
|||
<a class='op' data-toggle="ajaxModal" href="{php echo web_url('order/wlOrder/hexiaorecord',array('id' => $item['id'],'type'=>$item['a']))}">核销记录</a> |
|||
{/if} |
|||
{/if} |
|||
<!--校验分销订单--> |
|||
{if $_W['wlsetting']['distribution']['switch'] && empty($item['disorderid']) && empty($item['isdistri']) && ($item['status'] != 5) && ($item['status'] != 0) && ($item['status'] != 9)} |
|||
<a class='op' data-toggle='ajaxPost' href="{php echo web_url('order/wlOrder/createdisorder',array('id'=>$item['id'],'type'=>$item['a']))}" data-confirm="确认生成相关分销订单?" >生成分销订单</a> |
|||
{/if} |
|||
</div> |
|||
|
|||
<div class='ops list-inner' style='line-height:20px;text-align:center' > |
|||
<span class='label label-{$item['statuscss']}'>{$item['statustext']}</span>{php include wl_template('order/orderops');} |
|||
</div> |
|||
|
|||
</div> |
|||
{if !empty($item['buyremark'])} |
|||
<div class="table-row"><div class="buyremark">买家备注: {$item['buyremark']}</div></div> |
|||
{/if} |
|||
{if !empty($item['remark'])} |
|||
<div class="table-row"><div class="remark">卖家备注: {$item['remark']}</div></div> |
|||
{/if} |
|||
|
|||
<div class="table-footer table-row"> |
|||
<div style='text-align:left'> |
|||
商户名称:<span class="text-info">{$item['merchname']}</span> |
|||
{if $item['disorderid']}<b>分销订单级别:</b> {$item['level']}级 <b>分销佣金:</b> {$item['commission']} 元{/if} |
|||
</div> |
|||
{if $item['disorderid']} |
|||
<div style='text-align:right'> |
|||
<b>1级佣金:</b>[{$item['onecomname']}](mid:{$item['onecommid']}) {$item['onecommission']} 元 |
|||
{if $item['twocommission']}<b>2级佣金:</b>[{$item['twocomname']}](mid:{$item['twocommid']}) {$item['twocommission']} 元 {/if} |
|||
{if !is_agent() && !is_store() && empty($item['disorderstatus']) } |
|||
<a class="text-primary" data-toggle="ajaxModal" href="{php echo web_url('order/wlOrder/changecommission', array('id' => $item['disorderid']))}">修改佣金</a> |
|||
{/if} |
|||
</div> |
|||
{/if} |
|||
</div> |
|||
</div> |
|||
{/loop} |
|||
<div style="padding: 20px 0;text-align: right" > |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script> |
|||
$("#excelUpload").on('change',function () { |
|||
var val = $("#excelUpload").get(0).files[0];//文件内容 |
|||
var type = val['name'].split(".");//文件名称+文件后缀 |
|||
type = $.trim(type[type.length - 1]);//文件后缀 |
|||
$("#excelUpload").val(''); |
|||
if(type == 'csv'){ |
|||
var fd = new FormData(); |
|||
fd.append("file",val);//上传的文件file |
|||
tip.confirm("内容处理中,请不要刷新页面/离开页面!<br />确定后开始处理",function () { |
|||
$.ajax({ |
|||
url:"{php echo web_url('order/wlOrder/bulkShipment')}", |
|||
type:"post", |
|||
data:fd, |
|||
dataType:"json", |
|||
cache: false, |
|||
processData: false, |
|||
contentType: false, |
|||
async:false, |
|||
success:function(data){ |
|||
tip.alert(data.message,function () { |
|||
if(data.errno == 1){ |
|||
var url = "{php echo web_url('order/wlOrder/batchSend')}"+"name="+data.data; |
|||
window.location.href = url; |
|||
} |
|||
}); |
|||
}, |
|||
error:function(){ |
|||
tip.alert("网络错误,请重试!!"); |
|||
} |
|||
}); |
|||
}); |
|||
}else{ |
|||
tip.alert("只能上传csv类型的表格文件"); |
|||
} |
|||
}); |
|||
</script> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,23 @@ |
|||
{if $item['status'] == 8} |
|||
<a class="btn btn-primary btn-xs" data-toggle="ajaxModal" href="{php echo web_url('order/wlOrder/send', array('id' => $item['id'],'type' => $item['a']))}">确认发货</a> |
|||
{/if} |
|||
<!--<a class="btn btn-primary btn-xs" data-toggle="ajaxPost" href="{php echo web_url('order/wlOrder/pay', array('id' => $item['id']))}" data-confirm="确认此订单已付款吗?">确认付款</a>--> |
|||
|
|||
{if $item['status'] == 1 && empty($item['pftflag'])} |
|||
<a class="btn btn-primary btn-xs" data-toggle='ajaxPost' href="{php echo web_url('order/wlOrder/fetch', array('id' => $item['id'],'type' => $item['a']))}" data-confirm="确认使用吗?">确认核销</a> |
|||
{/if} |
|||
{if $item['status'] == 4} |
|||
{if $item['plugin'] != 'citydelivery'} |
|||
<a class="text-primary" data-toggle="ajaxModal" href="{php echo web_url('order/wlOrder/send', array('id' => $item['id'],'type' => $item['a'],'edit_flag'=>1))}">修改物流</a> |
|||
<a class="text-primary" data-toggle='ajaxPost' href="{php echo web_url('order/wlOrder/sendcancel', array('id' => $item['id'],'type' => $item['a']))}" data-confirm="确认取消发货?">取消发货</a> |
|||
<a class="btn btn-primary btn-xs" data-toggle="ajaxPost" href="{php echo web_url('order/wlOrder/collect', array('id' => $item['id'],'type' => $item['a']))}" data-confirm="确认买家收货?">确认收货</a> |
|||
{else} |
|||
<a class="btn btn-primary btn-xs" data-toggle="ajaxPost" href="{php echo web_url('order/wlOrder/finishdelivery', array('id' => $item['id']))}" data-confirm="确认商品送达?">确认送达</a> |
|||
{/if} |
|||
{/if} |
|||
{if $item['status'] == 2} |
|||
<a class="btn btn-primary btn-xs" data-toggle='ajaxPost' href="{php echo web_url('order/wlOrder/finish', array('id' => $item['id'],'type' => $item['a']))}" data-confirm="确认完成订单吗?">确认完成</a> |
|||
{/if} |
|||
{if ($item['status'] == 9 || $item['status'] == 1) && empty($item['pftflag'])} |
|||
<a class="btn btn-primary btn-xs" data-toggle='ajaxModal' href="{php echo web_url('order/wlOrder/changetime', array('id' => $item['id'],'type' => $item['a']))}">修改时限</a> |
|||
{/if} |
|||
@ -0,0 +1,104 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs" id="myTab"> |
|||
<li class="active"><a href="#tab_basic">订单设置</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-form"> |
|||
<form action="" method="post" class="form-horizontal form form-validate"> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-heading">订单设置</div> |
|||
<div class="panel-body"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">订单自动取消时间</label> |
|||
<div class="col-sm-9"> |
|||
<div class="input-group"> |
|||
<input type="number" min="0" name="shop[cancel]" class="form-control" value="{$settings['cancel']}" /> |
|||
<span class="input-group-addon">分</span> |
|||
</div> |
|||
<span class="help-block">下单后超过此时间未支付,订单自动取消,不填或填0默认为10分钟。</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">订单过期提醒时间</label> |
|||
<div class="col-sm-9"> |
|||
<div class="input-group"> |
|||
<input type="number" min="0" name="shop[remind]" class="form-control" value="{$settings['remind']}" /> |
|||
<span class="input-group-addon">时</span> |
|||
</div> |
|||
<span class="help-block">订单在此时间后过期时,提前发送过期提醒,不填或填0默认为48小时。</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">自动收货时间</label> |
|||
<div class="col-sm-9"> |
|||
<div class="input-group"> |
|||
<input type="number" min="0" name="shop[receipt]" class="form-control" value="{$settings['receipt']}" /> |
|||
<span class="input-group-addon">天</span> |
|||
</div> |
|||
<span class="help-block">发货后超过时间的未确认收货订单将会标记为已签收,不填或填0则订单不会自动签收。</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">自动退款申请订单</label> |
|||
<div class="col-sm-9"> |
|||
<label class="radio-inline"><input type="radio" name="shop[autoapplyre]" value="1" {if $settings['autoapplyre'] == 1} checked {/if}>开启</label> |
|||
<label class="radio-inline"><input type="radio" name="shop[autoapplyre]" value="0" {if $settings['autoapplyre'] != 1} checked {/if}>关闭</label> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">自动退款过期订单</label> |
|||
<div class="col-sm-9"> |
|||
<label class="radio-inline"><input type="radio" name="shop[reovertime]" value="1" {if $settings['reovertime'] == 1} checked {/if}>开启</label> |
|||
<label class="radio-inline"><input type="radio" name="shop[reovertime]" value="0" {if $settings['reovertime'] != 1} checked {/if}>关闭</label> |
|||
<span class="help-block">开启后,未使用过的过期订单会自动退款。</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">商户退款订单</label> |
|||
<div class="col-sm-9"> |
|||
<label class="radio-inline"><input type="radio" name="shop[storerefund]" value="1" {if $settings['storerefund'] == 1} checked {/if}>开启</label> |
|||
<label class="radio-inline"><input type="radio" name="shop[storerefund]" value="0" {if $settings['storerefund'] != 1} checked {/if}>关闭</label> |
|||
<span class="help-block">开启后,商户可以在手机端和PC端后台退款订单。</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">订单退款提示</label> |
|||
<div class="col-sm-9"> |
|||
<div class="input-group" style="width: 100%"> |
|||
<input type="text" name="shop[refundtip]" class="form-control" placeholder="请等待系统退款" value="{$settings['refundtip']}" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">核销码类型</label> |
|||
<div class="col-sm-9"> |
|||
<label class="radio-inline"><input type="radio" name="shop[codetype]" value="0" {if $settings['codetype'] != 1} checked {/if}>数字+字母</label> |
|||
<label class="radio-inline"><input type="radio" name="shop[codetype]" value="1" {if $settings['codetype'] == 1} checked {/if}>纯数字</label> |
|||
<span class="help-block">系统自动生成的核销码样式:纯数字核销码在订单量大时可能重复,保密性更低。</span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">商品{if !empty($_W['wlsetting']['trade']['shiylctext'])}{$_W['wlsetting']['trade']['shiylctext']}{else}使用流程{/if}</label> |
|||
<div class="col-sm-9"> |
|||
{php echo tpl_diy_editor_create('shop[use_info]', $settings['use_info']);} |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">商品{if !empty($_W['wlsetting']['trade']['jiagsmext'])}{$_W['wlsetting']['trade']['jiagsmext']}{else}价格说明{/if}</label> |
|||
<div class="col-sm-9"> |
|||
{php echo tpl_diy_editor_create('shop[price_info]', $settings['price_info']);} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<input type="submit" name="submit" value="提交" class="btn btn-primary min-width" /> |
|||
<input type="hidden" name="token" value="{$_W['token']}" /> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,123 @@ |
|||
{php include wl_template('common/header');} |
|||
<ul class="nav nav-tabs" id="myTab"> |
|||
<li><a href="javascript:;">在线买单</a></li> |
|||
</ul> |
|||
<div class="app-content"> |
|||
<div class="app-filter"> |
|||
<div class="filter-list"> |
|||
<form action="" method="get" class="form-horizontal" role="form" id="form1"> |
|||
<input type="hidden" name="c" value="site" /> |
|||
<input type="hidden" name="a" value="entry" /> |
|||
<input type="hidden" name="m" value="{MODULE_NAME}" /> |
|||
<input type="hidden" name="p" value="order" /> |
|||
<input type="hidden" name="ac" value="orderPayOnline" /> |
|||
<input type="hidden" name="do" value="payonlinelist" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">支付方式</label> |
|||
<div class="col-sm-9"> |
|||
<div class="btn-group"> |
|||
<a href="{php echo wl_filter_url('paytype:0');}" class="btn {if intval($_GPC['paytype']) == 0}btn-primary{else}btn-default{/if}">全部</a> |
|||
<a href="{php echo wl_filter_url('paytype:1');}" class="btn {if $_GPC['paytype'] == 1}btn-primary{else}btn-default{/if}">余额支付</a> |
|||
<a href="{php echo wl_filter_url('paytype:2');}" class="btn {if $_GPC['paytype'] == 2}btn-primary{else}btn-default{/if}">微信支付</a> |
|||
<a href="{php echo wl_filter_url('paytype:3');}" class="btn {if $_GPC['paytype'] == 3}btn-primary{else}btn-default{/if}">支付宝</a> |
|||
<a href="{php echo wl_filter_url('paytype:5');}" class="btn {if $_GPC['paytype'] == 5}btn-primary{else}btn-default{/if}">小程序</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group form-inline"> |
|||
<label class="col-sm-2 control-label">用户</label> |
|||
<div class="col-sm-9"> |
|||
<select name="keywordtype" class="form-control"> |
|||
<option value="1" {if $_GPC['keywordtype']==1}selected="selected"{/if}>昵称</option> |
|||
<option value="2" {if $_GPC['keywordtype']==2}selected="selected"{/if}>手机号</option> |
|||
</select> |
|||
<input type="text" name="keyword" class="form-control" value="{$_GPC['keyword']}" placeholder="请输入关键字"/> |
|||
</div> |
|||
</div> |
|||
{if !is_store()} |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">店铺</label> |
|||
<div class="col-sm-9"> |
|||
<select name="sid" class="form-control select2 js-select2"> |
|||
<option value="0" {if !$sid}selected{/if}>所有店铺</option> |
|||
{loop $stores $store} |
|||
<option value="{$store['id']}" {if $store['id'] == $sid}selected{/if}>{$store['storename']}</option> |
|||
{/loop} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
{/if} |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label">支付时间</label> |
|||
<div class="col-sm-9"> |
|||
{php echo tpl_select_time_info('time_limit', array('starttime' => date('Y-m-d',$starttime), 'endtime' => date('Y-m-d', $endtime)));} |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label"></label> |
|||
<div class="col-sm-9"> |
|||
<button class="btn btn-primary" id="search">筛选</button> |
|||
<button class="btn btn-default min-width" name="export" type="submit" value="export"><i class="fa fa-download"></i> 导出记录</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="app-table-list"> |
|||
<div class="table-responsive"> |
|||
<table class="table table-hover"> |
|||
<thead class="navbar-inner"> |
|||
<tr> |
|||
<th style="width:15%;">买单单号</th> |
|||
<th style="width:10%;">用户信息</th> |
|||
<th style="width:15%;">商户信息</th> |
|||
<th style="width:5%;">订单金额</th> |
|||
<th style="width:8%;">不可优惠金额</th> |
|||
<th style="width:5%;">优惠折扣</th> |
|||
<th style="width:5%;">已优惠金额</th> |
|||
<th style="width:5%;">支付金额</th> |
|||
<th style="width:5%;">支付方式</th> |
|||
<th style="width:12%;">支付时间</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{loop $list $de} |
|||
<tr> |
|||
<td>{$de['orderno']}</td> |
|||
<td><img src="{$de['avatar']}" style="width: 30px;height: 30px;"> {$de['nickname']}</td> |
|||
<td><img src="{$de['logo']}" style="width: 30px;height: 30px;"> {$de['title']}</td> |
|||
<td >¥{$de['goodsprice']}</td> |
|||
<td >¥{$de['oprice']}</td> |
|||
<td >{if $de['spec']<10}<span class="label label-success"> {$de['spec']}折 </spen> {else} <span class="label label-danger">无折扣</span> {/if} </td> |
|||
<td style="color: green;">¥{$de['card_fee']}</td> |
|||
<td style="color: red;">¥{$de['price']}</td> |
|||
<td> |
|||
{if $de['paytype'] == 2} |
|||
<span class="label label-success">微信支付</span> |
|||
{else if $de['paytype'] == 3} |
|||
<span class="label label-info">支付宝</span> |
|||
{else if $de['paytype'] == 1} |
|||
<span class="label label-warning">余额支付</span> |
|||
{else if $de['paytype'] == 5} |
|||
<span class="label label-default">小程序</span> |
|||
{else} |
|||
<span class="label label-danger">其他方式</span> |
|||
{/if} |
|||
</td> |
|||
<td>{$de['paytime']}</td> |
|||
</tr> |
|||
{/loop} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="app-table-foot clearfix"> |
|||
<div class="pull-left"> |
|||
|
|||
</div> |
|||
<div class="pull-right"> |
|||
{$pager} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{php include wl_template('common/footer');} |
|||
@ -0,0 +1,51 @@ |
|||
<form class="form-horizontal form-validate" action="{php echo web_url('order/wlOrder/refund',['is_jurisdiction'=>1])}" method="post" enctype="multipart/form-data"> |
|||
<input type='hidden' name='id' value='{$id}' /> |
|||
<input type='hidden' name='type' value='{$type}' /> |
|||
<input type='hidden' name='checkcode' value='{$checkcode}' /> |
|||
<input type='hidden' name='afterid' value='{$afterid}' /> |
|||
<div class="modal-dialog" style='width: 920px;'> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button> |
|||
<h3>订单退款</h3> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<style> |
|||
.recc{margin-bottom: 0} |
|||
.recc td, .recc th{text-align: center;} |
|||
</style> |
|||
<table class="recc table table-hover table-bordered"> |
|||
<tbody> |
|||
<tr> |
|||
<th>退款方式</th> |
|||
<td> |
|||
<label class="radio-inline"><input type="radio" name="refund_type" value="0" checked="" > 线上退款</label> |
|||
<label class="radio-inline"><input type="radio" name="refund_type" value="1" > 线下退款</label> |
|||
</td> |
|||
<!-- <td colspan="2">--> |
|||
<!-- <input type="text" name="price_value" value="{php echo abs($order['changeprice']) }" class="form-control">--> |
|||
<!-- </td>--> |
|||
</tr> |
|||
<tr> |
|||
<th>退款类型</th> |
|||
<td> |
|||
<label class="radio-inline"><input type="radio" name="price_type" value="0" checked="" onclick="$('#price_value').hide();" > 全额退款</label> |
|||
<label class="radio-inline"><input type="radio" name="price_type" value="1" onclick="$('#price_value').show();"> 部分退款</label> |
|||
</td> |
|||
</tr> |
|||
<tr style="display: none" id="price_value"> |
|||
<th>设置金额</th> |
|||
<td> |
|||
<input type="number" min="0" name="price_value" value="" class="form-control"> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button class="btn btn-primary" type="submit">确定</button> |
|||
<input type="hidden" name="token" value="{$_W['token']}" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue