Selaa lähdekoodia

企业变更审核页面整合

sugangqiang 2 vuotta sitten
vanhempi
commit
6dbd51de1b

+ 63 - 49
app/admin/controller/EnterpriseChangeRecord.php

@@ -15,24 +15,23 @@ use app\common\model\TalentCommonFile;
 
 class EnterpriseChangeRecord extends AdminController {
 
-
-    public function gotoEnterpriseChangeRecordPage(){
+    public function gotoEnterpriseChangeRecordPage() {
         $talentTypeList = DictApi::findChildDictByCode("enterprise_tag");
         $industryFieldNewList = DictApi::findChildDictByCode("industry_field");
         $streetList = DictApi::findChildDictByCode("street");
 
-        return view("",['enterprise_tag' => $talentTypeList,'industryFieldNew' => $industryFieldNewList,'street' => $streetList]);
+        return view("", ['enterprise_tag' => $talentTypeList, 'industryFieldNew' => $industryFieldNewList, 'street' => $streetList]);
     }
 
-    public function findEnterpriseChangeRecordByPage(){
+    public function findEnterpriseChangeRecordByPage() {
         $res = EnterpriseApi::getRecordList($this->request);
 
         return json($res);
     }
 
-    public function gotoEnterpriseChangeDetailPage(){
+    public function gotoEnterpriseChangeDetailPage() {
         $id = trim($this->request['id']);
-        if(!$id){
+        if (!$id) {
             return json(["msg" => 'ID不能为空!']);
         }
         $ecr = EnterpriseApi::getOneRecord($id);
@@ -47,7 +46,7 @@ class EnterpriseChangeRecord extends AdminController {
             }
         }
 
-        switch ($ecr['checkState']){
+        switch ($ecr['checkState']) {
             case 1:
                 $ecr['checkStateName'] = '保存未提交';
                 break;
@@ -68,8 +67,17 @@ class EnterpriseChangeRecord extends AdminController {
                 break;
         }
 
+        $where = [];
+        $where[] = ['tcf.mainId', '=', $id];
+        $files = TalentCommonFile::alias("tcf")->field("tcf.*,cft.api")->leftJoin("new_currency_filetype cft", "cft.id=tcf.typeId")->where($where)->select();
+        $_files = [];
+        foreach ($files as $k => $v) {
+            $v["ext"] = pathinfo($v["url"])["extension"];
+            $v['url'] = getStoragePath($v['url']);
+            $_files[$v["api"]][] = $v;
+        }
 
-        switch ($ep->special){
+        switch ($ep->special) {
             case 0:
                 if (\StrUtil::isNotEmpAndNull($ecr['oldEnterpriseTag']) || \StrUtil::isNotEmpAndNull($ecr['newEnterpriseTag'])) {
                     $talentTypeList = DictApi::selectByParentCode("enterprise_tag");
@@ -97,53 +105,59 @@ class EnterpriseChangeRecord extends AdminController {
                     $industry = DictApi::findDictByCode($ecr['newIndustryFieldOld']);
                     $ecr['newIndustryFieldOldName'] = $industry['name'];
                 }
+                if (\StrUtil::isNotEmpAndNull($ecr['oldEnterpriseType'])) {
+                    $industry = DictApi::findDictByCode($ecr['oldEnterpriseType']);
+                    $ecr['oldEnterpriseTypeName'] = $industry['name'];
+                }
+                if (\StrUtil::isNotEmpAndNull($ecr['newEnterpriseType'])) {
+                    $industry = DictApi::findDictByCode($ecr['newEnterpriseType']);
+                    $ecr['newEnterpriseTypeName'] = $industry['name'];
+                }
 
-                return view("",['ecr' => $ecr]);
+                return view("", ['ecr' => $ecr, 'files' => $_files]);
                 break;
             case 1:
-                return view("goto_enterprise_change_detail_page1", ['ecr' => $ecr]);
+                return view("", ['ecr' => $ecr, 'files' => $_files]);
                 break;
             default:
 
                 break;
         }
-
-
     }
 
-    public function gotoEnterpriseChangeExaminePage(){
+    public function gotoEnterpriseChangeExaminePage() {
         $id = trim($this->request['id']);
-        if(!$id){
+        if (!$id) {
             return json(["msg" => 'ID不能为空!']);
         }
         $ecr = EnterpriseApi::getOneRecord($id);
 
-        return view("",['ecr' => $ecr]);
+        return view("", ['ecr' => $ecr]);
     }
 
-    public function doExamine(){
+    public function doExamine() {
         $id = trim($this->request['id']);
-        if(!$id){
-            return json(["msg" => 'ID不能为空!','code' => 500]);
+        if (!$id) {
+            return json(["msg" => 'ID不能为空!', 'code' => 500]);
         }
         $ecr = EnterpriseApi::getOneRecord($id);
-        if(!$ecr){
-            return json(["msg" => '原始数据不存在!','code' => 500]);
+        if (!$ecr) {
+            return json(["msg" => '原始数据不存在!', 'code' => 500]);
         }
         $checkState = trim($this->request['checkState']);
-        if ($checkState==null || ($checkState!=4 && $checkState!=3)) {
-            return json(["msg" => '请选择审核状态!','code' => 500]);
+        if ($checkState == null || ($checkState != 4 && $checkState != 3)) {
+            return json(["msg" => '请选择审核状态!', 'code' => 500]);
         }
         $checkMsg = trim($this->request['checkMsg']);
         //如果审核状态为 审核驳回, 需要填写审核意见
-        if ($checkState==3 && \StrUtil::isEmpOrNull($checkMsg)) {
-            return json(["msg" => '审核驳回时,需要填写审核意见!','code' => 500]);
+        if ($checkState == 3 && \StrUtil::isEmpOrNull($checkMsg)) {
+            return json(["msg" => '审核驳回时,需要填写审核意见!', 'code' => 500]);
         }
-        if (\StrUtil::isNotEmpAndNull($checkMsg) && strlen($checkMsg)>200) {
-            return json(["msg" => '审核意见最多200个字符!','code' => 500]);
+        if (\StrUtil::isNotEmpAndNull($checkMsg) && strlen($checkMsg) > 200) {
+            return json(["msg" => '审核意见最多200个字符!', 'code' => 500]);
         }
-        if ($ecr['checkState']!=2 && $ecr['checkState']!=3 && $ecr['checkState']!=5) {
-            return json(["msg" => '不在审核范围内!','code' => 500]);
+        if ($ecr['checkState'] != 2 && $ecr['checkState'] != 3 && $ecr['checkState'] != 5) {
+            return json(["msg" => '不在审核范围内!', 'code' => 500]);
         }
         //如果为审核驳回,更新表中的审核状态 和 审核意见, 直接返回结果
         if ($checkState == 3) {
@@ -164,13 +178,13 @@ class EnterpriseChangeRecord extends AdminController {
                 'templateCode' => "【晋江市人才服务平台】您好!您提交申请的优秀人才{$checkMsg}因信息填写错误或上传不完整已被退回,请及时登录申报系统查看审核意见并重新提交。",
                 'params' => '机构信息变更',
                 'state' => 1,
-                'sendingDate' => date("Y-m-d H:i:s",time()),
-                'createTime' => date("Y-m-d H:i:s",time())
+                'sendingDate' => date("Y-m-d H:i:s", time()),
+                'createTime' => date("Y-m-d H:i:s", time())
             ];
 
             $smsapi = new ChuanglanSmsApi();
 
-            $result = $smsapi->sendSMS($ecr['newAgentPhone'],$record_data['templateCode']);
+            $result = $smsapi->sendSMS($ecr['newAgentPhone'], $record_data['templateCode']);
 
             MessageRecord::create($record_data);
 
@@ -187,11 +201,11 @@ class EnterpriseChangeRecord extends AdminController {
                 'step' => 101,
                 'stateChange' => "<span class='label label-info'>审核驳回</span>",
                 'description' => $checkMsg,
-                'createTime' => date("Y-m-d H:i:s",time()),
-                'createUser' => session('user')['name']."({$company['name']})"
+                'createTime' => date("Y-m-d H:i:s", time()),
+                'createUser' => session('user')['name'] . "({$company['name']})"
             ]);
-            return json(["msg" => '操作成功!',"code" => 200]);
-		}else{
+            return json(["msg" => '操作成功!', "code" => 200]);
+        } else {
             $ecr->checkState = 4;
             $ecr->checkMsg = $checkMsg;
             $ecr->updateUser = session('user')['uid'];
@@ -218,13 +232,13 @@ class EnterpriseChangeRecord extends AdminController {
             $ep->updateUser = session('user')['uid'];
             $ep->updateTime = date("Y-m-d H:i:s");
             //查询此次上传的文件
-            $list = TalentCommonFile::where('mainId',$ecr['id'])->select()->toArray();
-            if(count($list) > 0){
-                foreach ($list as $k => $v){
-                    $fileInfo = CurrentcyFileType::where('id',$v['typeId'])->select()->toArray();
-                    if(count($fileInfo) > 0){
+            $list = TalentCommonFile::where('mainId', $ecr['id'])->select()->toArray();
+            if (count($list) > 0) {
+                foreach ($list as $k => $v) {
+                    $fileInfo = CurrentcyFileType::where('id', $v['typeId'])->select()->toArray();
+                    if (count($fileInfo) > 0) {
                         foreach ($fileInfo as $item) {
-                            switch ($item['api']){
+                            switch ($item['api']) {
                                 case 'businessLicense':
                                     $ep->imgurl = $v['url'];
                                     break;
@@ -256,13 +270,13 @@ class EnterpriseChangeRecord extends AdminController {
                 'templateCode' => "【晋江市人才服务平台】您好!您提交申请的优秀人才{$checkMsg}已审核通过,可登录申报系统做相关事宜申报。",
                 'params' => '机构信息变更',
                 'state' => 1,
-                'sendingDate' => date("Y-m-d H:i:s",time()),
-                'createTime' => date("Y-m-d H:i:s",time())
+                'sendingDate' => date("Y-m-d H:i:s", time()),
+                'createTime' => date("Y-m-d H:i:s", time())
             ];
 
             $smsapi = new ChuanglanSmsApi();
 
-            $result = $smsapi->sendSMS($ecr['newAgentPhone'],$record_data['templateCode']);
+            $result = $smsapi->sendSMS($ecr['newAgentPhone'], $record_data['templateCode']);
 
             MessageRecord::create($record_data);
 
@@ -279,12 +293,12 @@ class EnterpriseChangeRecord extends AdminController {
                 'step' => 101,
                 'stateChange' => "<span class='label label-info'>审核通过</span>",
                 'description' => $checkMsg,
-                'createTime' => date("Y-m-d H:i:s",time()),
-                'createUser' => session('user')['name']."({$company['name']})"
+                'createTime' => date("Y-m-d H:i:s", time()),
+                'createUser' => session('user')['name'] . "({$company['name']})"
             ]);
 
-            return json(["msg" => '操作成功!',"code" => 200]);
+            return json(["msg" => '操作成功!', "code" => 200]);
         }
-
     }
-}
+
+}

+ 1 - 1
app/admin/view/enterprise/goto_enterprise_detail_page.html

@@ -59,7 +59,7 @@
 
 </script>
 <div class="ibox float-e-margins">
-    <div class="ibox-content" style="height: 1100px;">
+    <div class="ibox-content">
         <input type="text" class="form-control" id="id" name="id" value="{$ep.id}" style="display: none;"/>
         <div class="panel-body">
             <div class="panel panel-default">

+ 220 - 328
app/admin/view/enterprise_change_record/goto_enterprise_change_detail_page.html

@@ -15,12 +15,6 @@
         font-weight: 400;
     }
 
-    .spacing {
-        margin-bottom: 10px;
-        padding-right: 4px;
-        padding-left: 4px;
-    }
-
     .imgs li {
         list-style: none;
         float: left;
@@ -28,331 +22,229 @@
         text-align: center;
         height: 30px;
     }
+
+
+    .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;
+    }
+    span.new{font-weight:bold;color:#333;}
+    span.old{text-decoration:line-through;}
+    ul.files{list-style:none;display:flex;justify-content:center;padding:0;}
+    ul.files li{background:#ddd;overflow:hidden;position:relative;margin-right:10px;float:left;border:1px solid #ddd;}
+    ul.yyzz li{width:100px;}
+    ul.khxkz li{width:100px;}
+    ul.hyly li{width:100px;}
+    ul.files i.old{text-align:center;height:0;width:0;line-height:15px;color:#fff;position:absolute;right:0;bottom:0;border-top:15px solid transparent;border-right:15px solid #000;border-bottom:15px solid #000;border-left:15px solid transparent;display:block;}
+    ul.files i.new{text-align:center;height:0;width:0;line-height:15px;color:#000;position:absolute;right:0;bottom:0;border-top:15px solid transparent;border-right:15px solid #0bfd1a;border-bottom:15px solid #0bfd1a;border-left:15px solid transparent;display:block;}
 </style>
 <div class="ibox float-e-margins">
     <div class="ibox-content">
-        <div class="form-horizontal">
-            <div class="row">
-                <div class="col-sm-12">
-                    <div class="tabs-container">
-                        <ul class="nav nav-tabs">
-                            <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">1.基本信息</a>
-                            </li>
-                            <li id="fileLi" class=""><a data-toggle="tab" href="#tab-2" onclick="ecre.initFileTable()"
-                                                        aria-expanded="false">2.附件上传</a></li>
-                        </ul>
-                    </div>
-                    <div class="tab-content">
-                        <div id="tab-1" class="tab-pane active">
-                            <input type="text" class="form-control" id="id" name="id" value="{$ecr.id}" style="display: none;"/>
-                            <input type="text" class="form-control" id="type" name="type" value="{$ecr.type}" style="display: none;"/>
-                            <input style="display: none;" type="text" class="form-control" id="checkState" name="checkState" value="{$ecr.checkState}"/>
-                            <div class="panel-body">
-                                <div class="panel panel-default">
-                                    <div class="panel-heading" onclick="$(this).next().toggle()">变更前机构信息</div>
-                                    <div class="panel-body">
-                                        <div class="col-sm-12 ">
-                                            <div class="row">
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>单位名称</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="oldName"
-                                                               name="oldName" value="{$ecr.oldName}" readonly disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>统一社会信用代码</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="oldIdCard"
-                                                               name="oldIdCard" value="{$ecr.oldIdCard}" readonly
-                                                               disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="display: none">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>产业领域</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control"
-                                                               id="oldIndustryFieldNew" name="oldIndustryFieldNew"
-                                                               value="{$ecr.oldIndustryFieldNewName}" readonly
-                                                               disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="display: none">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>行业领域</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control"
-                                                               id="oldIndustryFieldOld" name="oldIndustryFieldOld"
-                                                               value="{$ecr.oldIndustryFieldOldName}" readonly
-                                                               disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="display: none">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>单位标签</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control"
-                                                               id="oldEnterpriseTag" name="oldEnterpriseTag"
-                                                               value="{$ecr.oldEnterpriseTagName}" readonly disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>法人代表</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="oldLegal"
-                                                               name="oldLegal" value="{$ecr.oldLegal}" readonly
-                                                               disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>所属街道</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="oldStreet"
-                                                               name="oldStreet" value="{$ecr.oldStreetName}" readonly
-                                                               disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>单位地址</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="oldAddress"
-                                                               name="oldAddress" value="{$ecr.oldAddress}" readonly
-                                                               disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>单位电话</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="oldEphone"
-                                                               name="oldEphone" value="{$ecr.oldEphone}" readonly
-                                                               disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>人才联络员</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="oldAgentName"
-                                                               name="oldAgentName" value="{$ecr.oldAgentName}" readonly
-                                                               disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>人才联络员电话</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="oldAgentPhone"
-                                                               name="oldAgentPhone" value="{$ecr.oldAgentPhone}"
-                                                               readonly disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>电子邮箱</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="oldAgentEmail"
-                                                               name="oldAgentEmail" value="{$ecr.oldAgentEmail}"
-                                                               readonly disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>企业银行账号</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="oldBankCard"
-                                                               name="oldBankCard" value="{$ecr.oldBankCard}" readonly
-                                                               disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>企业开户银行网点</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="oldBankNetwork"
-                                                               name="oldBankNetwork" value="{$ecr.oldBankNetwork}"
-                                                               readonly disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>企业开户银行</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="oldBank"
-                                                               name="oldBank" value="{$ecr.oldBank}" readonly disabled/>
-                                                    </div>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                                <div class="panel panel-default">
-                                    <div class="panel-heading" onclick="$(this).next().toggle()">变更后机构信息</div>
-                                    <div class="panel-body">
-
-                                        <div class="col-sm-12 ">
-                                            <div class="row">
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>单位名称</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="newName"
-                                                               name="newName" value="{$ecr.newName}" readonly disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>统一社会信用代码</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="newIdCard"
-                                                               name="newIdCard" value="{$ecr.newIdCard}" readonly
-                                                               disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>产业领域</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control"
-                                                               id="newIndustryFieldNew" name="newIndustryFieldNew"
-                                                               value="{$ecr.newIndustryFieldNewName}" readonly
-                                                               disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>行业领域</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control"
-                                                               id="newIndustryFieldOld" name="newIndustryFieldOld"
-                                                               value="{$ecr.newIndustryFieldOldName}" readonly
-                                                               disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="display: none">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>单位标签</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control"
-                                                               id="newEnterpriseTag" name="newEnterpriseTag"
-                                                               value="{$ecr.newEnterpriseTagName}" readonly disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>法人代表</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="newLegal"
-                                                               name="newLegal" value="{$ecr.newLegal}" readonly
-                                                               disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>所属街道</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="newStreet"
-                                                               name="newStreet" value="{$ecr.newStreetName}" readonly
-                                                               disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>单位地址</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="newAddress"
-                                                               name="newAddress" value="{$ecr.newAddress}" readonly
-                                                               disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>单位电话</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="newEphone"
-                                                               name="newEphone" value="{$ecr.newEphone}" readonly
-                                                               disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>人才联络员</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="newAgentName"
-                                                               name="newAgentName" value="{$ecr.newAgentName}" readonly
-                                                               disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>人才联络员电话</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="newAgentPhone"
-                                                               name="newAgentPhone" value="{$ecr.newAgentPhone}"
-                                                               readonly disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>电子邮箱</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="newAgentEmail"
-                                                               name="newAgentEmail" value="{$ecr.newAgentEmail}"
-                                                               readonly disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>企业银行账号</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="newBankCard"
-                                                               name="newBankCard" value="{$ecr.newBankCard}" readonly
-                                                               disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>企业开户银行网点</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="newBankNetwork"
-                                                               name="newBankNetwork" value="{$ecr.newBankNetwork}"
-                                                               readonly disabled/>
-                                                    </div>
-                                                </div>
-                                                <div class="rowGroup" style="margin-bottom: 0px;">
-                                                    <label class="col-sm-2 control-label spacing"><span
-                                                            class="text-danger">*</span>企业开户银行</label>
-                                                    <div class="col-sm-4 spacing">
-                                                        <input type="text" class="form-control" id="newBank"
-                                                               name="newBank" value="{$ecr.newBank}" readonly disabled/>
-                                                    </div>
-                                                </div>
-                                            </div>
-                                        </div>
-
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                        <div id="tab-2" class="tab-pane ">
-                            <table id="fileTable" 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>
-                            <label style="padding-top: 15px;color: red">*请根据上传的附件材料,编辑好相应的文件夹名称</label>
-                        </div>
-                    </div>
+        <div class="panel-body">
+            <div class="panel panel-default">
+                <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">单位信息</div>
+                <div class="panel-body">
+                    <table style="width:100%" class="table table-bordered">
+                        <tr>
+                            <td class="key">
+                                单位名称
+                            </td>
+                            <td class="value1" data-old='{$ecr.oldName}' data-new='{$ecr.newName}'></td>
+                            <td class="key">
+                                统一社会信用代码
+                            </td>
+                            <td class="value1" 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>
+                                    营业执照<br />
+                                    (事业单位法人证或批文)
+                                </label>
+                                <ul class="files yyzz">
+                                    {if condition="$ecr['imgurl']"}                                    
+                                        <li>
+                                            <img onclick="Feng.showImg(this)" id="yyzz" src="{$ecr.imgurl|getStoragePath}" style="max-width: 100px;"><i class="old">旧</i>
+                                        </li>
+                                    {/if}
+                                    {if condition="$files['businessLicense']"}
+                                        {volist name="$files['businessLicense']" id="file"}
+                                        <li><img src="{$file.url}" onclick="Feng.showImg(this)" style="max-width:100px;"/><i class="new">新</i></li>
+                                        {/volist}
+                                    {/if}
+                                </ul>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td class="key">
+                                法人代表
+                            </td>
+                            <td class="value1" data-old='{$ecr.oldLegal}' data-new='{$ecr.newLegal}'>
+                                {$ep.legal}
+                            </td>
+                            <td class="key">
+                                单位地址
+                            </td>
+                            <td class="value1 word-wrap" data-old='{$ecr.oldAddress}' data-new='{$ecr.newAddress}'></td>
+                        </tr>
+                        <tr>
+                            <td class="key">
+                                所属街道
+                            </td>
+                            <td class="value1" data-old='{$ecr.oldStreetName}' data-new='{$ecr.newStreetName}'></td>
+                            <td class="key">
+                                单位电话
+                            </td>
+                            <td class="value1" data-old='{$ecr.oldEphone}' data-new='{$ecr.newEphone}'></td>
+                        </tr>
+                        <tr>
+                            <td class="key">
+                                企业银行账号
+                            </td>
+                            <td class="value1" data-old='{$ecr.oldBankCard}' data-new='{$ecr.newBankCard}'></td>
+                            <td class="key">
+                                企业开户银行
+                            </td>
+                            <td class="value1" 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['bankImg']"}                                    
+                                        <li>
+                                            <img onclick="Feng.showImg(this)" id="yyzz" src="{$ecr.bankImg|getStoragePath}" style="max-width: 100px;"><i class="old">旧</i>
+                                        </li>
+                                    {/if}
+                                    {if condition="$files['businessBank']"}
+                                        {volist name="$files['businessBank']" id="file"}
+                                        <li><img src="{$file.url}" onclick="Feng.showImg(this)" style="max-width:100px;"/><i class="new">新</i></li>
+                                        {/volist}
+                                    {/if}
+                                </ul>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td class="key">
+                                企业开户银行网点
+                            </td>
+                            <td class="value1" colspan="3" data-old='{$ecr.oldBankNetwork}' data-new='{$ecr.newBankNetwork}'></td>
+                        </tr>
+                    </table>
+                </div>
+            </div>
+        </div>
+        {if condition="$ecr.special == 0"}
+        <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 colspan="5">
+                                申报类型:
+                                {switch name="ecr.type"}
+                                {case value="1"}晋江市现代产业体系人才{/case}
+                                {case value="2"}集成电路优秀人才{/case}
+                                {/switch}
+                            </td>
+                        </tr>
+                        <tr class="type1">
+                            <td class="key">
+                                产业领域
+                            </td>
+                            <td class="value1" data-old="{$ecr.oldIndustryFieldNewName}" data-new="{$ecr.newIndustryFieldNewName}"></td>
+                            <td class="key">
+                                行业领域
+                            </td>
+                            <td class="value1" data-old="{$ecr.oldIndustryFieldOldName}" data-new="{$ecr.newIndustryFieldOldName}"></td>
+                            <td class="key" style="text-align:center;">
+                                行业领域佐证材料
+                            </td>
+                        </tr>
+                        <tr class="type1">
+                            <td class="key">
+                                单位标签
+                            </td>
+                            <td class="value1" data-old="{$ecr.oldEnterpriseTagName}" data-new="{$ecr.newEnterpriseTagName}"></td>
+                            <td class="key">
+                                单位类型
+                            </td>
+                            <td class="value1" data-old="{$ecr.oldEnterpriseTypeName}" data-new="{$ecr.newEnterpriseTypeName}"></td>
+                            <td>
+                                <ul class="files hyly">
+                                    {if condition="$ecr['domainImg']"}                                    
+                                        <li>
+                                            <img onclick="Feng.showImg(this)" id="yyzz" src="{$ecr.domainImg|getStoragePath}" style="max-width: 100px;"><i class="old">旧</i>
+                                        </li>
+                                    {/if}
+                                    {if condition="$files['businessDomain']"}
+                                        {volist name="$files['businessDomain']" id="file"}
+                                        <li><img src="{$file.url}" onclick="Feng.showImg(this)" style="max-width:100px;"/><i class="new">新</i></li>
+                                        {/volist}
+                                    {/if}
+                                </ul>
+                            </td>
+                        </tr>
+                    </table>
+                </div>
+            </div>
+        </div>
+        {/if}
+        <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" data-old="{$ecr.oldAgentName}" data-new="{$ecr.newAgentName}"></td>
+                            <td class="key">
+                                人才联络员电话
+                            </td>
+                            <td class="value1" data-old="{$ecr.oldAgentPhone}" data-new="{$ecr.newAgentPhone}"></td>
+                        </tr>
+                        <tr>
+                            <td class="key">
+                                人才联络员邮箱
+                            </td>
+                            <td class="value1" data-old="{$ecr.oldAgentEmail}" data-new="{$ecr.newAgentEmail}"></td>
+                            <td class="key">
+                                人才联络员信息备案表
+                            </td>
+                            <td style="text-align: left">
+                                {if condition="$ecr['beian']"}<button type="button" class="btn btn-danger" onclick="Feng.showFile('{$ecr.beian|getStoragePath}', 'beian')">点击查看(旧)</button>{/if}                                
+                                {if condition="$files['businessBeian']"}
+                                    {volist name="$files['businessBeian']" id="file"}
+                                    <button type="button" class="btn btn-primary" onclick="Feng.showFile('{$file.url}', 'beian')">点击查看(新)</button>
+                                    {/volist}
+                                {/if}
+                            </td>
+                        </tr>
+                    </table>
                 </div>
             </div>
         </div>

+ 24 - 2
public/static/modular/enterprise/enterprisechangeRecord/ep_change_record_detail.js

@@ -72,7 +72,7 @@ ecre.initFileTable = function () {
                     var imgStr = "";
                     if (suffix == "pdf" || suffix == "PDF") {
                         imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + data[key].url + "','" + data[key].id + "','" + data[key].orignName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i></button>";
-                    } else if (suffix == "xlsx" || suffix == "XLSX" || suffix == 'xls' || suffix == 'XLS') {
+                    } else if (suffix == "xlsx" || suffix == "XLSX" || suffix == 'xls' || suffix == 'XLS' || suffix == "DOCX" || suffix == "docx" || suffix == 'DOC' || suffix == 'doc') {
                         imgStr = "<button type='button'  onclick=\"Feng.showExcel('" + data[key].url + "','" + data[key].id + "','" + data[key].orignName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></button>";
                     } else {
                         imgStr = '<img class=\"imgUrl\"  src=\"' + data[key].url + '\" style=\"width:25px;height:25px;\">';
@@ -134,7 +134,29 @@ $(function () {
     // 	{"name":"oldIndustryFieldNew","code":"industry_field"},
     // 	{"name":"newIndustryFieldNew","code":"industry_field"}];
     // Feng.findChildDictBatch(JSON.stringify(arr))
-
+    $("td.value1").each(function(){
+        var oldVal = $(this).data("old");
+        var newVal = $(this).data("new");
+        var style = 0;
+        var html = "";
+        var oldValStr = oldVal == "" ? '"未填写"' : oldVal;
+        if(oldVal != newVal){
+             switch(style){
+                 case 1:
+                     html = '<span class="new"><i class="fa fa-dot-circle-o" aria-hidden="true"></i>'+newVal+'</span><br/><span class="old"><i class="fa fa-circle-o" aria-hidden="true"></i>'+oldValStr+'</span>';
+                     break;
+                 default:
+                     html = '<span class="old">'+oldValStr+'</span> -> <span class="new">'+newVal+'</span>';
+                     break;               
+             }
+        }else{
+             html = oldValStr;
+        }
+        $(this).html(html);
+        if(oldVal == "" && $(this).find("span.old").length == 1){
+            $(this).find("span.old").css("text-decoration","none");
+        }
+    });
     $("select").each(function () {
         $(this).val($(this).attr("value"));
     })