sugangqiang 2 年之前
父節點
當前提交
9ece406612
共有 2 個文件被更改,包括 267 次插入168 次删除
  1. 30 2
      app/enterprise/controller/Api.php
  2. 237 166
      app/enterprise/view/api/to_add.html

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

@@ -62,6 +62,34 @@ class Api extends EnterpriseController {
             'newBank' => $ep['bank'],
             'newBankNetwork' => $ep['bankNetwork']
         ];
+        if ($ep["imgurl"]) {
+            $ecr["imgurl"] = $ep["imgurl"];
+            $extension = pathinfo($ep["imgurl"])["extension"];
+            if (in_array($extension, ["jpeg", "jpg", "png", "gif"])) {
+                $ecr["imgurl_is_img"] = 1;
+            }
+        }
+        if ($ep["bankImg"]) {
+            $ecr["bankImg"] = $ep["bankImg"];
+            $extension = pathinfo($ep["bankImg"])["extension"];
+            if (in_array($extension, ["jpeg", "jpg", "png", "gif"])) {
+                $ecr["bankImg_is_img"] = 1;
+            }
+        }
+        if ($ep["domainImg"]) {
+            $ecr["domainImg"] = $ep["domainImg"];
+            $extension = pathinfo($ep["domainImg"])["extension"];
+            if (in_array($extension, ["jpeg", "jpg", "png", "gif"])) {
+                $ecr["domainImg_is_img"] = 1;
+            }
+        }
+        if ($ep["beian"]) {
+            $ecr["beian"] = $ep["beian"];
+            $extension = pathinfo($ep["beian"])["extension"];
+            if (in_array($extension, ["jpeg", "jpg", "png", "gif"])) {
+                $ecr["beian_is_img"] = 1;
+            }
+        }
 
         switch ($ep['checkState']) {
             case 1:
@@ -218,7 +246,7 @@ class Api extends EnterpriseController {
                 $record->oldBank = $ep['bank'];
                 $record->oldBankNetwork = $ep['bankNetwork'];
 
-                if($record->checkState == 1){
+                if ($record->checkState == 1) {
                     $record->newName = htmlspecialchars($data['name']);
                     $record->newIdCard = htmlspecialchars($data['idCard']);
                     $record->newIndustryFieldNew = $data['industryFieldNew'];
@@ -235,7 +263,7 @@ class Api extends EnterpriseController {
                     $record->newBankCard = $data['bankCard'];
                     $record->newBank = $data['bank'];
                     $record->newBankNetwork = $data['bankNetwork'];
-                }else{
+                } else {
                     $fields = array_filter(explode(",", $record->modify_fields));
                     for ($i = 0; $i < count($fields); $i++) {
                         $key = lcfirst(substr($fields[$i], 3));

+ 237 - 166
app/enterprise/view/api/to_add.html

@@ -28,179 +28,250 @@
         text-align: center;
         height: 30px;
     }
+
+    .panel-heading{
+        color:#333;
+        background-color:#f5f5f5;
+        border-color:#ddd
+    }
+    .spacing {
+        margin-bottom: 10px;
+        padding-right:4px;
+        padding-left: 4px;
+    }
+    .has-feedback label~.form-control-feedback{
+        top: 35px;
+    }
+    .table .td-label{
+        display: block;
+        text-align: left;
+        border-bottom: 1px solid #ccc;
+        margin-bottom: 10px;
+    }
+    .word-wrap{
+        width:100%;
+        white-space:normal;
+        word-wrap:break-word;
+        word-break:break-all;
+    }
 </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="EpChangeEdit.initFileTable()" aria-expanded="false">2.附件上传</a>
-                            </li>
-                        </ul>
-                    </div>
-                    <div class="tab-content">
-                        <div id="tab-1" class="tab-pane active">
-                            <div class="panel-body">
-                                <form id="ecr_form" class="form-horizontal" target="hiddenIframe" action=""
-                                      method="post" enctype="multipart/form-data">
-                                    <input type="text" class="form-control" id="enterprise_id" name="enterprise_id"
-                                           value="{$ecr.enterprise_id}" style="display: none;"/>
-                                    <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;"/>
-                                    <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}"/>
-                                                </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}"/>
-                                                </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">
-                                                    <select type="text" class="form-control" id="newIndustryFieldNew"
-                                                            name="newIndustryFieldNew"
-                                                            value="{$ecr.newIndustryFieldNew}"
-                                                            onchange="EpChangeEdit.industryChange()"></select>
-                                                </div>
-                                            </div>
-                                            <div class="rowGroup" style="display: none">
-                                                <label class="col-sm-2 control-label spacing">行业领域</label>
-                                                <div class="col-sm-4 spacing">
-                                                    <select type="text" class="form-control" id="newIndustryFieldOld"
-                                                            name="newIndustryFieldOld"
-                                                            value="{$ecr.newIndustryFieldOld}"></select>
-                                                </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">
-                                                    <select type="text" class="form-control" id="newEnterpriseTag"
-                                                            name="newEnterpriseTag"
-                                                            value="{$ecr.newEnterpriseTag}"></select>
-                                                </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">
-                                                    <select type="text" class="form-control" id="newEnterpriseType"
-                                                            name="newEnterpriseType"
-                                                            value="{$ecr.newEnterpriseType}"></select>
-                                                </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}"/>
-                                                </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">
-                                                    <select class="form-control" id="newStreet" name="newStreet"
-                                                            value="{$ecr.newStreet}"></select>
-                                                </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}"/>
-                                                </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}"/>
-                                                </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}"/>
-                                                </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}"/>
-                                                </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}"/>
-                                                </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}"/>
-                                                </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}"/>
-                                                </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}"/>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </form>
+            <div class="panel panel-default">
+                <div class="panel-heading">基础信息</div>
+                <div class="panel-body">
+                    <table style="width: 100%;border-collapse: collapse;" class="table table-bordered">
+                        <tr>
+                            <td>
+                                <div class="rowGroup">
+                                    <label class=" control-label spacing td-label"><span style="color: red">*</span>企业名称</label>
+                                    <input 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>
+                                    <input autocomplete="off" type="text" class="form-control" id="newIdCard" name="newIdCard"  value="{$ecr.newIdCard}"/>
+                                </div>
+                            </td>
+                            <td>
+                                <div class="rowGroup">
+                                    <label class=" control-label spacing td-label"><span style="color: red">*</span>法人代表</label>
+                                    <input autocomplete="off" type="text" class="form-control" id="newLegal" name="newLegal" value="{$ecr.newLegal}"/>
+                                </div>
+                            </td>
+                            <td rowspan="2" style="position:relative;">
+                                <button class="btn btn-info btn-sm" style="position:absolute;right:5px;top:5px;"><i class="fa fa-upload" aria-hidden="true"></i>上传文件</button>
+                                <label class="control-label spacing"><span class="text-danger">*</span>营业执照</label>
+                                {if condition="$ecr['imgurl']"}
+                                {eq name="ecr.imgurl_is_img" value="1"}
+                                <img id="photoImg" src="{$ecr.imgurl|getStoragePath}" style="height: 60px;" onclick="Feng.showImg(this)" >
+                                {else/}
+                                <button type="button" class="btn btn-primary" onclick="Feng.showPdf('{$ecr.imgurl|getStoragePath}', 'imgurl')">
+                                    <i class="fa fa-file-pdf-o" aria-hidden="true"></i>查看文件
+                                </button>
+                                {/eq}
+                                {else/}
+                                <img id="photoImg" src="/static/img/yyzz.png" style="height: 60px;" onclick="$('#imgurl').click()" >
+                                {/if}                                
+                                <input style="display: none" autocomplete="off" type="file" class="form-control" id="imgurl" name="imgurl" />
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <div class="rowGroup">
+                                    <label class=" control-label spacing td-label"><span style="color: red">*</span>所属街道</label>
+                                    <select class="form-control" id="newStreet" name="newStreet" value="{$ecr.newStreet}"></select>
+                                </div>
+                            </td>
+                            <td>
+                                <div class="rowGroup">
+                                    <label class=" control-label spacing td-label"><span style="color: red">*</span>企业地址</label>
+                                    <input autocomplete="off" type="text" class="form-control" id="newAddress" name="newAddress"  value="{$ecr.newAddress}"/>
+                                </div>
+                            </td>
+                            <td>
+                                <div class="rowGroup">
+                                    <label class=" control-label spacing td-label"><span style="color: red">*</span>企业电话</label>
+                                    <input autocomplete="off" type="text" class="form-control" id="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>企业银行账号</label>
+                                    <input autocomplete="off" type="text" class="form-control" id="newBankCard" name="newBankCard" value="{$ecr.newBankCard}"/>
+                                </div>
+                            </td>
+                            <td>
+                                <div class="rowGroup">
+                                    <label class=" control-label spacing td-label"><span style="color: red">*</span>企业开户银行</label>
+                                    <input autocomplete="off" type="text" class="form-control" id="newBank" name="newBank" value="{$ecr.newBank}"/>
+                                </div>
+                            </td>
+                            <td>
+                                <div class="rowGroup">
+                                    <label class=" control-label spacing td-label"><span style="color: red">*</span>企业开户银行网点</label>
+                                    <input autocomplete="off" type="text" class="form-control" id="newBankNetwork" name="newBankNetwork" placeholder="XX银行XX支行/分行/分理处" value="{$ecr.newBankNetwork}"/>
+                                </div>
+                            </td>
+                            <td style="position:relative;">            
+                                <button class="btn btn-info btn-sm" style="position:absolute;right:5px;top:5px;"><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 id="photoImg" src="{$ecr.bankImg|getStoragePath}" style="height: 60px;" onclick="Feng.showImg(this)" >
+                                {else/}
+                                <button type="button" class="btn btn-primary" onclick="Feng.showPdf('{$ecr.bankImg|getStoragePath}', 'bankImg')">
+                                    <i class="fa fa-file-pdf-o" aria-hidden="true"></i>查看文件
+                                </button>
+                                {/eq}
+                                {else/}
+                                <img id="photoImg" src="/static/img/yyzz.png" style="height: 60px;" onclick="$('#imgurl').click()" >
+                                {/if}
+                                <input style="display: none" autocomplete="off" type="file" class="form-control" id="bankImg" name="bankImg" />
+                            </td>
+                        </tr>
+                    </table>
+                </div>
+            </div>
+            {if condition="$ecr['special'] eq 0"}
+            <div class="panel panel-default">
+                <div class="panel-heading">申报基础信息</div>
+                <div class="panel-body">
+                    <div class="row">
+                        <div class="rowGroup" >
+                            <label class="col-sm-1 control-label spacing"><span class="text-danger">*</span>申报类型</label>
+                            <div class="col-sm-4 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>
-                        <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>
-                            <form id="uploadForm" action="/common/api/addTalentCommonFile" method="post"
-                                  class="form-horizontal" enctype="multipart/form-data" target="hiddenIframe"
-                                  style="display: none">
-                                <input type="hidden" name="backName" value="EpChangeEdit.callBack">
-                                <input type='hidden' id="fileId" name="fileId">
-                                <input type='file' id="upload_file" name="fileUrl" style='display: none'>
-                                <input type='hidden' id="mainId" name="mainId">
-                                <input type='hidden' id="typeId" name="typeId">
-                                <input type='hidden' id="index" name="index">
-                            </form>
-                        </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>
+                                <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 rowspan="2" style="position:relative;">
+                                    <button class="btn btn-info btn-sm" style="position:absolute;right:5px;top:5px;"><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 id="photoImg" src="{$ecr.domainImg|getStoragePath}" style="height: 60px;" onclick="Feng.showImg(this)" >
+                                    {else/}
+                                    <button type="button" class="btn btn-primary" onclick="Feng.showPdf('{$ecr.domainImg|getStoragePath}', 'domainImg')">
+                                        <i class="fa fa-file-pdf-o" aria-hidden="true"></i>查看文件
+                                    </button>
+                                    {/eq}
+                                    {else/}
+                                    <img id="photoImg" src="/static/img/yyzz.png" style="height: 60px;" onclick="$('#imgurl').click()" >
+                                    {/if}
+                                    <input style="display: none" autocomplete="off" type="file" class="form-control" id="domainImg" name="domainImg" />
+                                </td>
+                            </tr>
+                            <tr>
+                                <td>
+                                    <div class="rowGroup">
+                                        <label class="control-label spacing td-label"><span style="color: red">*</span>企业标签</label>
+                                        <select class="form-control" id="EpChangeEdit" 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}">
+                                        </select>
+                                    </div>
+                                </td>
+                            </tr>
+                        </table>
+                    </div>
+                    {/if}
+                </div>
+            </div>
+            {/if}
+            <div class="panel panel-default">
+                <div class="panel-heading">人才联络员信息</div>
+                <div class="panel-body">
+                    <table style="width: 100%;border-collapse: collapse;" class="table table-bordered">
+                        <tr>
+                            <td>
+                                <div class="rowGroup">
+                                    <label class="control-label spacing td-label"><span style="color: red">*</span>人才联络员</label>
+                                    <input autocomplete="off" type="text" class="form-control" id="newAgentName" name="newAgentName" value="{$ecr.newAgentName}"/>
+                                </div>
+                            </td>
+                            <td>
+                                <div class="rowGroup">
+                                    <label class="control-label spacing td-label"><span style="color: red">*</span>电子邮箱</label>
+                                    <input autocomplete="off" type="text" class="form-control" id="newAgentEmail" name="newAgentEmail" value="{$ecr.newAgentEmail}"/>
+                                </div>
+                            </td>
+                            <td>
+                                <div class="rowGroup">
+                                    <label class="control-label spacing td-label"><span style="color: red">*</span>人才联络员手机号</label>
+                                    <input autocomplete="off" type="text" class="form-control" id="newAgentPhone" name="newAgentPhone" value="{$ecr.newAgentPhone}"/>
+                                </div>
+                            </td>
+                            <td style="position:relative;">
+                                <button class="btn btn-info btn-sm" style="position:absolute;right:5px;top:5px;"><i class="fa fa-upload" aria-hidden="true"></i>上传文件</button>
+                                <label class="control-label spacing" style="text-align: center"><span style="color: red">*</span>人才联络员备案表<br /><a href="/beianbiao.doc" style="color: red">(点击此处下载模板)</a>  </label>
+                                {if condition="$ecr['beian']"}
+                                {eq name="ecr.beian_is_img" value="1"}
+                                <img id="photoImg" src="{$ecr.beian|getStoragePath}" style="height: 60px;" onclick="Feng.showImg(this)" >
+                                {else/}
+                                <button type="button" class="btn btn-primary" onclick="Feng.showPdf('{$ecr.beian|getStoragePath}', 'beian')">
+                                    <i class="fa fa-file-pdf-o" aria-hidden="true"></i>查看文件
+                                </button>
+                                {/eq}
+                                {else/}
+                                <img id="photoImg" src="/static/img/yyzz.png" style="height: 60px;" onclick="$('#imgurl').click()" >
+                                {/if}
+                                <input style="display: none" autocomplete="off" type="file" class="form-control" id="beian" name="beian" />
+                            </td>
+                        </tr>
+                    </table>
                 </div>
             </div>
         </div>