sugangqiang 1 年之前
父節點
當前提交
22f12d3173
共有 25 個文件被更改,包括 1451 次插入683 次删除
  1. 15 4
      app/admin/controller/Enterprise.php
  2. 3 0
      app/admin/controller/EnterpriseChangeRecord.php
  3. 2 1
      app/admin/view/enterprise/hospital/goto_examine_page.html
  4. 3 3
      app/admin/view/enterprise_change_record/hospital/goto_enterprise_change_detail_page.html
  5. 4 0
      app/common/api/EnterpriseApi.php
  6. 14 3
      app/common/api/MenuApi.php
  7. 8 0
      app/common/api/Nhc.php
  8. 16 2
      app/common/controller/Auth.php
  9. 13 2
      app/enterprise/controller/Api.php
  10. 289 0
      app/enterprise/controller/Hospital.php
  11. 1 1
      app/enterprise/controller/Index.php
  12. 41 164
      app/enterprise/view/api/hospital/to_add.html
  13. 19 177
      app/enterprise/view/api/hospital/to_detail.html
  14. 41 164
      app/enterprise/view/api/hospital/to_update.html
  15. 233 0
      app/enterprise/view/hospital/detail.html
  16. 107 0
      app/enterprise/view/hospital/examine.html
  17. 138 0
      app/enterprise/view/hospital/list.html
  18. 10 2
      app/index/controller/Auth.php
  19. 2 2
      public/static/modular/enterprise/enterprise_examine.js
  20. 12 4
      public/static/modular/enterprise/hospital/enterprisechangeRecord/ep_change_record_list.js
  21. 16 10
      public/static/modular/gate/enterprise/hospital/enterprise_center.js
  22. 68 143
      public/static/modular/gate/enterprise/hospital/enterprise_change_edit.js
  23. 76 0
      public/static/modular/gate/enterprise/hospital/examine.js
  24. 319 0
      public/static/modular/gate/enterprise/hospital/list.js
  25. 1 1
      public/static/modular/gate/enterprise/school/enterprise_change_edit.js

+ 15 - 4
app/admin/controller/Enterprise.php

