Pārlūkot izejas kodu

修改一些显示界面

sandm 2 gadi atpakaļ
vecāks
revīzija
04d68b45ff

+ 2 - 2
app/admin/controller/EnterpriseChangeRecord.php

@@ -148,7 +148,7 @@ class EnterpriseChangeRecord extends AdminController {
                 'name' => $ecr['newName'],
                 'phone' => $ecr['newAgentPhone'],
                 'templateCode' => "【晋江市人才服务平台】您好!您提交申请的优秀人才{$checkMsg}因信息填写错误或上传不完整已被退回,请及时登录申报系统查看审核意见并重新提交。",
-                'params' => '企业信息变更',
+                'params' => '机构信息变更',
                 'state' => 1,
                 'sendingDate' => date("Y-m-d H:i:s",time()),
                 'createTime' => date("Y-m-d H:i:s",time())
@@ -240,7 +240,7 @@ class EnterpriseChangeRecord extends AdminController {
                 'name' => $ecr['newName'],
                 'phone' => $ecr['newAgentPhone'],
                 'templateCode' => "【晋江市人才服务平台】您好!您提交申请的优秀人才{$checkMsg}已审核通过,可登录申报系统做相关事宜申报。",
-                'params' => '企业信息变更',
+                'params' => '机构信息变更',
                 'state' => 1,
                 'sendingDate' => date("Y-m-d H:i:s",time()),
                 'createTime' => date("Y-m-d H:i:s",time())

+ 2 - 2
app/admin/view/enterprise_change_record/goto_enterprise_change_detail_page.html

@@ -49,7 +49,7 @@
                             <input style="display: none;" type="text" class="form-control" id="checkState" name="checkState" value="{$ecr.checkState}"/>
                             <div class="panel-body">
                                 <div class="panel panel-default">
-                                    <div class="panel-heading" onclick="$(this).next().toggle()">变更前企业信息</div>
+                                    <div class="panel-heading" onclick="$(this).next().toggle()">变更前机构信息</div>
                                     <div class="panel-body">
                                         <div class="col-sm-12 ">
                                             <div class="row">
@@ -193,7 +193,7 @@
                                     </div>
                                 </div>
                                 <div class="panel panel-default">
-                                    <div class="panel-heading" onclick="$(this).next().toggle()">变更后企业信息</div>
+                                    <div class="panel-heading" onclick="$(this).next().toggle()">变更后机构信息</div>
                                     <div class="panel-body">
 
                                         <div class="col-sm-12 ">

+ 1 - 1
app/admin/view/enterprise_change_record/goto_enterprise_change_record_page.html

@@ -4,7 +4,7 @@
     <div class="col-sm-12">
         <div class="ibox float-e-margins">
             <div class="ibox-title">
-                <h5>企业信息变更</h5>
+                <h5>机构信息变更</h5>
             </div>
             <div class="ibox-content">
                 <div class="row">

+ 1 - 1
app/common/api/MenuApi.php

@@ -79,7 +79,7 @@ class MenuApi {
 
     public static function getEnterpriseMenuByType($type) {
         $menus = [];
-        $menus[] = ["type" => [1, 2, 3], "code" => "qyzx", "pcode" => "0", "name" => "企业用户中心", "url" => "/enterprise/index/centerPage", "icon" => "fa-user", "status" => 1];
+        $menus[] = ["type" => [1, 2, 3], "code" => "qyzx", "pcode" => "0", "name" => "机构用户中心", "url" => "/enterprise/index/centerPage", "icon" => "fa-user", "status" => 1];
         $menus[] = ["type" => [1, 2], "code" => "yhfk", "pcode" => "0", "name" => "用户反馈", "url" => "", "icon" => "fa-bug", "status" => 1];
         $menus[] = ["type" => [1, 2], "code" => "rcrd", "pcode" => "0", "name" => "人才认定", "url" => "#", "icon" => "fa-thumbs-o-up", "status" => 1];
         $menus[] = ["type" => [1, 2], "code" => "jctjsb", "pcode" => "rcrd", "name" => "基础条件申报", "url" => "/enterprise/base", "icon" => "fa-thumbs-o-up", "status" => 1];

+ 43 - 16
app/common/controller/Auth.php

@@ -21,6 +21,7 @@ class Auth extends BaseController
         if($this->request->isPost()){
             $source = intval($this->request['source']);
             $response_object = new \StdClass();
+            $special = \StrUtil::getRequestDecodeParam($this->request,'special');
             $data = [
                 'username' => \StrUtil::getRequestDecodeParam($this->request,'username'),
                 'password' => \StrUtil::getRequestDecodeParam($this->request,'password'),
@@ -45,9 +46,15 @@ class Auth extends BaseController
                 'bankNetwork' => \StrUtil::getRequestDecodeParam($this->request,'bankNetwork')
             ];
             try {
-                $result = validate(Enterprise::class)->batch(true)->scene('add')->check($data);
+                if($special == 'qiye'){
+                    validate(Enterprise::class)->batch(true)->scene('add')->check($data);
+                    $data['special'] = 0;
+                }else{
+                    validate(Enterprise::class)->batch(true)->scene('sy_add')->check($data);
+                    $data['special'] = 1;
+                }
                 //检验验证码
-                $codeResult = MessageRecord::where('smsType',1)->where('phone',$data['agentPhone'])->find();
+                $codeResult = MessageRecord::where('smsType',1)->where('phone',$data['agentPhone'])->order('createTime','desc')->find();
                 if(!$codeResult){
                     $response_object->code = 500;
                     $response_object->msg = '请先发送验证码';
@@ -59,19 +66,32 @@ class Auth extends BaseController
                     $response_object->msg = '验证码过期,请重新发送';
                     return \StrUtil::back($response_object,"Register.epCallBack");
                 }
-                //检验附件 营业执照
                 $uploadapi = new UploadApi();
-                $upload_result = $uploadapi->uploadOne($this->request->file('imgurl'),'image');
-                if($upload_result->code == 500){
-                    return \StrUtil::back($upload_result,"Register.epCallBack");
+                $files = $this->request->file();
+                //检验附件 营业执照
+                if(array_key_exists('imgurl',$files)){
+                    $upload_result = $uploadapi->uploadOne($this->request->file('imgurl'),'image');
+                    if($upload_result->code == 500){
+                        return \StrUtil::back($upload_result,"Register.epCallBack");
+                    }
+                    $imgurl = $upload_result->filepath;
+                }else{
+                    $imgurl = '';
                 }
+
                 //检验附件 开户许可证
-                $upload_result1 = $uploadapi->uploadOne($this->request->file('bankImg'),'image');
-                if($upload_result->code == 500){
-                    return \StrUtil::back($upload_result1,"Register.epCallBack");
+                if(array_key_exists('bankImg',$files)){
+                    $upload_result1 = $uploadapi->uploadOne($this->request->file('bankImg'),'image');
+                    if($upload_result->code == 500){
+                        return \StrUtil::back($upload_result1,"Register.epCallBack");
+                    }
+                    $bankImg = $upload_result1->filepath;
+                }else{
+                    $bankImg = '';
                 }
+
                 //检验附件 行业领域佐证材料
-                if($this->request->file('domainImg')){
+                if(array_key_exists('domainImg',$files)){
                     $upload_result2 = $uploadapi->uploadOne($this->request->file('domainImg'),'image');
                     if($upload_result2->code == 500){
                         return \StrUtil::back($upload_result2,"Register.epCallBack");
@@ -80,19 +100,26 @@ class Auth extends BaseController
                 }else{
                     $domainImg = '';
                 }
+
                 //检验附件 人才联络员备案表
-                $upload_result3 = $uploadapi->uploadOne($this->request->file('beian'),'system');
-                if($upload_result->code == 500){
-                    return \StrUtil::back($upload_result3,"Register.epCallBack");
+                if(array_key_exists('beian',$files)){
+                    $upload_result3 = $uploadapi->uploadOne($this->request->file('beian'),'system');
+                    if($upload_result->code == 500){
+                        return \StrUtil::back($upload_result3,"Register.epCallBack");
+                    }
+                    $beian = $upload_result3->filepath;
+                }else{
+                    $beian = '';
                 }
 
+
                 $data['id'] = getStringId();
                 $data['password'] = hash('md5',$data['password']);
                 $data['source'] = $source;
-                $data['imgurl'] = $upload_result->filepath;
-                $data['bankImg'] = $upload_result1->filepath;
+                $data['imgurl'] = $imgurl;
+                $data['bankImg'] = $bankImg;
                 $data['domainImg'] = $domainImg;
-                $data['beian'] = $upload_result3->filepath;
+                $data['beian'] = $beian;
                 $data['createTime'] = date("Y-m-d H:i:s",time());
                 $data['updateTime'] = date("Y-m-d H:i:s",time());
                 $data['active'] = 1;

+ 1 - 0
app/common/validate/Enterprise.php

@@ -72,5 +72,6 @@ class Enterprise extends Validate{
         'change' => ['name','idCard','industryFieldNew','enterpriseTag','enterpriseType','agentName','agentPhone','legal','street','address','ephone','agentEmail','bankCard','bank','bankNetwork'],
         'changePwd' => ['password'],
         'check_common' => ['name','idCard','industryFieldNew','enterpriseTag','enterpriseType','agentName','legal','street','address','ephone','agentEmail','bankCard','bank','bankNetwork'],
+        'sy_add' => ['username','password','re_password','name','verificationCode','street','address','ephone','agentEmail']
     ];
 }

+ 245 - 129
app/common/view/auth/register.html

@@ -39,57 +39,228 @@
                         </ul>
                         <div class="tab-content">
                             <div id="tab-1" class="tab-pane active">
-                                <br/>
-                                <div class="panel-body" >
-                                    <div class="panel panel-default">
-                                        <form id="ep_form" action="/common/auth/register" method="post" class="form-horizontal" enctype="multipart/form-data" target="hiddenIframe">
-                                            <input type="hidden" id="source" name="source" value="1">
-                                            <div class="panel-heading">单位基础信息</div>
+                                <br />
+                                <div class="tabs-container">
+                                    <form id="ep_form" action="/common/auth/register" method="post" class="form-horizontal" enctype="multipart/form-data" target="hiddenIframe">
+                                        <input type="hidden" id="source" name="source" value="1">
+                                        <input type="hidden" id="special" name="special" value="" />
+                                    <ul class="nav nav-tabs">
+                                        <li class="active" special="qiye" id="qiTab"><a data-toggle="tab" href="#tab-3" aria-expanded="true">企业用户</a></li>
+                                        <li class="" special="shiye" id="shiyeTab" ><a data-toggle="tab" href="#tab-4"   aria-expanded="false">事业单位</a></li>
+                                    </ul>
+                                    <div class="tab-content">
+                                        <div id="tab-3" class="tab-pane active">
+                                            <div class="panel-body" >
+                                                <div class="panel panel-default">
+
+                                                    <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="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="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="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="photoImg" src="/static/img/yyzz.png" style="height: 60px;" onclick="$('#imgurl').click()" >
+                                                                    <input style="display: none" autocomplete="off" type="file" class="form-control" id="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="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="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="legal" name="legal" />
+                                                                    </div>
+                                                                </td>
+                                                            </tr>
+                                                            <tr>
+                                                                <td>
+                                                                    <div class="rowGroup">
+                                                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>所属街道</label>
+                                                                        <select class="form-control" id="street" name="street"></select>
+                                                                    </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="address" name="address" />
+                                                                    </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="ephone" name="ephone" placeholder="固话格式0595xxxx" />
+                                                                    </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="bankCard" name="bankCard" />
+                                                                    </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="bank" name="bank" />
+                                                                    </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="bankNetwork" name="bankNetwork" />
+                                                                    </div>
+                                                                </td>
+                                                                <td>
+                                                                    <label class="control-label spacing"><span class="text-danger">*</span>开户许可证</label>
+                                                                    <img id="photoImg1" src="/static/img/yyzz.png" style="height: 60px;" onclick="$('#bankImg').click()" >
+                                                                    <input style="display: none" autocomplete="off" type="file" class="form-control" id="bankImg" name="bankImg" />
+                                                                </td>
+                                                            </tr>
+
+                                                        </table>
+                                                    </div>
+
+                                                    <div class="panel-heading">申报基础信息</div>
+                                                    <div class="panel-body">
+                                                        <div class="row">
+                                                            <div class="rowGroup" >
+                                                                <label class="col-sm-2 control-label spacing"><span class="text-danger">*</span>申报类型</label>
+                                                                <div class="col-sm-4 spacing">
+                                                                    <select class="form-control" id="type" name="type" onchange="Register.typeChange()">
+                                                                        <option value="">请选择</option>
+                                                                        <option value="1">晋江市现代产业体系人才</option>
+                                                                        <option value="2">集成电路优秀人才</option>
+                                                                        <!--	<option value="3">海峡计划团队</option>  -->
+                                                                    </select>
+                                                                </div>
+                                                            </div>
+                                                        </div>
+                                                        <div class="row" id="typeGroup" style="display: none">
+                                                            <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>
+                                                                            <select autocomplete="off" type="text" class="form-control" id="industryFieldNew" name="industryFieldNew" onchange="Register.industryChange()"></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="industryFieldOld" name="industryFieldOld">
+                                                                            </select>
+                                                                        </div>
+                                                                    </td>
+                                                                    <td rowspan="2">
+                                                                        <label class="control-label spacing">行业领域上传材料 </label>
+                                                                        <img id="photoImg2" src="/static/img/yyzz.png" style="height: 60px;" onclick="$('#domainImg').click()" >
+                                                                        <input style="display: none" autocomplete="off" type="file" class="form-control" id="domainImg" name="domainImg" />
+                                                                    </td>
+                                                                </tr>
+                                                                <tr>
+                                                                    <td>
+                                                                        <div class="rowGroup">
+                                                                            <label class="control-label spacing td-label"><span style="color: red">*</span>企业标签</label>
+                                                                            <select class="form-control" id="enterpriseTag" name="enterpriseTag">
+                                                                            </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="enterpriseType" name="enterpriseType">
+                                                                            </select>
+                                                                        </div>
+                                                                    </td>
+                                                                </tr>
+                                                            </table>
+                                                        </div>
+                                                    </div>
+
+
+                                                </div>
+
+                                            </div>
+
+                                        </div>
+                                        <div id="tab-4" 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="username" name="username" placeholder="请填写账号,用于登陆" />
+                                                                <input type="text" autocomplete="off" class="form-control" id="sy_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="password" name="password" placeholder="密码由字母、数字及特殊字符组成且字符个数为8-20"/>
+                                                                <input type="password" autocomplete="off" class="form-control" id="sy_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="re_password" name="re_password" placeholder="密码由字母、数字及特殊字符组成且字符个数为8-20"/>
+                                                                <input autocomplete="off" type="password" class="form-control" id="sy_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="photoImg" src="/static/img/yyzz.png" style="height: 60px;" onclick="$('#imgurl').click()" >
-                                                            <input style="display: none" autocomplete="off" type="file" class="form-control" id="imgurl" name="imgurl" />
+                                                            <label class="control-label spacing"><span class="text-danger">*</span>法人代表证或批文</label>
+                                                            <img id="sy_photoImg" src="/static/img/yyzz.png" style="height: 60px;" onclick="$('#sy_imgurl').click()" >
+                                                            <input style="display: none" autocomplete="off" type="file" class="form-control" id="sy_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="name" name="name" />
+                                                                <input autocomplete="off" type="text" class="form-control" id="sy_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="idCard" name="idCard" />
+                                                                <label class=" control-label spacing td-label">统一社会信用代码</label>
+                                                                <input autocomplete="off" type="text" class="form-control" id="sy_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="legal" name="legal" />
+                                                                <label class=" control-label spacing td-label">法人代表</label>
+                                                                <input autocomplete="off" type="text" class="form-control" id=sy_legal" name="legal" />
                                                             </div>
                                                         </td>
                                                     </tr>
@@ -97,154 +268,98 @@
                                                         <td>
                                                             <div class="rowGroup">
                                                                 <label class=" control-label spacing td-label"><span style="color: red">*</span>所属街道</label>
-                                                                <select class="form-control" id="street" name="street"></select>
+                                                                <select class="form-control" id="sy_street" name="street"></select>
                                                             </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="address" name="address" />
+                                                                <input autocomplete="off" type="text" class="form-control" id="sy_address" name="address" />
                                                             </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="ephone" name="ephone" placeholder="固话格式0595xxxx" />
+                                                                <input autocomplete="off" type="text" class="form-control" id="sy_ephone" name="ephone" placeholder="固话格式0595xxxx" />
                                                             </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="bankCard" name="bankCard" />
+                                                                <label class=" control-label spacing td-label">单位银行账号</label>
+                                                                <input autocomplete="off" type="text" class="form-control" id="sy_bankCard" name="bankCard" />
                                                             </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="bank" name="bank" />
+                                                                <label class=" control-label spacing td-label">单位开户银行</label>
+                                                                <input autocomplete="off" type="text" class="form-control" id="sy_bank" name="bank" />
                                                             </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="bankNetwork" name="bankNetwork" />
+                                                                <label class=" control-label spacing td-label">单位开户银行网点</label>
+                                                                <input autocomplete="off" type="text" class="form-control" id="sy_bankNetwork" name="bankNetwork" />
                                                             </div>
                                                         </td>
                                                         <td>
-                                                            <label class="control-label spacing"><span class="text-danger">*</span>开户许可证</label>
-                                                            <img id="photoImg1" src="/static/img/yyzz.png" style="height: 60px;" onclick="$('#bankImg').click()" >
-                                                            <input style="display: none" autocomplete="off" type="file" class="form-control" id="bankImg" name="bankImg" />
+                                                            <label class="control-label spacing">开户许可证</label>
+                                                            <img id="sy_photoImg1" src="/static/img/yyzz.png" style="height: 60px;" onclick="$('#sy_bankImg').click()" >
+                                                            <input style="display: none" autocomplete="off" type="file" class="form-control" id="sy_bankImg" name="bankImg" />
                                                         </td>
                                                     </tr>
 
                                                 </table>
                                             </div>
-                                            <div class="panel-heading">申报基础信息</div>
-                                            <div class="panel-body">
-                                                <div class="row">
-                                                    <div class="rowGroup" >
-                                                        <label class="col-sm-2 control-label spacing"><span class="text-danger">*</span>申报类型</label>
-                                                        <div class="col-sm-4 spacing">
-                                                            <select class="form-control" id="type" name="type" onchange="Register.typeChange()">
-                                                                <option value="">请选择</option>
-                                                                <option value="1">晋江市现代产业体系人才</option>
-                                                                <option value="2">集成电路优秀人才</option>
-                                                                <!--	<option value="3">海峡计划团队</option>  -->
-                                                            </select>
-                                                        </div>
-                                                    </div>
-                                                </div>
-                                                <div class="row" id="typeGroup" style="display: none">
-                                                    <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>
-                                                                    <select autocomplete="off" type="text" class="form-control" id="industryFieldNew" name="industryFieldNew" onchange="Register.industryChange()"></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="industryFieldOld" name="industryFieldOld">
-                                                                    </select>
-                                                                </div>
-                                                            </td>
-                                                            <td rowspan="2">
-                                                                <label class="control-label spacing">行业领域上传材料 </label>
-                                                                <img id="photoImg2" src="/static/img/yyzz.png" style="height: 60px;" onclick="$('#domainImg').click()" >
-                                                                <input style="display: none" autocomplete="off" type="file" class="form-control" id="domainImg" name="domainImg" />
-                                                            </td>
-                                                        </tr>
-                                                        <tr>
-                                                            <td>
-                                                                <div class="rowGroup">
-                                                                    <label class="control-label spacing td-label"><span style="color: red">*</span>单位标签</label>
-                                                                    <select class="form-control" id="enterpriseTag" name="enterpriseTag">
-                                                                    </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="enterpriseType" name="enterpriseType">
-                                                                    </select>
-                                                                </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">
-                                                    <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="agentName" name="agentName" />
-                                                            </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="agentEmail" name="agentEmail" />
-                                                            </div>
-                                                        </td>
-                                                        <td rowspan="2">
-                                                            <label class="control-label spacing" style="text-align: center">人才联络员备案表<br /><a href="/beianbiao.doc" style="color: red">模板下载</a>  </label>
-                                                            <img id="photoImg3" src="/static/img/yyzz.png" style="height: 60px;" onclick="$('#beian').click()" >
-                                                            <input style="display: none" autocomplete="off" type="file" class="form-control" id="beian" name="beian" />
-                                                        </td>
-                                                    </tr>
-                                                    <tr>
-                                                        <td>
-                                                            <div class="rowGroup form-inline">
-                                                                <label class="control-label spacing td-label"><span style="color: red">*</span>人才联络员手机号</label>
-                                                                <input autocomplete="off" type="text" class="form-control" id="agentPhone" name="agentPhone"  style="width: 60%" />
-                                                                <button id="enterprise_sms_btn" style="margin-bottom: 0px;" onclick="Register.getEnterpriseSms()" type="button" class="btn btn-xs btn-info" style="width: 38%">获取验证码</button>
-                                                            </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="verificationCode" name="verificationCode" />
-                                                            </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">
+                                                <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="agentName" name="agentName" />
+                                                        </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="agentEmail" name="agentEmail" />
+                                                        </div>
+                                                    </td>
+                                                    <td rowspan="2">
+                                                        <label class="control-label spacing" style="text-align: center"><span style="color: red">*</span>人才联络员备案表<br /><a href="/beianbiao.doc" style="color: red">模板下载</a>  </label>
+                                                        <img id="photoImg3" src="/static/img/yyzz.png" style="height: 60px;" onclick="$('#beian').click()" >
+                                                        <input style="display: none" autocomplete="off" type="file" class="form-control" id="beian" name="beian" />
+                                                    </td>
+                                                </tr>
+                                                <tr>
+                                                    <td>
+                                                        <div class="rowGroup form-inline">
+                                                            <label class="control-label spacing td-label"><span style="color: red">*</span>人才联络员手机号</label>
+                                                            <input autocomplete="off" type="text" class="form-control" id="agentPhone" name="agentPhone"  style="width: 60%" />
+                                                            <button id="enterprise_sms_btn" style="margin-bottom: 0px;" onclick="Register.getEnterpriseSms()" type="button" class="btn btn-xs btn-info" style="width: 38%">获取验证码</button>
+                                                        </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="verificationCode" name="verificationCode" />
+                                                        </div>
+                                                    </td>
+                                                </tr>
+                                            </table>
 
-                                        </form>
 
+                                        </div>
                                     </div>
-
+                                    </form>
                                 </div>
 
+
                             </div>
                             <div id="tab-2" class="tab-pane">
                                 <input type="hidden" id="ps_source"  value="1">
@@ -340,7 +455,8 @@
     </div>
 </div>
 <iframe id="hiddenIframe" name="hiddenIframe" style="display: none;"></iframe>
-
-<script src="/static/js/register.js?v=14"></script>
+<script type="text/javascript">
+    document.write('<script src="/static/js/register.js?v='+(new Date()).getTime()+'"><\/script>');
+</script>
 
 {/block}

+ 2 - 2
app/enterprise/controller/Api.php

@@ -165,7 +165,7 @@ class Api extends EnterpriseController {
                     'state' => 1,
                     'step' => 100,
                     'stateChange' => '保存未提交',
-                    'description' => '企业信息变更记录添加成功',
+                    'description' => '机构信息变更记录添加成功',
                     'createTime' => date("Y-m-d H:i:s",time()),
                     'createUser' => '用户'
                 ];
@@ -219,7 +219,7 @@ class Api extends EnterpriseController {
                     'state' => 1,
                     'step' => 100,
                     'stateChange' => '保存未提交',
-                    'description' => '企业信息变更记录修改成功',
+                    'description' => '机构信息变更记录修改成功',
                     'createTime' => date("Y-m-d H:i:s",time()),
                     'createUser' => '用户'
                 ];

+ 2 - 2
app/enterprise/view/api/to_detail.html

@@ -42,7 +42,7 @@
             <div id="tab-1" class="tab-pane active">
               <div class="panel-body">
                 <div class="panel panel-default">
-                  <div class="panel-heading" onclick="$(this).next().toggle()">变更前企业信息</div>
+                  <div class="panel-heading" onclick="$(this).next().toggle()">变更前机构信息</div>
                   <div class="panel-body">
                     <form id="ecr_form1" class="form-horizontal" target="hiddenIframe" action="" method="post" enctype="multipart/form-data">
                       <input type="text" class="form-control" id="id" name="id" value="{$ecr.id}" style="display: none;"/>
@@ -134,7 +134,7 @@
                   </div>
                 </div>
                 <div class="panel panel-default">
-                  <div class="panel-heading" onclick="$(this).next().toggle()">变更后企业信息</div>
+                  <div class="panel-heading" onclick="$(this).next().toggle()">变更后机构信息</div>
                   <div class="panel-body">
                     <form id="ecr_form2" class="form-horizontal" target="hiddenIframe" action="" method="post" enctype="multipart/form-data">
                       <div class="col-sm-12 ">

+ 72 - 58
app/enterprise/view/index/center_page.html

@@ -6,16 +6,28 @@
         padding-right: 4px;
         padding-left: 4px;
     }
+    table {
+        word-wrap: break-word;
+        word-break: break-all
+    }
 
     .layui-layer-btn .layui-layer-btn1 {
         border-color: #009688;
         background-color: #009688;
         color: #fff;
     }
+    .key{
+        width: 150px;
+        text-align: right;
+        background-color: #f0f9eb;
+    }
+    .value1{
+        width: 240px;
+    }
 </style>
 <div class="ibox float-e-margins">
     <div class="ibox-title">
-        <h5>企业用户中心</h5>
+        <h5>机构用户中心</h5>
     </div>
     <div class="ibox-content">
         <div class="form-horizontal">
@@ -24,7 +36,7 @@
                     <div class="tabs-container">
                         <ul class="nav nav-tabs">
                             <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">基本信息</a></li>
-                            <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">企业信息变更</a></li>
+                            <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">机构信息变更</a></li>
                             <li class=""><a data-toggle="tab" href="#tab-3" aria-expanded="false">修改密码</a></li>
                             <!--              <li class="" ><a data-toggle="tab" href="#tab-4" aria-expanded="false">绑定聚才网账号</a></li>-->
                         </ul>
@@ -34,52 +46,56 @@
                                     <div class="panel panel-default">
                                         <div class="panel-heading">单位信息</div>
                                         <div class="panel-body">
+                                            <div class="col-sm-12 ">
+                                                <div class="row">
+                                                    <label class="col-sm-1 control-label spacing">账号</label>
+                                                    <div class="col-sm-4 spacing ">
+                                                        <p class="form-control" style="border: none">{$ep.username}</p>
+
+                                                    </div>
+                                                </div>
+                                            </div>
                                             <table style="width:100%" class="table table-bordered">
                                                 <tr>
-                                                    <td>
+                                                    <td class="key">
                                                         账号
                                                     </td>
-                                                    <td>
+                                                    <td class="value1">
                                                         {$ep.username}
                                                     </td>
-                                                    <td>
+                                                    <td class="key">
                                                         单位名称
                                                     </td>
-                                                    <td>
+                                                    <td class="value1" style="border-right: 1px solid #c0a16b">
                                                         {$ep.name}
                                                     </td>
-
-                                                    <td>
-                                                        营业执照
+                                                    <td rowspan="4"  style="border: 1px solid #c0a16b">
+                                                        <label>营业执照</label><img onclick="Feng.showImg(this)" id="yyzz" alt="营业执照" src="{$ep.imgurl|getStoragePath}"
+                                                                                        style="max-width: 100px;">
                                                     </td>
                                                 </tr>
                                                 <tr>
-                                                    <td>
+                                                    <td class="key">
                                                         统一社会信用代码
                                                     </td>
                                                     <td>
                                                         {$ep.idCard}
                                                     </td>
-                                                    <td>
+                                                    <td class="key">
                                                         法人代表
                                                     </td>
                                                     <td>
                                                         {$ep.legal}
                                                     </td>
-
-                                                    <td rowspan="3">
-                                                        <img onclick="Feng.showImg(this)" id="yyzz" alt="营业执照" src="{$ep.imgurl|getStoragePath}"
-                                                             style="max-width: 100px;">
-                                                    </td>
                                                 </tr>
                                                 <tr>
-                                                    <td>
+                                                    <td class="key">
                                                         所属街道
                                                     </td>
                                                     <td>
                                                         {$ep.streetName}
                                                     </td>
-                                                    <td>
+                                                    <td class="key">
                                                         单位电话
                                                     </td>
                                                     <td>
@@ -88,7 +104,7 @@
                                                 </tr>
                                                 <tr>
 
-                                                    <td>
+                                                    <td class="key">
                                                         单位地址
                                                     </td>
                                                     <td colspan="3">
@@ -96,33 +112,31 @@
                                                     </td>
                                                 </tr>
                                                 <tr>
-                                                    <td>
+                                                    <td class="key">
                                                         企业银行账号
                                                     </td>
                                                     <td>
                                                         {$ep.bankCard}
                                                     </td>
-                                                    <td>
+                                                    <td class="key">
                                                         企业开户银行
                                                     </td>
-                                                    <td>
+                                                    <td style="border-right: 1px solid #c0a16b">
                                                         {$ep.bank}
                                                     </td>
-                                                    <td>
-                                                        开户许可证
+                                                    <td rowspan="2" style="border: 1px solid #c0a16b">
+                                                        <label>开户许可证</label>
+                                                        <img onclick="Feng.showImg(this)" id="bankImg" alt="开户许可证"
+                                                             src="{$ep.bankImg|getStoragePath}" style="max-width: 100px;">
                                                     </td>
                                                 </tr>
                                                 <tr>
-                                                    <td>
+                                                    <td class="key">
                                                         企业开户银行网点
                                                     </td>
                                                     <td colspan="3">
                                                         {$ep.bankNetwork}
                                                     </td>
-                                                    <td>
-                                                        <img onclick="Feng.showImg(this)" id="bankImg" alt="开户许可证"
-                                                             src="{$ep.bankImg|getStoragePath}" style="max-width: 100px;">
-                                                    </td>
                                                 </tr>
                                             </table>
 
@@ -133,51 +147,48 @@
                                     <div class="panel panel-default">
                                         <div class="panel-heading">申报信息</div>
                                         <div class="panel-body">
-                                            <table style="width:100%" class="table table-bordered">
-                                                <tr>
-                                                    <td colspan="5" align="center">
-                                                        申报类型:
-                                                        {switch name="ep.type"}
-                                                        {case value="1"}晋江市现代产业体系人才{/case}
-                                                        {case value="2"}集成电路优秀人才{/case}
-                                                        {/switch}
-                                                        <input type="hidden" id="type" value="{$ep.type}">
-                                                    </td>
-                                                </tr>
+                                            <p>
+                                                申报类型:
+                                                {switch name="ep.type"}
+                                                {case value="1"}晋江市现代产业体系人才{/case}
+                                                {case value="2"}集成电路优秀人才{/case}
+                                                {/switch}
+                                                <input type="hidden" id="type" value="{$ep.type}">
+                                            </p>
+                                            <table style="width:100%;table-layout:fixed;" class="table table-bordered">
+
                                                 <tr class="type1">
-                                                    <td>
+                                                    <td  class="key">
                                                         产业领域
                                                     </td>
-                                                    <td>
+                                                    <td class="value1">
                                                         {$ep.industryFieldNewName}
                                                     </td>
-                                                    <td>
+                                                    <td  class="key">
                                                         行业领域
                                                     </td>
-                                                    <td>
+                                                    <td class="value1" style="border-right: 1px solid #c0a16b">
                                                         {$ep.industryFieldOldName}
                                                     </td>
-                                                    <td>
-                                                        行业领域佐证材料
+                                                    <td rowspan="2" style="border: 1px solid #c0a16b">
+                                                        <label>行业领域佐证材料</label>
+                                                        <img onclick="Feng.showImg(this)" id="domainImg" alt="行业领域佐证材料"
+                                                                             src="{$ep.domainImg|getStoragePath}" style="max-width: 100px;">
                                                     </td>
                                                 </tr>
                                                 <tr class="type1">
-                                                    <td>
+                                                    <td  class="key">
                                                         单位标签
                                                     </td>
                                                     <td>
                                                         {$ep.enterpriseTagName}
                                                     </td>
-                                                    <td>
+                                                    <td  class="key">
                                                         单位类型
                                                     </td>
                                                     <td>
                                                         {$ep.enterpriseTypeName}
                                                     </td>
-                                                    <td>
-                                                        <img onclick="Feng.showImg(this)" id="domainImg" alt="行业领域佐证材料"
-                                                             src="{$ep.domainImg|getStoragePath}" style="max-width: 100px;">
-                                                    </td>
                                                 </tr>
                                             </table>
                                         </div>
@@ -189,31 +200,34 @@
                                         <div class="panel-body">
                                             <table style="width:100%" class="table table-bordered">
                                                 <tr>
-                                                    <td>
+                                                    <td class="key">
                                                         姓名
                                                     </td>
-                                                    <td>
+                                                    <td class="value1">
                                                         {$ep.agentName}
                                                     </td>
-                                                    <td>
+                                                    <td class="key">
                                                         人才联络员电话
                                                     </td>
                                                     <td>
                                                         {$ep.agentPhone}
                                                     </td>
-                                                    <td>
+                                                </tr>
+                                                <tr>
+                                                    <td class="key">
                                                         人才联络员邮箱
                                                     </td>
-                                                    <td>
+                                                    <td class="value1">
                                                         {$ep.agentEmail}
                                                     </td>
-                                                    <td>
+                                                    <td class="key">
                                                         人才联络员信息备案表
                                                     </td>
                                                     <td>
                                                         <button type="button" onclick="Feng.showFile('{$ep.beian|getFileView}','beian')">点击查看</button>
                                                     </td>
                                                 </tr>
+
                                             </table>
                                         </div>
                                     </div>

+ 225 - 88
public/static/js/register.js

@@ -1,9 +1,52 @@
 var Register = {
     registData: {},
     validateFields: {
+        username: {validators: {notEmpty: {message: '登录账号不能为空'}}},
+        name: {validators: {notEmpty: {message: '单位/企业名称不能为空'},regexp:{regexp:/^[\u4e00-\u9fa5]{1,100}$/,message:"单位/企业名称只允许中文"}}},
+        //idCard: {validators: {notEmpty: {message: '统一社会信用代码不能为空'}}},
+        agentName: {validators: {notEmpty: {message: '人才联络员不能为空'}}},
+        agentPhone: {
+            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: "人才联络员手机号格式不合法"
+                }
+            }
+        },
+        verificationCode: {validators: {notEmpty: {message: '手机验证码不能为空'}}},
+        //legal: {validators: {notEmpty: {message: '法人代表不能为空'},regexp:{regexp:/^[\u4e00-\u9fa5]{1,50}$/,message:"法人代表只允许中文"}}},
+        street: {validators: {notEmpty: {message: '所属街道不能为空'}}},
+        address: {validators: {notEmpty: {message: '单位/企业地址不能为空'}}},
+        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: "单位/企业电话格式不合法"
+                }
+            }
+        },
+        agentEmail: {
+            validators: {
+                notEmpty: {
+                    message: '电子邮箱不能为空'
+                },
+                regexp: {
+                    regexp: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
+                    message: "电子邮箱格式不正确"
+                }
+            }
+        },
+        //bankCard: {validators: {notEmpty: {message: '企业银行账号不能为空'}}},
+        //bankNetwork: {validators: {notEmpty: {message: '企业开户银行网点不能为空'}}},
+        //bank: {validators: {notEmpty: {message: '企业开户银行不能为空'}}}
+    },
+    sy_validateFields: {
         username: {validators: {notEmpty: {message: '登录账号不能为空'}}},
         name: {validators: {notEmpty: {message: '单位名称不能为空'},regexp:{regexp:/^[\u4e00-\u9fa5]{1,100}$/,message:"单位名称只允许中文"}}},
-        idCard: {validators: {notEmpty: {message: '统一社会信用代码不能为空'}}},
         agentName: {validators: {notEmpty: {message: '人才联络员不能为空'}}},
         agentPhone: {
             validators: {
@@ -16,7 +59,6 @@ var Register = {
             }
         },
         verificationCode: {validators: {notEmpty: {message: '手机验证码不能为空'}}},
-        legal: {validators: {notEmpty: {message: '法人代表不能为空'},regexp:{regexp:/^[\u4e00-\u9fa5]{1,50}$/,message:"法人代表只允许中文"}}},
         street: {validators: {notEmpty: {message: '所属街道不能为空'}}},
         address: {validators: {notEmpty: {message: '单位地址不能为空'}}},
         ephone: {
@@ -39,10 +81,7 @@ var Register = {
                     message: "电子邮箱格式不正确"
                 }
             }
-        },
-        bankCard: {validators: {notEmpty: {message: '企业银行账号不能为空'}}},
-        bankNetwork: {validators: {notEmpty: {message: '企业开户银行网点不能为空'}}},
-        bank: {validators: {notEmpty: {message: '企业开户银行不能为空'}}}
+        }
     }
 };
 
@@ -53,6 +92,7 @@ var psSmsBtn = $("#ps_sms_btn");
 var lock = false;
 
 Register.addSubmit = function() {
+
     var regType = $(".active").attr("regType");
     if (regType == "en") {                                                          //企业用户注册
         Register.enterpriseUserRegister();
@@ -65,38 +105,89 @@ Register.addSubmit = function() {
  * 验证数据
  */
 Register.validate = function () {
+
     $('#ep_form').data("bootstrapValidator").resetForm();
     $('#ep_form').bootstrapValidator('validate');
     return $("#ep_form").data('bootstrapValidator').isValid();
 }
 
 
+
 var isDis = false;
 Register.enterpriseUserRegister = function() {
+
+    var special = $("#ep_form .active").attr("special");
+    $("#special").val(special)
+    $('#ep_form').bootstrapValidator({
+        feedbackIcons: {
+            valid: 'glyphicon glyphicon-ok',
+            invalid: 'glyphicon glyphicon-remove',
+            validating: 'glyphicon glyphicon-refresh'
+        },
+        group:'.rowGroup',
+        fields: Register.validateFields,
+        live: 'enabled',
+        message: '该字段不能为空'
+    });
+    if(special == "qiye"){
+        $('#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: '开户银行账号不能为空'}}});
+        $('#ep_form').bootstrapValidator("addField","bankNetwork",{validators: {notEmpty: {message: '开户银行网点不能为空'}}});
+        $('#ep_form').bootstrapValidator("addField","bank",{validators: {notEmpty: {message: '开户银行不能为空'}}});
+        var prefix = '企业';
+    }else{
+        $('#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 = '单位';
+    }
+
+
     if(!Register.validate()){
+
         return ;
     }
+
+
     isDis = $("#type").prop("disabled");
     var source = $("#source").val();
-    var username = $("#username").val();
-    var password = $("#password").val();
-    var rePassword = $("#re_password").val();
-    var name = $("#name").val();
-    var idCard = $("#idCard").val();
+    if(special == "qiye"){
+        var username = $("#username").val();
+        var password = $("#password").val();
+        var rePassword = $("#re_password").val();
+        var name = $("#name").val();
+        var idCard = $("#idCard").val();
+        var legal = $("#legal").val();
+        var street = $("#street").val();
+        var address = $("#address").val();
+        var ephone = $("#ephone").val();
+    }else{
+        var username = $("#sy_username").val();
+        var password = $("#sy_password").val();
+        var rePassword = $("#sy_re_password").val();
+        var name = $("#sy_name").val();
+        var street = $("#sy_street").val();
+        var address = $("#sy_address").val();
+        var ephone = $("#sy_ephone").val();
+    }
+
+
+
+
     var agentName = $("#agentName").val();
     var agentPhone = $("#agentPhone").val();
     var verificationCode = $("#verificationCode").val();
-    var legal = $("#legal").val();
-    var street = $("#street").val();
-    var address = $("#address").val();
+
     if(isDis){
         $("#type").removeAttr("disabled");
     }
     var type = $("#type").val();
     var agentEmail = $("#agentEmail").val();
-    var talentType = $("#talentType").val();
     var enterpriseTag = $("#enterpriseTag").val();
-    var ephone = $("#ephone").val();
+
     var industryFieldNew = $("#industryFieldNew").val();
     var bankCard = $("#bankCard").val();
     var bank = $("#bank").val();
@@ -128,29 +219,112 @@ Register.enterpriseUserRegister = function() {
         }
     }
     if (name==null || name=='') {
-        Feng.info("请填写单位名称!");
+        Feng.info("请填写"+prefix+"名称!");
         return;
     }
     if(!/^[\u4e00-\u9fa5]{1,100}$/.test(name)){
-        Feng.info("单位名称只能输入中文 !");
+        Feng.info(prefix+"名称只能输入中文 !");
         return;
     }
     if (name.length > 100) {
-        Feng.info("单位名称最多100个字符!");
+        Feng.info(prefix+"名称最多100个字符!");
         return;
     }
-    if (idCard==null || idCard=='') {
-        Feng.info("请填写统一社会信用代码!");
+    if(ephone == null || ephone==''){
+        Feng.info("请填写"+prefix+"电话");
         return;
     }
-    if (type==null || type=='') {
-        Feng.info("请选择申报类型!");
+
+    if (street==null || street=='') {
+        Feng.info("请选择所属街道!");
         return;
     }
-    if (idCard.length > 40) {
-        Feng.info("统一社会信用代码最多40个字符!");
+
+    if (address==null || address=='') {
+        Feng.info("请填写单位地址!");
         return;
     }
+
+    if(special == "qiye"){
+        if ((idCard==null || idCard=='')) {
+            Feng.info("请填写统一社会信用代码!");
+            return;
+        }
+        if (idCard.length > 40) {
+            Feng.info("统一社会信用代码最多40个字符!");
+            return;
+        }
+
+        if (legal==null || legal=='') {
+            Feng.info("请填写法人代表!");
+            return;
+        }
+
+        if(!/^[\u4e00-\u9fa5]{1,50}$/.test(legal)){
+            Feng.info("法人代表只能输入中文 !");
+            return;
+        }
+
+        if (type==null || type=='') {
+            Feng.info("请选择申报类型!");
+            return;
+        }
+
+        if(type==null || type==''){
+            Feng.info("请选择企业类别");
+            return ;
+        }
+
+        if (bankCard==null || bankCard=='') {
+            Feng.info("请填写企业银行账号!");
+            return;
+        }
+        if (bank==null || bank=='') {
+            Feng.info("请填写企业开户银行!");
+            return;
+        }
+        if (bankNetwork==null || bankNetwork=='') {
+            Feng.info("请填写企业开户银行网点");
+            return;
+        }
+
+        if(type==1 ){
+            if(enterpriseTag==null||enterpriseTag==''){
+                Feng.info("请选择单位标签!");
+                return;
+            }
+            if(industryFieldNew == null || industryFieldNew ==''){
+                Feng.info("请选择产业领域");
+                return ;
+            }
+        }
+
+        var x=document.getElementById("imgurl").value;
+        if(x==""){
+            Feng.info("请上传营业执照照片!");
+            return;
+        }
+
+        var xx=document.getElementById("bankImg").value;
+        if(xx==""){
+            Feng.info("请上传开户银行许可证!");
+            return;
+        }
+        var xxx=document.getElementById("domainImg").value;
+        if(xxx=="" && type == 1){
+            Feng.info("请上传行业领域佐证材料!");
+            return;
+        }
+
+    }else{
+        var x=document.getElementById("sy_imgurl").value;
+        if(x==""){
+            Feng.info("请上传法人证或批文!");
+            return;
+        }
+    }
+
+
     if (agentName==null || agentName=='') {
         Feng.info("请填写人才联络员!");
         return;
@@ -163,82 +337,25 @@ Register.enterpriseUserRegister = function() {
         Feng.info("请填写人才联络员电话!");
         return;
     }
-    if(ephone == null || ephone==''){
-        Feng.info("请填写单位电话");
-        return;
-    }
+
     if (verificationCode==null || verificationCode=='') {
         Feng.info("请填写手机验证码!");
         return;
     }
-    if (legal==null || legal=='') {
-        Feng.info("请填写法人代表!");
-        return;
-    }
-    if(!/^[\u4e00-\u9fa5]{1,50}$/.test(legal)){
-        Feng.info("法人代表只能输入中文 !");
-        return;
-    }
-    if (street==null || street=='') {
-        Feng.info("请选择所属街道!");
-        return;
-    }
-    if (address==null || address=='') {
-        Feng.info("请填写单位地址!");
-        return;
-    }
-    if(type==null || type==''){
-        Feng.info("请选择企业类别");
-        return ;
-    }
+
     if (agentEmail==null || agentEmail=='') {
         Feng.info("请填写电子邮箱!");
         return;
     }
-    if (bankCard==null || bankCard=='') {
-        Feng.info("请填写企业银行账号!");
-        return;
-    }
-    if (bank==null || bank=='') {
-        Feng.info("请填写企业开户银行!");
-        return;
-    }
-    if (bankNetwork==null || bankNetwork=='') {
-        Feng.info("请填写企业开户银行网点");
-        return;
-    }
-    if(type==1 ){
-        if(enterpriseTag==null||enterpriseTag==''){
-            Feng.info("请选择单位标签!");
-            return;
-        }
-        if(industryFieldNew == null || industryFieldNew ==''){
-            Feng.info("请选择产业领域");
-            return ;
-        }
-    }
-    var x=document.getElementById("imgurl").value;
-    if(x==""){
-        Feng.info("请上传营业执照照片!");
-        return;
-    }
-    var xx=document.getElementById("bankImg").value;
-    if(xx==""){
-        Feng.info("请上传开户银行许可证!");
-        return;
-    }
-    var xxx=document.getElementById("domainImg").value;
-    if(xxx=="" && type == 1){
-        Feng.info("请上传行业领域佐证材料!");
-        return;
-    }
+
+
     var xxxx=document.getElementById("beian").value;
     if(xxxx==""){
         Feng.info("请上传人才联络员信息备案表!");
         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(prefix+"电话格式不合法!");
         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)){
@@ -448,6 +565,7 @@ $(function(){
         live: 'enabled',
         message: '该字段不能为空'
     });
+
     var userType = Feng.getUrlValue("userType");
     var username = Feng.getUrlValue("username");
     var name = Feng.getUrlValue("name");
@@ -479,7 +597,8 @@ $(function(){
         {"name":"street","code":"street"},
         {"name":"enterpriseTag","code":"enterprise_tag"},
         {"name":"industryFieldNew","code":"industry_field"},
-        {"name":"enterpriseType","code":"enterprise_type"}];
+        {"name":"enterpriseType","code":"enterprise_type"},
+        {"name":"sy_street","code":"street"}];
     Feng.findChildDictBatch(JSON.stringify(arr));
     $("#imgurl").change(function (e) {
         var tag = e.target;
@@ -499,6 +618,24 @@ $(function(){
             }
         };
     });
+    $("#sy_imgurl").change(function (e) {
+        var tag = e.target;
+        var file = tag.files[0];
+        var imgSrc;
+        var reader = new FileReader();
+        reader.readAsDataURL(file);
+        reader.onload = function() {
+            var src = $("#sy_imgurl").val();
+            var sn = src.lastIndexOf(".");
+            var suffix = src.substring(sn+1,src.length);
+            if(suffix == 'pdf' || suffix == 'PDF'){
+                $("#sy_photoImg").attr("src", Feng.ctxPath + "/static/img/Pdf.png");
+            }else{
+                imgSrc = this.result;
+                $("#sy_photoImg").attr("src", imgSrc);
+            }
+        };
+    });
     $("#bankImg").change(function (e) {
         var tag = e.target;
         var file = tag.files[0];

+ 1 - 1
public/static/modular/enterprise/enterprisechangeRecord/ep_change_record_examine.js

@@ -36,7 +36,7 @@ examine.toggleField = function () {
     var checkMsg = $("#checkMsg").val();
     if(checkState==4){
         if(checkMsg == null || checkMsg == ''){
-            $("#checkMsg").val("企业信息变更审核通过。");
+            $("#checkMsg").val("机构信息变更审核通过。");
         }
     }else{
         $("#checkMsg").val("");

+ 4 - 13
public/static/modular/gate/enterprise/enterprise_center.js

@@ -103,7 +103,7 @@ EnterpriseCenter.addEnterprisechangeRecord = function() {
 		if (data==null || data.length==0) {
 		    var index = layer.open({
 		        type: 2,
-		        title: '申请企业信息变更',
+		        title: '申请机构信息变更',
 		        area: ['930px', '600px'], //宽高
 		        fix: false, //不固定
 		        maxmin: true,
@@ -145,7 +145,7 @@ EnterpriseCenter.updateEnterprisechangeRecord = function() {
 	}
     var index = layer.open({
         type: 2,
-        title: '申请企业信息变更',
+        title: '申请机构信息变更',
         area: ['930px', '600px'], //宽高
         fix: false, //不固定
         maxmin: true,
@@ -185,7 +185,7 @@ EnterpriseCenter.showEnterprisechangeRecordDetail = function() {
 	}
     var index = layer.open({
         type: 2,
-        title: '企业信息变更详情',
+        title: '机构信息变更详情',
         area: ['930px', '600px'], //宽高
         fix: false, //不固定
         maxmin: true,
@@ -291,14 +291,5 @@ $(function () {
     if(type==1){
     	$("#talentType,#industryFieldNewName,#industryFieldOldName").parent().parent().attr("style","display:block");
 	}
-	var photoImg = $("#photoImg").attr("src");
-	var oldSn = photoImg.lastIndexOf(".");
-	var oldSuffix = photoImg.substring(oldSn+1,photoImg.length);
-	if(oldSuffix == 'pdf' || oldSuffix == 'PDF'){
-		$("#photoImg").attr("src", Feng.ctxPath + "/static/img/Pdf.png");
-		$("#photoImg").removeAttr("onclick");
-		$("#photoImg").click(function () {
-			Feng.showPdf(photoImg);
-		})
-	}
+
 });