diff --git a/README.md b/README.md index 4dedce0..85fbc58 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 勾股OA -[![勾股OA](https://img.shields.io/badge/GouguOA-1.1.6-brightgreen.svg)](https://gitee.com/gougucms/office/) +[![勾股OA](https://img.shields.io/badge/GouguOA-2.0.9-brightgreen.svg)](https://gitee.com/gougucms/office/) [![star](https://gitee.com/gougucms/office/badge/star.svg?theme=dark)](https://gitee.com/gougucms/office/stargazers) [![fork](https://gitee.com/gougucms/office/badge/fork.svg?theme=dark)](https://gitee.com/gougucms/office/members) @@ -50,13 +50,48 @@ PS:为了给后面的人提供良好的演示体验,体验以查看为主, www 系统部署目录(或者子目录) ├─app 应用目录 │ │ -│ ├─home 前台模块目录 +│ ├─api 公共api模块目录 │ │ ├─controller 控制器目录 │ │ ├─middleware 中间层目录 │ │ ├─model 模型目录 │ │ ├─validate 校验器目录 │ │ ├─view 视图模板目录 +│ │ ├─common.php 模块函数文件 +│ │ +│ ├─article 知识模块目录 +│ │ ├─controller 控制器目录 +│ │ ├─middleware 中间层目录 +│ │ ├─model 模型目录 +│ │ ├─validate 校验器目录 +│ │ ├─view 视图模板目录 +│ │ ├─common.php 模块函数文件 +│ │ +│ ├─base 公共api模块目录 +│ │ ├─view 视图模板目录 │ │ ├─BaseController.php 基础控制器 +│ │ +│ ├─business 商业智能模块目录 +│ │ ├─controller 控制器目录 +│ │ ├─middleware 中间层目录 +│ │ ├─model 模型目录 +│ │ ├─validate 校验器目录 +│ │ ├─view 视图模板目录 +│ │ ├─common.php 模块函数文件 +│ │ +│ ├─finance 财务模块目录 +│ │ ├─controller 控制器目录 +│ │ ├─middleware 中间层目录 +│ │ ├─model 模型目录 +│ │ ├─validate 校验器目录 +│ │ ├─view 视图模板目录 +│ │ ├─common.php 模块函数文件 +│ │ +│ ├─home 系统模块目录 +│ │ ├─controller 控制器目录 +│ │ ├─middleware 中间层目录 +│ │ ├─model 模型目录 +│ │ ├─validate 校验器目录 +│ │ ├─view 视图模板目录 │ │ ├─common.php 模块函数文件 │ │ │ ├─install 安装模块目录(系统安装完后,建议删除) @@ -65,6 +100,38 @@ www 系统部署目录(或者子目录) │ │ ├─validate 校验器目录 │ │ ├─view 视图模板目录 │ │ +│ ├─message 消息模块目录 +│ │ ├─controller 控制器目录 +│ │ ├─middleware 中间层目录 +│ │ ├─model 模型目录 +│ │ ├─validate 校验器目录 +│ │ ├─view 视图模板目录 +│ │ ├─common.php 模块函数文件 +│ │ +│ ├─note 公告模块目录 +│ │ ├─controller 控制器目录 +│ │ ├─middleware 中间层目录 +│ │ ├─model 模型目录 +│ │ ├─validate 校验器目录 +│ │ ├─view 视图模板目录 +│ │ ├─common.php 模块函数文件 +│ │ +│ ├─oa 办公模块目录 +│ │ ├─controller 控制器目录 +│ │ ├─middleware 中间层目录 +│ │ ├─model 模型目录 +│ │ ├─validate 校验器目录 +│ │ ├─view 视图模板目录 +│ │ ├─common.php 模块函数文件 +│ │ +│ ├─user 用户模块目录 +│ │ ├─controller 控制器目录 +│ │ ├─middleware 中间层目录 +│ │ ├─model 模型目录 +│ │ ├─validate 校验器目录 +│ │ ├─view 视图模板目录 +│ │ ├─common.php 模块函数文件 +│ │ ├─config 配置文件目录 │ ├─app.php 系统主要配置文件 │ ├─database.php 数据库配置文件 @@ -99,7 +166,7 @@ www 系统部署目录(或者子目录) ### 功能矩阵 -系统后台集成了主流的通用功能,如:登录验证、系统配置、操作日志管理、用户(组)管理、用户(组)权限、功能管理(后台菜单管理)、TAG关键字管理、文件上传、数据备份/还原、基础数据、人力资源、消息通知、企业公告、知识文章、日常办公、财务管理、商业智能、 API接口等。更多的个性化功能可以基于当前系统便捷做二次开发。 +系统后台集成了主流的通用功能,如:登录验证、系统配置、操作日志管理、用户(组)管理、用户(组)权限、功能管理(后台菜单管理)、TAG关键字管理、文件上传、数据备份/还原、基础数据、审批流程、员工管理、消息通知、企业公告、知识文章、办公审批、日常办公、财务管理、商业智能、 API接口等。更多的个性化功能可以基于当前系统便捷做二次开发。 具体功能如下: @@ -108,7 +175,7 @@ www 系统部署目录(或者子目录) │ ├─系统管理 │ ├─系统配置 -│ ├─功能菜单 +│ ├─功能模块 │ ├─功能节点 │ ├─权限角色 │ ├─操作日志 @@ -117,13 +184,17 @@ www 系统部署目录(或者子目录) │ ├─数据还原 │ ├─基础数据 -│ ├─审核人相关配置 -│ ├─工作类型设置 -│ ├─知识关键字设置 -│ ├─报销类型设置 -│ ├─发票主体设置 +│ ├─审核类型 +│ ├─审核流程 +│ ├─报销类型 +│ ├─费用类型 +│ ├─印章类型 +│ ├─车辆类型 +│ ├─发票主体 +│ ├─公告类型 +│ ├─知识类型 │ -├─人力资源 +├─员工管理 │ ├─部门架构 │ ├─岗位职称 │ ├─企业员工 @@ -137,7 +208,6 @@ www 系统部署目录(或者子目录) │ ├─垃圾箱 │ ├─企业公告 -│ ├─公告类别 │ ├─公告列表 │ ├─知识文章 @@ -145,15 +215,26 @@ www 系统部署目录(或者子目录) │ ├─共享知识 │ ├─个人知识 │ +├─办公审批 +│ ├─我发起的审批 +│ ├─我负责的审批 +│ ├─日常办公 -│ ├─工作计划 -│ ├─计划日历 -│ ├─工作记录 +│ ├─日程日历 +│ ├─日程安排 │ ├─工作日历 +│ ├─工作记录 +│ ├─工作汇报 │ ├─财务管理 │ ├─报销管理 +│ │ ├─我申请的报销 +│ │ ├─我负责的报销 +│ │ │ ├─发票管理 +│ │ ├─我申请的发票 +│ │ ├─我负责的发票 +│ │ │ ├─到账管理 │ ├─商业智能 @@ -164,6 +245,9 @@ www 系统部署目录(或者子目录) ~~~ +### 功能导图 +![输入图片说明](https://oa.gougucms.com/storage/image/gouguoa2.0.png) + ### 安装教程 一、勾股OA推荐你使用阿里云和腾讯云服务器。 diff --git a/app/api/BaseController.php b/app/api/BaseController.php index 778e491..22f1149 100644 --- a/app/api/BaseController.php +++ b/app/api/BaseController.php @@ -12,7 +12,9 @@ namespace app\api; use think\App; use think\exception\HttpResponseException; use think\facade\Request; +use think\facade\Session; use think\Response; +use think\facade\View; /** * 控制器基础类 @@ -58,6 +60,10 @@ abstract class BaseController { $this->app = $app; $this->request = $this->app->request; + $this->module = strtolower(app('http')->getName()); + $this->controller = strtolower($this->request->controller()); + $this->action = strtolower($this->request->action()); + $this->uid = 0; // 控制器初始化 $this->initialize(); @@ -66,10 +72,26 @@ abstract class BaseController // 初始化 protected function initialize() { + // 检测权限 + $this->checkLogin(); //每页显示数据量 $this->pageSize = Request::param('page_size', \think\facade\Config::get('app.page_size')); } + /** + *验证用户登录 + */ + protected function checkLogin() + { + $session_admin = get_config('app.session_admin'); + if (!Session::has($session_admin)) { + $this->apiError('请先登录'); + } + else{ + $this->uid = Session::get($session_admin)['id']; + View::assign('login_user', $this->uid); + } + } /** * Api处理成功结果返回方法 * @param $message diff --git a/app/api/controller/Index.php b/app/api/controller/Index.php index 1e51aec..d7821bb 100644 --- a/app/api/controller/Index.php +++ b/app/api/controller/Index.php @@ -8,143 +8,421 @@ declare (strict_types = 1); namespace app\api\controller; use app\api\BaseController; -use app\api\middleware\Auth; -use app\api\service\JwtAuth; +use app\home\model\AdminLog; +use app\user\validate\AdminCheck; +use think\exception\ValidateException; use think\facade\Db; -use think\facade\Request; +use think\facade\Session; class Index extends BaseController { - /** - * 控制器中间件 [登录、注册 不需要鉴权] - * @var array - */ - protected $middleware = [ - Auth::class => ['except' => ['index','login','reg'] ] - ]; - - /** - * @api {post} /index/index API页面 - * @apiDescription 返回首页信息 - */ - public function index() + //上传文件 + public function upload() { - $list = Db::name('Article')->select(); - $seo = get_system_config('web'); - add_user_log('api', '首页'); - $this->apiSuccess('请求成功',['list' => $list,'seo' => $seo]); - } - - /** - * @api {post} /index/login 会员登录 - * @apiDescription 系统登录接口,返回 token 用于操作需验证身份的接口 - - * @apiParam (请求参数:) {string} username 登录用户名 - * @apiParam (请求参数:) {string} password 登录密码 - - * @apiParam (响应字段:) {string} token Token - - * @apiSuccessExample {json} 成功示例 - * {"code":0,"msg":"登录成功","time":1627374739,"data":{"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhcGkuZ291Z3VjbXMuY29tIiwiYXVkIjoiZ291Z3VjbXMiLCJpYXQiOjE2MjczNzQ3MzksImV4cCI6MTYyNzM3ODMzOSwidWlkIjoxfQ.gjYMtCIwKKY7AalFTlwB2ZVWULxiQpsGvrz5I5t2qTs"}} - * @apiErrorExample {json} 失败示例 - * {"code":1,"msg":"帐号或密码错误","time":1627374820,"data":[]} - */ - public function login() - { - $param = get_params(); - if(empty($param['username']) || empty($param['password'])){ - $this->apiError('参数错误'); - } - // 校验用户名密码 - $user = Db::name('User')->where(['username' => $param['username']])->find(); - if (empty($user)) { - $this->apiError('帐号或密码错误'); + $param = get_params(); + if (request()->file('file')) { + $file = request()->file('file'); + } else { + return to_assign(1, '没有选择上传文件'); } - $param['pwd'] = set_password($param['password'], $user['salt']); - if ($param['pwd'] !== $user['password']) { - $this->apiError('帐号或密码错误'); - } - if ($user['status'] == -1) { - $this->apiError('该用户禁止登录,请于平台联系'); - } - $data = [ - 'last_login_time' => time(), - 'last_login_ip' => request()->ip(), - 'login_num' => $user['login_num'] + 1, + // dump($file);die; + // 获取上传文件的hash散列值 + $sha1 = $file->hash('sha1'); + $md5 = $file->hash('md5'); + $rule = [ + 'image' => 'jpg,png,jpeg,gif', + 'doc' => 'doc,docx,ppt,pptx,xls,xlsx,pdf', + 'file' => 'zip,gz,7z,rar,tar', ]; - $res = Db::name('user')->where(['id' => $user['id']])->update($data); - if($res){ - //获取jwt的句柄 - $jwtAuth = JwtAuth::getInstance(); - $token = $jwtAuth->setUid($user['id'])->encode()->getToken(); - add_user_log('api', '登录'); - $this->apiSuccess('登录成功',['token' => $token]); - } - } - - /** - * @api {post} /index/reg 会员注册 - * @apiDescription 系统注册接口,返回是否成功的提示,需再次登录 - - * @apiParam (请求参数:) {string} username 用户名 - * @apiParam (请求参数:) {string} password 密码 - - * @apiSuccessExample {json} 成功示例 - * {"code":0,"msg":"注册成功","time":1627375117,"data":[]} - * @apiErrorExample {json} 失败示例 - * {"code":1,"msg":"该账户已经存在","time":1627374899,"data":[]} - */ - public function reg() - { - $param = get_params(); - if(empty($param['username']) || empty($param['pwd'])){ - $this->apiError('参数错误'); - } - $user = Db::name('user')->where(['username' => $param['username']])->find(); - if (!empty($user)) { - $this->apiError('该账户已经存在'); + $fileExt = $rule['image'] . ',' . $rule['doc'] . ',' . $rule['file']; + //1M=1024*1024=1048576字节 + $fileSize = 2 * 1024 * 1024; + if (isset($param['type']) && $param['type']) { + $fileExt = $rule[$param['type']]; } - $param['salt'] = set_salt(20); - $param['password'] = set_password($param['pwd'], $param['salt']); - $param['register_time'] = time(); - $param['headimgurl'] = '/static/home/images/icon.png'; - $param['register_ip'] = request()->ip(); - $char = mb_substr($param['username'], 0, 1, 'utf-8'); - $uid = Db::name('User')->strict(false)->field(true)->insertGetId($param); - if($uid){ - add_user_log('api', '注册'); - $this->apiSuccess('注册成功'); - }else{ - $this->apiError('注册失败'); + if (isset($param['size']) && $param['size']) { + $fileSize = $param['size']; + } + $validate = \think\facade\Validate::rule([ + 'image' => 'require|fileSize:' . $fileSize . '|fileExt:' . $fileExt, + ]); + $file_check['image'] = $file; + if (!$validate->check($file_check)) { + return to_assign(1, $validate->getError()); + } + // 日期前綴 + $dataPath = date('Ym'); + $use = 'thumb'; + $filename = \think\facade\Filesystem::disk('public')->putFile($dataPath, $file, function () use ($md5) { + return $md5; + }); + if ($filename) { + //写入到附件表 + $data = []; + $path = get_config('filesystem.disks.public.url'); + $data['filepath'] = $path . '/' . $filename; + $data['name'] = $file->getOriginalName(); + $data['mimetype'] = $file->getOriginalMime(); + $data['fileext'] = $file->extension(); + $data['filesize'] = $file->getSize(); + $data['filename'] = $filename; + $data['sha1'] = $sha1; + $data['md5'] = $md5; + $data['module'] = \think\facade\App::initialize()->http->getName(); + $data['action'] = app('request')->action(); + $data['uploadip'] = app('request')->ip(); + $data['create_time'] = time(); + $data['user_id'] = $this->uid; + if ($data['module'] = 'admin') { + //通过后台上传的文件直接审核通过 + $data['status'] = 1; + $data['admin_id'] = $data['user_id']; + $data['audit_time'] = time(); + } + $data['use'] = request()->has('use') ? request()->param('use') : $use; //附件用处 + $res['id'] = Db::name('file')->insertGetId($data); + $res['filepath'] = $data['filepath']; + $res['name'] = $data['name']; + $res['filename'] = $data['filename']; + $res['filesize'] = $data['filesize']; + add_log('upload', $data['user_id'], $data); + return to_assign(0, '上传成功', $res); + } else { + return to_assign(1, '上传失败,请重试'); + } + } + + //清空缓存 + public function cache_clear() + { + \think\facade\Cache::clear(); + return to_assign(0, '系统缓存已清空'); + } + + //获取关键字 + public function get_keyword_cate() + { + $keyword = Db::name('Keywords')->where(['status' => 1])->order('id desc')->select()->toArray(); + return to_assign(0, '', $keyword); + } + + // 测试邮件发送 + public function email_test() + { + $sender = get_params('email'); + //检查是否邮箱格式 + if (!is_email($sender)) { + return to_assign(1, '测试邮箱码格式有误'); + } + $email_config = \think\facade\Db::name('config')->where('name', 'email')->find(); + $config = unserialize($email_config['content']); + $content = $config['template']; + //所有项目必须填写 + if (empty($config['smtp']) || empty($config['smtp_port']) || empty($config['smtp_user']) || empty($config['smtp_pwd'])) { + return to_assign(1, '请完善邮件配置信息!'); + } + + $send = send_email($sender, '测试邮件', $content); + if ($send) { + return to_assign(0, '邮件发送成功!'); + } else { + return to_assign(1, '邮件发送失败!'); + } + } + + //获取部门树形节点列表 + public function get_department_tree() + { + $department = get_department(); + $list = get_tree($department, 0, 2); + $data['trees'] = $list; + return json($data); + } + + //获取部门树形节点列表2 + public function get_department_select() + { + $keyword = get_params('keyword'); + $selected = []; + if(!empty($keyword)){ + $selected = explode(",",$keyword); + } + $department = get_department(); + $list = get_select_tree($department, 0,0,$selected); + return to_assign(0, '',$list); + } + + //获取子部门所有员工 + public function get_employee($did = 0) + { + $did = get_params('did'); + if($did == 1){ + $department = $did; + } + else{ + $department = get_department_son($did); + } + $employee = Db::name('admin') + ->field('a.id,a.did,a.position_id,a.mobile,a.name,a.nickname,a.sex,a.status,a.thumb,a.username,d.title as department') + ->alias('a') + ->join('Department d', 'a.did = d.id') + ->where(['a.status' => 1]) + ->where('a.id', ">", 1) + ->where('a.did', "in", $department) + ->select(); + return to_assign(0, '', $employee); + } + + //获取部门所有员工 + public function get_employee_select() + { + $employee = Db::name('admin') + ->field('id as value,name') + ->where(['status' => 1]) + ->select(); + return to_assign(0, '', $employee); + } + + //获取角色列表 + public function get_position() + { + $position = Db::name('Position')->field('id,title as name')->where([['status', '=', 1], ['id', '>', 1]])->select(); + return to_assign(0, '', $position); + } + + //首页公告 + public function get_note_list() + { + $list = Db::name('Note') + ->field('a.*,c.title as cate_title') + ->alias('a') + ->join('note_cate c', 'a.cate_id = c.id') + ->where(['a.status' => 1]) + ->order('a.id desc') + ->limit(10) + ->select()->toArray(); + foreach ($list as $key => $val) { + $list[$key]['create_time'] = date('Y-m-d :H:i', $val['create_time']); + } + $res['data'] = $list; + return table_assign(0, '', $res); + } + + //首页文章 + public function get_article_list() + { + $list = Db::name('Article') + ->field('a.*,c.title as cate_title') + ->alias('a') + ->join('article_cate c', 'a.article_cate_id = c.id') + ->where(['a.status' => 1]) + ->order('a.id desc') + ->limit(10) + ->select()->toArray(); + foreach ($list as $key => $val) { + $list[$key]['create_time'] = date('Y-m-d :H:i', $val['create_time']); + } + $res['data'] = $list; + return table_assign(0, '', $res); + } + + //修改个人信息 + public function edit_personal() + { + if (request()->isAjax()) { + $param = get_params(); + $uid = $this->uid; + Db::name('Admin')->where(['id' => $uid])->strict(false)->field(true)->update($param); + $session_admin = get_config('app.session_admin'); + Session::set($session_admin, Db::name('admin')->find($uid)); + return to_assign(); + } + else{ + return view('user@user/edit_personal', [ + 'admin' => get_admin($this->uid), + ]); } } - /** - * @api {post} /index/demo 测试页面 - * @apiDescription 返回文章列表信息 - - * @apiParam (请求参数:) {string} token Token - - * @apiSuccessExample {json} 响应数据样例 - * {"code":1,"msg":"","time":1563517637,"data":{"id":13,"email":"test110@qq.com","password":"e10adc3949ba59abbe56e057f20f883e","sex":1,"last_login_time":1563517503,"last_login_ip":"127.0.0.1","qq":"123455","mobile":"","mobile_validated":0,"email_validated":0,"type_id":1,"status":1,"create_ip":"127.0.0.1","update_time":1563507130,"create_time":1563503991,"type_name":"注册会员"}} - */ - public function demo() + //修改密码 + public function edit_password() { - $list = Db::name('Article')->select(); - $jwtAuth = JwtAuth::getInstance(); - $uid = $jwtAuth->getUid(); - $userInfo = Db::name('User')->where(['id' => $uid])->find(); - add_user_log('api', '测试页面'); - $this->apiSuccess('请求成功',['list' => $list,'user' => $userInfo]); + if (request()->isAjax()) { + $param = get_params(); + try { + validate(AdminCheck::class)->scene('editPwd')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $uid = $this->uid; + + $admin = Db::name('Admin')->where(['id' => $uid])->find(); + $old_psw = set_password($param['old_pwd'], $admin['salt']); + if ($admin['pwd'] != $old_psw) { + return to_assign(1, '旧密码错误'); + } + + $salt = set_salt(20); + $new_pwd = set_password($param['pwd'], $salt); + $data = [ + 'reg_pwd' => '', + 'salt' => $salt, + 'pwd' => $new_pwd, + 'update_time' => time(), + ]; + Db::name('Admin')->where(['id' => $uid])->strict(false)->field(true)->update($data); + $session_admin = get_config('app.session_admin'); + Session::set($session_admin, Db::name('admin')->find($uid)); + return to_assign(); + } + else{ + return view('user@user/edit_password', [ + 'admin' => get_admin($this->uid), + ]); + } + } + + //系统操作日志 + public function log_list() + { + if (request()->isAjax()) { + $param = get_params(); + $log = new AdminLog(); + $content = $log->get_log_list($param); + return table_assign(0, '', $content); + }else{ + return view('home@log/log_list'); + } } - /** - * 获取用户id - * @return mixed - */ - protected function getUid() + //保存密码修改 + public function password_submit() { - $jwtAuth = JwtAuth::getInstance(); - return $jwtAuth->getUid(); + if (request()->isAjax()) { + $param = get_params(); + try { + validate(AdminCheck::class)->scene('editpwd')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $admin = get_admin($this->uid); + if (set_password($param['old_pwd'], $admin['salt']) !== $admin['pwd']) { + return to_assign(1, '旧密码不正确!'); + } + unset($param['username']); + $param['salt'] = set_salt(20); + $param['pwd'] = set_password($param['pwd'], $param['salt']); + Db::name('Admin')->where(['id' => $admin['id'], + ])->strict(false)->field(true)->update($param); + $session_admin = get_config('app.session_admin'); + Session::set($session_admin, Db::name('admin')->find($admin['id'])); + return to_assign(); + } + } + + + //获取审核类型 + public function get_flow_cate($type=0) + { + $flows = Db::name('FlowType')->where(['type'=>$type,'status'=>1])->select()->toArray(); + return to_assign(0, '', $flows); + } + //获取审核步骤人员 + public function get_flow_users($id=0) + { + $flow = Db::name('Flow')->where(['id' => $id])->find(); + $flowData = unserialize($flow['flow_list']); + foreach ($flowData as $key => &$val) { + $val['user_id_info'] = Db::name('Admin')->field('id,name,thumb')->where('id','in',$val['flow_uids'])->select()->toArray(); + } + return to_assign(0, '', $flowData); + } + + //获取审核流程节点 + public function get_flow_nodes($id=0,$type=1) + { + $flows = Db::name('FlowStep')->where(['action_id'=>$id,'type'=>$type,'delete_time'=>0])->order('sort asc')->select()->toArray(); + foreach ($flows as $key => &$val) { + $user_id_info = Db::name('Admin')->field('id,name,thumb')->where('id','in',$val['flow_uids'])->select()->toArray(); + foreach ($user_id_info as $k => &$v) { + $v['check_time'] = 0; + $v['content'] = ''; + $v['status'] = 0; + $checked = Db::name('FlowRecord')->where(['check_user_id' => $v['id'],'step_id' => $val['id']])->find(); + if($checked){ + $v['check_time'] = date('Y-m-d :H:i', $checked['check_time']); + $v['content'] = $checked['content']; + $v['status'] = $checked['status']; + } + } + + $check_list = Db::name('FlowRecord') + ->field('f.*,a.name,a.thumb') + ->alias('f') + ->join('Admin a', 'a.id = f.check_user_id', 'left') + ->where(['f.step_id' => $val['id']])->select()->toArray(); + foreach ($check_list as $kk => &$vv) { + $vv['check_time_str'] = date('Y-m-d :H:i', $vv['check_time']); + } + + $val['user_id_info'] = $user_id_info; + $val['check_list'] = $check_list; + } + return to_assign(0, '', $flows); + } + + + //删除报销附件 + public function del_expense_interfix() + { + $id = get_params("id"); + $admin_id = Db::name('ExpenseInterfix')->where('id', $id)->value('admin_id'); + if ($admin_id == $this->uid) { + if (Db::name('ExpenseInterfix')->where('id', $id)->delete() !== false) { + return to_assign(0, "删除成功"); + } else { + return to_assign(1, "删除失败"); + } + } else { + return to_assign(1, "您没权限删除该报销数据"); + } + } + + //删除消息附件 + public function del_message_interfix() + { + $id = get_params("id"); + $detail = Db::name('MessageFileInterfix')->where('id', $id)->find(); + if ($detail['admin_id'] == $this->uid) { + if (Db::name('MessageFileInterfix')->where('id', $id)->delete() !== false) { + $data = Db::name('MessageFileInterfix')->where('mid', $detail['mid'])->column('file_id'); + return to_assign(0, "删除成功",$data); + } else { + return to_assign(1, "删除失败"); + } + } else { + return to_assign(1, "您没权限删除该消息附件"); + } + + } + + //获取访问记录 + public function get_view_data() + { + $param = get_params(); + $first_time = time(); + $second_time = $first_time - 86400; + $three_time = $first_time - 86400 * 365; + $begin_first = strtotime(date('Y-m-d', $first_time) . " 00:00:00"); + $end_first = strtotime(date('Y-m-d', $first_time) . " 23:59:59"); + $begin_second = strtotime(date('Y-m-d', $second_time) . " 00:00:00"); + $end_second = strtotime(date('Y-m-d', $second_time) . " 23:59:59"); + $begin_three = strtotime(date('Y-m-d', $three_time) . " 00:00:00"); + $data_first = Db::name('AdminLog')->field('create_time')->whereBetween('create_time', "$begin_first,$end_first")->select(); + $data_second = Db::name('AdminLog')->field('create_time')->whereBetween('create_time', "$begin_second,$end_second")->select(); + $data_three = Db::name('AdminLog')->field('create_time')->whereBetween('create_time', "$begin_three,$end_first")->select(); + return to_assign(0, '', ['data_first' => hour_document($data_first), 'data_second' => hour_document($data_second), 'data_three' => date_document($data_three)]); } } diff --git a/app/article/common.php b/app/article/common.php new file mode 100644 index 0000000..0a1351e --- /dev/null +++ b/app/article/common.php @@ -0,0 +1,18 @@ +order('id desc')->select()->toArray(); + return $cate; +} \ No newline at end of file diff --git a/app/home/controller/Article.php b/app/article/controller/Index.php similarity index 67% rename from app/home/controller/Article.php rename to app/article/controller/Index.php index 305fcf5..98f7e71 100644 --- a/app/home/controller/Article.php +++ b/app/article/controller/Index.php @@ -7,99 +7,17 @@ declare (strict_types = 1); -namespace app\home\controller; +namespace app\article\controller; use app\base\BaseController; -use app\home\model\Article as ArticleList; -use app\home\model\ArticleCate; -use app\home\validate\ArticleCateCheck; -use app\home\validate\ArticleCheck; +use app\article\model\Article as ArticleList; +use app\article\validate\ArticleCheck; use think\exception\ValidateException; use think\facade\Db; use think\facade\View; -class Article extends BaseController +class Index extends BaseController { - public function cate() - { - if (request()->isAjax()) { - $cate = Db::name('ArticleCate')->order('create_time asc')->select(); - return to_assign(0, '', $cate); - } else { - return view(); - } - } - - //文章分类添加&编辑 - public function cate_add() - { - $param = get_params(); - if (request()->isAjax()) { - if (!empty($param['id']) && $param['id'] > 0) { - try { - validate(ArticleCateCheck::class)->scene('edit')->check($param); - } catch (ValidateException $e) { - // 验证失败 输出错误信息 - return to_assign(1, $e->getError()); - } - $note_array = get_article_son($param['id']); - if (in_array($param['pid'], $note_array)) { - return to_assign(1, '父级分类不能是该分类本身或其子分类'); - } else { - $param['update_time'] = time(); - $res = ArticleCate::strict(false)->field(true)->update($param); - if($res){ - add_log('edit', $param['id'], $param); - return to_assign(); - } - } - } else { - try { - validate(ArticleCateCheck::class)->scene('add')->check($param); - } catch (ValidateException $e) { - // 验证失败 输出错误信息 - return to_assign(1, $e->getError()); - } - $param['create_time'] = time(); - $insertId = ArticleCate::strict(false)->field(true)->insertGetId($param); - if ($insertId) { - add_log('add', $insertId, $param); - } - return to_assign(); - } - } else { - $id = isset($param['id']) ? $param['id'] : 0; - $pid = isset($param['pid']) ? $param['pid'] : 0; - if ($id > 0) { - $detail = Db::name('ArticleCate')->where(['id' => $id])->find(); - View::assign('detail', $detail); - } - View::assign('id', $id); - View::assign('pid', $pid); - return view(); - } - } - - //删除文章分类 - public function cate_delete() - { - $id = get_params("id"); - $cate_count = Db::name('ArticleCate')->where(["pid" => $id])->count(); - if ($cate_count > 0) { - return to_assign(1, "该分类下还有子分类,无法删除"); - } - $content_count = Db::name('Article')->where(["article_cate_id" => $id])->count(); - if ($content_count > 0) { - return to_assign(1, "该分类下还有文章,无法删除"); - } - if (Db::name('ArticleCate')->delete($id) !== false) { - add_log('delete', $id); - return to_assign(0, "删除分类成功"); - } else { - return to_assign(1, "删除失败"); - } - } - public function index() { if (request()->isAjax()) { @@ -113,7 +31,7 @@ class Article extends BaseController } $where[] = ['a.status', '>=', 0]; $where[] = ['a.is_share', '=', 1]; - $rows = empty($param['limit']) ? get_config(app . page_size) : $param['limit']; + $rows = empty($param['limit']) ? get_config('app . page_size') : $param['limit']; $content = ArticleList::where($where) ->field('a.*,c.id as cate_id,a.id as id,c.title as cate_title,a.title as title,d.title as department,u.name as user') ->alias('a') @@ -141,7 +59,7 @@ class Article extends BaseController } $where[] = ['a.status', '>=', 0]; $where[] = ['a.uid', '=', $this->uid]; - $rows = empty($param['limit']) ? get_config(app . page_size) : $param['limit']; + $rows = empty($param['limit']) ? get_config('app . page_size') : $param['limit']; $content = ArticleList::where($where) ->field('a.*,c.id as cate_id,a.id as id,c.title as cate_title,a.title as title') ->alias('a') diff --git a/app/article/event.php b/app/article/event.php new file mode 100644 index 0000000..4eff890 --- /dev/null +++ b/app/article/event.php @@ -0,0 +1,5 @@ +where(['id' => $id])->find(); + $article = Db::name('Article')->where(['id' => $id])->find(); if (empty($article)) { - return $this->error('文章不存在'); + return $this->error('文章知识不存在'); } - $keywrod_array = \think\facade\Db::name('ArticleKeywords') + $keywrod_array = Db::name('ArticleKeywords') ->field('i.aid,i.keywords_id,k.title') ->alias('i') ->join('Keywords k', 'k.id = i.keywords_id', 'LEFT') @@ -29,8 +30,8 @@ class Article extends Model $article['keyword_ids'] = implode(",", array_column($keywrod_array, 'keywords_id')); $article['keyword_names'] = implode(',', array_column($keywrod_array, 'title')); - $article['user'] = \think\facade\Db::name('Admin')->where(['id' => $article['uid']])->value('name'); - $article['department'] = \think\facade\Db::name('Department')->where(['id' => $article['did']])->value('title'); + $article['user'] = Db::name('Admin')->where(['id' => $article['uid']])->value('name'); + $article['department'] = Db::name('Department')->where(['id' => $article['did']])->value('title'); return $article; } @@ -49,7 +50,7 @@ class Article extends Model 'create_time' => $time, ]; } - $res = \think\facade\Db::name('ArticleKeywords')->strict(false)->field(true)->insertAll($insert); + $res = Db::name('ArticleKeywords')->strict(false)->field(true)->insertAll($insert); return $res; } } diff --git a/app/home/validate/ArticleCheck.php b/app/article/validate/ArticleCheck.php similarity index 96% rename from app/home/validate/ArticleCheck.php rename to app/article/validate/ArticleCheck.php index f0cb89b..676929e 100644 --- a/app/home/validate/ArticleCheck.php +++ b/app/article/validate/ArticleCheck.php @@ -5,7 +5,7 @@ * @link https://www.gougucms.com */ -namespace app\home\validate; +namespace app\article\validate; use think\Validate; diff --git a/app/home/view/article/add.html b/app/article/view/index/add.html similarity index 87% rename from app/home/view/article/add.html rename to app/article/view/index/add.html index 513dc28..7eecb19 100644 --- a/app/home/view/article/add.html +++ b/app/article/view/index/add.html @@ -1,7 +1,7 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"} -
+

新增知识文章

@@ -12,7 +12,7 @@
@@ -75,7 +75,7 @@
-
+
@@ -93,7 +93,7 @@ function init(layui) { , upload = layui.upload; var tags = new tagspicker({ - 'url': "/home/api/get_keyword_cate", + 'url': "/api/index/get_keyword_cate", 'target': 'keyword_name', 'tag_ids': 'keyword_id', 'tag_tags': 'keyword_name', @@ -104,7 +104,7 @@ function init(layui) { //封面上传 var uploadInst = upload.render({ elem: '#test1' - , url: "/home/api/upload" + , url: "/api/index/upload" , done: function (res) { //如果上传失败 if (res.code == 1) { @@ -119,16 +119,16 @@ function init(layui) { //监听提交 form.on('submit(webform)', function (data) { $.ajax({ - url: "/home/article/add", + url: "/article/index/add", type: 'post', data: data.field, success: function (e) { + layer.msg(e.msg); if (e.code == 0) { - layer.confirm('保存成功,返回列表页吗?', { icon: 3, title: '提示' }, function (index) { - parent.location.reload(); - }); - } else { - layer.msg(e.msg); + parent.tableIns.reload(); + setTimeout(function(){ + parent.layui.rightpage.close(); + },1000); } } }) @@ -138,7 +138,7 @@ function init(layui) { } -{include file="common/layui" base="base" extend="['tagpicker']" callback="init" /} -{include file="common/ueditor" id="container" name="content" width="750" height="500" toolbar="[]" /} +{include file="../../base/view/common/layui" base="base" extend="['tagpicker']" callback="init" /} +{include file="../../base/view/common/ueditor" id="container" name="content" width="750" height="360" toolbar="[]" /} {/block} \ No newline at end of file diff --git a/app/home/view/article/edit.html b/app/article/view/index/edit.html similarity index 89% rename from app/home/view/article/edit.html rename to app/article/view/index/edit.html index edc3a3c..5eb8c8e 100644 --- a/app/home/view/article/edit.html +++ b/app/article/view/index/edit.html @@ -1,7 +1,7 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"} - +

编辑知识文章

@@ -12,7 +12,7 @@
@@ -75,7 +75,7 @@
-
+
@@ -105,7 +105,7 @@ //封面上传 var uploadInst = upload.render({ elem: '#test1', - url: "/home/api/upload", + url: "/api/index/upload", done: function (res) { //如果上传失败 if (res.code == 1) { @@ -120,16 +120,16 @@ //监听提交 form.on('submit(webform)', function (data) { $.ajax({ - url: "/home/article/add", + url: "/article/index/add", type: 'post', data: data.field, success: function (e) { + layer.msg(e.msg); if (e.code == 0) { - layer.confirm('保存成功,返回列表页吗?', { icon: 3, title: '提示' }, function (index) { - parent.location.reload(); - }); - } else { - layer.msg(e.msg); + parent.tableIns.reload(); + setTimeout(function(){ + parent.layui.rightpage.close(); + },1000); } } }) @@ -139,7 +139,7 @@ } -{include file="common/layui" base='base' extend="['tagpicker']" callback="init" /} -{include file="common/ueditor" id="container" name="content" width="750" height="500" toolbar="[]" /} +{include file="../../base/view/common/layui" base='base' extend="['tagpicker']" callback="init" /} +{include file="../../base/view/common/ueditor" id="container" name="content" width="750" height="360" toolbar="[]" /} {/block} \ No newline at end of file diff --git a/app/home/view/article/index.html b/app/article/view/index/index.html similarity index 88% rename from app/home/view/article/index.html rename to app/article/view/index/index.html index 2063ae4..ac72d97 100644 --- a/app/home/view/article/index.html +++ b/app/article/view/index/index.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"}
@@ -6,7 +6,7 @@
@@ -38,7 +38,7 @@ elem: '#test', title: '文章列表', toolbar: '#toolbarDemo', - url: "/home/article/index", //数据接口 + url: "/article/index/index", //数据接口 page: true, //开启分页 limit: 20, cols: [ @@ -91,7 +91,7 @@ table.on('tool(test)', function(obj) { var data = obj.data; if(obj.event === 'view'){ - rightpage.open('/home/article/view?id='+data.id); + rightpage.open('/article/index/view?id='+data.id,'900px'); return; } }); @@ -111,6 +111,6 @@ }); } -{include file="common/layui" base="base" extend="['rightpage']" callback="init" /} +{include file="../../base/view/common/layui" base="base" extend="['rightpage']" callback="init" /} {/block} diff --git a/app/home/view/article/list.html b/app/article/view/index/list.html similarity index 88% rename from app/home/view/article/list.html rename to app/article/view/index/list.html index 4588f36..490fb7f 100644 --- a/app/home/view/article/list.html +++ b/app/article/view/index/list.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"}
@@ -6,7 +6,7 @@
@@ -39,17 +39,18 @@ {block name="script"} -{include file="common/layui" base="base" extend="['rightpage']" callback="init" /} +{include file="../../base/view/common/layui" base="base" extend="['rightpage']" callback="init" /} {/block} diff --git a/app/home/view/article/view.html b/app/article/view/index/view.html similarity index 93% rename from app/home/view/article/view.html rename to app/article/view/index/view.html index 87a02a0..d51f4b0 100644 --- a/app/home/view/article/view.html +++ b/app/article/view/index/view.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="style"} @@ -19,7 +19,7 @@ {$detail.title} 文章分类 - {volist name=":set_recursion(get_article_cate())" id="v"} + {volist name=":set_recursion(article_cate())" id="v"} {eq name="$detail.article_cate_id" value="$v.id" }{$v.title}{/eq} {/volist} @@ -79,6 +79,6 @@ function init(layui) { } -{include file="common/layui" base='base' extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base='base' extend="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/app/base/BaseController.php b/app/base/BaseController.php index a1e2514..09abd31 100644 --- a/app/base/BaseController.php +++ b/app/base/BaseController.php @@ -91,7 +91,7 @@ abstract class BaseController if ($this->controller !== 'index' && $this->controller !== 'api') { $reg_pwd = Db::name('Admin')->where(['id' => $this->uid])->value('reg_pwd'); if($reg_pwd!==''){ - redirect('/home/api/edit_password.html')->send(); + redirect('/api/index/edit_password.html')->send(); exit; } if (!$this->checkAuth()) { diff --git a/app/home/view/common/base.html b/app/base/view/common/base.html similarity index 100% rename from app/home/view/common/base.html rename to app/base/view/common/base.html diff --git a/app/home/view/common/layui.html b/app/base/view/common/layui.html similarity index 85% rename from app/home/view/common/layui.html rename to app/base/view/common/layui.html index 17b198f..8ca64e8 100644 --- a/app/home/view/common/layui.html +++ b/app/base/view/common/layui.html @@ -1,6 +1,6 @@ -{include file="common/layui" base='base' extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base='base' extend="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/app/common.php b/app/common.php index 9aae46f..9bcd068 100644 --- a/app/common.php +++ b/app/common.php @@ -7,6 +7,49 @@ // 应用公共文件,内置主要的数据处理方法 use think\facade\Config; use think\facade\Request; +use think\facade\Cache; +use think\facade\Db; + +//设置缓存 +function set_cache($key, $value, $date = 86400) +{ + Cache::set($key, $value, $date); +} + +//读取缓存 +function get_cache($key) +{ + return Cache::get($key); +} + +//清空缓存 +function clear_cache($key) +{ + Cache::clear($key); +} + +//读取系统配置 +function get_system_config($name, $key = '') +{ + $config = []; + if (get_cache('system_config' . $name)) { + $config = get_cache('system_config' . $name); + } else { + $conf = Db::name('config')->where('name', $name)->find(); + if ($conf['content']) { + $config = unserialize($conf['content']); + } + set_cache('system_config' . $name, $config); + } + if ($key == '') { + return $config; + } else { + if ($config[$key]) { + return $config[$key]; + } + } +} + //读取文件配置 function get_config($key) @@ -67,6 +110,320 @@ function set_password($pwd, $salt) { return md5(md5($pwd . $salt) . $salt); } + +//获取指定管理员的信息 +function get_admin($id) +{ + $admin = Db::name('Admin') + ->alias('a') + ->field('a.*,d.title as department,p.title as position') + ->leftJoin ('Department d ','d.id= a.did') + ->leftJoin ('Position p ','p.id= a.position_id') + ->where(['a.id' => $id]) + ->cache(true,60) + ->find(); + $admin['last_login_time'] = empty($admin['last_login_time']) ? '-' : date('Y-m-d H:i', $admin['last_login_time']); + return $admin; +} + +//获取当前登录用户的信息 +function get_login_admin($key = '') +{ + $session_admin = get_config('app.session_admin'); + if (\think\facade\Session::has($session_admin)) { + $gougu_admin = \think\facade\Session::get($session_admin); + $admin = get_admin($gougu_admin['id']); + if (!empty($key)) { + if (isset($admin[$key])) { + return $admin[$key]; + } else { + return ''; + } + } else { + return $admin; + } + } else { + return ''; + } +} + +/** + * 节点权限判断 + * @return bool + */ +function check_auth($rule, $uid) +{ + $auth_list = Cache::get('RulesSrc' . $uid); + if (!in_array($rule, $auth_list)) { + return false; + } else { + return true; + } +} + +//读取部门列表 +function get_department() +{ + $department = Db::name('Department')->where(['status' => 1])->select()->toArray(); + return $department; +} + +//获取某部门的子部门id.$is_self时候包含自己 +function get_department_son($did = 0, $is_self = 1) +{ + $department = get_department(); + $department_list = get_data_node($department, $did); + $department_array = array_column($department_list, 'id'); + if ($is_self == 1) { + //包括自己在内 + $department_array[] = $did; + } + return $department_array; +} + +//读取员工所在部门的负责人 +function get_department_leader($uid=0,$pid=0) +{ + $did = get_admin($uid)['did']; + if($pid==0){ + $leader = Db::name('Department')->where(['id' => $did])->value('leader_id'); + } + else{ + $pdid = Db::name('Department')->where(['id' => $did])->value('pid'); + if($pdid == 0){ + $leader = 0; + } + else{ + $leader = Db::name('Department')->where(['id' => $pdid])->value('leader_id'); + } + } + return $leader; +} + +//读取职位 +function get_position() +{ + $position = Db::name('Position')->where(['status' => 1])->select()->toArray(); + return $position; +} + +//根据流程模块读取某部门某模块的审核流程 +function get_flows($type=1,$department=0) +{ + $map1 = []; + $map2 = []; + $map1[] = ['status', '=', 1]; + $map1[] = ['flow_cate', '=', $type]; + $map1[] = ['department_ids', '=', '']; + + $map2[] = ['status', '=', 1]; + $map2[] = ['flow_cate', '=', $type]; + $map2[] = ['', 'exp', Db::raw("FIND_IN_SET('{$department}',department_ids)")]; + + $list = Db::name('Flow') + ->field('id,name,check_type') + ->whereOr([$map1,$map2]) + ->order('id desc')->select()->toArray(); + return $list; +} + +//根据流程所属模块读取某部门某模块的审核流程 +function get_type_flows($module=6,$department=0) +{ + $map1 = []; + $map2 = []; + $map1[] = ['status', '=', 1]; + $map1[] = ['type', '=', $module]; + $map1[] = ['department_ids', '=', '']; + + $map2[] = ['status', '=', 1]; + $map2[] = ['type', '=', $module]; + $map2[] = ['', 'exp', Db::raw("FIND_IN_SET('{$department}',department_ids)")]; + + $list = Db::name('Flow') + ->field('id,name,check_type') + ->whereOr([$map1,$map2]) + ->order('id desc')->select()->toArray(); + return $list; +} + +/** + * 根据附件表的id返回url地址 + * @param [type] $id [description] + */ +function get_file($id) +{ + if ($id) { + $geturl = Db::name("file")->where(['id' => $id])->find(); + if ($geturl['status'] == 1) { + //审核通过 + //获取签名的URL + $url = $geturl['filepath']; + return $url; + } elseif ($geturl['status'] == 0) { + //待审核 + return '/static/home/images/none_pic.jpg'; + } else { + //不通过 + return '/static/home/images/none_pic.jpg'; + } + } + return false; +} + +/** + * 员工操作日志 + * @param string $type 操作类型 login add edit view delete + * @param int $param_id 操作类型 + * @param array $param 提交的参数 + */ +function add_log($type, $param_id = '', $param = []) +{ + $action = '未知操作'; + $type_action = get_config('log.type_action'); + if($type_action[$type]){ + $action = $type_action[$type]; + } + if ($type == 'login') { + $login_admin = Db::name('Admin')->where(array('id' => $param_id))->find(); + } else { + $session_admin = get_config('app.session_admin'); + $login_admin = \think\facade\Session::get($session_admin); + } + $data = []; + $data['uid'] = $login_admin['id']; + $data['name'] = $login_admin['name']; + $data['type'] = $type; + $data['action'] = $action; + $data['param_id'] = $param_id; + $data['param'] = json_encode($param); + $data['module'] = strtolower(app('http')->getName()); + $data['controller'] = strtolower(app('request')->controller()); + $data['function'] = strtolower(app('request')->action()); + $parameter = $data['module'] . '/' . $data['controller'] . '/' . $data['function']; + $rule_menu = Db::name('AdminRule')->where(array('src' => $parameter))->find(); + if($rule_menu){ + $data['title'] = $rule_menu['title']; + $data['subject'] = $rule_menu['name']; + } + else{ + $data['title'] = ''; + $data['subject'] ='系统'; + } + $content = $login_admin['name'] . '在' . date('Y-m-d H:i:s') . $data['action'] . '了' . $data['subject']; + $data['content'] = $content; + $data['ip'] = app('request')->ip(); + $data['create_time'] = time(); + Db::name('AdminLog')->strict(false)->field(true)->insert($data); +} + +/** + * 发送站内信 + * @param $user_id 接收人user_id + * @param $data 操作内容 + * @param $sysMessage 1为系统消息 + * @param $template 消息模板 + * @return + */ +function sendMessage($user_id, $template, $data=[]) +{ + $content = get_config('message.template')[$template]['template']; + foreach ($data as $key => $val) { + $content = str_replace('{' . $key . '}', $val, $content); + } + if(isSet($data['from_uid'])){ + $content = str_replace('{from_user}', get_admin($data['from_uid'])['name'], $content); + } + $content = str_replace('{date}', date('Y-m-d'), $content); + + if (!$user_id) return false; + if (!$content) return false; + if (!is_array($user_id)) { + $users[] = $user_id; + } else { + $users = $user_id; + } + $users = array_unique(array_filter($users)); + //组合要发的消息 + $send_data = []; + foreach ($users as $key => $value) { + $send_data[] = array( + 'to_uid' => $value,//接收人 + 'action_id' => $data['action_id'], + 'title' => $data['title'], + 'content' => $content, + 'template' => $template, + 'module_name' => strtolower(app('http')->getName()), + 'controller_name' => strtolower(app('request')->controller()), + 'action_name' => strtolower(app('request')->action()), + 'send_time' => time(), + 'create_time' => time() + ); + } + $res = Db::name('Message')->strict(false)->field(true)->insertAll($send_data); + return $res; +} + +/** + * 邮件发送 + * @param $to 接收人 + * @param string $subject 邮件标题 + * @param string $content 邮件内容(html模板渲染后的内容) + * @throws Exception + * @throws phpmailerException + */ +function send_email($to, $subject = '', $content = '') +{ + $mail = new PHPMailer\PHPMailer\PHPMailer(); + $email_config = Db::name('config')->where('name', 'email')->find(); + $config = unserialize($email_config['content']); + + $mail->CharSet = 'UTF-8'; //设定邮件编码,默认ISO-8859-1,如果发中文此项必须设置,否则乱码 + $mail->isSMTP(); + $mail->SMTPDebug = 0; + + //调试输出格式 + //$mail->Debugoutput = 'html'; + //smtp服务器 + $mail->Host = $config['smtp']; + //端口 - likely to be 25, 465 or 587 + $mail->Port = $config['smtp_port']; + if ($mail->Port == '465') { + $mail->SMTPSecure = 'ssl'; // 使用安全协议 + } + //Whether to use SMTP authentication + $mail->SMTPAuth = true; + //发送邮箱 + $mail->Username = $config['smtp_user']; + //密码 + $mail->Password = $config['smtp_pwd']; + //Set who the message is to be sent from + $mail->setFrom($config['email'], $config['from']); + //回复地址 + //$mail->addReplyTo('replyto@example.com', 'First Last'); + //接收邮件方 + if (is_array($to)) { + foreach ($to as $v) { + $mail->addAddress($v); + } + } else { + $mail->addAddress($to); + } + + $mail->isHTML(true); // send as HTML + //标题 + $mail->Subject = $subject; + //HTML内容转换 + $mail->msgHTML($content); + $status = $mail->send(); + if ($status) { + return true; + } else { + // echo "Mailer Error: ".$mail->ErrorInfo;// 输出错误信息 + // die; + return false; + } +} /** * 截取文章摘要 * @return bool @@ -87,6 +444,17 @@ function get_desc_content($content, $count) } return $res; } + +/** + * PHP去除空格 + * @param string $str 字符串 + * @return string 字符串 + */ +function trim_space($str=''){ + $str = mb_ereg_replace('^( | )+', '', $str); + $str = mb_ereg_replace('( | )+$', '', $str); + return mb_ereg_replace('  ', "\n  ", $str); +} /** * PHP格式化字节大小 * @param number $size 字节数 @@ -251,6 +619,29 @@ function get_tree($data, $pId ,$open=0,$deep=0) return array_values($tree); } +//递归返回树形菜单数据 +function get_select_tree($data, $pId ,$deep=0, $selected=[]) +{ + $tree = []; + foreach($data as $k => $v) + { + $vv=[]; + $vv['name']=$v['title']; + $vv['value']=$v['id']; + $vv['selected']=''; + if(in_array($v['id'],$selected)){ + $vv['selected'] = 'selected'; + } + if($v['pid'] == $pId){ + //父亲找到儿子 + $deep++; + $vv['children'] = get_select_tree($data, $v['id'],$deep,$selected); + $tree[] = $vv; + } + } + return array_values($tree); +} + /** * 根据id递归返回子数据 * @param $data 数据 @@ -684,152 +1075,180 @@ function monthList($start, $end) /** * 等于(时间段)数据处理 * - * @param $data + * @param $type * @return array * @since 2021-06-11 * @author fanqi */ -function advancedDate($data) +function advancedDate($type) { // 本年度 - if ($data['value'][0] == 'year') { + if ($type == 'year') { $arrTime = DataTime::year(); - $data['value'][0] = date('Y-m-d 00:00:00', $arrTime[0]); - $data['value'][1] = date('Y-m-d 23:59:59', $arrTime[1]); + $start_time = date('Y-m-d 00:00:00', $arrTime[0]); + $end_time = date('Y-m-d 23:59:59', $arrTime[1]); } // 上一年度 - if ($data['value'][0] == 'lastYear') { - $data['value'][0] = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '-1 year')); - $data['value'][1] = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '-1 year')); + if ($type == 'lastYear') { + $start_time = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '-1 year')); + $end_time = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '-1 year')); } // 下一年度 - if ($data['value'][0] == 'nextYear') { - $data['value'][0] = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '+1 year')); - $data['value'][1] = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '+1 year')); + if ($type == 'nextYear') { + $start_time = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '+1 year')); + $end_time = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '+1 year')); } // 上半年 - if ($data['value'][0] == 'firstHalfYear') { - $data['value'][0] = date('Y-01-01 00:00:00'); - $data['value'][1] = date('Y-06-30 23:59:59'); + if ($type == 'firstHalfYear') { + $start_time = date('Y-01-01 00:00:00'); + $end_time = date('Y-06-30 23:59:59'); } // 下半年 - if ($data['value'][0] == 'nextHalfYear') { - $data['value'][0] = date('Y-07-01 00:00:00'); - $data['value'][1] = date('Y-12-31 23:59:59'); + if ($type == 'nextHalfYear') { + $start_time = date('Y-07-01 00:00:00'); + $end_time = date('Y-12-31 23:59:59'); } // 本季度 - if ($data['value'][0] == 'quarter') { + if ($type == 'quarter') { $season = ceil((date('n')) / 3); - $data['value'][0] = date('Y-m-d H:i:s', mktime(0, 0, 0, $season * 3 - 3 + 1, 1, date('Y'))); - $data['value'][1] = date('Y-m-d H:i:s', mktime(23, 59, 59, $season * 3, date('t', mktime(0, 0, 0, $season * 3, 1, date("Y"))), date('Y'))); + $start_time = date('Y-m-d H:i:s', mktime(0, 0, 0, $season * 3 - 3 + 1, 1, date('Y'))); + $end_time = date('Y-m-d H:i:s', mktime(23, 59, 59, $season * 3, date('t', mktime(0, 0, 0, $season * 3, 1, date("Y"))), date('Y'))); } // 上一季度 - if ($data['value'][0] == 'lastQuarter') { + if ($type == 'lastQuarter') { $season = ceil((date('n')) / 3) - 1; - $data['value'][0] = date('Y-m-d H:i:s', mktime(0, 0, 0, $season * 3 - 3 + 1, 1, date('Y'))); - $data['value'][1] = date('Y-m-d H:i:s', mktime(23, 59, 59, $season * 3, date('t', mktime(0, 0, 0, $season * 3, 1, date("Y"))), date('Y'))); + $start_time = date('Y-m-d H:i:s', mktime(0, 0, 0, $season * 3 - 3 + 1, 1, date('Y'))); + $end_time = date('Y-m-d H:i:s', mktime(23, 59, 59, $season * 3, date('t', mktime(0, 0, 0, $season * 3, 1, date("Y"))), date('Y'))); } // 下一季度 - if ($data['value'][0] == 'nextQuarter') { + if ($type == 'nextQuarter') { $season = ceil((date('n')) / 3); - $data['value'][0] = date('Y-m-d H:i:s', mktime(0, 0, 0, $season * 3 + 1, 1, date('Y'))); - $data['value'][1] = date('Y-m-d H:i:s', mktime(23, 59, 59, $season * 3 + 3, date('t', mktime(0, 0, 0, $season * 3, 1, date("Y"))), date('Y'))); + $start_time = date('Y-m-d H:i:s', mktime(0, 0, 0, $season * 3 + 1, 1, date('Y'))); + $end_time = date('Y-m-d H:i:s', mktime(23, 59, 59, $season * 3 + 3, date('t', mktime(0, 0, 0, $season * 3, 1, date("Y"))), date('Y'))); } // 本月 - if ($data['value'][0] == 'month') { - $data['value'][0] = date('Y-m-01 00:00:00'); - $data['value'][1] = date('Y-m-31 23:59:59'); + if ($type == 'month') { + $start_time = date('Y-m-01 00:00:00'); + $end_time = date('Y-m-31 23:59:59'); } // 上月 - if ($data['value'][0] == 'lastMonth') { - $data['value'][0] = date('Y-m-01 00:00:00', strtotime(date('Y-m-d') . '-1 month')); - $data['value'][1] = date('Y-m-31 23:59:59', strtotime(date('Y-m-d') . '-1 month')); + if ($type == 'lastMonth') { + $start_time = date('Y-m-01 00:00:00', strtotime(date('Y-m-d') . '-1 month')); + $end_time = date('Y-m-31 23:59:59', strtotime(date('Y-m-d') . '-1 month')); } // 下月 - if ($data['value'][0] == 'nextMonth') { - $data['value'][0] = date('Y-m-01 00:00:00', strtotime(date('Y-m-d') . '+1 month')); - $data['value'][1] = date('Y-m-31 23:59:59', strtotime(date('Y-m-d') . '+1 month')); + if ($type == 'nextMonth') { + $start_time = date('Y-m-01 00:00:00', strtotime(date('Y-m-d') . '+1 month')); + $end_time = date('Y-m-31 23:59:59', strtotime(date('Y-m-d') . '+1 month')); } // 本周 - if ($data['value'][0] == 'week') { - $data['value'][0] = date('Y-m-d 00:00:00', mktime(0, 0, 0, date('m'), date('d') - date('w') + 1, date('Y'))); - $data['value'][1] = date('Y-m-d 23:59:59', mktime(23, 59, 59, date('m'), date('d') - date('w') + 7, date('Y'))); + if ($type == 'week') { + $start_time = date('Y-m-d 00:00:00', mktime(0, 0, 0, date('m'), date('d') - date('w') + 1, date('Y'))); + $end_time = date('Y-m-d 23:59:59', mktime(23, 59, 59, date('m'), date('d') - date('w') + 7, date('Y'))); } // 上周 - if ($data['value'][0] == 'lastWeek') { + if ($type == 'lastWeek') { $date = date("Y-m-d"); $w = date("w", strtotime($date)); $d = $w ? $w - 1 : 6; $start = date("Y-m-d", strtotime($date . " - " . $d . " days")); - $data['value'][0] = date('Y-m-d', strtotime($start . " - 7 days")); - $data['value'][1] = date('Y-m-d', strtotime($start . " - 1 days")); + $start_time = date('Y-m-d', strtotime($start . " - 7 days")); + $end_time = date('Y-m-d', strtotime($start . " - 1 days")); } // 下周 - if ($data['value'][0] == 'nextWeek') { + if ($type == 'nextWeek') { $date = date("Y-m-d"); $w = date("w", strtotime($date)); $d = $w ? $w - 1 : 6; $start = date("Y-m-d", strtotime($date . " - " . $d . " days")); - $data['value'][0] = date('Y-m-d', strtotime($start . " + 7 days")); - $data['value'][1] = date('Y-m-d', strtotime($start . " + 13 days")); + $start_time = date('Y-m-d', strtotime($start . " + 7 days")); + $end_time = date('Y-m-d', strtotime($start . " + 13 days")); } // 今天 - if ($data['value'][0] == 'today') { - $data['value'][0] = date('Y-m-d 00:00:00'); - $data['value'][1] = date('Y-m-d 23:59:59'); + if ($type == 'today') { + $start_time = date('Y-m-d 00:00:00'); + $end_time = date('Y-m-d 23:59:59'); } // 昨天 - if ($data['value'][0] == 'yesterday') { - $data['value'][0] = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '-1 day')); - $data['value'][1] = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '-1 day')); + if ($type == 'yesterday') { + $start_time = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '-1 day')); + $end_time = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '-1 day')); } // 明天 - if ($data['value'][0] == 'tomorrow') { - $data['value'][0] = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '+1 day')); - $data['value'][1] = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '+1 day')); + if ($type == 'tomorrow') { + $start_time = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '+1 day')); + $end_time = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '+1 day')); + } + + // 过去3天 + if ($type == 'previous3day') { + $start_time = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '-3 day')); + $end_time = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '-1 day')); + } + + // 过去5天 + if ($type == 'previous5day') { + $start_time = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '-5 day')); + $end_time = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '-1 day')); } // 过去7天 - if ($data['value'][0] == 'previous7day') { - $data['value'][0] = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '-7 day')); - $data['value'][1] = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '-1 day')); + if ($type == 'previous7day') { + $start_time = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '-7 day')); + $end_time = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '-1 day')); + } + // 过去10天 + if ($type == 'previous10day') { + $start_time = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '-10 day')); + $end_time = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '-1 day')); } - // 过去30天 - if ($data['value'][0] == 'previous30day') { - $data['value'][0] = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '-30 day')); - $data['value'][1] = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '-1 day')); + if ($type == 'previous30day') { + $start_time = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '-30 day')); + $end_time = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '-1 day')); + } + // 未来3天 + if ($type == 'future3day') { + $start_time = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '+1 day')); + $end_time = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '+3 day')); + } + // 未来5天 + if ($type == 'future5day') { + $start_time = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '+1 day')); + $end_time = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '+5 day')); } - // 未来7天 - if ($data['value'][0] == 'future7day') { - $data['value'][0] = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '+1 day')); - $data['value'][1] = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '+7 day')); + if ($type == 'future7day') { + $start_time = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '+1 day')); + $end_time = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '+7 day')); + } + // 未来10天 + if ($type == 'future10day') { + $start_time = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '+1 day')); + $end_time = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '+10 day')); } - // 未来30天 - if ($data['value'][0] == 'future30day') { - $data['value'][0] = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '+1 day')); - $data['value'][1] = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '+30 day')); + if ($type == 'future30day') { + $start_time = date('Y-m-d 00:00:00', strtotime(date('Y-m-d') . '+1 day')); + $end_time = date('Y-m-d 23:59:59', strtotime(date('Y-m-d') . '+30 day')); } - - return $data; + return [$start_time,$end_time]; } /** diff --git a/app/finance/common.php b/app/finance/common.php new file mode 100644 index 0000000..22b1c80 --- /dev/null +++ b/app/finance/common.php @@ -0,0 +1,24 @@ +where(['status' => 1])->order('id desc')->select()->toArray(); + return $subject; +} + +//读取报销类型 +function finance_expense_cate() +{ + $cate = Db::name('ExpenseCate')->where(['status' => 1])->order('id desc')->select()->toArray(); + return $cate; +} \ No newline at end of file diff --git a/app/finance/controller/Expense.php b/app/finance/controller/Expense.php new file mode 100644 index 0000000..5fe208e --- /dev/null +++ b/app/finance/controller/Expense.php @@ -0,0 +1,636 @@ +order('id desc') + ->paginate($rows, false, ['query' => $param]) + ->each(function ($item, $key) { + $item->income_month = empty($item->income_month) ? '-' : date('Y-m', $item->income_month); + $item->expense_time = empty($item->expense_time) ? '-' : date('Y-m-d', $item->expense_time); + $item->admin_name = Db::name('Admin')->where(['id' => $item->admin_id])->value('name'); + $item->department = Db::name('Department')->where(['id' => $item->admin_id])->value('title'); + $item->pay_name = Db::name('Admin')->where(['id' => $item->pay_admin_id])->value('name'); + $item->pay_time = empty($item->pay_time) ? '-' : date('Y-m-d H:i', $item->pay_time); + $item->amount = Db::name('ExpenseInterfix')->where(['exid' => $item->id])->sum('amount'); + $item['check_user'] = '-'; + if($item['check_status']<2 && !empty($item['check_admin_ids'])){ + $check_user = Db::name('Admin')->where('id','in',$item['check_admin_ids'])->column('name'); + $item['check_user'] = implode(',',$check_user); + } + }); + } + else{ + $expense = ExpenseList::where($where) + ->order('id desc') + ->paginate($rows, false, ['query' => $param]) + ->each(function ($item, $key) { + $item->income_month = empty($item->income_month) ? '-' : date('Y-m', $item->income_month); + $item->expense_time = empty($item->expense_time) ? '-' : date('Y-m-d', $item->expense_time); + $item->admin_name = Db::name('Admin')->where(['id' => $item->admin_id])->value('name'); + $item->department = Db::name('Department')->where(['id' => $item->admin_id])->value('title'); + $item->pay_name = Db::name('Admin')->where(['id' => $item->pay_admin_id])->value('name'); + $item->pay_time = empty($item->pay_time) ? '-' : date('Y-m-d H:i', $item->pay_time); + $item->amount = Db::name('ExpenseInterfix')->where(['exid' => $item->id])->sum('amount'); + $item['check_user'] = '-'; + if($item['check_status']<2 && !empty($item['check_admin_ids'])){ + $check_user = Db::name('Admin')->where('id','in',$item['check_admin_ids'])->column('name'); + $item['check_user'] = implode(',',$check_user); + } + }); + } + return $expense; + } + + public function detail($id = 0) + { + $expense = Db::name('Expense')->where(['id' => $id])->find(); + if ($expense) { + $expense['income_month'] = empty($expense['income_month']) ? '-' : date('Y-m', $expense['income_month']); + $expense['expense_time'] = empty($expense['expense_time']) ? '-' : date('Y-m-d', $expense['expense_time']); + $expense['create_user'] = Db::name('Admin')->where(['id' => $expense['admin_id']])->value('name'); + $expense['department'] = Db::name('Department')->where(['id' => $expense['did']])->value('title'); + $expense['amount'] = Db::name('ExpenseInterfix')->where(['exid' => $expense['id']])->sum('amount'); + $expense['pay_admin'] = Db::name('Admin')->where(['id' => $expense['pay_admin_id']])->value('name'); + if ($expense['pay_time'] > 0) { + $expense['pay_time'] = date('Y-m-d H:i:s', $expense['pay_time']); + } + else{ + $expense['pay_time'] = '-'; + } + $expense['list'] = Db::name('ExpenseInterfix') + ->field('a.*,c.title as cate_title') + ->alias('a') + ->join('ExpenseCate c', 'a.cate_id = c.id','LEFT') + ->where(['a.exid' => $expense['id']]) + ->select(); + } + return $expense; + } + + public function index() + { + if (request()->isAjax()) { + $param = get_params(); + $where = []; + //按时间检索 + $start_time = !empty($param['start_time']) ? strtotime(urldecode($param['start_time'])) : 0; + $end_time = !empty($param['end_time']) ? strtotime(urldecode($param['end_time'])) : 0; + if ($start_time > 0 && $end_time > 0) { + $where[] = ['expense_time', 'between', [$start_time, $end_time]]; + } + + $where[] = ['admin_id','=',$this->uid]; + if (!empty($param['check_status']) && $param['check_status']!='') { + $where[] = ['check_status', '=', $param['check_status']]; + } + $expense = $this->get_list($where, $param); + return table_assign(0, '', $expense); + } else { + return view(); + } + } + + //待审批的报销 + public function list() + { + if (request()->isAjax()) { + $param = get_params(); + $status = isset($param['status'])?$param['status']:0; + $user_id = $this->uid; + //查询条件 + $map1 = []; + $map2 = []; + $map1[] = ['', 'exp', Db::raw("FIND_IN_SET('{$user_id}',check_admin_ids)")]; + $map2[] = ['', 'exp', Db::raw("FIND_IN_SET('{$user_id}',flow_admin_ids)")]; + + if($status == 0){ + $list = $this->get_list([$map1,$map2],$param,'or'); + } + if($status == 1){ + $list = $this->get_list($map1,$param); + } + if($status == 2){ + $list = $this->get_list($map2,$param); + } + return table_assign(0, '', $list); + } else { + return view(); + } + } + + //报销打款 + public function checkedlist() + { + if (request()->isAjax()) { + $param = get_params(); + $where = []; + if (!empty($param['check_status'])) { + $where[] = ['check_status','=',$param['check_status']]; + } + else{ + $where[] = ['check_status','in',[2,5]]; + } + //按时间检索 + $start_time = !empty($param['start_time']) ? strtotime(urldecode($param['start_time'])) : 0; + $end_time = !empty($param['end_time']) ? strtotime(urldecode($param['end_time'])) : 0; + if ($start_time > 0 && $end_time > 0) { + $where[] = ['expense_time', 'between', [$start_time, $end_time]]; + } + $list = $this->get_list($where,$param); + return table_assign(0, '', $list); + } else { + return view(); + } + } + + //添加 + public function add() + { + $param = get_params(); + if (request()->isAjax()) { + $dbRes = false; + $admin_id = $this->uid; + $param['income_month'] = isset($param['income_month']) ? strtotime(urldecode($param['income_month'])) : 0; + $param['expense_time'] = isset($param['expense_time']) ? strtotime(urldecode($param['expense_time'])) : 0; + $param['check_status'] = 1; + $flow_list = Db::name('Flow')->where('id',$param['flow_id'])->value('flow_list'); + $flow = unserialize($flow_list); + if (!empty($param['id']) && $param['id'] > 0) { + try { + validate(ExpenseCheck::class)->scene('edit')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $param['update_time'] = time(); + Db::startTrans(); + try { + //删除原来的审核流程和审核记录 + Db::name('FlowStep')->where(['action_id'=>$param['id'],'type'=>2,'delete_time'=>0])->update(['delete_time'=>time()]); + Db::name('FlowRecord')->where(['action_id'=>$param['id'],'type'=>2,'delete_time'=>0])->update(['delete_time'=>time()]); + if (!isset($param['check_admin_ids'])) { + if($flow[0]['flow_type'] == 1){ + //部门负责人 + $leader = get_department_leader($this->uid); + if($leader == 0){ + return to_assign(1,'审批流程设置有问题:当前部门负责人还未设置,请联系HR或者管理员'); + } + else{ + $param['check_admin_ids'] = $leader; + } + } + else if($flow[0]['flow_type'] == 2){ + //上级部门负责人 + $leader = get_department_leader($this->uid,1); + if($leader == 0){ + return to_assign(1,'审批流程设置有问题:上级部门负责人还未设置,请联系HR或者管理员'); + } + else{ + $param['check_admin_ids'] = $leader; + } + } + else{ + $param['check_admin_ids'] = $flow[0]['flow_uids']; + } + foreach ($flow as $key => &$value){ + $value['action_id'] = $param['id']; + $value['sort'] = $key; + $value['type'] = 2; + $value['create_time'] = time(); + } + //增加审核流程 + Db::name('FlowStep')->strict(false)->field(true)->insertAll($flow); + } + else{ + $flow_step = array( + 'action_id' => $param['id'], + 'type' => 2, + 'flow_uids' => $param['check_admin_ids'], + 'create_time' => time() + ); + //增加审核流程 + Db::name('FlowStep')->strict(false)->field(true)->insertGetId($flow_step); + } + + $res = ExpenseList::where('id', $param['id'])->strict(false)->field(true)->update($param); + if ($res !== false) { + $exid = $param['id']; + //相关内容多个数组; + $amountData = isset($param['amount']) ? $param['amount'] : ''; + $remarksData = isset($param['remarks']) ? $param['remarks'] : ''; + $cateData = isset($param['cate_id']) ? $param['cate_id'] : ''; + $idData = isset($param['expense_id']) ? $param['expense_id'] : 0; + if ($amountData) { + foreach ($amountData as $key => $value) { + if (!$value) { + continue; + } + $data = []; + $data['id'] = $idData[$key]; + $data['exid'] = $exid; + $data['admin_id'] = $admin_id; + $data['amount'] = $amountData[$key]; + $data['cate_id'] = $cateData[$key]; + $data['remarks'] = $remarksData[$key]; + if ($data['amount'] == 0) { + Db::rollback(); + return to_assign(1, '第' . ($key + 1) . '条报销金额不能为零'); + } + if ($data['id'] > 0) { + $data['update_time'] = time(); + $resa = Db::name('ExpenseInterfix')->strict(false)->field(true)->update($data); + } else { + $data['create_time'] = time(); + $eid = Db::name('ExpenseInterfix')->strict(false)->field(true)->insertGetId($data); + } + } + } + + add_log('edit', $exid, $param); + Db::commit(); + $dbRes = true; + } else { + Db::rollback(); + } + } catch (\Exception $e) { ##这里参数不能删除($e:错误信息) + Db::rollback(); + return to_assign(1, $e->getMessage()); + } + } else { + try { + validate(ExpenseCheck::class)->scene('add')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $param['create_time'] = time(); + $param['admin_id'] = $admin_id; + $param['did'] = get_login_admin('did'); + Db::startTrans(); + try { + if (!isset($param['check_admin_ids'])) { + if($flow[0]['flow_type'] == 1){ + //部门负责人 + $leader = get_department_leader($this->uid); + if($leader == 0){ + return to_assign(1,'审批流程设置有问题:当前部门负责人还未设置,请联系HR或者管理员'); + } + else{ + $param['check_admin_ids'] = $leader; + } + } + else if($flow[0]['flow_type'] == 2){ + //上级部门负责人 + $leader = get_department_leader($this->uid,1); + if($leader == 0){ + return to_assign(1,'审批流程设置有问题:上级部门负责人还未设置,请联系HR或者管理员'); + } + else{ + $param['check_admin_ids'] = $leader; + } + } + else{ + $param['check_admin_ids'] = $flow[0]['flow_uids']; + } + $exid = ExpenseList::strict(false)->field(true)->insertGetId($param); + foreach ($flow as $key => &$value){ + $value['action_id'] = $exid; + $value['sort'] = $key; + $value['type'] = 2; + $value['create_time'] = time(); + } + //增加审核流程 + Db::name('FlowStep')->strict(false)->field(true)->insertAll($flow); + } + else{ + $exid = ExpenseList::strict(false)->field(true)->insertGetId($param); + $flow_step = array( + 'action_id' => $exid, + 'type' => 2, + 'flow_uids' => $param['check_admin_ids'], + 'create_time' => time() + ); + //增加审核流程 + Db::name('FlowStep')->strict(false)->field(true)->insertGetId($flow_step); + } + + if ($exid) { + //相关内容多个数组; + $amountData = isset($param['amount']) ? $param['amount'] : ''; + $remarksData = isset($param['remarks']) ? $param['remarks'] : ''; + $cateData = isset($param['cate_id']) ? $param['cate_id'] : ''; + if ($amountData) { + foreach ($amountData as $key => $value) { + if (!$value) { + continue; + } + $data = []; + $data['exid'] = $exid; + $data['admin_id'] = $admin_id; + $data['amount'] = $amountData[$key]; + $data['cate_id'] = $cateData[$key]; + $data['remarks'] = $remarksData[$key]; + $data['create_time'] = time(); + if ($data['amount'] == 0) { + Db::rollback(); + return to_assign(1, '第' . ($key + 1) . '条报销金额不能为零'); + } + $eid = Db::name('ExpenseInterfix')->strict(false)->field(true)->insertGetId($data); + } + } + add_log('add', $exid, $param); + Db::commit(); + $dbRes = true; + } else { + Db::rollback(); + } + } catch (\Exception $e) { ##这里参数不能删除($e:错误信息) + Db::rollback(); + return to_assign(1, $e->getMessage()); + } + } + if ($dbRes == true) { + return to_assign(); + } else { + return to_assign(1, '保存失败'); + } + } + else{ + $id = isset($param['id']) ? $param['id'] : 0; + if ($id > 0) { + $expense = $this->detail($id); + View::assign('expense', $expense); + } + $department = get_login_admin('did'); + //获取报销审批流程 + $flows = get_type_flows(6,$department); + $expense_cate = Db::name('ExpenseCate')->where(['status' => 1])->select()->toArray(); + View::assign('user', get_admin($this->uid)); + View::assign('expense_cate', $expense_cate); + View::assign('flows', $flows); + View::assign('id', $id); + return view(); + } + } + + //查看 + public function view() + { + $id = empty(get_params('id')) ? 0 : get_params('id'); + $detail = $this->detail($id); + $flows = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>2,'sort'=>$detail['check_step_sort'],'delete_time'=>0])->find(); + $detail['check_user'] = '-'; + $check_user_ids = []; + if($detail['check_status']<2){ + if($flows['flow_type']==1){ + $detail['check_user'] = '部门负责人'; + $check_user_ids[]=get_department_leader($detail['admin_id']); + } + else if($flows['flow_type']==2){ + $detail['check_user'] = '上级部门负责人'; + $check_user_ids[]=get_department_leader($detail['admin_id'],1); + } + else{ + $check_user_ids = explode(',',$flows['flow_uids']); + $check_user = Db::name('Admin')->where('id','in',$flows['flow_uids'])->column('name'); + $detail['check_user'] = implode(',',$check_user); + } + } + + $is_check_admin = 0; + $is_create_admin = 0; + if($detail['admin_id'] == $this->uid){ + $is_create_admin = 1; + } + if(in_array($this->uid,$check_user_ids)){ + $is_check_admin = 1; + //当前审核节点详情 + $step = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>2,'sort'=>$detail['check_step_sort'],'delete_time'=>0])->find(); + if($step['flow_type'] == 4){ + $check_count = Db::name('FlowRecord')->where(['action_id'=>$detail['id'],'type'=>2,'step_id'=>$step['id'],'check_user_id'=>$this->uid])->count(); + if($check_count>0){ + $is_check_admin = 0; + } + } + } + View::assign('is_create_admin', $is_create_admin); + View::assign('is_check_admin', $is_check_admin); + View::assign('detail', $detail); + View::assign('flows', $flows); + View::assign('uid', $this->uid); + return view(); + } + + //删除 + public function delete() + { + $id = get_params("id"); + $expense = $this->detail($id); + if ($expense['check_status'] == 2) { + return to_assign(1, "已审核的报销记录不能删除"); + } + if ($expense['check_status'] == 3) { + return to_assign(1, "已打款的报销记录不能删除"); + } + $data['status'] = '-1'; + $data['id'] = $id; + $data['update_time'] = time(); + if (Db::name('expense')->update($data) !== false) { + add_log('delete', $id); + return to_assign(0, "删除成功"); + } else { + return to_assign(1, "删除失败"); + } + } + + + //审核 + public function check() + { + $param = get_params(); + $detail = Db::name('Expense')->where(['id' => $param['id']])->find(); + //当前审核节点详情 + $step = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>2,'sort'=>$detail['check_step_sort'],'delete_time'=>0])->find(); + //审核通过 + if($param['status'] == 1){ + //多人会签审批 + if($step['flow_type'] == 4){ + //查询当前会签记录数 + $check_count = Db::name('FlowRecord')->where(['action_id'=>$detail['id'],'type'=>2,'step_id'=>$step['id']])->count(); + //当前会签记应有记录数 + $flow_count = explode(',', $step['flow_uids']); + if(($check_count+1) >=count($flow_count)){ + $next_step = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>2,'sort'=>($detail['check_step_sort']+1),'delete_time'=>0])->find(); + if($next_step){ + //存在下一步审核 + $param['check_step_sort'] = $detail['check_step_sort']+1; + $param['check_status'] = 1; + } + else{ + //不存在下一步审核,审核结束 + $param['check_status'] = 2; + } + } + } + else if($step['flow_type'] == 0){ + //自由人审批 + if($param['check_node'] == 2){ + $next_step = $detail['check_step_sort']+1; + $flow_step = array( + 'action_id' => $detail['id'], + 'sort' => $next_step, + 'type' => 2, + 'flow_uids' => $param['check_admin_ids'], + 'create_time' => time() + ); + $fid = Db::name('FlowStep')->strict(false)->field(true)->insertGetId($flow_step); + //下一步审核步骤 + $param['check_admin_ids'] = $param['check_admin_ids']; + $param['check_step_sort'] = $next_step; + $param['check_status'] = 1; + } + else{ + //不存在下一步审核,审核结束 + $param['check_status'] = 2; + $param['check_admin_ids'] =''; + } + } + else{ + $next_step = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>2,'sort'=>($detail['check_step_sort']+1),'delete_time'=>0])->find(); + if($next_step){ + //存在下一步审核 + if($next_step['flow_type'] == 1){ + $param['check_admin_ids'] = get_department_leader($this->uid); + } + else if($next_step['flow_type'] == 2){ + $param['check_admin_ids'] = get_department_leader($this->uid,1); + } + else{ + $param['check_admin_ids'] = $next_step['flow_uids']; + } + $param['check_step_sort'] = $detail['check_step_sort']+1; + $param['check_status'] = 1; + } + else{ + //不存在下一步审核,审核结束 + $param['check_status'] = 2; + $param['check_admin_ids'] =''; + } + } + //审核通过数据操作 + $param['last_admin_id'] = $this->uid; + $param['flow_admin_ids'] = $detail['flow_admin_ids'].$this->uid.','; + $res = Db::name('Expense')->strict(false)->field('check_step_sort,check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param); + if($res!==false){ + $checkData=array( + 'action_id' => $detail['id'], + 'step_id' => $step['id'], + 'check_user_id' => $this->uid, + 'type' => 2, + 'check_time' => time(), + 'status' => $param['status'], + 'content' => $param['content'], + 'create_time' => time() + ); + $aid = Db::name('FlowRecord')->strict(false)->field(true)->insertGetId($checkData); + add_log('check', $param['id'], $param); + return to_assign(); + } + else{ + return to_assign(1,'操作失败'); + } + } + else if($param['status'] == 2){ + //拒绝审核,数据操作 + $param['check_status'] = 3; + $param['last_admin_id'] = $this->uid; + $param['flow_admin_ids'] = $detail['flow_admin_ids'].$this->uid.','; + $param['check_admin_ids'] =''; + $res = Db::name('Expense')->strict(false)->field('check_step_sort,check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param); + if($res!==false){ + $checkData=array( + 'action_id' => $detail['id'], + 'step_id' => $step['id'], + 'check_user_id' => $this->uid, + 'type' => 2, + 'check_time' => time(), + 'status' => $param['status'], + 'content' => $param['content'], + 'create_time' => time() + ); + $aid = Db::name('FlowRecord')->strict(false)->field(true)->insertGetId($checkData); + add_log('refue', $param['id'], $param); + return to_assign(); + } + else{ + return to_assign(1,'操作失败'); + } + } + else if($param['status'] == 3){ + if($detail['admin_id'] != $this->uid){ + return to_assign(1,'你没权限操作'); + } + //撤销审核,数据操作 + $param['check_status'] = 4; + $param['check_admin_ids'] =''; + $param['check_step_sort'] =0; + $res = Db::name('Expense')->strict(false)->field('check_step_sort,check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param); + if($res!==false){ + $checkData=array( + 'action_id' => $detail['id'], + 'step_id' => 0, + 'check_user_id' => $this->uid, + 'type' => 2, + 'check_time' => time(), + 'status' => $param['status'], + 'content' => $param['content'], + 'create_time' => time() + ); + $aid = Db::name('FlowRecord')->strict(false)->field(true)->insertGetId($checkData); + add_log('back', $param['id'], $param); + return to_assign(); + }else{ + return to_assign(1,'操作失败'); + } + } + } + + //设置为已打款 + public function topay() + { + $param = get_params(); + if (request()->isAjax()) { + $param['check_status'] = 5; + $param['pay_admin_id'] = $this->uid; + $param['pay_time'] = time(); + $res = ExpenseList::where('id', $param['id'])->strict(false)->field(true)->update($param); + if ($res !== false) { + return to_assign(); + } else { + return to_assign(1, "操作失败"); + } + } + } + +} diff --git a/app/home/controller/Income.php b/app/finance/controller/Income.php similarity index 98% rename from app/home/controller/Income.php rename to app/finance/controller/Income.php index cd60f7d..176f632 100644 --- a/app/home/controller/Income.php +++ b/app/finance/controller/Income.php @@ -7,11 +7,10 @@ declare (strict_types = 1); -namespace app\home\controller; +namespace app\finance\controller; use app\base\BaseController; -use app\home\model\Invoice as InvoiceList; -use app\home\validate\InvoiceCheck; +use app\finance\model\Invoice as InvoiceList; use think\exception\ValidateException; use think\facade\Db; use think\facade\View; @@ -71,7 +70,7 @@ class Income extends BaseController $param = get_params(); $where = []; $where[] = ['status', '=', 1]; - $where[] = ['invoice_status', '=', 3]; + $where[] = ['check_status', '=', 5]; //按时间检索 $start_time = isset($param['start_time']) ? strtotime(urldecode($param['start_time'])) : 0; $end_time = isset($param['end_time']) ? strtotime(urldecode($param['end_time'])) : 0; diff --git a/app/finance/controller/Invoice.php b/app/finance/controller/Invoice.php new file mode 100644 index 0000000..afa0e5b --- /dev/null +++ b/app/finance/controller/Invoice.php @@ -0,0 +1,617 @@ +field('i.*,a.name,d.title as department_name') + ->alias('i') + ->join('Admin a', 'a.id = i.admin_id', 'left') + ->join('Department d', 'd.id = i.did', 'left') + ->whereOr($where) + ->order('i.id desc') + ->group('i.id') + ->paginate(['list_rows' => $rows, 'query' => $param]) + ->each(function($item, $key){ + $item['create_time'] = date('Y-m-d H:i', $item['create_time']); + if ($item['open_time'] > 0) { + $item['open_time'] = empty($item['open_time']) ? '0' : date('Y-m-d', $item['open_time']); + $item['open_name'] = Db::name('Admin')->where('id',$item['open_admin_id'])->value('name'); + } + else{ + $item['open_time'] = ''; + $item['open_name'] = '-'; + } + $item['check_user'] = '-'; + if($item['check_status']<2 && !empty($item['check_admin_ids'])){ + $check_user = Db::name('Admin')->where('id','in',$item['check_admin_ids'])->column('name'); + $item['check_user'] = implode(',',$check_user); + } + return $item; + }); + } + else{ + $list = Db::name('Invoice') + ->field('i.*,a.name,d.title as department_name') + ->alias('i') + ->join('Admin a', 'a.id = i.admin_id', 'left') + ->join('Department d', 'd.id = i.did', 'left') + ->where($where) + ->order('i.id desc') + ->paginate(['list_rows' => $rows, 'query' => $param]) + ->each(function($item, $key){ + $item['create_time'] = date('Y-m-d H:i', $item['create_time']); + $item['check_user'] = '-'; + if ($item['open_time'] > 0) { + $item['open_time'] = empty($item['open_time']) ? '0' : date('Y-m-d', $item['open_time']); + $item['open_name'] = Db::name('Admin')->where('id',$item['open_admin_id'])->value('name'); + } + else{ + $item['open_time'] = ''; + $item['open_name'] = '-'; + } + if($item['check_status']<2 && !empty($item['check_admin_ids'])){ + $check_user = Db::name('Admin')->where('id','in',$item['check_admin_ids'])->column('name'); + $item['check_user'] = implode(',',$check_user); + } + return $item; + }); + } + return $list; + } + + //发票详情 + public function detail($id = 0) + { + $invoice = Db::name('Invoice')->where(['id' => $id])->find(); + if ($invoice) { + $invoice['create_user'] = Db::name('Admin')->where(['id' => $invoice['admin_id']])->value('name'); + $invoice['department'] = Db::name('Department')->where(['id' => $invoice['did']])->value('title'); + $invoice['check_admin'] = Db::name('Admin')->where(['id' => $invoice['check_admin_id']])->value('name'); + $invoice['open_admin'] = Db::name('Admin')->where(['id' => $invoice['open_admin_id']])->value('name'); + if ($invoice['check_time'] > 0) { + $invoice['check_time'] = empty($invoice['check_time']) ? '0' : date('Y-m-d H:i', $invoice['check_time']); + } + if ($invoice['open_time'] > 0) { + $invoice['open_time'] = empty($invoice['open_time']) ? '0' : date('Y-m-d', $invoice['open_time']); + } + else{ + $invoice['open_time'] = '-'; + } + } + return $invoice; + } + + //我申请的发票 + public function index() + { + if (request()->isAjax()) { + $param = get_params(); + $where = []; + if (!empty($param['check_status'])) { + $where[] = ['i.check_status','=',$param['check_status']]; + } + //按时间检索 + $start_time = isset($param['start_time']) ? strtotime(urldecode($param['start_time'])) : 0; + $end_time = isset($param['end_time']) ? strtotime(urldecode($param['end_time'])) : 0; + if ($start_time > 0 && $end_time > 0) { + $where[] = ['i.create_time', 'between', [$start_time, $end_time]]; + } + $where[] = ['i.admin_id','=',$this->uid]; + $list = $this->get_list($where,$param); + return table_assign(0, '', $list); + } else { + return view(); + } + } + + //待审批的发票 + public function list() + { + if (request()->isAjax()) { + $param = get_params(); + $status = isset($param['status'])?$param['status']:0; + $user_id = $this->uid; + //查询条件 + $map1 = []; + $map2 = []; + $map1[] = ['', 'exp', Db::raw("FIND_IN_SET('{$user_id}',i.check_admin_ids)")]; + $map2[] = ['', 'exp', Db::raw("FIND_IN_SET('{$user_id}',i.flow_admin_ids)")]; + + if($status == 0){ + $list = $this->get_list([$map1,$map2],$param,'or'); + } + if($status == 1){ + $list = $this->get_list($map1,$param); + } + if($status == 2){ + $list = $this->get_list($map2,$param); + } + return table_assign(0, '', $list); + } else { + return view(); + } + } + + //发票开具 + public function checkedlist() + { + if (request()->isAjax()) { + $param = get_params(); + $where = []; + if (!empty($param['check_status'])) { + $where[] = ['i.check_status','=',$param['check_status']]; + } + else{ + $where[] = ['i.check_status','in',[2,5,10]]; + } + //按时间检索 + $start_time = !empty($param['start_time']) ? strtotime(urldecode($param['start_time'])) : 0; + $end_time = !empty($param['end_time']) ? strtotime(urldecode($param['end_time'])) : 0; + if ($start_time > 0 && $end_time > 0) { + $where[] = ['i.create_time', 'between', [$start_time, $end_time]]; + } + $list = $this->get_list($where,$param); + return table_assign(0, '', $list); + } else { + return view(); + } + } + + //添加&编辑 + public function add() + { + $param = get_params(); + if (request()->isAjax()) { + $param['check_status'] = 1; + $flow_list = Db::name('Flow')->where('id',$param['flow_id'])->value('flow_list'); + $flow = unserialize($flow_list); + if ($param['type'] == 1) { + if (!$param['invoice_tax']) { + return to_assign(1, '纳税人识别号不能为空'); + } + if (!$param['invoice_bank']) { + return to_assign(1, '开户银行不能为空'); + } + if (!$param['invoice_account']) { + return to_assign(1, '银行账号不能为空'); + } + if (!$param['invoice_banking']) { + return to_assign(1, '银行营业网点不能为空'); + } + if (!$param['invoice_address']) { + return to_assign(1, '银地址不能为空'); + } + } + if (!empty($param['id']) && $param['id'] > 0) { + try { + validate(InvoiceCheck::class)->scene('edit')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $param['update_time'] = time(); + + //删除原来的审核流程和审核记录 + Db::name('FlowStep')->where(['action_id'=>$param['id'],'type'=>3,'delete_time'=>0])->update(['delete_time'=>time()]); + Db::name('FlowRecord')->where(['action_id'=>$param['id'],'type'=>3,'delete_time'=>0])->update(['delete_time'=>time()]); + if (!isset($param['check_admin_ids'])) { + if($flow[0]['flow_type'] == 1){ + //部门负责人 + $leader = get_department_leader($this->uid); + if($leader == 0){ + return to_assign(1,'审批流程设置有问题:当前部门负责人还未设置,请联系HR或者管理员'); + } + else{ + $param['check_admin_ids'] = $leader; + } + } + else if($flow[0]['flow_type'] == 2){ + //上级部门负责人 + $leader = get_department_leader($this->uid,1); + if($leader == 0){ + return to_assign(1,'审批流程设置有问题:上级部门负责人还未设置,请联系HR或者管理员'); + } + else{ + $param['check_admin_ids'] = $leader; + } + } + else{ + $param['check_admin_ids'] = $flow[0]['flow_uids']; + } + foreach ($flow as $key => &$value){ + $value['action_id'] = $param['id']; + $value['sort'] = $key; + $value['type'] = 3; + $value['create_time'] = time(); + } + //增加审核流程 + Db::name('FlowStep')->strict(false)->field(true)->insertAll($flow); + } + else{ + $flow_step = array( + 'action_id' => $param['id'], + 'type' => 3, + 'flow_uids' => $param['check_admin_ids'], + 'create_time' => time() + ); + //增加审核流程 + Db::name('FlowStep')->strict(false)->field(true)->insertGetId($flow_step); + } + + $res = InvoiceList::where('id', $param['id'])->strict(false)->field(true)->update($param); + if ($res !== false) { + add_log('edit', $param['id'], $param); + return to_assign(); + } else { + return to_assign(1, '操作失败'); + } + } else { + try { + validate(InvoiceCheck::class)->scene('add')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $admin_id = $this->uid; + $param['admin_id'] = $admin_id; + $param['did'] = get_login_admin('did'); + $param['create_time'] = time(); + + if (!isset($param['check_admin_ids'])) { + if($flow[0]['flow_type'] == 1){ + //部门负责人 + $leader = get_department_leader($this->uid); + if($leader == 0){ + return to_assign(1,'审批流程设置有问题:当前部门负责人还未设置,请联系HR或者管理员'); + } + else{ + $param['check_admin_ids'] = $leader; + } + } + else if($flow[0]['flow_type'] == 2){ + //上级部门负责人 + $leader = get_department_leader($this->uid,1); + if($leader == 0){ + return to_assign(1,'审批流程设置有问题:上级部门负责人还未设置,请联系HR或者管理员'); + } + else{ + $param['check_admin_ids'] = $leader; + } + } + else{ + $param['check_admin_ids'] = $flow[0]['flow_uids']; + } + $exid = InvoiceList::strict(false)->field(true)->insertGetId($param); + foreach ($flow as $key => &$value){ + $value['action_id'] = $exid; + $value['sort'] = $key; + $value['type'] = 3; + $value['create_time'] = time(); + } + //增加审核流程 + Db::name('FlowStep')->strict(false)->field(true)->insertAll($flow); + } + else{ + $exid = InvoiceList::strict(false)->field(true)->insertGetId($param); + $flow_step = array( + 'action_id' => $exid, + 'type' => 3, + 'flow_uids' => $param['check_admin_ids'], + 'create_time' => time() + ); + //增加审核流程 + Db::name('FlowStep')->strict(false)->field(true)->insertGetId($flow_step); + } + + + if ($exid) { + add_log('apply', $exid, $param); + return to_assign(); + } else { + return to_assign(1, '操作失败'); + } + } + } else { + $id = isset($param['id']) ? $param['id'] : 0; + if ($id > 0) { + $detail = $this->detail($id); + View::assign('detail', $detail); + } + $department = get_login_admin('did'); + //获取发票审批流程 + $flows = get_type_flows(7,$department); + View::assign('user', get_admin($this->uid)); + View::assign('id', $id); + View::assign('flows', $flows); + return view(); + } + } + + //查看 + public function view() + { + $id = empty(get_params('id')) ? 0 : get_params('id'); + $detail = $this->detail($id); + $flows = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>3,'sort'=>$detail['check_step_sort'],'delete_time'=>0])->find(); + $detail['check_user'] = '-'; + $check_user_ids = []; + if($detail['check_status']<2){ + if($flows['flow_type']==1){ + $detail['check_user'] = '部门负责人'; + $check_user_ids[]=get_department_leader($detail['admin_id']); + } + else if($flows['flow_type']==2){ + $detail['check_user'] = '上级部门负责人'; + $check_user_ids[]=get_department_leader($detail['admin_id'],1); + } + else{ + $check_user_ids = explode(',',$flows['flow_uids']); + $check_user = Db::name('Admin')->where('id','in',$flows['flow_uids'])->column('name'); + $detail['check_user'] = implode(',',$check_user); + } + } + + $is_check_admin = 0; + $is_create_admin = 0; + if($detail['admin_id'] == $this->uid){ + $is_create_admin = 1; + } + if(in_array($this->uid,$check_user_ids)){ + $is_check_admin = 1; + //当前审核节点详情 + $step = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>3,'sort'=>$detail['check_step_sort'],'delete_time'=>0])->find(); + if($step['flow_type'] == 4){ + $check_count = Db::name('FlowRecord')->where(['action_id'=>$detail['id'],'type'=>3,'step_id'=>$step['id'],'check_user_id'=>$this->uid])->count(); + if($check_count>0){ + $is_check_admin = 0; + } + } + } + View::assign('is_create_admin', $is_create_admin); + View::assign('is_check_admin', $is_check_admin); + View::assign('detail', $detail); + View::assign('flows', $flows); + View::assign('uid', $this->uid); + return view(); + } + + //删除 + public function delete() + { + $id = get_params("id"); + $detail = $this->detail($id); + if ($detail['invoice_status'] == 2) { + return to_assign(1, "已审核的发票不能删除"); + } + if ($detail['invoice_status'] == 3) { + return to_assign(1, "已开具的发票不能删除"); + } + $data['status'] = '-1'; + $data['id'] = $id; + $data['update_time'] = time(); + if (Db::name('Invoice')->update($data) !== false) { + add_log('delete', $id); + return to_assign(0, "删除成功"); + } else { + return to_assign(1, "删除失败"); + } + } + + //审核 + public function check() + { + $param = get_params(); + $detail = Db::name('Invoice')->where(['id' => $param['id']])->find(); + //当前审核节点详情 + $step = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>3,'sort'=>$detail['check_step_sort'],'delete_time'=>0])->find(); + //审核通过 + if($param['status'] == 1){ + //多人会签审批 + if($step['flow_type'] == 4){ + //查询当前会签记录数 + $check_count = Db::name('FlowRecord')->where(['action_id'=>$detail['id'],'type'=>3,'step_id'=>$step['id']])->count(); + //当前会签记应有记录数 + $flow_count = explode(',', $step['flow_uids']); + if(($check_count+1) >=count($flow_count)){ + $next_step = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>3,'sort'=>($detail['check_step_sort']+1),'delete_time'=>0])->find(); + if($next_step){ + //存在下一步审核 + $param['check_step_sort'] = $detail['check_step_sort']+1; + $param['check_status'] = 1; + } + else{ + //不存在下一步审核,审核结束 + $param['check_status'] = 2; + } + } + } + else if($step['flow_type'] == 0){ + //自由人审批 + if($param['check_node'] == 2){ + $next_step = $detail['check_step_sort']+1; + $flow_step = array( + 'action_id' => $detail['id'], + 'sort' => $next_step, + 'type' => 3, + 'flow_uids' => $param['check_admin_ids'], + 'create_time' => time() + ); + $fid = Db::name('FlowStep')->strict(false)->field(true)->insertGetId($flow_step); + //下一步审核步骤 + $param['check_admin_ids'] = $param['check_admin_ids']; + $param['check_step_sort'] = $next_step; + $param['check_status'] = 1; + } + else{ + //不存在下一步审核,审核结束 + $param['check_status'] = 2; + $param['check_admin_ids'] =''; + } + } + else{ + $next_step = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>3,'sort'=>($detail['check_step_sort']+1),'delete_time'=>0])->find(); + if($next_step){ + //存在下一步审核 + if($next_step['flow_type'] == 1){ + $param['check_admin_ids'] = get_department_leader($this->uid); + } + else if($next_step['flow_type'] == 2){ + $param['check_admin_ids'] = get_department_leader($this->uid,1); + } + else{ + $param['check_admin_ids'] = $next_step['flow_uids']; + } + $param['check_step_sort'] = $detail['check_step_sort']+1; + $param['check_status'] = 1; + } + else{ + //不存在下一步审核,审核结束 + $param['check_status'] = 2; + $param['check_admin_ids'] =''; + } + } + //审核通过数据操作 + $param['last_admin_id'] = $this->uid; + $param['flow_admin_ids'] = $detail['flow_admin_ids'].$this->uid.','; + $res = Db::name('Invoice')->strict(false)->field('check_step_sort,check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param); + if($res!==false){ + $checkData=array( + 'action_id' => $detail['id'], + 'step_id' => $step['id'], + 'check_user_id' => $this->uid, + 'type' => 3, + 'check_time' => time(), + 'status' => $param['status'], + 'content' => $param['content'], + 'create_time' => time() + ); + $aid = Db::name('FlowRecord')->strict(false)->field(true)->insertGetId($checkData); + add_log('check', $param['id'], $param); + return to_assign(); + } + else{ + return to_assign(1,'操作失败'); + } + } + else if($param['status'] == 2){ + //拒绝审核,数据操作 + $param['check_status'] = 3; + $param['last_admin_id'] = $this->uid; + $param['flow_admin_ids'] = $detail['flow_admin_ids'].$this->uid.','; + $param['check_admin_ids'] =''; + $res = Db::name('Invoice')->strict(false)->field('check_step_sort,check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param); + if($res!==false){ + $checkData=array( + 'action_id' => $detail['id'], + 'step_id' => $step['id'], + 'check_user_id' => $this->uid, + 'type' => 3, + 'check_time' => time(), + 'status' => $param['status'], + 'content' => $param['content'], + 'create_time' => time() + ); + $aid = Db::name('FlowRecord')->strict(false)->field(true)->insertGetId($checkData); + add_log('refue', $param['id'], $param); + return to_assign(); + } + else{ + return to_assign(1,'操作失败'); + } + } + else if($param['status'] == 3){ + if($detail['admin_id'] != $this->uid){ + return to_assign(1,'你没权限操作'); + } + //撤销审核,数据操作 + $param['check_status'] = 4; + $param['check_admin_ids'] =''; + $param['check_step_sort'] =0; + $res = Db::name('Invoice')->strict(false)->field('check_step_sort,check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param); + if($res!==false){ + $checkData=array( + 'action_id' => $detail['id'], + 'step_id' => 0, + 'check_user_id' => $this->uid, + 'type' => 3, + 'check_time' => time(), + 'status' => $param['status'], + 'content' => $param['content'], + 'create_time' => time() + ); + $aid = Db::name('FlowRecord')->strict(false)->field(true)->insertGetId($checkData); + add_log('back', $param['id'], $param); + return to_assign(); + }else{ + return to_assign(1,'操作失败'); + } + } + } + + + //作废 + public function tovoid() + { + $param = get_params(); + if (request()->isAjax()) { + if ($param['check_status'] == 10) { + $count = Db::name('InvoiceIncome')->where(['inid'=>$param['id'],'status'=>1])->count(); + if($count>0){ + return to_assign(1, "发票已经新增有到账记录,请先反到账后再作废发票"); + } + else{ + $param['update_time'] = time(); + add_log('tovoid', $param['id'],$param); + } + } + $res = InvoiceList::where('id', $param['id'])->strict(false)->field('check_status')->update($param); + if ($res !== false) { + return to_assign(); + } else { + return to_assign(1, "操作失败"); + } + } + } + + //开具发票 + public function open() + { + $param = get_params(); + if (request()->isAjax()) { + $detail = Db::name('Invoice')->where(['id' => $param['id']])->find(); + if ($detail['check_status'] == 2) { + $param['check_status'] = 5; + $param['open_admin_id'] = $this->uid; + } + $param['open_time'] = isset($param['open_time']) ? strtotime(urldecode($param['open_time'])) : 0; + $res = InvoiceList::where('id', $param['id'])->strict(false)->field('code,check_status,open_time,open_admin_id,delivery')->update($param); + if ($res !== false) { + add_log('open', $param['id'],$param); + return to_assign(); + } else { + return to_assign(1, "操作失败"); + } + } + } +} diff --git a/app/finance/event.php b/app/finance/event.php new file mode 100644 index 0000000..4eff890 --- /dev/null +++ b/app/finance/event.php @@ -0,0 +1,5 @@ + + - - {/block} {block name="body"} - +

报销信息

{if condition="($id == 0)"} + + + + + + - - - - - + - - - - @@ -52,10 +49,10 @@
报销人 + {$user.name} + 报销部门 + {$user.department} +
报销凭证编号* 入账月份* - - 原始单据日期*
报销审核人*入账月份* - - 报销人 - {$user.name} - 报销部门 - {$user.department} +
- - + + - + @@ -75,37 +72,45 @@ + + + + + + + +
报销金额报销项目报销金额报销项目 备注信息操作操作
审批流程* + +
审核人* + +
{else/} + + + + + + - - - - - + - - - - @@ -113,10 +118,10 @@
报销人{$expense.create_user}报销部门{$expense.department}
报销凭证编号* 入账月份* - - 原始单据日期*
报销审核人*入账月份* - + 报销人{$expense.user_name}报销部门{$expense.department}
报销选项*
- - + + - + {volist name="$expense.list" id="val"} @@ -138,6 +143,23 @@ + + + + + + + +
报销金额报销类别报销金额报销类别 备注信息操作操作
审批流程* + +
审核人* + +
{/if} @@ -165,6 +187,7 @@ var form = layui.form ,layer = layui.layer ,table = layui.table + ,employeepicker = layui.employeepicker ,laydate = layui.laydate; laydate.render({ @@ -190,7 +213,7 @@ title: '提示' }, function(index) { $.ajax({ - url: "/home/expense/add", + url: "/finance/expense/add", type:'post', data:data.field, success:function(e){ @@ -207,6 +230,81 @@ return false; }); + //选择人员 + $('.layui-form').on('click','[name="check_admin_name"]',function(){ + if($('[name="flow_id"]').val()==''){ + layer.msg('请先选择审批流程'); + return false; + } + employeepicker.init({ + department_url: "/api/index/get_department_tree", + employee_url: "/api/index/get_employee", + type:0, + callback:function(ids,names){ + $('[name="check_admin_ids"]').val(ids), + $('[name="check_admin_name"]').val(names); + } + }); + }) + + form.on('select(flowtype)', function(data){ + var check_type = data.elem[data.elem.selectedIndex].title; + var formHtml='审核人*\ + \ + \ + '; + if(check_type == 2){ + $('#flow_tr').html(formHtml); + form.render(); + } + else{ + $.ajax({ + url: "/api/index/get_flow_users", + type:'post', + data:{id:data.value}, + success: function (e) { + if (e.code == 0) { + var flowLi=''; + for(var a=0;a'+e.data[a].user_id_info[b].name+''; + } + } + flowLi+='
  • \ + \ +
    \ +

    第'+(a+1)+'级审批'+sign_type+'

    \ +
      '+userList+'
    \ +
    \ +
  • '; + } + + formHtml = '审批流程\ + \ +
      '+flowLi+'
    \ + '; + $('#flow_tr').html(formHtml); + } + } + }) + } + + }); + //添加报销信息表格 $('#addInterfix').on('click',function(){ var html = ''; @@ -234,7 +332,7 @@ title: '提示' }, function(index) { $.ajax({ - url: "/home/api/del_expense_interfix", + url: "/api/index/del_expense_interfix", data: { id: _id }, @@ -256,6 +354,6 @@ } -{include file="common/layui" base='base' extend="['employeepicker']" callback="init" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} {/block} \ No newline at end of file diff --git a/app/finance/view/expense/checkedlist.html b/app/finance/view/expense/checkedlist.html new file mode 100644 index 0000000..35fdcd3 --- /dev/null +++ b/app/finance/view/expense/checkedlist.html @@ -0,0 +1,189 @@ +{extend name="../../base/view/common/base" /} + +{block name="body"} +
    + +
    +
    + +
    + ~ +
    + +
    +
    +
    + +
    + + +
    +
    + +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['rightpage']" use="['table','form']" callback="init" /} +{/block} + diff --git a/app/home/view/expense/index.html b/app/finance/view/expense/index.html similarity index 79% rename from app/home/view/expense/index.html rename to app/finance/view/expense/index.html index ccd4a0b..f958e8a 100644 --- a/app/home/view/expense/index.html +++ b/app/finance/view/expense/index.html @@ -1,7 +1,7 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"} -
    +
    @@ -15,10 +15,11 @@
    @@ -59,7 +60,7 @@ elem: '#test', title: '报销管理列表', toolbar: '#toolbarDemo', - url: "/home/expense/index", //数据接口 + url: "/finance/expense/index", //数据接口 page: true, //开启分页 limit: 20, cols: [ @@ -81,14 +82,17 @@ align: 'center', width: 120, templet:function(d){ - var html='审核不通过'; + var html='审批不通过'; if(d.check_status==1){ - html='报销审核中'; + html='审批中'; } else if(d.check_status==2){ - html='审核通过'; + html='审批通过'; } - else if(d.check_status==3){ + else if(d.check_status==4){ + html='撤销'; + } + else if(d.check_status==5){ html='已打款'; } return html; @@ -123,15 +127,8 @@ align: 'center', width: 150 },{ - field: 'check_name', - title: '审核人', - align: 'center', - width: 90 - },{ - field: 'check_time', - title: '审核时间', - align: 'center', - width: 150 + field: 'check_user', + title: '当前审核人' },{ field: 'pay_name', title: '打款人', @@ -147,14 +144,14 @@ fixed: 'right', title: '操作', width: 130, - align: 'right', + align: 'center', templet:function(d){ var html='
    '; var btn1='详情'; var btn2='编辑'; var btn3='删除'; html+=btn1; - if(d.check_status==0 && d.admin_id==login_user){ + if(d.check_status==4 && d.admin_id==login_user){ html+=btn2+btn3; } html+='
    '; @@ -168,7 +165,7 @@ //表头工具栏事件 table.on('toolbar(test)', function(obj){ if (obj.event === 'add') { - rightpage.open("/home/expense/add"); + rightpage.open("/finance/expense/add","900px"); return; } }); @@ -176,11 +173,11 @@ table.on('tool(test)', function(obj) { var data = obj.data; if (obj.event === 'view') { - rightpage.open("/home/expense/view?id="+data.id); + rightpage.open("/finance/expense/view?id="+data.id,"900px"); return; } if (obj.event === 'edit') { - rightpage.open("/home/expense/add?id="+data.id); + rightpage.open("/finance/expense/add?id="+data.id,"900px"); return; } if (obj.event === 'del') { @@ -189,7 +186,7 @@ title: '提示' }, function(index) { $.ajax({ - url: "/home/expense/delete", + url: "/finance/expense/delete", data: { id: data.id }, @@ -206,6 +203,6 @@ }); } -{include file="common/layui" base='base' extend="['rightpage']" use="['table','form']" callback="init" /} +{include file="../../base/view/common/layui" base='base' extend="['rightpage']" use="['table','form']" callback="init" /} {/block} diff --git a/app/finance/view/expense/list.html b/app/finance/view/expense/list.html new file mode 100644 index 0000000..56ce669 --- /dev/null +++ b/app/finance/view/expense/list.html @@ -0,0 +1,147 @@ +{extend name="../../base/view/common/base" /} + +{block name="body"} +
    +
    +
      +
    • 全部
    • +
    • 待我审批
    • +
    • 我已审批
    • +
    +
    +
    +
    + +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['rightpage']" use="['table','form']" callback="init" /} +{/block} + diff --git a/app/finance/view/expense/view.html b/app/finance/view/expense/view.html new file mode 100644 index 0000000..87579c6 --- /dev/null +++ b/app/finance/view/expense/view.html @@ -0,0 +1,427 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} + + + +{/block} + +{block name="body"} +
    +

    报销详情

    + + + + + + + + + + + + + + + + + + {if condition="$detail.pay_admin_id > 0"} + + + + + + + {/if} + + + + + + + + + + + + + + + {if ( $detail.check_status lt 2) AND ( $is_check_admin eq 1) } + {eq name="$flows.flow_type" value="0"} + + + + + {/eq} + + + + + {/if} +
    报销凭证编号{$detail.code}入账月份{$detail.income_month}原始单据日期{$detail.expense_time}
    报销人{$detail.create_user}报销部门{$detail.department}报销总费用(元){$detail.amount}
    打款人{$detail.pay_admin}打款时间{$detail.pay_time}
    费用金额 +
    + + + + + + + {volist name="$detail.list" id="vo"} + + + + + + {/volist} +
    报销金额(元)报销类别备注信息
    {$vo.amount}{$vo.cate_title}{$vo.remarks}
    +
    +
    审核状态{eq name="$detail.check_status" value="0"}待审批{/eq} + {eq name="$detail.check_status" value="1"}审批中{/eq} + {eq name="$detail.check_status" value="2"}已通过{/eq} + {eq name="$detail.check_status" value="3"}已拒绝{/eq} + {eq name="$detail.check_status" value="4"}已撤销{/eq} + 查看审批记录 + 当前审核人{$detail.check_user}
    审批流程 +
    +
    + +
    {$detail.create_user}
    +
    创建
    + +
    +
    +
    审批节点 * + + + +
    + +
    + +
    审批意见 * + +
    + + +
    + {eq name="$is_check_admin" value='1'} + 通过 + 拒绝 + {/eq} + {if ( $detail.check_status lt 2) AND ( $is_create_admin eq 1) } + 撤回 + {/if} + {if ( $detail.check_status gt 2) AND ( $is_create_admin eq 1) } + 重新编辑 + {/if} +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/finance/view/income/add.html b/app/finance/view/income/add.html new file mode 100644 index 0000000..2fa1a80 --- /dev/null +++ b/app/finance/view/income/add.html @@ -0,0 +1,499 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} + +{/block} + +{block name="body"} +
    +

    发票信息

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {notempty name="$detail.remark"} + + + + + {/notempty} + + + + + {if condition="$detail.open_admin_id > 0"} + + + + + + + + + {/if} +
    发票金额 + {$detail.amount} + 发票类型 + {eq name="$detail.invoice_type" value="1"}增值税专用发票{/eq} + {eq name="$detail.invoice_type" value="2"}增值税普通发票{/eq} + 发票主体 + {volist name=":oa_invoice_subject()" id="vo"} + {eq name="$vo.id" value="$detail.invoice_subject"}{$vo.title}{/eq} + {/volist} +
    抬头类型 + {eq name="$detail.type" value="1"}企业{/eq} + {eq name="$detail.type" value="2"}个人{/eq} + 发票抬头{$detail.invoice_title}电话号码{$detail.invoice_phone}
    纳税人识别号{$detail.invoice_tax}开户行{$detail.invoice_bank}银行账号{$detail.invoice_account}
    银行营业网点{$detail.invoice_banking}地址{$detail.invoice_address}
    备注信息{$detail.remark}
    发票状态 + {if condition="($detail.check_status == 0)"} + 待审 + {elseif condition="($detail.check_status == 1)"} + 审核中 + {elseif condition="($detail.check_status == 2)"} + 审核通过,待开具 + {elseif condition="($detail.check_status == 3)"} + 审核不通过 【原因:{$detail.check_remark}】 + {elseif condition="($detail.check_status == 4)"} + 撤销 【原因:{$detail.check_remark}】 + {elseif condition="($detail.check_status == 5)"} + 已开具 + {elseif condition="($detail.check_status == 10)"} + 已作废 + {/if} + 查看审批记录 +
    开票人{$detail.open_admin}开票时间{$detail.open_time}发票号码{$detail.code}
    + +

    到账信息

    +
    + + + + + + + + + + + + + +
    到账状态 + {if condition="($detail.is_cash == 0)"} + 未到账 + {elseif condition="($detail.is_cash == 1)"} + 部分到账 + {elseif condition="($detail.is_cash == 2)"} + 全部到账 + {/if} + 未到账金额(元){$detail.not_income}已到账金额(元){$detail.enter_amount}
    到账记录 + + + + + + + + {empty name="$detail.income"} + + + + {else/} + {volist name="$detail.income" id="vo"} + + + + + + + {/volist} + {/empty} +
    到账日期到帐金额(元)备注操作
    暂无到账记录
    {$vo.enter_time | date='Y-m-d'}{$vo.amount}{$vo.remarks}删除
    + {if condition="($detail.is_cash lt 2)"} +
    + {/if} +
    +
    + + + {if condition="($detail.is_cash lt 2)"} + + + {/if} + {if condition="($detail.is_cash eq 0)"} + 全部到账 + {/if} + {if condition="($detail.is_cash eq 1)"} + 剩余部分全部到账 + {/if} + {if condition="($detail.is_cash gt 0)"} + 全部反到账 + {/if} +
    +
    + +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="[]" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/home/view/income/index.html b/app/finance/view/income/index.html similarity index 92% rename from app/home/view/income/index.html rename to app/finance/view/income/index.html index c67c235..6a131a0 100644 --- a/app/home/view/income/index.html +++ b/app/finance/view/income/index.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"}
    @@ -53,7 +53,7 @@ elem: '#test', title: '到账列表', toolbar: '#toolbarDemo', - url: "/home/income/index", //数据接口 + url: "/finance/income/index", //数据接口 page: true, //开启分页 limit: 20, cols: [ @@ -67,7 +67,7 @@ field: 'is_cash', title: '到账状态', align: 'center', - width: 100, + width: 90, templet:function(d){ var html='未到账'; if(d.is_cash==1){ @@ -91,7 +91,7 @@ }, { field: 'invoice_title', title: '发票抬头', - width: 300, + minWidth: 300, templet:function(d){ var html=''; if(d.type==1){ @@ -141,7 +141,7 @@ field: 'code', title: '发票号码', align: 'center', - width: 136 + width: 120 },{ field: 'open_time', title: '开票时间', @@ -166,16 +166,16 @@ table.on('tool(test)', function(obj) { var data = obj.data; if (obj.event === 'add') { - rightpage.open("/home/income/add?id="+data.id); + rightpage.open("/finance/income/add?id="+data.id); return; } if (obj.event === 'view') { - rightpage.open("/home/income/view?id="+data.id); + rightpage.open("/finance/income/view?id="+data.id); return; } }); } -{include file="common/layui" base='base' extend="['rightpage']" use="['table','form']" callback="init" /} +{include file="../../base/view/common/layui" base='base' extend="['rightpage']" use="['table','form']" callback="init" /} {/block} diff --git a/app/finance/view/income/view.html b/app/finance/view/income/view.html new file mode 100644 index 0000000..6e1011b --- /dev/null +++ b/app/finance/view/income/view.html @@ -0,0 +1,344 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} + +{/block} + +{block name="body"} +
    +

    发票信息

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {notempty name="$detail.remark"} + + + + + {/notempty} + + + + + {if condition="$detail.open_admin_id > 0"} + + + + + + + + + {/if} +
    发票金额(元) + {$detail.amount} + 发票类型 + {eq name="$detail.invoice_type" value="1"}增值税专用发票{/eq} + {eq name="$detail.invoice_type" value="2"}增值税普通发票{/eq} + 发票主体 + {volist name=":oa_invoice_subject()" id="vo"} + {eq name="$vo.id" value="$detail.invoice_subject"}{$vo.title}{/eq} + {/volist} +
    抬头类型 + {eq name="$detail.type" value="1"}企业{/eq} + {eq name="$detail.type" value="2"}个人{/eq} + 发票抬头{$detail.invoice_title}电话号码{$detail.invoice_phone}
    纳税人识别号{$detail.invoice_tax}开户行{$detail.invoice_bank}银行账号{$detail.invoice_account}
    银行营业网点{$detail.invoice_banking}地址{$detail.invoice_address}
    备注信息{$detail.remark}
    发票状态 + {if condition="($detail.check_status == 0)"} + 待审 + {elseif condition="($detail.check_status == 1)"} + 审核中 + {elseif condition="($detail.check_status == 2)"} + 审核通过,待开具 + {elseif condition="($detail.check_status == 3)"} + 审核不通过 【原因:{$detail.check_remark}】 + {elseif condition="($detail.check_status == 4)"} + 撤销 【原因:{$detail.check_remark}】 + {elseif condition="($detail.check_status == 5)"} + 已开具 + {elseif condition="($detail.check_status == 10)"} + 已作废 + {/if} + 查看审批记录 +
    开票人{$detail.open_admin}开票时间{$detail.open_time}发票号码{$detail.code}
    + +

    到账信息

    +
    + + + + + + + + + + + + +
    到账状态 + {if condition="($detail.is_cash == 0)"} + 未到账 + {elseif condition="($detail.is_cash == 1)"} + 部分到账 + {elseif condition="($detail.is_cash == 2)"} + 全部到账 + {/if} + 未到账金额(元){$detail.not_income}已到账金额(元){$detail.enter_amount}
    到账记录 + + + + + + + + + {empty name="$detail.income"} + + + + {else/} + {volist name="$detail.income" id="vo"} + + + + + + + + {/volist} + {/empty} +
    到账日期到帐金额(元)备注登记人登记时间
    暂无到账记录
    {$vo.enter_time | date='Y-m-d'}{$vo.amount}{$vo.remarks}{$vo.admin}{$vo.create_time | date='Y-m-d H:i:s'}
    +
    +
    + +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="[]" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/home/view/invoice/add.html b/app/finance/view/invoice/add.html similarity index 59% rename from app/home/view/invoice/add.html rename to app/finance/view/invoice/add.html index 8ab390f..b573c10 100644 --- a/app/home/view/invoice/add.html +++ b/app/finance/view/invoice/add.html @@ -1,15 +1,17 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="style"} + + - - {/block} {block name="body"} -
    +

    申请开票

    {if condition="($id == 0)"} @@ -30,7 +32,7 @@ - + + + + +
    @@ -66,16 +68,20 @@
    发票审核人*审批流程* -
    - -
    + +
    审核人* +
    @@ -98,7 +104,7 @@ @@ -134,16 +140,20 @@ - 发票审核人* + 审批流程* -
    - -
    + + + + + 审核人* + + @@ -164,6 +174,7 @@ function init(layui){ var form = layui.form ,layer = layui.layer + ,employeepicker = layui.employeepicker ,laydate = layui.laydate; //选择收件人类型 @@ -175,19 +186,96 @@ $('.invoice-type').show(); } }); + +//选择人员 + $('.layui-form').on('click','[name="check_admin_name"]',function(){ + if($('[name="flow_id"]').val()==''){ + layer.msg('请先选择审批流程'); + return false; + } + employeepicker.init({ + department_url: "/api/index/get_department_tree", + employee_url: "/api/index/get_employee", + type:0, + callback:function(ids,names){ + $('[name="check_admin_ids"]').val(ids), + $('[name="check_admin_name"]').val(names); + } + }); + }) + + form.on('select(flowtype)', function(data){ + var check_type = data.elem[data.elem.selectedIndex].title; + var formHtml='审核人*\ + \ + \ + '; + if(check_type == 2){ + $('#flow_tr').html(formHtml); + form.render(); + } + else{ + $.ajax({ + url: "/api/index/get_flow_users", + type:'post', + data:{id:data.value}, + success: function (e) { + if (e.code == 0) { + var flowLi=''; + for(var a=0;a'+e.data[a].user_id_info[b].name+''; + } + } + flowLi+='
  • \ + \ +
    \ +

    第'+(a+1)+'级审批'+sign_type+'

    \ +
      '+userList+'
    \ +
    \ +
  • '; + } + + formHtml = '审批流程\ + \ +
      '+flowLi+'
    \ + '; + $('#flow_tr').html(formHtml); + } + } + }) + } + + }); + + //监听提交 - form.on('submit(webform)', function(data){ - + form.on('submit(webform)', function(data){ $.ajax({ - url: "/home/invoice/add", + url: "/finance/invoice/add", type:'post', data:data.field, success:function(e){ layer.msg(e.msg); - if(e.code==0){ - window.setTimeout(function(){ - parent.location.reload(); - },1200) + if (e.code == 0) { + parent.tableIns.reload(); + setTimeout(function(){ + parent.layui.rightpage.close(); + },1000); } } }) @@ -196,6 +284,6 @@ } -{include file="common/layui" base='base' extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} {/block} \ No newline at end of file diff --git a/app/finance/view/invoice/checkedlist.html b/app/finance/view/invoice/checkedlist.html new file mode 100644 index 0000000..e4ac350 --- /dev/null +++ b/app/finance/view/invoice/checkedlist.html @@ -0,0 +1,284 @@ +{extend name="../../base/view/common/base" /} + +{block name="body"} +
    + +
    +
    + +
    + ~ +
    + +
    +
    +
    + +
    + + +
    +
    + +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['rightpage']" use="['table','form']" callback="init" /} +{/block} + diff --git a/app/home/view/invoice/index.html b/app/finance/view/invoice/index.html similarity index 73% rename from app/home/view/invoice/index.html rename to app/finance/view/invoice/index.html index db06fac..8ef3e83 100644 --- a/app/home/view/invoice/index.html +++ b/app/finance/view/invoice/index.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"}
    @@ -13,12 +13,13 @@
    - - - + + +
    @@ -52,7 +53,7 @@ //监听搜索提交 form.on('submit(webform)', function(data){ let f=data.field; - tableIns.reload({where:{invoice_status:f.invoice_status,start_time:f.start_time,end_time:f.end_time},page:{curr:1}}); + tableIns.reload({where:{check_status:f.check_status,start_time:f.start_time,end_time:f.end_time},page:{curr:1}}); return false; }); @@ -60,7 +61,7 @@ elem: '#test', title: '发票列表', toolbar: '#toolbarDemo', - url: "/home/invoice/index", //数据接口 + url: "/finance/invoice/index", //数据接口 page: true, //开启分页 limit: 20, cols: [ @@ -106,33 +107,39 @@ return html; } },{ - field: 'invoice_status', + field: 'check_status', title: '发票状态', align: 'center', width: 100, templet:function(d){ - var html='审核不通过'; - if(d.invoice_status==1){ + var html='待审核'; + if(d.check_status==1){ html='审核中'; } - else if(d.invoice_status==2){ + else if(d.check_status==2){ html='待开具'; } - else if(d.invoice_status==3){ + else if(d.check_status==3){ + html='审核不通过'; + } + else if(d.check_status==4){ + html='撤销'; + } + else if(d.check_status==5){ html='已开具'; } - else if(d.invoice_status==10){ + else if(d.check_status==10){ html='已作废'; } return html; } },{ - field: 'user', + field: 'name', title: '申请人', align: 'center', width: 100 },{ - field: 'department', + field: 'department_name', title: '所属部门', align: 'center', width: 120 @@ -142,15 +149,9 @@ align: 'center', width: 150 },{ - field: 'check_name', - title: '审核人', - align: 'center', - width: 90 - },{ - field: 'check_time', - title: '审核时间', - align: 'center', - width: 136 + field: 'check_user', + title: '当前审核人', + width: 150 },{ field: 'open_name', title: '开票人', @@ -160,31 +161,28 @@ field: 'open_time', title: '开票时间', align: 'center', - width: 136 + width: 100 },{ field: 'code', title: '发票号码', align: 'center', - width: 120 + width: 132 }, { field: 'right', fixed: 'right', title: '操作', - width: 130, - align: 'right', + width: 164, + align: 'center', templet:function(d){ + //0待审、1审批中、2通过、3失败、4撤销、5已开具、10已作废 var html='
    '; var btn1='详情'; var btn2='编辑'; var btn3='删除'; - var btn4='作废'; html+=btn1; - if(d.invoice_status==0 && d.admin_id==login_user){ + if(d.check_status==4 && d.admin_id==login_user){ html+=btn2+btn3; } - if(d.invoice_status==3 && d.open_admin_id==login_user){ - html+=btn4; - } html+='
    '; return html; } @@ -196,7 +194,7 @@ //表头工具栏事件 table.on('toolbar(test)', function(obj){ if (obj.event === 'add') { - rightpage.open("/home/invoice/add"); + rightpage.open("/finance/invoice/add","900px"); return; } }); @@ -204,11 +202,11 @@ table.on('tool(test)', function(obj) { var data = obj.data; if (obj.event === 'view') { - rightpage.open("/home/invoice/view?id="+data.id); + rightpage.open("/finance/invoice/view?id="+data.id,"900px"); return; } if (obj.event === 'edit') { - rightpage.open("/home/invoice/add?id="+data.id); + rightpage.open("/finance/invoice/add?id="+data.id,"900px"); return; } if (obj.event === 'del') { @@ -217,7 +215,7 @@ title: '提示' }, function(index) { $.ajax({ - url: "/home/invoice/delete", + url: "/finance/invoice/delete", data: { id: data.id }, @@ -231,30 +229,9 @@ layer.close(index); }); } - if (obj.event === 'disabled') { - layer.confirm('确定作废该发票吗?', { - icon: 3, - title: '提示' - }, function(index) { - $.ajax({ - url: "/home/invoice/check", - data: { - id: data.id, - invoice_status:10 - }, - success: function(res) { - layer.msg(res.msg); - if (res.code == 0) { - location.reload(); - } - } - }) - layer.close(index); - }); - } }); } -{include file="common/layui" base='base' extend="['rightpage']" use="['table','form']" callback="init" /} +{include file="../../base/view/common/layui" base='base' extend="['rightpage']" use="['table','form']" callback="init" /} {/block} diff --git a/app/finance/view/invoice/list.html b/app/finance/view/invoice/list.html new file mode 100644 index 0000000..7530274 --- /dev/null +++ b/app/finance/view/invoice/list.html @@ -0,0 +1,174 @@ +{extend name="../../base/view/common/base" /} + +{block name="body"} +
    +
    +
      +
    • 全部
    • +
    • 待我审批
    • +
    • 我已审批
    • +
    +
    +
    +
    + +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['rightpage']" use="['table','form']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/finance/view/invoice/view.html b/app/finance/view/invoice/view.html new file mode 100644 index 0000000..420d4ad --- /dev/null +++ b/app/finance/view/invoice/view.html @@ -0,0 +1,452 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} + + + +{/block} + +{block name="body"} +
    +

    发票详情

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {notempty name="$detail.remark"} + + + + + {/notempty} + + + + + + + + + + + {if ( $detail.check_status lt 2) AND ( $is_check_admin eq 1) } + {eq name="$flows.flow_type" value="0"} + + + + + {/eq} + + + + + {/if} + {if ( $detail.check_status gt 4)} + + + + + + + + + + + + + {/if} +
    开票金额(元) + {$detail.amount} + 开票类型 + {eq name="$detail.invoice_type" value="1"}增值税专用发票{/eq} + {eq name="$detail.invoice_type" value="2"}增值税普通发票{/eq} + 开票主体 + {volist name=":oa_invoice_subject()" id="vo"} + {eq name="$vo.id" value="$detail.invoice_subject"}{$vo.title}{/eq} + {/volist} +
    抬头类型 + {eq name="$detail.type" value="1"}企业{/eq} + {eq name="$detail.type" value="2"}个人{/eq} + 开票抬头{$detail.invoice_title}电话号码{$detail.invoice_phone}
    纳税人识别号{$detail.invoice_tax}开户行{$detail.invoice_bank}银行账号{$detail.invoice_account}
    银行营业网点{$detail.invoice_banking}地址{$detail.invoice_address}
    备注信息{$detail.remark}
    发票状态 + {if condition="($detail.check_status == 0)"} + 待审 + {elseif condition="($detail.check_status == 1)"} + 审核中 + {elseif condition="($detail.check_status == 2)"} + 审核通过,待开具 + {elseif condition="($detail.check_status == 3)"} + 审核不通过 【原因:{$detail.check_remark}】 + {elseif condition="($detail.check_status == 4)"} + 撤销 【原因:{$detail.check_remark}】 + {elseif condition="($detail.check_status == 5)"} + 已开具 + {elseif condition="($detail.check_status == 10)"} + 已作废 + {/if} + 查看审批记录 + 当前审核人{$detail.check_user}
    审批流程 +
    +
    + +
    {$detail.create_user}
    +
    创建
    + +
    +
    +
    审批节点 * +
    + + +
    + +
    +
    +
    审批意见 * + +
    开票人{$detail.open_admin}发票号码{$detail.code}开票时间{$detail.open_time}
    快递单号{$detail.delivery}
    + + +
    + {eq name="$is_check_admin" value='1'} + 通过 + 拒绝 + {/eq} + {if ( $detail.check_status lt 2) AND ( $is_create_admin eq 1) } + 撤回 + {/if} + {if ( $detail.check_status eq 4) AND ( $is_create_admin eq 1) } + 重新编辑 + {/if} +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/home/common.php b/app/home/common.php index 86272ba..c2cdd31 100644 --- a/app/home/common.php +++ b/app/home/common.php @@ -9,189 +9,49 @@ *模块数据获取公共文件 ====================== */ -use think\facade\Cache; use think\facade\Db; -//设置缓存 -function set_cache($key, $value, $date = 86400) -{ - Cache::set($key, $value, $date); -} - -//读取缓存 -function get_cache($key) -{ - return Cache::get($key); -} - -//清空缓存 -function clear_cache($key) -{ - Cache::clear($key); -} - -//读取系统配置 -function get_system_config($name, $key = '') -{ - $config = []; - if (get_cache('system_config' . $name)) { - $config = get_cache('system_config' . $name); - } else { - $conf = Db::name('config')->where('name', $name)->find(); - if ($conf['content']) { - $config = unserialize($conf['content']); - } - set_cache('system_config' . $name, $config); - } - if ($key == '') { - return $config; - } else { - if ($config[$key]) { - return $config[$key]; - } - } -} - -//获取指定管理员的信息 -function get_admin($id) -{ - $admin = Db::name('Admin') - ->alias('a') - ->field('a.*,d.title as department,p.title as position') - ->leftJoin ('Department d ','d.id= a.did') - ->leftJoin ('Position p ','p.id= a.position_id') - ->where(['a.id' => $id]) - ->cache(true,60) - ->find(); - $admin['last_login_time'] = empty($admin['last_login_time']) ? '-' : date('Y-m-d H:i', $admin['last_login_time']); - return $admin; -} - -//获取当前登录用户的信息 -function get_login_admin($key = '') -{ - $session_admin = get_config('app.session_admin'); - if (\think\facade\Session::has($session_admin)) { - $gougu_admin = \think\facade\Session::get($session_admin); - $admin = get_admin($gougu_admin['id']); - if (!empty($key)) { - if (isset($admin[$key])) { - return $admin[$key]; - } else { - return ''; - } - } else { - return $admin; - } - } else { - return ''; - } -} //读取后台菜单列表 -function get_admin_menu() +function admin_menu() { - $menu = Db::name('AdminMenu')->order('sort asc,id asc')->select()->toArray(); + $menu = Db::name('AdminRule')->where(['menu' => 1,'status'=>1])->order('sort asc,id asc')->select()->toArray(); return $menu; } //读取权限节点列表 -function get_admin_rule() +function admin_rule() { - $rule = Db::name('AdminRule')->order('sort asc,id asc')->select()->toArray(); + $rule = Db::name('AdminRule')->where(['status'=>1])->order('sort asc,id asc')->select()->toArray(); return $rule; } //读取权限分组列表 -function get_admin_group() +function admin_group() { $group = Db::name('AdminGroup')->order('id desc')->select()->toArray(); return $group; } -//读取指定权限分组详情 -function get_admin_group_info($id) +//读取指定权限分组菜单详情 +function admin_group_info($id) { - $group = Db::name('AdminGroup')->where(['id' => $id])->find(); - $group['rules'] = explode(',', $group['rules']); - $group['menus'] = explode(',', $group['menus']); + $rule = Db::name('AdminGroup')->where(['id' => $id])->value('rules'); + $rules = explode(',', $rule); + return $rules; +} + +//读取模块列表 +function admin_module() +{ + $group = Db::name('AdminModule')->order('id asc')->select()->toArray(); return $group; } -//菜单父子关系排序,用于菜单 -function get_admin_menus() -{ - $admin = get_login_admin(); - if (get_cache('menu' . $admin['id'])) { - $list = get_cache('menu' . $admin['id']); - } else { - $adminGroup = Db::name('PositionGroup')->where(['pid' => $admin['position_id']])->column('group_id'); - $adminMenu = Db::name('AdminGroup')->where('id', 'in', $adminGroup)->column('menus'); - $adminMenus = []; - foreach ($adminMenu as $k => $v) { - $v = explode(',', $v); - $adminMenus = array_merge($adminMenus, $v); - } - $menu = Db::name('AdminMenu')->where('id', 'in', $adminMenus)->order('sort asc')->select()->toArray(); - $list = list_to_tree($menu); - Cache::tag('adminMenu')->set('menu' . $admin['id'], $list); - } - return $list; -} - - -/** - * 节点权限判断 - * @return bool - */ -function check_auth($rule, $uid) -{ - $auth_list = Cache::get('RulesSrc' . $uid); - if (!in_array($rule, $auth_list)) { - return false; - } else { - return true; - } -} - -//读取部门列表 -function get_department() -{ - $department = Db::name('Department')->where(['status' => 1])->select()->toArray(); - return $department; -} - -//获取某部门的子部门id.$is_self时候包含自己 -function get_department_son($did = 0, $is_self = 1) -{ - $department = get_department(); - $department_list = get_data_node($department, $did); - $department_array = array_column($department_list, 'id'); - if ($is_self == 1) { - //包括自己在内 - $department_array[] = $did; - } - return $department_array; -} - -//读取关键字列表 -function get_keywords() -{ - $keywords = Db::name('Keywords')->where(['status' => 1])->order('id desc')->select()->toArray(); - return $keywords; -} - -//读取公告分类列表 -function get_note_cate() -{ - $cate = Db::name('NoteCate')->order('id desc')->select()->toArray(); - return $cate; -} - //读取公告分类子分类ids -function get_note_son($id = 0, $is_self = 1) +function admin_note_cate_son($id = 0, $is_self = 1) { - $note = get_note_cate(); + $note = Db::name('NoteCate')->order('create_time asc')->select(); $note_list = get_data_node($note, $id); $note_array = array_column($note_list, 'id'); if ($is_self == 1) { @@ -201,17 +61,10 @@ function get_note_son($id = 0, $is_self = 1) return $note_array; } -//读取知识分类列表 -function get_article_cate() -{ - $cate = Db::name('ArticleCate')->order('id desc')->select()->toArray(); - return $cate; -} - //读取知识分类子分类ids -function get_article_son($id = 0, $is_self = 1) +function admin_article_cate_son($id = 0, $is_self = 1) { - $article = get_article_cate(); + $article = Db::name('ArticleCate')->order('id desc')->select()->toArray(); $article_list = get_data_node($article, $id); $article_array = array_column($article_list, 'id'); if ($is_self == 1) { @@ -220,202 +73,3 @@ function get_article_son($id = 0, $is_self = 1) } return $article_array; } - -//读取开票主体 -function get_invoice_subject() -{ - $subject = Db::name('InvoiceSubject')->where(['status' => 1])->order('id desc')->select()->toArray(); - return $subject; -} - -//读取审核人 -function get_check_user($type=1) -{ - $user = Db::name('Check') - ->field('c.*,a.name as user') - ->alias('c') - ->join('admin a', 'a.id = c.uid', 'LEFT') - ->where(['c.type'=>$type,'c.status' => 1]) - ->order('c.id desc') - ->select() - ->toArray(); - return $user; -} - -/** - * 根据附件表的id返回url地址 - * @param [type] $id [description] - */ -function get_file($id) -{ - if ($id) { - $geturl = Db::name("file")->where(['id' => $id])->find(); - if ($geturl['status'] == 1) { - //审核通过 - //获取签名的URL - $url = $geturl['filepath']; - return $url; - } elseif ($geturl['status'] == 0) { - //待审核 - return '/static/home/images/none_pic.jpg'; - } else { - //不通过 - return '/static/home/images/none_pic.jpg'; - } - } - return false; -} - -/** - * 发送站内信 - * @param $user_id 接收人user_id - * @param $data 操作内容 - * @param $sysMessage 1为系统消息 - * @param $template 消息模板 - * @return - */ -function sendMessage($user_id, $template, $data=[]) -{ - $content = get_config('message.template')[$template]['template']; - foreach ($data as $key => $val) { - $content = str_replace('{' . $key . '}', $val, $content); - } - if(isSet($data['from_uid'])){ - $content = str_replace('{from_user}', get_admin($data['from_uid'])['name'], $content); - } - $content = str_replace('{date}', date('Y-m-d'), $content); - - if (!$user_id) return false; - if (!$content) return false; - if (!is_array($user_id)) { - $users[] = $user_id; - } else { - $users = $user_id; - } - $users = array_unique(array_filter($users)); - //组合要发的消息 - $send_data = []; - foreach ($users as $key => $value) { - $send_data[] = array( - 'to_uid' => $value,//接收人 - 'action_id' => $data['action_id'], - 'title' => $data['title'], - 'content' => $content, - 'template' => $template, - 'module_name' => strtolower(app('http')->getName()), - 'controller_name' => strtolower(app('request')->controller()), - 'action_name' => strtolower(app('request')->action()), - 'send_time' => time(), - 'create_time' => time() - ); - } - $res = Db::name('Message')->strict(false)->field(true)->insertAll($send_data); - return $res; -} - -/** - * 员工操作日志 - * @param string $type 操作类型 login add edit view delete - * @param int $param_id 操作类型 - * @param array $param 提交的参数 - */ -function add_log($type, $param_id = '', $param = []) -{ - $action = '未知操作'; - $type_action = get_config('log.type_action'); - if($type_action[$type]){ - $action = $type_action[$type]; - } - if ($type == 'login') { - $login_admin = Db::name('Admin')->where(array('id' => $param_id))->find(); - } else { - $session_admin = get_config('app.session_admin'); - $login_admin = \think\facade\Session::get($session_admin); - } - $data = []; - $data['uid'] = $login_admin['id']; - $data['name'] = $login_admin['name']; - $data['type'] = $type; - $data['action'] = $action; - $data['param_id'] = $param_id; - $data['param'] = json_encode($param); - $data['module'] = strtolower(app('http')->getName()); - $data['controller'] = strtolower(app('request')->controller()); - $data['function'] = strtolower(app('request')->action()); - $parameter = $data['module'] . '/' . $data['controller'] . '/' . $data['function']; - $rule_menu = Db::name('AdminRule')->where(array('src' => $parameter))->find(); - if($rule_menu){ - $data['title'] = $rule_menu['title']; - $data['subject'] = $rule_menu['name']; - } - else{ - $data['title'] = ''; - $data['subject'] ='系统'; - } - $content = $login_admin['name'] . '在' . date('Y-m-d H:i:s') . $data['action'] . '了' . $data['subject']; - $data['content'] = $content; - $data['ip'] = app('request')->ip(); - $data['create_time'] = time(); - Db::name('AdminLog')->strict(false)->field(true)->insert($data); -} - -/** - * 邮件发送 - * @param $to 接收人 - * @param string $subject 邮件标题 - * @param string $content 邮件内容(html模板渲染后的内容) - * @throws Exception - * @throws phpmailerException - */ -function send_email($to, $subject = '', $content = '') -{ - $mail = new PHPMailer\PHPMailer\PHPMailer(); - $email_config = Db::name('config')->where('name', 'email')->find(); - $config = unserialize($email_config['content']); - - $mail->CharSet = 'UTF-8'; //设定邮件编码,默认ISO-8859-1,如果发中文此项必须设置,否则乱码 - $mail->isSMTP(); - $mail->SMTPDebug = 0; - - //调试输出格式 - //$mail->Debugoutput = 'html'; - //smtp服务器 - $mail->Host = $config['smtp']; - //端口 - likely to be 25, 465 or 587 - $mail->Port = $config['smtp_port']; - if ($mail->Port == '465') { - $mail->SMTPSecure = 'ssl'; // 使用安全协议 - } - //Whether to use SMTP authentication - $mail->SMTPAuth = true; - //发送邮箱 - $mail->Username = $config['smtp_user']; - //密码 - $mail->Password = $config['smtp_pwd']; - //Set who the message is to be sent from - $mail->setFrom($config['email'], $config['from']); - //回复地址 - //$mail->addReplyTo('replyto@example.com', 'First Last'); - //接收邮件方 - if (is_array($to)) { - foreach ($to as $v) { - $mail->addAddress($v); - } - } else { - $mail->addAddress($to); - } - - $mail->isHTML(true); // send as HTML - //标题 - $mail->Subject = $subject; - //HTML内容转换 - $mail->msgHTML($content); - $status = $mail->send(); - if ($status) { - return true; - } else { - // echo "Mailer Error: ".$mail->ErrorInfo;// 输出错误信息 - // die; - return false; - } -} diff --git a/app/home/controller/Api.php b/app/home/controller/Api.php deleted file mode 100644 index 5b77f2c..0000000 --- a/app/home/controller/Api.php +++ /dev/null @@ -1,358 +0,0 @@ -file('file')) { - $file = request()->file('file'); - } else { - return to_assign(1, '没有选择上传文件'); - } - // dump($file);die; - // 获取上传文件的hash散列值 - $sha1 = $file->hash('sha1'); - $md5 = $file->hash('md5'); - $rule = [ - 'image' => 'jpg,png,jpeg,gif', - 'doc' => 'doc,docx,ppt,pptx,xls,xlsx,pdf', - 'file' => 'zip,gz,7z,rar,tar', - ]; - $fileExt = $rule['image'] . ',' . $rule['doc'] . ',' . $rule['file']; - //1M=1024*1024=1048576字节 - $fileSize = 2 * 1024 * 1024; - if (isset($param['type']) && $param['type']) { - $fileExt = $rule[$param['type']]; - } - if (isset($param['size']) && $param['size']) { - $fileSize = $param['size']; - } - $validate = \think\facade\Validate::rule([ - 'image' => 'require|fileSize:' . $fileSize . '|fileExt:' . $fileExt, - ]); - $file_check['image'] = $file; - if (!$validate->check($file_check)) { - return to_assign(1, $validate->getError()); - } - // 日期前綴 - $dataPath = date('Ym'); - $use = 'thumb'; - $filename = \think\facade\Filesystem::disk('public')->putFile($dataPath, $file, function () use ($md5) { - return $md5; - }); - if ($filename) { - //写入到附件表 - $data = []; - $path = get_config('filesystem.disks.public.url'); - $data['filepath'] = $path . '/' . $filename; - $data['name'] = $file->getOriginalName(); - $data['mimetype'] = $file->getOriginalMime(); - $data['fileext'] = $file->extension(); - $data['filesize'] = $file->getSize(); - $data['filename'] = $filename; - $data['sha1'] = $sha1; - $data['md5'] = $md5; - $data['module'] = \think\facade\App::initialize()->http->getName(); - $data['action'] = app('request')->action(); - $data['uploadip'] = app('request')->ip(); - $data['create_time'] = time(); - $data['user_id'] = $this->uid; - if ($data['module'] = 'admin') { - //通过后台上传的文件直接审核通过 - $data['status'] = 1; - $data['admin_id'] = $data['user_id']; - $data['audit_time'] = time(); - } - $data['use'] = request()->has('use') ? request()->param('use') : $use; //附件用处 - $res['id'] = Db::name('file')->insertGetId($data); - $res['filepath'] = $data['filepath']; - $res['name'] = $data['name']; - $res['filename'] = $data['filename']; - add_log('upload', $data['user_id'], $data); - return to_assign(0, '上传成功', $res); - } else { - return to_assign(1, '上传失败,请重试'); - } - } - - //清空缓存 - public function cache_clear() - { - \think\facade\Cache::clear(); - return to_assign(0, '系统缓存已清空'); - } - - //获取权限树所需的节点列表 - public function get_rule() - { - $rule = get_admin_rule(); - $group = []; - if (!empty(get_params('id'))) { - $group = get_admin_group_info(get_params('id'))['rules']; - } - $list = create_tree_list(0, $rule, $group); - return to_assign(0, '', $list); - } - - //获取菜单树列表 - public function get_menu() - { - $rule = get_admin_menu(); - $group = []; - if (!empty(get_params('id'))) { - $group = get_admin_group_info(get_params('id'))['menus']; - } - $list = create_tree_list(0, $rule, $group); - return to_assign(0, '', $list); - } - - //获取关键字 - public function get_keyword_cate() - { - $keyword = get_keywords(); - return to_assign(0, '', $keyword); - } - - // 测试邮件发送 - public function email_test() - { - $sender = get_params('email'); - //检查是否邮箱格式 - if (!is_email($sender)) { - return to_assign(1, '测试邮箱码格式有误'); - } - $email_config = \think\facade\Db::name('config')->where('name', 'email')->find(); - $config = unserialize($email_config['content']); - $content = $config['template']; - //所有项目必须填写 - if (empty($config['smtp']) || empty($config['smtp_port']) || empty($config['smtp_user']) || empty($config['smtp_pwd'])) { - return to_assign(1, '请完善邮件配置信息!'); - } - - $send = send_email($sender, '测试邮件', $content); - if ($send) { - return to_assign(0, '邮件发送成功!'); - } else { - return to_assign(1, '邮件发送失败!'); - } - } - - //获取部门节点列表 - public function get_department_tree() - { - $department = get_department(); - $list = get_tree($department, 0, 2); - $data['trees'] = $list; - return json($data); - } - - //获取子部门所有员工 - public function get_employee($did = 0) - { - $did = get_params('did'); - $department = get_department_son($did); - $employee = Db::name('admin') - ->field('a.id,a.did,a.position_id,a.mobile,a.name,a.nickname,a.sex,a.status,a.thumb,a.username,d.title as department') - ->alias('a') - ->join('Department d', 'a.did = d.id') - ->where(['a.status' => 1]) - ->where('a.did', "in", $department) - ->select(); - return to_assign(0, '', $employee); - } - - //获取角色列表 - public function get_position() - { - $position = Db::name('Position')->field('id,title as name')->where([['status', '=', 1], ['id', '>', 1]])->select(); - return to_assign(0, '', $position); - } - - //首页公告 - public function get_note_list() - { - $list = Db::name('Note') - ->field('a.*,c.title as cate_title') - ->alias('a') - ->join('note_cate c', 'a.cate_id = c.id') - ->where(['a.status' => 1]) - ->order('a.id desc') - ->limit(10) - ->select()->toArray(); - foreach ($list as $key => $val) { - $list[$key]['create_time'] = date('Y-m-d :H:i', $val['create_time']); - } - $res['data'] = $list; - return table_assign(0, '', $res); - } - - //首页文章 - public function get_article_list() - { - $list = Db::name('Article') - ->field('a.*,c.title as cate_title') - ->alias('a') - ->join('article_cate c', 'a.article_cate_id = c.id') - ->where(['a.status' => 1]) - ->order('a.id desc') - ->limit(10) - ->select()->toArray(); - foreach ($list as $key => $val) { - $list[$key]['create_time'] = date('Y-m-d :H:i', $val['create_time']); - } - $res['data'] = $list; - return table_assign(0, '', $res); - } - - //修改个人信息 - public function edit_personal() - { - if (request()->isAjax()) { - $param = get_params(); - $uid = $this->uid; - Db::name('Admin')->where(['id' => $uid])->strict(false)->field(true)->update($param); - $session_admin = get_config('app.session_admin'); - Session::set($session_admin, Db::name('admin')->find($uid)); - return to_assign(); - } - else{ - return view('admin/edit_personal', [ - 'admin' => get_admin($this->uid), - ]); - } - } - - //修改密码 - public function edit_password() - { - if (request()->isAjax()) { - $param = get_params(); - try { - validate(AdminCheck::class)->scene('editPwd')->check($param); - } catch (ValidateException $e) { - // 验证失败 输出错误信息 - return to_assign(1, $e->getError()); - } - $uid = $this->uid; - - $admin = Db::name('Admin')->where(['id' => $uid])->find(); - $old_psw = set_password($param['old_pwd'], $admin['salt']); - if ($admin['pwd'] != $old_psw) { - return to_assign(1, '旧密码错误'); - } - - $salt = set_salt(20); - $new_pwd = set_password($param['pwd'], $salt); - $data = [ - 'reg_pwd' => '', - 'salt' => $salt, - 'pwd' => $new_pwd, - 'update_time' => time(), - ]; - Db::name('Admin')->where(['id' => $uid])->strict(false)->field(true)->update($data); - $session_admin = get_config('app.session_admin'); - Session::set($session_admin, Db::name('admin')->find($uid)); - return to_assign(); - } - else{ - return view('admin/edit_password', [ - 'admin' => get_admin($this->uid), - ]); - } - } - - //保存密码修改 - public function password_submit() - { - if (request()->isAjax()) { - $param = get_params(); - try { - validate(AdminCheck::class)->scene('editpwd')->check($param); - } catch (ValidateException $e) { - // 验证失败 输出错误信息 - return to_assign(1, $e->getError()); - } - $admin = get_admin($this->uid); - if (set_password($param['old_pwd'], $admin['salt']) !== $admin['pwd']) { - return to_assign(1, '旧密码不正确!'); - } - unset($param['username']); - $param['salt'] = set_salt(20); - $param['pwd'] = set_password($param['pwd'], $param['salt']); - Db::name('Admin')->where(['id' => $admin['id'], - ])->strict(false)->field(true)->update($param); - $session_admin = get_config('app.session_admin'); - Session::set($session_admin, Db::name('admin')->find($admin['id'])); - return to_assign(); - } - } - - //删除 - public function del_expense_interfix() - { - $id = get_params("id"); - $admin_id = Db::name('ExpenseInterfix')->where('id', $id)->value('admin_id'); - if ($admin_id == $this->uid) { - if (Db::name('ExpenseInterfix')->where('id', $id)->delete() !== false) { - return to_assign(0, "删除成功"); - } else { - return to_assign(1, "删除失败"); - } - } else { - return to_assign(1, "您没权限删除该报销数据"); - } - - } - - //系统操作日志 - public function log_list() - { - return view('admin/log_list'); - } - - //获取系统操作日志 - public function get_log_list() - { - $param = get_params(); - $log = new AdminLog(); - $content = $log->get_log_list($param); - return table_assign(0, '', $content); - } - - //获取访问记录 - public function get_view_data() - { - $param = get_params(); - $first_time = time(); - $second_time = $first_time - 86400; - $three_time = $first_time - 86400 * 365; - $begin_first = strtotime(date('Y-m-d', $first_time) . " 00:00:00"); - $end_first = strtotime(date('Y-m-d', $first_time) . " 23:59:59"); - $begin_second = strtotime(date('Y-m-d', $second_time) . " 00:00:00"); - $end_second = strtotime(date('Y-m-d', $second_time) . " 23:59:59"); - $begin_three = strtotime(date('Y-m-d', $three_time) . " 00:00:00"); - $data_first = Db::name('AdminLog')->field('create_time')->whereBetween('create_time', "$begin_first,$end_first")->select(); - $data_second = Db::name('AdminLog')->field('create_time')->whereBetween('create_time', "$begin_second,$end_second")->select(); - $data_three = Db::name('AdminLog')->field('create_time')->whereBetween('create_time', "$begin_three,$end_first")->select(); - return to_assign(0, '', ['data_first' => hour_document($data_first), 'data_second' => hour_document($data_second), 'data_three' => date_document($data_three)]); - } - -} diff --git a/app/home/controller/Cate.php b/app/home/controller/Cate.php new file mode 100644 index 0000000..6bf5067 --- /dev/null +++ b/app/home/controller/Cate.php @@ -0,0 +1,591 @@ +isAjax()) { + $cate = Db::name('FlowType')->order('id asc')->select(); + return to_assign(0, '', $cate); + } else { + return view(); + } + } + + //审批类型添加 + public function flow_type_add() + { + $param = get_params(); + if (request()->isAjax()) { + if (!empty($param['id']) && $param['id'] > 0) { + try { + validate(FlowTypeCheck::class)->scene('edit')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $data['update_time'] = time(); + $res = Db::name('FlowType')->strict(false)->field(true)->update($param); + if ($res) { + add_log('edit', $param['id'], $param); + } + return to_assign(); + } else { + try { + validate(FlowTypeCheck::class)->scene('add')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $param['create_time'] = time(); + $insertId = Db::name('FlowType')->strict(false)->field(true)->insertGetId($param); + if ($insertId) { + add_log('add', $insertId, $param); + } + return to_assign(); + } + } + else { + $id = isset($param['id']) ? $param['id'] : 0; + if ($id > 0) { + $detail = Db::name('FlowType')->where(['id' => $id])->find(); + View::assign('detail', $detail); + } + View::assign('id', $id); + return view(); + } + } + + //审批类型设置 + public function flow_type_check() + { + $param = get_params(); + $res = Db::name('FlowType')->strict(false)->field('id,status')->update($param); + if ($res) { + if($param['status'] == 0){ + add_log('disable', $param['id'], $param); + } + else if($param['status'] == 1){ + add_log('recovery', $param['id'], $param); + } + return to_assign(); + } + else{ + return to_assign(0, '操作失败'); + } + } + + //费用类别 + public function cost_cate() + { + if (request()->isAjax()) { + $cate = Db::name('CostCate')->order('create_time asc')->select(); + return to_assign(0, '', $cate); + } else { + return view(); + } + } + //费用类别添加 + public function cost_cate_add() + { + if (request()->isAjax()) { + $param = get_params(); + if (!empty($param['id']) && $param['id'] > 0) { + try { + validate(CostCateCheck::class)->scene('edit')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $data['update_time'] = time(); + $res = Db::name('CostCate')->strict(false)->field(true)->update($param); + if ($res) { + add_log('edit', $param['id'], $param); + } + return to_assign(); + } else { + try { + validate(CostCateCheck::class)->scene('add')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $param['create_time'] = time(); + $insertId = Db::name('CostCate')->strict(false)->field(true)->insertGetId($param); + if ($insertId) { + add_log('add', $insertId, $param); + } + return to_assign(); + } + } + } + + //费用类别设置 + public function cost_cate_check() + { + $param = get_params(); + $res = Db::name('CostCate')->strict(false)->field('id,status')->update($param); + if ($res) { + if($param['status'] == 0){ + add_log('disable', $param['id'], $param); + } + else if($param['status'] == 1){ + add_log('recovery', $param['id'], $param); + } + return to_assign(); + } + else{ + return to_assign(0, '操作失败'); + } + } + + //印章类别 + public function seal_cate() + { + if (request()->isAjax()) { + $cate = Db::name('SealCate')->order('create_time asc')->select(); + return to_assign(0, '', $cate); + } else { + return view(); + } + } + //印章类别添加 + public function seal_cate_add() + { + if (request()->isAjax()) { + $param = get_params(); + if (!empty($param['id']) && $param['id'] > 0) { + try { + validate(SealCateCheck::class)->scene('edit')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $data['update_time'] = time(); + $res = Db::name('SealCate')->strict(false)->field(true)->update($param); + if ($res) { + add_log('edit', $param['id'], $param); + } + return to_assign(); + } else { + try { + validate(SealCateCheck::class)->scene('add')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $param['create_time'] = time(); + $insertId = Db::name('SealCate')->strict(false)->field(true)->insertGetId($param); + if ($insertId) { + add_log('add', $insertId, $param); + } + return to_assign(); + } + } + } + + //印章类别设置 + public function seal_cate_check() + { + $param = get_params(); + $res = Db::name('SealCate')->strict(false)->field('id,status')->update($param); + if ($res) { + if($param['status'] == 0){ + add_log('disable', $param['id'], $param); + } + else if($param['status'] == 1){ + add_log('recovery', $param['id'], $param); + } + return to_assign(); + } + else{ + return to_assign(0, '操作失败'); + } + } + + //车辆类型 + public function car_cate() + { + if (request()->isAjax()) { + $cate = Db::name('CarCate')->order('create_time asc')->select(); + return to_assign(0, '', $cate); + } else { + return view(); + } + } + //车辆类型添加 + public function car_cate_add() + { + if (request()->isAjax()) { + $param = get_params(); + if (!empty($param['id']) && $param['id'] > 0) { + try { + validate(CarCateCheck::class)->scene('edit')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $data['update_time'] = time(); + $res = Db::name('CarCate')->strict(false)->field(true)->update($param); + if ($res) { + add_log('edit', $param['id'], $param); + } + return to_assign(); + } else { + try { + validate(CarCateCheck::class)->scene('add')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $param['create_time'] = time(); + $insertId = Db::name('CarCate')->strict(false)->field(true)->insertGetId($param); + if ($insertId) { + add_log('add', $insertId, $param); + } + return to_assign(); + } + } + } + + //车辆类型设置 + public function car_cate_check() + { + $param = get_params(); + $res = Db::name('CarCate')->strict(false)->field('id,status')->update($param); + if ($res) { + if($param['status'] == 0){ + add_log('disable', $param['id'], $param); + } + else if($param['status'] == 1){ + add_log('recovery', $param['id'], $param); + } + return to_assign(); + } + else{ + return to_assign(0, '操作失败'); + } + } + + //报销类别 + public function expense_cate() + { + if (request()->isAjax()) { + $cate = Db::name('ExpenseCate')->order('create_time asc')->select(); + return to_assign(0, '', $cate); + } else { + return view(); + } + } + //报销类别添加 + public function expense_cate_add() + { + if (request()->isAjax()) { + $param = get_params(); + if (!empty($param['id']) && $param['id'] > 0) { + try { + validate(ExpenseCateCheck::class)->scene('edit')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $data['update_time'] = time(); + $res = Db::name('ExpenseCate')->strict(false)->field(true)->update($param); + if ($res) { + add_log('edit', $param['id'], $param); + } + return to_assign(); + } else { + try { + validate(ExpenseCateCheck::class)->scene('add')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $param['create_time'] = time(); + $insertId = Db::name('ExpenseCate')->strict(false)->field(true)->insertGetId($param); + if ($insertId) { + add_log('add', $insertId, $param); + } + return to_assign(); + } + } + } + + //报销类别设置 + public function expense_cate_check() + { + $param = get_params(); + $res = Db::name('ExpenseCate')->strict(false)->field('id,status')->update($param); + if ($res) { + if($param['status'] == 0){ + add_log('disable', $param['id'], $param); + } + else if($param['status'] == 1){ + add_log('recovery', $param['id'], $param); + } + return to_assign(); + } + else{ + return to_assign(0, '操作失败'); + } + } + + //发票主体 + public function subject() + { + if (request()->isAjax()) { + $subject = Db::name('InvoiceSubject')->order('create_time asc')->select(); + return to_assign(0, '', $subject); + } else { + return view(); + } + } + //发票主体新建编辑 + public function subject_add() + { + if (request()->isAjax()) { + $param = get_params(); + if (!empty($param['id']) && $param['id'] > 0) { + try { + validate(InvoiceSubjectCheck::class)->scene('edit')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $param['update_time'] = time(); + $res = Db::name('InvoiceSubject')->strict(false)->field('title,id,update_time')->update($param); + if ($res) { + add_log('edit', $param['id'], $param); + } + return to_assign(); + } else { + try { + validate(InvoiceSubjectCheck::class)->scene('add')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $param['create_time'] = time(); + $insertId = Db::name('InvoiceSubject')->strict(false)->field('title,id,create_time')->insertGetId($param); + if ($insertId) { + add_log('add', $insertId, $param); + } + return to_assign(); + } + } + } + + //发票主体设置 + public function subject_check() + { + $param = get_params(); + $res = Db::name('InvoiceSubject')->strict(false)->field('id,status')->update($param); + if ($res) { + if($param['status'] == 0){ + add_log('disable', $param['id'], $param); + } + else if($param['status'] == 1){ + add_log('recovery', $param['id'], $param); + } + return to_assign(); + } + else{ + return to_assign(0, '操作失败'); + } + } + + //公告类别 + public function note_cate() + { + if (request()->isAjax()) { + $cate = Db::name('NoteCate')->order('create_time asc')->select(); + return to_assign(0, '', $cate); + } else { + return view(); + } + } + + //公告类别添加 + public function note_cate_add() + { + $param = get_params(); + if (request()->isAjax()) { + if (!empty($param['id']) && $param['id'] > 0) { + try { + validate(NoteCateCheck::class)->scene('edit')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $note_array = admin_note_cate_son($param['id']); + if (in_array($param['pid'], $note_array)) { + return to_assign(1, '父级分类不能是该分类本身或其子分类'); + } else { + $param['update_time'] = time(); + $res = Db::name('NoteCate')->strict(false)->field(true)->update($param); + if ($res) { + add_log('edit', $param['id'], $param); + } + return to_assign(); + } + } else { + try { + validate(NoteCateCheck::class)->scene('add')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $param['create_time'] = time(); + $insertId = Db::name('NoteCate')->strict(false)->field(true)->insertGetId($param); + if ($insertId) { + add_log('add', $insertId, $param); + } + return to_assign(); + } + } else { + $id = isset($param['id']) ? $param['id'] : 0; + $pid = isset($param['pid']) ? $param['pid'] : 0; + $cate = $cate = Db::name('NoteCate')->order('id desc')->select()->toArray(); + $cates = set_recursion($cate); + if ($id > 0) { + $detail = Db::name('NoteCate')->where(['id' => $id])->find(); + View::assign('detail', $detail); + } + View::assign('id', $id); + View::assign('pid', $pid); + View::assign('cates', $cates); + return view(); + } + } + + //公告类别删除 + public function note_cate_delete() + { + $id = get_params("id"); + $cate_count = Db::name('NoteCate')->where(["pid" => $id])->count(); + if ($cate_count > 0) { + return to_assign(1, "该分类下还有子分类,无法删除"); + } + $content_count = Db::name('Article')->where(["article_cate_id" => $id])->count(); + if ($content_count > 0) { + return to_assign(1, "该分类下还有文章,无法删除"); + } + if (Db::name('NoteCate')->delete($id) !== false) { + add_log('delete', $id); + return to_assign(0, "删除分类成功"); + } else { + return to_assign(1, "删除失败"); + } + } + + //文章类别 + public function article_cate() + { + if (request()->isAjax()) { + $cate = Db::name('ArticleCate')->order('create_time asc')->select(); + return to_assign(0, '', $cate); + } else { + return view(); + } + } + + //文章分类添加&编辑 + public function article_cate_add() + { + $param = get_params(); + if (request()->isAjax()) { + if (!empty($param['id']) && $param['id'] > 0) { + try { + validate(ArticleCateCheck::class)->scene('edit')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $note_array = admin_article_cate_son($param['id']); + if (in_array($param['pid'], $note_array)) { + return to_assign(1, '父级分类不能是该分类本身或其子分类'); + } else { + $param['update_time'] = time(); + $res = Db::name('ArticleCate')->strict(false)->field(true)->update($param); + if($res){ + add_log('edit', $param['id'], $param); + return to_assign(); + } + } + } else { + try { + validate(ArticleCateCheck::class)->scene('add')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $param['create_time'] = time(); + $insertId = Db::name('ArticleCate')->strict(false)->field(true)->insertGetId($param); + if ($insertId) { + add_log('add', $insertId, $param); + } + return to_assign(); + } + } else { + $id = isset($param['id']) ? $param['id'] : 0; + $pid = isset($param['pid']) ? $param['pid'] : 0; + $cate = Db::name('ArticleCate')->order('id desc')->select()->toArray(); + $cates = set_recursion($cate); + if ($id > 0) { + $detail = Db::name('ArticleCate')->where(['id' => $id])->find(); + View::assign('detail', $detail); + } + View::assign('id', $id); + View::assign('pid', $pid); + View::assign('cates', $cates); + return view(); + } + } + + //删除文章分类 + public function article_cate_delete() + { + $id = get_params("id"); + $cate_count = Db::name('ArticleCate')->where(["pid" => $id])->count(); + if ($cate_count > 0) { + return to_assign(1, "该分类下还有子分类,无法删除"); + } + $content_count = Db::name('Article')->where(["article_cate_id" => $id])->count(); + if ($content_count > 0) { + return to_assign(1, "该分类下还有文章,无法删除"); + } + if (Db::name('ArticleCate')->delete($id) !== false) { + add_log('delete', $id); + return to_assign(0, "删除分类成功"); + } else { + return to_assign(1, "删除失败"); + } + } + + +} diff --git a/app/home/controller/Check.php b/app/home/controller/Check.php deleted file mode 100644 index 962166d..0000000 --- a/app/home/controller/Check.php +++ /dev/null @@ -1,83 +0,0 @@ -isAjax()) { - $param = get_params(); - $where = array(); - $where[] = ['a.status', '>=', 0]; - $rows = empty($param['limit']) ? get_config(app . page_size) : $param['limit']; - $content = Db::name('Check') - ->field('a.*,u.username as username,u.name as name') - ->alias('a') - ->join('Admin u', 'a.uid = u.id', 'LEFT') - ->where($where) - ->paginate($rows, false, ['query' => $param]); - return table_assign(0, '', $content); - } else { - return view(); - } - } - - //添加/编辑 - public function add() - { - $param = get_params(); - if (request()->isAjax()) { - if (!empty($param['id']) && $param['id'] > 0) { - $param['update_time'] = time(); - $res = Db::name('Check')->strict(false)->field(true)->update($param); - if ($res) { - add_log('edit', $param['id'], $param); - } - return to_assign(); - } else { - $param['create_time'] = time(); - $insertId = Db::name('Check')->strict(false)->field(true)->insertGetId($param); - if ($insertId) { - add_log('add', $insertId, $param); - } - return to_assign(); - } - } else { - $id = isset($param['id']) ? $param['id'] : 0; - if ($id > 0) { - $detail = Db::name('Check')->where(['id' => $id])->find(); - $detail['name'] = Db::name('Admin')->where(['id' => $detail['uid']])->value('name'); - View::assign('detail', $detail); - } - View::assign('id', $id); - return view(); - } - } - - //删除 - public function delete() - { - $id = get_params("id"); - $data['status'] = '-1'; - $data['id'] = $id; - $data['update_time'] = time(); - if (Db::name('Config')->update($data) !== false) { - add_log('delete', $id, $data); - return to_assign(0, "删除成功"); - } else { - return to_assign(1, "删除失败"); - } - } -} diff --git a/app/home/controller/Expense.php b/app/home/controller/Expense.php deleted file mode 100644 index 6f45ade..0000000 --- a/app/home/controller/Expense.php +++ /dev/null @@ -1,328 +0,0 @@ -isAjax()) { - $cate = Db::name('ExpenseCate')->order('create_time asc')->select(); - return to_assign(0, '', $cate); - } else { - return view(); - } - } - //提交保存分类 - public function cate_add() - { - if (request()->isAjax()) { - $param = get_params(); - if (!empty($param['id']) && $param['id'] > 0) { - try { - validate(ExpenseCateCheck::class)->scene('edit')->check($param); - } catch (ValidateException $e) { - // 验证失败 输出错误信息 - return to_assign(1, $e->getError()); - } - $data['update_time'] = time(); - $res = ExpenseCate::strict(false)->field(true)->update($param); - if ($res) { - add_log('edit', $param['id'], $param); - } - return to_assign(); - } else { - try { - validate(ExpenseCateCheck::class)->scene('add')->check($param); - } catch (ValidateException $e) { - // 验证失败 输出错误信息 - return to_assign(1, $e->getError()); - } - $param['create_time'] = time(); - $insertId = ExpenseCate::strict(false)->field(true)->insertGetId($param); - if ($insertId) { - add_log('add', $insertId, $param); - } - return to_assign(); - } - } - } - - public function get_list($param = [], $where = []) - { - $rows = empty($param['limit']) ? get_config('app . page_size') : $param['limit']; - $expense = ExpenseList::where($where) - ->order('id desc') - ->paginate($rows, false, ['query' => $param]) - ->each(function ($item, $key) { - $item->income_month = empty($item->income_month) ? '-' : date('Y-m', $item->income_month); - $item->expense_time = empty($item->expense_time) ? '-' : date('Y-m-d', $item->expense_time); - $item->admin_name = Db::name('Admin')->where(['id' => $item->admin_id])->value('name'); - $item->department = Db::name('Department')->where(['id' => $item->admin_id])->value('title'); - $item->check_name = Db::name('Admin')->where(['id' => $item->check_admin_id])->value('name'); - $item->check_time = empty($item->check_time) ? '-' : date('Y-m-d H:i', $item->check_time); - $item->pay_name = Db::name('Admin')->where(['id' => $item->pay_admin_id])->value('name'); - $item->pay_time = empty($item->pay_time) ? '-' : date('Y-m-d H:i', $item->pay_time); - $item->amount = Db::name('ExpenseInterfix')->where(['exid' => $item->id])->sum('amount'); - }); - return $expense; - } - - public function detail($id = 0) - { - $expense = Db::name('Expense')->where(['id' => $id])->find(); - if ($expense) { - $expense['income_month'] = empty($expense['income_month']) ? '-' : date('Y-m', $expense['income_month']); - $expense['expense_time'] = empty($expense['expense_time']) ? '-' : date('Y-m-d', $expense['expense_time']); - $expense['user_name'] = Db::name('Admin')->where(['id' => $expense['admin_id']])->value('name'); - $expense['department'] = Db::name('Department')->where(['id' => $expense['did']])->value('title'); - $expense['amount'] = Db::name('ExpenseInterfix')->where(['exid' => $expense['id']])->sum('amount'); - $expense['check_admin'] = Db::name('Admin')->where(['id' => $expense['check_admin_id']])->value('name'); - $expense['pay_admin'] = Db::name('Admin')->where(['id' => $expense['pay_admin_id']])->value('name'); - if ($expense['check_time'] > 0) { - $expense['check_time'] = date('Y-m-d H:i:s', $expense['check_time']); - } - if ($expense['pay_time'] > 0) { - $expense['pay_time'] = date('Y-m-d H:i:s', $expense['pay_time']); - } - else{ - $expense['pay_time'] = '-'; - } - $expense['list'] = Db::name('ExpenseInterfix') - ->field('a.*,c.title as cate_title') - ->alias('a') - ->join('ExpenseCate c', 'a.cate_id = c.id','LEFT') - ->where(['a.exid' => $expense['id']]) - ->select(); - } - return $expense; - } - - public function index() - { - if (request()->isAjax()) { - $param = get_params(); - $where = []; - $where[] = ['status', '=', 1]; - //按时间检索 - $start_time = isset($param['start_time']) ? strtotime(urldecode($param['start_time'])) : 0; - $end_time = isset($param['end_time']) ? strtotime(urldecode($param['end_time'])) : 0; - if ($start_time > 0 && $end_time > 0) { - $where[] = ['expense_time', 'between', [$start_time, $end_time]]; - } - - if (isset($param['check_status']) && $param['check_status']!='') { - $where[] = ['check_status', '=', $param['check_status']]; - } - $expense = $this->get_list($param, $where); - return table_assign(0, '', $expense); - } else { - return view(); - } - } - - //添加 - public function add() - { - $param = get_params(); - if (request()->isAjax()) { - $dbRes = false; - $admin_id = $this->uid; - $param['income_month'] = isset($param['income_month']) ? strtotime(urldecode($param['income_month'])) : 0; - $param['expense_time'] = isset($param['expense_time']) ? strtotime(urldecode($param['expense_time'])) : 0; - $param['check_status'] = 1; - if (!empty($param['id']) && $param['id'] > 0) { - try { - validate(ExpenseCheck::class)->scene('edit')->check($param); - } catch (ValidateException $e) { - // 验证失败 输出错误信息 - return to_assign(1, $e->getError()); - } - $param['update_time'] = time(); - Db::startTrans(); - try { - $res = ExpenseList::where('id', $param['id'])->strict(false)->field(true)->update($param); - if ($res !== false) { - $exid = $param['id']; - //相关内容多个数组; - $amountData = isset($param['amount']) ? $param['amount'] : ''; - $remarksData = isset($param['remarks']) ? $param['remarks'] : ''; - $cateData = isset($param['cate_id']) ? $param['cate_id'] : ''; - $idData = isset($param['expense_id']) ? $param['expense_id'] : 0; - if ($amountData) { - foreach ($amountData as $key => $value) { - if (!$value) { - continue; - } - $data = []; - $data['id'] = $idData[$key]; - $data['exid'] = $exid; - $data['admin_id'] = $admin_id; - $data['amount'] = $amountData[$key]; - $data['cate_id'] = $cateData[$key]; - $data['remarks'] = $remarksData[$key]; - if ($data['amount'] == 0) { - Db::rollback(); - return to_assign(1, '第' . ($key + 1) . '条报销金额不能为零'); - } - if ($data['id'] > 0) { - $data['update_time'] = time(); - $resa = Db::name('ExpenseInterfix')->strict(false)->field(true)->update($data); - } else { - $data['create_time'] = time(); - $eid = Db::name('ExpenseInterfix')->strict(false)->field(true)->insertGetId($data); - } - } - } - add_log('edit', $exid, $param); - Db::commit(); - $dbRes = true; - } else { - Db::rollback(); - } - } catch (\Exception $e) { ##这里参数不能删除($e:错误信息) - Db::rollback(); - return to_assign(1, $e->getMessage()); - } - } else { - try { - validate(ExpenseCheck::class)->scene('add')->check($param); - } catch (ValidateException $e) { - // 验证失败 输出错误信息 - return to_assign(1, $e->getError()); - } - $param['create_time'] = time(); - $param['admin_id'] = $admin_id; - $param['did'] = get_login_admin('did'); - Db::startTrans(); - try { - $exid = ExpenseList::strict(false)->field(true)->insertGetId($param); - if ($exid) { - //相关内容多个数组; - $amountData = isset($param['amount']) ? $param['amount'] : ''; - $remarksData = isset($param['remarks']) ? $param['remarks'] : ''; - $cateData = isset($param['cate_id']) ? $param['cate_id'] : ''; - if ($amountData) { - foreach ($amountData as $key => $value) { - if (!$value) { - continue; - } - $data = []; - $data['exid'] = $exid; - $data['admin_id'] = $admin_id; - $data['amount'] = $amountData[$key]; - $data['cate_id'] = $cateData[$key]; - $data['remarks'] = $remarksData[$key]; - $data['create_time'] = time(); - if ($data['amount'] == 0) { - Db::rollback(); - return to_assign(1, '第' . ($key + 1) . '条报销金额不能为零'); - } - $eid = Db::name('ExpenseInterfix')->strict(false)->field(true)->insertGetId($data); - } - } - add_log('add', $exid, $param); - Db::commit(); - $dbRes = true; - } else { - Db::rollback(); - } - } catch (\Exception $e) { ##这里参数不能删除($e:错误信息) - Db::rollback(); - return to_assign(1, $e->getMessage()); - } - } - if ($dbRes == true) { - return to_assign(); - } else { - return to_assign(1, '保存失败'); - } - } - else{ - $id = isset($param['id']) ? $param['id'] : 0; - if ($id > 0) { - $expense = $this->detail($id); - View::assign('expense', $expense); - } - $expense_cate = Db::name('ExpenseCate')->where(['status' => 1])->select()->toArray(); - View::assign('user', get_admin($this->uid)); - View::assign('expense_cate', $expense_cate); - View::assign('id', $id); - return view(); - } - } - - //查看 - public function view() - { - $id = empty(get_params('id')) ? 0 : get_params('id'); - $expense = $this->detail($id); - View::assign('uid', $this->uid); - View::assign('expense', $expense); - return view(); - } - - //删除 - public function delete() - { - $id = get_params("id"); - $expense = $this->detail($id); - if ($expense['check_status'] == 2) { - return to_assign(1, "已审核的报销记录不能删除"); - } - if ($expense['check_status'] == 3) { - return to_assign(1, "已打款的报销记录不能删除"); - } - $data['status'] = '-1'; - $data['id'] = $id; - $data['update_time'] = time(); - if (Db::name('expense')->update($data) !== false) { - add_log('delete', $id); - return to_assign(0, "删除成功"); - } else { - return to_assign(1, "删除失败"); - } - } - //设置 - public function check() - { - $param = get_params(); - if (request()->isAjax()) { - if ($param['check_status'] == 2 || $param['check_status'] == 0) { - $param['check_admin_id'] = $this->uid; - $param['check_time'] = time(); - } - if ($param['check_status'] == 3) { - $param['pay_admin_id'] = $this->uid; - $param['pay_time'] = time(); - } - $res = ExpenseList::where('id', $param['id'])->strict(false)->field(true)->update($param); - if ($res !== false) { - return to_assign(); - } else { - return to_assign(1, "操作失败"); - } - } else { - $expense = $this->detail($param['id']); - View::assign('expense', $expense); - View::assign('uid', $this->uid); - return view(); - } - } -} diff --git a/app/home/controller/Flow.php b/app/home/controller/Flow.php new file mode 100644 index 0000000..ad209a3 --- /dev/null +++ b/app/home/controller/Flow.php @@ -0,0 +1,127 @@ +isAjax()) { + $list = Db::name('Flow') + ->field('f.*,a.name as username,t.title as flow_cate') + ->alias('f') + ->join('Admin a', 'a.id = f.admin_id', 'left') + ->join('FlowType t', 't.id = f.flow_cate', 'left') + ->select()->toArray(); + foreach ($list as $key => &$value){ + $department = Db::name('Department')->where('id','in',$value['department_ids'])->column('title'); + $value['department'] = implode(',',$department); + if($value['department']==''){ + $value['department'] = '全公司'; + } + } + return to_assign(0, '', $list); + } else { + return view(); + } + } + + //添加新增/编辑 + public function add() + { + $param = get_params(); + if (request()->isAjax()) { + $flowTypeData = isset($param['flowType']) ? $param['flowType'] : ''; + $flowUidsData = isset($param['flowUids']) ? $param['flowUids'] : ''; + $flow_list=[]; + foreach ($flowTypeData as $key => $value) { + if (!$value) { + continue; + } + $item = []; + $item['flow_type'] = $value; + $item['flow_uids'] = $flowUidsData[$key]; + $flow_list[]=$item; + } + $param['flow_list'] = serialize($flow_list); + if ($param['id'] > 0) { + try { + validate(FlowCheck::class)->scene('edit')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $param['update_time'] = time(); + Db::name('Flow')->strict(false)->field(true)->update($param); + add_log('edit', $param['id'], $param); + } else { + try { + validate(FlowCheck::class)->scene('add')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $param['admin_id'] = $this->uid; + $param['create_time'] = time(); + $mid = Db::name('Flow')->strict(false)->field(true)->insertGetId($param); + add_log('add', $mid, $param); + } + return to_assign(); + } else { + $id = isset($param['id']) ? $param['id'] : 0; + if($id>0){ + $detail = Db::name('Flow')->where('id',$id)->find(); + $detail['flow_list'] = unserialize($detail['flow_list']); + $detail['flow_cate_list'] = Db::name('FlowType')->where(['type'=>$detail['type'],'status'=>1])->select()->toArray(); + View::assign('detail', $detail); + } + View::assign('id', $id); + return view(); + } + } + + //添加&编辑 + public function flow() + { + $param = get_params(); + if (request()->isAjax()) { + + } + else{ + return view(); + } + } + + //禁用/启用 + public function check() + { + $param = get_params(); + $param['update_time']= time(); + $res = Db::name('Flow')->strict(false)->field('status,update_time')->update($param); + if($res!==false){ + if($param['status'] == 0){ + add_log('disable', $param['id'], $param); + } + else if($param['status'] == 1){ + add_log('recovery', $param['id'], $param); + } + return to_assign(); + } + else{ + return to_assign(1,'操作失败'); + } + } +} diff --git a/app/home/controller/Index.php b/app/home/controller/Index.php index 214f246..9afc07c 100644 --- a/app/home/controller/Index.php +++ b/app/home/controller/Index.php @@ -20,12 +20,11 @@ class Index extends BaseController if (request()->isAjax()) { $admin_id = $this->uid; //发票待审核统计 - $invoice_map_check[] = ['check_time','=',0]; - $invoice_map_check[] = ['check_admin_id','=',$admin_id]; + $invoice_map_check[] = ['check_status','<',2]; + $invoice_map_check[] = ['', 'exp', Db::raw("FIND_IN_SET('{$admin_id}',check_admin_ids)")]; $invoice_map_check[] = ['status','=',1]; $invoice_count_check = Db::name('Invoice')->where($invoice_map_check)->count(); - $statistics['invoice_html_check'] = ' 您有'.$invoice_count_check.'条发票申请待审核'; - //$statistics['invoice_count_check'] = $invoice_count_check; + $statistics['invoice_html_check'] = ' 您有'.$invoice_count_check.'条发票申请待审核'; if($invoice_count_check==0){ $statistics['invoice_html_check'] = ''; } @@ -35,18 +34,17 @@ class Index extends BaseController $invoice_map_open[] = ['open_admin_id','=',$admin_id]; $invoice_map_open[] = ['status','=',1]; $invoice_count_open = Db::name('Invoice')->where($invoice_map_open)->count(); - $statistics['invoice_html_open'] = ' 您有'.$invoice_count_open.'条发票待开具'; - // $statistics['invoice_count_open'] = $invoice_count_open; + $statistics['invoice_html_open'] = ' 您有'.$invoice_count_open.'条发票待开具'; if($invoice_count_open==0){ $statistics['invoice_html_open'] = ''; } //待审核的报销统计 - $expense_map_check[] = ['check_time','=',0]; - $expense_map_check[] = ['check_admin_id','=',$admin_id]; + $expense_map_check[] = ['check_status','<',2]; + $expense_map_check[] = ['', 'exp', Db::raw("FIND_IN_SET('{$admin_id}',check_admin_ids)")]; $expense_map_check[] = ['status','=',1]; $expense_count_check = Db::name('Expense')->where($expense_map_check)->count(); - $statistics['expense_html_check'] = ' 您有'.$expense_count_check.'条报销单待审核'; + $statistics['expense_html_check'] = ' 您有'.$expense_count_check.'条报销单待审核'; // $statistics['expense_count_check'] = $expense_count_check; if($expense_count_check==0){ $statistics['expense_html_check'] = ''; @@ -69,8 +67,22 @@ class Index extends BaseController return to_assign(0,'ok',$statistics); } else{ - $menu = get_admin_menus(); - View::assign('menu', $menu); + $admin = get_login_admin(); + if (get_cache('menu' . $admin['id'])) { + $list = get_cache('menu' . $admin['id']); + } else { + $adminGroup = Db::name('PositionGroup')->where(['pid' => $admin['position_id']])->column('group_id'); + $adminMenu = Db::name('AdminGroup')->where('id', 'in', $adminGroup)->column('rules'); + $adminMenus = []; + foreach ($adminMenu as $k => $v) { + $v = explode(',', $v); + $adminMenus = array_merge($adminMenus, $v); + } + $menu = Db::name('AdminRule')->where(['menu' => 1,'status'=>1])->where('id', 'in', $adminMenus)->order('sort asc')->select()->toArray(); + $list = list_to_tree($menu); + \think\facade\Cache::tag('adminMenu')->set('menu' . $admin['id'], $list); + } + View::assign('menu', $list); return View(); } } @@ -83,11 +95,15 @@ class Index extends BaseController } $adminCount = Db::name('Admin')->where('status', '1')->count(); $articleCount = Db::name('Article')->where('status', '1')->count(); - $scheduleCount = Db::name('Schedule')->where('status', '1')->count(); + $approveCount = Db::name('Approve')->count(); + $expenseCount = Db::name('Expense')->count(); + $invoiceCount = Db::name('Invoice')->count(); View::assign('install', $install); View::assign('adminCount', $adminCount); View::assign('articleCount', $articleCount); - View::assign('scheduleCount', $scheduleCount); + View::assign('approveCount', $approveCount); + View::assign('expenseCount', $expenseCount); + View::assign('invoiceCount', $invoiceCount); return View(); } diff --git a/app/home/controller/Invoice.php b/app/home/controller/Invoice.php deleted file mode 100644 index 2b08195..0000000 --- a/app/home/controller/Invoice.php +++ /dev/null @@ -1,267 +0,0 @@ -isAjax()) { - $subject = Db::name('InvoiceSubject')->order('create_time asc')->select(); - return to_assign(0, '', $subject); - } else { - return view(); - } - } - //提交保存分类 - public function subject_add() - { - if (request()->isAjax()) { - $param = get_params(); - if (!empty($param['id']) && $param['id'] > 0) { - try { - validate(InvoiceSubjectCheck::class)->scene('edit')->check($param); - } catch (ValidateException $e) { - // 验证失败 输出错误信息 - return to_assign(1, $e->getError()); - } - $param['update_time'] = time(); - $res = InvoiceSubject::strict(false)->field(true)->update($param); - if ($res) { - if($param['status'] == 0){ - add_log('disable', $param['id'], $param); - } - else if($param['status'] == 1){ - add_log('recovery', $param['id'], $param); - } - else{ - add_log('edit', $param['id'], $param); - } - } - return to_assign(); - } else { - try { - validate(InvoiceSubjectCheck::class)->scene('add')->check($param); - } catch (ValidateException $e) { - // 验证失败 输出错误信息 - return to_assign(1, $e->getError()); - } - $param['create_time'] = time(); - $insertId = InvoiceSubject::strict(false)->field(true)->insertGetId($param); - if ($insertId) { - add_log('add', $insertId, $param); - } - return to_assign(); - } - } - } - - public function get_list($param = [], $where = []) - { - $rows = empty($param['limit']) ? get_config('app . page_size') : $param['limit']; - $expense = InvoiceList::where($where) - ->order('id desc') - ->paginate($rows, false, ['query' => $param]) - ->each(function ($item, $key) { - $item->user = Db::name('Admin')->where(['id' => $item->admin_id])->value('name'); - $item->department = Db::name('Department')->where(['id' => $item->did])->value('title'); - $item->check_name = Db::name('Admin')->where(['id' => $item->check_admin_id])->value('name'); - $item->check_time = empty($item->check_time) ? '-' : date('Y-m-d H:i', $item->check_time); - $item->open_name = Db::name('Admin')->where(['id' => $item->open_admin_id])->value('name'); - $item->open_time = empty($item->open_time) ? '-' : date('Y-m-d H:i', $item->open_time); - }); - return $expense; - } - - public function detail($id = 0) - { - $invoice = Db::name('Invoice')->where(['id' => $id])->find(); - if ($invoice) { - $invoice['user'] = Db::name('Admin')->where(['id' => $invoice['admin_id']])->value('name'); - $invoice['department'] = Db::name('Department')->where(['id' => $invoice['did']])->value('title'); - $invoice['check_admin'] = Db::name('Admin')->where(['id' => $invoice['check_admin_id']])->value('name'); - $invoice['open_admin'] = Db::name('Admin')->where(['id' => $invoice['open_admin_id']])->value('name'); - if ($invoice['check_time'] > 0) { - $invoice['check_time'] = empty($invoice['check_time']) ? '0' : date('Y-m-d H:i', $invoice['check_time']); - } - if ($invoice['open_time'] > 0) { - $invoice['open_time'] = empty($invoice['open_time']) ? '0' : date('Y-m-d H:i', $invoice['open_time']); - } - else{ - $invoice['open_time'] = '-'; - } - } - return $invoice; - } - - public function index() - { - if (request()->isAjax()) { - $param = get_params(); - $where = []; - $where[] = ['status', '=', 1]; - //按时间检索 - $start_time = isset($param['start_time']) ? strtotime(urldecode($param['start_time'])) : 0; - $end_time = isset($param['end_time']) ? strtotime(urldecode($param['end_time'])) : 0; - if ($start_time > 0 && $end_time > 0) { - $where[] = ['create_time', 'between', [$start_time, $end_time]]; - } - - if (isset($param['invoice_status']) && $param['invoice_status']!='') { - $where[] = ['invoice_status', '=', $param['invoice_status']]; - } - $invoice = $this->get_list($param, $where); - return table_assign(0, '', $invoice); - } else { - return view(); - } - } - - //添加&编辑 - public function add() - { - $param = get_params(); - if (request()->isAjax()) { - $param['invoice_status'] = 1; - if ($param['type'] == 1) { - if (!$param['invoice_tax']) { - return to_assign(1, '纳税人识别号不能为空'); - } - if (!$param['invoice_bank']) { - return to_assign(1, '开户银行不能为空'); - } - if (!$param['invoice_account']) { - return to_assign(1, '银行账号不能为空'); - } - if (!$param['invoice_banking']) { - return to_assign(1, '银行营业网点不能为空'); - } - if (!$param['invoice_address']) { - return to_assign(1, '银地址不能为空'); - } - } - if (!empty($param['id']) && $param['id'] > 0) { - try { - validate(InvoiceCheck::class)->scene('edit')->check($param); - } catch (ValidateException $e) { - // 验证失败 输出错误信息 - return to_assign(1, $e->getError()); - } - $param['update_time'] = time(); - $res = InvoiceList::where('id', $param['id'])->strict(false)->field(true)->update($param); - if ($res !== false) { - add_log('edit', $param['id'], $param); - return to_assign(); - } else { - return to_assign(1, '操作失败'); - } - } else { - try { - validate(InvoiceCheck::class)->scene('add')->check($param); - } catch (ValidateException $e) { - // 验证失败 输出错误信息 - return to_assign(1, $e->getError()); - } - $admin_id = $this->uid; - $param['admin_id'] = $admin_id; - $param['did'] = get_login_admin('did'); - $param['create_time'] = time(); - $exid = InvoiceList::strict(false)->field(true)->insertGetId($param); - if ($exid) { - add_log('apply', $exid, $param); - return to_assign(); - } else { - return to_assign(1, '操作失败'); - } - } - } else { - $id = isset($param['id']) ? $param['id'] : 0; - if ($id > 0) { - $detail = $this->detail($id); - View::assign('detail', $detail); - } - View::assign('user', get_admin($this->uid)); - View::assign('id', $id); - return view(); - } - } - - //查看 - public function view() - { - $id = empty(get_params('id')) ? 0 : get_params('id'); - $detail = $this->detail($id); - View::assign('uid', $this->uid); - View::assign('detail', $detail); - return view(); - } - - //删除 - public function delete() - { - $id = get_params("id"); - $detail = $this->detail($id); - if ($detail['invoice_status'] == 2) { - return to_assign(1, "已审核的发票不能删除"); - } - if ($detail['invoice_status'] == 3) { - return to_assign(1, "已开具的发票不能删除"); - } - $data['status'] = '-1'; - $data['id'] = $id; - $data['update_time'] = time(); - if (Db::name('Invoice')->update($data) !== false) { - add_log('delete', $id); - return to_assign(0, "删除成功"); - } else { - return to_assign(1, "删除失败"); - } - } - //设置 - public function check() - { - $param = get_params(); - if (request()->isAjax()) { - if ($param['invoice_status'] == 2 || $param['invoice_status'] == 0) { - $param['check_time'] = time(); - add_log('check', $param['id'],$param); - } - if ($param['invoice_status'] == 3) { - $param['open_time'] = time(); - add_log('open', $param['id'],$param); - } - if ($param['invoice_status'] == 10) { - $count = Db::name('InvoiceIncome')->where(['inid'=>$param['id'],'status'=>1])->count(); - if($count>0){ - return to_assign(1, "发票已经新增有到账记录,请先反到账后再作废发票"); - } - else{ - $param['update_time'] = time(); - add_log('tovoid', $param['id'],$param); - } - } - $res = InvoiceList::where('id', $param['id'])->strict(false)->field(true)->update($param); - if ($res !== false) { - return to_assign(); - } else { - return to_assign(1, "操作失败"); - } - } - } -} diff --git a/app/home/controller/Log.php b/app/home/controller/Log.php new file mode 100644 index 0000000..12ce6a1 --- /dev/null +++ b/app/home/controller/Log.php @@ -0,0 +1,62 @@ +isAjax()) { + $param = get_params(); + $where = array(); + if (!empty($param['keywords'])) { + $where[] = ['name|rule_menu|param_id', 'like', '%' . $param['keywords'] . '%']; + } + if (!empty($param['action'])) { + $where['action'] = $param['action']; + } + $rows = empty($param['limit']) ? get_config('app . page_size') : $param['limit']; + $content = DB::name('AdminLog') + ->field("id,uid,name,action,title,content,rule_menu,ip,param_id,param,FROM_UNIXTIME(create_time,'%Y-%m-%d %H:%i:%s') create_time") + ->order('create_time desc') + ->where($where) + ->paginate($rows, false, ['query' => $param]); + $content->toArray(); + foreach ($content as $k => $v) { + $data = $v; + $param_array = json_decode($v['param'], true); + if(is_array($param_array)){ + $param_value = ''; + foreach ($param_array as $key => $value) { + if (is_array($value)) { + $value = implode(',', $value); + } + $param_value .= $key . ':' . $value . '  |  '; + } + $data['param'] = $param_value; + } + else{ + $data['param'] = $param_array; + } + $content->offsetSet($k, $data); + } + return table_assign(0, '', $content); + } else { + $type_action = get_config('log.type_action'); + View::assign('type_action', $type_action); + return view(); + } + } +} diff --git a/app/home/controller/Menu.php b/app/home/controller/Menu.php deleted file mode 100644 index f656cfd..0000000 --- a/app/home/controller/Menu.php +++ /dev/null @@ -1,96 +0,0 @@ -isAjax()) { - $menu = Db::name('AdminMenu')->order('sort asc')->select(); - return to_assign(0, '', $menu); - } else { - return view(); - } - } - - //添加菜单页面 - public function add() - { - $param = get_params(); - if (request()->isAjax()) { - if ($param['id'] > 0) { - try { - validate(MenuCheck::class)->scene('edit')->check($param); - } catch (ValidateException $e) { - // 验证失败 输出错误信息 - return to_assign(1, $e->getError()); - } - $param['update_time'] = time(); - Db::name('AdminMenu')->strict(false)->field(true)->update($param); - add_log('edit', $param['id'], $param); - } else { - try { - validate(MenuCheck::class)->scene('add')->check($param); - } catch (ValidateException $e) { - // 验证失败 输出错误信息 - return to_assign(1, $e->getError()); - } - $param['create_time'] = time(); - $mid = Db::name('AdminMenu')->strict(false)->field(true)->insertGetId($param); - //自动为系统所有者管理组分配新增的菜单 - $group = Db::name('AdminGroup')->find(1); - if (!empty($group)) { - $newGroup['id'] = 1; - $newGroup['menus'] = $group['menus'] . ',' . $mid; - Db::name('AdminGroup')->strict(false)->field(true)->update($newGroup); - add_log('add', $mid, $param); - } - } - // 删除后台菜单缓存 - clear_cache('adminMenu'); - return to_assign(); - } else { - $id = isset($param['id']) ? $param['id'] : 0; - $pid = isset($param['pid']) ? $param['pid'] : 0; - if($id>0){ - $detail = Db::name('AdminMenu')->where('id',$id)->find(); - View::assign('detail', $detail); - } - View::assign('id', $id); - View::assign('pid', $pid); - return view(); - } - } - - //删除 - public function delete() - { - $id = get_params('id'); - $count = Db::name('AdminMenu')->where(['pid' => $id])->count(); - if ($count > 0) { - return to_assign(1, '该菜单下还有子菜单,无法删除'); - } - if (Db::name('AdminMenu')->delete($id) !== false) { - // 删除后台菜单缓存 - clear_cache('adminMenu'); - add_log('delete', $id, []); - return to_assign(0, '删除菜单成功'); - } else { - return to_assign(1, '删除失败'); - } - } -} diff --git a/app/home/controller/Module.php b/app/home/controller/Module.php new file mode 100644 index 0000000..af7de6c --- /dev/null +++ b/app/home/controller/Module.php @@ -0,0 +1,98 @@ +isAjax()) { + $module = Db::name('AdminModule')->select(); + return to_assign(0, '', $module); + } else { + return view(); + } + } + + //添加新增/编辑 + public function add() + { + $param = get_params(); + if (request()->isAjax()) { + $param['name'] = preg_replace('# #','',$param['name']); + if ($param['id'] > 0) { + if($param['id'] == 1 || $param['id'] == 2){ + return to_assign(1,'系统默认模块不能编辑'); + } + try { + validate(ModuleCheck::class)->scene('edit')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $param['update_time'] = time(); + Db::name('AdminModule')->strict(false)->field(true)->update($param); + add_log('edit', $param['id'], $param); + } else { + try { + validate(ModuleCheck::class)->scene('add')->check($param); + } catch (ValidateException $e) { + // 验证失败 输出错误信息 + return to_assign(1, $e->getError()); + } + $param['create_time'] = time(); + $mid = Db::name('AdminModule')->strict(false)->field(true)->insertGetId($param); + add_log('add', $mid, $param); + } + return to_assign(); + } else { + $id = isset($param['id']) ? $param['id'] : 0; + if($id>0){ + $detail = Db::name('AdminModule')->where('id',$id)->find(); + View::assign('detail', $detail); + } + View::assign('id', $id); + return view(); + } + } + + //禁用/启用 + public function disable() + { + $param = get_params(); + $module = Db::name('AdminModule')->where('id',$param['id'])->find(); + if($module['type'] == 1){ + return to_assign(1,'系统模块不能禁用'); + } + $param['update_time']= time(); + $res = Db::name('AdminModule')->strict(false)->field('status,update_time')->update($param); + if($res!==false){ + Db::name('AdminRule')->strict(false)->where('module',$module['name'])->field('status')->update(['status'=>$param['status']]); + // 删除后台节点缓存 + clear_cache('adminRules'); + if($param['status'] == 0){ + add_log('disable', $param['id'], $param); + } + else if($param['status'] == 1){ + add_log('recovery', $param['id'], $param); + } + return to_assign(); + } + else{ + return to_assign(1,'操作失败'); + } + } +} diff --git a/app/home/controller/Role.php b/app/home/controller/Role.php index f25e66d..c0aabaa 100644 --- a/app/home/controller/Role.php +++ b/app/home/controller/Role.php @@ -41,9 +41,7 @@ class Role extends BaseController { $param = get_params(); if (request()->isAjax()) { - $menuData = isset($param['menu']) ? $param['menu'] : 0; $ruleData = isset($param['rule']) ? $param['rule'] : 0; - $param['menus'] = implode(',', $menuData); $param['rules'] = implode(',', $ruleData); if (!empty($param['id']) && $param['id'] > 0) { try { @@ -74,19 +72,15 @@ class Role extends BaseController return to_assign(); } else { $id = isset($param['id']) ? $param['id'] : 0; - $menu = get_admin_menu(); - $rule = get_admin_rule(); + $rule = admin_rule(); if ($id > 0) { - $group = get_admin_group_info($id); - $role_menu = create_tree_list(0, $menu, $group['menus']); - $role_rule = create_tree_list(0, $rule, $group['rules']); + $rules = admin_group_info($id); + $role_rule = create_tree_list(0, $rule, $rules); $role = Db::name('AdminGroup')->where(['id' => $id])->find(); View::assign('role', $role); } else { - $role_menu = create_tree_list(0, $menu, []); $role_rule = create_tree_list(0, $rule, []); } - View::assign('role_menu', $role_menu); View::assign('role_rule', $role_rule); View::assign('id', $id); return view(); diff --git a/app/home/controller/Rule.php b/app/home/controller/Rule.php index b629d37..3230cc2 100644 --- a/app/home/controller/Rule.php +++ b/app/home/controller/Rule.php @@ -20,7 +20,12 @@ class Rule extends BaseController public function index() { if (request()->isAjax()) { - $rule = Db::name('adminRule')->order('create_time asc')->select(); + $rule = Db::name('adminRule') + ->field('a.*,m.title as module_title') + ->alias('a') + ->leftJoin('adminModule m','a.module = m.name') + ->order('a.sort asc a.id asc') + ->select(); return to_assign(0, '', $rule); } else { return view(); @@ -32,6 +37,7 @@ class Rule extends BaseController { $param = get_params(); if (request()->isAjax()) { + $param['src'] = preg_replace('# #','',$param['src']); if ($param['id'] > 0) { try { validate(RuleCheck::class)->scene('edit')->check($param); diff --git a/app/home/model/Message.php b/app/home/model/Message.php deleted file mode 100644 index 5c535c6..0000000 --- a/app/home/model/Message.php +++ /dev/null @@ -1,85 +0,0 @@ - '无', - self::ONE => '已发消息', - self::TWO => '草稿消息', - self::THREE => '已收消息', - ]; - - public static $Type = [ - self::ZERO => '系统', - self::ONE => '同事', - self::TWO => '部门', - self::THREE => '岗位', - self::FOUR => '全部', - ]; - - //获取消息列表 - public function getList($map = [], $param = [],$uid) - { - $rows = empty($param['limit']) ? get_config('app.page_size') : $param['limit']; - //垃圾箱列表特殊处理 - if ($param['status'] == 0) { - $where = [['from_uid', '=', $uid], ['to_uid', '=', $uid]]; - $mail = $this->where($map) - ->where(function ($query) use ($where) {$query->whereOr($where);}) - ->order('create_time desc') - ->paginate($rows, false, ['query' => $param]) - ->each(function ($item, $key) { - if($item->template==0){ - $item->msg_type = '个人信息'; - $item->from_name = Db::name('Admin')->where(['id' => $item->from_uid])->value('name'); - } - else{ - $item->msg_type = '系统信息'; - $item->from_name = '系统'; - } - $item->send_time = empty($item->send_time) ? '-' : date('Y-m-d H:i:s', $item->send_time); - $item->to_name = Db::name('Admin')->where(['id' => $item->to_uid])->value('name'); - $item->type_title = self::$Type[(int)$item->type]; - $item->delete_source_title = self::$Source[(int)$item->delete_source]; - $item->files = Db::name('MessageFileInterfix')->where(['mid' => $item->id, 'status' => 1])->count(); - }); - return $mail; - } else { - $mail = self::where($map) - ->order('create_time desc') - ->paginate($rows, false, ['query' => $param]) - ->each(function ($item, $key) { - if($item->template==0){ - $item->msg_type = '个人信息'; - $item->from_name = Db::name('Admin')->where(['id' => $item->from_uid])->value('name'); - } - else{ - $item->msg_type = '系统信息'; - $item->from_name = '系统'; - } - $item->send_time = empty($item->send_time) ? '-' : date('Y-m-d H:i:s', $item->send_time); - $item->to_name = Db::name('Admin')->where(['id' => $item->to_uid])->value('name'); - $item->type_title = self::$Type[(int)$item->type]; - $item->files = Db::name('MessageFileInterfix')->where(['mid' => $item->id, 'status' => 1])->count(); - }); - return $mail; - } - } -} diff --git a/app/home/model/NoteCate.php b/app/home/model/NoteCate.php deleted file mode 100644 index f566cd2..0000000 --- a/app/home/model/NoteCate.php +++ /dev/null @@ -1,15 +0,0 @@ - 'require|unique:admin_menu', + 'title' => 'require|unique:cost_cate', 'id' => 'require', ]; protected $message = [ - 'title.require' => '菜单名称不能为空', - 'title.unique' => '同样的菜单名称已经存在', + 'title.require' => '名称不能为空', + 'title.unique' => '同样的名称已经存在', 'id.require' => '缺少更新条件', ]; protected $scene = [ 'add' => ['title'], - 'edit' => ['id','title'], + 'edit' => ['id', 'title'], ]; } diff --git a/app/home/validate/CostCateCheck.php b/app/home/validate/CostCateCheck.php new file mode 100644 index 0000000..b251d46 --- /dev/null +++ b/app/home/validate/CostCateCheck.php @@ -0,0 +1,29 @@ + 'require|unique:seal_cate', + 'id' => 'require', + ]; + + protected $message = [ + 'title.require' => '名称不能为空', + 'title.unique' => '同样的名称已经存在', + 'id.require' => '缺少更新条件', + ]; + + protected $scene = [ + 'add' => ['title'], + 'edit' => ['id', 'title'], + ]; +} diff --git a/app/home/validate/ExpenseCheck.php b/app/home/validate/ExpenseCheck.php deleted file mode 100644 index 94bcd8a..0000000 --- a/app/home/validate/ExpenseCheck.php +++ /dev/null @@ -1,23 +0,0 @@ - 'require', - 'id' => 'require', - 'status' => 'require' - ]; - - protected $message = [ - 'code.require' => '报销凭证编号不能为空', - 'id.require' => '缺少更新条件', - 'status.require' => '状态为必选', - ]; - - protected $scene = [ - 'add' => ['code'], - 'edit' => ['id', 'code'] - ]; -} \ No newline at end of file diff --git a/app/home/validate/FlowCheck.php b/app/home/validate/FlowCheck.php new file mode 100644 index 0000000..7149a0e --- /dev/null +++ b/app/home/validate/FlowCheck.php @@ -0,0 +1,29 @@ + 'require|unique:flow', + 'id' => 'require', + ]; + + protected $message = [ + 'name.require' => '名称不能为空', + 'name.unique' => '同样的名称已经存在', + 'id.require' => '缺少更新条件', + ]; + + protected $scene = [ + 'add' => ['name',], + 'edit' => ['id','name'], + ]; +} diff --git a/app/home/validate/FlowTypeCheck.php b/app/home/validate/FlowTypeCheck.php new file mode 100644 index 0000000..67cadaa --- /dev/null +++ b/app/home/validate/FlowTypeCheck.php @@ -0,0 +1,34 @@ + 'require|unique:flow_type', + 'name' => 'require|lower|min:2|unique:flow_type', + 'id' => 'require', + ]; + + protected $message = [ + 'title.require' => '名称不能为空', + 'title.unique' => '同样的名称已经存在', + 'name.require' => '标识不能为空', + 'name.lower' => '标识只能是小写字符', + 'name.min' => '标识至少需要2个小写字符', + 'name.unique' => '同样的标识已经存在', + 'id.require' => '缺少更新条件', + ]; + + protected $scene = [ + 'add' => ['title','name'], + 'edit' => ['id','title','name'], + ]; +} diff --git a/app/home/validate/InvoiceCheck.php b/app/home/validate/InvoiceCheck.php deleted file mode 100644 index f3bc58d..0000000 --- a/app/home/validate/InvoiceCheck.php +++ /dev/null @@ -1,26 +0,0 @@ - 'require|float', - 'invoice_type' => 'require', - 'invoice_subject' => 'require', - 'id' => 'require' - ]; - - protected $message = [ - 'amount.require' => '开票金额不能为空', - 'amount.number' => '开票金额只能为数字', - 'id.require' => '缺少更新条件', - 'invoice_type.require' => '请选择开票类型', - 'invoice_subject.require' => '请选择开票主体', - ]; - - protected $scene = [ - 'add' => ['amount','invoice_type','invoice_subject'], - 'edit' => ['id', 'amount','invoice_type','invoice_subject'] - ]; -} \ No newline at end of file diff --git a/app/home/validate/KeywordsCheck.php b/app/home/validate/KeywordsCheck.php index e2785c0..9547651 100644 --- a/app/home/validate/KeywordsCheck.php +++ b/app/home/validate/KeywordsCheck.php @@ -7,7 +7,6 @@ namespace app\home\validate; -use think\facade\Db; use think\Validate; class KeywordsCheck extends Validate diff --git a/app/home/validate/ModuleCheck.php b/app/home/validate/ModuleCheck.php new file mode 100644 index 0000000..5d8d505 --- /dev/null +++ b/app/home/validate/ModuleCheck.php @@ -0,0 +1,34 @@ + 'require|unique:admin_module', + 'name' => 'require|upper|min:2|unique:admin_module', + 'id' => 'require', + ]; + + protected $message = [ + 'title.require' => '模块名称不能为空', + 'title.unique' => '同样的模块名称已经存在', + 'name.require' => '模块标识不能为空', + 'name.upper' => '模块标识只能是大写字符', + 'name.min' => '模块标识至少需要2个大写字符', + 'name.unique' => '同样的模块标识已经存在', + 'id.require' => '缺少更新条件', + ]; + + protected $scene = [ + 'add' => ['title','name'], + 'edit' => ['id','title','name'], + ]; +} diff --git a/app/home/validate/RuleCheck.php b/app/home/validate/RuleCheck.php index c837a2b..7d681f3 100644 --- a/app/home/validate/RuleCheck.php +++ b/app/home/validate/RuleCheck.php @@ -12,23 +12,23 @@ use think\Validate; class RuleCheck extends Validate { protected $rule = [ - 'title' => 'require|unique:admin_rule', + 'title' => 'require', 'name' => 'require', + 'menu' => 'require', 'src' => 'unique:admin_rule', 'id' => 'require', ]; protected $message = [ - 'title.require' => '节点名称不能为空', - 'title.unique' => '同样的节点名称已经存在', - 'src.unique' => '同样的节点规则已经存在', + 'title.require' => '菜单节点名称不能为空', + 'src.unique' => '同样的菜单节点URL已经存在', + 'menu.require' => '是否是左侧菜单需要选择', 'name.require' => '节点日志操作名称不能为空', - 'id.require' => '缺少更新条件', - 'filed.require' => '缺少要更新的字段名', + 'id.require' => '缺少更新条件' ]; protected $scene = [ - 'add' => ['title','src','name'], - 'edit' => ['id', 'title','src','name'] + 'add' => ['title','src','name','menu'], + 'edit' => ['id', 'title','src','name','menu'] ]; } diff --git a/app/home/validate/SealCateCheck.php b/app/home/validate/SealCateCheck.php new file mode 100644 index 0000000..590ce6d --- /dev/null +++ b/app/home/validate/SealCateCheck.php @@ -0,0 +1,29 @@ + 'require|unique:cost_cate', + 'id' => 'require', + ]; + + protected $message = [ + 'title.require' => '名称不能为空', + 'title.unique' => '同样的名称已经存在', + 'id.require' => '缺少更新条件', + ]; + + protected $scene = [ + 'add' => ['title'], + 'edit' => ['id', 'title'], + ]; +} diff --git a/app/home/view/article/cate.html b/app/home/view/cate/article_cate.html similarity index 83% rename from app/home/view/article/cate.html rename to app/home/view/cate/article_cate.html index 06c8da5..efe36e9 100644 --- a/app/home/view/article/cate.html +++ b/app/home/view/cate/article_cate.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"}
    @@ -18,7 +18,7 @@ {block name="script"} - {include file="common/layui" base='base' extend="['treeGrid','rightpage']" callback="init" /} + {include file="../../base/view/common/layui" base='base' extend="['treeGrid','rightpage']" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/article/cate_add.html b/app/home/view/cate/article_cate_add.html similarity index 85% rename from app/home/view/article/cate_add.html rename to app/home/view/cate/article_cate_add.html index c7e7756..5b3c457 100644 --- a/app/home/view/article/cate_add.html +++ b/app/home/view/cate/article_cate_add.html @@ -1,7 +1,7 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"} -
    +

    知识分类

    {eq name="$id" value="0"} @@ -10,7 +10,7 @@
    @@ -36,7 +36,7 @@ @@ -75,16 +75,15 @@ //监听提交 form.on('submit(webform)', function(data){ $.ajax({ - url: "/home/article/cate_add", + url: "/home/cate/article_cate_add", type:'post', data:data.field, - success:function(e){ - if(e.code==0){ - layer.confirm('保存成功,返回列表页吗?', { icon: 3, title: '提示' }, function (index) { + success: function (e) { + layer.msg(e.msg); + if (e.code == 0) { + setTimeout(function(){ parent.location.reload(); - }); - }else{ - layer.msg(e.msg); + },1000); } } }) @@ -92,6 +91,6 @@ }); } -{include file="common/layui" base='base' extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base='base' extend="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/cate/car_cate.html b/app/home/view/cate/car_cate.html new file mode 100644 index 0000000..65064e7 --- /dev/null +++ b/app/home/view/cate/car_cate.html @@ -0,0 +1,166 @@ +{extend name="../../base/view/common/base" /} + +{block name="body"} +
    +
    +
    + +{/block} + + + +{block name="script"} + + {include file="../../base/view/common/layui" base='base' extend="[]" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/home/view/cate/cost_cate.html b/app/home/view/cate/cost_cate.html new file mode 100644 index 0000000..b80d145 --- /dev/null +++ b/app/home/view/cate/cost_cate.html @@ -0,0 +1,150 @@ +{extend name="../../base/view/common/base" /} + +{block name="body"} +
    +
    +
    + +{/block} + + + +{block name="script"} + + {include file="../../base/view/common/layui" base='base' extend="[]" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/home/view/expense/cate.html b/app/home/view/cate/expense_cate.html similarity index 87% rename from app/home/view/expense/cate.html rename to app/home/view/cate/expense_cate.html index 39911e1..5e55156 100644 --- a/app/home/view/expense/cate.html +++ b/app/home/view/cate/expense_cate.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"}
    @@ -24,7 +24,7 @@ elem: '#test' ,toolbar: '#toolbarDemo' ,title:'报销类别列表' - ,url: "/home/expense/cate" + ,url: "/home/cate/expense_cate" ,page: true //开启分页 ,limit: 20 ,cellMinWidth: 80 @@ -64,7 +64,7 @@ if(obj.event === 'disable'){ layer.confirm('确定要禁用该类别吗?', {icon: 3, title:'提示'}, function(index){ $.ajax({ - url: "/home/expense/cate_add", + url: "/home/cate/expense_cate_check", type: 'post', data: { id: obj.data.id, @@ -74,7 +74,7 @@ success: function(e) { layer.msg(e.msg); if (e.code == 0) { - setTimeout('location.reload()', 1000); + tableIns.reload(); } } }) @@ -84,7 +84,7 @@ if(obj.event === 'open'){ layer.confirm('确定要启用该类别吗?', {icon: 3, title:'提示'}, function(index){ $.ajax({ - url: "/home/expense/cate_add", + url: "/home/cate/expense_cate_check", type: 'post', data: { id: obj.data.id, @@ -94,7 +94,7 @@ success: function(e) { layer.msg(e.msg); if (e.code == 0) { - setTimeout('location.reload()', 1000); + tableIns.reload(); } } }) @@ -120,7 +120,7 @@ var value = layero.find(".layui-layer-input").val(); if (value) { $.ajax({ - url: "/home/expense/cate_add", + url: "/home/cate/expense_cate_add", type: 'post', data: { id: id, @@ -128,9 +128,10 @@ }, success: function(e) { layer.msg(e.msg); - if (e.code == 0) { - setTimeout('location.reload()', 1000); - } + tableIns.reload(); + setTimeout(function(){ + layer.closeAll(); + }, 1000); } }) } else { @@ -141,6 +142,6 @@ } } - {include file="common/layui" base='base' extend="[]" callback="init" /} + {include file="../../base/view/common/layui" base='base' extend="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/cate/flow_type.html b/app/home/view/cate/flow_type.html new file mode 100644 index 0000000..ecdb0f0 --- /dev/null +++ b/app/home/view/cate/flow_type.html @@ -0,0 +1,135 @@ +{extend name="../../base/view/common/base" /} + +{block name="body"} +
    +
    +
    + +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['rightpage']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/home/view/cate/flow_type_add.html b/app/home/view/cate/flow_type_add.html new file mode 100644 index 0000000..2acc314 --- /dev/null +++ b/app/home/view/cate/flow_type_add.html @@ -0,0 +1,111 @@ +{extend name="../../base/view/common/base" /} + +{block name="body"} + +

    审批类型

    + {eq name="$id" value="0"} + + + + + + + + + + + + + +
    所属分类* + + 名称* + +
    标识* + + 图标* + + 如:icon-jichuguanli[查看图标] +
    + {else/} + + + + + + + + + + + + + +
    所属分类* + + 名称* + +
    标识* + + 图标* + + 如:icon-jichuguanli[查看图标] +
    + {/eq} +
    + + + +
    + +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="[]" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/home/view/note/cate.html b/app/home/view/cate/note_cate.html similarity index 84% rename from app/home/view/note/cate.html rename to app/home/view/cate/note_cate.html index c6a8a7b..2068c17 100644 --- a/app/home/view/note/cate.html +++ b/app/home/view/cate/note_cate.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"}
    @@ -26,7 +26,7 @@ id:'treeTable' ,elem: '#treeTable' ,idField:'id' - ,url: "/home/note/cate" + ,url: "/home/cate/note_cate" ,cellMinWidth: 100 ,treeId:'id'//树形id字段名称 ,treeUpId:'pid'//树形父id字段名称 @@ -50,24 +50,24 @@ //表头工具栏事件 $('.add-menu').on('click', function(){ - rightpage.open("/home/note/cate_add"); + rightpage.open("/home/cate/note_cate_add",'900px'); return; }); //操作按钮 treeGrid.on('tool(treeTable)', function (obj) { if (obj.event === 'add') { - rightpage.open('/home/note/cate_add?pid='+obj.data.id); + rightpage.open('/home/cate/note_cate_add?pid='+obj.data.id,'900px'); return; } if (obj.event === 'edit') { - rightpage.open('/home/note/cate_add?id='+obj.data.id); + rightpage.open('/home/cate/note_cate_add?id='+obj.data.id,'900px'); return; } if (obj.event === 'del') { layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) { $.ajax({ - url: "/home/note/cate_delete", + url: "/home/cate/note_cate_delete", type: 'post', data: { id: obj.data.id }, success: function (e) { @@ -83,6 +83,6 @@ }); } -{include file="common/layui" base='base' extend="['treeGrid','rightpage']" callback="init" /} +{include file="../../base/view/common/layui" base='base' extend="['treeGrid','rightpage']" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/note/cate_add.html b/app/home/view/cate/note_cate_add.html similarity index 83% rename from app/home/view/note/cate_add.html rename to app/home/view/cate/note_cate_add.html index b86587f..26e4605 100644 --- a/app/home/view/note/cate_add.html +++ b/app/home/view/cate/note_cate_add.html @@ -1,7 +1,7 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"} -
    +

    公告分类

    {eq name="$id" value="0"} @@ -10,7 +10,7 @@
    @@ -32,7 +32,7 @@ @@ -67,16 +67,15 @@ //监听提交 form.on('submit(webform)', function(data){ $.ajax({ - url: "/home/note/cate_add", + url: "/home/cate/note_cate_add", type:'post', data:data.field, - success:function(e){ - if(e.code==0){ - layer.confirm('保存成功,返回列表页吗?', { icon: 3, title: '提示' }, function (index) { + success: function (e) { + layer.msg(e.msg); + if (e.code == 0) { + setTimeout(function(){ parent.location.reload(); - }); - }else{ - layer.msg(e.msg); + },1000); } } }) @@ -84,6 +83,6 @@ }); } -{include file="common/layui" base='base' extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base='base' extend="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/cate/seal_cate.html b/app/home/view/cate/seal_cate.html new file mode 100644 index 0000000..1cc0ccc --- /dev/null +++ b/app/home/view/cate/seal_cate.html @@ -0,0 +1,150 @@ +{extend name="../../base/view/common/base" /} + +{block name="body"} +
    +
    +
    + +{/block} + + + +{block name="script"} + + {include file="../../base/view/common/layui" base='base' extend="[]" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/home/view/invoice/subject.html b/app/home/view/cate/subject.html similarity index 86% rename from app/home/view/invoice/subject.html rename to app/home/view/cate/subject.html index ca7147d..b3f0042 100644 --- a/app/home/view/invoice/subject.html +++ b/app/home/view/cate/subject.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"}
    @@ -24,7 +24,7 @@ elem: '#test' ,toolbar: '#toolbarDemo' ,title:'报销类别列表' - ,url: "/home/invoice/subject" + ,url: "/home/cate/subject" ,page: true //开启分页 ,limit: 20 ,cellMinWidth: 80 @@ -64,17 +64,16 @@ if(obj.event === 'disable'){ layer.confirm('确定要禁用该发票主体吗?', {icon: 3, title:'提示'}, function(index){ $.ajax({ - url: "/home/invoice/subject_add", + url: "/home/cate/subject_check", type: 'post', data: { id: obj.data.id, - status: 0, - title: obj.data.title + status: 0 }, success: function(e) { layer.msg(e.msg); if (e.code == 0) { - setTimeout('location.reload()', 1000); + tableIns.reload(); } } }) @@ -84,17 +83,16 @@ if(obj.event === 'open'){ layer.confirm('确定要启用该发票主体吗?', {icon: 3, title:'提示'}, function(index){ $.ajax({ - url: "/home/invoice/subject_add", + url: "/home/cate/subject_check", type: 'post', data: { id: obj.data.id, - status: 1, - title: obj.data.title + status: 1 }, success: function(e) { layer.msg(e.msg); if (e.code == 0) { - setTimeout('location.reload()', 1000); + tableIns.reload(); } } }) @@ -120,7 +118,7 @@ var value = layero.find(".layui-layer-input").val(); if (value) { $.ajax({ - url: "/home/invoice/subject_add", + url: "/home/cate/subject_add", type: 'post', data: { id: id, @@ -129,7 +127,10 @@ success: function(e) { layer.msg(e.msg); if (e.code == 0) { - setTimeout('location.reload()', 1000); + tableIns.reload(); + setTimeout(function(){ + layer.closeAll(); + }, 1000); } } }) @@ -141,6 +142,6 @@ } } - {include file="common/layui" base='base' extend="[]" callback="init" /} + {include file="../../base/view/common/layui" base='base' extend="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/check/add.html b/app/home/view/check/add.html deleted file mode 100644 index b91a163..0000000 --- a/app/home/view/check/add.html +++ /dev/null @@ -1,126 +0,0 @@ -{extend name="common/base"/} -{block name="style"} - - -{/block} - -{block name="body"} - -

    审核人配置

    - {if condition="$id eq 0"} - - - - - - - - - - - -
    审核类型* - - 审核人* - - -
    备注信息 - -
    - {else/} - - - - - - - - - - - -
    审核类型* - - 审核人* - - -
    备注信息 - -
    - {/if} -
    - - - -
    - -{/block} - - - -{block name="script"} - -{include file="common/layui" base="base" extend="['employeepicker']" callback="init" /} -{/block} - \ No newline at end of file diff --git a/app/home/view/check/index.html b/app/home/view/check/index.html deleted file mode 100644 index 1dc89ac..0000000 --- a/app/home/view/check/index.html +++ /dev/null @@ -1,96 +0,0 @@ -{extend name="common/base"/} - -{block name="body"} -
    -
    -
    - -{/block} - - - -{block name="script"} - -{include file="common/layui" base="base" extend="['rightpage']" callback="init" /} -{/block} - \ No newline at end of file diff --git a/app/home/view/conf/add.html b/app/home/view/conf/add.html index 595b674..1518733 100644 --- a/app/home/view/conf/add.html +++ b/app/home/view/conf/add.html @@ -1,17 +1,17 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"} -
    +

    配置项

    - - + - + + + +
    配置名称* + 配置名称* 状态*状态* {if condition="$id eq 0"} @@ -24,12 +24,19 @@
    + 配置标识* - - (注意:新增配置项以后,需要对应新增模板文件,模板文件名称需与标识名称一致,建议复制现有的配置模板文件,然后根据需求修改对应的表单即可) + +
    + 注意 + + (注意:新增配置项以后,需要对应新增模板文件,模板文件名称需与标识名称一致,建议复制现有的配置模板文件,然后根据需求修改对应的表单即可)
    @@ -54,12 +61,12 @@ type: 'post', data: data.field, success: function (e) { + layer.msg(e.msg); if (e.code == 0) { - layer.confirm('保存成功,返回列表页吗?', { icon: 3, title: '提示' }, function (index) { - parent.location.reload(); - }); - } else { - layer.msg(e.msg); + parent.tableIns.reload(); + setTimeout(function(){ + parent.layui.rightpage.close(); + },1000); } } }) @@ -68,6 +75,6 @@ } -{include file="common/layui" base="base" extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base="base" extend="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/conf/email.html b/app/home/view/conf/email.html index 423a92a..c102594 100644 --- a/app/home/view/conf/email.html +++ b/app/home/view/conf/email.html @@ -1,7 +1,7 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"} - +

    邮箱配置

    @@ -86,12 +86,11 @@ type: 'post', data: data.field, success: function (e) { + layer.msg(e.msg); if (e.code == 0) { - layer.confirm('保存成功,返回列表页吗?', { icon: 3, title: '提示' }, function (index) { - parent.location.reload(); - }); - } else { - layer.msg(e.msg); + setTimeout(function(){ + parent.layui.rightpage.close(); + },1000); } } }) @@ -136,7 +135,7 @@ } -{include file="common/layui" base="base" extend="[]" callback="init" /} -{include file="common/ueditor" id="container" name="content" width="100%" height="100%" toolbar="[]" /} +{include file="../../base/view/common/layui" base="base" extend="[]" callback="init" /} +{include file="../../base/view/common/ueditor" id="container" name="content" width="100%" height="100%" toolbar="[]" /} {/block} \ No newline at end of file diff --git a/app/home/view/conf/index.html b/app/home/view/conf/index.html index f19eb99..63a3a2b 100644 --- a/app/home/view/conf/index.html +++ b/app/home/view/conf/index.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"}
    @@ -100,7 +100,7 @@ //表头工具栏事件 table.on('toolbar(test)', function(obj){ if (obj.event === 'add') { - rightpage.open("/home/conf/add"); + rightpage.open("/home/conf/add",'900px'); return; } }); @@ -123,6 +123,6 @@ }); } -{include file="common/layui" base="base" extend="['rightpage']" callback="init" /} +{include file="../../base/view/common/layui" base="base" extend="['rightpage']" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/conf/other.html b/app/home/view/conf/other.html index c363fcf..2d8f54b 100644 --- a/app/home/view/conf/other.html +++ b/app/home/view/conf/other.html @@ -1,7 +1,7 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"} - +

    其他配置

    @@ -40,12 +40,11 @@ type: 'post', data: data.field, success: function (e) { + layer.msg(e.msg); if (e.code == 0) { - layer.confirm('保存成功,返回列表页吗?', { icon: 3, title: '提示' }, function (index) { - parent.location.reload(); - }); - } else { - layer.msg(e.msg); + setTimeout(function(){ + parent.layui.rightpage.close(); + },1000); } } }) @@ -58,6 +57,6 @@ }); } -{include file="common/layui" base="base" extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base="base" extend="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/conf/token.html b/app/home/view/conf/token.html index 7f59501..29a017a 100644 --- a/app/home/view/conf/token.html +++ b/app/home/view/conf/token.html @@ -1,7 +1,7 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"} - +

    Token配置

    @@ -59,12 +59,11 @@ type: 'post', data: data.field, success: function (e) { + layer.msg(e.msg); if (e.code == 0) { - layer.confirm('保存成功,返回列表页吗?', { icon: 3, title: '提示' }, function (index) { - parent.location.reload(); - }); - } else { - layer.msg(e.msg); + setTimeout(function(){ + parent.layui.rightpage.close(); + },1000); } } }) @@ -188,6 +187,6 @@ }) } -{include file="common/layui" base="base" extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base="base" extend="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/conf/web.html b/app/home/view/conf/web.html index 453d752..4afebe1 100644 --- a/app/home/view/conf/web.html +++ b/app/home/view/conf/web.html @@ -1,7 +1,7 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"} - +

    系统配置

    @@ -96,7 +96,7 @@ //logo上传 var uploadInst = upload.render({ elem: '#test1', - url: "/home/api/upload", + url: "/api/index/upload", done: function (res) { //如果上传失败 if (res.code == 1) { @@ -116,12 +116,11 @@ type: 'post', data: data.field, success: function (e) { + layer.msg(e.msg); if (e.code == 0) { - layer.confirm('保存成功,返回列表页吗?', { icon: 3, title: '提示' }, function (index) { - parent.location.reload(); - }); - } else { - layer.msg(e.msg); + setTimeout(function(){ + parent.layui.rightpage.close(); + },1000); } } }) @@ -129,6 +128,6 @@ }); } -{include file="common/layui" base="base" extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base="base" extend="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/database/backuplist.html b/app/home/view/database/backuplist.html index 3b11cfe..723b5f6 100644 --- a/app/home/view/database/backuplist.html +++ b/app/home/view/database/backuplist.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"}
    @@ -9,7 +9,7 @@
    - + {empty name="list"} @@ -17,8 +17,8 @@ {/empty} {volist name="list" id="vo" key="k"} - - + + {volist name="vo.data" id="voo"} @@ -86,6 +86,6 @@ }) } -{include file="common/layui" base="base" extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base="base" extend="[]" callback="init" /} {/block} diff --git a/app/home/view/database/database.html b/app/home/view/database/database.html index ce58835..c32c6ea 100644 --- a/app/home/view/database/database.html +++ b/app/home/view/database/database.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"}
    @@ -147,6 +147,6 @@ }); } -{include file="common/layui" base="base" extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base="base" extend="[]" callback="init" /} {/block} diff --git a/app/home/view/expense/view.html b/app/home/view/expense/view.html deleted file mode 100644 index 4c0f04c..0000000 --- a/app/home/view/expense/view.html +++ /dev/null @@ -1,195 +0,0 @@ -{extend name="common/base"/} -{block name="style"} - -{/block} - -{block name="body"} -
    -

    报销详情

    -
    文件大小 文件格式 分隔符操作操作
    备份时间:{$vo.time}
    备份时间:{$vo.time}
    - - - - - - - - - - - - - - - - - - - - - {if condition="$expense.check_time > 0"} - - - - - - - {else/} - - - - - {/if} - {if condition="$expense.pay_admin_id > 0"} - - - - - - - {/if} - - - - - {if condition="($expense.check_status == 1) AND ($uid == $expense.check_admin_id)"} - - - - - - {/if} -
    报销凭证编号{$expense.code}入账月份{$expense.income_month}原始单据日期{$expense.expense_time}
    报销人{$expense.user_name}报销部门{$expense.department}报销总费用(元){$expense.amount}
    报销状态 - {if condition="$expense.check_status == 0"} - 审核不通过 【原因:{$expense.check_remark}】 - {elseif condition="$expense.check_status == 1"} - 报销审核中 - {elseif condition="$expense.check_status == 2"} - 审核通过 - {elseif condition="$expense.check_status == 3"} - 已打款 - {/if} -
    审核人{$expense.check_admin}审核时间{$expense.check_time}
    审核人{$expense.check_admin}
    打款人{$expense.pay_admin}打款时间{$expense.pay_time}
    费用金额 -
    - - - - - - - {volist name="$expense.list" id="vo"} - - - - - - {/volist} -
    报销金额(元)报销类别备注信息
    {$vo.amount}{$vo.cate_title}{$vo.remarks}
    -
    -
    选择打款人* - - - - - - -
    -
    - - {if condition="($expense.check_status == 0) AND ($uid == $expense.admin_id)"} - 编辑 - {/if} - {if condition="($expense.check_status == 2) AND ($uid == $expense.pay_admin_id)"} - - {/if} -
    -
    -{/block} - - - -{block name="script"} - -{include file="common/layui" base='base' extend="[]" callback="init" /} -{/block} - \ No newline at end of file diff --git a/app/home/view/flow/add.html b/app/home/view/flow/add.html new file mode 100644 index 0000000..56178f3 --- /dev/null +++ b/app/home/view/flow/add.html @@ -0,0 +1,336 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} + + +{/block} + +{block name="body"} +
    +

    审批流程

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + + + +
    流程名称* + + 应用模块* + + 审批类型* + +
    应用部门 + +

    不选,默认是全公司

    +
    流程说明 + +
    审批流类型* + + +
    审批流程* +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + + 添加审批层级 +
    +

    温馨提示

    +

    1、当选择“负责人主管”审批时。系统仅会通知负责人主管。

    +

    2、当选择多个“指定人员”审批时。如果指定用户没有权限查看对应的合同,系统会通知其审批,但是他无法查看此数据信息。

    +

    3、当选择“指定人员(任意一人)”表示指定用户中任意一人审批即可。当选择“指定人员(多人会签)”表示 指定人员中所有人都要审批。

    +
    +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + + + +
    流程名称* + + 应用模块* + + 审批类型* + +
    应用部门 + +

    不选,默认是全公司

    +
    流程说明 + +
    审批流类型* + + +
    审批流程* +
    + {volist name="detail.flow_list" id="vo"} +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    + {gt name="$key" value="0"} + 删除 + {/gt} +
    + {/volist} +
    + + 添加审批层级 +
    +

    温馨提示

    +

    1、当选择“负责人主管”审批时。系统仅会通知负责人主管。

    +

    2、当选择多个“指定人员”审批时。如果指定用户没有权限查看对应的合同,系统会通知其审批,但是他无法查看此数据信息。

    +

    3、当选择“指定人员(任意一人)”表示指定用户中任意一人审批即可。当选择“指定人员(多人会签)”表示 指定人员中所有人都要审批。

    +
    +
    + {/eq} +
    + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['formSelects']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/home/view/flow/index.html b/app/home/view/flow/index.html new file mode 100644 index 0000000..a206c15 --- /dev/null +++ b/app/home/view/flow/index.html @@ -0,0 +1,136 @@ +{extend name="../../base/view/common/base" /} + +{block name="body"} +
    +
    +
    + +{/block} + + + +{block name="script"} + + {include file="../../base/view/common/layui" base='base' extend="['rightpage']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/home/view/income/add.html b/app/home/view/income/add.html deleted file mode 100644 index 6406456..0000000 --- a/app/home/view/income/add.html +++ /dev/null @@ -1,315 +0,0 @@ -{extend name="common/base"/} -{block name="style"} - -{/block} - -{block name="body"} -
    -

    发票信息

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {notempty name="$detail.remark"} - - - - - {/notempty} - - - - - {if condition="$detail.check_time > 0"} - - - - - - - {else/} - - - - - {/if} - {if condition="$detail.open_admin_id > 0"} - - - - - - - - - {/if} -
    发票金额 - {$detail.amount} - 发票类型 - {eq name="$detail.invoice_type" value="1"}增值税专用发票{/eq} - {eq name="$detail.invoice_type" value="2"}增值税普通发票{/eq} - 发票主体 - {volist name=":get_invoice_subject()" id="vo"} - {eq name="$vo.id" value="$detail.invoice_subject"}{$vo.title}{/eq} - {/volist} -
    抬头类型 - {eq name="$detail.type" value="1"}企业{/eq} - {eq name="$detail.type" value="2"}个人{/eq} - 发票抬头{$detail.invoice_title}电话号码{$detail.invoice_phone}
    纳税人识别号{$detail.invoice_tax}开户行{$detail.invoice_bank}银行账号{$detail.invoice_account}
    银行营业网点{$detail.invoice_banking}地址{$detail.invoice_address}
    备注信息{$detail.remark}
    发票状态 - {if condition="($detail.invoice_status == 0)"} - 审核不通过 【原因:{$detail.check_remark}】 - {elseif condition="($detail.invoice_status == 1)"} - 审核中 - {elseif condition="($detail.invoice_status == 2)"} - 审核通过,待开具 - {elseif condition="($detail.invoice_status == 3)"} - 已开具 - {elseif condition="($detail.invoice_status == 10)"} - 已作废 - {/if} -
    审核人{$detail.check_admin}审核时间{$detail.check_time}
    审核人{$detail.check_admin}
    开票人{$detail.open_admin}开票时间{$detail.open_time}发票号码{$detail.code}
    - -

    到账信息

    -
    - - - - - - - - - - - - - -
    到账状态 - {if condition="($detail.is_cash == 0)"} - 未到账 - {elseif condition="($detail.is_cash == 1)"} - 部分到账 - {elseif condition="($detail.is_cash == 2)"} - 全部到账 - {/if} - 未到账金额(元){$detail.not_income}已到账金额(元){$detail.enter_amount}
    到账记录 - - - - - - - - {empty name="$detail.income"} - - - - {else/} - {volist name="$detail.income" id="vo"} - - - - - - - {/volist} - {/empty} -
    到账日期到帐金额(元)备注操作
    暂无到账记录
    {$vo.enter_time | date='Y-m-d'}{$vo.amount}{$vo.remarks}删除
    -
    -
    -
    - - - {if condition="($detail.is_cash lt 2)"} - - - {/if} - {if condition="($detail.is_cash eq 0)"} - - {/if} - {if condition="($detail.is_cash eq 1)"} - - {/if} - {if condition="($detail.is_cash gt 0)"} - - {/if} -
    -
    -
    -{/block} - - - -{block name="script"} - -{include file="common/layui" base='base' extend="[]" callback="init" /} -{/block} - \ No newline at end of file diff --git a/app/home/view/income/view.html b/app/home/view/income/view.html deleted file mode 100644 index d2dc591..0000000 --- a/app/home/view/income/view.html +++ /dev/null @@ -1,165 +0,0 @@ -{extend name="common/base"/} -{block name="style"} - -{/block} - -{block name="body"} -
    -

    发票信息

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {notempty name="$detail.remark"} - - - - - {/notempty} - - - - - {if condition="$detail.check_time > 0"} - - - - - - - {else/} - - - - - {/if} - {if condition="$detail.open_admin_id > 0"} - - - - - - - - - {/if} -
    发票金额(元) - {$detail.amount} - 发票类型 - {eq name="$detail.invoice_type" value="1"}增值税专用发票{/eq} - {eq name="$detail.invoice_type" value="2"}增值税普通发票{/eq} - 发票主体 - {volist name=":get_invoice_subject()" id="vo"} - {eq name="$vo.id" value="$detail.invoice_subject"}{$vo.title}{/eq} - {/volist} -
    抬头类型 - {eq name="$detail.type" value="1"}企业{/eq} - {eq name="$detail.type" value="2"}个人{/eq} - 发票抬头{$detail.invoice_title}电话号码{$detail.invoice_phone}
    纳税人识别号{$detail.invoice_tax}开户行{$detail.invoice_bank}银行账号{$detail.invoice_account}
    银行营业网点{$detail.invoice_banking}地址{$detail.invoice_address}
    备注信息{$detail.remark}
    发票状态 - {if condition="($detail.invoice_status == 0)"} - 审核不通过 【原因:{$detail.check_remark}】 - {elseif condition="($detail.invoice_status == 1)"} - 审核中 - {elseif condition="($detail.invoice_status == 2)"} - 审核通过,待开具 - {elseif condition="($detail.invoice_status == 3)"} - 已开具 - {elseif condition="($detail.invoice_status == 10)"} - 已作废 - {/if} -
    审核人{$detail.check_admin}审核时间{$detail.check_time}
    审核人{$detail.check_admin}
    开票人{$detail.open_admin}开票时间{$detail.open_time}发票号码{$detail.code}
    - -

    到账信息

    -
    - - - - - - - - - - - - -
    到账状态 - {if condition="($detail.is_cash == 0)"} - 未到账 - {elseif condition="($detail.is_cash == 1)"} - 部分到账 - {elseif condition="($detail.is_cash == 2)"} - 全部到账 - {/if} - 未到账金额(元){$detail.not_income}已到账金额(元){$detail.enter_amount}
    到账记录 - - - - - - - - - {empty name="$detail.income"} - - - - {else/} - {volist name="$detail.income" id="vo"} - - - - - - - - {/volist} - {/empty} -
    到账日期到帐金额(元)备注登记人登记时间
    暂无到账记录
    {$vo.enter_time | date='Y-m-d'}{$vo.amount}{$vo.remarks}{$vo.admin}{$vo.create_time | date='Y-m-d H:i:s'}
    -
    -
    -{/block} - - - -{block name="script"} - -{include file="common/layui" base='base' extend="[]" callback="init" /} -{/block} - \ No newline at end of file diff --git a/app/home/view/index/index.html b/app/home/view/index/index.html index bb2b6b2..0f232b5 100644 --- a/app/home/view/index/index.html +++ b/app/home/view/index/index.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="style"} @@ -10,71 +10,64 @@
    -
    -
    -
    -
    - + @@ -170,6 +163,6 @@ }) }, 10000); -{include file="common/layui" base='base' extend="['gougucms']" callback="init" /} +{include file="../../base/view/common/layui" base='base' extend="['gougucms']" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/index/main.html b/app/home/view/index/main.html index 22a6fbb..e7523ad 100644 --- a/app/home/view/index/main.html +++ b/app/home/view/index/main.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="style"} -{/block} - -{block name="body"} -
    -

    发票详情

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {notempty name="$detail.remark"} - - - - - {/notempty} - - - - - {if condition="$detail.check_time > 0"} - - - - - - - {else/} - - - - - {/if} - {if condition="$detail.open_admin_id > 0"} - - - - - - - - - {/if} - {if condition="($detail.invoice_status == 1) AND ($uid == $detail.check_admin_id)"} - - - - - - {/if} -
    开票金额(元) - {$detail.amount} - 开票类型 - {eq name="$detail.invoice_type" value="1"}增值税专用发票{/eq} - {eq name="$detail.invoice_type" value="2"}增值税普通发票{/eq} - 开票主体 - {volist name=":get_invoice_subject()" id="vo"} - {eq name="$vo.id" value="$detail.invoice_subject"}{$vo.title}{/eq} - {/volist} -
    抬头类型 - {eq name="$detail.type" value="1"}企业{/eq} - {eq name="$detail.type" value="2"}个人{/eq} - 开票抬头{$detail.invoice_title}电话号码{$detail.invoice_phone}
    纳税人识别号{$detail.invoice_tax}开户行{$detail.invoice_bank}银行账号{$detail.invoice_account}
    银行营业网点{$detail.invoice_banking}地址{$detail.invoice_address}
    备注信息{$detail.remark}
    发票状态 - {if condition="($detail.invoice_status == 0)"} - 审核不通过 【原因:{$detail.check_remark}】 - {elseif condition="($detail.invoice_status == 1)"} - 审核中 - {elseif condition="($detail.invoice_status == 2)"} - 审核通过,待开具 - {elseif condition="($detail.invoice_status == 3)"} - 已开具 - {elseif condition="($detail.invoice_status == 10)"} - 已作废 - {/if} -
    审核人{$detail.check_admin}审核时间{$detail.check_time}
    审核人{$detail.check_admin}
    开票人{$detail.open_admin}开票时间{$detail.open_time}发票号码{$detail.code}
    选择开票人* - - - - - - -
    -
    - - {if condition="($detail.invoice_status == 0) AND ($uid == $detail.admin_id)"} - 编辑 - {/if} - {if condition="($detail.invoice_status == 2) AND ($uid == $detail.open_admin_id)"} - - {/if} -
    -
    -{/block} - - - -{block name="script"} - -{include file="common/layui" base='base' extend="[]" callback="init" /} -{/block} - \ No newline at end of file diff --git a/app/home/view/keywords/add.html b/app/home/view/keywords/add.html index 1549bc9..d828caf 100644 --- a/app/home/view/keywords/add.html +++ b/app/home/view/keywords/add.html @@ -1,7 +1,7 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"} -
    +

    知识关键字

    @@ -12,8 +12,10 @@ + + -
    排序
    状态* + {if condition="$id eq 0"} @@ -49,12 +51,12 @@ type: 'post', data: data.field, success: function (e) { + layer.msg(e.msg); if (e.code == 0) { - layer.confirm('保存成功,返回列表页吗?', { icon: 3, title: '提示' }, function (index) { - parent.location.reload(); - }); - } else { - layer.msg(e.msg); + parent.tableIns.reload(); + setTimeout(function(){ + parent.layui.rightpage.close(); + },1000); } } }) @@ -63,6 +65,6 @@ } -{include file="common/layui" base="base" extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base="base" extend="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/keywords/index.html b/app/home/view/keywords/index.html index 576ec38..528c08e 100644 --- a/app/home/view/keywords/index.html +++ b/app/home/view/keywords/index.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"}
    @@ -25,12 +25,13 @@ {block name="script"} -{include file="common/layui" base="base" extend="['rightpage']" callback="init" /} +{include file="../../base/view/common/layui" base="base" extend="['rightpage']" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/admin/log.html b/app/home/view/log/index.html similarity index 79% rename from app/home/view/admin/log.html rename to app/home/view/log/index.html index 8f5920d..205917f 100644 --- a/app/home/view/admin/log.html +++ b/app/home/view/log/index.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"}
    @@ -7,14 +7,11 @@
    - - - - - - - + {volist name="$type_action" id="vo"} + + {/volist}
    @@ -35,7 +32,7 @@ elem: '#test', title: '操作日志列表', toolbar: '#toolbarDemo', - url: "/home/admin/log", //数据接口 + url: "/home/log/index", //数据接口 page: true, //开启分页 limit: 20, cols: [ @@ -88,7 +85,7 @@ tableIns.reload({ where: { keywords: data.field.keywords, - title_cate: data.field.title_cate + action: data.field.action }, page: { curr: 1 @@ -98,6 +95,6 @@ }); } -{include file="common/layui" base='base' extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base='base' extend="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/admin/log_list.html b/app/home/view/log/log_list.html similarity index 95% rename from app/home/view/admin/log_list.html rename to app/home/view/log/log_list.html index dc36af8..0402ff7 100644 --- a/app/home/view/admin/log_list.html +++ b/app/home/view/log/log_list.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="style"} - - -{/block} - - -{block name="body"} - -
    - -
    - - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - - -
    -
    -
    - -
    - - -
    -
    -
    -
    - - - - -
    -
    - -{/block} - - - -{block name="script"} - -{include file="common/layui" base='base' extend="['employeepicker']" use="['form','employeepicker','layer','laydate']" callback="init" /} -{/block} - \ No newline at end of file diff --git a/app/home/view/position/view.html b/app/home/view/position/view.html deleted file mode 100644 index ff1d6bf..0000000 --- a/app/home/view/position/view.html +++ /dev/null @@ -1,127 +0,0 @@ -{extend name="common/base"/} - -{block name="body"} -
    -

    岗位信息

    - - - - - - - - - - - - - - - - - -
    岗位名称 - {$detail.title} - 岗位工时单价 - {$detail.work_price} - 状态 - {eq name="$detail.status" value="1" }正常{/eq} - {eq name="$detail.status" value="0" }禁止登录{/eq} -
    用户角色 - {volist name="$group" id="v"} - {eq name="$v.checked" value="1" }{$v.title},{/eq} - {/volist} -
    岗位备注 - {$detail.remark} -
    -

    岗位权限

    - - - - - - - - - -
    权限配置
    操作菜单可见
    - - {volist name="role_menu" id="vo"} - - - {notempty name="vo.children"} - - {/notempty} - - {/volist} -
    - - -
    - {volist name="vo.children" key="k" id="voo"} -
    - -
    - {notempty name="voo.children"} -
    - {volist name="voo.children" id="vooo"} -
    - -
    - {/volist} -
    - {/notempty} - {/volist} -
    -
    -
    权限配置
    操作节点可用
    - - {volist name="role_rule" id="vo"} - - - {notempty name="vo.children"} - - {/notempty} - - {/volist} -
    - - -
    - {volist name="vo.children" key="k" id="voo"} -
    - -
    - {notempty name="voo.children"} -
    - {volist name="voo.children" id="vooo"} -
    - -
    - {/volist} -
    - {/notempty} - {/volist} -
    -
    -
    -
    -{/block} - - - -{block name="script"} - -{include file="common/layui" base='base' extend="[]" callback="init" /} -{/block} - \ No newline at end of file diff --git a/app/home/view/role/add.html b/app/home/view/role/add.html index 4df9030..7674516 100644 --- a/app/home/view/role/add.html +++ b/app/home/view/role/add.html @@ -1,7 +1,11 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"} -
    + +

    权限角色

    @@ -25,45 +29,7 @@ - - - - - +
    权限配置
    操作菜单可见
    - - - - - - {volist name="role_menu" id="vo"} - - - {notempty name="vo.children"} - - {/notempty} - - {/volist} -
    选择要显示的顶级菜单 选择要显示的子级菜单
    - - -
    - {volist name="vo.children" key="k" id="voo"} -
    - -
    - {notempty name="voo.children"} -
    - {volist name="voo.children" id="vooo"} -
    - -
    - {/volist} -
    - {/notempty} - {/volist} -
    -
    -
    权限配置
    操作节点可用
    权限配置 @@ -72,18 +38,18 @@ {volist name="role_rule" id="vo"} - {notempty name="vo.children"}
    + -
    +
    {volist name="vo.children" key="k" id="voo"} -
    +
    {notempty name="voo.children"} -
    +
    {volist name="voo.children" id="vooo"}
    @@ -131,12 +97,12 @@ data: obj.field, type: 'post', success: function (e) { + layer.msg(e.msg); if (e.code == 0) { - layer.confirm('保存成功,返回列表页吗?', { icon: 3, title: '提示' }, function (index) { - parent.location.reload(); - }); - } else { - layer.msg(e.msg); + parent.tableIns.reload(); + setTimeout(function(){ + parent.layui.rightpage.close(); + },1000); } } }); @@ -171,6 +137,6 @@ }); } -{include file="common/layui" base="base" extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base="base" extend="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/role/index.html b/app/home/view/role/index.html index d985baa..89baaba 100644 --- a/app/home/view/role/index.html +++ b/app/home/view/role/index.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"}
    @@ -25,12 +25,13 @@ {block name="script"} -{include file="common/layui" base="base" extend="['rightpage']" callback="init" /} +{include file="../../base/view/common/layui" base="base" extend="['rightpage']" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/rule/add.html b/app/home/view/rule/add.html index a84bb4a..89f965e 100644 --- a/app/home/view/rule/add.html +++ b/app/home/view/rule/add.html @@ -1,61 +1,115 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"} - -

    功能节点

    + +

    功能菜单/节点

    {if condition="$id eq 0"} - + - - + + - + - + + + + + + + + + + + + +
    节点名称*父级菜单/节点* - - 父级节点* - + + {volist name=":set_recursion(admin_rule())" id="v"} {/volist} 所属功能模块* + +
    操作日志显示名称*菜单/节点名称* - + 节点规则菜单/节点URL - + +
    操作日志名称* + + 是否是左侧菜单* + + +
    排序 + + 图标 + + 如:icon-jichuguanli[查看图标]
    {else/} - + - - + + - + - + + + + + + + + + + + + +
    节点名称*父级菜单/节点* - - 父级节点* - - {volist name=":set_recursion(get_admin_rule())" id="v"} + {volist name=":set_recursion(admin_rule())" id="v"} {/volist} 所属功能模块* + +
    操作日志显示名称*菜单/节点名称* - + 节点规则菜单/节点URL - + +
    操作日志名称* + + 是否左侧菜单* + + +
    排序 + + 图标 + + 如:icon-jichuguanli[查看图标]
    @@ -78,17 +132,21 @@ //监听提交 form.on('submit(webform)', function (data) { + if(data.field.src!='' && data.field.module!=''){ + if(data.field.src.indexOf(data.field.module.toLowerCase()+'/')!=0){ + layer.msg('输入的菜单/节点URL与所属功能模块不匹配'); + return false; + } + } $.ajax({ url: "/home/rule/add", type: 'post', data: data.field, success: function (e) { + layer.msg(e.msg); if (e.code == 0) { - layer.confirm('保存成功,返回列表页吗?', { icon: 3, title: '提示' }, function (index) { - parent.location.reload(); - }); - } else { - layer.msg(e.msg); + //parent.rightpage.close(); + parent.location.reload(); } } }) @@ -96,6 +154,6 @@ }); } -{include file="common/layui" base="base" extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base="base" extend="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/rule/index.html b/app/home/view/rule/index.html index 42ccb85..3011dce 100644 --- a/app/home/view/rule/index.html +++ b/app/home/view/rule/index.html @@ -1,9 +1,9 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base"/} {block name="body"}
    - +
    @@ -25,40 +25,49 @@ , elem: '#' + tableId , idField: 'id' , url: "/home/rule/index" - , cellMinWidth: 100 + , cellMinWidth: 80 , treeId: 'id'//树形id字段名称 , treeUpId: 'pid'//树形父id字段名称 , treeShowName: 'title'//以树形式显示的字段 , cols: [[ { field: 'id', width: 80, title: 'ID号', align: 'center'} - , { field: 'title', width: 240, title: '节点名称'} - , { field: 'pid', title: '父节点ID', width: 90, align: 'center' } - , { field: 'src', title: '节点规则'} - , { field: 'name', width: 150, title: '操作日志显示名称'} - , {width: 160, title: '操作', align: 'center' + , { field: 'sort', width: 80, title: '排序',align: 'center'} + , { field: 'title', width: 160, title: '菜单/节点名称'} + , { field: 'pid', title: '父ID', width: 80, align: 'center' } + , { field: 'src', title: 'URL链接'} + , { field: 'menu', width: 100, title: '是否是菜单',align: 'center', templet: function (d) { + var html = ''; + if(d.menu=='1'){ + html = ''; + } + return html; + } + } + , {field: 'name', width: 110, title: '操作日志名称',align: 'center'} + , {field: 'module_title', width: 110, title: '所属模块',align: 'center'} + , {width: 200, title: '操作', align: 'center' , templet: function (d) { - var html = ''; + var html = ''; return html; } } ]] , page: false - //,skin:'line' }); //表头工具栏事件 $('.add-menu').on('click',function(){ - rightpage.open("/home/rule/add"); + rightpage.open("/home/rule/add",'900px'); return; }); //操作按钮 treeGrid.on('tool(' + tableId + ')', function (obj) { if (obj.event === 'add') { - rightpage.open('/home/rule/add?pid='+obj.data.id); + rightpage.open('/home/rule/add?pid='+obj.data.id,'900px'); return; } if (obj.event === 'edit') { - rightpage.open('/home/rule/add?id='+obj.data.id); + rightpage.open('/home/rule/add?id='+obj.data.id,'900px'); return; } if (obj.event === 'del') { @@ -81,6 +90,6 @@ } -{include file="common/layui" base="base" extend="['treeGrid','rightpage']" callback="init" /} +{include file="../../base/view/common/layui" base="base" extend="['treeGrid','rightpage']" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/schedule/cate.html b/app/home/view/schedule/cate.html deleted file mode 100644 index fcb6165..0000000 --- a/app/home/view/schedule/cate.html +++ /dev/null @@ -1,85 +0,0 @@ -{extend name="common/base"/} - -{block name="body"} -
    -
    -
    - - - -{/block} - - - -{block name="script"} - -{include file="common/layui" base="base" extend="['rightpage']" callback="init" /} -{/block} - \ No newline at end of file diff --git a/app/home/view/schedule/cate_add.html b/app/home/view/schedule/cate_add.html deleted file mode 100644 index e755e3a..0000000 --- a/app/home/view/schedule/cate_add.html +++ /dev/null @@ -1,104 +0,0 @@ -{extend name="common/base"/} - -{block name="body"} - -

    工作类型

    - {if condition="$id eq 0"} - - - - - - - - - - - - - -
    工作类型名称* - - 关联部门* - - 状态* - - -
    备注信息 - -
    - {else/} - - - - - - - - - - - - - -
    工作类型名称* - - 关联部门* - - 状态* - - -
    备注信息 - -
    - {/if} -
    - - - -
    - -{/block} - - - -{block name="script"} - -{include file="common/layui" base="base" extend="[]" callback="init" /} -{/block} - \ No newline at end of file diff --git a/app/home/view/schedule/view.html b/app/home/view/schedule/view.html deleted file mode 100644 index 6fe4115..0000000 --- a/app/home/view/schedule/view.html +++ /dev/null @@ -1,53 +0,0 @@ -{extend name="common/base"/} -{block name="style"} - -{/block} - -{block name="body"} -
    -

    工作记录详情

    - - - - - - - - - - - - - - - - - -
    工作内容 - {$schedule.title} - 创建时间{$schedule.create_time}
    工作时间范围 - {$schedule.start_time} {$schedule.start_time_1} 至 {$schedule.end_time_1},共{$schedule.labor_time}工时 - 工作类型 - {eq name="$schedule.labor_type" value="1"}外勤工作{/eq} - {eq name="$schedule.labor_type" value="2"}案头工作{/eq} -
    描述{$schedule.remark}
    -
    - 返回 -
    -
    - -{/block} - -{block name="script"} - - {include file="common/layui" base='base' extend="[]" callback="init" /} -{/block} - \ No newline at end of file diff --git a/app/install/controller/Index.php b/app/install/controller/Index.php index cf992ee..ad8d9b4 100644 --- a/app/install/controller/Index.php +++ b/app/install/controller/Index.php @@ -117,9 +117,9 @@ class Index $update_time = time(); $create_admin_sql = "INSERT INTO " . $data['DB_PREFIX'] . "admin " . - "(username,salt,pwd,name,nickname,position_id,mobile,thumb,create_time,update_time) " + "(username,salt,pwd,name,nickname,position_id,did,sex,mobile,thumb,create_time,update_time)" . "VALUES " - . "('$username','$salt','$password','$name','$nickname',1,'13800138000','$thumb','$create_time','$update_time')"; + . "('$username','$salt','$password','$name','$nickname',1,1,1,'13800138000','$thumb','$create_time','$update_time')"; if (!$link->query($create_admin_sql)) { return to_assign(1, '创建管理员信息失败'); } diff --git a/app/install/data/gouguoa.sql b/app/install/data/gouguoa.sql index 1a6115d..f9761ad 100644 --- a/app/install/data/gouguoa.sql +++ b/app/install/data/gouguoa.sql @@ -56,7 +56,6 @@ CREATE TABLE `oa_admin_group` ( `title` varchar(255) NOT NULL DEFAULT '', `status` int(1) NOT NULL DEFAULT 1, `rules` varchar(1000) NULL DEFAULT '' COMMENT '用户组拥有的规则id, 多个规则\",\"隔开', - `menus` varchar(1000) NULL DEFAULT '', `desc` text NULL COMMENT '备注', `create_time` int(11) NOT NULL DEFAULT 0, `update_time` int(11) NOT NULL DEFAULT 0, @@ -67,8 +66,8 @@ CREATE TABLE `oa_admin_group` ( -- ---------------------------- -- Records of cms_admin_group -- ---------------------------- -INSERT INTO `oa_admin_group`(`id`, `title`, `status`, `rules`, `menus`, `desc`, `create_time`, `update_time`) VALUES (1, '超级员工权限', 1, '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117', '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43', '超级员工权限,拥有系统的最高权限,不可修改', 0, 0); -INSERT INTO `oa_admin_group`(`id`, `title`, `status`, `rules`, `menus`, `desc`, `create_time`, `update_time`) VALUES (2, '人事总监权限', 1, '2,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,3,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,4,67,68,69,70,71,72,73,74,75,76,5,77,78,79,80,81,82,83,6,84,85,86,87,88,89,90,91,7,92,93,94,95,96,97,98,99,100,101,102,8,103,104,105,106,107,108,109,110,111,112,113,114,115,116,9,117', '2,17,18,19,20,21,3,22,23,24,25,26,4,27,28,29,30,5,31,32,6,33,34,35,7,36,37,38,39,8,40,41,9,43', '人力资源部门领导的最高管理权限', 0, 0); +INSERT INTO `oa_admin_group` VALUES (1, '超级员工权限', 1, '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141', '超级员工权限,拥有系统的最高权限,不可修改', 0, 0); +INSERT INTO `oa_admin_group` VALUES (2, '人事总监权限', 1, '2,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,3,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,4,78,79,80,81,82,83,84,85,86,87,5,88,89,90,91,6,92,93,94,95,96,7,97,99,100,101,98,8,102,104,105,106,103,107,109,110,111,112,108,113,114,115,116,117,9,118,119,120,122,123,124,125,127,128,129,131,132,133,134', '人力资源部门领导的最高管理权限', 0, 0); -- ---------------------------- -- Table structure for oa_admin_log @@ -95,77 +94,35 @@ CREATE TABLE `oa_admin_log` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '员工操作日志表'; + -- ---------------------------- --- Table structure for oa_admin_menu +-- Table structure for oa_admin_module -- ---------------------------- -DROP TABLE IF EXISTS `oa_admin_menu`; -CREATE TABLE `oa_admin_menu` ( +DROP TABLE IF EXISTS `oa_admin_module`; +CREATE TABLE `oa_admin_module` ( `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, - `pid` int(11) NOT NULL DEFAULT 0, - `title` varchar(255) NOT NULL DEFAULT '' COMMENT '标题', - `src` varchar(255) NULL DEFAULT '' COMMENT '链接', - `icon` varchar(255) NULL DEFAULT '' COMMENT '图标', - `sort` int(11) NOT NULL DEFAULT 1 COMMENT '越小越靠前', - `create_time` int(11) NOT NULL DEFAULT 0, - `update_time` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `id`(`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '后台菜单'; + `title` varchar(255) NOT NULL DEFAULT '' COMMENT '模块名称', + `name` varchar(255) NOT NULL DEFAULT '' COMMENT '模块标识唯一,字母', + `icon` varchar(255) NOT NULL DEFAULT '' COMMENT '图标', + `status` int(1) NOT NULL DEFAULT 1 COMMENT '状态,0禁用,1正常', + `type` int(1) NOT NULL DEFAULT 2 COMMENT '模块类型,2普通模块,1系统模块', + `create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间', + `update_time` int(11) NOT NULL DEFAULT 0 COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '功能模块表'; -- ---------------------------- --- Records of oa_admin_menu +-- Records of oa_admin_module -- ---------------------------- -INSERT INTO `oa_admin_menu` VALUES (1, 0, '系统管理', '', 'icon-jichupeizhi',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (2, 0, '基础数据', '', 'icon-hetongshezhi',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (3, 0, '人力资源', '', 'icon-renshishezhi',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (4, 0, '消息通知', '', 'icon-xiaoxishezhi',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (5, 0, '企业公告', '', 'icon-zhaoshengbaobiao',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (6, 0, '知识文章', '', 'icon-kecheng',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (7, 0, '日常办公', '', 'icon-kaoshijihua',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (8, 0, '财务管理', '', 'icon-yuangongtidian',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (9, 0, '商业智能', '', 'icon-jiaoxuetongji',1,0,0); +INSERT INTO `oa_admin_module` VALUES (1, '系统模块', 'HOME', '', 1, 1, 1639562910, 0); +INSERT INTO `oa_admin_module` VALUES (2, '用户模块', 'USER', '', 1, 1, 1639562910, 0); +INSERT INTO `oa_admin_module` VALUES (3, '消息模块', 'MSG', '', 1, 1, 1639562910, 0); +INSERT INTO `oa_admin_module` VALUES (4, '公告模块', 'NOTE', '', 1, 1, 1639562910, 0); +INSERT INTO `oa_admin_module` VALUES (5, '知识模块', 'KQ', '', 1, 1, 1639562910, 0); +INSERT INTO `oa_admin_module` VALUES (6, 'OA模块', 'OA', '', 1, 1, 1639562910, 0); +INSERT INTO `oa_admin_module` VALUES (7, '财务模块', 'CF', '', 1, 1, 1639562910, 0); +INSERT INTO `oa_admin_module` VALUES (8, '统计模块', 'BI', '', 1, 1, 1639562910, 0); -INSERT INTO `oa_admin_menu` VALUES (10, 1, '系统配置', 'home/conf/index', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (11, 1, '功能菜单', 'home/menu/index', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (12, 1, '功能节点', 'home/rule/index', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (13, 1, '权限角色', 'home/role/index', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (14, 1, '操作日志', 'home/admin/log', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (15, 1, '数据备份', 'home/database/database', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (16, 1, '数据还原', 'home/database/backuplist', '',1,0,0); - -INSERT INTO `oa_admin_menu` VALUES (17, 2, '审核人相关配置', 'home/check/index', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (18, 2, '工作类型设置', 'home/schedule/cate', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (19, 2, '知识关键字设置', 'home/keywords/index', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (20, 2, '报销类型设置', 'home/expense/cate', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (21, 2, '发票主体设置', 'home/invoice/subject', '',1,0,0); - -INSERT INTO `oa_admin_menu` VALUES (22, 3, '部门架构', 'home/department/index', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (23, 3, '岗位职称', 'home/position/index', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (24, 3, '企业员工', 'home/admin/index', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (25, 3, '人事调动', 'home/personal/change', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (26, 3, '离职档案', 'home/personal/leave', '',1,0,0); - -INSERT INTO `oa_admin_menu` VALUES (27, 4, '收件箱', 'home/message/inbox', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (28, 4, '已发送', 'home/message/sendbox', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (29, 4, '草稿箱', 'home/message/draft', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (30, 4, '垃圾箱', 'home/message/rubbish', '',1,0,0); - -INSERT INTO `oa_admin_menu` VALUES (31, 5, '公告类别', 'home/note/cate', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (32, 5, '公告列表', 'home/note/index', '',1,0,0); - -INSERT INTO `oa_admin_menu` VALUES (33, 6, '知识类别', 'home/article/cate', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (34, 6, '共享知识', 'home/article/index', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (35, 6, '个人知识', 'home/article/list', '',1,0,0); - -INSERT INTO `oa_admin_menu` VALUES (36, 7, '日程安排', 'home/plan/index', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (37, 7, '日程日历', 'home/plan/calendar', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (38, 7, '工作记录', 'home/schedule/index', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (39, 7, '工作日历', 'home/schedule/calendar', '',1,0,0); - -INSERT INTO `oa_admin_menu` VALUES (40, 8, '报销管理', 'home/expense/index', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (41, 8, '发票管理', 'home/invoice/index', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (42, 8, '到账管理', 'home/income/index', '',1,0,0); -INSERT INTO `oa_admin_menu` VALUES (43, 9, '日志分析', 'home/analysis/index', '',1,0,0); -- ---------------------------- -- Table structure for oa_admin_rule @@ -173,172 +130,204 @@ INSERT INTO `oa_admin_menu` VALUES (43, 9, '日志分析', 'home/analysis/index' DROP TABLE IF EXISTS `oa_admin_rule`; CREATE TABLE `oa_admin_rule` ( `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, - `pid` int(11) UNSIGNED NOT NULL DEFAULT 0, - `src` varchar(255) NOT NULL DEFAULT '' COMMENT '规则', - `title` varchar(255) NOT NULL DEFAULT '' COMMENT '规则标题', - `name` varchar(255) NOT NULL DEFAULT '' COMMENT '操作名称', + `pid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父id', + `src` varchar(255) NOT NULL DEFAULT '' COMMENT 'url链接', + `title` varchar(255) NOT NULL DEFAULT '' COMMENT '名称', + `name` varchar(255) NOT NULL DEFAULT '' COMMENT '日志操作名称', + `module` varchar(255) NOT NULL DEFAULT '' COMMENT '所属模块', + `icon` varchar(255) NOT NULL DEFAULT '' COMMENT '图标', + `menu` int(1) NOT NULL DEFAULT 0 COMMENT '是否是菜单,0不是,1是', `sort` int(11) NOT NULL DEFAULT 1 COMMENT '越小越靠前', - `create_time` int(11) NOT NULL DEFAULT 0, + `status` int(1) NOT NULL DEFAULT 1 COMMENT '状态,0禁用,1正常', + `create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间', `update_time` int(11) NOT NULL DEFAULT 0 COMMENT '更新时间', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `id`(`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '权限节点'; + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '菜单及权限表'; -- ---------------------------- -- Records of oa_admin_rule -- ---------------------------- -INSERT INTO `oa_admin_rule` VALUES (1, 0, '', '系统管理','系统管理',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (2, 0, '', '基础数据','基础数据',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (3, 0, '', '人力资源','人力资源',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (4, 0, '', '消息通知','消息通知',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (5, 0, '', '企业公告','企业公告',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (6, 0, '', '知识文章','知识文章',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (7, 0, '', '日常办公','日常办公',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (8, 0, '', '财务管理','财务管理',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (9, 0, '', '商业智能','商业智能',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (1, 0, '', '系统管理', '系统管理', 'HOME', 'icon-jichupeizhi', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (2, 0, '', '基础数据', '基础数据', 'HOME', 'icon-hetongshezhi', 1, 2, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (3, 0, '', '员工管理', '员工管理', 'USER', 'icon-renshishezhi', 1, 3, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (4, 0, '', '消息通知', '消息通知', 'MSG', 'icon-xiaoxishezhi', 1, 4, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (5, 0, '', '企业公告', '企业公告', 'NOTE', 'icon-zhaoshengbaobiao', 1, 5, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (6, 0, '', '知识文章', '知识文章', 'KQ', 'icon-kecheng', 1, 6, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (7, 0, '', '办公审批', '办公审批', 'OA', 'icon-shenpishezhi', 1, 7, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (8, 0, '', '日常办公', '日常办公', 'OA', 'icon-kaoshijihua', 1, 8, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (9, 0, '', '财务管理', '财务管理', 'CF', 'icon-yuangongtidian', 1, 9, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (10, 0, '', '商业智能', '商业智能', 'BI', 'icon-jiaoxuetongji', 1, 10, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (10, 1, 'home/conf/index', '系统配置','系统配置',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (11, 10, 'home/conf/add', '新增/编辑配置项','配置项',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (12, 10, 'home/conf/edit', '新增/编辑配置详情','配置详情',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (13, 10, 'home/conf/delete', '删除配置项','配置项',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (11, 1, 'home/conf/index', '系统配置', '系统配置', 'HOME', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (12, 11, 'home/conf/add', '新建/编辑配置项', '配置项', 'HOME', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (13, 11, 'home/conf/edit', '编辑配置详情', '配置详情', 'HOME', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (14, 11, 'home/conf/delete', '删除配置项', '配置项', 'HOME', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (14, 1, 'home/menu/index', '功能菜单','功能菜单',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (15, 14, 'home/menu/add', '新增/编辑功能菜单','功能菜单',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (16, 14, 'home/menu/delete', '删除功能菜单','功能菜单',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (15, 1, 'home/module/index', '功能模块', '功能模块', 'HOME', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (16, 15, 'home/module/add', '新建/编辑', '功能模块', 'HOME', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (17, 15, 'home/module/disable', '禁用/启用', '功能模块', 'HOME', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (17, 1, 'home/rule/index', '功能节点','功能节点',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (18, 17, 'home/rule/add', '新增/编辑功能节点','功能节点',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (19, 17, 'home/rule/delete', '删除功能节点','功能节点',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (18, 1, 'home/rule/index', '功能节点', '功能节点', 'HOME', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (19, 18, 'home/rule/add', '新建/编辑', '功能节点', 'HOME', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (20, 18, 'home/rule/delete', '删除', '功能节点', 'HOME', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (20, 1, 'home/role/index', '权限角色','权限角色',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (21, 20, 'home/role/add', '新增/编辑权限角色','权限角色',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (22, 20, 'home/role/delete', '删除权限角色','权限角色',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (21, 1, 'home/role/index', '权限角色', '权限角色', 'HOME', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (22, 21, 'home/role/add', '新建/编辑', '权限角色', 'HOME', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (23, 21, 'home/role/delete', '删除', '权限角色', 'HOME', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (23, 1, 'home/admin/log', '操作日志','操作日志',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (24, 1, 'home/log/index', '操作日志', '操作日志', 'HOME', '', 1, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (24, 1, 'home/database/database', '备份数据','备份数据',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (25, 24, 'home/database/backup', '备份数据表','备份数据',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (26, 24, 'home/database/optimize', '优化数据表','优化数据表',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (27, 24, 'home/database/repair', '修复数据表','修复数据表',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (25, 1, 'home/database/database', '备份数据', '备份数据', 'HOME', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (26, 25, 'home/database/backup', '备份数据表', '备份数据', 'HOME', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (27, 25, 'home/database/optimize', '优化数据表', '优化数据表', 'HOME', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (28, 25, 'home/database/repair', '修复数据表', '修复数据表', 'HOME', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (28, 1, 'home/database/backuplist', '还原数据','还原数据',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (29, 28, 'home/database/import', '还原数据表','还原数据',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (30, 28, 'home/database/downfile', '下载备份数据','下载备份数据',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (31, 28, 'home/database/del', '删除备份数据','删除备份数据',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (29, 1, 'home/database/backuplist', '还原数据', '还原数据', 'HOME', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (30, 29, 'home/database/import', '还原数据表', '还原数据', 'HOME', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (31, 29, 'home/database/downfile', '下载备份数据', '下载备份数据', 'HOME', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (32, 29, 'home/database/del', '删除备份数据', '删除备份数据', 'HOME', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (32, 2, 'home/check/index', '审核人配置','审核人',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (33, 32, 'home/check/add', '新增/编辑审核人','审核人',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (34, 32, 'home/check/delete', '删除审核人','审核人',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (33, 2, 'home/cate/flow_type', '审批类型', '审批类型', 'HOME', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (34, 33, 'home/cate/flow_type_add', '新建/编辑', '审批类型', 'HOME', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (35, 33, 'home/cate/flow_type_check', '设置', '审批类型', 'HOME', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (35, 2, 'home/schedule/cate', '工作类型设置','工作类型',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (36, 35, 'home/schedule/cate_add', '新增/编辑工作类型','工作类型',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (37, 35, 'home/schedule/cate_disable', '禁用工作类型','工作类型',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (38, 35, 'home/schedule/cate_delete', '删除工作类型','工作类型',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (36, 2, 'home/flow/index', '审批流程', '审批流程', 'HOME', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (37, 36, 'home/flow/add', '新建/编辑', '审批流程', 'HOME', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (38, 36, 'home/flow/delete', '删除', '审批流程', 'HOME', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (39, 36, 'home/flow/check', '设置', '审批流程', 'HOME', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (39, 2, 'home/keywords/index', '知识关键字设置','知识关键字',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (40, 39, 'home/keywords/add', '新增/编辑知识关键字','知识关键字',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (41, 39, 'home/keywords/delete', '删除知识关键字','知识关键字',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (40, 2, 'home/cate/expense_cate', '报销类型', '报销类型', 'HOME', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (41, 40, 'home/cate/expense_cate_add', '新建/编辑', '报销类型', 'HOME', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (42, 40, 'home/cate/expense_cate_check', '设置', '报销类型', 'HOME', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (42, 2, 'home/expense/cate', '报销类型设置','报销类型',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (43, 42, 'home/expense/cate_add', '新增/编辑报销类型','报销类型',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (44, 42, 'home/expense/cate_disable', '禁用报销类型','报销类型',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (45, 42, 'home/expense/cate_delete', '删除报销类型','报销类型',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (43, 2, 'home/cate/cost_cate', '费用类型', '费用类型', 'HOME', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (44, 43, 'home/cate/cost_cate_add', '新建/编辑', '费用类型', 'HOME', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (45, 43, 'home/cate/cost_cate_check', '设置', '费用类型', 'HOME', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (46, 2, 'home/invoice/subject', '发票主体设置','发票主体',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (47, 46, 'home/invoice/subject_add', '新增/编辑发票主体','发票主体',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (48, 46, 'home/invoice/subject_disable', '禁用发票主体','发票主体',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (49, 46, 'home/invoice/subject_delete', '删除发票主体','发票主体',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (46, 2, 'home/cate/seal_cate', '印章类型', '印章类型', 'HOME', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (47, 46, 'home/cate/seal_cate_add', '新建/编辑', '印章类型', 'HOME', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (48, 46, 'home/cate/seal_cate_check', '设置', '印章类型', 'HOME', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (50, 3, 'home/department/index', '部门架构','部门',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (51, 50, 'home/department/add', '添加/编辑部门信息','部门',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (52, 50, 'home/department/delete', '删除部门','部门',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (49, 2, 'home/cate/car_cate', '车辆类型', '车辆类型', 'HOME', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (50, 49, 'home/cate/car_cate_add', '新建/编辑', '车辆类型', 'HOME', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (51, 49, 'home/cate/car_cate_check', '设置', '车辆类型', 'HOME', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (53, 3, 'home/position/index', '岗位职称','岗位职称',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (54, 53, 'home/position/add', '添加/编辑岗位职称','岗位职称',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (55, 53, 'home/position/delete', '删除岗位职称','岗位职称',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (56, 53, 'home/position/view', '查看岗位职称','岗位职称',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (52, 2, 'home/cate/subject', '发票主体', '发票主体', 'HOME', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (53, 52, 'home/cate/subject_add', '新建/编辑', '发票主体', 'HOME', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (54, 52, 'home/cate/subject_check', '设置', '发票主体', 'HOME', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (57, 3, 'home/admin/index', '企业员工','员工',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (58, 57, 'home/admin/add', '添加/编辑员工','员工',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (59, 57, 'home/admin/view', '查看员工信息','员工信息',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (60, 57, 'home/admin/set', '设置员工状态','员工状态',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (61, 57, 'home/admin/reset_psw', '重设员工密码','员工密码',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (55, 2, 'home/cate/note_cate', '公告类型', '公告类型', 'HOME', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (56, 55, 'home/cate/note_cate_add', '新建/编辑', '公告类型', 'HOME', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (57, 55, 'home/cate/note_cate_delete', '删除', '公告类型', 'HOME', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (62, 3, 'home/personal/change', '人事调动','人事调动',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (63, 62, 'home/personal/change_add', '新增/编辑人事调动','人事调动',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (58, 2, 'home/cate/article_cate', '知识类型', '知识类型', 'HOME', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (59, 58, 'home/cate/article_cate_add', '新建/编辑', '知识类型', 'HOME', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (60, 58, 'home/cate/article_cate_delete', '删除', '知识类型', 'HOME', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (64, 3, 'home/personal/leave', '离职档案','离职档案',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (65, 64, 'home/personal/leave_add', '新增/编辑离职档案','离职档案',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (66, 64, 'home/personal/leave_delete', '删除离职档案','离职档案',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (67, 4, 'home/message/inbox', '收件箱','收件箱',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (68, 67, 'home/message/add', '添加/修改消息','消息',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (69, 67, 'home/message/send', '发送消息','消息',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (70, 67, 'home/message/save', '保存消息到草稿','消息到草稿',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (71, 67, 'home/message/reply', '回复消息','消息',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (72, 67, 'home/message/check', '设置消息状态','消息状态',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (73, 67, 'home/message/read', '查看消息','消息',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (61, 3, 'user/department/index', '部门架构', '部门', 'USER', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (62, 61, 'user/department/add', '新建/编辑', '部门', 'USER', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (63, 61, 'user/department/delete', '删除', '部门', 'USER', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (74, 4, 'home/message/sendbox', '发件箱','发件箱',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (75, 4, 'home/message/draft', '草稿箱','草稿箱',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (76, 4, 'home/message/rubbish', '垃圾箱','垃圾箱',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (64, 3, 'user/position/index', '岗位职称', '岗位职称', 'USER', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (65, 64, 'user/position/add', '新建/编辑', '岗位职称', 'USER', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (66, 64, 'user/position/delete', '删除', '岗位职称', 'USER', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (67, 64, 'user/position/view', '查看', '岗位职称', 'USER', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (77, 5, 'home/note/cate', '公告分类','公告分类',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (78, 77, 'home/note/cate_add', '添加/修改公告分类','公告分类',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (79, 77, 'home/note/cate_delete', '删除公告分类','公告分类',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (68, 3, 'user/user/index', '企业员工', '员工', 'USER', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (69, 68, 'user/user/add', '新建/编辑', '员工', 'USER', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (70, 68, 'user/user/view', '查看', '员工信息', 'USER', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (71, 68, 'user/user/set', '设置', '员工状态', 'USER', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (72, 68, 'user/user/reset_psw', '重设密码', '员工密码', 'USER', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (80, 5, 'home/note/index', '公告列表','公告',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (81, 80, 'home/note/add', '添加公告','公告',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (82, 80, 'home/note/delete', '删除公告','公告',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (83, 80, 'home/note/view', '查看公告','公告',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (73, 3, 'user/personal/change', '人事调动', '人事调动', 'USER', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (74, 73, 'user/personal/change_add', '新建/编辑', '人事调动', 'USER', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (84, 6, 'home/article/cate', '知识分类','知识分类',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (85, 84, 'home/article/cate_add', '添加/修改知识分类','知识分类',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (86, 84, 'home/article/cate_delete', '删除知识分类','知识分类',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (75, 3, 'user/personal/leave', '离职档案', '离职档案', 'USER', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (76, 75, 'user/personal/leave_add', '新建/编辑', '离职档案', 'USER', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (77, 75, 'user/personal/leave_delete', '删除', '离职档案', 'USER', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (87, 6, 'home/article/index', '共享知识','知识文章',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (88, 87, 'home/article/add', '添加/修改知识文章','知识文章',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (89, 87, 'home/article/delete', '删除知识文章','知识文章',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (90, 87, 'home/article/view', '查看知识文章','知识文章',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (78, 4, 'message/index/inbox', '收件箱', '收件箱', 'MSG', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (79, 78, 'message/index/add', '新建/编辑', '消息', 'MSG', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (80, 78, 'message/index/send', '发送', '消息', 'MSG', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (81, 78, 'message/index/save', '保存', '消息到草稿', 'MSG', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (82, 78, 'message/index/reply', '回复', '消息', 'MSG', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (83, 78, 'message/index/read', '查看', '消息', 'MSG', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (84, 78, 'message/index/check', '设置', '消息状态', 'MSG', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (91, 6, 'home/article/list', '个人知识','知识文章',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (85, 4, 'message/index/sendbox', '发件箱', '发件箱', 'MSG', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (86, 4, 'message/index/draft', '草稿箱', '草稿箱', 'MSG', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (87, 4, 'message/index/rubbish', '垃圾箱', '垃圾箱', 'MSG', '', 1, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (92, 7, 'home/plan/index', '日程安排','日程安排',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (93, 92, 'home/plan/calendar', '日程日历','日程安排',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (94, 92, 'home/plan/add', '添加/编辑日程安排','日程安排',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (95, 92, 'home/plan/delete', '删除日程安排','日程安排',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (96, 92, 'home/plan/detail', '查看日程安排','日程安排',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (88, 5, 'note/index/index', '公告列表', '公告', 'NOTE', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (89, 88, 'note/index/add', '新建/编辑', '公告', 'NOTE', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (90, 88, 'note/index/delete', '删除', '公告', 'NOTE', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (91, 88, 'note/index/view', '查看', '公告', 'NOTE', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (97, 7, 'home/schedule/index', '工作记录','工作记录',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (98, 97, 'home/schedule/calendar', '工作记录日历','工作日历',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (99, 97, 'home/schedule/add', '添加/编辑工作记录','工作记录',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (100, 97, 'home/schedule/delete', '删除工作记录','工作记录',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (101, 97, 'home/schedule/detail', '查看工作记录','工作记录',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (102, 97, 'home/schedule/update_labor_time', '更改工时','工时',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (92, 6, 'article/index/index', '共享知识', '知识文章', 'KQ', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (93, 6, 'article/index/list', '个人知识', '知识文章', 'KQ', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (94, 93, 'article/index/add', '新建/编辑', '知识文章', 'KQ', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (95, 93, 'article/index/delete', '删除', '知识文章', 'KQ', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (96, 93, 'article/index/view', '查看', '知识文章', 'KQ', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (103, 8, 'home/expense/index', '报销管理','报销',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (104, 103, 'home/expense/add', '新增/编辑报销','报销',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (105, 103, 'home/expense/delete', '删除报销','报销',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (106, 103, 'home/expense/view', '查看报销信息','报销',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (107, 103, 'home/expense/check', '设置报销状态','报销',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (97, 7, 'oa/approve/index', '我发起的审批', '办公审批', 'OA', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (98, 7, 'oa/approve/list', '待我处理的审批', '办公审批', 'OA', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (99, 97, 'oa/approve/add', '新建/编辑', '办公审批', 'OA', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (100, 97, 'oa/approve/view', '查看', '办公审批', 'OA', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (101, 97, 'oa/approve/check', '审核', '办公审批', 'OA', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (108, 8, 'home/invoice/index', '发票管理','发票',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (109, 108, 'home/invoice/add', '新增/编辑发票','发票',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (110, 108, 'home/invoice/delete', '删除发票','发票',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (111, 108, 'home/invoice/view', '查看发票信息','发票',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (112, 108, 'home/invoice/check', '设置发票状态','发票',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (102, 8, 'oa/plan/calendar', '日程日历', '日程安排', 'OA', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (103, 8, 'oa/plan/index', '日程安排', '日程安排', 'OA', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (104, 102, 'oa/plan/add', '新建/编辑', '日程安排', 'OA', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (105, 102, 'oa/plan/delete', '删除', '日程安排', 'OA', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (106, 102, 'oa/plan/detail', '查看', '日程安排', 'OA', '', 2, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (113, 8, 'home/income/index', '到账管理','到账记录',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (114, 113, 'home/income/add', '新增到账记录','到账记录',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (115, 113, 'home/income/view', '到账详情','到账记录',1,0,0); -INSERT INTO `oa_admin_rule` VALUES (116, 113, 'home/income/delete', '删除到账记录','到账记录',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (107, 8, 'oa/schedule/calendar', '工作日历', '工作日历', 'OA', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (108, 8, 'oa/schedule/index', '工作记录', '工作记录', 'OA', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (109, 107, 'oa/schedule/add', '新建/编辑', '工作记录', 'OA', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (110, 107, 'oa/schedule/delete', '删除', '工作记录', 'OA', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (111, 107, 'oa/schedule/detail', '查看', '工作记录', 'OA', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (112, 107, 'oa/schedule/update_labor_time', '更改工时', '工时', 'OA', '', 0, 1, 1, 0, 0); -INSERT INTO `oa_admin_rule` VALUES (117, 9, 'home/analysis/index', '智能分析','智能分析',1,0,0); +INSERT INTO `oa_admin_rule` VALUES (113, 8, 'oa/work/index', '工作汇报', '工作汇报', 'OA', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (114, 113, 'oa/work/add', '新建/编辑', '工作汇报', 'OA', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (115, 113, 'oa/work/send', '发送', '工作汇报', 'OA', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (116, 113, 'oa/work/read', '查看', '工作汇报', 'OA', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (117, 113, 'oa/work/delete', '删除', '工作汇报', 'OA', '', 2, 1, 1, 0, 0); --- ---------------------------- +INSERT INTO `oa_admin_rule` VALUES (118, 9, '', '报销管理', '报销', 'CF', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (119, 118, 'finance/expense/index', '我申请的报销', '报销', 'CF', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (120, 118, 'finance/expense/list', '我负责的报销', '报销', 'CF', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (121, 118, 'finance/expense/checkedlist', '报销打款', '报销', 'CF', '', 1, 1, 1, 0, 0); + +INSERT INTO `oa_admin_rule` VALUES (122, 118, 'finance/expense/add', '新建/编辑', '报销', 'CF', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (123, 118, 'finance/expense/delete', '删除', '报销', 'CF', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (124, 118, 'finance/expense/view', '查看', '报销', 'CF', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (125, 118, 'finance/expense/check', '审核', '报销', 'CF', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (126, 118, 'finance/expense/topay', '打款', '报销', 'CF', '', 2, 1, 1, 0, 0); + +INSERT INTO `oa_admin_rule` VALUES (127, 9, '', '发票管理', '发票', 'CF', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (128, 127, 'finance/invoice/index', '我申请的发票', '发票', 'CF', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (129, 127, 'finance/invoice/list', '我负责的发票', '发票', 'CF', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (130, 127, 'finance/invoice/checkedlist', '发票开具', '发票', 'CF', '', 1, 1, 1, 0, 0); + +INSERT INTO `oa_admin_rule` VALUES (131, 127, 'finance/invoice/add', '新建/编辑', '发票', 'CF', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (132, 127, 'finance/invoice/delete', '删除', '发票', 'CF', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (133, 127, 'finance/invoice/view', '查看', '发票', 'CF', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (134, 127, 'finance/invoice/check', '审核', '发票', 'CF', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (135, 127, 'finance/invoice/open', '开具', '发票', 'CF', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (136, 127, 'finance/invoice/tovoid', '作废', '发票', 'CF', '', 2, 1, 1, 0, 0); + +INSERT INTO `oa_admin_rule` VALUES (137, 9, 'finance/income/index', '到账管理', '到账记录', 'CF', '', 1, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (138, 137, 'finance/income/add', '新建/编辑', '到账记录', 'CF', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (139, 137, 'finance/income/view', '查看', '到账记录', 'CF', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (140, 137, 'finance/income/delete', '删除', '到账记录', 'CF', '', 2, 1, 1, 0, 0); +INSERT INTO `oa_admin_rule` VALUES (141, 10, 'business/analysis/index', '智能分析', '智能分析', 'BI', '', 1, 1, 1, 0, 0); + +--------------------------------- -- Table structure for oa_article --- ---------------------------- +--------------------------------- DROP TABLE IF EXISTS `oa_article`; CREATE TABLE `oa_article` ( `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, @@ -365,7 +354,7 @@ CREATE TABLE `oa_article` ( -- ---------------------------- -- Records of oa_article -- ---------------------------- -INSERT INTO `oa_article`(`id`, `title`, `article_cate_id`, `keywords`, `desc`, `thumb`, `uid`, `did`, `origin_url`, `content`, `read`, `type`, `is_share`, `status`, `sort`, `create_time`, `update_time`, `delete_time`) VALUES (1, '勾股办公是一款简单实用的开源免费的企业办公系统框架', 2, '', '勾股办公是一款基于ThinkPHP6+Layui+MySql打造的,简单实用的开源免费的企业办公系统框架。系统集成了系统设置、人事管理模块、消息管理模块、日常办公、财务管理等基础模块。系统简约,易于功...', 0, 1, 0, '', '

    勾股办公是一款基于ThinkPHP6 + Layui + MySql打造的,简单实用的开源免费的企业办公系统框架。系统集成了系统设置、人事管理模块、消息管理模块、日常办公、财务管理等基础模块。系统简约,易于功能扩展,方便二次开发,让开发者更专注于业务深度需求的开发,帮助开发者简单高效降低二次开发成本,通过二次开发之后可以用来做CRM,ERP,业务管理等系统。

    ', 1, 2, 1, 1, 1, 1637985280, 1637985340, 0); +INSERT INTO `oa_article` VALUES (1, '勾股办公是一款简单实用的开源免费的企业办公系统框架', 2, '', '勾股办公是一款基于ThinkPHP6+Layui+MySql打造的,简单实用的开源免费的企业办公系统框架。系统集成了系统设置、人事管理模块、消息管理模块、日常办公、财务管理等基础模块。系统简约,易于功...', 0, 1, 1, '', '

    勾股办公是一款基于ThinkPHP6 + Layui + MySql打造的,简单实用的开源免费的企业办公系统框架。系统集成了系统设置、人事管理模块、消息管理模块、日常办公、财务管理等基础模块。系统简约,易于功能扩展,方便二次开发,让开发者更专注于业务深度需求的开发,帮助开发者简单高效降低二次开发成本,通过二次开发之后可以用来做CRM,ERP,业务管理等系统。

    ', 1, 2, 1, 1, 1, 1637985280, 1637985340, 0); -- ---------------------------- -- Table structure for oa_article_cate @@ -385,8 +374,8 @@ CREATE TABLE `oa_article_cate` ( -- ---------------------------- -- Records of oa_article_cate -- ---------------------------- -INSERT INTO `oa_article_cate`(`id`, `pid`, `sort`, `title`, `desc`, `create_time`, `update_time`) VALUES (1, 0, 0, '办公技巧', '', 1637984651, 0); -INSERT INTO `oa_article_cate`(`id`, `pid`, `sort`, `title`, `desc`, `create_time`, `update_time`) VALUES (2, 0, 0, '行业技能', '', 1637984739, 0); +INSERT INTO `oa_article_cate` VALUES (1, 0, 0, '办公技巧', '', 1637984651, 0); +INSERT INTO `oa_article_cate` VALUES (2, 0, 0, '行业技能', '', 1637984739, 0); -- ---------------------------- -- Table structure for oa_article_keywords @@ -406,7 +395,7 @@ CREATE TABLE `oa_article_keywords` ( -- ---------------------------- -- Records of oa_article_keywords -- ---------------------------- -INSERT INTO `oa_article_keywords`(`id`, `aid`, `keywords_id`, `status`, `create_time`) VALUES (1, 1, 1, 1, 1638093082); +INSERT INTO `oa_article_keywords` VALUES (1, 1, 1, 1, 1638093082); -- ---------------------------- -- Table structure for oa_config @@ -426,25 +415,10 @@ CREATE TABLE `oa_config` ( -- ---------------------------- -- Records of oa_config -- ---------------------------- -INSERT INTO `oa_config`(`id`, `title`, `name`, `content`, `status`, `create_time`, `update_time`) VALUES (1, '网站配置', 'web', 'a:13:{s:2:\"id\";s:1:\"1\";s:11:\"admin_title\";s:8:\"勾股OA\";s:5:\"title\";s:8:\"勾股OA\";s:4:\"logo\";s:52:\"/storage/202111/fc507cc8332d5ef49d9425185e4a9697.jpg\";s:4:\"file\";s:0:\"\";s:6:\"domain\";s:23:\"https://oa.gougucms.com\";s:3:\"icp\";s:23:\"粤ICP备1xxxxxx11号-1\";s:8:\"keywords\";s:8:\"勾股OA\";s:5:\"beian\";s:29:\"粤公网安备1xxxxxx11号-1\";s:4:\"desc\";s:479:\"勾股办公是一款基于ThinkPHP6 + Layui + MySql打造的,简单实用的开源免费的企业办公系统框架。系统集成了系统设置、人事管理模块、消息管理模块、日常办公、财务管理等基础模块。系统简约,易于功能扩展,方便二次开发,让开发者更专注于业务深度需求的开发,帮助开发者简单高效降低二次开发成本,通过二次开发之后可以用来做CRM,ERP,业务管理等系统。 \";s:4:\"code\";s:0:\"\";s:9:\"copyright\";s:32:\"© 2021 gougucms.com MIT license\";s:7:\"version\";s:6:\"1.0.22\";}', 1, 1612514630, 1638010154); -INSERT INTO `oa_config`(`id`, `title`, `name`, `content`, `status`, `create_time`, `update_time`) VALUES (2, '邮箱配置', 'email', 'a:8:{s:2:\"id\";s:1:\"2\";s:4:\"smtp\";s:11:\"smtp.qq.com\";s:9:\"smtp_port\";s:3:\"465\";s:9:\"smtp_user\";s:15:\"gougucms@qq.com\";s:8:\"smtp_pwd\";s:6:\"123456\";s:4:\"from\";s:24:\"勾股CMS系统管理员\";s:5:\"email\";s:18:\"admin@gougucms.com\";s:8:\"template\";s:485:\"

    勾股办公是一款基于ThinkPHP6 + Layui + MySql打造的,简单实用的开源免费的企业办公系统框架。系统集成了系统设置、人事管理模块、消息管理模块、日常办公、财务管理等基础模块。系统简约,易于功能扩展,方便二次开发,让开发者更专注于业务深度需求的开发,帮助开发者简单高效降低二次开发成本,通过二次开发之后可以用来做CRM,ERP,业务管理等系统。

    \";}', 1, 1612521657, 1637075205); -INSERT INTO `oa_config`(`id`, `title`, `name`, `content`, `status`, `create_time`, `update_time`) VALUES (3, 'Api Token配置', 'token', 'a:5:{s:2:\"id\";s:1:\"3\";s:3:\"iss\";s:15:\"oa.gougucms.com\";s:3:\"aud\";s:7:\"gouguoa\";s:7:\"secrect\";s:7:\"GOUGUOA\";s:7:\"exptime\";s:4:\"3600\";}', 1, 1627313142, 1638010233); -INSERT INTO `oa_config`(`id`, `title`, `name`, `content`, `status`, `create_time`, `update_time`) VALUES (4, '其他配置', 'other', 'a:3:{s:2:\"id\";s:1:\"5\";s:6:\"author\";s:15:\"勾股工作室\";s:7:\"version\";s:13:\"v1.2021.07.28\";}', 1, 1613725791, 1635953640); - --- ---------------------------- --- Table structure for oa_check --- ---------------------------- -DROP TABLE IF EXISTS `oa_check`; -CREATE TABLE `oa_check` ( - `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, - `uid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '审核人ID', - `type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '审核类型 1报销审核人 2报销打款确认人 3发票审核人 4发票开票人', - `remark` varchar(1000) NULL DEFAULT '' COMMENT '备注', - `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:-1删除 0禁用 1启用', - `create_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间', - `update_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '审核人配置表'; +INSERT INTO `oa_config` VALUES (1, '网站配置', 'web', 'a:13:{s:2:\"id\";s:1:\"1\";s:11:\"admin_title\";s:8:\"勾股OA\";s:5:\"title\";s:8:\"勾股OA\";s:4:\"logo\";s:52:\"/storage/202111/fc507cc8332d5ef49d9425185e4a9697.jpg\";s:4:\"file\";s:0:\"\";s:6:\"domain\";s:23:\"https://oa.gougucms.com\";s:3:\"icp\";s:23:\"粤ICP备1xxxxxx11号-1\";s:8:\"keywords\";s:8:\"勾股OA\";s:5:\"beian\";s:29:\"粤公网安备1xxxxxx11号-1\";s:4:\"desc\";s:479:\"勾股办公是一款基于ThinkPHP6 + Layui + MySql打造的,简单实用的开源免费的企业办公系统框架。系统集成了系统设置、人事管理模块、消息管理模块、日常办公、财务管理等基础模块。系统简约,易于功能扩展,方便二次开发,让开发者更专注于业务深度需求的开发,帮助开发者简单高效降低二次开发成本,通过二次开发之后可以用来做CRM,ERP,业务管理等系统。 \";s:4:\"code\";s:0:\"\";s:9:\"copyright\";s:32:\"© 2021 gougucms.com MIT license\";s:7:\"version\";s:6:\"1.0.22\";}', 1, 1612514630, 1638010154); +INSERT INTO `oa_config` VALUES (2, '邮箱配置', 'email', 'a:8:{s:2:\"id\";s:1:\"2\";s:4:\"smtp\";s:11:\"smtp.qq.com\";s:9:\"smtp_port\";s:3:\"465\";s:9:\"smtp_user\";s:15:\"gougucms@qq.com\";s:8:\"smtp_pwd\";s:6:\"123456\";s:4:\"from\";s:24:\"勾股CMS系统管理员\";s:5:\"email\";s:18:\"admin@gougucms.com\";s:8:\"template\";s:485:\"

    勾股办公是一款基于ThinkPHP6 + Layui + MySql打造的,简单实用的开源免费的企业办公系统框架。系统集成了系统设置、人事管理模块、消息管理模块、日常办公、财务管理等基础模块。系统简约,易于功能扩展,方便二次开发,让开发者更专注于业务深度需求的开发,帮助开发者简单高效降低二次开发成本,通过二次开发之后可以用来做CRM,ERP,业务管理等系统。

    \";}', 1, 1612521657, 1637075205); +INSERT INTO `oa_config` VALUES (3, 'Api Token配置', 'token', 'a:5:{s:2:\"id\";s:1:\"3\";s:3:\"iss\";s:15:\"oa.gougucms.com\";s:3:\"aud\";s:7:\"gouguoa\";s:7:\"secrect\";s:7:\"GOUGUOA\";s:7:\"exptime\";s:4:\"3600\";}', 1, 1627313142, 1638010233); +INSERT INTO `oa_config` VALUES (4, '其他配置', 'other', 'a:3:{s:2:\"id\";s:1:\"5\";s:6:\"author\";s:15:\"勾股工作室\";s:7:\"version\";s:13:\"v1.2021.07.28\";}', 1, 1613725791, 1635953640); -- ---------------------------- -- Table structure for oa_department @@ -518,6 +492,115 @@ CREATE TABLE `oa_personal_quit` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '人事离职记录表'; +-- ---------------------------- +-- Table structure for oa_flow_type +-- ---------------------------- +DROP TABLE IF EXISTS `oa_flow_type`; +CREATE TABLE `oa_flow_type` ( + `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `type` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '1假勤,2行政,3财务,4人事,5其他', + `title` varchar(100) NOT NULL DEFAULT '' COMMENT '审批名称', + `name` varchar(100) NOT NULL DEFAULT '' COMMENT '审批标识', + `icon` varchar(255) NOT NULL DEFAULT '' COMMENT '图标', + `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:-1删除 0禁用 1启用', + `create_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间', + `update_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '审批类型'; + +-- ---------------------------- +-- Records of oa_flow_type +-- ---------------------------- +INSERT INTO `oa_flow_type` VALUES (1, 1, '请假', 'qingjia', 'icon-kechengziyuanguanli', 1, 1639896302, 0); +INSERT INTO `oa_flow_type` VALUES (2, 1, '出差', 'chuchai', 'icon-jiaoshiguanli', 1, 1641802838, 0); +INSERT INTO `oa_flow_type` VALUES (3, 1, '外出', 'waichu', 'icon-tuiguangguanli', 1, 1641802858, 0); +INSERT INTO `oa_flow_type` VALUES (4, 1, '加班', 'jiaban', 'icon-xueshengchengji', 1, 1641802892, 0); +INSERT INTO `oa_flow_type` VALUES (5, 2, '会议室预定', 'huiyishi', 'icon-kehuguanli', 1, 1641802939, 0); +INSERT INTO `oa_flow_type` VALUES (6, 2, '公文流转', 'gongwen', 'icon-jiaoxuejihua', 1, 1641802976, 0); +INSERT INTO `oa_flow_type` VALUES (7, 2, '物品维修', 'weixiu', 'icon-chuangjianxitong', 1, 1641803005, 0); +INSERT INTO `oa_flow_type` VALUES (8, 2, '用章', 'yongzhang', 'icon-shenpishezhi', 1, 1641804126, 0); +INSERT INTO `oa_flow_type` VALUES (9, 2, '用车', 'yongche', 'icon-dongtaiguanli', 1, 1641804283, 0); +INSERT INTO `oa_flow_type` VALUES (10, 2, '用车归还', 'yongcheguihai', 'icon-kaoheguanli', 1, 1641804411, 0); +INSERT INTO `oa_flow_type` VALUES (11, 3, '借款申请', 'jiekuan', 'icon-zhangbuguanli', 1, 1641804537, 0); +INSERT INTO `oa_flow_type` VALUES (12, 3, '付款申请', 'fukuan', 'icon-gongziguanli', 1, 1641804601, 0); +INSERT INTO `oa_flow_type` VALUES (13, 3, '奖励申请', 'jiangli', 'icon-hetongguanli', 1, 1641804711, 0); +INSERT INTO `oa_flow_type` VALUES (14, 3, '采购', 'caigou', 'icon-xiaoshoupin', 1, 1641804917, 0); +INSERT INTO `oa_flow_type` VALUES (15, 3, '活动经费', 'huodong', 'icon-wangxiaoshezhi1', 1, 1641805110, 0); +INSERT INTO `oa_flow_type` VALUES (16, 4, '入职', 'ruzhi', 'icon-xueshengdaoru', 1, 1641893853, 0); +INSERT INTO `oa_flow_type` VALUES (17, 4, '转正', 'zhuanzheng', 'icon-xueshengyidong', 1, 1641893926, 0); +INSERT INTO `oa_flow_type` VALUES (18, 4, '离职', 'lizhi', 'icon-banjiguanli', 1, 1641894048, 0); +INSERT INTO `oa_flow_type` VALUES (19, 4, '招聘需求', 'zhaopin', 'icon-zhaopinguanli', 1, 1641894080, 0); +INSERT INTO `oa_flow_type` VALUES (20, 6, '报销', 'baoxiao', 'icon-jizhang', 1, 1641804488, 0); +INSERT INTO `oa_flow_type` VALUES (21, 7, '发票', 'fapiao', 'icon-fuwuliebiao', 1, 1642904833, 0); + + +-- ---------------------------- +-- Table structure for oa_cost_cate +-- ---------------------------- +DROP TABLE IF EXISTS `oa_cost_cate`; +CREATE TABLE `oa_cost_cate` ( + `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `title` varchar(100) NOT NULL DEFAULT '' COMMENT '费用类型名称', + `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:-1删除 0禁用 1启用', + `create_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间', + `update_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '费用类型'; + +-- ---------------------------- +-- Records of oa_cost_cate +-- ---------------------------- +INSERT INTO `oa_cost_cate` VALUES (1, '差旅费', 1, 1639898199, 0); +INSERT INTO `oa_cost_cate` VALUES (2, '办公费', 1, 1639898434, 0); +INSERT INTO `oa_cost_cate` VALUES (3, '招待费', 1, 1639898564, 0); +INSERT INTO `oa_cost_cate` VALUES (4, '交通费', 1, 1639898564, 0); +INSERT INTO `oa_cost_cate` VALUES (5, '通讯费', 1, 1639898564, 0); +INSERT INTO `oa_cost_cate` VALUES (6, '采购付款', 1, 1639898564, 0); +INSERT INTO `oa_cost_cate` VALUES (7, '其他', 1, 1639898564, 0); + + +-- ---------------------------- +-- Table structure for oa_seal_cate +-- ---------------------------- +DROP TABLE IF EXISTS `oa_seal_cate`; +CREATE TABLE `oa_seal_cate` ( + `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `title` varchar(100) NOT NULL DEFAULT '' COMMENT '印章类型名称', + `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:-1删除 0禁用 1启用', + `create_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间', + `update_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '印章类型'; + +-- ---------------------------- +-- Records of oa_seal_cate +-- ---------------------------- +INSERT INTO `oa_seal_cate` VALUES (1, '公章', 1, 1639899124, 0); +INSERT INTO `oa_seal_cate` VALUES (2, '合同章', 1, 1639899140, 0); +INSERT INTO `oa_seal_cate` VALUES (3, '法人章', 1, 1639899148, 0); +INSERT INTO `oa_seal_cate` VALUES (4, '其他', 1, 1639899158, 0); + +-- ---------------------------- +-- Table structure for oa_car_cate +-- ---------------------------- +DROP TABLE IF EXISTS `oa_car_cate`; +CREATE TABLE `oa_car_cate` ( + `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `title` varchar(100) NOT NULL DEFAULT '' COMMENT '车辆名称', + `name` varchar(100) NOT NULL DEFAULT '' COMMENT '车辆号码', + `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:-1删除 0禁用 1启用', + `create_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间', + `update_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '用车类型'; + +-- ---------------------------- +-- Records of oa_car_cate +-- ---------------------------- +INSERT INTO `oa_car_cate` VALUES (1, '宝马X5', '粤A55555', 1, 1639900555, 0); +INSERT INTO `oa_car_cate` VALUES (2, '哈弗H6', '粤A66666', 1, 1639900666, 0); +INSERT INTO `oa_car_cate` VALUES (3, '奥迪Q8', '粤A88888', 1, 1639900888, 0); + -- ---------------------------- -- Table structure for oa_expense -- ---------------------------- @@ -531,10 +614,11 @@ CREATE TABLE `oa_expense` ( `did` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '报销部门ID', `ptid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '预定字段:关联项目ID', `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:-1删除 0禁用 1启用', - `check_admin_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '审核人ID', - `check_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '审核时间', - `check_status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '报销状态:0审核不通过,1申请审核中,1审核通过,2已打款', - `check_remark` text NULL COMMENT '审核不通过的理由', + `check_step_sort` int(11) NOT NULL DEFAULT 0 COMMENT '当前审批步骤', + `check_admin_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '当前审批人ID,如:1,2,3,', + `flow_admin_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '历史审批人ID,如:1,2,3,', + `check_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '状态(0待审、1审批中、2通过、3失败、4撤销、5已打款)', + `last_admin_id` varchar(200) NOT NULL DEFAULT '0' COMMENT '上一审批人', `pay_admin_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '打款人ID', `pay_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '打款时间', `remark` varchar(1000) NULL DEFAULT '' COMMENT '备注', @@ -559,9 +643,12 @@ CREATE TABLE `oa_expense_cate` ( -- ---------------------------- -- Records of oa_expense_cate -- ---------------------------- -INSERT INTO `oa_expense_cate`(`id`, `title`, `status`, `create_time`, `update_time`) VALUES (1, '交通费', 1, 1637987189, 0); -INSERT INTO `oa_expense_cate`(`id`, `title`, `status`, `create_time`, `update_time`) VALUES (2, '住宿费', 1, 1637987199, 0); -INSERT INTO `oa_expense_cate`(`id`, `title`, `status`, `create_time`, `update_time`) VALUES (3, '餐补费', 1, 1638088518, 0); +INSERT INTO `oa_expense_cate` VALUES (1, '交通费', 1, 1637987189, 0); +INSERT INTO `oa_expense_cate` VALUES (2, '住宿费', 1, 1637987199, 0); +INSERT INTO `oa_expense_cate` VALUES (3, '餐补费', 1, 1638088518, 0); +INSERT INTO `oa_expense_cate` VALUES (4, '招待费', 1, 1637987199, 0); +INSERT INTO `oa_expense_cate` VALUES (5, '汽油费', 1, 1637987199, 0); +INSERT INTO `oa_expense_cate` VALUES (6, '其他费', 1, 1637987199, 0); -- ---------------------------- -- Table structure for oa_expense_file_interfix @@ -640,7 +727,8 @@ CREATE TABLE `oa_invoice` ( `check_admin_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '发票审核人', `check_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '审核时间', `open_admin_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '发票开具人', - `open_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '开票时间', + `open_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '发票开具时间', + `delivery` varchar(100) NOT NULL DEFAULT '' COMMENT '快递单号', `type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '抬头类型:1企业2个人', `invoice_subject` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '关联发票主体ID', `invoice_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '发票类型:1增值税专用发票2增值税普通发票', @@ -651,8 +739,12 @@ CREATE TABLE `oa_invoice` ( `invoice_account` varchar(100) NOT NULL DEFAULT '' COMMENT '银行账号', `invoice_banking` varchar(100) NOT NULL DEFAULT '' COMMENT '银行营业网点', `invoice_address` varchar(100) NOT NULL DEFAULT '' COMMENT '地址', - `invoice_status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '发票状态:0审核不通过 1审核中 2审核通过,待开具 3 已开具 10已作废', - `check_remark` text NULL COMMENT '审核不通过的理由', + `check_step_sort` int(11) NOT NULL DEFAULT 0 COMMENT '当前审批步骤', + `check_admin_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '当前审批人ID,如:1,2,3,', + `flow_admin_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '历史审批人ID,如:1,2,3,', + `check_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '发票状态(0待审、1审批中、2通过、3失败、4撤销、5已开具、10已作废)', + `last_admin_id` varchar(200) NOT NULL DEFAULT '0' COMMENT '上一审批人', + `check_remark` text NULL COMMENT '审核不通过/撤销的理由', `remark` text NULL COMMENT '备注', `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:-1删除 0禁用 1正常', `enter_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最新到账时间', @@ -694,7 +786,7 @@ CREATE TABLE `oa_invoice_subject` ( -- ---------------------------- -- Records of oa_invoice_subject -- ---------------------------- -INSERT INTO `oa_invoice_subject`(`id`, `title`, `status`, `create_time`, `update_time`) VALUES (1, '勾股信息科技有限公司', 1, 1638006751, 0); +INSERT INTO `oa_invoice_subject` VALUES (1, '勾股信息科技有限公司', 1, 1638006751, 0); -- ---------------------------- -- Table structure for oa_keywords @@ -713,7 +805,7 @@ CREATE TABLE `oa_keywords` ( -- ---------------------------- -- Records of oa_keywords -- ---------------------------- -INSERT INTO `oa_keywords`(`id`, `title`, `sort`, `status`, `create_time`, `update_time`) VALUES (1, '勾股OA', 1, 1, 1638006730, 0); +INSERT INTO `oa_keywords` VALUES (1, '勾股OA', 1, 1, 1638006730, 0); -- ---------------------------- -- Table structure for oa_message @@ -730,10 +822,6 @@ CREATE TABLE `oa_message` ( `type_user` text NULL COMMENT '人员ID或部门ID或角色ID,全员则为空', `send_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '发送日期', `read_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '阅读时间', - `module_name` varchar(30) NOT NULL COMMENT '模块', - `controller_name` varchar(30) NOT NULL COMMENT '控制器', - `action_name` varchar(30) NOT NULL COMMENT '方法', - `action_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '操作模块数据的id(针对系统消息)', `pid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '来源发件id', `fid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '转发或回复消息关联id', `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:-1已删除消息 0垃圾消息 1正常消息', @@ -741,6 +829,10 @@ CREATE TABLE `oa_message` ( `delete_source` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '垃圾消息来源: 1已发消息 2草稿消息 3已收消息', `create_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间', `update_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间', + `module_name` varchar(30) NOT NULL COMMENT '模块', + `controller_name` varchar(30) NOT NULL COMMENT '控制器', + `action_name` varchar(30) NOT NULL COMMENT '方法', + `action_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '操作模块数据的id(针对系统消息)', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '消息表'; @@ -753,12 +845,8 @@ CREATE TABLE `oa_message_file_interfix` ( `mid` int(11) UNSIGNED NOT NULL COMMENT '消息id', `file_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '相关联附件id', `admin_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建人', - `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:-1删除 0禁用 1启用', `create_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间', - `update_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间', - PRIMARY KEY (`id`) USING BTREE, - INDEX `mid`(`mid`) USING BTREE, - INDEX `fid`(`file_id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '消息关联的附件表'; -- ---------------------------- @@ -783,7 +871,7 @@ CREATE TABLE `oa_note` ( -- ---------------------------- -- Records of oa_note -- ---------------------------- -INSERT INTO `oa_note`(`id`, `cate_id`, `title`, `content`, `src`, `status`, `sort`, `start_time`, `end_time`, `create_time`, `update_time`) VALUES (1, 1, '欢迎使用勾股OA办公系统', '

    欢迎使用勾股OA办公系统,勾股办公是一款基于ThinkPHP6 + Layui + MySql打造的,简单实用的开源免费的企业办公系统框架。系统集成了系统设置、人事管理模块、消息管理模块、日常办公、财务管理等基础模块。系统简约,易于功能扩展,方便二次开发,让开发者更专注于业务深度需求的开发,帮助开发者简单高效降低二次开发成本,通过二次开发之后可以用来做CRM,ERP,业务管理等系统。

    ', 'https://oa.gougucms.com', 1, 2, 1635696000, 1924876800, 1637984962, 1637984975); +INSERT INTO `oa_note` VALUES (1, 1, '欢迎使用勾股OA办公系统', '

    欢迎使用勾股OA办公系统,勾股办公是一款基于ThinkPHP6 + Layui + MySql打造的,简单实用的开源免费的企业办公系统框架。系统集成了系统设置、人事管理模块、消息管理模块、日常办公、财务管理等基础模块。系统简约,易于功能扩展,方便二次开发,让开发者更专注于业务深度需求的开发,帮助开发者简单高效降低二次开发成本,通过二次开发之后可以用来做CRM,ERP,业务管理等系统。

    ', 'https://oa.gougucms.com', 1, 2, 1635696000, 1924876800, 1637984962, 1637984975); -- ---------------------------- -- Table structure for oa_note_cate @@ -802,8 +890,8 @@ CREATE TABLE `oa_note_cate` ( -- ---------------------------- -- Records of oa_note_cate -- ---------------------------- -INSERT INTO `oa_note_cate`(`id`, `pid`, `sort`, `title`, `create_time`, `update_time`) VALUES (1, 0, 1, '普通公告', 1637984265, 1637984299); -INSERT INTO `oa_note_cate`(`id`, `pid`, `sort`, `title`, `create_time`, `update_time`) VALUES (2, 0, 2, '紧急公告', 1637984283, 1637984310); +INSERT INTO `oa_note_cate` VALUES (1, 0, 1, '普通公告', 1637984265, 1637984299); +INSERT INTO `oa_note_cate` VALUES (2, 0, 2, '紧急公告', 1637984283, 1637984310); -- ---------------------------- -- Table structure for oa_position @@ -823,8 +911,8 @@ CREATE TABLE `oa_position` ( -- ---------------------------- -- Records of oa_position -- ---------------------------- -INSERT INTO `oa_position`(`id`, `title`, `work_price`, `remark`, `status`, `create_time`, `update_time`) VALUES (1, '超级岗位', 1000, '超级岗位,不能轻易修改权限', 1, 0, 0); -INSERT INTO `oa_position`(`id`, `title`, `work_price`, `remark`, `status`, `create_time`, `update_time`) VALUES (2, '人事总监', 1000, '人事部的最大领导', 1, 0, 0); +INSERT INTO `oa_position` VALUES (1, '超级岗位', 1000, '超级岗位,不能轻易修改权限', 1, 0, 0); +INSERT INTO `oa_position` VALUES (2, '人事总监', 1000, '人事部的最大领导', 1, 0, 0); -- ---------------------------- -- Table structure for oa_position_group @@ -841,8 +929,8 @@ CREATE TABLE `oa_position_group` ( -- ---------------------------- -- Records of oa_position_group -- ---------------------------- -INSERT INTO `oa_position_group`(`pid`, `group_id`, `create_time`, `update_time`) VALUES (1, 1, 1635755739, 0); -INSERT INTO `oa_position_group`(`pid`, `group_id`, `create_time`, `update_time`) VALUES (2, 2, 1638007427, 0); +INSERT INTO `oa_position_group` VALUES (1, 1, 1635755739, 0); +INSERT INTO `oa_position_group` VALUES (2, 2, 1638007427, 0); -- ---------------------------- -- Table structure for oa_plan @@ -892,22 +980,6 @@ CREATE TABLE `oa_schedule` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '工作记录'; --- ---------------------------- --- Table structure for oa_schedule_cate --- ---------------------------- -DROP TABLE IF EXISTS `oa_schedule_cate`; -CREATE TABLE `oa_schedule_cate` ( - `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, - `title` varchar(100) NOT NULL DEFAULT '' COMMENT '工作类型名称', - `did` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '关联部门id', - `service_cate_id` int(11) NOT NULL DEFAULT 0 COMMENT '预留字段:关联业务类型id', - `remark` varchar(1000) NULL DEFAULT '' COMMENT '备注', - `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:-1删除 0禁用 1启用', - `create_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间', - `update_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '工作类型表'; - -- ---------------------------- -- Table structure for oa_schedule_interfix -- ---------------------------- @@ -922,3 +994,3457 @@ CREATE TABLE `oa_schedule_interfix` ( `update_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '工作记录关联的附件表'; + + +-- ---------------------------- +-- Table structure for oa_approve +-- ---------------------------- +DROP TABLE IF EXISTS `oa_approve`; +CREATE TABLE `oa_approve` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `type` int(11) NOT NULL DEFAULT 0 COMMENT '审批类型', + `flow_id` int(11) NOT NULL DEFAULT 0 COMMENT '审批流程ID', + `content` varchar(500) NOT NULL DEFAULT '' COMMENT '内容', + `name` varchar(255) NOT NULL DEFAULT '' COMMENT '名称', + `remark` varchar(500) NOT NULL DEFAULT '' COMMENT '备注', + `detail_time` int(11) NOT NULL DEFAULT 0 COMMENT '时间日期', + `start_time` int(11) NOT NULL DEFAULT 0 COMMENT '开始时间', + `end_time` int(11) NOT NULL DEFAULT 0 COMMENT '结束时间', + `duration` decimal(10, 1) NOT NULL DEFAULT 0.0 COMMENT '时长', + `create_admin_id` int(10) NOT NULL COMMENT '创建人ID', + `department_id` int(10) NOT NULL COMMENT '创建人部门ID', + `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `update_time` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间', + `check_step_sort` int(11) NOT NULL DEFAULT 0 COMMENT '当前审批步骤', + `check_admin_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '当前审批人ID,如:1,2,3,', + `flow_admin_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '历史审批人ID,如:1,2,3,', + `check_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '状态(0待审、1审批中、2通过、3失败、4撤销)', + `last_admin_id` varchar(200) NOT NULL DEFAULT '0' COMMENT '上一审批人', + `detail_type` int(11) NOT NULL DEFAULT 0 COMMENT '假期类型:1事假,2年假,3调休假,4病假,5婚假,6丧假,7产假,8陪产假,9其他', + `other_type` int(11) NOT NULL DEFAULT 0 COMMENT '其他类型:1公告类,2规则制度类,3合同类,4资质更新类,5员工证明,6其他', + `department_type` int(11) NOT NULL DEFAULT 0 COMMENT '部门类型', + `position_type` int(11) NOT NULL DEFAULT 0 COMMENT '职位类型', + `bank` varchar(255) NOT NULL DEFAULT '' COMMENT '银行卡账号', + `address` varchar(255) NOT NULL DEFAULT '' COMMENT '地址', + `num` bigint(12) NOT NULL DEFAULT 0 COMMENT '数量', + `num1` bigint(12) NOT NULL DEFAULT 0 COMMENT '数量1', + `amount` decimal(18, 2) NOT NULL DEFAULT 0.00 COMMENT '金额', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '日常审批表'; + +-- ---------------------------- +-- Table structure for oa_flow +-- ---------------------------- +DROP TABLE IF EXISTS `oa_flow`; +CREATE TABLE `oa_flow` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(50) NOT NULL COMMENT '审批流名称', + `check_type` tinyint(4) NOT NULL COMMENT '1固定审批,2授权审批人', + `type` tinyint(4) NOT NULL COMMENT '应用模块,1假勤,2行政,3财务,4人事,5其他,6报销,7发票', + `flow_cate` tinyint(11) NOT NULL DEFAULT 0 COMMENT '应用审批类型id', + `department_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '应用部门ID(0为全部)1,2,3', + `user_ids` varchar(500) NOT NULL DEFAULT '' COMMENT '员工ID', + `remark` varchar(500) NOT NULL DEFAULT '' COMMENT '流程说明', + `flow_list` varchar(1000) NULL DEFAULT '' COMMENT '流程数据序列化', + `admin_id` int(11) NOT NULL COMMENT '创建人ID', + `create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间', + `update_time` int(11) NOT NULL DEFAULT 0 COMMENT '更新时间', + `status` tinyint(4) NOT NULL DEFAULT 1 COMMENT '状态 1启用,0禁用', + `delete_time` int(11) NOT NULL DEFAULT 0 COMMENT '删除时间', + `delete_user_id` int(11) NOT NULL DEFAULT 0 COMMENT '删除人ID', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '审批流程表'; + +-- ---------------------------- +-- Records of oa_flow +-- ---------------------------- +INSERT INTO `oa_flow` VALUES (1, '请假审批', 2, 1, 1, '', '', '请假审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644401970, 1644402071, 1, 0, 0); +INSERT INTO `oa_flow` VALUES (2, '出差审批', 2, 1, 2, '', '', '请假审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402054, 0, 1, 0, 0); +INSERT INTO `oa_flow` VALUES (3, '外出审批', 2, 1, 3, '', '', '外出审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402116, 0, 1, 0, 0); +INSERT INTO `oa_flow` VALUES (4, '加班申请审批', 2, 1, 4, '', '', '加班申请审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402147, 1644456735, 1, 0, 0); +INSERT INTO `oa_flow` VALUES (5, '会议室预定审批', 2, 2, 5, '', '', '会议室预定审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402193, 0, 1, 0, 0); +INSERT INTO `oa_flow` VALUES (6, '公文流转审批', 2, 2, 6, '', '', '公文流转审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402386, 0, 1, 0, 0); +INSERT INTO `oa_flow` VALUES (7, '物品维修审批', 2, 2, 7, '', '', '物品维修审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402473, 0, 1, 0, 0); +INSERT INTO `oa_flow` VALUES (8, '用章审批', 2, 2, 8, '', '', '用章审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402499, 0, 1, 0, 0); +INSERT INTO `oa_flow` VALUES (9, '用车审批', 2, 2, 9, '', '', '用车审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402525, 0, 1, 0, 0); +INSERT INTO `oa_flow` VALUES (10, '用车归还审批', 2, 2, 10, '', '', '用车归还审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402549, 0, 1, 0, 0); +INSERT INTO `oa_flow` VALUES (11, '借款申请审批', 2, 3, 11, '', '', '借款申请审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402611, 0, 1, 0, 0); +INSERT INTO `oa_flow` VALUES (12, '付款申请审批', 2, 3, 12, '', '', '付款申请审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402679, 0, 1, 0, 0); +INSERT INTO `oa_flow` VALUES (13, '奖励申请审批', 2, 3, 13, '', '', '奖励申请审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402705, 0, 1, 0, 0); +INSERT INTO `oa_flow` VALUES (14, '采购申请审批', 2, 3, 14, '', '', '采购申请审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402739, 0, 1, 0, 0); +INSERT INTO `oa_flow` VALUES (15, '活动经费审批', 2, 3, 15, '', '', '活动经费审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402762, 0, 1, 0, 0); +INSERT INTO `oa_flow` VALUES (16, '入职申请审批', 2, 4, 16, '', '', '入职申请审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402791, 0, 1, 0, 0); +INSERT INTO `oa_flow` VALUES (17, '转正申请审批', 2, 4, 17, '', '', '转正申请审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402812, 0, 1, 0, 0); +INSERT INTO `oa_flow` VALUES (18, '离职申请审批', 2, 4, 18, '', '', '离职申请审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402834, 0, 1, 0, 0); +INSERT INTO `oa_flow` VALUES (19, '招聘需求审批', 2, 4, 19, '', '', '招聘需求审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644402855, 0, 1, 0, 0); +INSERT INTO `oa_flow` VALUES (20, '报销审批', 2, 6, 20, '', '', '报销审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644490024, 0, 1, 0, 0); +INSERT INTO `oa_flow` VALUES (21, '发票审批', 2, 7, 21, '', '', '报销审批流程', 'a:1:{i:0;a:2:{s:9:\"flow_type\";s:1:\"1\";s:9:\"flow_uids\";s:0:\"\";}}', 1, 1644490053, 0, 1, 0, 0); + +-- ---------------------------- +-- Table structure for oa_flow_step +-- ---------------------------- +DROP TABLE IF EXISTS `oa_flow_step`; +CREATE TABLE `oa_flow_step` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `action_id` int(11) NOT NULL COMMENT '审批内容ID', + `flow_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0自由指定,1当前部门负责人,2上一级部门负责人,3指定用户(任意一人),4指定用户(多人会签)', + `flow_uids` varchar(500) NOT NULL DEFAULT '' COMMENT '审批人ID (使用逗号隔开) 1,2,3', + `sort` tinyint(4) NOT NULL DEFAULT 0 COMMENT '排序ID', + `type` tinyint(2) NOT NULL DEFAULT 1 COMMENT '审批类型:1日常审批,2报销审批,3发票审批', + `create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间', + `delete_time` int(11) NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '审批步骤表'; + +-- ---------------------------- +-- Table structure for oa_flow_record +-- ---------------------------- +DROP TABLE IF EXISTS `oa_flow_record`; +CREATE TABLE `oa_flow_record` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `action_id` int(11) NOT NULL DEFAULT 0 COMMENT '审批内容ID', + `step_id` int(11) NOT NULL DEFAULT 0 COMMENT '审批步骤ID', + `check_user_id` int(11) NOT NULL DEFAULT 0 COMMENT '审批人ID', + `check_time` int(11) NOT NULL COMMENT '审批时间', + `status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '1审核通过2审核失败3撤销', + `type` tinyint(2) NOT NULL DEFAULT 1 COMMENT '审批类型:1日常审批,2报销审批,3发票审批', + `content` varchar(500) NOT NULL DEFAULT '' COMMENT '审核意见', + `is_invalid` tinyint(1) NOT NULL DEFAULT 0 COMMENT '审批失效(1标记为无效)', + `delete_time` int(11) NOT NULL DEFAULT 0 COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '审批记录表'; + +-- ---------------------------- +-- Table structure for oa_work +-- ---------------------------- +DROP TABLE IF EXISTS `oa_work`; +CREATE TABLE `oa_work` ( + `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '类型:1 日报 2周报 3月报', + `type_user` text NULL COMMENT '接受人员ID', + `works` text NULL COMMENT '汇报工作内容', + `plans` text NULL COMMENT '计划工作内容', + `remark` text NULL COMMENT '其他事项', + `admin_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建人id', + `create_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间', + `update_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间', + `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:-1删除 0禁用 1启用', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '汇报工作表'; + +-- ---------------------------- +-- Table structure for oa_work_file_interfix +-- ---------------------------- +DROP TABLE IF EXISTS `oa_work_file_interfix`; +CREATE TABLE `oa_work_file_interfix` ( + `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `wid` int(11) UNSIGNED NOT NULL COMMENT '汇报工作id', + `file_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '相关联附件id', + `admin_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建人', + `create_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '汇报工作关联的附件表'; + +-- ---------------------------- +-- Table structure for oa_work_record +-- ---------------------------- +DROP TABLE IF EXISTS `oa_work_record`; +CREATE TABLE `oa_work_record` ( + `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `wid` int(11) UNSIGNED NOT NULL COMMENT '汇报工作id', + `from_uid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '发送人id', + `to_uid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '接收人id', + `send_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '发送日期', + `read_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '阅读时间', + `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:-1删除 0禁用 1启用', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '汇报工作发送记录表'; + + +-- ---------------------------- +-- Table structure for oa_city +-- ---------------------------- +DROP TABLE IF EXISTS `oa_city`; +CREATE TABLE `oa_city` ( + `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '地区编码', + `name` varchar(255) NOT NULL DEFAULT '' COMMENT '地区名称', + `level` tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '地区级别', + `pid` mediumint(8) UNSIGNED NOT NULL DEFAULT 0 COMMENT '地区父编码id', + `region_path` varchar(500) NOT NULL DEFAULT '' COMMENT '地区编码路径', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '中国省市区乡镇数据表'; + +-- ---------------------------- +-- Records of oa_city +-- ---------------------------- +INSERT INTO `oa_city` VALUES (110000, '北京市', 1, 0, ',110000,'); +INSERT INTO `oa_city` VALUES (110101, '东城区', 2, 110000, ',110000,110101,'); +INSERT INTO `oa_city` VALUES (110102, '西城区', 2, 110000, ',110000,110102,'); +INSERT INTO `oa_city` VALUES (110103, '崇文区', 2, 110000, ',110000,110103,'); +INSERT INTO `oa_city` VALUES (110104, '宣武区', 2, 110000, ',110000,110104,'); +INSERT INTO `oa_city` VALUES (110105, '朝阳区', 2, 110000, ',110000,110105,'); +INSERT INTO `oa_city` VALUES (110106, '丰台区', 2, 110000, ',110000,110106,'); +INSERT INTO `oa_city` VALUES (110107, '石景山区', 2, 110000, ',110000,110107,'); +INSERT INTO `oa_city` VALUES (110108, '海淀区', 2, 110000, ',110000,110108,'); +INSERT INTO `oa_city` VALUES (110109, '门头沟区', 2, 110000, ',110000,110109,'); +INSERT INTO `oa_city` VALUES (110111, '房山区', 2, 110000, ',110000,110111,'); +INSERT INTO `oa_city` VALUES (110112, '通州区', 2, 110000, ',110000,110112,'); +INSERT INTO `oa_city` VALUES (110113, '顺义区', 2, 110000, ',110000,110113,'); +INSERT INTO `oa_city` VALUES (110114, '昌平区', 2, 110000, ',110000,110114,'); +INSERT INTO `oa_city` VALUES (110115, '大兴区', 2, 110000, ',110000,110115,'); +INSERT INTO `oa_city` VALUES (110116, '怀柔区', 2, 110000, ',110000,110116,'); +INSERT INTO `oa_city` VALUES (110117, '平谷区', 2, 110000, ',110000,110117,'); +INSERT INTO `oa_city` VALUES (110228, '密云县', 2, 110000, ',110000,110228,'); +INSERT INTO `oa_city` VALUES (110229, '延庆县', 2, 110000, ',110000,110229,'); +INSERT INTO `oa_city` VALUES (120000, '天津市', 1, 0, ',120000,'); +INSERT INTO `oa_city` VALUES (120101, '和平区', 2, 120000, ',120000,120101,'); +INSERT INTO `oa_city` VALUES (120102, '河东区', 2, 120000, ',120000,120102,'); +INSERT INTO `oa_city` VALUES (120103, '河西区', 2, 120000, ',120000,120103,'); +INSERT INTO `oa_city` VALUES (120104, '南开区', 2, 120000, ',120000,120104,'); +INSERT INTO `oa_city` VALUES (120105, '河北区', 2, 120000, ',120000,120105,'); +INSERT INTO `oa_city` VALUES (120106, '红桥区', 2, 120000, ',120000,120106,'); +INSERT INTO `oa_city` VALUES (120107, '塘沽区', 2, 120000, ',120000,120107,'); +INSERT INTO `oa_city` VALUES (120108, '汉沽区', 2, 120000, ',120000,120108,'); +INSERT INTO `oa_city` VALUES (120109, '大港区', 2, 120000, ',120000,120109,'); +INSERT INTO `oa_city` VALUES (120110, '东丽区', 2, 120000, ',120000,120110,'); +INSERT INTO `oa_city` VALUES (120111, '西青区', 2, 120000, ',120000,120111,'); +INSERT INTO `oa_city` VALUES (120112, '津南区', 2, 120000, ',120000,120112,'); +INSERT INTO `oa_city` VALUES (120113, '北辰区', 2, 120000, ',120000,120113,'); +INSERT INTO `oa_city` VALUES (120114, '武清区', 2, 120000, ',120000,120114,'); +INSERT INTO `oa_city` VALUES (120115, '宝坻区', 2, 120000, ',120000,120115,'); +INSERT INTO `oa_city` VALUES (120116, '滨海新区', 2, 120000, ',120000,120116,'); +INSERT INTO `oa_city` VALUES (120221, '宁河县', 3, 120000, ',120000,120221,'); +INSERT INTO `oa_city` VALUES (120223, '静海县', 3, 120000, ',120000,120223,'); +INSERT INTO `oa_city` VALUES (120225, '蓟 县', 3, 120000, ',120000,120225,'); +INSERT INTO `oa_city` VALUES (130000, '河北省', 1, 0, ',130000,'); +INSERT INTO `oa_city` VALUES (130100, '石家庄市', 2, 130000, ',130000,130100,'); +INSERT INTO `oa_city` VALUES (130102, '长安区', 3, 130100, ',130000,130100,130102,'); +INSERT INTO `oa_city` VALUES (130103, '桥东区', 3, 130100, ',130000,130100,130103,'); +INSERT INTO `oa_city` VALUES (130104, '桥西区', 3, 130100, ',130000,130100,130104,'); +INSERT INTO `oa_city` VALUES (130105, '新华区', 3, 130100, ',130000,130100,130105,'); +INSERT INTO `oa_city` VALUES (130107, '井陉矿区', 3, 130100, ',130000,130100,130107,'); +INSERT INTO `oa_city` VALUES (130108, '裕华区', 3, 130100, ',130000,130100,130108,'); +INSERT INTO `oa_city` VALUES (130121, '井陉县', 3, 130100, ',130000,130100,130121,'); +INSERT INTO `oa_city` VALUES (130123, '正定县', 3, 130100, ',130000,130100,130123,'); +INSERT INTO `oa_city` VALUES (130124, '栾城县', 3, 130100, ',130000,130100,130124,'); +INSERT INTO `oa_city` VALUES (130125, '行唐县', 3, 130100, ',130000,130100,130125,'); +INSERT INTO `oa_city` VALUES (130126, '灵寿县', 3, 130100, ',130000,130100,130126,'); +INSERT INTO `oa_city` VALUES (130127, '高邑县', 3, 130100, ',130000,130100,130127,'); +INSERT INTO `oa_city` VALUES (130128, '深泽县', 3, 130100, ',130000,130100,130128,'); +INSERT INTO `oa_city` VALUES (130129, '赞皇县', 3, 130100, ',130000,130100,130129,'); +INSERT INTO `oa_city` VALUES (130130, '无极县', 3, 130100, ',130000,130100,130130,'); +INSERT INTO `oa_city` VALUES (130131, '平山县', 3, 130100, ',130000,130100,130131,'); +INSERT INTO `oa_city` VALUES (130132, '元氏县', 3, 130100, ',130000,130100,130132,'); +INSERT INTO `oa_city` VALUES (130133, '赵 县', 3, 130100, ',130000,130100,130133,'); +INSERT INTO `oa_city` VALUES (130181, '辛集市', 3, 130100, ',130000,130100,130181,'); +INSERT INTO `oa_city` VALUES (130182, '藁城市', 3, 130100, ',130000,130100,130182,'); +INSERT INTO `oa_city` VALUES (130183, '晋州市', 3, 130100, ',130000,130100,130183,'); +INSERT INTO `oa_city` VALUES (130184, '新乐市', 3, 130100, ',130000,130100,130184,'); +INSERT INTO `oa_city` VALUES (130185, '鹿泉市', 3, 130100, ',130000,130100,130185,'); +INSERT INTO `oa_city` VALUES (130200, '唐山市', 2, 130000, ',130000,130200,'); +INSERT INTO `oa_city` VALUES (130202, '路南区', 3, 130200, ',130000,130200,130202,'); +INSERT INTO `oa_city` VALUES (130203, '路北区', 3, 130200, ',130000,130200,130203,'); +INSERT INTO `oa_city` VALUES (130204, '古冶区', 3, 130200, ',130000,130200,130204,'); +INSERT INTO `oa_city` VALUES (130205, '开平区', 3, 130200, ',130000,130200,130205,'); +INSERT INTO `oa_city` VALUES (130207, '丰南区', 3, 130200, ',130000,130200,130207,'); +INSERT INTO `oa_city` VALUES (130208, '丰润区', 3, 130200, ',130000,130200,130208,'); +INSERT INTO `oa_city` VALUES (130223, '滦 县', 3, 130200, ',130000,130200,130223,'); +INSERT INTO `oa_city` VALUES (130224, '滦南县', 3, 130200, ',130000,130200,130224,'); +INSERT INTO `oa_city` VALUES (130225, '乐亭县', 3, 130200, ',130000,130200,130225,'); +INSERT INTO `oa_city` VALUES (130227, '迁西县', 3, 130200, ',130000,130200,130227,'); +INSERT INTO `oa_city` VALUES (130229, '玉田县', 3, 130200, ',130000,130200,130229,'); +INSERT INTO `oa_city` VALUES (130230, '唐海县', 3, 130200, ',130000,130200,130230,'); +INSERT INTO `oa_city` VALUES (130281, '遵化市', 3, 130200, ',130000,130200,130281,'); +INSERT INTO `oa_city` VALUES (130283, '迁安市', 3, 130200, ',130000,130200,130283,'); +INSERT INTO `oa_city` VALUES (130300, '秦皇岛市', 2, 130000, ',130000,130300,'); +INSERT INTO `oa_city` VALUES (130302, '海港区', 3, 130300, ',130000,130300,130302,'); +INSERT INTO `oa_city` VALUES (130303, '山海关区', 3, 130300, ',130000,130300,130303,'); +INSERT INTO `oa_city` VALUES (130304, '北戴河区', 3, 130300, ',130000,130300,130304,'); +INSERT INTO `oa_city` VALUES (130321, '青龙满族自治县', 3, 130300, ',130000,130300,130321,'); +INSERT INTO `oa_city` VALUES (130322, '昌黎县', 3, 130300, ',130000,130300,130322,'); +INSERT INTO `oa_city` VALUES (130323, '抚宁县', 3, 130300, ',130000,130300,130323,'); +INSERT INTO `oa_city` VALUES (130324, '卢龙县', 3, 130300, ',130000,130300,130324,'); +INSERT INTO `oa_city` VALUES (130400, '邯郸市', 2, 130000, ',130000,130400,'); +INSERT INTO `oa_city` VALUES (130402, '邯山区', 3, 130400, ',130000,130400,130402,'); +INSERT INTO `oa_city` VALUES (130403, '丛台区', 3, 130400, ',130000,130400,130403,'); +INSERT INTO `oa_city` VALUES (130404, '复兴区', 3, 130400, ',130000,130400,130404,'); +INSERT INTO `oa_city` VALUES (130406, '峰峰矿区', 3, 130400, ',130000,130400,130406,'); +INSERT INTO `oa_city` VALUES (130421, '邯郸县', 3, 130400, ',130000,130400,130421,'); +INSERT INTO `oa_city` VALUES (130423, '临漳县', 3, 130400, ',130000,130400,130423,'); +INSERT INTO `oa_city` VALUES (130424, '成安县', 3, 130400, ',130000,130400,130424,'); +INSERT INTO `oa_city` VALUES (130425, '大名县', 3, 130400, ',130000,130400,130425,'); +INSERT INTO `oa_city` VALUES (130426, '涉 县', 3, 130400, ',130000,130400,130426,'); +INSERT INTO `oa_city` VALUES (130427, '磁 县', 3, 130400, ',130000,130400,130427,'); +INSERT INTO `oa_city` VALUES (130428, '肥乡县', 3, 130400, ',130000,130400,130428,'); +INSERT INTO `oa_city` VALUES (130429, '永年县', 3, 130400, ',130000,130400,130429,'); +INSERT INTO `oa_city` VALUES (130430, '邱 县', 3, 130400, ',130000,130400,130430,'); +INSERT INTO `oa_city` VALUES (130431, '鸡泽县', 3, 130400, ',130000,130400,130431,'); +INSERT INTO `oa_city` VALUES (130432, '广平县', 3, 130400, ',130000,130400,130432,'); +INSERT INTO `oa_city` VALUES (130433, '馆陶县', 3, 130400, ',130000,130400,130433,'); +INSERT INTO `oa_city` VALUES (130434, '魏 县', 3, 130400, ',130000,130400,130434,'); +INSERT INTO `oa_city` VALUES (130435, '曲周县', 3, 130400, ',130000,130400,130435,'); +INSERT INTO `oa_city` VALUES (130481, '武安市', 3, 130400, ',130000,130400,130481,'); +INSERT INTO `oa_city` VALUES (130500, '邢台市', 2, 130000, ',130000,130500,'); +INSERT INTO `oa_city` VALUES (130502, '桥东区', 3, 130500, ',130000,130500,130502,'); +INSERT INTO `oa_city` VALUES (130503, '桥西区', 3, 130500, ',130000,130500,130503,'); +INSERT INTO `oa_city` VALUES (130521, '邢台县', 3, 130500, ',130000,130500,130521,'); +INSERT INTO `oa_city` VALUES (130522, '临城县', 3, 130500, ',130000,130500,130522,'); +INSERT INTO `oa_city` VALUES (130523, '内丘县', 3, 130500, ',130000,130500,130523,'); +INSERT INTO `oa_city` VALUES (130524, '柏乡县', 3, 130500, ',130000,130500,130524,'); +INSERT INTO `oa_city` VALUES (130525, '隆尧县', 3, 130500, ',130000,130500,130525,'); +INSERT INTO `oa_city` VALUES (130526, '任 县', 3, 130500, ',130000,130500,130526,'); +INSERT INTO `oa_city` VALUES (130527, '南和县', 3, 130500, ',130000,130500,130527,'); +INSERT INTO `oa_city` VALUES (130528, '宁晋县', 3, 130500, ',130000,130500,130528,'); +INSERT INTO `oa_city` VALUES (130529, '巨鹿县', 3, 130500, ',130000,130500,130529,'); +INSERT INTO `oa_city` VALUES (130530, '新河县', 3, 130500, ',130000,130500,130530,'); +INSERT INTO `oa_city` VALUES (130531, '广宗县', 3, 130500, ',130000,130500,130531,'); +INSERT INTO `oa_city` VALUES (130532, '平乡县', 3, 130500, ',130000,130500,130532,'); +INSERT INTO `oa_city` VALUES (130533, '威 县', 3, 130500, ',130000,130500,130533,'); +INSERT INTO `oa_city` VALUES (130534, '清河县', 3, 130500, ',130000,130500,130534,'); +INSERT INTO `oa_city` VALUES (130535, '临西县', 3, 130500, ',130000,130500,130535,'); +INSERT INTO `oa_city` VALUES (130581, '南宫市', 3, 130500, ',130000,130500,130581,'); +INSERT INTO `oa_city` VALUES (130582, '沙河市', 3, 130500, ',130000,130500,130582,'); +INSERT INTO `oa_city` VALUES (130600, '保定市', 2, 130000, ',130000,130600,'); +INSERT INTO `oa_city` VALUES (130602, '新市区', 3, 130600, ',130000,130600,130602,'); +INSERT INTO `oa_city` VALUES (130603, '北市区', 3, 130600, ',130000,130600,130603,'); +INSERT INTO `oa_city` VALUES (130604, '南市区', 3, 130600, ',130000,130600,130604,'); +INSERT INTO `oa_city` VALUES (130621, '满城县', 3, 130600, ',130000,130600,130621,'); +INSERT INTO `oa_city` VALUES (130622, '清苑县', 3, 130600, ',130000,130600,130622,'); +INSERT INTO `oa_city` VALUES (130623, '涞水县', 3, 130600, ',130000,130600,130623,'); +INSERT INTO `oa_city` VALUES (130624, '阜平县', 3, 130600, ',130000,130600,130624,'); +INSERT INTO `oa_city` VALUES (130625, '徐水县', 3, 130600, ',130000,130600,130625,'); +INSERT INTO `oa_city` VALUES (130626, '定兴县', 3, 130600, ',130000,130600,130626,'); +INSERT INTO `oa_city` VALUES (130627, '唐 县', 3, 130600, ',130000,130600,130627,'); +INSERT INTO `oa_city` VALUES (130628, '高阳县', 3, 130600, ',130000,130600,130628,'); +INSERT INTO `oa_city` VALUES (130629, '容城县', 3, 130600, ',130000,130600,130629,'); +INSERT INTO `oa_city` VALUES (130630, '涞源县', 3, 130600, ',130000,130600,130630,'); +INSERT INTO `oa_city` VALUES (130631, '望都县', 3, 130600, ',130000,130600,130631,'); +INSERT INTO `oa_city` VALUES (130632, '安新县', 3, 130600, ',130000,130600,130632,'); +INSERT INTO `oa_city` VALUES (130633, '易 县', 3, 130600, ',130000,130600,130633,'); +INSERT INTO `oa_city` VALUES (130634, '曲阳县', 3, 130600, ',130000,130600,130634,'); +INSERT INTO `oa_city` VALUES (130635, '蠡 县', 3, 130600, ',130000,130600,130635,'); +INSERT INTO `oa_city` VALUES (130636, '顺平县', 3, 130600, ',130000,130600,130636,'); +INSERT INTO `oa_city` VALUES (130637, '博野县', 3, 130600, ',130000,130600,130637,'); +INSERT INTO `oa_city` VALUES (130638, '雄 县', 3, 130600, ',130000,130600,130638,'); +INSERT INTO `oa_city` VALUES (130681, '涿州市', 3, 130600, ',130000,130600,130681,'); +INSERT INTO `oa_city` VALUES (130682, '定州市', 3, 130600, ',130000,130600,130682,'); +INSERT INTO `oa_city` VALUES (130683, '安国市', 3, 130600, ',130000,130600,130683,'); +INSERT INTO `oa_city` VALUES (130684, '高碑店市', 3, 130600, ',130000,130600,130684,'); +INSERT INTO `oa_city` VALUES (130700, '张家口市', 2, 130000, ',130000,130700,'); +INSERT INTO `oa_city` VALUES (130702, '桥东区', 3, 130700, ',130000,130700,130702,'); +INSERT INTO `oa_city` VALUES (130703, '桥西区', 3, 130700, ',130000,130700,130703,'); +INSERT INTO `oa_city` VALUES (130705, '宣化区', 3, 130700, ',130000,130700,130705,'); +INSERT INTO `oa_city` VALUES (130706, '下花园区', 3, 130700, ',130000,130700,130706,'); +INSERT INTO `oa_city` VALUES (130721, '宣化县', 3, 130700, ',130000,130700,130721,'); +INSERT INTO `oa_city` VALUES (130722, '张北县', 3, 130700, ',130000,130700,130722,'); +INSERT INTO `oa_city` VALUES (130723, '康保县', 3, 130700, ',130000,130700,130723,'); +INSERT INTO `oa_city` VALUES (130724, '沽源县', 3, 130700, ',130000,130700,130724,'); +INSERT INTO `oa_city` VALUES (130725, '尚义县', 3, 130700, ',130000,130700,130725,'); +INSERT INTO `oa_city` VALUES (130726, '蔚 县', 3, 130700, ',130000,130700,130726,'); +INSERT INTO `oa_city` VALUES (130727, '阳原县', 3, 130700, ',130000,130700,130727,'); +INSERT INTO `oa_city` VALUES (130728, '怀安县', 3, 130700, ',130000,130700,130728,'); +INSERT INTO `oa_city` VALUES (130729, '万全县', 3, 130700, ',130000,130700,130729,'); +INSERT INTO `oa_city` VALUES (130730, '怀来县', 3, 130700, ',130000,130700,130730,'); +INSERT INTO `oa_city` VALUES (130731, '涿鹿县', 3, 130700, ',130000,130700,130731,'); +INSERT INTO `oa_city` VALUES (130732, '赤城县', 3, 130700, ',130000,130700,130732,'); +INSERT INTO `oa_city` VALUES (130733, '崇礼县', 3, 130700, ',130000,130700,130733,'); +INSERT INTO `oa_city` VALUES (130800, '承德市', 2, 130000, ',130000,130800,'); +INSERT INTO `oa_city` VALUES (130802, '双桥区', 3, 130800, ',130000,130800,130802,'); +INSERT INTO `oa_city` VALUES (130803, '双滦区', 3, 130800, ',130000,130800,130803,'); +INSERT INTO `oa_city` VALUES (130804, '鹰手营子矿区', 3, 130800, ',130000,130800,130804,'); +INSERT INTO `oa_city` VALUES (130821, '承德县', 3, 130800, ',130000,130800,130821,'); +INSERT INTO `oa_city` VALUES (130822, '兴隆县', 3, 130800, ',130000,130800,130822,'); +INSERT INTO `oa_city` VALUES (130823, '平泉县', 3, 130800, ',130000,130800,130823,'); +INSERT INTO `oa_city` VALUES (130824, '滦平县', 3, 130800, ',130000,130800,130824,'); +INSERT INTO `oa_city` VALUES (130825, '隆化县', 3, 130800, ',130000,130800,130825,'); +INSERT INTO `oa_city` VALUES (130826, '丰宁满族自治县', 3, 130800, ',130000,130800,130826,'); +INSERT INTO `oa_city` VALUES (130827, '宽城满族自治县', 3, 130800, ',130000,130800,130827,'); +INSERT INTO `oa_city` VALUES (130828, '围场满族蒙古族自治县', 3, 130800, ',130000,130800,130828,'); +INSERT INTO `oa_city` VALUES (130900, '沧州市', 2, 130000, ',130000,130900,'); +INSERT INTO `oa_city` VALUES (130902, '新华区', 3, 130900, ',130000,130900,130902,'); +INSERT INTO `oa_city` VALUES (130903, '运河区', 3, 130900, ',130000,130900,130903,'); +INSERT INTO `oa_city` VALUES (130921, '沧 县', 3, 130900, ',130000,130900,130921,'); +INSERT INTO `oa_city` VALUES (130922, '青 县', 3, 130900, ',130000,130900,130922,'); +INSERT INTO `oa_city` VALUES (130923, '东光县', 3, 130900, ',130000,130900,130923,'); +INSERT INTO `oa_city` VALUES (130924, '海兴县', 3, 130900, ',130000,130900,130924,'); +INSERT INTO `oa_city` VALUES (130925, '盐山县', 3, 130900, ',130000,130900,130925,'); +INSERT INTO `oa_city` VALUES (130926, '肃宁县', 3, 130900, ',130000,130900,130926,'); +INSERT INTO `oa_city` VALUES (130927, '南皮县', 3, 130900, ',130000,130900,130927,'); +INSERT INTO `oa_city` VALUES (130928, '吴桥县', 3, 130900, ',130000,130900,130928,'); +INSERT INTO `oa_city` VALUES (130929, '献 县', 3, 130900, ',130000,130900,130929,'); +INSERT INTO `oa_city` VALUES (130930, '孟村回族自治县', 3, 130900, ',130000,130900,130930,'); +INSERT INTO `oa_city` VALUES (130981, '泊头市', 3, 130900, ',130000,130900,130981,'); +INSERT INTO `oa_city` VALUES (130982, '任丘市', 3, 130900, ',130000,130900,130982,'); +INSERT INTO `oa_city` VALUES (130983, '黄骅市', 3, 130900, ',130000,130900,130983,'); +INSERT INTO `oa_city` VALUES (130984, '河间市', 3, 130900, ',130000,130900,130984,'); +INSERT INTO `oa_city` VALUES (131000, '廊坊市', 2, 130000, ',130000,131000,'); +INSERT INTO `oa_city` VALUES (131002, '安次区', 3, 131000, ',130000,131000,131002,'); +INSERT INTO `oa_city` VALUES (131003, '广阳区', 3, 131000, ',130000,131000,131003,'); +INSERT INTO `oa_city` VALUES (131022, '固安县', 3, 131000, ',130000,131000,131022,'); +INSERT INTO `oa_city` VALUES (131023, '永清县', 3, 131000, ',130000,131000,131023,'); +INSERT INTO `oa_city` VALUES (131024, '香河县', 3, 131000, ',130000,131000,131024,'); +INSERT INTO `oa_city` VALUES (131025, '大城县', 3, 131000, ',130000,131000,131025,'); +INSERT INTO `oa_city` VALUES (131026, '文安县', 3, 131000, ',130000,131000,131026,'); +INSERT INTO `oa_city` VALUES (131028, '大厂回族自治县', 3, 131000, ',130000,131000,131028,'); +INSERT INTO `oa_city` VALUES (131081, '霸州市', 3, 131000, ',130000,131000,131081,'); +INSERT INTO `oa_city` VALUES (131082, '三河市', 3, 131000, ',130000,131000,131082,'); +INSERT INTO `oa_city` VALUES (131100, '衡水市', 2, 130000, ',130000,131100,'); +INSERT INTO `oa_city` VALUES (131102, '桃城区', 3, 131100, ',130000,131100,131102,'); +INSERT INTO `oa_city` VALUES (131121, '枣强县', 3, 131100, ',130000,131100,131121,'); +INSERT INTO `oa_city` VALUES (131122, '武邑县', 3, 131100, ',130000,131100,131122,'); +INSERT INTO `oa_city` VALUES (131123, '武强县', 3, 131100, ',130000,131100,131123,'); +INSERT INTO `oa_city` VALUES (131124, '饶阳县', 3, 131100, ',130000,131100,131124,'); +INSERT INTO `oa_city` VALUES (131125, '安平县', 3, 131100, ',130000,131100,131125,'); +INSERT INTO `oa_city` VALUES (131126, '故城县', 3, 131100, ',130000,131100,131126,'); +INSERT INTO `oa_city` VALUES (131127, '景 县', 3, 131100, ',130000,131100,131127,'); +INSERT INTO `oa_city` VALUES (131128, '阜城县', 3, 131100, ',130000,131100,131128,'); +INSERT INTO `oa_city` VALUES (131181, '冀州市', 3, 131100, ',130000,131100,131181,'); +INSERT INTO `oa_city` VALUES (131182, '深州市', 3, 131100, ',130000,131100,131182,'); +INSERT INTO `oa_city` VALUES (140000, '山西省', 1, 0, ',140000,'); +INSERT INTO `oa_city` VALUES (140100, '太原市', 2, 140000, ',140000,140100,'); +INSERT INTO `oa_city` VALUES (140105, '小店区', 3, 140100, ',140000,140100,140105,'); +INSERT INTO `oa_city` VALUES (140106, '迎泽区', 3, 140100, ',140000,140100,140106,'); +INSERT INTO `oa_city` VALUES (140107, '杏花岭区', 3, 140100, ',140000,140100,140107,'); +INSERT INTO `oa_city` VALUES (140108, '尖草坪区', 3, 140100, ',140000,140100,140108,'); +INSERT INTO `oa_city` VALUES (140109, '万柏林区', 3, 140100, ',140000,140100,140109,'); +INSERT INTO `oa_city` VALUES (140110, '晋源区', 3, 140100, ',140000,140100,140110,'); +INSERT INTO `oa_city` VALUES (140121, '清徐县', 3, 140100, ',140000,140100,140121,'); +INSERT INTO `oa_city` VALUES (140122, '阳曲县', 3, 140100, ',140000,140100,140122,'); +INSERT INTO `oa_city` VALUES (140123, '娄烦县', 3, 140100, ',140000,140100,140123,'); +INSERT INTO `oa_city` VALUES (140181, '古交市', 3, 140100, ',140000,140100,140181,'); +INSERT INTO `oa_city` VALUES (140200, '大同市', 2, 140000, ',140000,140200,'); +INSERT INTO `oa_city` VALUES (140202, '城 区', 3, 140200, ',140000,140200,140202,'); +INSERT INTO `oa_city` VALUES (140203, '矿 区', 3, 140200, ',140000,140200,140203,'); +INSERT INTO `oa_city` VALUES (140211, '南郊区', 3, 140200, ',140000,140200,140211,'); +INSERT INTO `oa_city` VALUES (140212, '新荣区', 3, 140200, ',140000,140200,140212,'); +INSERT INTO `oa_city` VALUES (140221, '阳高县', 3, 140200, ',140000,140200,140221,'); +INSERT INTO `oa_city` VALUES (140222, '天镇县', 3, 140200, ',140000,140200,140222,'); +INSERT INTO `oa_city` VALUES (140223, '广灵县', 3, 140200, ',140000,140200,140223,'); +INSERT INTO `oa_city` VALUES (140224, '灵丘县', 3, 140200, ',140000,140200,140224,'); +INSERT INTO `oa_city` VALUES (140225, '浑源县', 3, 140200, ',140000,140200,140225,'); +INSERT INTO `oa_city` VALUES (140226, '左云县', 3, 140200, ',140000,140200,140226,'); +INSERT INTO `oa_city` VALUES (140227, '大同县', 3, 140200, ',140000,140200,140227,'); +INSERT INTO `oa_city` VALUES (140300, '阳泉市', 2, 140000, ',140000,140300,'); +INSERT INTO `oa_city` VALUES (140302, '城 区', 3, 140300, ',140000,140300,140302,'); +INSERT INTO `oa_city` VALUES (140303, '矿 区', 3, 140300, ',140000,140300,140303,'); +INSERT INTO `oa_city` VALUES (140311, '郊 区', 3, 140300, ',140000,140300,140311,'); +INSERT INTO `oa_city` VALUES (140321, '平定县', 3, 140300, ',140000,140300,140321,'); +INSERT INTO `oa_city` VALUES (140322, '盂 县', 3, 140300, ',140000,140300,140322,'); +INSERT INTO `oa_city` VALUES (140400, '长治市', 2, 140000, ',140000,140400,'); +INSERT INTO `oa_city` VALUES (140402, '城 区', 3, 140400, ',140000,140400,140402,'); +INSERT INTO `oa_city` VALUES (140411, '郊 区', 3, 140400, ',140000,140400,140411,'); +INSERT INTO `oa_city` VALUES (140421, '长治县', 3, 140400, ',140000,140400,140421,'); +INSERT INTO `oa_city` VALUES (140423, '襄垣县', 3, 140400, ',140000,140400,140423,'); +INSERT INTO `oa_city` VALUES (140424, '屯留县', 3, 140400, ',140000,140400,140424,'); +INSERT INTO `oa_city` VALUES (140425, '平顺县', 3, 140400, ',140000,140400,140425,'); +INSERT INTO `oa_city` VALUES (140426, '黎城县', 3, 140400, ',140000,140400,140426,'); +INSERT INTO `oa_city` VALUES (140427, '壶关县', 3, 140400, ',140000,140400,140427,'); +INSERT INTO `oa_city` VALUES (140428, '长子县', 3, 140400, ',140000,140400,140428,'); +INSERT INTO `oa_city` VALUES (140429, '武乡县', 3, 140400, ',140000,140400,140429,'); +INSERT INTO `oa_city` VALUES (140430, '沁 县', 3, 140400, ',140000,140400,140430,'); +INSERT INTO `oa_city` VALUES (140431, '沁源县', 3, 140400, ',140000,140400,140431,'); +INSERT INTO `oa_city` VALUES (140481, '潞城市', 3, 140400, ',140000,140400,140481,'); +INSERT INTO `oa_city` VALUES (140500, '晋城市', 2, 140000, ',140000,140500,'); +INSERT INTO `oa_city` VALUES (140502, '城 区', 3, 140500, ',140000,140500,140502,'); +INSERT INTO `oa_city` VALUES (140521, '沁水县', 3, 140500, ',140000,140500,140521,'); +INSERT INTO `oa_city` VALUES (140522, '阳城县', 3, 140500, ',140000,140500,140522,'); +INSERT INTO `oa_city` VALUES (140524, '陵川县', 3, 140500, ',140000,140500,140524,'); +INSERT INTO `oa_city` VALUES (140525, '泽州县', 3, 140500, ',140000,140500,140525,'); +INSERT INTO `oa_city` VALUES (140581, '高平市', 3, 140500, ',140000,140500,140581,'); +INSERT INTO `oa_city` VALUES (140600, '朔州市', 2, 140000, ',140000,140600,'); +INSERT INTO `oa_city` VALUES (140602, '朔城区', 3, 140600, ',140000,140600,140602,'); +INSERT INTO `oa_city` VALUES (140603, '平鲁区', 3, 140600, ',140000,140600,140603,'); +INSERT INTO `oa_city` VALUES (140621, '山阴县', 3, 140600, ',140000,140600,140621,'); +INSERT INTO `oa_city` VALUES (140622, '应 县', 3, 140600, ',140000,140600,140622,'); +INSERT INTO `oa_city` VALUES (140623, '右玉县', 3, 140600, ',140000,140600,140623,'); +INSERT INTO `oa_city` VALUES (140624, '怀仁县', 3, 140600, ',140000,140600,140624,'); +INSERT INTO `oa_city` VALUES (140700, '晋中市', 2, 140000, ',140000,140700,'); +INSERT INTO `oa_city` VALUES (140702, '榆次区', 3, 140700, ',140000,140700,140702,'); +INSERT INTO `oa_city` VALUES (140721, '榆社县', 3, 140700, ',140000,140700,140721,'); +INSERT INTO `oa_city` VALUES (140722, '左权县', 3, 140700, ',140000,140700,140722,'); +INSERT INTO `oa_city` VALUES (140723, '和顺县', 3, 140700, ',140000,140700,140723,'); +INSERT INTO `oa_city` VALUES (140724, '昔阳县', 3, 140700, ',140000,140700,140724,'); +INSERT INTO `oa_city` VALUES (140725, '寿阳县', 3, 140700, ',140000,140700,140725,'); +INSERT INTO `oa_city` VALUES (140726, '太谷县', 3, 140700, ',140000,140700,140726,'); +INSERT INTO `oa_city` VALUES (140727, '祁 县', 3, 140700, ',140000,140700,140727,'); +INSERT INTO `oa_city` VALUES (140728, '平遥县', 3, 140700, ',140000,140700,140728,'); +INSERT INTO `oa_city` VALUES (140729, '灵石县', 3, 140700, ',140000,140700,140729,'); +INSERT INTO `oa_city` VALUES (140781, '介休市', 3, 140700, ',140000,140700,140781,'); +INSERT INTO `oa_city` VALUES (140800, '运城市', 2, 140000, ',140000,140800,'); +INSERT INTO `oa_city` VALUES (140802, '盐湖区', 3, 140800, ',140000,140800,140802,'); +INSERT INTO `oa_city` VALUES (140821, '临猗县', 3, 140800, ',140000,140800,140821,'); +INSERT INTO `oa_city` VALUES (140822, '万荣县', 3, 140800, ',140000,140800,140822,'); +INSERT INTO `oa_city` VALUES (140823, '闻喜县', 3, 140800, ',140000,140800,140823,'); +INSERT INTO `oa_city` VALUES (140824, '稷山县', 3, 140800, ',140000,140800,140824,'); +INSERT INTO `oa_city` VALUES (140825, '新绛县', 3, 140800, ',140000,140800,140825,'); +INSERT INTO `oa_city` VALUES (140826, '绛 县', 3, 140800, ',140000,140800,140826,'); +INSERT INTO `oa_city` VALUES (140827, '垣曲县', 3, 140800, ',140000,140800,140827,'); +INSERT INTO `oa_city` VALUES (140828, '夏 县', 3, 140800, ',140000,140800,140828,'); +INSERT INTO `oa_city` VALUES (140829, '平陆县', 3, 140800, ',140000,140800,140829,'); +INSERT INTO `oa_city` VALUES (140830, '芮城县', 3, 140800, ',140000,140800,140830,'); +INSERT INTO `oa_city` VALUES (140881, '永济市', 3, 140800, ',140000,140800,140881,'); +INSERT INTO `oa_city` VALUES (140882, '河津市', 3, 140800, ',140000,140800,140882,'); +INSERT INTO `oa_city` VALUES (140900, '忻州市', 2, 140000, ',140000,140900,'); +INSERT INTO `oa_city` VALUES (140902, '忻府区', 3, 140900, ',140000,140900,140902,'); +INSERT INTO `oa_city` VALUES (140921, '定襄县', 3, 140900, ',140000,140900,140921,'); +INSERT INTO `oa_city` VALUES (140922, '五台县', 3, 140900, ',140000,140900,140922,'); +INSERT INTO `oa_city` VALUES (140923, '代 县', 3, 140900, ',140000,140900,140923,'); +INSERT INTO `oa_city` VALUES (140924, '繁峙县', 3, 140900, ',140000,140900,140924,'); +INSERT INTO `oa_city` VALUES (140925, '宁武县', 3, 140900, ',140000,140900,140925,'); +INSERT INTO `oa_city` VALUES (140926, '静乐县', 3, 140900, ',140000,140900,140926,'); +INSERT INTO `oa_city` VALUES (140927, '神池县', 3, 140900, ',140000,140900,140927,'); +INSERT INTO `oa_city` VALUES (140928, '五寨县', 3, 140900, ',140000,140900,140928,'); +INSERT INTO `oa_city` VALUES (140929, '岢岚县', 3, 140900, ',140000,140900,140929,'); +INSERT INTO `oa_city` VALUES (140930, '河曲县', 3, 140900, ',140000,140900,140930,'); +INSERT INTO `oa_city` VALUES (140931, '保德县', 3, 140900, ',140000,140900,140931,'); +INSERT INTO `oa_city` VALUES (140932, '偏关县', 3, 140900, ',140000,140900,140932,'); +INSERT INTO `oa_city` VALUES (140981, '原平市', 3, 140900, ',140000,140900,140981,'); +INSERT INTO `oa_city` VALUES (141000, '临汾市', 2, 140000, ',140000,141000,'); +INSERT INTO `oa_city` VALUES (141002, '尧都区', 3, 141000, ',140000,141000,141002,'); +INSERT INTO `oa_city` VALUES (141021, '曲沃县', 3, 141000, ',140000,141000,141021,'); +INSERT INTO `oa_city` VALUES (141022, '翼城县', 3, 141000, ',140000,141000,141022,'); +INSERT INTO `oa_city` VALUES (141023, '襄汾县', 3, 141000, ',140000,141000,141023,'); +INSERT INTO `oa_city` VALUES (141024, '洪洞县', 3, 141000, ',140000,141000,141024,'); +INSERT INTO `oa_city` VALUES (141025, '古 县', 3, 141000, ',140000,141000,141025,'); +INSERT INTO `oa_city` VALUES (141026, '安泽县', 3, 141000, ',140000,141000,141026,'); +INSERT INTO `oa_city` VALUES (141027, '浮山县', 3, 141000, ',140000,141000,141027,'); +INSERT INTO `oa_city` VALUES (141028, '吉 县', 3, 141000, ',140000,141000,141028,'); +INSERT INTO `oa_city` VALUES (141029, '乡宁县', 3, 141000, ',140000,141000,141029,'); +INSERT INTO `oa_city` VALUES (141030, '大宁县', 3, 141000, ',140000,141000,141030,'); +INSERT INTO `oa_city` VALUES (141031, '隰 县', 3, 141000, ',140000,141000,141031,'); +INSERT INTO `oa_city` VALUES (141032, '永和县', 3, 141000, ',140000,141000,141032,'); +INSERT INTO `oa_city` VALUES (141033, '蒲 县', 3, 141000, ',140000,141000,141033,'); +INSERT INTO `oa_city` VALUES (141034, '汾西县', 3, 141000, ',140000,141000,141034,'); +INSERT INTO `oa_city` VALUES (141081, '侯马市', 3, 141000, ',140000,141000,141081,'); +INSERT INTO `oa_city` VALUES (141082, '霍州市', 3, 141000, ',140000,141000,141082,'); +INSERT INTO `oa_city` VALUES (141100, '吕梁市', 2, 140000, ',140000,141100,'); +INSERT INTO `oa_city` VALUES (141102, '离石区', 3, 141100, ',140000,141100,141102,'); +INSERT INTO `oa_city` VALUES (141121, '文水县', 3, 141100, ',140000,141100,141121,'); +INSERT INTO `oa_city` VALUES (141122, '交城县', 3, 141100, ',140000,141100,141122,'); +INSERT INTO `oa_city` VALUES (141123, '兴 县', 3, 141100, ',140000,141100,141123,'); +INSERT INTO `oa_city` VALUES (141124, '临 县', 3, 141100, ',140000,141100,141124,'); +INSERT INTO `oa_city` VALUES (141125, '柳林县', 3, 141100, ',140000,141100,141125,'); +INSERT INTO `oa_city` VALUES (141126, '石楼县', 3, 141100, ',140000,141100,141126,'); +INSERT INTO `oa_city` VALUES (141127, '岚 县', 3, 141100, ',140000,141100,141127,'); +INSERT INTO `oa_city` VALUES (141128, '方山县', 3, 141100, ',140000,141100,141128,'); +INSERT INTO `oa_city` VALUES (141129, '中阳县', 3, 141100, ',140000,141100,141129,'); +INSERT INTO `oa_city` VALUES (141130, '交口县', 3, 141100, ',140000,141100,141130,'); +INSERT INTO `oa_city` VALUES (141181, '孝义市', 3, 141100, ',140000,141100,141181,'); +INSERT INTO `oa_city` VALUES (141182, '汾阳市', 3, 141100, ',140000,141100,141182,'); +INSERT INTO `oa_city` VALUES (150000, '内蒙古', 1, 0, ',150000,'); +INSERT INTO `oa_city` VALUES (150100, '呼和浩特市', 2, 150000, ',150000,150100,'); +INSERT INTO `oa_city` VALUES (150102, '新城区', 3, 150100, ',150000,150100,150102,'); +INSERT INTO `oa_city` VALUES (150103, '回民区', 3, 150100, ',150000,150100,150103,'); +INSERT INTO `oa_city` VALUES (150104, '玉泉区', 3, 150100, ',150000,150100,150104,'); +INSERT INTO `oa_city` VALUES (150105, '赛罕区', 3, 150100, ',150000,150100,150105,'); +INSERT INTO `oa_city` VALUES (150121, '土默特左旗', 3, 150100, ',150000,150100,150121,'); +INSERT INTO `oa_city` VALUES (150122, '托克托县', 3, 150100, ',150000,150100,150122,'); +INSERT INTO `oa_city` VALUES (150123, '和林格尔县', 3, 150100, ',150000,150100,150123,'); +INSERT INTO `oa_city` VALUES (150124, '清水河县', 3, 150100, ',150000,150100,150124,'); +INSERT INTO `oa_city` VALUES (150125, '武川县', 3, 150100, ',150000,150100,150125,'); +INSERT INTO `oa_city` VALUES (150200, '包头市', 2, 150000, ',150000,150200,'); +INSERT INTO `oa_city` VALUES (150202, '东河区', 3, 150200, ',150000,150200,150202,'); +INSERT INTO `oa_city` VALUES (150203, '昆都仑区', 3, 150200, ',150000,150200,150203,'); +INSERT INTO `oa_city` VALUES (150204, '青山区', 3, 150200, ',150000,150200,150204,'); +INSERT INTO `oa_city` VALUES (150205, '石拐区', 3, 150200, ',150000,150200,150205,'); +INSERT INTO `oa_city` VALUES (150206, '白云矿区', 3, 150200, ',150000,150200,150206,'); +INSERT INTO `oa_city` VALUES (150207, '九原区', 3, 150200, ',150000,150200,150207,'); +INSERT INTO `oa_city` VALUES (150221, '土默特右旗', 3, 150200, ',150000,150200,150221,'); +INSERT INTO `oa_city` VALUES (150222, '固阳县', 3, 150200, ',150000,150200,150222,'); +INSERT INTO `oa_city` VALUES (150223, '达尔罕茂明安联合旗', 3, 150200, ',150000,150200,150223,'); +INSERT INTO `oa_city` VALUES (150300, '乌海市', 2, 150000, ',150000,150300,'); +INSERT INTO `oa_city` VALUES (150302, '海勃湾区', 3, 150300, ',150000,150300,150302,'); +INSERT INTO `oa_city` VALUES (150303, '海南区', 3, 150300, ',150000,150300,150303,'); +INSERT INTO `oa_city` VALUES (150304, '乌达区', 3, 150300, ',150000,150300,150304,'); +INSERT INTO `oa_city` VALUES (150400, '赤峰市', 2, 150000, ',150000,150400,'); +INSERT INTO `oa_city` VALUES (150402, '红山区', 3, 150400, ',150000,150400,150402,'); +INSERT INTO `oa_city` VALUES (150403, '元宝山区', 3, 150400, ',150000,150400,150403,'); +INSERT INTO `oa_city` VALUES (150404, '松山区', 3, 150400, ',150000,150400,150404,'); +INSERT INTO `oa_city` VALUES (150421, '阿鲁科尔沁旗', 3, 150400, ',150000,150400,150421,'); +INSERT INTO `oa_city` VALUES (150422, '巴林左旗', 3, 150400, ',150000,150400,150422,'); +INSERT INTO `oa_city` VALUES (150423, '巴林右旗', 3, 150400, ',150000,150400,150423,'); +INSERT INTO `oa_city` VALUES (150424, '林西县', 3, 150400, ',150000,150400,150424,'); +INSERT INTO `oa_city` VALUES (150425, '克什克腾旗', 3, 150400, ',150000,150400,150425,'); +INSERT INTO `oa_city` VALUES (150426, '翁牛特旗', 3, 150400, ',150000,150400,150426,'); +INSERT INTO `oa_city` VALUES (150428, '喀喇沁旗', 3, 150400, ',150000,150400,150428,'); +INSERT INTO `oa_city` VALUES (150429, '宁城县', 3, 150400, ',150000,150400,150429,'); +INSERT INTO `oa_city` VALUES (150430, '敖汉旗', 3, 150400, ',150000,150400,150430,'); +INSERT INTO `oa_city` VALUES (150500, '通辽市', 2, 150000, ',150000,150500,'); +INSERT INTO `oa_city` VALUES (150502, '科尔沁区', 3, 150500, ',150000,150500,150502,'); +INSERT INTO `oa_city` VALUES (150521, '科尔沁左翼中旗', 3, 150500, ',150000,150500,150521,'); +INSERT INTO `oa_city` VALUES (150522, '科尔沁左翼后旗', 3, 150500, ',150000,150500,150522,'); +INSERT INTO `oa_city` VALUES (150523, '开鲁县', 3, 150500, ',150000,150500,150523,'); +INSERT INTO `oa_city` VALUES (150524, '库伦旗', 3, 150500, ',150000,150500,150524,'); +INSERT INTO `oa_city` VALUES (150525, '奈曼旗', 3, 150500, ',150000,150500,150525,'); +INSERT INTO `oa_city` VALUES (150526, '扎鲁特旗', 3, 150500, ',150000,150500,150526,'); +INSERT INTO `oa_city` VALUES (150581, '霍林郭勒市', 3, 150500, ',150000,150500,150581,'); +INSERT INTO `oa_city` VALUES (150600, '鄂尔多斯市', 2, 150000, ',150000,150600,'); +INSERT INTO `oa_city` VALUES (150602, '东胜区', 3, 150600, ',150000,150600,150602,'); +INSERT INTO `oa_city` VALUES (150621, '达拉特旗', 3, 150600, ',150000,150600,150621,'); +INSERT INTO `oa_city` VALUES (150622, '准格尔旗', 3, 150600, ',150000,150600,150622,'); +INSERT INTO `oa_city` VALUES (150623, '鄂托克前旗', 3, 150600, ',150000,150600,150623,'); +INSERT INTO `oa_city` VALUES (150624, '鄂托克旗', 3, 150600, ',150000,150600,150624,'); +INSERT INTO `oa_city` VALUES (150625, '杭锦旗', 3, 150600, ',150000,150600,150625,'); +INSERT INTO `oa_city` VALUES (150626, '乌审旗', 3, 150600, ',150000,150600,150626,'); +INSERT INTO `oa_city` VALUES (150627, '伊金霍洛旗', 3, 150600, ',150000,150600,150627,'); +INSERT INTO `oa_city` VALUES (150700, '呼伦贝尔市', 2, 150000, ',150000,150700,'); +INSERT INTO `oa_city` VALUES (150702, '海拉尔区', 3, 150700, ',150000,150700,150702,'); +INSERT INTO `oa_city` VALUES (150721, '阿荣旗', 3, 150700, ',150000,150700,150721,'); +INSERT INTO `oa_city` VALUES (150722, '莫力达瓦达斡尔族自治旗', 3, 150700, ',150000,150700,150722,'); +INSERT INTO `oa_city` VALUES (150723, '鄂伦春自治旗', 3, 150700, ',150000,150700,150723,'); +INSERT INTO `oa_city` VALUES (150724, '鄂温克族自治旗', 3, 150700, ',150000,150700,150724,'); +INSERT INTO `oa_city` VALUES (150725, '陈巴尔虎旗', 3, 150700, ',150000,150700,150725,'); +INSERT INTO `oa_city` VALUES (150726, '新巴尔虎左旗', 3, 150700, ',150000,150700,150726,'); +INSERT INTO `oa_city` VALUES (150727, '新巴尔虎右旗', 3, 150700, ',150000,150700,150727,'); +INSERT INTO `oa_city` VALUES (150781, '满洲里市', 3, 150700, ',150000,150700,150781,'); +INSERT INTO `oa_city` VALUES (150782, '牙克石市', 3, 150700, ',150000,150700,150782,'); +INSERT INTO `oa_city` VALUES (150783, '扎兰屯市', 3, 150700, ',150000,150700,150783,'); +INSERT INTO `oa_city` VALUES (150784, '额尔古纳市', 3, 150700, ',150000,150700,150784,'); +INSERT INTO `oa_city` VALUES (150785, '根河市', 3, 150700, ',150000,150700,150785,'); +INSERT INTO `oa_city` VALUES (150800, '巴彦淖尔市', 2, 150000, ',150000,150800,'); +INSERT INTO `oa_city` VALUES (150802, '临河区', 3, 150800, ',150000,150800,150802,'); +INSERT INTO `oa_city` VALUES (150821, '五原县', 3, 150800, ',150000,150800,150821,'); +INSERT INTO `oa_city` VALUES (150822, '磴口县', 3, 150800, ',150000,150800,150822,'); +INSERT INTO `oa_city` VALUES (150823, '乌拉特前旗', 3, 150800, ',150000,150800,150823,'); +INSERT INTO `oa_city` VALUES (150824, '乌拉特中旗', 3, 150800, ',150000,150800,150824,'); +INSERT INTO `oa_city` VALUES (150825, '乌拉特后旗', 3, 150800, ',150000,150800,150825,'); +INSERT INTO `oa_city` VALUES (150826, '杭锦后旗', 3, 150800, ',150000,150800,150826,'); +INSERT INTO `oa_city` VALUES (150900, '乌兰察布市', 2, 150000, ',150000,150900,'); +INSERT INTO `oa_city` VALUES (150902, '集宁区', 3, 150900, ',150000,150900,150902,'); +INSERT INTO `oa_city` VALUES (150921, '卓资县', 3, 150900, ',150000,150900,150921,'); +INSERT INTO `oa_city` VALUES (150922, '化德县', 3, 150900, ',150000,150900,150922,'); +INSERT INTO `oa_city` VALUES (150923, '商都县', 3, 150900, ',150000,150900,150923,'); +INSERT INTO `oa_city` VALUES (150924, '兴和县', 3, 150900, ',150000,150900,150924,'); +INSERT INTO `oa_city` VALUES (150925, '凉城县', 3, 150900, ',150000,150900,150925,'); +INSERT INTO `oa_city` VALUES (150926, '察哈尔右翼前旗', 3, 150900, ',150000,150900,150926,'); +INSERT INTO `oa_city` VALUES (150927, '察哈尔右翼中旗', 3, 150900, ',150000,150900,150927,'); +INSERT INTO `oa_city` VALUES (150928, '察哈尔右翼后旗', 3, 150900, ',150000,150900,150928,'); +INSERT INTO `oa_city` VALUES (150929, '四子王旗', 3, 150900, ',150000,150900,150929,'); +INSERT INTO `oa_city` VALUES (150981, '丰镇市', 3, 150900, ',150000,150900,150981,'); +INSERT INTO `oa_city` VALUES (152200, '兴安盟', 2, 150000, ',150000,152200,'); +INSERT INTO `oa_city` VALUES (152201, '乌兰浩特市', 3, 152200, ',150000,152200,152201,'); +INSERT INTO `oa_city` VALUES (152202, '阿尔山市', 3, 152200, ',150000,152200,152202,'); +INSERT INTO `oa_city` VALUES (152221, '科尔沁右翼前旗', 3, 152200, ',150000,152200,152221,'); +INSERT INTO `oa_city` VALUES (152222, '科尔沁右翼中旗', 3, 152200, ',150000,152200,152222,'); +INSERT INTO `oa_city` VALUES (152223, '扎赉特旗', 3, 152200, ',150000,152200,152223,'); +INSERT INTO `oa_city` VALUES (152224, '突泉县', 3, 152200, ',150000,152200,152224,'); +INSERT INTO `oa_city` VALUES (152500, '锡林郭勒盟', 2, 150000, ',150000,152500,'); +INSERT INTO `oa_city` VALUES (152501, '二连浩特市', 3, 152500, ',150000,152500,152501,'); +INSERT INTO `oa_city` VALUES (152502, '锡林浩特市', 3, 152500, ',150000,152500,152502,'); +INSERT INTO `oa_city` VALUES (152522, '阿巴嘎旗', 3, 152500, ',150000,152500,152522,'); +INSERT INTO `oa_city` VALUES (152523, '苏尼特左旗', 3, 152500, ',150000,152500,152523,'); +INSERT INTO `oa_city` VALUES (152524, '苏尼特右旗', 3, 152500, ',150000,152500,152524,'); +INSERT INTO `oa_city` VALUES (152525, '东乌珠穆沁旗', 3, 152500, ',150000,152500,152525,'); +INSERT INTO `oa_city` VALUES (152526, '西乌珠穆沁旗', 3, 152500, ',150000,152500,152526,'); +INSERT INTO `oa_city` VALUES (152527, '太仆寺旗', 3, 152500, ',150000,152500,152527,'); +INSERT INTO `oa_city` VALUES (152528, '镶黄旗', 3, 152500, ',150000,152500,152528,'); +INSERT INTO `oa_city` VALUES (152529, '正镶白旗', 3, 152500, ',150000,152500,152529,'); +INSERT INTO `oa_city` VALUES (152530, '正蓝旗', 3, 152500, ',150000,152500,152530,'); +INSERT INTO `oa_city` VALUES (152531, '多伦县', 3, 152500, ',150000,152500,152531,'); +INSERT INTO `oa_city` VALUES (152900, '阿拉善盟', 2, 150000, ',150000,152900,'); +INSERT INTO `oa_city` VALUES (152921, '阿拉善左旗', 3, 152900, ',150000,152900,152921,'); +INSERT INTO `oa_city` VALUES (152922, '阿拉善右旗', 3, 152900, ',150000,152900,152922,'); +INSERT INTO `oa_city` VALUES (152923, '额济纳旗', 3, 152900, ',150000,152900,152923,'); +INSERT INTO `oa_city` VALUES (210000, '辽宁省', 1, 0, ',210000,'); +INSERT INTO `oa_city` VALUES (210100, '沈阳市', 2, 210000, ',210000,210100,'); +INSERT INTO `oa_city` VALUES (210102, '和平区', 3, 210100, ',210000,210100,210102,'); +INSERT INTO `oa_city` VALUES (210103, '沈河区', 3, 210100, ',210000,210100,210103,'); +INSERT INTO `oa_city` VALUES (210104, '大东区', 3, 210100, ',210000,210100,210104,'); +INSERT INTO `oa_city` VALUES (210105, '皇姑区', 3, 210100, ',210000,210100,210105,'); +INSERT INTO `oa_city` VALUES (210106, '铁西区', 3, 210100, ',210000,210100,210106,'); +INSERT INTO `oa_city` VALUES (210111, '苏家屯区', 3, 210100, ',210000,210100,210111,'); +INSERT INTO `oa_city` VALUES (210112, '东陵区', 3, 210100, ',210000,210100,210112,'); +INSERT INTO `oa_city` VALUES (210113, '新城子区', 3, 210100, ',210000,210100,210113,'); +INSERT INTO `oa_city` VALUES (210114, '于洪区', 3, 210100, ',210000,210100,210114,'); +INSERT INTO `oa_city` VALUES (210122, '辽中县', 3, 210100, ',210000,210100,210122,'); +INSERT INTO `oa_city` VALUES (210123, '康平县', 3, 210100, ',210000,210100,210123,'); +INSERT INTO `oa_city` VALUES (210124, '法库县', 3, 210100, ',210000,210100,210124,'); +INSERT INTO `oa_city` VALUES (210181, '新民市', 3, 210100, ',210000,210100,210181,'); +INSERT INTO `oa_city` VALUES (210200, '大连市', 2, 210000, ',210000,210200,'); +INSERT INTO `oa_city` VALUES (210202, '中山区', 3, 210200, ',210000,210200,210202,'); +INSERT INTO `oa_city` VALUES (210203, '西岗区', 3, 210200, ',210000,210200,210203,'); +INSERT INTO `oa_city` VALUES (210204, '沙河口区', 3, 210200, ',210000,210200,210204,'); +INSERT INTO `oa_city` VALUES (210211, '甘井子区', 3, 210200, ',210000,210200,210211,'); +INSERT INTO `oa_city` VALUES (210212, '旅顺口区', 3, 210200, ',210000,210200,210212,'); +INSERT INTO `oa_city` VALUES (210213, '金州区', 3, 210200, ',210000,210200,210213,'); +INSERT INTO `oa_city` VALUES (210224, '长海县', 3, 210200, ',210000,210200,210224,'); +INSERT INTO `oa_city` VALUES (210281, '瓦房店市', 3, 210200, ',210000,210200,210281,'); +INSERT INTO `oa_city` VALUES (210282, '普兰店市', 3, 210200, ',210000,210200,210282,'); +INSERT INTO `oa_city` VALUES (210283, '庄河市', 3, 210200, ',210000,210200,210283,'); +INSERT INTO `oa_city` VALUES (210300, '鞍山市', 2, 210000, ',210000,210300,'); +INSERT INTO `oa_city` VALUES (210302, '铁东区', 3, 210300, ',210000,210300,210302,'); +INSERT INTO `oa_city` VALUES (210303, '铁西区', 3, 210300, ',210000,210300,210303,'); +INSERT INTO `oa_city` VALUES (210304, '立山区', 3, 210300, ',210000,210300,210304,'); +INSERT INTO `oa_city` VALUES (210311, '千山区', 3, 210300, ',210000,210300,210311,'); +INSERT INTO `oa_city` VALUES (210321, '台安县', 3, 210300, ',210000,210300,210321,'); +INSERT INTO `oa_city` VALUES (210323, '岫岩满族自治县', 3, 210300, ',210000,210300,210323,'); +INSERT INTO `oa_city` VALUES (210381, '海城市', 3, 210300, ',210000,210300,210381,'); +INSERT INTO `oa_city` VALUES (210400, '抚顺市', 2, 210000, ',210000,210400,'); +INSERT INTO `oa_city` VALUES (210402, '新抚区', 3, 210400, ',210000,210400,210402,'); +INSERT INTO `oa_city` VALUES (210403, '东洲区', 3, 210400, ',210000,210400,210403,'); +INSERT INTO `oa_city` VALUES (210404, '望花区', 3, 210400, ',210000,210400,210404,'); +INSERT INTO `oa_city` VALUES (210411, '顺城区', 3, 210400, ',210000,210400,210411,'); +INSERT INTO `oa_city` VALUES (210421, '抚顺县', 3, 210400, ',210000,210400,210421,'); +INSERT INTO `oa_city` VALUES (210422, '新宾满族自治县', 3, 210400, ',210000,210400,210422,'); +INSERT INTO `oa_city` VALUES (210423, '清原满族自治县', 3, 210400, ',210000,210400,210423,'); +INSERT INTO `oa_city` VALUES (210500, '本溪市', 2, 210000, ',210000,210500,'); +INSERT INTO `oa_city` VALUES (210502, '平山区', 3, 210500, ',210000,210500,210502,'); +INSERT INTO `oa_city` VALUES (210503, '溪湖区', 3, 210500, ',210000,210500,210503,'); +INSERT INTO `oa_city` VALUES (210504, '明山区', 3, 210500, ',210000,210500,210504,'); +INSERT INTO `oa_city` VALUES (210505, '南芬区', 3, 210500, ',210000,210500,210505,'); +INSERT INTO `oa_city` VALUES (210521, '本溪满族自治县', 3, 210500, ',210000,210500,210521,'); +INSERT INTO `oa_city` VALUES (210522, '桓仁满族自治县', 3, 210500, ',210000,210500,210522,'); +INSERT INTO `oa_city` VALUES (210600, '丹东市', 2, 210000, ',210000,210600,'); +INSERT INTO `oa_city` VALUES (210602, '元宝区', 3, 210600, ',210000,210600,210602,'); +INSERT INTO `oa_city` VALUES (210603, '振兴区', 3, 210600, ',210000,210600,210603,'); +INSERT INTO `oa_city` VALUES (210604, '振安区', 3, 210600, ',210000,210600,210604,'); +INSERT INTO `oa_city` VALUES (210624, '宽甸满族自治县', 3, 210600, ',210000,210600,210624,'); +INSERT INTO `oa_city` VALUES (210681, '东港市', 3, 210600, ',210000,210600,210681,'); +INSERT INTO `oa_city` VALUES (210682, '凤城市', 3, 210600, ',210000,210600,210682,'); +INSERT INTO `oa_city` VALUES (210700, '锦州市', 2, 210000, ',210000,210700,'); +INSERT INTO `oa_city` VALUES (210702, '古塔区', 3, 210700, ',210000,210700,210702,'); +INSERT INTO `oa_city` VALUES (210703, '凌河区', 3, 210700, ',210000,210700,210703,'); +INSERT INTO `oa_city` VALUES (210711, '太和区', 3, 210700, ',210000,210700,210711,'); +INSERT INTO `oa_city` VALUES (210726, '黑山县', 3, 210700, ',210000,210700,210726,'); +INSERT INTO `oa_city` VALUES (210727, '义 县', 3, 210700, ',210000,210700,210727,'); +INSERT INTO `oa_city` VALUES (210781, '凌海市', 3, 210700, ',210000,210700,210781,'); +INSERT INTO `oa_city` VALUES (210782, '北宁市', 3, 210700, ',210000,210700,210782,'); +INSERT INTO `oa_city` VALUES (210800, '营口市', 2, 210000, ',210000,210800,'); +INSERT INTO `oa_city` VALUES (210802, '站前区', 3, 210800, ',210000,210800,210802,'); +INSERT INTO `oa_city` VALUES (210803, '西市区', 3, 210800, ',210000,210800,210803,'); +INSERT INTO `oa_city` VALUES (210804, '鲅鱼圈区', 3, 210800, ',210000,210800,210804,'); +INSERT INTO `oa_city` VALUES (210811, '老边区', 3, 210800, ',210000,210800,210811,'); +INSERT INTO `oa_city` VALUES (210881, '盖州市', 3, 210800, ',210000,210800,210881,'); +INSERT INTO `oa_city` VALUES (210882, '大石桥市', 3, 210800, ',210000,210800,210882,'); +INSERT INTO `oa_city` VALUES (210900, '阜新市', 2, 210000, ',210000,210900,'); +INSERT INTO `oa_city` VALUES (210902, '海州区', 3, 210900, ',210000,210900,210902,'); +INSERT INTO `oa_city` VALUES (210903, '新邱区', 3, 210900, ',210000,210900,210903,'); +INSERT INTO `oa_city` VALUES (210904, '太平区', 3, 210900, ',210000,210900,210904,'); +INSERT INTO `oa_city` VALUES (210905, '清河门区', 3, 210900, ',210000,210900,210905,'); +INSERT INTO `oa_city` VALUES (210911, '细河区', 3, 210900, ',210000,210900,210911,'); +INSERT INTO `oa_city` VALUES (210921, '阜新蒙古族自治县', 3, 210900, ',210000,210900,210921,'); +INSERT INTO `oa_city` VALUES (210922, '彰武县', 3, 210900, ',210000,210900,210922,'); +INSERT INTO `oa_city` VALUES (211000, '辽阳市', 2, 210000, ',210000,211000,'); +INSERT INTO `oa_city` VALUES (211002, '白塔区', 3, 211000, ',210000,211000,211002,'); +INSERT INTO `oa_city` VALUES (211003, '文圣区', 3, 211000, ',210000,211000,211003,'); +INSERT INTO `oa_city` VALUES (211004, '宏伟区', 3, 211000, ',210000,211000,211004,'); +INSERT INTO `oa_city` VALUES (211005, '弓长岭区', 3, 211000, ',210000,211000,211005,'); +INSERT INTO `oa_city` VALUES (211011, '太子河区', 3, 211000, ',210000,211000,211011,'); +INSERT INTO `oa_city` VALUES (211021, '辽阳县', 3, 211000, ',210000,211000,211021,'); +INSERT INTO `oa_city` VALUES (211081, '灯塔市', 3, 211000, ',210000,211000,211081,'); +INSERT INTO `oa_city` VALUES (211100, '盘锦市', 2, 210000, ',210000,211100,'); +INSERT INTO `oa_city` VALUES (211102, '双台子区', 3, 211100, ',210000,211100,211102,'); +INSERT INTO `oa_city` VALUES (211103, '兴隆台区', 3, 211100, ',210000,211100,211103,'); +INSERT INTO `oa_city` VALUES (211121, '大洼县', 3, 211100, ',210000,211100,211121,'); +INSERT INTO `oa_city` VALUES (211122, '盘山县', 3, 211100, ',210000,211100,211122,'); +INSERT INTO `oa_city` VALUES (211200, '铁岭市', 2, 210000, ',210000,211200,'); +INSERT INTO `oa_city` VALUES (211202, '银州区', 3, 211200, ',210000,211200,211202,'); +INSERT INTO `oa_city` VALUES (211204, '清河区', 3, 211200, ',210000,211200,211204,'); +INSERT INTO `oa_city` VALUES (211221, '铁岭县', 3, 211200, ',210000,211200,211221,'); +INSERT INTO `oa_city` VALUES (211223, '西丰县', 3, 211200, ',210000,211200,211223,'); +INSERT INTO `oa_city` VALUES (211224, '昌图县', 3, 211200, ',210000,211200,211224,'); +INSERT INTO `oa_city` VALUES (211281, '调兵山市', 3, 211200, ',210000,211200,211281,'); +INSERT INTO `oa_city` VALUES (211282, '开原市', 3, 211200, ',210000,211200,211282,'); +INSERT INTO `oa_city` VALUES (211300, '朝阳市', 2, 210000, ',210000,211300,'); +INSERT INTO `oa_city` VALUES (211302, '双塔区', 3, 211300, ',210000,211300,211302,'); +INSERT INTO `oa_city` VALUES (211303, '龙城区', 3, 211300, ',210000,211300,211303,'); +INSERT INTO `oa_city` VALUES (211321, '朝阳县', 3, 211300, ',210000,211300,211321,'); +INSERT INTO `oa_city` VALUES (211322, '建平县', 3, 211300, ',210000,211300,211322,'); +INSERT INTO `oa_city` VALUES (211324, '喀喇沁左翼蒙古族自治县', 3, 211300, ',210000,211300,211324,'); +INSERT INTO `oa_city` VALUES (211381, '北票市', 3, 211300, ',210000,211300,211381,'); +INSERT INTO `oa_city` VALUES (211382, '凌源市', 3, 211300, ',210000,211300,211382,'); +INSERT INTO `oa_city` VALUES (211400, '葫芦岛市', 2, 210000, ',210000,211400,'); +INSERT INTO `oa_city` VALUES (211402, '连山区', 3, 211400, ',210000,211400,211402,'); +INSERT INTO `oa_city` VALUES (211403, '龙港区', 3, 211400, ',210000,211400,211403,'); +INSERT INTO `oa_city` VALUES (211404, '南票区', 3, 211400, ',210000,211400,211404,'); +INSERT INTO `oa_city` VALUES (211421, '绥中县', 3, 211400, ',210000,211400,211421,'); +INSERT INTO `oa_city` VALUES (211422, '建昌县', 3, 211400, ',210000,211400,211422,'); +INSERT INTO `oa_city` VALUES (211481, '兴城市', 3, 211400, ',210000,211400,211481,'); +INSERT INTO `oa_city` VALUES (220000, '吉林省', 1, 0, ',220000,'); +INSERT INTO `oa_city` VALUES (220100, '长春市', 2, 220000, ',220000,220100,'); +INSERT INTO `oa_city` VALUES (220102, '南关区', 3, 220100, ',220000,220100,220102,'); +INSERT INTO `oa_city` VALUES (220103, '宽城区', 3, 220100, ',220000,220100,220103,'); +INSERT INTO `oa_city` VALUES (220104, '朝阳区', 3, 220100, ',220000,220100,220104,'); +INSERT INTO `oa_city` VALUES (220105, '二道区', 3, 220100, ',220000,220100,220105,'); +INSERT INTO `oa_city` VALUES (220106, '绿园区', 3, 220100, ',220000,220100,220106,'); +INSERT INTO `oa_city` VALUES (220112, '双阳区', 3, 220100, ',220000,220100,220112,'); +INSERT INTO `oa_city` VALUES (220122, '农安县', 3, 220100, ',220000,220100,220122,'); +INSERT INTO `oa_city` VALUES (220181, '九台市', 3, 220100, ',220000,220100,220181,'); +INSERT INTO `oa_city` VALUES (220182, '榆树市', 3, 220100, ',220000,220100,220182,'); +INSERT INTO `oa_city` VALUES (220183, '德惠市', 3, 220100, ',220000,220100,220183,'); +INSERT INTO `oa_city` VALUES (220200, '吉林市', 2, 220000, ',220000,220200,'); +INSERT INTO `oa_city` VALUES (220202, '昌邑区', 3, 220200, ',220000,220200,220202,'); +INSERT INTO `oa_city` VALUES (220203, '龙潭区', 3, 220200, ',220000,220200,220203,'); +INSERT INTO `oa_city` VALUES (220204, '船营区', 3, 220200, ',220000,220200,220204,'); +INSERT INTO `oa_city` VALUES (220211, '丰满区', 3, 220200, ',220000,220200,220211,'); +INSERT INTO `oa_city` VALUES (220221, '永吉县', 3, 220200, ',220000,220200,220221,'); +INSERT INTO `oa_city` VALUES (220281, '蛟河市', 3, 220200, ',220000,220200,220281,'); +INSERT INTO `oa_city` VALUES (220282, '桦甸市', 3, 220200, ',220000,220200,220282,'); +INSERT INTO `oa_city` VALUES (220283, '舒兰市', 3, 220200, ',220000,220200,220283,'); +INSERT INTO `oa_city` VALUES (220284, '磐石市', 3, 220200, ',220000,220200,220284,'); +INSERT INTO `oa_city` VALUES (220300, '四平市', 2, 220000, ',220000,220300,'); +INSERT INTO `oa_city` VALUES (220302, '铁西区', 3, 220300, ',220000,220300,220302,'); +INSERT INTO `oa_city` VALUES (220303, '铁东区', 3, 220300, ',220000,220300,220303,'); +INSERT INTO `oa_city` VALUES (220322, '梨树县', 3, 220300, ',220000,220300,220322,'); +INSERT INTO `oa_city` VALUES (220323, '伊通满族自治县', 3, 220300, ',220000,220300,220323,'); +INSERT INTO `oa_city` VALUES (220381, '公主岭市', 3, 220300, ',220000,220300,220381,'); +INSERT INTO `oa_city` VALUES (220382, '双辽市', 3, 220300, ',220000,220300,220382,'); +INSERT INTO `oa_city` VALUES (220400, '辽源市', 2, 220000, ',220000,220400,'); +INSERT INTO `oa_city` VALUES (220402, '龙山区', 3, 220400, ',220000,220400,220402,'); +INSERT INTO `oa_city` VALUES (220403, '西安区', 3, 220400, ',220000,220400,220403,'); +INSERT INTO `oa_city` VALUES (220421, '东丰县', 3, 220400, ',220000,220400,220421,'); +INSERT INTO `oa_city` VALUES (220422, '东辽县', 3, 220400, ',220000,220400,220422,'); +INSERT INTO `oa_city` VALUES (220500, '通化市', 2, 220000, ',220000,220500,'); +INSERT INTO `oa_city` VALUES (220502, '东昌区', 3, 220500, ',220000,220500,220502,'); +INSERT INTO `oa_city` VALUES (220503, '二道江区', 3, 220500, ',220000,220500,220503,'); +INSERT INTO `oa_city` VALUES (220521, '通化县', 3, 220500, ',220000,220500,220521,'); +INSERT INTO `oa_city` VALUES (220523, '辉南县', 3, 220500, ',220000,220500,220523,'); +INSERT INTO `oa_city` VALUES (220524, '柳河县', 3, 220500, ',220000,220500,220524,'); +INSERT INTO `oa_city` VALUES (220581, '梅河口市', 3, 220500, ',220000,220500,220581,'); +INSERT INTO `oa_city` VALUES (220582, '集安市', 3, 220500, ',220000,220500,220582,'); +INSERT INTO `oa_city` VALUES (220600, '白山市', 2, 220000, ',220000,220600,'); +INSERT INTO `oa_city` VALUES (220602, '八道江区', 3, 220600, ',220000,220600,220602,'); +INSERT INTO `oa_city` VALUES (220621, '抚松县', 3, 220600, ',220000,220600,220621,'); +INSERT INTO `oa_city` VALUES (220622, '靖宇县', 3, 220600, ',220000,220600,220622,'); +INSERT INTO `oa_city` VALUES (220623, '长白朝鲜族自治县', 3, 220600, ',220000,220600,220623,'); +INSERT INTO `oa_city` VALUES (220625, '江源县', 3, 220600, ',220000,220600,220625,'); +INSERT INTO `oa_city` VALUES (220681, '临江市', 3, 220600, ',220000,220600,220681,'); +INSERT INTO `oa_city` VALUES (220700, '松原市', 2, 220000, ',220000,220700,'); +INSERT INTO `oa_city` VALUES (220702, '宁江区', 3, 220700, ',220000,220700,220702,'); +INSERT INTO `oa_city` VALUES (220721, '前郭尔罗斯蒙古族自治县', 3, 220700, ',220000,220700,220721,'); +INSERT INTO `oa_city` VALUES (220722, '长岭县', 3, 220700, ',220000,220700,220722,'); +INSERT INTO `oa_city` VALUES (220723, '乾安县', 3, 220700, ',220000,220700,220723,'); +INSERT INTO `oa_city` VALUES (220724, '扶余县', 3, 220700, ',220000,220700,220724,'); +INSERT INTO `oa_city` VALUES (220800, '白城市', 2, 220000, ',220000,220800,'); +INSERT INTO `oa_city` VALUES (220802, '洮北区', 3, 220800, ',220000,220800,220802,'); +INSERT INTO `oa_city` VALUES (220821, '镇赉县', 3, 220800, ',220000,220800,220821,'); +INSERT INTO `oa_city` VALUES (220822, '通榆县', 3, 220800, ',220000,220800,220822,'); +INSERT INTO `oa_city` VALUES (220881, '洮南市', 3, 220800, ',220000,220800,220881,'); +INSERT INTO `oa_city` VALUES (220882, '大安市', 3, 220800, ',220000,220800,220882,'); +INSERT INTO `oa_city` VALUES (222400, '延边朝鲜族自治州', 2, 220000, ',220000,222400,'); +INSERT INTO `oa_city` VALUES (222401, '延吉市', 3, 222400, ',220000,222400,222401,'); +INSERT INTO `oa_city` VALUES (222402, '图们市', 3, 222400, ',220000,222400,222402,'); +INSERT INTO `oa_city` VALUES (222403, '敦化市', 3, 222400, ',220000,222400,222403,'); +INSERT INTO `oa_city` VALUES (222404, '珲春市', 3, 222400, ',220000,222400,222404,'); +INSERT INTO `oa_city` VALUES (222405, '龙井市', 3, 222400, ',220000,222400,222405,'); +INSERT INTO `oa_city` VALUES (222406, '和龙市', 3, 222400, ',220000,222400,222406,'); +INSERT INTO `oa_city` VALUES (222424, '汪清县', 3, 222400, ',220000,222400,222424,'); +INSERT INTO `oa_city` VALUES (222426, '安图县', 3, 222400, ',220000,222400,222426,'); +INSERT INTO `oa_city` VALUES (230000, '黑龙江', 1, 0, ',230000,'); +INSERT INTO `oa_city` VALUES (230100, '哈尔滨市', 2, 230000, ',230000,230100,'); +INSERT INTO `oa_city` VALUES (230102, '道里区', 3, 230100, ',230000,230100,230102,'); +INSERT INTO `oa_city` VALUES (230103, '南岗区', 3, 230100, ',230000,230100,230103,'); +INSERT INTO `oa_city` VALUES (230104, '道外区', 3, 230100, ',230000,230100,230104,'); +INSERT INTO `oa_city` VALUES (230106, '香坊区', 3, 230100, ',230000,230100,230106,'); +INSERT INTO `oa_city` VALUES (230107, '动力区', 3, 230100, ',230000,230100,230107,'); +INSERT INTO `oa_city` VALUES (230108, '平房区', 3, 230100, ',230000,230100,230108,'); +INSERT INTO `oa_city` VALUES (230109, '松北区', 3, 230100, ',230000,230100,230109,'); +INSERT INTO `oa_city` VALUES (230111, '呼兰区', 3, 230100, ',230000,230100,230111,'); +INSERT INTO `oa_city` VALUES (230123, '依兰县', 3, 230100, ',230000,230100,230123,'); +INSERT INTO `oa_city` VALUES (230124, '方正县', 3, 230100, ',230000,230100,230124,'); +INSERT INTO `oa_city` VALUES (230125, '宾 县', 3, 230100, ',230000,230100,230125,'); +INSERT INTO `oa_city` VALUES (230126, '巴彦县', 3, 230100, ',230000,230100,230126,'); +INSERT INTO `oa_city` VALUES (230127, '木兰县', 3, 230100, ',230000,230100,230127,'); +INSERT INTO `oa_city` VALUES (230128, '通河县', 3, 230100, ',230000,230100,230128,'); +INSERT INTO `oa_city` VALUES (230129, '延寿县', 3, 230100, ',230000,230100,230129,'); +INSERT INTO `oa_city` VALUES (230181, '阿城市', 3, 230100, ',230000,230100,230181,'); +INSERT INTO `oa_city` VALUES (230182, '双城市', 3, 230100, ',230000,230100,230182,'); +INSERT INTO `oa_city` VALUES (230183, '尚志市', 3, 230100, ',230000,230100,230183,'); +INSERT INTO `oa_city` VALUES (230184, '五常市', 3, 230100, ',230000,230100,230184,'); +INSERT INTO `oa_city` VALUES (230200, '齐齐哈尔市', 2, 230000, ',230000,230200,'); +INSERT INTO `oa_city` VALUES (230202, '龙沙区', 3, 230200, ',230000,230200,230202,'); +INSERT INTO `oa_city` VALUES (230203, '建华区', 3, 230200, ',230000,230200,230203,'); +INSERT INTO `oa_city` VALUES (230204, '铁锋区', 3, 230200, ',230000,230200,230204,'); +INSERT INTO `oa_city` VALUES (230205, '昂昂溪区', 3, 230200, ',230000,230200,230205,'); +INSERT INTO `oa_city` VALUES (230206, '富拉尔基区', 3, 230200, ',230000,230200,230206,'); +INSERT INTO `oa_city` VALUES (230207, '碾子山区', 3, 230200, ',230000,230200,230207,'); +INSERT INTO `oa_city` VALUES (230208, '梅里斯达斡尔族区', 3, 230200, ',230000,230200,230208,'); +INSERT INTO `oa_city` VALUES (230221, '龙江县', 3, 230200, ',230000,230200,230221,'); +INSERT INTO `oa_city` VALUES (230223, '依安县', 3, 230200, ',230000,230200,230223,'); +INSERT INTO `oa_city` VALUES (230224, '泰来县', 3, 230200, ',230000,230200,230224,'); +INSERT INTO `oa_city` VALUES (230225, '甘南县', 3, 230200, ',230000,230200,230225,'); +INSERT INTO `oa_city` VALUES (230227, '富裕县', 3, 230200, ',230000,230200,230227,'); +INSERT INTO `oa_city` VALUES (230229, '克山县', 3, 230200, ',230000,230200,230229,'); +INSERT INTO `oa_city` VALUES (230230, '克东县', 3, 230200, ',230000,230200,230230,'); +INSERT INTO `oa_city` VALUES (230231, '拜泉县', 3, 230200, ',230000,230200,230231,'); +INSERT INTO `oa_city` VALUES (230281, '讷河市', 3, 230200, ',230000,230200,230281,'); +INSERT INTO `oa_city` VALUES (230300, '鸡西市', 2, 230000, ',230000,230300,'); +INSERT INTO `oa_city` VALUES (230302, '鸡冠区', 3, 230300, ',230000,230300,230302,'); +INSERT INTO `oa_city` VALUES (230303, '恒山区', 3, 230300, ',230000,230300,230303,'); +INSERT INTO `oa_city` VALUES (230304, '滴道区', 3, 230300, ',230000,230300,230304,'); +INSERT INTO `oa_city` VALUES (230305, '梨树区', 3, 230300, ',230000,230300,230305,'); +INSERT INTO `oa_city` VALUES (230306, '城子河区', 3, 230300, ',230000,230300,230306,'); +INSERT INTO `oa_city` VALUES (230307, '麻山区', 3, 230300, ',230000,230300,230307,'); +INSERT INTO `oa_city` VALUES (230321, '鸡东县', 3, 230300, ',230000,230300,230321,'); +INSERT INTO `oa_city` VALUES (230381, '虎林市', 3, 230300, ',230000,230300,230381,'); +INSERT INTO `oa_city` VALUES (230382, '密山市', 3, 230300, ',230000,230300,230382,'); +INSERT INTO `oa_city` VALUES (230400, '鹤岗市', 2, 230000, ',230000,230400,'); +INSERT INTO `oa_city` VALUES (230402, '向阳区', 3, 230400, ',230000,230400,230402,'); +INSERT INTO `oa_city` VALUES (230403, '工农区', 3, 230400, ',230000,230400,230403,'); +INSERT INTO `oa_city` VALUES (230404, '南山区', 3, 230400, ',230000,230400,230404,'); +INSERT INTO `oa_city` VALUES (230405, '兴安区', 3, 230400, ',230000,230400,230405,'); +INSERT INTO `oa_city` VALUES (230406, '东山区', 3, 230400, ',230000,230400,230406,'); +INSERT INTO `oa_city` VALUES (230407, '兴山区', 3, 230400, ',230000,230400,230407,'); +INSERT INTO `oa_city` VALUES (230421, '萝北县', 3, 230400, ',230000,230400,230421,'); +INSERT INTO `oa_city` VALUES (230422, '绥滨县', 3, 230400, ',230000,230400,230422,'); +INSERT INTO `oa_city` VALUES (230500, '双鸭山市', 2, 230000, ',230000,230500,'); +INSERT INTO `oa_city` VALUES (230502, '尖山区', 3, 230500, ',230000,230500,230502,'); +INSERT INTO `oa_city` VALUES (230503, '岭东区', 3, 230500, ',230000,230500,230503,'); +INSERT INTO `oa_city` VALUES (230505, '四方台区', 3, 230500, ',230000,230500,230505,'); +INSERT INTO `oa_city` VALUES (230506, '宝山区', 3, 230500, ',230000,230500,230506,'); +INSERT INTO `oa_city` VALUES (230521, '集贤县', 3, 230500, ',230000,230500,230521,'); +INSERT INTO `oa_city` VALUES (230522, '友谊县', 3, 230500, ',230000,230500,230522,'); +INSERT INTO `oa_city` VALUES (230523, '宝清县', 3, 230500, ',230000,230500,230523,'); +INSERT INTO `oa_city` VALUES (230524, '饶河县', 3, 230500, ',230000,230500,230524,'); +INSERT INTO `oa_city` VALUES (230600, '大庆市', 2, 230000, ',230000,230600,'); +INSERT INTO `oa_city` VALUES (230602, '萨尔图区', 3, 230600, ',230000,230600,230602,'); +INSERT INTO `oa_city` VALUES (230603, '龙凤区', 3, 230600, ',230000,230600,230603,'); +INSERT INTO `oa_city` VALUES (230604, '让胡路区', 3, 230600, ',230000,230600,230604,'); +INSERT INTO `oa_city` VALUES (230605, '红岗区', 3, 230600, ',230000,230600,230605,'); +INSERT INTO `oa_city` VALUES (230606, '大同区', 3, 230600, ',230000,230600,230606,'); +INSERT INTO `oa_city` VALUES (230621, '肇州县', 3, 230600, ',230000,230600,230621,'); +INSERT INTO `oa_city` VALUES (230622, '肇源县', 3, 230600, ',230000,230600,230622,'); +INSERT INTO `oa_city` VALUES (230623, '林甸县', 3, 230600, ',230000,230600,230623,'); +INSERT INTO `oa_city` VALUES (230624, '杜尔伯特蒙古族自治县', 3, 230600, ',230000,230600,230624,'); +INSERT INTO `oa_city` VALUES (230700, '伊春市', 2, 230000, ',230000,230700,'); +INSERT INTO `oa_city` VALUES (230702, '伊春区', 3, 230700, ',230000,230700,230702,'); +INSERT INTO `oa_city` VALUES (230703, '南岔区', 3, 230700, ',230000,230700,230703,'); +INSERT INTO `oa_city` VALUES (230704, '友好区', 3, 230700, ',230000,230700,230704,'); +INSERT INTO `oa_city` VALUES (230705, '西林区', 3, 230700, ',230000,230700,230705,'); +INSERT INTO `oa_city` VALUES (230706, '翠峦区', 3, 230700, ',230000,230700,230706,'); +INSERT INTO `oa_city` VALUES (230707, '新青区', 3, 230700, ',230000,230700,230707,'); +INSERT INTO `oa_city` VALUES (230708, '美溪区', 3, 230700, ',230000,230700,230708,'); +INSERT INTO `oa_city` VALUES (230709, '金山屯区', 3, 230700, ',230000,230700,230709,'); +INSERT INTO `oa_city` VALUES (230710, '五营区', 3, 230700, ',230000,230700,230710,'); +INSERT INTO `oa_city` VALUES (230711, '乌马河区', 3, 230700, ',230000,230700,230711,'); +INSERT INTO `oa_city` VALUES (230712, '汤旺河区', 3, 230700, ',230000,230700,230712,'); +INSERT INTO `oa_city` VALUES (230713, '带岭区', 3, 230700, ',230000,230700,230713,'); +INSERT INTO `oa_city` VALUES (230714, '乌伊岭区', 3, 230700, ',230000,230700,230714,'); +INSERT INTO `oa_city` VALUES (230715, '红星区', 3, 230700, ',230000,230700,230715,'); +INSERT INTO `oa_city` VALUES (230716, '上甘岭区', 3, 230700, ',230000,230700,230716,'); +INSERT INTO `oa_city` VALUES (230722, '嘉荫县', 3, 230700, ',230000,230700,230722,'); +INSERT INTO `oa_city` VALUES (230781, '铁力市', 3, 230700, ',230000,230700,230781,'); +INSERT INTO `oa_city` VALUES (230800, '佳木斯市', 2, 230000, ',230000,230800,'); +INSERT INTO `oa_city` VALUES (230802, '永红区', 3, 230800, ',230000,230800,230802,'); +INSERT INTO `oa_city` VALUES (230803, '向阳区', 3, 230800, ',230000,230800,230803,'); +INSERT INTO `oa_city` VALUES (230804, '前进区', 3, 230800, ',230000,230800,230804,'); +INSERT INTO `oa_city` VALUES (230805, '东风区', 3, 230800, ',230000,230800,230805,'); +INSERT INTO `oa_city` VALUES (230811, '郊 区', 3, 230800, ',230000,230800,230811,'); +INSERT INTO `oa_city` VALUES (230822, '桦南县', 3, 230800, ',230000,230800,230822,'); +INSERT INTO `oa_city` VALUES (230826, '桦川县', 3, 230800, ',230000,230800,230826,'); +INSERT INTO `oa_city` VALUES (230828, '汤原县', 3, 230800, ',230000,230800,230828,'); +INSERT INTO `oa_city` VALUES (230833, '抚远县', 3, 230800, ',230000,230800,230833,'); +INSERT INTO `oa_city` VALUES (230881, '同江市', 3, 230800, ',230000,230800,230881,'); +INSERT INTO `oa_city` VALUES (230882, '富锦市', 3, 230800, ',230000,230800,230882,'); +INSERT INTO `oa_city` VALUES (230900, '七台河市', 2, 230000, ',230000,230900,'); +INSERT INTO `oa_city` VALUES (230902, '新兴区', 3, 230900, ',230000,230900,230902,'); +INSERT INTO `oa_city` VALUES (230903, '桃山区', 3, 230900, ',230000,230900,230903,'); +INSERT INTO `oa_city` VALUES (230904, '茄子河区', 3, 230900, ',230000,230900,230904,'); +INSERT INTO `oa_city` VALUES (230921, '勃利县', 3, 230900, ',230000,230900,230921,'); +INSERT INTO `oa_city` VALUES (231000, '牡丹江市', 2, 230000, ',230000,231000,'); +INSERT INTO `oa_city` VALUES (231002, '东安区', 3, 231000, ',230000,231000,231002,'); +INSERT INTO `oa_city` VALUES (231003, '阳明区', 3, 231000, ',230000,231000,231003,'); +INSERT INTO `oa_city` VALUES (231004, '爱民区', 3, 231000, ',230000,231000,231004,'); +INSERT INTO `oa_city` VALUES (231005, '西安区', 3, 231000, ',230000,231000,231005,'); +INSERT INTO `oa_city` VALUES (231024, '东宁县', 3, 231000, ',230000,231000,231024,'); +INSERT INTO `oa_city` VALUES (231025, '林口县', 3, 231000, ',230000,231000,231025,'); +INSERT INTO `oa_city` VALUES (231081, '绥芬河市', 3, 231000, ',230000,231000,231081,'); +INSERT INTO `oa_city` VALUES (231083, '海林市', 3, 231000, ',230000,231000,231083,'); +INSERT INTO `oa_city` VALUES (231084, '宁安市', 3, 231000, ',230000,231000,231084,'); +INSERT INTO `oa_city` VALUES (231085, '穆棱市', 3, 231000, ',230000,231000,231085,'); +INSERT INTO `oa_city` VALUES (231100, '黑河市', 2, 230000, ',230000,231100,'); +INSERT INTO `oa_city` VALUES (231102, '爱辉区', 3, 231100, ',230000,231100,231102,'); +INSERT INTO `oa_city` VALUES (231121, '嫩江县', 3, 231100, ',230000,231100,231121,'); +INSERT INTO `oa_city` VALUES (231123, '逊克县', 3, 231100, ',230000,231100,231123,'); +INSERT INTO `oa_city` VALUES (231124, '孙吴县', 3, 231100, ',230000,231100,231124,'); +INSERT INTO `oa_city` VALUES (231181, '北安市', 3, 231100, ',230000,231100,231181,'); +INSERT INTO `oa_city` VALUES (231182, '五大连池市', 3, 231100, ',230000,231100,231182,'); +INSERT INTO `oa_city` VALUES (231200, '绥化市', 2, 230000, ',230000,231200,'); +INSERT INTO `oa_city` VALUES (231202, '北林区', 3, 231200, ',230000,231200,231202,'); +INSERT INTO `oa_city` VALUES (231221, '望奎县', 3, 231200, ',230000,231200,231221,'); +INSERT INTO `oa_city` VALUES (231222, '兰西县', 3, 231200, ',230000,231200,231222,'); +INSERT INTO `oa_city` VALUES (231223, '青冈县', 3, 231200, ',230000,231200,231223,'); +INSERT INTO `oa_city` VALUES (231224, '庆安县', 3, 231200, ',230000,231200,231224,'); +INSERT INTO `oa_city` VALUES (231225, '明水县', 3, 231200, ',230000,231200,231225,'); +INSERT INTO `oa_city` VALUES (231226, '绥棱县', 3, 231200, ',230000,231200,231226,'); +INSERT INTO `oa_city` VALUES (231281, '安达市', 3, 231200, ',230000,231200,231281,'); +INSERT INTO `oa_city` VALUES (231282, '肇东市', 3, 231200, ',230000,231200,231282,'); +INSERT INTO `oa_city` VALUES (231283, '海伦市', 3, 231200, ',230000,231200,231283,'); +INSERT INTO `oa_city` VALUES (232700, '大兴安岭地区', 2, 230000, ',230000,232700,'); +INSERT INTO `oa_city` VALUES (232721, '呼玛县', 3, 232700, ',230000,232700,232721,'); +INSERT INTO `oa_city` VALUES (232722, '塔河县', 3, 232700, ',230000,232700,232722,'); +INSERT INTO `oa_city` VALUES (232723, '漠河县', 3, 232700, ',230000,232700,232723,'); +INSERT INTO `oa_city` VALUES (310000, '上海市', 1, 0, ',310000,'); +INSERT INTO `oa_city` VALUES (310101, '黄浦区', 2, 310000, ',310000,310101,'); +INSERT INTO `oa_city` VALUES (310103, '卢湾区', 2, 310000, ',310000,310103,'); +INSERT INTO `oa_city` VALUES (310104, '徐汇区', 2, 310000, ',310000,310104,'); +INSERT INTO `oa_city` VALUES (310105, '长宁区', 2, 310000, ',310000,310105,'); +INSERT INTO `oa_city` VALUES (310106, '静安区', 2, 310000, ',310000,310106,'); +INSERT INTO `oa_city` VALUES (310107, '普陀区', 2, 310000, ',310000,310107,'); +INSERT INTO `oa_city` VALUES (310108, '闸北区', 2, 310000, ',310000,310108,'); +INSERT INTO `oa_city` VALUES (310109, '虹口区', 2, 310000, ',310000,310109,'); +INSERT INTO `oa_city` VALUES (310110, '杨浦区', 2, 310000, ',310000,310110,'); +INSERT INTO `oa_city` VALUES (310112, '闵行区', 2, 310000, ',310000,310112,'); +INSERT INTO `oa_city` VALUES (310113, '宝山区', 2, 310000, ',310000,310113,'); +INSERT INTO `oa_city` VALUES (310114, '嘉定区', 2, 310000, ',310000,310114,'); +INSERT INTO `oa_city` VALUES (310115, '浦东新区', 2, 310000, ',310000,310115,'); +INSERT INTO `oa_city` VALUES (310116, '金山区', 2, 310000, ',310000,310116,'); +INSERT INTO `oa_city` VALUES (310117, '松江区', 2, 310000, ',310000,310117,'); +INSERT INTO `oa_city` VALUES (310118, '青浦区', 2, 310000, ',310000,310118,'); +INSERT INTO `oa_city` VALUES (310120, '奉贤区', 2, 310000, ',310000,310120,'); +INSERT INTO `oa_city` VALUES (310230, '崇明县', 3, 310000, ',310000,310230,'); +INSERT INTO `oa_city` VALUES (320000, '江苏省', 1, 0, ',320000,'); +INSERT INTO `oa_city` VALUES (320100, '南京市', 2, 320000, ',320000,320100,'); +INSERT INTO `oa_city` VALUES (320102, '玄武区', 3, 320100, ',320000,320100,320102,'); +INSERT INTO `oa_city` VALUES (320103, '白下区', 3, 320100, ',320000,320100,320103,'); +INSERT INTO `oa_city` VALUES (320104, '秦淮区', 3, 320100, ',320000,320100,320104,'); +INSERT INTO `oa_city` VALUES (320105, '建邺区', 3, 320100, ',320000,320100,320105,'); +INSERT INTO `oa_city` VALUES (320106, '鼓楼区', 3, 320100, ',320000,320100,320106,'); +INSERT INTO `oa_city` VALUES (320107, '下关区', 3, 320100, ',320000,320100,320107,'); +INSERT INTO `oa_city` VALUES (320111, '浦口区', 3, 320100, ',320000,320100,320111,'); +INSERT INTO `oa_city` VALUES (320113, '栖霞区', 3, 320100, ',320000,320100,320113,'); +INSERT INTO `oa_city` VALUES (320114, '雨花台区', 3, 320100, ',320000,320100,320114,'); +INSERT INTO `oa_city` VALUES (320115, '江宁区', 3, 320100, ',320000,320100,320115,'); +INSERT INTO `oa_city` VALUES (320116, '六合区', 3, 320100, ',320000,320100,320116,'); +INSERT INTO `oa_city` VALUES (320124, '溧水县', 3, 320100, ',320000,320100,320124,'); +INSERT INTO `oa_city` VALUES (320125, '高淳县', 3, 320100, ',320000,320100,320125,'); +INSERT INTO `oa_city` VALUES (320200, '无锡市', 2, 320000, ',320000,320200,'); +INSERT INTO `oa_city` VALUES (320202, '崇安区', 3, 320200, ',320000,320200,320202,'); +INSERT INTO `oa_city` VALUES (320203, '南长区', 3, 320200, ',320000,320200,320203,'); +INSERT INTO `oa_city` VALUES (320204, '北塘区', 3, 320200, ',320000,320200,320204,'); +INSERT INTO `oa_city` VALUES (320205, '锡山区', 3, 320200, ',320000,320200,320205,'); +INSERT INTO `oa_city` VALUES (320206, '惠山区', 3, 320200, ',320000,320200,320206,'); +INSERT INTO `oa_city` VALUES (320211, '滨湖区', 3, 320200, ',320000,320200,320211,'); +INSERT INTO `oa_city` VALUES (320281, '江阴市', 3, 320200, ',320000,320200,320281,'); +INSERT INTO `oa_city` VALUES (320282, '宜兴市', 3, 320200, ',320000,320200,320282,'); +INSERT INTO `oa_city` VALUES (320300, '徐州市', 2, 320000, ',320000,320300,'); +INSERT INTO `oa_city` VALUES (320302, '鼓楼区', 3, 320300, ',320000,320300,320302,'); +INSERT INTO `oa_city` VALUES (320303, '云龙区', 3, 320300, ',320000,320300,320303,'); +INSERT INTO `oa_city` VALUES (320304, '九里区', 3, 320300, ',320000,320300,320304,'); +INSERT INTO `oa_city` VALUES (320305, '贾汪区', 3, 320300, ',320000,320300,320305,'); +INSERT INTO `oa_city` VALUES (320311, '泉山区', 3, 320300, ',320000,320300,320311,'); +INSERT INTO `oa_city` VALUES (320321, '丰 县', 3, 320300, ',320000,320300,320321,'); +INSERT INTO `oa_city` VALUES (320322, '沛 县', 3, 320300, ',320000,320300,320322,'); +INSERT INTO `oa_city` VALUES (320323, '铜山县', 3, 320300, ',320000,320300,320323,'); +INSERT INTO `oa_city` VALUES (320324, '睢宁县', 3, 320300, ',320000,320300,320324,'); +INSERT INTO `oa_city` VALUES (320381, '新沂市', 3, 320300, ',320000,320300,320381,'); +INSERT INTO `oa_city` VALUES (320382, '邳州市', 3, 320300, ',320000,320300,320382,'); +INSERT INTO `oa_city` VALUES (320400, '常州市', 2, 320000, ',320000,320400,'); +INSERT INTO `oa_city` VALUES (320402, '天宁区', 3, 320400, ',320000,320400,320402,'); +INSERT INTO `oa_city` VALUES (320404, '钟楼区', 3, 320400, ',320000,320400,320404,'); +INSERT INTO `oa_city` VALUES (320405, '戚墅堰区', 3, 320400, ',320000,320400,320405,'); +INSERT INTO `oa_city` VALUES (320411, '新北区', 3, 320400, ',320000,320400,320411,'); +INSERT INTO `oa_city` VALUES (320412, '武进区', 3, 320400, ',320000,320400,320412,'); +INSERT INTO `oa_city` VALUES (320481, '溧阳市', 3, 320400, ',320000,320400,320481,'); +INSERT INTO `oa_city` VALUES (320482, '金坛市', 3, 320400, ',320000,320400,320482,'); +INSERT INTO `oa_city` VALUES (320500, '苏州市', 2, 320000, ',320000,320500,'); +INSERT INTO `oa_city` VALUES (320502, '沧浪区', 3, 320500, ',320000,320500,320502,'); +INSERT INTO `oa_city` VALUES (320503, '平江区', 3, 320500, ',320000,320500,320503,'); +INSERT INTO `oa_city` VALUES (320504, '金阊区', 3, 320500, ',320000,320500,320504,'); +INSERT INTO `oa_city` VALUES (320505, '虎丘区', 3, 320500, ',320000,320500,320505,'); +INSERT INTO `oa_city` VALUES (320506, '吴中区', 3, 320500, ',320000,320500,320506,'); +INSERT INTO `oa_city` VALUES (320507, '相城区', 3, 320500, ',320000,320500,320507,'); +INSERT INTO `oa_city` VALUES (320581, '常熟市', 3, 320500, ',320000,320500,320581,'); +INSERT INTO `oa_city` VALUES (320582, '张家港市', 3, 320500, ',320000,320500,320582,'); +INSERT INTO `oa_city` VALUES (320583, '昆山市', 3, 320500, ',320000,320500,320583,'); +INSERT INTO `oa_city` VALUES (320584, '吴江市', 3, 320500, ',320000,320500,320584,'); +INSERT INTO `oa_city` VALUES (320585, '太仓市', 3, 320500, ',320000,320500,320585,'); +INSERT INTO `oa_city` VALUES (320600, '南通市', 2, 320000, ',320000,320600,'); +INSERT INTO `oa_city` VALUES (320602, '崇川区', 3, 320600, ',320000,320600,320602,'); +INSERT INTO `oa_city` VALUES (320611, '港闸区', 3, 320600, ',320000,320600,320611,'); +INSERT INTO `oa_city` VALUES (320621, '海安县', 3, 320600, ',320000,320600,320621,'); +INSERT INTO `oa_city` VALUES (320623, '如东县', 3, 320600, ',320000,320600,320623,'); +INSERT INTO `oa_city` VALUES (320681, '启东市', 3, 320600, ',320000,320600,320681,'); +INSERT INTO `oa_city` VALUES (320682, '如皋市', 3, 320600, ',320000,320600,320682,'); +INSERT INTO `oa_city` VALUES (320683, '通州市', 3, 320600, ',320000,320600,320683,'); +INSERT INTO `oa_city` VALUES (320684, '海门市', 3, 320600, ',320000,320600,320684,'); +INSERT INTO `oa_city` VALUES (320700, '连云港市', 2, 320000, ',320000,320700,'); +INSERT INTO `oa_city` VALUES (320703, '连云区', 3, 320700, ',320000,320700,320703,'); +INSERT INTO `oa_city` VALUES (320705, '新浦区', 3, 320700, ',320000,320700,320705,'); +INSERT INTO `oa_city` VALUES (320706, '海州区', 3, 320700, ',320000,320700,320706,'); +INSERT INTO `oa_city` VALUES (320721, '赣榆县', 3, 320700, ',320000,320700,320721,'); +INSERT INTO `oa_city` VALUES (320722, '东海县', 3, 320700, ',320000,320700,320722,'); +INSERT INTO `oa_city` VALUES (320723, '灌云县', 3, 320700, ',320000,320700,320723,'); +INSERT INTO `oa_city` VALUES (320724, '灌南县', 3, 320700, ',320000,320700,320724,'); +INSERT INTO `oa_city` VALUES (320800, '淮安市', 2, 320000, ',320000,320800,'); +INSERT INTO `oa_city` VALUES (320802, '清河区', 3, 320800, ',320000,320800,320802,'); +INSERT INTO `oa_city` VALUES (320803, '楚州区', 3, 320800, ',320000,320800,320803,'); +INSERT INTO `oa_city` VALUES (320804, '淮阴区', 3, 320800, ',320000,320800,320804,'); +INSERT INTO `oa_city` VALUES (320811, '清浦区', 3, 320800, ',320000,320800,320811,'); +INSERT INTO `oa_city` VALUES (320826, '涟水县', 3, 320800, ',320000,320800,320826,'); +INSERT INTO `oa_city` VALUES (320829, '洪泽县', 3, 320800, ',320000,320800,320829,'); +INSERT INTO `oa_city` VALUES (320830, '盱眙县', 3, 320800, ',320000,320800,320830,'); +INSERT INTO `oa_city` VALUES (320831, '金湖县', 3, 320800, ',320000,320800,320831,'); +INSERT INTO `oa_city` VALUES (320900, '盐城市', 2, 320000, ',320000,320900,'); +INSERT INTO `oa_city` VALUES (320902, '亭湖区', 3, 320900, ',320000,320900,320902,'); +INSERT INTO `oa_city` VALUES (320903, '盐都区', 3, 320900, ',320000,320900,320903,'); +INSERT INTO `oa_city` VALUES (320921, '响水县', 3, 320900, ',320000,320900,320921,'); +INSERT INTO `oa_city` VALUES (320922, '滨海县', 3, 320900, ',320000,320900,320922,'); +INSERT INTO `oa_city` VALUES (320923, '阜宁县', 3, 320900, ',320000,320900,320923,'); +INSERT INTO `oa_city` VALUES (320924, '射阳县', 3, 320900, ',320000,320900,320924,'); +INSERT INTO `oa_city` VALUES (320925, '建湖县', 3, 320900, ',320000,320900,320925,'); +INSERT INTO `oa_city` VALUES (320981, '东台市', 3, 320900, ',320000,320900,320981,'); +INSERT INTO `oa_city` VALUES (320982, '大丰市', 3, 320900, ',320000,320900,320982,'); +INSERT INTO `oa_city` VALUES (321000, '扬州市', 2, 320000, ',320000,321000,'); +INSERT INTO `oa_city` VALUES (321002, '广陵区', 3, 321000, ',320000,321000,321002,'); +INSERT INTO `oa_city` VALUES (321003, '邗江区', 3, 321000, ',320000,321000,321003,'); +INSERT INTO `oa_city` VALUES (321011, '郊 区', 3, 321000, ',320000,321000,321011,'); +INSERT INTO `oa_city` VALUES (321023, '宝应县', 3, 321000, ',320000,321000,321023,'); +INSERT INTO `oa_city` VALUES (321081, '仪征市', 3, 321000, ',320000,321000,321081,'); +INSERT INTO `oa_city` VALUES (321084, '高邮市', 3, 321000, ',320000,321000,321084,'); +INSERT INTO `oa_city` VALUES (321088, '江都市', 3, 321000, ',320000,321000,321088,'); +INSERT INTO `oa_city` VALUES (321100, '镇江市', 2, 320000, ',320000,321100,'); +INSERT INTO `oa_city` VALUES (321102, '京口区', 3, 321100, ',320000,321100,321102,'); +INSERT INTO `oa_city` VALUES (321111, '润州区', 3, 321100, ',320000,321100,321111,'); +INSERT INTO `oa_city` VALUES (321112, '丹徒区', 3, 321100, ',320000,321100,321112,'); +INSERT INTO `oa_city` VALUES (321181, '丹阳市', 3, 321100, ',320000,321100,321181,'); +INSERT INTO `oa_city` VALUES (321182, '扬中市', 3, 321100, ',320000,321100,321182,'); +INSERT INTO `oa_city` VALUES (321183, '句容市', 3, 321100, ',320000,321100,321183,'); +INSERT INTO `oa_city` VALUES (321200, '泰州市', 2, 320000, ',320000,321200,'); +INSERT INTO `oa_city` VALUES (321202, '海陵区', 3, 321200, ',320000,321200,321202,'); +INSERT INTO `oa_city` VALUES (321203, '高港区', 3, 321200, ',320000,321200,321203,'); +INSERT INTO `oa_city` VALUES (321281, '兴化市', 3, 321200, ',320000,321200,321281,'); +INSERT INTO `oa_city` VALUES (321282, '靖江市', 3, 321200, ',320000,321200,321282,'); +INSERT INTO `oa_city` VALUES (321283, '泰兴市', 3, 321200, ',320000,321200,321283,'); +INSERT INTO `oa_city` VALUES (321284, '姜堰市', 3, 321200, ',320000,321200,321284,'); +INSERT INTO `oa_city` VALUES (321300, '宿迁市', 2, 320000, ',320000,321300,'); +INSERT INTO `oa_city` VALUES (321302, '宿城区', 3, 321300, ',320000,321300,321302,'); +INSERT INTO `oa_city` VALUES (321311, '宿豫区', 3, 321300, ',320000,321300,321311,'); +INSERT INTO `oa_city` VALUES (321322, '沭阳县', 3, 321300, ',320000,321300,321322,'); +INSERT INTO `oa_city` VALUES (321323, '泗阳县', 3, 321300, ',320000,321300,321323,'); +INSERT INTO `oa_city` VALUES (321324, '泗洪县', 3, 321300, ',320000,321300,321324,'); +INSERT INTO `oa_city` VALUES (330000, '浙江省', 1, 0, ',330000,'); +INSERT INTO `oa_city` VALUES (330100, '杭州市', 2, 330000, ',330000,330100,'); +INSERT INTO `oa_city` VALUES (330102, '上城区', 3, 330100, ',330000,330100,330102,'); +INSERT INTO `oa_city` VALUES (330103, '下城区', 3, 330100, ',330000,330100,330103,'); +INSERT INTO `oa_city` VALUES (330104, '江干区', 3, 330100, ',330000,330100,330104,'); +INSERT INTO `oa_city` VALUES (330105, '拱墅区', 3, 330100, ',330000,330100,330105,'); +INSERT INTO `oa_city` VALUES (330106, '西湖区', 3, 330100, ',330000,330100,330106,'); +INSERT INTO `oa_city` VALUES (330108, '滨江区', 3, 330100, ',330000,330100,330108,'); +INSERT INTO `oa_city` VALUES (330109, '萧山区', 3, 330100, ',330000,330100,330109,'); +INSERT INTO `oa_city` VALUES (330110, '余杭区', 3, 330100, ',330000,330100,330110,'); +INSERT INTO `oa_city` VALUES (330122, '桐庐县', 3, 330100, ',330000,330100,330122,'); +INSERT INTO `oa_city` VALUES (330127, '淳安县', 3, 330100, ',330000,330100,330127,'); +INSERT INTO `oa_city` VALUES (330182, '建德市', 3, 330100, ',330000,330100,330182,'); +INSERT INTO `oa_city` VALUES (330183, '富阳市', 3, 330100, ',330000,330100,330183,'); +INSERT INTO `oa_city` VALUES (330185, '临安市', 3, 330100, ',330000,330100,330185,'); +INSERT INTO `oa_city` VALUES (330200, '宁波市', 2, 330000, ',330000,330200,'); +INSERT INTO `oa_city` VALUES (330203, '海曙区', 3, 330200, ',330000,330200,330203,'); +INSERT INTO `oa_city` VALUES (330204, '江东区', 3, 330200, ',330000,330200,330204,'); +INSERT INTO `oa_city` VALUES (330205, '江北区', 3, 330200, ',330000,330200,330205,'); +INSERT INTO `oa_city` VALUES (330206, '北仑区', 3, 330200, ',330000,330200,330206,'); +INSERT INTO `oa_city` VALUES (330211, '镇海区', 3, 330200, ',330000,330200,330211,'); +INSERT INTO `oa_city` VALUES (330212, '鄞州区', 3, 330200, ',330000,330200,330212,'); +INSERT INTO `oa_city` VALUES (330225, '象山县', 3, 330200, ',330000,330200,330225,'); +INSERT INTO `oa_city` VALUES (330226, '宁海县', 3, 330200, ',330000,330200,330226,'); +INSERT INTO `oa_city` VALUES (330281, '余姚市', 3, 330200, ',330000,330200,330281,'); +INSERT INTO `oa_city` VALUES (330282, '慈溪市', 3, 330200, ',330000,330200,330282,'); +INSERT INTO `oa_city` VALUES (330283, '奉化市', 3, 330200, ',330000,330200,330283,'); +INSERT INTO `oa_city` VALUES (330300, '温州市', 2, 330000, ',330000,330300,'); +INSERT INTO `oa_city` VALUES (330302, '鹿城区', 3, 330300, ',330000,330300,330302,'); +INSERT INTO `oa_city` VALUES (330303, '龙湾区', 3, 330300, ',330000,330300,330303,'); +INSERT INTO `oa_city` VALUES (330304, '瓯海区', 3, 330300, ',330000,330300,330304,'); +INSERT INTO `oa_city` VALUES (330322, '洞头县', 3, 330300, ',330000,330300,330322,'); +INSERT INTO `oa_city` VALUES (330324, '永嘉县', 3, 330300, ',330000,330300,330324,'); +INSERT INTO `oa_city` VALUES (330326, '平阳县', 3, 330300, ',330000,330300,330326,'); +INSERT INTO `oa_city` VALUES (330327, '苍南县', 3, 330300, ',330000,330300,330327,'); +INSERT INTO `oa_city` VALUES (330328, '文成县', 3, 330300, ',330000,330300,330328,'); +INSERT INTO `oa_city` VALUES (330329, '泰顺县', 3, 330300, ',330000,330300,330329,'); +INSERT INTO `oa_city` VALUES (330381, '瑞安市', 3, 330300, ',330000,330300,330381,'); +INSERT INTO `oa_city` VALUES (330382, '乐清市', 3, 330300, ',330000,330300,330382,'); +INSERT INTO `oa_city` VALUES (330400, '嘉兴市', 2, 330000, ',330000,330400,'); +INSERT INTO `oa_city` VALUES (330402, '秀城区', 3, 330400, ',330000,330400,330402,'); +INSERT INTO `oa_city` VALUES (330411, '秀洲区', 3, 330400, ',330000,330400,330411,'); +INSERT INTO `oa_city` VALUES (330421, '嘉善县', 3, 330400, ',330000,330400,330421,'); +INSERT INTO `oa_city` VALUES (330424, '海盐县', 3, 330400, ',330000,330400,330424,'); +INSERT INTO `oa_city` VALUES (330481, '海宁市', 3, 330400, ',330000,330400,330481,'); +INSERT INTO `oa_city` VALUES (330482, '平湖市', 3, 330400, ',330000,330400,330482,'); +INSERT INTO `oa_city` VALUES (330483, '桐乡市', 3, 330400, ',330000,330400,330483,'); +INSERT INTO `oa_city` VALUES (330500, '湖州市', 2, 330000, ',330000,330500,'); +INSERT INTO `oa_city` VALUES (330502, '吴兴区', 3, 330500, ',330000,330500,330502,'); +INSERT INTO `oa_city` VALUES (330503, '南浔区', 3, 330500, ',330000,330500,330503,'); +INSERT INTO `oa_city` VALUES (330521, '德清县', 3, 330500, ',330000,330500,330521,'); +INSERT INTO `oa_city` VALUES (330522, '长兴县', 3, 330500, ',330000,330500,330522,'); +INSERT INTO `oa_city` VALUES (330523, '安吉县', 3, 330500, ',330000,330500,330523,'); +INSERT INTO `oa_city` VALUES (330600, '绍兴市', 2, 330000, ',330000,330600,'); +INSERT INTO `oa_city` VALUES (330602, '越城区', 3, 330600, ',330000,330600,330602,'); +INSERT INTO `oa_city` VALUES (330621, '绍兴县', 3, 330600, ',330000,330600,330621,'); +INSERT INTO `oa_city` VALUES (330624, '新昌县', 3, 330600, ',330000,330600,330624,'); +INSERT INTO `oa_city` VALUES (330681, '诸暨市', 3, 330600, ',330000,330600,330681,'); +INSERT INTO `oa_city` VALUES (330682, '上虞市', 3, 330600, ',330000,330600,330682,'); +INSERT INTO `oa_city` VALUES (330683, '嵊州市', 3, 330600, ',330000,330600,330683,'); +INSERT INTO `oa_city` VALUES (330700, '金华市', 2, 330000, ',330000,330700,'); +INSERT INTO `oa_city` VALUES (330702, '婺城区', 3, 330700, ',330000,330700,330702,'); +INSERT INTO `oa_city` VALUES (330703, '金东区', 3, 330700, ',330000,330700,330703,'); +INSERT INTO `oa_city` VALUES (330723, '武义县', 3, 330700, ',330000,330700,330723,'); +INSERT INTO `oa_city` VALUES (330726, '浦江县', 3, 330700, ',330000,330700,330726,'); +INSERT INTO `oa_city` VALUES (330727, '磐安县', 3, 330700, ',330000,330700,330727,'); +INSERT INTO `oa_city` VALUES (330781, '兰溪市', 3, 330700, ',330000,330700,330781,'); +INSERT INTO `oa_city` VALUES (330782, '义乌市', 3, 330700, ',330000,330700,330782,'); +INSERT INTO `oa_city` VALUES (330783, '东阳市', 3, 330700, ',330000,330700,330783,'); +INSERT INTO `oa_city` VALUES (330784, '永康市', 3, 330700, ',330000,330700,330784,'); +INSERT INTO `oa_city` VALUES (330800, '衢州市', 2, 330000, ',330000,330800,'); +INSERT INTO `oa_city` VALUES (330802, '柯城区', 3, 330800, ',330000,330800,330802,'); +INSERT INTO `oa_city` VALUES (330803, '衢江区', 3, 330800, ',330000,330800,330803,'); +INSERT INTO `oa_city` VALUES (330822, '常山县', 3, 330800, ',330000,330800,330822,'); +INSERT INTO `oa_city` VALUES (330824, '开化县', 3, 330800, ',330000,330800,330824,'); +INSERT INTO `oa_city` VALUES (330825, '龙游县', 3, 330800, ',330000,330800,330825,'); +INSERT INTO `oa_city` VALUES (330881, '江山市', 3, 330800, ',330000,330800,330881,'); +INSERT INTO `oa_city` VALUES (330900, '舟山市', 2, 330000, ',330000,330900,'); +INSERT INTO `oa_city` VALUES (330902, '定海区', 3, 330900, ',330000,330900,330902,'); +INSERT INTO `oa_city` VALUES (330903, '普陀区', 3, 330900, ',330000,330900,330903,'); +INSERT INTO `oa_city` VALUES (330921, '岱山县', 3, 330900, ',330000,330900,330921,'); +INSERT INTO `oa_city` VALUES (330922, '嵊泗县', 3, 330900, ',330000,330900,330922,'); +INSERT INTO `oa_city` VALUES (331000, '台州市', 2, 330000, ',330000,331000,'); +INSERT INTO `oa_city` VALUES (331002, '椒江区', 3, 331000, ',330000,331000,331002,'); +INSERT INTO `oa_city` VALUES (331003, '黄岩区', 3, 331000, ',330000,331000,331003,'); +INSERT INTO `oa_city` VALUES (331004, '路桥区', 3, 331000, ',330000,331000,331004,'); +INSERT INTO `oa_city` VALUES (331021, '玉环县', 3, 331000, ',330000,331000,331021,'); +INSERT INTO `oa_city` VALUES (331022, '三门县', 3, 331000, ',330000,331000,331022,'); +INSERT INTO `oa_city` VALUES (331023, '天台县', 3, 331000, ',330000,331000,331023,'); +INSERT INTO `oa_city` VALUES (331024, '仙居县', 3, 331000, ',330000,331000,331024,'); +INSERT INTO `oa_city` VALUES (331081, '温岭市', 3, 331000, ',330000,331000,331081,'); +INSERT INTO `oa_city` VALUES (331082, '临海市', 3, 331000, ',330000,331000,331082,'); +INSERT INTO `oa_city` VALUES (331100, '丽水市', 2, 330000, ',330000,331100,'); +INSERT INTO `oa_city` VALUES (331102, '莲都区', 3, 331100, ',330000,331100,331102,'); +INSERT INTO `oa_city` VALUES (331121, '青田县', 3, 331100, ',330000,331100,331121,'); +INSERT INTO `oa_city` VALUES (331122, '缙云县', 3, 331100, ',330000,331100,331122,'); +INSERT INTO `oa_city` VALUES (331123, '遂昌县', 3, 331100, ',330000,331100,331123,'); +INSERT INTO `oa_city` VALUES (331124, '松阳县', 3, 331100, ',330000,331100,331124,'); +INSERT INTO `oa_city` VALUES (331125, '云和县', 3, 331100, ',330000,331100,331125,'); +INSERT INTO `oa_city` VALUES (331126, '庆元县', 3, 331100, ',330000,331100,331126,'); +INSERT INTO `oa_city` VALUES (331127, '景宁畲族自治县', 3, 331100, ',330000,331100,331127,'); +INSERT INTO `oa_city` VALUES (331181, '龙泉市', 3, 331100, ',330000,331100,331181,'); +INSERT INTO `oa_city` VALUES (340000, '安徽省', 1, 0, ',340000,'); +INSERT INTO `oa_city` VALUES (340100, '合肥市', 2, 340000, ',340000,340100,'); +INSERT INTO `oa_city` VALUES (340102, '瑶海区', 3, 340100, ',340000,340100,340102,'); +INSERT INTO `oa_city` VALUES (340103, '庐阳区', 3, 340100, ',340000,340100,340103,'); +INSERT INTO `oa_city` VALUES (340104, '蜀山区', 3, 340100, ',340000,340100,340104,'); +INSERT INTO `oa_city` VALUES (340111, '包河区', 3, 340100, ',340000,340100,340111,'); +INSERT INTO `oa_city` VALUES (340121, '长丰县', 3, 340100, ',340000,340100,340121,'); +INSERT INTO `oa_city` VALUES (340122, '肥东县', 3, 340100, ',340000,340100,340122,'); +INSERT INTO `oa_city` VALUES (340123, '肥西县', 3, 340100, ',340000,340100,340123,'); +INSERT INTO `oa_city` VALUES (340200, '芜湖市', 2, 340000, ',340000,340200,'); +INSERT INTO `oa_city` VALUES (340202, '镜湖区', 3, 340200, ',340000,340200,340202,'); +INSERT INTO `oa_city` VALUES (340203, '马塘区', 3, 340200, ',340000,340200,340203,'); +INSERT INTO `oa_city` VALUES (340204, '新芜区', 3, 340200, ',340000,340200,340204,'); +INSERT INTO `oa_city` VALUES (340207, '鸠江区', 3, 340200, ',340000,340200,340207,'); +INSERT INTO `oa_city` VALUES (340221, '芜湖县', 3, 340200, ',340000,340200,340221,'); +INSERT INTO `oa_city` VALUES (340222, '繁昌县', 3, 340200, ',340000,340200,340222,'); +INSERT INTO `oa_city` VALUES (340223, '南陵县', 3, 340200, ',340000,340200,340223,'); +INSERT INTO `oa_city` VALUES (340300, '蚌埠市', 2, 340000, ',340000,340300,'); +INSERT INTO `oa_city` VALUES (340302, '龙子湖区', 3, 340300, ',340000,340300,340302,'); +INSERT INTO `oa_city` VALUES (340303, '蚌山区', 3, 340300, ',340000,340300,340303,'); +INSERT INTO `oa_city` VALUES (340304, '禹会区', 3, 340300, ',340000,340300,340304,'); +INSERT INTO `oa_city` VALUES (340311, '淮上区', 3, 340300, ',340000,340300,340311,'); +INSERT INTO `oa_city` VALUES (340321, '怀远县', 3, 340300, ',340000,340300,340321,'); +INSERT INTO `oa_city` VALUES (340322, '五河县', 3, 340300, ',340000,340300,340322,'); +INSERT INTO `oa_city` VALUES (340323, '固镇县', 3, 340300, ',340000,340300,340323,'); +INSERT INTO `oa_city` VALUES (340400, '淮南市', 2, 340000, ',340000,340400,'); +INSERT INTO `oa_city` VALUES (340402, '大通区', 3, 340400, ',340000,340400,340402,'); +INSERT INTO `oa_city` VALUES (340403, '田家庵区', 3, 340400, ',340000,340400,340403,'); +INSERT INTO `oa_city` VALUES (340404, '谢家集区', 3, 340400, ',340000,340400,340404,'); +INSERT INTO `oa_city` VALUES (340405, '八公山区', 3, 340400, ',340000,340400,340405,'); +INSERT INTO `oa_city` VALUES (340406, '潘集区', 3, 340400, ',340000,340400,340406,'); +INSERT INTO `oa_city` VALUES (340421, '凤台县', 3, 340400, ',340000,340400,340421,'); +INSERT INTO `oa_city` VALUES (340500, '马鞍山市', 2, 340000, ',340000,340500,'); +INSERT INTO `oa_city` VALUES (340502, '金家庄区', 3, 340500, ',340000,340500,340502,'); +INSERT INTO `oa_city` VALUES (340503, '花山区', 3, 340500, ',340000,340500,340503,'); +INSERT INTO `oa_city` VALUES (340504, '雨山区', 3, 340500, ',340000,340500,340504,'); +INSERT INTO `oa_city` VALUES (340521, '当涂县', 3, 340500, ',340000,340500,340521,'); +INSERT INTO `oa_city` VALUES (340600, '淮北市', 2, 340000, ',340000,340600,'); +INSERT INTO `oa_city` VALUES (340602, '杜集区', 3, 340600, ',340000,340600,340602,'); +INSERT INTO `oa_city` VALUES (340603, '相山区', 3, 340600, ',340000,340600,340603,'); +INSERT INTO `oa_city` VALUES (340604, '烈山区', 3, 340600, ',340000,340600,340604,'); +INSERT INTO `oa_city` VALUES (340621, '濉溪县', 3, 340600, ',340000,340600,340621,'); +INSERT INTO `oa_city` VALUES (340700, '铜陵市', 2, 340000, ',340000,340700,'); +INSERT INTO `oa_city` VALUES (340702, '铜官山区', 3, 340700, ',340000,340700,340702,'); +INSERT INTO `oa_city` VALUES (340703, '狮子山区', 3, 340700, ',340000,340700,340703,'); +INSERT INTO `oa_city` VALUES (340711, '郊 区', 3, 340700, ',340000,340700,340711,'); +INSERT INTO `oa_city` VALUES (340721, '铜陵县', 3, 340700, ',340000,340700,340721,'); +INSERT INTO `oa_city` VALUES (340800, '安庆市', 2, 340000, ',340000,340800,'); +INSERT INTO `oa_city` VALUES (340802, '迎江区', 3, 340800, ',340000,340800,340802,'); +INSERT INTO `oa_city` VALUES (340803, '大观区', 3, 340800, ',340000,340800,340803,'); +INSERT INTO `oa_city` VALUES (340811, '郊 区', 3, 340800, ',340000,340800,340811,'); +INSERT INTO `oa_city` VALUES (340822, '怀宁县', 3, 340800, ',340000,340800,340822,'); +INSERT INTO `oa_city` VALUES (340823, '枞阳县', 3, 340800, ',340000,340800,340823,'); +INSERT INTO `oa_city` VALUES (340824, '潜山县', 3, 340800, ',340000,340800,340824,'); +INSERT INTO `oa_city` VALUES (340825, '太湖县', 3, 340800, ',340000,340800,340825,'); +INSERT INTO `oa_city` VALUES (340826, '宿松县', 3, 340800, ',340000,340800,340826,'); +INSERT INTO `oa_city` VALUES (340827, '望江县', 3, 340800, ',340000,340800,340827,'); +INSERT INTO `oa_city` VALUES (340828, '岳西县', 3, 340800, ',340000,340800,340828,'); +INSERT INTO `oa_city` VALUES (340881, '桐城市', 3, 340800, ',340000,340800,340881,'); +INSERT INTO `oa_city` VALUES (341000, '黄山市', 2, 340000, ',340000,341000,'); +INSERT INTO `oa_city` VALUES (341002, '屯溪区', 3, 341000, ',340000,341000,341002,'); +INSERT INTO `oa_city` VALUES (341003, '黄山区', 3, 341000, ',340000,341000,341003,'); +INSERT INTO `oa_city` VALUES (341004, '徽州区', 3, 341000, ',340000,341000,341004,'); +INSERT INTO `oa_city` VALUES (341021, '歙 县', 3, 341000, ',340000,341000,341021,'); +INSERT INTO `oa_city` VALUES (341022, '休宁县', 3, 341000, ',340000,341000,341022,'); +INSERT INTO `oa_city` VALUES (341023, '黟 县', 3, 341000, ',340000,341000,341023,'); +INSERT INTO `oa_city` VALUES (341024, '祁门县', 3, 341000, ',340000,341000,341024,'); +INSERT INTO `oa_city` VALUES (341100, '滁州市', 2, 340000, ',340000,341100,'); +INSERT INTO `oa_city` VALUES (341102, '琅琊区', 3, 341100, ',340000,341100,341102,'); +INSERT INTO `oa_city` VALUES (341103, '南谯区', 3, 341100, ',340000,341100,341103,'); +INSERT INTO `oa_city` VALUES (341122, '来安县', 3, 341100, ',340000,341100,341122,'); +INSERT INTO `oa_city` VALUES (341124, '全椒县', 3, 341100, ',340000,341100,341124,'); +INSERT INTO `oa_city` VALUES (341125, '定远县', 3, 341100, ',340000,341100,341125,'); +INSERT INTO `oa_city` VALUES (341126, '凤阳县', 3, 341100, ',340000,341100,341126,'); +INSERT INTO `oa_city` VALUES (341181, '天长市', 3, 341100, ',340000,341100,341181,'); +INSERT INTO `oa_city` VALUES (341182, '明光市', 3, 341100, ',340000,341100,341182,'); +INSERT INTO `oa_city` VALUES (341200, '阜阳市', 2, 340000, ',340000,341200,'); +INSERT INTO `oa_city` VALUES (341202, '颍州区', 3, 341200, ',340000,341200,341202,'); +INSERT INTO `oa_city` VALUES (341203, '颍东区', 3, 341200, ',340000,341200,341203,'); +INSERT INTO `oa_city` VALUES (341204, '颍泉区', 3, 341200, ',340000,341200,341204,'); +INSERT INTO `oa_city` VALUES (341221, '临泉县', 3, 341200, ',340000,341200,341221,'); +INSERT INTO `oa_city` VALUES (341222, '太和县', 3, 341200, ',340000,341200,341222,'); +INSERT INTO `oa_city` VALUES (341225, '阜南县', 3, 341200, ',340000,341200,341225,'); +INSERT INTO `oa_city` VALUES (341226, '颍上县', 3, 341200, ',340000,341200,341226,'); +INSERT INTO `oa_city` VALUES (341282, '界首市', 3, 341200, ',340000,341200,341282,'); +INSERT INTO `oa_city` VALUES (341300, '宿州市', 2, 340000, ',340000,341300,'); +INSERT INTO `oa_city` VALUES (341302, '墉桥区', 3, 341300, ',340000,341300,341302,'); +INSERT INTO `oa_city` VALUES (341321, '砀山县', 3, 341300, ',340000,341300,341321,'); +INSERT INTO `oa_city` VALUES (341322, '萧 县', 3, 341300, ',340000,341300,341322,'); +INSERT INTO `oa_city` VALUES (341323, '灵璧县', 3, 341300, ',340000,341300,341323,'); +INSERT INTO `oa_city` VALUES (341324, '泗 县', 3, 341300, ',340000,341300,341324,'); +INSERT INTO `oa_city` VALUES (341400, '巢湖市', 2, 340000, ',340000,341400,'); +INSERT INTO `oa_city` VALUES (341401, '庐江县', 3, 340100, ',340000,340100,341401,'); +INSERT INTO `oa_city` VALUES (341402, '巢湖市', 3, 340100, ',340000,340100,341402,'); +INSERT INTO `oa_city` VALUES (341421, '庐江县', 3, 341400, ',340000,341400,341421,'); +INSERT INTO `oa_city` VALUES (341422, '无为县', 3, 340200, ',340000,340200,341422,'); +INSERT INTO `oa_city` VALUES (341423, '含山县', 3, 340500, ',340000,340500,341423,'); +INSERT INTO `oa_city` VALUES (341424, '和 县', 3, 340500, ',340000,340500,341424,'); +INSERT INTO `oa_city` VALUES (341500, '六安市', 2, 340000, ',340000,341500,'); +INSERT INTO `oa_city` VALUES (341502, '金安区', 3, 341500, ',340000,341500,341502,'); +INSERT INTO `oa_city` VALUES (341503, '裕安区', 3, 341500, ',340000,341500,341503,'); +INSERT INTO `oa_city` VALUES (341521, '寿 县', 3, 341500, ',340000,341500,341521,'); +INSERT INTO `oa_city` VALUES (341522, '霍邱县', 3, 341500, ',340000,341500,341522,'); +INSERT INTO `oa_city` VALUES (341523, '舒城县', 3, 341500, ',340000,341500,341523,'); +INSERT INTO `oa_city` VALUES (341524, '金寨县', 3, 341500, ',340000,341500,341524,'); +INSERT INTO `oa_city` VALUES (341525, '霍山县', 3, 341500, ',340000,341500,341525,'); +INSERT INTO `oa_city` VALUES (341600, '亳州市', 2, 340000, ',340000,341600,'); +INSERT INTO `oa_city` VALUES (341602, '谯城区', 3, 341600, ',340000,341600,341602,'); +INSERT INTO `oa_city` VALUES (341621, '涡阳县', 3, 341600, ',340000,341600,341621,'); +INSERT INTO `oa_city` VALUES (341622, '蒙城县', 3, 341600, ',340000,341600,341622,'); +INSERT INTO `oa_city` VALUES (341623, '利辛县', 3, 341600, ',340000,341600,341623,'); +INSERT INTO `oa_city` VALUES (341700, '池州市', 2, 340000, ',340000,341700,'); +INSERT INTO `oa_city` VALUES (341702, '贵池区', 3, 341700, ',340000,341700,341702,'); +INSERT INTO `oa_city` VALUES (341721, '东至县', 3, 341700, ',340000,341700,341721,'); +INSERT INTO `oa_city` VALUES (341722, '石台县', 3, 341700, ',340000,341700,341722,'); +INSERT INTO `oa_city` VALUES (341723, '青阳县', 3, 341700, ',340000,341700,341723,'); +INSERT INTO `oa_city` VALUES (341800, '宣城市', 2, 340000, ',340000,341800,'); +INSERT INTO `oa_city` VALUES (341802, '宣州区', 3, 341800, ',340000,341800,341802,'); +INSERT INTO `oa_city` VALUES (341821, '郎溪县', 3, 341800, ',340000,341800,341821,'); +INSERT INTO `oa_city` VALUES (341822, '广德县', 3, 341800, ',340000,341800,341822,'); +INSERT INTO `oa_city` VALUES (341823, '泾 县', 3, 341800, ',340000,341800,341823,'); +INSERT INTO `oa_city` VALUES (341824, '绩溪县', 3, 341800, ',340000,341800,341824,'); +INSERT INTO `oa_city` VALUES (341825, '旌德县', 3, 341800, ',340000,341800,341825,'); +INSERT INTO `oa_city` VALUES (341881, '宁国市', 3, 341800, ',340000,341800,341881,'); +INSERT INTO `oa_city` VALUES (350000, '福建省', 1, 0, ',350000,'); +INSERT INTO `oa_city` VALUES (350100, '福州市', 2, 350000, ',350000,350100,'); +INSERT INTO `oa_city` VALUES (350102, '鼓楼区', 3, 350100, ',350000,350100,350102,'); +INSERT INTO `oa_city` VALUES (350103, '台江区', 3, 350100, ',350000,350100,350103,'); +INSERT INTO `oa_city` VALUES (350104, '仓山区', 3, 350100, ',350000,350100,350104,'); +INSERT INTO `oa_city` VALUES (350105, '马尾区', 3, 350100, ',350000,350100,350105,'); +INSERT INTO `oa_city` VALUES (350111, '晋安区', 3, 350100, ',350000,350100,350111,'); +INSERT INTO `oa_city` VALUES (350121, '闽侯县', 3, 350100, ',350000,350100,350121,'); +INSERT INTO `oa_city` VALUES (350122, '连江县', 3, 350100, ',350000,350100,350122,'); +INSERT INTO `oa_city` VALUES (350123, '罗源县', 3, 350100, ',350000,350100,350123,'); +INSERT INTO `oa_city` VALUES (350124, '闽清县', 3, 350100, ',350000,350100,350124,'); +INSERT INTO `oa_city` VALUES (350125, '永泰县', 3, 350100, ',350000,350100,350125,'); +INSERT INTO `oa_city` VALUES (350128, '平潭县', 3, 350100, ',350000,350100,350128,'); +INSERT INTO `oa_city` VALUES (350181, '福清市', 3, 350100, ',350000,350100,350181,'); +INSERT INTO `oa_city` VALUES (350182, '长乐市', 3, 350100, ',350000,350100,350182,'); +INSERT INTO `oa_city` VALUES (350200, '厦门市', 2, 350000, ',350000,350200,'); +INSERT INTO `oa_city` VALUES (350203, '思明区', 3, 350200, ',350000,350200,350203,'); +INSERT INTO `oa_city` VALUES (350205, '海沧区', 3, 350200, ',350000,350200,350205,'); +INSERT INTO `oa_city` VALUES (350206, '湖里区', 3, 350200, ',350000,350200,350206,'); +INSERT INTO `oa_city` VALUES (350211, '集美区', 3, 350200, ',350000,350200,350211,'); +INSERT INTO `oa_city` VALUES (350212, '同安区', 3, 350200, ',350000,350200,350212,'); +INSERT INTO `oa_city` VALUES (350213, '翔安区', 3, 350200, ',350000,350200,350213,'); +INSERT INTO `oa_city` VALUES (350300, '莆田市', 2, 350000, ',350000,350300,'); +INSERT INTO `oa_city` VALUES (350302, '城厢区', 3, 350300, ',350000,350300,350302,'); +INSERT INTO `oa_city` VALUES (350303, '涵江区', 3, 350300, ',350000,350300,350303,'); +INSERT INTO `oa_city` VALUES (350304, '荔城区', 3, 350300, ',350000,350300,350304,'); +INSERT INTO `oa_city` VALUES (350305, '秀屿区', 3, 350300, ',350000,350300,350305,'); +INSERT INTO `oa_city` VALUES (350322, '仙游县', 3, 350300, ',350000,350300,350322,'); +INSERT INTO `oa_city` VALUES (350400, '三明市', 2, 350000, ',350000,350400,'); +INSERT INTO `oa_city` VALUES (350402, '梅列区', 3, 350400, ',350000,350400,350402,'); +INSERT INTO `oa_city` VALUES (350403, '三元区', 3, 350400, ',350000,350400,350403,'); +INSERT INTO `oa_city` VALUES (350421, '明溪县', 3, 350400, ',350000,350400,350421,'); +INSERT INTO `oa_city` VALUES (350423, '清流县', 3, 350400, ',350000,350400,350423,'); +INSERT INTO `oa_city` VALUES (350424, '宁化县', 3, 350400, ',350000,350400,350424,'); +INSERT INTO `oa_city` VALUES (350425, '大田县', 3, 350400, ',350000,350400,350425,'); +INSERT INTO `oa_city` VALUES (350426, '尤溪县', 3, 350400, ',350000,350400,350426,'); +INSERT INTO `oa_city` VALUES (350427, '沙 县', 3, 350400, ',350000,350400,350427,'); +INSERT INTO `oa_city` VALUES (350428, '将乐县', 3, 350400, ',350000,350400,350428,'); +INSERT INTO `oa_city` VALUES (350429, '泰宁县', 3, 350400, ',350000,350400,350429,'); +INSERT INTO `oa_city` VALUES (350430, '建宁县', 3, 350400, ',350000,350400,350430,'); +INSERT INTO `oa_city` VALUES (350481, '永安市', 3, 350400, ',350000,350400,350481,'); +INSERT INTO `oa_city` VALUES (350500, '泉州市', 2, 350000, ',350000,350500,'); +INSERT INTO `oa_city` VALUES (350502, '鲤城区', 3, 350500, ',350000,350500,350502,'); +INSERT INTO `oa_city` VALUES (350503, '丰泽区', 3, 350500, ',350000,350500,350503,'); +INSERT INTO `oa_city` VALUES (350504, '洛江区', 3, 350500, ',350000,350500,350504,'); +INSERT INTO `oa_city` VALUES (350505, '泉港区', 3, 350500, ',350000,350500,350505,'); +INSERT INTO `oa_city` VALUES (350521, '惠安县', 3, 350500, ',350000,350500,350521,'); +INSERT INTO `oa_city` VALUES (350524, '安溪县', 3, 350500, ',350000,350500,350524,'); +INSERT INTO `oa_city` VALUES (350525, '永春县', 3, 350500, ',350000,350500,350525,'); +INSERT INTO `oa_city` VALUES (350526, '德化县', 3, 350500, ',350000,350500,350526,'); +INSERT INTO `oa_city` VALUES (350527, '金门县', 3, 350500, ',350000,350500,350527,'); +INSERT INTO `oa_city` VALUES (350581, '石狮市', 3, 350500, ',350000,350500,350581,'); +INSERT INTO `oa_city` VALUES (350582, '晋江市', 3, 350500, ',350000,350500,350582,'); +INSERT INTO `oa_city` VALUES (350583, '南安市', 3, 350500, ',350000,350500,350583,'); +INSERT INTO `oa_city` VALUES (350600, '漳州市', 2, 350000, ',350000,350600,'); +INSERT INTO `oa_city` VALUES (350602, '芗城区', 3, 350600, ',350000,350600,350602,'); +INSERT INTO `oa_city` VALUES (350603, '龙文区', 3, 350600, ',350000,350600,350603,'); +INSERT INTO `oa_city` VALUES (350622, '云霄县', 3, 350600, ',350000,350600,350622,'); +INSERT INTO `oa_city` VALUES (350623, '漳浦县', 3, 350600, ',350000,350600,350623,'); +INSERT INTO `oa_city` VALUES (350624, '诏安县', 3, 350600, ',350000,350600,350624,'); +INSERT INTO `oa_city` VALUES (350625, '长泰县', 3, 350600, ',350000,350600,350625,'); +INSERT INTO `oa_city` VALUES (350626, '东山县', 3, 350600, ',350000,350600,350626,'); +INSERT INTO `oa_city` VALUES (350627, '南靖县', 3, 350600, ',350000,350600,350627,'); +INSERT INTO `oa_city` VALUES (350628, '平和县', 3, 350600, ',350000,350600,350628,'); +INSERT INTO `oa_city` VALUES (350629, '华安县', 3, 350600, ',350000,350600,350629,'); +INSERT INTO `oa_city` VALUES (350681, '龙海市', 3, 350600, ',350000,350600,350681,'); +INSERT INTO `oa_city` VALUES (350700, '南平市', 2, 350000, ',350000,350700,'); +INSERT INTO `oa_city` VALUES (350702, '延平区', 3, 350700, ',350000,350700,350702,'); +INSERT INTO `oa_city` VALUES (350721, '顺昌县', 3, 350700, ',350000,350700,350721,'); +INSERT INTO `oa_city` VALUES (350722, '浦城县', 3, 350700, ',350000,350700,350722,'); +INSERT INTO `oa_city` VALUES (350723, '光泽县', 3, 350700, ',350000,350700,350723,'); +INSERT INTO `oa_city` VALUES (350724, '松溪县', 3, 350700, ',350000,350700,350724,'); +INSERT INTO `oa_city` VALUES (350725, '政和县', 3, 350700, ',350000,350700,350725,'); +INSERT INTO `oa_city` VALUES (350781, '邵武市', 3, 350700, ',350000,350700,350781,'); +INSERT INTO `oa_city` VALUES (350782, '武夷山市', 3, 350700, ',350000,350700,350782,'); +INSERT INTO `oa_city` VALUES (350783, '建瓯市', 3, 350700, ',350000,350700,350783,'); +INSERT INTO `oa_city` VALUES (350784, '建阳市', 3, 350700, ',350000,350700,350784,'); +INSERT INTO `oa_city` VALUES (350800, '龙岩市', 2, 350000, ',350000,350800,'); +INSERT INTO `oa_city` VALUES (350802, '新罗区', 3, 350800, ',350000,350800,350802,'); +INSERT INTO `oa_city` VALUES (350821, '长汀县', 3, 350800, ',350000,350800,350821,'); +INSERT INTO `oa_city` VALUES (350822, '永定县', 3, 350800, ',350000,350800,350822,'); +INSERT INTO `oa_city` VALUES (350823, '上杭县', 3, 350800, ',350000,350800,350823,'); +INSERT INTO `oa_city` VALUES (350824, '武平县', 3, 350800, ',350000,350800,350824,'); +INSERT INTO `oa_city` VALUES (350825, '连城县', 3, 350800, ',350000,350800,350825,'); +INSERT INTO `oa_city` VALUES (350881, '漳平市', 3, 350800, ',350000,350800,350881,'); +INSERT INTO `oa_city` VALUES (350900, '宁德市', 2, 350000, ',350000,350900,'); +INSERT INTO `oa_city` VALUES (350902, '蕉城区', 3, 350900, ',350000,350900,350902,'); +INSERT INTO `oa_city` VALUES (350921, '霞浦县', 3, 350900, ',350000,350900,350921,'); +INSERT INTO `oa_city` VALUES (350922, '古田县', 3, 350900, ',350000,350900,350922,'); +INSERT INTO `oa_city` VALUES (350923, '屏南县', 3, 350900, ',350000,350900,350923,'); +INSERT INTO `oa_city` VALUES (350924, '寿宁县', 3, 350900, ',350000,350900,350924,'); +INSERT INTO `oa_city` VALUES (350925, '周宁县', 3, 350900, ',350000,350900,350925,'); +INSERT INTO `oa_city` VALUES (350926, '柘荣县', 3, 350900, ',350000,350900,350926,'); +INSERT INTO `oa_city` VALUES (350981, '福安市', 3, 350900, ',350000,350900,350981,'); +INSERT INTO `oa_city` VALUES (350982, '福鼎市', 3, 350900, ',350000,350900,350982,'); +INSERT INTO `oa_city` VALUES (360000, '江西省', 1, 0, ',360000,'); +INSERT INTO `oa_city` VALUES (360100, '南昌市', 2, 360000, ',360000,360100,'); +INSERT INTO `oa_city` VALUES (360102, '东湖区', 3, 360100, ',360000,360100,360102,'); +INSERT INTO `oa_city` VALUES (360103, '西湖区', 3, 360100, ',360000,360100,360103,'); +INSERT INTO `oa_city` VALUES (360104, '青云谱区', 3, 360100, ',360000,360100,360104,'); +INSERT INTO `oa_city` VALUES (360105, '湾里区', 3, 360100, ',360000,360100,360105,'); +INSERT INTO `oa_city` VALUES (360111, '青山湖区', 3, 360100, ',360000,360100,360111,'); +INSERT INTO `oa_city` VALUES (360121, '南昌县', 3, 360100, ',360000,360100,360121,'); +INSERT INTO `oa_city` VALUES (360122, '新建县', 3, 360100, ',360000,360100,360122,'); +INSERT INTO `oa_city` VALUES (360123, '安义县', 3, 360100, ',360000,360100,360123,'); +INSERT INTO `oa_city` VALUES (360124, '进贤县', 3, 360100, ',360000,360100,360124,'); +INSERT INTO `oa_city` VALUES (360200, '景德镇市', 2, 360000, ',360000,360200,'); +INSERT INTO `oa_city` VALUES (360202, '昌江区', 3, 360200, ',360000,360200,360202,'); +INSERT INTO `oa_city` VALUES (360203, '珠山区', 3, 360200, ',360000,360200,360203,'); +INSERT INTO `oa_city` VALUES (360222, '浮梁县', 3, 360200, ',360000,360200,360222,'); +INSERT INTO `oa_city` VALUES (360281, '乐平市', 3, 360200, ',360000,360200,360281,'); +INSERT INTO `oa_city` VALUES (360300, '萍乡市', 2, 360000, ',360000,360300,'); +INSERT INTO `oa_city` VALUES (360302, '安源区', 3, 360300, ',360000,360300,360302,'); +INSERT INTO `oa_city` VALUES (360313, '湘东区', 3, 360300, ',360000,360300,360313,'); +INSERT INTO `oa_city` VALUES (360321, '莲花县', 3, 360300, ',360000,360300,360321,'); +INSERT INTO `oa_city` VALUES (360322, '上栗县', 3, 360300, ',360000,360300,360322,'); +INSERT INTO `oa_city` VALUES (360323, '芦溪县', 3, 360300, ',360000,360300,360323,'); +INSERT INTO `oa_city` VALUES (360400, '九江市', 2, 360000, ',360000,360400,'); +INSERT INTO `oa_city` VALUES (360402, '庐山区', 3, 360400, ',360000,360400,360402,'); +INSERT INTO `oa_city` VALUES (360403, '浔阳区', 3, 360400, ',360000,360400,360403,'); +INSERT INTO `oa_city` VALUES (360421, '九江县', 3, 360400, ',360000,360400,360421,'); +INSERT INTO `oa_city` VALUES (360423, '武宁县', 3, 360400, ',360000,360400,360423,'); +INSERT INTO `oa_city` VALUES (360424, '修水县', 3, 360400, ',360000,360400,360424,'); +INSERT INTO `oa_city` VALUES (360425, '永修县', 3, 360400, ',360000,360400,360425,'); +INSERT INTO `oa_city` VALUES (360426, '德安县', 3, 360400, ',360000,360400,360426,'); +INSERT INTO `oa_city` VALUES (360427, '星子县', 3, 360400, ',360000,360400,360427,'); +INSERT INTO `oa_city` VALUES (360428, '都昌县', 3, 360400, ',360000,360400,360428,'); +INSERT INTO `oa_city` VALUES (360429, '湖口县', 3, 360400, ',360000,360400,360429,'); +INSERT INTO `oa_city` VALUES (360430, '彭泽县', 3, 360400, ',360000,360400,360430,'); +INSERT INTO `oa_city` VALUES (360481, '瑞昌市', 3, 360400, ',360000,360400,360481,'); +INSERT INTO `oa_city` VALUES (360500, '新余市', 2, 360000, ',360000,360500,'); +INSERT INTO `oa_city` VALUES (360502, '渝水区', 3, 360500, ',360000,360500,360502,'); +INSERT INTO `oa_city` VALUES (360521, '分宜县', 3, 360500, ',360000,360500,360521,'); +INSERT INTO `oa_city` VALUES (360600, '鹰潭市', 2, 360000, ',360000,360600,'); +INSERT INTO `oa_city` VALUES (360602, '月湖区', 3, 360600, ',360000,360600,360602,'); +INSERT INTO `oa_city` VALUES (360622, '余江县', 3, 360600, ',360000,360600,360622,'); +INSERT INTO `oa_city` VALUES (360681, '贵溪市', 3, 360600, ',360000,360600,360681,'); +INSERT INTO `oa_city` VALUES (360700, '赣州市', 2, 360000, ',360000,360700,'); +INSERT INTO `oa_city` VALUES (360702, '章贡区', 3, 360700, ',360000,360700,360702,'); +INSERT INTO `oa_city` VALUES (360721, '赣 县', 3, 360700, ',360000,360700,360721,'); +INSERT INTO `oa_city` VALUES (360722, '信丰县', 3, 360700, ',360000,360700,360722,'); +INSERT INTO `oa_city` VALUES (360723, '大余县', 3, 360700, ',360000,360700,360723,'); +INSERT INTO `oa_city` VALUES (360724, '上犹县', 3, 360700, ',360000,360700,360724,'); +INSERT INTO `oa_city` VALUES (360725, '崇义县', 3, 360700, ',360000,360700,360725,'); +INSERT INTO `oa_city` VALUES (360726, '安远县', 3, 360700, ',360000,360700,360726,'); +INSERT INTO `oa_city` VALUES (360727, '龙南县', 3, 360700, ',360000,360700,360727,'); +INSERT INTO `oa_city` VALUES (360728, '定南县', 3, 360700, ',360000,360700,360728,'); +INSERT INTO `oa_city` VALUES (360729, '全南县', 3, 360700, ',360000,360700,360729,'); +INSERT INTO `oa_city` VALUES (360730, '宁都县', 3, 360700, ',360000,360700,360730,'); +INSERT INTO `oa_city` VALUES (360731, '于都县', 3, 360700, ',360000,360700,360731,'); +INSERT INTO `oa_city` VALUES (360732, '兴国县', 3, 360700, ',360000,360700,360732,'); +INSERT INTO `oa_city` VALUES (360733, '会昌县', 3, 360700, ',360000,360700,360733,'); +INSERT INTO `oa_city` VALUES (360734, '寻乌县', 3, 360700, ',360000,360700,360734,'); +INSERT INTO `oa_city` VALUES (360735, '石城县', 3, 360700, ',360000,360700,360735,'); +INSERT INTO `oa_city` VALUES (360781, '瑞金市', 3, 360700, ',360000,360700,360781,'); +INSERT INTO `oa_city` VALUES (360782, '南康市', 3, 360700, ',360000,360700,360782,'); +INSERT INTO `oa_city` VALUES (360800, '吉安市', 2, 360000, ',360000,360800,'); +INSERT INTO `oa_city` VALUES (360802, '吉州区', 3, 360800, ',360000,360800,360802,'); +INSERT INTO `oa_city` VALUES (360803, '青原区', 3, 360800, ',360000,360800,360803,'); +INSERT INTO `oa_city` VALUES (360821, '吉安县', 3, 360800, ',360000,360800,360821,'); +INSERT INTO `oa_city` VALUES (360822, '吉水县', 3, 360800, ',360000,360800,360822,'); +INSERT INTO `oa_city` VALUES (360823, '峡江县', 3, 360800, ',360000,360800,360823,'); +INSERT INTO `oa_city` VALUES (360824, '新干县', 3, 360800, ',360000,360800,360824,'); +INSERT INTO `oa_city` VALUES (360825, '永丰县', 3, 360800, ',360000,360800,360825,'); +INSERT INTO `oa_city` VALUES (360826, '泰和县', 3, 360800, ',360000,360800,360826,'); +INSERT INTO `oa_city` VALUES (360827, '遂川县', 3, 360800, ',360000,360800,360827,'); +INSERT INTO `oa_city` VALUES (360828, '万安县', 3, 360800, ',360000,360800,360828,'); +INSERT INTO `oa_city` VALUES (360829, '安福县', 3, 360800, ',360000,360800,360829,'); +INSERT INTO `oa_city` VALUES (360830, '永新县', 3, 360800, ',360000,360800,360830,'); +INSERT INTO `oa_city` VALUES (360881, '井冈山市', 3, 360800, ',360000,360800,360881,'); +INSERT INTO `oa_city` VALUES (360900, '宜春市', 2, 360000, ',360000,360900,'); +INSERT INTO `oa_city` VALUES (360902, '袁州区', 3, 360900, ',360000,360900,360902,'); +INSERT INTO `oa_city` VALUES (360921, '奉新县', 3, 360900, ',360000,360900,360921,'); +INSERT INTO `oa_city` VALUES (360922, '万载县', 3, 360900, ',360000,360900,360922,'); +INSERT INTO `oa_city` VALUES (360923, '上高县', 3, 360900, ',360000,360900,360923,'); +INSERT INTO `oa_city` VALUES (360924, '宜丰县', 3, 360900, ',360000,360900,360924,'); +INSERT INTO `oa_city` VALUES (360925, '靖安县', 3, 360900, ',360000,360900,360925,'); +INSERT INTO `oa_city` VALUES (360926, '铜鼓县', 3, 360900, ',360000,360900,360926,'); +INSERT INTO `oa_city` VALUES (360981, '丰城市', 3, 360900, ',360000,360900,360981,'); +INSERT INTO `oa_city` VALUES (360982, '樟树市', 3, 360900, ',360000,360900,360982,'); +INSERT INTO `oa_city` VALUES (360983, '高安市', 3, 360900, ',360000,360900,360983,'); +INSERT INTO `oa_city` VALUES (361000, '抚州市', 2, 360000, ',360000,361000,'); +INSERT INTO `oa_city` VALUES (361002, '临川区', 3, 361000, ',360000,361000,361002,'); +INSERT INTO `oa_city` VALUES (361021, '南城县', 3, 361000, ',360000,361000,361021,'); +INSERT INTO `oa_city` VALUES (361022, '黎川县', 3, 361000, ',360000,361000,361022,'); +INSERT INTO `oa_city` VALUES (361023, '南丰县', 3, 361000, ',360000,361000,361023,'); +INSERT INTO `oa_city` VALUES (361024, '崇仁县', 3, 361000, ',360000,361000,361024,'); +INSERT INTO `oa_city` VALUES (361025, '乐安县', 3, 361000, ',360000,361000,361025,'); +INSERT INTO `oa_city` VALUES (361026, '宜黄县', 3, 361000, ',360000,361000,361026,'); +INSERT INTO `oa_city` VALUES (361027, '金溪县', 3, 361000, ',360000,361000,361027,'); +INSERT INTO `oa_city` VALUES (361028, '资溪县', 3, 361000, ',360000,361000,361028,'); +INSERT INTO `oa_city` VALUES (361029, '东乡县', 3, 361000, ',360000,361000,361029,'); +INSERT INTO `oa_city` VALUES (361030, '广昌县', 3, 361000, ',360000,361000,361030,'); +INSERT INTO `oa_city` VALUES (361100, '上饶市', 2, 360000, ',360000,361100,'); +INSERT INTO `oa_city` VALUES (361102, '信州区', 3, 361100, ',360000,361100,361102,'); +INSERT INTO `oa_city` VALUES (361121, '上饶县', 3, 361100, ',360000,361100,361121,'); +INSERT INTO `oa_city` VALUES (361122, '广丰县', 3, 361100, ',360000,361100,361122,'); +INSERT INTO `oa_city` VALUES (361123, '玉山县', 3, 361100, ',360000,361100,361123,'); +INSERT INTO `oa_city` VALUES (361124, '铅山县', 3, 361100, ',360000,361100,361124,'); +INSERT INTO `oa_city` VALUES (361125, '横峰县', 3, 361100, ',360000,361100,361125,'); +INSERT INTO `oa_city` VALUES (361126, '弋阳县', 3, 361100, ',360000,361100,361126,'); +INSERT INTO `oa_city` VALUES (361127, '余干县', 3, 361100, ',360000,361100,361127,'); +INSERT INTO `oa_city` VALUES (361128, '鄱阳县', 3, 361100, ',360000,361100,361128,'); +INSERT INTO `oa_city` VALUES (361129, '万年县', 3, 361100, ',360000,361100,361129,'); +INSERT INTO `oa_city` VALUES (361130, '婺源县', 3, 361100, ',360000,361100,361130,'); +INSERT INTO `oa_city` VALUES (361181, '德兴市', 3, 361100, ',360000,361100,361181,'); +INSERT INTO `oa_city` VALUES (370000, '山东省', 1, 0, ',370000,'); +INSERT INTO `oa_city` VALUES (370100, '济南市', 2, 370000, ',370000,370100,'); +INSERT INTO `oa_city` VALUES (370102, '历下区', 3, 370100, ',370000,370100,370102,'); +INSERT INTO `oa_city` VALUES (370103, '市中区', 3, 370100, ',370000,370100,370103,'); +INSERT INTO `oa_city` VALUES (370104, '槐荫区', 3, 370100, ',370000,370100,370104,'); +INSERT INTO `oa_city` VALUES (370105, '天桥区', 3, 370100, ',370000,370100,370105,'); +INSERT INTO `oa_city` VALUES (370112, '历城区', 3, 370100, ',370000,370100,370112,'); +INSERT INTO `oa_city` VALUES (370113, '长清区', 3, 370100, ',370000,370100,370113,'); +INSERT INTO `oa_city` VALUES (370124, '平阴县', 3, 370100, ',370000,370100,370124,'); +INSERT INTO `oa_city` VALUES (370125, '济阳县', 3, 370100, ',370000,370100,370125,'); +INSERT INTO `oa_city` VALUES (370126, '商河县', 3, 370100, ',370000,370100,370126,'); +INSERT INTO `oa_city` VALUES (370181, '章丘市', 3, 370100, ',370000,370100,370181,'); +INSERT INTO `oa_city` VALUES (370200, '青岛市', 2, 370000, ',370000,370200,'); +INSERT INTO `oa_city` VALUES (370202, '市南区', 3, 370200, ',370000,370200,370202,'); +INSERT INTO `oa_city` VALUES (370203, '市北区', 3, 370200, ',370000,370200,370203,'); +INSERT INTO `oa_city` VALUES (370205, '四方区', 3, 370200, ',370000,370200,370205,'); +INSERT INTO `oa_city` VALUES (370211, '黄岛区', 3, 370200, ',370000,370200,370211,'); +INSERT INTO `oa_city` VALUES (370212, '崂山区', 3, 370200, ',370000,370200,370212,'); +INSERT INTO `oa_city` VALUES (370213, '李沧区', 3, 370200, ',370000,370200,370213,'); +INSERT INTO `oa_city` VALUES (370214, '城阳区', 3, 370200, ',370000,370200,370214,'); +INSERT INTO `oa_city` VALUES (370281, '胶州市', 3, 370200, ',370000,370200,370281,'); +INSERT INTO `oa_city` VALUES (370282, '即墨市', 3, 370200, ',370000,370200,370282,'); +INSERT INTO `oa_city` VALUES (370283, '平度市', 3, 370200, ',370000,370200,370283,'); +INSERT INTO `oa_city` VALUES (370284, '胶南市', 3, 370200, ',370000,370200,370284,'); +INSERT INTO `oa_city` VALUES (370285, '莱西市', 3, 370200, ',370000,370200,370285,'); +INSERT INTO `oa_city` VALUES (370300, '淄博市', 2, 370000, ',370000,370300,'); +INSERT INTO `oa_city` VALUES (370302, '淄川区', 3, 370300, ',370000,370300,370302,'); +INSERT INTO `oa_city` VALUES (370303, '张店区', 3, 370300, ',370000,370300,370303,'); +INSERT INTO `oa_city` VALUES (370304, '博山区', 3, 370300, ',370000,370300,370304,'); +INSERT INTO `oa_city` VALUES (370305, '临淄区', 3, 370300, ',370000,370300,370305,'); +INSERT INTO `oa_city` VALUES (370306, '周村区', 3, 370300, ',370000,370300,370306,'); +INSERT INTO `oa_city` VALUES (370321, '桓台县', 3, 370300, ',370000,370300,370321,'); +INSERT INTO `oa_city` VALUES (370322, '高青县', 3, 370300, ',370000,370300,370322,'); +INSERT INTO `oa_city` VALUES (370323, '沂源县', 3, 370300, ',370000,370300,370323,'); +INSERT INTO `oa_city` VALUES (370400, '枣庄市', 2, 370000, ',370000,370400,'); +INSERT INTO `oa_city` VALUES (370402, '市中区', 3, 370400, ',370000,370400,370402,'); +INSERT INTO `oa_city` VALUES (370403, '薛城区', 3, 370400, ',370000,370400,370403,'); +INSERT INTO `oa_city` VALUES (370404, '峄城区', 3, 370400, ',370000,370400,370404,'); +INSERT INTO `oa_city` VALUES (370405, '台儿庄区', 3, 370400, ',370000,370400,370405,'); +INSERT INTO `oa_city` VALUES (370406, '山亭区', 3, 370400, ',370000,370400,370406,'); +INSERT INTO `oa_city` VALUES (370481, '滕州市', 3, 370400, ',370000,370400,370481,'); +INSERT INTO `oa_city` VALUES (370500, '东营市', 2, 370000, ',370000,370500,'); +INSERT INTO `oa_city` VALUES (370502, '东营区', 3, 370500, ',370000,370500,370502,'); +INSERT INTO `oa_city` VALUES (370503, '河口区', 3, 370500, ',370000,370500,370503,'); +INSERT INTO `oa_city` VALUES (370521, '垦利县', 3, 370500, ',370000,370500,370521,'); +INSERT INTO `oa_city` VALUES (370522, '利津县', 3, 370500, ',370000,370500,370522,'); +INSERT INTO `oa_city` VALUES (370523, '广饶县', 3, 370500, ',370000,370500,370523,'); +INSERT INTO `oa_city` VALUES (370600, '烟台市', 2, 370000, ',370000,370600,'); +INSERT INTO `oa_city` VALUES (370602, '芝罘区', 3, 370600, ',370000,370600,370602,'); +INSERT INTO `oa_city` VALUES (370611, '福山区', 3, 370600, ',370000,370600,370611,'); +INSERT INTO `oa_city` VALUES (370612, '牟平区', 3, 370600, ',370000,370600,370612,'); +INSERT INTO `oa_city` VALUES (370613, '莱山区', 3, 370600, ',370000,370600,370613,'); +INSERT INTO `oa_city` VALUES (370634, '长岛县', 3, 370600, ',370000,370600,370634,'); +INSERT INTO `oa_city` VALUES (370681, '龙口市', 3, 370600, ',370000,370600,370681,'); +INSERT INTO `oa_city` VALUES (370682, '莱阳市', 3, 370600, ',370000,370600,370682,'); +INSERT INTO `oa_city` VALUES (370683, '莱州市', 3, 370600, ',370000,370600,370683,'); +INSERT INTO `oa_city` VALUES (370684, '蓬莱市', 3, 370600, ',370000,370600,370684,'); +INSERT INTO `oa_city` VALUES (370685, '招远市', 3, 370600, ',370000,370600,370685,'); +INSERT INTO `oa_city` VALUES (370686, '栖霞市', 3, 370600, ',370000,370600,370686,'); +INSERT INTO `oa_city` VALUES (370687, '海阳市', 3, 370600, ',370000,370600,370687,'); +INSERT INTO `oa_city` VALUES (370700, '潍坊市', 2, 370000, ',370000,370700,'); +INSERT INTO `oa_city` VALUES (370702, '潍城区', 3, 370700, ',370000,370700,370702,'); +INSERT INTO `oa_city` VALUES (370703, '寒亭区', 3, 370700, ',370000,370700,370703,'); +INSERT INTO `oa_city` VALUES (370704, '坊子区', 3, 370700, ',370000,370700,370704,'); +INSERT INTO `oa_city` VALUES (370705, '奎文区', 3, 370700, ',370000,370700,370705,'); +INSERT INTO `oa_city` VALUES (370724, '临朐县', 3, 370700, ',370000,370700,370724,'); +INSERT INTO `oa_city` VALUES (370725, '昌乐县', 3, 370700, ',370000,370700,370725,'); +INSERT INTO `oa_city` VALUES (370781, '青州市', 3, 370700, ',370000,370700,370781,'); +INSERT INTO `oa_city` VALUES (370782, '诸城市', 3, 370700, ',370000,370700,370782,'); +INSERT INTO `oa_city` VALUES (370783, '寿光市', 3, 370700, ',370000,370700,370783,'); +INSERT INTO `oa_city` VALUES (370784, '安丘市', 3, 370700, ',370000,370700,370784,'); +INSERT INTO `oa_city` VALUES (370785, '高密市', 3, 370700, ',370000,370700,370785,'); +INSERT INTO `oa_city` VALUES (370786, '昌邑市', 3, 370700, ',370000,370700,370786,'); +INSERT INTO `oa_city` VALUES (370800, '济宁市', 2, 370000, ',370000,370800,'); +INSERT INTO `oa_city` VALUES (370802, '市中区', 3, 370800, ',370000,370800,370802,'); +INSERT INTO `oa_city` VALUES (370811, '任城区', 3, 370800, ',370000,370800,370811,'); +INSERT INTO `oa_city` VALUES (370826, '微山县', 3, 370800, ',370000,370800,370826,'); +INSERT INTO `oa_city` VALUES (370827, '鱼台县', 3, 370800, ',370000,370800,370827,'); +INSERT INTO `oa_city` VALUES (370828, '金乡县', 3, 370800, ',370000,370800,370828,'); +INSERT INTO `oa_city` VALUES (370829, '嘉祥县', 3, 370800, ',370000,370800,370829,'); +INSERT INTO `oa_city` VALUES (370830, '汶上县', 3, 370800, ',370000,370800,370830,'); +INSERT INTO `oa_city` VALUES (370831, '泗水县', 3, 370800, ',370000,370800,370831,'); +INSERT INTO `oa_city` VALUES (370832, '梁山县', 3, 370800, ',370000,370800,370832,'); +INSERT INTO `oa_city` VALUES (370881, '曲阜市', 3, 370800, ',370000,370800,370881,'); +INSERT INTO `oa_city` VALUES (370882, '兖州市', 3, 370800, ',370000,370800,370882,'); +INSERT INTO `oa_city` VALUES (370883, '邹城市', 3, 370800, ',370000,370800,370883,'); +INSERT INTO `oa_city` VALUES (370900, '泰安市', 2, 370000, ',370000,370900,'); +INSERT INTO `oa_city` VALUES (370902, '泰山区', 3, 370900, ',370000,370900,370902,'); +INSERT INTO `oa_city` VALUES (370903, '岱岳区', 3, 370900, ',370000,370900,370903,'); +INSERT INTO `oa_city` VALUES (370921, '宁阳县', 3, 370900, ',370000,370900,370921,'); +INSERT INTO `oa_city` VALUES (370923, '东平县', 3, 370900, ',370000,370900,370923,'); +INSERT INTO `oa_city` VALUES (370982, '新泰市', 3, 370900, ',370000,370900,370982,'); +INSERT INTO `oa_city` VALUES (370983, '肥城市', 3, 370900, ',370000,370900,370983,'); +INSERT INTO `oa_city` VALUES (371000, '威海市', 2, 370000, ',370000,371000,'); +INSERT INTO `oa_city` VALUES (371002, '环翠区', 3, 371000, ',370000,371000,371002,'); +INSERT INTO `oa_city` VALUES (371081, '文登市', 3, 371000, ',370000,371000,371081,'); +INSERT INTO `oa_city` VALUES (371082, '荣成市', 3, 371000, ',370000,371000,371082,'); +INSERT INTO `oa_city` VALUES (371083, '乳山市', 3, 371000, ',370000,371000,371083,'); +INSERT INTO `oa_city` VALUES (371100, '日照市', 2, 370000, ',370000,371100,'); +INSERT INTO `oa_city` VALUES (371102, '东港区', 3, 371100, ',370000,371100,371102,'); +INSERT INTO `oa_city` VALUES (371103, '岚山区', 3, 371100, ',370000,371100,371103,'); +INSERT INTO `oa_city` VALUES (371121, '五莲县', 3, 371100, ',370000,371100,371121,'); +INSERT INTO `oa_city` VALUES (371122, '莒 县', 3, 371100, ',370000,371100,371122,'); +INSERT INTO `oa_city` VALUES (371200, '莱芜市', 2, 370000, ',370000,371200,'); +INSERT INTO `oa_city` VALUES (371202, '莱城区', 3, 371200, ',370000,371200,371202,'); +INSERT INTO `oa_city` VALUES (371203, '钢城区', 3, 371200, ',370000,371200,371203,'); +INSERT INTO `oa_city` VALUES (371300, '临沂市', 2, 370000, ',370000,371300,'); +INSERT INTO `oa_city` VALUES (371302, '兰山区', 3, 371300, ',370000,371300,371302,'); +INSERT INTO `oa_city` VALUES (371311, '罗庄区', 3, 371300, ',370000,371300,371311,'); +INSERT INTO `oa_city` VALUES (371312, '河东区', 3, 371300, ',370000,371300,371312,'); +INSERT INTO `oa_city` VALUES (371321, '沂南县', 3, 371300, ',370000,371300,371321,'); +INSERT INTO `oa_city` VALUES (371322, '郯城县', 3, 371300, ',370000,371300,371322,'); +INSERT INTO `oa_city` VALUES (371323, '沂水县', 3, 371300, ',370000,371300,371323,'); +INSERT INTO `oa_city` VALUES (371324, '苍山县', 3, 371300, ',370000,371300,371324,'); +INSERT INTO `oa_city` VALUES (371325, '费 县', 3, 371300, ',370000,371300,371325,'); +INSERT INTO `oa_city` VALUES (371326, '平邑县', 3, 371300, ',370000,371300,371326,'); +INSERT INTO `oa_city` VALUES (371327, '莒南县', 3, 371300, ',370000,371300,371327,'); +INSERT INTO `oa_city` VALUES (371328, '蒙阴县', 3, 371300, ',370000,371300,371328,'); +INSERT INTO `oa_city` VALUES (371329, '临沭县', 3, 371300, ',370000,371300,371329,'); +INSERT INTO `oa_city` VALUES (371400, '德州市', 2, 370000, ',370000,371400,'); +INSERT INTO `oa_city` VALUES (371402, '德城区', 3, 371400, ',370000,371400,371402,'); +INSERT INTO `oa_city` VALUES (371421, '陵 县', 3, 371400, ',370000,371400,371421,'); +INSERT INTO `oa_city` VALUES (371422, '宁津县', 3, 371400, ',370000,371400,371422,'); +INSERT INTO `oa_city` VALUES (371423, '庆云县', 3, 371400, ',370000,371400,371423,'); +INSERT INTO `oa_city` VALUES (371424, '临邑县', 3, 371400, ',370000,371400,371424,'); +INSERT INTO `oa_city` VALUES (371425, '齐河县', 3, 371400, ',370000,371400,371425,'); +INSERT INTO `oa_city` VALUES (371426, '平原县', 3, 371400, ',370000,371400,371426,'); +INSERT INTO `oa_city` VALUES (371427, '夏津县', 3, 371400, ',370000,371400,371427,'); +INSERT INTO `oa_city` VALUES (371428, '武城县', 3, 371400, ',370000,371400,371428,'); +INSERT INTO `oa_city` VALUES (371481, '乐陵市', 3, 371400, ',370000,371400,371481,'); +INSERT INTO `oa_city` VALUES (371482, '禹城市', 3, 371400, ',370000,371400,371482,'); +INSERT INTO `oa_city` VALUES (371500, '聊城市', 2, 370000, ',370000,371500,'); +INSERT INTO `oa_city` VALUES (371502, '东昌府区', 3, 371500, ',370000,371500,371502,'); +INSERT INTO `oa_city` VALUES (371521, '阳谷县', 3, 371500, ',370000,371500,371521,'); +INSERT INTO `oa_city` VALUES (371522, '莘 县', 3, 371500, ',370000,371500,371522,'); +INSERT INTO `oa_city` VALUES (371523, '茌平县', 3, 371500, ',370000,371500,371523,'); +INSERT INTO `oa_city` VALUES (371524, '东阿县', 3, 371500, ',370000,371500,371524,'); +INSERT INTO `oa_city` VALUES (371525, '冠 县', 3, 371500, ',370000,371500,371525,'); +INSERT INTO `oa_city` VALUES (371526, '高唐县', 3, 371500, ',370000,371500,371526,'); +INSERT INTO `oa_city` VALUES (371581, '临清市', 3, 371500, ',370000,371500,371581,'); +INSERT INTO `oa_city` VALUES (371600, '滨州市', 2, 370000, ',370000,371600,'); +INSERT INTO `oa_city` VALUES (371602, '滨城区', 3, 371600, ',370000,371600,371602,'); +INSERT INTO `oa_city` VALUES (371621, '惠民县', 3, 371600, ',370000,371600,371621,'); +INSERT INTO `oa_city` VALUES (371622, '阳信县', 3, 371600, ',370000,371600,371622,'); +INSERT INTO `oa_city` VALUES (371623, '无棣县', 3, 371600, ',370000,371600,371623,'); +INSERT INTO `oa_city` VALUES (371624, '沾化县', 3, 371600, ',370000,371600,371624,'); +INSERT INTO `oa_city` VALUES (371625, '博兴县', 3, 371600, ',370000,371600,371625,'); +INSERT INTO `oa_city` VALUES (371626, '邹平县', 3, 371600, ',370000,371600,371626,'); +INSERT INTO `oa_city` VALUES (371700, '菏泽市', 2, 370000, ',370000,371700,'); +INSERT INTO `oa_city` VALUES (371702, '牡丹区', 3, 371700, ',370000,371700,371702,'); +INSERT INTO `oa_city` VALUES (371721, '曹 县', 3, 371700, ',370000,371700,371721,'); +INSERT INTO `oa_city` VALUES (371722, '单 县', 3, 371700, ',370000,371700,371722,'); +INSERT INTO `oa_city` VALUES (371723, '成武县', 3, 371700, ',370000,371700,371723,'); +INSERT INTO `oa_city` VALUES (371724, '巨野县', 3, 371700, ',370000,371700,371724,'); +INSERT INTO `oa_city` VALUES (371725, '郓城县', 3, 371700, ',370000,371700,371725,'); +INSERT INTO `oa_city` VALUES (371726, '鄄城县', 3, 371700, ',370000,371700,371726,'); +INSERT INTO `oa_city` VALUES (371727, '定陶县', 3, 371700, ',370000,371700,371727,'); +INSERT INTO `oa_city` VALUES (371728, '东明县', 3, 371700, ',370000,371700,371728,'); +INSERT INTO `oa_city` VALUES (410000, '河南省', 1, 0, ',410000,'); +INSERT INTO `oa_city` VALUES (410100, '郑州市', 2, 410000, ',410000,410100,'); +INSERT INTO `oa_city` VALUES (410102, '中原区', 3, 410100, ',410000,410100,410102,'); +INSERT INTO `oa_city` VALUES (410103, '二七区', 3, 410100, ',410000,410100,410103,'); +INSERT INTO `oa_city` VALUES (410104, '管城回族区', 3, 410100, ',410000,410100,410104,'); +INSERT INTO `oa_city` VALUES (410105, '金水区', 3, 410100, ',410000,410100,410105,'); +INSERT INTO `oa_city` VALUES (410106, '上街区', 3, 410100, ',410000,410100,410106,'); +INSERT INTO `oa_city` VALUES (410108, '邙山区', 3, 410100, ',410000,410100,410108,'); +INSERT INTO `oa_city` VALUES (410122, '中牟县', 3, 410100, ',410000,410100,410122,'); +INSERT INTO `oa_city` VALUES (410181, '巩义市', 3, 410100, ',410000,410100,410181,'); +INSERT INTO `oa_city` VALUES (410182, '荥阳市', 3, 410100, ',410000,410100,410182,'); +INSERT INTO `oa_city` VALUES (410183, '新密市', 3, 410100, ',410000,410100,410183,'); +INSERT INTO `oa_city` VALUES (410184, '新郑市', 3, 410100, ',410000,410100,410184,'); +INSERT INTO `oa_city` VALUES (410185, '登封市', 3, 410100, ',410000,410100,410185,'); +INSERT INTO `oa_city` VALUES (410200, '开封市', 2, 410000, ',410000,410200,'); +INSERT INTO `oa_city` VALUES (410202, '龙亭区', 3, 410200, ',410000,410200,410202,'); +INSERT INTO `oa_city` VALUES (410203, '顺河回族区', 3, 410200, ',410000,410200,410203,'); +INSERT INTO `oa_city` VALUES (410204, '鼓楼区', 3, 410200, ',410000,410200,410204,'); +INSERT INTO `oa_city` VALUES (410205, '南关区', 3, 410200, ',410000,410200,410205,'); +INSERT INTO `oa_city` VALUES (410211, '郊 区', 3, 410200, ',410000,410200,410211,'); +INSERT INTO `oa_city` VALUES (410221, '杞 县', 3, 410200, ',410000,410200,410221,'); +INSERT INTO `oa_city` VALUES (410222, '通许县', 3, 410200, ',410000,410200,410222,'); +INSERT INTO `oa_city` VALUES (410223, '尉氏县', 3, 410200, ',410000,410200,410223,'); +INSERT INTO `oa_city` VALUES (410224, '开封县', 3, 410200, ',410000,410200,410224,'); +INSERT INTO `oa_city` VALUES (410225, '兰考县', 3, 410200, ',410000,410200,410225,'); +INSERT INTO `oa_city` VALUES (410300, '洛阳市', 2, 410000, ',410000,410300,'); +INSERT INTO `oa_city` VALUES (410302, '老城区', 3, 410300, ',410000,410300,410302,'); +INSERT INTO `oa_city` VALUES (410303, '西工区', 3, 410300, ',410000,410300,410303,'); +INSERT INTO `oa_city` VALUES (410304, '廛河回族区', 3, 410300, ',410000,410300,410304,'); +INSERT INTO `oa_city` VALUES (410305, '涧西区', 3, 410300, ',410000,410300,410305,'); +INSERT INTO `oa_city` VALUES (410306, '吉利区', 3, 410300, ',410000,410300,410306,'); +INSERT INTO `oa_city` VALUES (410307, '洛龙区', 3, 410300, ',410000,410300,410307,'); +INSERT INTO `oa_city` VALUES (410322, '孟津县', 3, 410300, ',410000,410300,410322,'); +INSERT INTO `oa_city` VALUES (410323, '新安县', 3, 410300, ',410000,410300,410323,'); +INSERT INTO `oa_city` VALUES (410324, '栾川县', 3, 410300, ',410000,410300,410324,'); +INSERT INTO `oa_city` VALUES (410325, '嵩 县', 3, 410300, ',410000,410300,410325,'); +INSERT INTO `oa_city` VALUES (410326, '汝阳县', 3, 410300, ',410000,410300,410326,'); +INSERT INTO `oa_city` VALUES (410327, '宜阳县', 3, 410300, ',410000,410300,410327,'); +INSERT INTO `oa_city` VALUES (410328, '洛宁县', 3, 410300, ',410000,410300,410328,'); +INSERT INTO `oa_city` VALUES (410329, '伊川县', 3, 410300, ',410000,410300,410329,'); +INSERT INTO `oa_city` VALUES (410381, '偃师市', 3, 410300, ',410000,410300,410381,'); +INSERT INTO `oa_city` VALUES (410400, '平顶山市', 2, 410000, ',410000,410400,'); +INSERT INTO `oa_city` VALUES (410402, '新华区', 3, 410400, ',410000,410400,410402,'); +INSERT INTO `oa_city` VALUES (410403, '卫东区', 3, 410400, ',410000,410400,410403,'); +INSERT INTO `oa_city` VALUES (410404, '石龙区', 3, 410400, ',410000,410400,410404,'); +INSERT INTO `oa_city` VALUES (410411, '湛河区', 3, 410400, ',410000,410400,410411,'); +INSERT INTO `oa_city` VALUES (410421, '宝丰县', 3, 410400, ',410000,410400,410421,'); +INSERT INTO `oa_city` VALUES (410422, '叶 县', 3, 410400, ',410000,410400,410422,'); +INSERT INTO `oa_city` VALUES (410423, '鲁山县', 3, 410400, ',410000,410400,410423,'); +INSERT INTO `oa_city` VALUES (410425, '郏 县', 3, 410400, ',410000,410400,410425,'); +INSERT INTO `oa_city` VALUES (410481, '舞钢市', 3, 410400, ',410000,410400,410481,'); +INSERT INTO `oa_city` VALUES (410482, '汝州市', 3, 410400, ',410000,410400,410482,'); +INSERT INTO `oa_city` VALUES (410500, '安阳市', 2, 410000, ',410000,410500,'); +INSERT INTO `oa_city` VALUES (410502, '文峰区', 3, 410500, ',410000,410500,410502,'); +INSERT INTO `oa_city` VALUES (410503, '北关区', 3, 410500, ',410000,410500,410503,'); +INSERT INTO `oa_city` VALUES (410505, '殷都区', 3, 410500, ',410000,410500,410505,'); +INSERT INTO `oa_city` VALUES (410506, '龙安区', 3, 410500, ',410000,410500,410506,'); +INSERT INTO `oa_city` VALUES (410522, '安阳县', 3, 410500, ',410000,410500,410522,'); +INSERT INTO `oa_city` VALUES (410523, '汤阴县', 3, 410500, ',410000,410500,410523,'); +INSERT INTO `oa_city` VALUES (410526, '滑 县', 3, 410500, ',410000,410500,410526,'); +INSERT INTO `oa_city` VALUES (410527, '内黄县', 3, 410500, ',410000,410500,410527,'); +INSERT INTO `oa_city` VALUES (410581, '林州市', 3, 410500, ',410000,410500,410581,'); +INSERT INTO `oa_city` VALUES (410600, '鹤壁市', 2, 410000, ',410000,410600,'); +INSERT INTO `oa_city` VALUES (410602, '鹤山区', 3, 410600, ',410000,410600,410602,'); +INSERT INTO `oa_city` VALUES (410603, '山城区', 3, 410600, ',410000,410600,410603,'); +INSERT INTO `oa_city` VALUES (410611, '淇滨区', 3, 410600, ',410000,410600,410611,'); +INSERT INTO `oa_city` VALUES (410621, '浚 县', 3, 410600, ',410000,410600,410621,'); +INSERT INTO `oa_city` VALUES (410622, '淇 县', 3, 410600, ',410000,410600,410622,'); +INSERT INTO `oa_city` VALUES (410700, '新乡市', 2, 410000, ',410000,410700,'); +INSERT INTO `oa_city` VALUES (410702, '红旗区', 3, 410700, ',410000,410700,410702,'); +INSERT INTO `oa_city` VALUES (410703, '卫滨区', 3, 410700, ',410000,410700,410703,'); +INSERT INTO `oa_city` VALUES (410704, '凤泉区', 3, 410700, ',410000,410700,410704,'); +INSERT INTO `oa_city` VALUES (410711, '牧野区', 3, 410700, ',410000,410700,410711,'); +INSERT INTO `oa_city` VALUES (410721, '新乡县', 3, 410700, ',410000,410700,410721,'); +INSERT INTO `oa_city` VALUES (410724, '获嘉县', 3, 410700, ',410000,410700,410724,'); +INSERT INTO `oa_city` VALUES (410725, '原阳县', 3, 410700, ',410000,410700,410725,'); +INSERT INTO `oa_city` VALUES (410726, '延津县', 3, 410700, ',410000,410700,410726,'); +INSERT INTO `oa_city` VALUES (410727, '封丘县', 3, 410700, ',410000,410700,410727,'); +INSERT INTO `oa_city` VALUES (410728, '长垣县', 3, 410700, ',410000,410700,410728,'); +INSERT INTO `oa_city` VALUES (410781, '卫辉市', 3, 410700, ',410000,410700,410781,'); +INSERT INTO `oa_city` VALUES (410782, '辉县市', 3, 410700, ',410000,410700,410782,'); +INSERT INTO `oa_city` VALUES (410800, '焦作市', 2, 410000, ',410000,410800,'); +INSERT INTO `oa_city` VALUES (410802, '解放区', 3, 410800, ',410000,410800,410802,'); +INSERT INTO `oa_city` VALUES (410803, '中站区', 3, 410800, ',410000,410800,410803,'); +INSERT INTO `oa_city` VALUES (410804, '马村区', 3, 410800, ',410000,410800,410804,'); +INSERT INTO `oa_city` VALUES (410811, '山阳区', 3, 410800, ',410000,410800,410811,'); +INSERT INTO `oa_city` VALUES (410821, '修武县', 3, 410800, ',410000,410800,410821,'); +INSERT INTO `oa_city` VALUES (410822, '博爱县', 3, 410800, ',410000,410800,410822,'); +INSERT INTO `oa_city` VALUES (410823, '武陟县', 3, 410800, ',410000,410800,410823,'); +INSERT INTO `oa_city` VALUES (410825, '温 县', 3, 410800, ',410000,410800,410825,'); +INSERT INTO `oa_city` VALUES (410881, '济源市', 3, 410800, ',410000,410800,410881,'); +INSERT INTO `oa_city` VALUES (410882, '沁阳市', 3, 410800, ',410000,410800,410882,'); +INSERT INTO `oa_city` VALUES (410883, '孟州市', 3, 410800, ',410000,410800,410883,'); +INSERT INTO `oa_city` VALUES (410900, '濮阳市', 2, 410000, ',410000,410900,'); +INSERT INTO `oa_city` VALUES (410902, '华龙区', 3, 410900, ',410000,410900,410902,'); +INSERT INTO `oa_city` VALUES (410922, '清丰县', 3, 410900, ',410000,410900,410922,'); +INSERT INTO `oa_city` VALUES (410923, '南乐县', 3, 410900, ',410000,410900,410923,'); +INSERT INTO `oa_city` VALUES (410926, '范 县', 3, 410900, ',410000,410900,410926,'); +INSERT INTO `oa_city` VALUES (410927, '台前县', 3, 410900, ',410000,410900,410927,'); +INSERT INTO `oa_city` VALUES (410928, '濮阳县', 3, 410900, ',410000,410900,410928,'); +INSERT INTO `oa_city` VALUES (411000, '许昌市', 2, 410000, ',410000,411000,'); +INSERT INTO `oa_city` VALUES (411002, '魏都区', 3, 411000, ',410000,411000,411002,'); +INSERT INTO `oa_city` VALUES (411023, '许昌县', 3, 411000, ',410000,411000,411023,'); +INSERT INTO `oa_city` VALUES (411024, '鄢陵县', 3, 411000, ',410000,411000,411024,'); +INSERT INTO `oa_city` VALUES (411025, '襄城县', 3, 411000, ',410000,411000,411025,'); +INSERT INTO `oa_city` VALUES (411081, '禹州市', 3, 411000, ',410000,411000,411081,'); +INSERT INTO `oa_city` VALUES (411082, '长葛市', 3, 411000, ',410000,411000,411082,'); +INSERT INTO `oa_city` VALUES (411100, '漯河市', 2, 410000, ',410000,411100,'); +INSERT INTO `oa_city` VALUES (411102, '源汇区', 3, 411100, ',410000,411100,411102,'); +INSERT INTO `oa_city` VALUES (411103, '郾城区', 3, 411100, ',410000,411100,411103,'); +INSERT INTO `oa_city` VALUES (411104, '召陵区', 3, 411100, ',410000,411100,411104,'); +INSERT INTO `oa_city` VALUES (411121, '舞阳县', 3, 411100, ',410000,411100,411121,'); +INSERT INTO `oa_city` VALUES (411122, '临颍县', 3, 411100, ',410000,411100,411122,'); +INSERT INTO `oa_city` VALUES (411200, '三门峡市', 2, 410000, ',410000,411200,'); +INSERT INTO `oa_city` VALUES (411202, '湖滨区', 3, 411200, ',410000,411200,411202,'); +INSERT INTO `oa_city` VALUES (411221, '渑池县', 3, 411200, ',410000,411200,411221,'); +INSERT INTO `oa_city` VALUES (411222, '陕 县', 3, 411200, ',410000,411200,411222,'); +INSERT INTO `oa_city` VALUES (411224, '卢氏县', 3, 411200, ',410000,411200,411224,'); +INSERT INTO `oa_city` VALUES (411281, '义马市', 3, 411200, ',410000,411200,411281,'); +INSERT INTO `oa_city` VALUES (411282, '灵宝市', 3, 411200, ',410000,411200,411282,'); +INSERT INTO `oa_city` VALUES (411300, '南阳市', 2, 410000, ',410000,411300,'); +INSERT INTO `oa_city` VALUES (411302, '宛城区', 3, 411300, ',410000,411300,411302,'); +INSERT INTO `oa_city` VALUES (411303, '卧龙区', 3, 411300, ',410000,411300,411303,'); +INSERT INTO `oa_city` VALUES (411321, '南召县', 3, 411300, ',410000,411300,411321,'); +INSERT INTO `oa_city` VALUES (411322, '方城县', 3, 411300, ',410000,411300,411322,'); +INSERT INTO `oa_city` VALUES (411323, '西峡县', 3, 411300, ',410000,411300,411323,'); +INSERT INTO `oa_city` VALUES (411324, '镇平县', 3, 411300, ',410000,411300,411324,'); +INSERT INTO `oa_city` VALUES (411325, '内乡县', 3, 411300, ',410000,411300,411325,'); +INSERT INTO `oa_city` VALUES (411326, '淅川县', 3, 411300, ',410000,411300,411326,'); +INSERT INTO `oa_city` VALUES (411327, '社旗县', 3, 411300, ',410000,411300,411327,'); +INSERT INTO `oa_city` VALUES (411328, '唐河县', 3, 411300, ',410000,411300,411328,'); +INSERT INTO `oa_city` VALUES (411329, '新野县', 3, 411300, ',410000,411300,411329,'); +INSERT INTO `oa_city` VALUES (411330, '桐柏县', 3, 411300, ',410000,411300,411330,'); +INSERT INTO `oa_city` VALUES (411381, '邓州市', 3, 411300, ',410000,411300,411381,'); +INSERT INTO `oa_city` VALUES (411400, '商丘市', 2, 410000, ',410000,411400,'); +INSERT INTO `oa_city` VALUES (411402, '梁园区', 3, 411400, ',410000,411400,411402,'); +INSERT INTO `oa_city` VALUES (411403, '睢阳区', 3, 411400, ',410000,411400,411403,'); +INSERT INTO `oa_city` VALUES (411421, '民权县', 3, 411400, ',410000,411400,411421,'); +INSERT INTO `oa_city` VALUES (411422, '睢 县', 3, 411400, ',410000,411400,411422,'); +INSERT INTO `oa_city` VALUES (411423, '宁陵县', 3, 411400, ',410000,411400,411423,'); +INSERT INTO `oa_city` VALUES (411424, '柘城县', 3, 411400, ',410000,411400,411424,'); +INSERT INTO `oa_city` VALUES (411425, '虞城县', 3, 411400, ',410000,411400,411425,'); +INSERT INTO `oa_city` VALUES (411426, '夏邑县', 3, 411400, ',410000,411400,411426,'); +INSERT INTO `oa_city` VALUES (411481, '永城市', 3, 411400, ',410000,411400,411481,'); +INSERT INTO `oa_city` VALUES (411500, '信阳市', 2, 410000, ',410000,411500,'); +INSERT INTO `oa_city` VALUES (411502, '师河区', 3, 411500, ',410000,411500,411502,'); +INSERT INTO `oa_city` VALUES (411503, '平桥区', 3, 411500, ',410000,411500,411503,'); +INSERT INTO `oa_city` VALUES (411521, '罗山县', 3, 411500, ',410000,411500,411521,'); +INSERT INTO `oa_city` VALUES (411522, '光山县', 3, 411500, ',410000,411500,411522,'); +INSERT INTO `oa_city` VALUES (411523, '新 县', 3, 411500, ',410000,411500,411523,'); +INSERT INTO `oa_city` VALUES (411524, '商城县', 3, 411500, ',410000,411500,411524,'); +INSERT INTO `oa_city` VALUES (411525, '固始县', 3, 411500, ',410000,411500,411525,'); +INSERT INTO `oa_city` VALUES (411526, '潢川县', 3, 411500, ',410000,411500,411526,'); +INSERT INTO `oa_city` VALUES (411527, '淮滨县', 3, 411500, ',410000,411500,411527,'); +INSERT INTO `oa_city` VALUES (411528, '息 县', 3, 411500, ',410000,411500,411528,'); +INSERT INTO `oa_city` VALUES (411600, '周口市', 2, 410000, ',410000,411600,'); +INSERT INTO `oa_city` VALUES (411602, '川汇区', 3, 411600, ',410000,411600,411602,'); +INSERT INTO `oa_city` VALUES (411621, '扶沟县', 3, 411600, ',410000,411600,411621,'); +INSERT INTO `oa_city` VALUES (411622, '西华县', 3, 411600, ',410000,411600,411622,'); +INSERT INTO `oa_city` VALUES (411623, '商水县', 3, 411600, ',410000,411600,411623,'); +INSERT INTO `oa_city` VALUES (411624, '沈丘县', 3, 411600, ',410000,411600,411624,'); +INSERT INTO `oa_city` VALUES (411625, '郸城县', 3, 411600, ',410000,411600,411625,'); +INSERT INTO `oa_city` VALUES (411626, '淮阳县', 3, 411600, ',410000,411600,411626,'); +INSERT INTO `oa_city` VALUES (411627, '太康县', 3, 411600, ',410000,411600,411627,'); +INSERT INTO `oa_city` VALUES (411628, '鹿邑县', 3, 411600, ',410000,411600,411628,'); +INSERT INTO `oa_city` VALUES (411681, '项城市', 3, 411600, ',410000,411600,411681,'); +INSERT INTO `oa_city` VALUES (411700, '驻马店市', 2, 410000, ',410000,411700,'); +INSERT INTO `oa_city` VALUES (411702, '驿城区', 3, 411700, ',410000,411700,411702,'); +INSERT INTO `oa_city` VALUES (411721, '西平县', 3, 411700, ',410000,411700,411721,'); +INSERT INTO `oa_city` VALUES (411722, '上蔡县', 3, 411700, ',410000,411700,411722,'); +INSERT INTO `oa_city` VALUES (411723, '平舆县', 3, 411700, ',410000,411700,411723,'); +INSERT INTO `oa_city` VALUES (411724, '正阳县', 3, 411700, ',410000,411700,411724,'); +INSERT INTO `oa_city` VALUES (411725, '确山县', 3, 411700, ',410000,411700,411725,'); +INSERT INTO `oa_city` VALUES (411726, '泌阳县', 3, 411700, ',410000,411700,411726,'); +INSERT INTO `oa_city` VALUES (411727, '汝南县', 3, 411700, ',410000,411700,411727,'); +INSERT INTO `oa_city` VALUES (411728, '遂平县', 3, 411700, ',410000,411700,411728,'); +INSERT INTO `oa_city` VALUES (411729, '新蔡县', 3, 411700, ',410000,411700,411729,'); +INSERT INTO `oa_city` VALUES (420000, '湖北省', 1, 0, ',420000,'); +INSERT INTO `oa_city` VALUES (420100, '武汉市', 2, 420000, ',420000,420100,'); +INSERT INTO `oa_city` VALUES (420102, '江岸区', 3, 420100, ',420000,420100,420102,'); +INSERT INTO `oa_city` VALUES (420103, '江汉区', 3, 420100, ',420000,420100,420103,'); +INSERT INTO `oa_city` VALUES (420104, '乔口区', 3, 420100, ',420000,420100,420104,'); +INSERT INTO `oa_city` VALUES (420105, '汉阳区', 3, 420100, ',420000,420100,420105,'); +INSERT INTO `oa_city` VALUES (420106, '武昌区', 3, 420100, ',420000,420100,420106,'); +INSERT INTO `oa_city` VALUES (420107, '青山区', 3, 420100, ',420000,420100,420107,'); +INSERT INTO `oa_city` VALUES (420111, '洪山区', 3, 420100, ',420000,420100,420111,'); +INSERT INTO `oa_city` VALUES (420112, '东西湖区', 3, 420100, ',420000,420100,420112,'); +INSERT INTO `oa_city` VALUES (420113, '汉南区', 3, 420100, ',420000,420100,420113,'); +INSERT INTO `oa_city` VALUES (420114, '蔡甸区', 3, 420100, ',420000,420100,420114,'); +INSERT INTO `oa_city` VALUES (420115, '江夏区', 3, 420100, ',420000,420100,420115,'); +INSERT INTO `oa_city` VALUES (420116, '黄陂区', 3, 420100, ',420000,420100,420116,'); +INSERT INTO `oa_city` VALUES (420117, '新洲区', 3, 420100, ',420000,420100,420117,'); +INSERT INTO `oa_city` VALUES (420200, '黄石市', 2, 420000, ',420000,420200,'); +INSERT INTO `oa_city` VALUES (420202, '黄石港区', 3, 420200, ',420000,420200,420202,'); +INSERT INTO `oa_city` VALUES (420203, '西塞山区', 3, 420200, ',420000,420200,420203,'); +INSERT INTO `oa_city` VALUES (420204, '下陆区', 3, 420200, ',420000,420200,420204,'); +INSERT INTO `oa_city` VALUES (420205, '铁山区', 3, 420200, ',420000,420200,420205,'); +INSERT INTO `oa_city` VALUES (420222, '阳新县', 3, 420200, ',420000,420200,420222,'); +INSERT INTO `oa_city` VALUES (420281, '大冶市', 3, 420200, ',420000,420200,420281,'); +INSERT INTO `oa_city` VALUES (420300, '十堰市', 2, 420000, ',420000,420300,'); +INSERT INTO `oa_city` VALUES (420302, '茅箭区', 3, 420300, ',420000,420300,420302,'); +INSERT INTO `oa_city` VALUES (420303, '张湾区', 3, 420300, ',420000,420300,420303,'); +INSERT INTO `oa_city` VALUES (420321, '郧 县', 3, 420300, ',420000,420300,420321,'); +INSERT INTO `oa_city` VALUES (420322, '郧西县', 3, 420300, ',420000,420300,420322,'); +INSERT INTO `oa_city` VALUES (420323, '竹山县', 3, 420300, ',420000,420300,420323,'); +INSERT INTO `oa_city` VALUES (420324, '竹溪县', 3, 420300, ',420000,420300,420324,'); +INSERT INTO `oa_city` VALUES (420325, '房 县', 3, 420300, ',420000,420300,420325,'); +INSERT INTO `oa_city` VALUES (420381, '丹江口市', 3, 420300, ',420000,420300,420381,'); +INSERT INTO `oa_city` VALUES (420500, '宜昌市', 2, 420000, ',420000,420500,'); +INSERT INTO `oa_city` VALUES (420502, '西陵区', 3, 420500, ',420000,420500,420502,'); +INSERT INTO `oa_city` VALUES (420503, '伍家岗区', 3, 420500, ',420000,420500,420503,'); +INSERT INTO `oa_city` VALUES (420504, '点军区', 3, 420500, ',420000,420500,420504,'); +INSERT INTO `oa_city` VALUES (420505, '猇亭区', 3, 420500, ',420000,420500,420505,'); +INSERT INTO `oa_city` VALUES (420506, '夷陵区', 3, 420500, ',420000,420500,420506,'); +INSERT INTO `oa_city` VALUES (420525, '远安县', 3, 420500, ',420000,420500,420525,'); +INSERT INTO `oa_city` VALUES (420526, '兴山县', 3, 420500, ',420000,420500,420526,'); +INSERT INTO `oa_city` VALUES (420527, '秭归县', 3, 420500, ',420000,420500,420527,'); +INSERT INTO `oa_city` VALUES (420528, '长阳土家族自治县', 3, 420500, ',420000,420500,420528,'); +INSERT INTO `oa_city` VALUES (420529, '五峰土家族自治县', 3, 420500, ',420000,420500,420529,'); +INSERT INTO `oa_city` VALUES (420581, '宜都市', 3, 420500, ',420000,420500,420581,'); +INSERT INTO `oa_city` VALUES (420582, '当阳市', 3, 420500, ',420000,420500,420582,'); +INSERT INTO `oa_city` VALUES (420583, '枝江市', 3, 420500, ',420000,420500,420583,'); +INSERT INTO `oa_city` VALUES (420600, '襄樊市', 2, 420000, ',420000,420600,'); +INSERT INTO `oa_city` VALUES (420602, '襄城区', 3, 420600, ',420000,420600,420602,'); +INSERT INTO `oa_city` VALUES (420606, '樊城区', 3, 420600, ',420000,420600,420606,'); +INSERT INTO `oa_city` VALUES (420607, '襄阳区', 3, 420600, ',420000,420600,420607,'); +INSERT INTO `oa_city` VALUES (420624, '南漳县', 3, 420600, ',420000,420600,420624,'); +INSERT INTO `oa_city` VALUES (420625, '谷城县', 3, 420600, ',420000,420600,420625,'); +INSERT INTO `oa_city` VALUES (420626, '保康县', 3, 420600, ',420000,420600,420626,'); +INSERT INTO `oa_city` VALUES (420682, '老河口市', 3, 420600, ',420000,420600,420682,'); +INSERT INTO `oa_city` VALUES (420683, '枣阳市', 3, 420600, ',420000,420600,420683,'); +INSERT INTO `oa_city` VALUES (420684, '宜城市', 3, 420600, ',420000,420600,420684,'); +INSERT INTO `oa_city` VALUES (420700, '鄂州市', 2, 420000, ',420000,420700,'); +INSERT INTO `oa_city` VALUES (420702, '梁子湖区', 3, 420700, ',420000,420700,420702,'); +INSERT INTO `oa_city` VALUES (420703, '华容区', 3, 420700, ',420000,420700,420703,'); +INSERT INTO `oa_city` VALUES (420704, '鄂城区', 3, 420700, ',420000,420700,420704,'); +INSERT INTO `oa_city` VALUES (420800, '荆门市', 2, 420000, ',420000,420800,'); +INSERT INTO `oa_city` VALUES (420802, '东宝区', 3, 420800, ',420000,420800,420802,'); +INSERT INTO `oa_city` VALUES (420804, '掇刀区', 3, 420800, ',420000,420800,420804,'); +INSERT INTO `oa_city` VALUES (420821, '京山县', 3, 420800, ',420000,420800,420821,'); +INSERT INTO `oa_city` VALUES (420822, '沙洋县', 3, 420800, ',420000,420800,420822,'); +INSERT INTO `oa_city` VALUES (420881, '钟祥市', 3, 420800, ',420000,420800,420881,'); +INSERT INTO `oa_city` VALUES (420900, '孝感市', 2, 420000, ',420000,420900,'); +INSERT INTO `oa_city` VALUES (420902, '孝南区', 3, 420900, ',420000,420900,420902,'); +INSERT INTO `oa_city` VALUES (420921, '孝昌县', 3, 420900, ',420000,420900,420921,'); +INSERT INTO `oa_city` VALUES (420922, '大悟县', 3, 420900, ',420000,420900,420922,'); +INSERT INTO `oa_city` VALUES (420923, '云梦县', 3, 420900, ',420000,420900,420923,'); +INSERT INTO `oa_city` VALUES (420981, '应城市', 3, 420900, ',420000,420900,420981,'); +INSERT INTO `oa_city` VALUES (420982, '安陆市', 3, 420900, ',420000,420900,420982,'); +INSERT INTO `oa_city` VALUES (420984, '汉川市', 3, 420900, ',420000,420900,420984,'); +INSERT INTO `oa_city` VALUES (421000, '荆州市', 2, 420000, ',420000,421000,'); +INSERT INTO `oa_city` VALUES (421002, '沙市区', 3, 421000, ',420000,421000,421002,'); +INSERT INTO `oa_city` VALUES (421003, '荆州区', 3, 421000, ',420000,421000,421003,'); +INSERT INTO `oa_city` VALUES (421022, '公安县', 3, 421000, ',420000,421000,421022,'); +INSERT INTO `oa_city` VALUES (421023, '监利县', 3, 421000, ',420000,421000,421023,'); +INSERT INTO `oa_city` VALUES (421024, '江陵县', 3, 421000, ',420000,421000,421024,'); +INSERT INTO `oa_city` VALUES (421081, '石首市', 3, 421000, ',420000,421000,421081,'); +INSERT INTO `oa_city` VALUES (421083, '洪湖市', 3, 421000, ',420000,421000,421083,'); +INSERT INTO `oa_city` VALUES (421087, '松滋市', 3, 421000, ',420000,421000,421087,'); +INSERT INTO `oa_city` VALUES (421100, '黄冈市', 2, 420000, ',420000,421100,'); +INSERT INTO `oa_city` VALUES (421102, '黄州区', 3, 421100, ',420000,421100,421102,'); +INSERT INTO `oa_city` VALUES (421121, '团风县', 3, 421100, ',420000,421100,421121,'); +INSERT INTO `oa_city` VALUES (421122, '红安县', 3, 421100, ',420000,421100,421122,'); +INSERT INTO `oa_city` VALUES (421123, '罗田县', 3, 421100, ',420000,421100,421123,'); +INSERT INTO `oa_city` VALUES (421124, '英山县', 3, 421100, ',420000,421100,421124,'); +INSERT INTO `oa_city` VALUES (421125, '浠水县', 3, 421100, ',420000,421100,421125,'); +INSERT INTO `oa_city` VALUES (421126, '蕲春县', 3, 421100, ',420000,421100,421126,'); +INSERT INTO `oa_city` VALUES (421127, '黄梅县', 3, 421100, ',420000,421100,421127,'); +INSERT INTO `oa_city` VALUES (421181, '麻城市', 3, 421100, ',420000,421100,421181,'); +INSERT INTO `oa_city` VALUES (421182, '武穴市', 3, 421100, ',420000,421100,421182,'); +INSERT INTO `oa_city` VALUES (421200, '咸宁市', 2, 420000, ',420000,421200,'); +INSERT INTO `oa_city` VALUES (421202, '咸安区', 3, 421200, ',420000,421200,421202,'); +INSERT INTO `oa_city` VALUES (421221, '嘉鱼县', 3, 421200, ',420000,421200,421221,'); +INSERT INTO `oa_city` VALUES (421222, '通城县', 3, 421200, ',420000,421200,421222,'); +INSERT INTO `oa_city` VALUES (421223, '崇阳县', 3, 421200, ',420000,421200,421223,'); +INSERT INTO `oa_city` VALUES (421224, '通山县', 3, 421200, ',420000,421200,421224,'); +INSERT INTO `oa_city` VALUES (421281, '赤壁市', 3, 421200, ',420000,421200,421281,'); +INSERT INTO `oa_city` VALUES (421300, '随州市', 2, 420000, ',420000,421300,'); +INSERT INTO `oa_city` VALUES (421302, '曾都区', 3, 421300, ',420000,421300,421302,'); +INSERT INTO `oa_city` VALUES (421381, '广水市', 3, 421300, ',420000,421300,421381,'); +INSERT INTO `oa_city` VALUES (422800, '恩施土家族苗族自治州', 2, 420000, ',420000,422800,'); +INSERT INTO `oa_city` VALUES (422801, '恩施市', 3, 422800, ',420000,422800,422801,'); +INSERT INTO `oa_city` VALUES (422802, '利川市', 3, 422800, ',420000,422800,422802,'); +INSERT INTO `oa_city` VALUES (422822, '建始县', 3, 422800, ',420000,422800,422822,'); +INSERT INTO `oa_city` VALUES (422823, '巴东县', 3, 422800, ',420000,422800,422823,'); +INSERT INTO `oa_city` VALUES (422825, '宣恩县', 3, 422800, ',420000,422800,422825,'); +INSERT INTO `oa_city` VALUES (422826, '咸丰县', 3, 422800, ',420000,422800,422826,'); +INSERT INTO `oa_city` VALUES (422827, '来凤县', 3, 422800, ',420000,422800,422827,'); +INSERT INTO `oa_city` VALUES (422828, '鹤峰县', 3, 422800, ',420000,422800,422828,'); +INSERT INTO `oa_city` VALUES (429004, '仙桃市', 2, 420000, ',420000,429004,'); +INSERT INTO `oa_city` VALUES (429005, '潜江市', 2, 420000, ',420000,429005,'); +INSERT INTO `oa_city` VALUES (429006, '天门市', 2, 420000, ',420000,429006,'); +INSERT INTO `oa_city` VALUES (429021, '神农架林区', 2, 420000, ',420000,429021,'); +INSERT INTO `oa_city` VALUES (430000, '湖南省', 1, 0, ',430000,'); +INSERT INTO `oa_city` VALUES (430100, '长沙市', 2, 430000, ',430000,430100,'); +INSERT INTO `oa_city` VALUES (430102, '芙蓉区', 3, 430100, ',430000,430100,430102,'); +INSERT INTO `oa_city` VALUES (430103, '天心区', 3, 430100, ',430000,430100,430103,'); +INSERT INTO `oa_city` VALUES (430104, '岳麓区', 3, 430100, ',430000,430100,430104,'); +INSERT INTO `oa_city` VALUES (430105, '开福区', 3, 430100, ',430000,430100,430105,'); +INSERT INTO `oa_city` VALUES (430111, '雨花区', 3, 430100, ',430000,430100,430111,'); +INSERT INTO `oa_city` VALUES (430121, '长沙县', 3, 430100, ',430000,430100,430121,'); +INSERT INTO `oa_city` VALUES (430122, '望城县', 3, 430100, ',430000,430100,430122,'); +INSERT INTO `oa_city` VALUES (430124, '宁乡县', 3, 430100, ',430000,430100,430124,'); +INSERT INTO `oa_city` VALUES (430181, '浏阳市', 3, 430100, ',430000,430100,430181,'); +INSERT INTO `oa_city` VALUES (430200, '株洲市', 2, 430000, ',430000,430200,'); +INSERT INTO `oa_city` VALUES (430202, '荷塘区', 3, 430200, ',430000,430200,430202,'); +INSERT INTO `oa_city` VALUES (430203, '芦淞区', 3, 430200, ',430000,430200,430203,'); +INSERT INTO `oa_city` VALUES (430204, '石峰区', 3, 430200, ',430000,430200,430204,'); +INSERT INTO `oa_city` VALUES (430211, '天元区', 3, 430200, ',430000,430200,430211,'); +INSERT INTO `oa_city` VALUES (430221, '株洲县', 3, 430200, ',430000,430200,430221,'); +INSERT INTO `oa_city` VALUES (430223, '攸 县', 3, 430200, ',430000,430200,430223,'); +INSERT INTO `oa_city` VALUES (430224, '茶陵县', 3, 430200, ',430000,430200,430224,'); +INSERT INTO `oa_city` VALUES (430225, '炎陵县', 3, 430200, ',430000,430200,430225,'); +INSERT INTO `oa_city` VALUES (430281, '醴陵市', 3, 430200, ',430000,430200,430281,'); +INSERT INTO `oa_city` VALUES (430300, '湘潭市', 2, 430000, ',430000,430300,'); +INSERT INTO `oa_city` VALUES (430302, '雨湖区', 3, 430300, ',430000,430300,430302,'); +INSERT INTO `oa_city` VALUES (430304, '岳塘区', 3, 430300, ',430000,430300,430304,'); +INSERT INTO `oa_city` VALUES (430321, '湘潭县', 3, 430300, ',430000,430300,430321,'); +INSERT INTO `oa_city` VALUES (430381, '湘乡市', 3, 430300, ',430000,430300,430381,'); +INSERT INTO `oa_city` VALUES (430382, '韶山市', 3, 430300, ',430000,430300,430382,'); +INSERT INTO `oa_city` VALUES (430400, '衡阳市', 2, 430000, ',430000,430400,'); +INSERT INTO `oa_city` VALUES (430405, '珠晖区', 3, 430400, ',430000,430400,430405,'); +INSERT INTO `oa_city` VALUES (430406, '雁峰区', 3, 430400, ',430000,430400,430406,'); +INSERT INTO `oa_city` VALUES (430407, '石鼓区', 3, 430400, ',430000,430400,430407,'); +INSERT INTO `oa_city` VALUES (430408, '蒸湘区', 3, 430400, ',430000,430400,430408,'); +INSERT INTO `oa_city` VALUES (430412, '南岳区', 3, 430400, ',430000,430400,430412,'); +INSERT INTO `oa_city` VALUES (430421, '衡阳县', 3, 430400, ',430000,430400,430421,'); +INSERT INTO `oa_city` VALUES (430422, '衡南县', 3, 430400, ',430000,430400,430422,'); +INSERT INTO `oa_city` VALUES (430423, '衡山县', 3, 430400, ',430000,430400,430423,'); +INSERT INTO `oa_city` VALUES (430424, '衡东县', 3, 430400, ',430000,430400,430424,'); +INSERT INTO `oa_city` VALUES (430426, '祁东县', 3, 430400, ',430000,430400,430426,'); +INSERT INTO `oa_city` VALUES (430481, '耒阳市', 3, 430400, ',430000,430400,430481,'); +INSERT INTO `oa_city` VALUES (430482, '常宁市', 3, 430400, ',430000,430400,430482,'); +INSERT INTO `oa_city` VALUES (430500, '邵阳市', 2, 430000, ',430000,430500,'); +INSERT INTO `oa_city` VALUES (430502, '双清区', 3, 430500, ',430000,430500,430502,'); +INSERT INTO `oa_city` VALUES (430503, '大祥区', 3, 430500, ',430000,430500,430503,'); +INSERT INTO `oa_city` VALUES (430511, '北塔区', 3, 430500, ',430000,430500,430511,'); +INSERT INTO `oa_city` VALUES (430521, '邵东县', 3, 430500, ',430000,430500,430521,'); +INSERT INTO `oa_city` VALUES (430522, '新邵县', 3, 430500, ',430000,430500,430522,'); +INSERT INTO `oa_city` VALUES (430523, '邵阳县', 3, 430500, ',430000,430500,430523,'); +INSERT INTO `oa_city` VALUES (430524, '隆回县', 3, 430500, ',430000,430500,430524,'); +INSERT INTO `oa_city` VALUES (430525, '洞口县', 3, 430500, ',430000,430500,430525,'); +INSERT INTO `oa_city` VALUES (430527, '绥宁县', 3, 430500, ',430000,430500,430527,'); +INSERT INTO `oa_city` VALUES (430528, '新宁县', 3, 430500, ',430000,430500,430528,'); +INSERT INTO `oa_city` VALUES (430529, '城步苗族自治县', 3, 430500, ',430000,430500,430529,'); +INSERT INTO `oa_city` VALUES (430581, '武冈市', 3, 430500, ',430000,430500,430581,'); +INSERT INTO `oa_city` VALUES (430600, '岳阳市', 2, 430000, ',430000,430600,'); +INSERT INTO `oa_city` VALUES (430602, '岳阳楼区', 3, 430600, ',430000,430600,430602,'); +INSERT INTO `oa_city` VALUES (430603, '云溪区', 3, 430600, ',430000,430600,430603,'); +INSERT INTO `oa_city` VALUES (430611, '君山区', 3, 430600, ',430000,430600,430611,'); +INSERT INTO `oa_city` VALUES (430621, '岳阳县', 3, 430600, ',430000,430600,430621,'); +INSERT INTO `oa_city` VALUES (430623, '华容县', 3, 430600, ',430000,430600,430623,'); +INSERT INTO `oa_city` VALUES (430624, '湘阴县', 3, 430600, ',430000,430600,430624,'); +INSERT INTO `oa_city` VALUES (430626, '平江县', 3, 430600, ',430000,430600,430626,'); +INSERT INTO `oa_city` VALUES (430681, '汨罗市', 3, 430600, ',430000,430600,430681,'); +INSERT INTO `oa_city` VALUES (430682, '临湘市', 3, 430600, ',430000,430600,430682,'); +INSERT INTO `oa_city` VALUES (430700, '常德市', 2, 430000, ',430000,430700,'); +INSERT INTO `oa_city` VALUES (430702, '武陵区', 3, 430700, ',430000,430700,430702,'); +INSERT INTO `oa_city` VALUES (430703, '鼎城区', 3, 430700, ',430000,430700,430703,'); +INSERT INTO `oa_city` VALUES (430721, '安乡县', 3, 430700, ',430000,430700,430721,'); +INSERT INTO `oa_city` VALUES (430722, '汉寿县', 3, 430700, ',430000,430700,430722,'); +INSERT INTO `oa_city` VALUES (430723, '澧 县', 3, 430700, ',430000,430700,430723,'); +INSERT INTO `oa_city` VALUES (430724, '临澧县', 3, 430700, ',430000,430700,430724,'); +INSERT INTO `oa_city` VALUES (430725, '桃源县', 3, 430700, ',430000,430700,430725,'); +INSERT INTO `oa_city` VALUES (430726, '石门县', 3, 430700, ',430000,430700,430726,'); +INSERT INTO `oa_city` VALUES (430781, '津市市', 3, 430700, ',430000,430700,430781,'); +INSERT INTO `oa_city` VALUES (430800, '张家界市', 2, 430000, ',430000,430800,'); +INSERT INTO `oa_city` VALUES (430802, '永定区', 3, 430800, ',430000,430800,430802,'); +INSERT INTO `oa_city` VALUES (430811, '武陵源区', 3, 430800, ',430000,430800,430811,'); +INSERT INTO `oa_city` VALUES (430821, '慈利县', 3, 430800, ',430000,430800,430821,'); +INSERT INTO `oa_city` VALUES (430822, '桑植县', 3, 430800, ',430000,430800,430822,'); +INSERT INTO `oa_city` VALUES (430900, '益阳市', 2, 430000, ',430000,430900,'); +INSERT INTO `oa_city` VALUES (430902, '资阳区', 3, 430900, ',430000,430900,430902,'); +INSERT INTO `oa_city` VALUES (430903, '赫山区', 3, 430900, ',430000,430900,430903,'); +INSERT INTO `oa_city` VALUES (430921, '南 县', 3, 430900, ',430000,430900,430921,'); +INSERT INTO `oa_city` VALUES (430922, '桃江县', 3, 430900, ',430000,430900,430922,'); +INSERT INTO `oa_city` VALUES (430923, '安化县', 3, 430900, ',430000,430900,430923,'); +INSERT INTO `oa_city` VALUES (430981, '沅江市', 3, 430900, ',430000,430900,430981,'); +INSERT INTO `oa_city` VALUES (431000, '郴州市', 2, 430000, ',430000,431000,'); +INSERT INTO `oa_city` VALUES (431002, '北湖区', 3, 431000, ',430000,431000,431002,'); +INSERT INTO `oa_city` VALUES (431003, '苏仙区', 3, 431000, ',430000,431000,431003,'); +INSERT INTO `oa_city` VALUES (431021, '桂阳县', 3, 431000, ',430000,431000,431021,'); +INSERT INTO `oa_city` VALUES (431022, '宜章县', 3, 431000, ',430000,431000,431022,'); +INSERT INTO `oa_city` VALUES (431023, '永兴县', 3, 431000, ',430000,431000,431023,'); +INSERT INTO `oa_city` VALUES (431024, '嘉禾县', 3, 431000, ',430000,431000,431024,'); +INSERT INTO `oa_city` VALUES (431025, '临武县', 3, 431000, ',430000,431000,431025,'); +INSERT INTO `oa_city` VALUES (431026, '汝城县', 3, 431000, ',430000,431000,431026,'); +INSERT INTO `oa_city` VALUES (431027, '桂东县', 3, 431000, ',430000,431000,431027,'); +INSERT INTO `oa_city` VALUES (431028, '安仁县', 3, 431000, ',430000,431000,431028,'); +INSERT INTO `oa_city` VALUES (431081, '资兴市', 3, 431000, ',430000,431000,431081,'); +INSERT INTO `oa_city` VALUES (431100, '永州市', 2, 430000, ',430000,431100,'); +INSERT INTO `oa_city` VALUES (431102, '芝山区', 3, 431100, ',430000,431100,431102,'); +INSERT INTO `oa_city` VALUES (431103, '冷水滩区', 3, 431100, ',430000,431100,431103,'); +INSERT INTO `oa_city` VALUES (431121, '祁阳县', 3, 431100, ',430000,431100,431121,'); +INSERT INTO `oa_city` VALUES (431122, '东安县', 3, 431100, ',430000,431100,431122,'); +INSERT INTO `oa_city` VALUES (431123, '双牌县', 3, 431100, ',430000,431100,431123,'); +INSERT INTO `oa_city` VALUES (431124, '道 县', 3, 431100, ',430000,431100,431124,'); +INSERT INTO `oa_city` VALUES (431125, '江永县', 3, 431100, ',430000,431100,431125,'); +INSERT INTO `oa_city` VALUES (431126, '宁远县', 3, 431100, ',430000,431100,431126,'); +INSERT INTO `oa_city` VALUES (431127, '蓝山县', 3, 431100, ',430000,431100,431127,'); +INSERT INTO `oa_city` VALUES (431128, '新田县', 3, 431100, ',430000,431100,431128,'); +INSERT INTO `oa_city` VALUES (431129, '江华瑶族自治县', 3, 431100, ',430000,431100,431129,'); +INSERT INTO `oa_city` VALUES (431200, '怀化市', 2, 430000, ',430000,431200,'); +INSERT INTO `oa_city` VALUES (431202, '鹤城区', 3, 431200, ',430000,431200,431202,'); +INSERT INTO `oa_city` VALUES (431221, '中方县', 3, 431200, ',430000,431200,431221,'); +INSERT INTO `oa_city` VALUES (431222, '沅陵县', 3, 431200, ',430000,431200,431222,'); +INSERT INTO `oa_city` VALUES (431223, '辰溪县', 3, 431200, ',430000,431200,431223,'); +INSERT INTO `oa_city` VALUES (431224, '溆浦县', 3, 431200, ',430000,431200,431224,'); +INSERT INTO `oa_city` VALUES (431225, '会同县', 3, 431200, ',430000,431200,431225,'); +INSERT INTO `oa_city` VALUES (431226, '麻阳苗族自治县', 3, 431200, ',430000,431200,431226,'); +INSERT INTO `oa_city` VALUES (431227, '新晃侗族自治县', 3, 431200, ',430000,431200,431227,'); +INSERT INTO `oa_city` VALUES (431228, '芷江侗族自治县', 3, 431200, ',430000,431200,431228,'); +INSERT INTO `oa_city` VALUES (431229, '靖州苗族侗族自治县', 3, 431200, ',430000,431200,431229,'); +INSERT INTO `oa_city` VALUES (431230, '通道侗族自治县', 3, 431200, ',430000,431200,431230,'); +INSERT INTO `oa_city` VALUES (431281, '洪江市', 3, 431200, ',430000,431200,431281,'); +INSERT INTO `oa_city` VALUES (431300, '娄底市', 2, 430000, ',430000,431300,'); +INSERT INTO `oa_city` VALUES (431302, '娄星区', 3, 431300, ',430000,431300,431302,'); +INSERT INTO `oa_city` VALUES (431321, '双峰县', 3, 431300, ',430000,431300,431321,'); +INSERT INTO `oa_city` VALUES (431322, '新化县', 3, 431300, ',430000,431300,431322,'); +INSERT INTO `oa_city` VALUES (431381, '冷水江市', 3, 431300, ',430000,431300,431381,'); +INSERT INTO `oa_city` VALUES (431382, '涟源市', 3, 431300, ',430000,431300,431382,'); +INSERT INTO `oa_city` VALUES (433100, '湘西土家族苗族自治州', 2, 430000, ',430000,433100,'); +INSERT INTO `oa_city` VALUES (433101, '吉首市', 3, 433100, ',430000,433100,433101,'); +INSERT INTO `oa_city` VALUES (433122, '泸溪县', 3, 433100, ',430000,433100,433122,'); +INSERT INTO `oa_city` VALUES (433123, '凤凰县', 3, 433100, ',430000,433100,433123,'); +INSERT INTO `oa_city` VALUES (433124, '花垣县', 3, 433100, ',430000,433100,433124,'); +INSERT INTO `oa_city` VALUES (433125, '保靖县', 3, 433100, ',430000,433100,433125,'); +INSERT INTO `oa_city` VALUES (433126, '古丈县', 3, 433100, ',430000,433100,433126,'); +INSERT INTO `oa_city` VALUES (433127, '永顺县', 3, 433100, ',430000,433100,433127,'); +INSERT INTO `oa_city` VALUES (433130, '龙山县', 3, 433100, ',430000,433100,433130,'); +INSERT INTO `oa_city` VALUES (440000, '广东省', 1, 0, ',440000,'); +INSERT INTO `oa_city` VALUES (440100, '广州市', 2, 440000, ',440000,440100,'); +INSERT INTO `oa_city` VALUES (440103, '荔湾区', 3, 440100, ',440000,440100,440103,'); +INSERT INTO `oa_city` VALUES (440104, '越秀区', 3, 440100, ',440000,440100,440104,'); +INSERT INTO `oa_city` VALUES (440105, '海珠区', 3, 440100, ',440000,440100,440105,'); +INSERT INTO `oa_city` VALUES (440106, '天河区', 3, 440100, ',440000,440100,440106,'); +INSERT INTO `oa_city` VALUES (440107, '芳村区', 3, 440100, ',440000,440100,440107,'); +INSERT INTO `oa_city` VALUES (440111, '白云区', 3, 440100, ',440000,440100,440111,'); +INSERT INTO `oa_city` VALUES (440112, '黄埔区', 3, 440100, ',440000,440100,440112,'); +INSERT INTO `oa_city` VALUES (440113, '番禺区', 3, 440100, ',440000,440100,440113,'); +INSERT INTO `oa_city` VALUES (440114, '花都区', 3, 440100, ',440000,440100,440114,'); +INSERT INTO `oa_city` VALUES (440115, '南沙区', 3, 440100, ',440000,440100,440115,'); +INSERT INTO `oa_city` VALUES (440116, '萝岗区', 3, 440100, ',440000,440100,440116,'); +INSERT INTO `oa_city` VALUES (440183, '增城市', 3, 440100, ',440000,440100,440183,'); +INSERT INTO `oa_city` VALUES (440184, '从化市', 3, 440100, ',440000,440100,440184,'); +INSERT INTO `oa_city` VALUES (440200, '韶关市', 2, 440000, ',440000,440200,'); +INSERT INTO `oa_city` VALUES (440203, '武江区', 3, 440200, ',440000,440200,440203,'); +INSERT INTO `oa_city` VALUES (440204, '浈江区', 3, 440200, ',440000,440200,440204,'); +INSERT INTO `oa_city` VALUES (440205, '曲江区', 3, 440200, ',440000,440200,440205,'); +INSERT INTO `oa_city` VALUES (440222, '始兴县', 3, 440200, ',440000,440200,440222,'); +INSERT INTO `oa_city` VALUES (440224, '仁化县', 3, 440200, ',440000,440200,440224,'); +INSERT INTO `oa_city` VALUES (440229, '翁源县', 3, 440200, ',440000,440200,440229,'); +INSERT INTO `oa_city` VALUES (440232, '乳源瑶族自治县', 3, 440200, ',440000,440200,440232,'); +INSERT INTO `oa_city` VALUES (440233, '新丰县', 3, 440200, ',440000,440200,440233,'); +INSERT INTO `oa_city` VALUES (440281, '乐昌市', 3, 440200, ',440000,440200,440281,'); +INSERT INTO `oa_city` VALUES (440282, '南雄市', 3, 440200, ',440000,440200,440282,'); +INSERT INTO `oa_city` VALUES (440300, '深圳市', 2, 440000, ',440000,440300,'); +INSERT INTO `oa_city` VALUES (440303, '罗湖区', 3, 440300, ',440000,440300,440303,'); +INSERT INTO `oa_city` VALUES (440304, '福田区', 3, 440300, ',440000,440300,440304,'); +INSERT INTO `oa_city` VALUES (440305, '南山区', 3, 440300, ',440000,440300,440305,'); +INSERT INTO `oa_city` VALUES (440306, '宝安区', 3, 440300, ',440000,440300,440306,'); +INSERT INTO `oa_city` VALUES (440307, '龙岗区', 3, 440300, ',440000,440300,440307,'); +INSERT INTO `oa_city` VALUES (440308, '盐田区', 3, 440300, ',440000,440300,440308,'); +INSERT INTO `oa_city` VALUES (440400, '珠海市', 2, 440000, ',440000,440400,'); +INSERT INTO `oa_city` VALUES (440402, '香洲区', 3, 440400, ',440000,440400,440402,'); +INSERT INTO `oa_city` VALUES (440403, '斗门区', 3, 440400, ',440000,440400,440403,'); +INSERT INTO `oa_city` VALUES (440404, '金湾区', 3, 440400, ',440000,440400,440404,'); +INSERT INTO `oa_city` VALUES (440500, '汕头市', 2, 440000, ',440000,440500,'); +INSERT INTO `oa_city` VALUES (440507, '龙湖区', 3, 440500, ',440000,440500,440507,'); +INSERT INTO `oa_city` VALUES (440511, '金平区', 3, 440500, ',440000,440500,440511,'); +INSERT INTO `oa_city` VALUES (440512, '濠江区', 3, 440500, ',440000,440500,440512,'); +INSERT INTO `oa_city` VALUES (440513, '潮阳区', 3, 440500, ',440000,440500,440513,'); +INSERT INTO `oa_city` VALUES (440514, '潮南区', 3, 440500, ',440000,440500,440514,'); +INSERT INTO `oa_city` VALUES (440515, '澄海区', 3, 440500, ',440000,440500,440515,'); +INSERT INTO `oa_city` VALUES (440523, '南澳县', 3, 440500, ',440000,440500,440523,'); +INSERT INTO `oa_city` VALUES (440524, '直属局', 3, 440500, ',440000,440500,440524,'); +INSERT INTO `oa_city` VALUES (440525, '保税区', 3, 440500, ',440000,440500,440525,'); +INSERT INTO `oa_city` VALUES (440600, '佛山市', 2, 440000, ',440000,440600,'); +INSERT INTO `oa_city` VALUES (440604, '禅城区', 3, 440600, ',440000,440600,440604,'); +INSERT INTO `oa_city` VALUES (440605, '南海区', 3, 440600, ',440000,440600,440605,'); +INSERT INTO `oa_city` VALUES (440606, '顺德区', 3, 440600, ',440000,440600,440606,'); +INSERT INTO `oa_city` VALUES (440607, '三水区', 3, 440600, ',440000,440600,440607,'); +INSERT INTO `oa_city` VALUES (440608, '高明区', 3, 440600, ',440000,440600,440608,'); +INSERT INTO `oa_city` VALUES (440700, '江门市', 2, 440000, ',440000,440700,'); +INSERT INTO `oa_city` VALUES (440703, '蓬江区', 3, 440700, ',440000,440700,440703,'); +INSERT INTO `oa_city` VALUES (440704, '江海区', 3, 440700, ',440000,440700,440704,'); +INSERT INTO `oa_city` VALUES (440705, '新会区', 3, 440700, ',440000,440700,440705,'); +INSERT INTO `oa_city` VALUES (440781, '台山市', 3, 440700, ',440000,440700,440781,'); +INSERT INTO `oa_city` VALUES (440783, '开平市', 3, 440700, ',440000,440700,440783,'); +INSERT INTO `oa_city` VALUES (440784, '鹤山市', 3, 440700, ',440000,440700,440784,'); +INSERT INTO `oa_city` VALUES (440785, '恩平市', 3, 440700, ',440000,440700,440785,'); +INSERT INTO `oa_city` VALUES (440800, '湛江市', 2, 440000, ',440000,440800,'); +INSERT INTO `oa_city` VALUES (440802, '赤坎区', 3, 440800, ',440000,440800,440802,'); +INSERT INTO `oa_city` VALUES (440803, '霞山区', 3, 440800, ',440000,440800,440803,'); +INSERT INTO `oa_city` VALUES (440804, '坡头区', 3, 440800, ',440000,440800,440804,'); +INSERT INTO `oa_city` VALUES (440811, '麻章区', 3, 440800, ',440000,440800,440811,'); +INSERT INTO `oa_city` VALUES (440823, '遂溪县', 3, 440800, ',440000,440800,440823,'); +INSERT INTO `oa_city` VALUES (440825, '徐闻县', 3, 440800, ',440000,440800,440825,'); +INSERT INTO `oa_city` VALUES (440881, '廉江市', 3, 440800, ',440000,440800,440881,'); +INSERT INTO `oa_city` VALUES (440882, '雷州市', 3, 440800, ',440000,440800,440882,'); +INSERT INTO `oa_city` VALUES (440883, '吴川市', 3, 440800, ',440000,440800,440883,'); +INSERT INTO `oa_city` VALUES (440900, '茂名市', 2, 440000, ',440000,440900,'); +INSERT INTO `oa_city` VALUES (440902, '茂南区', 3, 440900, ',440000,440900,440902,'); +INSERT INTO `oa_city` VALUES (440903, '茂港区', 3, 440900, ',440000,440900,440903,'); +INSERT INTO `oa_city` VALUES (440923, '电白县', 3, 440900, ',440000,440900,440923,'); +INSERT INTO `oa_city` VALUES (440981, '高州市', 3, 440900, ',440000,440900,440981,'); +INSERT INTO `oa_city` VALUES (440982, '化州市', 3, 440900, ',440000,440900,440982,'); +INSERT INTO `oa_city` VALUES (440983, '信宜市', 3, 440900, ',440000,440900,440983,'); +INSERT INTO `oa_city` VALUES (441200, '肇庆市', 2, 440000, ',440000,441200,'); +INSERT INTO `oa_city` VALUES (441202, '端州区', 3, 441200, ',440000,441200,441202,'); +INSERT INTO `oa_city` VALUES (441203, '鼎湖区', 3, 441200, ',440000,441200,441203,'); +INSERT INTO `oa_city` VALUES (441223, '广宁县', 3, 441200, ',440000,441200,441223,'); +INSERT INTO `oa_city` VALUES (441224, '怀集县', 3, 441200, ',440000,441200,441224,'); +INSERT INTO `oa_city` VALUES (441225, '封开县', 3, 441200, ',440000,441200,441225,'); +INSERT INTO `oa_city` VALUES (441226, '德庆县', 3, 441200, ',440000,441200,441226,'); +INSERT INTO `oa_city` VALUES (441283, '高要区', 3, 441200, ',440000,441200,441283,'); +INSERT INTO `oa_city` VALUES (441284, '四会市', 3, 441200, ',440000,441200,441284,'); +INSERT INTO `oa_city` VALUES (441300, '惠州市', 2, 440000, ',440000,441300,'); +INSERT INTO `oa_city` VALUES (441302, '惠城区', 3, 441300, ',440000,441300,441302,'); +INSERT INTO `oa_city` VALUES (441303, '惠阳区', 3, 441300, ',440000,441300,441303,'); +INSERT INTO `oa_city` VALUES (441322, '博罗县', 3, 441300, ',440000,441300,441322,'); +INSERT INTO `oa_city` VALUES (441323, '惠东县', 3, 441300, ',440000,441300,441323,'); +INSERT INTO `oa_city` VALUES (441324, '龙门县', 3, 441300, ',440000,441300,441324,'); +INSERT INTO `oa_city` VALUES (441400, '梅州市', 2, 440000, ',440000,441400,'); +INSERT INTO `oa_city` VALUES (441402, '梅江区', 3, 441400, ',440000,441400,441402,'); +INSERT INTO `oa_city` VALUES (441421, '梅 县', 3, 441400, ',440000,441400,441421,'); +INSERT INTO `oa_city` VALUES (441422, '大埔县', 3, 441400, ',440000,441400,441422,'); +INSERT INTO `oa_city` VALUES (441423, '丰顺县', 3, 441400, ',440000,441400,441423,'); +INSERT INTO `oa_city` VALUES (441424, '五华县', 3, 441400, ',440000,441400,441424,'); +INSERT INTO `oa_city` VALUES (441426, '平远县', 3, 441400, ',440000,441400,441426,'); +INSERT INTO `oa_city` VALUES (441427, '蕉岭县', 3, 441400, ',440000,441400,441427,'); +INSERT INTO `oa_city` VALUES (441481, '兴宁市', 3, 441400, ',440000,441400,441481,'); +INSERT INTO `oa_city` VALUES (441500, '汕尾市', 2, 440000, ',440000,441500,'); +INSERT INTO `oa_city` VALUES (441502, '城 区', 3, 441500, ',440000,441500,441502,'); +INSERT INTO `oa_city` VALUES (441521, '海丰县', 3, 441500, ',440000,441500,441521,'); +INSERT INTO `oa_city` VALUES (441523, '陆河县', 3, 441500, ',440000,441500,441523,'); +INSERT INTO `oa_city` VALUES (441581, '陆丰市', 3, 441500, ',440000,441500,441581,'); +INSERT INTO `oa_city` VALUES (441600, '河源市', 2, 440000, ',440000,441600,'); +INSERT INTO `oa_city` VALUES (441602, '源城区', 3, 441600, ',440000,441600,441602,'); +INSERT INTO `oa_city` VALUES (441621, '紫金县', 3, 441600, ',440000,441600,441621,'); +INSERT INTO `oa_city` VALUES (441622, '龙川县', 3, 441600, ',440000,441600,441622,'); +INSERT INTO `oa_city` VALUES (441623, '连平县', 3, 441600, ',440000,441600,441623,'); +INSERT INTO `oa_city` VALUES (441624, '和平县', 3, 441600, ',440000,441600,441624,'); +INSERT INTO `oa_city` VALUES (441625, '东源县', 3, 441600, ',440000,441600,441625,'); +INSERT INTO `oa_city` VALUES (441700, '阳江市', 2, 440000, ',440000,441700,'); +INSERT INTO `oa_city` VALUES (441702, '江城区', 3, 441700, ',440000,441700,441702,'); +INSERT INTO `oa_city` VALUES (441721, '阳西县', 3, 441700, ',440000,441700,441721,'); +INSERT INTO `oa_city` VALUES (441723, '阳东县', 3, 441700, ',440000,441700,441723,'); +INSERT INTO `oa_city` VALUES (441781, '阳春市', 3, 441700, ',440000,441700,441781,'); +INSERT INTO `oa_city` VALUES (441800, '清远市', 2, 440000, ',440000,441800,'); +INSERT INTO `oa_city` VALUES (441802, '清城区', 3, 441800, ',440000,441800,441802,'); +INSERT INTO `oa_city` VALUES (441821, '佛冈县', 3, 441800, ',440000,441800,441821,'); +INSERT INTO `oa_city` VALUES (441823, '阳山县', 3, 441800, ',440000,441800,441823,'); +INSERT INTO `oa_city` VALUES (441825, '连山壮族瑶族自治县', 3, 441800, ',440000,441800,441825,'); +INSERT INTO `oa_city` VALUES (441826, '连南瑶族自治县', 3, 441800, ',440000,441800,441826,'); +INSERT INTO `oa_city` VALUES (441827, '清新县', 3, 441800, ',440000,441800,441827,'); +INSERT INTO `oa_city` VALUES (441881, '英德市', 3, 441800, ',440000,441800,441881,'); +INSERT INTO `oa_city` VALUES (441882, '连州市', 3, 441800, ',440000,441800,441882,'); +INSERT INTO `oa_city` VALUES (441900, '东莞市', 2, 440000, ',440000,441900,'); +INSERT INTO `oa_city` VALUES (442000, '中山市', 2, 440000, ',440000,442000,'); +INSERT INTO `oa_city` VALUES (445100, '潮州市', 2, 440000, ',440000,445100,'); +INSERT INTO `oa_city` VALUES (445102, '湘桥区', 3, 445100, ',440000,445100,445102,'); +INSERT INTO `oa_city` VALUES (445121, '潮安县', 3, 445100, ',440000,445100,445121,'); +INSERT INTO `oa_city` VALUES (445122, '饶平县', 3, 445100, ',440000,445100,445122,'); +INSERT INTO `oa_city` VALUES (445200, '揭阳市', 2, 440000, ',440000,445200,'); +INSERT INTO `oa_city` VALUES (445202, '榕城区', 3, 445200, ',440000,445200,445202,'); +INSERT INTO `oa_city` VALUES (445221, '揭东县', 3, 445200, ',440000,445200,445221,'); +INSERT INTO `oa_city` VALUES (445222, '揭西县', 3, 445200, ',440000,445200,445222,'); +INSERT INTO `oa_city` VALUES (445224, '惠来县', 3, 445200, ',440000,445200,445224,'); +INSERT INTO `oa_city` VALUES (445281, '普宁市', 3, 445200, ',440000,445200,445281,'); +INSERT INTO `oa_city` VALUES (445300, '云浮市', 2, 440000, ',440000,445300,'); +INSERT INTO `oa_city` VALUES (445302, '云城区', 3, 445300, ',440000,445300,445302,'); +INSERT INTO `oa_city` VALUES (445321, '新兴县', 3, 445300, ',440000,445300,445321,'); +INSERT INTO `oa_city` VALUES (445322, '郁南县', 3, 445300, ',440000,445300,445322,'); +INSERT INTO `oa_city` VALUES (445323, '云安县', 3, 445300, ',440000,445300,445323,'); +INSERT INTO `oa_city` VALUES (445381, '罗定市', 3, 445300, ',440000,445300,445381,'); +INSERT INTO `oa_city` VALUES (450000, '广西省', 1, 0, ',450000,'); +INSERT INTO `oa_city` VALUES (450100, '南宁市', 2, 450000, ',450000,450100,'); +INSERT INTO `oa_city` VALUES (450102, '兴宁区', 3, 450100, ',450000,450100,450102,'); +INSERT INTO `oa_city` VALUES (450103, '青秀区', 3, 450100, ',450000,450100,450103,'); +INSERT INTO `oa_city` VALUES (450105, '江南区', 3, 450100, ',450000,450100,450105,'); +INSERT INTO `oa_city` VALUES (450107, '西乡塘区', 3, 450100, ',450000,450100,450107,'); +INSERT INTO `oa_city` VALUES (450108, '良庆区', 3, 450100, ',450000,450100,450108,'); +INSERT INTO `oa_city` VALUES (450109, '邕宁区', 3, 450100, ',450000,450100,450109,'); +INSERT INTO `oa_city` VALUES (450122, '武鸣县', 3, 450100, ',450000,450100,450122,'); +INSERT INTO `oa_city` VALUES (450123, '隆安县', 3, 450100, ',450000,450100,450123,'); +INSERT INTO `oa_city` VALUES (450124, '马山县', 3, 450100, ',450000,450100,450124,'); +INSERT INTO `oa_city` VALUES (450125, '上林县', 3, 450100, ',450000,450100,450125,'); +INSERT INTO `oa_city` VALUES (450126, '宾阳县', 3, 450100, ',450000,450100,450126,'); +INSERT INTO `oa_city` VALUES (450127, '横 县', 3, 450100, ',450000,450100,450127,'); +INSERT INTO `oa_city` VALUES (450200, '柳州市', 2, 450000, ',450000,450200,'); +INSERT INTO `oa_city` VALUES (450202, '城中区', 3, 450200, ',450000,450200,450202,'); +INSERT INTO `oa_city` VALUES (450203, '鱼峰区', 3, 450200, ',450000,450200,450203,'); +INSERT INTO `oa_city` VALUES (450204, '柳南区', 3, 450200, ',450000,450200,450204,'); +INSERT INTO `oa_city` VALUES (450205, '柳北区', 3, 450200, ',450000,450200,450205,'); +INSERT INTO `oa_city` VALUES (450221, '柳江县', 3, 450200, ',450000,450200,450221,'); +INSERT INTO `oa_city` VALUES (450222, '柳城县', 3, 450200, ',450000,450200,450222,'); +INSERT INTO `oa_city` VALUES (450223, '鹿寨县', 3, 450200, ',450000,450200,450223,'); +INSERT INTO `oa_city` VALUES (450224, '融安县', 3, 450200, ',450000,450200,450224,'); +INSERT INTO `oa_city` VALUES (450225, '融水苗族自治县', 3, 450200, ',450000,450200,450225,'); +INSERT INTO `oa_city` VALUES (450226, '三江侗族自治县', 3, 450200, ',450000,450200,450226,'); +INSERT INTO `oa_city` VALUES (450300, '桂林市', 2, 450000, ',450000,450300,'); +INSERT INTO `oa_city` VALUES (450302, '秀峰区', 3, 450300, ',450000,450300,450302,'); +INSERT INTO `oa_city` VALUES (450303, '叠彩区', 3, 450300, ',450000,450300,450303,'); +INSERT INTO `oa_city` VALUES (450304, '象山区', 3, 450300, ',450000,450300,450304,'); +INSERT INTO `oa_city` VALUES (450305, '七星区', 3, 450300, ',450000,450300,450305,'); +INSERT INTO `oa_city` VALUES (450311, '雁山区', 3, 450300, ',450000,450300,450311,'); +INSERT INTO `oa_city` VALUES (450321, '阳朔县', 3, 450300, ',450000,450300,450321,'); +INSERT INTO `oa_city` VALUES (450322, '临桂县', 3, 450300, ',450000,450300,450322,'); +INSERT INTO `oa_city` VALUES (450323, '灵川县', 3, 450300, ',450000,450300,450323,'); +INSERT INTO `oa_city` VALUES (450324, '全州县', 3, 450300, ',450000,450300,450324,'); +INSERT INTO `oa_city` VALUES (450325, '兴安县', 3, 450300, ',450000,450300,450325,'); +INSERT INTO `oa_city` VALUES (450326, '永福县', 3, 450300, ',450000,450300,450326,'); +INSERT INTO `oa_city` VALUES (450327, '灌阳县', 3, 450300, ',450000,450300,450327,'); +INSERT INTO `oa_city` VALUES (450328, '龙胜各族自治县', 3, 450300, ',450000,450300,450328,'); +INSERT INTO `oa_city` VALUES (450329, '资源县', 3, 450300, ',450000,450300,450329,'); +INSERT INTO `oa_city` VALUES (450330, '平乐县', 3, 450300, ',450000,450300,450330,'); +INSERT INTO `oa_city` VALUES (450331, '荔蒲县', 3, 450300, ',450000,450300,450331,'); +INSERT INTO `oa_city` VALUES (450332, '恭城瑶族自治县', 3, 450300, ',450000,450300,450332,'); +INSERT INTO `oa_city` VALUES (450400, '梧州市', 2, 450000, ',450000,450400,'); +INSERT INTO `oa_city` VALUES (450403, '万秀区', 3, 450400, ',450000,450400,450403,'); +INSERT INTO `oa_city` VALUES (450404, '蝶山区', 3, 450400, ',450000,450400,450404,'); +INSERT INTO `oa_city` VALUES (450405, '长洲区', 3, 450400, ',450000,450400,450405,'); +INSERT INTO `oa_city` VALUES (450421, '苍梧县', 3, 450400, ',450000,450400,450421,'); +INSERT INTO `oa_city` VALUES (450422, '藤 县', 3, 450400, ',450000,450400,450422,'); +INSERT INTO `oa_city` VALUES (450423, '蒙山县', 3, 450400, ',450000,450400,450423,'); +INSERT INTO `oa_city` VALUES (450481, '岑溪市', 3, 450400, ',450000,450400,450481,'); +INSERT INTO `oa_city` VALUES (450500, '北海市', 2, 450000, ',450000,450500,'); +INSERT INTO `oa_city` VALUES (450502, '海城区', 3, 450500, ',450000,450500,450502,'); +INSERT INTO `oa_city` VALUES (450503, '银海区', 3, 450500, ',450000,450500,450503,'); +INSERT INTO `oa_city` VALUES (450512, '铁山港区', 3, 450500, ',450000,450500,450512,'); +INSERT INTO `oa_city` VALUES (450521, '合浦县', 3, 450500, ',450000,450500,450521,'); +INSERT INTO `oa_city` VALUES (450600, '防城港市', 2, 450000, ',450000,450600,'); +INSERT INTO `oa_city` VALUES (450602, '港口区', 3, 450600, ',450000,450600,450602,'); +INSERT INTO `oa_city` VALUES (450603, '防城区', 3, 450600, ',450000,450600,450603,'); +INSERT INTO `oa_city` VALUES (450621, '上思县', 3, 450600, ',450000,450600,450621,'); +INSERT INTO `oa_city` VALUES (450681, '东兴市', 3, 450600, ',450000,450600,450681,'); +INSERT INTO `oa_city` VALUES (450700, '钦州市', 2, 450000, ',450000,450700,'); +INSERT INTO `oa_city` VALUES (450702, '钦南区', 3, 450700, ',450000,450700,450702,'); +INSERT INTO `oa_city` VALUES (450703, '钦北区', 3, 450700, ',450000,450700,450703,'); +INSERT INTO `oa_city` VALUES (450721, '灵山县', 3, 450700, ',450000,450700,450721,'); +INSERT INTO `oa_city` VALUES (450722, '浦北县', 3, 450700, ',450000,450700,450722,'); +INSERT INTO `oa_city` VALUES (450800, '贵港市', 2, 450000, ',450000,450800,'); +INSERT INTO `oa_city` VALUES (450802, '港北区', 3, 450800, ',450000,450800,450802,'); +INSERT INTO `oa_city` VALUES (450803, '港南区', 3, 450800, ',450000,450800,450803,'); +INSERT INTO `oa_city` VALUES (450804, '覃塘区', 3, 450800, ',450000,450800,450804,'); +INSERT INTO `oa_city` VALUES (450821, '平南县', 3, 450800, ',450000,450800,450821,'); +INSERT INTO `oa_city` VALUES (450881, '桂平市', 3, 450800, ',450000,450800,450881,'); +INSERT INTO `oa_city` VALUES (450900, '玉林市', 2, 450000, ',450000,450900,'); +INSERT INTO `oa_city` VALUES (450902, '玉州区', 3, 450900, ',450000,450900,450902,'); +INSERT INTO `oa_city` VALUES (450921, '容 县', 3, 450900, ',450000,450900,450921,'); +INSERT INTO `oa_city` VALUES (450922, '陆川县', 3, 450900, ',450000,450900,450922,'); +INSERT INTO `oa_city` VALUES (450923, '博白县', 3, 450900, ',450000,450900,450923,'); +INSERT INTO `oa_city` VALUES (450924, '兴业县', 3, 450900, ',450000,450900,450924,'); +INSERT INTO `oa_city` VALUES (450981, '北流市', 3, 450900, ',450000,450900,450981,'); +INSERT INTO `oa_city` VALUES (451000, '百色市', 2, 450000, ',450000,451000,'); +INSERT INTO `oa_city` VALUES (451002, '右江区', 3, 451000, ',450000,451000,451002,'); +INSERT INTO `oa_city` VALUES (451021, '田阳县', 3, 451000, ',450000,451000,451021,'); +INSERT INTO `oa_city` VALUES (451022, '田东县', 3, 451000, ',450000,451000,451022,'); +INSERT INTO `oa_city` VALUES (451023, '平果县', 3, 451000, ',450000,451000,451023,'); +INSERT INTO `oa_city` VALUES (451024, '德保县', 3, 451000, ',450000,451000,451024,'); +INSERT INTO `oa_city` VALUES (451025, '靖西县', 3, 451000, ',450000,451000,451025,'); +INSERT INTO `oa_city` VALUES (451026, '那坡县', 3, 451000, ',450000,451000,451026,'); +INSERT INTO `oa_city` VALUES (451027, '凌云县', 3, 451000, ',450000,451000,451027,'); +INSERT INTO `oa_city` VALUES (451028, '乐业县', 3, 451000, ',450000,451000,451028,'); +INSERT INTO `oa_city` VALUES (451029, '田林县', 3, 451000, ',450000,451000,451029,'); +INSERT INTO `oa_city` VALUES (451030, '西林县', 3, 451000, ',450000,451000,451030,'); +INSERT INTO `oa_city` VALUES (451031, '隆林各族自治县', 3, 451000, ',450000,451000,451031,'); +INSERT INTO `oa_city` VALUES (451100, '贺州市', 2, 450000, ',450000,451100,'); +INSERT INTO `oa_city` VALUES (451102, '八步区', 3, 451100, ',450000,451100,451102,'); +INSERT INTO `oa_city` VALUES (451121, '昭平县', 3, 451100, ',450000,451100,451121,'); +INSERT INTO `oa_city` VALUES (451122, '钟山县', 3, 451100, ',450000,451100,451122,'); +INSERT INTO `oa_city` VALUES (451123, '富川瑶族自治县', 3, 451100, ',450000,451100,451123,'); +INSERT INTO `oa_city` VALUES (451200, '河池市', 2, 450000, ',450000,451200,'); +INSERT INTO `oa_city` VALUES (451202, '金城江区', 3, 451200, ',450000,451200,451202,'); +INSERT INTO `oa_city` VALUES (451221, '南丹县', 3, 451200, ',450000,451200,451221,'); +INSERT INTO `oa_city` VALUES (451222, '天峨县', 3, 451200, ',450000,451200,451222,'); +INSERT INTO `oa_city` VALUES (451223, '凤山县', 3, 451200, ',450000,451200,451223,'); +INSERT INTO `oa_city` VALUES (451224, '东兰县', 3, 451200, ',450000,451200,451224,'); +INSERT INTO `oa_city` VALUES (451225, '罗城仫佬族自治县', 3, 451200, ',450000,451200,451225,'); +INSERT INTO `oa_city` VALUES (451226, '环江毛南族自治县', 3, 451200, ',450000,451200,451226,'); +INSERT INTO `oa_city` VALUES (451227, '巴马瑶族自治县', 3, 451200, ',450000,451200,451227,'); +INSERT INTO `oa_city` VALUES (451228, '都安瑶族自治县', 3, 451200, ',450000,451200,451228,'); +INSERT INTO `oa_city` VALUES (451229, '大化瑶族自治县', 3, 451200, ',450000,451200,451229,'); +INSERT INTO `oa_city` VALUES (451281, '宜州市', 3, 451200, ',450000,451200,451281,'); +INSERT INTO `oa_city` VALUES (451300, '来宾市', 2, 450000, ',450000,451300,'); +INSERT INTO `oa_city` VALUES (451302, '兴宾区', 3, 451300, ',450000,451300,451302,'); +INSERT INTO `oa_city` VALUES (451321, '忻城县', 3, 451300, ',450000,451300,451321,'); +INSERT INTO `oa_city` VALUES (451322, '象州县', 3, 451300, ',450000,451300,451322,'); +INSERT INTO `oa_city` VALUES (451323, '武宣县', 3, 451300, ',450000,451300,451323,'); +INSERT INTO `oa_city` VALUES (451324, '金秀瑶族自治县', 3, 451300, ',450000,451300,451324,'); +INSERT INTO `oa_city` VALUES (451381, '合山市', 3, 451300, ',450000,451300,451381,'); +INSERT INTO `oa_city` VALUES (451400, '崇左市', 2, 450000, ',450000,451400,'); +INSERT INTO `oa_city` VALUES (451402, '江洲区', 3, 451400, ',450000,451400,451402,'); +INSERT INTO `oa_city` VALUES (451421, '扶绥县', 3, 451400, ',450000,451400,451421,'); +INSERT INTO `oa_city` VALUES (451422, '宁明县', 3, 451400, ',450000,451400,451422,'); +INSERT INTO `oa_city` VALUES (451423, '龙州县', 3, 451400, ',450000,451400,451423,'); +INSERT INTO `oa_city` VALUES (451424, '大新县', 3, 451400, ',450000,451400,451424,'); +INSERT INTO `oa_city` VALUES (451425, '天等县', 3, 451400, ',450000,451400,451425,'); +INSERT INTO `oa_city` VALUES (451481, '凭祥市', 3, 451400, ',450000,451400,451481,'); +INSERT INTO `oa_city` VALUES (460000, '海南省', 1, 0, ',460000,'); +INSERT INTO `oa_city` VALUES (460100, '海口市', 2, 460000, ',460000,460100,'); +INSERT INTO `oa_city` VALUES (460105, '秀英区', 3, 460100, ',460000,460100,460105,'); +INSERT INTO `oa_city` VALUES (460106, '龙华区', 3, 460100, ',460000,460100,460106,'); +INSERT INTO `oa_city` VALUES (460107, '琼山区', 3, 460100, ',460000,460100,460107,'); +INSERT INTO `oa_city` VALUES (460108, '美兰区', 3, 460100, ',460000,460100,460108,'); +INSERT INTO `oa_city` VALUES (460200, '三亚市', 2, 460000, ',460000,460200,'); +INSERT INTO `oa_city` VALUES (460300, '三沙市', 2, 460000, ',460000,460300,'); +INSERT INTO `oa_city` VALUES (469001, '五指山市', 2, 460000, ',460000,469001,'); +INSERT INTO `oa_city` VALUES (469002, '琼海市', 2, 460000, ',460000,469002,'); +INSERT INTO `oa_city` VALUES (469003, '儋州市', 2, 460000, ',460000,469003,'); +INSERT INTO `oa_city` VALUES (469005, '文昌市', 2, 460000, ',460000,469005,'); +INSERT INTO `oa_city` VALUES (469006, '万宁市', 2, 460000, ',460000,469006,'); +INSERT INTO `oa_city` VALUES (469007, '东方市', 2, 460000, ',460000,469007,'); +INSERT INTO `oa_city` VALUES (469025, '定安县', 2, 460000, ',460000,469025,'); +INSERT INTO `oa_city` VALUES (469026, '屯昌县', 2, 460000, ',460000,469026,'); +INSERT INTO `oa_city` VALUES (469027, '澄迈县', 2, 460000, ',460000,469027,'); +INSERT INTO `oa_city` VALUES (469028, '临高县', 2, 460000, ',460000,469028,'); +INSERT INTO `oa_city` VALUES (469030, '白沙黎族自治县', 2, 460000, ',460000,469030,'); +INSERT INTO `oa_city` VALUES (469031, '昌江黎族自治县', 2, 460000, ',460000,469031,'); +INSERT INTO `oa_city` VALUES (469033, '乐东黎族自治县', 2, 460000, ',460000,469033,'); +INSERT INTO `oa_city` VALUES (469034, '陵水黎族自治县', 2, 460000, ',460000,469034,'); +INSERT INTO `oa_city` VALUES (469035, '保亭黎族苗族自治县', 2, 460000, ',460000,469035,'); +INSERT INTO `oa_city` VALUES (469036, '琼中黎族苗族自治县', 2, 460000, ',460000,469036,'); +INSERT INTO `oa_city` VALUES (469037, '西沙群岛', 2, 460000, ',460000,469037,'); +INSERT INTO `oa_city` VALUES (469038, '南沙群岛', 2, 460000, ',460000,469038,'); +INSERT INTO `oa_city` VALUES (469039, '中沙群岛的岛礁及其海域', 2, 460000, ',460000,469039,'); +INSERT INTO `oa_city` VALUES (500000, '重庆市', 1, 0, ',500000,'); +INSERT INTO `oa_city` VALUES (500101, '万州区', 2, 500000, ',500000,500101,'); +INSERT INTO `oa_city` VALUES (500102, '涪陵区', 2, 500000, ',500000,500102,'); +INSERT INTO `oa_city` VALUES (500103, '渝中区', 2, 500000, ',500000,500103,'); +INSERT INTO `oa_city` VALUES (500104, '大渡口区', 2, 500000, ',500000,500104,'); +INSERT INTO `oa_city` VALUES (500105, '江北区', 2, 500000, ',500000,500105,'); +INSERT INTO `oa_city` VALUES (500106, '沙坪坝区', 2, 500000, ',500000,500106,'); +INSERT INTO `oa_city` VALUES (500107, '九龙坡区', 2, 500000, ',500000,500107,'); +INSERT INTO `oa_city` VALUES (500108, '南岸区', 2, 500000, ',500000,500108,'); +INSERT INTO `oa_city` VALUES (500109, '北碚区', 2, 500000, ',500000,500109,'); +INSERT INTO `oa_city` VALUES (500110, '万盛区', 2, 500000, ',500000,500110,'); +INSERT INTO `oa_city` VALUES (500111, '双桥区', 2, 500000, ',500000,500111,'); +INSERT INTO `oa_city` VALUES (500112, '渝北区', 2, 500000, ',500000,500112,'); +INSERT INTO `oa_city` VALUES (500113, '巴南区', 2, 500000, ',500000,500113,'); +INSERT INTO `oa_city` VALUES (500114, '黔江区', 2, 500000, ',500000,500114,'); +INSERT INTO `oa_city` VALUES (500115, '长寿区', 2, 500000, ',500000,500115,'); +INSERT INTO `oa_city` VALUES (500222, '綦江县', 2, 500000, ',500000,500222,'); +INSERT INTO `oa_city` VALUES (500223, '潼南县', 2, 500000, ',500000,500223,'); +INSERT INTO `oa_city` VALUES (500224, '铜梁县', 2, 500000, ',500000,500224,'); +INSERT INTO `oa_city` VALUES (500225, '大足县', 2, 500000, ',500000,500225,'); +INSERT INTO `oa_city` VALUES (500226, '荣昌县', 2, 500000, ',500000,500226,'); +INSERT INTO `oa_city` VALUES (500227, '璧山县', 2, 500000, ',500000,500227,'); +INSERT INTO `oa_city` VALUES (500228, '梁平县', 2, 500000, ',500000,500228,'); +INSERT INTO `oa_city` VALUES (500229, '城口县', 2, 500000, ',500000,500229,'); +INSERT INTO `oa_city` VALUES (500230, '丰都县', 2, 500000, ',500000,500230,'); +INSERT INTO `oa_city` VALUES (500231, '垫江县', 2, 500000, ',500000,500231,'); +INSERT INTO `oa_city` VALUES (500232, '武隆县', 2, 500000, ',500000,500232,'); +INSERT INTO `oa_city` VALUES (500233, '忠 县', 2, 500000, ',500000,500233,'); +INSERT INTO `oa_city` VALUES (500234, '开 县', 2, 500000, ',500000,500234,'); +INSERT INTO `oa_city` VALUES (500235, '云阳县', 2, 500000, ',500000,500235,'); +INSERT INTO `oa_city` VALUES (500236, '奉节县', 2, 500000, ',500000,500236,'); +INSERT INTO `oa_city` VALUES (500237, '巫山县', 2, 500000, ',500000,500237,'); +INSERT INTO `oa_city` VALUES (500238, '巫溪县', 2, 500000, ',500000,500238,'); +INSERT INTO `oa_city` VALUES (500240, '石柱土家族自治县', 2, 500000, ',500000,500240,'); +INSERT INTO `oa_city` VALUES (500241, '秀山土家族苗族自治县', 2, 500000, ',500000,500241,'); +INSERT INTO `oa_city` VALUES (500242, '酉阳土家族苗族自治县', 2, 500000, ',500000,500242,'); +INSERT INTO `oa_city` VALUES (500243, '彭水苗族土家族自治县', 2, 500000, ',500000,500243,'); +INSERT INTO `oa_city` VALUES (500381, '江津市', 2, 500000, ',500000,500381,'); +INSERT INTO `oa_city` VALUES (500382, '合川市', 2, 500000, ',500000,500382,'); +INSERT INTO `oa_city` VALUES (500383, '永川市', 2, 500000, ',500000,500383,'); +INSERT INTO `oa_city` VALUES (500384, '南川市', 2, 500000, ',500000,500384,'); +INSERT INTO `oa_city` VALUES (510000, '四川省', 1, 0, ',510000,'); +INSERT INTO `oa_city` VALUES (510100, '成都市', 2, 510000, ',510000,510100,'); +INSERT INTO `oa_city` VALUES (510104, '锦江区', 3, 510100, ',510000,510100,510104,'); +INSERT INTO `oa_city` VALUES (510105, '青羊区', 3, 510100, ',510000,510100,510105,'); +INSERT INTO `oa_city` VALUES (510106, '金牛区', 3, 510100, ',510000,510100,510106,'); +INSERT INTO `oa_city` VALUES (510107, '武侯区', 3, 510100, ',510000,510100,510107,'); +INSERT INTO `oa_city` VALUES (510108, '成华区', 3, 510100, ',510000,510100,510108,'); +INSERT INTO `oa_city` VALUES (510112, '龙泉驿区', 3, 510100, ',510000,510100,510112,'); +INSERT INTO `oa_city` VALUES (510113, '青白江区', 3, 510100, ',510000,510100,510113,'); +INSERT INTO `oa_city` VALUES (510114, '新都区', 3, 510100, ',510000,510100,510114,'); +INSERT INTO `oa_city` VALUES (510115, '温江区', 3, 510100, ',510000,510100,510115,'); +INSERT INTO `oa_city` VALUES (510121, '金堂县', 3, 510100, ',510000,510100,510121,'); +INSERT INTO `oa_city` VALUES (510122, '双流县', 3, 510100, ',510000,510100,510122,'); +INSERT INTO `oa_city` VALUES (510124, '郫 县', 3, 510100, ',510000,510100,510124,'); +INSERT INTO `oa_city` VALUES (510129, '大邑县', 3, 510100, ',510000,510100,510129,'); +INSERT INTO `oa_city` VALUES (510131, '蒲江县', 3, 510100, ',510000,510100,510131,'); +INSERT INTO `oa_city` VALUES (510132, '新津县', 3, 510100, ',510000,510100,510132,'); +INSERT INTO `oa_city` VALUES (510181, '都江堰市', 3, 510100, ',510000,510100,510181,'); +INSERT INTO `oa_city` VALUES (510182, '彭州市', 3, 510100, ',510000,510100,510182,'); +INSERT INTO `oa_city` VALUES (510183, '邛崃市', 3, 510100, ',510000,510100,510183,'); +INSERT INTO `oa_city` VALUES (510184, '崇州市', 3, 510100, ',510000,510100,510184,'); +INSERT INTO `oa_city` VALUES (510300, '自贡市', 2, 510000, ',510000,510300,'); +INSERT INTO `oa_city` VALUES (510302, '自流井区', 3, 510300, ',510000,510300,510302,'); +INSERT INTO `oa_city` VALUES (510303, '贡井区', 3, 510300, ',510000,510300,510303,'); +INSERT INTO `oa_city` VALUES (510304, '大安区', 3, 510300, ',510000,510300,510304,'); +INSERT INTO `oa_city` VALUES (510311, '沿滩区', 3, 510300, ',510000,510300,510311,'); +INSERT INTO `oa_city` VALUES (510321, '荣 县', 3, 510300, ',510000,510300,510321,'); +INSERT INTO `oa_city` VALUES (510322, '富顺县', 3, 510300, ',510000,510300,510322,'); +INSERT INTO `oa_city` VALUES (510400, '攀枝花市', 2, 510000, ',510000,510400,'); +INSERT INTO `oa_city` VALUES (510402, '东 区', 3, 510400, ',510000,510400,510402,'); +INSERT INTO `oa_city` VALUES (510403, '西 区', 3, 510400, ',510000,510400,510403,'); +INSERT INTO `oa_city` VALUES (510411, '仁和区', 3, 510400, ',510000,510400,510411,'); +INSERT INTO `oa_city` VALUES (510421, '米易县', 3, 510400, ',510000,510400,510421,'); +INSERT INTO `oa_city` VALUES (510422, '盐边县', 3, 510400, ',510000,510400,510422,'); +INSERT INTO `oa_city` VALUES (510500, '泸州市', 2, 510000, ',510000,510500,'); +INSERT INTO `oa_city` VALUES (510502, '江阳区', 3, 510500, ',510000,510500,510502,'); +INSERT INTO `oa_city` VALUES (510503, '纳溪区', 3, 510500, ',510000,510500,510503,'); +INSERT INTO `oa_city` VALUES (510504, '龙马潭区', 3, 510500, ',510000,510500,510504,'); +INSERT INTO `oa_city` VALUES (510521, '泸 县', 3, 510500, ',510000,510500,510521,'); +INSERT INTO `oa_city` VALUES (510522, '合江县', 3, 510500, ',510000,510500,510522,'); +INSERT INTO `oa_city` VALUES (510524, '叙永县', 3, 510500, ',510000,510500,510524,'); +INSERT INTO `oa_city` VALUES (510525, '古蔺县', 3, 510500, ',510000,510500,510525,'); +INSERT INTO `oa_city` VALUES (510600, '德阳市', 2, 510000, ',510000,510600,'); +INSERT INTO `oa_city` VALUES (510603, '旌阳区', 3, 510600, ',510000,510600,510603,'); +INSERT INTO `oa_city` VALUES (510623, '中江县', 3, 510600, ',510000,510600,510623,'); +INSERT INTO `oa_city` VALUES (510626, '罗江县', 3, 510600, ',510000,510600,510626,'); +INSERT INTO `oa_city` VALUES (510681, '广汉市', 3, 510600, ',510000,510600,510681,'); +INSERT INTO `oa_city` VALUES (510682, '什邡市', 3, 510600, ',510000,510600,510682,'); +INSERT INTO `oa_city` VALUES (510683, '绵竹市', 3, 510600, ',510000,510600,510683,'); +INSERT INTO `oa_city` VALUES (510700, '绵阳市', 2, 510000, ',510000,510700,'); +INSERT INTO `oa_city` VALUES (510703, '涪城区', 3, 510700, ',510000,510700,510703,'); +INSERT INTO `oa_city` VALUES (510704, '游仙区', 3, 510700, ',510000,510700,510704,'); +INSERT INTO `oa_city` VALUES (510722, '三台县', 3, 510700, ',510000,510700,510722,'); +INSERT INTO `oa_city` VALUES (510723, '盐亭县', 3, 510700, ',510000,510700,510723,'); +INSERT INTO `oa_city` VALUES (510724, '安 县', 3, 510700, ',510000,510700,510724,'); +INSERT INTO `oa_city` VALUES (510725, '梓潼县', 3, 510700, ',510000,510700,510725,'); +INSERT INTO `oa_city` VALUES (510726, '北川羌族自治县', 3, 510700, ',510000,510700,510726,'); +INSERT INTO `oa_city` VALUES (510727, '平武县', 3, 510700, ',510000,510700,510727,'); +INSERT INTO `oa_city` VALUES (510781, '江油市', 3, 510700, ',510000,510700,510781,'); +INSERT INTO `oa_city` VALUES (510800, '广元市', 2, 510000, ',510000,510800,'); +INSERT INTO `oa_city` VALUES (510802, '市中区', 3, 510800, ',510000,510800,510802,'); +INSERT INTO `oa_city` VALUES (510811, '元坝区', 3, 510800, ',510000,510800,510811,'); +INSERT INTO `oa_city` VALUES (510812, '朝天区', 3, 510800, ',510000,510800,510812,'); +INSERT INTO `oa_city` VALUES (510821, '旺苍县', 3, 510800, ',510000,510800,510821,'); +INSERT INTO `oa_city` VALUES (510822, '青川县', 3, 510800, ',510000,510800,510822,'); +INSERT INTO `oa_city` VALUES (510823, '剑阁县', 3, 510800, ',510000,510800,510823,'); +INSERT INTO `oa_city` VALUES (510824, '苍溪县', 3, 510800, ',510000,510800,510824,'); +INSERT INTO `oa_city` VALUES (510900, '遂宁市', 2, 510000, ',510000,510900,'); +INSERT INTO `oa_city` VALUES (510903, '船山区', 3, 510900, ',510000,510900,510903,'); +INSERT INTO `oa_city` VALUES (510904, '安居区', 3, 510900, ',510000,510900,510904,'); +INSERT INTO `oa_city` VALUES (510921, '蓬溪县', 3, 510900, ',510000,510900,510921,'); +INSERT INTO `oa_city` VALUES (510922, '射洪县', 3, 510900, ',510000,510900,510922,'); +INSERT INTO `oa_city` VALUES (510923, '大英县', 3, 510900, ',510000,510900,510923,'); +INSERT INTO `oa_city` VALUES (511000, '内江市', 2, 510000, ',510000,511000,'); +INSERT INTO `oa_city` VALUES (511002, '市中区', 3, 511000, ',510000,511000,511002,'); +INSERT INTO `oa_city` VALUES (511011, '东兴区', 3, 511000, ',510000,511000,511011,'); +INSERT INTO `oa_city` VALUES (511024, '威远县', 3, 511000, ',510000,511000,511024,'); +INSERT INTO `oa_city` VALUES (511025, '资中县', 3, 511000, ',510000,511000,511025,'); +INSERT INTO `oa_city` VALUES (511028, '隆昌县', 3, 511000, ',510000,511000,511028,'); +INSERT INTO `oa_city` VALUES (511100, '乐山市', 2, 510000, ',510000,511100,'); +INSERT INTO `oa_city` VALUES (511102, '市中区', 3, 511100, ',510000,511100,511102,'); +INSERT INTO `oa_city` VALUES (511111, '沙湾区', 3, 511100, ',510000,511100,511111,'); +INSERT INTO `oa_city` VALUES (511112, '五通桥区', 3, 511100, ',510000,511100,511112,'); +INSERT INTO `oa_city` VALUES (511113, '金口河区', 3, 511100, ',510000,511100,511113,'); +INSERT INTO `oa_city` VALUES (511123, '犍为县', 3, 511100, ',510000,511100,511123,'); +INSERT INTO `oa_city` VALUES (511124, '井研县', 3, 511100, ',510000,511100,511124,'); +INSERT INTO `oa_city` VALUES (511126, '夹江县', 3, 511100, ',510000,511100,511126,'); +INSERT INTO `oa_city` VALUES (511129, '沐川县', 3, 511100, ',510000,511100,511129,'); +INSERT INTO `oa_city` VALUES (511132, '峨边彝族自治县', 3, 511100, ',510000,511100,511132,'); +INSERT INTO `oa_city` VALUES (511133, '马边彝族自治县', 3, 511100, ',510000,511100,511133,'); +INSERT INTO `oa_city` VALUES (511181, '峨眉山市', 3, 511100, ',510000,511100,511181,'); +INSERT INTO `oa_city` VALUES (511300, '南充市', 2, 510000, ',510000,511300,'); +INSERT INTO `oa_city` VALUES (511302, '顺庆区', 3, 511300, ',510000,511300,511302,'); +INSERT INTO `oa_city` VALUES (511303, '高坪区', 3, 511300, ',510000,511300,511303,'); +INSERT INTO `oa_city` VALUES (511304, '嘉陵区', 3, 511300, ',510000,511300,511304,'); +INSERT INTO `oa_city` VALUES (511321, '南部县', 3, 511300, ',510000,511300,511321,'); +INSERT INTO `oa_city` VALUES (511322, '营山县', 3, 511300, ',510000,511300,511322,'); +INSERT INTO `oa_city` VALUES (511323, '蓬安县', 3, 511300, ',510000,511300,511323,'); +INSERT INTO `oa_city` VALUES (511324, '仪陇县', 3, 511300, ',510000,511300,511324,'); +INSERT INTO `oa_city` VALUES (511325, '西充县', 3, 511300, ',510000,511300,511325,'); +INSERT INTO `oa_city` VALUES (511381, '阆中市', 3, 511300, ',510000,511300,511381,'); +INSERT INTO `oa_city` VALUES (511400, '眉山市', 2, 510000, ',510000,511400,'); +INSERT INTO `oa_city` VALUES (511402, '东坡区', 3, 511400, ',510000,511400,511402,'); +INSERT INTO `oa_city` VALUES (511421, '仁寿县', 3, 511400, ',510000,511400,511421,'); +INSERT INTO `oa_city` VALUES (511422, '彭山县', 3, 511400, ',510000,511400,511422,'); +INSERT INTO `oa_city` VALUES (511423, '洪雅县', 3, 511400, ',510000,511400,511423,'); +INSERT INTO `oa_city` VALUES (511424, '丹棱县', 3, 511400, ',510000,511400,511424,'); +INSERT INTO `oa_city` VALUES (511425, '青神县', 3, 511400, ',510000,511400,511425,'); +INSERT INTO `oa_city` VALUES (511500, '宜宾市', 2, 510000, ',510000,511500,'); +INSERT INTO `oa_city` VALUES (511502, '翠屏区', 3, 511500, ',510000,511500,511502,'); +INSERT INTO `oa_city` VALUES (511521, '宜宾县', 3, 511500, ',510000,511500,511521,'); +INSERT INTO `oa_city` VALUES (511522, '南溪县', 3, 511500, ',510000,511500,511522,'); +INSERT INTO `oa_city` VALUES (511523, '江安县', 3, 511500, ',510000,511500,511523,'); +INSERT INTO `oa_city` VALUES (511524, '长宁县', 3, 511500, ',510000,511500,511524,'); +INSERT INTO `oa_city` VALUES (511525, '高 县', 3, 511500, ',510000,511500,511525,'); +INSERT INTO `oa_city` VALUES (511526, '珙 县', 3, 511500, ',510000,511500,511526,'); +INSERT INTO `oa_city` VALUES (511527, '筠连县', 3, 511500, ',510000,511500,511527,'); +INSERT INTO `oa_city` VALUES (511528, '兴文县', 3, 511500, ',510000,511500,511528,'); +INSERT INTO `oa_city` VALUES (511529, '屏山县', 3, 511500, ',510000,511500,511529,'); +INSERT INTO `oa_city` VALUES (511600, '广安市', 2, 510000, ',510000,511600,'); +INSERT INTO `oa_city` VALUES (511602, '广安区', 3, 511600, ',510000,511600,511602,'); +INSERT INTO `oa_city` VALUES (511621, '岳池县', 3, 511600, ',510000,511600,511621,'); +INSERT INTO `oa_city` VALUES (511622, '武胜县', 3, 511600, ',510000,511600,511622,'); +INSERT INTO `oa_city` VALUES (511623, '邻水县', 3, 511600, ',510000,511600,511623,'); +INSERT INTO `oa_city` VALUES (511681, '华莹市', 3, 511600, ',510000,511600,511681,'); +INSERT INTO `oa_city` VALUES (511700, '达州市', 2, 510000, ',510000,511700,'); +INSERT INTO `oa_city` VALUES (511702, '通川区', 3, 511700, ',510000,511700,511702,'); +INSERT INTO `oa_city` VALUES (511721, '达 县', 3, 511700, ',510000,511700,511721,'); +INSERT INTO `oa_city` VALUES (511722, '宣汉县', 3, 511700, ',510000,511700,511722,'); +INSERT INTO `oa_city` VALUES (511723, '开江县', 3, 511700, ',510000,511700,511723,'); +INSERT INTO `oa_city` VALUES (511724, '大竹县', 3, 511700, ',510000,511700,511724,'); +INSERT INTO `oa_city` VALUES (511725, '渠 县', 3, 511700, ',510000,511700,511725,'); +INSERT INTO `oa_city` VALUES (511781, '万源市', 3, 511700, ',510000,511700,511781,'); +INSERT INTO `oa_city` VALUES (511800, '雅安市', 2, 510000, ',510000,511800,'); +INSERT INTO `oa_city` VALUES (511802, '雨城区', 3, 511800, ',510000,511800,511802,'); +INSERT INTO `oa_city` VALUES (511821, '名山县', 3, 511800, ',510000,511800,511821,'); +INSERT INTO `oa_city` VALUES (511822, '荥经县', 3, 511800, ',510000,511800,511822,'); +INSERT INTO `oa_city` VALUES (511823, '汉源县', 3, 511800, ',510000,511800,511823,'); +INSERT INTO `oa_city` VALUES (511824, '石棉县', 3, 511800, ',510000,511800,511824,'); +INSERT INTO `oa_city` VALUES (511825, '天全县', 3, 511800, ',510000,511800,511825,'); +INSERT INTO `oa_city` VALUES (511826, '芦山县', 3, 511800, ',510000,511800,511826,'); +INSERT INTO `oa_city` VALUES (511827, '宝兴县', 3, 511800, ',510000,511800,511827,'); +INSERT INTO `oa_city` VALUES (511900, '巴中市', 2, 510000, ',510000,511900,'); +INSERT INTO `oa_city` VALUES (511902, '巴州区', 3, 511900, ',510000,511900,511902,'); +INSERT INTO `oa_city` VALUES (511921, '通江县', 3, 511900, ',510000,511900,511921,'); +INSERT INTO `oa_city` VALUES (511922, '南江县', 3, 511900, ',510000,511900,511922,'); +INSERT INTO `oa_city` VALUES (511923, '平昌县', 3, 511900, ',510000,511900,511923,'); +INSERT INTO `oa_city` VALUES (512000, '资阳市', 2, 510000, ',510000,512000,'); +INSERT INTO `oa_city` VALUES (512002, '雁江区', 3, 512000, ',510000,512000,512002,'); +INSERT INTO `oa_city` VALUES (512021, '安岳县', 3, 512000, ',510000,512000,512021,'); +INSERT INTO `oa_city` VALUES (512022, '乐至县', 3, 512000, ',510000,512000,512022,'); +INSERT INTO `oa_city` VALUES (512081, '简阳市', 3, 512000, ',510000,512000,512081,'); +INSERT INTO `oa_city` VALUES (513200, '阿坝藏族羌族自治州', 2, 510000, ',510000,513200,'); +INSERT INTO `oa_city` VALUES (513221, '汶川县', 3, 513200, ',510000,513200,513221,'); +INSERT INTO `oa_city` VALUES (513222, '理 县', 3, 513200, ',510000,513200,513222,'); +INSERT INTO `oa_city` VALUES (513223, '茂 县', 3, 513200, ',510000,513200,513223,'); +INSERT INTO `oa_city` VALUES (513224, '松潘县', 3, 513200, ',510000,513200,513224,'); +INSERT INTO `oa_city` VALUES (513225, '九寨沟县', 3, 513200, ',510000,513200,513225,'); +INSERT INTO `oa_city` VALUES (513226, '金川县', 3, 513200, ',510000,513200,513226,'); +INSERT INTO `oa_city` VALUES (513227, '小金县', 3, 513200, ',510000,513200,513227,'); +INSERT INTO `oa_city` VALUES (513228, '黑水县', 3, 513200, ',510000,513200,513228,'); +INSERT INTO `oa_city` VALUES (513229, '马尔康县', 3, 513200, ',510000,513200,513229,'); +INSERT INTO `oa_city` VALUES (513230, '壤塘县', 3, 513200, ',510000,513200,513230,'); +INSERT INTO `oa_city` VALUES (513231, '阿坝县', 3, 513200, ',510000,513200,513231,'); +INSERT INTO `oa_city` VALUES (513232, '若尔盖县', 3, 513200, ',510000,513200,513232,'); +INSERT INTO `oa_city` VALUES (513233, '红原县', 3, 513200, ',510000,513200,513233,'); +INSERT INTO `oa_city` VALUES (513300, '甘孜藏族自治州', 2, 510000, ',510000,513300,'); +INSERT INTO `oa_city` VALUES (513321, '康定县', 3, 513300, ',510000,513300,513321,'); +INSERT INTO `oa_city` VALUES (513322, '泸定县', 3, 513300, ',510000,513300,513322,'); +INSERT INTO `oa_city` VALUES (513323, '丹巴县', 3, 513300, ',510000,513300,513323,'); +INSERT INTO `oa_city` VALUES (513324, '九龙县', 3, 513300, ',510000,513300,513324,'); +INSERT INTO `oa_city` VALUES (513325, '雅江县', 3, 513300, ',510000,513300,513325,'); +INSERT INTO `oa_city` VALUES (513326, '道孚县', 3, 513300, ',510000,513300,513326,'); +INSERT INTO `oa_city` VALUES (513327, '炉霍县', 3, 513300, ',510000,513300,513327,'); +INSERT INTO `oa_city` VALUES (513328, '甘孜县', 3, 513300, ',510000,513300,513328,'); +INSERT INTO `oa_city` VALUES (513329, '新龙县', 3, 513300, ',510000,513300,513329,'); +INSERT INTO `oa_city` VALUES (513330, '德格县', 3, 513300, ',510000,513300,513330,'); +INSERT INTO `oa_city` VALUES (513331, '白玉县', 3, 513300, ',510000,513300,513331,'); +INSERT INTO `oa_city` VALUES (513332, '石渠县', 3, 513300, ',510000,513300,513332,'); +INSERT INTO `oa_city` VALUES (513333, '色达县', 3, 513300, ',510000,513300,513333,'); +INSERT INTO `oa_city` VALUES (513334, '理塘县', 3, 513300, ',510000,513300,513334,'); +INSERT INTO `oa_city` VALUES (513335, '巴塘县', 3, 513300, ',510000,513300,513335,'); +INSERT INTO `oa_city` VALUES (513336, '乡城县', 3, 513300, ',510000,513300,513336,'); +INSERT INTO `oa_city` VALUES (513337, '稻城县', 3, 513300, ',510000,513300,513337,'); +INSERT INTO `oa_city` VALUES (513338, '得荣县', 3, 513300, ',510000,513300,513338,'); +INSERT INTO `oa_city` VALUES (513400, '凉山彝族自治州', 2, 510000, ',510000,513400,'); +INSERT INTO `oa_city` VALUES (513401, '西昌市', 3, 513400, ',510000,513400,513401,'); +INSERT INTO `oa_city` VALUES (513422, '木里藏族自治县', 3, 513400, ',510000,513400,513422,'); +INSERT INTO `oa_city` VALUES (513423, '盐源县', 3, 513400, ',510000,513400,513423,'); +INSERT INTO `oa_city` VALUES (513424, '德昌县', 3, 513400, ',510000,513400,513424,'); +INSERT INTO `oa_city` VALUES (513425, '会理县', 3, 513400, ',510000,513400,513425,'); +INSERT INTO `oa_city` VALUES (513426, '会东县', 3, 513400, ',510000,513400,513426,'); +INSERT INTO `oa_city` VALUES (513427, '宁南县', 3, 513400, ',510000,513400,513427,'); +INSERT INTO `oa_city` VALUES (513428, '普格县', 3, 513400, ',510000,513400,513428,'); +INSERT INTO `oa_city` VALUES (513429, '布拖县', 3, 513400, ',510000,513400,513429,'); +INSERT INTO `oa_city` VALUES (513430, '金阳县', 3, 513400, ',510000,513400,513430,'); +INSERT INTO `oa_city` VALUES (513431, '昭觉县', 3, 513400, ',510000,513400,513431,'); +INSERT INTO `oa_city` VALUES (513432, '喜德县', 3, 513400, ',510000,513400,513432,'); +INSERT INTO `oa_city` VALUES (513433, '冕宁县', 3, 513400, ',510000,513400,513433,'); +INSERT INTO `oa_city` VALUES (513434, '越西县', 3, 513400, ',510000,513400,513434,'); +INSERT INTO `oa_city` VALUES (513435, '甘洛县', 3, 513400, ',510000,513400,513435,'); +INSERT INTO `oa_city` VALUES (513436, '美姑县', 3, 513400, ',510000,513400,513436,'); +INSERT INTO `oa_city` VALUES (513437, '雷波县', 3, 513400, ',510000,513400,513437,'); +INSERT INTO `oa_city` VALUES (520000, '贵州省', 1, 0, ',520000,'); +INSERT INTO `oa_city` VALUES (520100, '贵阳市', 2, 520000, ',520000,520100,'); +INSERT INTO `oa_city` VALUES (520102, '南明区', 3, 520100, ',520000,520100,520102,'); +INSERT INTO `oa_city` VALUES (520103, '云岩区', 3, 520100, ',520000,520100,520103,'); +INSERT INTO `oa_city` VALUES (520111, '花溪区', 3, 520100, ',520000,520100,520111,'); +INSERT INTO `oa_city` VALUES (520112, '乌当区', 3, 520100, ',520000,520100,520112,'); +INSERT INTO `oa_city` VALUES (520113, '白云区', 3, 520100, ',520000,520100,520113,'); +INSERT INTO `oa_city` VALUES (520114, '小河区', 3, 520100, ',520000,520100,520114,'); +INSERT INTO `oa_city` VALUES (520115, '观山湖区', 3, 520100, ',520000,520100,520115,'); +INSERT INTO `oa_city` VALUES (520121, '开阳县', 3, 520100, ',520000,520100,520121,'); +INSERT INTO `oa_city` VALUES (520122, '息烽县', 3, 520100, ',520000,520100,520122,'); +INSERT INTO `oa_city` VALUES (520123, '修文县', 3, 520100, ',520000,520100,520123,'); +INSERT INTO `oa_city` VALUES (520181, '清镇市', 3, 520100, ',520000,520100,520181,'); +INSERT INTO `oa_city` VALUES (520200, '六盘水市', 2, 520000, ',520000,520200,'); +INSERT INTO `oa_city` VALUES (520201, '钟山区', 3, 520200, ',520000,520200,520201,'); +INSERT INTO `oa_city` VALUES (520203, '六枝特区', 3, 520200, ',520000,520200,520203,'); +INSERT INTO `oa_city` VALUES (520221, '水城县', 3, 520200, ',520000,520200,520221,'); +INSERT INTO `oa_city` VALUES (520222, '盘 县', 3, 520200, ',520000,520200,520222,'); +INSERT INTO `oa_city` VALUES (520300, '遵义市', 2, 520000, ',520000,520300,'); +INSERT INTO `oa_city` VALUES (520302, '红花岗区', 3, 520300, ',520000,520300,520302,'); +INSERT INTO `oa_city` VALUES (520303, '汇川区', 3, 520300, ',520000,520300,520303,'); +INSERT INTO `oa_city` VALUES (520321, '遵义县', 3, 520300, ',520000,520300,520321,'); +INSERT INTO `oa_city` VALUES (520322, '桐梓县', 3, 520300, ',520000,520300,520322,'); +INSERT INTO `oa_city` VALUES (520323, '绥阳县', 3, 520300, ',520000,520300,520323,'); +INSERT INTO `oa_city` VALUES (520324, '正安县', 3, 520300, ',520000,520300,520324,'); +INSERT INTO `oa_city` VALUES (520325, '道真仡佬族苗族自治县', 3, 520300, ',520000,520300,520325,'); +INSERT INTO `oa_city` VALUES (520326, '务川仡佬族苗族自治县', 3, 520300, ',520000,520300,520326,'); +INSERT INTO `oa_city` VALUES (520327, '凤冈县', 3, 520300, ',520000,520300,520327,'); +INSERT INTO `oa_city` VALUES (520328, '湄潭县', 3, 520300, ',520000,520300,520328,'); +INSERT INTO `oa_city` VALUES (520329, '余庆县', 3, 520300, ',520000,520300,520329,'); +INSERT INTO `oa_city` VALUES (520330, '习水县', 3, 520300, ',520000,520300,520330,'); +INSERT INTO `oa_city` VALUES (520381, '赤水市', 3, 520300, ',520000,520300,520381,'); +INSERT INTO `oa_city` VALUES (520382, '仁怀市', 3, 520300, ',520000,520300,520382,'); +INSERT INTO `oa_city` VALUES (520400, '安顺市', 2, 520000, ',520000,520400,'); +INSERT INTO `oa_city` VALUES (520402, '西秀区', 3, 520400, ',520000,520400,520402,'); +INSERT INTO `oa_city` VALUES (520421, '平坝县', 3, 520400, ',520000,520400,520421,'); +INSERT INTO `oa_city` VALUES (520422, '普定县', 3, 520400, ',520000,520400,520422,'); +INSERT INTO `oa_city` VALUES (520423, '镇宁布依族苗族自治县', 3, 520400, ',520000,520400,520423,'); +INSERT INTO `oa_city` VALUES (520424, '关岭布依族苗族自治县', 3, 520400, ',520000,520400,520424,'); +INSERT INTO `oa_city` VALUES (520425, '紫云苗族布依族自治县', 3, 520400, ',520000,520400,520425,'); +INSERT INTO `oa_city` VALUES (522200, '铜仁地区', 2, 520000, ',520000,522200,'); +INSERT INTO `oa_city` VALUES (522201, '铜仁市', 3, 522200, ',520000,522200,522201,'); +INSERT INTO `oa_city` VALUES (522222, '江口县', 3, 522200, ',520000,522200,522222,'); +INSERT INTO `oa_city` VALUES (522223, '玉屏侗族自治县', 3, 522200, ',520000,522200,522223,'); +INSERT INTO `oa_city` VALUES (522224, '石阡县', 3, 522200, ',520000,522200,522224,'); +INSERT INTO `oa_city` VALUES (522225, '思南县', 3, 522200, ',520000,522200,522225,'); +INSERT INTO `oa_city` VALUES (522226, '印江土家族苗族自治县', 3, 522200, ',520000,522200,522226,'); +INSERT INTO `oa_city` VALUES (522227, '德江县', 3, 522200, ',520000,522200,522227,'); +INSERT INTO `oa_city` VALUES (522228, '沿河土家族自治县', 3, 522200, ',520000,522200,522228,'); +INSERT INTO `oa_city` VALUES (522229, '松桃苗族自治县', 3, 522200, ',520000,522200,522229,'); +INSERT INTO `oa_city` VALUES (522230, '万山特区', 3, 522200, ',520000,522200,522230,'); +INSERT INTO `oa_city` VALUES (522300, '黔西南布依族苗族自治州', 2, 520000, ',520000,522300,'); +INSERT INTO `oa_city` VALUES (522301, '兴义市', 3, 522300, ',520000,522300,522301,'); +INSERT INTO `oa_city` VALUES (522322, '兴仁县', 3, 522300, ',520000,522300,522322,'); +INSERT INTO `oa_city` VALUES (522323, '普安县', 3, 522300, ',520000,522300,522323,'); +INSERT INTO `oa_city` VALUES (522324, '晴隆县', 3, 522300, ',520000,522300,522324,'); +INSERT INTO `oa_city` VALUES (522325, '贞丰县', 3, 522300, ',520000,522300,522325,'); +INSERT INTO `oa_city` VALUES (522326, '望谟县', 3, 522300, ',520000,522300,522326,'); +INSERT INTO `oa_city` VALUES (522327, '册亨县', 3, 522300, ',520000,522300,522327,'); +INSERT INTO `oa_city` VALUES (522328, '安龙县', 3, 522300, ',520000,522300,522328,'); +INSERT INTO `oa_city` VALUES (522400, '毕节地区', 2, 520000, ',520000,522400,'); +INSERT INTO `oa_city` VALUES (522401, '毕节市', 3, 522400, ',520000,522400,522401,'); +INSERT INTO `oa_city` VALUES (522422, '大方县', 3, 522400, ',520000,522400,522422,'); +INSERT INTO `oa_city` VALUES (522423, '黔西县', 3, 522400, ',520000,522400,522423,'); +INSERT INTO `oa_city` VALUES (522424, '金沙县', 3, 522400, ',520000,522400,522424,'); +INSERT INTO `oa_city` VALUES (522425, '织金县', 3, 522400, ',520000,522400,522425,'); +INSERT INTO `oa_city` VALUES (522426, '纳雍县', 3, 522400, ',520000,522400,522426,'); +INSERT INTO `oa_city` VALUES (522427, '威宁彝族回族苗族自治县', 3, 522400, ',520000,522400,522427,'); +INSERT INTO `oa_city` VALUES (522428, '赫章县', 3, 522400, ',520000,522400,522428,'); +INSERT INTO `oa_city` VALUES (522600, '黔东南苗族侗族自治州', 2, 520000, ',520000,522600,'); +INSERT INTO `oa_city` VALUES (522601, '凯里市', 3, 522600, ',520000,522600,522601,'); +INSERT INTO `oa_city` VALUES (522622, '黄平县', 3, 522600, ',520000,522600,522622,'); +INSERT INTO `oa_city` VALUES (522623, '施秉县', 3, 522600, ',520000,522600,522623,'); +INSERT INTO `oa_city` VALUES (522624, '三穗县', 3, 522600, ',520000,522600,522624,'); +INSERT INTO `oa_city` VALUES (522625, '镇远县', 3, 522600, ',520000,522600,522625,'); +INSERT INTO `oa_city` VALUES (522626, '岑巩县', 3, 522600, ',520000,522600,522626,'); +INSERT INTO `oa_city` VALUES (522627, '天柱县', 3, 522600, ',520000,522600,522627,'); +INSERT INTO `oa_city` VALUES (522628, '锦屏县', 3, 522600, ',520000,522600,522628,'); +INSERT INTO `oa_city` VALUES (522629, '剑河县', 3, 522600, ',520000,522600,522629,'); +INSERT INTO `oa_city` VALUES (522630, '台江县', 3, 522600, ',520000,522600,522630,'); +INSERT INTO `oa_city` VALUES (522631, '黎平县', 3, 522600, ',520000,522600,522631,'); +INSERT INTO `oa_city` VALUES (522632, '榕江县', 3, 522600, ',520000,522600,522632,'); +INSERT INTO `oa_city` VALUES (522633, '从江县', 3, 522600, ',520000,522600,522633,'); +INSERT INTO `oa_city` VALUES (522634, '雷山县', 3, 522600, ',520000,522600,522634,'); +INSERT INTO `oa_city` VALUES (522635, '麻江县', 3, 522600, ',520000,522600,522635,'); +INSERT INTO `oa_city` VALUES (522636, '丹寨县', 3, 522600, ',520000,522600,522636,'); +INSERT INTO `oa_city` VALUES (522700, '黔南布依族苗族自治州', 2, 520000, ',520000,522700,'); +INSERT INTO `oa_city` VALUES (522701, '都匀市', 3, 522700, ',520000,522700,522701,'); +INSERT INTO `oa_city` VALUES (522702, '福泉市', 3, 522700, ',520000,522700,522702,'); +INSERT INTO `oa_city` VALUES (522722, '荔波县', 3, 522700, ',520000,522700,522722,'); +INSERT INTO `oa_city` VALUES (522723, '贵定县', 3, 522700, ',520000,522700,522723,'); +INSERT INTO `oa_city` VALUES (522725, '瓮安县', 3, 522700, ',520000,522700,522725,'); +INSERT INTO `oa_city` VALUES (522726, '独山县', 3, 522700, ',520000,522700,522726,'); +INSERT INTO `oa_city` VALUES (522727, '平塘县', 3, 522700, ',520000,522700,522727,'); +INSERT INTO `oa_city` VALUES (522728, '罗甸县', 3, 522700, ',520000,522700,522728,'); +INSERT INTO `oa_city` VALUES (522729, '长顺县', 3, 522700, ',520000,522700,522729,'); +INSERT INTO `oa_city` VALUES (522730, '龙里县', 3, 522700, ',520000,522700,522730,'); +INSERT INTO `oa_city` VALUES (522731, '惠水县', 3, 522700, ',520000,522700,522731,'); +INSERT INTO `oa_city` VALUES (522732, '三都水族自治县', 3, 522700, ',520000,522700,522732,'); +INSERT INTO `oa_city` VALUES (530000, '云南省', 1, 0, ',530000,'); +INSERT INTO `oa_city` VALUES (530100, '昆明市', 2, 530000, ',530000,530100,'); +INSERT INTO `oa_city` VALUES (530102, '五华区', 3, 530100, ',530000,530100,530102,'); +INSERT INTO `oa_city` VALUES (530103, '盘龙区', 3, 530100, ',530000,530100,530103,'); +INSERT INTO `oa_city` VALUES (530111, '官渡区', 3, 530100, ',530000,530100,530111,'); +INSERT INTO `oa_city` VALUES (530112, '西山区', 3, 530100, ',530000,530100,530112,'); +INSERT INTO `oa_city` VALUES (530113, '东川区', 3, 530100, ',530000,530100,530113,'); +INSERT INTO `oa_city` VALUES (530121, '呈贡县', 3, 530100, ',530000,530100,530121,'); +INSERT INTO `oa_city` VALUES (530122, '晋宁县', 3, 530100, ',530000,530100,530122,'); +INSERT INTO `oa_city` VALUES (530124, '富民县', 3, 530100, ',530000,530100,530124,'); +INSERT INTO `oa_city` VALUES (530125, '宜良县', 3, 530100, ',530000,530100,530125,'); +INSERT INTO `oa_city` VALUES (530126, '石林彝族自治县', 3, 530100, ',530000,530100,530126,'); +INSERT INTO `oa_city` VALUES (530127, '嵩明县', 3, 530100, ',530000,530100,530127,'); +INSERT INTO `oa_city` VALUES (530128, '禄劝彝族苗族自治县', 3, 530100, ',530000,530100,530128,'); +INSERT INTO `oa_city` VALUES (530129, '寻甸回族彝族自治县', 3, 530100, ',530000,530100,530129,'); +INSERT INTO `oa_city` VALUES (530181, '安宁市', 3, 530100, ',530000,530100,530181,'); +INSERT INTO `oa_city` VALUES (530300, '曲靖市', 2, 530000, ',530000,530300,'); +INSERT INTO `oa_city` VALUES (530302, '麒麟区', 3, 530300, ',530000,530300,530302,'); +INSERT INTO `oa_city` VALUES (530321, '马龙县', 3, 530300, ',530000,530300,530321,'); +INSERT INTO `oa_city` VALUES (530322, '陆良县', 3, 530300, ',530000,530300,530322,'); +INSERT INTO `oa_city` VALUES (530323, '师宗县', 3, 530300, ',530000,530300,530323,'); +INSERT INTO `oa_city` VALUES (530324, '罗平县', 3, 530300, ',530000,530300,530324,'); +INSERT INTO `oa_city` VALUES (530325, '富源县', 3, 530300, ',530000,530300,530325,'); +INSERT INTO `oa_city` VALUES (530326, '会泽县', 3, 530300, ',530000,530300,530326,'); +INSERT INTO `oa_city` VALUES (530328, '沾益县', 3, 530300, ',530000,530300,530328,'); +INSERT INTO `oa_city` VALUES (530381, '宣威市', 3, 530300, ',530000,530300,530381,'); +INSERT INTO `oa_city` VALUES (530400, '玉溪市', 2, 530000, ',530000,530400,'); +INSERT INTO `oa_city` VALUES (530402, '红塔区', 3, 530400, ',530000,530400,530402,'); +INSERT INTO `oa_city` VALUES (530421, '江川县', 3, 530400, ',530000,530400,530421,'); +INSERT INTO `oa_city` VALUES (530422, '澄江县', 3, 530400, ',530000,530400,530422,'); +INSERT INTO `oa_city` VALUES (530423, '通海县', 3, 530400, ',530000,530400,530423,'); +INSERT INTO `oa_city` VALUES (530424, '华宁县', 3, 530400, ',530000,530400,530424,'); +INSERT INTO `oa_city` VALUES (530425, '易门县', 3, 530400, ',530000,530400,530425,'); +INSERT INTO `oa_city` VALUES (530426, '峨山彝族自治县', 3, 530400, ',530000,530400,530426,'); +INSERT INTO `oa_city` VALUES (530427, '新平彝族傣族自治县', 3, 530400, ',530000,530400,530427,'); +INSERT INTO `oa_city` VALUES (530428, '元江哈尼族彝族傣族自治县', 3, 530400, ',530000,530400,530428,'); +INSERT INTO `oa_city` VALUES (530500, '保山市', 2, 530000, ',530000,530500,'); +INSERT INTO `oa_city` VALUES (530502, '隆阳区', 3, 530500, ',530000,530500,530502,'); +INSERT INTO `oa_city` VALUES (530521, '施甸县', 3, 530500, ',530000,530500,530521,'); +INSERT INTO `oa_city` VALUES (530522, '腾冲县', 3, 530500, ',530000,530500,530522,'); +INSERT INTO `oa_city` VALUES (530523, '龙陵县', 3, 530500, ',530000,530500,530523,'); +INSERT INTO `oa_city` VALUES (530524, '昌宁县', 3, 530500, ',530000,530500,530524,'); +INSERT INTO `oa_city` VALUES (530600, '昭通市', 2, 530000, ',530000,530600,'); +INSERT INTO `oa_city` VALUES (530602, '昭阳区', 3, 530600, ',530000,530600,530602,'); +INSERT INTO `oa_city` VALUES (530621, '鲁甸县', 3, 530600, ',530000,530600,530621,'); +INSERT INTO `oa_city` VALUES (530622, '巧家县', 3, 530600, ',530000,530600,530622,'); +INSERT INTO `oa_city` VALUES (530623, '盐津县', 3, 530600, ',530000,530600,530623,'); +INSERT INTO `oa_city` VALUES (530624, '大关县', 3, 530600, ',530000,530600,530624,'); +INSERT INTO `oa_city` VALUES (530625, '永善县', 3, 530600, ',530000,530600,530625,'); +INSERT INTO `oa_city` VALUES (530626, '绥江县', 3, 530600, ',530000,530600,530626,'); +INSERT INTO `oa_city` VALUES (530627, '镇雄县', 3, 530600, ',530000,530600,530627,'); +INSERT INTO `oa_city` VALUES (530628, '彝良县', 3, 530600, ',530000,530600,530628,'); +INSERT INTO `oa_city` VALUES (530629, '威信县', 3, 530600, ',530000,530600,530629,'); +INSERT INTO `oa_city` VALUES (530630, '水富县', 3, 530600, ',530000,530600,530630,'); +INSERT INTO `oa_city` VALUES (530700, '丽江市', 2, 530000, ',530000,530700,'); +INSERT INTO `oa_city` VALUES (530702, '古城区', 3, 530700, ',530000,530700,530702,'); +INSERT INTO `oa_city` VALUES (530721, '玉龙纳西族自治县', 3, 530700, ',530000,530700,530721,'); +INSERT INTO `oa_city` VALUES (530722, '永胜县', 3, 530700, ',530000,530700,530722,'); +INSERT INTO `oa_city` VALUES (530723, '华坪县', 3, 530700, ',530000,530700,530723,'); +INSERT INTO `oa_city` VALUES (530724, '宁蒗彝族自治县', 3, 530700, ',530000,530700,530724,'); +INSERT INTO `oa_city` VALUES (530800, '思茅市', 2, 530000, ',530000,530800,'); +INSERT INTO `oa_city` VALUES (530802, '翠云区', 3, 530800, ',530000,530800,530802,'); +INSERT INTO `oa_city` VALUES (530821, '普洱哈尼族彝族自治县', 3, 530800, ',530000,530800,530821,'); +INSERT INTO `oa_city` VALUES (530822, '墨江哈尼族自治县', 3, 530800, ',530000,530800,530822,'); +INSERT INTO `oa_city` VALUES (530823, '景东彝族自治县', 3, 530800, ',530000,530800,530823,'); +INSERT INTO `oa_city` VALUES (530824, '景谷傣族彝族自治县', 3, 530800, ',530000,530800,530824,'); +INSERT INTO `oa_city` VALUES (530825, '镇沅彝族哈尼族拉祜族自治县', 3, 530800, ',530000,530800,530825,'); +INSERT INTO `oa_city` VALUES (530826, '江城哈尼族彝族自治县', 3, 530800, ',530000,530800,530826,'); +INSERT INTO `oa_city` VALUES (530827, '孟连傣族拉祜族佤族自治县', 3, 530800, ',530000,530800,530827,'); +INSERT INTO `oa_city` VALUES (530828, '澜沧拉祜族自治县', 3, 530800, ',530000,530800,530828,'); +INSERT INTO `oa_city` VALUES (530829, '西盟佤族自治县', 3, 530800, ',530000,530800,530829,'); +INSERT INTO `oa_city` VALUES (530900, '临沧市', 2, 530000, ',530000,530900,'); +INSERT INTO `oa_city` VALUES (530902, '临翔区', 3, 530900, ',530000,530900,530902,'); +INSERT INTO `oa_city` VALUES (530921, '凤庆县', 3, 530900, ',530000,530900,530921,'); +INSERT INTO `oa_city` VALUES (530922, '云 县', 3, 530900, ',530000,530900,530922,'); +INSERT INTO `oa_city` VALUES (530923, '永德县', 3, 530900, ',530000,530900,530923,'); +INSERT INTO `oa_city` VALUES (530924, '镇康县', 3, 530900, ',530000,530900,530924,'); +INSERT INTO `oa_city` VALUES (530925, '双江拉祜族佤族布朗族傣族自治县', 3, 530900, ',530000,530900,530925,'); +INSERT INTO `oa_city` VALUES (530926, '耿马傣族佤族自治县', 3, 530900, ',530000,530900,530926,'); +INSERT INTO `oa_city` VALUES (530927, '沧源佤族自治县', 3, 530900, ',530000,530900,530927,'); +INSERT INTO `oa_city` VALUES (532300, '楚雄彝族自治州', 2, 530000, ',530000,532300,'); +INSERT INTO `oa_city` VALUES (532301, '楚雄市', 3, 532300, ',530000,532300,532301,'); +INSERT INTO `oa_city` VALUES (532322, '双柏县', 3, 532300, ',530000,532300,532322,'); +INSERT INTO `oa_city` VALUES (532323, '牟定县', 3, 532300, ',530000,532300,532323,'); +INSERT INTO `oa_city` VALUES (532324, '南华县', 3, 532300, ',530000,532300,532324,'); +INSERT INTO `oa_city` VALUES (532325, '姚安县', 3, 532300, ',530000,532300,532325,'); +INSERT INTO `oa_city` VALUES (532326, '大姚县', 3, 532300, ',530000,532300,532326,'); +INSERT INTO `oa_city` VALUES (532327, '永仁县', 3, 532300, ',530000,532300,532327,'); +INSERT INTO `oa_city` VALUES (532328, '元谋县', 3, 532300, ',530000,532300,532328,'); +INSERT INTO `oa_city` VALUES (532329, '武定县', 3, 532300, ',530000,532300,532329,'); +INSERT INTO `oa_city` VALUES (532331, '禄丰县', 3, 532300, ',530000,532300,532331,'); +INSERT INTO `oa_city` VALUES (532500, '红河哈尼族彝族自治州', 2, 530000, ',530000,532500,'); +INSERT INTO `oa_city` VALUES (532501, '个旧市', 3, 532500, ',530000,532500,532501,'); +INSERT INTO `oa_city` VALUES (532502, '开远市', 3, 532500, ',530000,532500,532502,'); +INSERT INTO `oa_city` VALUES (532522, '蒙自县', 3, 532500, ',530000,532500,532522,'); +INSERT INTO `oa_city` VALUES (532523, '屏边苗族自治县', 3, 532500, ',530000,532500,532523,'); +INSERT INTO `oa_city` VALUES (532524, '建水县', 3, 532500, ',530000,532500,532524,'); +INSERT INTO `oa_city` VALUES (532525, '石屏县', 3, 532500, ',530000,532500,532525,'); +INSERT INTO `oa_city` VALUES (532526, '弥勒县', 3, 532500, ',530000,532500,532526,'); +INSERT INTO `oa_city` VALUES (532527, '泸西县', 3, 532500, ',530000,532500,532527,'); +INSERT INTO `oa_city` VALUES (532528, '元阳县', 3, 532500, ',530000,532500,532528,'); +INSERT INTO `oa_city` VALUES (532529, '红河县', 3, 532500, ',530000,532500,532529,'); +INSERT INTO `oa_city` VALUES (532530, '金平苗族瑶族傣族自治县', 3, 532500, ',530000,532500,532530,'); +INSERT INTO `oa_city` VALUES (532531, '绿春县', 3, 532500, ',530000,532500,532531,'); +INSERT INTO `oa_city` VALUES (532532, '河口瑶族自治县', 3, 532500, ',530000,532500,532532,'); +INSERT INTO `oa_city` VALUES (532600, '文山壮族苗族自治州', 2, 530000, ',530000,532600,'); +INSERT INTO `oa_city` VALUES (532621, '文山县', 3, 532600, ',530000,532600,532621,'); +INSERT INTO `oa_city` VALUES (532622, '砚山县', 3, 532600, ',530000,532600,532622,'); +INSERT INTO `oa_city` VALUES (532623, '西畴县', 3, 532600, ',530000,532600,532623,'); +INSERT INTO `oa_city` VALUES (532624, '麻栗坡县', 3, 532600, ',530000,532600,532624,'); +INSERT INTO `oa_city` VALUES (532625, '马关县', 3, 532600, ',530000,532600,532625,'); +INSERT INTO `oa_city` VALUES (532626, '丘北县', 3, 532600, ',530000,532600,532626,'); +INSERT INTO `oa_city` VALUES (532627, '广南县', 3, 532600, ',530000,532600,532627,'); +INSERT INTO `oa_city` VALUES (532628, '富宁县', 3, 532600, ',530000,532600,532628,'); +INSERT INTO `oa_city` VALUES (532800, '西双版纳傣族自治州', 2, 530000, ',530000,532800,'); +INSERT INTO `oa_city` VALUES (532801, '景洪市', 3, 532800, ',530000,532800,532801,'); +INSERT INTO `oa_city` VALUES (532822, '勐海县', 3, 532800, ',530000,532800,532822,'); +INSERT INTO `oa_city` VALUES (532823, '勐腊县', 3, 532800, ',530000,532800,532823,'); +INSERT INTO `oa_city` VALUES (532900, '大理白族自治州', 2, 530000, ',530000,532900,'); +INSERT INTO `oa_city` VALUES (532901, '大理市', 3, 532900, ',530000,532900,532901,'); +INSERT INTO `oa_city` VALUES (532922, '漾濞彝族自治县', 3, 532900, ',530000,532900,532922,'); +INSERT INTO `oa_city` VALUES (532923, '祥云县', 3, 532900, ',530000,532900,532923,'); +INSERT INTO `oa_city` VALUES (532924, '宾川县', 3, 532900, ',530000,532900,532924,'); +INSERT INTO `oa_city` VALUES (532925, '弥渡县', 3, 532900, ',530000,532900,532925,'); +INSERT INTO `oa_city` VALUES (532926, '南涧彝族自治县', 3, 532900, ',530000,532900,532926,'); +INSERT INTO `oa_city` VALUES (532927, '巍山彝族回族自治县', 3, 532900, ',530000,532900,532927,'); +INSERT INTO `oa_city` VALUES (532928, '永平县', 3, 532900, ',530000,532900,532928,'); +INSERT INTO `oa_city` VALUES (532929, '云龙县', 3, 532900, ',530000,532900,532929,'); +INSERT INTO `oa_city` VALUES (532930, '洱源县', 3, 532900, ',530000,532900,532930,'); +INSERT INTO `oa_city` VALUES (532931, '剑川县', 3, 532900, ',530000,532900,532931,'); +INSERT INTO `oa_city` VALUES (532932, '鹤庆县', 3, 532900, ',530000,532900,532932,'); +INSERT INTO `oa_city` VALUES (533100, '德宏傣族景颇族自治州', 2, 530000, ',530000,533100,'); +INSERT INTO `oa_city` VALUES (533102, '瑞丽市', 3, 533100, ',530000,533100,533102,'); +INSERT INTO `oa_city` VALUES (533103, '潞西市', 3, 533100, ',530000,533100,533103,'); +INSERT INTO `oa_city` VALUES (533122, '梁河县', 3, 533100, ',530000,533100,533122,'); +INSERT INTO `oa_city` VALUES (533123, '盈江县', 3, 533100, ',530000,533100,533123,'); +INSERT INTO `oa_city` VALUES (533124, '陇川县', 3, 533100, ',530000,533100,533124,'); +INSERT INTO `oa_city` VALUES (533300, '怒江傈僳族自治州', 2, 530000, ',530000,533300,'); +INSERT INTO `oa_city` VALUES (533321, '泸水县', 3, 533300, ',530000,533300,533321,'); +INSERT INTO `oa_city` VALUES (533323, '福贡县', 3, 533300, ',530000,533300,533323,'); +INSERT INTO `oa_city` VALUES (533324, '贡山独龙族怒族自治县', 3, 533300, ',530000,533300,533324,'); +INSERT INTO `oa_city` VALUES (533325, '兰坪白族普米族自治县', 3, 533300, ',530000,533300,533325,'); +INSERT INTO `oa_city` VALUES (533400, '迪庆藏族自治州', 2, 530000, ',530000,533400,'); +INSERT INTO `oa_city` VALUES (533421, '香格里拉县', 3, 533400, ',530000,533400,533421,'); +INSERT INTO `oa_city` VALUES (533422, '德钦县', 3, 533400, ',530000,533400,533422,'); +INSERT INTO `oa_city` VALUES (533423, '维西傈僳族自治县', 3, 533400, ',530000,533400,533423,'); +INSERT INTO `oa_city` VALUES (540000, '西 藏', 1, 0, ',540000,'); +INSERT INTO `oa_city` VALUES (540100, '拉萨市', 2, 540000, ',540000,540100,'); +INSERT INTO `oa_city` VALUES (540102, '城关区', 3, 540100, ',540000,540100,540102,'); +INSERT INTO `oa_city` VALUES (540121, '林周县', 3, 540100, ',540000,540100,540121,'); +INSERT INTO `oa_city` VALUES (540122, '当雄县', 3, 540100, ',540000,540100,540122,'); +INSERT INTO `oa_city` VALUES (540123, '尼木县', 3, 540100, ',540000,540100,540123,'); +INSERT INTO `oa_city` VALUES (540124, '曲水县', 3, 540100, ',540000,540100,540124,'); +INSERT INTO `oa_city` VALUES (540125, '堆龙德庆县', 3, 540100, ',540000,540100,540125,'); +INSERT INTO `oa_city` VALUES (540126, '达孜县', 3, 540100, ',540000,540100,540126,'); +INSERT INTO `oa_city` VALUES (540127, '墨竹工卡县', 3, 540100, ',540000,540100,540127,'); +INSERT INTO `oa_city` VALUES (542100, '昌都地区', 2, 540000, ',540000,542100,'); +INSERT INTO `oa_city` VALUES (542121, '昌都县', 3, 542100, ',540000,542100,542121,'); +INSERT INTO `oa_city` VALUES (542122, '江达县', 3, 542100, ',540000,542100,542122,'); +INSERT INTO `oa_city` VALUES (542123, '贡觉县', 3, 542100, ',540000,542100,542123,'); +INSERT INTO `oa_city` VALUES (542124, '类乌齐县', 3, 542100, ',540000,542100,542124,'); +INSERT INTO `oa_city` VALUES (542125, '丁青县', 3, 542100, ',540000,542100,542125,'); +INSERT INTO `oa_city` VALUES (542126, '察雅县', 3, 542100, ',540000,542100,542126,'); +INSERT INTO `oa_city` VALUES (542127, '八宿县', 3, 542100, ',540000,542100,542127,'); +INSERT INTO `oa_city` VALUES (542128, '左贡县', 3, 542100, ',540000,542100,542128,'); +INSERT INTO `oa_city` VALUES (542129, '芒康县', 3, 542100, ',540000,542100,542129,'); +INSERT INTO `oa_city` VALUES (542132, '洛隆县', 3, 542100, ',540000,542100,542132,'); +INSERT INTO `oa_city` VALUES (542133, '边坝县', 3, 542100, ',540000,542100,542133,'); +INSERT INTO `oa_city` VALUES (542200, '山南地区', 2, 540000, ',540000,542200,'); +INSERT INTO `oa_city` VALUES (542221, '乃东县', 3, 542200, ',540000,542200,542221,'); +INSERT INTO `oa_city` VALUES (542222, '扎囊县', 3, 542200, ',540000,542200,542222,'); +INSERT INTO `oa_city` VALUES (542223, '贡嘎县', 3, 542200, ',540000,542200,542223,'); +INSERT INTO `oa_city` VALUES (542224, '桑日县', 3, 542200, ',540000,542200,542224,'); +INSERT INTO `oa_city` VALUES (542225, '琼结县', 3, 542200, ',540000,542200,542225,'); +INSERT INTO `oa_city` VALUES (542226, '曲松县', 3, 542200, ',540000,542200,542226,'); +INSERT INTO `oa_city` VALUES (542227, '措美县', 3, 542200, ',540000,542200,542227,'); +INSERT INTO `oa_city` VALUES (542228, '洛扎县', 3, 542200, ',540000,542200,542228,'); +INSERT INTO `oa_city` VALUES (542229, '加查县', 3, 542200, ',540000,542200,542229,'); +INSERT INTO `oa_city` VALUES (542231, '隆子县', 3, 542200, ',540000,542200,542231,'); +INSERT INTO `oa_city` VALUES (542232, '错那县', 3, 542200, ',540000,542200,542232,'); +INSERT INTO `oa_city` VALUES (542233, '浪卡子县', 3, 542200, ',540000,542200,542233,'); +INSERT INTO `oa_city` VALUES (542300, '日喀则地区', 2, 540000, ',540000,542300,'); +INSERT INTO `oa_city` VALUES (542301, '日喀则市', 3, 542300, ',540000,542300,542301,'); +INSERT INTO `oa_city` VALUES (542322, '南木林县', 3, 542300, ',540000,542300,542322,'); +INSERT INTO `oa_city` VALUES (542323, '江孜县', 3, 542300, ',540000,542300,542323,'); +INSERT INTO `oa_city` VALUES (542324, '定日县', 3, 542300, ',540000,542300,542324,'); +INSERT INTO `oa_city` VALUES (542325, '萨迦县', 3, 542300, ',540000,542300,542325,'); +INSERT INTO `oa_city` VALUES (542326, '拉孜县', 3, 542300, ',540000,542300,542326,'); +INSERT INTO `oa_city` VALUES (542327, '昂仁县', 3, 542300, ',540000,542300,542327,'); +INSERT INTO `oa_city` VALUES (542328, '谢通门县', 3, 542300, ',540000,542300,542328,'); +INSERT INTO `oa_city` VALUES (542329, '白朗县', 3, 542300, ',540000,542300,542329,'); +INSERT INTO `oa_city` VALUES (542330, '仁布县', 3, 542300, ',540000,542300,542330,'); +INSERT INTO `oa_city` VALUES (542331, '康马县', 3, 542300, ',540000,542300,542331,'); +INSERT INTO `oa_city` VALUES (542332, '定结县', 3, 542300, ',540000,542300,542332,'); +INSERT INTO `oa_city` VALUES (542333, '仲巴县', 3, 542300, ',540000,542300,542333,'); +INSERT INTO `oa_city` VALUES (542334, '亚东县', 3, 542300, ',540000,542300,542334,'); +INSERT INTO `oa_city` VALUES (542335, '吉隆县', 3, 542300, ',540000,542300,542335,'); +INSERT INTO `oa_city` VALUES (542336, '聂拉木县', 3, 542300, ',540000,542300,542336,'); +INSERT INTO `oa_city` VALUES (542337, '萨嘎县', 3, 542300, ',540000,542300,542337,'); +INSERT INTO `oa_city` VALUES (542338, '岗巴县', 3, 542300, ',540000,542300,542338,'); +INSERT INTO `oa_city` VALUES (542400, '那曲地区', 2, 540000, ',540000,542400,'); +INSERT INTO `oa_city` VALUES (542421, '那曲县', 3, 542400, ',540000,542400,542421,'); +INSERT INTO `oa_city` VALUES (542422, '嘉黎县', 3, 542400, ',540000,542400,542422,'); +INSERT INTO `oa_city` VALUES (542423, '比如县', 3, 542400, ',540000,542400,542423,'); +INSERT INTO `oa_city` VALUES (542424, '聂荣县', 3, 542400, ',540000,542400,542424,'); +INSERT INTO `oa_city` VALUES (542425, '安多县', 3, 542400, ',540000,542400,542425,'); +INSERT INTO `oa_city` VALUES (542426, '申扎县', 3, 542400, ',540000,542400,542426,'); +INSERT INTO `oa_city` VALUES (542427, '索 县', 3, 542400, ',540000,542400,542427,'); +INSERT INTO `oa_city` VALUES (542428, '班戈县', 3, 542400, ',540000,542400,542428,'); +INSERT INTO `oa_city` VALUES (542429, '巴青县', 3, 542400, ',540000,542400,542429,'); +INSERT INTO `oa_city` VALUES (542430, '尼玛县', 3, 542400, ',540000,542400,542430,'); +INSERT INTO `oa_city` VALUES (542500, '阿里地区', 2, 540000, ',540000,542500,'); +INSERT INTO `oa_city` VALUES (542521, '普兰县', 3, 542500, ',540000,542500,542521,'); +INSERT INTO `oa_city` VALUES (542522, '札达县', 3, 542500, ',540000,542500,542522,'); +INSERT INTO `oa_city` VALUES (542523, '噶尔县', 3, 542500, ',540000,542500,542523,'); +INSERT INTO `oa_city` VALUES (542524, '日土县', 3, 542500, ',540000,542500,542524,'); +INSERT INTO `oa_city` VALUES (542525, '革吉县', 3, 542500, ',540000,542500,542525,'); +INSERT INTO `oa_city` VALUES (542526, '改则县', 3, 542500, ',540000,542500,542526,'); +INSERT INTO `oa_city` VALUES (542527, '措勤县', 3, 542500, ',540000,542500,542527,'); +INSERT INTO `oa_city` VALUES (542600, '林芝地区', 2, 540000, ',540000,542600,'); +INSERT INTO `oa_city` VALUES (542621, '林芝县', 3, 542600, ',540000,542600,542621,'); +INSERT INTO `oa_city` VALUES (542622, '工布江达县', 3, 542600, ',540000,542600,542622,'); +INSERT INTO `oa_city` VALUES (542623, '米林县', 3, 542600, ',540000,542600,542623,'); +INSERT INTO `oa_city` VALUES (542624, '墨脱县', 3, 542600, ',540000,542600,542624,'); +INSERT INTO `oa_city` VALUES (542625, '波密县', 3, 542600, ',540000,542600,542625,'); +INSERT INTO `oa_city` VALUES (542626, '察隅县', 3, 542600, ',540000,542600,542626,'); +INSERT INTO `oa_city` VALUES (542627, '朗 县', 3, 542600, ',540000,542600,542627,'); +INSERT INTO `oa_city` VALUES (610000, '陕西省', 1, 0, ',610000,'); +INSERT INTO `oa_city` VALUES (610100, '西安市', 2, 610000, ',610000,610100,'); +INSERT INTO `oa_city` VALUES (610102, '新城区', 3, 610100, ',610000,610100,610102,'); +INSERT INTO `oa_city` VALUES (610103, '碑林区', 3, 610100, ',610000,610100,610103,'); +INSERT INTO `oa_city` VALUES (610104, '莲湖区', 3, 610100, ',610000,610100,610104,'); +INSERT INTO `oa_city` VALUES (610111, '灞桥区', 3, 610100, ',610000,610100,610111,'); +INSERT INTO `oa_city` VALUES (610112, '未央区', 3, 610100, ',610000,610100,610112,'); +INSERT INTO `oa_city` VALUES (610113, '雁塔区', 3, 610100, ',610000,610100,610113,'); +INSERT INTO `oa_city` VALUES (610114, '阎良区', 3, 610100, ',610000,610100,610114,'); +INSERT INTO `oa_city` VALUES (610115, '临潼区', 3, 610100, ',610000,610100,610115,'); +INSERT INTO `oa_city` VALUES (610116, '长安区', 3, 610100, ',610000,610100,610116,'); +INSERT INTO `oa_city` VALUES (610122, '蓝田县', 3, 610100, ',610000,610100,610122,'); +INSERT INTO `oa_city` VALUES (610124, '周至县', 3, 610100, ',610000,610100,610124,'); +INSERT INTO `oa_city` VALUES (610125, '户 县', 3, 610100, ',610000,610100,610125,'); +INSERT INTO `oa_city` VALUES (610126, '高陵县', 3, 610100, ',610000,610100,610126,'); +INSERT INTO `oa_city` VALUES (610200, '铜川市', 2, 610000, ',610000,610200,'); +INSERT INTO `oa_city` VALUES (610202, '王益区', 3, 610200, ',610000,610200,610202,'); +INSERT INTO `oa_city` VALUES (610203, '印台区', 3, 610200, ',610000,610200,610203,'); +INSERT INTO `oa_city` VALUES (610204, '耀州区', 3, 610200, ',610000,610200,610204,'); +INSERT INTO `oa_city` VALUES (610222, '宜君县', 3, 610200, ',610000,610200,610222,'); +INSERT INTO `oa_city` VALUES (610300, '宝鸡市', 2, 610000, ',610000,610300,'); +INSERT INTO `oa_city` VALUES (610302, '渭滨区', 3, 610300, ',610000,610300,610302,'); +INSERT INTO `oa_city` VALUES (610303, '金台区', 3, 610300, ',610000,610300,610303,'); +INSERT INTO `oa_city` VALUES (610304, '陈仓区', 3, 610300, ',610000,610300,610304,'); +INSERT INTO `oa_city` VALUES (610322, '凤翔县', 3, 610300, ',610000,610300,610322,'); +INSERT INTO `oa_city` VALUES (610323, '岐山县', 3, 610300, ',610000,610300,610323,'); +INSERT INTO `oa_city` VALUES (610324, '扶风县', 3, 610300, ',610000,610300,610324,'); +INSERT INTO `oa_city` VALUES (610326, '眉 县', 3, 610300, ',610000,610300,610326,'); +INSERT INTO `oa_city` VALUES (610327, '陇 县', 3, 610300, ',610000,610300,610327,'); +INSERT INTO `oa_city` VALUES (610328, '千阳县', 3, 610300, ',610000,610300,610328,'); +INSERT INTO `oa_city` VALUES (610329, '麟游县', 3, 610300, ',610000,610300,610329,'); +INSERT INTO `oa_city` VALUES (610330, '凤 县', 3, 610300, ',610000,610300,610330,'); +INSERT INTO `oa_city` VALUES (610331, '太白县', 3, 610300, ',610000,610300,610331,'); +INSERT INTO `oa_city` VALUES (610400, '咸阳市', 2, 610000, ',610000,610400,'); +INSERT INTO `oa_city` VALUES (610402, '秦都区', 3, 610400, ',610000,610400,610402,'); +INSERT INTO `oa_city` VALUES (610403, '杨凌区', 3, 610400, ',610000,610400,610403,'); +INSERT INTO `oa_city` VALUES (610404, '渭城区', 3, 610400, ',610000,610400,610404,'); +INSERT INTO `oa_city` VALUES (610422, '三原县', 3, 610400, ',610000,610400,610422,'); +INSERT INTO `oa_city` VALUES (610423, '泾阳县', 3, 610400, ',610000,610400,610423,'); +INSERT INTO `oa_city` VALUES (610424, '乾 县', 3, 610400, ',610000,610400,610424,'); +INSERT INTO `oa_city` VALUES (610425, '礼泉县', 3, 610400, ',610000,610400,610425,'); +INSERT INTO `oa_city` VALUES (610426, '永寿县', 3, 610400, ',610000,610400,610426,'); +INSERT INTO `oa_city` VALUES (610427, '彬 县', 3, 610400, ',610000,610400,610427,'); +INSERT INTO `oa_city` VALUES (610428, '长武县', 3, 610400, ',610000,610400,610428,'); +INSERT INTO `oa_city` VALUES (610429, '旬邑县', 3, 610400, ',610000,610400,610429,'); +INSERT INTO `oa_city` VALUES (610430, '淳化县', 3, 610400, ',610000,610400,610430,'); +INSERT INTO `oa_city` VALUES (610431, '武功县', 3, 610400, ',610000,610400,610431,'); +INSERT INTO `oa_city` VALUES (610481, '兴平市', 3, 610400, ',610000,610400,610481,'); +INSERT INTO `oa_city` VALUES (610500, '渭南市', 2, 610000, ',610000,610500,'); +INSERT INTO `oa_city` VALUES (610502, '临渭区', 3, 610500, ',610000,610500,610502,'); +INSERT INTO `oa_city` VALUES (610521, '华 县', 3, 610500, ',610000,610500,610521,'); +INSERT INTO `oa_city` VALUES (610522, '潼关县', 3, 610500, ',610000,610500,610522,'); +INSERT INTO `oa_city` VALUES (610523, '大荔县', 3, 610500, ',610000,610500,610523,'); +INSERT INTO `oa_city` VALUES (610524, '合阳县', 3, 610500, ',610000,610500,610524,'); +INSERT INTO `oa_city` VALUES (610525, '澄城县', 3, 610500, ',610000,610500,610525,'); +INSERT INTO `oa_city` VALUES (610526, '蒲城县', 3, 610500, ',610000,610500,610526,'); +INSERT INTO `oa_city` VALUES (610527, '白水县', 3, 610500, ',610000,610500,610527,'); +INSERT INTO `oa_city` VALUES (610528, '富平县', 3, 610500, ',610000,610500,610528,'); +INSERT INTO `oa_city` VALUES (610581, '韩城市', 3, 610500, ',610000,610500,610581,'); +INSERT INTO `oa_city` VALUES (610582, '华阴市', 3, 610500, ',610000,610500,610582,'); +INSERT INTO `oa_city` VALUES (610600, '延安市', 2, 610000, ',610000,610600,'); +INSERT INTO `oa_city` VALUES (610602, '宝塔区', 3, 610600, ',610000,610600,610602,'); +INSERT INTO `oa_city` VALUES (610621, '延长县', 3, 610600, ',610000,610600,610621,'); +INSERT INTO `oa_city` VALUES (610622, '延川县', 3, 610600, ',610000,610600,610622,'); +INSERT INTO `oa_city` VALUES (610623, '子长县', 3, 610600, ',610000,610600,610623,'); +INSERT INTO `oa_city` VALUES (610624, '安塞县', 3, 610600, ',610000,610600,610624,'); +INSERT INTO `oa_city` VALUES (610625, '志丹县', 3, 610600, ',610000,610600,610625,'); +INSERT INTO `oa_city` VALUES (610626, '吴旗县', 3, 610600, ',610000,610600,610626,'); +INSERT INTO `oa_city` VALUES (610627, '甘泉县', 3, 610600, ',610000,610600,610627,'); +INSERT INTO `oa_city` VALUES (610628, '富 县', 3, 610600, ',610000,610600,610628,'); +INSERT INTO `oa_city` VALUES (610629, '洛川县', 3, 610600, ',610000,610600,610629,'); +INSERT INTO `oa_city` VALUES (610630, '宜川县', 3, 610600, ',610000,610600,610630,'); +INSERT INTO `oa_city` VALUES (610631, '黄龙县', 3, 610600, ',610000,610600,610631,'); +INSERT INTO `oa_city` VALUES (610632, '黄陵县', 3, 610600, ',610000,610600,610632,'); +INSERT INTO `oa_city` VALUES (610700, '汉中市', 2, 610000, ',610000,610700,'); +INSERT INTO `oa_city` VALUES (610702, '汉台区', 3, 610700, ',610000,610700,610702,'); +INSERT INTO `oa_city` VALUES (610721, '南郑县', 3, 610700, ',610000,610700,610721,'); +INSERT INTO `oa_city` VALUES (610722, '城固县', 3, 610700, ',610000,610700,610722,'); +INSERT INTO `oa_city` VALUES (610723, '洋 县', 3, 610700, ',610000,610700,610723,'); +INSERT INTO `oa_city` VALUES (610724, '西乡县', 3, 610700, ',610000,610700,610724,'); +INSERT INTO `oa_city` VALUES (610725, '勉 县', 3, 610700, ',610000,610700,610725,'); +INSERT INTO `oa_city` VALUES (610726, '宁强县', 3, 610700, ',610000,610700,610726,'); +INSERT INTO `oa_city` VALUES (610727, '略阳县', 3, 610700, ',610000,610700,610727,'); +INSERT INTO `oa_city` VALUES (610728, '镇巴县', 3, 610700, ',610000,610700,610728,'); +INSERT INTO `oa_city` VALUES (610729, '留坝县', 3, 610700, ',610000,610700,610729,'); +INSERT INTO `oa_city` VALUES (610730, '佛坪县', 3, 610700, ',610000,610700,610730,'); +INSERT INTO `oa_city` VALUES (610800, '榆林市', 2, 610000, ',610000,610800,'); +INSERT INTO `oa_city` VALUES (610802, '榆阳区', 3, 610800, ',610000,610800,610802,'); +INSERT INTO `oa_city` VALUES (610821, '神木县', 3, 610800, ',610000,610800,610821,'); +INSERT INTO `oa_city` VALUES (610822, '府谷县', 3, 610800, ',610000,610800,610822,'); +INSERT INTO `oa_city` VALUES (610823, '横山县', 3, 610800, ',610000,610800,610823,'); +INSERT INTO `oa_city` VALUES (610824, '靖边县', 3, 610800, ',610000,610800,610824,'); +INSERT INTO `oa_city` VALUES (610825, '定边县', 3, 610800, ',610000,610800,610825,'); +INSERT INTO `oa_city` VALUES (610826, '绥德县', 3, 610800, ',610000,610800,610826,'); +INSERT INTO `oa_city` VALUES (610827, '米脂县', 3, 610800, ',610000,610800,610827,'); +INSERT INTO `oa_city` VALUES (610828, '佳 县', 3, 610800, ',610000,610800,610828,'); +INSERT INTO `oa_city` VALUES (610829, '吴堡县', 3, 610800, ',610000,610800,610829,'); +INSERT INTO `oa_city` VALUES (610830, '清涧县', 3, 610800, ',610000,610800,610830,'); +INSERT INTO `oa_city` VALUES (610831, '子洲县', 3, 610800, ',610000,610800,610831,'); +INSERT INTO `oa_city` VALUES (610900, '安康市', 2, 610000, ',610000,610900,'); +INSERT INTO `oa_city` VALUES (610902, '汉滨区', 3, 610900, ',610000,610900,610902,'); +INSERT INTO `oa_city` VALUES (610921, '汉阴县', 3, 610900, ',610000,610900,610921,'); +INSERT INTO `oa_city` VALUES (610922, '石泉县', 3, 610900, ',610000,610900,610922,'); +INSERT INTO `oa_city` VALUES (610923, '宁陕县', 3, 610900, ',610000,610900,610923,'); +INSERT INTO `oa_city` VALUES (610924, '紫阳县', 3, 610900, ',610000,610900,610924,'); +INSERT INTO `oa_city` VALUES (610925, '岚皋县', 3, 610900, ',610000,610900,610925,'); +INSERT INTO `oa_city` VALUES (610926, '平利县', 3, 610900, ',610000,610900,610926,'); +INSERT INTO `oa_city` VALUES (610927, '镇坪县', 3, 610900, ',610000,610900,610927,'); +INSERT INTO `oa_city` VALUES (610928, '旬阳县', 3, 610900, ',610000,610900,610928,'); +INSERT INTO `oa_city` VALUES (610929, '白河县', 3, 610900, ',610000,610900,610929,'); +INSERT INTO `oa_city` VALUES (611000, '商洛市', 2, 610000, ',610000,611000,'); +INSERT INTO `oa_city` VALUES (611002, '商州区', 3, 611000, ',610000,611000,611002,'); +INSERT INTO `oa_city` VALUES (611021, '洛南县', 3, 611000, ',610000,611000,611021,'); +INSERT INTO `oa_city` VALUES (611022, '丹凤县', 3, 611000, ',610000,611000,611022,'); +INSERT INTO `oa_city` VALUES (611023, '商南县', 3, 611000, ',610000,611000,611023,'); +INSERT INTO `oa_city` VALUES (611024, '山阳县', 3, 611000, ',610000,611000,611024,'); +INSERT INTO `oa_city` VALUES (611025, '镇安县', 3, 611000, ',610000,611000,611025,'); +INSERT INTO `oa_city` VALUES (611026, '柞水县', 3, 611000, ',610000,611000,611026,'); +INSERT INTO `oa_city` VALUES (620000, '甘肃省', 1, 0, ',620000,'); +INSERT INTO `oa_city` VALUES (620100, '兰州市', 2, 620000, ',620000,620100,'); +INSERT INTO `oa_city` VALUES (620102, '城关区', 3, 620100, ',620000,620100,620102,'); +INSERT INTO `oa_city` VALUES (620103, '七里河区', 3, 620100, ',620000,620100,620103,'); +INSERT INTO `oa_city` VALUES (620104, '西固区', 3, 620100, ',620000,620100,620104,'); +INSERT INTO `oa_city` VALUES (620105, '安宁区', 3, 620100, ',620000,620100,620105,'); +INSERT INTO `oa_city` VALUES (620111, '红古区', 3, 620100, ',620000,620100,620111,'); +INSERT INTO `oa_city` VALUES (620121, '永登县', 3, 620100, ',620000,620100,620121,'); +INSERT INTO `oa_city` VALUES (620122, '皋兰县', 3, 620100, ',620000,620100,620122,'); +INSERT INTO `oa_city` VALUES (620123, '榆中县', 3, 620100, ',620000,620100,620123,'); +INSERT INTO `oa_city` VALUES (620200, '嘉峪关市', 2, 620000, ',620000,620200,'); +INSERT INTO `oa_city` VALUES (620300, '金昌市', 2, 620000, ',620000,620300,'); +INSERT INTO `oa_city` VALUES (620302, '金川区', 3, 620300, ',620000,620300,620302,'); +INSERT INTO `oa_city` VALUES (620321, '永昌县', 3, 620300, ',620000,620300,620321,'); +INSERT INTO `oa_city` VALUES (620400, '白银市', 2, 620000, ',620000,620400,'); +INSERT INTO `oa_city` VALUES (620402, '白银区', 3, 620400, ',620000,620400,620402,'); +INSERT INTO `oa_city` VALUES (620403, '平川区', 3, 620400, ',620000,620400,620403,'); +INSERT INTO `oa_city` VALUES (620421, '靖远县', 3, 620400, ',620000,620400,620421,'); +INSERT INTO `oa_city` VALUES (620422, '会宁县', 3, 620400, ',620000,620400,620422,'); +INSERT INTO `oa_city` VALUES (620423, '景泰县', 3, 620400, ',620000,620400,620423,'); +INSERT INTO `oa_city` VALUES (620500, '天水市', 2, 620000, ',620000,620500,'); +INSERT INTO `oa_city` VALUES (620502, '秦城区', 3, 620500, ',620000,620500,620502,'); +INSERT INTO `oa_city` VALUES (620503, '北道区', 3, 620500, ',620000,620500,620503,'); +INSERT INTO `oa_city` VALUES (620521, '清水县', 3, 620500, ',620000,620500,620521,'); +INSERT INTO `oa_city` VALUES (620522, '秦安县', 3, 620500, ',620000,620500,620522,'); +INSERT INTO `oa_city` VALUES (620523, '甘谷县', 3, 620500, ',620000,620500,620523,'); +INSERT INTO `oa_city` VALUES (620524, '武山县', 3, 620500, ',620000,620500,620524,'); +INSERT INTO `oa_city` VALUES (620525, '张家川回族自治县', 3, 620500, ',620000,620500,620525,'); +INSERT INTO `oa_city` VALUES (620600, '武威市', 2, 620000, ',620000,620600,'); +INSERT INTO `oa_city` VALUES (620602, '凉州区', 3, 620600, ',620000,620600,620602,'); +INSERT INTO `oa_city` VALUES (620621, '民勤县', 3, 620600, ',620000,620600,620621,'); +INSERT INTO `oa_city` VALUES (620622, '古浪县', 3, 620600, ',620000,620600,620622,'); +INSERT INTO `oa_city` VALUES (620623, '天祝藏族自治县', 3, 620600, ',620000,620600,620623,'); +INSERT INTO `oa_city` VALUES (620700, '张掖市', 2, 620000, ',620000,620700,'); +INSERT INTO `oa_city` VALUES (620702, '甘州区', 3, 620700, ',620000,620700,620702,'); +INSERT INTO `oa_city` VALUES (620721, '肃南裕固族自治县', 3, 620700, ',620000,620700,620721,'); +INSERT INTO `oa_city` VALUES (620722, '民乐县', 3, 620700, ',620000,620700,620722,'); +INSERT INTO `oa_city` VALUES (620723, '临泽县', 3, 620700, ',620000,620700,620723,'); +INSERT INTO `oa_city` VALUES (620724, '高台县', 3, 620700, ',620000,620700,620724,'); +INSERT INTO `oa_city` VALUES (620725, '山丹县', 3, 620700, ',620000,620700,620725,'); +INSERT INTO `oa_city` VALUES (620800, '平凉市', 2, 620000, ',620000,620800,'); +INSERT INTO `oa_city` VALUES (620802, '崆峒区', 3, 620800, ',620000,620800,620802,'); +INSERT INTO `oa_city` VALUES (620821, '泾川县', 3, 620800, ',620000,620800,620821,'); +INSERT INTO `oa_city` VALUES (620822, '灵台县', 3, 620800, ',620000,620800,620822,'); +INSERT INTO `oa_city` VALUES (620823, '崇信县', 3, 620800, ',620000,620800,620823,'); +INSERT INTO `oa_city` VALUES (620824, '华亭县', 3, 620800, ',620000,620800,620824,'); +INSERT INTO `oa_city` VALUES (620825, '庄浪县', 3, 620800, ',620000,620800,620825,'); +INSERT INTO `oa_city` VALUES (620826, '静宁县', 3, 620800, ',620000,620800,620826,'); +INSERT INTO `oa_city` VALUES (620900, '酒泉市', 2, 620000, ',620000,620900,'); +INSERT INTO `oa_city` VALUES (620902, '肃州区', 3, 620900, ',620000,620900,620902,'); +INSERT INTO `oa_city` VALUES (620921, '金塔县', 3, 620900, ',620000,620900,620921,'); +INSERT INTO `oa_city` VALUES (620922, '安西县', 3, 620900, ',620000,620900,620922,'); +INSERT INTO `oa_city` VALUES (620923, '肃北蒙古族自治县', 3, 620900, ',620000,620900,620923,'); +INSERT INTO `oa_city` VALUES (620924, '阿克塞哈萨克族自治县', 3, 620900, ',620000,620900,620924,'); +INSERT INTO `oa_city` VALUES (620981, '玉门市', 3, 620900, ',620000,620900,620981,'); +INSERT INTO `oa_city` VALUES (620982, '敦煌市', 3, 620900, ',620000,620900,620982,'); +INSERT INTO `oa_city` VALUES (621000, '庆阳市', 2, 620000, ',620000,621000,'); +INSERT INTO `oa_city` VALUES (621002, '西峰区', 3, 621000, ',620000,621000,621002,'); +INSERT INTO `oa_city` VALUES (621021, '庆城县', 3, 621000, ',620000,621000,621021,'); +INSERT INTO `oa_city` VALUES (621022, '环 县', 3, 621000, ',620000,621000,621022,'); +INSERT INTO `oa_city` VALUES (621023, '华池县', 3, 621000, ',620000,621000,621023,'); +INSERT INTO `oa_city` VALUES (621024, '合水县', 3, 621000, ',620000,621000,621024,'); +INSERT INTO `oa_city` VALUES (621025, '正宁县', 3, 621000, ',620000,621000,621025,'); +INSERT INTO `oa_city` VALUES (621026, '宁 县', 3, 621000, ',620000,621000,621026,'); +INSERT INTO `oa_city` VALUES (621027, '镇原县', 3, 621000, ',620000,621000,621027,'); +INSERT INTO `oa_city` VALUES (621100, '定西市', 2, 620000, ',620000,621100,'); +INSERT INTO `oa_city` VALUES (621102, '安定区', 3, 621100, ',620000,621100,621102,'); +INSERT INTO `oa_city` VALUES (621121, '通渭县', 3, 621100, ',620000,621100,621121,'); +INSERT INTO `oa_city` VALUES (621122, '陇西县', 3, 621100, ',620000,621100,621122,'); +INSERT INTO `oa_city` VALUES (621123, '渭源县', 3, 621100, ',620000,621100,621123,'); +INSERT INTO `oa_city` VALUES (621124, '临洮县', 3, 621100, ',620000,621100,621124,'); +INSERT INTO `oa_city` VALUES (621125, '漳 县', 3, 621100, ',620000,621100,621125,'); +INSERT INTO `oa_city` VALUES (621126, '岷 县', 3, 621100, ',620000,621100,621126,'); +INSERT INTO `oa_city` VALUES (621200, '陇南市', 2, 620000, ',620000,621200,'); +INSERT INTO `oa_city` VALUES (621202, '武都区', 3, 621200, ',620000,621200,621202,'); +INSERT INTO `oa_city` VALUES (621221, '成 县', 3, 621200, ',620000,621200,621221,'); +INSERT INTO `oa_city` VALUES (621222, '文 县', 3, 621200, ',620000,621200,621222,'); +INSERT INTO `oa_city` VALUES (621223, '宕昌县', 3, 621200, ',620000,621200,621223,'); +INSERT INTO `oa_city` VALUES (621224, '康 县', 3, 621200, ',620000,621200,621224,'); +INSERT INTO `oa_city` VALUES (621225, '西和县', 3, 621200, ',620000,621200,621225,'); +INSERT INTO `oa_city` VALUES (621226, '礼 县', 3, 621200, ',620000,621200,621226,'); +INSERT INTO `oa_city` VALUES (621227, '徽 县', 3, 621200, ',620000,621200,621227,'); +INSERT INTO `oa_city` VALUES (621228, '两当县', 3, 621200, ',620000,621200,621228,'); +INSERT INTO `oa_city` VALUES (622900, '临夏回族自治州', 2, 620000, ',620000,622900,'); +INSERT INTO `oa_city` VALUES (622901, '临夏市', 3, 622900, ',620000,622900,622901,'); +INSERT INTO `oa_city` VALUES (622921, '临夏县', 3, 622900, ',620000,622900,622921,'); +INSERT INTO `oa_city` VALUES (622922, '康乐县', 3, 622900, ',620000,622900,622922,'); +INSERT INTO `oa_city` VALUES (622923, '永靖县', 3, 622900, ',620000,622900,622923,'); +INSERT INTO `oa_city` VALUES (622924, '广河县', 3, 622900, ',620000,622900,622924,'); +INSERT INTO `oa_city` VALUES (622925, '和政县', 3, 622900, ',620000,622900,622925,'); +INSERT INTO `oa_city` VALUES (622926, '东乡族自治县', 3, 622900, ',620000,622900,622926,'); +INSERT INTO `oa_city` VALUES (622927, '积石山保安族东乡族撒拉族自治县', 3, 622900, ',620000,622900,622927,'); +INSERT INTO `oa_city` VALUES (623000, '甘南藏族自治州', 2, 620000, ',620000,623000,'); +INSERT INTO `oa_city` VALUES (623001, '合作市', 3, 623000, ',620000,623000,623001,'); +INSERT INTO `oa_city` VALUES (623021, '临潭县', 3, 623000, ',620000,623000,623021,'); +INSERT INTO `oa_city` VALUES (623022, '卓尼县', 3, 623000, ',620000,623000,623022,'); +INSERT INTO `oa_city` VALUES (623023, '舟曲县', 3, 623000, ',620000,623000,623023,'); +INSERT INTO `oa_city` VALUES (623024, '迭部县', 3, 623000, ',620000,623000,623024,'); +INSERT INTO `oa_city` VALUES (623025, '玛曲县', 3, 623000, ',620000,623000,623025,'); +INSERT INTO `oa_city` VALUES (623026, '碌曲县', 3, 623000, ',620000,623000,623026,'); +INSERT INTO `oa_city` VALUES (623027, '夏河县', 3, 623000, ',620000,623000,623027,'); +INSERT INTO `oa_city` VALUES (630000, '青海省', 1, 0, ',630000,'); +INSERT INTO `oa_city` VALUES (630100, '西宁市', 2, 630000, ',630000,630100,'); +INSERT INTO `oa_city` VALUES (630102, '城东区', 3, 630100, ',630000,630100,630102,'); +INSERT INTO `oa_city` VALUES (630103, '城中区', 3, 630100, ',630000,630100,630103,'); +INSERT INTO `oa_city` VALUES (630104, '城西区', 3, 630100, ',630000,630100,630104,'); +INSERT INTO `oa_city` VALUES (630105, '城北区', 3, 630100, ',630000,630100,630105,'); +INSERT INTO `oa_city` VALUES (630121, '大通回族土族自治县', 3, 630100, ',630000,630100,630121,'); +INSERT INTO `oa_city` VALUES (630122, '湟中县', 3, 630100, ',630000,630100,630122,'); +INSERT INTO `oa_city` VALUES (630123, '湟源县', 3, 630100, ',630000,630100,630123,'); +INSERT INTO `oa_city` VALUES (632100, '海东地区', 2, 630000, ',630000,632100,'); +INSERT INTO `oa_city` VALUES (632121, '平安县', 3, 632100, ',630000,632100,632121,'); +INSERT INTO `oa_city` VALUES (632122, '民和回族土族自治县', 3, 632100, ',630000,632100,632122,'); +INSERT INTO `oa_city` VALUES (632123, '乐都县', 3, 632100, ',630000,632100,632123,'); +INSERT INTO `oa_city` VALUES (632126, '互助土族自治县', 3, 632100, ',630000,632100,632126,'); +INSERT INTO `oa_city` VALUES (632127, '化隆回族自治县', 3, 632100, ',630000,632100,632127,'); +INSERT INTO `oa_city` VALUES (632128, '循化撒拉族自治县', 3, 632100, ',630000,632100,632128,'); +INSERT INTO `oa_city` VALUES (632200, '海北藏族自治州', 2, 630000, ',630000,632200,'); +INSERT INTO `oa_city` VALUES (632221, '门源回族自治县', 3, 632200, ',630000,632200,632221,'); +INSERT INTO `oa_city` VALUES (632222, '祁连县', 3, 632200, ',630000,632200,632222,'); +INSERT INTO `oa_city` VALUES (632223, '海晏县', 3, 632200, ',630000,632200,632223,'); +INSERT INTO `oa_city` VALUES (632224, '刚察县', 3, 632200, ',630000,632200,632224,'); +INSERT INTO `oa_city` VALUES (632300, '黄南藏族自治州', 2, 630000, ',630000,632300,'); +INSERT INTO `oa_city` VALUES (632321, '同仁县', 3, 632300, ',630000,632300,632321,'); +INSERT INTO `oa_city` VALUES (632322, '尖扎县', 3, 632300, ',630000,632300,632322,'); +INSERT INTO `oa_city` VALUES (632323, '泽库县', 3, 632300, ',630000,632300,632323,'); +INSERT INTO `oa_city` VALUES (632324, '河南蒙古族自治县', 3, 632300, ',630000,632300,632324,'); +INSERT INTO `oa_city` VALUES (632500, '海南藏族自治州', 2, 630000, ',630000,632500,'); +INSERT INTO `oa_city` VALUES (632521, '共和县', 3, 632500, ',630000,632500,632521,'); +INSERT INTO `oa_city` VALUES (632522, '同德县', 3, 632500, ',630000,632500,632522,'); +INSERT INTO `oa_city` VALUES (632523, '贵德县', 3, 632500, ',630000,632500,632523,'); +INSERT INTO `oa_city` VALUES (632524, '兴海县', 3, 632500, ',630000,632500,632524,'); +INSERT INTO `oa_city` VALUES (632525, '贵南县', 3, 632500, ',630000,632500,632525,'); +INSERT INTO `oa_city` VALUES (632600, '果洛藏族自治州', 2, 630000, ',630000,632600,'); +INSERT INTO `oa_city` VALUES (632621, '玛沁县', 3, 632600, ',630000,632600,632621,'); +INSERT INTO `oa_city` VALUES (632622, '班玛县', 3, 632600, ',630000,632600,632622,'); +INSERT INTO `oa_city` VALUES (632623, '甘德县', 3, 632600, ',630000,632600,632623,'); +INSERT INTO `oa_city` VALUES (632624, '达日县', 3, 632600, ',630000,632600,632624,'); +INSERT INTO `oa_city` VALUES (632625, '久治县', 3, 632600, ',630000,632600,632625,'); +INSERT INTO `oa_city` VALUES (632626, '玛多县', 3, 632600, ',630000,632600,632626,'); +INSERT INTO `oa_city` VALUES (632700, '玉树藏族自治州', 2, 630000, ',630000,632700,'); +INSERT INTO `oa_city` VALUES (632721, '玉树县', 3, 632700, ',630000,632700,632721,'); +INSERT INTO `oa_city` VALUES (632722, '杂多县', 3, 632700, ',630000,632700,632722,'); +INSERT INTO `oa_city` VALUES (632723, '称多县', 3, 632700, ',630000,632700,632723,'); +INSERT INTO `oa_city` VALUES (632724, '治多县', 3, 632700, ',630000,632700,632724,'); +INSERT INTO `oa_city` VALUES (632725, '囊谦县', 3, 632700, ',630000,632700,632725,'); +INSERT INTO `oa_city` VALUES (632726, '曲麻莱县', 3, 632700, ',630000,632700,632726,'); +INSERT INTO `oa_city` VALUES (632800, '海西蒙古族藏族自治州', 2, 630000, ',630000,632800,'); +INSERT INTO `oa_city` VALUES (632801, '格尔木市', 3, 632800, ',630000,632800,632801,'); +INSERT INTO `oa_city` VALUES (632802, '德令哈市', 3, 632800, ',630000,632800,632802,'); +INSERT INTO `oa_city` VALUES (632821, '乌兰县', 3, 632800, ',630000,632800,632821,'); +INSERT INTO `oa_city` VALUES (632822, '都兰县', 3, 632800, ',630000,632800,632822,'); +INSERT INTO `oa_city` VALUES (632823, '天峻县', 3, 632800, ',630000,632800,632823,'); +INSERT INTO `oa_city` VALUES (640000, '宁 夏', 1, 0, ',640000,'); +INSERT INTO `oa_city` VALUES (640100, '银川市', 2, 640000, ',640000,640100,'); +INSERT INTO `oa_city` VALUES (640104, '兴庆区', 3, 640100, ',640000,640100,640104,'); +INSERT INTO `oa_city` VALUES (640105, '西夏区', 3, 640100, ',640000,640100,640105,'); +INSERT INTO `oa_city` VALUES (640106, '金凤区', 3, 640100, ',640000,640100,640106,'); +INSERT INTO `oa_city` VALUES (640121, '永宁县', 3, 640100, ',640000,640100,640121,'); +INSERT INTO `oa_city` VALUES (640122, '贺兰县', 3, 640100, ',640000,640100,640122,'); +INSERT INTO `oa_city` VALUES (640181, '灵武市', 3, 640100, ',640000,640100,640181,'); +INSERT INTO `oa_city` VALUES (640200, '石嘴山市', 2, 640000, ',640000,640200,'); +INSERT INTO `oa_city` VALUES (640202, '大武口区', 3, 640200, ',640000,640200,640202,'); +INSERT INTO `oa_city` VALUES (640205, '惠农区', 3, 640200, ',640000,640200,640205,'); +INSERT INTO `oa_city` VALUES (640221, '平罗县', 3, 640200, ',640000,640200,640221,'); +INSERT INTO `oa_city` VALUES (640300, '吴忠市', 2, 640000, ',640000,640300,'); +INSERT INTO `oa_city` VALUES (640302, '利通区', 3, 640300, ',640000,640300,640302,'); +INSERT INTO `oa_city` VALUES (640323, '盐池县', 3, 640300, ',640000,640300,640323,'); +INSERT INTO `oa_city` VALUES (640324, '同心县', 3, 640300, ',640000,640300,640324,'); +INSERT INTO `oa_city` VALUES (640381, '青铜峡市', 3, 640300, ',640000,640300,640381,'); +INSERT INTO `oa_city` VALUES (640400, '固原市', 2, 640000, ',640000,640400,'); +INSERT INTO `oa_city` VALUES (640402, '原州区', 3, 640400, ',640000,640400,640402,'); +INSERT INTO `oa_city` VALUES (640422, '西吉县', 3, 640400, ',640000,640400,640422,'); +INSERT INTO `oa_city` VALUES (640423, '隆德县', 3, 640400, ',640000,640400,640423,'); +INSERT INTO `oa_city` VALUES (640424, '泾源县', 3, 640400, ',640000,640400,640424,'); +INSERT INTO `oa_city` VALUES (640425, '彭阳县', 3, 640400, ',640000,640400,640425,'); +INSERT INTO `oa_city` VALUES (640500, '中卫市', 2, 640000, ',640000,640500,'); +INSERT INTO `oa_city` VALUES (640502, '沙坡头区', 3, 640500, ',640000,640500,640502,'); +INSERT INTO `oa_city` VALUES (640521, '中宁县', 3, 640500, ',640000,640500,640521,'); +INSERT INTO `oa_city` VALUES (640522, '海原县', 3, 640500, ',640000,640500,640522,'); +INSERT INTO `oa_city` VALUES (650000, '新 疆', 1, 0, ',650000,'); +INSERT INTO `oa_city` VALUES (650100, '乌鲁木齐市', 2, 650000, ',650000,650100,'); +INSERT INTO `oa_city` VALUES (650102, '天山区', 3, 650100, ',650000,650100,650102,'); +INSERT INTO `oa_city` VALUES (650103, '沙依巴克区', 3, 650100, ',650000,650100,650103,'); +INSERT INTO `oa_city` VALUES (650104, '新市区', 3, 650100, ',650000,650100,650104,'); +INSERT INTO `oa_city` VALUES (650105, '水磨沟区', 3, 650100, ',650000,650100,650105,'); +INSERT INTO `oa_city` VALUES (650106, '头屯河区', 3, 650100, ',650000,650100,650106,'); +INSERT INTO `oa_city` VALUES (650107, '达坂城区', 3, 650100, ',650000,650100,650107,'); +INSERT INTO `oa_city` VALUES (650108, '东山区', 3, 650100, ',650000,650100,650108,'); +INSERT INTO `oa_city` VALUES (650121, '乌鲁木齐县', 3, 650100, ',650000,650100,650121,'); +INSERT INTO `oa_city` VALUES (650200, '克拉玛依市', 2, 650000, ',650000,650200,'); +INSERT INTO `oa_city` VALUES (650202, '独山子区', 3, 650200, ',650000,650200,650202,'); +INSERT INTO `oa_city` VALUES (650203, '克拉玛依区', 3, 650200, ',650000,650200,650203,'); +INSERT INTO `oa_city` VALUES (650204, '白碱滩区', 3, 650200, ',650000,650200,650204,'); +INSERT INTO `oa_city` VALUES (650205, '乌尔禾区', 3, 650200, ',650000,650200,650205,'); +INSERT INTO `oa_city` VALUES (652100, '吐鲁番地区', 2, 650000, ',650000,652100,'); +INSERT INTO `oa_city` VALUES (652101, '吐鲁番市', 3, 652100, ',650000,652100,652101,'); +INSERT INTO `oa_city` VALUES (652122, '鄯善县', 3, 652100, ',650000,652100,652122,'); +INSERT INTO `oa_city` VALUES (652123, '托克逊县', 3, 652100, ',650000,652100,652123,'); +INSERT INTO `oa_city` VALUES (652200, '哈密地区', 2, 650000, ',650000,652200,'); +INSERT INTO `oa_city` VALUES (652201, '哈密市', 3, 652200, ',650000,652200,652201,'); +INSERT INTO `oa_city` VALUES (652222, '巴里坤哈萨克自治县', 3, 652200, ',650000,652200,652222,'); +INSERT INTO `oa_city` VALUES (652223, '伊吾县', 3, 652200, ',650000,652200,652223,'); +INSERT INTO `oa_city` VALUES (652300, '昌吉回族自治州', 2, 650000, ',650000,652300,'); +INSERT INTO `oa_city` VALUES (652301, '昌吉市', 3, 652300, ',650000,652300,652301,'); +INSERT INTO `oa_city` VALUES (652302, '阜康市', 3, 652300, ',650000,652300,652302,'); +INSERT INTO `oa_city` VALUES (652303, '米泉市', 3, 652300, ',650000,652300,652303,'); +INSERT INTO `oa_city` VALUES (652323, '呼图壁县', 3, 652300, ',650000,652300,652323,'); +INSERT INTO `oa_city` VALUES (652324, '玛纳斯县', 3, 652300, ',650000,652300,652324,'); +INSERT INTO `oa_city` VALUES (652325, '奇台县', 3, 652300, ',650000,652300,652325,'); +INSERT INTO `oa_city` VALUES (652327, '吉木萨尔县', 3, 652300, ',650000,652300,652327,'); +INSERT INTO `oa_city` VALUES (652328, '木垒哈萨克自治县', 3, 652300, ',650000,652300,652328,'); +INSERT INTO `oa_city` VALUES (652700, '博尔塔拉蒙古自治州', 2, 650000, ',650000,652700,'); +INSERT INTO `oa_city` VALUES (652701, '博乐市', 3, 652700, ',650000,652700,652701,'); +INSERT INTO `oa_city` VALUES (652722, '精河县', 3, 652700, ',650000,652700,652722,'); +INSERT INTO `oa_city` VALUES (652723, '温泉县', 3, 652700, ',650000,652700,652723,'); +INSERT INTO `oa_city` VALUES (652800, '巴音郭楞蒙古自治州', 2, 650000, ',650000,652800,'); +INSERT INTO `oa_city` VALUES (652801, '库尔勒市', 3, 652800, ',650000,652800,652801,'); +INSERT INTO `oa_city` VALUES (652822, '轮台县', 3, 652800, ',650000,652800,652822,'); +INSERT INTO `oa_city` VALUES (652823, '尉犁县', 3, 652800, ',650000,652800,652823,'); +INSERT INTO `oa_city` VALUES (652824, '若羌县', 3, 652800, ',650000,652800,652824,'); +INSERT INTO `oa_city` VALUES (652825, '且末县', 3, 652800, ',650000,652800,652825,'); +INSERT INTO `oa_city` VALUES (652826, '焉耆回族自治县', 3, 652800, ',650000,652800,652826,'); +INSERT INTO `oa_city` VALUES (652827, '和静县', 3, 652800, ',650000,652800,652827,'); +INSERT INTO `oa_city` VALUES (652828, '和硕县', 3, 652800, ',650000,652800,652828,'); +INSERT INTO `oa_city` VALUES (652829, '博湖县', 3, 652800, ',650000,652800,652829,'); +INSERT INTO `oa_city` VALUES (652900, '阿克苏地区', 2, 650000, ',650000,652900,'); +INSERT INTO `oa_city` VALUES (652901, '阿克苏市', 3, 652900, ',650000,652900,652901,'); +INSERT INTO `oa_city` VALUES (652922, '温宿县', 3, 652900, ',650000,652900,652922,'); +INSERT INTO `oa_city` VALUES (652923, '库车县', 3, 652900, ',650000,652900,652923,'); +INSERT INTO `oa_city` VALUES (652924, '沙雅县', 3, 652900, ',650000,652900,652924,'); +INSERT INTO `oa_city` VALUES (652925, '新和县', 3, 652900, ',650000,652900,652925,'); +INSERT INTO `oa_city` VALUES (652926, '拜城县', 3, 652900, ',650000,652900,652926,'); +INSERT INTO `oa_city` VALUES (652927, '乌什县', 3, 652900, ',650000,652900,652927,'); +INSERT INTO `oa_city` VALUES (652928, '阿瓦提县', 3, 652900, ',650000,652900,652928,'); +INSERT INTO `oa_city` VALUES (652929, '柯坪县', 3, 652900, ',650000,652900,652929,'); +INSERT INTO `oa_city` VALUES (653000, '克孜勒苏柯尔克孜自治州', 2, 650000, ',650000,653000,'); +INSERT INTO `oa_city` VALUES (653001, '阿图什市', 3, 653000, ',650000,653000,653001,'); +INSERT INTO `oa_city` VALUES (653022, '阿克陶县', 3, 653000, ',650000,653000,653022,'); +INSERT INTO `oa_city` VALUES (653023, '阿合奇县', 3, 653000, ',650000,653000,653023,'); +INSERT INTO `oa_city` VALUES (653024, '乌恰县', 3, 653000, ',650000,653000,653024,'); +INSERT INTO `oa_city` VALUES (653100, '喀什地区', 2, 650000, ',650000,653100,'); +INSERT INTO `oa_city` VALUES (653101, '喀什市', 3, 653100, ',650000,653100,653101,'); +INSERT INTO `oa_city` VALUES (653121, '疏附县', 3, 653100, ',650000,653100,653121,'); +INSERT INTO `oa_city` VALUES (653122, '疏勒县', 3, 653100, ',650000,653100,653122,'); +INSERT INTO `oa_city` VALUES (653123, '英吉沙县', 3, 653100, ',650000,653100,653123,'); +INSERT INTO `oa_city` VALUES (653124, '泽普县', 3, 653100, ',650000,653100,653124,'); +INSERT INTO `oa_city` VALUES (653125, '莎车县', 3, 653100, ',650000,653100,653125,'); +INSERT INTO `oa_city` VALUES (653126, '叶城县', 3, 653100, ',650000,653100,653126,'); +INSERT INTO `oa_city` VALUES (653127, '麦盖提县', 3, 653100, ',650000,653100,653127,'); +INSERT INTO `oa_city` VALUES (653128, '岳普湖县', 3, 653100, ',650000,653100,653128,'); +INSERT INTO `oa_city` VALUES (653129, '伽师县', 3, 653100, ',650000,653100,653129,'); +INSERT INTO `oa_city` VALUES (653130, '巴楚县', 3, 653100, ',650000,653100,653130,'); +INSERT INTO `oa_city` VALUES (653131, '塔什库尔干塔吉克自治县', 3, 653100, ',650000,653100,653131,'); +INSERT INTO `oa_city` VALUES (653200, '和田地区', 2, 650000, ',650000,653200,'); +INSERT INTO `oa_city` VALUES (653201, '和田市', 3, 653200, ',650000,653200,653201,'); +INSERT INTO `oa_city` VALUES (653221, '和田县', 3, 653200, ',650000,653200,653221,'); +INSERT INTO `oa_city` VALUES (653222, '墨玉县', 3, 653200, ',650000,653200,653222,'); +INSERT INTO `oa_city` VALUES (653223, '皮山县', 3, 653200, ',650000,653200,653223,'); +INSERT INTO `oa_city` VALUES (653224, '洛浦县', 3, 653200, ',650000,653200,653224,'); +INSERT INTO `oa_city` VALUES (653225, '策勒县', 3, 653200, ',650000,653200,653225,'); +INSERT INTO `oa_city` VALUES (653226, '于田县', 3, 653200, ',650000,653200,653226,'); +INSERT INTO `oa_city` VALUES (653227, '民丰县', 3, 653200, ',650000,653200,653227,'); +INSERT INTO `oa_city` VALUES (654000, '伊犁哈萨克自治州', 2, 650000, ',650000,654000,'); +INSERT INTO `oa_city` VALUES (654002, '伊宁市', 3, 654000, ',650000,654000,654002,'); +INSERT INTO `oa_city` VALUES (654003, '奎屯市', 3, 654000, ',650000,654000,654003,'); +INSERT INTO `oa_city` VALUES (654021, '伊宁县', 3, 654000, ',650000,654000,654021,'); +INSERT INTO `oa_city` VALUES (654022, '察布查尔锡伯自治县', 3, 654000, ',650000,654000,654022,'); +INSERT INTO `oa_city` VALUES (654023, '霍城县', 3, 654000, ',650000,654000,654023,'); +INSERT INTO `oa_city` VALUES (654024, '巩留县', 3, 654000, ',650000,654000,654024,'); +INSERT INTO `oa_city` VALUES (654025, '新源县', 3, 654000, ',650000,654000,654025,'); +INSERT INTO `oa_city` VALUES (654026, '昭苏县', 3, 654000, ',650000,654000,654026,'); +INSERT INTO `oa_city` VALUES (654027, '特克斯县', 3, 654000, ',650000,654000,654027,'); +INSERT INTO `oa_city` VALUES (654028, '尼勒克县', 3, 654000, ',650000,654000,654028,'); +INSERT INTO `oa_city` VALUES (654200, '塔城地区', 2, 650000, ',650000,654200,'); +INSERT INTO `oa_city` VALUES (654201, '塔城市', 3, 654200, ',650000,654200,654201,'); +INSERT INTO `oa_city` VALUES (654202, '乌苏市', 3, 654200, ',650000,654200,654202,'); +INSERT INTO `oa_city` VALUES (654221, '额敏县', 3, 654200, ',650000,654200,654221,'); +INSERT INTO `oa_city` VALUES (654223, '沙湾县', 3, 654200, ',650000,654200,654223,'); +INSERT INTO `oa_city` VALUES (654224, '托里县', 3, 654200, ',650000,654200,654224,'); +INSERT INTO `oa_city` VALUES (654225, '裕民县', 3, 654200, ',650000,654200,654225,'); +INSERT INTO `oa_city` VALUES (654226, '和布克赛尔蒙古自治县', 3, 654200, ',650000,654200,654226,'); +INSERT INTO `oa_city` VALUES (654300, '阿勒泰地区', 2, 650000, ',650000,654300,'); +INSERT INTO `oa_city` VALUES (654301, '阿勒泰市', 3, 654300, ',650000,654300,654301,'); +INSERT INTO `oa_city` VALUES (654321, '布尔津县', 3, 654300, ',650000,654300,654321,'); +INSERT INTO `oa_city` VALUES (654322, '富蕴县', 3, 654300, ',650000,654300,654322,'); +INSERT INTO `oa_city` VALUES (654323, '福海县', 3, 654300, ',650000,654300,654323,'); +INSERT INTO `oa_city` VALUES (654324, '哈巴河县', 3, 654300, ',650000,654300,654324,'); +INSERT INTO `oa_city` VALUES (654325, '青河县', 3, 654300, ',650000,654300,654325,'); +INSERT INTO `oa_city` VALUES (654326, '吉木乃县', 3, 654300, ',650000,654300,654326,'); +INSERT INTO `oa_city` VALUES (659001, '石河子市', 2, 650000, ',650000,659001,'); +INSERT INTO `oa_city` VALUES (659002, '阿拉尔市', 2, 650000, ',650000,659002,'); +INSERT INTO `oa_city` VALUES (659003, '图木舒克市', 2, 650000, ',650000,659003,'); +INSERT INTO `oa_city` VALUES (659004, '五家渠市', 2, 650000, ',650000,659004,'); +INSERT INTO `oa_city` VALUES (710000, '台湾省', 1, 0, ',710000,'); +INSERT INTO `oa_city` VALUES (810000, '香 港', 1, 0, ',810000,'); +INSERT INTO `oa_city` VALUES (820000, '澳 门', 1, 0, ',820000,'); +INSERT INTO `oa_city` VALUES (440113007000, '市桥街道', 4, 440113, ',440000,440100,440113,440113007000'); +INSERT INTO `oa_city` VALUES (440113008000, '沙头街道', 4, 440113, ',440000,440100,440113,440113008000'); +INSERT INTO `oa_city` VALUES (440113009000, '东环街道', 4, 440113, ',440000,440100,440113,440113009000'); +INSERT INTO `oa_city` VALUES (440113010000, '桥南街道', 4, 440113, ',440000,440100,440113,440113010000'); +INSERT INTO `oa_city` VALUES (440113011000, '小谷围街道', 4, 440113, ',440000,440100,440113,440113011000'); +INSERT INTO `oa_city` VALUES (440113012000, '大石街道', 4, 440113, ',440000,440100,440113,440113012000'); +INSERT INTO `oa_city` VALUES (440113013000, '洛浦街道', 4, 440113, ',440000,440100,440113,440113013000'); +INSERT INTO `oa_city` VALUES (440113014000, '石壁街道', 4, 440113, ',440000,440100,440113,440113014000'); +INSERT INTO `oa_city` VALUES (440113015000, '钟村街道', 4, 440113, ',440000,440100,440113,440113015000'); +INSERT INTO `oa_city` VALUES (440113016000, '大龙街道', 4, 440113, ',440000,440100,440113,440113016000'); +INSERT INTO `oa_city` VALUES (440113102000, '南村镇', 4, 440113, ',440000,440100,440113,440113102000'); +INSERT INTO `oa_city` VALUES (440113103000, '新造镇', 4, 440113, ',440000,440100,440113,440113103000'); +INSERT INTO `oa_city` VALUES (440113104000, '化龙镇', 4, 440113, ',440000,440100,440113,440113104000'); +INSERT INTO `oa_city` VALUES (440113105000, '石楼镇', 4, 440113, ',440000,440100,440113,440113105000'); +INSERT INTO `oa_city` VALUES (440113118000, '沙湾镇', 4, 440113, ',440000,440100,440113,440113118000'); +INSERT INTO `oa_city` VALUES (440113120000, '石碁镇', 4, 440113, ',440000,440100,440113,440113120000'); +INSERT INTO `oa_city` VALUES (440114001000, '新华街道', 4, 440114, ',440000,440100,440114,440114001000'); +INSERT INTO `oa_city` VALUES (440114002000, '花城街道', 4, 440114, ',440000,440100,440114,440114002000'); +INSERT INTO `oa_city` VALUES (440114003000, '秀全街道', 4, 440114, ',440000,440100,440114,440114003000'); +INSERT INTO `oa_city` VALUES (440114004000, '新雅街道', 4, 440114, ',440000,440100,440114,440114004000'); +INSERT INTO `oa_city` VALUES (440114103000, '梯面镇', 4, 440114, ',440000,440100,440114,440114103000'); +INSERT INTO `oa_city` VALUES (440114104000, '花山镇', 4, 440114, ',440000,440100,440114,440114104000'); +INSERT INTO `oa_city` VALUES (440114105000, '花东镇', 4, 440114, ',440000,440100,440114,440114105000'); +INSERT INTO `oa_city` VALUES (440114107000, '炭步镇', 4, 440114, ',440000,440100,440114,440114107000'); +INSERT INTO `oa_city` VALUES (440114108000, '赤坭镇', 4, 440114, ',440000,440100,440114,440114108000'); +INSERT INTO `oa_city` VALUES (440114109000, '狮岭镇', 4, 440114, ',440000,440100,440114,440114109000'); +INSERT INTO `oa_city` VALUES (440607001000, '西南街道', 4, 440607, ',440000,440600,440607,440607001000'); +INSERT INTO `oa_city` VALUES (440607004000, '云东海街道', 4, 440607, ',440000,440600,440607,440607004000'); +INSERT INTO `oa_city` VALUES (440607101000, '大塘镇', 4, 440607, ',440000,440600,440607,440607101000'); +INSERT INTO `oa_city` VALUES (440607103000, '乐平镇', 4, 440607, ',440000,440600,440607,440607103000'); +INSERT INTO `oa_city` VALUES (440607104000, '白坭镇', 4, 440607, ',440000,440600,440607,440607104000'); +INSERT INTO `oa_city` VALUES (440607105000, '芦苞镇', 4, 440607, ',440000,440600,440607,440607105000'); +INSERT INTO `oa_city` VALUES (440607106000, '南山镇', 4, 440607, ',440000,440600,440607,440607106000'); diff --git a/app/install/view/index/step1.html b/app/install/view/index/step1.html index 7874877..e169d96 100644 --- a/app/install/view/index/step1.html +++ b/app/install/view/index/step1.html @@ -7,7 +7,7 @@ - + +{/block} + +{block name="body"} +
    +

    请假审批

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    请假类型* + +
    开始时间 * + + + + 结束时间 * + + + + +
    请假工时-请假天数-
    请假事由* + +
    审批流程* + +
    审核人* + +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    请假类型* + +
    开始时间 * + + + + 结束时间 * + + + + +
    请假工时共{$detail.duration}工时请假天数共{$detail.days}天,{$detail.hours}小时
    请假事由* + +
    审批流程* + +
    审核人* + +
    + {/eq} +
    + + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['formSelects','employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/add_caigou.html b/app/oa/view/approve/add_caigou.html new file mode 100644 index 0000000..211b5d7 --- /dev/null +++ b/app/oa/view/approve/add_caigou.html @@ -0,0 +1,227 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/add_style" /} +{/block} + +{block name="body"} +
    +

    采购申请审批

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    物品名称*期望交互日期 * + +
    采购数量*采购金额*
    采购事由* + +
    备注 + +
    审批流程* + +
    审核人* + +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    物品名称*期望交互日期 * + +
    采购数量*采购金额*
    采购事由* + +
    备注 + +
    审批流程* + +
    审核人* + +
    + {/eq} +
    + + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['formSelects','employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/add_chuchai.html b/app/oa/view/approve/add_chuchai.html new file mode 100644 index 0000000..f1754e8 --- /dev/null +++ b/app/oa/view/approve/add_chuchai.html @@ -0,0 +1,339 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/add_style" /} +{/block} + +{block name="body"} +
    +

    出差审批

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + + + +
    开始时间 * + + + + 结束时间 * + + + + +
    出差地点*
    出差事由* + +
    审批流程* + +
    审核人* + +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + + + +
    开始时间 * + + + + 结束时间 * + + + + +
    出差地点*
    出差事由* + +
    审批流程* + +
    审核人* + +
    + {/eq} +
    + + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['formSelects','employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/add_fukuan.html b/app/oa/view/approve/add_fukuan.html new file mode 100644 index 0000000..c5e5a81 --- /dev/null +++ b/app/oa/view/approve/add_fukuan.html @@ -0,0 +1,273 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} + + + + +{/block} + +{block name="body"} +
    +

    付款申请审批

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    付款金额*付款方式* + + 付款日期 * + +
    收款人全称*银行账号*开户行 * + +
    付款事由* + +
    备注 + +
    审批流程* + +
    审核人* + +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    付款金额*付款方式* + + 付款日期 * + +
    收款人全称*银行账号*开户行 * + +
    付款事由* + +
    备注 + +
    审批流程* + +
    审核人* + +
    + {/eq} +
    + + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['formSelects','employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/add_gongwen.html b/app/oa/view/approve/add_gongwen.html new file mode 100644 index 0000000..6bf2acf --- /dev/null +++ b/app/oa/view/approve/add_gongwen.html @@ -0,0 +1,240 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/add_style" /} +{/block} + +{block name="body"} +
    +

    公文流转审批

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    文件名称*紧急程度* + +
    来文单位*来文日期 * + +
    文件摘要* +
    备注 + +
    审批流程* + +
    审核人* + +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    文件名称*紧急程度* + +
    来文单位*来文日期 * + +
    会议室名称*
    备注 + +
    审批流程* + +
    审核人* + +
    + {/eq} +
    + + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['formSelects','employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/add_huiyishi.html b/app/oa/view/approve/add_huiyishi.html new file mode 100644 index 0000000..04077b1 --- /dev/null +++ b/app/oa/view/approve/add_huiyishi.html @@ -0,0 +1,339 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/add_style" /} +{/block} + +{block name="body"} +
    +

    会议室预定审批

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + + + +
    开始时间 * + + + + 结束时间 * + + + + +
    会议室名称*
    备注 + +
    审批流程* + +
    审核人* + +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + + + +
    开始时间 * + + + + 结束时间 * + + + + +
    会议室名称*
    备注 + +
    审批流程* + +
    审核人* + +
    + {/eq} +
    + + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['formSelects','employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/add_huodong.html b/app/oa/view/approve/add_huodong.html new file mode 100644 index 0000000..faba3bd --- /dev/null +++ b/app/oa/view/approve/add_huodong.html @@ -0,0 +1,355 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/add_style" /} +{/block} + +{block name="body"} +
    +

    活动经费审批

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    活动名称*活动预算*
    活动说明* + +
    开始时间 * + + + + 结束时间 * + + + + +
    备注 + +
    审批流程* + +
    审核人* + +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    活动名称*活动预算*
    活动说明* + +
    开始时间 * + + + + 结束时间 * + + + + +
    备注 + +
    审批流程* + +
    审核人* + +
    + {/eq} +
    + + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['formSelects','employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/add_jiaban.html b/app/oa/view/approve/add_jiaban.html new file mode 100644 index 0000000..5ba5c9d --- /dev/null +++ b/app/oa/view/approve/add_jiaban.html @@ -0,0 +1,487 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/add_style" /} +{/block} + +{block name="body"} +
    +

    加班申请审批

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + + + +
    开始时间 * + + + + 结束时间 * + + + + +
    加班时长-
    加班事由* + +
    审批流程* + +
    审核人* + +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + + + +
    开始时间 * + + + + 结束时间 * + + + + +
    加班时长共{$detail.duration}工时
    请假事由* + +
    审批流程* + +
    审核人* + +
    + {/eq} +
    + + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['formSelects','employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/add_jiangli.html b/app/oa/view/approve/add_jiangli.html new file mode 100644 index 0000000..8354195 --- /dev/null +++ b/app/oa/view/approve/add_jiangli.html @@ -0,0 +1,217 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/add_style" /} +{/block} + +{block name="body"} +
    +

    奖励申请审批

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + +
    奖励金额*奖励日期 * + +
    奖励事由* + +
    备注 + +
    审批流程* + +
    审核人* + +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + +
    奖励金额*奖励日期 * + +
    奖励事由* + +
    备注 + +
    审批流程* + +
    审核人* + +
    + {/eq} +
    + + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['formSelects','employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/add_jiekuan.html b/app/oa/view/approve/add_jiekuan.html new file mode 100644 index 0000000..8b803ca --- /dev/null +++ b/app/oa/view/approve/add_jiekuan.html @@ -0,0 +1,255 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/add_style" /} +{/block} + +{block name="body"} +
    +

    借款申请审批

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    借款金额*借款类型* + + 申请日期 * + +
    借款人*银行账号*开户行 * + +
    借款事由* + +
    备注 + +
    审批流程* + +
    审核人* + +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    借款金额*费用类型* + + 申请日期 * + +
    借款人*银行账号*开户行 * + +
    借款事由* + +
    备注 + +
    审批流程* + +
    审核人* + +
    + {/eq} +
    + + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['formSelects','employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/add_lizhi.html b/app/oa/view/approve/add_lizhi.html new file mode 100644 index 0000000..31efb32 --- /dev/null +++ b/app/oa/view/approve/add_lizhi.html @@ -0,0 +1,261 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/add_style" /} +{/block} + +{block name="body"} +
    +

    离职申请审批

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    员工姓名*入职日期 * + +
    所在部门* + + 担任职务* + +
    申请离职日期*预计离职日期* + +
    申请离职原因* + +
    审批流程* + +
    审核人* + +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    员工姓名*入职日期 * + +
    所在部门* + + 担任职务* + +
    申请离职日期*预计离职日期* + +
    申请离职原因* + +
    审批流程* + +
    审核人* + +
    + {/eq} +
    + + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['formSelects','employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/add_qingjia.html b/app/oa/view/approve/add_qingjia.html new file mode 100644 index 0000000..c0be4fd --- /dev/null +++ b/app/oa/view/approve/add_qingjia.html @@ -0,0 +1,464 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/add_style" /} +{/block} + +{block name="body"} +
    +

    请假审批

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    请假类型* + +
    开始时间 * + + + + 结束时间 * + + + + +
    请假工时-请假天数-
    请假事由* + +
    审批流程* + +
    审核人* + +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    请假类型* + +
    开始时间 * + + + + 结束时间 * + + + + +
    请假工时共{$detail.duration}工时请假天数共{$detail.days}天,{$detail.hours}小时
    请假事由* + +
    审批流程* + +
    审核人* + +
    + {/eq} +
    + + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['formSelects','employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/add_ruzhi.html b/app/oa/view/approve/add_ruzhi.html new file mode 100644 index 0000000..e9b250a --- /dev/null +++ b/app/oa/view/approve/add_ruzhi.html @@ -0,0 +1,263 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/add_style" /} +{/block} + +{block name="body"} +
    +

    入职申请审批

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    员工姓名*入职日期 * + +
    手机号码*性别* + + +
    入职部门* + + 担任职务* + +
    备注 + +
    审批流程* + +
    审核人* + +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    员工姓名*入职日期 * + +
    手机号码*性别* + + +
    入职部门* + + 担任职务* + +
    备注 + +
    审批流程* + +
    审核人* + +
    + {/eq} +
    + + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/add_style.html b/app/oa/view/approve/add_style.html new file mode 100644 index 0000000..fbf17bd --- /dev/null +++ b/app/oa/view/approve/add_style.html @@ -0,0 +1,11 @@ + + + + \ No newline at end of file diff --git a/app/oa/view/approve/add_waichu.html b/app/oa/view/approve/add_waichu.html new file mode 100644 index 0000000..554497f --- /dev/null +++ b/app/oa/view/approve/add_waichu.html @@ -0,0 +1,438 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/add_style" /} +{/block} + +{block name="body"} +
    +

    外出审批

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    外出地点*
    开始时间 * + + + + 结束时间 * + + + + +
    外出时长-外出天数-
    外出事由* + +
    审批流程* + +
    审核人* + +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    外出地点*
    开始时间 * + + + + 结束时间 * + + + + +
    外出时长共{$detail.duration}工时外出天数共{$detail.days}天,{$detail.hours}小时
    外出事由* + +
    审批流程* + +
    审核人* + +
    + {/eq} +
    + + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['formSelects','employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/add_weixiu.html b/app/oa/view/approve/add_weixiu.html new file mode 100644 index 0000000..ff26df2 --- /dev/null +++ b/app/oa/view/approve/add_weixiu.html @@ -0,0 +1,231 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/add_style" /} +{/block} + +{block name="body"} +
    +

    物品维修审批

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + + + +
    故障设备名称*紧急程度* + +
    预计维修费用*报修日期 * + +
    故障描述* + +
    审批流程* + +
    审核人* + +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + + + +
    故障设备名称*紧急程度* + +
    预计维修费用*报修日期 * + +
    故障描述* + +
    审批流程* + +
    审核人* + +
    + {/eq} +
    + + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['formSelects','employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/add_yongche.html b/app/oa/view/approve/add_yongche.html new file mode 100644 index 0000000..2f2b292 --- /dev/null +++ b/app/oa/view/approve/add_yongche.html @@ -0,0 +1,513 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/add_style" /} +{/block} + +{block name="body"} +
    +

    用车审批

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    开始时间 * + + + + 结束时间 * + + + + +
    用车时长-
    用车目的地*车辆选择* + +
    用车事由* + +
    审批流程* + +
    审核人* + +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    开始时间 * + + + + 结束时间 * + + + + +
    用车时长共{$detail.duration}小时
    用车目的地*车辆选择* + +
    用车事由* + +
    审批流程* + +
    审核人* + +
    + {/eq} +
    + + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['formSelects','employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/add_yongcheguihai.html b/app/oa/view/approve/add_yongcheguihai.html new file mode 100644 index 0000000..75cb663 --- /dev/null +++ b/app/oa/view/approve/add_yongcheguihai.html @@ -0,0 +1,231 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/add_style" /} +{/block} + +{block name="body"} +
    +

    用车归还审批

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + + + +
    车辆选择* + + 归还时间 * + +
    用车前公里数*用车后公里数*
    备注 + +
    审批流程* + +
    审核人* + +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + + + +
    车辆选择* + + 归还时间 * + +
    用车前公里数*用车后公里数*
    备注 + +
    审批流程* + +
    审核人* + +
    + {/eq} +
    + + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['formSelects','employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/add_yongzhang.html b/app/oa/view/approve/add_yongzhang.html new file mode 100644 index 0000000..28a136a --- /dev/null +++ b/app/oa/view/approve/add_yongzhang.html @@ -0,0 +1,263 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/add_style" /} +{/block} + +{block name="body"} +
    +

    用章审批

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    用印日期 * + + 印章类型* + +
    文件名称*
    文件类型* + + 文件份数 * + +
    用印事由* + +
    审批流程* + +
    审核人* + +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    用印日期 * + + 印章类型* + +
    文件名称*
    文件类型* + + 文件份数 * + +
    用印事由* + +
    审批流程* + +
    审核人* + +
    + {/eq} +
    + + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['formSelects','employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/add_zhaopin.html b/app/oa/view/approve/add_zhaopin.html new file mode 100644 index 0000000..15d30a8 --- /dev/null +++ b/app/oa/view/approve/add_zhaopin.html @@ -0,0 +1,261 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/add_style" /} +{/block} + +{block name="body"} +
    +

    招聘需求审批

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    招聘部门* + + 期望到岗日期 * + +
    招聘岗位* + + 招聘人数 * + +
    岗位职责 * + +
    任职要求 * + +
    审批流程* + +
    审核人* + +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    招聘部门* + + 期望到岗日期 * + +
    招聘岗位* + + 招聘人数 * + +
    岗位职责 * + +
    任职要求 * + +
    审批流程* + +
    审核人* + +
    + {/eq} +
    + + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['formSelects','employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/add_zhuanzheng.html b/app/oa/view/approve/add_zhuanzheng.html new file mode 100644 index 0000000..69078f1 --- /dev/null +++ b/app/oa/view/approve/add_zhuanzheng.html @@ -0,0 +1,245 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/add_style" /} +{/block} + +{block name="body"} +
    +

    转正申请审批

    + {eq name="$id" value="0"} + + + + + + + + + + + + + + + + + + + + + + + + + +
    员工姓名*转正日期 * + +
    所在部门* + + 担任职务* + +
    试用期评价* + +
    审批流程* + +
    审核人* + +
    + {else/} + + + + + + + + + + + + + + + + + + + + + + + + + +
    员工姓名*转正日期 * + +
    所在部门* + + 担任职务* + +
    试用期评价* + +
    审批流程* + +
    审核人* + +
    + {/eq} +
    + + + + +
    +
    +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['formSelects','employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/index.html b/app/oa/view/approve/index.html new file mode 100644 index 0000000..623a59f --- /dev/null +++ b/app/oa/view/approve/index.html @@ -0,0 +1,155 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} + +{/block} + +{block name="body"} +
    +
    +
    +

    审批新申请

    +
    假勤
    +
    +
    + {volist name="list" id="vo"} + {eq name="vo.type" value="1"} +
    {$vo.title}
    + {/eq} + {/volist} +
    +
    +
    行政
    +
    +
    + {volist name="list" id="vo"} + {eq name="vo.type" value="2"} +
    {$vo.title}
    + {/eq} + {/volist} +
    +
    +
    财务
    +
    +
    + {volist name="list" id="vo"} + {eq name="vo.type" value="3"} +
    {$vo.title}
    + {/eq} + {/volist} +
    +
    +
    人事
    +
    +
    + {volist name="list" id="vo"} + {eq name="vo.type" value="4"} +
    {$vo.title}
    + {/eq} + {/volist} +
    +
    +
    其他
    +
    +
    + {volist name="list" id="vo"} + {eq name="vo.type" value="5"} +
    {$vo.title}
    + {/eq} + {/volist} +
    +
    +
    +
    +
    +
    +
    +
      +
    • 全部
    • +
    • 待审批
    • +
    • 审批通过
    • +
    • 审批拒绝
    • +
    +
    +
    +
    +
    +
    +
    +
    + +{/block} + + + +{block name="script"} + + {include file="../../base/view/common/layui" base='base' extend="['rightpage']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/list.html b/app/oa/view/approve/list.html new file mode 100644 index 0000000..a6cbf97 --- /dev/null +++ b/app/oa/view/approve/list.html @@ -0,0 +1,153 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} + +{/block} + +{block name="body"} +
    +
    +
    +

    审批新申请

    +
    假勤
    +
    +
    + {volist name="list" id="vo"} + {eq name="vo.type" value="1"} +
    {$vo.title}
    + {/eq} + {/volist} +
    +
    +
    行政
    +
    +
    + {volist name="list" id="vo"} + {eq name="vo.type" value="2"} +
    {$vo.title}
    + {/eq} + {/volist} +
    +
    +
    财务
    +
    +
    + {volist name="list" id="vo"} + {eq name="vo.type" value="3"} +
    {$vo.title}
    + {/eq} + {/volist} +
    +
    +
    人事
    +
    +
    + {volist name="list" id="vo"} + {eq name="vo.type" value="4"} +
    {$vo.title}
    + {/eq} + {/volist} +
    +
    +
    其他
    +
    +
    + {volist name="list" id="vo"} + {eq name="vo.type" value="5"} +
    {$vo.title}
    + {/eq} + {/volist} +
    +
    +
    +
    +
    +
    +
    +
      +
    • 全部
    • +
    • 待我审批
    • +
    • 我已审批
    • +
    +
    +
    +
    +
    +
    +
    +
    + +{/block} + + + +{block name="script"} + + {include file="../../base/view/common/layui" base='base' extend="['rightpage']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/view_caigou.html b/app/oa/view/approve/view_caigou.html new file mode 100644 index 0000000..7d0d589 --- /dev/null +++ b/app/oa/view/approve/view_caigou.html @@ -0,0 +1,42 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/view_style" /} +{/block} + +{block name="body"} +
    +

    采购申请审批

    + + + + + + + + + + + + + + + + + + + + + +
    物品名称{$detail.amount}期望交互日期{$detail.detail_time}
    采购数量{$detail.num}采购金额{$detail.amount}
    采购事由{$detail.content}
    备注{$detail.remark}
    + + {include file="/approve/view_step" /} +
    +{/block} + + + +{block name="script"} +{include file="/approve/view_script" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/view_chuchai.html b/app/oa/view/approve/view_chuchai.html new file mode 100644 index 0000000..1eb78f9 --- /dev/null +++ b/app/oa/view/approve/view_chuchai.html @@ -0,0 +1,34 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/view_style" /} +{/block} + +{block name="body"} +
    +

    出差审批

    + + + + + + + + + + + + + +
    出差地点{$detail.address}
    出差日期{$detail.start_time} 至 {$detail.end_time}
    出差事由{$detail.content}
    + + {include file="/approve/view_step" /} +
    +{/block} + + + +{block name="script"} +{include file="/approve/view_script" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/view_fukuan.html b/app/oa/view/approve/view_fukuan.html new file mode 100644 index 0000000..7a8f44b --- /dev/null +++ b/app/oa/view/approve/view_fukuan.html @@ -0,0 +1,54 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/view_style" /} +{/block} + +{block name="body"} +
    +

    付款申请审批

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    付款金额{$detail.amount}付款方式 + {eq name="$detail.detail_type" value="1"}银行卡{/eq} + {eq name="$detail.detail_type" value="2"}现金{/eq} + {eq name="$detail.detail_type" value="3"}汇票{/eq} + {eq name="$detail.detail_type" value="4"}电汇{/eq} + {eq name="$detail.detail_type" value="5"}贷记{/eq} + {eq name="$detail.detail_type" value="6"}支票{/eq} + {eq name="$detail.detail_type" value="7"}其他{/eq} + 付款日期{$detail.detail_time}
    收款人全称{$detail.name}银行账号{$detail.bank}开户行{$detail.address}
    付款事由{$detail.content}
    备注{$detail.remark}
    + + {include file="/approve/view_step" /} +
    +{/block} + + + +{block name="script"} +{include file="/approve/view_script" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/view_gongwen.html b/app/oa/view/approve/view_gongwen.html new file mode 100644 index 0000000..81cc05f --- /dev/null +++ b/app/oa/view/approve/view_gongwen.html @@ -0,0 +1,46 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/view_style" /} +{/block} + +{block name="body"} +
    +

    公文流转审批

    + + + + + + + + + + + + + + + + + + + + + +
    文件名称{$detail.name}紧急程度 + {eq name="$detail.detail_type" value="1"}普通{/eq} + {eq name="$detail.detail_type" value="2"}紧急{/eq} + {eq name="$detail.detail_type" value="3"}特急{/eq} +
    来文单位{$detail.address}来文日期{$detail.detail_time}
    文件摘要{$detail.content}
    备注{$detail.remark}
    + + {include file="/approve/view_step" /} +
    +{/block} + + + +{block name="script"} +{include file="/approve/view_script" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/view_huiyishi.html b/app/oa/view/approve/view_huiyishi.html new file mode 100644 index 0000000..3d6e1d0 --- /dev/null +++ b/app/oa/view/approve/view_huiyishi.html @@ -0,0 +1,34 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/view_style" /} +{/block} + +{block name="body"} +
    +

    会议室预定审批

    + + + + + + + + + + + + + +
    会议室名称{$detail.name}
    预定时间{$detail.start_time} 至 {$detail.end_time}
    备注{$detail.remark}
    + + {include file="/approve/view_step" /} +
    +{/block} + + + +{block name="script"} +{include file="/approve/view_script" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/view_huodong.html b/app/oa/view/approve/view_huodong.html new file mode 100644 index 0000000..f8bc450 --- /dev/null +++ b/app/oa/view/approve/view_huodong.html @@ -0,0 +1,38 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/view_style" /} +{/block} + +{block name="body"} +
    +

    活动经费审批

    + + + + + + + + + + + + + + + + + +
    活动名称{$detail.name}活动预算{$detail.amount}活动日期{$detail.start_time} 至 {$detail.end_time}
    活动说明{$detail.content}
    备注{$detail.remark}
    + + {include file="/approve/view_step" /} +
    +{/block} + + + +{block name="script"} +{include file="/approve/view_script" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/view_jiaban.html b/app/oa/view/approve/view_jiaban.html new file mode 100644 index 0000000..cd297c8 --- /dev/null +++ b/app/oa/view/approve/view_jiaban.html @@ -0,0 +1,32 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/view_style" /} +{/block} + +{block name="body"} +
    +

    加班申请审批

    + + + + + + + + + + + +
    加班时间{$detail.start_time} 至 {$detail.end_time}加班时长共{$detail.duration}工时
    加班事由{$detail.content}
    + + {include file="/approve/view_step" /} +
    +{/block} + + + +{block name="script"} +{include file="/approve/view_script" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/view_jiangli.html b/app/oa/view/approve/view_jiangli.html new file mode 100644 index 0000000..ec7b94d --- /dev/null +++ b/app/oa/view/approve/view_jiangli.html @@ -0,0 +1,36 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/view_style" /} +{/block} + +{block name="body"} +
    +

    奖励申请审批

    + + + + + + + + + + + + + + + +
    奖励金额{$detail.amount}奖励日期{$detail.detail_time}
    奖励事由{$detail.content}
    备注{$detail.remark}
    + + {include file="/approve/view_step" /} +
    +{/block} + + + +{block name="script"} +{include file="/approve/view_script" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/view_jiekuan.html b/app/oa/view/approve/view_jiekuan.html new file mode 100644 index 0000000..650894c --- /dev/null +++ b/app/oa/view/approve/view_jiekuan.html @@ -0,0 +1,50 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/view_style" /} +{/block} + +{block name="body"} +
    +

    借款申请审批

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    借款金额{$detail.amount}借款类型 + {volist name=":oa_cost_cate()" id="vo"} + {eq name="$detail.detail_type" value="$vo.id"}{$vo.title}{/eq} + {/volist} + 申请日期{$detail.detail_time}
    借款人{$detail.name}银行账号{$detail.bank}开户行{$detail.address}
    借款事由{$detail.content}
    备注{$detail.remark}
    + + {include file="/approve/view_step" /} +
    +{/block} + + + +{block name="script"} +{include file="/approve/view_script" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/view_lizhi.html b/app/oa/view/approve/view_lizhi.html new file mode 100644 index 0000000..1a04249 --- /dev/null +++ b/app/oa/view/approve/view_lizhi.html @@ -0,0 +1,52 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/view_style" /} +{/block} + +{block name="body"} +
    +

    离职申请审批

    + + + + + + + + + + + + + + + + + + + + + + + +
    员工姓名{$detail.name}入职日期{$detail.detail_time}
    所在部门 + {volist name=":get_department()" id="vo"} + {eq name="$detail.department_type" value="$vo.id"}{$vo.title}{/eq} + {/volist} + 担任职务 + {volist name=":get_position()" id="vo"} + {eq name="$detail.position_type" value="$vo.id"}{$vo.title}{/eq} + {/volist} +
    申请离职日期{$detail.start_time}预计离职日期{$detail.end_time}
    申请离职原因{$detail.content}
    + + {include file="/approve/view_step" /} +
    +{/block} + + + +{block name="script"} +{include file="/approve/view_script" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/view_qingjia.html b/app/oa/view/approve/view_qingjia.html new file mode 100644 index 0000000..9299976 --- /dev/null +++ b/app/oa/view/approve/view_qingjia.html @@ -0,0 +1,48 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/view_style" /} +{/block} + +{block name="body"} +
    +

    请假审批

    + + + + + + + + + + + + + + + + + +
    请假类型 + {eq name="$detail.detail_type" value="1"}事假{/eq} + {eq name="$detail.detail_type" value="2"}年假{/eq} + {eq name="$detail.detail_type" value="3"}调休假{/eq} + {eq name="$detail.detail_type" value="4"}病假{/eq} + {eq name="$detail.detail_type" value="5"}婚假{/eq} + {eq name="$detail.detail_type" value="6"}丧假{/eq} + {eq name="$detail.detail_type" value="7"}产假{/eq} + {eq name="$detail.detail_type" value="8"}陪产假{/eq} + {eq name="$detail.detail_type" value="9"}其他{/eq} + 请假日期{$detail.start_time} 至 {$detail.end_time}
    请假工时共{$detail.duration}工时请假天数共{$detail.days}天,{$detail.hours}小时
    请假事由{$detail.content}
    + + {include file="/approve/view_step" /} +
    +{/block} + + + +{block name="script"} +{include file="/approve/view_script" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/view_ruzhi.html b/app/oa/view/approve/view_ruzhi.html new file mode 100644 index 0000000..1f93781 --- /dev/null +++ b/app/oa/view/approve/view_ruzhi.html @@ -0,0 +1,55 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/view_style" /} +{/block} + +{block name="body"} +
    +

    入职申请审批

    + + + + + + + + + + + + + + + + + + + + + + + +
    员工姓名{$detail.name}入职日期{$detail.detail_time}
    手机号码{$detail.num}性别 + {eq name="$detail.other_type" value="1"}男{/eq} + {eq name="$detail.other_type" value="2"}女{/eq} +
    入职部门 + {volist name=":get_department()" id="vo"} + {eq name="$detail.department_type" value="$vo.id"}{$vo.title}{/eq} + {/volist} + 担任职务 + {volist name=":get_position()" id="vo"} + {eq name="$detail.position_type" value="$vo.id"}{$vo.title}{/eq} + {/volist} +
    备注{$detail.remark}
    + + {include file="/approve/view_step" /} +
    +{/block} + + + +{block name="script"} +{include file="/approve/view_script" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/view_script.html b/app/oa/view/approve/view_script.html new file mode 100644 index 0000000..48bd79e --- /dev/null +++ b/app/oa/view/approve/view_script.html @@ -0,0 +1,257 @@ + \ No newline at end of file diff --git a/app/oa/view/approve/view_step.html b/app/oa/view/approve/view_step.html new file mode 100644 index 0000000..3b619af --- /dev/null +++ b/app/oa/view/approve/view_step.html @@ -0,0 +1,61 @@ + + + + + + + + + + + + {if ( $detail.check_status lt 2) AND ( $is_check_admin eq 1) } + {eq name="$flows.flow_type" value="0"} + + + + + {/eq} + + + + + {/if} +
    审核状态{eq name="$detail.check_status" value="0"}待审批{/eq} + {eq name="$detail.check_status" value="1"}审批中{/eq} + {eq name="$detail.check_status" value="2"}已通过{/eq} + {eq name="$detail.check_status" value="3"}已拒绝{/eq} + {eq name="$detail.check_status" value="4"}已撤销{/eq} + 查看审批记录 + 当前审核人{$detail.check_user}
    审批流程 +
    +
    + +
    {$detail.create_user}
    +
    创建
    + +
    +
    +
    审批节点 * + + +
    + +
    +
    审批意见 * + +
    + + +
    + {eq name="$is_check_admin" value='1'} + 通过 + 拒绝 + {/eq} + {if ( $detail.check_status lt 2) AND ( $is_create_admin eq 1) } + 撤回 + {/if} + {if ( $detail.check_status gt 2) AND ( $is_create_admin eq 1) } + 重新编辑 + {/if} +
    \ No newline at end of file diff --git a/app/oa/view/approve/view_style.html b/app/oa/view/approve/view_style.html new file mode 100644 index 0000000..71eada0 --- /dev/null +++ b/app/oa/view/approve/view_style.html @@ -0,0 +1,47 @@ + + + \ No newline at end of file diff --git a/app/oa/view/approve/view_waichu.html b/app/oa/view/approve/view_waichu.html new file mode 100644 index 0000000..54e54f9 --- /dev/null +++ b/app/oa/view/approve/view_waichu.html @@ -0,0 +1,40 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/view_style" /} +{/block} + +{block name="body"} +
    +

    外出审批

    + + + + + + + + + + + + + + + + + + + +
    外出地点{$detail.address}
    外出日期{$detail.start_time} 至 {$detail.end_time}
    外出时长共{$detail.duration}工时外出天数共{$detail.days}天,{$detail.hours}小时
    外出事由{$detail.content}
    + + {include file="/approve/view_step" /} +
    +{/block} + + + +{block name="script"} +{include file="/approve/view_script" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/view_weixiu.html b/app/oa/view/approve/view_weixiu.html new file mode 100644 index 0000000..ca415dd --- /dev/null +++ b/app/oa/view/approve/view_weixiu.html @@ -0,0 +1,42 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/view_style" /} +{/block} + +{block name="body"} +
    +

    物品维修审批

    + + + + + + + + + + + + + + + + + +
    紧急程度 + {eq name="$detail.detail_type" value="1"}普通{/eq} + {eq name="$detail.detail_type" value="2"}紧急{/eq} + {eq name="$detail.detail_type" value="3"}特急{/eq} + 故障设备名称{$detail.name}
    报修日期{$detail.detail_time}预计维修费用{$detail.amount}
    故障描述{$detail.content}
    + + {include file="/approve/view_step" /} +
    +{/block} + + + +{block name="script"} +{include file="/approve/view_script" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/view_yongche.html b/app/oa/view/approve/view_yongche.html new file mode 100644 index 0000000..b3e3c4e --- /dev/null +++ b/app/oa/view/approve/view_yongche.html @@ -0,0 +1,42 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/view_style" /} +{/block} + +{block name="body"} +
    +

    用车审批

    + + + + + + + + + + + + + + + + + +
    用车时间{$detail.start_time} 至 {$detail.end_time}用车时长共{$detail.duration}小时
    用车目的地{$detail.address}车辆 + {volist name=":oa_car_cate()" id="vo"} + {eq name="$detail.detail_type" value="$vo.id"}{$vo.title}{/eq} + {/volist} +
    用车事由{$detail.content}
    + + {include file="/approve/view_step" /} +
    +{/block} + + + +{block name="script"} +{include file="/approve/view_script" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/view_yongcheguihai.html b/app/oa/view/approve/view_yongcheguihai.html new file mode 100644 index 0000000..38a4662 --- /dev/null +++ b/app/oa/view/approve/view_yongcheguihai.html @@ -0,0 +1,42 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/view_style" /} +{/block} + +{block name="body"} +
    +

    用车归还审批

    + + + + + + + + + + + + + + + + + +
    车辆 + {volist name=":oa_car_cate()" id="vo"} + {eq name="$detail.detail_type" value="$vo.id"}{$vo.title}{/eq} + {/volist} + 用车前公里数{$detail.num}
    归还时间{$detail.detail_time}用车后公里数{$detail.num1}
    备注{$detail.remark}
    + + {include file="/approve/view_step" /} +
    +{/block} + + + +{block name="script"} +{include file="/approve/view_script" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/view_yongzhang.html b/app/oa/view/approve/view_yongzhang.html new file mode 100644 index 0000000..08e9dff --- /dev/null +++ b/app/oa/view/approve/view_yongzhang.html @@ -0,0 +1,53 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/view_style" /} +{/block} + +{block name="body"} +
    +

    用章审批

    + + + + + + + + + + + + + + + + + + + + + +
    用印日期{$detail.detail_time}印章类型 + {volist name=":oa_seal_cate()" id="vo"} + {eq name="$detail.detail_type" value="$vo.id"}{$vo.title}{/eq} + {/volist} +
    文件名称{$detail.name}
    文件类型 + {eq name="$detail.other_type" value="1"}公告类{/eq} + {eq name="$detail.other_type" value="2"}规则制度类{/eq} + {eq name="$detail.other_type" value="3"}合同类{/eq} + {eq name="$detail.other_type" value="4"}资质更新类{/eq} + {eq name="$detail.other_type" value="5"}员工证明{/eq} + {eq name="$detail.other_type" value="6"}其他{/eq} + 文件份数{$detail.num}
    用印事由{$detail.content}
    + + {include file="/approve/view_step" /} +
    +{/block} + + + +{block name="script"} +{include file="/approve/view_script" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/view_zhaopin.html b/app/oa/view/approve/view_zhaopin.html new file mode 100644 index 0000000..19bae44 --- /dev/null +++ b/app/oa/view/approve/view_zhaopin.html @@ -0,0 +1,50 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/view_style" /} +{/block} + +{block name="body"} +
    +

    招聘需求审批

    + + + + + + + + + + + + + + + + + + + + + +
    招聘部门 + {volist name=":get_department()" id="vo"} + {eq name="$detail.department_type" value="$vo.id"}{$vo.title}{/eq} + {/volist} + 招聘岗位 + {volist name=":get_position()" id="vo"} + {eq name="$detail.position_type" value="$vo.id"}{$vo.title}{/eq} + {/volist} +
    招聘人数{$detail.num}期望到岗日期{$detail.detail_time}
    岗位职责{$detail.content}
    任职要求{$detail.remark}
    + + {include file="/approve/view_step" /} +
    +{/block} + + + +{block name="script"} +{include file="/approve/view_script" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/approve/view_zhuanzheng.html b/app/oa/view/approve/view_zhuanzheng.html new file mode 100644 index 0000000..c55e80a --- /dev/null +++ b/app/oa/view/approve/view_zhuanzheng.html @@ -0,0 +1,46 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} +{include file="/approve/view_style" /} +{/block} + +{block name="body"} +
    +

    转正申请审批

    + + + + + + + + + + + + + + + + + +
    员工姓名{$detail.name}转正日期{$detail.detail_time}
    所在部门 + {volist name=":get_department()" id="vo"} + {eq name="$detail.department_type" value="$vo.id"}{$vo.title}{/eq} + {/volist} + 担任职务 + {volist name=":get_position()" id="vo"} + {eq name="$detail.position_type" value="$vo.id"}{$vo.title}{/eq} + {/volist} +
    试用期评价{$detail.content}
    + + {include file="/approve/view_step" /} +
    +{/block} + + + +{block name="script"} +{include file="/approve/view_script" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/home/view/plan/calendar.html b/app/oa/view/plan/calendar.html similarity index 92% rename from app/home/view/plan/calendar.html rename to app/oa/view/plan/calendar.html index 672f9e5..23b8abc 100644 --- a/app/home/view/plan/calendar.html +++ b/app/oa/view/plan/calendar.html @@ -1,8 +1,8 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="style"} - - + + @@ -72,8 +72,8 @@ ids: ids, names: names, type: 0, - department_url: "/home/api/get_department_tree", - employee_url: "/home/api/get_employee", + department_url: "/api/index/get_department_tree", + employee_url: "/api/index/get_employee", callback: function (ids, names, dids, departments) { $('[name="uid"]').val(ids); that.val(names); @@ -93,7 +93,7 @@ elem: '#test' ,toolbar: '#toolbarDemo' ,title:'日程安排列表' - ,url: "/home/plan/index" + ,url: "/oa/plan/index" ,page: true //开启分页 ,limit: 20 ,cellMinWidth: 80 @@ -141,7 +141,7 @@ var data = obj.data; if(obj.event === 'edit'){ $.ajax({ - url: "/home/plan/detail", + url: "/oa/plan/detail", data:{ id:data.id }, @@ -164,7 +164,7 @@ } else if(obj.event === 'view'){ $.ajax({ - url: "/home/plan/detail", + url: "/oa/plan/detail", data:{ id:data.id }, @@ -451,16 +451,14 @@ } console.log(detail); $.ajax({ - url: "/home/plan/add", + url: "/oa/plan/add", type:'post', data:detail, success:function(e){ layer.msg(e.msg); if(e.code==0){ layer.close(idx); - setTimeout(function(){ - window.location.reload(); - },1000) + tableIns.reload(); } } }) @@ -471,6 +469,6 @@ } - {include file="common/layui" base='base' extend="['dtree','employeepicker']" use="[]" callback="init" /} + {include file="../../base/view/common/layui" base='base' extend="['dtree','employeepicker']" use="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/schedule/calendar.html b/app/oa/view/schedule/calendar.html similarity index 95% rename from app/home/view/schedule/calendar.html rename to app/oa/view/schedule/calendar.html index 891dccc..4f2d0e9 100644 --- a/app/home/view/schedule/calendar.html +++ b/app/oa/view/schedule/calendar.html @@ -1,8 +1,8 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="style"} - - + + @@ -71,8 +71,8 @@ ids: ids, names: names, type: 0, - department_url: "/home/api/get_department_tree", - employee_url: "/home/api/get_employee", + department_url: "/api/index/get_department_tree", + employee_url: "/api/index/get_employee", callback: function (ids, names, dids, departments) { $('[name="uid"]').val(ids); that.val(names); @@ -92,7 +92,7 @@ elem: '#test' ,toolbar: '#toolbarDemo' ,title:'工作记录列表' - ,url: "/home/schedule/index" + ,url: "/oa/schedule/index" ,page: true //开启分页 ,limit: 20 ,cellMinWidth: 80 @@ -207,12 +207,12 @@ let end_time_a = $('#end_time_a').val(); let start_time_b = $('#start_time_b').val(); let end_time_b = $('#end_time_b').val(); - if(start_time=='' || end_time==''){ + if(start_time_a=='' || end_time_a==''){ layer.msg('请选择工作时间范围'); return; } $.ajax({ - url: "/home/schedule/update_labor_time", + url: "/oa/schedule/update_labor_time", type:'post', data:{ id:data.id, @@ -226,9 +226,7 @@ layer.msg(e.msg); if(e.code==0){ layer.close(idx); - setTimeout(function(){ - window.location.reload(); - },1000) + tableIns.reload(); } } }) @@ -237,7 +235,7 @@ } else if(obj.event === 'edit'){ $.ajax({ - url: "/home/schedule/detail", + url: "/oa/schedule/detail", data:{ id:data.id }, @@ -250,7 +248,7 @@ } else if(obj.event === 'view'){ $.ajax({ - url: "/home/schedule/detail", + url: "/oa/schedule/detail", data:{ id:data.id }, @@ -325,16 +323,14 @@ } console.log(detail); $.ajax({ - url: "/home/schedule/add", + url: "/oa/schedule/add", type:'post', data:detail, success:function(e){ layer.msg(e.msg); if(e.code==0){ layer.close(idx); - setTimeout(function(){ - window.location.reload(); - },1000) + tableIns.reload(); } } }) @@ -522,26 +518,23 @@ } console.log(detail); $.ajax({ - url: "/home/schedule/add", + url: "/oa/schedule/add", type:'post', data:detail, success:function(e){ layer.msg(e.msg); if(e.code==0){ layer.close(idx); - setTimeout(function(){ - window.location.reload(); - },1000) + tableIns.reload(); } } }) } }) - } - + } } - {include file="common/layui" base='base' extend="['dtree','employeepicker']" use="[]" callback="init" /} + {include file="../../base/view/common/layui" base='base' extend="['dtree','employeepicker']" use="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/app/oa/view/work/add.html b/app/oa/view/work/add.html new file mode 100644 index 0000000..4a58999 --- /dev/null +++ b/app/oa/view/work/add.html @@ -0,0 +1,323 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} + + +{/block} + +{block name="body"} +
    +

    工作汇报

    + {if condition="$id eq 0"} + + + + + + + + + + {if condition="($type == 1)"} + + + + + + + + {elseif condition="($type == 2)"} + + + + + + + + {elseif condition="($type == 3)"} + + + + + + + + {/if} + + + + + + + +
    汇报类型 + {eq name="$type" value="1"}日报{/eq} + {eq name="$type" value="2"}周报{/eq} + {eq name="$type" value="3"}月报{/eq} +
    接收人* + + +
    今日工作* + +
    明日计划 + +
    本周工作* + +
    下周计划 + +
    本月工作* + +
    下月计划 + +
    其它事项 + +
    相关附件 +
    + 最大只能上传{:get_system_info('upload_max_filesize')}的文件,超过{:get_system_info('upload_max_filesize')}请压缩成多个文件上传。 + +
    +
    +
    + + + +
    + {else/} + + + + + + + + + + {if condition="($type == 1)"} + + + + + + + + {elseif condition="($type == 2)"} + + + + + + + + {elseif condition="($type == 3)"} + + + + + + + + {/if} + + + + + + + +
    汇报类型 + {eq name="$detail.type" value="1"}日报{/eq} + {eq name="$detail.type" value="2"}周报{/eq} + {eq name="$detail.type" value="3"}月报{/eq} +
    接收人 + {$detail.person_name} +
    今日工作* + +
    明日计划 + +
    本周工作* + +
    下周计划 + +
    本月工作* + +
    下月计划 + +
    其它事项 + +
    相关附件 +
    + 最大只能上传{:get_system_info('upload_max_filesize')}的文件,超过{:get_system_info('upload_max_filesize')}请压缩成多个文件上传。 +
    + + + + + + + + + + {notempty name="$file_array"} + {volist name="file_array" id="vo"} + + + + + + {/volist} + {/notempty} + +
    文件名文件大小操作
    {$vo.name}{$vo.filesize/1048576|round=2}MB + 删除 +
    +
    +
    +
    +
    + + +
    + {/if} +
    +{/block} + + + +{block name="script"} + + {include file="../../base/view/common/layui" base='base' extend="['dtree','employeepicker']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/work/index.html b/app/oa/view/work/index.html new file mode 100644 index 0000000..aad53a2 --- /dev/null +++ b/app/oa/view/work/index.html @@ -0,0 +1,284 @@ +{extend name="../../base/view/common/base" /} + +{block name="body"} +
    +
    +
      +
    • 发送的汇报
    • +
    • 接受的汇报
    • +
    +
    +
    +
    +
    +
    + +
    + ~ +
    + +
    +
    +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    + +
    + ~ +
    + +
    +
    +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    + +
    + + + + + +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="['rightpage']" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/oa/view/work/read.html b/app/oa/view/work/read.html new file mode 100644 index 0000000..71d1805 --- /dev/null +++ b/app/oa/view/work/read.html @@ -0,0 +1,91 @@ +{extend name="../../base/view/common/base" /} + +{block name="body"} +
    +

    汇报详情

    + + + + + + + + + + + + + + {notempty name="$detail.read_users"} + + + + + {/notempty} + + + + + + + + + + + + + {notempty name="$detail.file_array"} + + + + + {/notempty} +
    汇报类型{$detail.type_title}汇报人{$detail.person_name}汇报时间{$detail.send_time}
    接收人{$detail.users}
    已读回执{$detail.read_users}
    工作内容 + {$detail.works} +
    工作计划 + {$detail.plans} +
    其他事项 + {$detail.remark} +
    相关附件 + + + + + + + + + + {volist name="detail.file_array" id="vo"} + + + + + + {/volist} + +
    文件名文件大小操作
    {$vo.name}{$vo.filesize/1048576|round=2}MB下载
    +
    + {gt name="$detail.update_time" value="0"} +
    该汇报于 {$detail.update_time_str} 进行过编辑
    + {/gt} +
    +{/block} + + + +{block name="script"} + + {include file="../../base/view/common/layui" base='base' extend="[]" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/user/common.php b/app/user/common.php new file mode 100644 index 0000000..212b2d8 --- /dev/null +++ b/app/user/common.php @@ -0,0 +1,12 @@ +order('sort asc,id asc')->select()->toArray(); $user_groups = Db::name('PositionGroup') ->alias('a') ->join("AdminGroup g", "a.group_id=g.id", 'LEFT') @@ -145,18 +144,13 @@ class Position extends BaseController ->toArray(); $groups = $user_groups ?: []; - $menus = []; $rules = []; foreach ($groups as $g) { - $menus = array_merge($menus, explode(',', trim($g['menus'], ','))); $rules = array_merge($rules, explode(',', trim($g['rules'], ','))); } - $menus = array_unique($menus); $rules = array_unique($rules); - $role_menu = create_tree_list(0, $menu, $menus); $role_rule = create_tree_list(0, $rule, $rules); - View::assign('role_menu', $role_menu); View::assign('role_rule', $role_rule); View::assign('detail', $detail); View::assign('group', $group); diff --git a/app/home/controller/Admin.php b/app/user/controller/User.php similarity index 96% rename from app/home/controller/Admin.php rename to app/user/controller/User.php index b570d0a..418f0c5 100644 --- a/app/home/controller/Admin.php +++ b/app/user/controller/User.php @@ -7,18 +7,18 @@ declare (strict_types = 1); -namespace app\home\controller; +namespace app\user\controller; use app\base\BaseController; -use app\home\model\Admin as AdminList; -use app\home\validate\AdminCheck; +use app\user\model\Admin as AdminList; +use app\user\validate\AdminCheck; use avatars\MDAvatars; use Overtrue\Pinyin\Pinyin; use think\exception\ValidateException; use think\facade\Db; use think\facade\View; -class Admin extends BaseController +class User extends BaseController { public function index() { @@ -174,8 +174,8 @@ class Admin extends BaseController $id = get_params('id'); $detail = get_admin($id); //查询所有菜单和权限节点 - $menu = get_admin_menu(); - $rule = get_admin_rule(); + $menu = Db::name('AdminRule')->where(['menu' => 1])->order('sort asc,id asc')->select()->toArray(); + $rule = Db::name('AdminRule')->order('sort asc,id asc')->select()->toArray(); //查询用户拥有的查单和节点 $user_groups = Db::name('PositionGroup') @@ -186,20 +186,15 @@ class Admin extends BaseController ->toArray(); $groups = $user_groups ?: []; - $menus = []; $rules = []; foreach ($groups as $g) { - $menus = array_merge($menus, explode(',', trim($g['menus'], ','))); $rules = array_merge($rules, explode(',', trim($g['rules'], ','))); } - $menus = array_unique($menus); $rules = array_unique($rules); //数据嵌套 - $role_menu = create_tree_list(0, $menu, $menus); $role_rule = create_tree_list(0, $rule, $rules); - View::assign('role_menu', $role_menu); View::assign('role_rule', $role_rule); View::assign('detail', $detail); add_log('view', get_params('id')); diff --git a/app/user/event.php b/app/user/event.php new file mode 100644 index 0000000..4eff890 --- /dev/null +++ b/app/user/event.php @@ -0,0 +1,5 @@ + {block name="body"} -
    +

    部门架构

    {eq name="$id" value="0"} @@ -19,8 +19,10 @@ {/volist} + + - @@ -78,16 +80,15 @@ //监听提交 form.on('submit(webform)', function(data) { $.ajax({ - url: "/home/department/add", + url: "/user/department/add", type: 'post', data: data.field, success: function(e) { + layer.msg(e.msg); if (e.code == 0) { - layer.confirm('保存成功,返回列表页吗?', { icon: 3, title: '提示' }, function (index) { + setTimeout(function(){ parent.location.reload(); - }); - } else { - layer.msg(e.msg); + },1000); } } }) @@ -95,6 +96,6 @@ }); } -{include file="common/layui" base="base" extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base="base" extend="[]" callback="init" /} {/block} diff --git a/app/home/view/department/index.html b/app/user/view/department/index.html similarity index 81% rename from app/home/view/department/index.html rename to app/user/view/department/index.html index 44c2278..8fa8d1b 100644 --- a/app/home/view/department/index.html +++ b/app/user/view/department/index.html @@ -1,7 +1,7 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"} -
    +
    @@ -23,8 +23,8 @@ id: 'treeTable' , elem: '#treeTable' , idField: 'id' - , url: "/home/department/index" - , cellMinWidth: 100 + , url: "/user/department/index" + , cellMinWidth: 80 , treeId: 'id'//树形id字段名称 , treeUpId: 'pid'//树形父id字段名称 , treeShowName: 'title'//以树形式显示的字段 @@ -47,24 +47,24 @@ //表头工具栏事件 $('.body-table').on('click','.add-menu', function(){ - rightpage.open("/home/department/add"); + rightpage.open("/user/department/add",'900px'); return; }); //操作按钮 treeGrid.on('tool(treeTable)', function (obj) { if (obj.event === 'add') { - rightpage.open('/home/department/add?pid='+obj.data.id); + rightpage.open("/user/department/add?pid="+obj.data.id,'900px'); return; } if (obj.event === 'edit') { - rightpage.open('/home/department/add?id='+obj.data.id); + rightpage.open("/user/department/add?id="+obj.data.id,'900px'); return; } if (obj.event === 'del') { layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) { $.ajax({ - url: "/home/department/delete", + url: "/user/department/delete", type: 'post', data: { id: obj.data.id }, success: function (e) { @@ -80,6 +80,6 @@ }); } -{include file="common/layui" base="base" extend="['treeGrid','rightpage']" callback="init" /} +{include file="../../base/view/common/layui" base="base" extend="['treeGrid','rightpage']" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/personal/change.html b/app/user/view/personal/change.html similarity index 86% rename from app/home/view/personal/change.html rename to app/user/view/personal/change.html index ff49c2b..058bc0d 100644 --- a/app/home/view/personal/change.html +++ b/app/user/view/personal/change.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"}
    @@ -22,15 +22,16 @@ {block name="script"} -{include file="common/layui" base="base" extend="['rightpage']" callback="init" /} +{include file="../../base/view/common/layui" base="base" extend="['rightpage']" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/personal/change_add.html b/app/user/view/personal/change_add.html similarity index 72% rename from app/home/view/personal/change_add.html rename to app/user/view/personal/change_add.html index ae1035d..83828da 100644 --- a/app/home/view/personal/change_add.html +++ b/app/user/view/personal/change_add.html @@ -1,13 +1,13 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="style"} - - + + {/block} {block name="body"} - +

    人事调动

    {if condition="$id eq 0"}
    部门联系电话 +
    @@ -49,22 +49,20 @@ -
    调动员工* - - + {$detail.name} 调出部门* - - + {$detail.from_department}
    调动日期* + {$detail.move_time} 调入部门* - {volist name="$department" id="v"} @@ -103,7 +101,7 @@ showBottom:false }); - $('.body-content').on('click','[name="from_department"]',function(){ + $('.page-content').on('click','[name="from_department"]',function(){ var val=$(this).val(); if(val==''){ layer.msg('请先选择需要调动的员工'); @@ -112,15 +110,15 @@ //选择员工弹窗 - $('.body-content').on('click','[name="name"]',function () { + $('.page-content').on('click','[name="name"]',function () { var ids=$('[name="uid"]').val(),names=$('[name="name"]').val(),dids=$('[name="from_did"]').val(),departments=$('[name="from_department"]').val(); employeepicker.init({ ids:ids, names:names, dids:dids, departments:departments, - department_url: "/home/api/get_department_tree", - employee_url: "/home/api/get_employee", + department_url: "/api/index/get_department_tree", + employee_url: "/api/index/get_employee", type:0, callback:function(ids,names,dids,departments){ $('[name="uid"]').val(ids); @@ -143,16 +141,16 @@ return false; } $.ajax({ - url: "/home/personal/change_add", + url: "/user/personal/change_add", type: 'post', data: data.field, success: function (e) { + layer.msg(e.msg); if(e.code==0){ - layer.confirm('保存成功,返回列表页吗?', {icon: 3, title:'提示'}, function(index){ - parent.location.reload(); - }) - }else{ - layer.msg(e.msg); + parent.tableIns.reload(); + setTimeout(function(){ + parent.layui.rightpage.close(); + },1000); } } }) @@ -161,6 +159,6 @@ } -{include file="common/layui" base='base' extend="['employeepicker']" callback="init" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/personal/leave.html b/app/user/view/personal/leave.html similarity index 88% rename from app/home/view/personal/leave.html rename to app/user/view/personal/leave.html index b0a4cf2..cad85e1 100644 --- a/app/home/view/personal/leave.html +++ b/app/user/view/personal/leave.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"}
    @@ -22,15 +22,16 @@ {block name="script"} -{include file="common/layui" base="base" extend="['rightpage']" callback="init" /} +{include file="../../base/view/common/layui" base="base" extend="['rightpage']" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/personal/leave_add.html b/app/user/view/personal/leave_add.html similarity index 85% rename from app/home/view/personal/leave_add.html rename to app/user/view/personal/leave_add.html index 4be436e..2b7c429 100644 --- a/app/home/view/personal/leave_add.html +++ b/app/user/view/personal/leave_add.html @@ -1,13 +1,13 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="style"} - - + + {/block} {block name="body"} - +

    离职档案

    {if condition="$id eq 0"} @@ -107,7 +107,7 @@ showBottom:false }); - $('.body-content').on('click','[name="department"]',function(){ + $('.page-content').on('click','[name="department"]',function(){ var val=$(this).val(); if(val==''){ layer.msg('请选择离职员工'); @@ -116,14 +116,14 @@ //选择员工弹窗 - $('.body-content').on('click','[name="name"]',function () { + $('.page-content').on('click','[name="name"]',function () { var ids=$('[name="uid"]').val(),names=$('[name="name"]').val(),departments=$('[name="department"]').val(); employeepicker.init({ ids:ids, names:names, departments:departments, - department_url: "/home/api/get_department_tree", - employee_url: "/home/api/get_employee", + department_url: "/api/index/get_department_tree", + employee_url: "/api/index/get_employee", type:0, callback:function(ids,names,dids,departments){ $('[name="uid"]').val(ids); @@ -134,13 +134,13 @@ }); //监听部门负责人 - $('.body-content').on('click','[name="lead_admin_name"]',function () { + $('.page-content').on('click','[name="lead_admin_name"]',function () { var ids=$('[name="lead_admin_id"]').val(),names=$('[name="lead_admin_name"]').val(); employeepicker.init({ ids:ids, names:names, - department_url: "/home/api/get_department_tree", - employee_url: "/home/api/get_employee", + department_url: "/api/index/get_department_tree", + employee_url: "/api/index/get_employee", type:0, callback:function(ids,names,dids,departments){ $('[name="lead_admin_id"]').val(ids); @@ -150,7 +150,7 @@ }); //监听交接成员 - $('.body-content').on('click','[name="connect_names"]',function () { + $('.page-content').on('click','[name="connect_names"]',function () { var ids=$('[name="connect_uids"]').val(),names=$('[name="connect_names"]').val(),idsArray=[],namesArray=[]; if(ids!=''){ idsArray=ids.split(','); @@ -159,8 +159,8 @@ employeepicker.init({ ids:idsArray, names:namesArray, - department_url: "/home/api/get_department_tree", - employee_url: "/home/api/get_employee", + department_url: "/api/index/get_department_tree", + employee_url: "/api/index/get_employee", callback:function(ids,names){ $('[name="connect_uids"]').val(ids.join(',')), $('[name="connect_names"]').val(names.join(',')); @@ -179,16 +179,16 @@ return false; } $.ajax({ - url: "/home/personal/leave_add", + url: "/user/personal/leave_add", type: 'post', data: data.field, success: function (e) { + layer.msg(e.msg); if(e.code==0){ - layer.confirm('保存成功,返回列表页吗?', {icon: 3, title:'提示'}, function(index){ - parent.location.reload(); - }) - }else{ - layer.msg(e.msg); + parent.tableIns.reload(); + setTimeout(function(){ + parent.layui.rightpage.close(); + },1000); } } }) @@ -197,6 +197,6 @@ } -{include file="common/layui" base='base' extend="['employeepicker']" callback="init" /} +{include file="../../base/view/common/layui" base='base' extend="['employeepicker']" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/position/add.html b/app/user/view/position/add.html similarity index 87% rename from app/home/view/position/add.html rename to app/user/view/position/add.html index 294f42a..2284912 100644 --- a/app/home/view/position/add.html +++ b/app/user/view/position/add.html @@ -1,7 +1,7 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"} - +

    岗位职称

    {if condition="$id eq 0"}
    @@ -14,15 +14,17 @@ + + - - - @@ -46,15 +48,17 @@ + + - - - @@ -87,16 +91,16 @@ //监听提交 form.on('submit(webform)', function (data) { $.ajax({ - url: "/home/position/add", + url: "/user/position/add", type: 'post', data: data.field, success: function (e) { + layer.msg(e.msg); if (e.code == 0) { - layer.confirm('保存成功,返回列表页吗?', { icon: 3, title: '提示' }, function (index) { - parent.location.reload(); - }); - } else { - layer.msg(e.msg); + parent.tableIns.reload(); + setTimeout(function(){ + parent.layui.rightpage.close(); + },1000); } } }) @@ -105,6 +109,6 @@ } -{include file="common/layui" base='base' extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base='base' extend="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/position/index.html b/app/user/view/position/index.html similarity index 83% rename from app/home/view/position/index.html rename to app/user/view/position/index.html index c3afddc..50961fa 100644 --- a/app/home/view/position/index.html +++ b/app/user/view/position/index.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"}
    @@ -23,16 +23,17 @@ {block name="script"} -{include file="common/layui" base='base' extend="['rightpage']" callback="init" /} +{include file="../../base/view/common/layui" base='base' extend="['rightpage']" callback="init" /} {/block} \ No newline at end of file diff --git a/app/user/view/position/view.html b/app/user/view/position/view.html new file mode 100644 index 0000000..71aade9 --- /dev/null +++ b/app/user/view/position/view.html @@ -0,0 +1,87 @@ +{extend name="../../base/view/common/base" /} +{block name="style"} + +{/block} + +{block name="body"} + +

    岗位信息

    +
    状态* +
    权限角色* + {volist name="$group" id="v"} {/volist} @@ -30,7 +32,7 @@
    岗位备注 +
    状态* +
    权限角色* + {volist name="$group" id="v"} {/volist} @@ -62,7 +66,7 @@
    岗位备注 +
    + + + + + + + + + + + + + + + + +
    岗位名称 + {$detail.title} + 岗位工时单价 + {$detail.work_price} + 状态 + {eq name="$detail.status" value="1" }正常{/eq} + {eq name="$detail.status" value="0" }禁止登录{/eq} +
    用户角色 + {volist name="$group" id="v"} + {eq name="$v.checked" value="1" }{$v.title},{/eq} + {/volist} +
    岗位备注 + {$detail.remark} +
    +

    岗位权限

    + + {volist name="role_rule" id="vo"} + + + {notempty name="vo.children"} + + {/notempty} + + {/volist} +
    + + +
    + {volist name="vo.children" key="k" id="voo"} +
    + +
    + {notempty name="voo.children"} +
    + {volist name="voo.children" id="vooo"} +
    + +
    + {/volist} +
    + {/notempty} + {/volist} +
    +
    + +{/block} + + + +{block name="script"} + +{include file="../../base/view/common/layui" base='base' extend="[]" callback="init" /} +{/block} + \ No newline at end of file diff --git a/app/home/view/admin/add.html b/app/user/view/user/add.html similarity index 95% rename from app/home/view/admin/add.html rename to app/user/view/user/add.html index adf71dd..9379c7e 100644 --- a/app/home/view/admin/add.html +++ b/app/user/view/user/add.html @@ -1,7 +1,7 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"} -
    + {if condition="$id eq 0"}

    添加员工信息

    @@ -204,7 +204,7 @@ //头像上传 var uploadInst = upload.render({ elem: "#test1", - url: "/home/api/upload", + url: "/api/index/upload", done: function (e) { //如果上传失败 if (e.code == 1) { @@ -219,16 +219,16 @@ //监听提交 form.on('submit(webform)', function (data) { $.ajax({ - url: "/home/admin/add", + url: "/user/user/add", type: 'post', data: data.field, success: function (e) { + layer.msg(e.msg); if (e.code == 0) { - layer.confirm('保存成功,返回列表页吗?', { icon: 3, title: '提示' }, function (index) { - parent.location.reload(); - }); - } else { - layer.msg(e.msg); + parent.tableIns.reload(); + setTimeout(function(){ + parent.layui.rightpage.close(); + },1000); } } }) @@ -237,6 +237,6 @@ } -{include file="common/layui" base='base' extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base='base' extend="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/admin/edit_password.html b/app/user/view/user/edit_password.html similarity index 92% rename from app/home/view/admin/edit_password.html rename to app/user/view/user/edit_password.html index 23c4808..82098e4 100644 --- a/app/home/view/admin/edit_password.html +++ b/app/user/view/user/edit_password.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"} @@ -44,7 +44,7 @@ //监听提交 form.on('submit(webform)', function (data) { $.ajax({ - url: "/home/api/edit_password", + url: "/api/index/edit_password", type: 'post', data: data.field, success: function (e) { @@ -71,6 +71,6 @@ } -{include file="common/layui" base='base' extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base='base' extend="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/admin/edit_personal.html b/app/user/view/user/edit_personal.html similarity index 93% rename from app/home/view/admin/edit_personal.html rename to app/user/view/user/edit_personal.html index 7f7c19a..f4be23a 100644 --- a/app/home/view/admin/edit_personal.html +++ b/app/user/view/user/edit_personal.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="body"} @@ -74,7 +74,7 @@ //头像上传 var uploadInst = upload.render({ elem: '#test1', - url: "/home/api/upload", + url: "/api/index/upload", done: function (e) { //如果上传失败 if (e.code == 1) { @@ -91,7 +91,7 @@ //监听提交 form.on('submit(webform)', function (data) { $.ajax({ - url: "/home/api/edit_personal", + url: "/api/index/edit_personal", type: 'post', data: data.field, success: function (e) { @@ -110,6 +110,6 @@ } -{include file="common/layui" base='base' extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base='base' extend="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/app/home/view/admin/index.html b/app/user/view/user/index.html similarity index 89% rename from app/home/view/admin/index.html rename to app/user/view/user/index.html index 2cd717d..a0d21e5 100644 --- a/app/home/view/admin/index.html +++ b/app/user/view/user/index.html @@ -1,4 +1,4 @@ -{extend name="common/base"/} +{extend name="../../base/view/common/base" /} {block name="style"} +{/block} {block name="body"} - + +

    员工信息

    @@ -87,74 +94,33 @@

    用户权限

    + {volist name="role_rule" id="vo"} - - - - - - + + + {/notempty} + {/volist}
    权限配置
    操作菜单可见
    - - {volist name="role_menu" id="vo"} - - - {notempty name="vo.children"} - - {/notempty} - - {/volist} -
    - - -
    - {volist name="vo.children" key="k" id="voo"} -
    - -
    - {notempty name="voo.children"} -
    - {volist name="voo.children" id="vooo"} -
    - -
    - {/volist} -
    - {/notempty} - {/volist} -
    -
    +
    +
    权限配置
    操作节点可用
    - - {volist name="role_rule" id="vo"} - - - {notempty name="vo.children"} - + {/volist} + {/notempty} - {/volist} -
    - - -
    - {volist name="vo.children" key="k" id="voo"} -
    - -
    - {notempty name="voo.children"} -
    - {volist name="voo.children" id="vooo"} -
    - -
    - {/volist} -
    - {/notempty} - {/volist} + {notempty name="vo.children"} +
    +
    + {volist name="vo.children" key="k" id="voo"} +
    + +
    + {notempty name="voo.children"} +
    + {volist name="voo.children" id="vooo"} +
    +
    -
    -
    {/block} @@ -182,7 +148,7 @@ title: '提示' }, function (index) { $.ajax({ - url: "/home/admin/reset_psw", + url: "/user/admin/reset_psw", data: { id: id }, @@ -202,21 +168,16 @@ //拷贝密码 function copyToClip(content) { if (navigator.clipboard) { - // clipboard api 澶嶅埗 navigator.clipboard.writeText(content); } else { var copy_textarea = document.createElement('textarea'); - // 闅愯棌姝よ緭鍏ユ copy_textarea.style.position = 'fixed'; copy_textarea.style.clip = 'rect(0 0 0 0)'; copy_textarea.style.top = '10px'; copy_textarea.value = content; document.body.appendChild(copy_textarea); - // 閫変腑 copy_textarea.select(); - // 澶嶅埗 document.execCommand('copy', true); - // 绉婚櫎杈撳叆妗� document.body.removeChild(copy_textarea); } if (content != '') { @@ -224,6 +185,6 @@ } } -{include file="common/layui" base='base' extend="[]" callback="init" /} +{include file="../../base/view/common/layui" base='base' extend="[]" callback="init" /} {/block} \ No newline at end of file diff --git a/config/log.php b/config/log.php index 9ac2b27..45435ee 100644 --- a/config/log.php +++ b/config/log.php @@ -58,6 +58,8 @@ return [ 'apply' => '申请', 'check' => '审核通过', 'refue' => '审核拒绝', + 'back' => '撤销', + 'topay' => '打款', 'open' => '开具', 'enter' => '到账', 'tovoid' => '作废', diff --git a/public/index.php b/public/index.php index 61df3e8..e1e926b 100644 --- a/public/index.php +++ b/public/index.php @@ -15,7 +15,7 @@ if (empty(file_exists(__DIR__ . '/../vendor/autoload.php'))) { require __DIR__ . '/../vendor/autoload.php'; // 定义当前版本号 -define('CMS_VERSION','1.0.1'); +define('CMS_VERSION','2.0.9'); // 定义ThinkPHP版本号 define('TP_VERSION','6.0.9'); diff --git a/public/static/home/css/common.css b/public/static/home/css/common.css index bcf30a1..e4de4cb 100644 --- a/public/static/home/css/common.css +++ b/public/static/home/css/common.css @@ -82,6 +82,7 @@ .span-color-6{color:#FF33CC;} .span-color-7{color:#6699FF;} .span-color-8{color:#CC9933;} +.layui-tab-title .layui-this:after {width:calc(100% - 35px );left:15px; min-width:65px;} @keyframes layui-rl{ from{transform:translateX(0px);}to{transform:translateX(-100%);} @@ -107,4 +108,917 @@ .layui-anim-rl.layui-layer-iframe{ overflow:inherit!important; } -.right-popup-close{position: absolute;width:50px;height:44px;line-height:44px;text-align:center; left: -52px;right:0; top: 50px;background-color:#FF5722;color:#fff;border-radius:6px 0 0 6px; cursor:pointer; border:2px solid #fff;} \ No newline at end of file +.right-popup-close{position: absolute;width:50px;height:44px;line-height:44px;text-align:center; left: -52px;right:0; top: 50px;background-color:#FF5722;color:#fff;border-radius:6px 0 0 6px; cursor:pointer; border:2px solid #fff;} +.page-content{background-color:#fff;} + + +@font-face { + font-family: "iconfont"; /* Project id 2936988 */ + src: url('/static/layui/font/extend/iconfont.woff2?t=1636884517050') format('woff2'), + url('/static/layui/font/extend/iconfont.woff?t=1636884517050') format('woff'), + url('/static/layui/font/extend/iconfont.ttf?t=1636884517050') format('truetype'); +} + +.iconfont { + font-family: "iconfont" !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-xueshengyidong:before { + content: "\e6e9"; +} + +.icon-baokao:before { + content: "\e6ea"; +} + +.icon-chengji:before { + content: "\e6eb"; +} + +.icon-yuejuan:before { + content: "\e6ec"; +} + +.icon-kaoheshezhi:before { + content: "\e6ed"; +} + +.icon-lunwenguanli:before { + content: "\e6ee"; +} + +.icon-shenbao:before { + content: "\e6ef"; +} + +.icon-kecheng:before { + content: "\e6f0"; +} + +.icon-tiku:before { + content: "\e6f1"; +} + +.icon-jiaowushezhi:before { + content: "\e6f2"; +} + +.icon-zidingyishezhi:before { + content: "\e6f3"; +} + +.icon-chaojitongji:before { + content: "\e6f4"; +} + +.icon-zhaoshengtongji:before { + content: "\e6f5"; +} + +.icon-tuiguangtongji:before { + content: "\e6f6"; +} + +.icon-xuexitongji:before { + content: "\e6f7"; +} + +.icon-diqushujutongji:before { + content: "\e6f8"; +} + +.icon-shujudaoru:before { + content: "\e6f9"; +} + +.icon-chengkaoguanli:before { + content: "\e6fb"; +} + +.icon-yuanchengguanli:before { + content: "\e6fe"; +} + +.icon-shujiguanli:before { + content: "\e6ff"; +} + +.icon-guochengxingkaohe:before { + content: "\e700"; +} + +.icon-xuefenrending:before { + content: "\e701"; +} + +.icon-kechengdingdan:before { + content: "\e702"; +} + +.icon-wentifankui:before { + content: "\e703"; +} + +.icon-zichan:before { + content: "\e704"; +} + +.icon-KPIguanli:before { + content: "\e705"; +} + +.icon-xiangmuguanli:before { + content: "\e706"; +} + +.icon-weixingongzhonghao:before { + content: "\e707"; +} + +.icon-anquanshezhi:before { + content: "\e708"; +} + +.icon-fuwuzhongxin:before { + content: "\e709"; +} + +.icon-qiyefuwu:before { + content: "\e70a"; +} + +.icon-wangkefuwu:before { + content: "\e70b"; +} + +.icon-shoufeiguanli:before { + content: "\e70c"; +} + +.icon-quanxianshezhi:before { + content: "\e70d"; +} + +.icon-jiaowutongji:before { + content: "\e70f"; +} + +.icon-jiaoxuetongji:before { + content: "\e710"; +} + +.icon-shoufeitongji:before { + content: "\e711"; +} + +.icon-fuwutongji:before { + content: "\e713"; +} + +.icon-tongzhitongji:before { + content: "\e714"; +} + +.icon-kaohetongji:before { + content: "\e715"; +} + +.icon-yonghuhuoyuedu:before { + content: "\e716"; +} + +.icon-xueshengbaoming:before { + content: "\e717"; +} + +.icon-xueshengluqu:before { + content: "\e718"; +} + +.icon-xueshengzhuce:before { + content: "\e719"; +} + +.icon-zaijixuesheng:before { + content: "\e71a"; +} + +.icon-huamingce:before { + content: "\e71b"; +} + +.icon-fenleiguanli:before { + content: "\e71c"; +} + +.icon-fuwuliebiao:before { + content: "\e71d"; +} + +.icon-fenleiliebiao:before { + content: "\e71e"; +} + +.icon-tongzhiliebiao:before { + content: "\e71f"; +} + +.icon-jiaoxuejihua:before { + content: "\e720"; +} + +.icon-jiaoxueanpai:before { + content: "\e721"; +} + +.icon-chengjiguanli:before { + content: "\e722"; +} + +.icon-tupianguanli:before { + content: "\e723"; +} + +.icon-kaoshijihua:before { + content: "\e724"; +} + +.icon-kaoshipeizhi:before { + content: "\e725"; +} + +.icon-xuexizhongxinguanli:before { + content: "\e726"; +} + +.icon-kaoheguanli:before { + content: "\e728"; +} + +.icon-jiaoshiguanli:before { + content: "\e729"; +} + +.icon-wangkeguanli:before { + content: "\e72a"; +} + +.icon-bulujiesuan:before { + content: "\e72b"; +} + +.icon-biyeguanli:before { + content: "\e72c"; +} + +.icon-kaohezhibiao:before { + content: "\e72d"; +} + +.icon-qiyeguanli:before { + content: "\e77e"; +} + +.icon-chubuguanli:before { + content: "\e77f"; +} + +.icon-hujiaobaobiao:before { + content: "\e780"; +} + +.icon-saomiaodianjing:before { + content: "\e781"; +} + +.icon-jiezhang:before { + content: "\e782"; +} + +.icon-xiaoshoubaobiao:before { + content: "\e783"; +} + +.icon-pingzheng:before { + content: "\e784"; +} + +.icon-hetongyidong:before { + content: "\e785"; +} + +.icon-xiaoshoupin:before { + content: "\e787"; +} + +.icon-xueshuguanli:before { + content: "\e788"; +} + +.icon-yihaopin:before { + content: "\e789"; +} + +.icon-renwuguanli:before { + content: "\e78a"; +} + +.icon-dianshang:before { + content: "\e78b"; +} + +.icon-mingpianbaobiao_1:before { + content: "\e78c"; +} + +.icon-gudingzichan:before { + content: "\e78d"; +} + +.icon-dongtaiguanli:before { + content: "\e78e"; +} + +.icon-jichupeizhi:before { + content: "\e78f"; +} + +.icon-hujiaotongji:before { + content: "\e790"; +} + +.icon-xiaoshoubaobiao_1:before { + content: "\e791"; +} + +.icon-dashuju:before { + content: "\e792"; +} + +.icon-huodongguanli:before { + content: "\e793"; +} + +.icon-hujiaoshezhi:before { + content: "\e794"; +} + +.icon-fenxiaoshichang:before { + content: "\e795"; +} + +.icon-chengjitongji:before { + content: "\e796"; +} + +.icon-tuiguangshezhi:before { + content: "\e797"; +} + +.icon-kechengzhongxin:before { + content: "\e798"; +} + +.icon-hetongshezhi:before { + content: "\e799"; +} + +.icon-kechengbaoguanli:before { + content: "\e79a"; +} + +.icon-yonghuguanli:before { + content: "\e79b"; +} + +.icon-yonghuhuaxiang:before { + content: "\e79c"; +} + +.icon-zhanghaoguanli:before { + content: "\e79d"; +} + +.icon-SEMguanli:before { + content: "\e79e"; +} + +.icon-yusuan:before { + content: "\e79f"; +} + +.icon-mingpianbaobiao:before { + content: "\e7a0"; +} + +.icon-dingdanguanli:before { + content: "\e7a1"; +} + +.icon-tuiguangguanli:before { + content: "\e7a2"; +} + +.icon-zhuantiguanli:before { + content: "\e7a3"; +} + +.icon-xinxiliu:before { + content: "\e7a4"; +} + +.icon-xiaoshoushezhi:before { + content: "\e7a5"; +} + +.icon-sucaiguanli:before { + content: "\e7a9"; +} + +.icon-xueshengdaoru:before { + content: "\e7aa"; +} + +.icon-shangpinguanli:before { + content: "\e7ab"; +} + +.icon-paikeguanli:before { + content: "\e7ac"; +} + +.icon-xinxidaoru:before { + content: "\e7ad"; +} + +.icon-shoufeipeizhi:before { + content: "\e7ae"; +} + +.icon-yonghuquanxian:before { + content: "\e7af"; +} + +.icon-zaijixueshengguanli:before { + content: "\e7b0"; +} + +.icon-xuehaoguanli:before { + content: "\e7b1"; +} + +.icon-kechengziyuanguanli:before { + content: "\e7b2"; +} + +.icon-mianshoujiaoxueanpai:before { + content: "\e7b3"; +} + +.icon-zhangfang:before { + content: "\e7b4"; +} + +.icon-kaikeguanli:before { + content: "\e7b5"; +} + +.icon-biyetongji:before { + content: "\e7b6"; +} + +.icon-zhaoshengzhunbei:before { + content: "\e7b8"; +} + +.icon-paikeshezhi:before { + content: "\e7b9"; +} + +.icon-banjiguanli:before { + content: "\e7ba"; +} + +.icon-jingpinketang:before { + content: "\e7bb"; +} + +.icon-yuangongtidian:before { + content: "\e7bc"; +} + +.icon-kaoshianpai:before { + content: "\e7bd"; +} + +.icon-wangluojiaoxueanpai:before { + content: "\e7bf"; +} + +.icon-ruxuechengji:before { + content: "\e7c3"; +} + +.icon-mianshoujiaoxue:before { + content: "\e7c6"; +} + +.icon-jiaoshijiaoshiguanli:before { + content: "\e7c7"; +} + +.icon-luquguanli:before { + content: "\e7c8"; +} + +.icon-luquchengji:before { + content: "\e7c9"; +} + +.icon-ziyuan:before { + content: "\e7ca"; +} + +.icon-kejian:before { + content: "\e7cc"; +} + +.icon-waibukejian:before { + content: "\e7cd"; +} + +.icon-rizhiguanli:before { + content: "\e7ce"; +} + +.icon-mobanguanli:before { + content: "\e7cf"; +} + +.icon-xuelirenzheng:before { + content: "\e7d1"; +} + +.icon-yiyichuli:before { + content: "\e7d2"; +} + +.icon-lunwenshenbao:before { + content: "\e7d3"; +} + +.icon-lunwenshezhi:before { + content: "\e7d4"; +} + +.icon-jiaoxuedianshezhi:before { + content: "\e7d5"; +} + +.icon-buluchenjiang:before { + content: "\e7d6"; +} + +.icon-mokuaishezhi:before { + content: "\e7d7"; +} + +.icon-ziliaoguanli:before { + content: "\e7d8"; +} + +.icon-jituanguanli:before { + content: "\e7d9"; +} + +.icon-yingyongguanli:before { + content: "\e7da"; +} + +.icon-guanwangshijuan:before { + content: "\e7db"; +} + +.icon-wodewangke:before { + content: "\e7dc"; +} + +.icon-jiaobenguanli:before { + content: "\e7dd"; +} + +.icon-zhuanyeguanliyuan:before { + content: "\e7de"; +} + +.icon-xueshengchengji:before { + content: "\e7df"; +} + +.icon-fuwuguanli:before { + content: "\e7e2"; +} + +.icon-daijinquan:before { + content: "\e7e3"; +} + +.icon-hujiaozhongxin:before { + content: "\e7e4"; +} + +.icon-yinjinshoufei:before { + content: "\e7e5"; +} + +.icon-yingjiaoqingdan:before { + content: "\e7e6"; +} + +.icon-duizhangdan:before { + content: "\e7e7"; +} + +.icon-shangjiguanli:before { + content: "\e7e8"; +} + +.icon-qiyehuihuacundang:before { + content: "\e7e9"; +} + +.icon-yonghushezhi:before { + content: "\e7ea"; +} + +.icon-xiaoxishezhi:before { + content: "\e7ec"; +} + +.icon-yingxiaoshezhi:before { + content: "\e7ed"; +} + +.icon-fuwushichang:before { + content: "\e7ee"; +} + +.icon-sucaiziyuan:before { + content: "\e7ef"; +} + +.icon-yingxiaowanfa:before { + content: "\e7f0"; +} + +.icon-tuiguang:before { + content: "\e7f1"; +} + +.icon-yonghuliebiao:before { + content: "\e7f2"; +} + +.icon-ziyuanguanli:before { + content: "\e692"; +} + +.icon-kechengguanli:before { + content: "\e693"; +} + +.icon-kechengbao:before { + content: "\e694"; +} + +.icon-tikuguanli:before { + content: "\e695"; +} + +.icon-wangkeshichang:before { + content: "\e696"; +} + +.icon-gongdan:before { + content: "\e697"; +} + +.icon-fangkeguanli:before { + content: "\e698"; +} + +.icon-xiansuoguanli:before { + content: "\e699"; +} + +.icon-kehuguanli:before { + content: "\e69a"; +} + +.icon-jituankehu:before { + content: "\e69b"; +} + +.icon-genjinjilu:before { + content: "\e69c"; +} + +.icon-hujiaoguanli:before { + content: "\e69d"; +} + +.icon-gongzuotai:before { + content: "\e69e"; +} + +.icon-shujubaobiao:before { + content: "\e69f"; +} + +.icon-fangkebaobiao:before { + content: "\e6a0"; +} + +.icon-zhangbuguanli:before { + content: "\e6a1"; +} + +.icon-zhangbuguanli_zi:before { + content: "\e6a2"; +} + +.icon-zhangbuguanli_zixitong_A:before { + content: "\e6a3"; +} + +.icon-hetongguanli:before { + content: "\e6a4"; +} + +.icon-yunyingzheguanli:before { + content: "\e6a5"; +} + +.icon-zhaopinguanli:before { + content: "\e6a6"; +} + +.icon-gongziguanli:before { + content: "\e6a7"; +} + +.icon-wodeshenpi:before { + content: "\e6a8"; +} + +.icon-biaozhunmobanshezhi:before { + content: "\e6a9"; +} + +.icon-jichushezhi:before { + content: "\e6aa"; +} + +.icon-caiwushezhi:before { + content: "\e6ab"; +} + +.icon-chanpinshezhi:before { + content: "\e6ac"; +} + +.icon-shenpishezhi:before { + content: "\e6ad"; +} + +.icon-mubiaoguanli:before { + content: "\e6ae"; +} + +.icon-zhandianshezhi:before { + content: "\e6af"; +} + +.icon-renshishezhi:before { + content: "\e6b0"; +} + +.icon-CRMshezhi:before { + content: "\e6b1"; +} + +.icon-mingpianshezhi:before { + content: "\e6b2"; +} + +.icon-wangxiaoshezhi:before { + content: "\e6b3"; +} + +.icon-wodedianping:before { + content: "\e6b4"; +} + +.icon-wodexuesheng:before { + content: "\e6b5"; +} + +.icon-lianxijilu:before { + content: "\e6b8"; +} + +.icon-tousutiwen:before { + content: "\e6b9"; +} + +.icon-peixunjihua:before { + content: "\e6ba"; +} + +.icon-feiyongchaxun:before { + content: "\e6bb"; +} + +.icon-xueshengjiaofei:before { + content: "\e6bc"; +} + +.icon-jizhang:before { + content: "\e6bd"; +} + +.icon-chaxun:before { + content: "\e6be"; +} + +.icon-chazhang:before { + content: "\e6bf"; +} + +.icon-baobiao:before { + content: "\e6c0"; +} + +.icon-shezhi:before { + content: "\e6c2"; +} + +.icon-daqiajilu:before { + content: "\e6ce"; +} + +.icon-wangluobanji:before { + content: "\e6d3"; +} + +.icon-wangxiaoshezhi1:before { + content: "\e6d6"; +} + +.icon-houtaishezhi:before { + content: "\e6d8"; +} + +.icon-zhaoshengshezhi:before { + content: "\e6db"; +} + +.icon-xiaoxizhongxin:before { + content: "\e6df"; +} + +.icon-zhaoshengbaobiao:before { + content: "\e6e1"; +} + +.icon-caidanguanli:before { + content: "\e6e2"; +} + +.icon-jituanshezhi:before { + content: "\e6e3"; +} + +.icon-shichangguanli:before { + content: "\e6e4"; +} + +.icon-chuangjianxitong:before { + content: "\e6e5"; +} + +.icon-gongdanguanli:before { + content: "\e6e6"; +} + +.icon-duanxin:before { + content: "\e6e7"; +} + +.icon-bangzhuzhongxin:before { + content: "\e6e8"; +} \ No newline at end of file diff --git a/public/static/home/css/gougucms.css b/public/static/home/css/gougucms.css index 131a9c6..ef46e31 100644 --- a/public/static/home/css/gougucms.css +++ b/public/static/home/css/gougucms.css @@ -4,50 +4,53 @@ -ms-user-select: none; /*IE10*/ -khtml-user-select: none; /*早期浏览器*/ user-select: none;} -.ittab-bg-gray {background-color:#001529;} .layui-layout-admin .layui-header {height:49px;background-color:#fff;box-shadow: 0 2px 6px 0 rgb(5 32 96 / 10%);} -.layui-layout-admin .layui-logo {line-height:49px;cursor:pointer;font-size:16px;color:#fff;background:#001529;width:180px;border-bottom: 1px solid #001529;} -.layui-layout-admin .layui-side {top:50px;width:180px;border-right:1px solid #ddd;} -.layui-nav .layui-nav-item {line-height:45px;} -.layui-nav.layui-layout-left {color:#333;margin-left:10px;} -.layui-nav.layui-layout-left input {border:0;} -.layui-layout-admin .layui-body {top:50px; z-index:1008; padding:0;padding-right:0;padding-bottom:0;bottom:0;left:180px;overflow:visible;right:0;background-color:#F5F8FA;} +.layui-layout-admin .layui-logo {line-height:49px;cursor:pointer;font-size:16px;color:#fff;background:#001529;width:200px;border-bottom: 1px solid #001529;} +.layui-layout-admin .layui-side {top:50px;width:200px;border-right:1px solid #ddd;} +.layui-header .layui-nav-item {line-height:49px; height:49px; border-left: 1px solid #eee;position: relative;display: inline-block; *display: inline; *zoom: 1; vertical-align: middle;} +.layui-header .layui-nav-item a{padding: 0 12px; text-align: center; min-width: 24px;} +.layui-header.layui-layout-left {color:#333;margin-left:10px;} +.layui-header.layui-layout-left input {border:0;} +.layui-header .layui-nav-bar {display:none;} +.layui-layout-right{padding: 0 3px; background-color:#fff;} +.layui-header .layui-nav-item #ittab-refresh {color:#000;} +.layui-header .layui-nav-item #ittab-refresh i {font-size:16px;} +.layui-header .layui-nav-item #ittab-del-cache{color:#000} +.layui-header .layui-nav-item #ittab-del-cache i{font-size:16px} +.layui-header.layui-layout-right .layui-nav-bar {background-color: #fff;} +.layui-tab-brief>.layui-tab-more li.layui-this:after {border-bottom: 0;} +.layui-nav-img {width:25px;height:25px;margin-right:0;} +.layui-header .msg-num { min-width: 18px;height: 18px;position: absolute;top: -10px;right: 5px;display: none;} +.layui-header .msg-num a {min-width: 18px; height: 18px; margin: 0; padding: 0; display: inline-block; font-size: 11px;line-height: 18px;text-align: center; background-color: #FF5722; color: #fff;border-radius: 12px; cursor: pointer;} -.ittab-menulist {width:100%;height:100%; border-right:1px solid #ccc; font-size:14px; color:#aaaaaa;} -.ittab-menulist-top {padding: 10px 12px; font-size:0; border-bottom: 1px solid #17232c; text-align:center;} -.ittab-menulist-top a {background-color:#34a853; opacity:1; width: 33.3%; margin:0; padding: 5px 0; display:inline-block;} -.ittab-menulist-top .layui-icon {color:#fff;font-size:16px;} -.ittab-menulist-top a:first-child {border-radius: 3px 0 0 3px;} -.ittab-menulist-top a:last-child {border-radius: 0 3px 3px 0;} -.ittab-menulist-top a:hover{opacity: .9;} +.layui-layout-admin .layui-body {top:50px; z-index:1008; padding:0;padding-right:0;padding-bottom:0;bottom:0;left:200px;overflow:visible;right:0;background-color:#F5F8FA;} -.ittab-menulist-1 li{height:44px; line-height:44px; cursor:pointer; list-style:none;} -.ittab-menulist-2 {height:48px;line-height:48px;position:relative;padding-left:12px; cursor: pointer;} -.ittab-menulist-3 .ittab-menulist-2 {padding-left:38px;} -.ittab-menulist-1 li:hover,.ittab-menulist-2:hover {background-color: rgba(255,255,255,.1)} -.ittab-menulist-1 .iconfont{font-size: 18px; font-weight:800; padding-right:5px;} -.ittab-menulist-1 .site-menu-active span{padding-left:35px; border-left: 3px solid#131E25; width: 168px; display: inline-block;} -.ittab-menulist-4 .site-menu-active span{padding-left:52px;} -.ittab-menulist-5 .site-menu-active span{padding-left:75px;} -.ittab-menulist-1 li:hover span{border-color: rgba(255,255,255,.1)} -.ittab-menulist-1 li.layui-this span{border-color:#E94335 !important; color:#fff !important; background-color: rgba(255,255,255,.1);} -.ittab-menulist-1 li .layui-icon-triangle-r{float:right; margin-right:16px;} -.ittab-menulist-1 li .layui-icon-triangle-d{float:right; margin-right:16px;} +.menulist-bg-gray{background-color:#001529;} +.menulist {width:100%;height:100%; border-right:1px solid #ccc; font-size:14px; color:#aaaaaa;} -.ittab-menulist-3 {display:none;cursor:pointer;font-size:13px;} -.ittab-menulist-3 li {background-color: #131E25;} -.ittab-menulist-4 li {background-color: #131E25;} -.ittab-menulist-5 li {background-color: #131E25;} +.menulist-top {padding: 10px 12px; font-size:0; border-bottom: 1px solid #17232c; text-align:center;} +.menulist-top a {background-color:#34a853; opacity:1; width: 25%; margin:0; padding: 5px 0; display:inline-block;} +.menulist-top .layui-icon {color:#fff;font-size:16px;} +.menulist-top a:first-child {border-radius: 3px 0 0 3px;} +.menulist-top a:last-child {border-radius: 0 3px 3px 0;} +.menulist-top a:hover{opacity: .9;} +.menulist .layui-nav{background-color:#001529;} +.menulist .layui-nav-tree .layui-nav-bar{width:4px;background-color:#E94335} +.layui-nav-tree .layui-nav-child{padding:0;} +.layui-nav-tree .layui-nav-child dd.layui-this, .layui-nav-tree .layui-nav-child dd.layui-this a, .layui-nav-tree .layui-this, .layui-nav-tree .layui-this>a, .layui-nav-tree .layui-this>a:hover{background-color:#131E25} +.layui-nav .layui-nav-item a{padding-left:12px;} +.layui-nav .layui-nav-item a.menu-b{padding-left:32px;} +.layui-nav .layui-nav-item a.menu-c{padding-left:45px;} +.layui-nav .layui-nav-item a.menu-d{padding-left:58px;} .gougu-admin-tab {margin:0;} .gougu-admin-tab .layui-icon-prev,.gougu-admin-tab .layui-icon-next {position:absolute;top:-50px; width:39px; height:49px; line-height:49px; color: #999; text-align:center; cursor:pointer; background-color:#fff;} -.gougu-admin-tab .layui-icon-prev{left:0; border-right: 1px solid #F5F8FA;} -.gougu-admin-tab .layui-icon-next {right:152px; border-left: 1px solid #F5F8FA;} +.gougu-admin-tab .layui-icon-prev{left:0; border-right: 1px solid #eee;} +.gougu-admin-tab .layui-icon-next {right:152px; border-left: 1px solid #eee;} .gougu-admin-tab .layui-icon-prev:hover,.gougu-admin-tab .layui-icon-next:hover{color: #333;} - -.gougu-admin-tab .layui-tab-title {position:absolute;top:-50px; z-index:58; height:49px;left:36px; border:0;max-width:calc(100% - 226px); overflow:hidden;} +.gougu-admin-tab .layui-tab-title {position:absolute;top:-50px; z-index:58; height:49px;left:40px; border:0;max-width:calc(100% - 226px); overflow:hidden;} .gougu-admin-tab .layui-tab-title li {min-width:36px; padding:0 24px 0 12px; color:#666;font-size:12px;line-height:48px;border-top:3px solid #fff; border-right: 1px solid #F5F8FA; background-color:#fff;} .gougu-admin-tab .layui-tab-title li .gougu-tab-active {display: inline-block; background-color: #999; width: 8px; height: 8px; border-radius: 20px; margin-right: 6px;} .gougu-admin-tab .layui-tab-title li .layui-tab-close {position:absolute;width:15px;height:15px;line-height:16px;top:16px;right:5px;font-size:10px;display:none;border-radius:50%;} @@ -70,17 +73,5 @@ user-select: none;} .gougu-admin-tab .layui-tab-item {height:100%;} .gougu-admin-tab .layui-tab-bar {height: 50px;border-width: 0;line-height: 50px;} -.layui-layout-right{padding: 0 3px; background-color:#fff;} -.layui-nav .layui-nav-item a{padding: 0 12px; text-align: center; min-width: 24px; border-left: 1px solid #eee;} -.layui-nav .layui-nav-item #ittab-refresh {color:#000;} -.layui-nav .layui-nav-item #ittab-refresh i {font-size:16px;} -.layui-nav .layui-nav-item #ittab-del-cache{color:#000} -.layui-nav .layui-nav-item #ittab-del-cache i{font-size:16px} -.layui-nav.layui-layout-right .layui-nav-bar {background-color: #fff;} -.layui-tab-brief>.layui-tab-more li.layui-this:after {border-bottom: 0;} -.layui-nav-img {width:25px;height:25px;margin-right:0;} -.layui-nav .msg-num { min-width: 18px;height: 18px;position: absolute;top: -10px;right: 5px;display: none;} -.layui-nav .msg-num a {min-width: 18px; height: 18px; margin: 0; padding: 0; display: inline-block; font-size: 11px;line-height: 18px;text-align: center; background-color: #FF5722; color: #fff;border-radius: 12px; cursor: pointer;} - .layui-layout-admin .layui-footer {left:200px;height:30px;line-height:30px;background-color:#f0f0f0;font-size:12px;} .layui-tab-content {padding:0px;} \ No newline at end of file diff --git a/public/static/home/js/module/rightpage.js b/public/static/home/js/module/rightpage.js deleted file mode 100644 index 1304d25..0000000 --- a/public/static/home/js/module/rightpage.js +++ /dev/null @@ -1,47 +0,0 @@ -layui.define(['layer'], function(exports){ - var layer = layui.layer; - var obj = { - open: function (content='',width='88%',callback) { - layer.open({ - type: 2, - title: '', - offset: ['0', '100%'], - skin: 'layui-anim layui-anim-rl layui-layer-admin-right', - closeBtn: 0, - content: content, - area: [width, '100%'], - success:function(obj,index){ - if($('#rightPopup'+index).length<1){ - var btn='
    关闭
    '; - obj.append(btn); - $('#rightPopup'+index).click(function(){ - let op_width = $('.layui-anim-rl').outerWidth(); - $('.layui-anim-rl').animate({left:'+='+op_width+'px'}, 200, 'linear', function () { - $('.layui-anim-rl').remove() - $('.layui-layer-shade').remove() - }) - /* - //callback - if(callback && typeof callback === 'function'){ - callback(obj); - } - */ - }) - } - } - }) - /* - //点击背景关闭 - let op_width = $('.layui-anim-rl').outerWidth(); - $('.layui-layer-shade').off('click').on('click', function () { - $('.layui-anim-rl').animate({left:'+='+op_width+'px'}, 300, 'linear', function () { - $('.layui-anim-rl').remove() - $('.layui-layer-shade').remove() - }) - - }) - */ - } - }; - exports('rightpage', obj); -}); diff --git a/public/static/layui/font/extend/demo_index.html b/public/static/layui/font/extend/demo_index.html index 2ff9e85..14be481 100644 --- a/public/static/layui/font/extend/demo_index.html +++ b/public/static/layui/font/extend/demo_index.html @@ -258,12 +258,6 @@
    &#xe70d;
    -
  • - -
    招生统计
    -
    &#xe70e;
    -
  • -
  • 教务统计
    @@ -282,12 +276,6 @@
    &#xe711;
  • -
  • - -
    学生统计
    -
    &#xe712;
    -
  • -
  • 服务统计
    @@ -1428,9 +1416,9 @@
    @font-face {
       font-family: 'iconfont';
    -  src: url('iconfont.woff2?t=1636884517050') format('woff2'),
    -       url('iconfont.woff?t=1636884517050') format('woff'),
    -       url('iconfont.ttf?t=1636884517050') format('truetype');
    +  src: url('iconfont.woff2?t=1640935732189') format('woff2'),
    +       url('iconfont.woff?t=1640935732189') format('woff'),
    +       url('iconfont.ttf?t=1640935732189') format('truetype');
     }
     

    第二步:定义使用 iconfont 的样式

    @@ -1762,15 +1750,6 @@
  • -
  • - -
    - 招生统计 -
    -
    .icon-zhaoshengtongji1 -
    -
  • -
  • @@ -1798,15 +1777,6 @@
  • -
  • - -
    - 学生统计 -
    -
    .icon-xueshengtongji -
    -
  • -
  • @@ -3789,14 +3759,6 @@
    #icon-quanxianshezhi
  • -
  • - -
    招生统计
    -
    #icon-zhaoshengtongji1
    -
  • -
  • #icon-shoufeitongji
  • -
  • - -
    学生统计
    -
    #icon-xueshengtongji
    -
  • -
  • \n\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t"+f.join("")+'\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    '+d+"
    \n\t\t\t\t
    ");var p=Q('
    ');p.append(u);n.after(p);n.attr("lay-ignore","");n.removeAttr("name")&&n.attr("_name",s.config.formname);n.removeAttr("lay-verify")&&n.attr("_lay-verify",s.config.layverify);if(s.config.isSearch){Y[i]=Q.extend({},X,{searchUrl:s.config.searchUrl},Y[i]);Q(document).on("input","div."+m+'[FS_ID="'+i+'"] .'+y,function(e){h.search(i,e,s.config.searchUrl)});if(s.config.searchUrl){h.triggerSearch(u,true)}}else{u.find("dl dd."+W).css("display","none")}})};o.prototype.search=function(a,e,t,n){var r=this;var i=void 0;if(n){i=n}else{i=e.target;var l=e.keyCode;if(l===9||l===13||l===37||l===38||l===39||l===40){return false}}var o=Q.trim(i.value);this.changePlaceHolder(Q(i));var s=Y[a]?Y[a]:X;t=s.searchUrl||t;var d=q[a],c=d.config.isCreate,f=Q('dl[xid="'+a+'"]').parents("."+P);if(t){if(s.searchVal){o=s.searchVal;s.searchVal=""}if(!s.beforeSearch||s.beforeSearch&&s.beforeSearch instanceof Function&&s.beforeSearch(a,t,o)){var u=s.delay;if(s.first){s.first=false;u=10}clearTimeout(d.clearid);d.clearid=setTimeout(function(){f.find("dl > *:not(."+J+")").remove();f.find("dd."+V).addClass(U).text("请求中");r.ajax(a,t,o,false,null,true)},u)}}else{f.find("dl ."+h).removeClass(h);f.find("dl dd:not(."+J+")").each(function(e,t){var n=Q(t);var i=z.filter[a]||q[a].config.filter;if(i&&i(a,o,r.getItem(a,n),n.hasClass(E))==true){n.addClass(h)}});f.find("dl dt").each(function(e,t){if(!Q(t).nextUntil("dt",":not(."+h+")").length){Q(t).addClass(h)}});this.create(a,c,o);var p=f.find("dl dd:not(."+J+"):not(."+h+")");if(!p.length){f.find("dd."+V).addClass(U).text("无匹配项")}else{f.find("dd."+V).removeClass(U)}}};o.prototype.isArray=function(e){return Object.prototype.toString.call(e)=="[object Array]"};o.prototype.triggerSearch=function(e,i){var a=this;(e?[e]:Q("."+P).toArray()).forEach(function(e,t){e=Q(e);var n=e.find("dl").attr("xid");if(n&&q[n]&&q[n].config.isEmpty||i){a.search(n,null,null,q[n].config.searchType==0?e.find("."+x+" ."+y):e.find("dl ."+W+" ."+y))}})};o.prototype.clearInput=function(e){var t=Q("."+m+'[fs_id="'+e+'"]');var n=q[e].config.searchType==0?t.find("."+x+" ."+y):t.find("dl ."+W+" ."+y);n.val("")};o.prototype.ajax=function(i,a,r,l,o,s,d,c){var f=this;var u=Q("."+m+' dl[xid="'+i+'"]').parents("."+P);if(!u[0]||!a){return}var p=Y[i]?Y[i]:X;var e=Q.extend(true,{},p.data);e[p.searchName]=r;Q.ajax({type:p.type,headers:p.header,url:a,data:p.dataType=="json"?JSON.stringify(e):e,success:function e(t){if(typeof t=="string"){t=JSON.parse(t)}p.beforeSuccess&&p.beforeSuccess instanceof Function&&(t=p.beforeSuccess(i,a,r,t));if(f.isArray(t)){var n={};n[p.response.statusName]=p.response.statusCode;n[p.response.msgName]="";n[p.response.dataName]=t;t=n}if(t[p.response.statusName]!=p.response.statusCode){u.find("dd."+V).addClass(U).text(t[p.response.msgName])}else{u.find("dd."+V).removeClass(U);f.renderData(i,t[p.response.dataName],l,o,s,c);q[i].config.isEmpty=t[p.response.dataName].length==0}d&&d(i);p.success&&p.success instanceof Function&&p.success(i,a,r,t)},error:function e(t){u.find("dd[lay-value]:not(."+J+")").remove();u.find("dd."+V).addClass(U).text("服务异常");p.error&&p.error instanceof Function&&p.error(i,a,r,t)}})};o.prototype.renderData=function(n,e,t,i,a,r){var l=this;if(t){this.renderLinkage(n,e,i);return}if(r){this.renderReplace(n,e);return}var o=Q("."+m+' dl[xid="'+n+'"]').parents("."+P);var s=Y[n]?Y[n]:X;var d=o.find("."+g+" input");e=this.exchangeData(n,e);var c=[];o.find("dl").html(this.renderSelect(n,d.attr("placeholder")||d.attr("back"),e.map(function(e){var t=Q.extend({},e,{innerHTML:e[s.keyName],value:e[s.keyVal],sel:e[s.keySel],disabled:e[s.keyDis],type:e.type,name:e[s.keyName]});if(t.sel){c.push(t)}return t})));var f=o.find("."+x);var u=o.find("dl[xid]");if(a){var p=q[n].values;p.forEach(function(e,t){u.find('dd[lay-value="'+e.value+'"]').addClass(w)});c.forEach(function(e,t){if(l.indexOf(p,e)==-1){l.addLabel(n,f,e);u.find('dd[lay-value="'+e.value+'"]').addClass(w);p.push(e)}})}else{c.forEach(function(e,t){l.addLabel(n,f,e);u.find('dd[lay-value="'+e.value+'"]').addClass(w)});q[n].values=c}this.commonHandler(n,f)};o.prototype.renderLinkage=function(l,e,n){var i=[],a=0,o={0:e},s=Y[l]?Y[l]:X;G[l]={};var t=function e(){var r=i[a++]=[],t=o;o={};Q.each(t,function(a,e){Q.each(e,function(e,t){var n={pid:a,name:t[s.keyName],value:t[s.keyVal]};G[l][n.value]=Q.extend(t,n);r.push(n);var i=t[s.keyChildren];if(i&&i.length){o[n.value]=i}})})};do{t()}while(Object.getOwnPropertyNames(o).length);var r=Q("."+m+' dl[xid="'+l+'"]').parents("."+P);var d=['
    '];Q.each(i,function(e,t){var i=['
    '];Q.each(t,function(e,t){var n='
  • '+t.name+"
  • ";i.push(n)});i.push("");d=d.concat(i)});d.push('
    ');d.push("");r.find("dl").html(d.join(""));r.find("."+y).css("display","none")};o.prototype.renderReplace=function(n,e){var i=this;var t=Q("."+m+' dl[xid="'+n+'"]');var a=Y[n]?Y[n]:X;e=this.exchangeData(n,e);G[n]=e;var r=e.map(function(e){var t=Q.extend({},e,{innerHTML:e[a.keyName],value:e[a.keyVal],sel:e[a.keySel],disabled:e[a.keyDis],type:e.type,name:e[a.keyName]});return i.createDD(n,t)}).join("");t.find("dd:not(."+J+"),dt:not([style])").remove();t.find("dt[style]").after(Q(r))};o.prototype.exchangeData=function(e,t){var n=Y[e]?Y[e]:X;var i=n["keyChildren"];var a=n["keyDis"];G[e]={};var r=this.getChildrenList(t,i,a,[],false);return r};o.prototype.getChildrenList=function(e,t,n,i,a){var r=[],l=0;for(var o=0;o\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t'+r+"\n\t\t\t\t\t
    \n\t\t\t\t"};o.prototype.createQuickBtn=function(e,t){return'
    '+e.name+"
    "};o.prototype.renderBtns=function(e,t,n){var i=this;var a=[];var r=Q('dl[xid="'+e+'"]');a.push('
    ');Q.each(q[e].config.btns,function(e,t){a.push(i.createQuickBtn(t,n))});a.push("
    ");a.push(this.createQuickBtn({icon:"xm-iconfont icon-caidan",name:""}));return a.join("")};o.prototype.renderSelect=function(n,e,t){var i=this;G[n]={};var a=[];if(q[n].config.btns.length){setTimeout(function(){var e=Q('dl[xid="'+n+'"]');e.parents("."+P).attr(b,q[n].config.searchType);e.find("."+l).css("max-width",e.prev().width()-54+"px")},10);a.push(['
    ',this.renderBtns(n,null,"30px"),"
    ",'
    ','','',"
    "].join(""))}else{a.push('
    '+e+"
    ")}if(this.isArray(t)){Q(t).each(function(e,t){if(t){if(t.type&&t.type==="optgroup"){a.push("
    "+t.name+"
    ")}else{a.push(i.createDD(n,t))}}})}else{Q(t).find("*").each(function(e,t){if(t.tagName.toLowerCase()=="option"&&e==0&&!t.value){return}if(t.tagName.toLowerCase()==="optgroup"){a.push("
    "+t.label+"
    ")}else{a.push(i.createDD(n,t))}})}a.push('
    ');a.push('
    没有选项
    ');return a.join("")};o.prototype.on=function(){var n=this;this.one();Q(document).on("click",function(e){if(!Q(e.target).parents("."+I)[0]){Q("."+m+" dl ."+h).removeClass(h);Q("."+m+" dl dd."+U).removeClass(U);Q("."+m+" dl dd."+p).remove();Q.each(q,function(e,t){n.clearInput(e);if(!t.values.length){n.changePlaceHolder(Q('div[FS_ID="'+e+'"] .'+x))}})}Q("."+m+" ."+f).each(function(e,t){n.changeShow(Q(t).find("."+I),false)})})};o.prototype.calcLabelLeft=function(e,t,n){var i=this.getPosition(e[0]);i.y=i.x+e[0].clientWidth;var a=e[0].offsetLeft;if(!e.find("span").length){a=0}else if(n){var r=e.find("span:last");r.css("display")=="none"?r=r.prev()[0]:r=r[0];var l=this.getPosition(r);l.y=l.x+r.clientWidth;if(l.y>i.y){a=a-(l.y-i.y)-5}else{a=0}}else{if(t<0){var o=e.find(":last");o.css("display")=="none"?o=o.prev()[0]:o=o[0];var s=this.getPosition(o);s.y=s.x+o.clientWidth;if(s.y>i.y){a-=10}}else{if(a<0){a+=10}if(a>0){a=0}}}e.css("left",a+"px")};o.prototype.one=function(e){var C=this;Q(e?e:document).off("click","."+I).on("click","."+I,function(e){var t=Q(e.target),n=t.is(I)?t:t.parents("."+I),i=n.next(),a=i.attr("xid");Q("dl[xid]").not(i).each(function(e,t){C.clearInput(Q(t).attr("xid"))});Q("dl[xid]").not(i).find("dd."+h).removeClass(h);if(n.hasClass(N)){return false}if(t.is("."+O)||t.is("."+y+"[readonly]")){C.changeShow(n,!n.parents("."+P).hasClass(f));return false}if(n.find("."+y+":not(readonly)")[0]){var r=n.find("."+y),l={x:e.pageX,y:e.pageY},o=C.getPosition(n[0]),s=n.width();while(l.x>o.x){if(Q(document.elementFromPoint(l.x,l.y)).is(r)){r.focus();C.changeShow(n,true);return false}l.x-=50}}if(t.is("."+y)){C.changeShow(n,true);return false}if(t.is('i[fsw="'+v+'"]')){var d=C.getItem(a,t),c=i.find("dd[lay-value='"+d.value+"']");if(c.hasClass(E)){return false}C.handlerLabel(a,c,false,d);return false}C.changeShow(n,!n.parents("."+P).hasClass(f));return false});Q(e?e:document).off("click","dl."+F).on("click","dl."+F,function(e){var t=Q(e.target);if(t.is("."+H)||t.parents("."+H)[0]){t=t.is("li")?t:t.parents("li[xm-value]");var n=t.parents(".xm-select-linkage-group"),i=t.parents("dl").attr("xid");if(!i){return false}n.find(".xm-select-active").removeClass("xm-select-active");t.addClass("xm-select-active");n.nextAll(".xm-select-linkage-group").addClass("xm-select-linkage-hide");var a=n.next(".xm-select-linkage-group");a.find("li").addClass("xm-select-linkage-hide");a.find('li[pid="'+t.attr("xm-value")+'"]').removeClass("xm-select-linkage-hide");if(!a[0]||a.find("li:not(.xm-select-linkage-hide)").length==0){var r=[],l=0,o=!t.hasClass("xm-select-this");if(q[i].config.radio){t.parents(".xm-select-linkage").find(".xm-select-this").removeClass("xm-select-this")}do{r[l++]={name:t.find("span").text(),value:t.attr("xm-value")};t=t.parents(".xm-select-linkage-group").prev().find('li[xm-value="'+t.attr("pid")+'"]')}while(t.length);r.reverse();var s={name:r.map(function(e){return e.name}).join("/"),value:r.map(function(e){return e.value}).join("/")};C.handlerLabel(i,null,o,s)}else{a.removeClass("xm-select-linkage-hide")}return false}if(t.is("dl")){return false}if(t.is("dt")){t.nextUntil("dt").each(function(e,t){t=Q(t);if(t.hasClass(E)||t.hasClass(w)){}else{t.find("i:not(.icon-expand)").click()}});return false}var d=t.is("dd")?t:t.parents("dd");var c=d.parent("dl").attr("xid");if(d.hasClass(E)){return false}if(t.is("i.icon-caidan")){var f=[],u=[];t.parents("dl").find('dd[tree-folder="true"]').each(function(e,t){Q(t).attr("xm-tree-hidn")==undefined?f.push(t):u.push(t)});var p=u.length?u:f;p.forEach(function(e){return e.click()});return false}var h=d.attr("tree-id");if(h){if(t.is("i:not(.icon-expand)")){C.handlerLabel(c,d,!d.hasClass(w));return false}var v=Y[c]||X;var m=v.tree;var y=d.nextAll('dd[tree-id^="'+h+'"]');if(y&&y.length){var g=y[0].clientHeight;g?(C.addTreeHeight(d,g),g=0):(g=d.attr("xm-tree-hidn")||36,d.removeAttr("xm-tree-hidn"),d.find(">i").remove(),y=y.filter(function(e,t){return Q(t).attr("tree-id").split("-").length-1==h.split("-").length}));y.animate({height:g},150);return false}else{if(m.nextClick&&m.nextClick instanceof Function){m.nextClick(c,C.getItem(c,d),function(e){if(!e||!e.length){C.handlerLabel(c,d,!d.hasClass(w))}else{d.attr("tree-folder","true");var n=[];e.forEach(function(e,t){e.innerHTML=e[v.keyName];e[B]=JSON.stringify(h.split("-").concat([t]));n.push(C.createDD(c,e));G[c][e[v.keyVal]]=e});d.after(n.join(""))}});return false}}}if(d.hasClass(J)){var x=t.is("."+R)?t:t.parents("."+R);if(!x[0]){return false}var k=x.attr("method");var b=q[c].config.btns.filter(function(e){return e.name==k})[0];b&&b.click&&b.click instanceof Function&&b.click(c,C);return false}C.handlerLabel(c,d,!d.hasClass(w));return false})};o.prototype.addTreeHeight=function(e,i){var a=this;var t=e.attr("tree-id");var n=e.nextAll('dd[tree-id^="'+t+'"]');if(n.length){e.append('');e.attr("xm-tree-hidn",i);n.each(function(e,t){var n=Q(t);a.addTreeHeight(n,i)})}};var G={};o.prototype.getItem=function(e,t){if(t instanceof Q){if(t.is('i[fsw="'+v+'"]')){var n=t.parent();return G[e][t]||{name:n.find("font").text(),value:n.attr("value")}}var i=t.attr("lay-value");return!G[e][i]?G[e][i]={name:t.find("span[name]").attr("name"),value:i}:G[e][i]}else if(typeof t=="string"&&t.indexOf("/")!=-1){return G[e][t]||{name:this.valToName(e,t),value:t}}return G[e][t]};o.prototype.linkageAdd=function(e,t){var n=Q('dl[xid="'+e+'"]');n.find(".xm-select-active").removeClass("xm-select-active");var i=t.value.split("/");var a=void 0,r=void 0,l=0;var o=[];do{a=i[l];r=n.find(".xm-select-linkage-group"+(l+1)+' li[xm-value="'+a+'"]');r[0]&&o.push(r);l++}while(r.length&&a!=undefined);if(o.length==i.length){Q.each(o,function(e,t){t.addClass("xm-select-this")})}};o.prototype.linkageDel=function(e,t){var n=Q('dl[xid="'+e+'"]');var i=t.value.split("/");var a=void 0,r=void 0,l=i.length-1;do{a=i[l];r=n.find(".xm-select-linkage-group"+(l+1)+' li[xm-value="'+a+'"]');if(!r.parent().next().find("li[pid="+a+"].xm-select-this").length){r.removeClass("xm-select-this")}l--}while(r.length&&a!=undefined)};o.prototype.valToName=function(e,t){var i=Q('dl[xid="'+e+'"]');var n=(t+"").split("/");if(!n.length){return null}var a=[];Q.each(n,function(e,t){var n=i.find(".xm-select-linkage-group"+(e+1)+' li[xm-value="'+t+'"] span').text();a.push(n)});return a.length==n.length?a.join("/"):null};o.prototype.commonHandler=function(e,t){if(!t||!t[0]){return}this.checkHideSpan(e,t);this.changePlaceHolder(t);this.retop(t.parents("."+P));this.calcLabelLeft(t,0,true);this.setHidnVal(e,t);t.parents("."+I+" ."+v).attr("title",q[e].values.map(function(e){return e.name}).join(","))};o.prototype.initVal=function(e){var o=this;var t={};if(e){t[e]=q[e]}else{t=q}Q.each(t,function(n,e){var t=e.values,i=Q('dl[xid="'+n+'"]').parent(),a=i.find("."+x),r=i.find("dl");r.find("dd."+w).removeClass(w);var l=t.concat([]);l.concat([]).forEach(function(e,t){o.addLabel(n,a,e);r.find('dd[lay-value="'+e.value+'"]').addClass(w)});if(e.config.radio){l.length&&t.push(l[l.length-1])}o.commonHandler(n,a)})};o.prototype.setHidnVal=function(e,t){if(!t||!t[0]){return}t.parents("."+m).find("."+_).val(q[e].values.map(function(e){return e.value}).join(","))};o.prototype.handlerLabel=function(e,t,n,i,a){var r=Q('[xid="'+e+'"]').prev().find("."+x),l=t&&this.getItem(e,t),o=q[e].values,s=q[e].config.on||z.on[e],d=q[e].config.endOn||z.endOn[e];if(i){l=i}var c=q[e];if(n&&c.config.max&&c.values.length>=c.config.max){var f=z.maxTips[e]||q[e].config.maxTips;f&&f(e,o.concat([]),l,c.config.max);return}if(!a){if(s&&s instanceof Function&&s(e,o.concat([]),l,n,t&&t.hasClass(E))==false){return}}var u=Q('dl[xid="'+e+'"]');n?(t&&t[0]?(t.addClass(w),t.removeClass(p)):u.find(".xm-select-linkage")[0]&&this.linkageAdd(e,l),this.addLabel(e,r,l),o.push(l)):(t&&t[0]?t.removeClass(w):u.find(".xm-select-linkage")[0]&&this.linkageDel(e,l),this.delLabel(e,r,l),this.remove(o,l));if(!r[0])return;if(c.config.radio){this.changeShow(r,false)}r.parents("."+I).prev().removeClass("layui-form-danger");c.config.clearInput&&this.clearInput(e);this.commonHandler(e,r);!a&&d&&d instanceof Function&&d(e,o.concat([]),l,n,t&&t.hasClass(E))};o.prototype.addLabel=function(e,t,n){if(!n)return;var i='fsw="'+v+'"';var a=[Q(""+n.name+""),Q("')],r=a[0],l=a[1];r.append(l);var o=q[e];if(o.config.radio){o.values.length=0;Q('dl[xid="'+e+'"]').find("dd."+w+':not([lay-value="'+n.value+'"])').removeClass(w);t.find("span").remove()}t.find("input").css("width","50px");t.find("input").before(r)};o.prototype.delLabel=function(e,t,n){if(!n)return;t.find('span[value="'+n.value+'"]:first').remove()};o.prototype.checkHideSpan=function(e,t){var n=t.parents("."+v)[0].offsetHeight+5;t.find("span.xm-span-hide").removeClass("xm-span-hide");t.find("span[style]").remove();var i=q[e].config.showCount;t.find("span").each(function(e,t){if(e>=i){Q(t).addClass("xm-span-hide")}});var a=t.find("span:eq("+i+")");a[0]&&a.before(Q(' + '+(t.find("span").length-i)+""))};o.prototype.retop=function(e){var t=e.find("dl"),n=e.offset().top+e.outerHeight()+5-c.scrollTop(),i=t.outerHeight();var a=e.hasClass("layui-form-selectup")||t.css("top").indexOf("-")!=-1||n+i>c.height()&&n>=i;e=e.find("."+v);var r=q[t.attr("xid")];var l=t.parents(".layui-form-pane")[0]&&t.prev()[0].clientHeight>38?14:10;if(r&&r.config.direction=="up"||a){a=true;if(r&&r.config.direction=="down"){a=false}}var o=e[0].offsetTop+e.height()+l;if(a){t.css({top:"auto",bottom:o+3+"px"})}else{t.css({top:o+"px",bottom:"auto"})}};o.prototype.changeShow=function(e,t){Q(".layui-form-selected").removeClass("layui-form-selected");var n=e.parents("."+P),i=n.hasClass(f),a=n.find("dl").attr("xid");Q("."+m+" ."+P).not(n).removeClass(f);if(t){this.retop(n);n.addClass(f);n.find("."+y).focus();if(!n.find("dl dd[lay-value]:not(."+J+")").length){n.find("dl ."+V).addClass(U)}}else{n.removeClass(f);this.clearInput(a);n.find("dl ."+U).removeClass(U);n.find("dl dd."+h).removeClass(h);n.find("dl dd."+p).remove();if(a&&q[a]&&q[a].config.isEmpty){this.triggerSearch(n)}this.changePlaceHolder(n.find("."+x))}if(t!=i){var r=q[a].config.opened||z.opened[a];t&&r&&r instanceof Function&&r(a);var l=q[a].config.closed||z.closed[a];!t&&l&&l instanceof Function&&l(a)}};o.prototype.changePlaceHolder=function(e){var t=e.parents("."+I);t[0]||(t=e.parents("dl").prev());if(!t[0]){return}var n=e.parents("."+m).find("dl[xid]").attr("xid");if(q[n]&&q[n].config.height){}else{var i=t.find("."+v)[0].clientHeight;t.css("height",(i>36?i+4:i)+"px");var a=t.parents("."+m).parent().prev();if(a.is(".layui-form-label")&&t.parents(".layui-form-pane")[0]){i=i>36?i+4:i;t.css("height",i+"px");a.css({height:i+2+"px",lineHeight:i-18+"px"})}}var r=t.find("."+g+" input"),l=!e.find("span:last")[0]&&!t.find("."+y).val();if(l){var o=r.attr("back");r.removeAttr("back");r.attr("placeholder",o)}else{var s=r.attr("placeholder");r.removeAttr("placeholder");r.attr("back",s)}};o.prototype.indexOf=function(e,t){for(var n=0;n-1){e.splice(n,1);return true}return false};o.prototype.selectAll=function(i,a,e){var r=this;var l=Q('[xid="'+i+'"]');if(!l[0]){return}if(l.find(".xm-select-linkage")[0]){return}l.find("dd[lay-value]:not(."+J+"):not(."+w+")"+(e?":not(."+E+")":"")).each(function(e,t){t=Q(t);var n=r.getItem(i,t);r.handlerLabel(i,l.find('dd[lay-value="'+n.value+'"]'),true,n,!a)})};o.prototype.removeAll=function(n,i,a){var r=this;var l=Q('[xid="'+n+'"]');if(!l[0]){return}if(l.find(".xm-select-linkage")[0]){q[n].values.concat([]).forEach(function(e,t){var n=e.value.split("/");var i=void 0,a=void 0,r=0;do{i=n[r++];a=l.find(".xm-select-linkage-group"+r+':not(.xm-select-linkage-hide) li[xm-value="'+i+'"]');a.click()}while(a.length&&i!=undefined)});return}q[n].values.concat([]).forEach(function(e,t){if(a&&l.find('dd[lay-value="'+e.value+'"]').hasClass(E)){}else{r.handlerLabel(n,l.find('dd[lay-value="'+e.value+'"]'),false,e,!i)}})};o.prototype.reverse=function(i,a,e){var r=this;var l=Q('[xid="'+i+'"]');if(!l[0]){return}if(l.find(".xm-select-linkage")[0]){return}l.find("dd[lay-value]:not(."+J+")"+(e?":not(."+E+")":"")).each(function(e,t){t=Q(t);var n=r.getItem(i,t);r.handlerLabel(i,l.find('dd[lay-value="'+n.value+'"]'),!t.hasClass(w),n,!a)})};o.prototype.skin=function(e){var t=["default","primary","normal","warm","danger"];var n=t[Math.floor(Math.random()*t.length)];Q('dl[xid="'+e+'"]').parents("."+m).find("."+P).attr("xm-select-skin",n);this.check(e)&&this.commonHandler(e,Q('dl[xid="'+e+'"]').parents("."+m).find("."+x))};o.prototype.getPosition=function(e){var t=0,n=0;while(e!=null){t+=e.offsetLeft;n+=e.offsetTop;e=e.offsetParent}return{x:t,y:n}};o.prototype.onreset=function(){Q(document).on("click","[type=reset]",function(e){Q(e.target).parents("form").find("."+m+" dl[xid]").each(function(e,t){var n=t.getAttribute("xid"),i=Q(t),a=void 0,r={};K.removeAll(n);q[n].config.init.forEach(function(e,t){if(e&&(!r[e]||q[n].config.repeat)&&(a=i.find('dd[lay-value="'+e.value+'"]'))[0]){K.handlerLabel(n,a,true);r[e]=1}})})})};o.prototype.bindEvent=function(n,e,i){if(e&&e instanceof Function){i=e;e=null}if(i&&i instanceof Function){if(!e){Q.each(q,function(e,t){q[e]?q[e].config[n]=i:z[n][e]=i})}else{q[e]?(q[e].config[n]=i,delete z[n][e]):z[n][e]=i}}};o.prototype.check=function(e,t){if(Q('dl[xid="'+e+'"]').length){return true}else if(Q('select[xm-select="'+e+'"]').length){if(!t){this.render(e,Q('select[xm-select="'+e+'"]'));return true}}else{delete q[e];return false}};o.prototype.render=function(e,t){K.init(t);K.one(Q('dl[xid="'+e+'"]').parents("."+m));K.initVal(e)};o.prototype.log=function(e){console.log(e)};var u=function e(){this.v=t;this.render()};var K=new o;u.prototype.value=function(i,e,t){if(typeof i!="string"){return[]}var a=q[i];if(!K.check(i)){return[]}if(typeof e=="string"||e==undefined){var n=a.values.concat([])||[];if(e=="val"){return n.map(function(e){return e.value})}if(e=="valStr"){return n.map(function(e){return e.value}).join(",")}if(e=="name"){return n.map(function(e){return e.name})}if(e=="nameStr"){return n.map(function(e){return e.name}).join(",")}return n}if(K.isArray(e)){var r=Q('[xid="'+i+'"]'),l={},o=void 0,s=true;if(t==false){s=false}else if(t==true){s=true}else{K.removeAll(i)}if(s){a.values.forEach(function(e,t){l[e.value]=1})}e.forEach(function(e,t){if(e&&(!l[e]||a.config.repeat)){if((o=r.find('dd[lay-value="'+e+'"]'))[0]){K.handlerLabel(i,o,s,null,true);l[e]=1}else{var n=K.valToName(i,e);if(n){K.handlerLabel(i,o,s,K.getItem(i,e),true);l[e]=1}}}})}};u.prototype.on=function(e,t,n){K.bindEvent(n?"endOn":"on",e,t);return this};u.prototype.filter=function(e,t){K.bindEvent("filter",e,t);return this};u.prototype.maxTips=function(e,t){K.bindEvent("maxTips",e,t);return this};u.prototype.opened=function(e,t){K.bindEvent("opened",e,t);return this};u.prototype.closed=function(e,t){K.bindEvent("closed",e,t);return this};u.prototype.config=function(e,n,t){if(e&&(typeof e==="undefined"?"undefined":_typeof(e))=="object"){t=n==true;n=e;e=null}if(n&&(typeof n==="undefined"?"undefined":_typeof(n))=="object"){if(t){n.header||(n.header={});n.header["Content-Type"]="application/json; charset=UTF-8";n.dataType="json"}e?(Y[e]=Q.extend(true,{},Y[e]||X,n),!K.check(e)&&this.render(e),q[e]&&n.direction&&(q[e].config.direction=n.direction),q[e]&&n.clearInput&&(q[e].config.clearInput=true),n.searchUrl&&q[e]&&K.triggerSearch(Q("."+m+' dl[xid="'+e+'"]').parents("."+P),true)):(Q.extend(true,X,n),Q.each(Y,function(e,t){Q.extend(true,t,n)}))}return this};u.prototype.render=function(e,t){var n;if(e&&(typeof e==="undefined"?"undefined":_typeof(e))=="object"){t=e;e=null}var i=t?(n={init:t.init,disabled:t.disabled,max:t.max,isSearch:t.isSearch,searchUrl:t.searchUrl,isCreate:t.isCreate,radio:t.radio,skin:t.skin,direction:t.direction,height:t.height,formname:t.formname,layverify:t.layverify,layverType:t.layverType,showCount:t.showCount,placeholder:t.placeholder,create:t.create,filter:t.filter,maxTips:t.maxTips,on:t.on},_defineProperty(n,"on",t.on),_defineProperty(n,"opened",t.opened),_defineProperty(n,"closed",t.closed),_defineProperty(n,"template",t.template),_defineProperty(n,"clearInput",t.clearInput),n):{};t&&t.searchType!=undefined&&(i.searchType=t.searchType=="dl"?1:0);if(e){r[e]={};Q.extend(r[e],q[e]?q[e].config:{},i)}else{Q.extend(a,i)}(Q("select["+v+'="'+e+'"]')[0]?Q("select["+v+'="'+e+'"]'):Q("select["+v+"]")).each(function(e,t){var n=t.getAttribute(v);K.render(n,t);setTimeout(function(){return K.setHidnVal(n,Q('select[xm-select="'+n+'"] + div.'+m+" ."+x))},10)});return this};u.prototype.disabled=function(e){var t={};e?K.check(e)&&(t[e]=q[e]):t=q;Q.each(t,function(e,t){Q('dl[xid="'+e+'"]').prev().addClass(N)});return this};u.prototype.undisabled=function(e){var t={};e?K.check(e)&&(t[e]=q[e]):t=q;Q.each(t,function(e,t){Q('dl[xid="'+e+'"]').prev().removeClass(N)});return this};u.prototype.data=function(e,t,n){if(!e||!t||!n){K.log("id: "+e+" param error !!!");return this}if(!K.check(e)){K.log("id: "+e+" not render !!!");return this}this.value(e,[]);this.config(e,n);if(t=="local"){K.renderData(e,n.arr,n.linkage==true,n.linkageWidth?n.linkageWidth:"100")}else if(t=="server"){K.ajax(e,n.url,n.keyword,n.linkage==true,n.linkageWidth?n.linkageWidth:"100")}return this};u.prototype.btns=function(e,o,s){if(e&&K.isArray(e)){o=e;e=null}if(!o||!K.isArray(o)){return this}var t={};e?K.check(e)&&(t[e]=q[e]):t=q;o=o.map(function(e){if(typeof e=="string"){if(e=="select"){return i[0]}if(e=="remove"){return i[1]}if(e=="reverse"){return i[2]}if(e=="skin"){return i[3]}}return e});Q.each(t,function(e,t){t.config.btns=o;var n=Q('dl[xid="'+e+'"]').find("."+J+":first");if(o.length){var i=s&&s.show&&(s.show=="name"||s.show=="icon")?s.show:"";var a=K.renderBtns(e,i,s&&s.space?s.space:"30px");n.html(a)}else{var r=n.parents("."+P).find("."+g+" input");var l=r.attr("placeholder")||r.attr("back");n.html(l);n.removeAttr("style")}});return this};u.prototype.search=function(e,t){if(e&&K.check(e)){Y[e]=Q.extend(true,{},Y[e]||X,{first:true,searchVal:t});K.triggerSearch(Q('dl[xid="'+e+'"]').parents("."+P),true)}return this};u.prototype.replace=function(e,t,n){var i=this;if(!e||!t||!n){K.log("id: "+e+" param error !!!");return this}if(!K.check(e,true)){K.log("id: "+e+" not render !!!");return this}var a=this.value(e,"val");this.value(e,[]);this.config(e,n);if(t=="local"){K.renderData(e,n.arr,n.linkage==true,n.linkageWidth?n.linkageWidth:"100",false,true);this.value(e,a,true)}else if(t=="server"){K.ajax(e,n.url,n.keyword,n.linkage==true,n.linkageWidth?n.linkageWidth:"100",false,function(e){i.value(e,a,true)},true)}};return new u}); \ No newline at end of file diff --git a/public/static/layui/plugin/formSelects/formSelects-v3.js b/public/static/layui/plugin/formSelects/formSelects-v3.js new file mode 100644 index 0000000..276c381 --- /dev/null +++ b/public/static/layui/plugin/formSelects/formSelects-v3.js @@ -0,0 +1,954 @@ +'use strict'; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +/** + * name: formSelects + * 基于Layui Select多选 + * version: 3.0.9.0607 + * https://faysunshine.com/layui/template/formSelects-v3/formSelects-v3.js + */ +(function (layui, window, factory) { + if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object') { + // 支持 CommonJS + module.exports = factory(); + } else if (typeof define === 'function' && define.amd) { + // 支持 AMD + define(factory); + } else if (window.layui && layui.define) { + //layui加载 + layui.define(['jquery', 'form'], function (exports) { + exports('formSelects', factory()); + }); + } else { + window.formSelects = factory(); + } +})(layui, window, function () { + //针对IE的一些处理 + if (window.Map == undefined) { + var _Map = function _Map() { + this.value = {}; + }; + + _Map.prototype.set = function (key, val) { + this.value[key] = val; + }; + + _Map.prototype.get = function (key) { + return this.value[key]; + }; + + _Map.prototype.has = function (key) { + return this.value.hasOwnProperty(key); + }; + + _Map.prototype.delete = function (key) { + delete this.value[key]; + }; + + window.Map = _Map; + } + + var $ = layui.jquery || $, + form = layui.form, + select3 = { + value: function value(name) { + var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'all'; + var vals = arguments[2]; + + if (Array.isArray(type)) { + vals = type; + type = 'all'; + } + if (name && vals && Array.isArray(vals)) { + var options = commons.data.confs.get(name); + if (options) { + var dl = commons.methods.getDiv(options).find('dl'); + if (!options.repeat) { + var map = {}, + newVals = []; + vals.forEach(function (val) { + if (!map[val]) { + newVals.push(val); + map[val] = 1; + } + }); + vals = newVals; + } + var on = options.on; + options.on = null; + commons.methods.removeAll(options); + options.delete = false; + vals.forEach(function (val) { + dl.find('dd:not(.layui-disabled)[lay-value=\'' + val + '\']').click(); + }); + options.on = on; + } + return; + } + var arr = commons.data.values.get(name); + if (!arr) { + return vals; + } + if (type == 'val') { + return arr.map(function (val) { + return val.val; + }); + } + if (type == 'valStr') { + return arr.map(function (val) { + return val.val; + }).join(','); + } + if (type == 'name') { + return arr.map(function (val) { + return val.name; + }); + } + if (type == 'nameStr') { + return arr.map(function (val) { + return val.name; + }).join(','); + } + return arr; + }, + render: function render(options) { + if (options) { + if (commons.data.confs.get(options.name)) { + options = commons.methods.cloneOptions(options, commons.data.confs.get(options.name)); + commons.methods.init(options); + } else { + var dom = commons.methods.getDom(options, true); + if (dom.length) { + var hisOptions = commons.methods.cloneOptions(commons.methods.getOptions(dom), commons.data.DEFAULT_OPTIONS); + options = commons.methods.cloneOptions(options, hisOptions); + commons.methods.init(options); + } + } + } else { + commons.methods.autoInit(); + } + }, + delete: function _delete(name, abs) { + if (name && commons.data.confs.get(name)) { + var dom = commons.methods.getDom({ + name: name + }); + if (dom.parent().hasClass(commons.data.pclass)) { + if (abs) { + dom.removeAttr(commons.data.name); + } + dom.removeAttr('style'); + dom.parent()[0].outerHTML = dom[0].outerHTML; + } + commons.data.confs.delete(name); + for (var item in commons.data.temps) { + commons.data.temps[item].delete(name); + } + commons.data.values.delete(name); + } + }, + style: function style(name, colors) { + if (name) { + if (!colors) { + commons.methods.loadCss(name, null); + } else if (Array.isArray(colors)) { + commons.methods.loadCss(name, colors); + } else { + var arr = [colors.labelBgColor, colors.labelColor, colors.labelIconBgColor, colors.labelIconColor, colors.labelLabelBorderColor, colors.thisBgColor, colors.thisColor]; + commons.methods.loadCss(name, arr); + } + } + } + }, + commons = { + data: { + name: 'xm-select', + pclass: 'xm-select-parent', + vclass: 'xm-select-validate', + DEFAULT_OPTIONS: { + name: null, //xm-select="xxx" + type: 1, //显示模式, 1:layui-this, 2:checkbox, 3:icon + icon: { + class: 'layui-icon-ok', + text: '' + }, + max: null, + maxTips: null, + init: null, //初始化的选择值, + on: null, //select值发生变化 + data: null + }, + DEFAULT_RENDER: { + arr: null, + name: 'name', + val: 'val', + selected: 'selected', + disabled: 'disabled' + }, + confs: new Map(), + temps: { + dom: new Map(), + div: new Map() + }, + resize: new Map(), + values: new Map(), + times: new Map() + }, + methods: { + init: function init(options, clone) { + if (!clone) { + options = commons.methods.cloneOptions(options); + } + //原始dom添加一个filter + var _ref = ['xm-' + options.name, commons.methods.getDom(options, true)], + filter = _ref[0], + dom = _ref[1]; + + if (dom.next().hasClass('layui-form-select')) { + dom.next().remove(); + } + if (options.data && options.data.arr) { + var os = $.extend({}, commons.data.DEFAULT_RENDER, options.data); + var html = ''; + for (var i in os.arr) { + var db = os.arr[i]; + if (db.arr && Array.isArray(db.arr)) { + html += ''; + for (var j in db.arr) { + var gdb = db.arr[j]; + html += ''; + } + html += ''; + } else { + html += ''; + } + } + dom.html(html); + } + //判断dom中是否包含了空的option, 如果不包含, 添加 + if (!dom.find('option[value=""]').length) { + $('').insertBefore(dom.find('option:first')); + } + if (dom.parent().hasClass(commons.data.pclass)) { + dom.parent().attr('lay-filter', filter).addClass('layui-form'); + } else { + dom.wrap('
    '); + } + dom.attr('lay-filter', filter); + options.type ? dom.attr('xm-select-type', options.type) : dom.removeAttr('xm-select-type'); + options.max ? dom.attr('xm-select-max', options.max) : dom.removeAttr('xm-select-max'); + commons.methods.formRender('select', filter, true); + //1.去掉layui的原始渲染 + commons.methods.getDom(options).next().addClass(commons.data.vclass); + //2. + commons.data.confs.set(options.name, options); + for (var item in commons.data.temps) { + commons.data.temps[item].delete(options.name); + } + commons.data.values.delete(options.name); + //3.渲染input + commons.methods.overrideInput(options); + commons.methods.typeInit(options, filter); + //4.初始化init + var vals = commons.methods.getInitVal(options); + vals.forEach(function (val) { + commons.methods.valHandler(options, val, true); + }); + commons.methods.showPlaceholder(options); + commons.methods.retop(options); + commons.methods.removeDefaultClass(options); + commons.methods.on(options, filter); + }, + addLabel: function addLabel(options, vals) { + var ipt = commons.methods.getIpt(options); + ipt.find('.xm-select-empty').remove(); + vals.forEach(function (val) { + var tips = 'fsw="' + options.name + '"'; + var _ref2 = [$('' + val.name + ''), $('')], + $label = _ref2[0], + $close = _ref2[1]; + + $label.append($close); + ipt.append($label); + }); + }, + delLabel: function delLabel(options, vals) { + var ipt = commons.methods.getIpt(options); + vals.forEach(function (val) { + ipt.find('span[value=\'' + val.val + '\']:first').remove(); + }); + }, + showPlaceholder: function showPlaceholder(options) { + var vals = commons.methods.getValues(options); + if (!vals.length) { + var _ref3 = ['fsw="' + options.name + '"', commons.methods.getIpt(options)], + tips = _ref3[0], + ipt = _ref3[1]; + + if (!ipt.find('.xm-select-empty').length) { + var _tips = options.tips ? options.tips : ipt.prev().attr('placeholder'); + var cls = 'fsw="' + options.name + '"'; + var span = $('' + _tips + ''); + ipt.append(span); + } + } + }, + valHandler: function valHandler(options, val, isAdd, isShow) { + var vals = commons.methods.getValues(options); + var dd = commons.methods.getDiv(options).find('dl dd[lay-value=\'' + val.val + '\']'); + if (isAdd) { + if (!options.max || options.max && vals.length < options.max) { + vals.push(val); + commons.methods.addLabel(options, [val]); + commons.methods.typeHandler(options, dd, isAdd); + } else { + commons.methods.maxTips(options, val); + commons.methods.typeHandler(options, dd, false); + } + } else { + if (!dd.hasClass('layui-disabled')) { + commons.methods.remove(vals, val); + commons.methods.delLabel(options, [val]); + if (commons.methods.indexOf(vals, val) == -1) { + commons.methods.typeHandler(options, dd, isAdd); + } + } + } + commons.methods.retop(options); + }, + typeInit: function typeInit(options, filter) { + var div = commons.methods.getDiv(options); + if (options.type == 2) { + //checkbox + div.find('dl dd:not(.layui-select-tips)').each(function (index, target) { + var $target = $(target); + var text = $target.text(); + var dis = $target.hasClass('layui-disabled') ? 'disabled' : ''; + $target.text(''); + $target.append('\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t'); + }); + form.render('checkbox', filter); + div.find('dl dd .layui-form-checkbox').css('margin-top', '1px'); + } else { + div.find('dl dd:not(.layui-select-tips)').each(function (index, target) { + $(target).css({ + margin: '1px 0' + }); + }); + } + }, + typeHandler: function typeHandler(options, dd, isAdd) { + if (options.type == 3) { + //对勾 + if (isAdd) { + var span = $('\n\t\t\t\t\t\t\t\t' + options.icon.text + '\t\n\t\t\t\t\t\t\t'); + dd.append(span); + } else { + dd.find('span').remove(); + } + } else if (options.type == 2) { + //checkbox + if (isAdd) { + dd.find('.layui-form-checkbox').addClass('layui-form-checked'); + } else { + dd.find('.layui-form-checkbox').removeClass('layui-form-checked'); + } + } + isAdd ? dd.addClass(commons.data.name + '-this') : dd.removeClass(commons.data.name + '-this'); + dd.removeClass('layui-this'); + commons.methods.showPlaceholder(options); + }, + on: function on(options, filter) { + form.on('select(' + filter + ')', function (data) { + if (options.radio) { + commons.methods.getDiv(options).find('dl').removeClass('xm-select-show').addClass('xm-select-hidn').css('display', 'none'); + var selected = void 0, + val = void 0; + if (data.value) { + val = { + name: commons.methods.getDom(options).find('option[value=\'' + data.value + '\']').text(), + val: data.value + }; + selected = commons.methods.indexOf(commons.methods.getValues(options), val) == -1; + if (selected) { + var hisVal = select3.value(options.name)[0]; + if (hisVal) { + commons.methods.valHandler(options, hisVal, false, false); + commons.methods.setValues(options, []); + } + } + commons.methods.valHandler(options, val, selected, false); + } else { + selected = false; + val = select3.value(options.name)[0]; + if (val) { + commons.methods.valHandler(options, val, selected, false); + commons.methods.setValues(options, []); + } + } + if (val && options.on && options.on instanceof Function) { + options.on(data, select3.value(options.name), val, selected); + } + return; + } + if (commons.methods.getDiv(options).hasClass('layui-form-selectup') || commons.methods.getDiv(options).find('dl').css('top').indexOf('-') == 0) { + setTimeout(function () { + commons.methods.getDiv(options).addClass('layui-form-selectup'); + }, 50); + } + + if (options.repeat) { + if (data.value) { + var ipt = commons.methods.getIpt(options); + if (options.delete) { + var arr = select3.value(options.name); + var _val = arr[commons.methods.indexOf(arr, data.value)]; + if (_val) { + commons.methods.valHandler(options, _val, false); + ipt.parent().next().find('dd[lay-value=\'' + data.value + '\'] .layui-form-checkbox > i').html(''); + if (options.on && options.on instanceof Function) { + options.on(data, select3.value(options.name), _val, false); + } + } + options.delete = false; + return; + } else { + var vals = commons.methods.getValues(options); + var _val2 = { + name: commons.methods.getDom(options).find('option[value=\'' + data.value + '\']').text(), + val: data.value + }; + commons.methods.valHandler(options, _val2, true); + if (options.on && options.on instanceof Function) { + options.on(data, select3.value(options.name), _val2, true); + } + } + setTimeout(function () { + commons.methods.getDiv(options).addClass('layui-form-selected').find('dl dd.layui-this').removeClass('layui-this'); + }, 3); + return; + } + } + if (data.value) { + var _val3 = { + name: commons.methods.getDom(options).find('option[value=\'' + data.value + '\']').text(), + val: data.value + }; + var _selected = commons.methods.indexOf(commons.methods.getValues(options), _val3) == -1; + commons.methods.valHandler(options, _val3, _selected, true); + + if (options.on && options.on instanceof Function) { + options.on(data, select3.value(options.name), _val3, _selected); + } + + setTimeout(function () { + commons.methods.getDiv(options).addClass('layui-form-selected').find('dl dd.layui-this').removeClass('layui-this'); + }, 3); + } else { + if (commons.methods.getDom(options).attr('xm-select-search') == undefined) { + commons.methods.removeAll(options); + setTimeout(function () { + commons.methods.getDiv(options).addClass('layui-form-selected'); + }, 3); + } + } + }); + }, + maxTips: function maxTips(options, val) { + if (options.maxTips && options.maxTips instanceof Function) { + options.maxTips(select3.value(options.name), val, options.max); + return; + } + var ipt = commons.methods.getIpt(options); + if (ipt.parents('.layui-form-item[pane]').length) { + ipt = ipt.parents('.layui-form-item[pane]'); + } + ipt.css('border-color', 'red'); + setTimeout(function () { + ipt.css('border-color', '#e6e6e6'); + }, 300); + }, + indexOf: function indexOf(arr, val) { + for (var i = 0; i < arr.length; i++) { + if (arr[i].val == val || arr[i].val == (val ? val.val : val) || arr[i] == val || JSON.stringify(arr[i]) == JSON.stringify(val)) { + return i; + } + } + return -1; + }, + remove: function remove(arr, val) { + var index = commons.methods.indexOf(arr, val ? val.val : val); + if (index > -1) { + arr.splice(index, 1); + return true; + } + return false; + }, + removeAll: function removeAll(options) { + var div = commons.methods.getDiv(options); + var vals = div.find('.xm-select > span'); + vals.each(function (index, item) { + options.delete = true; + div.find('dl dd.xm-select-this:not(.layui-disabled)[lay-value=\'' + item.getAttribute('value') + '\']').click(); + }); + return vals.length; + }, + removeDefaultClass: function removeDefaultClass(options) { + var _ref4 = [commons.methods.getDom(options), commons.methods.getDiv(options)], + dom = _ref4[0], + div = _ref4[1]; + + div.find('dl').addClass('xm-select-hidn'); + div.find('dl dd.layui-this').removeClass('layui-this'); + div.find('dl').append('
    x
    '); + var text = options.radio ? '请选择' : '清空已选择' + (options.max ? '. \u5F53\u524D\u914D\u7F6E: \u6700\u591A\u9009\u62E9 ' + options.max + ' \u4E2A' : ''); + var html = '' + text + ''; + var that = div.find('dl dd.layui-select-tips'); + if (dom.attr('xm-select-search') != undefined) { + var icon = ''; + html = '' + icon + ''; + that.addClass('xm-select-dd-search'); + that.off('click'); + } + commons.methods.handlerDataTable(dom, '38px'); + that.html(html); + }, + handlerDataTable: function handlerDataTable(dom, height) { + if (dom.length == undefined) { + dom = $(dom); + } + if (dom.parents('div.layui-table-cell').length) { + var index = dom.parents('tr').attr('data-index'); + dom.parents('.layui-table-box').find('tbody tr[data-index=\'' + index + '\'] div.layui-table-cell').css({ + height: height, + lineHeight: height, + overflow: 'unset' + }); + } + }, + overrideInput: function overrideInput(options) { + var _ref5 = [commons.methods.getDiv(options), commons.methods.getDom(options)], + _div = _ref5[0], + _dom = _ref5[1]; + var _ref6 = [_div.find('.layui-select-title input:first'), $('
    ')], + $input = _ref6[0], + $orinput = _ref6[1]; + + $orinput.insertAfter($input); + if ($input.parents('.layui-form-pane').length && $input.parents('.layui-form-item[pane]').length) { + $orinput.css('border', 'none'); + } + if (options.height) { + $orinput.addClass('.xm-select-height').css('height', options.height); + } + if (_dom.attr('disabled') != undefined) { + $orinput.append($('
    ').addClass('layui-disabled')); + } + }, + retop: function retop(options) { + var div = commons.methods.getIpt(options); + if (div.length) { + var dl = div.parent('.layui-select-title').next(); + var up = dl.parent().hasClass('layui-form-selectup') || dl.css('top').indexOf('-') == 0; + var time = commons.data.times.get(options.name); + if (time) { + if (Date.now() - time.time < 100 || options.delete) { + up = time.up; + options.delete = false; + } else { + time.up = up; + } + time.time = Date.now(); + } else { + commons.data.times.set(options.name, { + time: Date.now(), + up: up + }); + } + if (up) { + div.parent('.layui-select-title').next().css({ + top: 'auto', + bottom: div[0].offsetTop + div.height() + 14 + 'px' + }); + } else { + div.parent('.layui-select-title').next().css({ + top: div[0].offsetTop + div.height() + 14 + 'px', + bottom: 'auto' + }); + } + } + }, + getElementTop: function getElementTop(element) { + var actualTop = element.offsetTop; + var current = element.offsetParent; + while (current !== null) { + actualTop += current.offsetTop; + current = current.offsetParent; + } + return actualTop; + }, + getDom: function getDom(options, isNew) { + var _ref7 = [commons.data.temps.dom, options.name], + _dom = _ref7[0], + _name = _ref7[1]; + + if (isNew) { + _dom.set(_name, $('select[' + commons.data.name + '=\'' + _name + '\']')); + } + if (!_dom.has(_name)) { + _dom.set(_name, $('select[' + commons.data.name + '=\'' + _name + '\']')); + } + return _dom.get(_name); + }, + getDiv: function getDiv(options) { + var _ref8 = [commons.data.temps.div, options.name], + _div = _ref8[0], + _name = _ref8[1]; + + if (!_div.has(_name)) { + _div.set(_name, $('select[' + commons.data.name + '=\'' + _name + '\']').next()); + } + return _div.get(_name); + }, + getIpt: function getIpt(options) { + return commons.methods.getDiv(options).find('div .' + commons.data.name); + }, + getInitVal: function getInitVal(options) { + var _dom = commons.methods.getDom(options); + var vals = options.init ? options.init : _dom.find('option[selected]').map(function (index, target) { + return $(target).attr('value'); + }).toArray(); + var result = void 0; + if (options.radio) { + var one = vals.map(function (val) { + var opt = _dom.find('option[value=\'' + val + '\']'); + return { + name: opt.attr('disabled') != undefined ? null : opt.text(), + val: val + "" + }; + }).filter(function (val) { + return val.name && val.val; + })[0]; + result = one ? [one] : []; + } else { + result = vals.map(function (val) { + return { + name: _dom.find('option[value=\'' + val + '\']').text(), + val: val + "" + }; + }).filter(function (val) { + return val.name && val.val; + }); + } + return result; + }, + getValues: function getValues(options) { + var _ref9 = [commons.data.values, options.name], + _arr = _ref9[0], + _name = _ref9[1]; + + if (!_arr.has(_name)) { + _arr.set(_name, []); + } + return _arr.get(_name); + }, + setValues: function setValues(options, vals) { + var _ref10 = [commons.data.values, options.name], + _arr = _ref10[0], + _name = _ref10[1]; + + _arr.set(_name, vals); + }, + getOptions: function getOptions(sel) { + return { + name: sel.attr('' + commons.data.name), + type: sel.attr(commons.data.name + '-type'), + max: sel.attr(commons.data.name + '-max'), + icon: sel.attr(commons.data.name + '-icon'), + tips: sel.attr(commons.data.name + '-placeholder'), + height: sel.attr(commons.data.name + '-height'), + radio: sel.attr(commons.data.name + '-radio') != undefined, + repeat: sel.attr(commons.data.name + '-repeat') != undefined + }; + }, + cloneOptions: function cloneOptions(options, hisOptions) { + if (!hisOptions) { + hisOptions = commons.data.DEFAULT_OPTIONS; + } + if (options.icon && typeof options.icon == 'string') { + var icon = options.icon; + if (icon.indexOf('layui') == 0) { + options.icon = { + class: icon, + text: '' + }; + } else { + options.icon = { + class: '', + text: icon + }; + } + } else { + var v = layui.v.split('.'); + if (v[0] < 2 || v[1] <= 2) { + options.icon = { + class: '', + text: hisOptions.icon.text + }; + } else { + options.icon = { + class: hisOptions.icon.class, + text: '' + }; + } + } + return $.extend({}, hisOptions, options); + }, + autoInit: function autoInit(repeat) { + $('select[' + commons.data.name + ']').each(function (index, target) { + var sel = $(target); + sel.css('display', 'none'); + var options = commons.methods.getOptions(sel); + if (!repeat) { + var hisOptions = commons.data.confs.get(options.name); + options.init = select3.value(options.name, 'val'); + commons.methods.init(commons.methods.cloneOptions(options, hisOptions), true); + } else { + commons.methods.init(options); + } + }); + }, + listenCloseHandler: function listenCloseHandler(e, that, block) { + if (block.length) { + var _ref11 = [block.find('.layui-form-select'), block.find('dl')], + div = _ref11[0], + dl = _ref11[1]; + + var name = block.find('select').attr('xm-select'); + + if (that.hasClass('layui-disabled')) { + return; + } + + if (that.attr('xm-select-clear') != undefined) { + if (that.is('i')) { + var options = commons.data.confs.get($(e.target).attr('xm-select-clear')); + if (options) { + var length = commons.methods.removeAll(options); + if (options.radio && length) { + return; + } + } + div.addClass('layui-form-selected'); + dl.find('.xm-select-input-search').focus(); + return; + } + } + + if (that.hasClass('xm-select-dd-search') || that.hasClass('xm-select-input-search')) { + div.addClass('layui-form-selected'); + dl.find('.xm-select-input-search').focus(); + return; + } + + $('.xm-select-parent > select:not([xm-select=\'' + name + '\']) + div > dl').removeClass('xm-select-show').addClass('xm-select-hidn').css('display', 'none'); + + if (that.attr('fsw') != undefined) { + if (that.is('i')) { + var _ref12 = [$(e.target).parents('.layui-form-select').prev(), $(e.target).parent()], + sel = _ref12[0], + span = _ref12[1]; + + var val = { + name: span.find('font').text(), + val: span.attr('value') + }; + var _options = commons.methods.getOptions(sel); + _options = commons.data.confs.get(_options.name); + _options.delete = true; + commons.methods.getDiv(_options).find('dl dd[lay-value=\'' + val.val + '\']').click(); + setTimeout(function () { + if (dl.hasClass('xm-select-show')) { + div.addClass('layui-form-selected'); + dl.find('.xm-select-input-search').focus(); + } else { + div.removeClass('layui-form-selected'); + } + }, 3); + return; + } + } + + if (block.find('select').attr('xm-select-radio') != undefined) { + setTimeout(function () { + if (dl.hasClass('xm-select-show')) { + div.removeClass('layui-form-selected'); + dl.removeClass('xm-select-show').addClass('xm-select-hidn').css('display', 'none'); + } else { + div.addClass('layui-form-selected'); + dl.removeClass('xm-select-hidn').addClass('xm-select-show').css('display', 'block'); + dl.find('.xm-select-input-search').focus(); + } + }, 3); + return; + } + + if (dl.hasClass('xm-select-show')) { + if (that.hasClass('xm-select') || that.hasClass('xm-select-empty')) { + dl.removeClass('xm-select-show').addClass('xm-select-hidn').css('display', 'none'); + div.removeClass('layui-form-selected'); + } else { + div.addClass('layui-form-selected'); + dl.find('.xm-select-input-search').focus(); + } + return; + } + dl.removeClass('xm-select-hidn').addClass('xm-select-show').css('display', 'block'); + div.addClass('layui-form-selected'); + dl.find('.xm-select-input-search').focus(); + } else { + $('.xm-select-parent > .layui-form-select > dl.xm-select-show').removeClass('xm-select-show').addClass('xm-select-hidn').css('display', 'none'); + } + }, + listenClose: function listenClose() { + $(document).on('click', function (e) { + var that = $(e.target); + var block = that.parents('.xm-select-parent'); + setTimeout(function () { + commons.methods.listenCloseHandler(e, that, block); + commons.methods.retop({ name: block.find('select[xm-select]').attr('xm-select') }); + $('.xm-select-parent input.xm-select-input-search').each(function (index, item) { + var that = $(item); + if (that.parents('dl').hasClass('xm-select-hidn')) { + that.val(''); + that.parents('dl').find('.layui-hide').removeClass('layui-hide'); + that.parents('dl').find('p').remove(); + } + }); + }, 10); + }); + $(document).on({ + 'input propertychange': function inputPropertychange(e) { + var that = $(e.target); + var dl = that.parents('dl'); + that.parents('dl').find('p').remove(); + dl.find('.layui-hide').removeClass('layui-hide'); + dl.find('dd:not(.layui-select-tips):not(:contains(\'' + that.val() + '\'))').addClass('layui-hide'); + if (!dl.find('dd:not(.layui-select-tips):not(.layui-hide)').length) { + dl.append('

    \u65E0\u5339\u914D\u9879

    '); + } + dl.find('dt').each(function (index, item) { + if (!$(item).nextUntil('dt', ':not(.layui-hide)').length) { + $(item).addClass('layui-hide'); + } + }); + } + }, '.xm-select-parent input.xm-select-input-search'); + }, + formRender: null, + rewriteRender: function rewriteRender() { + commons.methods.formRender = form.render; + form.render = function (type, filter, repeat) { + commons.methods.formRender(type, filter); + if (filter) { + var sel = $('[lay-filter=' + filter + ']').find('select[' + commons.data.name + ']'); + if (sel.length) { + if (repeat) { + commons.methods.init(commons.methods.getOptions(sel)); + } + } + return; + } + commons.methods.autoInit(repeat); + }; + }, + loadCss: function loadCss(skin, cs) { + if (skin) { + if (skin == 'default') { + return; + } + var sn = void 0; + if ($('style[skin]').length) { + sn = $('style[skin]'); + } else { + sn = $(''); + } + var df = styles.colors[skin] ? styles.colors[skin] : styles.colors.default; + var colors = $.extend([], df, cs); + sn.html(styles.cssColor(skin, colors[0], colors[1], colors[2], colors[3], colors[4], colors[5], colors[6])); + sn.insertAfter($('head style:last')); + } else { + $('').insertBefore($('head *:first')); + + var html = ''; + for (var name in styles.colors) { + var _colors = styles.colors[name]; + if (_colors) { + _colors = $.extend([], styles.colors.default, _colors); + html += ''; + } + } + if (html) { + $(html).insertAfter($('head style[' + commons.data.name + ']')); + } + } + }, + loadLastStyle: function loadLastStyle() { + $('head').append(''); + }, + resize: function resize(selector, fun) { + var id = commons.data.resize.get(selector); + if (id != undefined) { + clearInterval(id); + } + if (fun && fun instanceof Function) { + var hisize = new Map(); + id = setInterval(function (e) { + $(selector).each(function (index, item) { + var thisize = [item.clientHeight, item.clientWidth]; + if (hisize.get(item)) { + var his = hisize.get(item); + if (his[0] != thisize[0] || his[1] != thisize[1]) { + fun(item); + } + } + hisize.set(item, thisize); + }); + }, 250); + commons.data.resize.set(selector, id); + } + }, + run: function run() { + commons.methods.rewriteRender(); + commons.methods.listenClose(); + commons.methods.loadCss(); + commons.methods.loadLastStyle(); + commons.methods.autoInit(); + commons.methods.resize('.xm-select:not(.xm-select-height)', function (dom) { + commons.methods.handlerDataTable(dom, dom.clientHeight + 'px'); + }); + } + } + }, + styles = { + colors: { //name, spanBgColor, spanColor, iBgColor, iColor, borderColor, tBgColor, tColor + default: ['#F0F2F5', '#909399', '#C0C4CC', '#FFFFFF', '#F0F2F5', '#5FB878', '#FFFFFF'], + primary: ['#009688', '#FFFFFF', '#009688', '#FFFFFF', '#009688', '#009688', '#FFFFFF'], + normal: ['#1E9FFF', '#FFFFFF', '#1E9FFF', '#FFFFFF', '#1E9FFF', '#1E9FFF', '#FFFFFF'], + warm: ['#FFB800', '#FFFFFF', '#FFB800', '#FFFFFF', '#FFB800', '#FFB800', '#FFFFFF'], + danger: ['#FF5722', '#FFFFFF', '#FF5722', '#FFFFFF', '#FF5722', '#FF5722', '#FFFFFF'] + }, + css: function css() { + return '\n\t\t\t\t\tselect[xm-select] + div .layui-select-title > input{display: none!important;}\n\t\t\t\t\tselect[xm-select] + div .layui-select-title > div.xm-select{\n\t\t\t\t\t\tline-height: normal;\n\t\t\t\t\t\theight: auto;\n\t\t\t\t\t\tpadding: 4px 10px;\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\tmin-height: 38px;\n\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\tz-index: 99;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tbackground: none;\n\t\t\t\t\t\tpadding-right: 20px;\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select] + div .layui-select-title > div.xm-select > span:not(.xm-select-empty){\n\t\t\t\t\t\tpadding: 2px 5px;\n\t\t\t\t\t\tbackground: #f0f2f5;\n\t\t\t\t\t\tborder-radius: 2px;\n\t\t\t\t\t\tcolor: #909399;\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tline-height: 18px;\n\t\t\t\t\t\theight: 18px;\n\t\t\t\t\t\tmargin: 2px 5px 2px 0px;\n\t\t\t\t\t\tfloat: left;\n\t\t\t\t\t\tcursor: initial;\n\t\t\t\t\t\tuser-select: none;\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select] + div .layui-select-title > div.xm-select > span:not(.xm-select-empty) i{\n\t\t\t\t\t\tbackground-color: #c0c4cc;\n\t\t\t\t\t\tcolor: #ffffff;\n\t\t\t\t\t\tmargin-left: 8px;\n\t\t\t\t\t\tborder-radius: 20px;\n\t\t\t\t\t\tfont-size: 12px;\n\t\t\t\t\t\tcursor: initial;\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select] + div .layui-select-title > div.xm-select > span:not(.xm-select-empty) i:hover{\n\t\t\t\t\t\tbackground-color: #909399;\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select] + div .layui-select-title > div.xm-select > span.xm-select-empty{\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\theight: 28px;\n\t\t\t\t\t\tline-height: 28px;\n\t\t\t\t\t\tcolor: #999999\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select] + div dl dd.xm-select-dd-search{\n\t\t\t\t\t\tbackground-color: #FFFFFF;\n\t\t\t\t\t\tpadding-bottom: 5px;\n\t\t\t\t\t\tmargin-right: 30px;\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select] + div dl dd.xm-select-dd-search > input{\n\t\t\t\t\t\tcursor: text;\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select] + div dl dd.xm-select-dd-search > span{\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t right: 8px;\n\t\t\t\t\t top: 5px;\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select] + div dl dd.xm-select-dd-search > span > i{\n\t\t\t\t\t\tfont-size: 22px;\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select] + div dl dd.xm-select-dd-search > span > i:hover{\n\t\t\t\t\t\tcolor: red;\n\t\t\t\t\t\topacity:.8;\n\t\t\t\t\t\tfilter:alpha(opacity=80);\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select] + div dl p.xm-select-search-empty{\n\t\t\t\t\t\tmargin: 10px 0;\n\t\t\t\t\t text-align: center;\n\t\t\t\t\t color: #999;\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select][xm-select-type=\'1\'] + div dl dd.xm-select-this,select[xm-select]:not([xm-select-type]) + div dl dd.xm-select-this{\n\t\t\t\t\t\tbackground-color: #5FB878;\n\t\t\t\t\t\tcolor: #FFF;\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select][xm-select-type=\'1\'] + div dl dd.layui-disabled,select[xm-select]:not([xm-select-type]) + div dl dd.layui-disabled{\n\t\t\t\t\t\tbackground-color: #FFFFFF;\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select][xm-select-type=\'2\'] + div dl dd.layui-disabled i{\n\t\t\t\t\t\tborder-color: #C2C2C2;\n\t\t\t\t\t\tcolor: #FFFFFF;\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select][xm-select-type=\'2\'] + div dl dd.xm-select-this.layui-disabled i{\n\t\t\t\t\t\tbackground-color: #D2D2D2;\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select][xm-select-type=\'2\'] + div dl dd.xm-select-this:not(.layui-disabled) i{\n\t\t\t\t\t\tbackground-color: #5FB878;\n\t\t\t\t\t\tborder-color: #5FB878;\n\t\t\t\t\t\tcolor: #FFF;\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select][xm-select-type=\'3\'] + div dl dd.xm-select-this:not(.layui-disabled){\n\t\t\t\t\t\tcolor: #5FB878;\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select][xm-select-type=\'3\'] + div dl dd.xm-select-this i{\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t'; + }, + cssColor: function cssColor(name, spanBgColor, spanColor, iBgColor, iColor, borderColor, tBgColor, tColor) { + return '\n\t\t\t\t\tselect[xm-select][xm-select-skin=\'' + name + '\'] + div .layui-select-title > div.xm-select > span:not(.xm-select-empty){\n\t\t\t\t\t\tbackground: ' + spanBgColor + ';\n\t\t\t\t\t\tcolor: ' + spanColor + ';\n\t\t\t\t\t\tborder: 1px solid ' + borderColor + '\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select][xm-select-skin=\'' + name + '\'] + div .layui-select-title > div.xm-select > span:not(.xm-select-empty) i{\n\t\t\t\t\t\tbackground: ' + iBgColor + ';\n\t\t\t\t\t\tcolor: ' + iColor + ';\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select][xm-select-skin=\'' + name + '\'] + div .layui-select-title > div.xm-select > span:not(.xm-select-empty) i:hover{\n\t\t\t\t\t\topacity:.8;\n\t\t\t\t\t\tfilter:alpha(opacity=80);\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select][xm-select-skin=\'' + name + '\'][xm-select-type=\'1\'] + div dl dd.xm-select-this:not(.layui-disabled),select[xm-select][xm-select-skin=\'' + name + '\']:not([xm-select-type]) + div dl dd.xm-select-this:not(.layui-disabled){\n\t\t\t\t\t\tbackground-color: ' + tBgColor + ';\n\t\t\t\t\t\tcolor: ' + tColor + ';\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select][xm-select-skin=\'' + name + '\'][xm-select-type=\'2\'] + div dl dd.xm-select-this:not(.layui-disabled) i{\n\t\t\t\t\t\tbackground-color: ' + tBgColor + ';\n\t\t\t\t\t\tborder-color: ' + tBgColor + ';\n\t\t\t\t\t\tcolor: ' + tColor + ';\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select][xm-select-skin=\'' + name + '\'][xm-select-type=\'3\'] + div dl dd.xm-select-this:not(.layui-disabled){\n\t\t\t\t\t\tcolor: ' + tBgColor + ';\n\t\t\t\t\t}\n\t\t\t\t\tselect[xm-select][xm-select-type=\'3\'] + div dl dd.xm-select-this i{\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t}\n\t\t\t\t'; + }, + renderCss: function renderCss() { + return '\n\t\t\t\t\tselect[xm-select] + div .layui-select-title > div.xm-select > span:not(.xm-select-empty){\n\t\t\t\t\t\tbox-sizing: content-box;\n\t\t\t\t\t}\n\t\t\t\t\t.xm-select-parent .layui-form-select dl dd.layui-this{\n\t\t\t\t\t background-color: inherit;\n\t\t\t\t\t color: inherit;\n\t\t\t\t\t}\n\t\t\t\t\t.xm-select-parent .layui-form-select dl dd.layui-this.layui-select-tips {\n\t\t\t\t\t\tbackground-color: #FFFFFF;\n\t\t\t\t\t color: #999999;\n\t\t\t\t\t}\n\t\t\t\t\t.xm-select-parent .layui-form-selected dl {\n\t\t\t\t\t display: none;\n\t\t\t\t\t}\n\t\t\t\t\t.xm-select-show:{\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t}\n\t\t\t\t\t.xm-select-hidn:{\n\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t}\n\t\t\t\t'; + } + }; + commons.methods.run(); + return select3; +}); \ No newline at end of file diff --git a/public/static/layui/plugin/formSelects/formSelects-v4.css b/public/static/layui/plugin/formSelects/formSelects-v4.css new file mode 100644 index 0000000..d7d6981 --- /dev/null +++ b/public/static/layui/plugin/formSelects/formSelects-v4.css @@ -0,0 +1,174 @@ +/* formSelects多选css */ +select[xm-select]{display: none !important;} +.xm-select-parent * {margin: 0;padding: 0;font-family: "Helvetica Neue", Helvetica, "PingFang SC", 微软雅黑, Tahoma, Arial, sans-serif; box-sizing: initial;} +.xm-select-parent {text-align: left;} +.xm-select-parent select {display: none;} +.xm-select-parent .xm-select-title {position: relative;min-height: 36px;} +.xm-select-parent .xm-input {cursor: pointer;border-radius: 2px;border-width: 1px;border-style: solid;border-color: #E6E6E6;display: block;width: 100%;box-sizing: border-box;background-color: #FFF;height: 36px;line-height: 1.3;padding-left: 10px;outline: 0} +.xm-select-parent .xm-select-sj {display: inline-block;width: 0;height: 0;border-style: dashed;border-color: transparent;overflow: hidden;position: absolute;right: 10px;top: 50%;margin-top: -3px;cursor: pointer;border-width: 6px;border-top-color: #C2C2C2;border-top-style: solid;transition: all .3s;-webkit-transition: all .3s} +.xm-select-parent .xm-form-selected .xm-select-sj {margin-top: -9px;transform: rotate(180deg)} +.xm-select-parent .xm-form-select dl {display: none;position: absolute;left: 0;top: 42px;padding: 5px 0;z-index: 999;min-width: 100%;border: 1px solid #d2d2d2;max-height: 300px;overflow-y: auto;background-color: #fff;border-radius: 2px;box-shadow: 0 2px 4px rgba(0, 0, 0, .12);box-sizing: border-box;animation-fill-mode: both;-webkit-animation-name: layui-upbit;animation-name: layui-upbit;-webkit-animation-duration: .3s;animation-duration: .3s;-webkit-animation-fill-mode: both;animation-fill-mode: both} +@-webkit-keyframes layui-upbit { + from {-webkit-transform: translate3d(0, 30px, 0);opacity: .3} + to {-webkit-transform: translate3d(0, 0, 0);opacity: 1} +} +@keyframes layui-upbit { + from {transform: translate3d(0, 30px, 0);opacity: .3} + to {transform: translate3d(0, 0, 0);opacity: 1} +} +.xm-select-parent .xm-form-selected dl {display: block} +.xm-select-parent .xm-form-select dl dd,.xm-select-parent .xm-form-select dl dt {padding: 0 10px;line-height: 36px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis} +.xm-select-parent .xm-form-select dl dd {cursor: pointer;height: 36px;} +.xm-select-parent .xm-form-select dl dd:hover {background-color: #f2f2f2} +.xm-select-parent .xm-form-select dl dt {font-size: 12px;color: #999} +.layui-select-disabled .xm-dis-disabled {border-color: #eee!important} +.xm-select-parent .xm-form-select dl .xm-select-tips {padding-left: 10px!important;color: #999;font-size: 14px} +.xm-unselect {-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none} + +.xm-form-checkbox {position: relative;display: block;vertical-align: middle;cursor: pointer;font-size: 0;-webkit-transition: .1s linear;transition: .1s linear;box-sizing: border-box;height: auto!important;line-height: normal!important;border: none!important;margin-right: 0;padding-right: 0;background: 0 0;} +.xm-form-checkbox > i {color: #FFF; font-size: 16px; width: 16px; height: 16px; position: absolute; top: 9px; border: 1px solid #5FB878; border-radius: 3px; z-index: 2;} +.xm-form-checkbox:hover > i {border-color: #5FB878;} +.xm-form-checkbox > span{display: block;position: relative;padding: 0 15px 0 30px;height: 100%;font-size: 14px;border-radius: 2px 0 0 2px;background-color: #d2d2d2;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;background: 0 0;color: #666;line-height: 36px;} + +.xm-select-parent dl{width: 100%;} +.xm-select-parent dl dd{position: relative;} +.xm-select-parent dl dd > i:not(.icon-sousuo){position: absolute; right: 10px; top: 0; color: #AAAAAA;} +.xm-select-parent dl dd.xm-select-this div i {border: none; color: #009688; font-size: 18px;} +.xm-select-parent dl dd.xm-select-this div i:after{content: '\e613';} +.xm-select-parent dl dd.xm-dis-disabled div i {border-color: #C2C2C2;} +.xm-select-parent dl dd.xm-dis-disabled.xm-select-this div i {color: #C2C2C2;} +.xm-select-radio div.xm-form-checkbox > i {border-radius: 20px;} +.xm-select-parent dl.xm-select-radio dd.xm-select-this div i:after{content: '\e62b';} + +.xm-dis-disabled,.xm-dis-disabled:hover {cursor: not-allowed!important} +.xm-form-select dl dd.xm-dis-disabled {background-color: #fff!important} +.xm-form-select dl dd.xm-dis-disabled span {color: #C2C2C2} +.xm-form-select dl dd.xm-dis-disabled .xm-icon-yes {border-color: #C2C2C2} +.xm-select-parent {position: relative;-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none} +.xm-select-parent .xm-select {line-height: normal;height: auto;padding: 4px 10px 1px 10px;overflow: hidden;min-height: 36px;left: 0;z-index: 99;position: absolute;background: 0 0;padding-right: 20px} +.xm-select-parent .xm-select:hover {border-color: #C0C4CC} +.xm-select-parent .xm-select .xm-select-label {display: inline-block;margin: 0;vertical-align: middle} +.xm-select-parent .xm-select-title div.xm-select-label>span {position: relative;padding: 2px 5px;background-color: #009688;border-radius: 2px;color: #FFF;display: inline-block;line-height: 18px;height: 18px;margin: 2px 5px 2px 0;cursor: initial;user-select: none;font-size: 14px;padding-right: 25px;-webkit-user-select: none;} +.xm-select-parent .xm-select-title div.xm-select-label>span i {position: absolute; margin-left: 8px; font-size: 12px; cursor: pointer; line-height: 20px;} +.xm-select-parent .xm-select .xm-select-input {border: none;height: 28px;background-color: transparent;padding: 0;vertical-align: middle;display: inline-block;width: 50px} +.xm-select-parent .xm-select--suffix input {border: none} +.xm-form-selected .xm-select,.xm-form-selected .xm-select:hover {border-color: #009688!important} +.xm-select--suffix+div {position: absolute;top: 0;left: 0;bottom: 0;right: 0} +.xm-select-dis .xm-select--suffix+div {z-index: 100;cursor: no-drop!important;opacity: .2;background-color: #FFF;} +.xm-select-disabled,.xm-select-disabled:hover {color: #d2d2d2!important;cursor: not-allowed!important;background-color: #fff} +.xm-select-none {display: none;margin: 5px 0;text-align: center;} +.xm-select-none:hover {background-color: #FFF!important} +.xm-select-empty {display: block} +.xm-span-hide {display: none!important;} +.layui-form-pane .xm-select,.layui-form-pane .xm-select:hover {border: none!important;top: 0px} +.layui-form-pane .xm-select-title {border: 1px solid #e6e6e6!important} +.xm-select-hide {display: none !important;} +div[xm-hg] .xm-select-label{white-space: nowrap; overflow: hidden; position: absolute; right: 30px; left: 0; padding-left: 10px;} + +/* 颜色相关 */ +div[xm-select-skin] .xm-select-title div.xm-select-label>span {border: 1px solid #009688} +div[xm-select-skin] .xm-select-title div.xm-select-label>span i:hover {opacity: .8;filter: alpha(opacity=80);cursor: pointer} +div[xm-select-skin=default] .xm-select-title div.xm-select-label>span {background-color: #F0F2F5;color: #909399;border: 1px solid #F0F2F5} +div[xm-select-skin=default] .xm-select-title div.xm-select-label>span i {color: #C0C4CC} +div[xm-select-skin=default] .xm-select-title div.xm-select-label>span i:before {content: '\e60b'; font-size: 16px; margin-left: -3px;} +div[xm-select-skin=default] dl dd:not(.xm-dis-disabled) i {border-color: #5FB878} +div[xm-select-skin=default] dl dd.xm-select-this:not(.xm-dis-disabled) i {color: #5FB878} +div[xm-select-skin=default].xm-form-selected .xm-select,div[xm-select-skin=default].xm-form-selected .xm-select:hover {border-color: #C0C4CC!important} +div[xm-select-skin=primary] .xm-select-title div.xm-select-label>span {background-color: #009688;color: #FFF;border: 1px solid #009688} +div[xm-select-skin=primary] .xm-select-title div.xm-select-label>span i {background-color: #009688; color: #FFF} +div[xm-select-skin=primary] dl dd:not(.xm-dis-disabled) i {border-color: #009688} +div[xm-select-skin=primary] dl dd.xm-select-this:not(.xm-dis-disabled) i {color: #009688} +div[xm-select-skin=primary].xm-form-selected .xm-select,div[xm-select-skin=primary].xm-form-selected .xm-select:hover {border-color: #009688!important} +div[xm-select-skin=normal] .xm-select-title div.xm-select-label>span {background-color: #1E9FFF;color: #FFF;border: 1px solid #1E9FFF} +div[xm-select-skin=normal] .xm-select-title div.xm-select-label>span i {background-color: #1E9FFF;color: #FFF} +div[xm-select-skin=normal] dl dd:not(.xm-dis-disabled) i {border-color: #1E9FFF} +div[xm-select-skin=normal] dl dd.xm-select-this:not(.xm-dis-disabled) i {color: #1E9FFF} +div[xm-select-skin=normal].xm-form-selected .xm-select,div[xm-select-skin=normal].xm-form-selected .xm-select:hover {border-color: #1E9FFF!important} +div[xm-select-skin=warm] .xm-select-title div.xm-select-label>span {background-color: #FFB800;color: #FFF;border: 1px solid #FFB800} +div[xm-select-skin=warm] .xm-select-title div.xm-select-label>span i {background-color: #FFB800;color: #FFF} +div[xm-select-skin=warm] dl dd:not(.xm-dis-disabled) i {border-color: #FFB800} +div[xm-select-skin=warm] dl dd.xm-select-this:not(.xm-dis-disabled) i {color: #FFB800} +div[xm-select-skin=warm].xm-form-selected .xm-select,div[xm-select-skin=warm].xm-form-selected .xm-select:hover {border-color: #FFB800!important} +div[xm-select-skin=danger] .xm-select-title div.xm-select-label>span {background-color: #FF5722;color: #FFF;border: 1px solid #FF5722} +div[xm-select-skin=danger] .xm-select-title div.xm-select-label>span i {background-color: #FF5722;color: #FFF} +div[xm-select-skin=danger] dl dd:not(.xm-dis-disabled) i {border-color: #FF5722} +div[xm-select-skin=danger] dl dd.xm-select-this:not(.xm-dis-disabled) i {color: #FF5722} +div[xm-select-skin=danger].xm-form-selected .xm-select,div[xm-select-skin=danger].xm-form-selected .xm-select:hover {border-color: #FF5722!important} + + +/* 多选联动 */ +.xm-select-parent .layui-form-danger+.xm-select-title .xm-select {border-color: #FF5722 !important;} +.xm-select-linkage li {padding: 10px 0px;cursor: pointer;} +.xm-select-linkage li span {padding-left: 20px;padding-right: 30px;display: inline-block;height: 20px;overflow: hidden;text-overflow: ellipsis;} +.xm-select-linkage li.xm-select-this span {border-left: 5px solid #009688;color: #009688;padding-left: 15px;} +.xm-select-linkage-group {position: absolute;left: 0;top: 0;right: 0;bottom: 0;overflow-x: hidden;overflow-y: auto;} +.xm-select-linkage-group li:hover {border-left: 1px solid #009688;} +.xm-select-linkage-group li:hover span {padding-left: 19px;} +.xm-select-linkage-group li.xm-select-this:hover span {padding-left: 15px;border-left-width: 4px;} +.xm-select-linkage-group:nth-child(4n+1){background-color: #EFEFEF; left: 0;} +.xm-select-linkage-group:nth-child(4n+1) li.xm-select-active{background-color: #F5F5F5;} +.xm-select-linkage-group:nth-child(4n+2){background-color: #F5F5F5; left: 100px;} +.xm-select-linkage-group:nth-child(4n+3) li.xm-select-active{background-color: #FAFAFA;} +.xm-select-linkage-group:nth-child(4n+3){background-color: #FAFAFA; left: 200px;} +.xm-select-linkage-group:nth-child(4n+3) li.xm-select-active{background-color: #FFFFFF;} +.xm-select-linkage-group:nth-child(4n+4){background-color: #FFFFFF; left: 300px;} +.xm-select-linkage-group:nth-child(4n+4) li.xm-select-active{background-color: #EFEFEF;} +.xm-select-linkage li{list-style: none;} +.xm-select-linkage-hide {display: none;} +.xm-select-linkage-show {display: block;} + +div[xm-select-skin='default'] .xm-select-linkage li.xm-select-this span {border-left-color: #5FB878;color: #5FB878;} +div[xm-select-skin='default'] .xm-select-linkage-group li:hover {border-left-color: #5FB878;} +div[xm-select-skin='primary'] .xm-select-linkage li.xm-select-this span {border-left-color: #1E9FFF;color: #1E9FFF;} +div[xm-select-skin='primary'] .xm-select-linkage-group li:hover {border-left-color: #1E9FFF;} +div[xm-select-skin='normal'] .xm-select-linkage li.xm-select-this span {border-left-color: #1E9FFF;color: #1E9FFF;} +div[xm-select-skin='normal'] .xm-select-linkage-group li:hover {border-left-color: #1E9FFF;} +div[xm-select-skin='warm'] .xm-select-linkage li.xm-select-this span {border-left-color: #FFB800;color: #FFB800;} +div[xm-select-skin='warm'] .xm-select-linkage-group li:hover {border-left-color: #FFB800;} +div[xm-select-skin='danger'] .xm-select-linkage li.xm-select-this span {border-left-color: #FF5722;color: #FF5722;} +div[xm-select-skin='danger'] .xm-select-linkage-group li:hover {border-left-color: #FF5722;} + + +/* 快捷操作 */ +.xm-select-tips[style]:hover{background-color: #FFF!important;} +.xm-select-parent dd > .xm-cz{position: absolute; top: 0px; right: 10px;} +.xm-select-parent dd > .xm-cz-group{margin-right: 30px; border-right: 2px solid #ddd; height: 16px; margin-top: 10px; line-height: 16px; overflow: hidden;} +.xm-select-parent dd > .xm-cz-group .xm-cz{display: inline-block; margin-right: 30px;} +.xm-select-parent dd > .xm-cz-group .xm-cz i{margin-right: 10px;} +.xm-select-parent dd > .xm-cz-group[show='name'] .xm-cz i{display: none;} +.xm-select-parent dd > .xm-cz-group[show='icon'] .xm-cz span{display: none;} +.xm-select-parent dd .xm-cz:hover{color: #009688;} +div[xm-select-skin='default'] dd .xm-cz:hover{color: #C0C4CC;} +div[xm-select-skin='primary'] dd .xm-cz:hover{color: #009688;} +div[xm-select-skin='normal'] dd .xm-cz:hover{color: #1E9FFF;} +div[xm-select-skin='warm'] dd .xm-cz:hover{color: #FFB800;} +div[xm-select-skin='danger'] dd .xm-cz:hover{color: #FF5722;} + + +/* 下拉里面的搜索 */ +.xm-select-tips .xm-input{border: none; border-bottom: 1px solid #E6E6E6; padding-left: 27px;} +.xm-select-tips .icon-sousuo{position: absolute;} +.xm-select-tips.xm-dl-input{display: none;} +div[xm-select-search-type="1"] .xm-select-tips.xm-dl-input{display: block;} +div[xm-select-search-type="1"] .xm-select .xm-select-input{display: none !important;} + +/* 阿里巴巴矢量图标库 */ +@font-face {font-family: "xm-iconfont"; + src: url('//at.alicdn.com/t/font_792691_qxv28s6g1l9.eot?t=1534240067831'); /* IE9*/ + src: url('//at.alicdn.com/t/font_792691_qxv28s6g1l9.eot?t=1534240067831#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAsYAAsAAAAAEQwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8ukovY21hcAAAAYAAAACrAAACPBtV6wxnbHlmAAACLAAABnEAAAmMovtEvWhlYWQAAAigAAAAMQAAADYSctBCaGhlYQAACNQAAAAgAAAAJAgBA69obXR4AAAI9AAAABsAAAAwMCX//WxvY2EAAAkQAAAAGgAAABoN8gwubWF4cAAACSwAAAAeAAAAIAEiAM9uYW1lAAAJTAAAAUUAAAJtPlT+fXBvc3QAAAqUAAAAhAAAALJ1LunfeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWacwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeMbwwZ27438AQw9zMcAQozAiSAwDk4AxmeJzlks0JwzAMhZ8bN/1xD4GU0h2Se26BbJMJOkkn6KmTPbJF8mT5UGg3qMRn0EPIRs8A9gAq0YsIhDcCLF5SQ9YrnLMe8VB9RSMlMjCxYcueIyfOy7CuAFHU7lP9iqApt5L3ksBJbzlgZ9PVkXDUvbWa6x8T/i0u+XyWKtmmHW0NDI55yeRok2DjaKdg65jX7Bzzm71jXnN08vzJkQvg7Ng/WAYH9Qb3wzM/AHicjVVvbFzFEd/Zfbv7/vn9uXf33vl8Pt/dO99BHOzEZ9/DKTImRS0KjUoLDUFCjtpCMGkT1D9qldQmhkiUSv2G1BBB1VYqilGREOIDViWEGzttqkpI/cAXqyL5gFRALVIF+VCJe9fZd+fEpR/o6d3s7G9mZ2dmZ3aJIKR3h0ZYmVgkIjGZJV8mDxECtenOTDOu1UU+hJoD+TCqzcNMk2V8O5OCbDVRPgZhEt4JCNTZ/4HA3+DfuWIxl8pcFFErG3K7oD7fvev8UaMUmEu259lrRjBsfs6cLhYbRfzSbSjGRVAkfQYihUXsyPkHTVyyZDNmXzSHg3Tl+aPKxpJFqbWGdtLl8w8iYDxuDTQIx7yc1YCdIx7Jk3HSwbwQwGBcyMKZVtG0ZCuJxjFJBb+foMSfhJaPOSr4FYgwSwqIx2MHJALtAdBi/7xcSMJL+fxmmBS2guD61tZm96X02mgcj0J1NAaIR9UMmhXIV24FuLUC71+r1AEmK1AYrQHUK/Tly/m8MrOZz2+FSf7jzc3NK9XR9F2lVq+gmRp0r+HK9B+VJmR263Rgd7ALwR/FOFfx/FeJS0YxQh9drakgMJhaBVizkwgqWxLD6eQ0Qo8f7p44fJziSH9x+PjLZUO+/jZ9+K35X37ljn/Rv+yW4Ziuf2nl4PfS5/LrP47OHTsFJULYjf369UZAEBmSqEOSJmG4Me6LeznA0BFkcDoJlGynVzmH2vY21DhPr25v9DjvbfTp2TXG1s5mlK0q4S7lT++6obbRox/s6CHF2LMEsHvoFfSFQIKnKQMZJVFCD6WH0p0PVvvcRx8uph8eUks0jOFNtskOkpDsJ18k9+NqVRg3qqMCSSerjyRuYUi1/vFH7YIqikGVcD+ehFl/pqPSPKZ6DG6mHisljFhBFvU/PoRkSNd/JHO6Ja5JOXcfwIGJbm/igBq/hn8Kfb57YbYUxyX4cwkLKH1u4gD9GVSL6USxCjjCO2p8VdcvH9XRYIQWqUblu3pR/v2BvXMAc3tTmJiDAQ895B9NL0C9BFdKqqRKczDX/Whg7O1irVbcqZ8/sbfYBOZwihC+6wSDzszUf+dF7rRO1O+fKaDO+nXOr6+vf8L5J44Qe4UvnlyRntwrxMoKzpFdeRJBNb9dGyiur1+nE59R+uwi9M1G395jb9KP0bcK2YM9nJB5cojcS75OFskxclzdc+pW699z8iYbtf14BGKf77ruZNyXKC0e50OEBI+V/Aug5Dex/9WjJfipuqnS00gfybjXbNe1f762tXmRPp3Bdl/l6g5JXyqXR0bK8J3PR+jvwYs8/GBnTM+kr8FX4ZknwC16XtG9iH9QfNn1vDHPe2GAj3ieV3XdF2+IPdeteh62Ra+HfQrsKWKSBtlHSOBgM7KkKQBLWnZoq1mVwotCLRGhOtSkMzMuqq2ml3SqUehdnZtynbtPLB88/Dy9dDrYVzoy/MTT6Svnlpd/AHueon5wpnGsEae/PZm+d3Jp6SSUTy7R3xw4f9/B5RN3O+5t3VNncjm6Cnt+uLx8DpedGj4yvD84HceNxTcG6ku4VPmZ9n6nNdj95BHyB3IJKxBPsKm6rpn4QopmqzlFm1MwqdxO5rPGnIc7aSfCGg1Vqyo6nUlQhnh7WiFhXzgGhVC4qjPRki9xdGCc4zXeSWb9BG1ktlqz2Q5Y7S2sIJfivkpVKCCDpyCWdbQzECj76qMVqvyJ/LxyI2rTv1bTC25lSM9xAUJ4Lc+U0wXTsKXDmaA8tHX+hvDt4Wa9IHLcMUBz9VwpL4xi2aGasAPPKNUbbmD/2jAtk0uXY4eJx8zRgj9iAnVNt5X+BL5vlHTOaiOmG7g6+7ZBNUOaefNXuJF3u25RjVvBLeW8E4wV7ZJBpbAXXGnqrwgupWVTAKqZjq5HbW44fMguNJhgwmw8oOk8GCqE8F3GhLB0uS/UDVt4lgjtqGxK/rpwuaDAqKHZNuWmJjVKuWUxbpg2B9DtoRdN3TKF9B0hw4p41C5i3CI9w4civP3aQLlmLMK3wpJpaI7BvmlhPtH3nPWCKQAdE2hK9zyuUeAm921qCA2kvqY8N1yDMq4beJlG+4XQqHDCQnqPlJIyyN579S4tIGcRv/82BbFfK9SgnVHkZzMeaSQjqR5/fP5XF2Chh+sW0g0gn27snqXv3/bsszsfJbCAIiTdjRTVCBL6jV0K5D8H/8xVAAAAeJxjYGRgYADi16c/vIvnt/nKwM3CAALXZxxzhtH///23YVFhbgZyORiYQKIAm34OJQAAAHicY2BkYGBu+N/AEMOi/P/f//8sKgxAERTAAwCmuAa3eJxjYWBgYAFhRiiNFf//z6L8/x+IDQAkCQRQAAAAAAAAjAEAATgBfgGaAiACbgMMA2AEhATGAAB4nGNgZGBg4GE4DMQgwATEXEDIwPAfzGcAAB2tAfIAAHicZY9NTsMwEIVf+gekEqqoYIfkBWIBKP0Rq25YVGr3XXTfpk6bKokjx63UA3AejsAJOALcgDvwSCebNpbH37x5Y08A3OAHHo7fLfeRPVwyO3INF7gXrlN/EG6QX4SbaONVuEX9TdjHM6bCbXRheYPXuGL2hHdhDx18CNdwjU/hOvUv4Qb5W7iJO/wKt9Dx6sI+5l5XuI1HL/bHVi+cXqnlQcWhySKTOb+CmV7vkoWt0uqca1vEJlODoF9JU51pW91T7NdD5yIVWZOqCas6SYzKrdnq0AUb5/JRrxeJHoQm5Vhj/rbGAo5xBYUlDowxQhhkiMro6DtVZvSvsUPCXntWPc3ndFsU1P9zhQEC9M9cU7qy0nk6T4E9XxtSdXQrbsuelDSRXs1JErJCXta2VELqATZlV44RelzRiT8oZ0j/AAlabsgAAAB4nG2L3QqCQBCFZ9RWU7sOfAeh8IFi3N10EHYUG1p8+gSjqz44F+cPEjgo4T81Jphihic0mGOBZyyxwhovUCxKIe4ylthRuDqV+I22UcLQ6+QH4ubWdZZkU3m4o/0tUqtSvT33TPLits12fzc+zhRcvoquo0o281OLhcMw7Q+AD8sULE0=') format('woff'), + url('//at.alicdn.com/t/font_792691_qxv28s6g1l9.ttf?t=1534240067831') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ + url('//at.alicdn.com/t/font_792691_qxv28s6g1l9.svg?t=1534240067831#iconfont') format('svg'); /* iOS 4.1- */ +} +.xm-iconfont {font-family:"xm-iconfont" !important; font-size:16px; font-style:normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;} +.icon-quanxuan:before { content: "\e62c"; } +.icon-caidan:before { content: "\e610"; } +.icon-fanxuan:before { content: "\e837"; } +.icon-pifu:before { content: "\e668"; } +.icon-qingkong:before { content: "\e63e"; } +.icon-sousuo:before { content: "\e600"; } +.icon-danx:before { content: "\e62b"; } +.icon-duox:before { content: "\e613"; } +.icon-close:before { content: "\e601"; } +.icon-expand:before { content: "\e641"; } + diff --git a/public/static/layui/plugin/formSelects/formSelects-v4.js b/public/static/layui/plugin/formSelects/formSelects-v4.js new file mode 100644 index 0000000..8792ca9 --- /dev/null +++ b/public/static/layui/plugin/formSelects/formSelects-v4.js @@ -0,0 +1,1791 @@ +'use strict'; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +/** + * name: formSelects + * 基于Layui Select多选 + * version: 4.0.0.0910 + * http://sun.faysunshine.com/layui/formSelects-v4/dist/formSelects-v4.js + */ +(function (layui, window, factory) { + if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object') { + // 支持 CommonJS + module.exports = factory(); + } else if (typeof define === 'function' && define.amd) { + // 支持 AMD + define(factory); + } else if (window.layui && layui.define) { + //layui加载 + layui.define(['jquery'], function (exports) { + exports('formSelects', factory()); + }); + } else { + window.formSelects = factory(); + } +})(typeof layui == 'undefined' ? null : layui, window, function () { + var v = '4.0.0.0910', + NAME = 'xm-select', + PNAME = 'xm-select-parent', + INPUT = 'xm-select-input', + TDIV = 'xm-select--suffix', + THIS = 'xm-select-this', + LABEL = 'xm-select-label', + SEARCH = 'xm-select-search', + SEARCH_TYPE = 'xm-select-search-type', + SHOW_COUNT = 'xm-select-show-count', + CREATE = 'xm-select-create', + CREATE_LONG = 'xm-select-create-long', + MAX = 'xm-select-max', + SKIN = 'xm-select-skin', + DIRECTION = "xm-select-direction", + HEIGHT = 'xm-select-height', + DISABLED = 'xm-dis-disabled', + DIS = 'xm-select-dis', + TEMP = 'xm-select-temp', + RADIO = 'xm-select-radio', + LINKAGE = 'xm-select-linkage', + DL = 'xm-select-dl', + DD_HIDE = 'xm-select-hide', + HIDE_INPUT = 'xm-hide-input', + SANJIAO = 'xm-select-sj', + ICON_CLOSE = 'xm-icon-close', + FORM_TITLE = 'xm-select-title', + FORM_SELECT = 'xm-form-select', + FORM_SELECTED = 'xm-form-selected', + FORM_NONE = 'xm-select-none', + FORM_EMPTY = 'xm-select-empty', + FORM_INPUT = 'xm-input', + FORM_DL_INPUT = 'xm-dl-input', + FORM_SELECT_TIPS = 'xm-select-tips', + CHECKBOX_YES = 'xm-iconfont', + FORM_TEAM_PID = 'XM_PID_VALUE', + CZ = 'xm-cz', + CZ_GROUP = 'xm-cz-group', + TIPS = '请选择', + data = {}, + events = { + on: {}, + endOn: {}, + filter: {}, + maxTips: {}, + opened: {}, + closed: {} + }, + ajax = { + type: 'get', + header: {}, + first: true, + data: {}, + searchUrl: '', + searchName: 'keyword', + searchVal: null, + keyName: 'name', + keyVal: 'value', + keySel: 'selected', + keyDis: 'disabled', + keyChildren: 'children', + dataType: '', + delay: 500, + beforeSuccess: null, + success: null, + error: null, + beforeSearch: null, + response: { + statusCode: 0, + statusName: 'code', + msgName: 'msg', + dataName: 'data' + }, + tree: { + nextClick: function nextClick(id, item, callback) { + callback([]); + }, + folderChoose: true, + lazy: true + } + }, + quickBtns = [{ icon: 'xm-iconfont icon-quanxuan', name: '全选', click: function click(id, cm) { + cm.selectAll(id, true, true); + } }, { icon: 'xm-iconfont icon-qingkong', name: '清空', click: function click(id, cm) { + cm.removeAll(id, true, true); + } }, { icon: 'xm-iconfont icon-fanxuan', name: '反选', click: function click(id, cm) { + cm.reverse(id, true, true); + } }, { icon: 'xm-iconfont icon-pifu', name: '换肤', click: function click(id, cm) { + cm.skin(id); + } }], + $ = window.$ || window.layui && window.layui.jquery, + $win = $(window), + ajaxs = {}, + fsConfig = {}, + fsConfigs = {}, + FormSelects = function FormSelects(options) { + var _this = this; + + this.config = { + name: null, //xm-select="xxx" + max: null, + maxTips: function maxTips(id, vals, val, max) { + var ipt = $('[xid="' + _this.config.name + '"]').prev().find('.' + NAME); + if (ipt.parents('.layui-form-item[pane]').length) { + ipt = ipt.parents('.layui-form-item[pane]'); + } + ipt.attr('style', 'border-color: red !important'); + setTimeout(function () { + ipt.removeAttr('style'); + }, 300); + }, + init: null, //初始化的选择值, + on: null, //select值发生变化 + opened: null, + closed: null, + filter: function filter(id, inputVal, val, isDisabled) { + return val.name.indexOf(inputVal) == -1; + }, + clearid: -1, + direction: 'auto', + height: null, + isEmpty: false, + btns: [quickBtns[0], quickBtns[1], quickBtns[2]], + searchType: 0, + create: function create(id, name) { + return Date.now(); + }, + template: function template(id, item) { + return item.name; + }, + showCount: 0, + isCreate: false, + placeholder: TIPS, + clearInput: false + }; + this.select = null; + this.values = []; + $.extend(this.config, options, { + searchUrl: options.isSearch ? options.searchUrl : null, + placeholder: options.optionsFirst ? options.optionsFirst.value ? TIPS : options.optionsFirst.innerHTML || TIPS : TIPS, + btns: options.radio ? [quickBtns[1]] : [quickBtns[0], quickBtns[1], quickBtns[2]] + }, fsConfigs[options.name] || fsConfig); + if (isNaN(this.config.showCount) || this.config.showCount <= 0) { + this.config.showCount = 19921012; + } + }; + + //一些简单的处理方法 + var Common = function Common() { + this.appender(); + this.on(); + this.onreset(); + }; + + Common.prototype.appender = function () { + //针对IE做的一些拓展 + //拓展Array map方法 + if (!Array.prototype.map) { + Array.prototype.map = function (i, h) { + var b, + a, + c, + e = Object(this), + f = e.length >>> 0;if (h) { + b = h; + }a = new Array(f);c = 0;while (c < f) { + var d, g;if (c in e) { + d = e[c];g = i.call(b, d, c, e);a[c] = g; + }c++; + }return a; + }; + }; + + //拓展Array foreach方法 + if (!Array.prototype.forEach) { + Array.prototype.forEach = function forEach(g, b) { + var d, c;if (this == null) { + throw new TypeError("this is null or not defined"); + }var f = Object(this);var a = f.length >>> 0;if (typeof g !== "function") { + throw new TypeError(g + " is not a function"); + }if (arguments.length > 1) { + d = b; + }c = 0;while (c < a) { + var e;if (c in f) { + e = f[c];g.call(d, e, c, f); + }c++; + } + }; + }; + + //拓展Array filter方法 + if (!Array.prototype.filter) { + Array.prototype.filter = function (b) { + if (this === void 0 || this === null) { + throw new TypeError(); + }var f = Object(this);var a = f.length >>> 0;if (typeof b !== "function") { + throw new TypeError(); + }var e = [];var d = arguments[1];for (var c = 0; c < a; c++) { + if (c in f) { + var g = f[c];if (b.call(d, g, c, f)) { + e.push(g); + } + } + }return e; + }; + }; + }; + + Common.prototype.init = function (target) { + var _this2 = this; + + //初始化页面上已有的select + $(target ? target : 'select[' + NAME + ']').each(function (index, select) { + var othis = $(select), + id = othis.attr(NAME), + hasLayuiRender = othis.next('.layui-form-select'), + hasRender = othis.next('.' + PNAME), + options = { + name: id, + disabled: select.disabled, + max: othis.attr(MAX) - 0, + isSearch: othis.attr(SEARCH) != undefined, + searchUrl: othis.attr(SEARCH), + isCreate: othis.attr(CREATE) != undefined, + radio: othis.attr(RADIO) != undefined, + skin: othis.attr(SKIN), + direction: othis.attr(DIRECTION), + optionsFirst: select.options[0], + height: othis.attr(HEIGHT), + formname: othis.attr('name') || othis.attr('_name'), + layverify: othis.attr('lay-verify') || othis.attr('_lay-verify'), + layverType: othis.attr('lay-verType'), + searchType: othis.attr(SEARCH_TYPE) == 'dl' ? 1 : 0, + showCount: othis.attr(SHOW_COUNT) - 0 + }, + value = othis.find('option[selected]').toArray().map(function (option) { + //获取已选中的数据 + return { + name: option.innerHTML, + value: option.value + }; + }), + fs = new FormSelects(options); + + fs.values = value; + + if (fs.config.init) { + fs.values = fs.config.init.map(function (item) { + if ((typeof item === 'undefined' ? 'undefined' : _typeof(item)) == 'object') { + return item; + } + return { + name: othis.find('option[value="' + item + '"]').text(), + value: item + }; + }).filter(function (item) { + return item.name; + }); + fs.config.init = fs.values.concat([]); + } else { + fs.config.init = value.concat([]); + } + + !fs.values && (fs.values = []); + + data[id] = fs; + + //先取消layui对select的渲染 + hasLayuiRender[0] && hasLayuiRender.remove(); + hasRender[0] && hasRender.remove(); + + //构造渲染div + var dinfo = _this2.renderSelect(id, fs.config.placeholder, select); + var heightStyle = !fs.config.height || fs.config.height == 'auto' ? '' : 'xm-hg style="height: 34px;"'; + var inputHtml = ['
    ', '', '
    ']; + var reElem = $('
    \n\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t' + inputHtml.join('') + '\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    ' + dinfo + '
    \n\t\t\t\t
    '); + + var $parent = $('
    '); + $parent.append(reElem); + othis.after($parent); + othis.attr('lay-ignore', ''); + othis.removeAttr('name') && othis.attr('_name', fs.config.formname); + othis.removeAttr('lay-verify') && othis.attr('_lay-verify', fs.config.layverify); + + //如果可搜索, 加上事件 + if (fs.config.isSearch) { + ajaxs[id] = $.extend({}, ajax, { searchUrl: fs.config.searchUrl }, ajaxs[id]); + $(document).on('input', 'div.' + PNAME + '[FS_ID="' + id + '"] .' + INPUT, function (e) { + _this2.search(id, e, fs.config.searchUrl); + }); + if (fs.config.searchUrl) { + //触发第一次请求事件 + _this2.triggerSearch(reElem, true); + } + } else { + //隐藏第二个dl + reElem.find('dl dd.' + FORM_DL_INPUT).css('display', 'none'); + } + }); + }; + + Common.prototype.search = function (id, e, searchUrl, call) { + var _this3 = this; + + var input = void 0; + if (call) { + input = call; + } else { + input = e.target; + var keyCode = e.keyCode; + if (keyCode === 9 || keyCode === 13 || keyCode === 37 || keyCode === 38 || keyCode === 39 || keyCode === 40) { + return false; + } + } + var inputValue = $.trim(input.value); + //过滤一下tips + this.changePlaceHolder($(input)); + + var ajaxConfig = ajaxs[id] ? ajaxs[id] : ajax; + searchUrl = ajaxConfig.searchUrl || searchUrl; + var fs = data[id], + isCreate = fs.config.isCreate, + reElem = $('dl[xid="' + id + '"]').parents('.' + FORM_SELECT); + //如果开启了远程搜索 + if (searchUrl) { + if (ajaxConfig.searchVal) { + inputValue = ajaxConfig.searchVal; + ajaxConfig.searchVal = ''; + } + if (!ajaxConfig.beforeSearch || ajaxConfig.beforeSearch && ajaxConfig.beforeSearch instanceof Function && ajaxConfig.beforeSearch(id, searchUrl, inputValue)) { + var delay = ajaxConfig.delay; + if (ajaxConfig.first) { + ajaxConfig.first = false; + delay = 10; + } + clearTimeout(fs.clearid); + fs.clearid = setTimeout(function () { + reElem.find('dl > *:not(.' + FORM_SELECT_TIPS + ')').remove(); + reElem.find('dd.' + FORM_NONE).addClass(FORM_EMPTY).text('请求中'); + _this3.ajax(id, searchUrl, inputValue, false, null, true); + }, delay); + } + } else { + reElem.find('dl .' + DD_HIDE).removeClass(DD_HIDE); + //遍历选项, 选择可以显示的值 + reElem.find('dl dd:not(.' + FORM_SELECT_TIPS + ')').each(function (idx, item) { + var _item = $(item); + var searchFun = events.filter[id] || data[id].config.filter; + if (searchFun && searchFun(id, inputValue, _this3.getItem(id, _item), _item.hasClass(DISABLED)) == true) { + _item.addClass(DD_HIDE); + } + }); + //控制分组名称 + reElem.find('dl dt').each(function (index, item) { + if (!$(item).nextUntil('dt', ':not(.' + DD_HIDE + ')').length) { + $(item).addClass(DD_HIDE); + } + }); + //动态创建 + this.create(id, isCreate, inputValue); + var shows = reElem.find('dl dd:not(.' + FORM_SELECT_TIPS + '):not(.' + DD_HIDE + ')'); + if (!shows.length) { + reElem.find('dd.' + FORM_NONE).addClass(FORM_EMPTY).text('无匹配项'); + } else { + reElem.find('dd.' + FORM_NONE).removeClass(FORM_EMPTY); + } + } + }; + + Common.prototype.isArray = function (obj) { + return Object.prototype.toString.call(obj) == "[object Array]"; + }; + + Common.prototype.triggerSearch = function (div, isCall) { + var _this4 = this; + + (div ? [div] : $('.' + FORM_SELECT).toArray()).forEach(function (reElem, index) { + reElem = $(reElem); + var id = reElem.find('dl').attr('xid'); + if (id && data[id] && data[id].config.isEmpty || isCall) { + _this4.search(id, null, null, data[id].config.searchType == 0 ? reElem.find('.' + LABEL + ' .' + INPUT) : reElem.find('dl .' + FORM_DL_INPUT + ' .' + INPUT)); + } + }); + }; + + Common.prototype.clearInput = function (id) { + var div = $('.' + PNAME + '[fs_id="' + id + '"]'); + var input = data[id].config.searchType == 0 ? div.find('.' + LABEL + ' .' + INPUT) : div.find('dl .' + FORM_DL_INPUT + ' .' + INPUT); + input.val(''); + }; + + Common.prototype.ajax = function (id, searchUrl, inputValue, isLinkage, linkageWidth, isSearch, successCallback, isReplace) { + var _this5 = this; + + var reElem = $('.' + PNAME + ' dl[xid="' + id + '"]').parents('.' + FORM_SELECT); + if (!reElem[0] || !searchUrl) { + return; + } + var ajaxConfig = ajaxs[id] ? ajaxs[id] : ajax; + var ajaxData = $.extend(true, {}, ajaxConfig.data); + ajaxData[ajaxConfig.searchName] = inputValue; + //是否需要对ajax添加随机时间 + //ajaxData['_'] = Date.now(); + $.ajax({ + type: ajaxConfig.type, + headers: ajaxConfig.header, + url: searchUrl, + data: ajaxConfig.dataType == 'json' ? JSON.stringify(ajaxData) : ajaxData, + success: function success(res) { + if (typeof res == 'string') { + res = JSON.parse(res); + } + ajaxConfig.beforeSuccess && ajaxConfig.beforeSuccess instanceof Function && (res = ajaxConfig.beforeSuccess(id, searchUrl, inputValue, res)); + if (_this5.isArray(res)) { + var newRes = {}; + newRes[ajaxConfig.response.statusName] = ajaxConfig.response.statusCode; + newRes[ajaxConfig.response.msgName] = ""; + newRes[ajaxConfig.response.dataName] = res; + res = newRes; + } + if (res[ajaxConfig.response.statusName] != ajaxConfig.response.statusCode) { + reElem.find('dd.' + FORM_NONE).addClass(FORM_EMPTY).text(res[ajaxConfig.response.msgName]); + } else { + reElem.find('dd.' + FORM_NONE).removeClass(FORM_EMPTY); + _this5.renderData(id, res[ajaxConfig.response.dataName], isLinkage, linkageWidth, isSearch, isReplace); + data[id].config.isEmpty = res[ajaxConfig.response.dataName].length == 0; + } + successCallback && successCallback(id); + ajaxConfig.success && ajaxConfig.success instanceof Function && ajaxConfig.success(id, searchUrl, inputValue, res); + }, + error: function error(err) { + reElem.find('dd[lay-value]:not(.' + FORM_SELECT_TIPS + ')').remove(); + reElem.find('dd.' + FORM_NONE).addClass(FORM_EMPTY).text('服务异常'); + ajaxConfig.error && ajaxConfig.error instanceof Function && ajaxConfig.error(id, searchUrl, inputValue, err); + } + }); + }; + + Common.prototype.renderData = function (id, dataArr, linkage, linkageWidth, isSearch, isReplace) { + var _this6 = this; + + if (linkage) { + //渲染多级联动 + this.renderLinkage(id, dataArr, linkageWidth); + return; + } + if (isReplace) { + this.renderReplace(id, dataArr); + return; + } + + var reElem = $('.' + PNAME + ' dl[xid="' + id + '"]').parents('.' + FORM_SELECT); + var ajaxConfig = ajaxs[id] ? ajaxs[id] : ajax; + var pcInput = reElem.find('.' + TDIV + ' input'); + + dataArr = this.exchangeData(id, dataArr); + var values = []; + reElem.find('dl').html(this.renderSelect(id, pcInput.attr('placeholder') || pcInput.attr('back'), dataArr.map(function (item) { + var itemVal = $.extend({}, item, { + innerHTML: item[ajaxConfig.keyName], + value: item[ajaxConfig.keyVal], + sel: item[ajaxConfig.keySel], + disabled: item[ajaxConfig.keyDis], + type: item.type, + name: item[ajaxConfig.keyName] + }); + if (itemVal.sel) { + values.push(itemVal); + } + return itemVal; + }))); + + var label = reElem.find('.' + LABEL); + var dl = reElem.find('dl[xid]'); + if (isSearch) { + //如果是远程搜索, 这里需要判重 + var oldVal = data[id].values; + oldVal.forEach(function (item, index) { + dl.find('dd[lay-value="' + item.value + '"]').addClass(THIS); + }); + values.forEach(function (item, index) { + if (_this6.indexOf(oldVal, item) == -1) { + _this6.addLabel(id, label, item); + dl.find('dd[lay-value="' + item.value + '"]').addClass(THIS); + oldVal.push(item); + } + }); + } else { + values.forEach(function (item, index) { + _this6.addLabel(id, label, item); + dl.find('dd[lay-value="' + item.value + '"]').addClass(THIS); + }); + data[id].values = values; + } + this.commonHandler(id, label); + }; + + Common.prototype.renderLinkage = function (id, dataArr, linkageWidth) { + var result = [], + index = 0, + temp = { "0": dataArr }, + ajaxConfig = ajaxs[id] ? ajaxs[id] : ajax; + db[id] = {}; + + var _loop = function _loop() { + var group = result[index++] = [], + _temp = temp; + temp = {}; + $.each(_temp, function (pid, arr) { + $.each(arr, function (idx, item) { + var val = { + pid: pid, + name: item[ajaxConfig.keyName], + value: item[ajaxConfig.keyVal] + }; + db[id][val.value] = $.extend(item, val); + group.push(val); + var children = item[ajaxConfig.keyChildren]; + if (children && children.length) { + temp[val.value] = children; + } + }); + }); + }; + + do { + _loop(); + } while (Object.getOwnPropertyNames(temp).length); + + var reElem = $('.' + PNAME + ' dl[xid="' + id + '"]').parents('.' + FORM_SELECT); + var html = ['
    ']; + + $.each(result, function (idx, arr) { + var groupDiv = ['
    ']; + $.each(arr, function (idx2, item) { + var span = '
  • ' + item.name + '
  • '; + groupDiv.push(span); + }); + groupDiv.push('
    '); + html = html.concat(groupDiv); + }); + html.push('
    '); + html.push('
    '); + reElem.find('dl').html(html.join('')); + reElem.find('.' + INPUT).css('display', 'none'); //联动暂时不支持搜索 + }; + + Common.prototype.renderReplace = function (id, dataArr) { + var _this7 = this; + + var dl = $('.' + PNAME + ' dl[xid="' + id + '"]'); + var ajaxConfig = ajaxs[id] ? ajaxs[id] : ajax; + + dataArr = this.exchangeData(id, dataArr); + db[id] = dataArr; + + var html = dataArr.map(function (item) { + var itemVal = $.extend({}, item, { + innerHTML: item[ajaxConfig.keyName], + value: item[ajaxConfig.keyVal], + sel: item[ajaxConfig.keySel], + disabled: item[ajaxConfig.keyDis], + type: item.type, + name: item[ajaxConfig.keyName] + }); + return _this7.createDD(id, itemVal); + }).join(''); + + dl.find('dd:not(.' + FORM_SELECT_TIPS + '),dt:not([style])').remove(); + dl.find('dt[style]').after($(html)); + }; + + Common.prototype.exchangeData = function (id, arr) { + //这里处理树形结构 + var ajaxConfig = ajaxs[id] ? ajaxs[id] : ajax; + var childrenName = ajaxConfig['keyChildren']; + var disabledName = ajaxConfig['keyDis']; + db[id] = {}; + var result = this.getChildrenList(arr, childrenName, disabledName, [], false); + return result; + }; + + Common.prototype.getChildrenList = function (arr, childrenName, disabledName, pid, disabled) { + var result = [], + offset = 0; + for (var a = 0; a < arr.length; a++) { + var item = arr[a]; + if (item.type && item.type == 'optgroup') { + result.push(item); + continue; + } else { + offset++; + } + var parentIds = pid.concat([]); + parentIds.push(offset - 1 + '_E'); + item[FORM_TEAM_PID] = JSON.stringify(parentIds); + item[disabledName] = item[disabledName] || disabled; + result.push(item); + var child = item[childrenName]; + if (child && common.isArray(child) && child.length) { + item['XM_TREE_FOLDER'] = true; + var pidArr = parentIds.concat([]); + var childResult = this.getChildrenList(child, childrenName, disabledName, pidArr, item[disabledName]); + result = result.concat(childResult); + } + } + return result; + }; + + Common.prototype.create = function (id, isCreate, inputValue) { + if (isCreate && inputValue) { + var fs = data[id], + dl = $('[xid="' + id + '"]'), + tips = dl.find('dd.' + FORM_SELECT_TIPS + '.' + FORM_DL_INPUT), + tdd = null, + temp = dl.find('dd.' + TEMP); + dl.find('dd:not(.' + FORM_SELECT_TIPS + '):not(.' + TEMP + ')').each(function (index, item) { + if (inputValue == $(item).find('span').attr('name')) { + tdd = item; + } + }); + if (!tdd) { + //如果不存在, 则创建 + var val = fs.config.create(id, inputValue); + if (temp[0]) { + temp.attr('lay-value', val); + temp.find('span').text(inputValue); + temp.find('span').attr("name", inputValue); + temp.removeClass(DD_HIDE); + } else { + tips.after($(this.createDD(id, { + name: inputValue, + innerHTML: inputValue, + value: val + }, TEMP + ' ' + CREATE_LONG))); + } + } + } else { + $('[xid=' + id + '] dd.' + TEMP).remove(); + } + }; + + Common.prototype.createDD = function (id, item, clz) { + var ajaxConfig = ajaxs[id] ? ajaxs[id] : ajax; + var name = $.trim(item.innerHTML); + db[id][item.value] = $(item).is('option') ? item = function () { + var resultItem = {}; + resultItem[ajaxConfig.keyName] = name; + resultItem[ajaxConfig.keyVal] = item.value; + resultItem[ajaxConfig.keyDis] = item.disabled; + return resultItem; + }() : item; + var template = data[id].config.template(id, item); + var pid = item[FORM_TEAM_PID]; + pid ? pid = JSON.parse(pid) : pid = [-1]; + var attr = pid[0] == -1 ? '' : 'tree-id="' + pid.join('-') + '" tree-folder="' + !!item['XM_TREE_FOLDER'] + '"'; + return '
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t' + template + '\n\t\t\t\t\t
    \n\t\t\t\t
    '; + }; + + Common.prototype.createQuickBtn = function (obj, right) { + return '
    ' + obj.name + '
    '; + }; + + Common.prototype.renderBtns = function (id, show, right) { + var _this8 = this; + + var quickBtn = []; + var dl = $('dl[xid="' + id + '"]'); + quickBtn.push('
    '); + $.each(data[id].config.btns, function (index, item) { + quickBtn.push(_this8.createQuickBtn(item, right)); + }); + quickBtn.push('
    '); + quickBtn.push(this.createQuickBtn({ icon: 'xm-iconfont icon-caidan', name: '' })); + return quickBtn.join(''); + }; + + Common.prototype.renderSelect = function (id, tips, select) { + var _this9 = this; + + db[id] = {}; + var arr = []; + if (data[id].config.btns.length) { + setTimeout(function () { + var dl = $('dl[xid="' + id + '"]'); + dl.parents('.' + FORM_SELECT).attr(SEARCH_TYPE, data[id].config.searchType); + dl.find('.' + CZ_GROUP).css('max-width', dl.prev().width() - 54 + 'px'); + }, 10); + arr.push(['
    ', this.renderBtns(id, null, '30px'), '
    ', '
    ', '', '', '
    '].join('')); + } else { + arr.push('
    ' + tips + '
    '); + } + if (this.isArray(select)) { + $(select).each(function (index, item) { + if (item) { + if (item.type && item.type === 'optgroup') { + arr.push('
    ' + item.name + '
    '); + } else { + arr.push(_this9.createDD(id, item)); + } + } + }); + } else { + $(select).find('*').each(function (index, item) { + if (item.tagName.toLowerCase() == 'option' && index == 0 && !item.value) { + return; + } + if (item.tagName.toLowerCase() === 'optgroup') { + arr.push('
    ' + item.label + '
    '); + } else { + arr.push(_this9.createDD(id, item)); + } + }); + } + arr.push('
    '); + arr.push('
    \u6CA1\u6709\u9009\u9879
    '); + return arr.join(''); + }; + + Common.prototype.on = function () { + var _this10 = this; + + //事件绑定 + this.one(); + + $(document).on('click', function (e) { + if (!$(e.target).parents('.' + FORM_TITLE)[0]) { + //清空input中的值 + $('.' + PNAME + ' dl .' + DD_HIDE).removeClass(DD_HIDE); + $('.' + PNAME + ' dl dd.' + FORM_EMPTY).removeClass(FORM_EMPTY); + $('.' + PNAME + ' dl dd.' + TEMP).remove(); + $.each(data, function (key, fs) { + _this10.clearInput(key); + if (!fs.values.length) { + _this10.changePlaceHolder($('div[FS_ID="' + key + '"] .' + LABEL)); + } + }); + } + $('.' + PNAME + ' .' + FORM_SELECTED).each(function (index, item) { + _this10.changeShow($(item).find('.' + FORM_TITLE), false); + }); + }); + }; + + Common.prototype.calcLabelLeft = function (label, w, call) { + var pos = this.getPosition(label[0]); + pos.y = pos.x + label[0].clientWidth; + var left = label[0].offsetLeft; + if (!label.find('span').length) { + left = 0; + } else if (call) { + //校正归位 + var span = label.find('span:last'); + span.css('display') == 'none' ? span = span.prev()[0] : span = span[0]; + var spos = this.getPosition(span); + spos.y = spos.x + span.clientWidth; + + if (spos.y > pos.y) { + left = left - (spos.y - pos.y) - 5; + } else { + left = 0; + } + } else { + if (w < 0) { + var _span = label.find(':last'); + _span.css('display') == 'none' ? _span = _span.prev()[0] : _span = _span[0]; + var _spos = this.getPosition(_span); + _spos.y = _spos.x + _span.clientWidth; + if (_spos.y > pos.y) { + left -= 10; + } + } else { + if (left < 0) { + left += 10; + } + if (left > 0) { + left = 0; + } + } + } + label.css('left', left + 'px'); + }; + + Common.prototype.one = function (target) { + var _this11 = this; + + //一次性事件绑定 + $(target ? target : document).off('click', '.' + FORM_TITLE).on('click', '.' + FORM_TITLE, function (e) { + var othis = $(e.target), + title = othis.is(FORM_TITLE) ? othis : othis.parents('.' + FORM_TITLE), + dl = title.next(), + id = dl.attr('xid'); + + //清空非本select的input val + $('dl[xid]').not(dl).each(function (index, item) { + _this11.clearInput($(item).attr('xid')); + }); + $('dl[xid]').not(dl).find('dd.' + DD_HIDE).removeClass(DD_HIDE); + + //如果是disabled select + if (title.hasClass(DIS)) { + return false; + } + //如果点击的是右边的三角或者只读的input + if (othis.is('.' + SANJIAO) || othis.is('.' + INPUT + '[readonly]')) { + _this11.changeShow(title, !title.parents('.' + FORM_SELECT).hasClass(FORM_SELECTED)); + return false; + } + //如果点击的是input的右边, focus一下 + if (title.find('.' + INPUT + ':not(readonly)')[0]) { + var input = title.find('.' + INPUT), + epos = { x: e.pageX, y: e.pageY }, + pos = _this11.getPosition(title[0]), + width = title.width(); + while (epos.x > pos.x) { + if ($(document.elementFromPoint(epos.x, epos.y)).is(input)) { + input.focus(); + _this11.changeShow(title, true); + return false; + } + epos.x -= 50; + } + } + + //如果点击的是可搜索的input + if (othis.is('.' + INPUT)) { + _this11.changeShow(title, true); + return false; + } + //如果点击的是x按钮 + if (othis.is('i[fsw="' + NAME + '"]')) { + var val = _this11.getItem(id, othis), + dd = dl.find('dd[lay-value=\'' + val.value + '\']'); + if (dd.hasClass(DISABLED)) { + //如果是disabled状态, 不可选, 不可删 + return false; + } + _this11.handlerLabel(id, dd, false, val); + return false; + } + + _this11.changeShow(title, !title.parents('.' + FORM_SELECT).hasClass(FORM_SELECTED)); + return false; + }); + $(target ? target : document).off('click', 'dl.' + DL).on('click', 'dl.' + DL, function (e) { + var othis = $(e.target); + if (othis.is('.' + LINKAGE) || othis.parents('.' + LINKAGE)[0]) { + //linkage的处理 + othis = othis.is('li') ? othis : othis.parents('li[xm-value]'); + var _group = othis.parents('.xm-select-linkage-group'), + _id = othis.parents('dl').attr('xid'); + if (!_id) { + return false; + } + //激活li + _group.find('.xm-select-active').removeClass('xm-select-active'); + othis.addClass('xm-select-active'); + //激活下一个group, 激活前显示对应数据 + _group.nextAll('.xm-select-linkage-group').addClass('xm-select-linkage-hide'); + var nextGroup = _group.next('.xm-select-linkage-group'); + nextGroup.find('li').addClass('xm-select-linkage-hide'); + nextGroup.find('li[pid="' + othis.attr('xm-value') + '"]').removeClass('xm-select-linkage-hide'); + //如果没有下一个group, 或没有对应的值 + if (!nextGroup[0] || nextGroup.find('li:not(.xm-select-linkage-hide)').length == 0) { + var vals = [], + index = 0, + isAdd = !othis.hasClass('xm-select-this'); + if (data[_id].config.radio) { + othis.parents('.xm-select-linkage').find('.xm-select-this').removeClass('xm-select-this'); + } + do { + vals[index++] = { + name: othis.find('span').text(), + value: othis.attr('xm-value') + }; + othis = othis.parents('.xm-select-linkage-group').prev().find('li[xm-value="' + othis.attr('pid') + '"]'); + } while (othis.length); + vals.reverse(); + var val = { + name: vals.map(function (item) { + return item.name; + }).join('/'), + value: vals.map(function (item) { + return item.value; + }).join('/') + }; + _this11.handlerLabel(_id, null, isAdd, val); + } else { + nextGroup.removeClass('xm-select-linkage-hide'); + } + return false; + } + + if (othis.is('dl')) { + return false; + } + + if (othis.is('dt')) { + othis.nextUntil('dt').each(function (index, item) { + item = $(item); + if (item.hasClass(DISABLED) || item.hasClass(THIS)) {} else { + item.find('i:not(.icon-expand)').click(); + } + }); + return false; + } + var dd = othis.is('dd') ? othis : othis.parents('dd'); + var id = dd.parent('dl').attr('xid'); + + if (dd.hasClass(DISABLED)) { + //被禁用选项的处理 + return false; + } + + //菜单功效 + if (othis.is('i.icon-caidan')) { + var opens = [], + closes = []; + othis.parents('dl').find('dd[tree-folder="true"]').each(function (index, item) { + $(item).attr('xm-tree-hidn') == undefined ? opens.push(item) : closes.push(item); + }); + var arr = closes.length ? closes : opens; + arr.forEach(function (item) { + return item.click(); + }); + return false; + } + //树状结构的选择 + var treeId = dd.attr('tree-id'); + if (treeId) { + //忽略右边的图标 + if (othis.is('i:not(.icon-expand)')) { + _this11.handlerLabel(id, dd, !dd.hasClass(THIS)); + return false; + } + var ajaxConfig = ajaxs[id] || ajax; + var treeConfig = ajaxConfig.tree; + var childrens = dd.nextAll('dd[tree-id^="' + treeId + '"]'); + if (childrens && childrens.length) { + var len = childrens[0].clientHeight; + len ? (_this11.addTreeHeight(dd, len), len = 0) : (len = dd.attr('xm-tree-hidn') || 36, dd.removeAttr('xm-tree-hidn'), dd.find('>i').remove(), childrens = childrens.filter(function (index, item) { + return $(item).attr('tree-id').split('-').length - 1 == treeId.split('-').length; + })); + childrens.animate({ + height: len + }, 150); + return false; + } else { + if (treeConfig.nextClick && treeConfig.nextClick instanceof Function) { + treeConfig.nextClick(id, _this11.getItem(id, dd), function (res) { + if (!res || !res.length) { + _this11.handlerLabel(id, dd, !dd.hasClass(THIS)); + } else { + dd.attr('tree-folder', 'true'); + var ddChilds = []; + res.forEach(function (item, idx) { + item.innerHTML = item[ajaxConfig.keyName]; + item[FORM_TEAM_PID] = JSON.stringify(treeId.split('-').concat([idx])); + ddChilds.push(_this11.createDD(id, item)); + db[id][item[ajaxConfig.keyVal]] = item; + }); + dd.after(ddChilds.join('')); + } + }); + return false; + } + } + } + + if (dd.hasClass(FORM_SELECT_TIPS)) { + //tips的处理 + var btn = othis.is('.' + CZ) ? othis : othis.parents('.' + CZ); + if (!btn[0]) { + return false; + } + var method = btn.attr('method'); + var obj = data[id].config.btns.filter(function (bean) { + return bean.name == method; + })[0]; + obj && obj.click && obj.click instanceof Function && obj.click(id, _this11); + return false; + } + _this11.handlerLabel(id, dd, !dd.hasClass(THIS)); + return false; + }); + }; + + Common.prototype.addTreeHeight = function (dd, len) { + var _this12 = this; + + var treeId = dd.attr('tree-id'); + var childrens = dd.nextAll('dd[tree-id^="' + treeId + '"]'); + if (childrens.length) { + dd.append(''); + dd.attr('xm-tree-hidn', len); + childrens.each(function (index, item) { + var that = $(item); + _this12.addTreeHeight(that, len); + }); + } + }; + + var db = {}; + Common.prototype.getItem = function (id, value) { + if (value instanceof $) { + if (value.is('i[fsw="' + NAME + '"]')) { + var span = value.parent(); + return db[id][value] || { + name: span.find('font').text(), + value: span.attr('value') + }; + } + var val = value.attr('lay-value'); + return !db[id][val] ? db[id][val] = { + name: value.find('span[name]').attr('name'), + value: val + } : db[id][val]; + } else if (typeof value == 'string' && value.indexOf('/') != -1) { + return db[id][value] || { + name: this.valToName(id, value), + value: value + }; + } + return db[id][value]; + }; + + Common.prototype.linkageAdd = function (id, val) { + var dl = $('dl[xid="' + id + '"]'); + dl.find('.xm-select-active').removeClass('xm-select-active'); + var vs = val.value.split('/'); + var pid = void 0, + li = void 0, + index = 0; + var lis = []; + do { + pid = vs[index]; + li = dl.find('.xm-select-linkage-group' + (index + 1) + ' li[xm-value="' + pid + '"]'); + li[0] && lis.push(li); + index++; + } while (li.length && pid != undefined); + if (lis.length == vs.length) { + $.each(lis, function (idx, item) { + item.addClass('xm-select-this'); + }); + } + }; + + Common.prototype.linkageDel = function (id, val) { + var dl = $('dl[xid="' + id + '"]'); + var vs = val.value.split('/'); + var pid = void 0, + li = void 0, + index = vs.length - 1; + do { + pid = vs[index]; + li = dl.find('.xm-select-linkage-group' + (index + 1) + ' li[xm-value="' + pid + '"]'); + if (!li.parent().next().find('li[pid=' + pid + '].xm-select-this').length) { + li.removeClass('xm-select-this'); + } + index--; + } while (li.length && pid != undefined); + }; + + Common.prototype.valToName = function (id, val) { + var dl = $('dl[xid="' + id + '"]'); + var vs = (val + "").split('/'); + if (!vs.length) { + return null; + } + var names = []; + $.each(vs, function (idx, item) { + var name = dl.find('.xm-select-linkage-group' + (idx + 1) + ' li[xm-value="' + item + '"] span').text(); + names.push(name); + }); + return names.length == vs.length ? names.join('/') : null; + }; + + Common.prototype.commonHandler = function (key, label) { + if (!label || !label[0]) { + return; + } + this.checkHideSpan(key, label); + //计算input的提示语 + this.changePlaceHolder(label); + //计算高度 + this.retop(label.parents('.' + FORM_SELECT)); + this.calcLabelLeft(label, 0, true); + //表单默认值 + this.setHidnVal(key, label); + //title值 + label.parents('.' + FORM_TITLE + ' .' + NAME).attr('title', data[key].values.map(function (val) { + return val.name; + }).join(',')); + }; + + Common.prototype.initVal = function (id) { + var _this13 = this; + + var target = {}; + if (id) { + target[id] = data[id]; + } else { + target = data; + } + $.each(target, function (key, val) { + var values = val.values, + div = $('dl[xid="' + key + '"]').parent(), + label = div.find('.' + LABEL), + dl = div.find('dl'); + dl.find('dd.' + THIS).removeClass(THIS); + + var _vals = values.concat([]); + _vals.concat([]).forEach(function (item, index) { + _this13.addLabel(key, label, item); + dl.find('dd[lay-value="' + item.value + '"]').addClass(THIS); + }); + if (val.config.radio) { + _vals.length && values.push(_vals[_vals.length - 1]); + } + _this13.commonHandler(key, label); + }); + }; + + Common.prototype.setHidnVal = function (key, label) { + if (!label || !label[0]) { + return; + } + label.parents('.' + PNAME).find('.' + HIDE_INPUT).val(data[key].values.map(function (val) { + return val.value; + }).join(',')); + }; + + Common.prototype.handlerLabel = function (id, dd, isAdd, oval, notOn) { + var div = $('[xid="' + id + '"]').prev().find('.' + LABEL), + val = dd && this.getItem(id, dd), + vals = data[id].values, + on = data[id].config.on || events.on[id], + endOn = data[id].config.endOn || events.endOn[id]; + if (oval) { + val = oval; + } + var fs = data[id]; + if (isAdd && fs.config.max && fs.values.length >= fs.config.max) { + var maxTipsFun = events.maxTips[id] || data[id].config.maxTips; + maxTipsFun && maxTipsFun(id, vals.concat([]), val, fs.config.max); + return; + } + if (!notOn) { + if (on && on instanceof Function && on(id, vals.concat([]), val, isAdd, dd && dd.hasClass(DISABLED)) == false) { + return; + } + } + var dl = $('dl[xid="' + id + '"]'); + isAdd ? (dd && dd[0] ? (dd.addClass(THIS), dd.removeClass(TEMP)) : dl.find('.xm-select-linkage')[0] && this.linkageAdd(id, val), this.addLabel(id, div, val), vals.push(val)) : (dd && dd[0] ? dd.removeClass(THIS) : dl.find('.xm-select-linkage')[0] && this.linkageDel(id, val), this.delLabel(id, div, val), this.remove(vals, val)); + if (!div[0]) return; + //单选选完后直接关闭选择域 + if (fs.config.radio) { + this.changeShow(div, false); + } + //移除表单验证的红色边框 + div.parents('.' + FORM_TITLE).prev().removeClass('layui-form-danger'); + + //清空搜索值 + fs.config.clearInput && this.clearInput(id); + + this.commonHandler(id, div); + + !notOn && endOn && endOn instanceof Function && endOn(id, vals.concat([]), val, isAdd, dd && dd.hasClass(DISABLED)); + }; + + Common.prototype.addLabel = function (id, div, val) { + if (!val) return; + var tips = 'fsw="' + NAME + '"'; + var _ref = [$('' + val.name + ''), $('')], + $label = _ref[0], + $close = _ref[1]; + + $label.append($close); + //如果是radio模式 + var fs = data[id]; + if (fs.config.radio) { + fs.values.length = 0; + $('dl[xid="' + id + '"]').find('dd.' + THIS + ':not([lay-value="' + val.value + '"])').removeClass(THIS); + div.find('span').remove(); + } + //如果是固定高度 + div.find('input').css('width', '50px'); + div.find('input').before($label); + }; + + Common.prototype.delLabel = function (id, div, val) { + if (!val) return; + div.find('span[value="' + val.value + '"]:first').remove(); + }; + + Common.prototype.checkHideSpan = function (id, div) { + var parentHeight = div.parents('.' + NAME)[0].offsetHeight + 5; + div.find('span.xm-span-hide').removeClass('xm-span-hide'); + div.find('span[style]').remove(); + + var count = data[id].config.showCount; + div.find('span').each(function (index, item) { + if (index >= count) { + $(item).addClass('xm-span-hide'); + } + }); + + var prefix = div.find('span:eq(' + count + ')'); + prefix[0] && prefix.before($(' + ' + (div.find('span').length - count) + '')); + }; + + Common.prototype.retop = function (div) { + //计算dl显示的位置 + var dl = div.find('dl'), + top = div.offset().top + div.outerHeight() + 5 - $win.scrollTop(), + dlHeight = dl.outerHeight(); + var up = div.hasClass('layui-form-selectup') || dl.css('top').indexOf('-') != -1 || top + dlHeight > $win.height() && top >= dlHeight; + div = div.find('.' + NAME); + + var fs = data[dl.attr('xid')]; + var base = dl.parents('.layui-form-pane')[0] && dl.prev()[0].clientHeight > 38 ? 14 : 10; + if (fs && fs.config.direction == 'up' || up) { + up = true; + if (fs && fs.config.direction == 'down') { + up = false; + } + } + var reHeight = div[0].offsetTop + div.height() + base; + if (up) { + dl.css({ + top: 'auto', + bottom: reHeight + 3 + 'px' + }); + } else { + dl.css({ + top: reHeight + 'px', + bottom: 'auto' + }); + } + }; + + Common.prototype.changeShow = function (children, isShow) { + //显示于隐藏 + $('.layui-form-selected').removeClass('layui-form-selected'); + var top = children.parents('.' + FORM_SELECT), + realShow = top.hasClass(FORM_SELECTED), + id = top.find('dl').attr('xid'); + $('.' + PNAME + ' .' + FORM_SELECT).not(top).removeClass(FORM_SELECTED); + if (isShow) { + this.retop(top); + top.addClass(FORM_SELECTED); + top.find('.' + INPUT).focus(); + if (!top.find('dl dd[lay-value]:not(.' + FORM_SELECT_TIPS + ')').length) { + top.find('dl .' + FORM_NONE).addClass(FORM_EMPTY); + } + } else { + top.removeClass(FORM_SELECTED); + this.clearInput(id); + top.find('dl .' + FORM_EMPTY).removeClass(FORM_EMPTY); + top.find('dl dd.' + DD_HIDE).removeClass(DD_HIDE); + top.find('dl dd.' + TEMP).remove(); + //计算ajax数据是否为空, 然后重新请求数据 + if (id && data[id] && data[id].config.isEmpty) { + this.triggerSearch(top); + } + this.changePlaceHolder(top.find('.' + LABEL)); + } + if (isShow != realShow) { + var openFun = data[id].config.opened || events.opened[id]; + isShow && openFun && openFun instanceof Function && openFun(id); + var closeFun = data[id].config.closed || events.closed[id]; + !isShow && closeFun && closeFun instanceof Function && closeFun(id); + } + }; + + Common.prototype.changePlaceHolder = function (div) { + //显示于隐藏提示语 + //调整pane模式下的高度 + var title = div.parents('.' + FORM_TITLE); + title[0] || (title = div.parents('dl').prev()); + if (!title[0]) { + return; + } + + var id = div.parents('.' + PNAME).find('dl[xid]').attr('xid'); + if (data[id] && data[id].config.height) {//既然固定高度了, 那就看着办吧 + + } else { + var height = title.find('.' + NAME)[0].clientHeight; + title.css('height', (height > 36 ? height + 4 : height) + 'px'); + //如果是layui pane模式, 处理label的高度 + var label = title.parents('.' + PNAME).parent().prev(); + if (label.is('.layui-form-label') && title.parents('.layui-form-pane')[0]) { + height = height > 36 ? height + 4 : height; + title.css('height', height + 'px'); + label.css({ + height: height + 2 + 'px', + lineHeight: height - 18 + 'px' + }); + } + } + + var input = title.find('.' + TDIV + ' input'), + isShow = !div.find('span:last')[0] && !title.find('.' + INPUT).val(); + if (isShow) { + var ph = input.attr('back'); + input.removeAttr('back'); + input.attr('placeholder', ph); + } else { + var _ph = input.attr('placeholder'); + input.removeAttr('placeholder'); + input.attr('back', _ph); + } + }; + + Common.prototype.indexOf = function (arr, val) { + for (var i = 0; i < arr.length; i++) { + if (arr[i].value == val || arr[i].value == (val ? val.value : val) || arr[i] == val || JSON.stringify(arr[i]) == JSON.stringify(val)) { + return i; + } + } + return -1; + }; + + Common.prototype.remove = function (arr, val) { + var idx = this.indexOf(arr, val ? val.value : val); + if (idx > -1) { + arr.splice(idx, 1); + return true; + } + return false; + }; + + Common.prototype.selectAll = function (id, isOn, skipDis) { + var _this14 = this; + + var dl = $('[xid="' + id + '"]'); + if (!dl[0]) { + return; + } + if (dl.find('.xm-select-linkage')[0]) { + return; + } + dl.find('dd[lay-value]:not(.' + FORM_SELECT_TIPS + '):not(.' + THIS + ')' + (skipDis ? ':not(.' + DISABLED + ')' : '')).each(function (index, item) { + item = $(item); + var val = _this14.getItem(id, item); + _this14.handlerLabel(id, dl.find('dd[lay-value="' + val.value + '"]'), true, val, !isOn); + }); + }; + + Common.prototype.removeAll = function (id, isOn, skipDis) { + var _this15 = this; + + var dl = $('[xid="' + id + '"]'); + if (!dl[0]) { + return; + } + if (dl.find('.xm-select-linkage')[0]) { + //针对多级联动的处理 + data[id].values.concat([]).forEach(function (item, idx) { + var vs = item.value.split('/'); + var pid = void 0, + li = void 0, + index = 0; + do { + pid = vs[index++]; + li = dl.find('.xm-select-linkage-group' + index + ':not(.xm-select-linkage-hide) li[xm-value="' + pid + '"]'); + li.click(); + } while (li.length && pid != undefined); + }); + return; + } + data[id].values.concat([]).forEach(function (item, index) { + if (skipDis && dl.find('dd[lay-value="' + item.value + '"]').hasClass(DISABLED)) {} else { + _this15.handlerLabel(id, dl.find('dd[lay-value="' + item.value + '"]'), false, item, !isOn); + } + }); + }; + + Common.prototype.reverse = function (id, isOn, skipDis) { + var _this16 = this; + + var dl = $('[xid="' + id + '"]'); + if (!dl[0]) { + return; + } + if (dl.find('.xm-select-linkage')[0]) { + return; + } + dl.find('dd[lay-value]:not(.' + FORM_SELECT_TIPS + ')' + (skipDis ? ':not(.' + DISABLED + ')' : '')).each(function (index, item) { + item = $(item); + var val = _this16.getItem(id, item); + _this16.handlerLabel(id, dl.find('dd[lay-value="' + val.value + '"]'), !item.hasClass(THIS), val, !isOn); + }); + }; + + Common.prototype.skin = function (id) { + var skins = ['default', 'primary', 'normal', 'warm', 'danger']; + var skin = skins[Math.floor(Math.random() * skins.length)]; + $('dl[xid="' + id + '"]').parents('.' + PNAME).find('.' + FORM_SELECT).attr('xm-select-skin', skin); + this.check(id) && this.commonHandler(id, $('dl[xid="' + id + '"]').parents('.' + PNAME).find('.' + LABEL)); + }; + + Common.prototype.getPosition = function (e) { + var x = 0, + y = 0; + while (e != null) { + x += e.offsetLeft; + y += e.offsetTop; + e = e.offsetParent; + } + return { x: x, y: y }; + }; + + Common.prototype.onreset = function () { + //监听reset按钮, 然后重置多选 + $(document).on('click', '[type=reset]', function (e) { + $(e.target).parents('form').find('.' + PNAME + ' dl[xid]').each(function (index, item) { + var id = item.getAttribute('xid'), + dl = $(item), + dd = void 0, + temp = {}; + common.removeAll(id); + data[id].config.init.forEach(function (val, idx) { + if (val && (!temp[val] || data[id].config.repeat) && (dd = dl.find('dd[lay-value="' + val.value + '"]'))[0]) { + common.handlerLabel(id, dd, true); + temp[val] = 1; + } + }); + }); + }); + }; + + Common.prototype.bindEvent = function (name, id, fun) { + if (id && id instanceof Function) { + fun = id; + id = null; + } + if (fun && fun instanceof Function) { + if (!id) { + $.each(data, function (id, val) { + data[id] ? data[id].config[name] = fun : events[name][id] = fun; + }); + } else { + data[id] ? (data[id].config[name] = fun, delete events[name][id]) : events[name][id] = fun; + } + } + }; + + Common.prototype.check = function (id, notAutoRender) { + if ($('dl[xid="' + id + '"]').length) { + return true; + } else if ($('select[xm-select="' + id + '"]').length) { + if (!notAutoRender) { + this.render(id, $('select[xm-select="' + id + '"]')); + return true; + } + } else { + delete data[id]; + return false; + } + }; + + Common.prototype.render = function (id, select) { + common.init(select); + common.one($('dl[xid="' + id + '"]').parents('.' + PNAME)); + common.initVal(id); + }; + + Common.prototype.log = function (obj) { + console.log(obj); + }; + + var Select4 = function Select4() { + this.v = v; + this.render(); + }; + var common = new Common(); + + Select4.prototype.value = function (id, type, isAppend) { + if (typeof id != 'string') { + return []; + } + var fs = data[id]; + if (!common.check(id)) { + return []; + } + if (typeof type == 'string' || type == undefined) { + var arr = fs.values.concat([]) || []; + if (type == 'val') { + return arr.map(function (val) { + return val.value; + }); + } + if (type == 'valStr') { + return arr.map(function (val) { + return val.value; + }).join(','); + } + if (type == 'name') { + return arr.map(function (val) { + return val.name; + }); + } + if (type == 'nameStr') { + return arr.map(function (val) { + return val.name; + }).join(','); + } + return arr; + } + if (common.isArray(type)) { + var dl = $('[xid="' + id + '"]'), + temp = {}, + dd = void 0, + isAdd = true; + if (isAppend == false) { + //删除传入的数组 + isAdd = false; + } else if (isAppend == true) { + //追加模式 + isAdd = true; + } else { + //删除原有的数据 + common.removeAll(id); + } + if (isAdd) { + fs.values.forEach(function (val, index) { + temp[val.value] = 1; + }); + } + type.forEach(function (val, index) { + if (val && (!temp[val] || fs.config.repeat)) { + if ((dd = dl.find('dd[lay-value="' + val + '"]'))[0]) { + common.handlerLabel(id, dd, isAdd, null, true); + temp[val] = 1; + } else { + var name = common.valToName(id, val); + if (name) { + common.handlerLabel(id, dd, isAdd, common.getItem(id, val), true); + temp[val] = 1; + } + } + } + }); + } + }; + + Select4.prototype.on = function (id, fun, isEnd) { + common.bindEvent(isEnd ? 'endOn' : 'on', id, fun); + return this; + }; + + Select4.prototype.filter = function (id, fun) { + common.bindEvent('filter', id, fun); + return this; + }; + + Select4.prototype.maxTips = function (id, fun) { + common.bindEvent('maxTips', id, fun); + return this; + }; + + Select4.prototype.opened = function (id, fun) { + common.bindEvent('opened', id, fun); + return this; + }; + + Select4.prototype.closed = function (id, fun) { + common.bindEvent('closed', id, fun); + return this; + }; + + Select4.prototype.config = function (id, config, isJson) { + if (id && (typeof id === 'undefined' ? 'undefined' : _typeof(id)) == 'object') { + isJson = config == true; + config = id; + id = null; + } + if (config && (typeof config === 'undefined' ? 'undefined' : _typeof(config)) == 'object') { + if (isJson) { + config.header || (config.header = {}); + config.header['Content-Type'] = 'application/json; charset=UTF-8'; + config.dataType = 'json'; + } + id ? (ajaxs[id] = $.extend(true, {}, ajaxs[id] || ajax, config), !common.check(id) && this.render(id), data[id] && config.direction && (data[id].config.direction = config.direction), data[id] && config.clearInput && (data[id].config.clearInput = true), config.searchUrl && data[id] && common.triggerSearch($('.' + PNAME + ' dl[xid="' + id + '"]').parents('.' + FORM_SELECT), true)) : ($.extend(true, ajax, config), $.each(ajaxs, function (key, item) { + $.extend(true, item, config); + })); + } + return this; + }; + + Select4.prototype.render = function (id, options) { + var _ref2; + + if (id && (typeof id === 'undefined' ? 'undefined' : _typeof(id)) == 'object') { + options = id; + id = null; + } + var config = options ? (_ref2 = { + init: options.init, + disabled: options.disabled, + max: options.max, + isSearch: options.isSearch, + searchUrl: options.searchUrl, + isCreate: options.isCreate, + radio: options.radio, + skin: options.skin, + direction: options.direction, + height: options.height, + formname: options.formname, + layverify: options.layverify, + layverType: options.layverType, + showCount: options.showCount, + placeholder: options.placeholder, + create: options.create, + filter: options.filter, + maxTips: options.maxTips, + on: options.on + }, _defineProperty(_ref2, 'on', options.on), _defineProperty(_ref2, 'opened', options.opened), _defineProperty(_ref2, 'closed', options.closed), _defineProperty(_ref2, 'template', options.template), _defineProperty(_ref2, 'clearInput', options.clearInput), _ref2) : {}; + + options && options.searchType != undefined && (config.searchType = options.searchType == 'dl' ? 1 : 0); + + if (id) { + fsConfigs[id] = {}; + $.extend(fsConfigs[id], data[id] ? data[id].config : {}, config); + } else { + $.extend(fsConfig, config); + } + + ($('select[' + NAME + '="' + id + '"]')[0] ? $('select[' + NAME + '="' + id + '"]') : $('select[' + NAME + ']')).each(function (index, select) { + var sid = select.getAttribute(NAME); + common.render(sid, select); + setTimeout(function () { + return common.setHidnVal(sid, $('select[xm-select="' + sid + '"] + div.' + PNAME + ' .' + LABEL)); + }, 10); + }); + return this; + }; + + Select4.prototype.disabled = function (id) { + var target = {}; + id ? common.check(id) && (target[id] = data[id]) : target = data; + + $.each(target, function (key, val) { + $('dl[xid="' + key + '"]').prev().addClass(DIS); + }); + return this; + }; + + Select4.prototype.undisabled = function (id) { + var target = {}; + id ? common.check(id) && (target[id] = data[id]) : target = data; + + $.each(target, function (key, val) { + $('dl[xid="' + key + '"]').prev().removeClass(DIS); + }); + return this; + }; + + Select4.prototype.data = function (id, type, config) { + if (!id || !type || !config) { + common.log('id: ' + id + ' param error !!!'); + return this; + } + if (!common.check(id)) { + common.log('id: ' + id + ' not render !!!'); + return this; + } + this.value(id, []); + this.config(id, config); + if (type == 'local') { + common.renderData(id, config.arr, config.linkage == true, config.linkageWidth ? config.linkageWidth : '100'); + } else if (type == 'server') { + common.ajax(id, config.url, config.keyword, config.linkage == true, config.linkageWidth ? config.linkageWidth : '100'); + } + return this; + }; + + Select4.prototype.btns = function (id, btns, config) { + if (id && common.isArray(id)) { + btns = id; + id = null; + } + if (!btns || !common.isArray(btns)) { + return this; + }; + var target = {}; + id ? common.check(id) && (target[id] = data[id]) : target = data; + + btns = btns.map(function (obj) { + if (typeof obj == 'string') { + if (obj == 'select') { + return quickBtns[0]; + } + if (obj == 'remove') { + return quickBtns[1]; + } + if (obj == 'reverse') { + return quickBtns[2]; + } + if (obj == 'skin') { + return quickBtns[3]; + } + } + return obj; + }); + + $.each(target, function (key, val) { + val.config.btns = btns; + var dd = $('dl[xid="' + key + '"]').find('.' + FORM_SELECT_TIPS + ':first'); + if (btns.length) { + var show = config && config.show && (config.show == 'name' || config.show == 'icon') ? config.show : ''; + var html = common.renderBtns(key, show, config && config.space ? config.space : '30px'); + dd.html(html); + } else { + var pcInput = dd.parents('.' + FORM_SELECT).find('.' + TDIV + ' input'); + var _html = pcInput.attr('placeholder') || pcInput.attr('back'); + dd.html(_html); + dd.removeAttr('style'); + } + }); + + return this; + }; + + Select4.prototype.search = function (id, val) { + if (id && common.check(id)) { + ajaxs[id] = $.extend(true, {}, ajaxs[id] || ajax, { + first: true, + searchVal: val + }); + common.triggerSearch($('dl[xid="' + id + '"]').parents('.' + FORM_SELECT), true); + } + return this; + }; + + Select4.prototype.replace = function (id, type, config) { + var _this17 = this; + + if (!id || !type || !config) { + common.log('id: ' + id + ' param error !!!'); + return this; + } + if (!common.check(id, true)) { + common.log('id: ' + id + ' not render !!!'); + return this; + } + var oldVals = this.value(id, 'val'); + this.value(id, []); + this.config(id, config); + if (type == 'local') { + common.renderData(id, config.arr, config.linkage == true, config.linkageWidth ? config.linkageWidth : '100', false, true); + this.value(id, oldVals, true); + } else if (type == 'server') { + common.ajax(id, config.url, config.keyword, config.linkage == true, config.linkageWidth ? config.linkageWidth : '100', false, function (id) { + _this17.value(id, oldVals, true); + }, true); + } + }; + + return new Select4(); +}); \ No newline at end of file diff --git a/public/static/layui/plugin/formSelects/formSelects-v4.min.js b/public/static/layui/plugin/formSelects/formSelects-v4.min.js new file mode 100644 index 0000000..7316855 --- /dev/null +++ b/public/static/layui/plugin/formSelects/formSelects-v4.min.js @@ -0,0 +1 @@ +"use strict";var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function _defineProperty(e,t,n){if(t in e){Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true})}else{e[t]=n}return e}(function(e,t,n){if((typeof exports==="undefined"?"undefined":_typeof(exports))==="object"){module.exports=n()}else if(typeof define==="function"&&define.amd){define(n)}else if(t.layui&&e.define){e.define(["jquery"],function(e){e("formSelects",n())})}else{t.formSelects=n()}})(typeof layui=="undefined"?null:layui,window,function(){var t="4.0.0.0910",v="xm-select",m="xm-select-parent",y="xm-select-input",g="xm-select--suffix",w="xm-select-this",x="xm-select-label",k="xm-select-search",b="xm-select-search-type",C="xm-select-show-count",S="xm-select-create",d="xm-select-create-long",T="xm-select-max",L="xm-select-skin",j="xm-select-direction",A="xm-select-height",E="xm-dis-disabled",N="xm-select-dis",p="xm-select-temp",D="xm-select-radio",H="xm-select-linkage",F="xm-select-dl",h="xm-select-hide",_="xm-hide-input",O="xm-select-sj",e="xm-icon-close",I="xm-select-title",P="xm-form-select",f="xm-form-selected",V="xm-select-none",U="xm-select-empty",M="xm-input",W="xm-dl-input",J="xm-select-tips",s="xm-iconfont",B="XM_PID_VALUE",R="xm-cz",l="xm-cz-group",n="请选择",q={},z={on:{},endOn:{},filter:{},maxTips:{},opened:{},closed:{}},X={type:"get",header:{},first:true,data:{},searchUrl:"",searchName:"keyword",searchVal:null,keyName:"name",keyVal:"value",keySel:"selected",keyDis:"disabled",keyChildren:"children",dataType:"",delay:500,beforeSuccess:null,success:null,error:null,beforeSearch:null,response:{statusCode:0,statusName:"code",msgName:"msg",dataName:"data"},tree:{nextClick:function e(t,n,i){i([])},folderChoose:true,lazy:true}},i=[{icon:"xm-iconfont icon-quanxuan",name:"全选",click:function e(t,n){n.selectAll(t,true,true)}},{icon:"xm-iconfont icon-qingkong",name:"清空",click:function e(t,n){n.removeAll(t,true,true)}},{icon:"xm-iconfont icon-fanxuan",name:"反选",click:function e(t,n){n.reverse(t,true,true)}},{icon:"xm-iconfont icon-pifu",name:"换肤",click:function e(t,n){n.skin(t)}}],Q=window.$||window.layui&&window.layui.jquery,c=Q(window),Y={},a={},r={},$=function e(t){var l=this;this.config={name:null,max:null,maxTips:function e(t,n,i,a){var r=Q('[xid="'+l.config.name+'"]').prev().find("."+v);if(r.parents(".layui-form-item[pane]").length){r=r.parents(".layui-form-item[pane]")}r.attr("style","border-color: red !important");setTimeout(function(){r.removeAttr("style")},300)},init:null,on:null,opened:null,closed:null,filter:function e(t,n,i,a){return i.name.indexOf(n)==-1},clearid:-1,direction:"auto",height:null,isEmpty:false,btns:[i[0],i[1],i[2]],searchType:0,create:function e(t,n){return Date.now()},template:function e(t,n){return n.name},showCount:0,isCreate:false,placeholder:n,clearInput:false};this.select=null;this.values=[];Q.extend(this.config,t,{searchUrl:t.isSearch?t.searchUrl:null,placeholder:t.optionsFirst?t.optionsFirst.value?n:t.optionsFirst.innerHTML||n:n,btns:t.radio?[i[1]]:[i[0],i[1],i[2]]},r[t.name]||a);if(isNaN(this.config.showCount)||this.config.showCount<=0){this.config.showCount=19921012}};var o=function e(){this.appender();this.on();this.onreset()};o.prototype.appender=function(){if(!Array.prototype.map){Array.prototype.map=function(e,t){var n,i,a,r=Object(this),l=r.length>>>0;if(t){n=t}i=new Array(l);a=0;while(a>>0;if(typeof t!=="function"){throw new TypeError(t+" is not a function")}if(arguments.length>1){i=n}a=0;while(a>>0;if(typeof e!=="function"){throw new TypeError}var i=[];var a=arguments[1];for(var r=0;r','',""];var u=Q('
    \n\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t"+f.join("")+'\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    '+d+"
    \n\t\t\t\t
    ");var p=Q('
    ');p.append(u);n.after(p);n.attr("lay-ignore","");n.removeAttr("name")&&n.attr("_name",s.config.formname);n.removeAttr("lay-verify")&&n.attr("_lay-verify",s.config.layverify);if(s.config.isSearch){Y[i]=Q.extend({},X,{searchUrl:s.config.searchUrl},Y[i]);Q(document).on("input","div."+m+'[FS_ID="'+i+'"] .'+y,function(e){h.search(i,e,s.config.searchUrl)});if(s.config.searchUrl){h.triggerSearch(u,true)}}else{u.find("dl dd."+W).css("display","none")}})};o.prototype.search=function(a,e,t,n){var r=this;var i=void 0;if(n){i=n}else{i=e.target;var l=e.keyCode;if(l===9||l===13||l===37||l===38||l===39||l===40){return false}}var o=Q.trim(i.value);this.changePlaceHolder(Q(i));var s=Y[a]?Y[a]:X;t=s.searchUrl||t;var d=q[a],c=d.config.isCreate,f=Q('dl[xid="'+a+'"]').parents("."+P);if(t){if(s.searchVal){o=s.searchVal;s.searchVal=""}if(!s.beforeSearch||s.beforeSearch&&s.beforeSearch instanceof Function&&s.beforeSearch(a,t,o)){var u=s.delay;if(s.first){s.first=false;u=10}clearTimeout(d.clearid);d.clearid=setTimeout(function(){f.find("dl > *:not(."+J+")").remove();f.find("dd."+V).addClass(U).text("请求中");r.ajax(a,t,o,false,null,true)},u)}}else{f.find("dl ."+h).removeClass(h);f.find("dl dd:not(."+J+")").each(function(e,t){var n=Q(t);var i=z.filter[a]||q[a].config.filter;if(i&&i(a,o,r.getItem(a,n),n.hasClass(E))==true){n.addClass(h)}});f.find("dl dt").each(function(e,t){if(!Q(t).nextUntil("dt",":not(."+h+")").length){Q(t).addClass(h)}});this.create(a,c,o);var p=f.find("dl dd:not(."+J+"):not(."+h+")");if(!p.length){f.find("dd."+V).addClass(U).text("无匹配项")}else{f.find("dd."+V).removeClass(U)}}};o.prototype.isArray=function(e){return Object.prototype.toString.call(e)=="[object Array]"};o.prototype.triggerSearch=function(e,i){var a=this;(e?[e]:Q("."+P).toArray()).forEach(function(e,t){e=Q(e);var n=e.find("dl").attr("xid");if(n&&q[n]&&q[n].config.isEmpty||i){a.search(n,null,null,q[n].config.searchType==0?e.find("."+x+" ."+y):e.find("dl ."+W+" ."+y))}})};o.prototype.clearInput=function(e){var t=Q("."+m+'[fs_id="'+e+'"]');var n=q[e].config.searchType==0?t.find("."+x+" ."+y):t.find("dl ."+W+" ."+y);n.val("")};o.prototype.ajax=function(i,a,r,l,o,s,d,c){var f=this;var u=Q("."+m+' dl[xid="'+i+'"]').parents("."+P);if(!u[0]||!a){return}var p=Y[i]?Y[i]:X;var e=Q.extend(true,{},p.data);e[p.searchName]=r;Q.ajax({type:p.type,headers:p.header,url:a,data:p.dataType=="json"?JSON.stringify(e):e,success:function e(t){if(typeof t=="string"){t=JSON.parse(t)}p.beforeSuccess&&p.beforeSuccess instanceof Function&&(t=p.beforeSuccess(i,a,r,t));if(f.isArray(t)){var n={};n[p.response.statusName]=p.response.statusCode;n[p.response.msgName]="";n[p.response.dataName]=t;t=n}if(t[p.response.statusName]!=p.response.statusCode){u.find("dd."+V).addClass(U).text(t[p.response.msgName])}else{u.find("dd."+V).removeClass(U);f.renderData(i,t[p.response.dataName],l,o,s,c);q[i].config.isEmpty=t[p.response.dataName].length==0}d&&d(i);p.success&&p.success instanceof Function&&p.success(i,a,r,t)},error:function e(t){u.find("dd[lay-value]:not(."+J+")").remove();u.find("dd."+V).addClass(U).text("服务异常");p.error&&p.error instanceof Function&&p.error(i,a,r,t)}})};o.prototype.renderData=function(n,e,t,i,a,r){var l=this;if(t){this.renderLinkage(n,e,i);return}if(r){this.renderReplace(n,e);return}var o=Q("."+m+' dl[xid="'+n+'"]').parents("."+P);var s=Y[n]?Y[n]:X;var d=o.find("."+g+" input");e=this.exchangeData(n,e);var c=[];o.find("dl").html(this.renderSelect(n,d.attr("placeholder")||d.attr("back"),e.map(function(e){var t=Q.extend({},e,{innerHTML:e[s.keyName],value:e[s.keyVal],sel:e[s.keySel],disabled:e[s.keyDis],type:e.type,name:e[s.keyName]});if(t.sel){c.push(t)}return t})));var f=o.find("."+x);var u=o.find("dl[xid]");if(a){var p=q[n].values;p.forEach(function(e,t){u.find('dd[lay-value="'+e.value+'"]').addClass(w)});c.forEach(function(e,t){if(l.indexOf(p,e)==-1){l.addLabel(n,f,e);u.find('dd[lay-value="'+e.value+'"]').addClass(w);p.push(e)}})}else{c.forEach(function(e,t){l.addLabel(n,f,e);u.find('dd[lay-value="'+e.value+'"]').addClass(w)});q[n].values=c}this.commonHandler(n,f)};o.prototype.renderLinkage=function(l,e,n){var i=[],a=0,o={0:e},s=Y[l]?Y[l]:X;G[l]={};var t=function e(){var r=i[a++]=[],t=o;o={};Q.each(t,function(a,e){Q.each(e,function(e,t){var n={pid:a,name:t[s.keyName],value:t[s.keyVal]};G[l][n.value]=Q.extend(t,n);r.push(n);var i=t[s.keyChildren];if(i&&i.length){o[n.value]=i}})})};do{t()}while(Object.getOwnPropertyNames(o).length);var r=Q("."+m+' dl[xid="'+l+'"]').parents("."+P);var d=['
    '];Q.each(i,function(e,t){var i=['
    '];Q.each(t,function(e,t){var n='
  • '+t.name+"
  • ";i.push(n)});i.push("
    ");d=d.concat(i)});d.push('
    ');d.push("
    ");r.find("dl").html(d.join(""));r.find("."+y).css("display","none")};o.prototype.renderReplace=function(n,e){var i=this;var t=Q("."+m+' dl[xid="'+n+'"]');var a=Y[n]?Y[n]:X;e=this.exchangeData(n,e);G[n]=e;var r=e.map(function(e){var t=Q.extend({},e,{innerHTML:e[a.keyName],value:e[a.keyVal],sel:e[a.keySel],disabled:e[a.keyDis],type:e.type,name:e[a.keyName]});return i.createDD(n,t)}).join("");t.find("dd:not(."+J+"),dt:not([style])").remove();t.find("dt[style]").after(Q(r))};o.prototype.exchangeData=function(e,t){var n=Y[e]?Y[e]:X;var i=n["keyChildren"];var a=n["keyDis"];G[e]={};var r=this.getChildrenList(t,i,a,[],false);return r};o.prototype.getChildrenList=function(e,t,n,i,a){var r=[],l=0;for(var o=0;o\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t'+r+"\n\t\t\t\t\t
    \n\t\t\t\t"};o.prototype.createQuickBtn=function(e,t){return'
    '+e.name+"
    "};o.prototype.renderBtns=function(e,t,n){var i=this;var a=[];var r=Q('dl[xid="'+e+'"]');a.push('
    ');Q.each(q[e].config.btns,function(e,t){a.push(i.createQuickBtn(t,n))});a.push("
    ");a.push(this.createQuickBtn({icon:"xm-iconfont icon-caidan",name:""}));return a.join("")};o.prototype.renderSelect=function(n,e,t){var i=this;G[n]={};var a=[];if(q[n].config.btns.length){setTimeout(function(){var e=Q('dl[xid="'+n+'"]');e.parents("."+P).attr(b,q[n].config.searchType);e.find("."+l).css("max-width",e.prev().width()-54+"px")},10);a.push(['
    ',this.renderBtns(n,null,"30px"),"
    ",'
    ','','',"
    "].join(""))}else{a.push('
    '+e+"
    ")}if(this.isArray(t)){Q(t).each(function(e,t){if(t){if(t.type&&t.type==="optgroup"){a.push("
    "+t.name+"
    ")}else{a.push(i.createDD(n,t))}}})}else{Q(t).find("*").each(function(e,t){if(t.tagName.toLowerCase()=="option"&&e==0&&!t.value){return}if(t.tagName.toLowerCase()==="optgroup"){a.push("
    "+t.label+"
    ")}else{a.push(i.createDD(n,t))}})}a.push('
    ');a.push('
    没有选项
    ');return a.join("")};o.prototype.on=function(){var n=this;this.one();Q(document).on("click",function(e){if(!Q(e.target).parents("."+I)[0]){Q("."+m+" dl ."+h).removeClass(h);Q("."+m+" dl dd."+U).removeClass(U);Q("."+m+" dl dd."+p).remove();Q.each(q,function(e,t){n.clearInput(e);if(!t.values.length){n.changePlaceHolder(Q('div[FS_ID="'+e+'"] .'+x))}})}Q("."+m+" ."+f).each(function(e,t){n.changeShow(Q(t).find("."+I),false)})})};o.prototype.calcLabelLeft=function(e,t,n){var i=this.getPosition(e[0]);i.y=i.x+e[0].clientWidth;var a=e[0].offsetLeft;if(!e.find("span").length){a=0}else if(n){var r=e.find("span:last");r.css("display")=="none"?r=r.prev()[0]:r=r[0];var l=this.getPosition(r);l.y=l.x+r.clientWidth;if(l.y>i.y){a=a-(l.y-i.y)-5}else{a=0}}else{if(t<0){var o=e.find(":last");o.css("display")=="none"?o=o.prev()[0]:o=o[0];var s=this.getPosition(o);s.y=s.x+o.clientWidth;if(s.y>i.y){a-=10}}else{if(a<0){a+=10}if(a>0){a=0}}}e.css("left",a+"px")};o.prototype.one=function(e){var C=this;Q(e?e:document).off("click","."+I).on("click","."+I,function(e){var t=Q(e.target),n=t.is(I)?t:t.parents("."+I),i=n.next(),a=i.attr("xid");Q("dl[xid]").not(i).each(function(e,t){C.clearInput(Q(t).attr("xid"))});Q("dl[xid]").not(i).find("dd."+h).removeClass(h);if(n.hasClass(N)){return false}if(t.is("."+O)||t.is("."+y+"[readonly]")){C.changeShow(n,!n.parents("."+P).hasClass(f));return false}if(n.find("."+y+":not(readonly)")[0]){var r=n.find("."+y),l={x:e.pageX,y:e.pageY},o=C.getPosition(n[0]),s=n.width();while(l.x>o.x){if(Q(document.elementFromPoint(l.x,l.y)).is(r)){r.focus();C.changeShow(n,true);return false}l.x-=50}}if(t.is("."+y)){C.changeShow(n,true);return false}if(t.is('i[fsw="'+v+'"]')){var d=C.getItem(a,t),c=i.find("dd[lay-value='"+d.value+"']");if(c.hasClass(E)){return false}C.handlerLabel(a,c,false,d);return false}C.changeShow(n,!n.parents("."+P).hasClass(f));return false});Q(e?e:document).off("click","dl."+F).on("click","dl."+F,function(e){var t=Q(e.target);if(t.is("."+H)||t.parents("."+H)[0]){t=t.is("li")?t:t.parents("li[xm-value]");var n=t.parents(".xm-select-linkage-group"),i=t.parents("dl").attr("xid");if(!i){return false}n.find(".xm-select-active").removeClass("xm-select-active");t.addClass("xm-select-active");n.nextAll(".xm-select-linkage-group").addClass("xm-select-linkage-hide");var a=n.next(".xm-select-linkage-group");a.find("li").addClass("xm-select-linkage-hide");a.find('li[pid="'+t.attr("xm-value")+'"]').removeClass("xm-select-linkage-hide");if(!a[0]||a.find("li:not(.xm-select-linkage-hide)").length==0){var r=[],l=0,o=!t.hasClass("xm-select-this");if(q[i].config.radio){t.parents(".xm-select-linkage").find(".xm-select-this").removeClass("xm-select-this")}do{r[l++]={name:t.find("span").text(),value:t.attr("xm-value")};t=t.parents(".xm-select-linkage-group").prev().find('li[xm-value="'+t.attr("pid")+'"]')}while(t.length);r.reverse();var s={name:r.map(function(e){return e.name}).join("/"),value:r.map(function(e){return e.value}).join("/")};C.handlerLabel(i,null,o,s)}else{a.removeClass("xm-select-linkage-hide")}return false}if(t.is("dl")){return false}if(t.is("dt")){t.nextUntil("dt").each(function(e,t){t=Q(t);if(t.hasClass(E)||t.hasClass(w)){}else{t.find("i:not(.icon-expand)").click()}});return false}var d=t.is("dd")?t:t.parents("dd");var c=d.parent("dl").attr("xid");if(d.hasClass(E)){return false}if(t.is("i.icon-caidan")){var f=[],u=[];t.parents("dl").find('dd[tree-folder="true"]').each(function(e,t){Q(t).attr("xm-tree-hidn")==undefined?f.push(t):u.push(t)});var p=u.length?u:f;p.forEach(function(e){return e.click()});return false}var h=d.attr("tree-id");if(h){if(t.is("i:not(.icon-expand)")){C.handlerLabel(c,d,!d.hasClass(w));return false}var v=Y[c]||X;var m=v.tree;var y=d.nextAll('dd[tree-id^="'+h+'"]');if(y&&y.length){var g=y[0].clientHeight;g?(C.addTreeHeight(d,g),g=0):(g=d.attr("xm-tree-hidn")||36,d.removeAttr("xm-tree-hidn"),d.find(">i").remove(),y=y.filter(function(e,t){return Q(t).attr("tree-id").split("-").length-1==h.split("-").length}));y.animate({height:g},150);return false}else{if(m.nextClick&&m.nextClick instanceof Function){m.nextClick(c,C.getItem(c,d),function(e){if(!e||!e.length){C.handlerLabel(c,d,!d.hasClass(w))}else{d.attr("tree-folder","true");var n=[];e.forEach(function(e,t){e.innerHTML=e[v.keyName];e[B]=JSON.stringify(h.split("-").concat([t]));n.push(C.createDD(c,e));G[c][e[v.keyVal]]=e});d.after(n.join(""))}});return false}}}if(d.hasClass(J)){var x=t.is("."+R)?t:t.parents("."+R);if(!x[0]){return false}var k=x.attr("method");var b=q[c].config.btns.filter(function(e){return e.name==k})[0];b&&b.click&&b.click instanceof Function&&b.click(c,C);return false}C.handlerLabel(c,d,!d.hasClass(w));return false})};o.prototype.addTreeHeight=function(e,i){var a=this;var t=e.attr("tree-id");var n=e.nextAll('dd[tree-id^="'+t+'"]');if(n.length){e.append('');e.attr("xm-tree-hidn",i);n.each(function(e,t){var n=Q(t);a.addTreeHeight(n,i)})}};var G={};o.prototype.getItem=function(e,t){if(t instanceof Q){if(t.is('i[fsw="'+v+'"]')){var n=t.parent();return G[e][t]||{name:n.find("font").text(),value:n.attr("value")}}var i=t.attr("lay-value");return!G[e][i]?G[e][i]={name:t.find("span[name]").attr("name"),value:i}:G[e][i]}else if(typeof t=="string"&&t.indexOf("/")!=-1){return G[e][t]||{name:this.valToName(e,t),value:t}}return G[e][t]};o.prototype.linkageAdd=function(e,t){var n=Q('dl[xid="'+e+'"]');n.find(".xm-select-active").removeClass("xm-select-active");var i=t.value.split("/");var a=void 0,r=void 0,l=0;var o=[];do{a=i[l];r=n.find(".xm-select-linkage-group"+(l+1)+' li[xm-value="'+a+'"]');r[0]&&o.push(r);l++}while(r.length&&a!=undefined);if(o.length==i.length){Q.each(o,function(e,t){t.addClass("xm-select-this")})}};o.prototype.linkageDel=function(e,t){var n=Q('dl[xid="'+e+'"]');var i=t.value.split("/");var a=void 0,r=void 0,l=i.length-1;do{a=i[l];r=n.find(".xm-select-linkage-group"+(l+1)+' li[xm-value="'+a+'"]');if(!r.parent().next().find("li[pid="+a+"].xm-select-this").length){r.removeClass("xm-select-this")}l--}while(r.length&&a!=undefined)};o.prototype.valToName=function(e,t){var i=Q('dl[xid="'+e+'"]');var n=(t+"").split("/");if(!n.length){return null}var a=[];Q.each(n,function(e,t){var n=i.find(".xm-select-linkage-group"+(e+1)+' li[xm-value="'+t+'"] span').text();a.push(n)});return a.length==n.length?a.join("/"):null};o.prototype.commonHandler=function(e,t){if(!t||!t[0]){return}this.checkHideSpan(e,t);this.changePlaceHolder(t);this.retop(t.parents("."+P));this.calcLabelLeft(t,0,true);this.setHidnVal(e,t);t.parents("."+I+" ."+v).attr("title",q[e].values.map(function(e){return e.name}).join(","))};o.prototype.initVal=function(e){var o=this;var t={};if(e){t[e]=q[e]}else{t=q}Q.each(t,function(n,e){var t=e.values,i=Q('dl[xid="'+n+'"]').parent(),a=i.find("."+x),r=i.find("dl");r.find("dd."+w).removeClass(w);var l=t.concat([]);l.concat([]).forEach(function(e,t){o.addLabel(n,a,e);r.find('dd[lay-value="'+e.value+'"]').addClass(w)});if(e.config.radio){l.length&&t.push(l[l.length-1])}o.commonHandler(n,a)})};o.prototype.setHidnVal=function(e,t){if(!t||!t[0]){return}t.parents("."+m).find("."+_).val(q[e].values.map(function(e){return e.value}).join(","))};o.prototype.handlerLabel=function(e,t,n,i,a){var r=Q('[xid="'+e+'"]').prev().find("."+x),l=t&&this.getItem(e,t),o=q[e].values,s=q[e].config.on||z.on[e],d=q[e].config.endOn||z.endOn[e];if(i){l=i}var c=q[e];if(n&&c.config.max&&c.values.length>=c.config.max){var f=z.maxTips[e]||q[e].config.maxTips;f&&f(e,o.concat([]),l,c.config.max);return}if(!a){if(s&&s instanceof Function&&s(e,o.concat([]),l,n,t&&t.hasClass(E))==false){return}}var u=Q('dl[xid="'+e+'"]');n?(t&&t[0]?(t.addClass(w),t.removeClass(p)):u.find(".xm-select-linkage")[0]&&this.linkageAdd(e,l),this.addLabel(e,r,l),o.push(l)):(t&&t[0]?t.removeClass(w):u.find(".xm-select-linkage")[0]&&this.linkageDel(e,l),this.delLabel(e,r,l),this.remove(o,l));if(!r[0])return;if(c.config.radio){this.changeShow(r,false)}r.parents("."+I).prev().removeClass("layui-form-danger");c.config.clearInput&&this.clearInput(e);this.commonHandler(e,r);!a&&d&&d instanceof Function&&d(e,o.concat([]),l,n,t&&t.hasClass(E))};o.prototype.addLabel=function(e,t,n){if(!n)return;var i='fsw="'+v+'"';var a=[Q(""+n.name+""),Q("')],r=a[0],l=a[1];r.append(l);var o=q[e];if(o.config.radio){o.values.length=0;Q('dl[xid="'+e+'"]').find("dd."+w+':not([lay-value="'+n.value+'"])').removeClass(w);t.find("span").remove()}t.find("input").css("width","50px");t.find("input").before(r)};o.prototype.delLabel=function(e,t,n){if(!n)return;t.find('span[value="'+n.value+'"]:first').remove()};o.prototype.checkHideSpan=function(e,t){var n=t.parents("."+v)[0].offsetHeight+5;t.find("span.xm-span-hide").removeClass("xm-span-hide");t.find("span[style]").remove();var i=q[e].config.showCount;t.find("span").each(function(e,t){if(e>=i){Q(t).addClass("xm-span-hide")}});var a=t.find("span:eq("+i+")");a[0]&&a.before(Q(' + '+(t.find("span").length-i)+""))};o.prototype.retop=function(e){var t=e.find("dl"),n=e.offset().top+e.outerHeight()+5-c.scrollTop(),i=t.outerHeight();var a=e.hasClass("layui-form-selectup")||t.css("top").indexOf("-")!=-1||n+i>c.height()&&n>=i;e=e.find("."+v);var r=q[t.attr("xid")];var l=t.parents(".layui-form-pane")[0]&&t.prev()[0].clientHeight>38?14:10;if(r&&r.config.direction=="up"||a){a=true;if(r&&r.config.direction=="down"){a=false}}var o=e[0].offsetTop+e.height()+l;if(a){t.css({top:"auto",bottom:o+3+"px"})}else{t.css({top:o+"px",bottom:"auto"})}};o.prototype.changeShow=function(e,t){Q(".layui-form-selected").removeClass("layui-form-selected");var n=e.parents("."+P),i=n.hasClass(f),a=n.find("dl").attr("xid");Q("."+m+" ."+P).not(n).removeClass(f);if(t){this.retop(n);n.addClass(f);n.find("."+y).focus();if(!n.find("dl dd[lay-value]:not(."+J+")").length){n.find("dl ."+V).addClass(U)}}else{n.removeClass(f);this.clearInput(a);n.find("dl ."+U).removeClass(U);n.find("dl dd."+h).removeClass(h);n.find("dl dd."+p).remove();if(a&&q[a]&&q[a].config.isEmpty){this.triggerSearch(n)}this.changePlaceHolder(n.find("."+x))}if(t!=i){var r=q[a].config.opened||z.opened[a];t&&r&&r instanceof Function&&r(a);var l=q[a].config.closed||z.closed[a];!t&&l&&l instanceof Function&&l(a)}};o.prototype.changePlaceHolder=function(e){var t=e.parents("."+I);t[0]||(t=e.parents("dl").prev());if(!t[0]){return}var n=e.parents("."+m).find("dl[xid]").attr("xid");if(q[n]&&q[n].config.height){}else{var i=t.find("."+v)[0].clientHeight;t.css("height",(i>36?i+4:i)+"px");var a=t.parents("."+m).parent().prev();if(a.is(".layui-form-label")&&t.parents(".layui-form-pane")[0]){i=i>36?i+4:i;t.css("height",i+"px");a.css({height:i+2+"px",lineHeight:i-18+"px"})}}var r=t.find("."+g+" input"),l=!e.find("span:last")[0]&&!t.find("."+y).val();if(l){var o=r.attr("back");r.removeAttr("back");r.attr("placeholder",o)}else{var s=r.attr("placeholder");r.removeAttr("placeholder");r.attr("back",s)}};o.prototype.indexOf=function(e,t){for(var n=0;n-1){e.splice(n,1);return true}return false};o.prototype.selectAll=function(i,a,e){var r=this;var l=Q('[xid="'+i+'"]');if(!l[0]){return}if(l.find(".xm-select-linkage")[0]){return}l.find("dd[lay-value]:not(."+J+"):not(."+w+")"+(e?":not(."+E+")":"")).each(function(e,t){t=Q(t);var n=r.getItem(i,t);r.handlerLabel(i,l.find('dd[lay-value="'+n.value+'"]'),true,n,!a)})};o.prototype.removeAll=function(n,i,a){var r=this;var l=Q('[xid="'+n+'"]');if(!l[0]){return}if(l.find(".xm-select-linkage")[0]){q[n].values.concat([]).forEach(function(e,t){var n=e.value.split("/");var i=void 0,a=void 0,r=0;do{i=n[r++];a=l.find(".xm-select-linkage-group"+r+':not(.xm-select-linkage-hide) li[xm-value="'+i+'"]');a.click()}while(a.length&&i!=undefined)});return}q[n].values.concat([]).forEach(function(e,t){if(a&&l.find('dd[lay-value="'+e.value+'"]').hasClass(E)){}else{r.handlerLabel(n,l.find('dd[lay-value="'+e.value+'"]'),false,e,!i)}})};o.prototype.reverse=function(i,a,e){var r=this;var l=Q('[xid="'+i+'"]');if(!l[0]){return}if(l.find(".xm-select-linkage")[0]){return}l.find("dd[lay-value]:not(."+J+")"+(e?":not(."+E+")":"")).each(function(e,t){t=Q(t);var n=r.getItem(i,t);r.handlerLabel(i,l.find('dd[lay-value="'+n.value+'"]'),!t.hasClass(w),n,!a)})};o.prototype.skin=function(e){var t=["default","primary","normal","warm","danger"];var n=t[Math.floor(Math.random()*t.length)];Q('dl[xid="'+e+'"]').parents("."+m).find("."+P).attr("xm-select-skin",n);this.check(e)&&this.commonHandler(e,Q('dl[xid="'+e+'"]').parents("."+m).find("."+x))};o.prototype.getPosition=function(e){var t=0,n=0;while(e!=null){t+=e.offsetLeft;n+=e.offsetTop;e=e.offsetParent}return{x:t,y:n}};o.prototype.onreset=function(){Q(document).on("click","[type=reset]",function(e){Q(e.target).parents("form").find("."+m+" dl[xid]").each(function(e,t){var n=t.getAttribute("xid"),i=Q(t),a=void 0,r={};K.removeAll(n);q[n].config.init.forEach(function(e,t){if(e&&(!r[e]||q[n].config.repeat)&&(a=i.find('dd[lay-value="'+e.value+'"]'))[0]){K.handlerLabel(n,a,true);r[e]=1}})})})};o.prototype.bindEvent=function(n,e,i){if(e&&e instanceof Function){i=e;e=null}if(i&&i instanceof Function){if(!e){Q.each(q,function(e,t){q[e]?q[e].config[n]=i:z[n][e]=i})}else{q[e]?(q[e].config[n]=i,delete z[n][e]):z[n][e]=i}}};o.prototype.check=function(e,t){if(Q('dl[xid="'+e+'"]').length){return true}else if(Q('select[xm-select="'+e+'"]').length){if(!t){this.render(e,Q('select[xm-select="'+e+'"]'));return true}}else{delete q[e];return false}};o.prototype.render=function(e,t){K.init(t);K.one(Q('dl[xid="'+e+'"]').parents("."+m));K.initVal(e)};o.prototype.log=function(e){console.log(e)};var u=function e(){this.v=t;this.render()};var K=new o;u.prototype.value=function(i,e,t){if(typeof i!="string"){return[]}var a=q[i];if(!K.check(i)){return[]}if(typeof e=="string"||e==undefined){var n=a.values.concat([])||[];if(e=="val"){return n.map(function(e){return e.value})}if(e=="valStr"){return n.map(function(e){return e.value}).join(",")}if(e=="name"){return n.map(function(e){return e.name})}if(e=="nameStr"){return n.map(function(e){return e.name}).join(",")}return n}if(K.isArray(e)){var r=Q('[xid="'+i+'"]'),l={},o=void 0,s=true;if(t==false){s=false}else if(t==true){s=true}else{K.removeAll(i)}if(s){a.values.forEach(function(e,t){l[e.value]=1})}e.forEach(function(e,t){if(e&&(!l[e]||a.config.repeat)){if((o=r.find('dd[lay-value="'+e+'"]'))[0]){K.handlerLabel(i,o,s,null,true);l[e]=1}else{var n=K.valToName(i,e);if(n){K.handlerLabel(i,o,s,K.getItem(i,e),true);l[e]=1}}}})}};u.prototype.on=function(e,t,n){K.bindEvent(n?"endOn":"on",e,t);return this};u.prototype.filter=function(e,t){K.bindEvent("filter",e,t);return this};u.prototype.maxTips=function(e,t){K.bindEvent("maxTips",e,t);return this};u.prototype.opened=function(e,t){K.bindEvent("opened",e,t);return this};u.prototype.closed=function(e,t){K.bindEvent("closed",e,t);return this};u.prototype.config=function(e,n,t){if(e&&(typeof e==="undefined"?"undefined":_typeof(e))=="object"){t=n==true;n=e;e=null}if(n&&(typeof n==="undefined"?"undefined":_typeof(n))=="object"){if(t){n.header||(n.header={});n.header["Content-Type"]="application/json; charset=UTF-8";n.dataType="json"}e?(Y[e]=Q.extend(true,{},Y[e]||X,n),!K.check(e)&&this.render(e),q[e]&&n.direction&&(q[e].config.direction=n.direction),q[e]&&n.clearInput&&(q[e].config.clearInput=true),n.searchUrl&&q[e]&&K.triggerSearch(Q("."+m+' dl[xid="'+e+'"]').parents("."+P),true)):(Q.extend(true,X,n),Q.each(Y,function(e,t){Q.extend(true,t,n)}))}return this};u.prototype.render=function(e,t){var n;if(e&&(typeof e==="undefined"?"undefined":_typeof(e))=="object"){t=e;e=null}var i=t?(n={init:t.init,disabled:t.disabled,max:t.max,isSearch:t.isSearch,searchUrl:t.searchUrl,isCreate:t.isCreate,radio:t.radio,skin:t.skin,direction:t.direction,height:t.height,formname:t.formname,layverify:t.layverify,layverType:t.layverType,showCount:t.showCount,placeholder:t.placeholder,create:t.create,filter:t.filter,maxTips:t.maxTips,on:t.on},_defineProperty(n,"on",t.on),_defineProperty(n,"opened",t.opened),_defineProperty(n,"closed",t.closed),_defineProperty(n,"template",t.template),_defineProperty(n,"clearInput",t.clearInput),n):{};t&&t.searchType!=undefined&&(i.searchType=t.searchType=="dl"?1:0);if(e){r[e]={};Q.extend(r[e],q[e]?q[e].config:{},i)}else{Q.extend(a,i)}(Q("select["+v+'="'+e+'"]')[0]?Q("select["+v+'="'+e+'"]'):Q("select["+v+"]")).each(function(e,t){var n=t.getAttribute(v);K.render(n,t);setTimeout(function(){return K.setHidnVal(n,Q('select[xm-select="'+n+'"] + div.'+m+" ."+x))},10)});return this};u.prototype.disabled=function(e){var t={};e?K.check(e)&&(t[e]=q[e]):t=q;Q.each(t,function(e,t){Q('dl[xid="'+e+'"]').prev().addClass(N)});return this};u.prototype.undisabled=function(e){var t={};e?K.check(e)&&(t[e]=q[e]):t=q;Q.each(t,function(e,t){Q('dl[xid="'+e+'"]').prev().removeClass(N)});return this};u.prototype.data=function(e,t,n){if(!e||!t||!n){K.log("id: "+e+" param error !!!");return this}if(!K.check(e)){K.log("id: "+e+" not render !!!");return this}this.value(e,[]);this.config(e,n);if(t=="local"){K.renderData(e,n.arr,n.linkage==true,n.linkageWidth?n.linkageWidth:"100")}else if(t=="server"){K.ajax(e,n.url,n.keyword,n.linkage==true,n.linkageWidth?n.linkageWidth:"100")}return this};u.prototype.btns=function(e,o,s){if(e&&K.isArray(e)){o=e;e=null}if(!o||!K.isArray(o)){return this}var t={};e?K.check(e)&&(t[e]=q[e]):t=q;o=o.map(function(e){if(typeof e=="string"){if(e=="select"){return i[0]}if(e=="remove"){return i[1]}if(e=="reverse"){return i[2]}if(e=="skin"){return i[3]}}return e});Q.each(t,function(e,t){t.config.btns=o;var n=Q('dl[xid="'+e+'"]').find("."+J+":first");if(o.length){var i=s&&s.show&&(s.show=="name"||s.show=="icon")?s.show:"";var a=K.renderBtns(e,i,s&&s.space?s.space:"30px");n.html(a)}else{var r=n.parents("."+P).find("."+g+" input");var l=r.attr("placeholder")||r.attr("back");n.html(l);n.removeAttr("style")}});return this};u.prototype.search=function(e,t){if(e&&K.check(e)){Y[e]=Q.extend(true,{},Y[e]||X,{first:true,searchVal:t});K.triggerSearch(Q('dl[xid="'+e+'"]').parents("."+P),true)}return this};u.prototype.replace=function(e,t,n){var i=this;if(!e||!t||!n){K.log("id: "+e+" param error !!!");return this}if(!K.check(e,true)){K.log("id: "+e+" not render !!!");return this}var a=this.value(e,"val");this.value(e,[]);this.config(e,n);if(t=="local"){K.renderData(e,n.arr,n.linkage==true,n.linkageWidth?n.linkageWidth:"100",false,true);this.value(e,a,true)}else if(t=="server"){K.ajax(e,n.url,n.keyword,n.linkage==true,n.linkageWidth?n.linkageWidth:"100",false,function(e){i.value(e,a,true)},true)}};return new u}); \ No newline at end of file diff --git a/public/static/home/js/module/gougucms.js b/public/static/layui/plugin/gougucms.js similarity index 88% rename from public/static/home/js/module/gougucms.js rename to public/static/layui/plugin/gougucms.js index fce09a4..9d9a82f 100644 --- a/public/static/home/js/module/gougucms.js +++ b/public/static/layui/plugin/gougucms.js @@ -99,13 +99,16 @@ layui.define(['element'], function(exports){ tab.tabRoll("left"); }) - //当点击有site-menu-active属性的标签时,即左侧菜单栏中内容 ,触发点击事件 - $('body').on('click', '.site-menu-active', function() { - var dataid = $(this); - var src=dataid.data("src"),id=dataid.data("id"),title=dataid.data("title"); + //当点击有menu-active属性的标签时,即左侧菜单栏中内容 ,触发点击事件 + $('body').on('click', 'a.menu-active', function() { + var that = $(this); + var src=that.data("src"),id=that.data("id"),title=that.data("title"); + if(src=='' || src=='/'){ + return false; + } //这时会判断右侧.layui-tab-title属性下的有lay-id属性的li的数目,即已经打开的tab项数目 $('.site-menu-active').removeClass('layui-this'); - dataid.addClass('layui-this'); + that.addClass('layui-this'); if ($(".layui-tab-title li[lay-id]").length <= 0) { //如果比零小,则直接打开新的tab项 tab.tabAdd(src, id,title); @@ -127,15 +130,6 @@ layui.define(['element'], function(exports){ } } }); - - //菜单点击操作 - $(document).ready(function(){ - $(".ittab-menulist-2").click(function(){ - $(this).next("div").slideToggle(200).siblings(".ittab-menulist-3:visible").stop(true, true).slideUp(200); - $(this).siblings(".ittab-menulist-2").find('i').removeClass("layui-icon-triangle-d"); - $(this).find('i').toggleClass("layui-icon-triangle-d"); - }); - }); //右上角刷新 @@ -172,7 +166,7 @@ layui.define(['element'], function(exports){ layer.tips('正在清理系统缓存...',this); that.attr('class','clearThis'); $.ajax({ - url:"/home/api/cache_clear", + url:"/api/index/cache_clear", success:function(res){ if(res.code == 1){ setTimeout(function(){ diff --git a/public/static/layui/plugin/rightpage.js b/public/static/layui/plugin/rightpage.js new file mode 100644 index 0000000..e4f8077 --- /dev/null +++ b/public/static/layui/plugin/rightpage.js @@ -0,0 +1,45 @@ +layui.define(['layer'], function(exports){ + var layer = layui.layer; + var obj = { + callback:null, + open: function (content='',width='88%',callback) { + if(callback && typeof callback === 'function'){ + this.callback = callback; + } + layer.open({ + type: 2, + title: '', + offset: ['0', '100%'], + skin: 'layui-anim layui-anim-rl layui-layer-admin-right', + closeBtn: 0, + content: content, + area: [width, '100%'], + success:function(obj,index){ + if($('#rightPopup'+index).length<1){ + var btn='
    关闭
    '; + obj.append(btn); + $('#rightPopup'+index).click(function(){ + let op_width = $('.layui-anim-rl').outerWidth(); + $('.layui-anim-rl').animate({left:'+='+op_width+'px'}, 200, 'linear', function () { + $('.layui-anim-rl').remove() + $('.layui-layer-shade').remove() + }) + }) + } + } + }) + }, + success:function(){ + $('.right-popup-close').click(); + var d = this; + setTimeout(function() { + d.timer = null; + d.callback && d.callback(); + }, 300) + }, + close: function(){ + $('.right-popup-close').click(); + } + }; + exports('rightpage', obj); +}); diff --git a/public/static/home/js/module/tagpicker.js b/public/static/layui/plugin/tagpicker.js similarity index 100% rename from public/static/home/js/module/tagpicker.js rename to public/static/layui/plugin/tagpicker.js diff --git a/public/static/home/js/module/treeGrid.all.js b/public/static/layui/plugin/treeGrid.all.js similarity index 100% rename from public/static/home/js/module/treeGrid.all.js rename to public/static/layui/plugin/treeGrid.all.js diff --git a/public/static/home/js/module/treeGrid.js b/public/static/layui/plugin/treeGrid.js similarity index 100% rename from public/static/home/js/module/treeGrid.js rename to public/static/layui/plugin/treeGrid.js