@@ -278,13 +278,16 @@ class Enterprise extends AdminController {
         if (!in_array($ep["checkState"], [1, 4, 6]))
             return json(["msg" => "不在审核范围内"]);
         $checkState = $this->request['checkState'];
-        if ($checkState == null || ($checkState != 2 && $checkState != 3)) {
+        if ($checkState == null || ($checkState != 5 && $checkState != 2 && $checkState != 3)) {
             return json(["msg" => '请选择审核状态!']);
         }
         $checkMsg = $this->request['checkMsg'];
         $fields = $this->request['fields'];
         $files = $this->request['files'];
-        if ($checkState == 2) {
+        if ($checkState == 2 || ($checkState == 5 && $ep["type"] == CommonConst::ENTERPRISE_WJ)) {
+            if ($checkState == 5 && $ep["isGeneral"] == 1) {
+                return json(["msg" => '总院不能驳回到分院!']);
+            }
             if (\StrUtil::isEmpOrNull($checkMsg)) {
                 return json(["msg" => '请填写审核意见!']);
             }
@@ -318,6 +321,14 @@ class Enterprise extends AdminController {
                     'updateUser' => session('user')['uid'],
                     'updateTime' => date("Y-m-d H:i:s")
                 ];
+                if ($ep["type"] == CommonConst::ENTERPRISE_WJ) {
+                    if ($newCheckState == 2 || $newCheckState == 5) {
+                        $checkData["step"] = 0;
+                    } else {
+                        $checkData["step"] = 2;
+                    }
+                }
+
                 $res = EnterpriseApi::updateById($checkData);
 
                 //短信入库数据
@@ -335,14 +346,14 @@ class Enterprise extends AdminController {
                     'createTime' => date("Y-m-d H:i:s", time())
                 ];
 
-                if ($checkState == 2) {
+                if ($checkState == 2 || $checkState == 5) {
                     $record_data['templateCode'] = "【晋江市人才服务平台】您好!您提交的晋江市现代产业体系人才机构注册信息因信息填写错误或上传不完整已被退回,请及时登录“晋江市人才综合服务申报平台”根据审核意见修改并重新提交。退订回复TD。";
                 }
                 if ($newCheckState == 3) {
                     $record_data['templateCode'] = "【晋江市人才服务平台】您好!您提交的晋江市现代产业体系人才机构注册信息已审核通过,可登录“晋江市人才综合服务申报平台”做相关事宜申报。退订回复TD。";
                 }
 
-                if ($newCheckState == 3 || $checkState == 2) {
+                if ($newCheckState == 3 || ($checkState == 2 && $ep["type"] != CommonConst::ENTERPRISE_WJ) || ($checkState == 2 && $ep["isGeneral"] == 1) || $checkState == 5) {
                     $smsapi = new ChuanglanSmsApi();
 
                     $result = $smsapi->sendSMS($ep['agentPhone'], $record_data['templateCode']);

+ 3 - 0
app/admin/controller/EnterpriseChangeRecord.php

@@ -353,7 +353,10 @@ class EnterpriseChangeRecord extends AdminController {
         $template = "";
         switch ($this->user["type"]) {
             case CommonConst::ENTERPRISE_WJ:
+                $medicalCommunityList = \app\common\api\Nhc::getMedicalCommunityMap();
                 $template = "/enterprise_change_record/hospital/goto_enterprise_change_detail_page";
+                $ecr["newMedicalCommunityName"] = $medicalCommunityList[$ecr["newMedicalCommunityId"]];
+                $ecr["oldMedicalCommunityName"] = $medicalCommunityList[$ecr["oldMedicalCommunityId"]];
                 break;
             case CommonConst::ENTERPRISE_GJ:
                 $template = "/enterprise_change_record/school/goto_enterprise_change_detail_page";

+ 2 - 1
app/admin/view/enterprise/hospital/goto_examine_page.html

@@ -56,7 +56,8 @@
                         <div class="col-sm-10">
                             <select class="form-control" id="checkState" name="checkState" onchange="EpExam.toggleField()" data-val='{$ep.checkState}'>
                                 <option value="">--- 请选择 ---</option>
-                                <option value="2" {in name="ep.checkState" value="2,5"}selected{/in}>审核驳回</option>
+                                <option value="2" {in name="ep.checkState" value="2"}selected{/in}>驳回到总院</option>
+                                <option value="5" {in name="ep.checkState" value="5"}selected{/in}>驳回到分院</option>
                                 <option value="3" {in name="ep.checkState" value="3,6"}selected{/in}>审核通过</option>
                             </select>
                         </div>

+ 3 - 3
app/admin/view/enterprise_change_record/hospital/goto_enterprise_change_detail_page.html

@@ -125,7 +125,7 @@
                                 所属医共体
                             </td>
                             <td class="value1 word-wrap" data-old='{$ecr.oldMedicalCommunityName}' data-new='{$ecr.newMedicalCommunityName}'></td>
-                            <td class="key" style="border-right: 1px solid #c0a16b">
+                            <td class="key">
                                 法人代表
                             </td>
                             <td class="value1 word-wrap" style="border-right: 1px solid #c0a16b" data-old='{$ecr.oldLegal}' data-new='{$ecr.newLegal}'>
@@ -136,11 +136,11 @@
                             <td class="key">
                                 医院电话
                             </td>
-                            <td class="value1 word-wrap" style="border-right: 1px solid #c0a16b" data-old='{$ecr.oldEphone}' data-new='{$ecr.newEphone}'></td>
+                            <td class="value1 word-wrap" data-old='{$ecr.oldEphone}' data-new='{$ecr.newEphone}'></td>
                             <td class="key">
                                 医院地址
                             </td>
-                            <td class="value1 word-wrap" style="border-right: 1px solid #c0a16b" data-old='{$ecr.oldFullLocationName} {$ecr.oldAddress}' data-new='{$ecr.newFullLocationName} {$ecr.newAddress}'></td>
+                            <td class="value1 word-wrap" style="border-right: 1px solid #c0a16b" data-old='{$ecr.oldProvinceName}{$ecr.oldCityName}{$ecr.oldCountyName} {$ecr.oldAddress}' data-new='{$ecr.newProvinceName}{$ecr.newCityName}{$ecr.newCountyName} {$ecr.newAddress}'></td>
                         </tr>
                     </table>                    
                 </div>

+ 4 - 0
app/common/api/EnterpriseApi.php

@@ -19,6 +19,7 @@ class EnterpriseApi {
         }
         $area = array_filter([$ep["provinceName"], $ep["cityName"], $ep["countyName"]]);
         $ep["fullLocationName"] = $area ? implode("", $area) : "";
+        $ep["medicalCommunityName"] = $ep["medicalCommunityId"] ? Nhc::getMedicalCommunityMap()[$ep["medicalCommunityId"]] : "";
         return $ep;
     }
 
@@ -38,6 +39,9 @@ class EnterpriseApi {
         $where = [];
         $whereRaw = "";
         $where[] = ['type', '=', session('user')['type']];
+        if (session('user')['type'] == CommonConst::ENTERPRISE_WJ) {
+            $where[] = ["step", "in", [1, 2]];
+        }
         if ($company_info['code'] != 'super' && !self::chkUserInSuperusers()) {
             if (session('user')['type'] == 1) {
                 $whr[] = ["companyId", "=", $companyId];

+ 14 - 3
app/common/api/MenuApi.php

@@ -5,6 +5,7 @@ namespace app\common\api;
 use app\admin\model\Role;
 use app\admin\model\SysRelation;
 use app\admin\model\Menu;
+use app\common\state\CommonConst;
 
 /**
  * Description of MenuApi
@@ -203,9 +204,19 @@ class MenuApi {
         return in_array($menuid, $tmpArray);
     }
 
-    public static function getEnterpriseMenuByType($type) {
+    public static function getEnterpriseMenuByType($ep) {
         $menus = [];
-        $menus[] = ["type" => [1, 2, 3, 5, 6], "code" => "qyzx", "pcode" => "0", "name" => "机构用户中心", "url" => "/enterprise/index/centerPage", "icon" => "fa-user", "status" => 1];
+        $typeName = "";
+        if ($ep["type"] != CommonConst::ENTERPRISE_WJ || $ep["type"] != CommonConst::ENTERPRISE_GJ) {
+            $typeName = "机构";
+        }
+        $menus[] = ["type" => [1, 2, 3, 5, 6], "code" => "qyzx", "pcode" => "0", "name" => $typeName . "用户中心", "url" => "/enterprise/index/centerPage", "icon" => "fa-user", "status" => 1];
+
+        if ($ep["type"] == \app\common\state\CommonConst::ENTERPRISE_WJ && $ep["isGeneral"] == 1) {
+            //总院增加菜单,审核分院
+            $menus[] = ["type" => [5], "code" => "yyss", "pcode" => "0", "name" => "医院审核", "url" => "#", "icon" => "fa-pencil-square-o", "status" => 1];
+            $menus[] = ["type" => [5], "code" => "yyyhss", "pcode" => "yyss", "name" => "注册审核", "url" => "/enterprise/hospital/list", "icon" => "fa-pencil-square-o", "status" => 1];
+        }
         $menus[] = ["type" => [1, 2, 5, 6], "code" => "yhfk", "pcode" => "0", "name" => "用户反馈", "url" => "", "icon" => "fa-bug", "status" => 1];
         $menus[] = ["type" => [1, 2, 5, 6], "code" => "rcrd", "pcode" => "0", "name" => "人才认定", "url" => "#", "icon" => "fa-pencil-square-o", "status" => 1];
         //$menus[] = ["type" => [1, 2], "code" => "jctjsb", "pcode" => "rcrd", "name" => "基础条件申报", "url" => "/enterprise/base", "icon" => "fa-thumbs-o-up", "status" => 1];
@@ -242,7 +253,7 @@ class MenuApi {
         $menus[] = ["type" => [3], "code" => "hxjh", "pcode" => "0", "name" => "海峡计划", "url" => "", "icon" => "fa-plane", "status" => 1];
         $menus[] = ["type" => [3], "code" => "hxjhsb", "pcode" => "hxjh", "name" => "海峡计划申报", "url" => "", "icon" => "fa-pencil", "status" => 1];
         foreach ($menus as $key => $menu) {
-            if (!in_array($type, $menu["type"]) || (($menu["pcode"]) != "0" && $menu["url"] == "") || $menu["status"] == 0)
+            if (!in_array($ep["type"], $menu["type"]) || (($menu["pcode"]) != "0" && $menu["url"] == "") || $menu["status"] == 0)
                 unset($menus[$key]);
         }
         $menus = self::buildMenu($menus);

+ 8 - 0
app/common/api/Nhc.php

@@ -31,4 +31,12 @@ class Nhc {
         return $list;
     }
 
+    public static function hasGeneralHospital($medicalCommunityId) {
+        $where = [];
+        $where[] = ["type", "=", \app\common\state\CommonConst::ENTERPRISE_WJ];
+        $where[] = ["medicalCommunityId", "=", $medicalCommunityId];
+        $where[] = ["status", "=", 1];
+        return \app\admin\model\Enterprise::where($where)->find();
+    }
+
 }

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

@@ -116,6 +116,7 @@ class Auth extends BaseController {
                 'bankNetwork' => \StrUtil::getRequestDecodeParam($this->request, 'bankNetwork')
             ];
             try {
+                $data['checkState'] = 1;
                 if (stripos($data['name'], "(")) {
                     $data['name'] = str_replace('(', '(', $data['name']);
                 }
@@ -220,6 +221,12 @@ class Auth extends BaseController {
                             $response_object->msg = '请上传人才联络员备案表';
                             return \StrUtil::back($response_object, "Register.epCallBack");
                         }
+                        if ($data["isGeneral"] == 1 || ($data["isGeneral"] == 0 && Nhc::hasGeneralHospital($data["medicalCommunityId"]))) {
+                            $data["step"] = 1; //直接进入卫健复审
+                            $data["checkState"] = 6; //初审通过
+                        } else {
+                            $data["step"] = 0;
+                        }
                         break;
                     case "gaojiao":
                         $data["type"] = CommonConst::ENTERPRISE_GJ; //高教
@@ -327,7 +334,6 @@ class Auth extends BaseController {
                 $data['createTime'] = date("Y-m-d H:i:s", time());
                 $data['updateTime'] = date("Y-m-d H:i:s", time());
                 $data['active'] = 1;
-                $data['checkState'] = 1;
                 \app\common\model\Enterprise::create($data);
 
                 TalentChecklog::create([
@@ -457,6 +463,7 @@ class Auth extends BaseController {
                     $data['name'] = str_replace(')', ')', $data['name']);
                 }
                 $data['id'] = $ep->id;
+                $data['checkState'] = 4;
                 if ($ep->special == 0) {
                     $idCardName = "营业执照";
                     if ($data["type"] == CommonConst::ENTERPRISE_NORMAL) {
@@ -488,6 +495,14 @@ class Auth extends BaseController {
                         //卫健医院
                         validate(\app\common\validate\Hospital::class)->batch(true)->scene('change')->check($data);
                         $idCardName = "医疗机构执业许可证";
+                        
+                        if ($data["isGeneral"] == 1 || ($data["isGeneral"] == 0 && Nhc::hasGeneralHospital($data["medicalCommunityId"]))) {
+                            $data["step"] = 1; //直接进入卫健复审
+                            $data["checkState"] = 6; //初审通过
+                        } else {
+                            $data["step"] = 0;
+                        }
+                        
                     } else if ($data["type"] == CommonConst::ENTERPRISE_GJ) {
                         //高教学校
                         validate(\app\common\validate\School::class)->batch(true)->scene('change')->check($data);
@@ -519,7 +534,6 @@ class Auth extends BaseController {
                 $data["countyName"] = $data["county"] ? \app\common\api\LocationApi::getNameByCode($data["county"]) : null;
 
                 //unset($data["agentPhone"]);
-                $data['checkState'] = 4;
                 $data["updateTime"] = date("Y-m-d H:i:s");
                 $ep->update($data);
 

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

@@ -31,10 +31,12 @@ class Api extends EnterpriseController {
             $streetList = DictApi::selectByParentCode('street');
             $typeList = DictApi::selectByParentCode('enterprise_type');
             $industryFieldNew = DictApi::selectByParentCode('industry_field');
+            $medicalCommunityList = \app\common\api\Nhc::getMedicalCommunityMap();
             foreach ($list as $k => &$v) {
                 $v['newIndustryFieldNewName'] = $industryFieldNew[$v['newIndustryFieldNew']];
                 $v['newEnterpriseType'] = $typeList[$v['newEnterpriseType']];
                 $v['newStreetName'] = $streetList[$v['newStreet']];
+                $v['newMedicalCommunityName'] = $medicalCommunityList[$v["newMedicalCommunityId"]];
             }
         }
 
@@ -132,15 +134,18 @@ class Api extends EnterpriseController {
                 $ecr['checkStateName'] = '';
         }
         $template = "";
+        $assigns = [];
         switch ($ep->type) {
             case CommonConst::ENTERPRISE_WJ:
                 $template = "/api/hospital/to_add";
+                $assigns["medicalCommunities"] = \app\common\api\Nhc::getMedicalCommunityList();
                 break;
             case CommonConst::ENTERPRISE_GJ:
                 $template = "/api/school/to_add";
                 break;
         }
-        return view($template, ['ecr' => $ecr]);
+        $assigns["ecr"] = $ecr;
+        return view($template, $assigns);
     }
 
     public function upsert() {
@@ -749,15 +754,18 @@ class Api extends EnterpriseController {
             }
         }
         $template = "";
+        $assigns = [];
         switch ($ep->type) {
             case CommonConst::ENTERPRISE_WJ:
                 $template = "/api/hospital/to_update";
+                $assigns["medicalCommunities"] = \app\common\api\Nhc::getMedicalCommunityList();
                 break;
             case CommonConst::ENTERPRISE_GJ:
                 $template = "/api/school/to_update";
                 break;
         }
-        return view($template, ['ecr' => $ecr]);
+        $assigns["ecr"] = $ecr;
+        return view($template, $assigns);
     }
 
     public function submitToCheck() {
@@ -1026,6 +1034,9 @@ class Api extends EnterpriseController {
         switch ($ep->type) {
             case CommonConst::ENTERPRISE_WJ:
                 $template = "/api/hospital/to_detail";
+                $medicalCommunityMap = \app\common\api\Nhc::getMedicalCommunityMap();
+                $ecr["newMedicalCommunityName"] = $medicalCommunityMap[$ecr["newMedicalCommunityId"]];
+                $ecr["oldMedicalCommunityName"] = $medicalCommunityMap[$ecr["oldMedicalCommunityId"]];
                 break;
             case CommonConst::ENTERPRISE_GJ:
                 $template = "/api/school/to_detail";

+ 289 - 0
app/enterprise/controller/Hospital.php

@@ -0,0 +1,289 @@
+<?php
+
+namespace app\enterprise\controller;
+
+use app\enterprise\common\EnterpriseController;
+use app\common\state\CommonConst;
+use app\common\api\EnterpriseApi;
+use app\common\model\Enterprise;
+use app\common\api\Nhc;
+use app\common\model\TalentChecklog;
+use app\common\model\MessageRecord;
+use app\common\api\TalentState;
+use app\common\api\ChuanglanSmsApi;
+
+/**
+ * Description of Hospital
+ *
+ * @author sgq
+ */
+class Hospital extends EnterpriseController {
+
+    //put your code here
+    public function list() {
+        return view("");
+    }
+
+    public function getList() {
+        $request = $this->request;
+        $ep = EnterpriseApi::getOne($this->user["uid"]);
+        if ($ep["isGeneral"] == 1) {
+            EnterpriseApi::getList($request);
+            $where = [];
+            $where[] = ["type", "=", CommonConst::ENTERPRISE_WJ];
+            $where[] = ["delete", "=", 0];
+            $where[] = ["isGeneral", "=", 2];
+            $where[] = ["medicalCommunityId", "=", $ep["medicalCommunityId"]];
+            $where[] = ["step", "=", 0];
+
+
+            $offset = trim($request->param("offset")) ?: 0;
+            $limit = trim($request->param("limit")) ?: 10;
+
+            $name = urldecode(trim($request->param("name")));
+            $idCard = urldecode(trim($request->param("idCard")));
+            $legal = urldecode(trim($request->param("legal")));
+            $ephone = urldecode(trim($request->param("ephone")));
+            $agentName = urldecode(trim($request->param("agentName")));
+            $agentPhone = urldecode(trim($request->param("agentPhone")));
+            $checkState = urldecode(trim($request->param("checkState")));
+
+            if ($name) {
+                $where[] = ["name", "like", "%{$name}%"];
+            }
+            if ($idCard) {
+                $where[] = ["idCard", "like", "%{$idCard}%"];
+            }
+            if ($legal) {
+                $where[] = ["legal", "like", "%{$legal}%"];
+            }
+            if ($ephone) {
+                $where[] = ["ephone", "like", "%{$ephone}%"];
+            }
+            if ($agentName) {
+                $where[] = ["agentName", "like", "%{$agentName}%"];
+            }
+            if ($agentPhone) {
+                $where[] = ["agentPhone", "like", "%{$agentPhone}%"];
+            }
+            if ($checkState) {
+                $where[] = ["checkState", "=", "{$checkState}"];
+            }
+            $count = Enterprise::where($where)->count();
+
+            $medicalCommunityList = Nhc::getMedicalCommunityMap();
+            $list = Enterprise::where($where)->limit($offset, $limit)->order("createTime", 'desc')->select()->toArray();
+
+            foreach ($list as $k => &$v) {
+                unset($v['password']);
+                $v['medicalCommunityName'] = $v['medicalCommunityId'] ? $medicalCommunityList[$v['medicalCommunityId']] : "";
+            }
+            return ["total" => $count, "rows" => $list];
+        }
+    }
+
+    public function detail() {
+        $id = $this->request["id"];
+        $ep = EnterpriseApi::getOne($id);
+        return view("", ["ep" => $ep]);
+    }
+
+    public function examine() {
+        $id = $this->request["id"];
+        $ep = EnterpriseApi::getOne($id);
+        $lastLog = \app\common\api\TalentLogApi::getLastLog($id, 10);
+        if ($lastLog["active"] == 0) {
+            $ep["checkState"] = $lastLog["state"];
+            $ep["checkMsg"] = $lastLog["description"];
+        }
+        if (!$ep) {
+            return "无此企业";
+        }
+        $fieldsAndFiles = $this->getFieldAndFilesBySpecialAndType($ep->special, $ep->type);
+        $fields = $fieldsAndFiles["fields"];
+        $files = $fieldsAndFiles["files"];
+
+        $modify_fields = [];
+        $modify_files = [];
+        $_modify_fields = explode(",", $ep["modify_fields"]);
+        foreach ($fields as $key => $value) {
+            $checked = in_array($key, $_modify_fields);
+            $modify_fields[$key] = ["field" => $key, "name" => $value, "checked" => $checked];
+        }
+        $_modify_files = explode(",", $ep["modify_files"]);
+        foreach ($files as $key => $value) {
+            $checked = in_array($key, $_modify_files);
+            $modify_files[$key] = ["field" => $key, "name" => $value, "checked" => $checked];
+        }
+        return view("", ['ep' => $ep, 'checkUser' => session('user')['name'], 'fields' => $modify_fields, "files" => $modify_files]);
+    }
+
+    public function doExamine() {
+        $id = trim($this->request['id']);
+        $doSubmit = $this->request["submit"] == 1 ? true : false;
+        if (!$id) {
+            return json(["msg" => 'ID不能为空!']);
+        }
+        $ep = EnterpriseApi::getOne($id);
+        if (!$ep) {
+            return json(["msg" => '无此企业!']);
+        }
+
+        $oriCheckState = $ep["checkState"];
+        if ($ep["step"] > 0 || $ep["isGeneral"] != 2) {
+            return json(["msg" => "不在审核范围内"]);
+        }
+        if (!in_array($ep["checkState"], [1, 2, 4, 5]))
+            return json(["msg" => "不在审核范围内"]);
+        $checkState = $this->request['checkState'];
+        if ($checkState == null || ($checkState != 5 && $checkState != 6)) {
+            return json(["msg" => '请选择审核状态!']);
+        }
+        $checkMsg = $this->request['checkMsg'];
+        $fields = $this->request['fields'];
+        $files = $this->request['files'];
+        if ($checkState == 5 && $ep["type"] == CommonConst::ENTERPRISE_WJ) {
+            if (\StrUtil::isEmpOrNull($checkMsg)) {
+                return json(["msg" => '请填写审核意见!']);
+            }
+            if (strlen($checkMsg) > 1000) {
+                return json(["msg" => '审核意见最多1000个字符!']);
+            }
+            if (!$fields && !$files) {
+                return json(["msg" => '请选择驳回修改的字段或者附件!']);
+            }
+        }
+        try {
+            $lastLog = \app\common\api\TalentLogApi::getLastLog($id, 10);
+            $companyName = session('user')["companyName"] ?: session('user')["rolename"];
+            if ($checkState == 6) {
+                $fields = null;
+                $files = null;
+            }
+            $newCheckState = $checkState;
+            if ($doSubmit) {
+                $checkData = [
+                    'id' => $id,
+                    'checkState' => $newCheckState,
+                    'checkMsg' => $checkMsg,
+                    'modify_fields' => $fields ? implode(",", $fields) : null,
+                    'modify_files' => $files ? implode(",", $files) : null,
+                    'checkUser' => session('user')['name'],
+                    'updateUser' => session('user')['uid'],
+                    'updateTime' => date("Y-m-d H:i:s")
+                ];
+                if ($ep["type"] == CommonConst::ENTERPRISE_WJ) {
+                    if ($newCheckState == 5) {
+                        $checkData["step"] = 0;
+                    } else {
+                        $checkData["step"] = 1;
+                    }
+                }
+
+                $res = EnterpriseApi::updateById($checkData);
+
+                //短信入库数据
+                $record_data = [
+                    'id' => getStringId(),
+                    'bizId' => getStringId(),
+                    'userId' => $id,
+                    'type' => 2,
+                    'smsType' => 2,
+                    'name' => $ep['name'],
+                    'phone' => $ep['agentPhone'],
+                    'params' => '机构注册信息',
+                    'state' => 1,
+                    'sendingDate' => date("Y-m-d H:i:s", time()),
+                    'createTime' => date("Y-m-d H:i:s", time())
+                ];
+
+                if ($checkState == 5) {
+                    $record_data['templateCode'] = "【晋江市人才服务平台】您好!您提交的晋江市现代产业体系人才机构注册信息因信息填写错误或上传不完整已被退回,请及时登录“晋江市人才综合服务申报平台”根据审核意见修改并重新提交。退订回复TD。";
+                }
+
+                if ($checkState == 5) {
+                    $smsapi = new ChuanglanSmsApi();
+
+                    $result = $smsapi->sendSMS($ep['agentPhone'], $record_data['templateCode']);
+
+                    MessageRecord::create($record_data);
+                }
+                if ($lastLog["active"] === 0) {
+                    TalentChecklog::update([
+                        'id' => $lastLog["id"],
+                        'active' => 1,
+                        'state' => $newCheckState,
+                        'step' => 101,
+                        'stateChange' => TalentState::stateEnum($newCheckState),
+                        'description' => $checkMsg,
+                        'updateTime' => date("Y-m-d H:i:s", time()),
+                        'updateUser' => session('user')['name'] . "({$companyName})"
+                    ]);
+                } else {
+                    TalentChecklog::create([
+                        'id' => getStringId(),
+                        'mainId' => $id,
+                        'type' => 10,
+                        'typeField' => null,
+                        'active' => 1,
+                        'state' => $newCheckState,
+                        'step' => 101,
+                        'stateChange' => TalentState::stateEnum($newCheckState),
+                        'description' => $checkMsg,
+                        'createTime' => date("Y-m-d H:i:s", time()),
+                        'createUser' => session('user')['name'] . "({$companyName})"
+                    ]);
+                }
+
+                return json(["msg" => '操作成功!', "code" => 200]);
+            } else {
+                $checkData = [
+                    'id' => $id,
+                    'modify_fields' => $fields ? implode(",", $fields) : null,
+                    'modify_files' => $files ? implode(",", $files) : null,
+                    'checkUser' => session('user')['name'],
+                    'updateUser' => session('user')['uid'],
+                    'updateTime' => date("Y-m-d H:i:s")
+                ];
+                $res = EnterpriseApi::updateById($checkData);
+
+                if ($lastLog["active"] === 0) {
+                    TalentChecklog::update([
+                        'id' => $lastLog["id"],
+                        'state' => $newCheckState,
+                        'step' => 101,
+                        'stateChange' => TalentState::stateEnum($newCheckState),
+                        'description' => $checkMsg,
+                        'updateTime' => date("Y-m-d H:i:s", time()),
+                        'updateUser' => session('user')['name'] . "({$companyName})"
+                    ]);
+                } else {
+                    TalentChecklog::create([
+                        'id' => getStringId(),
+                        'mainId' => $id,
+                        'type' => 10,
+                        'typeField' => null,
+                        'active' => 0,
+                        'state' => $newCheckState,
+                        'step' => 101,
+                        'stateChange' => TalentState::stateEnum($checkState),
+                        'description' => $checkMsg,
+                        'createTime' => date("Y-m-d H:i:s", time()),
+                        'createUser' => session('user')['name'] . "({$companyName})"
+                    ]);
+                }
+                return json(["msg" => '保存成功!', "code" => 200]);
+            }
+        } catch (\Exception $e) {
+            return json(["msg" => $e->getMessage()]);
+        }
+    }
+
+    private function getFieldAndFilesBySpecialAndType($special, $type) {
+        $fields = ["name" => "医院名称", "idCard" => "登记号", "legal" => "法人代表", "medicalCommunityId" => "医共体", "isGeneral" => "是否总院", "ephone" => "医院电话", "province" => "地址省", "city" => "地址市", "county" => "地址县\区", "address" => "企业地址",
+            "agentName" => "人才联络员姓名", "agentPhone" => "人才联络员电话", "agentEmail" => "人才联络员邮箱"];
+        $files = ["imgurl" => "医疗机构执业许可证", "beian" => "人才联络员信息备案表"];
+        return ["fields" => $fields, "files" => $files];
+    }
+
+}

+ 1 - 1
app/enterprise/controller/Index.php

@@ -54,7 +54,7 @@ class Index extends EnterpriseController {
                 $errorCounts++;
         }
         $vars["isEnterpriseFull"] = $errorCounts > 0 ? 0 : 1;
-        $menus = \app\common\api\MenuApi::getEnterpriseMenuByType($this->user["type"]);
+        $menus = \app\common\api\MenuApi::getEnterpriseMenuByType($ep);
         $vars["menus"] = $menus;
         return view("", $vars);
     }

+ 41 - 164
app/enterprise/view/api/hospital/to_add.html

@@ -42,13 +42,13 @@
                             <tr>
                                 <td>
                                     <div class="rowGroup">
-                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>{eq name="ecr.special" value="0"}企业{else/}单位{/eq}名称</label>
+                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>医院名称</label>
                                         <input autocomplete="off" type="text" class="form-control" id="newName" name="newName" value="{$ecr.newName}"/>
                                     </div>
                                 </td>
                                 <td>
                                     <div class="rowGroup">
-                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>统一社会信用代码</label>
+                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>登记证</label>
                                         <input autocomplete="off" type="text" class="form-control" id="newIdCard" name="newIdCard"  value="{$ecr.newIdCard}"/>
                                     </div>
                                 </td>
@@ -58,9 +58,9 @@
                                         <input autocomplete="off" type="text" class="form-control" id="newLegal" name="newLegal" value="{$ecr.newLegal}"/>
                                     </div>
                                 </td>
-                                <td rowspan="2" style="position:relative;">
+                                <td rowspan="3" style="position:relative;">
                                     <button type="button" class="btn btn-info btn-sm" style="position:absolute;right:5px;top:5px;" onclick="$('#imgurl').click()"><i class="fa fa-upload" aria-hidden="true"></i>上传文件</button>
-                                    <label class="control-label spacing"><span class="text-danger">*</span>{eq name="ecr.special" value="1"}事业单位法人证或批文{else/}营业执照或统一机构代码证{/eq}</label>
+                                    <label class="control-label spacing"><span class="text-danger">*</span>医疗机构执业许可证</label>
                                     {if condition="$ecr['imgurl']"}
                                     {eq name="ecr.imgurl_is_img" value="1"}
                                     <img src="{$ecr.imgurl|getStoragePath}" style="height:60px;" onclick="Feng.showImg(this)">
@@ -76,183 +76,60 @@
                             <tr>
                                 <td>
                                     <div class="rowGroup">
-                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>所属街道</label>
-                                        <select class="form-control" id="newStreet" name="newStreet" value="{$ecr.newStreet}"></select>
+                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>医共体</label>
+                                        <select class="form-control" id="newMedicalCommunityId" name="newMedicalCommunityId" value="{$ecr.newMedicalCommunityId}">
+                                            <option value=""></option>
+                                            {volist name="medicalCommunities" id="mc"}
+                                            <option value="{$mc.id}">{$mc.name}</option>
+                                            {/volist}
+                                        </select>
                                     </div>
                                 </td>
                                 <td>
                                     <div class="rowGroup">
-                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>{eq name="ecr.special" value="0"}企业{else/}单位{/eq}地址</label>
-                                        <input autocomplete="off" type="text" class="form-control" id="newAddress" name="newAddress"  value="{$ecr.newAddress}"/>
+                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>是否总院</label>
+                                        <select class="form-control" id="newIsGeneral" name="newIsGeneral" value="{$ecr.newIsGeneral}">
+                                            <option value=""></option>
+                                            <option value="2">否</option>
+                                            <option value="1">是</option>
+                                        </select>
                                     </div>
                                 </td>
                                 <td>
                                     <div class="rowGroup">
-                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>{eq name="ecr.special" value="0"}企业{else/}单位{/eq}电话</label>
+                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>医院电话</label>
                                         <input autocomplete="off" type="text" class="form-control" id="newEphone" name="newEphone" placeholder="固话格式0595-xxxx" value="{$ecr.newEphone}"/>
                                     </div>
                                 </td>
                             </tr>
                             <tr>
-                                <td>
-                                    <div class="rowGroup">
-                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>{eq name="ecr.special" value="0"}企业{else/}单位{/eq}银行账号</label>
-                                        <input autocomplete="off" type="text" class="form-control" id="newBankCard" name="newBankCard" value="{$ecr.newBankCard}" onkeyup="value = value.replace(/\s+/g, '')"/>
-                                    </div>
-                                </td>
-                                <td>
+                                <td colspan="3">
                                     <div class="rowGroup">
-                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>{eq name="ecr.special" value="0"}企业{else/}单位{/eq}开户银行</label>
-                                        <input autocomplete="off" type="text" class="form-control" id="newBank" name="newBank" value="{$ecr.newBank}"/>
-                                    </div>
-                                </td>
-                                <td>
-                                    <div class="rowGroup">
-                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>{eq name="ecr.special" value="0"}企业{else/}单位{/eq}开户银行网点</label>
-                                        <input autocomplete="off" type="text" class="form-control" id="newBankNetwork" name="newBankNetwork" placeholder="XX银行XX支行/分行/分理处" value="{$ecr.newBankNetwork}"/>
-                                    </div>
-                                </td>
-                                <td style="position:relative;">            
-                                    <button type="button" class="btn btn-info btn-sm" style="position:absolute;right:5px;top:5px;" onclick="$('#bankImg').click()"><i class="fa fa-upload" aria-hidden="true"></i>上传文件</button>
-                                    <label class="control-label spacing"><span class="text-danger">*</span>开户许可证/基本存款账户信息</label>
-                                    {if condition="$ecr['bankImg']"}
-                                    {eq name="ecr.bankImg_is_img" value="1"}
-                                    <img src="{$ecr.bankImg|getStoragePath}" style="height:60px;" onclick="Feng.showImg(this)" >
-                                    {else/}
-                                    <img src="/static/img/Pdf.png" style="height:60px;" data-url="{$ecr.bankImg|getStoragePath}">
-                                    {/eq}
-                                    {else/}
-                                    <img src="/static/img/yyzz.png" style="height:60px;">
-                                    {/if}
-                                    <input style="display: none" autocomplete="off" type="file" class="form-control" id="bankImg" name="bankImg" />
-                                </td>
-                            </tr>
-                            {eq name="ecr.special" value="3"}
-                            <tr>
-                                <td colspan="4">
-                                    <div class="rowGroup">
-                                        <label class="control-label spacing td-label"><span style="color: red">*</span>机构标签</label>
-                                        <select class="form-control" id="newOrganizationTag" name="newOrganizationTag" value="{$ecr.newOrganizationTag}">
-                                        </select>
-                                    </div>
-                                </td>
-                            </tr>
-                            {/eq}
-                            {eq name="ecr.special" value="1"}
-                            <tr>
-                                <td colspan="4">
-                                    <div class="rowGroup">
-                                        <label class="control-label spacing td-label"><span style="color: red">*</span>单位标签</label>
-                                        <select class="form-control" id="newInstitutionTag" name="newInstitutionTag" value="{$ecr.newInstitutionTag}">
-                                        </select>
+                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>医院地址</label>
+                                        <div class="col-sm-12">
+                                            <div class="col-sm-2">
+                                                <select class="form-control" id="newProvince" name="newProvince" onchange="EpChangeEdit.afterSelectProvince();" value="{$ecr.newProvince}">
+                                                    <option value="">---请选择---</option>
+                                                </select>
+                                            </div>
+                                            <div class="col-sm-2">
+                                                <select class="form-control" id="newCity" name="newCity" onchange="EpChangeEdit.afterSelectCity();" value="{$ecr.newCity}">
+                                                    <option value="">---请选择---</option>
+                                                </select>
+                                            </div>
+                                            <div class="col-sm-2">
+                                                <select class="form-control" id="newCounty" name="newCounty" value="{$ecr.newCounty}">
+                                                    <option value="">---请选择---</option>
+                                                </select>
+                                            </div>
+                                            <div class="col-sm-6">
+                                                <input autocomplete="off" type="text" class="form-control" id="newAddress" name="newAddress" placeholder="请填写详细地址" value="{$ecr.newAddress}"/>
+                                            </div>
+                                        </div>
                                     </div>
                                 </td>
                             </tr>
-                            {/eq}
                         </table>
-                        {if condition="$ecr['special'] eq 0"}
-                        <div class="row">
-                            <div class="rowGroup" >
-                                <label class="col-sm-1 control-label spacing"><span class="text-danger">*</span>申报类型</label>
-                                <div class="col-sm-3 spacing">
-                                    <div class="form-control" disabled="disabled">
-                                        {switch name="ecr.type"}
-                                        {case value="1"}晋江市现代产业体系人才{/case}
-                                        {case value="2"}集成电路优秀人才{/case}
-                                        {case value="3"}海峡计划团队{/case}
-                                        {/switch}
-                                    </div>
-                                </div>
-                                {eq name="ecr.type" value="1"}
-                                <div class="rowGroup agencyType">
-                                    <label class="col-sm-1 control-label spacing"><span class="text-danger">*</span>机构类型</label>
-                                    <div class="col-sm-3 spacing">
-                                        <select class="form-control" id="newAgencyType" name="newAgencyType" value="{$ecr.newAgencyType}" onchange="EpChangeEdit.agencyTypeChange()">
-                                        </select>
-                                    </div>
-                                </div>
-                                {/eq}
-                            </div>
-                        </div>
-                        {if condition="$ecr['type'] eq 1"}
-                        <div class="row" id="typeGroup">
-                            <table style="width: 100%;border-collapse: collapse;" class="table table-bordered">
-                                <tr class="agencyType1">
-                                    <td colspan="3">
-                                        <p style="color: #333;width:100%;white-space:normal;word-wrap:break-word;word-break:break-all;">备注:4341现代产业体系主要包括:“4”即鞋服、纺织、建材、食品4大传统优势产业,“3”即信息技术、智能装备、医疗健康3大新兴产业,“4”即商贸物流、文体旅游、研发创意、金融服务4大现代服务业,“1”即探索布局未来产业(数字经济等)</p>
-                                    </td>
-                                </tr>
-                                <tr class="agencyType1">
-                                    <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="newIndustryFieldNew" name="newIndustryFieldNew" value="{$ecr.newIndustryFieldNew}" onchange="EpChangeEdit.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="newIndustryFieldOld" name="newIndustryFieldOld" value="{$ecr.newIndustryFieldOld}">
-                                            </select>
-                                        </div>
-                                    </td>
-                                    <td style="position:relative;">
-                                        <button type="button" class="btn btn-info btn-sm" style="position:absolute;right:5px;top:5px;" onclick="$('#domainImg').click()"><i class="fa fa-upload" aria-hidden="true"></i>上传文件</button>
-                                        <label class="control-label spacing"><span style="color: red">*</span>产业及行业领域上传材料</label>
-                                        {if condition="$ecr['domainImg']"}
-                                        {eq name="ecr.domainImg_is_img" value="1"}
-                                        <img src="{$ecr.domainImg|getStoragePath}" style="height:60px;" onclick="Feng.showImg(this)" >
-                                        {else/}
-                                        <img src="/static/img/Pdf.png" style="height:60px;" data-url="{$ecr.domainImg|getStoragePath}">
-                                        {/eq}
-                                        {else/}
-                                        <img src="/static/img/yyzz.png" style="height:60px;">
-                                        {/if}
-                                        <input style="display: none" autocomplete="off" type="file" class="form-control" id="domainImg" name="domainImg" />
-                                        <p class="word-wrap">
-                                            请相关企业截图行业查询结果,做好相关标注(可以用下划线或圆圈等),还要清楚体现大类、中类或小类,上传做为佐证材料。
-                                        </p>
-                                    </td>
-                                </tr>
-                                <tr class="agencyType1">
-                                    <td colspan="3">
-                                        <p style="color: #333;width:100%;white-space:normal;word-wrap:break-word;word-break:break-all;">备注:请下载<a href="https://rencai.jucai.gov.cn/RXu0fYBPZwdXrgNzq9vIIRjaHXTu3mv3.docx">《国民经济行业分类(GB/T+4754-2017)》</a>或<a href="https://rencai.jucai.gov.cn/QKmKXmINDNeU1qKslkfaec47LXp7qCUO.docx" >《数字经济及其核心产业统计分类(2021)》</a>文档,对照行业分类标准,先查看属于什么行业,再按我市确定的“4341”产业比对属于什么产业,进行产业领域或行业领域的填报。</p>
-                                    </td>
-                                </tr>
-                                <tr class="agencyType1 agencyType2">
-                                    <td>
-                                        <div class="rowGroup">
-                                            <label class="control-label spacing td-label"><span style="color: red">*</span>企业标签</label>
-                                            <select class="form-control" id="newEnterpriseTag" name="newEnterpriseTag" value="{$ecr.newEnterpriseTag}">
-                                            </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="newEnterpriseType" name="newEnterpriseType" value="{$ecr.newEnterpriseType}" onchange="EpChangeEdit.changeEnterpriseType()">
-                                            </select>
-                                        </div>
-                                    </td>
-                                    <td class="typeUploader" {if condition="in_array($ecr.newEnterpriseType,['guishang','gaoxinjishu','zhuanjingtexin'])"}style="position:relative;"{else/}style="position:relative;display:none;"{/if}>
-                                        <button type="button" class="btn btn-info btn-sm" style="position:absolute;right:5px;top:5px;" onclick="$('#typeImg').click()"><i class="fa fa-upload" aria-hidden="true"></i>上传文件</button>
-                                        <label class="control-label spacing"><span style="color: red">*</span>规上、高新技术、专精特新企业上传材料</label>
-                                        {if condition="$ecr['typeImg']"}
-                                        {eq name="ecr.typeImg_is_img" value="1"}
-                                        <img src="{$ecr.typeImg|getStoragePath}" style="height:60px;" onclick="Feng.showImg(this)" >
-                                        {else/}
-                                        <img src="/static/img/Pdf.png" style="height:60px;" data-url="{$ecr.typeImg|getStoragePath}">
-                                        {/eq}
-                                        {else/}
-                                        <img src="/static/img/yyzz.png" style="height:60px;">
-                                        {/if}
-                                        <input style="display: none" autocomplete="off" type="file" class="form-control" id="typeImg" name="typeImg" />
-                                    </td>
-                                </tr>
-                            </table>
-                        </div>
-                        {/if}
-                        {/if}
                     </div>
                 </div>
                 <div class="panel panel-default">
@@ -303,6 +180,6 @@
 <iframe style="display: none;" id="hiddenIframe" name="hiddenIframe"></iframe>
 <!--<script src="${ctxPath}/static/modular/gate/enterprise/enterprise_change_edit.js"></script>-->
 <script type="text/javascript">
-    document.write('<script src="/static/modular/gate/enterprise/enterprise_change_edit.js?v=' + (new Date()).getTime() + '"><\/script>');
+    document.write('<script src="/static/modular/gate/enterprise/hospital/enterprise_change_edit.js?v=' + (new Date()).getTime() + '"><\/script>');
 </script>
 {/block}

+ 19 - 177
app/enterprise/view/api/hospital/to_detail.html

@@ -63,21 +63,21 @@
                 <input type="hidden" id="id" name="id" value="{$ecr.id}"/>
                 <input type="hidden" id="type" name="type" value="{$ecr.type}"/>
                 <input type="hidden" id="checkState" name="checkState" value="{$ecr.checkState}"/>
-                <div class="panel-heading">{eq name="ecr.special" value="0"}企业{else/}单位{/eq}信息</div>
+                <div class="panel-heading">医院信息</div>
                 <div class="panel-body">
                     <table style="width:100%" class="table table-bordered">
                         <tr>
                             <td class="key">
-                                {eq name="ecr.special" value="0"}企业{else/}单位{/eq}名称
+                                医院名称
                             </td>
                             <td class="value1 word-wrap" data-old='{$ecr.oldName}' data-new='{$ecr.newName}'></td>
                             <td class="key">
-                                统一社会信用代码
+                                登记号
                             </td>
                             <td class="value1 word-wrap" style="border-right: 1px solid #c0a16b" data-old='{$ecr.oldIdCard}' data-new='{$ecr.newIdCard}'></td>
                             <td rowspan="3" style="border: 1px solid #c0a16b;width: 300px">
                                 <label>
-                                    {eq name="ecr.special" value="0"}营业执照{else/}事业单位法人证或批文{/eq}
+                                    医疗机构执业许可证
                                 </label>
                                 <ul class="files yyzz">
                                     {if condition="$ecr['oldImgurl'] eq $ecr['newImgurl']"}
@@ -119,189 +119,29 @@
                                 {$ep.legal}
                             </td>
                             <td class="key">
-                                {eq name="ecr.special" value="0"}企业{else/}单位{/eq}地址
+                                医共体
                             </td>
-                            <td class="value1 word-wrap" data-old='{$ecr.oldAddress}' data-new='{$ecr.newAddress}'></td>
-                        </tr>
-                        <tr>
-                            <td class="key">
-                                所属街道
+                            <td class="value1 word-wrap" data-old='{$ecr.oldMedicalCommunityName}' data-new='{$ecr.newMedicalCommunityName}'>
+                                
                             </td>
-                            <td class="value1" data-old='{$ecr.oldStreetName}' data-new='{$ecr.newStreetName}'></td>
-                            <td class="key">
-                                {eq name="ecr.special" value="0"}企业{else/}单位{/eq}电话
-                            </td>
-                            <td class="value1 word-wrap" data-old='{$ecr.oldEphone}' data-new='{$ecr.newEphone}'></td>
                         </tr>
                         <tr>
                             <td class="key">
-                                {eq name="ecr.special" value="0"}企业{else/}单位{/eq}银行账号
+                                是否总院
                             </td>
-                            <td class="value1 word-wrap" data-old='{$ecr.oldBankCard}' data-new='{$ecr.newBankCard}'></td>
+                            <td class="value1" data-old='{eq name="ecr.oldIsGeneral" value="1"}是{else/}否{/eq}' data-new='{eq name="ecr.newIsGeneral" value="1"}是{else/}否{/eq}'></td>
                             <td class="key">
-                                {eq name="ecr.special" value="0"}企业{else/}单位{/eq}开户银行
+                                医院电话
                             </td>
-                            <td class="value1 word-wrap`" style="border-right: 1px solid #c0a16b" data-old='{$ecr.oldBank}' data-new='{$ecr.newBank}'></td>
-                            <td style="border: 1px solid #c0a16b" rowspan="2">
-                                <label>
-                                    开户许可证/基本存款账户信息
-                                </label>
-                                <ul class="files khxkz">
-                                    {if condition="$ecr['oldBankImg'] eq $ecr['newBankImg']"}
-                                    <li>
-                                        {if condition="$ecr['oldBankImg_is_img'] eq 1"}
-                                        <img onclick="Feng.showImg(this)" src="{$ecr.oldBankImg|getStoragePath}" style="max-height:60px;">
-                                        {else/}
-                                        <img src="/static/img/Pdf.png" onclick="Feng.showPdf('{$ecr.oldBankImg|getStoragePath}', 'bankImg')" style="max-height:60px;">
-                                        {/if}
-                                    </li>
-                                    {else/}
-                                    {if condition="$ecr['oldBankImg']"}
-                                    <li>
-                                        {if condition="$ecr['oldBankImg_is_img'] eq 1"}
-                                        <img onclick="Feng.showImg(this)" src="{$ecr.oldBankImg|getStoragePath}" style="max-height:60px;"><i class="old">旧</i>
-                                        {else/}
-                                        <img src="/static/img/Pdf.png" onclick="Feng.showPdf('{$ecr.oldBankImg|getStoragePath}', 'bankImg')" style="max-height:60px;"><i class="old">旧</i>
-                                        {/if}
-                                    </li>
-                                    {/if}
-                                    {if condition="$ecr['newBankImg']"}
-                                    <li>
-                                        {if condition="$ecr['newBankImg_is_img'] eq 1"}
-                                        <img src="{$ecr.newBankImg|getStoragePath}" onclick="Feng.showImg(this)" style="max-height:60px;"/><i class="new">新</i>
-                                        {else/}
-                                        <img src="/static/img/Pdf.png" onclick="Feng.showPdf('{$ecr.newBankImg|getStoragePath}', 'bankImg')" style="max-height:60px;"><i class="new">新</i>
-                                        {/if}
-                                    </li>
-                                    {/if}
-                                    {/if}
-                                </ul>
-                            </td>
-                        </tr>
-                        <tr>
-                            <td class="key">
-                                {eq name="ecr.special" value="0"}企业{else/}单位{/eq}开户银行网点
-                            </td>
-                            <td class="value1 word-wrap" data-old='{$ecr.oldBankNetwork}' data-new='{$ecr.newBankNetwork}'></td>
-                            {eq name="ecr.special" value="3"}
-                            <td class="key">
-                                机构标签
-                            </td>
-                            <td class="value1 word-wrap" data-old='{$ecr.oldOrganizationTagName}' data-new='{$ecr.newOrganizationTagName}'></td>
-                            {/eq}
-                            {eq name="ecr.special" value="1"}
-                            <td class="key">
-                                单位标签
-                            </td>
-                            <td class="value1 word-wrap" data-old='{$ecr.oldInstitutionTagName}' data-new='{$ecr.newInstitutionTagName}'></td>
-                            {/eq}
-                        </tr>
-                    </table>
-                    {if condition="$ecr['special'] == 0"}
-                    <table style="width:100%" class="table table-bordered">
-                        <tr>
-                            <td colspan="5">
-                                申报类型:
-                                {switch name="ecr.type"}
-                                {case value="1"}晋江市现代产业体系人才{if condition="$ecr['newAgencyType'] neq $ecr['oldAgencyType']"}(<span class='old' {if condition="!$ecr['oldAgencyType']"}style="text-decoration:none;"{/if}>{$ecr.oldAgencyTypeName|default='"未填写"'}</span> -> <span class="new">{$ecr.newAgencyTypeName|default='"已取消"'}</span>){else/}({$ecr.newAgencyTypeName|default='"未选择机构类型"'}){/if}{/case}
-                                {case value="2"}集成电路优秀人才{/case}
-                                {/switch}
-                            </td>
-                        </tr>
-                        {if condition="$ecr['type'] eq 1"}
-                        <tr class="type1">
-                            <td class="key">
-                                产业领域
-                            </td>
-                            <td class="value1 word-wrap" data-old="{$ecr.oldIndustryFieldNewName}" data-new="{$ecr.newIndustryFieldNewName}"></td>
-                            <td class="key">
-                                行业领域
-                            </td>
-                            <td class="value1 word-wrap" data-old="{$ecr.oldIndustryFieldOldName}" data-new="{$ecr.newIndustryFieldOldName}"></td>
-                            <td style="border: 1px solid #c0a16b;width: 300px">
-                                <label>
-                                    行业领域佐证材料
-                                </label>
-                                <ul class="files hyly">
-                                    {if condition="$ecr['oldDomainImg'] eq $ecr['newDomainImg']"}
-                                    <li>
-                                        {if condition="$ecr['oldDomainImg_is_img'] eq 1"}
-                                        <img onclick="Feng.showImg(this)" src="{$ecr.oldDomainImg|getStoragePath}" style="max-height:60px;">
-                                        {else/}
-                                        <img src="/static/img/Pdf.png" onclick="Feng.showPdf('{$ecr.oldDomainImg|getStoragePath}', 'domainImg')" style="max-height:60px;">
-                                        {/if}
-                                    </li>
-                                    {else/}
-                                    {if condition="$ecr['oldDomainImg']"}
-                                    <li>
-                                        {if condition="$ecr['oldDomainImg_is_img'] eq 1"}
-                                        <img onclick="Feng.showImg(this)" src="{$ecr.oldDomainImg|getStoragePath}" style="max-height:60px;"><i class="old">旧</i>
-                                        {else/}
-                                        <img src="/static/img/Pdf.png" onclick="Feng.showPdf('{$ecr.oldDomainImg|getStoragePath}', 'domainImg')" style="max-height:60px;"><i class="old">旧</i>
-                                        {/if}
-                                    </li>
-                                    {/if}
-                                    {if condition="$ecr['newDomainImg']"}
-                                    <li>
-                                        {if condition="$ecr['newDomainImg_is_img'] eq 1"}
-                                        <img src="{$ecr.newDomainImg|getStoragePath}" onclick="Feng.showImg(this)" style="max-height:60px;"/><i class="new">新</i>
-                                        {else/}
-                                        <img src="/static/img/Pdf.png" onclick="Feng.showPdf('{$ecr.newDomainImg|getStoragePath}', 'domainImg')" style="max-height:60px;"><i class="new">新</i>
-                                        {/if}
-                                    </li>
-                                    {/if}
-                                    {/if}
-                                </ul>
-                            </td>
-                        </tr>
-                        <tr class="type1">
-                            <td class="key">
-                                企业标签
-                            </td>
-                            <td class="value1 word-wrap" data-old="{$ecr.oldEnterpriseTagName}" data-new="{$ecr.newEnterpriseTagName}"></td>
+                            <td class="value1 word-wrap" data-old='{$ecr.oldEphone}' data-new='{$ecr.newEphone}'></td>
+                        </tr>      
+                        <tr>                            
                             <td class="key">
-                                企业类型
-                            </td>
-                            <td class="value1 word-wrap" data-old="{$ecr.oldEnterpriseTypeName}" data-new="{$ecr.newEnterpriseTypeName}" style="border:1px solid #c0a16b;"></td>
-                            <td style="border:1px solid #c0a16b;width: 300px">
-                                <label>
-                                    规上、高新技术、专精特新企业上传材料
-                                </label>
-                                <ul class="files hyly">
-                                    {if condition="$ecr['oldTypeImg'] eq $ecr['newTypeImg']"}
-                                    <li>
-                                        {if condition="$ecr['oldTypeImg_is_img'] eq 1"}
-                                        <img onclick="Feng.showImg(this)" src="{$ecr.oldTypeImg|getStoragePath}" style="max-height:60px;">
-                                        {else/}
-                                        <img src="/static/img/Pdf.png" onclick="Feng.showPdf('{$ecr.oldTypeImg|getStoragePath}', 'typeImg')" style="max-height:60px;">
-                                        {/if}
-                                    </li>
-                                    {else/}
-                                    {if condition="$ecr['oldTypeImg']"}
-                                    <li>
-                                        {if condition="$ecr['oldTypeImg_is_img'] eq 1"}
-                                        <img onclick="Feng.showImg(this)" src="{$ecr.oldTypeImg|getStoragePath}" style="max-height:60px;"><i class="old">旧</i>
-                                        {else/}
-                                        <img src="/static/img/Pdf.png" onclick="Feng.showPdf('{$ecr.oldTypeImg|getStoragePath}', 'typeImg')" style="max-height:60px;"><i class="old">旧</i>
-                                        {/if}
-                                    </li>
-                                    {/if}
-                                    {if condition="$ecr['newTypeImg']"}
-                                    <li>
-                                        {if condition="$ecr['newTypeImg_is_img'] eq 1"}
-                                        <img src="{$ecr.newTypeImg|getStoragePath}" onclick="Feng.showImg(this)" style="max-height:60px;"/><i class="new">新</i>
-                                        {else/}
-                                        <img src="/static/img/Pdf.png" onclick="Feng.showPdf('{$ecr.newTypeImg|getStoragePath}', 'typeImg')" style="max-height:60px;"><i class="new">新</i>
-                                        {/if}
-                                    </li>
-                                    {/if}
-                                    {/if}
-                                </ul>
+                                医院地址
                             </td>
+                            <td colspan="3" class="value1 word-wrap" data-old='{$ecr.oldProvinceName}{$ecr.oldCityName}{$ecr.oldCountyName} {$ecr.oldAddress}' data-new='{$ecr.newProvinceName}{$ecr.newCityName}{$ecr.newCountyName} {$ecr.newAddress}'></td>
                         </tr>
-                        {/if}
-                    </table>
-                    {/if}
+                    </table>                    
                 </div>
             </div>
         </div>
@@ -368,5 +208,7 @@
     </div>
 </div>
 <iframe style="display: none;" id="hiddenIframe" name="hiddenIframe"></iframe>
-<script src="/static/modular/enterprise/enterprisechangeRecord/ep_change_record_detail.js?v=4"></script>
+<script type="text/javascript">
+    document.write('<script src="/static/modular/enterprise/enterprisechangeRecord/ep_change_record_detail.js?v=' + (new Date()).getTime() + '"><\/script>');
+</script>
 {/block}

+ 41 - 164
app/enterprise/view/api/hospital/to_update.html

@@ -45,13 +45,13 @@
                             <tr>
                                 <td>
                                     <div class="rowGroup">
-                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>{eq name="ecr.special" value="0"}企业{else/}单位{/eq}名称</label>
+                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>医院名称</label>
                                         <input autocomplete="off" type="text" class="form-control" id="newName" name="newName" value="{$ecr.newName}"/>
                                     </div>
                                 </td>
                                 <td>
                                     <div class="rowGroup">
-                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>统一社会信用代码</label>
+                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>登记号</label>
                                         <input autocomplete="off" type="text" class="form-control" id="newIdCard" name="newIdCard"  value="{$ecr.newIdCard}"/>
                                     </div>
                                 </td>
@@ -61,9 +61,9 @@
                                         <input autocomplete="off" type="text" class="form-control" id="newLegal" name="newLegal" value="{$ecr.newLegal}"/>
                                     </div>
                                 </td>
-                                <td rowspan="2" style="position:relative;">
+                                <td rowspan="3" style="position:relative;">
                                     <button type="button" class="btn btn-info btn-sm" style="position:absolute;right:5px;top:5px;" onclick="$('#imgurl').click()"><i class="fa fa-upload" aria-hidden="true"></i>上传文件</button>
-                                    <label class="control-label spacing"><span class="text-danger">*</span>{eq name="ecr.special" value="0"}营业执照{else/}事业单位法人证或批文{/eq}</label>
+                                    <label class="control-label spacing"><span class="text-danger">*</span>医疗机构执业许可证</label>
                                     {if condition="$ecr['newImgurl']"}
                                     {eq name="ecr.imgurl_is_img" value="1"}
                                     <img src="{$ecr.newImgurl|getStoragePath}" style="height: 60px;" onclick="Feng.showImg(this)">
@@ -79,183 +79,60 @@
                             <tr>
                                 <td>
                                     <div class="rowGroup">
-                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>所属街道</label>
-                                        <select class="form-control" id="newStreet" name="newStreet" value="{$ecr.newStreet}"></select>
+                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>医共体</label>
+                                        <select class="form-control" id="newMedicalCommunityId" name="newMedicalCommunityId" value="{$ecr.newMedicalCommunityId}">
+                                            <option value=""></option>
+                                            {volist name="medicalCommunities" id="mc"}
+                                            <option value="{$mc.id}">{$mc.name}</option>
+                                            {/volist}
+                                        </select>
                                     </div>
                                 </td>
                                 <td>
                                     <div class="rowGroup">
-                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>{eq name="ecr.special" value="0"}企业{else/}单位{/eq}地址</label>
-                                        <input autocomplete="off" type="text" class="form-control" id="newAddress" name="newAddress"  value="{$ecr.newAddress}"/>
+                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>是否总院</label>
+                                        <select class="form-control" id="newIsGeneral" name="newIsGeneral" value="{$ecr.newIsGeneral}">
+                                            <option value=""></option>
+                                            <option value="2">否</option>
+                                            <option value="1">是</option>
+                                        </select>
                                     </div>
                                 </td>
                                 <td>
                                     <div class="rowGroup">
-                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>{eq name="ecr.special" value="0"}企业{else/}单位{/eq}电话</label>
+                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>医院电话</label>
                                         <input autocomplete="off" type="text" class="form-control" id="newEphone" name="newEphone" placeholder="固话格式0595xxxx" value="{$ecr.newEphone}"/>
                                     </div>
                                 </td>
                             </tr>
                             <tr>
-                                <td>
-                                    <div class="rowGroup">
-                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>{eq name="ecr.special" value="0"}企业{else/}单位{/eq}银行账号</label>
-                                        <input autocomplete="off" type="text" class="form-control" id="newBankCard" name="newBankCard" value="{$ecr.newBankCard}" onkeyup="value = value.replace(/\s+/g, '')"/>
-                                    </div>
-                                </td>
-                                <td>
-                                    <div class="rowGroup">
-                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>{eq name="ecr.special" value="0"}企业{else/}单位{/eq}开户银行</label>
-                                        <input autocomplete="off" type="text" class="form-control" id="newBank" name="newBank" value="{$ecr.newBank}"/>
-                                    </div>
-                                </td>
-                                <td>
+                                <td colspan="3">
                                     <div class="rowGroup">
-                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>{eq name="ecr.special" value="0"}企业{else/}单位{/eq}开户银行网点</label>
-                                        <input autocomplete="off" type="text" class="form-control" id="newBankNetwork" name="newBankNetwork" placeholder="XX银行XX支行/分行/分理处" value="{$ecr.newBankNetwork}"/>
-                                    </div>
-                                </td>
-                                <td style="position:relative;">            
-                                    <button type="button" class="btn btn-info btn-sm" style="position:absolute;right:5px;top:5px;" onclick="$('#bankImg').click()"><i class="fa fa-upload" aria-hidden="true"></i>上传文件</button>
-                                    <label class="control-label spacing"><span class="text-danger">*</span>开户许可证/基本存款账户信息</label>
-                                    {if condition="$ecr['newBankImg']"}
-                                    {eq name="ecr.bankImg_is_img" value="1"}
-                                    <img src="{$ecr.newBankImg|getStoragePath}" style="height: 60px;" onclick="Feng.showImg(this)" >
-                                    {else/}
-                                    <img src="/static/img/Pdf.png" style="height: 60px;" data-url="{$ecr.newBankImg|getStoragePath}">
-                                    {/eq}
-                                    {else/}
-                                    <img src="/static/img/yyzz.png" style="height: 60px;">
-                                    {/if}
-                                    <input style="display: none" autocomplete="off" type="file" class="form-control" id="bankImg" name="bankImg" />
-                                </td>
-                            </tr>
-                            {eq name="ecr.special" value="3"}
-                            <tr>
-                                <td colspan="4">
-                                    <div class="rowGroup">
-                                        <label class="control-label spacing td-label"><span style="color: red">*</span>机构标签</label>
-                                        <select class="form-control" id="newOrganizationTag" name="newOrganizationTag" value="{$ecr.newOrganizationTag}">
-                                        </select>
-                                    </div>
-                                </td>
-                            </tr>
-                            {/eq}
-                            {eq name="ecr.special" value="1"}
-                            <tr>
-                                <td colspan="4">
-                                    <div class="rowGroup">
-                                        <label class="control-label spacing td-label"><span style="color: red">*</span>单位标签</label>
-                                        <select class="form-control" id="newInstitutionTag" name="newInstitutionTag" value="{$ecr.newInstitutionTag}">
-                                        </select>
+                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>医院地址</label>
+                                        <div class="col-sm-12">
+                                            <div class="col-sm-2">
+                                                <select class="form-control" id="newProvince" name="newProvince" onchange="EpChangeEdit.afterSelectProvince();" value="{$ecr.newProvince}">
+                                                    <option value="">---请选择---</option>
+                                                </select>
+                                            </div>
+                                            <div class="col-sm-2">
+                                                <select class="form-control" id="newCity" name="newCity" onchange="EpChangeEdit.afterSelectCity();" value="{$ecr.newCity}">
+                                                    <option value="">---请选择---</option>
+                                                </select>
+                                            </div>
+                                            <div class="col-sm-2">
+                                                <select class="form-control" id="newCounty" name="newCounty" value="{$ecr.newCounty}">
+                                                    <option value="">---请选择---</option>
+                                                </select>
+                                            </div>
+                                            <div class="col-sm-6">
+                                                <input autocomplete="off" type="text" class="form-control" id="newAddress" name="newAddress" placeholder="请填写详细地址" value="{$ecr.newAddress}"/>
+                                            </div>
+                                        </div>
                                     </div>
                                 </td>
                             </tr>
-                            {/eq}
                         </table>
-                        {if condition="$ecr['special'] eq 0"}
-                        <div class="row">
-                            <div class="rowGroup" >
-                                <label class="col-sm-1 control-label spacing"><span class="text-danger">*</span>申报类型</label>
-                                <div class="col-sm-3 spacing">
-                                    <div class="form-control" disabled="disabled">
-                                        {switch name="ecr.type"}
-                                        {case value="1"}晋江市现代产业体系人才{/case}
-                                        {case value="2"}集成电路优秀人才{/case}
-                                        {case value="3"}海峡计划团队{/case}
-                                        {/switch}
-                                    </div>
-                                </div>
-                            </div>
-                            {eq name="ecr.type" value="1"}
-                            <div class="rowGroup agencyType">
-                                <label class="col-sm-1 control-label spacing"><span class="text-danger">*</span>机构类型</label>
-                                <div class="col-sm-3 spacing">
-                                    <select class="form-control" id="newAgencyType" name="newAgencyType" value="{$ecr.newAgencyType}" onchange="EpChangeEdit.agencyTypeChange()">
-                                    </select>
-                                </div>
-                            </div>
-                            {/eq}
-                        </div>
-                        {if condition="$ecr['type'] eq 1"}
-                        <div class="row" id="typeGroup">
-                            <table style="width: 100%;border-collapse: collapse;" class="table table-bordered">
-                                <tr class="agencyType1" {if condition="$ecr['newAgencyType'] neq 1"}style="display:none;"{/if}>
-                                    <td colspan="3">
-                                        <p style="color: #333;width:100%;white-space:normal;word-wrap:break-word;word-break:break-all;">备注:4341现代产业体系主要包括:“4”即鞋服、纺织、建材、食品4大传统优势产业,“3”即信息技术、智能装备、医疗健康3大新兴产业,“4”即商贸物流、文体旅游、研发创意、金融服务4大现代服务业,“1”即探索布局未来产业(数字经济等)</p>
-                                    </td>
-                                </tr>
-                                <tr class='agencyType1' {if condition="$ecr['newAgencyType'] neq 1"}style="display:none;"{/if}>
-                                    <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="newIndustryFieldNew" name="newIndustryFieldNew" value="{$ecr.newIndustryFieldNew}" onchange="EpChangeEdit.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="newIndustryFieldOld" name="newIndustryFieldOld" value="{$ecr.newIndustryFieldOld}">
-                                            </select>
-                                        </div>
-                                    </td>
-                                    <td style="position:relative;">
-                                        <button type="button" class="btn btn-info btn-sm" style="position:absolute;right:5px;top:5px;" onclick="$('#domainImg').click()"><i class="fa fa-upload" aria-hidden="true"></i>上传文件</button>
-                                        <label class="control-label spacing"><span style="color: red">*</span>行业领域上传材料</label>
-                                        {if condition="$ecr['newDomainImg']"}
-                                        {eq name="ecr.domainImg_is_img" value="1"}
-                                        <img src="{$ecr.newDomainImg|getStoragePath}" style="height: 60px;" onclick="Feng.showImg(this)" >
-                                        {else/}
-                                        <img src="/static/img/Pdf.png" style="height: 60px;" data-url="{$ecr.newDomainImg|getStoragePath}">
-                                        {/eq}
-                                        {else/}
-                                        <img src="/static/img/yyzz.png" style="height: 60px;">
-                                        {/if}
-                                        <input style="display: none" autocomplete="off" type="file" class="form-control" id="domainImg" name="domainImg" />
-                                        <p class="word-wrap">
-                                            请相关企业截图行业查询结果,做好相关标注(可以用下划线或圆圈等),还要清楚体现大类、中类或小类,上传做为佐证材料。
-                                        </p>
-                                    </td>
-                                </tr>
-                                <tr class="agencyType1" {if condition="$ecr['agencyType'] neq 1"}style="display:none;"{/if}>
-                                    <td colspan="3">
-                                        <p style="color: #333;width:100%;white-space:normal;word-wrap:break-word;word-break:break-all;">备注:请下载<a href="https://rencai.jucai.gov.cn/RXu0fYBPZwdXrgNzq9vIIRjaHXTu3mv3.docx">《国民经济行业分类(GB/T+4754-2017)》</a>或<a href="https://rencai.jucai.gov.cn/QKmKXmINDNeU1qKslkfaec47LXp7qCUO.docx" >《数字经济及其核心产业统计分类(2021)》</a>文档,对照行业分类标准,先查看属于什么行业,再按我市确定的“4341”产业比对属于什么产业,进行产业领域或行业领域的填报。</p>
-                                    </td>
-                                </tr>
-                                <tr class='agencyType1 agencyType2'>
-                                    <td>
-                                        <div class="rowGroup">
-                                            <label class="control-label spacing td-label"><span style="color: red">*</span>企业标签</label>
-                                            <select class="form-control" id="newEnterpriseTag" name="newEnterpriseTag" value="{$ecr.newEnterpriseTag}">
-                                            </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="newEnterpriseType" name="newEnterpriseType" value="{$ecr.newEnterpriseType}" onchange="EpChangeEdit.changeEnterpriseType()">
-                                            </select>
-                                        </div>
-                                    </td>
-                                    <td class="typeUploader" {if condition="in_array($ecr.newEnterpriseType,['guishang','gaoxinjishu','zhuanjingtexin'])"}style="position:relative;"{else/}style="position:relative;display:none;"{/if}>
-                                        <button type="button" class="btn btn-info btn-sm" style="position:absolute;right:5px;top:5px;" onclick="$('#typeImg').click()"><i class="fa fa-upload" aria-hidden="true"></i>上传文件</button>
-                                        <label class="control-label spacing"><span style="color: red">*</span>规上、高新技术、专精特新企业上传材料</label>
-                                        {if condition="$ecr['newTypeImg']"}
-                                        {eq name="ecr.typeImg_is_img" value="1"}
-                                        <img src="{$ecr.newTypeImg|getStoragePath}" style="height: 60px;" onclick="Feng.showImg(this)" >
-                                        {else/}
-                                        <img src="/static/img/Pdf.png" style="height: 60px;" data-url="{$ecr.newTypeImg|getStoragePath}">
-                                        {/eq}
-                                        {else/}
-                                        <img src="/static/img/yyzz.png" style="height: 60px;">
-                                        {/if}
-                                        <input style="display: none" autocomplete="off" type="file" class="form-control" id="typeImg" name="typeImg" />
-                                    </td>
-                                </tr>
-                            </table>
-                        </div>
-                        {/if}
-                        {/if}
                     </div>
                 </div>
                 <div class="panel panel-default">
@@ -306,6 +183,6 @@
 <iframe style="display: none;" id="hiddenIframe" name="hiddenIframe"></iframe>
 <!--<script src="${ctxPath}/static/modular/gate/enterprise/enterprise_change_edit.js"></script>-->
 <script type="text/javascript">
-    document.write('<script src="/static/modular/gate/enterprise/enterprise_change_edit.js?v=' + (new Date()).getTime() + '"><\/script>');
+    document.write('<script src="/static/modular/gate/enterprise/hospital/enterprise_change_edit.js?v=' + (new Date()).getTime() + '"><\/script>');
 </script>
 {/block}

+ 233 - 0
app/enterprise/view/hospital/detail.html

@@ -0,0 +1,233 @@
+{extend name="layout/content"}
+{block name="content"}
+<style type="text/css">
+    .spacing {
+        margin-bottom: 10px;
+        padding-right: 4px;
+        padding-left: 4px;
+        height: 30px;
+    }
+    table td{
+        text-align: center;
+    }
+    .key{
+        width: 150px;
+        text-align: right;
+        background-color: #f0f9eb;
+    }
+    .value1{
+        width: 240px;
+        text-align: left;
+    }
+    .word-wrap{
+        width:100%;
+        white-space:normal;
+        word-wrap:break-word;
+        word-break:break-all;
+    }
+</style>
+<script type="text/javascript">
+    $(function () {
+        $("select").each(function () {
+            $(this).val($(this).attr("value"));
+        });
+        {if condition = "!$ep['imgurl_is_img']"}
+        $("#yyzz").attr("src", Feng.ctxPath + "/static/img/Pdf.png");
+        // $("#yyzz").attr("onclick", Feng.showPdf(photoImg,"pdf","预览"));
+        $("#yyzz").removeAttr("onclick").unbind("click").click(function () {
+        Feng.showPdf(photoImg, "pdf", "预览")
+        });
+        {/if}
+        Feng.getCheckLog("logTable", {"type": 10, "mainId": '{$ep.id}', "typeFileId": "", "active": 1})
+        $(".fa").bind("mouseover", function () {
+            var htm = $(this).data('msg');
+            $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
+        });
+        $("#force_refresh").on('click', function () {
+            window.location.href = "/admin/enterprise/gotoEnterpriseDetailPage?id={$ep.id}";
+        });
+    });
+
+</script>
+<div class="ibox float-e-margins">
+    <div class="ibox-content">
+        <input type="text" class="form-control" id="id" name="id" value="{$ep.id}" style="display: none;"/>
+        <div class="tabs-container" >
+            <ul class="nav nav-tabs">
+                <li  class="" style="float: right;margin-left: 10px;">
+                    <button type="button" class="btn btn-sm btn-primary" id="force_refresh" >
+                        <i class="fa fa-refresh"></i>&nbsp;刷新
+                    </button>
+                </li>
+            </ul>
+        </div>
+        <div class="panel-body">
+            <div class="panel panel-default">
+                <div class="panel-heading">医院信息</div>
+                <div class="panel-body">
+                    <table style="width:100%" class="table table-bordered">
+                        <tr>
+                            <td class="key">
+                                医院名称
+                            </td>
+                            <td class="value1 word-wrap">
+                                {$ep.name}{if condition="$ep['isGeneral'] eq 1"}(总院){/if}
+                            </td>
+                            <td class="key">
+                                登记号
+                            </td>
+                            <td class="value1 word-wrap" style="border-right: 1px solid #c0a16b">
+                                {$ep.idCard}
+                            </td>
+                            <td rowspan="3" style="border: 1px solid #c0a16b;width: 300px">
+                                <label>
+                                    医疗机构执业许可证
+                                </label>
+                                <div>
+                                    {if condition="$ep['imgurl']"}
+                                    {if condition="$ep['imgurl_is_img']"}
+                                    <img onclick="Feng.showImg(this)" id="yyzz" alt="医疗机构执业许可证"
+                                         src="{$ep.imgurl|getStoragePath}" style="max-width:60px;">
+                                    {else}
+                                    <button type="button" onclick="Feng.showPdf('{$ep.imgurl|getStoragePath}', 'yyzz')" class="btn btn-xs btn-danger"><i class="fa fa-file-pdf-o" aria-hidden="true"></i></button>
+                                    {/if}
+                                    {/if}
+                                </div>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td class="key">
+                                所属医共体
+                            </td>
+                            <td class="value1 word-wrap">
+                                {$ep.medicalCommunityName}
+                            </td>
+                            <td class="key">
+                                法人代表
+                            </td>
+                            <td class="value1 word-wrap" style="border-right: 1px solid #c0a16b">
+                                {$ep.legal}
+                            </td>
+                        </tr>
+                        <tr>
+                            <td class="key">
+                                医院电话
+                            </td>
+                            <td class="value1 word-wrap">
+                                {$ep.ephone}
+                            </td>
+                            <td class="key">
+                                医院地址
+                            </td>
+                            <td class="value1 word-wrap" style="border-right: 1px solid #c0a16b">
+                                {$ep.fullLocationName} {$ep.address}
+                            </td>
+                        </tr>
+                    </table>
+                </div>
+            </div>
+        </div>
+        <div class="panel-body">
+            <div class="panel panel-default">
+                <div class="panel-heading">人才联络员信息</div>
+                <div class="panel-body">
+                    <table style="width:100%" class="table table-bordered">
+                        <tr>
+                            <td class="key">
+                                姓名
+                            </td>
+                            <td class="value1">
+                                {$ep.agentName}
+                            </td>
+                            <td class="key">
+                                人才联络员电话
+                            </td>
+                            <td style="text-align: left">
+                                {$ep.agentPhone}
+                            </td>
+                        </tr>
+                        <tr>
+                            <td class="key">
+                                人才联络员邮箱
+                            </td>
+                            <td class="value1">
+                                {$ep.agentEmail}
+                            </td>
+                            <td class="value1">
+                                人才联络员信息备案表
+                            </td>
+                            <td style="text-align: left">
+                                {if condition="$ep['beian']"}
+                                {if condition="$ep['beian_is_img']"}
+                                <img onclick="Feng.showImg(this)" id="beian" alt="人才联络员信息备案表"
+                                     src="{$ep.beian|getStoragePath}" style="max-width:60px;">
+                                {else}
+                                <button type="button" onclick="Feng.showPdf('{$ep.beian|getStoragePath}', 'beian')" class="btn btn-xs btn-danger">点击查看</button>
+                                {/if}
+                                {/if}
+                            </td>
+                        </tr>
+                    </table>
+                </div>
+            </div>
+        </div>
+        <div class="panel-body">
+            <div class="panel panel-default">
+                <div class="panel-heading">账号信息</div>
+                <div class="panel-body">
+                    <table style="width:100%" class="table table-bordered">
+                        <tr>
+                            <td class="key">
+                                审核状态
+                            </td>
+                            <td class="value1">
+                                {$ep.checkStateName}
+                            </td>
+                            <td class="key">
+                                审核人
+                            </td>
+                            <td style="text-align: left">
+                                {$ep.checkUser}
+                            </td>
+                        </tr>
+                        <tr>
+                            <td class="key">
+                                审核意见
+                            </td>
+                            <td class="value1">
+                                {$ep.checkMsg}
+                            </td>
+                            <td class="key">
+                                拉黑/冻结原因
+                            </td>
+                            <td style="text-align: left">
+                                {$ep.activeMsg}
+                            </td>
+                        </tr>
+                        <tr>
+
+                            <td class="key">
+                                备注
+                            </td>
+                            <td colspan="3" style="text-align: left">
+                                {$ep.description}
+                            </td>
+                        </tr>
+                    </table>
+                </div>
+            </div>
+        </div>
+
+        <div class="panel-body">
+            <div class="panel panel-default">
+                <div class="panel-heading" onclick="$(this).next().toggle()">日志</div>
+                <table id="logTable">
+                </table>
+            </div>
+        </div>
+    </div>
+</div>
+<div style="display: none" id="canvas">
+    <canvas id="the-canvas"></canvas>
+</div>
+{/block}

+ 107 - 0
app/enterprise/view/hospital/examine.html

@@ -0,0 +1,107 @@
+{extend name="layout/content"}
+{block name="content"}
+<div class="ibox float-e-margins">
+    <div class="ibox-content">
+        <form id="ep_active" class="form-horizontal">
+            <input type="text" id="id" value="{$ep.id}" style="display: none;" />
+            <input type="text" id="type" value="{$ep.type}" style="display: none;" />
+            <div class="row">
+                <div class="col-sm-12">
+                    <div class="rowGroup"  style="margin-bottom: 0px;">
+                        <label class="col-sm-2 control-label">医院名称</label>
+                        <div class="col-sm-10">
+                            <input type="text" class="form-control" readonly="readonly" id="name" name="name" value="{$ep.name}"  />
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="hr-line-dashed"></div>
+            <div class="row">
+                <div class="col-sm-12">
+                    <div class="rowGroup"  style="margin-bottom: 0px;">
+                        <label class="col-sm-2 control-label">登记号</label>
+                        <div class="col-sm-10">
+                            <input type="text" class="form-control" readonly="readonly" id="idCard" name="idCard" value="{$ep.idCard}"  />
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="hr-line-dashed"></div>
+            <div class="row">
+                <div class="col-sm-12">
+                    <div class="rowGroup"  style="margin-bottom: 0px;">
+                        <label class="col-sm-2 control-label">注册时间</label>
+                        <div class="col-sm-10">
+                            <input type="text" class="form-control" readonly="readonly" id="createTime" name="createTime" value="{$ep.createTime}"/>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="hr-line-dashed"></div>
+            <div class="row">
+                <div class="col-sm-12">
+                    <div class="rowGroup"  style="margin-bottom: 0px;">
+                        <label class="col-sm-2 control-label">审核人</label>
+                        <div class="col-sm-10">
+                            <input type="text" class="form-control" readonly="readonly" id="checkUser" name="checkUser" value="{$checkUser}"/>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="hr-line-dashed"></div>
+            <div class="row">
+                <div class="col-sm-12">
+                    <div class="rowGroup"  style="margin-bottom: 0px;">
+                        <label class="col-sm-2 control-label"><span class="text-danger">*</span>审核状态</label>
+                        <div class="col-sm-10">
+                            <select class="form-control" id="checkState" name="checkState" onchange="EpExam.toggleField()" data-val='{$ep.checkState}'>
+                                <option value="">--- 请选择 ---</option>
+                                <option value="5" {in name="ep.checkState" value="5"}selected{/in}>审核驳回</option>
+                                <option value="6" {in name="ep.checkState" value="6"}selected{/in}>审核通过</option>
+                            </select>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="hr-line-dashed"></div>
+            <div class="row">
+                <div class="col-sm-12">
+                    <div class="rowGroup"  style="margin-bottom: 0px;">
+                        <label class="col-sm-2 control-label">审核意见</label>
+                        <div class="col-sm-10">
+                            <textarea class="form-control" rows="3" id="checkMsg" name="checkMsg">{$ep.checkMsg}</textarea>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div id="field" {if condition="!in_array($ep['checkState'],[2,5])"}style="padding-top:5px;display:none"{/if}>
+                <label for="checkMsg" class="control-label">可修改字段</label>
+                <div id="field_info">
+                    <ul style="overflow:hidden;list-style:none;">
+                        {volist name="fields" id="field"}
+                        <li style="float:left;margin-right:10px;"><input type="checkbox" value="{$field.field}" {if condition="$field['checked']"}checked="true"{/if}><span>{$field.name}</span></li>
+                        {/volist}
+                    </ul>
+                </div>
+                <label for="checkMsg" class="control-label">可修改附件</label>
+                <div id="field_file">
+                    <ul style="overflow:hidden;list-style:none;">
+                        {volist name="files" id="file"}
+                        <li style="float:left;margin-right:10px;"><input type="checkbox" value="{$file.field}" {if condition="$file['checked']"}checked="true"{/if}><span>{$file.name}</span></li>
+                        {/volist}
+                    </ul>
+                </div>
+                <div class="form-group" style="text-align: center">
+                    <button type="button" class="btn btn-primary" onclick="EpExam.checkAll()">全选</button>
+                    <button type="button" class="btn btn-success" onclick="EpExam.unCheckAll()">反选</button>
+                </div>
+            </div>
+        </form>
+    </div>
+</div>
+<input type="text" id="checkStateTemp" value="{$ep.checkState}" style="display: none;" />
+<!--<script src="${ctxPath}/static/modular/enterprise/enterprise_examine.js"></script>-->
+<script type="text/javascript">
+    document.write('<script src="/static/modular/gate/enterprise/hospital/examine.js?v=' + (new Date()).getTime() + '"><\/script>');
+</script>
+{/block}

+ 138 - 0
app/enterprise/view/hospital/list.html

@@ -0,0 +1,138 @@
+{extend name="layout/content"}
+{block name="content"}
+<style>
+    #field_info{overflow:hidden;}
+    #field_info li{list-style:none;float:left;margin:2px 5px;}
+</style>
+<div class="row">
+    <div class="col-sm-12">
+        <div class="ibox float-e-margins">
+            <div class="ibox-title">
+                <h5>分院列表</h5>
+            </div>
+            <div class="ibox-content">
+                <input type="hidden" id="type" value="${type}">
+                <div class="row">
+                    <div class="col-sm-4">
+                        <div class="input-group input-group-sm">
+                            <div class="input-group-btn">
+                                <button data-toggle="dropdown" class="btn btn-white dropdown-toggle"
+                                        type="button">医院名称
+                                </button>
+                            </div>
+                            <input type="text" class="form-control" id="name" placeholder=""/>
+                        </div>
+                    </div>
+                    <div class="col-sm-4">
+                        <div class="input-group input-group-sm">
+                            <div class="input-group-btn">
+                                <button data-toggle="dropdown" class="btn btn-white dropdown-toggle"
+                                        type="button">登记号
+                                </button>
+                            </div>
+                            <input type="text" class="form-control" id="idCard" placeholder=""/>
+                        </div>
+                    </div>
+                    <div class="col-sm-4">
+                        <div class="input-group input-group-sm">
+                            <div class="input-group-btn">
+                                <button data-toggle="dropdown" class="btn btn-white dropdown-toggle"
+                                        type="button">法人代表
+                                </button>
+                            </div>
+                            <input type="text" class="form-control" id="legal" placeholder=""/>
+                        </div>
+                    </div>
+                    <div class="col-sm-4">
+                        <div class="input-group input-group-sm">
+                            <div class="input-group-btn">
+                                <button data-toggle="dropdown" class="btn btn-white dropdown-toggle"
+                                        type="button">医院电话
+                                </button>
+                            </div>
+                            <input type="text" class="form-control" id="ephone" placeholder=""/>
+                        </div>
+                    </div>
+                    <div class="col-sm-4">
+                        <div class="input-group input-group-sm">
+                            <div class="input-group-btn">
+                                <button data-toggle="dropdown" class="btn btn-white dropdown-toggle"
+                                        type="button">人才联络员
+                                </button>
+                            </div>
+                            <input type="text" class="form-control" id="agentName" placeholder=""/>
+                        </div>
+                    </div>
+                    <div class="col-sm-4">
+                        <div class="input-group input-group-sm">
+                            <div class="input-group-btn">
+                                <button data-toggle="dropdown" class="btn btn-white dropdown-toggle"
+                                        type="button">人才联络员电话
+                                </button>
+                            </div>
+                            <input type="text" class="form-control" id="agentPhone" placeholder=""/>
+                        </div>
+                    </div>
+                    <div class="col-sm-4">
+                        <div class="input-group input-group-sm">
+                            <div class="input-group-btn">
+                                <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                    审核状态
+                                </button>
+                            </div>
+                            <select class="form-control" id="checkState">
+                                <option value=""></option>
+                                <option value="1">待审核</option>
+                                <option value="5">初审驳回</option>
+                                <option value="6">初审通过</option>
+                                <option value="2">审核驳回</option>
+                                <option value="3">审核通过</option>
+                                <option value="4">重新提交</option>
+                            </select>
+                        </div>
+                    </div>
+                    <div class="col-sm-4">
+                        <div class="input-group input-group-sm">
+                            <div class="input-group-btn">
+                                <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                    账号状态
+                                </button>
+                            </div>
+                            <select class="form-control" id="active">
+                                <option value=""></option>
+                                <option value="1">账号有效</option>
+                                <option value="2">拉黑</option>
+                            </select>
+                        </div>
+                    </div>
+                    <div class="col-sm-4">
+                        <button type="button" class="btn btn-sm btn-primary " onclick="Enterprise.search()">
+                            <i class="fa fa-search"></i>&nbsp;搜索
+                        </button>
+                        <button type="button" class="btn btn-sm btn-primary " onclick="Enterprise.reset()">
+                            <i class="fa fa-trash"></i>&nbsp;重置
+                        </button>
+                    </div>
+                </div>
+                <div class="hidden-xs" id="tableToolbar" role="group">
+                    <button type="button" class="btn btn-sm btn-primary " onclick="Enterprise.gotoEnterpriseDetailPage()">
+                        <i class="fa fa-edit"></i>&nbsp;审核
+                    </button>
+                </div>
+                <table id="table" class="table-condensed" style="font-size: 10px;table-layout: fixed!important;"
+                       data-mobile-responsive="true" data-click-to-select="true">
+                    <thead>
+                        <tr>
+                            <th data-field="selectItem" data-checkbox="true"></th>
+                        </tr>
+                    </thead>
+                </table>
+            </div>
+        </div>
+    </div>
+</div>
+<!--<script src="${ctxPath}/static/modular/enterprise/enterprise_list.js"></script>-->
+<script type="text/javascript">
+    document.write('<script src="/static/modular/gate/enterprise/hospital/list.js?v=' + (new Date()).getTime() + '"><\/script>');
+</script>
+{/block}

+ 10 - 2
app/index/controller/Auth.php

@@ -53,8 +53,16 @@ class Auth extends BaseController {
             } else if (session("isCaptcha") == 1 && !captcha_check($captcha)) {
                 $msg = "验证码错误";
             } else if ($res_msg = $user->checkState()) {
-                if (in_array($user->info['checkState'], [2, 5]) && $usertype == 2) {
-                    return redirect("/common/auth/enterprise_edit");
+                if ($usertype == 2 && in_array($user->info['checkState'], [2, 5])) {
+                    if ($user->info["type"] == \app\common\state\CommonConst::ENTERPRISE_WJ) {
+                        if (($user->info["isGeneral"] == 1 && $user->info["checkState"] == 2) || ($user->info["isGeneral"] == 2 && $user->info["checkState"] == 5)) {
+                            return redirect("/common/auth/enterprise_edit");
+                        } else {
+                            $res_msg = "您的账号正在审核中,请耐心等待!";
+                        }
+                    } else {
+                        return redirect("/common/auth/enterprise_edit");
+                    }
                 }
                 $msg = $res_msg;
             }

+ 2 - 2
public/static/modular/enterprise/enterprise_examine.js

@@ -12,7 +12,7 @@ EpExam.save = function (submit) {
         Feng.info("请填写审核意见");
         return;
     }
-    if (checkState == 2 && $("#field input[type=checkbox]:checked").length == 0) {
+    if ((checkState == 2 || checkState == 5) && $("#field input[type=checkbox]:checked").length == 0) {
         Feng.info("请选择驳回修改的字段或者附件");
         return;
     }
@@ -108,7 +108,7 @@ EpExam.toggleField = function () {
         if (checkMsg == null || checkMsg == '') {
             $("#checkMsg").val(typeName + "注册审核通过。");
         }
-    } else if (checkState == 2) {
+    } else if (checkState == 2 || checkState == 5) {
         $("#checkMsg").val("");
         $("#field").css("display", "block");
     } else {

+ 12 - 4
public/static/modular/enterprise/hospital/enterprisechangeRecord/ep_change_record_list.js

@@ -19,8 +19,12 @@ EpChange.initColumn = function () {
             }
         },
         {title: '原法人代表', field: 'oldLegal', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '原医共体', field: 'oldMedicalCommunityName', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '原医院地址', field: 'oldFullAddress', align: 'center', width: 200, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '原医共体', field: 'oldMedicalCommunityName', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'},        
+        {title: '原医院地址', field: 'oldAddress', align: 'center', width: 200, valign: 'middle', 'class': 'uitd_showTip',
+            formatter: function (value, row, index) {
+                return row.oldProvinceName + row.oldCityName + row.oldCountyName + " " + value;
+            }
+        },
         {title: '<span style="color: red">新医院名称</span>', field: 'newName', align: 'center', width: 200, valign: 'middle', 'class': 'uitd_showTip',
             formatter: function (value, row, index) {
                 if (row.newIsGeneral == 1) {
@@ -30,8 +34,12 @@ EpChange.initColumn = function () {
             }
         },
         {title: '新法人代表', field: 'newLegal', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '新医共体', field: 'newMedicalCommunityName', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '新医院地址', field: 'newFullAddress', align: 'center', width: 170, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '新医共体', field: 'newMedicalCommunityName', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'},        
+        {title: '新医院地址', field: 'newAddress', align: 'center', width: 200, valign: 'middle', 'class': 'uitd_showTip',
+            formatter: function (value, row, index) {
+                return row.newProvinceName + row.newCityName + row.newCountyName + " " + value;
+            }
+        },
         {title: '申请时间', field: 'createTime', align: 'center', width: 150, valign: 'middle', 'class': 'uitd_showTip'},
         {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: 100,
             formatter: function (value, row, index) {

+ 16 - 10
public/static/modular/gate/enterprise/hospital/enterprise_center.js

@@ -45,13 +45,19 @@ EnterpriseCenter.initColumn = function () {
     return [
         {field: 'selectItem', radio: true},
         {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
-        {title: '更新单位名称', field: 'newName', align: 'left', width: 120, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '更新统一社会信用代码', field: 'newIdCard', align: 'center', width: 160, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '更新产业领域', field: 'newIndustryFieldNewName', align: 'center', width: 160, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '更新单位标签', field: 'newEnterpriseType', align: 'left', width: 120, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '更新医院名称', field: 'newName', align: 'left', width: 120, valign: 'middle', 'class': 'uitd_showTip',
+            formatter: function (value, row, index) {
+                return value + (row.newIsGeneral == 1 ? "(总院)" : "");
+            }
+        },
+        {title: '更新登记号', field: 'newIdCard', align: 'center', width: 160, valign: 'middle', 'class': 'uitd_showTip'},
         {title: '更新法人代表', field: 'newLegal', align: 'left', width: 100, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '更新所属街道', field: 'newStreetName', align: 'left', width: 100, valign: 'middle', 'class': 'uitd_showTip'},
-        {title: '更新单位地址', field: 'newAddress', align: 'left', width: 200, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '更新医共体', field: 'newMedicalCommunityName', align: 'left', width: 100, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '更新学校地址', field: 'newAddress', align: 'left', width: 200, valign: 'middle', 'class': 'uitd_showTip',
+            formatter: function (value, row, index) {
+                return row.newProvinceName + row.newCityName + row.newCountyName + " " + value;
+            }
+        },
         {title: '审核状态', field: 'checkState', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip',
             formatter: function (value, row, index) {
                 if (value == null || value == '') {
@@ -113,7 +119,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,
@@ -135,7 +141,7 @@ EnterpriseCenter.addEnterprisechangeRecord = function () {
             layer.full(index);
             EnterpriseCenter.layerIndex = index;
         } else {
-            Feng.info("您还有 " + data.length + " 条企业变更申请没有处理完毕, 不能重新提交变更申请!");
+            Feng.info("您还有 " + data.length + " 条变更申请没有处理完毕, 不能重新提交变更申请!");
         }
     }, function (data) {
         Feng.error("操作失败!" + data.responseJSON.message + "!");
@@ -155,7 +161,7 @@ EnterpriseCenter.updateEnterprisechangeRecord = function () {
     }
     var index = layer.open({
         type: 2,
-        title: '申请机构信息变更',
+        title: '申请医院信息变更',
         area: ['930px', '600px'], //宽高
         fix: false, //不固定
         maxmin: true,
@@ -195,7 +201,7 @@ EnterpriseCenter.showEnterprisechangeRecordDetail = function () {
     }
     var index = layer.open({
         type: 2,
-        title: '机构信息变更详情',
+        title: '医院信息变更详情',
         area: ['930px', '600px'], //宽高
         fix: false, //不固定
         maxmin: true,

+ 68 - 143
public/static/modular/gate/enterprise/hospital/enterprise_change_edit.js

@@ -1,82 +1,38 @@
 var locked = false;
 var EpChangeEdit = {
     epChangeEditData: {},
-    validateFields1: {
-        newName: {validators: {notEmpty: {message: '企业名称不能为空'}}}, //, regexp: {regexp: /^([\u4E00-\u9FA5]|\(|\)){1,100}$/, message: "单位名称只允许中文"}
-        newIdCard: {validators: {notEmpty: {message: '统一社会信用代码不能为空'}}},
-        newEnterpriseTag: {validators: {notEmpty: {message: '企业标签不能为空'}}},
-        newEnterpriseType: {validators: {notEmpty: {message: '企业类型不能为空'}}},
+    validateFields: {
+        newName: {validators: {notEmpty: {message: '医院名称不能为空'}}}, //, regexp: {regexp: /^([\u4E00-\u9FA5]|\(|\)){1,100}$/, message: "单位名称只允许中文"}
+        newIdCard: {validators: {notEmpty: {message: '登记号不能为空'}}},
         newLegal: {validators: {notEmpty: {message: '法人代表不能为空'}}}, //, regexp: {regexp: /^[\u4e00-\u9fa5]{1,50}$/, message: "法人代表只允许中文"}
-        newAddress: {validators: {notEmpty: {message: '企业地址不能为空'}}},
-        newStreet: {validators: {notEmpty: {message: '所属街道不能为空'}}},
-        newAgentName: {validators: {notEmpty: {message: '人才联络员不能为空'}}},
-        newEphone: {
+        newMedicalCommunityId: {validators: {notEmpty: {message: '请选择所属医共体'}}},
+        newIsGeneral: {validators: {notEmpty: {message: '请选择是否总院'}}},
+        newProvince: {validators: {notEmpty: {message: '请选择医院所在省份'}}},
+        newCity: {validators: {notEmpty: {message: '请选择医院所在市'}}},
+        newCounty: {
             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: "企业电话格式不正确"
-                }
-            }
-        },
-        newAgentPhone: {
-            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: "人才联络员电话格式不正确"
-                }
-            }
-        },
-        newAgentEmail: {
-            validators: {
-                notEmpty: {
-                    message: '电子邮箱不能为空'
-                },
-                emailAddress: {
-                    message: "电子邮箱格式不正确"
-                }
-            }
-        },
-        newBankCard: {
-            validators: {
-                notEmpty: {
-                    message: '企业银行账号不能为空'
+                callback: {
+                    message: "请选择医院所在县/区",
+                    callback: function (value, validator) {
+                        if ($("#newProvince").val() > 0 && $("#newCity").val() > 0 && $("#newCounty option").length > 1 && $("#newCounty option:selected").length == 0) {
+                            //当省市都有值时,如果县有列表,必选
+                            return false;
+                        }
+                        return true;
+                    }
                 }
             }
         },
-        newBank: {
-            validators: {
-                notEmpty: {
-                    message: '企业开户银行不能为空'
-                }
-            }, regexp: {regexp: /^([\u4E00-\u9FA5]|\(|\)|\(|\)){1,100}$/, message: "开户银行只允许中文"}
-        },
-        newBankNetwork: {
-            validators: {notEmpty: {message: '开户银行网点不能为空'},
-                regexp: {
-                    regexp: /^[\u4e00-\u9fa5]*银行[\u4e00-\u9fa5]*$/,
-                    message: "开户银行网点格式不正确"
-                }}
-        }
-    },
-    validateFields2: {
-        newName: {validators: {notEmpty: {message: '单位名称不能为空'}}}, //, regexp: {regexp: /^[\u4e00-\u9fa5]{1,100}$/, message: "单位名称只允许中文"}
-        newAddress: {validators: {notEmpty: {message: '单位地址不能为空'}}},
-        newStreet: {validators: {notEmpty: {message: '所属街道不能为空'}}},
+        newAddress: {validators: {notEmpty: {message: '医院地址不能为空'}}},
         newAgentName: {validators: {notEmpty: {message: '人才联络员不能为空'}}},
         newEphone: {
             validators: {
                 notEmpty: {
-                    message: '单位电话不能为空'
+                    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: "单位电话格式不正确"
+                    message: "医院电话格式不正确"
                 }
             }
         },
@@ -146,25 +102,19 @@ EpChangeEdit.collectData = function () {
     this
             .set('id')
             .set('type')
-            .set('newAgencyType')
             .set('newName')
             .set('newIdCard')
-            .set('newEnterpriseTag')
-            .set('newEnterpriseType')
             .set('newLegal')
-            .set('newStreet')
+            .set('newMedicalCommunityId')
+            .set('newIsGeneral')
+            .set('newProvince')
+            .set('newCity')
+            .set('newCounty')
             .set('newAddress')
             .set('newEphone')
             .set('newAgentName')
             .set('newAgentPhone')
             .set('newAgentEmail')
-            .set('newIndustryFieldNew')
-            .set('newIndustryFieldOld')
-            .set('newOrganizationTag')
-            .set('newInstitutionTag')
-            .set('newBankCard')
-            .set('newBank')
-            .set('newBankNetwork')
             .set('enterprise_id');
 }
 
@@ -517,26 +467,6 @@ EpChangeEdit.downloadFile = function (id) {
     window.location.href = Feng.ctxPath + '/enterprisechangeRecord/downloadFile?id=' + id;
 };
 
-EpChangeEdit.industryChange = function () {
-    var industryNew = $("#newIndustryFieldNew").val();
-    var arr = [{"name": "newIndustryFieldOld", "code": industryNew + "_field"}];
-    Feng.findChildDictBatch(JSON.stringify(arr));
-}
-
-EpChangeEdit.changeEnterpriseType = function () {
-    var enterpriseType = $("#newEnterpriseType").val();
-    switch (enterpriseType) {
-        case "guishang":
-        case "gaoxinjishu":
-        case "zhuanjingtexin":
-            $("td.typeUploader").css("display", "table-cell");
-            break;
-        default:
-            $("td.typeUploader").css("display", "none");
-            break;
-    }
-};
-
 $("#imgurl,#bankImg,#beian,#domainImg,#typeImg").change(function (e) {
     var that = this;
     if (!Feng.chkFileInvalid(that.files[0], 5, 10, ["image/jpeg", "image/gif", "image/png", "image/jpg", "application/pdf"], "只允许上传PDF或图片")) {
@@ -571,25 +501,38 @@ $("img").click(function () {
         }
     }
 })
-EpChangeEdit.agencyTypeChange = function () {
-    var agencyType = $("#newAgencyType").val();
-    switch (agencyType) {
-        case "1":
-            $("#typeGroup").attr("style", "display:block");
-            $(".agencyType1").attr("style", "");
-            $(".agencyType2").attr("style", "");
-            break;
-        case "2":
-            $("#typeGroup").attr("style", "display:block");
-            $(".agencyType1").attr("style", "display:none");
-            $(".agencyType2").attr("style", "");
-            $("#newIndustryFieldNew").val("");
-            $("#newIndustryFieldOld").val("");
-            break;
-        default:
-            $("#typeGroup").attr("style", "display:none");
-            break;
+
+EpChangeEdit.afterSelectProvince = function () {
+    var province = $("#newProvince").val();
+    $("#newCity").empty();
+    $("#newCounty").empty();
+    if (province == null || province == '') {
+        return;
+    }
+    Feng.addAjaxSelect({
+        "id": "newCity",
+        "displayCode": "code",
+        "displayName": "name",
+        "type": "GET",
+        "url": Feng.ctxPath + "/common/tool/findCityByProvinceSelect/code/" + province
+    });
+}
+/**
+ * 加载县
+ */
+EpChangeEdit.afterSelectCity = function () {
+    var city = $("#newCity").val();
+    $("#newCounty").empty();
+    if (city == null || city == '') {
+        return;
     }
+    Feng.addAjaxSelect({
+        "id": "newCounty",
+        "displayCode": "code",
+        "displayName": "name",
+        "type": "GET",
+        "url": Feng.ctxPath + "/common/tool/findCountyByCitySelect/code/" + city
+    });
 }
 
 $(function () {
@@ -603,42 +546,24 @@ $(function () {
             validating: 'glyphicon glyphicon-refresh'
         },
         group: '.rowGroup',
-        fields: special == 1 ? EpChangeEdit.validateFields2 : EpChangeEdit.validateFields1,
+        fields: EpChangeEdit.validateFields,
         live: 'enabled',
         message: '该字段不能为空'
     });
-    //Feng.initValidator("ecr_form", EpChangeEdit.validateFields);
-    var industryNew = $("#newIndustryFieldNew").attr("value");
-    var arr = [
-        {"name": "newStreet", "code": "street"},
-        {"name": "newEnterpriseTag", "code": "enterprise_tag"},
-        {"name": "newOrganizationTag", "code": "organization_tag"},
-        {"name": "newInstitutionTag", "code": "institution_tag"},
-        {"name": "newEnterpriseType", "code": "enterprise_type"},
-        {"name": "newIndustryFieldNew", "code": "industry_field"},
-        {"name": "newIndustryFieldOld", "code": industryNew + "_field"},
-        {"name": "newAgencyType", "code": "agency_type"}];
-    Feng.findChildDictBatch(JSON.stringify(arr));
+    
+    //加载省份
+    Feng.addAjaxSelect({
+        "id": "newProvince",
+        "displayCode": "code",
+        "displayName": "name",
+        "type": "GET",
+        "url": Feng.ctxPath + "/common/tool/getProvinceSelect"
+    });
+
     $("select").each(function () {
         $(this).val($(this).attr("value"));
+        $(this).trigger("change");
     })
-    if (type == 1) {
-        $("#newEnterpriseTag,#newIndustryFieldNew,#newIndustryFieldOld,#newEnterpriseType").parent().parent().attr("style", "display:cell");
-        $("#newEnterpriseTag").val($("#newEnterpriseTag").attr("value"));
-        $("#newIndustryFieldNew").val($("#newIndustryFieldNew").attr("value"));
-        $("#newIndustryFieldOld").val($("#newIndustryFieldOld").attr("value"));
-    } else {
-        $("#newEnterpriseTag,#newIndustryFieldNew,#newIndustryFieldOld,#newEnterpriseType").parent().parent().attr("style", "display:none");
-        $("#newEnterpriseTag").val("");
-        $("#newIndustryFieldNew").val("");
-        $("#newBankCard").parent().find("span").css("display", "none");
-        $("#newBankNetwork").parent().find("span").css("display", "none");
-        $("#newBank").parent().find("span").css("display", "none");
-        $("#bankImg").parent().find("span").css("display", "none");
-        $('#ecr_form').bootstrapValidator("removeField", "newBankCard");
-        $('#ecr_form').bootstrapValidator("removeField", "newBankNetwork");
-        $('#ecr_form').bootstrapValidator("removeField", "newBank");
-    }
     var id = $("#id").val();
     if (id != null && id != '') {
         $("#fileLi").removeAttr("style");

+ 76 - 0
public/static/modular/gate/enterprise/hospital/examine.js

@@ -0,0 +1,76 @@
+var EpExam = {};
+var locked = false;
+EpExam.save = function (submit) {
+    var id = $("#id").val();
+    var checkState = $("#checkState").val();
+    var checkMsg = $("#checkMsg").val();
+    if (checkState == null || checkState == "") {
+        Feng.info("请选择审核状态");
+        return;
+    }
+    if (checkMsg == null || checkMsg == "") {
+        Feng.info("请填写审核意见");
+        return;
+    }
+    if (checkState == 5 && $("#field input[type=checkbox]:checked").length == 0) {
+        Feng.info("请选择驳回修改的字段或者附件");
+        return;
+    }
+    var fieldCount = $("#field_info input[type=checkbox]:checked").length;
+    var fields = new Array();
+    for (var i = 0; i < fieldCount; i++) {
+        fields.push($("#field_info input[type=checkbox]:checked").eq(i).val());
+    }
+    var fileCount = $("#field_file input[type=checkbox]:checked").length;
+    var files = new Array();
+    for (var i = 0; i < fileCount; i++) {
+        files.push($("#field_file input[type=checkbox]:checked").eq(i).val());
+    }
+    var da = {"id": id, "checkState": checkState, "checkMsg": checkMsg, fields: fields, files: files, submit: submit};
+    //var operation = function () {
+    var ajax = new $ax(Feng.ctxPath + "/enterprise/hospital/doExamine", function (data) {
+        if (data.code == 200) {
+            if (submit) {
+                window.parent.Enterprise.table.refresh();
+                parent.layer.closeAll();
+            }
+        }
+        Feng.info(data.msg);
+    }, function (data) {
+        Feng.error("操作失败!" + data.responseJSON.message + "!");
+    });
+    ajax.set(da);
+    ajax.start();
+    //};
+    //Feng.confirm("确定提交吗?", operation);
+}
+EpExam.addSubmit = function () {
+    EpExam.save(0);
+};
+EpExam.submitToCheck = function () {
+    EpExam.save(1);
+};
+EpExam.checkAll = function () {
+    $("#field input[type=checkbox]").prop("checked", true);
+}
+EpExam.unCheckAll = function () {
+    $("#field input[type=checkbox]").removeAttr("checked");
+}
+
+EpExam.toggleField = function () {
+    var type = $("#type").val();
+    var checkState = $("#checkState").val();
+    var checkMsg = $("#checkMsg").val();
+    var typeName = "医院";
+    if (checkState == 6) {
+        $("#field").css("display", "none");
+        if (checkMsg == null || checkMsg == '') {
+            $("#checkMsg").val(typeName + "注册审核通过。");
+        }
+    } else if (checkState == 5) {
+        $("#checkMsg").val("");
+        $("#field").css("display", "block");
+    } else {
+        $("#field").css("display", "none");
+    }
+}

+ 319 - 0
public/static/modular/gate/enterprise/hospital/list.js

@@ -0,0 +1,319 @@
+var Enterprise = {
+    id: "table", //表格id
+    seItem: null, //选中的条目
+    table: null,
+    layerIndex: -1
+};
+
+Enterprise.initColumn = function () {
+    var type = $("#type").val();
+    return [
+        {field: 'selectItem', radio: true},
+        {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
+        {title: '账号', field: 'username', visible: true, align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '医院名称', field: 'name', visible: true, align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '登记号', field: 'idCard', visible: true, align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '法人代表', field: 'legal', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '医院电话', field: 'ephone', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '人才联络员', field: 'agentName', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '人才联络员电话', field: 'agentPhone', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '审核状态', field: 'checkState', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip',
+            formatter: function (value, row, index) {
+                if (value == null || value == '') {
+                    return "";
+                } else if (value == 1) {
+                    return "未审核";
+                } else if (value == 2) {
+                    return "审核驳回";
+                } else if (value == 3) {
+                    return "审核通过";
+                } else if (value == 4) {
+                    return "重新提交";
+                } else if (value == 5) {
+                    return "初审驳回";
+                } else if (value == 6) {
+                    return "初审通过";
+                }
+            },
+            cellStyle: function (value, row, index) {
+                if (value == null || value === '') {
+                    return {css: {}};
+                } else if (value === 1) {
+                    return {css: {"background-color": "LightGrey"}};
+                } else if (value === 3) {
+                    return {css: {'background-color': 'LightGreen'}};
+                } else if (value === 2) {
+                    return {css: {"background-color": "Orange"}};
+                } else if (value === 4) {
+                    return {css: {'background-color': 'LightGrey'}};
+                } else if (value === 5) {
+                    return {css: {'background-color': 'Orange'}};
+                } else if (value === 6) {
+                    return {css: {"background-color": "LightBlue"}};
+                } else {
+                    return {css: {}};
+                }
+            }
+        },
+        {title: '账号状态', field: 'active', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip',
+            formatter: function (value, row, index) {
+                if (value == null || value == '') {
+                    return "";
+                } else if (value == 1) {
+                    return "账号有效";
+                } else if (value == 2) {
+                    return "拉黑/冻结";
+                }
+            },
+            cellStyle: function (value, row, index) {
+                if (value == null || value === '') {
+                    return {css: {}};
+                } else if (value === 1) {
+                    return {css: {'background-color': 'LightGreen'}};
+                } else if (value === 2) {
+                    return {css: {"background-color": "Orange"}};
+                } else {
+                    return {css: {}};
+                }
+            }
+        },
+        {title: '注册时间', field: 'createTime', align: 'center', width: 120, valign: 'middle', 'class': 'uitd_showTip'},
+        {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "80px",
+            formatter: function (value, row, index) {
+                return "<span class='label label-success' onclick=\"Enterprise.showLog('" + value + "')\" >" +
+                        "<i class=\"fa fa-book\"></i>日志" +
+                        "</span>";
+            }
+        }
+    ];
+};
+
+Enterprise.formParam = function () {
+    var queryData = {};
+    queryData['name'] = $("#name").val();
+    queryData['idCard'] = $("#idCard").val();
+    queryData['medicalCommunityId'] = $("#medicalCommunityId").val();
+    queryData['isGeneral'] = $("#isGeneral").val();
+    queryData['legal'] = $("#legal").val();
+    queryData['ephone'] = $("#ephone").val();
+    queryData['agentName'] = $("#agentName").val();
+    queryData['agentPhone'] = $("#agentPhone").val();
+    queryData['checkState'] = $("#checkState").val();
+    queryData['active'] = $("#active").val();
+    return queryData;
+}
+
+Enterprise.search = function () {
+    Enterprise.table.refresh({"query": Enterprise.formParam()});
+};
+
+Enterprise.reset = function () {
+    $("#name").val("");
+    $("#idCard").val("");
+    $("#medicalCommunityId").val("");
+    $("#isGeneral").val("");
+    $("#legal").val("");
+    $("#ephone").val("");
+    $("#agentName").val("");
+    $("#agentPhone").val("");
+    $("#checkState").val("");
+    $("#active").val("");
+};
+
+Enterprise.gotoEnterpriseDetailPage = function () {
+    if (!Enterprise.check()) {
+        return;
+    }
+    var index = layer.open({
+        type: 2,
+        title: '查看详情',
+        area: ['830px', '450px'], //宽高
+        fix: false, //不固定
+        maxmin: true,
+        content: Feng.ctxPath + '/enterprise/hospital/detail?id=' + Enterprise.seItem.id,
+        btn: ['<i class="fa fa-check"></i>&nbsp;&nbsp;审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
+        btnAlign: 'c',
+        yes: function (index, layero) {
+            Enterprise.doExamine();
+        }
+    });
+    layer.full(index);
+    Enterprise.layerIndex = index;
+};
+
+Enterprise.doExamine = function () {
+    if (!Enterprise.check()) {
+        return;
+    }
+    var inCheckList = [1, 2, 4, 5];
+    if (Enterprise.seItem.checkState == null || inCheckList.indexOf(Enterprise.seItem.checkState) == -1) {
+        Feng.info("不在审核范围内!");
+        return;
+    }
+    var index = layer.open({
+        type: 2,
+        title: '审核',
+        area: ['830px', '500px'], //宽高
+        fix: false, //不固定
+        maxmin: true,
+        shade: 0,
+        content: Feng.ctxPath + '/enterprise/hospital/examine?id=' + Enterprise.seItem.id,
+        btn: ['<i class="fa fa-check"></i>&nbsp;&nbsp;提交', '<i class="fa fa-save"></i>&nbsp;&nbsp;保存', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
+        btnAlign: 'c',
+        yes: function (index, layero) {
+            //按钮【按钮一】的回调
+            layer.confirm("确认提交审核结果?", function () {
+                var iframeWin = window[layero.find('iframe')[0]['name']];
+                iframeWin.EpExam.submitToCheck();
+            })
+        },
+        btn2: function (index, layero) {
+            var iframeWin = window[layero.find('iframe')[0]['name']];
+            iframeWin.EpExam.addSubmit();
+            return false;
+        }
+    });
+//    layer.full(index);
+};
+
+
+/**
+ * 修改驳回的字段及附件
+ */
+Enterprise.updateFieldsAndFiles = function () {
+    if (this.check()) {
+        var id = Enterprise.seItem.id;
+        var ajax = new $ax("/enterprise/hospital/findFieldsAndFiles?id=" + id, function (data) {
+            if (data.code == 200) {
+                layer.open({
+                    type: 1,
+                    id: "fieldCheckModalForm",
+                    title: '修改',
+                    area: ['800px', '450px'], //宽高
+                    fix: false, //不固定
+                    shade: 0,
+                    maxmin: true,
+                    content: Enterprise.creatFieldCheckModal(),
+                    btn: ['<i class="fa fa-save"></i>&nbsp;&nbsp;提交', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
+                    btnAlign: 'c',
+                    zIndex: layer.zIndex,
+                    success: function (layero, index) {
+                        var fileList = data.files;
+                        var fieldList = data.fields;
+                        var html_field = '';
+                        var html_file = '';
+                        for (var key in fieldList) {
+                            html_field = html_field + '<li><input type="checkbox" ' + (fieldList[key].checked ? "checked" : "") + ' value="' + fieldList[key].field + '"><span>' + fieldList[key].name + '</span></li>';
+                        }
+                        for (var key in fileList) {
+                            html_file = html_file + '<li style="width: 100%"><input type="checkbox" ' + (fileList[key].checked ? "checked" : "") + ' value="' + fileList[key].field + '"><span>' + fileList[key].name + '</span></li>';
+                        }
+                        $("#field_info").empty().append("<ul>" + html_field + "</ul>");
+                        $("#field_file").empty().append("<ul>" + html_file + "</ul>");
+                    },
+                    yes: function (index, layero) {
+                        Enterprise.submitFieldsAndFiles(index, id);
+                    }
+                });
+            } else {
+                Feng.error(data.msg);
+            }
+        }, function (data) {
+            Feng.error("查询失败!" + data.responseJSON.message + "!");
+        });
+        ajax.start();
+    }
+};
+
+/**
+ * 修改提交
+ * @param index
+ * @param id
+ */
+Enterprise.submitFieldsAndFiles = function (index, id) {
+    var fields = '';
+    var files = '';
+    $("#field_info li input").each(function (index) {
+        if ($(this).is(":checked")) {
+            fields = fields + $(this).val() + ",";
+        }
+    });
+    $("#field_file li input").each(function (index) {
+        if ($(this).is(":checked")) {
+            files = files + $(this).val() + ",";
+        }
+    });
+    if (fields == '' && files == '') {
+        Feng.info("请选择可修改的字段或附件!");
+        return;
+    }
+    var ajax = new $ax("/enterprise/hospital/updateFieldsAndFiles", function (data) {
+        if (data.code == 200) {
+            layer.close(index);
+            Feng.success(data.msg);
+        } else {
+            Feng.error(data.msg);
+        }
+    }, function (data) {
+        Feng.error("修改失败!" + data.responseJSON.message + "!");
+    });
+    ajax.setData({"id": id, "fields": fields, "files": files})
+    ajax.start();
+};
+Enterprise.creatFieldCheckModal = function () {
+    return '<form id="fieldCheckModalForm">\n' +
+            '                    <div class="form-group" style="margin: 10px;">\n' +
+            '                        <div >\n' +
+            '                            <label for="checkMsg" class="control-label">可修改字段</label>\n' +
+            '                            <div id="field_info">\n' +
+            '                            </div>\n' +
+            '                            <label for="checkMsg" class="control-label">可修改附件</label>\n' +
+            '                            <div id="field_file">\n' +
+            '                            </div>\n' +
+            '                            <div class="form-group" style="text-align: center">\n' +
+            '                                <button type="button" class="btn btn-primary" onclick="Enterprise.checkAll()">全选</button>\n' +
+            '                                <button type="button" class="btn btn-success" onclick="Enterprise.unCheckAll()">反选</button>\n' +
+            '                            </div>\n' +
+            '                        </div>\n' +
+            '                    </div>\n' +
+            '                </form>';
+};
+Enterprise.checkAll = function () {
+    $("#fieldCheckModalForm input[type=checkbox]").prop("checked", true);
+};
+Enterprise.unCheckAll = function () {
+    $("#fieldCheckModalForm input[type=checkbox]").removeAttr("checked");
+};
+
+
+Enterprise.check = function () {
+    var selected = $('#' + Enterprise.id).bootstrapTable('getSelections');
+    if (selected.length == 0) {
+        Feng.info("请先选中表格中的某一记录!");
+        return false;
+    } else {
+        Enterprise.seItem = selected[0];
+        return true;
+    }
+};
+
+Enterprise.showLog = function (id) {
+    layer.open({
+        type: 1,
+        title: "日志",
+        fixed: false,
+        content: '<table id="' + id + '"></table>',
+        area: ['80%', '80%'],
+        maxmin: true,
+        success: function (layero, index) {
+            Feng.getCheckLog(id, {"type": 10, "enterpriseId": id, "typeFileId": "", "active": 1})
+        }
+    });
+};
+
+$(function () {
+    var defaultColunms = Enterprise.initColumn();
+    var table = new BSTable(Enterprise.id, "/enterprise/hospital/getList", defaultColunms);
+    table.setPaginationType("server");
+    Enterprise.table = table.init();
+});

+ 1 - 1
public/static/modular/gate/enterprise/school/enterprise_change_edit.js

@@ -21,7 +21,7 @@ var EpChangeEdit = {
                 }
             }
         },
-        newAddress: {validators: {notEmpty: {message: '医院地址不能为空'}}},
+        newAddress: {validators: {notEmpty: {message: '学校地址不能为空'}}},
         newAgentName: {validators: {notEmpty: {message: '人才联络员不能为空'}}},
         newEphone: {
             validators: {