Browse Source

更新一些界面

sandm 2 years ago
parent
commit
a47ed6e81a

+ 57 - 0
app/common/controller/Auth.php

@@ -210,6 +210,63 @@ class Auth extends BaseController
         return view("",['msg' => $msg, 'ep' => $ep]);
     }
 
+    public function findBackPassword(){
+        $type = intval($this->request['type']);
+        if(\StrUtil::isEmpOrNull($type)){
+            return json(['msg' => '请选择账号类型','code' => 500]);
+        }
+        $username = \StrUtil::getRequestDecodeParam($this->request,'username');
+        if(\StrUtil::isEmpOrNull($username)){
+            return json(['msg' => '请填写账号','code' => 500]);
+        }
+        $password = \StrUtil::getRequestDecodeParam($this->request,'password');
+        if(\StrUtil::isEmpOrNull($password)){
+            return json(['msg' => '请填写新密码','code' => 500]);
+        }
+        $rePassword = \StrUtil::getRequestDecodeParam($this->request,'rePassword');
+        if(\StrUtil::isEmpOrNull($rePassword)){
+            return json(['msg' => '请填写重复新密码','code' => 500]);
+        }
+        if($password != $rePassword){
+            return json(['msg' => '两次密码填写不一致','code' => 500]);
+        }
+        if(!preg_match("/^(?=.*\d)(?=.*[A-Za-z]).{8,}$/",$password)){
+            return json(['msg' => '密码必须包含字母、数字、特殊字符且长度超过8位','code' => 500]);
+        }
+        $phone = \StrUtil::getRequestDecodeParam($this->request,'phone');
+        if(\StrUtil::isEmpOrNull($phone)){
+            return json(['msg' => '请填写手机号','code' => 500]);
+        }
+        $verificationCode = \StrUtil::getRequestDecodeParam($this->request,'verificationCode');
+        if(\StrUtil::isEmpOrNull($verificationCode)){
+            return json(['msg' => '请填写验证码','code' => 500]);
+        }
+        //检验验证码
+        $codeResult = MessageRecord::where('smsType',1)->where('phone',$phone)->order('createTime','desc')->find();
+        if(!$codeResult || (time() - strtotime($codeResult['sendingDate']) > 300) ){
+            return json(['msg' => '请先发送验证码','code' => 500]);
+        }
+        if($codeResult['params'] != $verificationCode){
+            return json(['msg' => '验证码不正确','code' => 500]);
+        }
+        $password = hash('md5',$password);
+        if($type == 1){
+            $count = \app\common\model\Enterprise::where('username',$username)->where('agentPhone',$phone)->count();
+            if($count == 0){
+                return json(['msg' => '未找到相关账号,请仔细核对账号及手机号信息!','code' => 500]);
+            }
+            if($count > 1){
+                return json(['msg' => '找到多个账户,请联系相关单位处理!','code' => 500]);
+            }
+            $ep = \app\common\model\Enterprise::where('username',$username)->where('agentPhone',$phone)->find();
+            $ep->password = $password;
+            $ep->save();
+        }else{
+            //个人账户找回密码TODO
+        }
+        return json(['msg' => '找回密码成功!','code' => 200]);
+    }
+
     public function verificationCode()
     {
         $phone = $this->request["phone"];

+ 9 - 7
app/enterprise/view/base/first.html

@@ -237,7 +237,7 @@
                                             <tr class="talentType1-2" style="display: none">
                                                 <td >
                                                     <div class="rowGroup">
-                                                        <label class=" control-label spacing td-label"><span style="color: red">*</span><span id="talentType_first" style="display: none">首次在我市</span>在我市缴交社会保险或个人所得税月份</label>
+                                                        <label class=" control-label spacing td-label"><span style="color: red">*</span><span id="talentType_first" style="display: none">首次在我市</span>缴交社会保险或个人所得税月份</label>
                                                         <input type="text" class="form-control rangemonth" id="tax_insurance_month" name="tax_insurance_month" value="{$row.tax_insurance_month}"/>
                                                     </div>
                                                 </td>
@@ -262,19 +262,21 @@
                                                 </td>
                                             </tr>
                                             {if condition="in_array($row['enterprise']['enterpriseTag'],['mtdw','gyqyh','mbfqy','jrjg'])"}
-                                            <tr>
+                                            <tr style="display:none" id="come_in_jin">
                                                 <td>
                                                     <div class="rowGroup">
-                                                        <label class="control-label spacing td-label"><span style="color: red">*</span>{if condition="$row['talent_type'] eq 1"}近三年{else/}首次{/if}来晋工作时间</label>
+                                                        <label class="control-label spacing td-label">{if condition="$row['talent_type'] eq 1"}近三年{else/}首次{/if}来晋工作时间</label>
                                                         <input type="text" class="form-control date" id="fst_work_time" name="fst_work_time" value="{$row.fst_work_time}"/>
                                                     </div>
                                                 </td>
+                                                <td id="come_in_jin_str">
+                                                    <label class=" control-label spacing td-label">说明</label>
+                                                    <div class="word-wrap">
+                                                        如您为近三年来晋工作的人才,须填写近三年来晋日期,同时上传对应佐证材料,如果来晋时间已超过三年,则此项不必填写。
+                                                    </div>
+                                                </td>
                                             </tr>
                                             {/if}
-                                            <tr>
-
-                                            </tr>
-
                                         </table>
                                     </div>
                                     <div class="panel-body">

+ 6 - 7
app/enterprise/view/index/center_page.html

@@ -209,9 +209,13 @@
                                                     <td class="key">
                                                         人才联络员电话
                                                     </td>
-                                                    <td>
+                                                    <td class="value1" style="border-right: 1px solid #c0a16b">
                                                         {$ep.agentPhone}
                                                     </td>
+                                                    <td rowspan="2" style="border: 1px solid #c0a16b">
+                                                        <label>人才联络员信息备案表</label>
+                                                        <button type="button" onclick="Feng.showFile('{$ep.beian|getFileView}','beian')">点击查看</button>
+                                                    </td>
                                                 </tr>
                                                 <tr>
                                                     <td class="key">
@@ -220,12 +224,7 @@
                                                     <td class="value1">
                                                         {$ep.agentEmail}
                                                     </td>
-                                                    <td class="key">
-                                                        人才联络员信息备案表
-                                                    </td>
-                                                    <td>
-                                                        <button type="button" onclick="Feng.showFile('{$ep.beian|getFileView}','beian')">点击查看</button>
-                                                    </td>
+                                                    <td colspan="2"></td>
                                                 </tr>
 
                                             </table>

+ 15 - 1
app/enterprise/view/talent/second.html

@@ -358,7 +358,20 @@
                                     <tr>
                                         <td>
                                             <div class="rowGroup">
-                                                <label class="control-label spacing"><span style="color: red">*</span>专业技术职称</label>
+                                                <label class="control-label spacing">职称技术资格</label>
+                                                <input type="text" class="form-control" id="pro_qua" name="pro_qua" value="{$row.pro_qua}"/>
+                                            </div>
+                                        </td>
+                                        <td rowspan="3" style="width: 100%">
+                                            <table class="fileTable"></table>
+                                        </td>
+                                    </tr>
+                                </table>
+                                <table style="width: 100%;border-collapse: collapse;" class="table table-bordered">
+                                    <tr>
+                                        <td>
+                                            <div class="rowGroup">
+                                                <label class="control-label spacing">专业技术职称</label>
                                                 <input type="text" class="form-control" id="professional" name="professional" value="{$row.professional}"/>
                                             </div>
                                         </td>
@@ -367,6 +380,7 @@
                                         </td>
                                     </tr>
                                 </table>
+
                                 <table style="width: 100%;border-collapse: collapse;" class="table table-bordered">
                                     <tr>
                                         <td colspan="3">

+ 2 - 2
app/index/view/auth/login.html

@@ -205,7 +205,7 @@
                             return;
                         }
                         var da = {"type": type, "username": username, "password": password, "rePassword": rePassword, "phone": phone, "verificationCode": verificationCode};
