浏览代码

Merge remote-tracking branch 'origin/master'

sandm 1 年之前
父节点
当前提交
63f0d13a72

+ 1 - 1
app/admin/validate/User.php

@@ -20,7 +20,7 @@ class User extends Validate {
     protected $rule = [
         'account' => 'require|max:50|checkUnique:sys_user',
         'name' => 'require|max:50|regex:/^[\x{4e00}-\x{9fa5}\(\)()\da-zA-Z&]{2,50}$/u',
-        'type' => 'require|checkInSelect:type,1,2,3,4',
+        'type' => 'require|checkInSelect:type,1,2,3,4,5,6',
         'password' => 'require|min:8|regex:/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,}$/',
         're_password' => 'require|confirm:password',
         'phone' => 'require|mobile',

+ 2 - 0
app/admin/view/user/add.html

@@ -32,6 +32,8 @@
                                 <option value="">请选择</option>
                                 <option value="1">晋江市现代产业体系人才</option>
                                 <option value="2">集成电路优秀人才</option>
+                                <option value="5">卫健医院</option>
+                                <option value="6">高教学校</option>
                                 <option value="3">海峡计划申报</option>
                                 <option value="4">super</option>
                             </select>

+ 2 - 0
app/admin/view/user/edit.html

@@ -32,6 +32,8 @@
                                 <option value="">请选择</option>
                                 <option value="1">晋江市现代产业体系人才</option>
                                 <option value="2">集成电路优秀人才</option>
+                                <option value="5">卫健医院</option>
+                                <option value="6">高教学校</option>
                                 <option value="3">海峡计划申报</option>
                                 <option value="4">super</option>
                             </select>

+ 58 - 6
app/common/controller/Auth.php

@@ -16,6 +16,7 @@ use app\common\api\UploadApi;
 use app\enterprise\model\Talent;
 use app\common\api\TalentState;
 use think\facade\Db;
+use app\common\state\CommonConst;
 
 class Auth extends BaseController {
 
@@ -93,6 +94,9 @@ class Auth extends BaseController {
                 'verificationCode' => \StrUtil::getRequestDecodeParam($this->request, 'verificationCode'),
                 'legal' => \StrUtil::getRequestDecodeParam($this->request, 'legal'),
                 'street' => \StrUtil::getRequestDecodeParam($this->request, 'street'),
+                'province' => \StrUtil::getRequestDecodeParam($this->request, 'province'),
+                'city' => \StrUtil::getRequestDecodeParam($this->request, 'city'),
+                'county' => \StrUtil::getRequestDecodeParam($this->request, 'county'),
                 'address' => \StrUtil::getRequestDecodeParam($this->request, 'address'),
                 'type' => intval($this->request['type']),
                 'agencyType' => intval($this->request['agencyType']),
@@ -102,6 +106,8 @@ class Auth extends BaseController {
                 'enterpriseType' => \StrUtil::getRequestDecodeParam($this->request, 'enterpriseType'),
                 'agentEmail' => \StrUtil::getRequestDecodeParam($this->request, 'agentEmail'),
                 'ephone' => \StrUtil::getRequestDecodeParam($this->request, 'ephone'),
+                'medicalCommunityId' => \StrUtil::getRequestDecodeParam($this->request, 'medicalCommunityId'),
+                'isGeneral' => \StrUtil::getRequestDecodeParam($this->request, 'isGeneral'),
                 'industryFieldNew' => \StrUtil::getRequestDecodeParam($this->request, 'industryFieldNew'),
                 'industryFieldOld' => \StrUtil::getRequestDecodeParam($this->request, 'industryFieldOld'),
                 'bankCard' => \StrUtil::getRequestDecodeParam($this->request, 'bankCard'),
@@ -166,7 +172,7 @@ class Auth extends BaseController {
                         $data['special'] = 0;
                         break;
                     case 'minfei':
-                        $data['type'] = 1;
+                        $data['type'] = CommonConst::ENTERPRISE_NORMAL;
                         $registerTimeLimitReturnObj = $this->checkRegisterTime(3, $data['organizationTag']);
                         if ($registerTimeLimitReturnObj !== true)
                             return \StrUtil::back($registerTimeLimitReturnObj, "Register.epCallBack");
@@ -188,7 +194,7 @@ class Auth extends BaseController {
                         $data['special'] = 3;
                         break;
                     case 'shiye':
-                        $data['type'] = 1;
+                        $data['type'] = CommonConst::ENTERPRISE_NORMAL;
                         validate(Enterprise::class)->batch(true)->scene('sy_add')->check($data); //事业单位
                         $registerTimeLimitReturnObj = $this->checkRegisterTime(1, $data['institutionTag']);
                         if ($registerTimeLimitReturnObj !== true)
@@ -200,6 +206,34 @@ class Auth extends BaseController {
                         }
                         $data['special'] = 1;
                         break;
+                    case "weijian":
+                        $data["type"] = CommonConst::ENTERPRISE_WJ; //卫健
+                        validate(\app\common\validate\Hospital::class)->batch(true)->scene('add')->check($data);
+                        if (!array_key_exists('imgurl', $files) || $files['imgurl'] == '') {
+                            $response_object->code = 500;
+                            $response_object->msg = '请上传医疗机构执业许可证';
+                            return \StrUtil::back($response_object, "Register.epCallBack");
+                        }
+                        if (!array_key_exists('beian', $files) || $files['beian'] == '') {
+                            $response_object->code = 500;
+                            $response_object->msg = '请上传人才联络员备案表';
+                            return \StrUtil::back($response_object, "Register.epCallBack");
+                        }
+                        break;
+                    case "gaojiao":
+                        $data["type"] = CommonConst::ENTERPRISE_GJ; //高教
+                        validate(\app\common\validate\School::class)->batch(true)->scene('add')->check($data);
+                        if (!array_key_exists('imgurl', $files) || $files['imgurl'] == '') {
+                            $response_object->code = 500;
+                            $response_object->msg = '请上传办学许可证、法人证书或登记证书';
+                            return \StrUtil::back($response_object, "Register.epCallBack");
+                        }
+                        if (!array_key_exists('beian', $files) || $files['beian'] == '') {
+                            $response_object->code = 500;
+                            $response_object->msg = '请上传人才联络员备案表不能为空';
+                            return \StrUtil::back($response_object, "Register.epCallBack");
+                        }
+                        break;
                 }
 
                 //检验验证码
@@ -314,7 +348,8 @@ class Auth extends BaseController {
                 return \StrUtil::back($response_object, "Register.epCallBack");
             }
         }
-        return view("", ["msg" => $msg]);
+        $medicalCommunities = Db::table("nhc_medical_community")->where("status", 1)->order("num asc,createTime asc")->select()->toArray();
+        return view("", ["msg" => $msg, "medicalCommunities" => $medicalCommunities]);
     }
 
     public function enterprise_edit() {
@@ -332,6 +367,9 @@ class Auth extends BaseController {
                 'agentName' => \StrUtil::getRequestDecodeParam($this->request, 'agentName'), //人才联络员
                 'legal' => \StrUtil::getRequestDecodeParam($this->request, 'legal'), //法人
                 'street' => \StrUtil::getRequestDecodeParam($this->request, 'street'), //镇街
+                'province' => \StrUtil::getRequestDecodeParam($this->request, 'province'), //省
+                'city' => \StrUtil::getRequestDecodeParam($this->request, 'city'), //市
+                'county' => \StrUtil::getRequestDecodeParam($this->request, 'county'), //县
                 'address' => \StrUtil::getRequestDecodeParam($this->request, 'address'), //地址
                 'type' => intval($this->request['type']),
                 'agencyType' => intval($this->request['agencyType']),
@@ -342,6 +380,8 @@ class Auth extends BaseController {
                 'agentPhone' => \StrUtil::getRequestDecodeParam($this->request, 'agentPhone'), //手机
                 'agentEmail' => \StrUtil::getRequestDecodeParam($this->request, 'agentEmail'), //邮箱
                 'ephone' => \StrUtil::getRequestDecodeParam($this->request, 'ephone'), //单位电话
+                'medicalCommunityId' => \StrUtil::getRequestDecodeParam($this->request, 'medicalCommunityId'), //卫健专属:医共体
+                'isGeneral' => \StrUtil::getRequestDecodeParam($this->request, 'isGeneral'), //卫健专属:是否总院
                 'industryFieldNew' => \StrUtil::getRequestDecodeParam($this->request, 'industryFieldNew'), //产业领域
                 'industryFieldOld' => \StrUtil::getRequestDecodeParam($this->request, 'industryFieldOld'), //行业领域
                 'bankCard' => \StrUtil::getRequestDecodeParam($this->request, 'bankCard'), //银行
@@ -412,7 +452,8 @@ class Auth extends BaseController {
                 }
                 $data['id'] = $ep->id;
                 if ($ep->special == 0) {
-                    if ($data["type"] == 1) {
+                    $idCardName = "营业执照";
+                    if ($data["type"] == CommonConst::ENTERPRISE_NORMAL) {
                         if ($data["agencyType"] == 1) {
                             validate(\app\common\validate\Enterprise::class)->batch(true)->scene('change')->check($data);
                             if (!$data["domainImg"] && !$ep->domainImg) {
@@ -434,12 +475,23 @@ class Auth extends BaseController {
                             $response_object->msg = '开户许可证/基本存款账户信息不能为空';
                             return \StrUtil::back($response_object, "Register.epCallBack");
                         }
-                    } else {
+                    } else if ($data["type"] == CommonConst::ENTERPRISE_JC) {
+                        //集成电路
                         validate(\app\common\validate\Enterprise::class)->batch(true)->scene('jc_change')->check($data);
+                    } else if ($data["type"] == CommonConst::ENTERPRISE_WJ) {
+                        //卫健医院
+                        validate(\app\common\validate\Hospital::class)->batch(true)->scene('change')->check($data);
+                        $idCardName = "医疗机构执业许可证";
+                    } else if ($data["type"] == CommonConst::ENTERPRISE_GJ) {
+                        //高教学校
+                        validate(\app\common\validate\School::class)->batch(true)->scene('change')->check($data);
+                        $idCardName = "办学许可证、法人证书或登记证书";
+                    } else {
+                        throw new ValidateException("未知注册类型");
                     }
                     if (!$data["imgurl"] && !$ep->imgurl) {
                         $response_object->code = 500;
-                        $response_object->msg = '营业执照不能为空';
+                        $response_object->msg = $idCardName . '不能为空';
                         return \StrUtil::back($response_object, "Register.epCallBack");
                     }
                     if (!$data["beian"] && !$ep->beian) {

+ 4 - 0
app/common/state/CommonConst.php

@@ -24,6 +24,10 @@ class CommonConst {
     const ZRZYJ = "zrzyj";     //自然资源局
     const visit = "visitGroup";     //走访核查小组
     const JYJ = "jyj";         //教育局
+    const ENTERPRISE_NORMAL = 1; //通常企业
+    const ENTERPRISE_JC = 2; //电路企业
+    const ENTERPRISE_WJ = 5; //卫健医院
+    const ENTERPRISE_GJ = 6; //高教学校
 
     /**
      * 晋江市优秀人才津补贴审核单位 

+ 71 - 0
app/common/validate/Hospital.php

@@ -0,0 +1,71 @@
+<?php
+
+namespace app\common\validate;
+
+use think\Validate;
+use app\admin\model\Enterprise as EnterpriseModel;
+
+class Hospital extends Validate {
+
+    protected $rule = [
+        'username' => 'require|max:50|unique:un_enterprise',
+        'password' => 'require|min:8|regex:/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,}$/',
+        're_password' => 'require|confirm:password',
+        'name' => 'require|max:100|checkName', //|regex:/^[\x{4e00}-\x{9fa5}\(\)()\da-zA-Z&]{2,50}$/u
+        'idCard' => 'require',
+        'legal' => 'require', //|regex:/^[\x{4e00}-\x{9fa5}]+$/u
+        'ephone' => 'require',
+        'medicalCommunityId' => 'require',
+        'isGeneral' => 'require',
+        'province' => 'require',
+        'city' => 'require',
+        'address' => 'require',
+        'agentName' => 'require|regex:/^[\x{4e00}-\x{9fa5}]+$/u|max:30',
+        'agentPhone' => 'require|mobile',
+        'verificationCode' => 'require',
+        'agentEmail' => 'require|email'
+    ];
+    protected $message = [
+        'username.require' => '请填写账号!',
+        'username.max' => '账号最多50个字符!',
+        'username.unique' => '该账号已被注册',
+        'password.require' => '请填写密码!',
+        'password.min' => '密码最少长度8位',
+        'password.regex' => '密码应包含字母与数字两种字符',
+        're_password.require' => '请输入重复密码',
+        're_password.confirm' => '两次密码输入不一致',
+        'name.require' => '请输入医院名称',
+        'name.max' => '医院名称最多100个字符!',
+        'idCard.require' => '请填写登记号!',
+        'legal.require' => '请输入医院法人',
+        'ephone.require' => '请输入医院电话',
+        'medicalCommunityId.require' => '请选择医共体',
+        'isGeneral.require' => '请选择是否总院',
+        'province.require' => '请选择医院所在省份',
+        'city.require' => '请选择医院所在市',
+        'address.require' => '请输入医院地址',
+        'agentName.require' => '请填写人才联络员',
+        'agentName.max' => '人才联络员最多30个字符',
+        'agentName.regex' => '人才联络员姓名只能是中文',
+        'agentPhone.require' => '请填写人才联络员手机号',
+        "agentPhone.mobile" => "请填写正确的人才联络员手机号",
+        'verificationCode.require' => '请输入手机验证码',
+        'agentEmail|require' => '请输入邮箱',
+        'agentEmail.email' => '邮箱格式错误'
+    ];
+    protected $scene = [
+        'add' => ['username', 'password', 're_password', 'name', 'idCard', 'legal', 'ephone', 'medicalCommunityId', 'isGeneral', 'province', 'city', 'address', 'agentName', 'agentPhone', 'verificationCode', 'agentEmail'],
+        'change' => ['name', 'idCard', 'legal', 'ephone', 'medicalCommunityId', 'isGeneral', 'province', 'city', 'address', 'agentName', 'agentPhone', 'agentEmail'],
+        'changePwd' => ['password']
+    ];
+
+    protected function checkName($value, $rule, $data = []) {
+        $info = EnterpriseModel::where('name', $value)->where('active', 1)->where('delete', 0)->where('id', '<>', $data['id'])->find();
+        if ($info) {
+            return "医院名称已被使用";
+        } else {
+            return true;
+        }
+    }
+
+}

+ 65 - 0
app/common/validate/School.php

@@ -0,0 +1,65 @@
+<?php
+
+namespace app\common\validate;
+
+use think\Validate;
+use app\admin\model\Enterprise as EnterpriseModel;
+
+class School extends Validate {
+
+    protected $rule = [
+        'username' => 'require|max:50|unique:un_enterprise',
+        'password' => 'require|min:8|regex:/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,}$/',
+        're_password' => 'require|confirm:password',
+        'name' => 'require|max:100|checkName', //|regex:/^[\x{4e00}-\x{9fa5}\(\)()\da-zA-Z&]{2,50}$/u
+        'legal' => 'require', //|regex:/^[\x{4e00}-\x{9fa5}]+$/u
+        'ephone' => 'require',
+        'province' => 'require',
+        'city' => 'require',
+        'address' => 'require',
+        'agentName' => 'require|regex:/^[\x{4e00}-\x{9fa5}]+$/u|max:30',
+        'agentPhone' => 'require|mobile',
+        'verificationCode' => 'require',
+        'agentEmail' => 'require|email'
+    ];
+    protected $message = [
+        'username.require' => '请填写账号!',
+        'username.max' => '账号最多50个字符!',
+        'username.unique' => '该账号已被注册',
+        'password.require' => '请填写密码!',
+        'password.min' => '密码最少长度8位',
+        'password.regex' => '密码应包含字母与数字两种字符',
+        're_password.require' => '请输入重复密码',
+        're_password.confirm' => '两次密码输入不一致',
+        'name.require' => '请输入学校名称',
+        'name.max' => '学校名称最多100个字符!',
+        'legal.require' => '请输入学校法人',
+        'ephone.require' => '请输入学校电话',
+        'province.require' => '请选择学校所在省份',
+        'city.require' => '请选择学校所在市',
+        'address.require' => '请输入学校地址',
+        'agentName.require' => '请填写人才联络员',
+        'agentName.max' => '人才联络员最多30个字符',
+        'agentName.regex' => '人才联络员姓名只能是中文',
+        'agentPhone.require' => '请填写人才联络员手机号',
+        "agentPhone.mobile" => "请填写正确的人才联络员手机号",
+        'verificationCode.require' => '请输入手机验证码',
+        'agentEmail|require' => '请输入邮箱',
+        'agentEmail.email' => '邮箱格式错误'
+    ];
+    protected $scene = [
+        'add' => ['username', 'password', 're_password', 'name', 'legal', 'ephone', 'province', 'city', 'address', 'agentName', 'agentPhone', 'verificationCode', 'agentEmail'],
+        'change' => ['name', 'legal', 'ephone', 'province', 'city', 'address', 'agentName', 'agentPhone', 'agentEmail'],
+        'changePwd' => ['password'],
+    ];
+
+    protected function checkName($value, $rule, $data = []) {
+        $info = EnterpriseModel::where('name', $value)->where('active', 1)->where('delete', 0)->where('id', '<>', $data['id'])->find();
+        if ($info) {
+            return "学校名称已存在";
+        } else {
+            return true;
+        }
+    }
+
+}

+ 190 - 1
app/common/view/auth/register.html

@@ -48,6 +48,8 @@
                                             <li class="active" special="qiye" id="qiTab"><a data-toggle="tab" href="#tab-3" aria-expanded="true">企业用户</a></li>
                                             <li class="" special="minfei" id="mfTab"><a data-toggle="tab" href="#tab-5" aria-expanded="true">民办非企业</a></li>
                                             <li class="" special="shiye" id="shiyeTab" ><a data-toggle="tab" href="#tab-4"   aria-expanded="false">事业单位</a></li>
+                                            <li class="" special="weijian" id="wjTab" ><a data-toggle="tab" href="#tab-6"   aria-expanded="false">卫健医院</a></li>
+                                            <li class="" special="gaojiao" id="gjTab" ><a data-toggle="tab" href="#tab-7"   aria-expanded="false">高教学校</a></li>
                                         </ul>
                                         <div class="tab-content">
                                             <div id="tab-3" class="tab-pane active">
@@ -392,7 +394,7 @@
                                                             <td>
                                                                 <div class="rowGroup">
                                                                     <label class=" control-label spacing td-label">法人代表</label>
-                                                                    <input autocomplete="off" type="text" class="form-control" id=sy_legal" name="legal" />
+                                                                    <input autocomplete="off" type="text" class="form-control" id="sy_legal" name="legal" />
                                                                 </div>
                                                             </td>
                                                         </tr>
@@ -454,7 +456,194 @@
                                                     </table>
                                                 </div>
                                             </div>
+                                            <div id="tab-6" class="tab-pane">
+                                                <div class="panel-heading">基础信息</div>
+                                                <div class="panel-body">
+                                                    <table style="width: 100%;border-collapse: collapse;" class="table table-bordered">
+                                                        <tr>
+                                                            <td>
+                                                                <div class="rowGroup">
+                                                                    <label class="control-label spacing td-label"><span style="color: red">*</span>账号</label>
+                                                                    <input type="text" autocomplete="off" class="form-control" id="wj_username" name="username" placeholder="请填写账号,用于登陆" />
+                                                                </div>
+                                                            </td>
+                                                            <td>
+                                                                <div class="rowGroup">
+                                                                    <label class="control-label spacing td-label"><span style="color: red">*</span>密码</label>
+                                                                    <input type="password" autocomplete="off" class="form-control" id="wj_password" name="password" placeholder="密码由字母、数字及特殊字符组成且字符个数为8-20"/>
+                                                                </div>
+                                                            </td>
+                                                            <td>
+                                                                <div class="rowGroup">
+                                                                    <label class="control-label spacing td-label"><span style="color: red">*</span>重复密码</label>
+                                                                    <input autocomplete="off" type="password" class="form-control" id="wj_re_password" name="re_password" placeholder="密码由字母、数字及特殊字符组成且字符个数为8-20"/>
+                                                                </div>
+
+                                                            </td>
+                                                            <td rowspan="4" >
+                                                                <label class="control-label spacing"><span class="text-danger">*</span>医疗机构执业许可证上传</label>
+                                                                <img id="sy_photoImg" src="/static/img/yyzz.png" style="height: 60px;" onclick="$('#wj_imgurl').click()" >
+                                                                <input style="display: none" autocomplete="off" type="file" class="form-control" id="wj_imgurl" name="imgurl" />
+                                                            </td>
+                                                        </tr>
+                                                        <tr>
+                                                            <td>
+                                                                <div class="rowGroup">
+                                                                    <label class=" control-label spacing td-label"><span style="color: red">*</span>医院名称</label>
+                                                                    <input autocomplete="off" type="text" class="form-control" id="wj_name" name="name" />
+                                                                </div>
+                                                            </td>
+                                                            <td>
+                                                                <div class="rowGroup">
+                                                                    <label class=" control-label spacing td-label"><span style="color: red">*</span>登记号</label>
+                                                                    <input autocomplete="off" type="text" class="form-control" id="wj_idCard" name="idCard" />
+                                                                </div>
+                                                            </td>
+                                                            <td>
+                                                                <div class="rowGroup">
+                                                                    <label class=" control-label spacing td-label"><span style="color: red">*</span>法人代表</label>
+                                                                    <input autocomplete="off" type="text" class="form-control" id="wj_legal" name="legal" />
+                                                                </div>
+                                                            </td>
+                                                        </tr>
+                                                        <tr>
+                                                            <td>
+                                                                <div class="rowGroup">
+                                                                    <label class=" control-label spacing td-label"><span style="color: red">*</span>医院电话</label>
+                                                                    <input autocomplete="off" type="text" class="form-control" id="wj_ephone" name="ephone" />
+                                                                </div>
+                                                            </td>
+                                                            <td>
+                                                                <div class="rowGroup">
+                                                                    <label class=" control-label spacing td-label"><span style="color: red">*</span>医共体</label>
+                                                                    <select class="form-control" id="wj_medicalCommunityId" name="medicalCommunityId">
+                                                                        {volist name="medicalCommunities" id="mc"}
+                                                                        <option value="{$mc.id}">{$mc.name}</option>
+                                                                        {/volist}
+                                                                    </select>
+                                                                </div>
+                                                            </td>
+                                                            <td>
+                                                                <div class="rowGroup">
+                                                                    <label class=" control-label spacing td-label"><span style="color: red">*</span>是否总院</label>
+                                                                    <select class="form-control" id="wj_isGeneral" name="isGeneral">
+                                                                        <option value="">请选择</option>
+                                                                        <option value="2">否</option>
+                                                                        <option value="1">是</option>
+                                                                    </select>
+                                                                </div>
+                                                            </td>
+                                                        </tr>
+                                                        <tr>                                                            
+                                                            <td colspan="3">
+                                                                <div class="rowGroup">
+                                                                    <label class=" control-label spacing td-label"><span style="color: red">*</span>地址</label>                                                                    
+                                                                    <div class="col-sm-12">
+                                                                        <div class="col-sm-2">
+                                                                            <select class="form-control" id="wj_province" name="province" onchange="Register.afterSelectProvince('wj');">
+                                                                                <option value="">---请选择---</option>
+                                                                            </select>
+                                                                        </div>
+                                                                        <div class="col-sm-2">
+                                                                            <select class="form-control" id="wj_city" name="city" onchange="Register.afterSelectCity('wj');">
+                                                                                <option value="">---请选择---</option>
+                                                                            </select>
+                                                                        </div>
+                                                                        <div class="col-sm-2">
+                                                                            <select class="form-control" id="wj_county" name="county">
+                                                                                <option value="">---请选择---</option>
+                                                                            </select>
+                                                                        </div>
+                                                                        <div class="col-sm-6">
+                                                                            <input autocomplete="off" type="text" class="form-control" id="wj_address" name="address" placeholder="请填写详细地址"/>
+                                                                        </div>
+                                                                    </div>
+                                                                </div>
+                                                            </td>
+                                                        </tr>
+                                                    </table>
+                                                </div>
+                                            </div>
+                                            <div id="tab-7" class="tab-pane">
+                                                <div class="panel-heading">基础信息</div>
+                                                <div class="panel-body">
+                                                    <table style="width: 100%;border-collapse: collapse;" class="table table-bordered">
+                                                        <tr>
+                                                            <td>
+                                                                <div class="rowGroup">
+                                                                    <label class="control-label spacing td-label"><span style="color: red">*</span>账号</label>
+                                                                    <input type="text" autocomplete="off" class="form-control" id="gj_username" name="username" placeholder="请填写账号,用于登陆" />
+                                                                </div>
+                                                            </td>
+                                                            <td>
+                                                                <div class="rowGroup">
+                                                                    <label class="control-label spacing td-label"><span style="color: red">*</span>密码</label>
+                                                                    <input type="password" autocomplete="off" class="form-control" id="gj_password" name="password" placeholder="密码由字母、数字及特殊字符组成且字符个数为8-20"/>
+                                                                </div>
+                                                            </td>
+                                                            <td>
+                                                                <div class="rowGroup">
+                                                                    <label class="control-label spacing td-label"><span style="color: red">*</span>重复密码</label>
+                                                                    <input autocomplete="off" type="password" class="form-control" id="gj_re_password" name="re_password" placeholder="密码由字母、数字及特殊字符组成且字符个数为8-20"/>
+                                                                </div>
 
+                                                            </td>
+                                                            <td rowspan="3" >
+                                                                <label class="control-label spacing"><span class="text-danger">*</span>办学许可证、法人证书或登记证书</label>
+                                                                <img id="sy_photoImg" src="/static/img/yyzz.png" style="height: 60px;" onclick="$('#gj_imgurl').click()" >
+                                                                <input style="display: none" autocomplete="off" type="file" class="form-control" id="gj_imgurl" name="imgurl" />
+                                                            </td>
+                                                        </tr>
+                                                        <tr>
+                                                            <td>
+                                                                <div class="rowGroup">
+                                                                    <label class=" control-label spacing td-label"><span style="color: red">*</span>学校名称</label>
+                                                                    <input autocomplete="off" type="text" class="form-control" id="gj_name" name="name" />
+                                                                </div>
+                                                            </td>
+                                                            <td>
+                                                                <div class="rowGroup">
+                                                                    <label class=" control-label spacing td-label"><span style="color: red">*</span>法人代表</label>
+                                                                    <input autocomplete="off" type="text" class="form-control" id="gj_legal" name="legal" />
+                                                                </div>
+                                                            </td>
+                                                            <td>
+                                                                <div class="rowGroup">
+                                                                    <label class=" control-label spacing td-label"><span style="color: red">*</span>学校电话</label>
+                                                                    <input autocomplete="off" type="text" class="form-control" id="gj_ephone" name="ephone" />
+                                                                </div>
+                                                            </td>
+                                                        </tr>
+                                                        <tr>                                                            
+                                                            <td colspan="3">
+                                                                <div class="rowGroup">
+                                                                    <label class=" control-label spacing td-label"><span style="color: red">*</span>地址</label>                                                                    
+                                                                    <div class="col-sm-12">
+                                                                        <div class="col-sm-2">
+                                                                            <select class="form-control" id="gj_province" name="province" onchange="Register.afterSelectProvince('gj');">
+                                                                                <option value="">---请选择---</option>
+                                                                            </select>
+                                                                        </div>
+                                                                        <div class="col-sm-2">
+                                                                            <select class="form-control" id="gj_city" name="city" onchange="Register.afterSelectCity('gj');">
+                                                                                <option value="">---请选择---</option>
+                                                                            </select>
+                                                                        </div>
+                                                                        <div class="col-sm-2">
+                                                                            <select class="form-control" id="gj_county" name="county">
+                                                                                <option value="">---请选择---</option>
+                                                                            </select>
+                                                                        </div>
+                                                                        <div class="col-sm-6">
+                                                                            <input autocomplete="off" type="text" class="form-control" id="gj_address" name="address" placeholder="请填写详细地址"/>
+                                                                        </div>
+                                                                    </div>
+                                                                </div>
+                                                            </td>
+                                                        </tr>
+                                                    </table>
+                                                </div>
+                                            </div>
                                             <div class="panel-heading">人才联络员信息</div>
                                             <div class="panel-body">
                                                 <table style="width: 100%;border-collapse: collapse;" class="table table-bordered">

+ 176 - 13
public/static/js/register.js

@@ -130,11 +130,37 @@ Register.enterpriseUserRegister = function () {
         live: 'enabled',
         message: '该字段不能为空'
     });
+    //初始化
+    $("#tab-3 .form-control").attr("disabled", "disabled");
+    $("#tab-4 .form-control").attr("disabled", "disabled");
+    $("#tab-5 .form-control").attr("disabled", "disabled");
+    $("#tab-6 .form-control").attr("disabled", "disabled");
+    $("#tab-7 .form-control").attr("disabled", "disabled");
+    $('#ep_form').bootstrapValidator("addField", "name", {validators: {notEmpty: {message: '单位/企业名称不能为空'}}});
+    $('#ep_form').bootstrapValidator("addField", "name", {validators: {notEmpty: {message: '所属街道不能为空'}}});
+    $('#ep_form').bootstrapValidator("addField", "address", {validators: {notEmpty: {message: '单位/企业地址不能为空'}}});
+    $('#ep_form').bootstrapValidator("addField", "ephone", {validators: {
+            notEmpty: {
+                message: '单位/企业电话不能为空'
+            }, regexp: {
+                regexp: /(^(\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})))$/,
+                message: "单位/企业电话格式不合法"
+            }
+        }}
+    );
+    $('#ep_form').bootstrapValidator("removeField", "idCard");
+    $('#ep_form').bootstrapValidator("removeField", "legal");
+    $('#ep_form').bootstrapValidator("removeField", "bankCard");
+    $('#ep_form').bootstrapValidator("removeField", "bankNetwork");
+    $('#ep_form').bootstrapValidator("removeField", "bank");
+    $('#ep_form').bootstrapValidator("removeField", "medicalCommunityId");
+    $('#ep_form').bootstrapValidator("removeField", "isGeneral");
+    $('#ep_form').bootstrapValidator("removeField", "province");
+    $('#ep_form').bootstrapValidator("removeField", "city");
+    $('#ep_form').bootstrapValidator("removeField", "county");
     switch (special) {
         case 'qiye':
             $("#tab-3 .form-control").removeAttr("disabled");
-            $("#tab-4 .form-control").attr("disabled", "disabled");
-            $("#tab-5 .form-control").attr("disabled", "disabled");
             $('#ep_form').bootstrapValidator("addField", "idCard", {validators: {notEmpty: {message: '统一社会信用代码不能为空'}}});
             $('#ep_form').bootstrapValidator("addField", "legal", {validators: {notEmpty: {message: '法人代表不能为空'}}});//, regexp: {regexp: /^[\u4e00-\u9fa5]{1,50}$/, message: "法人代表只允许中文"}
             if (type == 1) {
@@ -153,8 +179,6 @@ Register.enterpriseUserRegister = function () {
             break;
         case 'minfei':
             $("#tab-5 .form-control").removeAttr("disabled");
-            $("#tab-4 .form-control").attr("disabled", "disabled");
-            $("#tab-3 .form-control").attr("disabled", "disabled");
             $('#ep_form').bootstrapValidator("addField", "idCard", {validators: {notEmpty: {message: '统一社会信用代码不能为空'}}});
             $('#ep_form').bootstrapValidator("addField", "legal", {validators: {notEmpty: {message: '法人代表不能为空'}}});//, regexp: {regexp: /^[\u4e00-\u9fa5]{1,50}$/, message: "法人代表只允许中文"}
             $('#ep_form').bootstrapValidator("addField", "bankCard", {validators: {notEmpty: {message: '开户银行账号不能为空'}}});
@@ -171,14 +195,61 @@ Register.enterpriseUserRegister = function () {
             break;
         case 'shiye':
             $("#tab-4 .form-control").removeAttr("disabled");
-            $("#tab-3 .form-control").attr("disabled", "disabled");
-            $('#ep_form').bootstrapValidator("removeField", "idCard");
-            $('#ep_form').bootstrapValidator("removeField", "legal");
-            $('#ep_form').bootstrapValidator("removeField", "bankCard");
-            $('#ep_form').bootstrapValidator("removeField", "bankNetwork");
-            $('#ep_form').bootstrapValidator("removeField", "bank");
             var prefix = '单位';
             break;
+        case 'weijian':
+            $("#tab-6 .form-control").removeAttr("disabled");
+            $('#ep_form').bootstrapValidator("addField", "name", {validators: {notEmpty: {message: '医院名称不能为空'}}});
+            $('#ep_form').bootstrapValidator("addField", "idCard", {validators: {notEmpty: {message: '登记号不能为空'}}});
+            $('#ep_form').bootstrapValidator("addField", "legal", {validators: {notEmpty: {message: '法人代表不能为空'}}});
+            $('#ep_form').bootstrapValidator("addField", "ephone", {validators: {notEmpty: {message: '医院电话不能为空'}}});
+            $('#ep_form').bootstrapValidator("addField", "medicalCommunityId", {validators: {notEmpty: {message: '请选择医共体'}}});
+            $('#ep_form').bootstrapValidator("addField", "isGeneral", {validators: {notEmpty: {message: '请选择是否总院'}}});
+            $('#ep_form').bootstrapValidator("addField", "province", {validators: {notEmpty: {message: '请选择医院所在省份'}}});
+            $('#ep_form').bootstrapValidator("addField", "city", {validators: {notEmpty: {message: '请选择医院所在市'}}});
+            $('#ep_form').bootstrapValidator("addField", "county", {
+                validators: {
+                    callback: {
+                        message: "请选择医院所在县/区",
+                        callback: function (value, validator) {
+                            if ($("#wj_province").val() > 0 && $("#wj_city").val() > 0 && $("#wj_county option").length > 1 && $("#wj_county option:selected").length == 0) {
+                                //当省市都有值时,如果县有列表,必选
+                                return false;
+                            }
+                            return true;
+                        }
+                    }
+                }
+            });
+            $('#ep_form').bootstrapValidator("addField", "address", {validators: {notEmpty: {message: '请填写医院详细地址'}}});
+            $('#ep_form').bootstrapValidator("removeField", "street");
+            var prefix = "医院";
+            break;
+        case 'gaojiao':
+            $("#tab-7 .form-control").removeAttr("disabled");
+            $('#ep_form').bootstrapValidator("addField", "province", {validators: {notEmpty: {message: '请选择学校所在省份'}}});
+            $('#ep_form').bootstrapValidator("addField", "city", {validators: {notEmpty: {message: '请选择学校所在市'}}});
+            $('#ep_form').bootstrapValidator("addField", "county", {
+                validators: {
+                    callback: {
+                        message: "请选择学校所在县/区",
+                        callback: function (value, validator) {
+                            if ($("#gj_province").val() > 0 && $("#gj_city").val() > 0 && $("#gj_county option").length > 1 && $("#gj_county option:selected").length == 0) {
+                                //当省市都有值时,如果县有列表,必选
+                                return false;
+                            }
+                            return true;
+                        }
+                    }
+                }
+            });
+            $('#ep_form').bootstrapValidator("addField", "address", {validators: {notEmpty: {message: '请填写学校详细地址'}}});
+            $('#ep_form').bootstrapValidator("addField", "legal", {validators: {notEmpty: {message: '法人代表不能为空'}}});
+            $('#ep_form').bootstrapValidator("addField", "ephone", {validators: {notEmpty: {message: '学校电话不能为空'}}});
+            $('#ep_form').bootstrapValidator("removeField", "idCard");
+            $('#ep_form').bootstrapValidator("removeField", "street");
+            var prefix = "学校";
+            break;
     }
 
 
@@ -228,6 +299,33 @@ Register.enterpriseUserRegister = function () {
             var address = $("#sy_address").val();
             var ephone = $("#sy_ephone").val();
             break;
+        case "weijian":
+            var username = $("#wj_username").val();
+            var password = $("#wj_password").val();
+            var rePassword = $("#wj_re_password").val();
+            var name = $("#wj_name").val();
+            var idCard = $("#wj_idCard").val();
+            var legal = $("#wj_legal").val();
+            var ephone = $("#wj_ephone").val();
+            var medicalCommunityId = $("#wj_medicalCommunityId").val();
+            var isGeneral = $("#wj_isGeneral").val();
+            var province = $("#wj_province").val();
+            var city = $("#wj_city").val();
+            var county = $("#wj_county").val();
+            var address = $("#wj_address").val();
+            break;
+        case "gaojiao":
+            var username = $("#gj_username").val();
+            var password = $("#gj_password").val();
+            var rePassword = $("#gj_re_password").val();
+            var name = $("#gj_name").val();
+            var legal = $("#gj_legal").val();
+            var ephone = $("#gj_ephone").val();
+            var province = $("#gj_province").val();
+            var city = $("#gj_city").val();
+            var county = $("#gj_county").val();
+            var address = $("#gj_address").val();
+            break;
     }
 
     var agentName = $("#agentName").val();
@@ -287,13 +385,13 @@ Register.enterpriseUserRegister = function () {
         return;
     }
 
-    if (street == null || street == '') {
+    if ((street == null || street == '') && special != "weijian" && special != "gaojiao") {
         Feng.info("请选择所属街道!");
         return;
     }
 
     if (address == null || address == '') {
-        Feng.info("请填写单位地址!");
+        Feng.info("请填写" + prefix + "地址!");
         return;
     }
 
@@ -455,6 +553,26 @@ Register.enterpriseUserRegister = function () {
                 return;
             }
             break;
+        case "weijian":
+            var x = document.getElementById("wj_imgurl").value;
+            if (x == "") {
+                Feng.info("请上传医疗机构执业许可证!");
+                return;
+            }
+            if (!Feng.chkFileInvalid(document.getElementById("wj_imgurl").files[0], 5, 10, ["image/jpeg", "image/gif", "image/png", "image/jpg", "application/pdf"], "医疗机构执业许可证只允许上传PDF或图片")) {
+                return;
+            }
+            break;
+        case "gaojiao":
+            var x = document.getElementById("gj_imgurl").value;
+            if (x == "") {
+                Feng.info("办学许可证、法人证书或登记证书!");
+                return;
+            }
+            if (!Feng.chkFileInvalid(document.getElementById("gj_imgurl").files[0], 5, 10, ["image/jpeg", "image/gif", "image/png", "image/jpg", "application/pdf"], "办学许可证、法人证书或登记证书只允许上传PDF或图片")) {
+                return;
+            }
+            break;
     }
 
 
@@ -744,6 +862,40 @@ Register.industryChange = function () {
     Feng.findChildDictBatch(JSON.stringify(arr));
 }
 
+
+Register.afterSelectProvince = function (prefix) {
+    var province = $("#" + prefix + "_province").val();
+    $("#" + prefix + "_city").empty();
+    $("#" + prefix + "_county").empty();
+    if (province == null || province == '') {
+        return;
+    }
+    Feng.addAjaxSelect({
+        "id": prefix + "_city",
+        "displayCode": "code",
+        "displayName": "name",
+        "type": "GET",
+        "url": Feng.ctxPath + "/common/tool/findCityByProvinceSelect/code/" + province
+    });
+}
+/**
+ * 加载县
+ */
+Register.afterSelectCity = function (prefix) {
+    var city = $("#" + prefix + "_city").val();
+    $("#" + prefix + "_county").empty();
+    if (city == null || city == '') {
+        return;
+    }
+    Feng.addAjaxSelect({
+        "id": prefix + "_county",
+        "displayCode": "code",
+        "displayName": "name",
+        "type": "GET",
+        "url": Feng.ctxPath + "/common/tool/findCountyByCitySelect/code/" + city
+    });
+}
+
 $(function () {
     $('#ep_form').bootstrapValidator({
         feedbackIcons: {
@@ -795,7 +947,7 @@ $(function () {
         {"name": "mf_street", "code": "street"},
         {"name": "agencyType", "code": "agency_type"}];
     Feng.findChildDictBatch(JSON.stringify(arr));
-    $("#imgurl,#sy_imgurl,#mf_imgurl,#bankImg,#mf_bankImg,#sy_bankImg,#beian,#domainImg,#typeImg").change(function (e) {
+    $("#imgurl,#sy_imgurl,#mf_imgurl,#wj_imgurl,#gj_imgurl,#bankImg,#mf_bankImg,#sy_bankImg,#beian,#domainImg,#typeImg").change(function (e) {
         var that = this;
         if (!Feng.chkFileInvalid(that.files[0], 5, 10)) {
             return;
@@ -813,4 +965,15 @@ $(function () {
             }
         };
     });
+
+    //加载省份
+    Feng.addAjaxSelect({
+        "id": "wj_province",
+        "displayCode": "code",
+        "displayName": "name",
+        "type": "GET",
+        "url": Feng.ctxPath + "/common/tool/getProvinceSelect"
+    });
+    var provinceList = $("#wj_province option").clone();
+    $("#gj_province").html(provinceList);
 });

+ 49 - 12
public/static/modular/gate/enterprise/enterprise_edit.js

@@ -8,6 +8,24 @@ var psSmsBtn = $("#ps_sms_btn");
 
 Register.enterpriseUserRegister = function () {
     $("#agentPhone").removeAttr("disabled");
+    var type = $("#type").val();
+    var special = $("#special").val();
+    var enterpriseTypeName = "企业";
+    var idCardName = "统一社会信用代码";
+    switch (special) {
+        case 0:
+            if (type == 5) {
+                enterpriseTypeName = "医院";
+                idCardName = "登记号";
+            }
+            if (type == 6) {
+                enterpriseTypeName = "学校";
+            }
+            break;
+        case 1:
+            enterpriseTypeName = "单位";
+            break;
+    }
     var username = $("#username").val();
     var name = $("#name").val();
     var idCard = $("#idCard").val();
@@ -15,12 +33,15 @@ Register.enterpriseUserRegister = function () {
     var agentPhone = $("#agentPhone").val();
     var legal = $("#legal").val();
     var street = $("#street").val();
+    var province = $("#province").val();
+    var city = $("#city").val();
+    var county = $("#county").val();
     var address = $("#address").val();
-    var type = $("#type").val();
     var agencyType = $("#agencyType").val();
-    var special = $("#special").val();
     var agentEmail = $("#agentEmail").val();
     var ephone = $("#ephone").val();
+    var medicalCommunityId = $("#medicalCommunityId").val();
+    var isGeneral = $("#isGeneral").val();
     var bankCard = $("#bankCard").val();
     var bank = $("#bank").val();
     var bankNetwork = $("#bankNetwork").val();
@@ -33,19 +54,19 @@ Register.enterpriseUserRegister = function () {
         return;
     }
     if (name == null || name == '') {
-        Feng.info("请填写单位名称!");
+        Feng.info("请填写" + enterpriseTypeName + "名称!");
         return;
     }
     if (name.length > 100) {
-        Feng.info("单位名称最多100个字符!");
+        Feng.info(enterpriseTypeName + "名称最多100个字符!");
         return;
     }
-    if ((idCard == null || idCard == '') && special != "1") {
-        Feng.info("请填写统一社会信用代码!");
+    if ((idCard == null || idCard == '') && special != "1" && type != 6) {
+        Feng.info("请填写" + idCardName + "!");
         return;
     }
     if (idCard.length > 40) {
-        Feng.info("统一社会信用代码最多40个字符!");
+        Feng.info(idCardName + "最多40个字符!");
         return;
     }
     if ((legal == null || legal == '') && special != "1") {
@@ -53,18 +74,34 @@ Register.enterpriseUserRegister = function () {
         return;
     }
     if (ephone == null || ephone == '') {
-        Feng.info("请填写单位电话");
+        Feng.info("请填写" + enterpriseTypeName + "电话");
         return;
     }
-    if (street == null || street == '') {
+    if ((medicalCommunityId == null || medicalCommunityId == '') && type == 5) {
+        Feng.info("请选择医共体");
+        return;
+    }
+    if ((isGeneral == null || isGeneral == '') && type == 5) {
+        Feng.info("请选择是否总院");
+        return;
+    }
+    if ((street == null || street == '') && [3, 4].indexOf(type) == -1) {
         Feng.info("请选择所属街道!");
         return;
     }
+    if ((province == null || province == '') && [5, 6].indexOf(type) > -1) {
+        Feng.info("请选择" + enterpriseTypeName + "所在省份!");
+        return;
+    }
+    if ((city == null || city == '') && [5, 6].indexOf(type) > -1) {
+        Feng.info("请选择" + enterpriseTypeName + "所在市!");
+        return;
+    }
     if (address == null || address == '') {
-        Feng.info("请填写单位地址!");
+        Feng.info("请填写" + enterpriseTypeName + "地址!");
         return;
     }
-    if (special != "1" && type != 2) {
+    if (special != "1" && [2, 5, 6].indexOf(type) == -1) {
         if (bankCard == null || bankCard == '') {
             Feng.info("请填写企业银行账号!");
             return;
@@ -133,7 +170,7 @@ Register.enterpriseUserRegister = function () {
         return;
     }
     if (!/(^(\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})))$/.test(ephone)) {
-        Feng.info("单位电话格式不合法!");
+        Feng.info(enterpriseTypeName + "电话格式不合法!");
         return;
     }
     if (!/(^(\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})))$/.test(agentPhone)) {

+ 1 - 1
public/static/modular/gate/talentInfo/new_talentInfo_info.js

@@ -28,7 +28,7 @@ var TalentInfoInfoDlg = {
                 callback: {
                     message: "户籍县不能为空",
                     callback: function (value, validator) {
-                        if ($("#province").val() > 0 && $("#city").val() > 0 && $("#county option").length > 1 && $("county option:selected").length == 0) {
+                        if ($("#province").val() > 0 && $("#city").val() > 0 && $("#county option").length > 1 && $("#county option:selected").length == 0) {
                             //当省市都有值时,如果县有列表,必选
                             return false;
                         }

+ 4 - 0
public/static/modular/system/user/user.js

@@ -32,6 +32,10 @@ MgrUser.initColumn = function () {
                     return "晋江市现代产业体系人才";
                 } else if (value == 2) {
                     return "集成电路优秀人才";
+                } else if (value == 5) {
+                    return "卫健医院";
+                } else if (value == 6) {
+                    return "高教学校";
                 } else if (value == 3) {
                     return "海峡计划申报";
                 } else if (value == 4) {