浏览代码

更新企业信息界面

sandm 2 年之前
父节点
当前提交
d457fabfa8
共有 2 个文件被更改,包括 53 次插入12 次删除
  1. 22 1
      app/admin/controller/Enterprise.php
  2. 31 11
      app/admin/view/enterprise/goto_enterprise_detail_page.html

+ 22 - 1
app/admin/controller/Enterprise.php

@@ -93,7 +93,28 @@ class Enterprise extends AdminController {
             }
             }
         }
         }
 
 
-        $beian_info = pathinfo($ep['imgurl']);
+        $imgurl_info = pathinfo($ep['imgurl']);
+        if(in_array($imgurl_info['extension'],["jpeg","jpg","png","gif"])){
+            $ep['imgurl_is_img'] = 1;
+        }else{
+            $ep['imgurl_is_img'] = 0;
+        }
+
+        $bankImg_info = pathinfo($ep['bankImg']);
+        if(in_array($bankImg_info['extension'],["jpeg","jpg","png","gif"])){
+            $ep['bankImg_is_img'] = 1;
+        }else{
+            $ep['bankImg_is_img'] = 0;
+        }
+
+        $domainImg_info = pathinfo($ep['domainImg']);
+        if(in_array($domainImg_info['extension'],["jpeg","jpg","png","gif"])){
+            $ep['domainImg_is_img'] = 1;
+        }else{
+            $ep['domainImg_is_img'] = 0;
+        }
+
+        $beian_info = pathinfo($ep['beian']);
         if(in_array($beian_info['extension'],["jpeg","jpg","png","gif"])){
         if(in_array($beian_info['extension'],["jpeg","jpg","png","gif"])){
             $ep['beian_is_img'] = 1;
             $ep['beian_is_img'] = 1;
         }else{
         }else{

+ 31 - 11
app/admin/view/enterprise/goto_enterprise_detail_page.html

@@ -84,8 +84,14 @@
                                     营业执照<br />
                                     营业执照<br />
                                     (事业单位法人证或批文)
                                     (事业单位法人证或批文)
                                 </label>
                                 </label>
-                                <img onclick="Feng.showImg(this)" id="yyzz" alt="营业执照" src="{$ep.imgurl|getStoragePath}"
-                                     style="max-width: 100px;">
+                                {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: 100px;">
+                                    {else}
+                                    <button type="button" onclick="Feng.showPdf('{$ep.imgurl|getStoragePath}','beian')" class="btn btn-xs btn-danger"><i class="fa fa-file-pdf-o" aria-hidden="true"></i></button>
+                                    {/if}
+                                {/if}
                             </td>
                             </td>
                         </tr>
                         </tr>
                         <tr>
                         <tr>
@@ -133,8 +139,14 @@
                                 <label>
                                 <label>
                                     开户许可证
                                     开户许可证
                                 </label>
                                 </label>
-                                <img onclick="Feng.showImg(this)" id="bankImg" alt="开户许可证"
-                                     src="{$ep.bankImg|getStoragePath}" style="max-width: 100px;">
+                                {if condition="$ep['bankImg']"}
+                                    {if condition="$ep['bankImg_is_img']"}
+                                    <img onclick="Feng.showImg(this)" id="bankImg" alt="开户许可证"
+                                         src="{$ep.bankImg|getStoragePath}" style="max-width: 100px;">
+                                    {else}
+                                    <button type="button" onclick="Feng.showPdf('{$ep.bankImg|getStoragePath}','bankImg')" class="btn btn-xs btn-danger"><i class="fa fa-file-pdf-o" aria-hidden="true"></i></button>
+                                    {/if}
+                                {/if}
                             </td>
                             </td>
                         </tr>
                         </tr>
                         <tr>
                         <tr>
@@ -197,8 +209,14 @@
                                 {$ep.enterpriseTypeName}
                                 {$ep.enterpriseTypeName}
                             </td>
                             </td>
                             <td>
                             <td>
-                                <img onclick="Feng.showImg(this)" id="domainImg" alt="行业领域佐证材料"
-                                     src="{$ep.domainImg|getStoragePath}" style="max-width: 100px;">
+                                {if condition="$ep['domainImg']"}
+                                    {if condition="$ep['domainImg_is_img']"}
+                                    <img onclick="Feng.showImg(this)" id="domainImg" alt="行业领域佐证材料"
+                                         src="{$ep.domainImg|getStoragePath}" style="max-width: 100px;">
+                                    {else}
+                                    <button type="button" onclick="Feng.showPdf('{$ep.domainImg|getStoragePath}','domainImg')" class="btn btn-xs btn-danger"><i class="fa fa-file-pdf-o" aria-hidden="true"></i></button>
+                                    {/if}
+                                {/if}
                             </td>
                             </td>
                         </tr>
                         </tr>
                     </table>
                     </table>
@@ -236,11 +254,13 @@
                                 人才联络员信息备案表
                                 人才联络员信息备案表
                             </td>
                             </td>
                             <td style="text-align: left">
                             <td style="text-align: left">
-                                {if condition="$ep['beian_is_img']"}
-                                <img onclick="Feng.showImg(this)" id="beian" alt="人才联络员信息备案表"
-                                     src="{$ep.beian|getStoragePath}" style="max-width: 100px;">
-                                {else}
-                                <button type="button" onclick="Feng.showFile('{$ep.beian|getStoragePath}','beian')">点击查看</button>
+                                {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: 100px;">
+                                    {else}
+                                    <button type="button" onclick="Feng.showPdf('{$ep.beian|getStoragePath}','beian')" class="btn btn-xs btn-danger">点击查看</button>
+                                    {/if}
                                 {/if}
                                 {/if}
                             </td>
                             </td>
                         </tr>
                         </tr>