-                        var ajax = new $ax(Feng.ctxPath + "/api/common/findBackPassword", function (data) {
+                        var ajax = new $ax(Feng.ctxPath + "/common/auth/findBackPassword", function (data) {
                             Feng.info(data.msg);
                             if (data.code == 200) {
                                 layer.close(index);
@@ -232,7 +232,7 @@
                     return;
                 }
                 Login.BtnCountDown();
-                var ajax = new $ax(Feng.ctxPath + "/api/common/verificationCode?phone=" + phone + "&type=1", function (data) {
+                var ajax = new $ax(Feng.ctxPath + "/common/auth/verificationCode?phone=" + phone + "&type=1", function (data) {
                     Feng.info(data.msg);
                 }, function (data) {
                     Feng.error("操作失败!" + data.responseJSON.message + "!");

+ 1 - 1
public/static/modular/gate/talentAllowance/common/talentAllowance_patch.js

@@ -334,7 +334,7 @@ TalentAllowanceInfoDlg.initFileTypeColumn = function () {
         {title: '模板', field: 'templateUrl', visible: true, align: 'center', valign: 'middle',width:"8%",
             formatter : function(value,row,index){
                 if(value==null||value==''||value=='null'){
-                    return '';
+                    return '';
                 }
                 return "<button type='button' onclick=\"Feng.downloadFile('"+row.id+"',3)\" style='margin-right: 10px' class=\"btn btn-xs btn-primary\">" +
                     "<i class=\"fa fa-download\"></i>下载" +

+ 6 - 0
public/static/modular/gate/talentBase/talentInfo_info.js

@@ -395,6 +395,8 @@ TalentInfoInfoDlg.talentTypeChange = function () {
                 $('#talentInfoForm').bootstrapValidator('removeField', "pre_import_type");
             }
             text = $("#fst_work_time").length > 0 ? $("#fst_work_time").prev("label").html().replace(/首次/, "近三年") : "";
+            $("#come_in_jin").length > 0 ? $("#come_in_jin").css('display','table-row') : "";
+            $("#come_in_jin_str").length > 0 ? $("#come_in_jin_str").css('display','table-cell') : "";
             break;
         case "2":
             TalentInfoInfoDlg.talentTypeOneTwo = true;
@@ -414,6 +416,8 @@ TalentInfoInfoDlg.talentTypeChange = function () {
                 $('#talentInfoForm').bootstrapValidator('removeField', "pre_import_type");
             }
             text = $("#fst_work_time").length > 0 ? $("#fst_work_time").prev("label").html().replace(/近三年/, "首次") : "";
+            $("#come_in_jin").length > 0 ? $("#come_in_jin").css('display','table-row') : "";
+            $("#come_in_jin_str").length > 0 ? $("#come_in_jin_str").css('display','none') : "";
             break;
         case "3":
             TalentInfoInfoDlg.talentTypeFlag = true;
@@ -429,6 +433,8 @@ TalentInfoInfoDlg.talentTypeChange = function () {
                 $('#talentInfoForm').bootstrapValidator('removeField', "tax_insurance_month");
             }
             text = $("#fst_work_time").length > 0 ? $("#fst_work_time").prev("label").html().replace(/近三年/, "首次") : "";
+            $("#come_in_jin").length > 0 ? $("#come_in_jin").css('display','none') : "";
+            $("#come_in_jin_str").length > 0 ? $("#come_in_jin_str").css('display','none') : "";
             break;
         default:
             $("#tipsBlock").css('display', 'none');