60 changed files with 13044 additions and 0 deletions
@ -0,0 +1,12 @@ |
|||
<?php |
|||
// +---------------------------------------------------------------------- |
|||
// | ThinkPHP [ WE CAN DO IT JUST THINK ] |
|||
// +---------------------------------------------------------------------- |
|||
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. |
|||
// +---------------------------------------------------------------------- |
|||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) |
|||
// +---------------------------------------------------------------------- |
|||
// | Author: yunwuxin <448901948@qq.com> |
|||
// +---------------------------------------------------------------------- |
|||
|
|||
return []; |
|||
File diff suppressed because it is too large
@ -0,0 +1,275 @@ |
|||
<?php |
|||
// +---------------------------------------------------------------------- |
|||
// | ThinkPHP [ WE CAN DO IT JUST THINK ] |
|||
// +---------------------------------------------------------------------- |
|||
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved. |
|||
// +---------------------------------------------------------------------- |
|||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) |
|||
// +---------------------------------------------------------------------- |
|||
// | Author: liu21st <liu21st@gmail.com> |
|||
// +---------------------------------------------------------------------- |
|||
use \think\Request; |
|||
|
|||
$basename = Request::instance()->root(); |
|||
if (pathinfo($basename, PATHINFO_EXTENSION) == 'php') { |
|||
$basename = dirname($basename); |
|||
} |
|||
$configs= [ |
|||
// +---------------------------------------------------------------------- |
|||
// | 应用设置 |
|||
// +---------------------------------------------------------------------- |
|||
|
|||
// 应用命名空间 |
|||
'app_namespace' => 'app', |
|||
// 应用调试模式 |
|||
'app_debug' =>false, |
|||
// 应用Trace |
|||
'app_trace' => true, |
|||
// 应用模式状态 |
|||
'app_status' => '', |
|||
// 是否支持多模块 |
|||
'app_multi_module' => true, |
|||
// 入口自动绑定模块 |
|||
'auto_bind_module' => false, |
|||
// 注册的根命名空间 |
|||
'root_namespace' => [], |
|||
// 扩展函数文件 |
|||
'extra_file_list' => [THINK_PATH . 'helper' . EXT], |
|||
// 默认输出类型 |
|||
'default_return_type' => 'html', |
|||
// 默认AJAX 数据返回格式,可选json xml ... |
|||
'default_ajax_return' => 'json', |
|||
// 默认JSONP格式返回的处理方法 |
|||
'default_jsonp_handler' => 'jsonpReturn', |
|||
// 默认JSONP处理方法 |
|||
'var_jsonp_handler' => 'callback', |
|||
// 默认时区 |
|||
'default_timezone' => 'PRC', |
|||
// 是否开启多语言 |
|||
'lang_switch_on' => false, |
|||
// 默认全局过滤方法 用逗号分隔多个 |
|||
'default_filter' => 'htmlspecialchars', |
|||
// 默认语言 |
|||
'default_lang' => 'zh-cn', |
|||
// 应用类库后缀 |
|||
'class_suffix' => false, |
|||
// 控制器类后缀 |
|||
'controller_suffix' => false, |
|||
|
|||
// +---------------------------------------------------------------------- |
|||
// | 模块设置 |
|||
// +---------------------------------------------------------------------- |
|||
|
|||
// 默认模块名 |
|||
'default_module' => 'home', |
|||
// 禁止访问模块 |
|||
'deny_module_list' => ['common'], |
|||
// 默认控制器名 |
|||
'default_controller' => 'Index', |
|||
// 默认操作名 |
|||
'default_action' => 'index', |
|||
// 默认验证器 |
|||
'default_validate' => '', |
|||
// 默认的空控制器名 |
|||
'empty_controller' => 'Error', |
|||
// 操作方法后缀 |
|||
'action_suffix' => '', |
|||
// 自动搜索控制器 |
|||
'controller_auto_search' => false, |
|||
|
|||
// +---------------------------------------------------------------------- |
|||
// | URL设置 |
|||
// +---------------------------------------------------------------------- |
|||
|
|||
// PATHINFO变量名 用于兼容模式 |
|||
'var_pathinfo' => 's', |
|||
// 兼容PATH_INFO获取 |
|||
'pathinfo_fetch' => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'], |
|||
// pathinfo分隔符 |
|||
'pathinfo_depr' => '/', |
|||
// URL伪静态后缀 |
|||
'url_html_suffix' => 'html', |
|||
// URL普通方式参数 用于自动生成 |
|||
'url_common_param' => false, |
|||
// URL参数方式 0 按名称成对解析 1 按顺序解析 |
|||
'url_param_type' => 0, |
|||
// 是否开启路由 |
|||
'url_route_on' => true, |
|||
// 路由使用完整匹配 |
|||
'route_complete_match' => false, |
|||
// 路由配置文件(支持配置多个) |
|||
'route_config_file' => ['route'], |
|||
// 是否强制使用路由 |
|||
'url_route_must' => false, |
|||
// 域名部署 |
|||
'url_domain_deploy' => false, |
|||
// 域名根,如thinkphp.cn |
|||
'url_domain_root' => '', |
|||
// 是否自动转换URL中的控制器和操作名 |
|||
'url_convert' => true, |
|||
// 默认的访问控制器层 |
|||
'url_controller_layer' => 'controller', |
|||
// 表单请求类型伪装变量 |
|||
'var_method' => '_method', |
|||
// 表单ajax伪装变量 |
|||
'var_ajax' => '_ajax', |
|||
// 表单pjax伪装变量 |
|||
'var_pjax' => '_pjax', |
|||
// 是否开启请求缓存 true自动缓存 支持设置请求缓存规则 |
|||
'request_cache' => false, |
|||
// 请求缓存有效期 |
|||
'request_cache_expire' => null, |
|||
|
|||
// +---------------------------------------------------------------------- |
|||
// | 模板设置 |
|||
// +---------------------------------------------------------------------- |
|||
|
|||
'template' => [ |
|||
// 模板引擎类型 支持 php think 支持扩展 |
|||
'type' => 'Think', |
|||
// 模板路径 |
|||
'view_path' => '', |
|||
// 模板后缀 |
|||
'view_suffix' => 'html', |
|||
// 模板文件名分隔符 |
|||
'view_depr' => DS, |
|||
// 模板引擎普通标签开始标记 |
|||
'tpl_begin' => '{', |
|||
// 模板引擎普通标签结束标记 |
|||
'tpl_end' => '}', |
|||
// 标签库标签开始标记 |
|||
'taglib_begin' => '{', |
|||
// 标签库标签结束标记 |
|||
'taglib_end' => '}', |
|||
], |
|||
'view_replace_str' => [ |
|||
'__ROOT__' => $basename, |
|||
'__DATA__' => $basename . '/data', |
|||
'__PUBLIC__' => $basename . '/public', |
|||
'__UPLOAD__'=> $basename . '/data/upload', |
|||
], |
|||
// 默认跳转页面对应的模板文件 |
|||
'dispatch_success_tmpl' => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl', |
|||
'dispatch_error_tmpl' => ROOT_PATH . 'public/yfcmf/dispatch_jump.html', |
|||
|
|||
// +---------------------------------------------------------------------- |
|||
// | 异常及错误设置 |
|||
// +---------------------------------------------------------------------- |
|||
|
|||
// 异常页面的模板文件 |
|||
'exception_tmpl' => ROOT_PATH . 'public/yfcmf/error.html', |
|||
|
|||
// 错误显示信息,非调试模式有效 |
|||
'error_message' => '页面错误!请稍后再试~', |
|||
// 显示错误信息 |
|||
'show_error_msg' => true, |
|||
// 异常处理handle类 留空使用 \think\exception\Handle |
|||
'exception_handle' => '', |
|||
|
|||
// +---------------------------------------------------------------------- |
|||
// | 日志设置 |
|||
// +---------------------------------------------------------------------- |
|||
|
|||
'log' => [ |
|||
// 日志记录方式,内置 file socket 支持扩展 |
|||
'type' => 'File', |
|||
// 日志保存目录 |
|||
'path' => LOG_PATH, |
|||
// 日志记录级别 |
|||
'level' => [], |
|||
], |
|||
|
|||
// +---------------------------------------------------------------------- |
|||
// | Trace设置 开启 app_trace 后 有效 |
|||
// +---------------------------------------------------------------------- |
|||
'trace' => [ |
|||
// 内置Html Console 支持扩展 |
|||
'type' => 'Html', |
|||
], |
|||
|
|||
// +---------------------------------------------------------------------- |
|||
// | 缓存设置 |
|||
// +---------------------------------------------------------------------- |
|||
|
|||
'cache' => [ |
|||
// 驱动方式 |
|||
'type' => 'File', |
|||
// 缓存保存目录 |
|||
'path' => CACHE_PATH, |
|||
// 缓存前缀 |
|||
'prefix' => '', |
|||
// 缓存有效期 0表示永久缓存 |
|||
'expire' => 0, |
|||
], |
|||
|
|||
// +---------------------------------------------------------------------- |
|||
// | 会话设置 |
|||
// +---------------------------------------------------------------------- |
|||
|
|||
'session' => [ |
|||
'id' => '', |
|||
// SESSION_ID的提交变量,解决flash上传跨域 |
|||
'var_session_id' => '', |
|||
// SESSION 前缀 |
|||
'prefix' => 'think', |
|||
// 驱动方式 支持redis memcache memcached |
|||
'type' => '', |
|||
// 是否自动开启 SESSION |
|||
'auto_start' => true, |
|||
], |
|||
|
|||
// +---------------------------------------------------------------------- |
|||
// | Cookie设置 |
|||
// +---------------------------------------------------------------------- |
|||
'cookie' => [ |
|||
// cookie 名称前缀 |
|||
'prefix' => '', |
|||
// cookie 保存时间 |
|||
'expire' => 3600*24*7, |
|||
// cookie 保存路径 |
|||
'path' => '/', |
|||
// cookie 有效域名 |
|||
'domain' => '', |
|||
// cookie 启用安全传输 |
|||
'secure' => false, |
|||
// httponly设置 |
|||
'httponly' => '', |
|||
// 是否使用 setcookie |
|||
'setcookie' => true, |
|||
], |
|||
|
|||
//分页配置 |
|||
'paginate' => [ |
|||
'type' => 'bootstrap', |
|||
'var_page' => 'page', |
|||
'list_rows' => 10, |
|||
], |
|||
//数据库备份设置 |
|||
'db_path' => './data/backup/', //数据库备份路径必须以 / 结尾; |
|||
'db_part' => '20971520', //该值用于限制压缩后的分卷最大长度。单位:B;建议设置20M |
|||
'db_compress' => '1', //压缩备份文件需要PHP环境支持gzopen,gzwrite函数 0:不压缩 1:启用压缩 |
|||
'db_level' => '9', //压缩级别 1:普通 4:一般 9:最高 |
|||
//数据加密 |
|||
'data_auth_key'=>'dMm2VYlyr04ENpTpxGPRLiDLu9ZkhIBR1zW5jM6', |
|||
//验证码 |
|||
'verify'=>[ |
|||
'fontSize' => 20, |
|||
'fontttf'=>'1.ttf', |
|||
'useZh'=>false, |
|||
'imageH' => 42, |
|||
'imageW' => 250, |
|||
'length' => 5, |
|||
'useCurve' =>true, |
|||
], |
|||
]; |
|||
//动态设置 |
|||
if(file_exists($file=ROOT_PATH."data/conf/config.php")){ |
|||
$configs=array_merge($configs,include ($file)); |
|||
} |
|||
//调试模式,错误模板保持TP默认 |
|||
if($configs['app_debug']){ |
|||
$configs['dispatch_success_tmpl']= THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl'; |
|||
$configs['dispatch_error_tmpl']= THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl'; |
|||
$configs['exception_tmpl']= THINK_PATH . 'tpl' . DS . 'think_exception.tpl'; |
|||
} |
|||
return $configs; |
|||
@ -0,0 +1,14 @@ |
|||
<?php |
|||
// +---------------------------------------------------------------------- |
|||
// | YFCMF [ WE CAN DO IT MORE SIMPLE ] |
|||
// +---------------------------------------------------------------------- |
|||
// | Copyright (c) 2015-2016 http://www.rainfer.cn All rights reserved. |
|||
// +---------------------------------------------------------------------- |
|||
// | Author: rainfer <81818832@qq.com> |
|||
// +---------------------------------------------------------------------- |
|||
|
|||
// 定时任务 '任务名'=>[任务文件名,定时执行周期,开始执行时间] |
|||
return [ |
|||
// // 定时清理日志 |
|||
'clearlog' => ['clearlog',86400,1482606000], |
|||
]; |
|||
@ -0,0 +1,53 @@ |
|||
<?php |
|||
// +---------------------------------------------------------------------- |
|||
// | ThinkPHP [ WE CAN DO IT JUST THINK ] |
|||
// +---------------------------------------------------------------------- |
|||
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved. |
|||
// +---------------------------------------------------------------------- |
|||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) |
|||
// +---------------------------------------------------------------------- |
|||
// | Author: liu21st <liu21st@gmail.com> |
|||
// +---------------------------------------------------------------------- |
|||
|
|||
return [ |
|||
// 数据库类型 |
|||
'type' => 'mysql', |
|||
// 服务器地址 |
|||
'hostname' => 'localhost', |
|||
// 数据库名 |
|||
'database' => 'why_xingtongworl', |
|||
// 用户名 |
|||
'username' => 'why_xingtongworl', |
|||
// 密码 |
|||
'password' => 'zefBd6Gpa3cjjTph', |
|||
// 端口 |
|||
'hostport' => '3306', |
|||
// 连接dsn |
|||
'dsn' => '', |
|||
// 数据库连接参数 |
|||
'params' => [], |
|||
// 数据库编码默认采用utf8 |
|||
'charset' => 'utf8', |
|||
// 数据库表前缀 |
|||
'prefix' => 'wjs_', |
|||
// 数据库调试模式 |
|||
'debug' => false, |
|||
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) |
|||
'deploy' => 0, |
|||
// 数据库读写是否分离 主从式有效 |
|||
'rw_separate' => false, |
|||
// 读写分离后 主服务器数量 |
|||
'master_num' => 1, |
|||
// 指定从服务器序号 |
|||
'slave_no' => '', |
|||
// 是否严格检查字段是否存在 |
|||
'fields_strict' => true, |
|||
// 数据集返回类型 array 数组 collection Collection对象 |
|||
'resultset_type' => 'array', |
|||
// 是否自动写入时间戳字段 |
|||
'auto_timestamp' => false, |
|||
//自动时间格式转换 |
|||
'datetime_format'=>false, |
|||
// 是否需要进行SQL性能分析 |
|||
'sql_explain' => false, |
|||
]; |
|||
@ -0,0 +1,51 @@ |
|||
<?php |
|||
// +---------------------------------------------------------------------- |
|||
// | ThinkPHP [ WE CAN DO IT JUST THINK ] |
|||
// +---------------------------------------------------------------------- |
|||
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved. |
|||
// +---------------------------------------------------------------------- |
|||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) |
|||
// +---------------------------------------------------------------------- |
|||
// | Author: liu21st <liu21st@gmail.com> |
|||
// +---------------------------------------------------------------------- |
|||
|
|||
// 语言包zh-cn文件 |
|||
return [ |
|||
'province'=>'province', |
|||
'city'=>'city', |
|||
'town'=>'town', |
|||
'not logged'=>'You are not logged in!', |
|||
'success'=>'Success!', |
|||
'failed'=>'Failed!', |
|||
'save success'=>'Save success!', |
|||
'save failed'=>'Save failed!', |
|||
'old pwd empty'=>'The original password can not be empty!', |
|||
'old pwd not correct'=>'The old password is incorrect!', |
|||
'new pwd empty'=>'The new password can not be empty!', |
|||
'pwd not same'=>'New and confirmed passwords are not the same!', |
|||
'new pwd the same as old pwd'=>'The new password cannot be the same as the original password!', |
|||
'revise success'=>'Revise success!', |
|||
'revise failed'=>'Revise failed!', |
|||
'avatar update success'=>'Avatar update success!', |
|||
'avatar update failed'=>'Avatar update failed!', |
|||
'submission mode incorrect'=>'Submission mode is not correct!', |
|||
'operation not valid'=>'This operation is not valid!', |
|||
'verifiy incorrect'=>'Verifiy incorrect!', |
|||
'pwd empty'=>'Password can not be empty!', |
|||
'username or pwd incorrect'=>'Username or password error, Please reinput!', |
|||
'login success'=>'Login success!', |
|||
'login failed'=>'Login failed!', |
|||
'email empty'=>'Email can not be empty!', |
|||
'email format incorrect'=>'Email format is incorrect!', |
|||
'repassword empty'=>'Repassword can not be empty!', |
|||
'repassword incorrect'=>'Repassword incorrect!', |
|||
'parameter error'=>'Parameter error!', |
|||
'pwd'=>'Password', |
|||
'delete'=>'Delete', |
|||
'title'=>'Title', |
|||
'description'=>'Description', |
|||
'operation'=>'Operation', |
|||
'save'=>'Save', |
|||
'edit'=>'Edit', |
|||
'admin manage'=>'Admin manage', |
|||
]; |
|||
@ -0,0 +1,51 @@ |
|||
<?php |
|||
// +---------------------------------------------------------------------- |
|||
// | ThinkPHP [ WE CAN DO IT JUST THINK ] |
|||
// +---------------------------------------------------------------------- |
|||
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved. |
|||
// +---------------------------------------------------------------------- |
|||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) |
|||
// +---------------------------------------------------------------------- |
|||
// | Author: liu21st <liu21st@gmail.com> |
|||
// +---------------------------------------------------------------------- |
|||
|
|||
// 语言包zh-cn文件 |
|||
return [ |
|||
'province'=>'省', |
|||
'city'=>'市(地区)', |
|||
'town'=>'镇(区)', |
|||
'not logged'=>'您还没有登录!', |
|||
'success'=>'成功!', |
|||
'failed'=>'失败!', |
|||
'save success'=>'保存成功!', |
|||
'save failed'=>'保存失败!', |
|||
'old pwd empty'=>'原始密码不能为空!', |
|||
'old pwd not correct'=>'原始密码不正确!', |
|||
'new pwd empty'=>'新密码不能为空!', |
|||
'pwd not same'=>'新密码与确认密码不一致!', |
|||
'new pwd the same as old pwd'=>'新密码不能和原始密码相同!', |
|||
'revise success'=>'修改成功!', |
|||
'revise failed'=>'修改失败!', |
|||
'avatar update success'=>'头像更新成功!', |
|||
'avatar update failed'=>'头像更新失败!', |
|||
'submission mode incorrect'=>'提交方式不正确!', |
|||
'operation not valid'=>'此操作无效!', |
|||
'verifiy incorrect'=>'验证码错误!', |
|||
'pwd empty'=>'密码不能为空!', |
|||
'username or pwd incorrect'=>'用户名或者密码错误,重新输入!', |
|||
'login success'=>'登陆成功!', |
|||
'login failed'=>'登陆失败!', |
|||
'email empty'=>'邮箱不能为空!', |
|||
'email format incorrect'=>'邮箱格式不正确!', |
|||
'repassword empty'=>'重复密码不能为空!', |
|||
'repassword incorrect'=>'确认密码不正确!', |
|||
'parameter error'=>'参数错误!', |
|||
'pwd'=>'密码', |
|||
'delete'=>'删除', |
|||
'title'=>'标题', |
|||
'description'=>'描述', |
|||
'operation'=>'操作', |
|||
'save'=>'保存', |
|||
'edit'=>'编辑', |
|||
'admin manage'=>'后台管理', |
|||
]; |
|||
@ -0,0 +1,747 @@ |
|||
<?php |
|||
/** |
|||
* Created by PhpStorm. |
|||
* User: Administrator |
|||
* Date: 2018/3/28 |
|||
* Time: 20:55 |
|||
*/ |
|||
|
|||
namespace app\org\controller; |
|||
|
|||
use app\admin\controller\Base; |
|||
use app\org\model\Orguptype as UptypeModel; |
|||
use think\Db; |
|||
|
|||
class Orgapply extends Base |
|||
{ |
|||
/** 上传文件类型列表 |
|||
* @param int $status |
|||
* @param int $ftype |
|||
* @return mixed |
|||
*/ |
|||
public function uptype_list($status=-1,$ftype=1){ |
|||
$apply_id=input('apply_id'); |
|||
$whereType=array( |
|||
'apply_id'=>$apply_id, |
|||
'new_flag'=>1, |
|||
); |
|||
$uptype_list=UptypeModel::getList(-1,$apply_id,$ftype,$status,-1,'status,apply_type,ftype_id',-1); |
|||
$page = $uptype_list->render(); |
|||
$this->assign('uptype_list',$uptype_list); |
|||
$this->assign('page',$page); |
|||
return $this->fetch(); |
|||
} |
|||
/** 上传文件类型添加 |
|||
* @param int $status |
|||
* @return mixed |
|||
*/ |
|||
public function uptype_add($process=-1,$status=-1){ |
|||
if ($process > 0 and $status > 0) { |
|||
//权限检查 |
|||
if (check_cult4UserRight(input('apply_id'), session('admin_auth.aid'), $status) == 0) { |
|||
$this->error('无权限',url('admin/Index/index')); |
|||
} |
|||
} |
|||
//创建token |
|||
creatToken(); |
|||
|
|||
$apply_id=input('apply_id'); |
|||
$this->assign('apply_id',$apply_id); |
|||
$this->assign('status',$status); |
|||
$where['status'] = array('egt',0); |
|||
$statuslist=Db::name('org_status')->where($where)->select(); |
|||
$this->assign('statuslist',$statuslist); |
|||
|
|||
return $this->fetch(); |
|||
} |
|||
/** 上传文件类型保存 |
|||
* @param int $status |
|||
* @return mixed |
|||
*/ |
|||
public function uptype_runadd($process=-1,$status=-1){ |
|||
//添加固定内容 |
|||
if (!($process == -1 or $status ==-1)) { |
|||
//权限检查 |
|||
if (check_cult4UserRight(input('apply_id'), session('admin_auth.aid'), $status) == 0) { |
|||
$this->error('无权限',url('admin/Index/index')); |
|||
} |
|||
} |
|||
|
|||
$roletype=input('roletype'); |
|||
$roleid=input('roletitle'); |
|||
$roletype2=input('roletype2'); |
|||
$roleid2=input('roletitle2'); |
|||
if($roletype<=0 or $roleid<=0) |
|||
{ |
|||
$this->error('请选择资料上传类型及对应的角色!'); |
|||
} |
|||
if(empty($roletype2))$roletype2=0; |
|||
if(empty($roleid2))$roleid2=0; |
|||
if(!(($roletype2==0 and $roleid2==0) or ($roletype2>0 and $roleid2>0) or ($roletype2<=0 and $roleid2<=0))) |
|||
{ |
|||
$this->error('请选择资料辅助上传类型及对应的角色!'); |
|||
} |
|||
//防止重复提交 |
|||
if (!checkToken(input('TOKEN'))) { |
|||
//return; |
|||
} |
|||
//状态为-1时对应固定文件 |
|||
$apply_id=input('apply_id'); |
|||
$whereType=array( |
|||
'apply_id'=>$apply_id, |
|||
'new_flag'=>1, |
|||
); |
|||
$mustupload=1; |
|||
if($process==-1){ |
|||
$apply_id = 0; |
|||
$apply_type=input('apply_type'); |
|||
$mustupload=input('mustupload'); |
|||
} |
|||
|
|||
//上传模板部分 |
|||
$file_id=0; |
|||
//支持多个字段单文件 |
|||
$file = request()->file('file_one'); |
|||
$file_one=''; |
|||
|
|||
if(!empty($file)){ |
|||
$validate = config('upload_validate'); |
|||
unset($validate['ext']);//不限制后缀 |
|||
//单图 |
|||
$info = $file->validate($validate)->rule('uniqid')->move(ROOT_PATH . config('upload_path') . DS . date('Y-m-d')); |
|||
if ($info) { |
|||
$file_url = config('upload_path'). '/' . date('Y-m-d') . '/' . $info->getFilename(); |
|||
//写入数据库 |
|||
$data['apply_id'] = 0;//模板文件未使用该字段 |
|||
$data['user_id'] = session('admin_auth.aid'); |
|||
$data['user_type'] = 2; |
|||
$data['status'] = $status; |
|||
$data['upload_time'] = time(); |
|||
$data['ftype_id'] = 0;//模板文件为0 |
|||
$data['ftype'] = 3;//模板类型 |
|||
$data['filesize'] = $info->getSize(); |
|||
$data['path'] = $file_url; |
|||
$data['addorder'] = 0;//固定文件需要更新 |
|||
$data['new_flag'] = 1;//固定文件需要更新 |
|||
|
|||
$file_id = Db::name('org_upfiles')->insert($data,false,true); |
|||
|
|||
} else { |
|||
session('TOKEN', input('TOKEN')); |
|||
$this->error($file->getError());//否则就是上传错误,显示错误原因 |
|||
} |
|||
} |
|||
if ($process == -1 or $status ==-1) { |
|||
$uptype_id=UptypeModel::add($apply_type,input('ftypedescr'),$file_id,input('ftype'),input('status'),input('isopen',0),0,session('admin_auth.aid'),$roletype,$roleid,$roletype2,$roleid2,$mustupload); |
|||
if($uptype_id){ |
|||
$this->success('文件类型添加成功',url('org/Orgapply/uptype_list')); |
|||
}else{ |
|||
session('TOKEN', input('TOKEN')); |
|||
$this->error('文件类型添加失败'); |
|||
} |
|||
}else{ |
|||
$uptype_id=UptypeModel::add($apply_type,input('ftypedescr'),$file_id,input('ftype'),$status,input('isopen',0),$apply_id,session('admin_auth.aid'),$roletype,$roleid,$roletype2,$roleid2); |
|||
if($uptype_id){ |
|||
$sl_data2['apply_id']=input('apply_id'); |
|||
$sl_data2['status']=$status; |
|||
$this->success('文件类型添加成功',url('org/Orgapply/uptype_list'.$process,$sl_data2)); |
|||
}else{ |
|||
session('TOKEN', input('TOKEN')); |
|||
$this->error('文件类型添加失败'); |
|||
} |
|||
} |
|||
} |
|||
/** 上传文件类型编辑 |
|||
* @return mixed |
|||
*/ |
|||
public function uptype_edit(){ |
|||
if(!request()->isAjax()) { |
|||
//创建token |
|||
creatToken(); |
|||
$ftype_id = input('ftype_id', 0, 'intval'); |
|||
if (!$ftype_id) $this->error('参数错误', url('org/Orgapply/uptype_list')); |
|||
$uptype = Db::name('org_uptype')->where('ftype_id', $ftype_id)->find(); |
|||
$this->assign('uptype', $uptype); |
|||
if(!empty($uptype['ftemp_id'])){ |
|||
$upfile = Db::name('org_upfiles')->where('file_id', $uptype['ftemp_id'])->find(); |
|||
$this->assign('upfile', $upfile); |
|||
} |
|||
$where['status'] = array('egt',0); |
|||
$statuslist=Db::name('org_status')->where($where)->select(); |
|||
$this->assign('statuslist',$statuslist); |
|||
|
|||
$list1=array(); |
|||
if($uptype['upload_role_type']==1){ |
|||
$map1['member_group_id']=array(array('gt',0),array('neq',2));//>0 and !=2 |
|||
$list1=Db::name("member_group")->field(array('member_group_id'=>'id','member_group_name'=>'name'))->where($map1)->select(); |
|||
}elseif($uptype['upload_role_type']==2){ |
|||
$map2['id']=array('gt',0); |
|||
$list1=Db::name("auth_group")->field(array('id'=>'id','title'=>'name'))->where($map2)->select(); |
|||
} |
|||
$this->assign('list1',$list1); |
|||
$list2=array(); |
|||
if($uptype['upload_role_type2']==1){ |
|||
$map1['member_group_id']=array(array('gt',0),array('neq',2));//>0 and !=2 |
|||
$list2=Db::name("member_group")->field(array('member_group_id'=>'id','member_group_name'=>'name'))->where($map1)->select(); |
|||
}elseif($uptype['upload_role_type2']==2){ |
|||
$map2['id']=array('gt',0); |
|||
$list2=Db::name("auth_group")->field(array('id'=>'id','title'=>'name'))->where($map2)->select(); |
|||
} |
|||
$this->assign('list2',$list2); |
|||
return $this->fetch(); |
|||
}else{ |
|||
$roletype=input('roletype'); |
|||
$roleid=input('roletitle'); |
|||
$roletype2=input('roletype2'); |
|||
$roleid2=input('roletitle2'); |
|||
if($roletype<=0 or $roleid<=0) |
|||
{ |
|||
$this->error('请选择资料上传类型及对应的角色!'); |
|||
} |
|||
if(empty($roletype2))$roletype2=0; |
|||
if(empty($roleid2))$roleid2=0; |
|||
if(!(($roletype2==0 and $roleid2==0) or ($roletype2>0 and $roleid2>0) or ($roletype2<=0 and $roleid2<=0))) |
|||
{ |
|||
$this->error('请选择资料辅助上传类型及对应的角色!'); |
|||
} |
|||
//防止重复提交 |
|||
if (!checkToken(input('TOKEN'))) { |
|||
return; |
|||
} |
|||
|
|||
//固定 |
|||
$apply_id = 0; |
|||
$apply_type=input('apply_type'); |
|||
$mustupload=input('mustupload'); |
|||
|
|||
//上传模板部分 |
|||
$file_id=0; |
|||
//支持多个字段单文件 |
|||
$file = request()->file('file_one'); |
|||
$file_one=''; |
|||
|
|||
if(!empty($file)){ |
|||
$validate = config('upload_validate'); |
|||
unset($validate['ext']);//不限制后缀 |
|||
//单图 |
|||
$info = $file->validate($validate)->rule('uniqid')->move(ROOT_PATH . config('upload_path') . DS . date('Y-m-d')); |
|||
|
|||
if ($info) { |
|||
$file_url = config('upload_path'). '/' . date('Y-m-d') . '/' . $info->getFilename(); |
|||
//写入数据库 |
|||
$data['apply_id'] = 0;//模板文件未使用该字段 |
|||
$data['user_id'] = session('admin_auth.aid'); |
|||
$data['user_type'] = 2; |
|||
$data['status'] = input('status'); |
|||
$data['upload_time'] = time(); |
|||
$data['ftype_id'] = 0;//模板文件为0 |
|||
$data['ftype'] = 3;//模板类型 |
|||
$data['filesize'] = $info->getSize(); |
|||
$data['path'] = $file_url; |
|||
$data['addorder'] = 0;//固定文件需要更新 |
|||
$data['new_flag'] = 1;//固定文件需要更新 |
|||
|
|||
$file_id = Db::name('org_upfiles')->insert($data,false,true); |
|||
|
|||
} else { |
|||
$this->error($file->getError());//否则就是上传错误,显示错误原因 |
|||
} |
|||
}else{ |
|||
$file_id = input('ftemp_id'); |
|||
$data['file_id'] = $file_id;//模板文件未使用该字段 |
|||
$data['status'] = input('status'); |
|||
Db::name('org_upfiles')->where('file_id',$file_id)->update($data); |
|||
} |
|||
$sl_data=array( |
|||
'ftype_id'=>input('ftype_id'), |
|||
'ftypedescr'=>input('ftypedescr'), |
|||
'ftemp_id' => $file_id, |
|||
'apply_type' => $apply_type, |
|||
'mustupload' => $mustupload, |
|||
'ftype'=>input('ftype'), |
|||
'status'=>input('status'), |
|||
'isopen'=>input('isopen',0), |
|||
'apply_id'=>$apply_id, |
|||
'user_id'=>session('admin_auth.aid'), |
|||
'create_time'=>time(), |
|||
'upload_role_type'=>$roletype, |
|||
'upload_role_id'=>$roleid, |
|||
'upload_role_type2'=>$roletype2, |
|||
'upload_role_id2'=>$roleid2, |
|||
); |
|||
$uptype_id=Db::name('org_uptype')->where('ftype_id',input('ftype_id'))->update($sl_data); |
|||
if($uptype_id){ |
|||
$this->success('文件类型修改成功',url('org/Orgapply/uptype_list')); |
|||
}else{ |
|||
$this->error('文件类型修改失败'); |
|||
} |
|||
} |
|||
} |
|||
/** 上传文件类型启用停用 |
|||
* @param int $status |
|||
* @return mixed |
|||
*/ |
|||
public function uptype_state($process =-1, $status =-1){ |
|||
$id=input('x'); |
|||
if (empty($id)){ |
|||
//如果不是固定添加类型 |
|||
if (!($process == -1 or $status ==-1)) { |
|||
$this->error('文件ID不存在', url('org/Orgapply/uptype_list' . $process)); |
|||
}else{ |
|||
$this->error('文件ID不存在', url('org/Orgapply/uptype_list')); |
|||
} |
|||
} |
|||
|
|||
//取得apply_id |
|||
$tempfile = UptypeModel::getFileTypeInfo($id); |
|||
if(empty($tempfile)){ |
|||
$this->error('无权限',url('admin/Index/index')); |
|||
} |
|||
$isopen=Db::name('org_uptype')->where('ftype_id',$id)->value('isopen');//判断当前状态情况 |
|||
if($isopen==1){ |
|||
$statedata = array('isopen'=>0); |
|||
Db::name('org_uptype')->where('ftype_id',$id)->setField($statedata); |
|||
$this->success('状态禁止'); |
|||
}else{ |
|||
$statedata = array('isopen'=>1); |
|||
Db::name('org_uptype')->where('ftype_id',$id)->setField($statedata); |
|||
$this->success('状态开启'); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 审核列表 |
|||
*/ |
|||
public function apply_list($applystatus=-1,$allstatus=-1){ |
|||
$search_name=input('search_name'); |
|||
$where=array(); |
|||
//根据状态值取出对应状态的数据 |
|||
if($allstatus == -1){ |
|||
$where['a.status'] = array('eq',$applystatus); |
|||
} |
|||
if(!empty($search_name)){ |
|||
$where['m.member_list_username'] = array('like','%'.$search_name.'%'); |
|||
} |
|||
//取得apply_admin_id为0或者当前用户的数据 |
|||
$where['a.apply_admin_id']=array(array('eq',0),array('eq',session('admin_auth.aid')),'or'); |
|||
|
|||
$apply_list = Db::name('org_apply')->alias("a")->join(config('database.prefix').'member_list m','a.uid =m.member_list_id') |
|||
->join(config('database.prefix').'org_status c','a.status =c.status')->where($where) |
|||
->order('create_time desc,id desc')->paginate(config('paginate.list_rows'),false,['query'=>get_query()]); |
|||
$page = $apply_list->render(); |
|||
$this->assign('apply_list',$apply_list); |
|||
$this->assign('page',$page); |
|||
$this->assign('search_name',$search_name); |
|||
$this->assign('applystatus',$applystatus); |
|||
$this->assign('allstatus',$allstatus); |
|||
$this->assign('loginuser',session('admin_auth.aid')); |
|||
return $this->fetch(); |
|||
} |
|||
|
|||
/** 受理操作 |
|||
* @param $status |
|||
*/ |
|||
public function apply_applyed($status){ |
|||
if(session('admin_auth.aid')){ |
|||
$data=array( |
|||
'apply_admin_id'=>session('admin_auth.aid'), |
|||
'update_time'=>time(), |
|||
'update_user_id'=>session('admin_auth.aid'), |
|||
'update_user_type'=>1, |
|||
); |
|||
$where=array( |
|||
'id'=>input('id'), |
|||
'status'=>$status, |
|||
'apply_admin_id'=>array('EQ', 0), |
|||
); |
|||
|
|||
$apply=Db::name('org_apply')->where($where)->update($data); |
|||
if($apply==0){ |
|||
$this->error('数据已更新,请重试!'); |
|||
} else { |
|||
$this->success('已受理',url('org/Orgapply/apply_check',array('id'=>input('id'),'applystatus'=>$status))); |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
$this->error('用户ID不存在'); |
|||
} |
|||
} |
|||
|
|||
public function apply_check(){ |
|||
creatToken(); |
|||
$apply_id=input('id'); |
|||
$apply_status=input('applystatus'); |
|||
$user_id=session('admin_auth.aid'); |
|||
$this->assign('user_id',$user_id); |
|||
|
|||
$apply = Db::name('org_apply')->where('id',$apply_id)->where('status',$apply_status)->find(); |
|||
$this->assign('apply',$apply); |
|||
|
|||
//设置当前步骤标题 |
|||
if($apply['status']==1){ |
|||
$curr_step='缴费金额设置'; |
|||
}elseif ($apply['status']==3){ |
|||
$curr_step='缴费确认'; |
|||
}elseif ($apply['status']==5){ |
|||
$curr_step='初审'; |
|||
}elseif ($apply['status']==6){ |
|||
$curr_step='风控复审'; |
|||
}elseif ($apply['status']==7){ |
|||
$curr_step='领导审核'; |
|||
}elseif ($apply['status']==9){ |
|||
$curr_step='企业信息审核'; |
|||
} |
|||
$this->assign('curr_step',$curr_step); |
|||
|
|||
//查询缴费确认历史 |
|||
if(in_array($apply['status'],[3,5,6,7,9])){ |
|||
$apply_cw = Db::name('org_cw')->where('apply_id',$apply_id)->order('create_time desc')->select(); |
|||
$this->assign('apply_cw',$apply_cw); |
|||
//缴费凭证 |
|||
$apply_jfpz = Db::name('org_upfiles')->where(['apply_id'=>$apply_id,'status'=>2])->order('upload_time desc')->find(); |
|||
$this->assign('apply_jfpz',$apply_jfpz); |
|||
} |
|||
//查询初审历史 |
|||
if(in_array($apply['status'],[5,6,7,9])){ |
|||
$apply_cs = Db::name('org_cs')->where('apply_id',$apply_id)->order('create_time desc')->select(); |
|||
$this->assign('apply_cs',$apply_cs); |
|||
//上传文件列表 |
|||
$where['apply_type']=array(array('eq',0),array('eq',$apply['org_name']), 'or');; |
|||
$where['status']=4; |
|||
$where['isopen']=1; |
|||
$apply_uptypelist = Db::name('org_uptype')->where($where)->select(); |
|||
for ($x=0; $x<count($apply_uptypelist); $x++) { |
|||
$filewhere['apply_id']=$apply_id; |
|||
$filewhere['ftype_id']=$apply_uptypelist[$x]['ftype_id']; |
|||
$filewhere['new_flag']=1; |
|||
$file = Db::name('org_upfiles')->where($filewhere)->order('upload_time desc')->find(); |
|||
$apply_uptypelist[$x]['file']=$file; |
|||
} |
|||
$this->assign('apply_uptypelist',$apply_uptypelist); |
|||
} |
|||
//查询风控复审历史 |
|||
if(in_array($apply['status'],[6,7,9])){ |
|||
$apply_fk = Db::name('org_fk')->where('apply_id',$apply_id)->order('create_time desc')->select(); |
|||
$this->assign('apply_fk',$apply_fk); |
|||
} |
|||
//查询领导审核历史 |
|||
if(in_array($apply['status'],[7,9])){ |
|||
$apply_ldsh = Db::name('org_ldsh')->where('apply_id',$apply_id)->order('create_time desc')->select(); |
|||
$this->assign('apply_ldsh',$apply_ldsh); |
|||
} |
|||
return $this->fetch(); |
|||
} |
|||
|
|||
public function apply_runcheck(){ |
|||
$id=input('id'); |
|||
$apply = Db::name('org_apply')->where('id',$id)->find(); |
|||
//审核通过检查是否还有未审核通过的文件 |
|||
if(input('submitType')==1) { |
|||
$file_count = Db::name('org_upfiles')->where(['apply_id'=>$id,'flag'=>0,'new_flag'=>1])->count(); |
|||
if($file_count){ |
|||
session('TOKEN',input('TOKEN')); |
|||
$this->error('还有文件未审核通过'); |
|||
} |
|||
}else if($apply['status']!=3){ |
|||
$file_count = Db::name('org_upfiles')->where(['apply_id'=>$id,'flag'=>0,'new_flag'=>1])->count(); |
|||
if($file_count==0){ |
|||
session('TOKEN',input('TOKEN')); |
|||
$this->error('文件已全部审核通过,请将文件审核未不通过再操作!'); |
|||
} |
|||
} |
|||
if(empty($apply)){ |
|||
session('TOKEN',input('TOKEN')); |
|||
$this->error('申请不存在'); |
|||
} |
|||
if($apply['status']!=1 && $apply['status']!=9){ |
|||
if(input('advice')=='') |
|||
{ |
|||
$this->error('请输入审核意见!'); |
|||
} |
|||
} |
|||
|
|||
//审核的数据内容 |
|||
$data=array( |
|||
'apply_id'=>$id,//申请ID |
|||
'advice'=>input('advice',"未填写"),//审批意见 |
|||
'create_id'=>session('admin_auth.aid'),//审批人 |
|||
'create_time'=>time(),//审批时间 |
|||
); |
|||
//根据当前状态和审核操作,变更对应状态 |
|||
if($apply['status']==1){//当前状态为设置金额 |
|||
$update_status = 2;//缴费中(已设置金额) |
|||
$org_data['amount']=input('amount'); |
|||
}elseif ($apply['status']==3){//缴费确认 |
|||
$table_name = 'org_cw';//将审核数据保存到对应表 |
|||
if(input('submitType')==1) { |
|||
$update_status = 4;//上传资料中(已确认缴费) |
|||
}else{ |
|||
$update_status = 11;//会员修改中(缴费确认未通过) |
|||
} |
|||
}elseif ($apply['status']==5){//初审 |
|||
$table_name = 'org_cs';//将审核数据保存到对应表 |
|||
if(input('submitType')==1) { |
|||
$update_status = 6;//风控复审中(初审已通过) |
|||
}else{ |
|||
$update_status = 12;//会员修改中(初审未通过) |
|||
} |
|||
}elseif ($apply['status']==6){//风控复审 |
|||
$table_name = 'org_fk';//将审核数据保存到对应表 |
|||
if(input('submitType')==1) { |
|||
$update_status = 7;//领导审核中(风控复审已通过) |
|||
}else{ |
|||
$update_status = 13;//会员修改中(风控复审未通过) |
|||
} |
|||
}elseif ($apply['status']==7){//领导审核 |
|||
$table_name = 'org_ldsh';//将审核数据保存到对应表 |
|||
if(input('submitType')==1) { |
|||
$update_status = 8;//上传企业信息中(领导审核已通过) |
|||
}else{ |
|||
$update_status = 14;//会员修改中(领导审核未通过) |
|||
} |
|||
}elseif ($apply['status']==9){//企业信息确认 |
|||
$update_status = 10;//申请成功 |
|||
} |
|||
|
|||
//找到当前最大addorder |
|||
if(!empty($table_name)){ |
|||
$check=Db::name($table_name)->where('apply_id',$id)->order('addorder desc') ->find (); |
|||
if(!empty($check)){ |
|||
$data['addorder']=$check['addorder']+1; |
|||
}else{ |
|||
$data['addorder']=0; |
|||
} |
|||
} |
|||
if($apply['org_name']==1) $org_name='省级文化金融服务中心'; |
|||
elseif ($apply['org_name']==2)$org_name='市级文化金融服务中心'; |
|||
elseif ($apply['org_name']==3)$org_name='(行业)专板'; |
|||
elseif ($apply['org_name']==4)$org_name='(行业)专区'; |
|||
elseif ($apply['org_name']==5)$org_name='省级运营中心'; |
|||
elseif ($apply['org_name']==6)$org_name='市级运营中心'; |
|||
elseif ($apply['org_name']==7)$org_name='推荐机构'; |
|||
elseif ($apply['org_name']==8)$org_name='驻场服务机构全国'; |
|||
elseif ($apply['org_name']==9)$org_name='驻场服务机构区域'; |
|||
$defaultFileLink='</br>请点击: <div class="basicname modeub modeac modepc " onclick="to_edit('.$id.')">上传资料</div>'; |
|||
//系统通知内容 |
|||
if(input('submitType')==2){ |
|||
//审核不通过发送通知给客户 |
|||
if($apply['status']==3){ |
|||
$notice_title='您(或您关联)的合作机构申请缴费凭证审核不通过,请重新上传!'; |
|||
$notic_content='您(或您关联)的合作机构申请不通过,需要您重新修改信息或上传缴费凭证后再提交。<br>审批意见:<br>审批意见:'.input('advice',"").$defaultFileLink; |
|||
}else if($apply['status']==5){ |
|||
$notice_title='您(或您关联)的合作机构申请初审审核不通过,请修改资料!'; |
|||
$sys=Orgsetup::get('orgcheck_options','-1'); |
|||
$notic_content=str_replace('#APPLYCONTENTS#',input('advice',""),$sys['content_tpl']); |
|||
$notic_content=str_replace('#COMNAME#',$apply['comname'],$notic_content); |
|||
$notic_content=str_replace('#APPLYNAME#',$org_name,$notic_content); |
|||
$notic_content=str_replace('#DATE#',date('Y年m月d日', time()),$notic_content); |
|||
}else if($apply['status']==6){ |
|||
$notice_title='您(或您关联)的合作机构申请风控审核不通过,请修改资料!'; |
|||
$notic_content='您(或您关联)的合作机构申请不通过,需要您重新修改信息或上传资料后再提交。<br>审批意见:'.input('advice',"").$defaultFileLink; |
|||
}else if($apply['status']==7){ |
|||
$notice_title='您(或您关联)的合作机构申请领导审核不通过,请修改资料!'; |
|||
$notic_content='您(或您关联)的合作机构申请不通过,需要您重新修改信息或上传资料后再提交。<br>审批意见:'.input('advice',"").$defaultFileLink; |
|||
} |
|||
}else if($update_status==2){//缴费中,需要发送缴费通知 |
|||
$fee_where['name']=$org_name; |
|||
$fee_where['code']='orgfee_options'; |
|||
$sys=Db::name('org_temp')->where($fee_where)->find();//缴费通知模板 |
|||
$notic_content=str_replace('#MONEY#',$org_data['amount'],$sys['content_tpl']); |
|||
$notic_content=str_replace('#COMNAME#',$apply['comname'],$notic_content); |
|||
$notic_content=str_replace('#ORGNAME#',$org_name,$notic_content); |
|||
$notic_content=str_replace('#DATE#',date('Y年m月d日', time()),$notic_content); |
|||
$notice_title='您(或您关联)的合作机构申请已审核,请缴费后上传缴费凭证!'; |
|||
}else if($update_status==10){//托管成功,发送成功通知给客户 |
|||
$org_data=[ |
|||
'enterprise_name'=>input('enterprise_name'), |
|||
'enterprise_desc'=>input('enterprise_desc'), |
|||
'enterprise_address'=>input('enterprise_address'), |
|||
'legal_person'=>input('legal_person'), |
|||
'contact'=>input('contact'), |
|||
'business_code'=>input('business_code'), |
|||
'startdate'=>input('startdate'), |
|||
'enddate'=>input('enddate'), |
|||
'status'=>9 |
|||
]; |
|||
//消息通知内容 |
|||
$notice_title='('.$org_data['enterprise_name'].')合作机构申请成功通知'; |
|||
$sys=Orgsetup::get('orgsuccess_options','-1'); |
|||
$notic_content=str_replace('#CODE#',input('business_code'),$sys['content_tpl']); |
|||
$notic_content=str_replace('#COMNAME#',input('enterprise_name'),$notic_content); |
|||
$notic_content=str_replace('#DATE#',date('Y年m月d日', time()),$notic_content); |
|||
//公告内容 |
|||
$sys_gg=Orgsetup::get('orggg_options','-1'); |
|||
$gg_title='('.$org_data['enterprise_name'].')合作机构申请成功通知'; |
|||
$gg_content=str_replace('#CODE#',input('business_code'),$sys_gg['content_tpl']); |
|||
$gg_content=str_replace('#COMNAME#',input('enterprise_name'),$gg_content); |
|||
$gg_content=str_replace('#DATE#',date('Y年m月d日', time()),$gg_content); |
|||
$gg_data=[ |
|||
'n_title'=>$gg_title, |
|||
'n_content'=>$gg_content, |
|||
'n_status'=>1, |
|||
'n_time'=>time(), |
|||
'n_uid'=>1, |
|||
'n_cid'=>1, |
|||
'n_hits'=>0, |
|||
]; |
|||
//牌匾内容 |
|||
$pb_title='合作机构牌匾'; |
|||
$sys_pb=Orgsetup::get('orgplaque_options','-1'); |
|||
$pb_content=str_replace('#PBAREANAME#',input('area_name'),$sys_pb['content_tpl']); |
|||
$pb_content=str_replace('#PBCODE#',input('business_code'),$pb_content); |
|||
$pb_content=str_replace('#PBNAME#',input('enterprise_name'),$pb_content); |
|||
$pb_content='<div class="pb_temp" style="background-color: white;"><div style="background: url("/public/img/pb_temp.jpg");height:599px;background-repeat: no-repeat;background-size: 90%;">'.$pb_content.'</div></div><div class="basicname modeub modeac modepc downPDF_btn">下载</div>'; |
|||
$pb_data=[ |
|||
'notice_title'=>$pb_title, |
|||
'notice'=>$pb_content, |
|||
'apply_id'=>$id, |
|||
'user_id'=>$apply['uid'], |
|||
'create_id'=>session('admin_auth.aid'), |
|||
'create_type'=>1, |
|||
'create_time'=>time() |
|||
]; |
|||
//图片 |
|||
$files = request()->file(''); |
|||
if(!empty($files['enterprise_logo'])){ |
|||
$info = $files['enterprise_logo']->rule('md5')->move(ROOT_PATH . config('upload_path') . DS . date('Y-m-d')); |
|||
if ($info) { |
|||
$org_data['enterprise_logo']=config('upload_path') . '/' . date('Y-m-d') . '/' . $info->getFilename(); |
|||
} |
|||
} |
|||
if(!empty($files['person_pic'])){ |
|||
$info2 = $files['person_pic']->rule('md5')->move(ROOT_PATH . config('upload_path') . DS . date('Y-m-d')); |
|||
if ($info2) { |
|||
$org_data['person_pic']=config('upload_path') . '/' . date('Y-m-d') . '/' . $info2->getFilename(); |
|||
} |
|||
} |
|||
|
|||
//合作机构展示内容 |
|||
$org_title=input('enterprise_name'); |
|||
if(empty($org_data['enterprise_logo'])){ |
|||
$org_data['enterprise_logo']=$apply['enterprise_logo']; |
|||
} |
|||
if(empty($org_data['person_pic'])){ |
|||
$org_data['person_pic']=$apply['person_pic']; |
|||
} |
|||
$enterprise_logo= '<img src="'.$org_data['enterprise_logo'].'" style="width:60%">'; |
|||
$person_pic= '<img src="'.$org_data['person_pic'].'" style="width:200px">'; |
|||
$sys_org=Orgsetup::get('orginfo_options','-1'); |
|||
$org_content=str_replace('#ENTERPRISE_NAME#',$org_data['enterprise_name'],$sys_org['content_tpl']); |
|||
$org_content=str_replace('#ENTERPRISE_LOGO#',$enterprise_logo,$org_content); |
|||
$org_content=str_replace('#ENTERPRISE_DESC#',$org_data['enterprise_desc'],$org_content); |
|||
$org_content=str_replace('#ENTERPRISE_ADDRESS#',$org_data['enterprise_address'],$org_content); |
|||
$org_content=str_replace('#LEGAL_PERSON#',$org_data['legal_person'],$org_content); |
|||
$org_content=str_replace('#CONTACT#',$org_data['contact'],$org_content); |
|||
$org_content=str_replace('#PERSON_PIC#',$person_pic,$org_content); |
|||
$org_info=[ |
|||
'n_title'=>$org_title, |
|||
'n_content'=>$org_content, |
|||
'n_status'=>1, |
|||
'n_time'=>time(), |
|||
'n_uid'=>1, |
|||
'n_cid'=>1, |
|||
'n_hits'=>0, |
|||
'n_order'=>1 |
|||
]; |
|||
|
|||
//盖章授权书 |
|||
$sq_title='授权书'; |
|||
$sys_sq=Orgsetup::get('orgsq_options','-1'); |
|||
$sq_content=$sys_sq['content_tpl']; |
|||
$sq_content=str_replace('#ORGNAME#',$org_data['enterprise_name'],$sq_content); |
|||
$sq_content=str_replace('#ORGTYPE#',$org_name,$sq_content); |
|||
$sq_content=str_replace('#VAILDDATE#',$org_data['startdate'].' 至 '.$org_data['enddate'],$sq_content); |
|||
$sq_content=str_replace('#DATE#',date('Y年m月d日', time()),$sq_content); |
|||
$sq_content='<div class="downPDF" >'.$sq_content.'</div><div class="basicname modeub modeac modepc downPDF_btn">下载</div>'; |
|||
$sq_data=[ |
|||
'notice_title'=>$sq_title, |
|||
'notice'=>$sq_content, |
|||
'apply_id'=>$id, |
|||
'user_id'=>$apply['uid'], |
|||
'create_id'=>session('admin_auth.aid'), |
|||
'create_type'=>1, |
|||
'create_time'=>time() |
|||
]; |
|||
}elseif($update_status==4){ |
|||
$notice_title='('.$org_name.')合作机构申请缴费确认通知'; |
|||
$notic_content = '您上传的缴费凭证已通过财务审核!请上传相关资料。'; |
|||
}elseif($update_status==8){ |
|||
$notice_title='('.$org_name.')合作机构申请上传企业信息通知'; |
|||
$notic_content = '您的合作机构申请已通过,请及时上传企业相关信息。'; |
|||
} |
|||
Db::startTrans(); |
|||
try{ |
|||
$org_data['status']=$update_status; |
|||
$org_data['update_user_id']=session('admin_auth.aid'); |
|||
$org_data['update_user_type']=2;//后台 |
|||
$org_data['update_time']=time(); |
|||
$org_data['apply_admin_id']=0; |
|||
$where=array( |
|||
'id'=>$apply['id'], |
|||
'status'=>$apply['status'], |
|||
); |
|||
Db::name('org_apply')->where($where)->update($org_data); |
|||
if(!empty($table_name)){ |
|||
Db::name($table_name)->insert($data); |
|||
} |
|||
|
|||
if(input('submitType')==2 || in_array($update_status,[2,10,4,8])){ |
|||
$n_data=[ |
|||
'notice_title'=>$notice_title, |
|||
'notice'=>$notic_content, |
|||
'apply_id'=>$id, |
|||
'user_id'=>$apply['uid'], |
|||
'create_id'=>session('admin_auth.aid'), |
|||
'create_type'=>1, |
|||
'create_time'=>time() |
|||
]; |
|||
Db::name('cult4notice')->insert($n_data); |
|||
} |
|||
if($update_status==10){ |
|||
if(!empty($gg_data)){ |
|||
Db::name('bsgg')->insert($gg_data); |
|||
} |
|||
if(!empty($pb_data)){ |
|||
Db::name('cult4notice')->insert($pb_data); |
|||
} |
|||
if(!empty($sq_data)){ |
|||
Db::name('cult4notice')->insert($sq_data); |
|||
} |
|||
if(!empty($org_info)){ |
|||
Db::name($apply['org_type'])->insert($org_info); |
|||
} |
|||
} |
|||
// 提交事务 |
|||
Db::commit(); |
|||
}catch (\Exception $exception){ |
|||
Db::rollback();//回滚事务 |
|||
session('TOKEN',input('TOKEN'));//审核失败,将token添加回session里 |
|||
$this->error('审核失败'); |
|||
} |
|||
$this->success('审核成功',url('org/Orgapply/apply_list',array('applystatus'=>$apply['status']))); |
|||
} |
|||
|
|||
/** |
|||
* 文件核验开启/禁止 |
|||
*/ |
|||
public function apply_state() |
|||
{ |
|||
$id=input('x'); |
|||
if (empty($id)){ |
|||
$this->error('用户ID不存在'); |
|||
} |
|||
|
|||
$flag=Db::name('org_upfiles')->where('file_id',$id)->value('flag');//判断当前状态情况 |
|||
if($flag==1){ |
|||
$flagdata = array('flag'=>0); |
|||
Db::name('org_upfiles')->where('file_id',$id)->setField($flagdata); |
|||
$this->success('审核未通过'); |
|||
}else{ |
|||
$flagdata = array('flag'=>1); |
|||
Db::name('org_upfiles')->where('file_id',$id)->setField($flagdata); |
|||
$this->success('审核已通过'); |
|||
} |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,316 @@ |
|||
<?php |
|||
/** |
|||
* Created by PhpStorm. |
|||
* User: Administrator |
|||
* Date: 2018/3/28 |
|||
* Time: 19:08 |
|||
*/ |
|||
namespace app\org\controller; |
|||
|
|||
use app\admin\controller\Base; |
|||
use think\Db; |
|||
use think\Cache; |
|||
|
|||
class Orgsetup extends Base |
|||
{ |
|||
|
|||
/** |
|||
* 合作机构申请同意协议模板设置显示 |
|||
*/ |
|||
public function orgagree_list() |
|||
{ |
|||
$agree_list=Db::name('org_temp')->where('code','orgagree_options')->field('id,name,create_time')->select(); |
|||
|
|||
$this->assign('list',$agree_list); |
|||
return $this->fetch(); |
|||
} |
|||
/** |
|||
* 合作机构申请同意协议模板设置显示 |
|||
*/ |
|||
public function orgagree() |
|||
{ |
|||
$sys=self::get('orgagree_options'); |
|||
$this->assign('sys',$sys); |
|||
return $this->fetch(); |
|||
} |
|||
|
|||
/** |
|||
* 合作机构申请同意协议模板设置保存 |
|||
*/ |
|||
public function orgagreerun() |
|||
{ |
|||
if (!request()->isAjax()){ |
|||
$this->error('提交方式不正确'); |
|||
}else{ |
|||
$options=input('post.options/a'); |
|||
$options['content_tpl']=htmlspecialchars_decode($options['content_tpl']); |
|||
$options['code']='orgagree_options'; |
|||
$options['id']=input('id'); |
|||
$rst=self::update($options); |
|||
if($rst!==false){ |
|||
$this->success('合作机构申请同意协议模板设置保存成功',url('org/Orgsetup/orgagree_list')); |
|||
}else{ |
|||
$this->error('提交参数不正确'); |
|||
} |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 合作机构申请缴费通知模板列表 |
|||
*/ |
|||
public function orgfee_list() |
|||
{ |
|||
$fee_list=Db::name('org_temp')->where('code','orgfee_options')->field('id,name,create_time')->select(); |
|||
|
|||
$this->assign('list',$fee_list); |
|||
return $this->fetch(); |
|||
} |
|||
/** |
|||
* 合作机构申请缴费通知模板设置显示 |
|||
*/ |
|||
public function orgfee() |
|||
{ |
|||
$sys=self::get('orgfee_options',input('id')); |
|||
$this->assign('sys',$sys); |
|||
return $this->fetch(); |
|||
} |
|||
|
|||
/** |
|||
* 合作机构申请缴费通知模板设置保存 |
|||
*/ |
|||
public function orgfeerun() |
|||
{ |
|||
if (!request()->isAjax()){ |
|||
$this->error('提交方式不正确'); |
|||
}else{ |
|||
$options=input('post.options/a'); |
|||
$id = input('id'); |
|||
$options['content_tpl']=htmlspecialchars_decode($options['content_tpl']); |
|||
$options['code']='orgfee_options'; |
|||
$options['id']=$id; |
|||
$rst=self::update($options); |
|||
if($rst!==false){ |
|||
$this->success('合作机构申请缴费通知模板设置保存成功',url('org/Orgsetup/orgfee_list')); |
|||
}else{ |
|||
$this->error('提交参数不正确'); |
|||
} |
|||
} |
|||
} |
|||
/** |
|||
* 合作机构申请初审意见书模板设置显示 |
|||
*/ |
|||
public function orgcheck() |
|||
{ |
|||
$sys=self::get('orgcheck_options',-1); |
|||
$this->assign('sys',$sys); |
|||
return $this->fetch(); |
|||
} |
|||
|
|||
/** |
|||
* 合作机构申请初审意见书模板设置保存 |
|||
*/ |
|||
public function orgcheckrun() |
|||
{ |
|||
if (!request()->isAjax()){ |
|||
$this->error('提交方式不正确',url('org/Orgsetup/orgcheck')); |
|||
}else{ |
|||
$options=input('post.options/a'); |
|||
$options['content_tpl']=htmlspecialchars_decode($options['content_tpl']); |
|||
$options['code']='orgcheck_options'; |
|||
$rst=self::update($options); |
|||
if($rst!==false){ |
|||
$this->success('合作机构申请初审意见书模板设置保存成功',url('org/Orgsetup/orgcheck')); |
|||
}else{ |
|||
$this->error('提交参数不正确',url('org/Orgsetup/orgcheck')); |
|||
} |
|||
} |
|||
} |
|||
/** |
|||
* 合作机构申请公告模板设置显示 |
|||
*/ |
|||
public function orggg() |
|||
{ |
|||
$sys=self::get('orggg_options',-1); |
|||
$this->assign('sys',$sys); |
|||
return $this->fetch(); |
|||
} |
|||
|
|||
/** |
|||
* 合作机构申请公告模板设置保存 |
|||
*/ |
|||
public function orgggrun() |
|||
{ |
|||
if (!request()->isAjax()){ |
|||
$this->error('提交方式不正确',url('org/Orgsetup/orggg')); |
|||
}else{ |
|||
$options=input('post.options/a'); |
|||
$options['content_tpl']=htmlspecialchars_decode($options['content_tpl']); |
|||
$options['code']='orggg_options'; |
|||
$rst=self::update($options); |
|||
if($rst!==false){ |
|||
$this->success('合作机构申请公告模板设置保存成功',url('org/Orgsetup/orggg')); |
|||
}else{ |
|||
$this->error('提交参数不正确',url('org/Orgsetup/orggg')); |
|||
} |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 合作机构申请成功通知公告模板设置显示 |
|||
*/ |
|||
public function orgsuccess() |
|||
{ |
|||
$sys=self::get('orgsuccess_options',-1); |
|||
$this->assign('sys',$sys); |
|||
return $this->fetch(); |
|||
} |
|||
|
|||
/** |
|||
* 合作机构申请成功通知公告模板设置保存 |
|||
*/ |
|||
public function orgsuccessrun() |
|||
{ |
|||
if (!request()->isAjax()){ |
|||
$this->error('提交方式不正确',url('org/Orgsetup/orgsuccess')); |
|||
}else{ |
|||
$options=input('post.options/a'); |
|||
$options['content_tpl']=htmlspecialchars_decode($options['content_tpl']); |
|||
$options['code']='orgsuccess_options'; |
|||
$rst=self::update($options); |
|||
if($rst!==false){ |
|||
$this->success('合作机构申请成功通知公告模板设置保存成功',url('org/Orgsetup/orgsuccess')); |
|||
}else{ |
|||
$this->error('提交参数不正确',url('org/Orgsetup/orgsuccess')); |
|||
} |
|||
} |
|||
} |
|||
/** |
|||
* 合作机构申请牌匾模板设置显示 |
|||
*/ |
|||
public function orgplaque() |
|||
{ |
|||
$sys=self::get('orgplaque_options',-1); |
|||
$this->assign('sys',$sys); |
|||
return $this->fetch(); |
|||
} |
|||
|
|||
/** |
|||
* 合作机构申请牌匾模板设置保存 |
|||
*/ |
|||
public function orgplaquerun() |
|||
{ |
|||
if (!request()->isAjax()){ |
|||
$this->error('提交方式不正确',url('org/Orgsetup/orgplaque')); |
|||
}else{ |
|||
$options=input('post.options/a'); |
|||
$options['content_tpl']=htmlspecialchars_decode($options['content_tpl']); |
|||
$options['code']='orgplaque_options'; |
|||
$rst=self::update($options); |
|||
if($rst!==false){ |
|||
$this->success('合作机构申请成功通知公告模板设置保存成功',url('org/Orgsetup/orgplaque')); |
|||
}else{ |
|||
$this->error('提交参数不正确',url('org/Orgsetup/orgplaque')); |
|||
} |
|||
} |
|||
} |
|||
/** |
|||
* 合作机构模板设置显示 |
|||
*/ |
|||
public function orginfo() |
|||
{ |
|||
$sys=self::get('orginfo_options',-1); |
|||
$this->assign('sys',$sys); |
|||
return $this->fetch(); |
|||
} |
|||
|
|||
/** |
|||
* 合作机构模板设置保存 |
|||
*/ |
|||
public function orginforun() |
|||
{ |
|||
if (!request()->isAjax()){ |
|||
$this->error('提交方式不正确',url('org/Orgsetup/orginfo')); |
|||
}else{ |
|||
$options=input('post.options/a'); |
|||
$options['content_tpl']=htmlspecialchars_decode($options['content_tpl']); |
|||
$options['code']='orginfo_options'; |
|||
$rst=self::update($options); |
|||
if($rst!==false){ |
|||
$this->success('合作机构申请成功通知公告模板设置保存成功',url('org/Orgsetup/orginfo')); |
|||
}else{ |
|||
$this->error('提交参数不正确',url('org/Orgsetup/orginfo')); |
|||
} |
|||
} |
|||
} |
|||
/** |
|||
* 授权书模板设置 |
|||
*/ |
|||
public function orgsq() |
|||
{ |
|||
$sys=self::get('orgsq_options',-1); |
|||
$this->assign('sys',$sys); |
|||
return $this->fetch(); |
|||
} |
|||
|
|||
/** |
|||
* 授权书模板设置保存 |
|||
*/ |
|||
public function orgsqrun() |
|||
{ |
|||
if (!request()->isAjax()){ |
|||
$this->error('提交方式不正确',url('org/Orgsetup/orgsq')); |
|||
}else{ |
|||
$options=input('post.options/a'); |
|||
$options['content_tpl']=htmlspecialchars_decode($options['content_tpl']); |
|||
$options['code']='orgsq_options'; |
|||
$rst=self::update($options); |
|||
if($rst!==false){ |
|||
$this->success('授权书模板设置保存成功',url('org/Orgsetup/orgsq')); |
|||
}else{ |
|||
$this->error('提交参数不正确',url('org/Orgsetup/orgsq')); |
|||
} |
|||
} |
|||
} |
|||
|
|||
public static function get($type_code=-1,$id=-1){ |
|||
if($type_code!=-1 && $id!=-1){ |
|||
$temp = cache($type_code.'_'.$id); |
|||
if(empty($temp)){ |
|||
$where['code']=$type_code; |
|||
$where['id']=$id; |
|||
$temp = Db::name('org_temp')->where($where)->find(); |
|||
cache($type_code.'_'.$id,$temp); |
|||
} |
|||
}elseif ($type_code!=-1){ |
|||
$temp = cache($type_code.'_'); |
|||
if(empty($temp)){ |
|||
$where['code']=$type_code; |
|||
$temp = Db::name('org_temp')->where($where)->find(); |
|||
cache($type_code.'_',$temp); |
|||
} |
|||
} |
|||
return $temp; |
|||
} |
|||
|
|||
public static function update($setup){ |
|||
$setup['create_time']=time(); |
|||
$setup['create_id']=session('admin_auth.aid'); |
|||
if(!empty($setup)){ |
|||
if(empty($setup['id'])){ |
|||
$where['code']=$setup['code']; |
|||
$rst = Db::name('org_temp')->where($where)->update($setup); |
|||
if($rst){ |
|||
cache($setup['code'].'_',$setup); |
|||
} |
|||
}else{ |
|||
$where['code']=$setup['code']; |
|||
$where['id']=$setup['id']; |
|||
$rst = Db::name('org_temp')->where($where)->update($setup); |
|||
if($rst){ |
|||
cache($setup['code'].'_'.$setup['id'],$setup); |
|||
} |
|||
} |
|||
return $rst; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,90 @@ |
|||
<?php |
|||
/** |
|||
* Created by PhpStorm. |
|||
* User: Administrator |
|||
* Date: 2018/3/28 |
|||
* Time: 21:12 |
|||
*/ |
|||
|
|||
namespace app\org\model; |
|||
|
|||
use think\Model; |
|||
use think\Db; |
|||
|
|||
class Orguptype extends Model |
|||
{ |
|||
/** |
|||
* 根据文件类型id获取文件类型信息,返回值为数组 |
|||
* @param int $ftypeid 文件类型id |
|||
* @return array 文件类型信息数组 |
|||
*/ |
|||
public static function getFileTypeInfo($ftypeid) |
|||
{ |
|||
$filetypeInfo = Db::name('org_uptype')->where("ftype_id='$ftypeid'")->select(); |
|||
$filetypeInfo[$ftypeid]=$filetypeInfo?:array(); |
|||
return $filetypeInfo[$ftypeid]; |
|||
} |
|||
/** |
|||
* 上传文件类型表 |
|||
* @param array |
|||
* @param int $apply_id 查询条件(申请ID) |
|||
* @param int $type 查询条件(-1:$apply_id对应的临时和固定文件 1:固定 2:临时) |
|||
* @param int|array $status 查询条件(文件类型显示在哪个状态) |
|||
* @param int $isopen 查询条件(启用状态) |
|||
* @param string $order 结果排序 |
|||
* @return mixed |
|||
*/ |
|||
public static function getList($apply_type,$apply_id,$type=-1,$status=-1,$isopen=1,$order='ftype_id,status,apply_id,isopen',$mustupload=1) |
|||
{ |
|||
$where=array(); |
|||
|
|||
//根据状态值取出对应状态的数据0:所有 1:企业股权 2:实物资产 3:知识产权 4:其他权益 |
|||
if($apply_type!=-1)$where['apply_type']=array(array('eq',0),array('eq',$apply_type), 'or'); |
|||
if($mustupload!=-1)$where['mustupload']=$mustupload; |
|||
if($status != -1)$where['status'] = is_array($status)?array('in',$status):array('eq',$status); |
|||
if($isopen != -1)$where['isopen'] = array('eq',$isopen); |
|||
|
|||
if($status == -1) |
|||
return Db::name('org_uptype')->where($where)->order($order)->paginate(config('paginate.list_rows'),false,['query'=>get_query()]); |
|||
else |
|||
return Db::name('org_uptype')->where($where)->order($order)->select(); |
|||
} |
|||
|
|||
/** |
|||
* 合作机构申请上传文件类型 |
|||
* @param string |
|||
* @param string |
|||
* @param string |
|||
* @param string |
|||
* @param string |
|||
* @param int |
|||
* @param string |
|||
* @param int |
|||
* @return mixed |
|||
*/ |
|||
public static function add($apply_type,$ftypedescr,$ftemp_id,$ftype,$status,$isopen,$apply_id,$user_id,$roletype,$roleid,$roletype2=0,$roleid2=0,$mustupload=1) |
|||
{ |
|||
$sldata=array( |
|||
'ftypedescr'=>$ftypedescr, |
|||
'ftemp_id' => $ftemp_id, |
|||
'apply_type' => $apply_type, |
|||
'mustupload' => $mustupload, |
|||
'ftype'=>$ftype, |
|||
'status'=>$status, |
|||
'isopen'=>$isopen, |
|||
'apply_id'=>$apply_id, |
|||
'user_id'=>$user_id, |
|||
'create_time'=>time(), |
|||
'upload_role_type'=>$roletype, |
|||
'upload_role_id'=>$roleid, |
|||
'upload_role_type2'=>$roletype2, |
|||
'upload_role_id2'=>$roleid2, |
|||
); |
|||
$uptype=Db::name('org_uptype')->insert($sldata); |
|||
if($uptype){ |
|||
return $uptype; |
|||
}else{ |
|||
return 0; |
|||
} |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,119 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
<div class="row maintop"> |
|||
<div class="col-xs-4 col-sm-2 margintop5"> |
|||
|
|||
</div> |
|||
<div class="col-xs-10 col-sm-5 margintop5"> |
|||
<form name="sch_list_sea" class="form-search" method="post" action="{:url('org/Orgapply/apply_list',array('applystatus'=>$applystatus,'allstatus'=>$allstatus))}"> |
|||
<div class="input-group"> |
|||
<span class="input-group-addon"> |
|||
<i class="ace-icon fa fa-check"></i> |
|||
</span> |
|||
<input type="text" name="search_name" class="form-control" value="{$search_name}" placeholder="输入需查询的申请人名称" /> |
|||
<span class="input-group-btn"> |
|||
<button type="submit" class="btn btn-purple btn-sm"> |
|||
<span class="ace-icon fa fa-search icon-on-right bigger-110"></span> |
|||
搜索 |
|||
</button> |
|||
</span> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<div class="col-xs-2 col-sm-2 margintop5"> |
|||
<div class="input-group-btn"> |
|||
<a href="{:url('org/Orgapply/apply_list',array('applystatus'=>$applystatus,'allstatus'=>1))}"> |
|||
<button type="button" class="btn btn-sm btn-purple"> |
|||
<span class="ace-icon fa fa-globe icon-on-right bigger-110"></span> |
|||
全部状态{if condition="$allstatus eq 1"}(激活){/if} |
|||
</button> |
|||
</a> |
|||
</div> |
|||
<div class="input-group-btn"> |
|||
<a href="{:url('org/Orgapply/apply_list',array('applystatus'=>$applystatus))}"> |
|||
<button type="button" class="btn btn-sm btn-pink"> |
|||
<span class="ace-icon fa fa-globe icon-on-right bigger-110"></span> |
|||
当前状态{if condition="$allstatus neq 1"}(激活){/if} |
|||
</button> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<div> |
|||
<form id="leftnav" name="leftnav" method="post" action="" > |
|||
<table class="table table-striped table-bordered table-hover" id="dynamic-table"> |
|||
<thead> |
|||
<tr> |
|||
<th style="width: 80px;">ID</th> |
|||
<th style="width: 250px;">申请用户名</th> |
|||
<th style="width: 80px;">用户状态</th> |
|||
<th style="width: 130px;">机构类别</th> |
|||
<th style="width: 150px;">机构名称</th> |
|||
<th style="width: 200px;">处理状态</th> |
|||
<th style="width: 160px;">申请日期</th> |
|||
<th style="border-right:#CCC solid 1px;">操作</th> |
|||
<th style="display:none;">处理号</th> |
|||
</tr> |
|||
</thead> |
|||
|
|||
<tbody> |
|||
|
|||
{foreach name="apply_list" item="v"} |
|||
<tr> |
|||
<td height="28" >{$v.id}</td> |
|||
<td>{$v.uid,1|get_cult4UserName}</td> |
|||
<td>{if condition="get_cult4UserStatus($v.uid,1) eq 1"}正常{else/}锁定{/if}</td> |
|||
<td>{if condition="$v.org_type eq 'whjrfwzx'"/}文化金服服务中心 |
|||
{elseif condition="$v.org_type eq 'zbzq'"/}专板(专区) |
|||
{elseif condition="$v.org_type eq 'ssyyzx'"/}省(市)运营中心 |
|||
{elseif condition="$v.org_type eq 'tjjg'"/}推荐机构 |
|||
{elseif condition="$v.org_type eq 'zcfwjg'"/}驻场服务机构{/if} |
|||
</td> |
|||
<td>{if condition="$v.org_name eq 1"/}省级文化金服服务中心 |
|||
{elseif condition="$v.org_name eq 2"/}市级文化金融服务中心 |
|||
{elseif condition="$v.org_name eq 3"/}(行业)专板 |
|||
{elseif condition="$v.org_name eq 4"/}(行业)专区 |
|||
{elseif condition="$v.org_name eq 5"/}省级运营中心 |
|||
{elseif condition="$v.org_name eq 6"/}市级运营中心 |
|||
{elseif condition="$v.org_name eq 7"/}推荐机构 |
|||
{elseif condition="$v.org_name eq 8"/}驻场服务机构全国 |
|||
{elseif condition="$v.org_name eq 9"/}驻场服务机构区域{/if}</td> |
|||
<td>{$v.descr}</td> |
|||
<td>{$v.create_time|date='Y-m-d H:i:s',###}</td> |
|||
<td> |
|||
<div class="hidden-sm hidden-xs action-buttons"> |
|||
{if condition="$v.status eq $applystatus"} |
|||
{if condition="$v.apply_admin_id eq 0"} |
|||
<a class="green rst-url-btn" href="{:url('org/Orgapply/apply_applyed',array('id'=>$v['id'],'status'=>$v['status']))}" title="受理"> |
|||
<i class="ace-icon fa fa-lock bigger-130"></i> 受理 |
|||
</a> |
|||
{elseif condition="$loginuser==$v.apply_admin_id"} |
|||
<a class="blue" href="{:url('org/Orgapply/apply_check',array('id'=>$v['id'],'applystatus'=>$v['status']))}" title="审核"> |
|||
<i class="ace-icon fa fa-gavel bigger-130"></i> 审核 |
|||
</a> |
|||
{/if} |
|||
{/if} |
|||
</div> |
|||
</td> |
|||
<td style="display:none;"></td> |
|||
</tr> |
|||
{/foreach} |
|||
<tr> |
|||
<td height="50" colspan="10" align="left">{$page}</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
|
|||
</div><!-- /.page-content --> |
|||
{/block} |
|||
@ -0,0 +1,186 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
<link href="__PUBLIC__/ppy/css/fileinput.css" media="all" rel="stylesheet" type="text/css" /> |
|||
<script src="__PUBLIC__/ppy/js/fileinput.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ppy/js/fileinput_locale_zh.js" type="text/javascript"></script> |
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
添加固定上传文件类型 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm2" name="uptype_add" method="post" action="{:url('org/Orgapply/uptype_runadd')}"> |
|||
<input type="hidden" name="TOKEN" value="{:session('TOKEN')}"> |
|||
<input type="hidden" name="apply_id" id="apply_id" value="{$apply_id}"/> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 文件类型: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="ftype_main" class="col-sm-5" disabled> |
|||
<option value="">请选择文件类型</option> |
|||
{if condition="$apply_id gt 0"} |
|||
<option value="1">固定</option> |
|||
<option value="2" selected>临时</option> |
|||
{else/} |
|||
<option value="1" selected>固定</option> |
|||
<option value="2">临时</option> |
|||
{/if} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 合作机构类型: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="apply_type" class="col-sm-5" required> |
|||
<option value="">-请选择合作机构类型-</option> |
|||
<option value="0">所有</option> |
|||
<option value="1">省级文化金融服务中心</option> |
|||
<option value="2">市级文化金融服务中心</option> |
|||
<option value="3">(行业)专板</option> |
|||
<option value="4">(行业)专区</option> |
|||
<option value="5">省级运营中心</option> |
|||
<option value="6">市级运营中心</option> |
|||
<option value="7">推荐机构</option> |
|||
<option value="8">驻场服务机构全国</option> |
|||
<option value="9">驻场服务机构区域</option> |
|||
</select> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>请选择该固定文件对应的合作机构类型</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 必须上传项: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="mustupload" class="col-sm-5" required> |
|||
<option value="0">非必须</option> |
|||
<option value="1" selected>必须</option> |
|||
</select> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>请选择项目持有人</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group" style="display: none"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 临时文件类型对应申请ID: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="apply_id_show" id="apply_id_show" class="col-xs-10 col-sm-5" value="{$apply_id}" disabled/> |
|||
</div> |
|||
</div> |
|||
<div class="space-4" style="display: none"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 文件类型描述: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="ftypedescr" id="ftypedescr" placeholder="输入文件类型描述" class="col-xs-10 col-sm-5" required/> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>请输入文件类型描述</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板文件上传: </label> |
|||
<div class="col-sm-4"> |
|||
<input name="file_one" type="file" class="file col-xs-6 col-sm-6" data-show-preview="false" data-show-upload="false" data-show-caption="true"> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 接受文件类型: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="ftype" class="col-sm-5" required> |
|||
<option value="">-请选择接受文件类型-</option> |
|||
<option value="JPG">JPG</option> |
|||
<option value="PDF">PDF</option> |
|||
<option value="DOC">DOC</option> |
|||
</select> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>选择可接受的文件类型</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 添加文件状态: </label> |
|||
<div class="col-sm-10"> |
|||
{if condition="$status egt 0"}<select name="status" class="col-sm-5" disabled>{else/}<select name="status" class="col-sm-5" required>{/if} |
|||
<option value="">-请选择添加文件状态-</option> |
|||
{foreach name="statuslist" item="v" key="i"} |
|||
<option value="{$v.status}" {if condition="$status eq $v.status"}selected{/if}>{$v.descr}</option> |
|||
{/foreach} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 资料上传者: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="roletype" id="roletype" class="col-sm-2" onChange="loadRole('roletype','roletitle','{:url('admin/Ajax/getRole')}');" required> |
|||
<option value="">-资料上传者类型-</option> |
|||
<option value="1">前台会员角色</option> |
|||
<option value="2">后台员工角色</option> |
|||
</select> |
|||
<select name="roletitle" id="roletitle" class="col-sm-2" required> |
|||
<option value="0">-资料上传者角色-</option> |
|||
</select> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>请选择资料上传者</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 资料辅助上传者: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="roletype2" id="roletype2" class="col-sm-2" onChange="loadRole('roletype2','roletitle2','{:url('admin/Ajax/getRole')}');"> |
|||
<option value="">-资料辅助上传者类型-</option> |
|||
<option value="1">前台会员角色</option> |
|||
<option value="2">后台员工角色</option> |
|||
</select> |
|||
<select name="roletitle2" id="roletitle2" class="col-sm-2"> |
|||
<option value="0">-资料辅助上传者角色-</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 是否启用: </label> |
|||
<div class="col-sm-10" style="padding-top:5px;"> |
|||
<input name="isopen" id="isopen" value="1" class="ace ace-switch ace-switch-4 btn-flat" type="checkbox" /> |
|||
<span class="lbl"> 默认关闭</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="clearfix form-actions"> |
|||
<div class="col-md-offset-3 col-md-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
添加 |
|||
</button> |
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
<a href="{:url('org/Orgapply/uptype_list')}"> |
|||
<button class="btn btn-info" type="button"> |
|||
<i class="ace-icon fa fa-bolt bigger-110"></i> |
|||
返回 |
|||
</button> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
|
|||
</div><!-- /.page-content --> |
|||
{/block} |
|||
{block name="scripts"} |
|||
<script type="text/javascript" src="__PUBLIC__/others/role.js"></script> |
|||
{/block} |
|||
@ -0,0 +1,182 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
<link href="__PUBLIC__/ppy/css/fileinput.css" media="all" rel="stylesheet" type="text/css" /> |
|||
<script src="__PUBLIC__/ppy/js/fileinput.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ppy/js/fileinput_locale_zh.js" type="text/javascript"></script> |
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
添加固定上传文件类型 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm2" name="uptype_add" method="post" action="{:url('org/Orgapply/uptype_edit')}"> |
|||
<input type="hidden" name="TOKEN" value="{:session('TOKEN')}"> |
|||
<input type="hidden" name="ftype_id" id="ftype_id" value="{$uptype.ftype_id}"/> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 文件类型: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="ftype_main" class="col-sm-5" disabled> |
|||
<option value="">请选择文件类型</option> |
|||
<option value="1" selected>固定</option> |
|||
<option value="2">临时</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 托管类型: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="apply_type" class="col-sm-5" required> |
|||
<option value="">-请选择合作机构类型-</option> |
|||
<option value="0"{if condition="$uptype.apply_type eq 0"} selected {/if}>所有</option> |
|||
<option value="1"{if condition="$uptype.apply_type eq 1"} selected {/if}>省级文化金融服务中心</option> |
|||
<option value="2"{if condition="$uptype.apply_type eq 2"} selected {/if}>市级文化金融服务中心</option> |
|||
<option value="3"{if condition="$uptype.apply_type eq 3"} selected {/if}>(行业)专板</option> |
|||
<option value="4"{if condition="$uptype.apply_type eq 4"} selected {/if}>(行业)专区</option> |
|||
<option value="5"{if condition="$uptype.apply_type eq 5"} selected {/if}>省级运营中心</option> |
|||
<option value="6"{if condition="$uptype.apply_type eq 6"} selected {/if}>市级运营中心</option> |
|||
<option value="7"{if condition="$uptype.apply_type eq 7"} selected {/if}>推荐机构</option> |
|||
<option value="8"{if condition="$uptype.apply_type eq 8"} selected {/if}>驻场服务机构全国</option> |
|||
<option value="9"{if condition="$uptype.apply_type eq 9"} selected {/if}>驻场服务机构区域</option> |
|||
</select> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>请选择该固定文件对应的合作机构类型</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 必须上传项: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="mustupload" class="col-sm-5" required> |
|||
<option value="0" {if condition="$uptype.mustupload eq 0"} selected {/if}>非必须</option> |
|||
<option value="1" {if condition="$uptype.mustupload eq 1"} selected {/if}>必须</option> |
|||
</select> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="space-4" style="display: none"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 文件类型描述: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="ftypedescr" id="ftypedescr" placeholder="输入文件类型描述" class="col-xs-10 col-sm-5" value="{$uptype.ftypedescr}" required/> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>请输入文件类型描述</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板文件上传: </label> |
|||
<div class="col-sm-4"> |
|||
<input name="file_one" type="file" class="file col-xs-6 col-sm-6" data-show-preview="false" data-show-upload="false" data-show-caption="true"> |
|||
{if(empty($upfile))}{else/}<a href="{$upfile.path|get_imgurl}" target="_blank">查看原始上传文件</a>{/if} |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 接受文件类型: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="ftype" class="col-sm-5" required> |
|||
<option value="">-请选择接受文件类型-</option> |
|||
<option value="JPG" {if condition="$uptype.ftype eq 'JPG'"} selected {/if}>JPG</option> |
|||
<option value="PDF" {if condition="$uptype.ftype eq 'PDF'"} selected {/if}>PDF</option> |
|||
<option value="DOC" {if condition="$uptype.ftype eq 'DOC'"} selected {/if}>DOC</option> |
|||
</select> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>选择可接受的文件类型</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 添加文件状态: </label> |
|||
<div class="col-sm-10"> |
|||
{if condition="$uptype.status egt 0"}<select name="status" class="col-sm-5" >{else/}<select name="status" class="col-sm-5" required>{/if} |
|||
<option value="">-请选择添加文件状态-</option> |
|||
{foreach name="statuslist" item="v" key="i"} |
|||
<option value="{$v.status}" {if condition="$uptype.status eq $v.status"}selected{/if}>{$v.descr}</option> |
|||
{/foreach} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 资料上传者: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="roletype" id="roletype" class="col-sm-2" onChange="loadRole('roletype','roletitle','{:url('admin/Ajax/getRole')}');" required> |
|||
<option value="">-资料上传者类型-</option> |
|||
<option value="1" {if condition="$uptype.upload_role_type eq 1"} selected {/if}>前台会员角色</option> |
|||
<option value="2" {if condition="$uptype.upload_role_type eq 2"} selected {/if}>后台员工角色</option> |
|||
</select> |
|||
<select name="roletitle" id="roletitle" class="col-sm-2" required> |
|||
<option value="0">-资料上传者角色-</option> |
|||
{foreach name="list1" item="v" key="i"} |
|||
<option value="{$v.id}" {if condition="$uptype.upload_role_id eq $v.id"}selected{/if}>{$v.name}</option> |
|||
{/foreach} |
|||
</select> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>请选择资料上传者</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 资料辅助上传者: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="roletype2" id="roletype2" class="col-sm-2" onChange="loadRole('roletype2','roletitle2','{:url('admin/Ajax/getRole')}');"> |
|||
<option value="">-资料辅助上传者类型-</option> |
|||
<option value="1" {if condition="$uptype.upload_role_type2 eq 1"} selected {/if}>前台会员角色</option> |
|||
<option value="2" {if condition="$uptype.upload_role_type2 eq 2"} selected {/if}>后台员工角色</option> |
|||
</select> |
|||
<select name="roletitle2" id="roletitle2" class="col-sm-2"> |
|||
<option value="0">-资料辅助上传者角色-</option> |
|||
{foreach name="list2" item="v" key="i"} |
|||
<option value="{$v.id}" {if condition="$uptype.upload_role_id2 eq $v.id"}selected{/if}>{$v.name}</option> |
|||
{/foreach} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 是否启用: </label> |
|||
<div class="col-sm-10" style="padding-top:5px;"> |
|||
<input name="isopen" id="isopen" value="1" class="ace ace-switch ace-switch-4 btn-flat" type="checkbox" {if condition="$uptype.isopen eq 1"} checked {/if} /> |
|||
<span class="lbl"> 默认关闭</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="clearfix form-actions"> |
|||
<div class="col-md-offset-3 col-md-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
<a href="{:url('org/Orgapply/uptype_list')}"> |
|||
<button class="btn btn-info" type="button"> |
|||
<i class="ace-icon fa fa-bolt bigger-110"></i> |
|||
返回 |
|||
</button> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
|
|||
</div><!-- /.page-content --> |
|||
{/block} |
|||
{block name="scripts"} |
|||
<script type="text/javascript" src="__PUBLIC__/others/role.js"></script> |
|||
{/block} |
|||
@ -0,0 +1,115 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
<div class="row maintop"> |
|||
<div class="col-xs-4 col-sm-2 margintop5"> |
|||
<a href="{:url('org/Orgapply/uptype_add')}"> |
|||
<button class="btn btn-sm btn-danger"> |
|||
<i class="ace-icon fa fa-bolt bigger-110"></i> |
|||
添加固定上传文件类型 |
|||
</button> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<div> |
|||
<table class="table table-striped table-bordered table-hover" id="dynamic-table"> |
|||
<thead> |
|||
<tr> |
|||
<th style="width: 50px;">ID</th> |
|||
<th style="width: 200px;">文件描述</th> |
|||
<th style="width: 50px;">文件类型</th> |
|||
<th style="width: 50px;">文件模板</th> |
|||
<th style="width: 50px;">机构类型</th> |
|||
<th style="width: 60px;">接受文件类型</th> |
|||
<th style="width: 100px;">上传状态</th> |
|||
<th style="width: 50px;">启用状态</th> |
|||
<th style="width: 60px;">申请ID</th> |
|||
<th style="width: 120px;">操作员</th> |
|||
<th style="width: 150px;">上传者</th> |
|||
<th style="width: 250px;">辅助上传者</th> |
|||
<th style="width: 150px;border-right:#CCC solid 1px;">操作日期</th> |
|||
<th style="width: 50px;border-right:#CCC solid 1px;">必须项目</th> |
|||
<th style="border-right:#CCC solid 1px;">操作</th> |
|||
</tr> |
|||
</thead> |
|||
|
|||
<tbody> |
|||
|
|||
{foreach name="uptype_list" item="v"} |
|||
<tr> |
|||
<td height="28" >{$v.ftype_id}</td> |
|||
<td>{$v.ftypedescr}</td> |
|||
<td>{if condition="$v.apply_id eq 0"}固定{else/}临时{/if}</td> |
|||
<td>{if condition="get_OrgPathFromFileID($v.ftemp_id) eq '未上传'"}未上传{else/}<a href="{$v.ftemp_id|get_OrgPathFromFileID|get_imgurl}" target="_blank">查看</a>{/if}</td> |
|||
<td>{if condition="$v.apply_type eq 0"}所有 |
|||
{elseif condition="$v.apply_type eq 1"}省级文化金服服务中心 |
|||
{elseif condition="$v.apply_type eq 2"}市级文化金融服务中心 |
|||
{elseif condition="$v.apply_type eq 3"}(行业)专板 |
|||
{elseif condition="$v.apply_type eq 4"}(行业)专区 |
|||
{elseif condition="$v.apply_type eq 5"}省级运营中心 |
|||
{elseif condition="$v.apply_type eq 6"}市级运营中心 |
|||
{elseif condition="$v.apply_type eq 7"}推荐机构 |
|||
{elseif condition="$v.apply_type eq 8"}驻场服务机构全国 |
|||
{elseif condition="$v.apply_type eq 9"}驻场服务机构区域{/if} |
|||
</td> |
|||
<td>{$v.ftype}</td> |
|||
<td>{$v.status|get_OrgStatus}</td> |
|||
<td> |
|||
{if condition="$v['isopen'] eq 1"} |
|||
<a class="red open-btn" href="{:url('org/Orgapply/uptype_state')}" data-id="{$v.ftype_id}" title="已开启"> |
|||
<div id="zt{$v.ftype_id}"><button class="btn btn-minier btn-yellow">开启</button></div> |
|||
</a> |
|||
{else/} |
|||
<a class="red open-btn" href="{:url('org/Orgapply/uptype_state')}" data-id="{$v.ftype_id}" title="已禁用"> |
|||
<div id="zt{$v.ftype_id}"><button class="btn btn-minier btn-danger">禁用</button></div> |
|||
</a> |
|||
{/if} |
|||
</td> |
|||
<td>{if condition="$v.apply_id eq 0"}无{else/}{$v.apply_id}{/if}</td> |
|||
<td>{$v.user_id|get_cult4UserName=###,2}</td> |
|||
<td>{$v.upload_role_id,$v.upload_role_type|get_cult4RoleName}</td> |
|||
<td>{$v.upload_role_id2,$v.upload_role_type2|get_cult4RoleName}</td> |
|||
<td>{$v.create_time|date='Y-m-d H:i:s',###}</td> |
|||
<td>{if condition="$v.mustupload eq 1"}必须{else/}非必须{/if}</td> |
|||
<td> |
|||
<div class="hidden-sm hidden-xs action-buttons"> |
|||
<a class="green" href="{:url('org/Orgapply/uptype_edit',array('ftype_id'=>$v['ftype_id']))}" data-toggle="tooltip" title="修改"> |
|||
<i class="ace-icon fa fa-pencil bigger-130"></i> |
|||
</a> |
|||
</div> |
|||
<div class="hidden-md hidden-lg"> |
|||
<div class="inline position-relative"> |
|||
<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> |
|||
<i class="ace-icon fa fa-cog icon-only bigger-110"></i> |
|||
</button> |
|||
<ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> |
|||
<li> |
|||
<a href="{:url('org/Orgapply/uptype_edit',array('ftype_id'=>$v['ftype_id']))}" class="tooltip-success" data-rel="tooltip" title="" data-original-title="修改"> |
|||
<span class="green"> |
|||
<i class="ace-icon fa fa-pencil-square-o bigger-120"></i> |
|||
</span> |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
</td> |
|||
</tr> |
|||
{/foreach} |
|||
<tr> |
|||
<td height="50" colspan="17" align="left">{$page}</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
|
|||
</div><!-- /.page-content --> |
|||
{/block} |
|||
@ -0,0 +1,53 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
合作机构申请同意协议模板设置 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm" name="sys" method="post" action="{:url('org/OrgSetup/orgagreerun')}"> |
|||
<input name="id" type="hidden" value="{$sys.id}" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板内容: </label> |
|||
<div class="col-sm-10"> |
|||
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script> |
|||
<textarea name="options[content_tpl]" rows="100%" style="width:100%" id="myEditor">{$sys.content_tpl}</textarea> |
|||
<script type="text/javascript"> |
|||
var editor = new UE.ui.Editor(); |
|||
editor.render("myEditor"); |
|||
</script> |
|||
<span style="color: #F3920A;"></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-sm-offset-3 col-sm-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/block} |
|||
@ -0,0 +1,40 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
<div class="row"> |
|||
<div class="col-xs-6"> |
|||
<div> |
|||
<form id="leftnav" name="leftnav" method="post" action="" > |
|||
<table class="table table-striped table-bordered table-hover" id="dynamic-table"> |
|||
<thead> |
|||
<tr> |
|||
<th style="width: 250px;">合作机构名称</th> |
|||
<th style="width: 160px;">发布日期</th> |
|||
<th style="border-right:#CCC solid 1px;width:40px;">操作</th> |
|||
</tr> |
|||
</thead> |
|||
|
|||
<tbody> |
|||
|
|||
{foreach name="$list" item="v"} |
|||
<tr> |
|||
<td>{$v.name}</td> |
|||
<td>{$v.create_time|date='Y-m-d H:i:s',###}</td> |
|||
<td align="center"> |
|||
<a class="green" href="{:url('org/Orgsetup/orgagree',array('id'=>$v.id))}" title="修改"> |
|||
<i class="ace-icon fa fa-pencil bigger-130"></i> |
|||
</a> |
|||
</td> |
|||
</tr> |
|||
{/foreach} |
|||
</tbody> |
|||
</table> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
|
|||
</div><!-- /.page-content --> |
|||
{/block} |
|||
@ -0,0 +1,53 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
合作机构申请初审意见书模板设置 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm" name="sys" method="post" action="{:url('org/OrgSetup/orgcheckrun')}"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板内容: </label> |
|||
<div class="col-sm-10"> |
|||
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script> |
|||
<textarea name="options[content_tpl]" rows="100%" style="width:100%" id="myEditor">{$sys.content_tpl}</textarea> |
|||
<script type="text/javascript"> |
|||
var editor = new UE.ui.Editor(); |
|||
editor.render("myEditor"); |
|||
</script> |
|||
<span style="color: #F3920A;"></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-sm-offset-3 col-sm-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/block} |
|||
@ -0,0 +1,53 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
合作机构申请缴费通知模板设置 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm" name="sys" method="post" action="{:url('org/OrgSetup/orgfeerun')}"> |
|||
<input name="id" type="hidden" value="{$sys.id}" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板内容: </label> |
|||
<div class="col-sm-10"> |
|||
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script> |
|||
<textarea name="options[content_tpl]" rows="100%" style="width:100%" id="myEditor">{$sys.content_tpl}</textarea> |
|||
<script type="text/javascript"> |
|||
var editor = new UE.ui.Editor(); |
|||
editor.render("myEditor"); |
|||
</script> |
|||
<span style="color: #F3920A;"></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-sm-offset-3 col-sm-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/block} |
|||
@ -0,0 +1,40 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
<div class="row"> |
|||
<div class="col-xs-6"> |
|||
<div> |
|||
<form id="leftnav" name="leftnav" method="post" action="" > |
|||
<table class="table table-striped table-bordered table-hover" id="dynamic-table"> |
|||
<thead> |
|||
<tr> |
|||
<th style="width: 250px;">合作机构名称</th> |
|||
<th style="width: 160px;">发布日期</th> |
|||
<th style="border-right:#CCC solid 1px;width:40px;">操作</th> |
|||
</tr> |
|||
</thead> |
|||
|
|||
<tbody> |
|||
|
|||
{foreach name="$list" item="v"} |
|||
<tr> |
|||
<td>{$v.name}</td> |
|||
<td>{$v.create_time|date='Y-m-d H:i:s',###}</td> |
|||
<td align="center"> |
|||
<a class="green" href="{:url('org/Orgsetup/orgfee',array('id'=>$v.id))}" title="修改"> |
|||
<i class="ace-icon fa fa-pencil bigger-130"></i> |
|||
</a> |
|||
</td> |
|||
</tr> |
|||
{/foreach} |
|||
</tbody> |
|||
</table> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
|
|||
</div><!-- /.page-content --> |
|||
{/block} |
|||
@ -0,0 +1,53 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
合作机构申请公告模板设置 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm" name="sys" method="post" action="{:url('org/OrgSetup/orgggrun')}"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板内容: </label> |
|||
<div class="col-sm-10"> |
|||
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script> |
|||
<textarea name="options[content_tpl]" rows="100%" style="width:100%" id="myEditor">{$sys.content_tpl}</textarea> |
|||
<script type="text/javascript"> |
|||
var editor = new UE.ui.Editor(); |
|||
editor.render("myEditor"); |
|||
</script> |
|||
<span style="color: #F3920A;"></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-sm-offset-3 col-sm-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/block} |
|||
@ -0,0 +1,53 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
合作机构模板设置 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm" name="sys" method="post" action="{:url('org/OrgSetup/orginforun')}"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板内容: </label> |
|||
<div class="col-sm-10"> |
|||
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script> |
|||
<textarea name="options[content_tpl]" rows="100%" style="width:100%" id="myEditor">{$sys.content_tpl}</textarea> |
|||
<script type="text/javascript"> |
|||
var editor = new UE.ui.Editor(); |
|||
editor.render("myEditor"); |
|||
</script> |
|||
<span style="color: #F3920A;"></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-sm-offset-3 col-sm-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/block} |
|||
@ -0,0 +1,53 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
合作机构申请牌匾模板设置 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm" name="sys" method="post" action="{:url('org/OrgSetup/orgplaquerun')}"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板内容: </label> |
|||
<div class="col-sm-10"> |
|||
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script> |
|||
<textarea name="options[content_tpl]" rows="100%" style="width:100%" id="myEditor">{$sys.content_tpl}</textarea> |
|||
<script type="text/javascript"> |
|||
var editor = new UE.ui.Editor(); |
|||
editor.render("myEditor"); |
|||
</script> |
|||
<span style="color: #F3920A;"></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-sm-offset-3 col-sm-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/block} |
|||
@ -0,0 +1,53 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
授权书模板设置 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm" name="sys" method="post" action="{:url('org/OrgSetup/orgsqrun')}"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板内容: </label> |
|||
<div class="col-sm-10"> |
|||
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script> |
|||
<textarea name="options[content_tpl]" rows="100%" style="width:100%" id="myEditor">{$sys.content_tpl}</textarea> |
|||
<script type="text/javascript"> |
|||
var editor = new UE.ui.Editor(); |
|||
editor.render("myEditor"); |
|||
</script> |
|||
<span style="color: #F3920A;"></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-sm-offset-3 col-sm-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/block} |
|||
@ -0,0 +1,53 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
合作机构申请成功通知公告模板设置 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm" name="sys" method="post" action="{:url('org/OrgSetup/orgsuccessrun')}"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板内容: </label> |
|||
<div class="col-sm-10"> |
|||
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script> |
|||
<textarea name="options[content_tpl]" rows="100%" style="width:100%" id="myEditor">{$sys.content_tpl}</textarea> |
|||
<script type="text/javascript"> |
|||
var editor = new UE.ui.Editor(); |
|||
editor.render("myEditor"); |
|||
</script> |
|||
<span style="color: #F3920A;"></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-sm-offset-3 col-sm-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/block} |
|||
@ -0,0 +1,17 @@ |
|||
<?php |
|||
// +---------------------------------------------------------------------- |
|||
// | ThinkPHP [ WE CAN DO IT JUST THINK ] |
|||
// +---------------------------------------------------------------------- |
|||
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved. |
|||
// +---------------------------------------------------------------------- |
|||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) |
|||
// +---------------------------------------------------------------------- |
|||
// | Author: liu21st <liu21st@gmail.com> |
|||
// +---------------------------------------------------------------------- |
|||
|
|||
//调用extend的路由类 |
|||
$Route = new \Route; |
|||
$Route->route_rule(); |
|||
return [ |
|||
//也可以这里添加路由规则 |
|||
]; |
|||
@ -0,0 +1,25 @@ |
|||
<?php return array ( |
|||
'app_init' => |
|||
array ( |
|||
), |
|||
'app_begin' => |
|||
array ( |
|||
), |
|||
'module_init' => |
|||
array ( |
|||
0 => 'app\\common\\behavior\\WebLog', |
|||
), |
|||
'action_begin' => |
|||
array ( |
|||
), |
|||
'view_filter' => |
|||
array ( |
|||
), |
|||
'log_write' => |
|||
array ( |
|||
), |
|||
'app_end' => |
|||
array ( |
|||
0 => 'app\\admin\\behavior\\Cron', |
|||
), |
|||
); |
|||
@ -0,0 +1,256 @@ |
|||
<?php |
|||
/** |
|||
* Created by PhpStorm. |
|||
* User: Administrator |
|||
* Date: 2018/3/27 |
|||
* Time: 13:44 |
|||
*/ |
|||
|
|||
namespace app\tuoguan\controller; |
|||
|
|||
use app\admin\controller\Base; |
|||
use app\admin\model\Options; |
|||
use think\Db; |
|||
use think\Cache; |
|||
|
|||
class Tgsetup extends Base |
|||
{ |
|||
|
|||
/** |
|||
* 托管缴费通知模板设置显示 |
|||
*/ |
|||
public function tgfee() |
|||
{ |
|||
$sys=Options::get_options('tgfee_options',$this->lang); |
|||
$this->assign('sys',$sys); |
|||
return $this->fetch(); |
|||
} |
|||
|
|||
/** |
|||
* 托管缴费通知模板设置保存 |
|||
*/ |
|||
public function tgfeerun() |
|||
{ |
|||
if (!request()->isAjax()){ |
|||
$this->error('提交方式不正确',url('tuoguan/Tgsetup/tgfee')); |
|||
}else{ |
|||
$options=input('post.options/a'); |
|||
$options['content_tpl']=htmlspecialchars_decode($options['content_tpl']); |
|||
$rst=Options::set_options($options,'tgfee_options',$this->lang); |
|||
if($rst!==false){ |
|||
cache("tgfee_options_".$this->lang,null); |
|||
$this->success('托管缴费通知模板设置保存成功',url('tuoguan/Tgsetup/tgfee')); |
|||
}else{ |
|||
$this->error('提交参数不正确',url('tuoguan/Tgsetup/tgfee')); |
|||
} |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 托管初审通知模板设置显示 |
|||
*/ |
|||
public function tgcheck() |
|||
{ |
|||
$sys=Options::get_options('tgcheck_options',$this->lang); |
|||
$this->assign('sys',$sys); |
|||
return $this->fetch(); |
|||
} |
|||
|
|||
/** |
|||
* 托管初审通知模板设置保存 |
|||
*/ |
|||
public function tgcheckrun() |
|||
{ |
|||
if (!request()->isAjax()){ |
|||
$this->error('提交方式不正确',url('tuoguan/Tgsetup/tgcheck')); |
|||
}else{ |
|||
$options=input('post.options/a'); |
|||
$options['content_tpl']=htmlspecialchars_decode($options['content_tpl']); |
|||
$rst=Options::set_options($options,'tgcheck_options',$this->lang); |
|||
if($rst!==false){ |
|||
cache("tgcheck_options_".$this->lang,null); |
|||
$this->success('托管初审通知模板设置保存成功',url('tuoguan/Tgsetup/tgcheck')); |
|||
}else{ |
|||
$this->error('提交参数不正确',url('tuoguan/Tgsetup/tgcheck')); |
|||
} |
|||
} |
|||
} |
|||
/** |
|||
* 托管风控审核通知模板设置显示 |
|||
*/ |
|||
public function tgcheckfk() |
|||
{ |
|||
$sys=Options::get_options('tgcheckfk_options',$this->lang); |
|||
$this->assign('sys',$sys); |
|||
return $this->fetch(); |
|||
} |
|||
|
|||
/** |
|||
* 托管风控审核通知模板设置保存 |
|||
*/ |
|||
public function tgcheckfkrun() |
|||
{ |
|||
if (!request()->isAjax()){ |
|||
$this->error('提交方式不正确',url('tuoguan/Tgsetup/tgcheckfk')); |
|||
}else{ |
|||
$options=input('post.options/a'); |
|||
$options['content_tpl']=htmlspecialchars_decode($options['content_tpl']); |
|||
$rst=Options::set_options($options,'tgcheckfk_options',$this->lang); |
|||
if($rst!==false){ |
|||
cache("tgcheckfk_options_".$this->lang,null); |
|||
$this->success('托管风控审核通知模板设置保存成功',url('tuoguan/Tgsetup/tgcheckfk')); |
|||
}else{ |
|||
$this->error('提交参数不正确',url('tuoguan/Tgsetup/tgcheckfk')); |
|||
} |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 托管公告通知模板设置显示 |
|||
*/ |
|||
public function tgsuccessgg() |
|||
{ |
|||
$sys=Options::get_options('tgsuccess_options',$this->lang); |
|||
$this->assign('sys',$sys); |
|||
return $this->fetch(); |
|||
} |
|||
|
|||
/** |
|||
* 托管公告通知模板设置保存 |
|||
*/ |
|||
public function tgsuccessggrun() |
|||
{ |
|||
if (!request()->isAjax()){ |
|||
$this->error('提交方式不正确',url('tuoguan/Tgsetup/tgsuccessgg')); |
|||
}else{ |
|||
$options=input('post.options/a'); |
|||
$options['content_tpl']=htmlspecialchars_decode($options['content_tpl']); |
|||
$rst=Options::set_options($options,'tgsuccess_options',$this->lang); |
|||
if($rst!==false){ |
|||
cache("tgsuccess_options_".$this->lang,null); |
|||
$this->success('托管公告模板设置保存成功',url('tuoguan/Tgsetup/tgsuccessgg')); |
|||
}else{ |
|||
$this->error('提交参数不正确',url('tuoguan/Tgsetup/tgsuccessgg')); |
|||
} |
|||
} |
|||
} |
|||
/** |
|||
* 托管公告通知模板设置显示 |
|||
*/ |
|||
public function tgagree() |
|||
{ |
|||
$sys=Options::get_options('tgagree_options',$this->lang); |
|||
$this->assign('sys',$sys); |
|||
return $this->fetch(); |
|||
} |
|||
|
|||
/** |
|||
* 托管公告通知模板设置保存 |
|||
*/ |
|||
public function tgagreerun() |
|||
{ |
|||
if (!request()->isAjax()){ |
|||
$this->error('提交方式不正确',url('tuoguan/Tgsetup/tgagree')); |
|||
}else{ |
|||
$options=input('post.options/a'); |
|||
$options['content_tpl']=htmlspecialchars_decode($options['content_tpl']); |
|||
$rst=Options::set_options($options,'tgagree_options',$this->lang); |
|||
if($rst!==false){ |
|||
cache("tgagree_options_".$this->lang,null); |
|||
$this->success('托管公告模板设置保存成功',url('tuoguan/Tgsetup/tgagree')); |
|||
}else{ |
|||
$this->error('提交参数不正确',url('tuoguan/Tgsetup/tgagree')); |
|||
} |
|||
} |
|||
} |
|||
/** |
|||
* 托管通知书模板设置显示 |
|||
*/ |
|||
public function tgnotice() |
|||
{ |
|||
$sys=Options::get_options('tgnotice_options',$this->lang); |
|||
$this->assign('sys',$sys); |
|||
return $this->fetch(); |
|||
} |
|||
|
|||
/** |
|||
* 托管通知书模板设置保存 |
|||
*/ |
|||
public function tgnoticerun() |
|||
{ |
|||
if (!request()->isAjax()){ |
|||
$this->error('提交方式不正确',url('tuoguan/Tgsetup/tgnotice')); |
|||
}else{ |
|||
$options=input('post.options/a'); |
|||
$options['content_tpl']=htmlspecialchars_decode($options['content_tpl']); |
|||
$rst=Options::set_options($options,'tgnotice_options',$this->lang); |
|||
if($rst!==false){ |
|||
cache("tgnotice_options_".$this->lang,null); |
|||
$this->success('托管通知书模板设置保存成功',url('tuoguan/Tgsetup/tgnotice')); |
|||
}else{ |
|||
$this->error('提交参数不正确',url('tuoguan/Tgsetup/tgnotice')); |
|||
} |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 资产通知书模板(用户通知书) |
|||
*/ |
|||
public function zc_notice() |
|||
{ |
|||
$sys=Options::get_options('zc_notice',$this->lang); |
|||
$this->assign('sys',$sys); |
|||
return $this->fetch(); |
|||
} |
|||
|
|||
/** |
|||
* 资产通知书模板保存(用户通知书) |
|||
*/ |
|||
public function zc_noticerun() |
|||
{ |
|||
if (!request()->isAjax()){ |
|||
$this->error('提交方式不正确',url('tuoguan/Tgsetup/zc_notice')); |
|||
}else{ |
|||
$options=input('post.options/a'); |
|||
$options['content_tpl']=htmlspecialchars_decode($options['content_tpl']); |
|||
$rst=Options::set_options($options,'zc_notice',$this->lang); |
|||
if($rst!==false){ |
|||
cache("zc_notice_".$this->lang,null); |
|||
$this->success('模板设置保存成功',url('tuoguan/Tgsetup/zc_notice')); |
|||
}else{ |
|||
$this->error('提交参数不正确',url('tuoguan/Tgsetup/zc_notice')); |
|||
} |
|||
} |
|||
} |
|||
/** |
|||
* 资产成功公告模板(官网公告) |
|||
*/ |
|||
public function zc_successgg() |
|||
{ |
|||
$sys=Options::get_options('zc_successgg',$this->lang); |
|||
$this->assign('sys',$sys); |
|||
return $this->fetch(); |
|||
} |
|||
|
|||
/** |
|||
* 资产成功公告模板保存(官网公告) |
|||
*/ |
|||
public function zc_successggrun() |
|||
{ |
|||
if (!request()->isAjax()){ |
|||
$this->error('提交方式不正确',url('tuoguan/Tgsetup/zc_successgg')); |
|||
}else{ |
|||
$options=input('post.options/a'); |
|||
$options['content_tpl']=htmlspecialchars_decode($options['content_tpl']); |
|||
$rst=Options::set_options($options,'zc_successgg',$this->lang); |
|||
if($rst!==false){ |
|||
cache("zc_successgg_".$this->lang,null); |
|||
$this->success('模板设置保存成功',url('tuoguan/Tgsetup/zc_successgg')); |
|||
}else{ |
|||
$this->error('提交参数不正确',url('tuoguan/Tgsetup/zc_successgg')); |
|||
} |
|||
} |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,772 @@ |
|||
<?php |
|||
/** |
|||
* Created by PhpStorm. |
|||
* User: Administrator |
|||
* Date: 2018/3/22 |
|||
* Time: 14:45 |
|||
*/ |
|||
|
|||
namespace app\tuoguan\controller; |
|||
|
|||
use app\admin\controller\Base; |
|||
use app\tuoguan\model\Tuptype as UptypeModel; |
|||
use app\tuoguan\model\TApply as ApplyModel; |
|||
use app\admin\model\Options; |
|||
use think\Db; |
|||
use think\Cache; |
|||
|
|||
class Trusteeship extends Base |
|||
{ |
|||
/** |
|||
* 托管上传文件类型列表 |
|||
* @param int $process |
|||
* @param int $status 上传文件状态 |
|||
* @param int $ftype 上传文件类型 |
|||
* @return fetch |
|||
*/ |
|||
public function uptype_list($process=-1,$status=-1,$ftype=1) |
|||
{ |
|||
$apply_id=input('apply_id'); |
|||
//添加固定内容 |
|||
if (!($ftype == 1 and $status ==-1)) { |
|||
//权限检查 |
|||
if (check_cult4UserRight($apply_id, session('admin_auth.aid'), $status) == 0) { |
|||
$this->error('无权限',url('admin/Index/index')); |
|||
} |
|||
} |
|||
$whereType=array( |
|||
'apply_id'=>$apply_id, |
|||
'new_flag'=>1, |
|||
); |
|||
if($status==-1){ |
|||
//固定类型input('apply_id')==null |
|||
$uptype_list=UptypeModel::getList(-1,$apply_id,$ftype,$status,-1,'status,apply_type,ftype_id',-1); |
|||
$page = $uptype_list->render(); |
|||
$this->assign('uptype_list',$uptype_list); |
|||
$this->assign('page',$page); |
|||
}else{ |
|||
//临时类型 |
|||
$uptype_list=UptypeModel::getList(-1,$apply_id,$ftype,$status,-1); |
|||
$this->assign('uptype_list',$uptype_list); |
|||
|
|||
$this->assign('apply_id',$apply_id); |
|||
$this->assign('status',$status); |
|||
} |
|||
return $this->fetch(); |
|||
} |
|||
|
|||
/** |
|||
* 托管文件类型添加 |
|||
*/ |
|||
public function uptype_add($process=-1,$status=-1) |
|||
{ |
|||
if ($process > 0 and $status > 0) { |
|||
//权限检查 |
|||
if (check_cult4UserRight(input('apply_id'), session('admin_auth.aid'), $status) == 0) { |
|||
$this->error('无权限',url('admin/Index/index')); |
|||
} |
|||
} |
|||
//创建token |
|||
creatToken(); |
|||
|
|||
$apply_id=input('apply_id'); |
|||
$this->assign('apply_id',$apply_id); |
|||
$this->assign('status',$status); |
|||
$where['status'] = array('egt',0); |
|||
$statuslist=Db::name('trusteeship_status')->where($where)->select(); |
|||
$this->assign('statuslist',$statuslist); |
|||
|
|||
return $this->fetch(); |
|||
} |
|||
/** |
|||
* 文化四板固定文件类型修改 |
|||
*/ |
|||
public function uptype_edit(){ |
|||
if(!request()->isAjax()) { |
|||
//创建token |
|||
creatToken(); |
|||
|
|||
$ftype_id = input('ftype_id', 0, 'intval'); |
|||
if (!$ftype_id) $this->error('参数错误', url('tuoguan/Trusteeship/uptype_list')); |
|||
$uptype = Db::name('trusteeship_uptype')->where('ftype_id', $ftype_id)->find(); |
|||
$this->assign('uptype', $uptype); |
|||
if(!empty($uptype['ftemp_id'])){ |
|||
$upfile = Db::name('trusteeship_upfiles')->where('file_id', $uptype['ftemp_id'])->find(); |
|||
$this->assign('upfile', $upfile); |
|||
} |
|||
$where['status'] = array('egt',0); |
|||
$statuslist=Db::name('trusteeship_status')->where($where)->select(); |
|||
$this->assign('statuslist',$statuslist); |
|||
|
|||
$list1=array(); |
|||
if($uptype['upload_role_type']==1){ |
|||
$map1['member_group_id']=array(array('gt',0),array('neq',2));//>0 and !=2 |
|||
$list1=Db::name("member_group")->field(array('member_group_id'=>'id','member_group_name'=>'name'))->where($map1)->select(); |
|||
}elseif($uptype['upload_role_type']==2){ |
|||
$map2['id']=array('gt',0); |
|||
$list1=Db::name("auth_group")->field(array('id'=>'id','title'=>'name'))->where($map2)->select(); |
|||
} |
|||
$this->assign('list1',$list1); |
|||
$list2=array(); |
|||
if($uptype['upload_role_type2']==1){ |
|||
$map1['member_group_id']=array(array('gt',0),array('neq',2));//>0 and !=2 |
|||
$list2=Db::name("member_group")->field(array('member_group_id'=>'id','member_group_name'=>'name'))->where($map1)->select(); |
|||
}elseif($uptype['upload_role_type2']==2){ |
|||
$map2['id']=array('gt',0); |
|||
$list2=Db::name("auth_group")->field(array('id'=>'id','title'=>'name'))->where($map2)->select(); |
|||
} |
|||
$this->assign('list2',$list2); |
|||
return $this->fetch(); |
|||
}else{ |
|||
$roletype=input('roletype'); |
|||
$roleid=input('roletitle'); |
|||
$roletype2=input('roletype2'); |
|||
$roleid2=input('roletitle2'); |
|||
if($roletype<=0 or $roleid<=0) |
|||
{ |
|||
$this->error('请选择资料上传类型及对应的角色!'); |
|||
} |
|||
if(empty($roletype2))$roletype2=0; |
|||
if(empty($roleid2))$roleid2=0; |
|||
if(!(($roletype2==0 and $roleid2==0) or ($roletype2>0 and $roleid2>0) or ($roletype2<=0 and $roleid2<=0))) |
|||
{ |
|||
$this->error('请选择资料辅助上传类型及对应的角色!'); |
|||
} |
|||
//防止重复提交 |
|||
if (!checkToken(input('TOKEN'))) { |
|||
return; |
|||
} |
|||
|
|||
//固定 |
|||
$apply_id = 0; |
|||
$apply_type=input('apply_type'); |
|||
$isgp=input('isgp'); |
|||
$mustupload=input('mustupload'); |
|||
|
|||
//上传模板部分 |
|||
$file_id=0; |
|||
//支持多个字段单文件 |
|||
$file = request()->file('file_one'); |
|||
$file_one=''; |
|||
|
|||
if(!empty($file)){ |
|||
$validate = config('upload_validate'); |
|||
unset($validate['ext']);//不限制后缀 |
|||
//单图 |
|||
$info = $file->validate($validate)->rule('uniqid')->move(ROOT_PATH . config('upload_path') . DS . date('Y-m-d')); |
|||
|
|||
if ($info) { |
|||
$file_url = config('upload_path'). '/' . date('Y-m-d') . '/' . $info->getFilename(); |
|||
//写入数据库 |
|||
$data['apply_id'] = 0;//模板文件未使用该字段 |
|||
$data['user_id'] = session('admin_auth.aid'); |
|||
$data['user_type'] = 2; |
|||
$data['status'] = input('status'); |
|||
$data['upload_time'] = time(); |
|||
$data['ftype_id'] = 0;//模板文件为0 |
|||
$data['ftype'] = 3;//模板类型 |
|||
$data['filesize'] = $info->getSize(); |
|||
$data['path'] = $file_url; |
|||
$data['addorder'] = 0;//固定文件需要更新 |
|||
$data['new_flag'] = 1;//固定文件需要更新 |
|||
|
|||
$file_id = Db::name('trusteeship_upfiles')->insert($data,false,true); |
|||
|
|||
} else { |
|||
$this->error($file->getError());//否则就是上传错误,显示错误原因 |
|||
} |
|||
}else{ |
|||
$file_id = input('ftemp_id'); |
|||
$data['file_id'] = $file_id;//模板文件未使用该字段 |
|||
$data['status'] = input('status'); |
|||
Db::name('trusteeship_upfiles')->where('file_id',$file_id)->update($data); |
|||
} |
|||
$sl_data=array( |
|||
'ftype_id'=>input('ftype_id'), |
|||
'ftypedescr'=>input('ftypedescr'), |
|||
'ftemp_id' => $file_id, |
|||
'apply_type' => $apply_type, |
|||
'isgp' => $isgp, |
|||
'mustupload' => $mustupload, |
|||
'ftype'=>input('ftype'), |
|||
'status'=>input('status'), |
|||
'isopen'=>input('isopen',0), |
|||
'apply_id'=>$apply_id, |
|||
'user_id'=>session('admin_auth.aid'), |
|||
'create_time'=>time(), |
|||
'upload_role_type'=>$roletype, |
|||
'upload_role_id'=>$roleid, |
|||
'upload_role_type2'=>$roletype2, |
|||
'upload_role_id2'=>$roleid2, |
|||
); |
|||
$uptype_id=Db::name('trusteeship_uptype')->where('ftype_id',input('ftype_id'))->update($sl_data); |
|||
if($uptype_id){ |
|||
$this->success('文件类型修改成功',url('tuoguan/Trusteeship/uptype_list')); |
|||
}else{ |
|||
$this->error('文件类型修改失败'); |
|||
} |
|||
} |
|||
} |
|||
/** |
|||
* 托管文件类型添加操作 |
|||
*/ |
|||
public function uptype_runadd($process=-1,$status=-1) |
|||
{ |
|||
//添加固定内容 |
|||
if (!($process == -1 or $status ==-1)) { |
|||
//权限检查 |
|||
if (check_cult4UserRight(input('apply_id'), session('admin_auth.aid'), $status) == 0) { |
|||
$this->error('无权限',url('admin/Index/index')); |
|||
} |
|||
} |
|||
|
|||
$roletype=input('roletype'); |
|||
$roleid=input('roletitle'); |
|||
$roletype2=input('roletype2'); |
|||
$roleid2=input('roletitle2'); |
|||
if($roletype<=0 or $roleid<=0) |
|||
{ |
|||
$this->error('请选择资料上传类型及对应的角色!'); |
|||
} |
|||
if(empty($roletype2))$roletype2=0; |
|||
if(empty($roleid2))$roleid2=0; |
|||
if(!(($roletype2==0 and $roleid2==0) or ($roletype2>0 and $roleid2>0) or ($roletype2<=0 and $roleid2<=0))) |
|||
{ |
|||
$this->error('请选择资料辅助上传类型及对应的角色!'); |
|||
} |
|||
//防止重复提交 |
|||
if (!checkToken(input('TOKEN'))) { |
|||
//return; |
|||
} |
|||
|
|||
//状态为-1时对应固定文件 |
|||
$apply_id=input('apply_id'); |
|||
$whereType=array( |
|||
'apply_id'=>$apply_id, |
|||
'new_flag'=>1, |
|||
); |
|||
$mustupload=1; |
|||
if($process==-1){ |
|||
$apply_id = 0; |
|||
$apply_type=input('apply_type'); |
|||
$isgp=input('isgp'); |
|||
$mustupload=input('mustupload'); |
|||
} |
|||
|
|||
//上传模板部分 |
|||
$file_id=0; |
|||
//支持多个字段单文件 |
|||
$file = request()->file('file_one'); |
|||
$file_one=''; |
|||
|
|||
if(!empty($file)){ |
|||
$validate = config('upload_validate'); |
|||
unset($validate['ext']);//不限制后缀 |
|||
//单图 |
|||
$info = $file->validate($validate)->rule('uniqid')->move(ROOT_PATH . config('upload_path') . DS . date('Y-m-d')); |
|||
|
|||
if ($info) { |
|||
$file_url = config('upload_path'). '/' . date('Y-m-d') . '/' . $info->getFilename(); |
|||
//写入数据库 |
|||
$data['apply_id'] = 0;//模板文件未使用该字段 |
|||
$data['user_id'] = session('admin_auth.aid'); |
|||
$data['user_type'] = 2; |
|||
$data['status'] = $status; |
|||
$data['upload_time'] = time(); |
|||
$data['ftype_id'] = 0;//模板文件为0 |
|||
$data['ftype'] = 3;//模板类型 |
|||
$data['filesize'] = $info->getSize(); |
|||
$data['path'] = $file_url; |
|||
$data['addorder'] = 0;//固定文件需要更新 |
|||
$data['new_flag'] = 1;//固定文件需要更新 |
|||
|
|||
$file_id = Db::name('trusteeship_upfiles')->insert($data,false,true); |
|||
|
|||
} else { |
|||
$this->error($file->getError());//否则就是上传错误,显示错误原因 |
|||
} |
|||
} |
|||
if ($process == -1 or $status ==-1) { |
|||
$uptype_id=UptypeModel::add($apply_type,$isgp,input('ftypedescr'),$file_id,input('ftype'),input('status'),input('isopen',0),0,session('admin_auth.aid'),$roletype,$roleid,$roletype2,$roleid2,$mustupload); |
|||
if($uptype_id){ |
|||
$this->success('文件类型添加成功',url('tuoguan/Trusteeship/uptype_list')); |
|||
}else{ |
|||
$this->error('文件类型添加失败'); |
|||
} |
|||
}else{ |
|||
$uptype_id=UptypeModel::add($apply_type,$isgp,input('ftypedescr'),$file_id,input('ftype'),$status,input('isopen',0),$apply_id,session('admin_auth.aid'),$roletype,$roleid,$roletype2,$roleid2); |
|||
if($uptype_id){ |
|||
$sl_data2['apply_id']=input('apply_id'); |
|||
$sl_data2['status']=$status; |
|||
$this->success('文件类型添加成功',url('tuoguan/Trusteeship/uptype_list'.$process,$sl_data2)); |
|||
}else{ |
|||
$this->error('文件类型添加失败'); |
|||
} |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 托管文件类型列表开启/禁止 |
|||
*/ |
|||
public function uptype_state($process=-1,$status=-1) |
|||
{ |
|||
$id=input('x'); |
|||
if (empty($id)){ |
|||
//如果不是固定添加类型 |
|||
if (!($process == -1 or $status ==-1)) { |
|||
$this->error('文件ID不存在', url('tuoguan/trusteeship/uptype_list' . $process)); |
|||
}else{ |
|||
$this->error('文件ID不存在', url('tuoguan/trusteeship/uptype_list')); |
|||
} |
|||
} |
|||
|
|||
//取得apply_id |
|||
$tempfile = UptypeModel::getFileTypeInfo($id); |
|||
if(empty($tempfile)){ |
|||
$this->error('无权限',url('admin/Index/index')); |
|||
} |
|||
|
|||
$isopen=Db::name('trusteeship_uptype')->where('ftype_id',$id)->value('isopen');//判断当前状态情况 |
|||
if($isopen==1){ |
|||
$statedata = array('isopen'=>0); |
|||
Db::name('trusteeship_uptype')->where('ftype_id',$id)->setField($statedata); |
|||
$this->success('状态禁止'); |
|||
}else{ |
|||
$statedata = array('isopen'=>1); |
|||
Db::name('trusteeship_uptype')->where('ftype_id',$id)->setField($statedata); |
|||
$this->success('状态开启'); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 审核列表 |
|||
* |
|||
* @param int $applystatus 查询单个状态 |
|||
* @param int $allstatus 查询全部状态标识 |
|||
* @return fetch |
|||
* |
|||
*/ |
|||
public function apply_list($applystatus=-1,$allstatus=-1){ |
|||
$admin_id = session('admin_auth.aid'); |
|||
$search_name=input('search_name'); |
|||
$apply_list=ApplyModel::getList($search_name,$applystatus,$admin_id,'tg_time desc,tg_id desc',$allstatus); |
|||
$page = $apply_list->render(); |
|||
$this->assign('apply_list',$apply_list); |
|||
$this->assign('page',$page); |
|||
$this->assign('search_name',$search_name); |
|||
$this->assign('applystatus',$applystatus); |
|||
$this->assign('allstatus',$allstatus); |
|||
$this->assign('loginuser',session('admin_auth.aid')); |
|||
return $this->fetch(); |
|||
} |
|||
/** |
|||
* 托管列表 |
|||
*/ |
|||
public function tg_list(){ |
|||
$applystatus=11; |
|||
$search_name=input('search_name'); |
|||
$apply_list=ApplyModel::getList($search_name,$applystatus,'','tg_time desc,tg_id desc',-1); |
|||
$page = $apply_list->render(); |
|||
$this->assign('apply_list',$apply_list); |
|||
$this->assign('page',$page); |
|||
$this->assign('search_name',$search_name); |
|||
return $this->fetch(); |
|||
} |
|||
/** |
|||
* 受理操作 |
|||
*/ |
|||
public function apply_applyed($tg_status) |
|||
{ |
|||
if(session('admin_auth.aid')){ |
|||
$apply = ApplyModel::applyed(input('tg_id'),session('admin_auth.aid'),$tg_status); |
|||
|
|||
if($apply==0){ |
|||
$this->error('数据已更新,请重试!'); |
|||
} else { |
|||
$this->success('已受理',url('tuoguan/Trusteeship/apply_check',array('tg_id'=>input('tg_id'),'applystatus'=>$tg_status))); |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
$this->error('用户ID不存在'); |
|||
} |
|||
} |
|||
|
|||
/* |
|||
* 审核用户信息界面 |
|||
*/ |
|||
public function apply_check(){ |
|||
//创建token |
|||
creatToken(); |
|||
$apply_id=input('tg_id'); |
|||
$applystatus=input('applystatus'); |
|||
$user_id=session('admin_auth.aid'); |
|||
$this->assign('user_id',$user_id); |
|||
//托管申请信息 |
|||
$tgapply = Db::name('trusteeship_apply')->where('tg_id',$apply_id)->find(); |
|||
$where['apply_type']=array('in','0,'.$tgapply['tg_type']); |
|||
$where['status']=0; |
|||
$where['isopen']=1; |
|||
if($tgapply['tg_type']==1){ |
|||
$where['isgp']=array('in',$tgapply['tg_isgp'].',0'); |
|||
} |
|||
|
|||
//上传文件列表 |
|||
$apply_uptypelist = Db::name('trusteeship_uptype')->where($where)->select(); |
|||
for ($x=0; $x<count($apply_uptypelist); $x++) { |
|||
$filewhere['apply_id']=$apply_id; |
|||
$filewhere['ftype_id']=$apply_uptypelist[$x]['ftype_id']; |
|||
$filewhere['new_flag']=1; |
|||
$file = Db::name('trusteeship_upfiles')->where($filewhere)->order('upload_time desc')->find(); |
|||
$apply_uptypelist[$x]['file']=$file; |
|||
} |
|||
//尽职调查历史 |
|||
if($tgapply['tg_status']==12){ |
|||
$curr_step='尽职调查';//当前步骤 |
|||
} |
|||
$apply_jzdc = Db::name('trusteeship_checkdd')->where('apply_id',$apply_id)->order('create_time desc')->select(); |
|||
$this->assign('apply_jzdc',$apply_jzdc); |
|||
$jzdc_files = Db::name('trusteeship_upfiles')->where(['apply_id'=>$tgapply['tg_id'],'status'=>12])->order('upload_time desc')->select(); |
|||
$this->assign('jzdc_files',$jzdc_files); |
|||
//查询尽职调查模板 |
|||
$temp_files = Db::name('trusteeship_upfiles')->alias("f")->join(config('database.prefix').'trusteeship_uptype t','t.ftemp_id=f.file_id') |
|||
->where(['t.isopen'=>'1','t.status'=>12,'ftypedescr'=>'尽职调查表'])->where('t.apply_type','in',['0',$tgapply['tg_type']])->order('upload_time desc')->select(); |
|||
if(!empty($temp_files)){ |
|||
$this->assign('temp_files',$temp_files[0]); |
|||
} |
|||
//初审信息历史 |
|||
if($tgapply['tg_status']==1){ |
|||
$curr_step='初审';//当前步骤 |
|||
} |
|||
$apply_cs = Db::name('trusteeship_cs')->where('apply_id',$apply_id)->order('create_time desc')->select(); |
|||
$this->assign('apply_cs',$apply_cs); |
|||
//风控审核信息历史 |
|||
if($tgapply['tg_status']==2){ |
|||
$curr_step='风控';//当前步骤 |
|||
} |
|||
$apply_fk = Db::name('trusteeship_fk')->where('apply_id',$apply_id)->order('create_time desc')->select(); |
|||
$this->assign('apply_fk',$apply_fk); |
|||
//客户上传缴费凭证历史 |
|||
$apply_jfpz = Db::name('trusteeship_upfiles')->where(['apply_id'=>$tgapply['tg_id'],'status'=>3])->order('upload_time desc')->find(); |
|||
$this->assign('apply_jfpz',$apply_jfpz); |
|||
//缴费确认历史 |
|||
if($tgapply['tg_status']==4){ |
|||
$curr_step='缴费确认';//当前步骤 |
|||
} |
|||
$apply_cw = Db::name('trusteeship_cw')->where('apply_id',$apply_id)->order('create_time desc')->select(); |
|||
$this->assign('apply_cw',$apply_cw); |
|||
//专家评分历史 |
|||
if($tgapply['tg_status']==5){ |
|||
$curr_step='专家评分';//当前步骤 |
|||
} |
|||
$apply_zjpf = Db::name('trusteeship_zjpf')->where('apply_id',$apply_id)->order('create_time desc')->find(); |
|||
$this->assign('apply_zjpf',$apply_zjpf); |
|||
//联席会审核历史 |
|||
if($tgapply['tg_status']==6){ |
|||
$curr_step='联席会';//当前步骤 |
|||
} |
|||
$apply_lxh = Db::name('trusteeship_lxh')->where('apply_id',$apply_id)->order('create_time desc')->select(); |
|||
//查联席会决议模板 |
|||
$lxhjy_tmep = Db::name('trusteeship_upfiles')->alias("f")->join(config('database.prefix').'trusteeship_uptype t','t.ftemp_id=f.file_id') |
|||
->where(['t.isopen'=>'1','t.status'=>6])->where('t.apply_type','in',['0',$tgapply['tg_type']])->order('upload_time desc')->select(); |
|||
if(!empty($lxhjy_tmep)){ |
|||
$this->assign('lxhjy_tmep',$lxhjy_tmep[0]); |
|||
} |
|||
|
|||
$this->assign('apply_lxh',$apply_lxh); |
|||
$this->assign('curr_step',$curr_step); |
|||
$this->assign('tgapply',$tgapply); |
|||
$this->assign('apply_uptypelist',$apply_uptypelist); |
|||
return $this->fetch(); |
|||
|
|||
|
|||
} |
|||
/** |
|||
* 托管文件核验开启/禁止 |
|||
*/ |
|||
public function apply_state() |
|||
{ |
|||
$id=input('x'); |
|||
if (empty($id)){ |
|||
$this->error('用户ID不存在'); |
|||
} |
|||
|
|||
$flag=Db::name('trusteeship_upfiles')->where('file_id',$id)->value('flag');//判断当前状态情况 |
|||
if($flag==1){ |
|||
$flagdata = array('flag'=>0); |
|||
Db::name('trusteeship_upfiles')->where('file_id',$id)->setField($flagdata); |
|||
$this->success('审核未通过'); |
|||
}else{ |
|||
$flagdata = array('flag'=>1); |
|||
Db::name('trusteeship_upfiles')->where('file_id',$id)->setField($flagdata); |
|||
$this->success('审核已通过'); |
|||
} |
|||
} |
|||
/** |
|||
* 托管审核 |
|||
*/ |
|||
public function apply_runcheck() |
|||
{ |
|||
//防止重复提交 |
|||
if (!checkToken(input('TOKEN'))) { |
|||
return; |
|||
} |
|||
$tg_id=input('tg_id'); |
|||
$apply = Db::name('trusteeship_apply')->where('tg_id',$tg_id)->find(); |
|||
//检查是否还有未审核通过的文件 |
|||
if(input('submitType')==1) { |
|||
$file_count = Db::name('trusteeship_upfiles')->where(['apply_id'=>$tg_id,'flag'=>0,'new_flag'=>1])->count(); |
|||
if($file_count){ |
|||
session('TOKEN',input('TOKEN')); |
|||
$this->error('还有文件未审核通过'); |
|||
} |
|||
}else if($apply['tg_status']!=4){ |
|||
$file_count = Db::name('trusteeship_upfiles')->where(['apply_id'=>$tg_id,'flag'=>0,'new_flag'=>1])->count(); |
|||
if($file_count==0){ |
|||
session('TOKEN',input('TOKEN')); |
|||
$this->error('文件已全部审核通过,请将文件审核未不通过再操作!'); |
|||
} |
|||
} |
|||
|
|||
if(empty($apply)){ |
|||
session('TOKEN',input('TOKEN')); |
|||
$this->error('用户ID不存在'); |
|||
} |
|||
if(config('cult4advice.check')==1) |
|||
{ |
|||
if(input('advice')=='') |
|||
{ |
|||
session('TOKEN',input('TOKEN')); |
|||
$this->error('请输入审核意见!'); |
|||
} |
|||
} |
|||
$data=array( |
|||
'apply_id'=>$tg_id,//托管申请ID |
|||
'advice'=>input('advice',"未填写"),//审批意见 |
|||
'create_id'=>session('admin_auth.aid'),//审批人 |
|||
'create_time'=>time(),//审批时间 |
|||
); |
|||
if($apply['tg_status']==1){ |
|||
$table_name='trusteeship_cs';//托管初审意见表 |
|||
if(input('submitType')==1) { |
|||
$update_status = 2;//风控审核中(初审已通过) |
|||
}else{ |
|||
$update_status = 7;//托管会员修改中(初审未通过) |
|||
} |
|||
}else if($apply['tg_status']==2){ |
|||
$table_name='trusteeship_fk';//风控审核意见表 |
|||
if(input('submitType')==1) { |
|||
if(input('tg_type',1,'intval')==1){//企业股权 |
|||
$count=Db::name('cult4apply')->where(['user_id'=>session('hid')])->where('status','eq',31)->count(); |
|||
if($count>0){ |
|||
$update_status = 4;//已挂牌企业直接财务缴费确认 |
|||
}else{ |
|||
$update_status = 3;//缴费中(风控审核已通过) |
|||
} |
|||
} |
|||
|
|||
}else{ |
|||
$update_status = 8;//托管会员修改中(风控审核未通过) |
|||
} |
|||
}else if($apply['tg_status']==4){ |
|||
$table_name='trusteeship_cw';//缴费确认意见表 |
|||
if(input('submitType')==1) { |
|||
$update_status = 5;//专家评分中(缴费状态已确认) |
|||
}else{ |
|||
$update_status = 9;//托管会员修改中(缴费确认未通过) |
|||
} |
|||
}else if($apply['tg_status']==5){//专家只是评分,没有审核 |
|||
$table_name='trusteeship_zjpf';//专家评分意见表 |
|||
$update_status = 6;//联席会审核中(专家已评分) |
|||
$data['score'] = input('score'); |
|||
}else if($apply['tg_status']==6){ |
|||
$table_name='trusteeship_lxh';//联席会审核意见表 |
|||
if(input('submitType')==1) { |
|||
$update_status = 11;//托管成功 |
|||
}else{ |
|||
$update_status = 10;//托管会员修改中(联席会审核未通过) |
|||
} |
|||
}else if($apply['tg_status']==12){//尽职调查审核 |
|||
$file = request()->file('file_one'); |
|||
$table_name='trusteeship_checkdd';//联席会审核意见表 |
|||
if(input('submitType')==1) { |
|||
$update_status = 1;//初审(尽职调查已通过) |
|||
}else{ |
|||
$update_status = 13;//托管会员修改中(尽职调查未通过) |
|||
} |
|||
} |
|||
//找到当前最大addorder |
|||
$check=Db::name($table_name)->where('apply_id',$tg_id)->order('addorder desc') ->find (); |
|||
if(!empty($check)){ |
|||
$data['addorder']=$check['addorder']+1; |
|||
}else{ |
|||
$data['addorder']=0; |
|||
} |
|||
//开始事务 |
|||
Db::startTrans(); |
|||
try{ |
|||
|
|||
$sl_data['tg_status']=$update_status; |
|||
$sl_data['update_user_id']=session('admin_auth.aid'); |
|||
$sl_data['update_user_type']=2;//后台 |
|||
$sl_data['update_time']=time(); |
|||
$sl_data['apply_admin_id']=0; |
|||
$sl_data['tg_org']=input('tg_org'); |
|||
$sl_data['tg_cycle']=input('tg_cycle'); |
|||
$sl_data['tg_equity']=input('tg_equity'); |
|||
$sl_data['tg_assets']=input('tg_assets'); |
|||
$where=array( |
|||
'tg_id'=>$apply['tg_id'], |
|||
'tg_status'=>$apply['tg_status'], |
|||
); |
|||
Db::name('trusteeship_apply')->where($where)->update($sl_data); |
|||
//审核不通过发送通知给客户 |
|||
$defaultFileLink='</br>请点击: <div class="basicname modeub modeac modepc " onclick="to_tgdeit('.$tg_id.')">上传资料</div>'; |
|||
if(input('submitType')==2){ |
|||
if($apply['tg_status']==1){ |
|||
$notice_title='您(或您关联)的托管申请初审不通过,请修改资料!'; |
|||
$sys=Options::get_options('tgcheck_options',$this->lang);//初审不通过通知书 |
|||
$notic_content=str_replace('#APPLYCONTENTS#',$data['advice'],$sys['content_tpl']); |
|||
$notic_content=str_replace('#COMNAME#',$apply['tg_apply_org'],$notic_content); |
|||
$notic_content=str_replace('#DATE#',date('Y年m月d日', time()),$notic_content); |
|||
}else if($apply['tg_status']==2){ |
|||
$notice_title='您(或您关联)的托管申请风控审核不通过,请修改资料!'; |
|||
$sys=Options::get_options('tgcheckfk_options',$this->lang);//风控审核不通过通知书 |
|||
$notic_content=str_replace('#APPLYCONTENTS#',input('advice').$defaultFileLink,$sys['content_tpl']); |
|||
$notic_content=str_replace('#COMNAME#',$apply['tg_apply_org'],$notic_content); |
|||
$notic_content=str_replace('#DATE#',date('Y年m月d日', time()),$notic_content); |
|||
}else if($apply['tg_status']==4){ |
|||
$notice_title='您(或您关联)的托管申请缴费确认审核不通过,请修改资料!'; |
|||
$notic_content='您(或您关联)的申请托管不通过,需要您重新修改信息或上传缴费凭证后再提交。<br>审批意见:'.input('advice').$defaultFileLink; |
|||
}else if($apply['tg_status']==6){ |
|||
$notice_title='您(或您关联)的托管申请联席会审核不通过,请修改资料!'; |
|||
$notic_content='您(或您关联)的申请托管不通过,需要您重新修改信息或上传资料后再提交。<br>审批意见:'.input('advice').$defaultFileLink; |
|||
}else if($apply['tg_status']==12){ |
|||
$notice_title='您(或您关联)的托管申请尽职调查审核不通过,请修改资料!'; |
|||
$notic_content='您(或您关联)的申请托管不通过,需要您重新修改信息或上传资料后再提交。<br>审批意见:'.input('advice').$defaultFileLink; |
|||
} |
|||
}else if($update_status==3){//缴费中,需要发送缴费通知费可以 |
|||
$sys=Options::get_options('tgfee_options',$this->lang);//缴费通知 |
|||
$notic_content=str_replace('#COMNAME#',$apply['tg_apply_org'],$sys['content_tpl']); |
|||
$notic_content=str_replace('#DATE#',date('Y年m月d日', time()),$notic_content); |
|||
$notice_title='您(或您关联)的托管申请风控审核已通过,请缴费后上传缴费凭证!'; |
|||
}else if($update_status==11){//托管成功,发送成功通知给客户 |
|||
$info2 = request()->file('lxhjy')->rule('uniqid')->move(ROOT_PATH . config('upload_path') . DS . date('Y-m-d')); |
|||
$file_url = config('upload_path'). '/' . date('Y-m-d') . '/' . $info2->getFilename(); |
|||
//写入数据库 |
|||
$lxhjy['apply_id'] = $tg_id;//模板文件未使用该字段 |
|||
$lxhjy['user_id'] = session('admin_auth.aid'); |
|||
$lxhjy['user_type'] = 2; |
|||
$lxhjy['status'] = 6; |
|||
$lxhjy['upload_time'] = time(); |
|||
$lxhjy['ftype_id'] = 0;//模板文件为0 |
|||
$lxhjy['ftype'] = 1;//模板类型 |
|||
$lxhjy['filesize'] = $info2->getSize(); |
|||
$lxhjy['path'] = $file_url; |
|||
$lxhjy['addorder'] = 0;//固定文件需要更新 |
|||
$lxhjy['new_flag'] = 1;//固定文件需要更新 |
|||
$lxhjy['flag'] = 1; |
|||
Db::name('trusteeship_upfiles')->insert($lxhjy,false,true); |
|||
|
|||
if($apply['tg_type']==1){ |
|||
$notice_key='tgnotice_options';//企业股权通知书 |
|||
$successgg_key = 'tgsuccess_options';//企业股权成功公告 |
|||
$tg_thing=input('tg_equity');//股权 |
|||
}else{ |
|||
$notice_key='zc_successgg';//资产通知书 |
|||
$successgg_key = 'zc_successgg';//资产成功公告 |
|||
$tg_thing=input('tg_assets');//托管资产 |
|||
} |
|||
$sys=Options::get_options($notice_key,$this->lang);//缴费通知 |
|||
$notice_title='托管申请成功通知书'; |
|||
$notic_content =str_replace('#DATE#',date('Y年m月d日', time()),$sys['content_tpl']); |
|||
$notic_content=str_replace('#COMNAME#',$apply['tg_apply_org'],$notic_content); |
|||
$notic_content=str_replace('#EQUITY#',$tg_thing,$notic_content); |
|||
$notic_content=str_replace('#CYCLE#',input('tg_cycle'),$notic_content); |
|||
$sys=Options::get_options($successgg_key,$this->lang);//托管成功公告 |
|||
$gg_content=$sys['content_tpl']; |
|||
$gg_content=str_replace('#EQUITY#',$tg_thing,$gg_content); |
|||
$gg_content=str_replace('#CYCLE#',input('tg_cycle'),$gg_content); |
|||
$gg_content=str_replace('#COMNAME#',$apply['tg_apply_org'],$gg_content); |
|||
$gg_content=str_replace('#DATE#',date('Y年m月d日', time()),$gg_content); |
|||
if($apply['tg_isgp']==2){ |
|||
if($apply['tg_type']==1){ |
|||
//未挂牌企业,公告标题和通知书标题改为“关于企业” |
|||
$notic_content=str_replace('关于文化产业板养成板挂牌企业',"关于企业",$notic_content); |
|||
$gg_content=str_replace('关于文化产业板养成板挂牌企业',"关于企业",$gg_content); |
|||
$notic_content=str_replace('关于文化产业板挂牌企业',"关于企业",$notic_content); |
|||
$gg_content=str_replace('关于文化产业板挂牌企业',"关于企业",$gg_content); |
|||
}else{ |
|||
$notic_content=str_replace('关于文化产业板挂牌企业',"",$notic_content); |
|||
$gg_content=str_replace('关于文化产业板挂牌企业',"",$gg_content); |
|||
$notic_content=str_replace('##','关于',$notic_content); |
|||
$gg_content=str_replace('##','关于',$gg_content); |
|||
} |
|||
}else{ |
|||
$notic_content=str_replace('##','',$notic_content); |
|||
$gg_content=str_replace('##','',$gg_content); |
|||
} |
|||
}else if($update_status==1){//尽职调查审核通过 |
|||
$validate = config('upload_validate'); |
|||
unset($validate['ext']);//不限制后缀 |
|||
//单图 |
|||
$info = $file->validate($validate)->rule('uniqid')->move(ROOT_PATH . config('upload_path') . DS . date('Y-m-d')); |
|||
if ($info) { |
|||
$file_url = config('upload_path'). '/' . date('Y-m-d') . '/' . $info->getFilename(); |
|||
//写入数据库 |
|||
$filedata['apply_id'] = $tg_id;//模板文件未使用该字段 |
|||
$filedata['user_id'] = session('admin_auth.aid'); |
|||
$filedata['user_type'] = 2; |
|||
$filedata['status'] = 12; |
|||
$filedata['upload_time'] = time(); |
|||
$filedata['ftype_id'] = 0;//模板文件为0 |
|||
$filedata['ftype'] = 1;//模板类型 |
|||
$filedata['filesize'] = $info->getSize(); |
|||
$filedata['path'] = $file_url; |
|||
$filedata['addorder'] = 0;//固定文件需要更新 |
|||
$filedata['new_flag'] = 1;//固定文件需要更新 |
|||
$filedata['flag'] = 1; |
|||
$file_id = Db::name('trusteeship_upfiles')->insert($filedata,false,true); |
|||
$data['file_id']=$file_id; |
|||
} else { |
|||
session('TOKEN',input('TOKEN'));//审核失败,将token添加回session里 |
|||
$this->error($file->getError());//否则就是上传错误,显示错误原因 |
|||
} |
|||
} |
|||
|
|||
Db::name($table_name)->insert($data); |
|||
if(input('submitType')==2 || $update_status==3 || $update_status==11){ |
|||
$n_data=[ |
|||
'notice_title'=>$apply['tg_apply_org'].$notice_title, |
|||
'notice'=>$notic_content, |
|||
'apply_id'=>$tg_id, |
|||
'user_id'=>$apply['tg_uid'], |
|||
'is_read'=>'0', |
|||
'create_id'=>session('admin_auth.aid'), |
|||
'create_type'=>1, |
|||
'create_time'=>time() |
|||
]; |
|||
Db::name('cult4notice')->insert($n_data); |
|||
} |
|||
if($update_status==11){ |
|||
$gg_data = [ |
|||
'n_content'=>$gg_content, |
|||
'n_title'=>$apply['tg_apply_org'].'托管申请成功公告', |
|||
'n_cid'=>3, |
|||
'n_time'=>time(), |
|||
'n_status'=>1, |
|||
'n_hits'=>0, |
|||
'n_uid'=>1 |
|||
]; |
|||
Db::name('bsgg')->insert($gg_data); |
|||
} |
|||
// 提交事务 |
|||
Db::commit(); |
|||
}catch (\Exception $exception){ |
|||
Db::rollback();//回滚事务 |
|||
session('TOKEN',input('TOKEN'));//审核失败,将token添加回session里 |
|||
$this->error('审核失败'); |
|||
} |
|||
$this->success('审核成功',url('tuoguan/Trusteeship/apply_list',array('applystatus'=>$apply['tg_status']))); |
|||
} |
|||
} |
|||
@ -0,0 +1,64 @@ |
|||
<?php |
|||
/** |
|||
* Created by PhpStorm. |
|||
* User: Administrator |
|||
* Date: 2018/3/26 |
|||
* Time: 11:29 |
|||
*/ |
|||
|
|||
namespace app\tuoguan\model; |
|||
|
|||
use think\Model; |
|||
use think\Db; |
|||
|
|||
class TApply extends Model |
|||
{ |
|||
/** |
|||
* 申请列表 |
|||
* @param array |
|||
* @param int $status 后台查询的操作用户状态 |
|||
* @param int $admin_id 后台查询的操作用户ID |
|||
* @param string $order 结果排序 |
|||
* @return mixed |
|||
*/ |
|||
public static function getList($search_name=-1,$status=-1,$admin_id,$order='tg_id',$allstatus) |
|||
{ |
|||
$where=array(); |
|||
//根据状态值取出对应状态的数据 |
|||
if($allstatus == -1){ |
|||
$where['a.tg_status'] = array('eq',$status); |
|||
} |
|||
if($search_name != -1){ |
|||
$where['m.member_list_username'] = array('like','%'.$search_name.'%'); |
|||
} |
|||
//取得apply_admin_id为0或者当前用户的数据 |
|||
$where['a.apply_admin_id']=array(array('eq',0),array('eq',$admin_id),'or'); |
|||
return Db::name('trusteeship_apply')->alias("a")->join(config('database.prefix').'member_list m','a.tg_uid =m.member_list_id') |
|||
->join(config('database.prefix').'trusteeship_status c','a.tg_status =c.status')->where($where)->order($order)->paginate(config('paginate.list_rows'),false,['query'=>get_query()]); |
|||
} |
|||
|
|||
/** |
|||
* 申请受理 |
|||
* @param int $apply_id 申请id |
|||
* @param int $apply_admin_id 受理用户id |
|||
* @return int 影响行数0或1 |
|||
*/ |
|||
public static function applyed($apply_id,$apply_admin_id,$status) |
|||
{ |
|||
$sldata=array( |
|||
'apply_admin_id'=>$apply_admin_id, |
|||
'update_time'=>time(), |
|||
'update_user_id'=>$apply_admin_id, |
|||
'update_user_type'=>1, |
|||
); |
|||
$where=array( |
|||
'tg_id'=>$apply_id, |
|||
'tg_status'=>$status, |
|||
'apply_admin_id'=>array('EQ', 0), |
|||
); |
|||
|
|||
$apply=Db::name('trusteeship_apply')->where($where)->update($sldata); |
|||
|
|||
return $apply; |
|||
} |
|||
} |
|||
@ -0,0 +1,99 @@ |
|||
<?php |
|||
/** |
|||
* Created by PhpStorm. |
|||
* User: Administrator |
|||
* Date: 2018/3/22 |
|||
* Time: 14:49 |
|||
*/ |
|||
|
|||
namespace app\tuoguan\model; |
|||
|
|||
use think\Model; |
|||
use think\Db; |
|||
|
|||
class Tuptype extends Model |
|||
{ |
|||
/** |
|||
* 根据文件类型id获取文件类型信息,返回值为数组 |
|||
* @param int $ftypeid 文件类型id |
|||
* @return array 文件类型信息数组 |
|||
*/ |
|||
public static function getFileTypeInfo($ftypeid) |
|||
{ |
|||
$filetypeInfo = Db::name('trusteeship_uptype')->where("ftype_id='$ftypeid'")->select(); |
|||
$filetypeInfo[$ftypeid]=$filetypeInfo?:array(); |
|||
return $filetypeInfo[$ftypeid]; |
|||
} |
|||
/** |
|||
* 上传文件类型表 |
|||
* @param array |
|||
* @param int $apply_id 查询条件(申请ID) |
|||
* @param int $type 查询条件(-1:$apply_id对应的临时和固定文件 1:固定 2:临时) |
|||
* @param int|array $status 查询条件(文件类型显示在哪个状态) |
|||
* @param int $isopen 查询条件(启用状态) |
|||
* @param string $order 结果排序 |
|||
* @return mixed |
|||
*/ |
|||
public static function getList($apply_type,$apply_id,$type=-1,$status=-1,$isopen=1,$order='ftype_id,status,apply_id,isopen',$mustupload=1) |
|||
{ |
|||
$where=array(); |
|||
|
|||
//根据状态值取出对应状态的数据0:所有 1:企业股权 2:实物资产 3:知识产权 4:其他权益 |
|||
if($apply_type!=-1)$where['apply_type']=array(array('eq',0),array('eq',$apply_type), 'or'); |
|||
|
|||
if($mustupload!=-1)$where['mustupload']=$mustupload; |
|||
if($type != -1){ |
|||
if($type===1)//固定 |
|||
$where['apply_id'] = array('eq', 0); |
|||
elseif($type===2)//临时 |
|||
$where['apply_id'] = array('eq', $apply_id);//临时文件肯定有对应的apply_id |
|||
} |
|||
else $where['apply_id'] = array(array('eq',0),array('eq',$apply_id), 'or'); |
|||
if($status != -1)$where['status'] = is_array($status)?array('in',$status):array('eq',$status); |
|||
if($isopen != -1)$where['isopen'] = array('eq',$isopen); |
|||
|
|||
if($status == -1) |
|||
return Db::name('trusteeship_uptype')->where($where)->order($order)->paginate(config('paginate.list_rows'),false,['query'=>get_query()]); |
|||
else |
|||
return Db::name('trusteeship_uptype')->where($where)->order($order)->select(); |
|||
} |
|||
|
|||
/** |
|||
* 增加托管上传文件类型 |
|||
* @param string |
|||
* @param string |
|||
* @param string |
|||
* @param string |
|||
* @param string |
|||
* @param int |
|||
* @param string |
|||
* @param int |
|||
* @return mixed |
|||
*/ |
|||
public static function add($apply_type,$isgp,$ftypedescr,$ftemp_id,$ftype,$status,$isopen,$apply_id,$user_id,$roletype,$roleid,$roletype2=0,$roleid2=0,$mustupload=1) |
|||
{ |
|||
$sldata=array( |
|||
'ftypedescr'=>$ftypedescr, |
|||
'ftemp_id' => $ftemp_id, |
|||
'apply_type' => $apply_type, |
|||
'isgp' => $isgp, |
|||
'mustupload' => $mustupload, |
|||
'ftype'=>$ftype, |
|||
'status'=>$status, |
|||
'isopen'=>$isopen, |
|||
'apply_id'=>$apply_id, |
|||
'user_id'=>$user_id, |
|||
'create_time'=>time(), |
|||
'upload_role_type'=>$roletype, |
|||
'upload_role_id'=>$roleid, |
|||
'upload_role_type2'=>$roletype2, |
|||
'upload_role_id2'=>$roleid2, |
|||
); |
|||
$uptype=Db::name('trusteeship_uptype')->insert($sldata); |
|||
if($uptype){ |
|||
return $uptype; |
|||
}else{ |
|||
return 0; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,53 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
托管同意协议模板设置 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm" name="sys" method="post" action="{:url('tuoguan/Tgsetup/tgagreerun')}"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板内容: </label> |
|||
<div class="col-sm-10"> |
|||
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script> |
|||
<textarea name="options[content_tpl]" rows="100%" style="width:100%" id="myEditor">{$sys.content_tpl}</textarea> |
|||
<script type="text/javascript"> |
|||
var editor = new UE.ui.Editor(); |
|||
editor.render("myEditor"); |
|||
</script> |
|||
<span style="color: #F3920A;"></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-sm-offset-3 col-sm-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/block} |
|||
@ -0,0 +1,53 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
托管初审通知模板设置 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm" name="sys" method="post" action="{:url('tuoguan/Tgsetup/tgcheckrun')}"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板内容: </label> |
|||
<div class="col-sm-10"> |
|||
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script> |
|||
<textarea name="options[content_tpl]" rows="100%" style="width:100%" id="myEditor">{$sys.content_tpl}</textarea> |
|||
<script type="text/javascript"> |
|||
var editor = new UE.ui.Editor(); |
|||
editor.render("myEditor"); |
|||
</script> |
|||
<span style="color: #F3920A;"></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-sm-offset-3 col-sm-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/block} |
|||
@ -0,0 +1,53 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
托管风控审核通知模板设置 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm" name="sys" method="post" action="{:url('tuoguan/Tgsetup/tgcheckfkrun')}"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板内容: </label> |
|||
<div class="col-sm-10"> |
|||
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script> |
|||
<textarea name="options[content_tpl]" rows="100%" style="width:100%" id="myEditor">{$sys.content_tpl}</textarea> |
|||
<script type="text/javascript"> |
|||
var editor = new UE.ui.Editor(); |
|||
editor.render("myEditor"); |
|||
</script> |
|||
<span style="color: #F3920A;"></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-sm-offset-3 col-sm-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/block} |
|||
@ -0,0 +1,53 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
托管缴费通知模板设置 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm" name="sys" method="post" action="{:url('tuoguan/Tgsetup/tgfeerun')}"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板内容: </label> |
|||
<div class="col-sm-10"> |
|||
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script> |
|||
<textarea name="options[content_tpl]" rows="100%" style="width:100%" id="myEditor">{$sys.content_tpl}</textarea> |
|||
<script type="text/javascript"> |
|||
var editor = new UE.ui.Editor(); |
|||
editor.render("myEditor"); |
|||
</script> |
|||
<span style="color: #F3920A;"></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-sm-offset-3 col-sm-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/block} |
|||
@ -0,0 +1,53 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
托管通知书模板设置 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm" name="sys" method="post" action="{:url('tuoguan/Tgsetup/tgnoticerun')}"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板内容: </label> |
|||
<div class="col-sm-10"> |
|||
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script> |
|||
<textarea name="options[content_tpl]" rows="100%" style="width:100%" id="myEditor">{$sys.content_tpl}</textarea> |
|||
<script type="text/javascript"> |
|||
var editor = new UE.ui.Editor(); |
|||
editor.render("myEditor"); |
|||
</script> |
|||
<span style="color: #F3920A;"></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-sm-offset-3 col-sm-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/block} |
|||
@ -0,0 +1,53 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
托管公告模板设置 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm" name="sys" method="post" action="{:url('tuoguan/Tgsetup/tgsuccessggrun')}"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板内容: </label> |
|||
<div class="col-sm-10"> |
|||
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script> |
|||
<textarea name="options[content_tpl]" rows="100%" style="width:100%" id="myEditor">{$sys.content_tpl}</textarea> |
|||
<script type="text/javascript"> |
|||
var editor = new UE.ui.Editor(); |
|||
editor.render("myEditor"); |
|||
</script> |
|||
<span style="color: #F3920A;"></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-sm-offset-3 col-sm-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/block} |
|||
@ -0,0 +1,53 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
实物资产成功通知书 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm" name="sys" method="post" action="{:url('tuoguan/Tgsetup/zc_noticerun')}"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板内容: </label> |
|||
<div class="col-sm-10"> |
|||
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script> |
|||
<textarea name="options[content_tpl]" rows="100%" style="width:100%" id="myEditor">{$sys.content_tpl}</textarea> |
|||
<script type="text/javascript"> |
|||
var editor = new UE.ui.Editor(); |
|||
editor.render("myEditor"); |
|||
</script> |
|||
<span style="color: #F3920A;"></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-sm-offset-3 col-sm-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/block} |
|||
@ -0,0 +1,53 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
实物资产成功公告 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm" name="sys" method="post" action="{:url('tuoguan/Tgsetup/zc_successggrun')}"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板内容: </label> |
|||
<div class="col-sm-10"> |
|||
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script> |
|||
<textarea name="options[content_tpl]" rows="100%" style="width:100%" id="myEditor">{$sys.content_tpl}</textarea> |
|||
<script type="text/javascript"> |
|||
var editor = new UE.ui.Editor(); |
|||
editor.render("myEditor"); |
|||
</script> |
|||
<span style="color: #F3920A;"></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-sm-offset-3 col-sm-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/block} |
|||
@ -0,0 +1,53 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
知识产权成功通知书 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm" name="sys" method="post" action="{:url('tuoguan/Tgsetup/zscq_noticerun')}"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板内容: </label> |
|||
<div class="col-sm-10"> |
|||
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script> |
|||
<textarea name="options[content_tpl]" rows="100%" style="width:100%" id="myEditor">{$sys.content_tpl}</textarea> |
|||
<script type="text/javascript"> |
|||
var editor = new UE.ui.Editor(); |
|||
editor.render("myEditor"); |
|||
</script> |
|||
<span style="color: #F3920A;"></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-sm-offset-3 col-sm-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/block} |
|||
@ -0,0 +1,53 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
实物资产成功公告 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm" name="sys" method="post" action="{:url('tuoguan/Tgsetup/zscq_successggrun')}"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板内容: </label> |
|||
<div class="col-sm-10"> |
|||
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script> |
|||
<textarea name="options[content_tpl]" rows="100%" style="width:100%" id="myEditor">{$sys.content_tpl}</textarea> |
|||
<script type="text/javascript"> |
|||
var editor = new UE.ui.Editor(); |
|||
editor.render("myEditor"); |
|||
</script> |
|||
<span style="color: #F3920A;"></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-sm-offset-3 col-sm-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{/block} |
|||
File diff suppressed because it is too large
@ -0,0 +1,106 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
<div class="row maintop"> |
|||
<div class="col-xs-4 col-sm-2 margintop5"> |
|||
|
|||
</div> |
|||
<div class="col-xs-10 col-sm-5 margintop5"> |
|||
<form name="sch_list_sea" class="form-search" method="post" action="{:url('tuoguan/Trusteeship/apply_list',array('applystatus'=>$applystatus,'allstatus'=>$allstatus))}"> |
|||
<div class="input-group"> |
|||
<span class="input-group-addon"> |
|||
<i class="ace-icon fa fa-check"></i> |
|||
</span> |
|||
<input type="text" name="search_name" class="form-control" value="{$search_name}" placeholder="输入需查询的申请人名称" /> |
|||
<span class="input-group-btn"> |
|||
<button type="submit" class="btn btn-purple btn-sm"> |
|||
<span class="ace-icon fa fa-search icon-on-right bigger-110"></span> |
|||
搜索 |
|||
</button> |
|||
</span> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<div class="col-xs-2 col-sm-2 margintop5"> |
|||
<div class="input-group-btn"> |
|||
<a href="{:url('tuoguan/Trusteeship/apply_list',array('applystatus'=>$applystatus,'allstatus'=>1))}"> |
|||
<button type="button" class="btn btn-sm btn-purple"> |
|||
<span class="ace-icon fa fa-globe icon-on-right bigger-110"></span> |
|||
全部状态{if condition="$allstatus eq 1"}(激活){/if} |
|||
</button> |
|||
</a> |
|||
</div> |
|||
<div class="input-group-btn"> |
|||
<a href="{:url('tuoguan/Trusteeship/apply_list',array('applystatus'=>$applystatus))}"> |
|||
<button type="button" class="btn btn-sm btn-pink"> |
|||
<span class="ace-icon fa fa-globe icon-on-right bigger-110"></span> |
|||
当前状态{if condition="$allstatus neq 1"}(激活){/if} |
|||
</button> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<div> |
|||
<form id="leftnav" name="leftnav" method="post" action="" > |
|||
<table class="table table-striped table-bordered table-hover" id="dynamic-table"> |
|||
<thead> |
|||
<tr> |
|||
<th style="width: 80px;">ID</th> |
|||
<th style="width: 250px;">申请用户名</th> |
|||
<th style="width: 80px;">用户状态</th> |
|||
<th style="width: 80px;">托管类型</th> |
|||
<th style="width: 200px;">挂牌状态</th> |
|||
<th style="width: 200px;">处理状态</th> |
|||
<th style="width: 160px;">申请日期</th> |
|||
<th style="border-right:#CCC solid 1px;">操作</th> |
|||
<th style="display:none;">处理号</th> |
|||
</tr> |
|||
</thead> |
|||
|
|||
<tbody> |
|||
|
|||
{foreach name="apply_list" item="v"} |
|||
<tr> |
|||
<td height="28" >{$v.tg_id}</td> |
|||
<td>{$v.tg_uid,1|get_cult4UserName}</td> |
|||
<td>{if condition="get_cult4UserStatus($v.tg_uid,1) eq 1"}正常{else/}锁定{/if}</td> |
|||
<td>{if condition="$v.tg_type eq 1"}企业股权{elseif condition="$v.tg_type eq 2"/}实物资产{elseif condition="$v.tg_type eq 3"/}知识产权{else/}其他权益{/if}</td> |
|||
<td>{if condition="$v.tg_isgp eq 1"}已挂牌{else/}未挂牌{/if}</td> |
|||
<td>{$v.descr}</td> |
|||
<td>{$v.tg_time|date='Y-m-d H:i:s',###}</td> |
|||
<td> |
|||
<div class="hidden-sm hidden-xs action-buttons"> |
|||
{if condition="$v.tg_status eq $applystatus"} |
|||
{if condition="$v.apply_admin_id eq 0"} |
|||
<a class="green rst-url-btn" href="{:url('tuoguan/Trusteeship/apply_applyed',array('tg_id'=>$v['tg_id'],'tg_status'=>$v['tg_status']))}" title="受理"> |
|||
<i class="ace-icon fa fa-lock bigger-130"></i> 受理 |
|||
</a> |
|||
{elseif condition="$loginuser==$v.apply_admin_id"} |
|||
<a class="blue" href="{:url('tuoguan/Trusteeship/apply_check',array('tg_id'=>$v['tg_id'],'applystatus'=>$v['tg_status']))}" title="审核"> |
|||
<i class="ace-icon fa fa-gavel bigger-130"></i> 审核 |
|||
</a> |
|||
{/if} |
|||
{/if} |
|||
</div> |
|||
</td> |
|||
<td style="display:none;"></td> |
|||
</tr> |
|||
{/foreach} |
|||
<tr> |
|||
<td height="50" colspan="10" align="left">{$page}</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
|
|||
</div><!-- /.page-content --> |
|||
{/block} |
|||
@ -0,0 +1,66 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
<div class="row maintop"> |
|||
<div class="col-xs-10 col-sm-5 margintop5"> |
|||
<form name="sch_list_sea" class="form-search" method="post" action="{:url('tuoguan/Trusteeship/tg_list')}"> |
|||
<div class="input-group"> |
|||
<span class="input-group-addon"> |
|||
<i class="ace-icon fa fa-check"></i> |
|||
</span> |
|||
<input type="text" name="search_name" class="form-control" value="{$search_name}" placeholder="输入需查询的申请人名称" /> |
|||
<span class="input-group-btn"> |
|||
<button type="submit" class="btn btn-purple btn-sm"> |
|||
<span class="ace-icon fa fa-search icon-on-right bigger-110"></span> |
|||
搜索 |
|||
</button> |
|||
</span> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<div> |
|||
<form id="leftnav" name="leftnav" method="post" action="" > |
|||
<table class="table table-striped table-bordered table-hover" id="dynamic-table"> |
|||
<thead> |
|||
<tr> |
|||
<th style="width: 80px;">ID</th> |
|||
<th style="width: 250px;">申请用户名</th> |
|||
<th style="width: 80px;">用户状态</th> |
|||
<th style="width: 80px;">托管类型</th> |
|||
<th style="width: 200px;">挂牌状态</th> |
|||
<th style="width: 200px;">处理状态</th> |
|||
<th style="width: 160px;">申请日期</th> |
|||
</tr> |
|||
</thead> |
|||
|
|||
<tbody> |
|||
|
|||
{foreach name="apply_list" item="v"} |
|||
<tr> |
|||
<td height="28" >{$v.tg_id}</td> |
|||
<td>{$v.tg_uid,1|get_cult4UserName}</td> |
|||
<td>{if condition="get_cult4UserStatus($v.tg_uid,1) eq 1"}正常{else/}锁定{/if}</td> |
|||
<td>{if condition="$v.tg_type eq 1"}企业股权{elseif condition="$v.tg_type eq 2"/}实物产权{elseif condition="$v.tg_type eq 3"/}知识产权{else/}其他权益{/if}</td> |
|||
<td>{if condition="$v.tg_type eq 1"}{if condition="$v.tg_isgp eq 1"}已挂牌{else/}未挂牌{/if}{/if}</td> |
|||
<td>{$v.descr}</td> |
|||
<td>{$v.tg_time|date='Y-m-d H:i:s',###}</td> |
|||
</tr> |
|||
{/foreach} |
|||
<tr> |
|||
<td height="50" colspan="10" align="left">{$page}</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
|
|||
</div><!-- /.page-content --> |
|||
{/block} |
|||
@ -0,0 +1,193 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
<link href="__PUBLIC__/ppy/css/fileinput.css" media="all" rel="stylesheet" type="text/css" /> |
|||
<script src="__PUBLIC__/ppy/js/fileinput.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ppy/js/fileinput_locale_zh.js" type="text/javascript"></script> |
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
添加固定上传文件类型 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm2" name="uptype_add" method="post" action="{:url('tuoguan/Trusteeship/uptype_runadd')}"> |
|||
<input type="hidden" name="TOKEN" value="{:session('TOKEN')}"> |
|||
<input type="hidden" name="apply_id" id="apply_id" value="{$apply_id}"/> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 文件类型: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="ftype_main" class="col-sm-5" disabled> |
|||
<option value="">请选择文件类型</option> |
|||
{if condition="$apply_id gt 0"} |
|||
<option value="1">固定</option> |
|||
<option value="2" selected>临时</option> |
|||
{else/} |
|||
<option value="1" selected>固定</option> |
|||
<option value="2">临时</option> |
|||
{/if} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 托管类型: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="apply_type" class="col-sm-5" required> |
|||
<option value="">-请选择托管类型-</option> |
|||
<option value="0">所有</option> |
|||
<option value="1">企业股权</option> |
|||
<option value="2">实物资产</option> |
|||
<option value="3">知识产权</option> |
|||
<option value="4">其他权益</option> |
|||
</select> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>请选择该固定文件对应的托管类型</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 是否已挂牌: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="isgp" class="col-sm-5" required> |
|||
<option value="0" selected>无</option> |
|||
<option value="1">已挂牌</option> |
|||
<option value="2">未挂牌</option> |
|||
</select> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>请选择是否已挂牌</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 必须上传项: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="mustupload" class="col-sm-5" required> |
|||
<option value="0">非必须</option> |
|||
<option value="1" selected>必须</option> |
|||
</select> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>请选择项目持有人</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group" style="display: none"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 临时文件类型对应申请ID: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="apply_id_show" id="apply_id_show" class="col-xs-10 col-sm-5" value="{$apply_id}" disabled/> |
|||
</div> |
|||
</div> |
|||
<div class="space-4" style="display: none"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 文件类型描述: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="ftypedescr" id="ftypedescr" placeholder="输入文件类型描述" class="col-xs-10 col-sm-5" required/> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>请输入文件类型描述</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板文件上传: </label> |
|||
<div class="col-sm-4"> |
|||
<input name="file_one" type="file" class="file col-xs-6 col-sm-6" data-show-preview="false" data-show-upload="false" data-show-caption="true"> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 接受文件类型: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="ftype" class="col-sm-5" required> |
|||
<option value="">-请选择接受文件类型-</option> |
|||
<option value="JPG">JPG</option> |
|||
<option value="PDF">PDF</option> |
|||
<option value="DOC">DOC</option> |
|||
</select> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>选择可接受的文件类型</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 添加文件状态: </label> |
|||
<div class="col-sm-10"> |
|||
{if condition="$status egt 0"}<select name="status" class="col-sm-5" disabled>{else/}<select name="status" class="col-sm-5" required>{/if} |
|||
<option value="">-请选择添加文件状态-</option> |
|||
{foreach name="statuslist" item="v" key="i"} |
|||
<option value="{$v.status}" {if condition="$status eq $v.status"}selected{/if}>{$v.descr}</option> |
|||
{/foreach} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 资料上传者: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="roletype" id="roletype" class="col-sm-2" onChange="loadRole('roletype','roletitle','{:url('admin/Ajax/getRole')}');" required> |
|||
<option value="">-资料上传者类型-</option> |
|||
<option value="1">前台会员角色</option> |
|||
<option value="2">后台员工角色</option> |
|||
</select> |
|||
<select name="roletitle" id="roletitle" class="col-sm-2" required> |
|||
<option value="0">-资料上传者角色-</option> |
|||
</select> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>请选择资料上传者</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 资料辅助上传者: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="roletype2" id="roletype2" class="col-sm-2" onChange="loadRole('roletype2','roletitle2','{:url('admin/Ajax/getRole')}');"> |
|||
<option value="">-资料辅助上传者类型-</option> |
|||
<option value="1">前台会员角色</option> |
|||
<option value="2">后台员工角色</option> |
|||
</select> |
|||
<select name="roletitle2" id="roletitle2" class="col-sm-2"> |
|||
<option value="0">-资料辅助上传者角色-</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 是否启用: </label> |
|||
<div class="col-sm-10" style="padding-top:5px;"> |
|||
<input name="isopen" id="isopen" value="1" class="ace ace-switch ace-switch-4 btn-flat" type="checkbox" /> |
|||
<span class="lbl"> 默认关闭</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="clearfix form-actions"> |
|||
<div class="col-md-offset-3 col-md-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
添加 |
|||
</button> |
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
<a href="{:url('tuoguan/Trusteeship/uptype_list')}"> |
|||
<button class="btn btn-info" type="button"> |
|||
<i class="ace-icon fa fa-bolt bigger-110"></i> |
|||
返回 |
|||
</button> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
|
|||
</div><!-- /.page-content --> |
|||
{/block} |
|||
{block name="scripts"} |
|||
<script type="text/javascript" src="__PUBLIC__/others/role.js"></script> |
|||
{/block} |
|||
@ -0,0 +1,189 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
<link href="__PUBLIC__/ppy/css/fileinput.css" media="all" rel="stylesheet" type="text/css" /> |
|||
<script src="__PUBLIC__/ppy/js/fileinput.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ppy/js/fileinput_locale_zh.js" type="text/javascript"></script> |
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
添加固定上传文件类型 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm2" name="uptype_add" method="post" action="{:url('tuoguan/Trusteeship/uptype_edit')}"> |
|||
<input type="hidden" name="TOKEN" value="{:session('TOKEN')}"> |
|||
<input type="hidden" name="ftype_id" id="ftype_id" value="{$uptype.ftype_id}"/> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 文件类型: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="ftype_main" class="col-sm-5" disabled> |
|||
<option value="">请选择文件类型</option> |
|||
<option value="1" selected>固定</option> |
|||
<option value="2">临时</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 托管类型: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="apply_type" class="col-sm-5" required> |
|||
<option value="">-请选择托管类型-</option> |
|||
<option value="0"{if condition="$uptype.apply_type eq 0"} selected {/if}>所有</option> |
|||
<option value="1"{if condition="$uptype.apply_type eq 1"} selected {/if}>企业股权</option> |
|||
<option value="2"{if condition="$uptype.apply_type eq 2"} selected {/if}>实物资产</option> |
|||
<option value="3"{if condition="$uptype.apply_type eq 3"} selected {/if}>知识产权</option> |
|||
<option value="4"{if condition="$uptype.apply_type eq 4"} selected {/if}>其他权益</option> |
|||
</select> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>请选择该固定文件对应的托管类型</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 是否已挂牌: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="isgp" class="col-sm-5" required> |
|||
<option value="0" selected>无</option> |
|||
<option value="1"{if condition="$uptype.isgp eq 1"} selected {/if}>已挂牌</option> |
|||
<option value="2"{if condition="$uptype.isgp eq 2"} selected {/if}>未挂牌</option> |
|||
</select> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>请选择是否已挂牌</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 必须上传项: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="mustupload" class="col-sm-5" required> |
|||
<option value="0" {if condition="$uptype.mustupload eq 0"} selected {/if}>非必须</option> |
|||
<option value="1" {if condition="$uptype.mustupload eq 1"} selected {/if}>必须</option> |
|||
</select> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>请选择项目持有人</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="space-4" style="display: none"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 文件类型描述: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="ftypedescr" id="ftypedescr" placeholder="输入文件类型描述" class="col-xs-10 col-sm-5" value="{$uptype.ftypedescr}" required/> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>请输入文件类型描述</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 模板文件上传: </label> |
|||
<div class="col-sm-4"> |
|||
<input name="file_one" type="file" class="file col-xs-6 col-sm-6" data-show-preview="false" data-show-upload="false" data-show-caption="true"> |
|||
{if(empty($upfile))}{else/}<a href="{$upfile.path|get_imgurl}" target="_blank">查看原始上传文件</a>{/if} |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 接受文件类型: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="ftype" class="col-sm-5" required> |
|||
<option value="">-请选择接受文件类型-</option> |
|||
<option value="JPG" {if condition="$uptype.ftype eq 'JPG'"} selected {/if}>JPG</option> |
|||
<option value="PDF" {if condition="$uptype.ftype eq 'PDF'"} selected {/if}>PDF</option> |
|||
<option value="DOC" {if condition="$uptype.ftype eq 'DOC'"} selected {/if}>DOC</option> |
|||
</select> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>选择可接受的文件类型</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 添加文件状态: </label> |
|||
<div class="col-sm-10"> |
|||
{if condition="$uptype.status egt 0"}<select name="status" class="col-sm-5" >{else/}<select name="status" class="col-sm-5" required>{/if} |
|||
<option value="">-请选择添加文件状态-</option> |
|||
{foreach name="statuslist" item="v" key="i"} |
|||
<option value="{$v.status}" {if condition="$uptype.status eq $v.status"}selected{/if}>{$v.descr}</option> |
|||
{/foreach} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 资料上传者: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="roletype" id="roletype" class="col-sm-2" onChange="loadRole('roletype','roletitle','{:url('admin/Ajax/getRole')}');" required> |
|||
<option value="">-资料上传者类型-</option> |
|||
<option value="1" {if condition="$uptype.upload_role_type eq 1"} selected {/if}>前台会员角色</option> |
|||
<option value="2" {if condition="$uptype.upload_role_type eq 2"} selected {/if}>后台员工角色</option> |
|||
</select> |
|||
<select name="roletitle" id="roletitle" class="col-sm-2" required> |
|||
<option value="0">-资料上传者角色-</option> |
|||
{foreach name="list1" item="v" key="i"} |
|||
<option value="{$v.id}" {if condition="$uptype.upload_role_id eq $v.id"}selected{/if}>{$v.name}</option> |
|||
{/foreach} |
|||
</select> |
|||
<span class="lbl col-xs-12 col-sm-7"><span class="red">*</span>请选择资料上传者</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 资料辅助上传者: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="roletype2" id="roletype2" class="col-sm-2" onChange="loadRole('roletype2','roletitle2','{:url('admin/Ajax/getRole')}');"> |
|||
<option value="">-资料辅助上传者类型-</option> |
|||
<option value="1" {if condition="$uptype.upload_role_type2 eq 1"} selected {/if}>前台会员角色</option> |
|||
<option value="2" {if condition="$uptype.upload_role_type2 eq 2"} selected {/if}>后台员工角色</option> |
|||
</select> |
|||
<select name="roletitle2" id="roletitle2" class="col-sm-2"> |
|||
<option value="0">-资料辅助上传者角色-</option> |
|||
{foreach name="list2" item="v" key="i"} |
|||
<option value="{$v.id}" {if condition="$uptype.upload_role_id2 eq $v.id"}selected{/if}>{$v.name}</option> |
|||
{/foreach} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 是否启用: </label> |
|||
<div class="col-sm-10" style="padding-top:5px;"> |
|||
<input name="isopen" id="isopen" value="1" class="ace ace-switch ace-switch-4 btn-flat" type="checkbox" {if condition="$uptype.isopen eq 1"} checked {/if} /> |
|||
<span class="lbl"> 默认关闭</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="clearfix form-actions"> |
|||
<div class="col-md-offset-3 col-md-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
<a href="{:url('tuoguan/Trusteeship/uptype_list')}"> |
|||
<button class="btn btn-info" type="button"> |
|||
<i class="ace-icon fa fa-bolt bigger-110"></i> |
|||
返回 |
|||
</button> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
|
|||
</div><!-- /.page-content --> |
|||
{/block} |
|||
{block name="scripts"} |
|||
<script type="text/javascript" src="__PUBLIC__/others/role.js"></script> |
|||
{/block} |
|||
@ -0,0 +1,105 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
<div class="row maintop"> |
|||
<div class="col-xs-4 col-sm-2 margintop5"> |
|||
<a href="{:url('tuoguan/Trusteeship/uptype_add')}"> |
|||
<button class="btn btn-sm btn-danger"> |
|||
<i class="ace-icon fa fa-bolt bigger-110"></i> |
|||
添加固定上传文件类型 |
|||
</button> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<div> |
|||
<table class="table table-striped table-bordered table-hover" id="dynamic-table"> |
|||
<thead> |
|||
<tr> |
|||
<th style="width: 50px;">ID</th> |
|||
<th style="width: 200px;">文件描述</th> |
|||
<th style="width: 50px;">文件类型</th> |
|||
<th style="width: 50px;">文件模板</th> |
|||
<th style="width: 50px;">托管类型</th> |
|||
<th style="width: 60px;">接受文件类型</th> |
|||
<th style="width: 100px;">上传状态</th> |
|||
<th style="width: 50px;">启用状态</th> |
|||
<th style="width: 60px;">申请ID</th> |
|||
<th style="width: 120px;">操作员</th> |
|||
<th style="width: 150px;">上传者</th> |
|||
<th style="width: 250px;">辅助上传者</th> |
|||
<th style="width: 150px;border-right:#CCC solid 1px;">操作日期</th> |
|||
<th style="width: 50px;border-right:#CCC solid 1px;">必须项目</th> |
|||
<th style="border-right:#CCC solid 1px;">操作</th> |
|||
</tr> |
|||
</thead> |
|||
|
|||
<tbody> |
|||
|
|||
{foreach name="uptype_list" item="v"} |
|||
<tr> |
|||
<td height="28" >{$v.ftype_id}</td> |
|||
<td>{$v.ftypedescr}</td> |
|||
<td>{if condition="$v.apply_id eq 0"}固定{else/}临时{/if}</td> |
|||
<td>{if condition="get_TGPathFromFileID($v.ftemp_id) eq '未上传'"}未上传{else/}<a href="{$v.ftemp_id|get_TGPathFromFileID|get_imgurl}" target="_blank">查看</a>{/if}</td> |
|||
<td>{if condition="$v.apply_type eq 0"}所有{elseif condition="$v.apply_type eq 1"}企业股权{elseif condition="$v.apply_type eq 2"}实物资产{elseif condition="$v.apply_type eq 3"}知识产权{elseif condition="$v.apply_type eq 4"}其他权益{/if}</td> |
|||
<td>{$v.ftype}</td> |
|||
<td>{$v.status|get_TGStatus}</td> |
|||
<td> |
|||
{if condition="$v['isopen'] eq 1"} |
|||
<a class="red open-btn" href="{:url('tuoguan/Trusteeship/uptype_state')}" data-id="{$v.ftype_id}" title="已开启"> |
|||
<div id="zt{$v.ftype_id}"><button class="btn btn-minier btn-yellow">开启</button></div> |
|||
</a> |
|||
{else/} |
|||
<a class="red open-btn" href="{:url('tuoguan/Trusteeship/uptype_state')}" data-id="{$v.ftype_id}" title="已禁用"> |
|||
<div id="zt{$v.ftype_id}"><button class="btn btn-minier btn-danger">禁用</button></div> |
|||
</a> |
|||
{/if} |
|||
</td> |
|||
<td>{if condition="$v.apply_id eq 0"}无{else/}{$v.apply_id}{/if}</td> |
|||
<td>{$v.user_id|get_cult4UserName=###,2}</td> |
|||
<td>{$v.upload_role_id,$v.upload_role_type|get_cult4RoleName}</td> |
|||
<td>{$v.upload_role_id2,$v.upload_role_type2|get_cult4RoleName}</td> |
|||
<td>{$v.create_time|date='Y-m-d H:i:s',###}</td> |
|||
<td>{if condition="$v.mustupload eq 1"}必须{else/}非必须{/if}</td> |
|||
<td> |
|||
<div class="hidden-sm hidden-xs action-buttons"> |
|||
<a class="green" href="{:url('tuoguan/Trusteeship/uptype_edit',array('ftype_id'=>$v['ftype_id']))}" data-toggle="tooltip" title="修改"> |
|||
<i class="ace-icon fa fa-pencil bigger-130"></i> |
|||
</a> |
|||
</div> |
|||
<div class="hidden-md hidden-lg"> |
|||
<div class="inline position-relative"> |
|||
<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> |
|||
<i class="ace-icon fa fa-cog icon-only bigger-110"></i> |
|||
</button> |
|||
<ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> |
|||
<li> |
|||
<a href="{:url('tuoguan/Trusteeship/uptype_edit',array('ftype_id'=>$v['ftype_id']))}" class="tooltip-success" data-rel="tooltip" title="" data-original-title="修改"> |
|||
<span class="green"> |
|||
<i class="ace-icon fa fa-pencil-square-o bigger-120"></i> |
|||
</span> |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
</td> |
|||
</tr> |
|||
{/foreach} |
|||
<tr> |
|||
<td height="50" colspan="17" align="left">{$page}</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
|
|||
</div><!-- /.page-content --> |
|||
{/block} |
|||
@ -0,0 +1,162 @@ |
|||
<?php |
|||
// +---------------------------------------------------------------------- |
|||
// | YFCMF [ WE CAN DO IT MORE SIMPLE ] |
|||
// +---------------------------------------------------------------------- |
|||
// | Copyright (c) 2015-2016 http://www.rainfer.cn All rights reserved. |
|||
// +---------------------------------------------------------------------- |
|||
// | Author: rainfer <81818832@qq.com> |
|||
// +---------------------------------------------------------------------- |
|||
namespace app\wechat\controller; |
|||
|
|||
use think\Db; |
|||
use EasyWeChat\Message\Text; |
|||
use EasyWeChat\Message\Image; |
|||
use EasyWeChat\Message\Voice; |
|||
use EasyWeChat\Message\News; |
|||
use EasyWeChat\Foundation\Application; |
|||
|
|||
class Index extends WeBase |
|||
{ |
|||
public function _initialize() |
|||
{ |
|||
//parent::_initialize(); |
|||
//微信平台 |
|||
$config=config('we_options'); |
|||
if(!empty($config)) $this->options=array_merge($this->options,$config); |
|||
$this->app = new Application($this->options); |
|||
config('app_debug',false); |
|||
config('app_trace',false); |
|||
if(input('echostr') && $this->checkSignature()){ |
|||
//验证token |
|||
return input('echostr'); |
|||
} |
|||
} |
|||
public function index() |
|||
{ |
|||
//消息处理 |
|||
$this->app->server->setMessageHandler(function ($message) { |
|||
switch ($message->MsgType) { |
|||
case 'event': |
|||
# 事件消息... |
|||
switch ($message->Event) { |
|||
case 'subscribe': |
|||
# code... |
|||
$we_reply_list=Db::name('we_reply')->where('we_reply_key','subscribe')->find(); |
|||
if($we_reply_list){ |
|||
switch ($we_reply_list['we_reply_type']) { |
|||
case 'text'://回复文本 |
|||
$text = new Text(['content' => $we_reply_list['we_replytext_content']]); |
|||
return $text; |
|||
break; |
|||
case 'image'://回复图片 |
|||
$new= new Image(['media_id' => $we_reply_list['we_replyimage_mediaid']]); |
|||
return $new; |
|||
break; |
|||
case 'voice'://回复语音 |
|||
$new=new Voice(['media_id' => $we_reply_list['we_replyvoice_mediaid']]); |
|||
return $new; |
|||
break; |
|||
case 'news'://回复图文消息 |
|||
$news=json_decode($we_reply_list['we_replynews'],true); |
|||
$new=new News($news); |
|||
return $new; |
|||
break; |
|||
default: |
|||
$text = new Text(['content' => '亲,不明白您想说什么']); |
|||
return $text; |
|||
break; |
|||
} |
|||
} |
|||
break; |
|||
case 'unsubscribe': |
|||
# code... |
|||
//取消关注 |
|||
break; |
|||
case 'CLICK': |
|||
# code... |
|||
//点击自定义click菜单 |
|||
switch ($message->EventKey) { |
|||
case 'key1'://如果为key1菜单,执行 |
|||
break; |
|||
default : |
|||
# code... |
|||
break; |
|||
} |
|||
break; |
|||
default : |
|||
# code... |
|||
break; |
|||
} |
|||
break; |
|||
case 'text': |
|||
# 文字消息... |
|||
$we_reply_list=Db::name('we_reply')->where('we_reply_key','like','%'.$message->Content.'%')->find(); |
|||
if (empty($we_reply_list)){ |
|||
$text = new Text(['content' => '亲,不明白您想说什么']); |
|||
return $text; |
|||
}else{ |
|||
switch ($we_reply_list['we_reply_type']) { |
|||
case 'text'://回复文本 |
|||
$text = new Text(['content' => $we_reply_list['we_replytext_content']]); |
|||
return $text; |
|||
break; |
|||
case 'image'://回复图片 |
|||
$new= new Image(['media_id' => $we_reply_list['we_replyimage_mediaid']]); |
|||
return $new; |
|||
break; |
|||
case 'voice'://回复语音 |
|||
$new=new Voice(['media_id' => $we_reply_list['we_replyvoice_mediaid']]); |
|||
return $new; |
|||
break; |
|||
case 'news'://回复图文消息 |
|||
$news=json_decode($we_reply_list['we_replynews'],true); |
|||
$new=new News($news); |
|||
return $new; |
|||
break; |
|||
default: |
|||
$text = new Text(['content' => '亲,不明白您想说什么']); |
|||
return $text; |
|||
break; |
|||
} |
|||
} |
|||
break; |
|||
case 'image': |
|||
# 图片消息... |
|||
break; |
|||
case 'voice': |
|||
# 语音消息... |
|||
break; |
|||
case 'video': |
|||
# 视频消息... |
|||
break; |
|||
case 'location': |
|||
# 坐标消息... |
|||
break; |
|||
case 'link': |
|||
# 链接消息... |
|||
break; |
|||
// ... 其它消息 |
|||
default: |
|||
# code... |
|||
break; |
|||
} |
|||
}); |
|||
$this->app->server->serve()->send(); |
|||
} |
|||
private function checkSignature() |
|||
{ |
|||
$signature =input('signature'); |
|||
$timestamp = input('timestamp'); |
|||
$nonce = input('nonce'); |
|||
$token = $this->options['token']; |
|||
$tmpArr = array($token, $timestamp, $nonce); |
|||
sort($tmpArr, SORT_STRING); |
|||
$tmpStr = implode( $tmpArr ); |
|||
$tmpStr = sha1( $tmpStr ); |
|||
if( $tmpStr == $signature ){ |
|||
return true; |
|||
}else{ |
|||
return false; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,769 @@ |
|||
<?php |
|||
// +---------------------------------------------------------------------- |
|||
// | YFCMF [ WE CAN DO IT MORE SIMPLE ] |
|||
// +---------------------------------------------------------------------- |
|||
// | Copyright (c) 2015-2016 http://www.rainfer.cn All rights reserved. |
|||
// +---------------------------------------------------------------------- |
|||
// | Author: rainfer <81818832@qq.com> |
|||
// +---------------------------------------------------------------------- |
|||
namespace app\wechat\controller; |
|||
|
|||
use think\Db; |
|||
use think\Validate; |
|||
use EasyWeChat\Message\Article; |
|||
|
|||
class We extends WeBase |
|||
{ |
|||
public function _initialize() |
|||
{ |
|||
parent::_initialize(); |
|||
$config=config('we_options'); |
|||
if(!empty($config)) $this->options=array_merge($this->options,$config); |
|||
} |
|||
//微信设置显示 |
|||
public function wesys() |
|||
{ |
|||
$this->assign('sys',$this->options); |
|||
return $this->fetch(); |
|||
} |
|||
|
|||
//保存微信设置 |
|||
public function runwesys() |
|||
{ |
|||
if (!request()->isAjax()){ |
|||
$this->error('提交方式不正确',url('wechat/We/wesys')); |
|||
}else{ |
|||
$we_options=input('post.'); |
|||
$rst=sys_config_setbyarr($we_options); |
|||
if($rst!==false){ |
|||
$this->options=array_merge($this->options,$we_options['we_options']); |
|||
$this->success('微信设置保存成功',url('wechat/We/wesys')); |
|||
}else{ |
|||
$this->error('提交参数不正确',url('wechat/We/wesys')); |
|||
} |
|||
} |
|||
} |
|||
public function menu_list() |
|||
{ |
|||
$menu=Db::name('we_menu')->order('we_menu_order')->select(); |
|||
$menu=menu_left($menu,'we_menu_id','we_menu_leftid'); |
|||
$this->assign('menu',$menu); |
|||
if(request()->isAjax()){ |
|||
return $this->fetch('ajax_menu_list'); |
|||
}else{ |
|||
return $this->fetch(); |
|||
} |
|||
} |
|||
public function menu_runadd() |
|||
{ |
|||
if(!request()->isAjax()){ |
|||
$this->error('提交方式不正确'); |
|||
}else{ |
|||
$we_menu_type=input('we_menu_type',1,'intval'); |
|||
$we_menu_typeval=input('we_menu_typeval',''); |
|||
if($we_menu_type==1){ |
|||
$rule = [ |
|||
['we_menu_typeval','url','URL地址无效'] |
|||
]; |
|||
$validate = new Validate($rule); |
|||
$rst = $validate->check(array( |
|||
'we_menu_typeval'=>$we_menu_typeval |
|||
)); |
|||
if(true !==$rst){ |
|||
$this->error('URL地址无效'); |
|||
} |
|||
} |
|||
$we_menu=Db::name('we_menu'); |
|||
$we_menu_leftid=input('we_menu_leftid',0,'intval'); |
|||
if($we_menu_leftid==0){ |
|||
$top_menu=$we_menu->where(['we_menu_leftid'=>0,'we_menu_open'=>1])->count(); |
|||
if ($top_menu>2){ |
|||
$this->error('顶级菜单不能超过3个',url('wechat/We/menu_list')); |
|||
} |
|||
}else{ |
|||
$child_menu=$we_menu->where(['we_menu_leftid'=>$we_menu_leftid,'we_menu_open'=>1])->count(); |
|||
if ($child_menu>4){ |
|||
$this->error('子菜单不能超过5个',url('wechat/We/menu_list')); |
|||
} |
|||
} |
|||
$sldata=array( |
|||
'we_menu_leftid'=>$we_menu_leftid, |
|||
'we_menu_name'=>input('we_menu_name'), |
|||
'we_menu_type'=>$we_menu_type, |
|||
'we_menu_typeval'=>$we_menu_typeval, |
|||
'we_menu_order'=>input('we_menu_order',50), |
|||
'we_menu_open'=>input('we_menu_open',0), |
|||
); |
|||
$rst=$we_menu->insert($sldata); |
|||
if($rst!==false){ |
|||
$this->success('菜单添加成功',url('wechat/We/menu_list')); |
|||
}else{ |
|||
$this->error('菜单添加失败',url('wechat/We/menu_list')); |
|||
} |
|||
} |
|||
} |
|||
public function menu_state() |
|||
{ |
|||
$id=input('x'); |
|||
$we_menu=Db::name('we_menu'); |
|||
$statusone=$we_menu->where('we_menu_id',$id)->value('we_menu_open'); |
|||
if($statusone==1){ |
|||
$statedata = array('we_menu_open'=>0); |
|||
$we_menu->where('we_menu_id',$id)->setField($statedata); |
|||
$this->success('状态禁止'); |
|||
}else{ |
|||
$statedata = array('we_menu_open'=>1); |
|||
$we_menu->where('we_menu_id',$id)->setField($statedata); |
|||
$this->success('状态开启'); |
|||
} |
|||
} |
|||
public function menu_order() |
|||
{ |
|||
if (!request()->isAjax()){ |
|||
$this->error('提交方式不正确'); |
|||
}else{ |
|||
$we_menu=Db::name('we_menu'); |
|||
foreach (input('post.') as $id => $sort){ |
|||
$we_menu->where('we_menu_id',$id)->setField('we_menu_order' , $sort); |
|||
} |
|||
$this->success('排序更新成功',url('wechat/We/menu_list')); |
|||
} |
|||
} |
|||
public function menu_del() |
|||
{ |
|||
$menu=Db::name('we_menu')->select(); |
|||
$tree=new \Tree(); |
|||
$tree->init($menu,['parentid'=>'we_menu_leftid','id'=>'we_menu_id']); |
|||
$ids=$tree->get_childs($menu,input('we_menu_id'),true,true); |
|||
$rst=Db::name('we_menu')->where('we_menu_id','in',$ids)->delete(); |
|||
if($rst!==false){ |
|||
$this->success('菜单删除成功',url('wechat/We/menu_list')); |
|||
}else{ |
|||
$this->error('菜单删除失败',url('wechat/We/menu_list')); |
|||
} |
|||
} |
|||
public function menu_edit() |
|||
{ |
|||
$we_menu_id=input('we_menu_id'); |
|||
$menu=Db::name('we_menu')->where('we_menu_id',$we_menu_id)->find(); |
|||
$menu['code']=1; |
|||
return json($menu); |
|||
} |
|||
public function menu_runedit() |
|||
{ |
|||
if(!request()->isAjax()){ |
|||
$this->error('提交方式不正确'); |
|||
}else{ |
|||
$we_menu_type=input('we_menu_type',1,'intval'); |
|||
$we_menu_typeval=input('we_menu_typeval',''); |
|||
if($we_menu_type==1){ |
|||
$rule = [ |
|||
['we_menu_typeval','url','URL地址无效'] |
|||
]; |
|||
$validate = new Validate($rule); |
|||
$rst = $validate->check(array( |
|||
'we_menu_typeval'=>$we_menu_typeval |
|||
)); |
|||
if(true !==$rst){ |
|||
$this->error('URL地址无效'); |
|||
} |
|||
} |
|||
$we_menu=Db::name('we_menu'); |
|||
$sldata=array( |
|||
'we_menu_leftid'=>input('we_menu_leftid',0,'intval'), |
|||
'we_menu_name'=>input('we_menu_name'), |
|||
'we_menu_type'=>$we_menu_type, |
|||
'we_menu_typeval'=>$we_menu_typeval, |
|||
'we_menu_order'=>input('we_menu_order',50), |
|||
'we_menu_open'=>input('we_menu_open',0), |
|||
); |
|||
$rst=$we_menu->where('we_menu_id',input('we_menu_id'))->update($sldata); |
|||
if($rst!==false){ |
|||
$this->success('菜单编辑成功',url('wechat/We/menu_list')); |
|||
}else{ |
|||
$this->error('菜单编辑失败',url('wechat/We/menu_list')); |
|||
} |
|||
} |
|||
} |
|||
public function menu_make() |
|||
{ |
|||
//判断是否配置 |
|||
if(empty($this->options['app_id']) || empty($this->options['secret'])){ |
|||
$this->error('微信配置不正确',url('wechat/We/menu_list')); |
|||
} |
|||
//组装数据 |
|||
$we_menu=Db::name('we_menu')->where(array('we_menu_leftid'=>0,'we_menu_open'=>1))->order('we_menu_id')->limit(3)->select(); |
|||
if(empty($we_menu)){ |
|||
$this->error('没有菜单需要生成',url('wechat/We/menu_list')); |
|||
} |
|||
$new_menu = array(); |
|||
$menu_count = 0; |
|||
foreach ($we_menu as $v){ |
|||
$new_menu[$menu_count]['name'] = $v['we_menu_name']; |
|||
$c_menus = Db::name('we_menu')->where(array('we_menu_leftid'=>$v['we_menu_id'],'we_menu_open'=>1))->limit(5)->select(); |
|||
if($c_menus){ |
|||
foreach($c_menus as $vv){ |
|||
$c_menu = array(); |
|||
$c_menu['name'] = $vv['we_menu_name']; |
|||
$c_menu['type'] = ($vv['we_menu_type']==1)?'view':(($vv['we_menu_type']==2)?'click':$vv['we_menu_type']); |
|||
if($c_menu['type'] == 'view'){ |
|||
$c_menu['url'] = $vv['we_menu_typeval']; |
|||
}else{ |
|||
$c_menu['key'] = $vv['we_menu_typeval']; |
|||
} |
|||
$c_menu['sub_button'] = array(); |
|||
if($c_menu['name']){ |
|||
$new_menu[$menu_count]['sub_button'][] = $c_menu; |
|||
} |
|||
} |
|||
}else{ |
|||
$new_menu[$menu_count]['type'] = ($v['we_menu_type']==1)?'view':(($v['we_menu_type']==2)?'click':$v['we_menu_type']); |
|||
if($new_menu[$menu_count]['type'] == 'view'){ |
|||
$new_menu[$menu_count]['url'] = $v['we_menu_typeval']; |
|||
}else{ |
|||
$new_menu[$menu_count]['key'] = $v['we_menu_typeval']; |
|||
} |
|||
} |
|||
$menu_count++; |
|||
} |
|||
//生成 |
|||
$menu = $this->app->menu; |
|||
//先删除现有的 |
|||
$menu->destroy(); |
|||
//再创建 |
|||
$return=$menu->add($new_menu); |
|||
$return=json_decode($return,true); |
|||
if($return['errcode'] == 0){ |
|||
$this->success('菜单已成功生成',url('wechat/We/menu_list')); |
|||
}else{ |
|||
$this->error('生成失败,错误:'.$return['errcode'],url('wechat/We/menu_list')); |
|||
} |
|||
} |
|||
//同步服务端菜单到本地数据库 |
|||
public function menu_get() |
|||
{ |
|||
$menu = $this->app->menu; |
|||
$menus=$menu->current(); |
|||
$we_menu=Db::name('we_menu'); |
|||
if($menus['selfmenu_info']['button']){ |
|||
$we_menu->where('we_menu_id','gt',0)->delete(); |
|||
} |
|||
$i=10; |
|||
foreach($menus['selfmenu_info']['button'] as $v){ |
|||
//1级菜单 |
|||
$name=$v['name']; |
|||
if(!empty($v['sub_button'])){ |
|||
//先插入数据库获得主键 |
|||
$sldata=array( |
|||
'we_menu_leftid'=>0, |
|||
'we_menu_name'=>$name, |
|||
'we_menu_type'=>1, |
|||
'we_menu_typeval'=>'', |
|||
'we_menu_order'=>$i, |
|||
'we_menu_open'=>1, |
|||
); |
|||
$we_menu_leftid=$we_menu->insertGetId($sldata); |
|||
if($we_menu_leftid){ |
|||
//2级菜单 |
|||
$data=array(); |
|||
$j=10; |
|||
foreach($v['sub_button']['list'] as $vv){ |
|||
$name=$vv['name']; |
|||
$type=$vv['type']; |
|||
if($type=='click'){ |
|||
$typeval=$vv['key']; |
|||
}else{ |
|||
$typeval=$vv['url']; |
|||
} |
|||
$data[]=array( |
|||
'we_menu_name'=>$name, |
|||
'we_menu_type'=>($type=='click')?2:(($type=='view')?1:$type), |
|||
'we_menu_typeval'=>$typeval, |
|||
'we_menu_leftid'=>$we_menu_leftid, |
|||
'we_menu_order'=>$j, |
|||
'we_menu_open'=>1 |
|||
); |
|||
$j=$j+10; |
|||
} |
|||
//插入数据库 |
|||
$we_menu->insertAll($data); |
|||
} |
|||
}else{ |
|||
$type=$v['type']; |
|||
if($type=='click'){ |
|||
$typeval=$v['key']; |
|||
}else{ |
|||
$typeval=$v['url']; |
|||
} |
|||
//插入数据库 |
|||
$sldata=array( |
|||
'we_menu_leftid'=>0, |
|||
'we_menu_name'=>$name, |
|||
'we_menu_type'=>($type=='click')?2:(($type=='view')?1:$type), |
|||
'we_menu_typeval'=>$typeval, |
|||
'we_menu_order'=>$i, |
|||
'we_menu_open'=>1, |
|||
); |
|||
$we_menu->insertGetId($sldata); |
|||
} |
|||
$i=$i+10; |
|||
} |
|||
$this->success('菜单已同步到数据库',url('wechat/We/menu_list')); |
|||
} |
|||
//自动回复 |
|||
public function reply_list() |
|||
{ |
|||
$reply_list=Db::name('we_reply')->paginate(config('paginate.list_rows')); |
|||
$show=$reply_list->render(); |
|||
$show=preg_replace("(<a[^>]*page[=|/](\d+).+?>(.+?)<\/a>)","<a href='javascript:ajax_page($1);'>$2</a>",$show); |
|||
$this->assign('reply_list',$reply_list); |
|||
$this->assign('page',$show); |
|||
if(request()->isAjax()){ |
|||
return $this->fetch('ajax_reply_list'); |
|||
}else{ |
|||
return $this->fetch(); |
|||
} |
|||
} |
|||
public function reply_edit() |
|||
{ |
|||
$we_reply_id=input('we_reply_id'); |
|||
$reply=Db::name('we_reply')->where('we_reply_id',$we_reply_id)->find(); |
|||
switch($reply['we_reply_type']){ |
|||
case 'image': |
|||
$we_reply_content=$reply['we_replyimage_mediaid']; |
|||
break; |
|||
case 'voice': |
|||
$we_reply_content=$reply['we_replyvoice_mediaid']; |
|||
break; |
|||
case 'news': |
|||
$we_reply_content=json_decode($reply['we_replynews'],true); |
|||
break; |
|||
default: |
|||
$we_reply_content=$reply['we_replytext_content']; |
|||
break; |
|||
} |
|||
$reply['we_reply_content']=$we_reply_content; |
|||
$reply['code']=1; |
|||
return json($reply); |
|||
} |
|||
public function reply_runedit() |
|||
{ |
|||
if(!request()->isAjax()){ |
|||
$this->error('提交方式不正确'); |
|||
}else{ |
|||
//回复内容 |
|||
$we_reply_type=input('we_reply_type','text'); |
|||
$field_content='we_replytext_content'; |
|||
switch($we_reply_type){ |
|||
case 'image': |
|||
$field_content='we_replyimage_mediaid'; |
|||
$we_reply_content=input('we_reply_content'); |
|||
break; |
|||
case 'voice': |
|||
$field_content='we_replyvoice_mediaid'; |
|||
$we_reply_content=input('we_reply_content'); |
|||
break; |
|||
case 'news': |
|||
$field_content='we_replynews'; |
|||
$news_array=array( |
|||
'title' => input('news_title',''), |
|||
'description' => input('news_description',''), |
|||
'url' => input('news_url',''), |
|||
'image' => input('news_image',''), |
|||
); |
|||
$we_reply_content=json_encode($news_array); |
|||
break; |
|||
default: |
|||
$we_reply_content=input('we_reply_content'); |
|||
break; |
|||
} |
|||
$sldata=array( |
|||
'we_reply_key'=>input('we_reply_key'), |
|||
'we_reply_type'=>$we_reply_type, |
|||
$field_content=>$we_reply_content, |
|||
'we_reply_open'=>input('we_reply_open',0), |
|||
); |
|||
$rst=Db::name('we_reply')->where('we_reply_id',input('we_reply_id'))->update($sldata); |
|||
if($rst!==false){ |
|||
$this->success('关键词回复编辑成功',url('wechat/We/reply_list')); |
|||
}else{ |
|||
$this->error('关键词回复编辑失败',url('wechat/We/reply_list')); |
|||
} |
|||
} |
|||
} |
|||
public function reply_runadd() |
|||
{ |
|||
if(!request()->isAjax()){ |
|||
$this->error('提交方式不正确'); |
|||
}else{ |
|||
//回复内容 |
|||
$we_reply_type=input('we_reply_type','text'); |
|||
$field_content='we_replytext_content'; |
|||
switch($we_reply_type){ |
|||
case 'image': |
|||
$field_content='we_replyimage_mediaid'; |
|||
$we_reply_content=input('we_reply_content'); |
|||
break; |
|||
case 'voice': |
|||
$field_content='we_replyvoice_mediaid'; |
|||
$we_reply_content=input('we_reply_content'); |
|||
break; |
|||
case 'news': |
|||
$field_content='we_replynews'; |
|||
$news_array=array( |
|||
'title' => input('news_title',''), |
|||
'description' => input('news_description',''), |
|||
'url' => input('news_url',''), |
|||
'image' => input('news_image',''), |
|||
); |
|||
$we_reply_content=json_encode($news_array); |
|||
break; |
|||
default: |
|||
$we_reply_content=input('we_reply_content'); |
|||
break; |
|||
} |
|||
$sldata=array( |
|||
'we_reply_key'=>input('we_reply_key'), |
|||
'we_reply_type'=>$we_reply_type, |
|||
$field_content=>$we_reply_content, |
|||
'we_reply_open'=>input('we_reply_open',0), |
|||
'we_reply_addtime'=>time() |
|||
); |
|||
$rst=Db::name('we_reply')->insert($sldata); |
|||
if($rst!==false){ |
|||
$this->success('关键词回复添加成功',url('wechat/We/reply_list')); |
|||
}else{ |
|||
$this->error('关键词回复添加失败',url('wechat/We/reply_list')); |
|||
} |
|||
} |
|||
} |
|||
public function reply_state() |
|||
{ |
|||
$id=input('x'); |
|||
$we_reply=Db::name('we_reply'); |
|||
$statusone=$we_reply->where('we_reply_id',$id)->value('we_reply_open'); |
|||
if($statusone==1){ |
|||
$statedata = array('we_reply_open'=>0); |
|||
$we_reply->where('we_reply_id',$id)->setField($statedata); |
|||
$this->success('状态禁止'); |
|||
}else{ |
|||
$statedata = array('we_reply_open'=>1); |
|||
$we_reply->where('we_reply_id',$id)->setField($statedata); |
|||
$this->success('状态开启'); |
|||
} |
|||
} |
|||
//全选删除 |
|||
public function reply_alldel() |
|||
{ |
|||
$p = input('p'); |
|||
$ids = input('we_reply_id/a'); |
|||
if(empty($ids)){ |
|||
$this -> error("请选择删除的关键词回复",url('wechat/We/reply_list',array('p'=>$p))); |
|||
} |
|||
if(!is_array($ids)){ |
|||
$ids[]=$ids; |
|||
} |
|||
$rst=Db::name('we_reply')->where('we_reply_id','in',$ids)->delete(); |
|||
if($rst!==false){ |
|||
$this->success("关键词回复删除成功",url('wechat/We/reply_list',array('p'=>$p))); |
|||
}else{ |
|||
$this -> error("关键词回复删除失败",url('wechat/We/reply_list',array('p'=>$p))); |
|||
} |
|||
} |
|||
public function reply_del() |
|||
{ |
|||
$p=input('p'); |
|||
$we_reply_id=input('we_reply_id'); |
|||
$rst=Db::name('we_reply')->where('we_reply_id',$we_reply_id)->delete(); |
|||
if($rst!==false){ |
|||
$this->success('关键词回复删除成功',url('wechat/We/reply_list',array('p'=>$p))); |
|||
}else{ |
|||
$this->error('关键词回复删除失败',url('wechat/We/reply_list',array('p'=>$p))); |
|||
} |
|||
} |
|||
public function mats_list() |
|||
{ |
|||
$mats_list=Db::name('we_mats')->paginate(config('paginate.list_rows')); |
|||
$show=$mats_list->render(); |
|||
$show=preg_replace("(<a[^>]*page[=|/](\d+).+?>(.+?)<\/a>)","<a href='javascript:ajax_page($1);'>$2</a>",$show); |
|||
$this->assign('mats_list',$mats_list); |
|||
$this->assign('page',$show); |
|||
if(request()->isAjax()){ |
|||
return $this->fetch('ajax_mats_list'); |
|||
}else{ |
|||
return $this->fetch(); |
|||
} |
|||
} |
|||
//同步服务端素材到本地数据库 |
|||
public function mats_get() |
|||
{ |
|||
$mats=Db::name('we_mats'); |
|||
$material = $this->app->material; |
|||
$types=array('image','video','voice','news'); |
|||
$data=array(); |
|||
foreach($types as $type){ |
|||
$lists = $material->lists($type, 0, 20); |
|||
$lists=json_decode($lists,true); |
|||
if(!isset($lists['item'])){ |
|||
continue; |
|||
} |
|||
$total_count=$lists['total_count']; |
|||
foreach($lists['item'] as $item){ |
|||
foreach($item['content']['news_item'] as $key=>$news_item){ |
|||
$sldata=array( |
|||
'mats_name'=>($type=='news')?$news_item['title']:$item['name'], |
|||
'mats_type'=>$type, |
|||
'media_id'=>$item['media_id'], |
|||
'update_time'=>$item['update_time'], |
|||
'create_time'=>$item['update_time'], |
|||
'news_content'=>($type=='news')?json_encode($news_item):'', |
|||
'news_index'=>($type=='news')?$key:0, |
|||
'url'=>($type=='news')?'':(isset($item['url'])?$item['url']:''), |
|||
); |
|||
$data[]=$sldata; |
|||
} |
|||
} |
|||
$i=1; |
|||
$total_count=$total_count-20; |
|||
while($total_count>0){ |
|||
$start=$i*20-1; |
|||
$lists = $material->lists($type, $start, 20); |
|||
$lists=json_decode($lists,true); |
|||
if(!isset($lists['item'])){ |
|||
continue; |
|||
} |
|||
foreach($lists['item'] as $item){ |
|||
foreach($item['content']['news_item'] as $key=>$news_item){ |
|||
$sldata=array( |
|||
'mats_name'=>($type=='news')?$news_item['title']:$item['name'], |
|||
'mats_type'=>$type, |
|||
'media_id'=>$item['media_id'], |
|||
'update_time'=>$item['update_time'], |
|||
'create_time'=>$item['update_time'], |
|||
'news_content'=>($type=='news')?json_encode($news_item):'', |
|||
'news_index'=>($type=='news')?$key:0, |
|||
'url'=>($type=='news')?'':(isset($item['url'])?$item['url']:''), |
|||
); |
|||
$data[]=$sldata; |
|||
} |
|||
} |
|||
$total_count=$total_count-20; |
|||
$i++; |
|||
} |
|||
} |
|||
$mats->insertAll($data); |
|||
$this->success('同步素材列表成功',url('wechat/We/mats_list')); |
|||
} |
|||
public function mats_edit() |
|||
{ |
|||
$mats_id=input('mats_id'); |
|||
$mats_list=Db::name('we_mats')->find($mats_id); |
|||
$mats_list['news_content']=json_decode($mats_list['news_content'],true); |
|||
$mats_list['video_content']=json_decode($mats_list['video_content'],true); |
|||
$this->assign('mats_list',$mats_list); |
|||
return $this->fetch(); |
|||
} |
|||
public function mats_runedit() |
|||
{ |
|||
$mats_id=input('mats_id'); |
|||
$news_index=input('news_index',0,'intval'); |
|||
$mats_list_old=Db::name('we_mats')->find($mats_id); |
|||
$mats_content_old=json_decode($mats_list_old['news_content'],true); |
|||
$title=input('mats_title'); |
|||
$mats_author=input('mats_author'); |
|||
$mats_digest=input('mats_digest'); |
|||
$mats_content_source_url=input('mats_content_source_url'); |
|||
$mats_thumb_media_id=input('mats_thumb_media_id'); |
|||
$mats_show_cover_pic=input('mats_show_cover_pic',0,'intval'); |
|||
$mats_content=htmlspecialchars_decode(input('mats_content')); |
|||
//比较是否有修改 |
|||
if($title!=$mats_content_old['title'] || $mats_author!=$mats_content_old['author'] || $mats_digest!=$mats_content_old['digest'] || $mats_content_source_url!=$mats_content_old['content_source_url'] || $mats_thumb_media_id!=$mats_content_old['thumb_media_id'] || $mats_show_cover_pic!=$mats_content_old['show_cover_pic'] || $mats_content!=$mats_content_old['content']){ |
|||
$new_data=array( |
|||
'title'=> $title, |
|||
'thumb_media_id' => $mats_thumb_media_id, |
|||
'author' => $mats_author, |
|||
'digest' => $mats_digest, |
|||
'show_cover_pic' => $mats_show_cover_pic, |
|||
'content_source_url' => $mats_content_source_url, |
|||
'content' => $mats_content |
|||
); |
|||
$result = $this->app->material->updateArticle($mats_list_old['media_id'], $new_data,$news_index); |
|||
$result=json_decode($result,true); |
|||
if(isset($result['errcode']) && $result['errcode']==0){ |
|||
//修改本地 |
|||
$mats_content_old=array_merge($mats_content_old,$new_data); |
|||
$sldata=array( |
|||
'mats_name'=>$title, |
|||
'news_content'=>json_encode($mats_content_old), |
|||
'update_time'=>time() |
|||
); |
|||
Db::name('we_mats')->where('mats_id',$mats_id)->update($sldata); |
|||
$this->success('修改成功',url('wechat/We/mats_list')); |
|||
}else{ |
|||
$this->error('修改失败',url('wechat/We/mats_list')); |
|||
} |
|||
}else{ |
|||
$this->success('未修改,直接返回',url('wechat/We/mats_list')); |
|||
} |
|||
} |
|||
public function mats_add() |
|||
{ |
|||
return $this->fetch(); |
|||
} |
|||
public function mats_runadd() |
|||
{ |
|||
$mats_type=input('mats_type'); |
|||
$mats_name=input('mats_name'); |
|||
if($mats_type=='news'){ |
|||
$mediaId=''; |
|||
$show_cover_pic=input('show_cover_pic',0,'intval'); |
|||
$file=request()->file('news_thumb'); |
|||
if($file && $show_cover_pic){ |
|||
$info = $file->rule('uniqid')->move(ROOT_PATH . config('upload_path') . DS . date('Y-m-d')); |
|||
if($info) { |
|||
$file_url=ROOT_PATH.config('upload_path'). '/' . date('Y-m-d') . '/' . $info->getFilename(); |
|||
//上传微信 |
|||
$material = $this->app->material; |
|||
$result = $material->uploadThumb($file_url,input('video_title'),input('video_introduction')); |
|||
$mediaId = $result->media_id; |
|||
if($mediaId){ |
|||
}else{ |
|||
$file = null; |
|||
@unlink($file_url); |
|||
$this->error('上传微信平台失败',url('wechat/We/mats_list')); |
|||
} |
|||
}else{ |
|||
$this->error($file->getError(),url('wechat/We/mats_list')); |
|||
} |
|||
} |
|||
//加入素材数据库 |
|||
$new_data=array( |
|||
'title'=> input('news_title'), |
|||
'thumb_media_id' => $mediaId, |
|||
'author' => input('news_author'), |
|||
'digest' => input('news_digest'), |
|||
'show_cover_pic' => $show_cover_pic, |
|||
'content_source_url' => input('content_source_url'), |
|||
'content' => htmlspecialchars_decode(input('mats_content')) |
|||
); |
|||
//上传图文素材 |
|||
$article = new Article($new_data); |
|||
$result=$this->app->material->uploadArticle($article); |
|||
$mediaId = $result->media_id; |
|||
if($mediaId){ |
|||
$sldata=array( |
|||
'mats_name'=>$mats_name, |
|||
'mats_type'=>$mats_type, |
|||
'media_id'=>$mediaId, |
|||
'news_content'=>json_encode($new_data), |
|||
'create_time'=>time(), |
|||
'update_time'=>time() |
|||
); |
|||
Db::name('we_mats')->insert($sldata); |
|||
$this->success('上传成功',url('wechat/We/mats_list')); |
|||
}else{ |
|||
$this->error('上传微信平台失败',url('wechat/We/mats_list')); |
|||
} |
|||
}else{ |
|||
$url=$mediaId=''; |
|||
$file=request()->file('mats_file'); |
|||
if($file){ |
|||
$info = $file->rule('uniqid')->move(ROOT_PATH . config('upload_path') . DS . date('Y-m-d')); |
|||
if($info) { |
|||
$file_url=ROOT_PATH.config('upload_path'). '/' . date('Y-m-d') . '/' . $info->getFilename(); |
|||
//上传微信 |
|||
$material = $this->app->material; |
|||
switch ($mats_type){ |
|||
case 'voice': |
|||
$result = $material->uploadVoice($file_url); |
|||
$mediaId = $result->media_id; |
|||
break; |
|||
case 'video': |
|||
$result = $material->uploadVideo($file_url,input('video_title'),input('video_introduction')); |
|||
$mediaId = $result->media_id; |
|||
break; |
|||
case 'thumb': |
|||
$result = $material->uploadThumb($file_url,input('video_title'),input('video_introduction')); |
|||
$mediaId = $result->media_id; |
|||
break; |
|||
default : |
|||
$result = $material->uploadImage($file_url,input('video_title'),input('video_introduction')); |
|||
$mediaId = $result->media_id; |
|||
$url = $result->url; |
|||
break; |
|||
} |
|||
if($mediaId){ |
|||
if($mats_type=='image'){ |
|||
$data['mtime']=time(); |
|||
$data['url']=$url; |
|||
Db::name('we_pic')->insert($data); |
|||
} |
|||
//加入素材数据库 |
|||
$sldata=array( |
|||
'mats_name'=>$mats_name, |
|||
'mats_type'=>$mats_type, |
|||
'media_id'=>$mediaId, |
|||
'url'=>$url, |
|||
'create_time'=>time(), |
|||
'update_time'=>time() |
|||
); |
|||
if($mats_type=='video'){ |
|||
$sldata['video_content']=json_encode(['title'=>input('video_title'),'introduction'=>input('video_introduction')]); |
|||
} |
|||
Db::name('we_mats')->insert($sldata); |
|||
$file = null; |
|||
@unlink($file_url); |
|||
$this->success('上传成功',url('wechat/We/mats_list')); |
|||
}else{ |
|||
$file = null; |
|||
@unlink($file_url); |
|||
$this->error('上传微信平台失败',url('wechat/We/mats_list')); |
|||
} |
|||
}else{ |
|||
$this->error($file->getError(),url('wechat/We/mats_list')); |
|||
} |
|||
}else{ |
|||
$this->error('文件上传失败',url('wechat/We/mats_list')); |
|||
} |
|||
} |
|||
} |
|||
public function mats_del() |
|||
{ |
|||
$mats_id=input('mats_id'); |
|||
$mast_list=Db::name('we_mats')->find($mats_id); |
|||
if(empty($mast_list)){ |
|||
$this->error('不存在此素材',url('wechat/We/mats_list')); |
|||
} |
|||
$mediaId=$mast_list['media_id']; |
|||
$result=$this->app->material->delete($mediaId); |
|||
$result=json_decode($result,true); |
|||
if(isset($result['errcode']) && $result['errcode']==0){ |
|||
Db::name('we_mats')->delete($mats_id); |
|||
$this->success('素材删除成功',url('wechat/We/mats_list')); |
|||
}else{ |
|||
$this->error('素材删除失败',url('wechat/We/mats_list')); |
|||
} |
|||
} |
|||
public function mats_alldel() |
|||
{ |
|||
$mats_ids=input('mats_id_id/a'); |
|||
if(!is_array($mats_ids)){ |
|||
$mats_ids[]=$mats_ids; |
|||
} |
|||
foreach ($mats_ids as $mats_id){ |
|||
$mast_list=Db::name('we_mats')->find($mats_id); |
|||
if(empty($mast_list)){ |
|||
continue; |
|||
} |
|||
$mediaId=$mast_list['media_id']; |
|||
$result=$this->app->material->delete($mediaId); |
|||
$result=json_decode($result,true); |
|||
if(isset($result['errcode']) && $result['errcode']==0){ |
|||
Db::name('we_mats')->delete($mats_id); |
|||
}else{ |
|||
continue; |
|||
} |
|||
} |
|||
$this->success('素材删除成功',url('wechat/We/mats_list')); |
|||
} |
|||
} |
|||
@ -0,0 +1,90 @@ |
|||
<?php |
|||
// +---------------------------------------------------------------------- |
|||
// | YFCMF [ WE CAN DO IT MORE SIMPLE ] |
|||
// +---------------------------------------------------------------------- |
|||
// | Copyright (c) 2015-2016 http://www.rainfer.cn All rights reserved. |
|||
// +---------------------------------------------------------------------- |
|||
// | Author: rainfer <81818832@qq.com> |
|||
// +---------------------------------------------------------------------- |
|||
namespace app\wechat\controller; |
|||
|
|||
use app\admin\controller\Base; |
|||
use EasyWeChat\Foundation\Application; |
|||
|
|||
class WeBase extends Base |
|||
{ |
|||
//微信平台 |
|||
protected $options=[ |
|||
/** |
|||
* Debug 模式,bool 值:true/false |
|||
* |
|||
* 当值为 false 时,所有的日志都不会记录 |
|||
*/ |
|||
'debug' => true, |
|||
/** |
|||
* 账号基本信息,请从微信公众平台/开放平台获取 |
|||
*/ |
|||
'app_id' => '', |
|||
'secret' => '', |
|||
'token' => '', |
|||
'aes_key' => '', |
|||
'we_name'=>'', |
|||
'we_id'=>'', |
|||
'we_number'=>'', |
|||
'we_type'=>1, |
|||
/** |
|||
* 日志配置 |
|||
* |
|||
* level: 日志级别, 可选为: |
|||
* debug/info/notice/warning/error/critical/alert/emergency |
|||
* permission:日志文件权限(可选),默认为null(若为null值,monolog会取0644) |
|||
* file:日志文件位置(绝对路径!!!),要求可写权限 |
|||
*/ |
|||
'log' => [ |
|||
'level' => 'debug', |
|||
'permission' => 0777, |
|||
'file' => './data/runtime/temp/easywechat.log', |
|||
], |
|||
/** |
|||
* OAuth 配置 |
|||
* |
|||
* scopes:公众平台(snsapi_userinfo / snsapi_base),开放平台:snsapi_login |
|||
* callback:OAuth授权完成后的回调页地址 |
|||
*/ |
|||
'oauth' => [ |
|||
'scopes' => ['snsapi_userinfo'], |
|||
'callback' => '/examples/oauth_callback.php', |
|||
], |
|||
/** |
|||
* 微信支付 |
|||
*/ |
|||
'payment' => [ |
|||
'merchant_id' => 'your-mch-id', |
|||
'key' => 'key-for-signature', |
|||
'cert_path' => 'path/to/your/cert.pem', // XXX: 绝对路径!!!! |
|||
'key_path' => 'path/to/your/key', // XXX: 绝对路径!!!! |
|||
// 'device_info' => '013467007045764', |
|||
// 'sub_app_id' => '', |
|||
// 'sub_merchant_id' => '', |
|||
// ... |
|||
], |
|||
/** |
|||
* Guzzle 全局设置 |
|||
* |
|||
* 更多请参考: http://docs.guzzlephp.org/en/latest/request-options.html |
|||
*/ |
|||
'guzzle' => [ |
|||
'timeout' => 300.0, // 超时时间(秒) |
|||
//'verify' => false, // 关掉 SSL 认证(强烈不建议!!!) |
|||
], |
|||
]; |
|||
public $app; |
|||
public function _initialize() |
|||
{ |
|||
parent::_initialize(); |
|||
//微信平台 |
|||
$config=config('we_options'); |
|||
if(!empty($config)) $this->options=array_merge($this->options,$config); |
|||
$this->app = new Application($this->options); |
|||
} |
|||
} |
|||
@ -0,0 +1,91 @@ |
|||
{foreach name="mats_list" item="v"} |
|||
<tr> |
|||
<td class="hidden-xs" align="center"> |
|||
<label class="pos-rel"> |
|||
<input name='mats_id_id[]' id="navid" class="ace" type='checkbox' value='{$v.mats_id}'> |
|||
<span class="lbl"></span> |
|||
</label> |
|||
</td> |
|||
<td> |
|||
{if condition="in_array($v.mats_type,['news','image','video'])"} |
|||
<div class="action-buttons"> |
|||
<a href="#" class="green bigger-140 show-details-btn" title="查看详细"> |
|||
<i class="ace-icon fa fa-angle-double-down"></i> |
|||
<span class="sr-only">详细</span> |
|||
</a> |
|||
</div> |
|||
{/if} |
|||
</td> |
|||
<td>{$v.mats_id}</td> |
|||
<td>{$v.mats_name}</td> |
|||
<td>{$v.mats_type}</td> |
|||
<td>{$v.media_id}</td> |
|||
<td>{if condition="$v['mats_type'] eq 'news'"}{$v.news_index}{/if}</td> |
|||
<td class="hidden-sm hidden-xs">{$v.create_time|date='Y-m-d',###}</td> |
|||
<td> |
|||
<div class="hidden-sm hidden-xs action-buttons"> |
|||
{if condition="$v['mats_type'] eq 'news'"} |
|||
<a class="green" href="{:url('wechat/We/mats_edit',['mats_id'=>$v['mats_id']])}" data-toggle="tooltip" title="修改"> |
|||
<i class="ace-icon fa fa-pencil bigger-130"></i> |
|||
</a> |
|||
{/if} |
|||
<a class="red confirm-rst-url-btn" href="{:url('wechat/We/mats_del',array('mats_id'=>$v['mats_id']))}" data-info="您确定要删除吗?" data-toggle="tooltip" title="删除"> |
|||
<i class="ace-icon fa fa-trash-o bigger-130"></i> </a> |
|||
</div> |
|||
<div class="hidden-md hidden-lg"> |
|||
<div class="inline position-relative"> |
|||
<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> |
|||
<i class="ace-icon fa fa-cog icon-only bigger-110"></i> |
|||
</button> |
|||
<ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> |
|||
{if condition="$v['mats_type'] eq 'news'"} |
|||
<li> |
|||
<a href="{:url('wechat/We/mats_edit',['mats_id'=>$v['mats_id']])}" class="tooltip-success" data-rel="tooltip" title="修改" data-original-title="修改"> |
|||
<span class="green"> |
|||
<i class="ace-icon fa fa-pencil bigger-120"></i> |
|||
</span> |
|||
</a> |
|||
</li> |
|||
{/if} |
|||
<li> |
|||
<a href="{:url('wechat/We/mats_del',array('mats_id'=>$v['mats_id']))}" data-info="您确定要删除吗?" class="tooltip-error confirm-rst-url-btn" data-rel="tooltip" title="删除" data-original-title="删除"> |
|||
<span class="red"> |
|||
<i class="ace-icon fa fa-trash-o bigger-120"></i> |
|||
</span> |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
</td> |
|||
</tr> |
|||
{if condition="in_array($v.mats_type,['news','image','video'])"} |
|||
<tr class="detail-row"> |
|||
<td colspan="10"> |
|||
<div class="row"> |
|||
{switch name="v['mats_type']" } |
|||
{case value="news"} |
|||
<label class="form-label col-xs-1 text-right">图文内容:</label> |
|||
<div class="formControls col-xs-11"> |
|||
<textarea name="" readonly="readonly" cols="" rows="8" class="col-xs-12" id="form-field-9" maxlength="">{$v.news_content|json_decode=true|var_export}</textarea> |
|||
</div> |
|||
{/case} |
|||
{case value="video"} |
|||
<label class="form-label col-xs-1 text-right">视频简介:</label> |
|||
<div class="formControls col-xs-11"> |
|||
<textarea name="" readonly="readonly" cols="" rows="4" class="col-xs-12" id="form-field-9" maxlength="">{$v.video_content|json_decode=true|var_export}</textarea> |
|||
</div> |
|||
{/case} |
|||
{default /} |
|||
<label class="form-label col-xs-1 text-right">图片地址:</label> |
|||
<div class="formControls col-xs-11">{$v.url}</div> |
|||
{/switch} |
|||
</div> |
|||
</td> |
|||
</tr> |
|||
{/if} |
|||
{/foreach} |
|||
<tr> |
|||
<td align="center"><button id="btnsubmit" class="btn btn-white btn-yellow btn-sm">删</button> </td> |
|||
<td colspan="8" align="right">{$page}</td> |
|||
</tr> |
|||
@ -0,0 +1,68 @@ |
|||
{foreach name="menu" item="v"} |
|||
<tr> |
|||
<td><input name="{$v.we_menu_id}" value="{$v.we_menu_order}" class="list_order center"/></td> |
|||
<td>{$v.we_menu_id}</td> |
|||
<td style=padding-left:{if condition='$v.leftpin neq 0'}{$v.leftpin}{/if}px; >{$v.lefthtml}{$v.we_menu_name}</span></td> |
|||
<td>{if condition="$v.we_menu_type eq 1"}URL菜单链接{else /}关键词回复菜单{/if}</td> |
|||
<td>{$v.we_menu_typeval}</td> |
|||
<td> |
|||
{if condition="$v['we_menu_open'] eq 1"} |
|||
<a class="red open-btn" href="{:url('wechat/We/menu_state')}" data-id="{$v.we_menu_id}" title="已开启"> |
|||
<div><button class="btn btn-minier btn-yellow">开启</button></div> |
|||
</a> |
|||
{else/} |
|||
<a class="red open-btn" href="{:url('wechat/We/menu_state')}" data-id="{$v.we_menu_id}" title="已禁用"> |
|||
<div><button class="btn btn-minier btn-danger">禁用</button></div> |
|||
</a> |
|||
{/if} |
|||
</td> |
|||
<td> |
|||
<div class="hidden-sm hidden-xs action-buttons"> |
|||
<a class="green menuedit-btn" href="{:url('wechat/We/menu_edit')}" data-id="{$v.we_menu_id}" data-toggle="tooltip" title="修改"> |
|||
<i class="ace-icon fa fa-pencil bigger-130"></i> </a> |
|||
<a class="red confirm-rst-url-btn" href="{:url('wechat/We/menu_del',array('we_menu_id'=>$v['we_menu_id']))}" data-info="若存在子菜单,则子菜单将一起被删除,你确定要删除吗?" data-toggle="tooltip" title="删除"> |
|||
<i class="ace-icon fa fa-trash-o bigger-130"></i> </a> |
|||
{if condition="$v['we_menu_leftid'] eq 0"} |
|||
<a class="blue" href="javascript:;" onclick="return add_we_menu({$v.we_menu_id});" data-toggle="tooltip" title="添加子类"> |
|||
<i class="ace-icon fa fa-plus-circle bigger-130"></i> </a> |
|||
{/if} |
|||
</div> |
|||
<div class="hidden-md hidden-lg"> |
|||
<div class="inline position-relative"> |
|||
<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> |
|||
<i class="ace-icon fa fa-cog icon-only bigger-110"></i> |
|||
</button> |
|||
<ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> |
|||
<li> |
|||
<a href="{:url('wechat/We/menu_edit')}" data-id="{$v.we_menu_id}" class="tooltip-success menuedit-btn" data-rel="tooltip" title="修改" data-original-title="修改"> |
|||
<span class="green"> |
|||
<i class="ace-icon fa fa-pencil bigger-120"></i> |
|||
</span> |
|||
</a> |
|||
</li> |
|||
|
|||
<li> |
|||
<a href="{:url('wechat/We/menu_del',array('we_menu_id'=>$v['we_menu_id']))}" data-info="若存在子菜单,则子菜单将一起被删除,你确定要删除吗?" class="tooltip-error confirm-rst-url-btn" data-rel="tooltip" title="删除" data-original-title="删除"> |
|||
<span class="red"> |
|||
<i class="ace-icon fa fa-trash-o bigger-120"></i> |
|||
</span> |
|||
</a> |
|||
</li> |
|||
{if condition="$v['we_menu_leftid'] eq 0"} |
|||
<li> |
|||
<a href="javascript:;" onclick="return add_we_menu({$v.we_menu_id});" class="tooltip-success" data-rel="tooltip" title="添加子类" data-original-title="添加子类"> |
|||
<span class="green"> |
|||
<i class="ace-icon fa fa-plus-circle bigger-120"></i> |
|||
</span> |
|||
</a> |
|||
</li> |
|||
{/if} |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
</td> |
|||
</tr> |
|||
{/foreach} |
|||
<tr> |
|||
<td colspan="10" align="left"><button id="btnorder" class="btn btn-white btn-yellow btn-sm">排序</button></td> |
|||
</tr> |
|||
@ -0,0 +1,93 @@ |
|||
{foreach name="reply_list" item="v"} |
|||
<tr> |
|||
<td class="hidden-xs" align="center"> |
|||
<label class="pos-rel"> |
|||
<input name='we_reply_id[]' id="navid" class="ace" type='checkbox' value='{$v.we_reply_id}'> |
|||
<span class="lbl"></span> |
|||
</label> |
|||
</td> |
|||
<td>{$v.we_reply_id}</td> |
|||
<td>{$v.we_reply_key}</td> |
|||
<td>{$v.we_reply_type}</td> |
|||
{switch name="v['we_reply_type']" } |
|||
{case value="news"} |
|||
<td>{$v.we_replynews|subtext=40} |
|||
<span class="action-buttons"> |
|||
<a href="#" class="green bigger-140 show-details-btn" title="查看详细"> |
|||
<i class="ace-icon fa fa-angle-double-down"></i> |
|||
<span class="sr-only">Details</span> |
|||
</a> |
|||
</span> |
|||
</td> |
|||
{/case} |
|||
{case value="image"} |
|||
<td>{$v.we_replyimage_mediaid}</td> |
|||
{/case} |
|||
{case value="voice"} |
|||
<td>{$v.we_replyvoice_mediaid}</td> |
|||
{/case} |
|||
{default /} |
|||
<td>{$v.we_replytext_content}</td> |
|||
{/switch} |
|||
<td class="hidden-sm hidden-xs">{$v.we_reply_addtime|date='Y-m-d H:i:s',###}</td> |
|||
<td> |
|||
{if condition="$v['we_reply_open'] eq 1"} |
|||
<a class="red open-btn" href="{:url('wechat/We/reply_state')}" data-id="{$v.we_reply_id}" title="已开启"> |
|||
<div><button class="btn btn-minier btn-yellow">开启</button></div> |
|||
</a> |
|||
{else/} |
|||
<a class="red open-btn" href="{:url('wechat/We/reply_state')}" data-id="{$v.we_reply_id}" title="已禁用"> |
|||
<div><button class="btn btn-minier btn-danger">禁用</button></div> |
|||
</a> |
|||
{/if} |
|||
</td> |
|||
<td> |
|||
<div class="hidden-sm hidden-xs action-buttons"> |
|||
<a class="green replyedit-btn" href="{:url('wechat/We/reply_edit')}" data-id="{$v.we_reply_id}" data-toggle="tooltip" title="修改"> |
|||
<i class="ace-icon fa fa-pencil bigger-130"></i> </a> |
|||
<a class="red confirm-rst-url-btn" href="{:url('wechat/We/reply_del',array('we_reply_id'=>$v['we_reply_id']))}" data-info="您确定要删除吗?" data-toggle="tooltip" title="删除"> |
|||
<i class="ace-icon fa fa-trash-o bigger-130"></i> </a> |
|||
</div> |
|||
<div class="hidden-md hidden-lg"> |
|||
<div class="inline position-relative"> |
|||
<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> |
|||
<i class="ace-icon fa fa-cog icon-only bigger-110"></i> |
|||
</button> |
|||
<ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> |
|||
<li> |
|||
<a href="{:url('wechat/We/reply_edit')}" data-id="{$v.we_reply_id}" class="tooltip-success replyedit-btn" data-rel="tooltip" title="修改" data-original-title="修改"> |
|||
<span class="green"> |
|||
<i class="ace-icon fa fa-pencil bigger-120"></i> |
|||
</span> |
|||
</a> |
|||
</li> |
|||
|
|||
<li> |
|||
<a href="{:url('wechat/We/reply_del',array('we_reply_id'=>$v['we_reply_id']))}" data-info="您确定要删除吗?" class="tooltip-error confirm-rst-url-btn" data-rel="tooltip" title="删除" data-original-title="删除"> |
|||
<span class="red"> |
|||
<i class="ace-icon fa fa-trash-o bigger-120"></i> |
|||
</span> |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
</td> |
|||
</tr> |
|||
{if condition="$v['we_reply_type'] eq 'news'"} |
|||
<tr class="detail-row"> |
|||
<td colspan="10"> |
|||
<div class="row"> |
|||
<label class="form-label col-xs-1 text-right">回复内容:</label> |
|||
<div class="formControls col-xs-11"> |
|||
<textarea name="" readonly="readonly" cols="" rows="8" class="col-xs-12" id="form-field-9" maxlength="">{$v.we_replynews|json_decode=true|var_export}</textarea> |
|||
</div> |
|||
</div> |
|||
</td> |
|||
</tr> |
|||
{/if} |
|||
{/foreach} |
|||
<tr> |
|||
<td align="left"><button id="btnsubmit" class="btn btn-white btn-yellow btn-sm">删</button> </td> |
|||
<td colspan="8" align="right">{$page}</td> |
|||
</tr> |
|||
@ -0,0 +1,229 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
添加素材 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm2" name="form0" method="post" action="{:url('wechat/We/mats_runadd')}" enctype="multipart/form-data"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 素材类型: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="mats_type" id="mats_type" class="col-sm-4 selector" required> |
|||
<option value="image">图片素材</option> |
|||
<option value="voice">声音素材</option> |
|||
<option value="video">视频素材</option> |
|||
<option value="thumb">缩略图素材</option> |
|||
<option value="news">图文素材</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 素材名: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="mats_name" placeholder="输入素材名" class="col-xs-10 col-sm-6" /> |
|||
<span class="help-inline col-xs-12 col-sm-7"> |
|||
<span class="middle" id="resone"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div id="input-video" class="none"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 视频标题: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="video_title" placeholder="输入视频标题" class="col-xs-10 col-sm-6" /> |
|||
<span class="help-inline col-xs-12 col-sm-7"> |
|||
<span class="middle" id="resone"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 视频描述: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="video_introduction" placeholder="输入视频描述" class="col-xs-10 col-sm-6" /> |
|||
<span class="help-inline col-xs-12 col-sm-7"> |
|||
<span class="middle" id="resone"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
</div> |
|||
<div id="upload-file"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 文件上传: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="file" name="mats_file" id="id-input-file-1" class="col-xs-10 col-sm-6"/> |
|||
<span class="lbl"></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
</div> |
|||
<div id="input-news" class="none"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 图文标题: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="news_title" placeholder="输入图文标题" class="col-xs-10 col-sm-6" /> |
|||
<span class="help-inline col-xs-12 col-sm-7"> |
|||
<span class="middle" id="resone"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 图文作者: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="news_author" placeholder="输入图文作者" class="col-xs-10 col-sm-6" /> |
|||
<span class="help-inline col-xs-12 col-sm-7"> |
|||
<span class="middle" id="resone"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 图文摘要: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="news_digest" placeholder="输入图文摘要" class="col-xs-10 col-sm-6" /> |
|||
<span class="help-inline col-xs-12 col-sm-7"> |
|||
<span class="middle" id="resone"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 图文跳转URL: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="content_source_url" placeholder="输入图文跳转URL" class="col-xs-10 col-sm-6" /> |
|||
<span class="help-inline col-xs-12 col-sm-7"> |
|||
<span class="middle" id="resone"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 是否显示封面: </label> |
|||
<div class="col-sm-10" style="padding-top:5px;"> |
|||
<input name="show_cover_pic" id="show_cover_pic" value="1" class="ace ace-switch ace-switch-4 btn-flat" type="checkbox" /> |
|||
<span class="lbl"> 默认不显示</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div id="news_thumb"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 图文封面: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="file" name="news_thumb" id="id-input-file-2" class="col-xs-10 col-sm-6"/> |
|||
<span class="lbl"></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 图文封面: </label> |
|||
<div class="col-sm-10"> |
|||
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script> |
|||
<textarea name="mats_content" rows="100%" style="width:100%" id="myEditor"></textarea> |
|||
<script type="text/javascript"> |
|||
var editor = new UE.ui.Editor({ |
|||
serverUrl:"{:url('admin/Ueditor/upload',['edit_type'=>'mats'])}" |
|||
}); |
|||
editor.render("myEditor"); |
|||
</script> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
</div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-md-offset-3 col-md-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
{/block} |
|||
{block name="scripts"} |
|||
<script> |
|||
var input_file=$('#id-input-file-1'),upload_file=$('#upload-file'),input_video=$('#input-video'),input_news=$('#input-news'); |
|||
input_file.ace_file_input({ |
|||
no_file:'未选择文件(支持文件拖入) ...', |
|||
btn_choose:'选择', |
|||
btn_change:'更改', |
|||
droppable:true, |
|||
onchange:null, |
|||
thumbnail:false, //| true | large |
|||
allowExt: ['bmp', 'png', 'jpeg', 'gif', 'jpg'], |
|||
maxSize: 2097152//2M |
|||
}); |
|||
$('#id-input-file-2').ace_file_input({ |
|||
no_file:'未选择文件,支持文件拖入(仅支持jpg格式,大小限制64k) ...', |
|||
btn_choose:'选择', |
|||
btn_change:'更改', |
|||
droppable:true, |
|||
onchange:null, |
|||
thumbnail:false, //| true | large |
|||
allowExt: ['jpg'], |
|||
maxSize: 65536//64k |
|||
}); |
|||
$('#mats_type').change(function () { |
|||
var $type=$(this).val(); |
|||
if($type=='news'){ |
|||
upload_file.addClass('none'); |
|||
input_news.removeClass('none'); |
|||
}else{ |
|||
upload_file.removeClass('none'); |
|||
input_news.addClass('none'); |
|||
} |
|||
if($type=='thumb'){ |
|||
input_video.addClass('none'); |
|||
input_file.ace_file_input('update_settings', { |
|||
no_file:'仅支持jpg格式,大小限制64k', |
|||
allowExt: ['jpg'], |
|||
maxSize: 65536//64K |
|||
}); |
|||
}else if($type=='voice'){ |
|||
input_video.addClass('none'); |
|||
input_file.ace_file_input('update_settings', { |
|||
no_file:'支持mp3/wma/wav/amr格式,大小限制5M,不超过60秒', |
|||
allowExt: ['mp3', 'wma', 'wav', 'amr'], |
|||
maxSize: 5242880//5M |
|||
}); |
|||
}else if($type=='video'){ |
|||
input_video.removeClass('none'); |
|||
input_file.ace_file_input('update_settings', { |
|||
no_file:'仅支持mp4格式,大小限制10M', |
|||
allowExt: ['mp4'], |
|||
maxSize: 10485760//10M |
|||
}); |
|||
}else{ |
|||
input_video.addClass('none'); |
|||
input_file.ace_file_input('update_settings', { |
|||
no_file:'支持bmp/png/jpeg/gif/jpg格式,大小限制2M', |
|||
allowExt: ['bmp', 'png', 'jpeg', 'gif', 'jpg'], |
|||
maxSize: 2097152//2M |
|||
}); |
|||
} |
|||
}); |
|||
</script> |
|||
{/block} |
|||
@ -0,0 +1,115 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
修改素材 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm2" name="form0" method="post" action="{:url('wechat/We/mats_runedit')}" enctype="multipart/form-data"> |
|||
<input type="hidden" name="mats_id" value="{$mats_list.mats_id}" /> |
|||
<input type="hidden" name="mats_type" value="{$mats_list.mats_type}" /> |
|||
<input type="hidden" name="news_index" value="{$mats_list.news_index}" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 标题: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="mats_title" value="{$mats_list.news_content.title}" class="col-xs-10 col-sm-6" /> |
|||
<span class="help-inline col-xs-12 col-sm-7"> |
|||
<span class="middle" id="resone"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 作者: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="mats_author" value="{$mats_list.news_content.author}" class="col-xs-10 col-sm-6" /> |
|||
<span class="help-inline col-xs-12 col-sm-7"> |
|||
<span class="middle" id="resone"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 摘要: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="mats_digest" value="{$mats_list.news_content.digest}" class="col-xs-10 col-sm-6" /> |
|||
<span class="help-inline col-xs-12 col-sm-7"> |
|||
<span class="middle" id="resone"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 内容: </label> |
|||
<div class="col-sm-10"> |
|||
<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script> |
|||
<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script> |
|||
<textarea name="mats_content" rows="100%" style="width:100%" id="myEditor">{$mats_list.news_content.content}</textarea> |
|||
<script type="text/javascript"> |
|||
var editor = new UE.ui.Editor({ |
|||
serverUrl:"{:url('admin/Ueditor/upload',['edit_type'=>'mats'])}" |
|||
}); |
|||
editor.render("myEditor"); |
|||
</script> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 跳转地址: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="mats_content_source_url" value="{$mats_list.news_content.content_source_url}" class="col-xs-10 col-sm-6" /> |
|||
<span class="help-inline col-xs-12 col-sm-7"> |
|||
<span class="middle" id="resone"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 缩略图素材ID: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="mats_thumb_media_id" value="{$mats_list.news_content.thumb_media_id}" class="col-xs-10 col-sm-6" /> |
|||
<span class="help-inline col-xs-12 col-sm-7"> |
|||
<span class="middle" id="resone"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 是否显示封面: </label> |
|||
<div class="col-sm-10" style="padding-top:5px;"> |
|||
<input name='mats_show_cover_pic' {if condition="$mats_list.news_content.show_cover_pic eq 1"}checked{/if} value='1' class='ace ace-switch ace-switch-4 btn-flat' type='checkbox' /> |
|||
<span class="lbl"> 默认不显示</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-md-offset-3 col-md-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
{/block} |
|||
{block name="scripts"} |
|||
<script> |
|||
</script> |
|||
{/block} |
|||
@ -0,0 +1,53 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
<div class="row maintop"> |
|||
<div class="col-xs-12"> |
|||
<a class="red" href="{:url('wechat/We/mats_add')}"> |
|||
<button class="btn btn-xs btn-danger"> |
|||
<i class="ace-icon fa fa-plus bigger-110"></i> |
|||
上传永久素材 |
|||
</button> |
|||
</a> |
|||
<a class="red confirm-rst-url-btn" href="{:url('wechat/We/mats_get')}" data-info="请勿频繁同步,确认要同步?"> |
|||
<button class="btn btn-xs btn-info"> |
|||
<i class="ace-icon fa fa-refresh bigger-110"></i> |
|||
同步素材 |
|||
</button> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<div> |
|||
<form class="ajaxForm2" name="leftnav" method="post" action="{:url('wechat/We/mats_alldel')}" > |
|||
<table id="dynamic-table" class="table table-striped table-bordered table-hover"> |
|||
<thead> |
|||
<tr> |
|||
<th class="hidden-xs center"> |
|||
<label class="pos-rel"> |
|||
<input type="checkbox" class="ace" id='chkAll' onclick='CheckAll(this.form)' value="全选"/> |
|||
<span class="lbl"></span> |
|||
</label> |
|||
</th> |
|||
<th>详情</th> |
|||
<th>ID</th> |
|||
<th>素材名</th> |
|||
<th>素材类型</th> |
|||
<th>素材ID</th> |
|||
<th>索引</th> |
|||
<th class="hidden-sm hidden-xs">添加时间</th> |
|||
<th style="border-right:#CCC solid 1px;">操作</th> |
|||
</tr> |
|||
</thead> |
|||
|
|||
<tbody id="ajax-data"> |
|||
{include file="we/ajax_mats_list"/} |
|||
</tbody> |
|||
</table> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div><!-- /.page-content --> |
|||
{/block} |
|||
@ -0,0 +1,237 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
<div class="row maintop"> |
|||
<div class="col-xs-12"> |
|||
<button class="btn btn-xs btn-danger" data-toggle="modal" data-target="#myModal"> |
|||
<i class="ace-icon fa fa-plus bigger-110"></i> |
|||
添加自定义菜单 |
|||
</button> |
|||
<a class="red rst-url-btn" href="{:url('wechat/We/menu_make')}"> |
|||
<button class="btn btn-xs btn-info"> |
|||
<i class="ace-icon fa fa-bolt bigger-110"></i> |
|||
生成菜单 |
|||
</button> |
|||
</a> |
|||
<a class="red rst-url-btn" href="{:url('wechat/We/menu_get')}"> |
|||
<button class="btn btn-xs btn-info"> |
|||
<i class="ace-icon fa fa-refresh bigger-110"></i> |
|||
同步菜单 |
|||
</button> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<div> |
|||
<form class="ajaxForm2" name="leftnav" method="post" action="{:url('wechat/We/menu_order')}" > |
|||
<table id="dynamic-table" class="table table-striped table-bordered table-hover"> |
|||
<thead> |
|||
<tr> |
|||
<th>排序</th> |
|||
<th>ID</th> |
|||
<th>菜单标题</th> |
|||
<th>类型</th> |
|||
<th>操作值</th> |
|||
<th>开启状态</th> |
|||
<th style="border-right:#CCC solid 1px;">操作</th> |
|||
</tr> |
|||
</thead> |
|||
|
|||
<tbody id="ajax-data"> |
|||
{include file="we/ajax_menu_list"/} |
|||
</tbody> |
|||
</table> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- 显示模态框(Modal)--> |
|||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> |
|||
<form class="form-horizontal ajaxForm2" name="we_menu_runadd" id="we_menu_runadd" method="post" action="{:url('wechat/We/menu_runadd')}"> |
|||
<div class="modal-dialog"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<button type="button" class="close" data-dismiss="modal" |
|||
aria-hidden="true">× |
|||
</button> |
|||
<h4 class="modal-title" id="myModalLabel"> |
|||
添加自定义菜单 |
|||
</h4> |
|||
</div> |
|||
<div class="modal-body"> |
|||
|
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 上级栏目: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="we_menu_leftid" id="we_menu_leftid" class="col-sm-4 selector" required> |
|||
<option value="0">顶级栏目</option> |
|||
{foreach name="menu" item="v"} |
|||
<option value="{$v.we_menu_id}">{$v.lefthtml}{$v.we_menu_name}</option> |
|||
{/foreach} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 菜单名称: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="we_menu_name" id="we_menu_name" placeholder="输入菜单名称" class="col-xs-10 col-sm-5" required/> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 菜单类型: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="we_menu_type" class="col-sm-4" required> |
|||
<option value="1" selected>URL菜单链接</option> |
|||
<option value="2">关键词回复菜单</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> URL/操作值: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="we_menu_typeval" id="we_menu_typeval" placeholder="如果url必须http://或https://开头" class="col-xs-10 col-sm-5" required/> |
|||
<span class="lbl"> <span class="red"></span>如果为url必须http://或https://开头</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 排序: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="we_menu_order" id="we_menu_order" value="50" class="col-xs-10 col-sm-2" required/> |
|||
<span class="lbl"> <span class="red">*</span>从小到大排序</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 是否开启: </label> |
|||
<div class="col-sm-10" style="padding-top:5px;"> |
|||
<input name="we_menu_open" id="we_menu_open" value="1" class="ace ace-switch ace-switch-4 btn-flat" type="checkbox" /> |
|||
<span class="lbl"> 默认关闭</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button type="submit" class="btn btn-primary"> |
|||
提交保存 |
|||
</button> |
|||
<button class="btn btn-info" type="reset"> |
|||
重置 |
|||
</button> |
|||
<button type="button" class="btn btn-default" data-dismiss="modal"> |
|||
关闭 |
|||
</button> |
|||
</div> |
|||
</div><!-- /.modal-content --> |
|||
</div><!-- /.modal-dialog --> |
|||
</form> |
|||
</div><!-- /.modal --> |
|||
<!-- 修改自定义菜单模态框(Modal) --> |
|||
<div class="modal fade in" id="myModaledit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> |
|||
<div class="modal-backdrop fade in" id="gbbb" style="height: 100%;"></div> |
|||
<form class="form-horizontal ajaxForm2" name="we_menu_runedit" id="we_menu_runedit" method="post" action="{:url('wechat/We/menu_runedit')}"> |
|||
<input type="hidden" name="we_menu_id" id="editwe_menu_id" value="" /> |
|||
<div class="modal-dialog"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<button type="button" class="close" id="gb" data-dismiss="modal" |
|||
aria-hidden="true">× |
|||
</button> |
|||
<h4 class="modal-title" id="myModalLabel"> |
|||
修改菜单 |
|||
</h4> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 上级栏目: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="we_menu_leftid" id="editwe_menu_leftid" class="col-sm-4 selector" required> |
|||
<option value="0">顶级栏目</option> |
|||
{foreach name="menu" item="v"} |
|||
<option value="{$v.we_menu_id}">{$v.lefthtml}{$v.we_menu_name}</option> |
|||
{/foreach} |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 菜单名称: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="we_menu_name" id="editwe_menu_name" placeholder="输入菜单名称" class="col-xs-10 col-sm-5" required/> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 菜单类型: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="we_menu_type" class="col-sm-4" id="editwe_menu_type" required> |
|||
<option value="1" selected>URL菜单链接</option> |
|||
<option value="2">关键词回复菜单</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> URL/操作值: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="we_menu_typeval" id="editwe_menu_typeval" placeholder="如果url必须http://或https://开头" class="col-xs-10 col-sm-5" required/> |
|||
<span class="lbl"> <span class="red">*</span>如果为url必须http://或https://开头</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 排序: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="we_menu_order" id="editwe_menu_order" value="50" class="col-xs-10 col-sm-2" required/> |
|||
<span class="lbl"> <span class="red">*</span>从小到大排序</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 是否开启: </label> |
|||
<div class="col-sm-10" style="padding-top:5px;"> |
|||
<input name="we_menu_open" id="editwe_menu_open" value="1" class="ace ace-switch ace-switch-4 btn-flat" type="checkbox" /> |
|||
<span class="lbl"> 默认关闭</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button type="submit" class="btn btn-primary"> |
|||
提交保存 |
|||
</button> |
|||
<button type="button" class="btn btn-default" id="gbb" > |
|||
关闭 |
|||
</button> |
|||
</div> |
|||
</div><!-- /.modal-content --> |
|||
</div><!-- /.modal-dialog --> |
|||
</form> |
|||
</div><!-- /.modal --> |
|||
</div><!-- /.page-content --> |
|||
{/block} |
|||
@ -0,0 +1,270 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
<div class="row maintop"> |
|||
<div class="col-xs-12"> |
|||
<button class="btn btn-xs btn-danger" data-toggle="modal" data-target="#myModal"> |
|||
<i class="ace-icon fa fa-plus bigger-110"></i> |
|||
添加关键词 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<div> |
|||
<form class="ajaxForm2" name="leftnav" method="post" action="{:url('wechat/We/reply_alldel')}" > |
|||
<table id="dynamic-table" class="table table-striped table-bordered table-hover"> |
|||
<thead> |
|||
<tr> |
|||
<th class="hidden-xs center"> |
|||
<label class="pos-rel"> |
|||
<input type="checkbox" class="ace" id='chkAll' onclick='CheckAll(this.form)' value="全选"/> |
|||
<span class="lbl"></span> |
|||
</label> |
|||
</th> |
|||
<th>ID</th> |
|||
<th>关键词</th> |
|||
<th>回复类型</th> |
|||
<th>回复内容/素材ID</th> |
|||
<th class="hidden-sm hidden-xs">添加时间</th> |
|||
<th>开启状态</th> |
|||
<th style="border-right:#CCC solid 1px;">操作</th> |
|||
</tr> |
|||
</thead> |
|||
|
|||
<tbody id="ajax-data"> |
|||
{include file="we/ajax_reply_list"/} |
|||
</tbody> |
|||
</table> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- 显示模态框(Modal)--> |
|||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> |
|||
<form class="form-horizontal ajaxForm2" name="we_reply_runadd" id="we_reply_runadd" method="post" action="{:url('wechat/We/reply_runadd')}"> |
|||
<div class="modal-dialog"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<button type="button" class="close" data-dismiss="modal" |
|||
aria-hidden="true">× |
|||
</button> |
|||
<h4 class="modal-title" id="myModalLabel"> |
|||
添加关键词 |
|||
</h4> |
|||
</div> |
|||
<div class="modal-body"> |
|||
|
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 关键词: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="we_reply_key" id="we_reply_key" placeholder="输入关键词" class="col-xs-10 col-sm-5" required/> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 回复类型: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="we_reply_type" class="col-sm-4 we_reply_type" id="we_reply_type" required> |
|||
<option value="text" selected>文字回复</option> |
|||
<option value="image">图片回复</option> |
|||
<option value="voice">声音回复</option> |
|||
<option value="news">图文回复</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div id="input-text"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 回复内容: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="we_reply_content" id="we_reply_content" placeholder="回复文本或素材ID" class="col-xs-10 col-sm-5"/> |
|||
<span class="lbl"> <span class="red">*</span>回复文本或素材ID</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
</div> |
|||
<div id="input-news"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 图文标题: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="news_title" placeholder="" class="col-xs-10 col-sm-5" /> |
|||
<span class="lbl"> <span class="red"></span></span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 图文简介: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="news_description" placeholder="" class="col-xs-10 col-sm-5" /> |
|||
<span class="lbl"> <span class="red"></span></span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 图文链接: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="news_url" placeholder="" class="col-xs-10 col-sm-5" /> |
|||
<span class="lbl"> <span class="red"></span></span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 图片地址: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="news_image" placeholder="" class="col-xs-10 col-sm-5" /> |
|||
<span class="lbl"> <span class="red"></span></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 是否开启: </label> |
|||
<div class="col-sm-10" style="padding-top:5px;"> |
|||
<input name="we_reply_open" id="we_reply_open" value="1" class="ace ace-switch ace-switch-4 btn-flat" type="checkbox" /> |
|||
<span class="lbl"> 默认关闭</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button type="submit" class="btn btn-primary"> |
|||
提交保存 |
|||
</button> |
|||
<button class="btn btn-info" type="reset"> |
|||
重置 |
|||
</button> |
|||
<button type="button" class="btn btn-default" data-dismiss="modal"> |
|||
关闭 |
|||
</button> |
|||
</div> |
|||
</div><!-- /.modal-content --> |
|||
</div><!-- /.modal-dialog --> |
|||
</form> |
|||
</div><!-- /.modal --> |
|||
<!-- 修改自定义菜单模态框(Modal) --> |
|||
<div class="modal fade in" id="myModaledit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> |
|||
<div class="modal-backdrop fade in" id="gbbb" style="height: 100%;"></div> |
|||
<form class="form-horizontal ajaxForm2" name="we_reply_runedit" id="we_reply_runedit" method="post" action="{:url('wechat/We/reply_runedit')}"> |
|||
<input type="hidden" name="we_reply_id" id="editwe_reply_id" value="" /> |
|||
<div class="modal-dialog"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<button type="button" class="close" id="gb" data-dismiss="modal" |
|||
aria-hidden="true">× |
|||
</button> |
|||
<h4 class="modal-title" id="myModalLabel"> |
|||
修改关键词回复 |
|||
</h4> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 关键词: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="we_reply_key" id="editwe_reply_key" placeholder="输入关键词" class="col-xs-10 col-sm-5" required/> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 回复类型: </label> |
|||
<div class="col-sm-10"> |
|||
<select name="we_reply_type" class="col-sm-4 we_reply_type" id="editwe_reply_type" required> |
|||
<option value="text" selected>文字回复</option> |
|||
<option value="image">图片回复</option> |
|||
<option value="voice">声音回复</option> |
|||
<option value="news">图文回复</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div id="input-text"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 回复内容: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="we_reply_content" id="editwe_reply_content" placeholder="" class="col-xs-10 col-sm-5" /> |
|||
<span class="lbl"> <span class="red"></span></span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
</div> |
|||
<div id="input-news"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 图文标题: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="news_title" placeholder="" id="editnews_title" class="col-xs-10 col-sm-5" /> |
|||
<span class="lbl"> <span class="red"></span></span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 图文简介: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="news_description" placeholder="" id="editnews_description" class="col-xs-10 col-sm-5" /> |
|||
<span class="lbl"> <span class="red"></span></span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 图文链接: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="news_url" placeholder="" id="editnews_url" class="col-xs-10 col-sm-5" /> |
|||
<span class="lbl"> <span class="red"></span></span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 图片地址: </label> |
|||
<div class="col-sm-10"> |
|||
<input type="text" name="news_image" placeholder="" id="editnews_image" class="col-xs-10 col-sm-5" /> |
|||
<span class="lbl"> <span class="red"></span></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 是否开启: </label> |
|||
<div class="col-sm-10" style="padding-top:5px;"> |
|||
<input name="we_reply_open" id="editwe_reply_open" value="1" class="ace ace-switch ace-switch-4 btn-flat" type="checkbox" /> |
|||
<span class="lbl"> 默认关闭</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button type="submit" class="btn btn-primary"> |
|||
提交保存 |
|||
</button> |
|||
<button type="button" class="btn btn-default" id="gbb" > |
|||
关闭 |
|||
</button> |
|||
</div> |
|||
</div><!-- /.modal-content --> |
|||
</div><!-- /.modal-dialog --> |
|||
</form> |
|||
</div><!-- /.modal --> |
|||
</div><!-- /.page-content --> |
|||
{/block} |
|||
{block name="scripts"} |
|||
<script> |
|||
$(function () { |
|||
$("#input-news").hide(); |
|||
$('#we_reply_type,#editwe_reply_type').change(function () { |
|||
var $type=$(this).val(),Modal=$(this).parents('.modal'); |
|||
//是否切换开关 |
|||
if($type=='news'){ |
|||
Modal.find("#input-text").hide(); |
|||
Modal.find("#input-news").show(); |
|||
}else{ |
|||
Modal.find("#input-text").show(); |
|||
Modal.find("#input-news").hide(); |
|||
} |
|||
}); |
|||
}); |
|||
</script> |
|||
{/block} |
|||
@ -0,0 +1,140 @@ |
|||
{extend name="admin@public/base" /} |
|||
{block name="main-content"} |
|||
<div class="page-content"> |
|||
|
|||
|
|||
|
|||
<!--主题--> |
|||
<div class="page-header"> |
|||
<h1> |
|||
您当前操作 |
|||
<small> |
|||
<i class="ace-icon fa fa-angle-double-right"></i> |
|||
微信设置 |
|||
</small> |
|||
</h1> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-12"> |
|||
<form class="form-horizontal ajaxForm" name="wesys" method="post" action="{:url('wechat/We/runwesys')}"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 公众号名称: </label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="we_options[we_name]" id="we_name" value="{$sys.we_name}" placeholder="请输入公众号名称" class="col-xs-10 col-sm-5" required/> |
|||
<span class="lbl"> <span class="red">*</span>必填</span> |
|||
<span class="help-inline col-xs-12 col-sm-7"> |
|||
<span class="middle" id="resone"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 公众号原始id: </label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="we_options[we_id]" id="we_id" value="{$sys.we_id}" placeholder="请输入公众号原始id" class="col-xs-10 col-sm-5" required/> |
|||
<span class="lbl"> <span class="red">*</span>必填</span> |
|||
<span class="help-inline col-xs-12 col-sm-7"> |
|||
<span class="middle" id="restwo"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 微信号: </label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="we_options[we_number]" id="we_number" value="{$sys.we_number}" placeholder="请输入微信号" class="col-xs-10 col-sm-5" required/> |
|||
<span class="lbl"> <span class="red">*</span>必填</span> |
|||
<span class="help-inline col-xs-12 col-sm-7"> |
|||
<span class="middle" id="resthr"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> AppID: </label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="we_options[app_id]" id="app_id" value="{$sys.app_id}" placeholder="请输入AppID(公众号)" class="col-xs-10 col-sm-5" required/> |
|||
<span class="help-inline col-xs-12 col-sm-7"> |
|||
<span class="middle" id="resthr"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> AppSecret: </label> |
|||
<div class="col-sm-9"> |
|||
<input type="password" name="we_options[secret]" id="secret" value="{$sys.secret}" placeholder="请输入AppSecret(公众号)" class="col-xs-10 col-sm-5" required/> |
|||
<span class="help-inline col-xs-12 col-sm-7"> |
|||
<span class="middle" id="resthr"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Token: </label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="we_options[token]" id="token" value="{$sys.token}" placeholder="请输入Token(公众号)" class="col-xs-10 col-sm-5"/> |
|||
<span class="help-inline col-xs-12 col-sm-7"> |
|||
<span class="middle" id="resthr"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> EncodingAESKey: </label> |
|||
<div class="col-sm-9"> |
|||
<input type="text" name="we_options[aes_key]" value="{$sys.aes_key}" placeholder="请输入EncodingAESKey(公众号)" class="col-xs-10 col-sm-5"/> |
|||
<span class="help-inline col-xs-12 col-sm-7"> |
|||
<span class="middle" id="resthr"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 微信号类型: </label> |
|||
<div class="col-sm-9"> |
|||
<select name="we_options[we_type]" class="col-sm-4" required> |
|||
<option value="">请选择公众号类型</option> |
|||
<option value="1" {if condition="$sys['we_type'] eq 1"}selected{/if}>普通订阅号</option> |
|||
<option value="2" {if condition="$sys['we_type'] eq 2"}selected{/if}>普通服务号</option> |
|||
<option value="3" {if condition="$sys['we_type'] eq 3"}selected{/if}>认证订阅号</option> |
|||
<option value="4" {if condition="$sys['we_type'] eq 4"}selected{/if}>认证服务号</option> |
|||
</select> |
|||
<span class="help-inline col-xs-12 col-sm-7"> |
|||
<span class="middle" id="resthr"></span> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="space-4"></div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label no-padding-right"></label> |
|||
<div class="col-sm-9"> |
|||
微信公众平台URL设置:http://youdomain/wechat/index/index.html |
|||
<br /> |
|||
微信公众平台Token设置:任意设置,与微信公众平台设置一致即可 |
|||
</div> |
|||
</div> |
|||
<div class="clearfix form-actions"> |
|||
<div class="col-sm-offset-3 col-sm-9"> |
|||
<button class="btn btn-info" type="submit"> |
|||
<i class="ace-icon fa fa-check bigger-110"></i> |
|||
保存 |
|||
</button> |
|||
|
|||
|
|||
<button class="btn" type="reset"> |
|||
<i class="ace-icon fa fa-undo bigger-110"></i> |
|||
重置 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
|
|||
</div><!-- /.page-content --> |
|||
{/block} |
|||
Loading…
Reference in new issue