Kaynağa Gözat

Merge remote-tracking branch 'origin/master'

sandm 2 yıl önce
ebeveyn
işleme
ee034233ce

+ 14 - 0
app/admin/controller/Enterprise.php

@@ -90,6 +90,20 @@ class Enterprise extends AdminController {
                 $ep['enterpriseTagName'] = $enterpriseTag['name'];
             }
         }
+        //---------设置机构标签 --------------------------------------------------
+        if (\StrUtil::isNotEmpAndNull($ep['organizationTag'])) {
+            $organizationTag = DictApi::findByParentCodeAndCode("organization_tag", $ep['organizationTag']);
+            if ($organizationTag != null) {
+                $ep['organizationTagName'] = $organizationTag['name'];
+            }
+        }
+        //---------设置事业单位标签 --------------------------------------------------
+        if (\StrUtil::isNotEmpAndNull($ep['institutionTag'])) {
+            $institutionTag = DictApi::findByParentCodeAndCode("institution_tag", $ep['institutionTag']);
+            if ($institutionTag != null) {
+                $ep['institutionTagName'] = $institutionTag['name'];
+            }
+        }
         //---------设置单位类型 --------------------------------------------------
         if (\StrUtil::isNotEmpAndNull($ep['enterpriseType'])) {
             $enterpriseType = DictApi::findByParentCodeAndCode("enterprise_type", $ep['enterpriseType']);

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

@@ -270,6 +270,27 @@ class EnterpriseChangeRecord extends AdminController {
                 return view("", ['ecr' => $ecr]);
                 break;
             case 1:
+                if (\StrUtil::isNotEmpAndNull($ecr['oldInstitutionTag']) || \StrUtil::isNotEmpAndNull($ecr['newInstitutionTag'])) {
+                    $tagList = DictApi::selectByParentCode("institution_tag");
+                    if (\StrUtil::isNotEmpAndNull($ecr['oldInstitutionTag'])) {
+                        $ecr['oldInstitutionTagName'] = $tagList[$ecr['oldInstitutionTag']];
+                    }
+                    if (\StrUtil::isNotEmpAndNull($ecr['newInstitutionTag'])) {
+                        $ecr['newInstitutionTagName'] = $tagList[$ecr['newInstitutionTag']];
+                    }
+                }
+                return view("", ['ecr' => $ecr]);
+                break;
+            case 3:
+                if (\StrUtil::isNotEmpAndNull($ecr['oldOrganizationTag']) || \StrUtil::isNotEmpAndNull($ecr['newOrganizationTag'])) {
+                    $tagList = DictApi::selectByParentCode("organization_tag");
+                    if (\StrUtil::isNotEmpAndNull($ecr['oldOrganizationTag'])) {
+                        $ecr['oldOrganizationTagName'] = $tagList[$ecr['oldOrganizationTag']];
+                    }
+                    if (\StrUtil::isNotEmpAndNull($ecr['newOrganizationTag'])) {
+                        $ecr['newOrganizationTagName'] = $tagList[$ecr['newOrganizationTag']];
+                    }
+                }
                 return view("", ['ecr' => $ecr]);
                 break;
             default:
@@ -299,6 +320,12 @@ class EnterpriseChangeRecord extends AdminController {
         } else {
             $fields = ["Name" => "单位名称", "IdCard" => "统一社会信用代码", "Legal" => "法人代表", "Address" => "单位地址", "Street" => "所属街道", "Ephone" => "单位电话", "BankCard" => "单位银行账号", "Bank" => "单位开户银行", "BankNetwork" => "单位开户银行网点",
                 "AgentName" => "人才联络员姓名", "AgentPhone" => "人才联络员电话", "AgentEmail" => "人才联络员邮箱"];
+            if ($ep->special == 1) {
+                $fields["InstitutionTag"] = "单位标签";
+            }
+            if ($ep->special == 3) {
+                $fields["OrganizationTag"] = "机构标签";
+            }
             $files = ["newImgurl" => "法人证或批文", "newBankImg" => "开户许可证", "newBeian" => "人才联络员备案表"];
         }
         $modify_fields = [];
@@ -442,6 +469,7 @@ class EnterpriseChangeRecord extends AdminController {
             $ep = EnterpriseApi::getOne($ecr['mainId']);
             $ep->name = $ecr['newName'];
             $ep->idCard = $ecr['newIdCard'];
+            $ep->agencyType = $ecr['newAgencyType'];
             $ep->enterpriseTag = $ecr['newEnterpriseTag'];
             $ep->street = $ecr['newStreet'];
             $ep->address = $ecr['newAddress'];

+ 89 - 73
app/admin/view/enterprise/goto_enterprise_detail_page.html

@@ -105,7 +105,7 @@
                             <td class="key">
                                 单位地址
                             </td>
-                            <td class="value1 word-wrap">
+                            <td class="value1 word-wrap" style="border-right: 1px solid #c0a16b">
                                 {$ep.address}
                             </td>
                         </tr>
@@ -119,7 +119,7 @@
                             <td class="key">
                                 单位电话
                             </td>
-                            <td class="value1 word-wrap">
+                            <td class="value1 word-wrap" style="border-right: 1px solid #c0a16b">
                                 {$ep.ephone}
                             </td>
                         </tr>
@@ -156,83 +156,99 @@
                             <td class="key">
                                 企业开户银行网点
                             </td>
-                            <td colspan="3">
+                            <td class="value1 word-wrap">
                                 {$ep.bankNetwork}
                             </td>
+                            {eq name="ep.special" value="3"}
+                            <td class="key">
+                                机构标签
+                            </td>
+                            <td class="value1 word-wrap" style="border-right: 1px solid #c0a16b">
+                                {$ep.organizationTagName}
+                            </td>
+                            {/eq}
+                            {eq name="ep.special" value="1"}
+                            <td class="key">
+                                单位标签
+                            </td>
+                            <td class="value1 word-wrap" style="border-right: 1px solid #c0a16b">
+                                {$ep.institutionTagName}
+                            </td>
+                            {/eq}
                         </tr>
 
                     </table>
                     {if condition="$ep['special'] eq 0"}
-                        <p>
-                            申报类型:
-                            {switch name="ep.type"}
-                            {case value="1"}晋江市现代产业体系人才{if condition="$ep['agencyTypeName']"}({$ep.agencyTypeName}){/if}{/case}
-                            {case value="2"}集成电路优秀人才{/case}
-                            {/switch}
-                            <input type="hidden" id="type" value="{$ep.type}">
-                        </p>
-                        <table style="width:100%;table-layout:fixed;" class="table table-bordered">
-                            {if condition="$ep['agencyType'] eq 1"}
-                            <tr class="type1">
-                                <td class="key">
-                                    产业领域
-                                </td>
-                                <td class="value1 word-wrap">
-                                    {$ep.industryFieldNewName}
-                                </td>
-                                <td class="key">
-                                    行业领域
-                                </td>
-                                <td class="value1 word-wrap" style="border-right: 1px solid #c0a16b">
-                                    {$ep.industryFieldOldName}
-                                </td>
-                                <td style="border: 1px solid #c0a16b;width: 300px">
-                                    <label>
-                                        行业领域佐证材料
-                                    </label>
-                                    <div>
-                                        {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:60px;">
-                                        {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}
-                                    </div>
-                                </td>
-                            </tr>
-                            {/if}
-                            <tr class="type1">
-                                <td class="key">
-                                    企业标签
-                                </td>
-                                <td class="value1 word-wrap">
-                                    {$ep.enterpriseTagName}
-                                </td>
-                                <td class="key">
-                                    单位类型
-                                </td>
-                                <td class="value1 word-wrap" style="border-right:1px solid #c0a16b;">
-                                    {$ep.enterpriseTypeName}
-                                </td>
-                                <td style="border: 1px solid #c0a16b">
-                                    <label>
-                                        规上、高新技术、专精特新企业上传材料
-                                    </label>
-                                    <div>
-                                        {if condition="$ep['typeImg']"}
-                                        {if condition="$ep['typeImg_is_img']"}
-                                        <img onclick="Feng.showImg(this)" id="typeImg" alt="规上、高新技术、专精特新企业上传材料"
-                                             src="{$ep.typeImg|getStoragePath}" style="max-width:60px;">
-                                        {else}
-                                        <button type="button" onclick="Feng.showPdf('{$ep.typeImg|getStoragePath}', 'typeImg')" class="btn btn-xs btn-danger"><i class="fa fa-file-pdf-o" aria-hidden="true"></i></button>
-                                        {/if}
-                                        {/if}
-                                    </div>
-                                </td>
-                            </tr>
-                        </table>
+                    <p>
+                        申报类型:
+                        {switch name="ep.type"}
+                        {case value="1"}晋江市现代产业体系人才{if condition="$ep['agencyTypeName']"}({$ep.agencyTypeName}){/if}{/case}
+                        {case value="2"}集成电路优秀人才{/case}
+                        {/switch}
+                        <input type="hidden" id="type" value="{$ep.type}">
+                    </p>
+                    <table style="width:100%;table-layout:fixed;" class="table table-bordered">
+                        {if condition="$ep['agencyType'] eq 1"}
+                        <tr class="type1">
+                            <td class="key">
+                                产业领域
+                            </td>
+                            <td class="value1 word-wrap">
+                                {$ep.industryFieldNewName}
+                            </td>
+                            <td class="key">
+                                行业领域
+                            </td>
+                            <td class="value1 word-wrap" style="border-right: 1px solid #c0a16b">
+                                {$ep.industryFieldOldName}
+                            </td>
+                            <td style="border: 1px solid #c0a16b;width: 300px">
+                                <label>
+                                    行业领域佐证材料
+                                </label>
+                                <div>
+                                    {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:60px;">
+                                    {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}
+                                </div>
+                            </td>
+                        </tr>
+                        {/if}
+                        <tr class="type1">
+                            <td class="key">
+                                企业标签
+                            </td>
+                            <td class="value1 word-wrap">
+                                {$ep.enterpriseTagName}
+                            </td>
+                            <td class="key">
+                                单位类型
+                            </td>
+                            <td class="value1 word-wrap" style="border-right:1px solid #c0a16b;">
+                                {$ep.enterpriseTypeName}
+                            </td>
+                            <td style="border: 1px solid #c0a16b">
+                                <label>
+                                    规上、高新技术、专精特新企业上传材料
+                                </label>
+                                <div>
+                                    {if condition="$ep['typeImg']"}
+                                    {if condition="$ep['typeImg_is_img']"}
+                                    <img onclick="Feng.showImg(this)" id="typeImg" alt="规上、高新技术、专精特新企业上传材料"
+                                         src="{$ep.typeImg|getStoragePath}" style="max-width:60px;">
+                                    {else}
+                                    <button type="button" onclick="Feng.showPdf('{$ep.typeImg|getStoragePath}', 'typeImg')" class="btn btn-xs btn-danger"><i class="fa fa-file-pdf-o" aria-hidden="true"></i></button>
+                                    {/if}
+                                    {/if}
+                                </div>
+                            </td>
+                        </tr>
+                    </table>
                     {/if}
                 </div>
             </div>

+ 13 - 1
app/admin/view/enterprise_change_record/goto_enterprise_change_detail_page.html

@@ -186,7 +186,19 @@
                             <td class="key">
                                 {eq name="ecr.special" value="0"}企业{else/}单位{/eq}开户银行网点
                             </td>
-                            <td class="value1" colspan="3" data-old='{$ecr.oldBankNetwork}' data-new='{$ecr.newBankNetwork}'></td>
+                            <td class="value1" data-old='{$ecr.oldBankNetwork}' data-new='{$ecr.newBankNetwork}'></td>
+                            {eq name="ecr.special" value="1"}
+                            <td class="key">
+                                单位标签
+                            </td>
+                            <td class="value1" data-old='{$ecr.oldInstitutionTagName}' data-new='{$ecr.newInstitutionTagName}'></td>
+                            {/eq}
+                            {eq name="ecr.special" value="3"}
+                            <td class="key">
+                                机构标签
+                            </td>
+                            <td class="value1" data-old='{$ecr.oldOrganizationTagName}' data-new='{$ecr.newOrganizationTagName}'></td>
+                            {/eq}
                         </tr>
                     </table>
                     {if condition="$ecr.special == 0"}

+ 23 - 8
app/common.php

@@ -318,20 +318,35 @@ function isImage($filename) {
 }
 
 function chkEnterpriseFull($ep) {
-    if ($ep["type"] == 1) {
-        $checkEnterpriseFullFields = ["industryFieldNew", "enterpriseType", "bankCard", "bankNetwork", "bank", "imgurl", "bankImg", "domainImg", "beian"];
-        if (in_array($ep["enterpriseType"], ['guishang', 'gaoxinjishu', 'zhuanjingtexin'])) {
-            $checkEnterpriseFullFields[] = "typeImg";
-        }
-    } else {
-        $checkEnterpriseFullFields = ["bankCard", "bankNetwork", "bank", "imgurl", "bankImg", "beian"];
+    switch ($ep->special) {
+        case 0:
+            if ($ep["type"] == 1) {
+                $checkEnterpriseFullFields = ["agencyType", "enterpriseTag", "enterpriseType", "bankCard", "bankNetwork", "bank", "imgurl", "bankImg", "beian"];
+                if ($ep["agencyType"] == 1) {
+                    $checkEnterpriseFullFields[] = "industryFieldNew";
+                    $checkEnterpriseFullFields[] = "industryFieldOld";
+                    $checkEnterpriseFullFields[] = "domainImg";
+                }
+                if (in_array($ep["enterpriseType"], ['guishang', 'gaoxinjishu', 'zhuanjingtexin'])) {
+                    $checkEnterpriseFullFields[] = "typeImg";
+                }
+            } else {
+                $checkEnterpriseFullFields = ["bankCard", "bankNetwork", "bank", "imgurl", "bankImg", "beian"];
+            }
+            break;
+        case 1:
+            $checkEnterpriseFullFields = ["institutionTag"];
+            break;
+        case 3:
+            $checkEnterpriseFullFields = ["organizationTag"];
+            break;
     }
     $errorCounts = 0;
     while ($chk = array_shift($checkEnterpriseFullFields)) {
         if ($ep[$chk] == null)
             $errorCounts++;
     }
-    if ($ep->special == 0 && $errorCounts > 0) {
+    if ($errorCounts > 0) {
         echo sprintf("<script>"
                 . "parent.layer.confirm('系统升级,您的资料需要同步更新,请移步机构用户中心进行修改【机构信息变更】。',"
                 . "function(){"

+ 46 - 0
app/common/api/IntegralRecordApi.php

@@ -0,0 +1,46 @@
+<?php
+
+namespace app\common\api;
+
+use app\common\api\DictApi;
+use app\admin\model\Enterprise;
+use think\facade\Db;
+use app\common\model\IntegralRecord;
+use app\common\state\IntegralState;
+
+/**
+ * Description of IntegralRecordApi
+ *
+ * @author sgq
+ */
+class IntegralRecordApi {
+
+    public static function getOne($id) {
+        return IntegralRecord::where("id", "=", $id)->find();
+    }
+
+    public static function getList($params) {
+        $where = [];
+        $order = $params["order"] ?: "desc";
+        $offset = $params["offset"] ?: 0;
+        $limit = $params["limit"] ?: 10;
+        $count = IntegralRecord::where($where)->count();
+        $list = IntegralRecord::where($where)->field("*,if(updateTime is not null,updateTime,createTime) as orderTime")->limit($offset, $limit)->order("orderTime " . $order)->select();
+        return ["total" => $count, "rows" => $list];
+    }
+
+    public static function checkIsEditable($id) {
+        $info = self::getOne($id);
+        if (!$info || !in_array($info["checkState"], [0, IntegralState::SAVE]))
+            return false;
+        return true;
+    }
+
+    static public function chkIsOwner($id, $uid) {
+        $info = self::getOne($id);
+        if ($info["enterprise_id"] != $uid)
+            return null;
+        return $info;
+    }
+
+}

+ 1 - 1
app/common/api/TalentState.php

@@ -60,7 +60,7 @@ class TalentState {
                 return "基础复核通过";
             case 6:
                 return "基础复核驳回";
-            case7:
+            case 7:
                 return "基础复核失败";
             case 8:
                 return "保存未提交";

+ 39 - 10
app/common/controller/Api.php

@@ -216,20 +216,33 @@ class Api extends BaseController {
         $checkState = $param["checkState"];
         $isMix = $param["isMix"] ?: 0;
         $talent_condition = $param["talent_condition"];
-        if (in_array($checkState, [TalentState::BASE_VERIFY_FAIL, 0, TalentState::FST_SAVE, TalentState::FST_SUBMIT, TalentState::BASE_VERIFY_PASS]) && $isMix != 1) {
-            $where[] = ["step", "=", 1]; //只查找人才第一步所需文件
-        } else {
-            $where[] = ["isConditionFile", "<>", 1]; //排除人才条件上传文件
-        }
         $where[] = ["project", "=", $project];
         $where[] = ["active", "=", 1];
         $where[] = ["delete", "=", 0];
         $where[] = ["type", "=", $type];
-        if ($talent_condition && $source == 5) {
-            $condition_info = Db::table("new_talent_condition")->findOrEmpty($talent_condition);
-            if ($condition_info["bindFileTypes"]) {
-                $whr[] = ["id", "in", $condition_info["bindFileTypes"]];
-            }
+        switch ($project) {
+            case 1:
+                if (in_array($checkState, [TalentState::BASE_VERIFY_FAIL, 0, TalentState::FST_SAVE, TalentState::FST_SUBMIT, TalentState::BASE_VERIFY_PASS]) && $isMix != 1) {
+                    $where[] = ["step", "=", 1]; //只查找人才第一步所需文件
+                } else {
+                    $where[] = ["isConditionFile", "<>", 1]; //排除人才条件上传文件
+                }
+                if ($talent_condition && $source == 5) {
+                    $condition_info = Db::table("new_talent_condition")->findOrEmpty($talent_condition);
+                    if ($condition_info["bindFileTypes"]) {
+                        $whr[] = ["id", "in", $condition_info["bindFileTypes"]];
+                    }
+                }
+                break;
+            case 20:
+                $itemId = $param["itemId"];
+                $integral_item = \app\common\api\IntegralItemApi::getOne($itemId);
+                if ($integral_item && $integral_item["fileTypeId"]) {
+                    $where[] = ["id", "in", explode(',', $integral_item["fileTypeId"])];
+                } else {
+                    return json([]);
+                }
+                break;
         }
         if ($whr) {
             $rows = Db::table("new_common_filetype")->whereOr([$where, $whr])->order("must asc")->order("sn " . $order)->select()->toArray();
@@ -633,4 +646,20 @@ class Api extends BaseController {
         }
     }
 
+    function getIntegralProjectsByType() {
+        $type = $this->request->param("type") ?: 0;
+        $where[] = ["type", "=", $type];
+        $where[] = ["active", "=", 1];
+        $list = \app\common\api\IntegralProjectApi::getAll($where);
+        return json($list);
+    }
+
+    public function getIntegralItemsByProject() {
+        $projectId = $this->request->param("projectId") ?: 0;
+        $where[] = ["projectId", "=", $projectId];
+        $where[] = ["active", "=", 1];
+        $list = \app\common\api\IntegralItemApi::getAll($where);
+        return json($list);
+    }
+
 }

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

@@ -56,7 +56,7 @@ class Auth extends BaseController {
                     $data['name'] = str_replace(')', ')', $data['name']);
                 }
                 $files = $this->request->file();
-                switch ($special){
+                switch ($special) {
                     case 'qiye':
                         if ($data['type'] == 1) {
                             if ($data["agencyType"] == 1) {
@@ -96,7 +96,7 @@ class Auth extends BaseController {
                         $data['special'] = 0;
                         break;
                     case 'minfei':
-
+                        $data['type'] = 1;
                         if (!array_key_exists('imgurl', $files) || $files['imgurl'] == '') {
                             $response_object->code = 500;
                             $response_object->msg = '营业执照不能为空';
@@ -255,6 +255,8 @@ class Auth extends BaseController {
                 'type' => intval($this->request['type']),
                 'agencyType' => intval($this->request['agencyType']),
                 'enterpriseTag' => \StrUtil::getRequestDecodeParam($this->request, 'enterpriseTag'), //单位标签
+                'organizationTag' => \StrUtil::getRequestDecodeParam($this->request, 'organizationTag'), //机构标签
+                'institutionTag' => \StrUtil::getRequestDecodeParam($this->request, 'institutionTag'), //事业单位标签
                 'enterpriseType' => \StrUtil::getRequestDecodeParam($this->request, 'enterpriseType'), //单位类型
                 'agentPhone' => \StrUtil::getRequestDecodeParam($this->request, 'agentPhone'), //手机
                 'agentEmail' => \StrUtil::getRequestDecodeParam($this->request, 'agentEmail'), //邮箱

+ 16 - 0
app/common/model/IntegralDetail.php

@@ -0,0 +1,16 @@
+<?php
+
+namespace app\common\model;
+
+use think\Model;
+
+/**
+ * Description of IntegralDetail
+ *
+ * @author sgq
+ */
+class IntegralDetail extends Model {
+
+    protected $table = "new_integral_detail";
+
+}

+ 20 - 0
app/common/model/IntegralRecord.php

@@ -0,0 +1,20 @@
+<?php
+
+namespace app\common\model;
+
+use think\Model;
+
+/**
+ * Description of IntegralRecord
+ *
+ * @author sgq
+ */
+class IntegralRecord extends Model {
+
+    protected $table = "new_integral_record";
+
+    public function detail() {
+        return $this->hasOne(IntegralDetail::class, "record_id");
+    }
+
+}

+ 24 - 0
app/common/state/IntegralState.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace app\common\state;
+
+class IntegralState {
+
+    public const SAVE = 1; //保存未提交
+    public const SUBMIT = 2; //已提交未审核
+    public const VERIFY_PASS = 3; //初审通过
+    public const VERIFY_REJECT = 4; //初审驳回
+    public const VERIFY_FAIL = 5; //初审失败
+    public const REVERIFY_PASS = 6; //复审通过
+    public const REVERIFY_REJECT = 7; //复审驳回
+    public const REVERIFY_FAIL = 8; //复审失败
+    public const ZX_PASS = 21; //征信通过|待公示
+    public const ZX_FAIL = 22; //征信失信|审核不通过
+    public const ANNOUNCED = 23; //已公示
+    public const ANNOUNCED_REVERIFY_PASS = 24; //公示再审核通过|待公布
+    public const ANNOUNCED_REVERIFY_FAIL = 25; //公示再审核不通过
+    public const PUBLISH_PASS = 26; //公布通过
+    public const PUBLISH_FAIL = 27; //公布不通过
+    public const SUCCESS = 28; //积分兑现成功
+
+}

+ 10 - 0
app/common/state/ProjectState.php

@@ -0,0 +1,10 @@
+<?php
+
+namespace app\common\state;
+
+class ProjectState {
+
+    public const TALENT = 1; //人才认定
+    public const INTEGRAL = 20; //积分申报
+
+}

+ 23 - 2
app/common/view/auth/enterprise_edit.html

@@ -130,7 +130,28 @@
                                                 <input style="display: none" autocomplete="off" type="file" class="form-control" id="bankImg" name="bankImg" />
                                             </td>
                                         </tr>
-
+                                        {eq name="ep.special" value="3"}
+                                        <tr>
+                                            <td colspan="4">
+                                                <div class="rowGroup">
+                                                    <label class="control-label spacing td-label"><span style="color: red">*</span>机构标签</label>
+                                                    <select class="form-control" id="organizationTag" name="organizationTag" value="{$ep.organizationTag}">
+                                                    </select>
+                                                </div>
+                                            </td>
+                                        </tr>
+                                        {/eq}
+                                        {eq name="ep.special" value="1"}
+                                        <tr>
+                                            <td colspan="4">
+                                                <div class="rowGroup">
+                                                    <label class="control-label spacing td-label"><span style="color: red">*</span>单位标签</label>
+                                                    <select class="form-control" id="institutionTag" name="institutionTag" value="{$ep.institutionTag}">
+                                                    </select>
+                                                </div>
+                                            </td>
+                                        </tr>
+                                        {/eq}
                                     </table>
                                 </div>
                                 {if condition="$ep['special'] eq 0"}
@@ -148,7 +169,7 @@
                                                 </select>
                                             </div>
                                             <div class="rowGroup agencyType"  {if condition="$ep['type'] neq 1"}style="display: none"{/if}>
-                                                <label class="col-sm-1 control-label spacing"><span class="text-danger">*</span>机构类型</label>
+                                                 <label class="col-sm-1 control-label spacing"><span class="text-danger">*</span>机构类型</label>
                                                 <div class="col-sm-3 spacing">
                                                     <select class="form-control" id="agencyType" name="agencyType" value="{$ep.agencyType}" onchange="Register.agencyTypeChange()">
                                                     </select>

+ 27 - 0
app/enterprise/controller/Api.php

@@ -60,6 +60,8 @@ class Api extends EnterpriseController {
             'type' => $ep['type'],
             'newAgencyType' => $ep['agencyType'],
             'newEnterpriseTag' => $ep['enterpriseTag'],
+            'newOrganizationTag' => $ep['organizationTag'],
+            'newInstitutionTag' => $ep['institutionTag'],
             'newEnterpriseType' => $ep['enterpriseType'],
             'newIndustryFieldNew' => $ep['industryFieldNew'],
             'newIndustryFieldOld' => $ep['industryFieldOld'],
@@ -130,6 +132,9 @@ class Api extends EnterpriseController {
             case 1:
                 return view("", ['ecr' => $ecr]);
                 break;
+            case 3:
+                return view("", ['ecr' => $ecr]);
+                break;
             default:
 
                 break;
@@ -149,6 +154,8 @@ class Api extends EnterpriseController {
             'type' => intval($this->request['type']),
             'agencyType' => intval($this->request['newAgencyType']),
             'enterpriseTag' => \StrUtil::getRequestDecodeParam($this->request, 'newEnterpriseTag'), //单位标签
+            'organizationTag' => \StrUtil::getRequestDecodeParam($this->request, 'newOrganizationTag'), //机构标签
+            'institutionTag' => \StrUtil::getRequestDecodeParam($this->request, 'newInstitutionTag'), //事业单位标签
             'enterpriseType' => \StrUtil::getRequestDecodeParam($this->request, 'newEnterpriseType'), //单位类型
             'agentEmail' => \StrUtil::getRequestDecodeParam($this->request, 'newAgentEmail'), //邮箱
             'ephone' => \StrUtil::getRequestDecodeParam($this->request, 'newEphone'), //单位电话
@@ -208,6 +215,8 @@ class Api extends EnterpriseController {
                     'oldAgentEmail' => $ep['agentEmail'],
                     'oldAgentPhone' => $ep['agentPhone'],
                     'oldEnterpriseTag' => $ep['enterpriseTag'],
+                    'oldOrganizationTag' => $ep['organizationTag'],
+                    'oldInstitutionTag' => $ep['institutionTag'],
                     'oldEnterpriseType' => $ep['enterpriseType'],
                     'oldBankCard' => $ep['bankCard'],
                     'oldBank' => $ep['bank'],
@@ -230,6 +239,8 @@ class Api extends EnterpriseController {
                     'newAgentEmail' => $data['agentEmail'],
                     'newAgentPhone' => $data['agentPhone'],
                     'newEnterpriseTag' => $data['enterpriseTag'],
+                    'newOrganizationTag' => $data['organizationTag'],
+                    'newInstitutionTag' => $data['institutionTag'],
                     'newEnterpriseType' => $data['enterpriseType'],
                     'newBankCard' => $data['bankCard'],
                     'newBank' => $data['bank'],
@@ -347,6 +358,8 @@ class Api extends EnterpriseController {
                 $record->oldAgentEmail = $ep['agentEmail'];
                 $record->oldAgentPhone = $ep['agentPhone'];
                 $record->oldEnterpriseTag = $ep['enterpriseTag'];
+                $record->oldOrganizationTag = $ep['organizationTag'];
+                $record->oldInstitutionTag = $ep['institutionTag'];
                 $record->oldEnterpriseType = $ep['enterpriseType'];
                 $record->oldBankCard = $ep['bankCard'];
                 $record->oldBank = $ep['bank'];
@@ -371,6 +384,8 @@ class Api extends EnterpriseController {
                     $record->newAgentEmail = $data['agentEmail'];
                     $record->newAgentPhone = $data['agentPhone'];
                     $record->newEnterpriseTag = $data['enterpriseTag'];
+                    $record->newOrganizationTag = $data['organizationTag'];
+                    $record->newInstitutionTag = $data['institutionTag'];
                     $record->newEnterpriseType = $data['enterpriseType'];
                     $record->newBankCard = $data['bankCard'];
                     $record->newBank = $data['bank'];
@@ -696,6 +711,9 @@ class Api extends EnterpriseController {
             case 1:
                 return view("", ['ecr' => $ecr]);
                 break;
+            case 3:
+                return view("", ['ecr' => $ecr]);
+                break;
             default:
 
                 break;
@@ -948,6 +966,15 @@ class Api extends EnterpriseController {
                 return view("", ['ecr' => $ecr]);
                 break;
             case 1:
+                $tagList = DictApi::selectByParentCode('institution_tag');
+                $ecr['oldInstitutionTagName'] = $tagList[$ecr['oldInstitutionTag']];
+                $ecr['newInstitutionTagName'] = $tagList[$ecr['newInstitutionTag']];
+                return view("", ['ecr' => $ecr]);
+                break;
+            case 3:
+                $tagList = DictApi::selectByParentCode('organization_tag');
+                $ecr['oldOrganizationTagName'] = $tagList[$ecr['oldOrganizationTag']];
+                $ecr['newOrganizationTagName'] = $tagList[$ecr['newOrganizationTag']];
                 return view("", ['ecr' => $ecr]);
                 break;
             default:

+ 25 - 8
app/enterprise/controller/Index.php

@@ -20,20 +20,35 @@ class Index extends EnterpriseController {
             "avatar" => $this->user["avatar"]
         ];
         $ep = \app\common\api\EnterpriseApi::getOne($this->user["uid"]);
-        if ($ep["type"] == 1) {
-            $checkEnterpriseFullFields = ["industryFieldNew", "enterpriseType", "bankCard", "bankNetwork", "bank", "imgurl", "bankImg", "domainImg", "beian"];
-            if (in_array($ep["enterpriseType"], ['guishang', 'gaoxinjishu', 'zhuanjingtexin'])) {
-                $checkEnterpriseFullFields[] = "typeImg";
-            }
-        } else {
-            $checkEnterpriseFullFields = ["bankCard", "bankNetwork", "bank", "imgurl", "bankImg", "beian"];
+        switch ($ep["special"]) {
+            case 0:
+                if ($ep["type"] == 1) {
+                    $checkEnterpriseFullFields = ["agencyType", "enterpriseTag", "enterpriseType", "bankCard", "bankNetwork", "bank", "imgurl", "bankImg", "beian"];
+                    if ($ep["agencyType"] == 1) {
+                        $checkEnterpriseFullFields[] = "industryFieldNew";
+                        $checkEnterpriseFullFields[] = "industryFieldOld";
+                        $checkEnterpriseFullFields[] = "domainImg";
+                    }
+                    if (in_array($ep["enterpriseType"], ['guishang', 'gaoxinjishu', 'zhuanjingtexin'])) {
+                        $checkEnterpriseFullFields[] = "typeImg";
+                    }
+                } else {
+                    $checkEnterpriseFullFields = ["bankCard", "bankNetwork", "bank", "imgurl", "bankImg", "beian"];
+                }
+                break;
+            case 1:
+                $checkEnterpriseFullFields = ["institutionTag"];
+                break;
+            case 3:
+                $checkEnterpriseFullFields = ["organizationTag"];
+                break;
         }
         $errorCounts = 0;
         while ($chk = array_shift($checkEnterpriseFullFields)) {
             if ($ep[$chk] == null)
                 $errorCounts++;
         }
-        $vars["isEnterpriseFull"] = $ep["special"] == 0 && $errorCounts > 0 ? 0 : 1;
+        $vars["isEnterpriseFull"] = $errorCounts > 0 ? 0 : 1;
         $menus = \app\common\api\MenuApi::getEnterpriseMenuByType($this->user["type"]);
         $vars["menus"] = $menus;
         return view("", $vars);
@@ -45,6 +60,8 @@ class Index extends EnterpriseController {
         $ep['industryFieldNewName'] = DictApi::findDictByCode($ep['industryFieldNew'])->name ?? '';
         $ep['industryFieldOldName'] = DictApi::findDictByCode($ep['industryFieldOld'])->name ?? '';
         $ep['enterpriseTagName'] = DictApi::findDictByCode($ep['enterpriseTag'])->name ?? '';
+        $ep['organizationTagName'] = DictApi::findDictByCode($ep['organizationTag'])->name ?? '';
+        $ep['institutionTagName'] = DictApi::findDictByCode($ep['institutionTag'])->name ?? '';
         $ep['streetName'] = DictApi::findDictByCode($ep['street'])->name ?? '';
         $ep['enterpriseTypeName'] = DictApi::findDictByCode($ep['enterpriseType'])->name ?? '';
         if ($ep["imgurl"]) {

+ 103 - 198
app/enterprise/controller/Integral.php

@@ -5,7 +5,12 @@ namespace app\enterprise\controller;
 use app\enterprise\common\EnterpriseController;
 use think\facade\Db;
 use app\common\api\EnterpriseApi;
-use app\enterprise\validate\TalentInfo;
+use app\common\state\IntegralState;
+use app\common\api\IntegralRecordApi;
+use app\common\api\TalentLogApi;
+use app\common\state\ProjectState;
+use app\enterprise\validate\IntegralValidator;
+use think\exception\ValidateException;
 
 /**
  * Description of 积分申报
@@ -19,7 +24,7 @@ class Integral extends EnterpriseController {
     }
 
     public function list() {
-        $res = IntegralLogApi::getList($this->request, $step);
+        $res = IntegralRecordApi::getList($this->request->param());
         return json($res);
     }
 
@@ -30,49 +35,31 @@ class Integral extends EnterpriseController {
         $type = $this->user["type"];
         $param = $request->param();
         $id = isset($param["id"]) ? $param["id"] : 0;
-        $info = \app\common\api\VerifyApi::getTalentInfoById($id);
+        $info = IntegralRecordApi::getOne($id);
         $ep = EnterpriseApi::getOne($this->user["uid"]);
-        if (!chkEnterpriseFull($ep))
-            return;
-        $tagList = DictApi::selectByParentCode('enterprise_tag');
-        $streetList = DictApi::selectByParentCode('street');
-        $industryFieldNew = DictApi::selectByParentCode('industry_field');
-        $ep->enterpristTagName = $tagList[$ep->enterpriseTag];
-        $ep->streetName = $streetList[$ep->street];
-        $ep->industryFieldNewName = $industryFieldNew[$ep->industryFieldNew];
         if ($info) {
-            $info["real_state"] = TalentLogApi::getLastLog($id, 1)["state"];
+            $info["real_state"] = TalentLogApi::getLastLog($id, ProjectState::INTEGRAL)["state"];
         }
-        if ($info && in_array($info["checkState"], [TalentState::FST_VERIFY_PASS, TalentState::DEPT_VERIFY_PASS, TalentState::REVERIFY_PASS, TalentState::REVERIFY_FAIL])) {
+        if ($info && in_array($info["checkState"], [IntegralState::VERIFY_PASS, IntegralState::REVERIFY_PASS, IntegralState::REVERIFY_FAIL])) {
             return $this->view($request);
             exit();
         }
         if ($request->isPost()) {
             $checkState = $info["checkState"] ?: 0;
-            if ($checkState == TalentState::SCND_SAVE || $checkState == 0) {
-                switch ($type) {
-                    case 1:
-                        $this->mixSave($info, $request, TalentState::SCND_SAVE);
-                        exit();
-                        break;
-                    case 2:
-                        $this->icSave($info, $request, TalentState::SCND_SAVE);
-                        exit();
-                        break;
-                }
-            } else if (in_array($checkState, [TalentState::BASE_VERIFY_FAIL, TalentState::BASE_REVERIFY_FAIL, TalentState::FST_VERIFY_FAIL, TalentState::REVERIFY_FAIL])) {
+            if ($checkState == IntegralState::SAVE || $checkState == 0) {
+                $this->save($info, $request, IntegralState::SAVE);
+            } else if (in_array($checkState, [IntegralState::VERIFY_FAIL, IntegralState::REVERIFY_FAIL])) {
                 $res = ["msg" => "审核失败,不能再保存"];
-                echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
+                echo sprintf("<script>parent.IntegralInfoDlg.infoCallback(%s);</script>", json_encode($res));
                 exit;
             }
             $res = ["msg" => "已提交审核,请耐心等待"];
-            echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
+            echo sprintf("<script>parent.IntegralInfoDlg.infoCallback(%s);</script>", json_encode($res));
             exit;
         }
         $checkState = $info["checkState"] ?: 0;
 
         $info["enterprise"] = $ep;
-        $info["talent_type_list"] = DictApi::findChildDictByCode("talent_type");
         return view("", ["year" => date("Y"), "checkState" => $checkState, "row" => $info]);
     }
 
@@ -162,7 +149,7 @@ class Integral extends EnterpriseController {
             }
             if (count($return) > 0) {
                 $res = ["msg" => implode("<br>", $return)];
-                echo sprintf("<script>parent.TalentInfoInfoDlg.submitCallback(%s);</script>", json_encode($res));
+                echo sprintf("<script>parent.IntegralInfoDlg.submitCallback(%s);</script>", json_encode($res));
                 exit;
             }
 
@@ -228,18 +215,18 @@ class Integral extends EnterpriseController {
             $upload_type_counts = count($distinct_filetypes);
             if ($upload_type_counts != count($ft_ids)) {
                 $res = ["msg" => "请留意附件上传栏中带*号的内容均为必传项,请上传完整再提交审核"];
-                echo sprintf("<script>parent.TalentInfoInfoDlg.submitCallback(%s);</script>", json_encode($res));
+                echo sprintf("<script>parent.IntegralInfoDlg.submitCallback(%s);</script>", json_encode($res));
                 exit;
             }
 
             return $this->mixSave($info, $this->request, TalentState::SCND_SUBMIT);
         } else if (in_array($checkState, [TalentState::BASE_VERIFY_FAIL, TalentState::BASE_REVERIFY_FAIL, TalentState::FST_VERIFY_FAIL, TalentState::REVERIFY_FAIL, TalentState::ZX_FAIL, TalentState::ANNOUNCED_REVERIFY_FAIL, TalentState::PUBLISH_FAIL])) {
             $res = ["msg" => "审核失败,不能再提交审核"];
-            echo sprintf("<script>parent.TalentInfoInfoDlg.submitCallback(%s);</script>", json_encode($res));
+            echo sprintf("<script>parent.IntegralInfoDlg.submitCallback(%s);</script>", json_encode($res));
             exit;
         }
         $res = ["msg" => "已提交审核,请耐心等待"];
-        echo sprintf("<script>parent.TalentInfoInfoDlg.submitCallback(%s);</script>", json_encode($res));
+        echo sprintf("<script>parent.IntegralInfoDlg.submitCallback(%s);</script>", json_encode($res));
         exit;
     }
 
@@ -250,251 +237,169 @@ class Integral extends EnterpriseController {
      */
     private function save($info, \think\Request $request, $checkState) {
         try {
-            $batch = \app\common\api\BatchApi::getValidBatch(20, $this->user["type"]);
+            $batch = \app\common\api\BatchApi::getValidBatch(ProjectState::INTEGRAL, $this->user["type"]);
             if (!$batch) {
                 throw new ValidateException("不在人才认定申报申请时间内");
             }
             $param = $request->param();
-            validate(TalentInfo::class)->check($param);
+            validate(IntegralValidator::class)->check($param);
             $id = $param["id"];
+            $files = $param["uploadFiles"];
             if ($id) {
                 if (!$info || $info["id"] != $id || $info["enterprise_id"] != $this->user["uid"]) {
-                    throw new ValidateException("没有对应的人才认定申报信息");
-                }
-            }
-            $files = $param["uploadFiles"];
-            $data["headimgurl"] = $info["headimgurl"];
-            if ($request->file()) {
-                $headimg = $request->file("photo");
-                $upload = new \app\common\api\UploadApi();
-                $result = $upload->uploadOne($headimg, "image", "talent/photo");
-                $file = imagecreatefromstring(file_get_contents("storage/" . $result->filepath));
-                $width = imagesx($file);
-                $height = imagesy($file);
-                //免冠二寸照长宽413:579
-                if ($width * 579 != $height * 413) {
-                    @unlink("storage/" . $result->filepath); //像素不符合,删除上传文件                    
-                    throw new ValidateException("近期免冠半身彩照(二寸)不符合二寸像素标准。*<span style='color:#ff0000;'>二寸像素标准[413*579]</span>");
-                }
-                if ($info && $info["headimgurl"]) {
-                    //如果新照片符合像素要求,则删除旧照片
-                    $old_head_url = "storage/" . $info["headimgurl"];
-                    if (file_exists($old_head_url))
-                        @unlink($old_head_url);
-                }
-                $data["headimgurl"] = $result->filepath;
-            }
-            if (!$data["headimgurl"] && $checkState == TalentState::SCND_SUBMIT)
-                throw new ValidateException("请上传头像。*<span style='color:#ff0000;'>二寸像素标准[413*579]</span>");
-
-            $where = [];
-            $where[] = ["project", "=", 1];
-            $where[] = ["type", "=", $this->user["type"]];
-            $where[] = ["must", "=", 1];
-            $where[] = ["active", "=", 1];
-            $where[] = ["delete", "=", 0];
-            $filetypes = Db::table("new_common_filetype")->where($where)->select()->toArray();
-
-            $age = 0;
-            if ($param["birthday"]) {
-                $birthday = $param["birthday"];
-                $birthdayYear = substr($birthday, 0, 4);
-                $currentYear = date("Y");
-                $age = $currentYear - $birthdayYear;
-            }
-            $ft_ids = [];
-            $deletes = [];
-            foreach ($filetypes as $ft) {
-                if ($ft["option"]) {
-                    if ($ft["rel"] == "birthday") {
-                        if ($age < $ft["option"]) {
-                            $deletes[] = $ft["id"];
-                            continue;
-                        }
-                    } else {
-                        $selectVal = $param[$ft["rel"]];
-                        $conditions = array_filter(explode(",", $ft["option"]));
-                        if (!in_array($selectVal, $conditions)) {
-                            $deletes[] = $ft["id"];
-                            continue;
-                        }
-                    }
+                    throw new ValidateException("没有对应的积分申报信息");
                 }
-                $ft_ids[] = $ft["id"];
             }
 
-            $data["apply_year"] = $batch["batch"];
-
-            $all_valid_keys = ["talent_type", "name", "card_type", "card_number", "sex", "birthday", "nationality", "province", "city", "county", "nation", "politics", "experience", "education",
-                "import_way", "cur_entry_time", "position",
-                "source", "source_batch", "fujian_highcert_pubtime", "fujian_highcert_exptime", "quanzhou_highcert_pubtime", "quanzhou_highcert_exptime", "source_city", "source_county",
-                "talent_arrange", "talent_condition", "highest_degree", "graduate_school", "major", "professional", "bank", "bank_number", "bank_branch_name", "bank_account",
-                "study_abroad", "abroad_school", "abroad_major", "phone", "email", "annual_salary", "pro_qua"];
+            $all_valid_keys = ["name", "card_type", "card_number", "phone", "email"];
             foreach ($all_valid_keys as $key) {
                 $data[$key] = trim($param[$key]);
             }
-            if (in_array($data["talent_type"], [1, 2])) {
-                $data["tax_insurance_month"] = $param["tax_insurance_month"];
-                $data["labor_contract_rangetime"] = $param["labor_contract_rangetime"];
-                $data["salary_pay_way"] = $param["salary_pay_way"];
-                $data["salary_pay_month"] = $param["salary_pay_month"];
-                $data["fst_work_time"] = $param["fst_work_time"];
-                $data['pre_import_type'] = null;
-            } else {
-                $data["tax_insurance_month"] = null;
-                $data["labor_contract_rangetime"] = null;
-                $data["salary_pay_way"] = null;
-                $data["salary_pay_month"] = null;
-                $data["fst_work_time"] = null;
-                $data['pre_import_type'] = $param["pre_import_type"];
-            }
 
-            if ($data["study_abroad"] == 1) {
-                $data["abroad_school"] = $param["abroad_school"];
-                $data["abroad_major"] = $param["abroad_major"];
-            } else {
-                $data["abroad_school"] = null;
-                $data["abroad_major"] = null;
+            $insertDetailList = [];
+            $tmp_item_ids = [];
+            $data["batch_id"] = $batch["id"];
+            $projectTypes = $param["projectType"];
+            $projectIds = $param["projectId"];
+            $item_ids = $param["item_id"];
+            $amounts = $param["amount"];
+
+            $detailCounts = count($item_ids);
+            for ($i = 0; $i < $detailCounts; $i++) {
+                if (!in_array($item_ids[$i], $tmp_item_ids)) {
+                    $tmp_item_ids[] = $item_ids[$i];
+                }
+                if (!is_numeric($amounts[$i]) || $amounts[$i] < 0) {
+                    throw new ValidateException(sprintf("第%d个积分标准项的数额填写错误,应填入大于0的数字", $i + 1));
+                }
+                $insertDetailList[] = [
+                    "id" => getStringId(),
+                    "record_id" => "",
+                    "item_id" => "",
+                    "amount" => "",
+                    "unit" => "",
+                    "file_id"
+                ];
             }
-            switch ($data["source"]) {
-                case 1:
-                    $data["source_batch"] = $param["source_batch"];
-                    $data["fujian_highcert_pubtime"] = $param["fujian_highcert_pubtime"];
-                    $data["fujian_highcert_exptime"] = $param["fujian_highcert_exptime"];
-                    $data["source_city"] = null;
-                    break;
-                case 2:
-                    $data["source_batch"] = $param["source_batch"];
-                    $data["quanzhou_highcert_pubtime"] = $param["quanzhou_highcert_pubtime"];
-                    $data["quanzhou_highcert_exptime"] = $param["quanzhou_highcert_exptime"];
-                    $data["source_county"] = null;
-                    break;
-                case 3:
-                    $data["source_batch"] = $param["source_batch"];
-                    $data["fujian_highcert_pubtime"] = $param["fujian_highcert_pubtime"];
-                    $data["fujian_highcert_exptime"] = $param["fujian_highcert_exptime"];
-                    $data["source_city"] = $param["source_city"];
-                    break;
-                case 4:
-                    $data["source_batch"] = $param["source_batch"];
-                    $data["quanzhou_highcert_pubtime"] = $param["quanzhou_highcert_pubtime"];
-                    $data["quanzhou_highcert_exptime"] = $param["quanzhou_highcert_exptime"];
-                    $data["source_county"] = $param["source_county"];
-                    break;
+            if (count($tmp_item_ids) != $detailCounts) {
+                throw new ValidateException("同一个申报中,同一个积分标准不能申报多次");
             }
 
-            $condition_info = Db::table("new_talent_condition")->findOrEmpty($param["talent_condition"]);
-            if ($condition_info["isSalary"] == 1) {
-                $data["annual_salary"] = $param["annual_salary"];
-            } else {
-                $data["annual_salary"] = null;
-            }
-            if ($info["real_state"] == TalentState::FST_VERIFY_REJECT) {
-                //真实状态11是驳回,需要判断什么字段可以提交                
+            if ($info["real_state"] == IntegralState::VERIFY_REJECT) {
+                //真实状态是驳回,需要判断什么字段可以提交                
                 $modify_fields = array_filter(explode(",", $info["modify_fields"]));
                 $tmp_data = $data;
                 $data = [];
                 foreach ($modify_fields as $field) {
                     $data[$field] = $tmp_data[$field];
                 }
+                $tmp_item_ids = [];
+                if ($info["modify_files"]) {
+                    
+                }
             }
             $data["checkState"] = $checkState;
             $data["id"] = $id;
             $success_msg = "提交成功";
             $error_msg = "提交失败";
-            if ($checkState == TalentState::SCND_SAVE) {
+            if ($checkState == IntegralState::SAVE) {
                 $success_msg = "保存成功";
                 if ($data["id"]) {
                     //编辑
-                    TalentModel::update($data);
-                    $last_log = TalentLogApi::getLastLog($data["id"], 1);
-                    if ($last_log["new_state"] != TalentState::SCND_SAVE) {
+                    $data["updateTime"] = date("Y-m-d H:i:s");
+                    \app\common\model\IntegralRecord::update($data);
+                    $last_log = TalentLogApi::getLastLog($data["id"], ProjectState::INTEGRAL);
+                    if ($last_log["new_state"] != IntegralState::SAVE) {
                         TalentLogApi::write(1, $data["id"], $checkState, "保存未提交", 1);
                     } else {
                         TalentLogApi::setActive($last_log["id"], 1); //更新修改时间
                     }
                 } else {
                     //新增
+                    $data["id"] = getStringId();
                     $data["enterprise_id"] = $this->user["uid"];
-                    $id = TalentModel::insertGetId($data);
-                    TalentLogApi::write(1, $id, $checkState, "保存未提交", 1);
+                    $data["createTime"] = date("Y-m-d H:i:s");
+                    \app\common\model\IntegralRecord::insert($data);
+                    TalentLogApi::write(ProjectState::INTEGRAL, $data["id"], $checkState, "保存未提交", 1);
                     $whr = [];
                     $whr[] = ["fileId", "in", $files];
-                    $upd_checklog["mainId"] = $id;
+                    $upd_checklog["mainId"] = $data["id"];
                     Db::table("new_talent_checklog")->where($whr)->save($upd_checklog);
                 }
-            } else if ($checkState == TalentState::SCND_SUBMIT) {
+            } else if ($checkState == IntegralState::SUBMIT) {
                 if (!$info["first_submit_time"]) {
                     $data["first_submit_time"] = date("Y-m-d H:i:s");
                 } else {
                     $data["new_submit_time"] = date("Y-m-d H:i:s");
                 }
                 if ($data["id"]) {
-                    TalentModel::update($data);
+                    $data["updateTime"] = date("Y-m-d H:i:s");
+                    \app\common\model\IntegralRecord::update($data);
                 } else {
                     //新增
+                    $data["id"] = getStringId();
                     $data["enterprise_id"] = $this->user["uid"];
-                    $id = TalentModel::insertGetId($data);
+                    $data["createTime"] = date("Y-m-d H:i:s");
+                    \app\common\model\IntegralRecord::insert($data);
                     $whr = [];
                     $whr[] = ["fileId", "in", $files];
-                    $upd_checklog["mainId"] = $id;
+                    $upd_checklog["mainId"] = $data["id"];
                     Db::table("new_talent_checklog")->where($whr)->save($upd_checklog);
                 }
-                TalentLogApi::write(1, $id, $checkState, "确认提交审核", 1);
+                TalentLogApi::write(ProjectState::INTEGRAL, $data["id"], $checkState, "确认提交审核", 1);
             } else {
                 throw new ValidateException($error_msg);
             }
 
-            if ($id) {
-                if ($deletes) {
-                    //删除多余的附件,一般是选择人才类型留下来的
+            if ($data["id"]) {
+                //删除多余的附件,一般是选择人才类型留下来的
+                $whr = [];
+                $whr[] = ["mainId", "=", $data["id"]];
+                $whr[] = ["type", "=", ProjectState::INTEGRAL];
+                $whr[] = ["id", "not in", $files];
+                $_wait_del_files = Db::table("new_talent_file")->where($whr)->select()->toArray();
+                $_logfileIds[] = [];
+                foreach ($_wait_del_files as $_del_file) {
+                    $_logfileIds[] = $_del_file["id"];
+                    @unlink("storage/" . $_del_file ["url"]);
+                }
+                Db::table("new_talent_file")->where($whr)->delete();
+                if ($_logfileIds) {
                     $whr = [];
-                    $whr[] = ["typeId", "in", $deletes];
-                    $whr[] = ["id", "in", $files];
-                    $_wait_del_files = Db::table("new_talent_file")->where($whr)->select()->toArray();
-                    $_logfileIds[] = [];
-                    foreach ($_wait_del_files as $_del_file) {
-                        $_logfileIds[] = $_del_file["id"];
-                        @unlink("storage/" . $_del_file["url"]);
-                    }
-                    Db::table("new_talent_file")->where($whr)->delete();
-                    if ($_logfileIds) {
-                        $whr = [];
-                        $whr[] = ["fileId", "in", $_logfileIds];
-                        $_upd_checklog["description"] = "删除附件";
-                        $_upd_checklog["updateUser"] = sprintf("%s(%s)", $this->user["account"], $this->user["companyName"] ?: $this->user["rolename"]);
-                        $_upd_checklog["updateTime"] = date("Y-m-d H:i:s");
-                        Db::table("new_talent_checklog")->where($whr)->save($_upd_checklog);
-                    }
+                    $whr[] = ["fileId", "in", $_logfileIds];
+                    $_upd_checklog["description"] = "删除附件";
+                    $_upd_checklog["updateUser"] = sprintf("%s(%s)", $this->user["account"], $this->user["companyName"] ?: $this->user["rolename"]);
+                    $_upd_checklog["updateTime"] = date("Y-m-d H:i:s");
+                    Db::table("new_talent_checklog")->where($whr)->save($_upd_checklog);
                 }
 
                 $whr = [];
                 $whr[] = ["id", "in", $files];
-                Db::table("new_talent_file")->where($whr)->save(["mainId" => $id]);
-                $res = ["code" => 200, "msg" => $success_msg, "obj" => ["id" => $id, "checkState" => $checkState]];
-                $callback = $checkState == TalentState::SCND_SAVE ? "infoCallback" : "submitCallback";
-                echo sprintf("<script>parent.TalentInfoInfoDlg.{$callback}(%s);</script>", json_encode($res));
+                Db::table("new_talent_file")->where($whr)->save(["mainId" => $data["id"]]);
+                $res = ["code" => 200, "msg" => $success_msg, "obj" => ["id" => $data["id"], "checkState" => $checkState]];
+                $callback = $checkState == IntegralState::SAVE ? "infoCallback" : "submitCallback";
+                echo sprintf("<script>parent.IntegralInfoDlg.{$callback}(%s);</script>", json_encode($res));
                 exit();
             } else {
                 throw new ValidateException($error_msg);
             }
         } catch (ValidateException $e) {
             $res = ["msg" => $e->getMessage()];
-            $callback = $checkState == TalentState::SCND_SAVE ? "infoCallback" : "submitCallback";
-            echo sprintf("<script>parent.TalentInfoInfoDlg.{$callback}(%s);</script>", json_encode($res));
+            $callback = $checkState == IntegralState::SAVE ? "infoCallback" : "submitCallback";
+            echo sprintf("<script>parent.IntegralInfoDlg.{$callback}(%s);</script>", json_encode($res));
             exit();
         }
     }
 
     public function delete() {
-        $id = $this->request->param("talentInfoId");
-        $info = Talent::chkIsOwner($id, $this->user["uid"]);
+        $id = $this->request->param("id");
+        $info = IntegralRecordApi::chkIsOwner($id, $this->user["uid"]);
         if (!$info) {
             return json(["msg" => "操作失败"]);
         }
         $checkState = $info["checkState"];
         if (in_array($checkState, [0, 1])) {
-            $log = TalentLogApi::getLastLog($id, 1);
+            $log = TalentLogApi::getLastLog($id, ProjectState::INTEGRAL);
             if ($log["state"] > 1) {
                 //有提交审核记录
                 return json(["msg" => "该申报已提交审核,无法删除"]);
@@ -502,7 +407,7 @@ class Integral extends EnterpriseController {
         }
         $data["id"] = $id;
         $data["delete"] = 1;
-        TalentModel::update($data);
+        \app\common\model\IntegralRecord::update($data);
         return json(["msg" => "删除成功"]);
     }
 

+ 46 - 0
app/enterprise/validate/IntegralValidator.php

@@ -0,0 +1,46 @@
+<?php
+
+namespace app\enterprise\validate;
+
+use think\Validate;
+
+/**
+ * Description of IntegralValidator
+ * @author sgq
+ */
+class IntegralValidator extends Validate {
+
+    protected $rule = [
+        "name" => "regex:/^[\x{4e00}-\x{9fa5}]+$/u",
+        "card_type" => "between:1,3",
+        "card_number" => "checkCardNumber",
+        "phone" => "mobile",
+        "email" => "email"
+    ];
+    protected $message = [
+        "name.regex" => "姓名只能是中文",
+        "card_type.between" => "不存在的证件类型,请在列表中选择",
+        "phone.mobile" => "请填写正确的手机号",
+        "email.email" => "电子邮箱格式错误"
+    ];
+
+    protected function checkCardNumber($value, $rule, $data = []) {
+        if (!$data["card_type"]) {
+            return "填写证件号码前请先选择证件类型";
+        }
+        if ($data["card_type"] == 1) {
+            $num = strlen($value);
+            switch ($num) {
+                case 15:
+                case 18:
+                    return \app\common\api\IdCardApi::isValid($value) ?: "身份证号码不合法";
+                    break;
+                default:
+                    //return \app\common\api\IdCardApi::isValidExceptMainland($value) ?: "身份证号码不合法";
+                    break;
+            }
+        }
+        return "身份证号码不合法";
+    }
+
+}

+ 22 - 0
app/enterprise/view/api/to_add.html

@@ -127,6 +127,28 @@
                                     <input style="display: none" autocomplete="off" type="file" class="form-control" id="bankImg" name="bankImg" />
                                 </td>
                             </tr>
+                            {eq name="ecr.special" value="3"}
+                            <tr>
+                                <td colspan="4">
+                                    <div class="rowGroup">
+                                        <label class="control-label spacing td-label"><span style="color: red">*</span>机构标签</label>
+                                        <select class="form-control" id="newOrganizationTag" name="newOrganizationTag" value="{$ecr.newOrganizationTag}">
+                                        </select>
+                                    </div>
+                                </td>
+                            </tr>
+                            {/eq}
+                            {eq name="ecr.special" value="1"}
+                            <tr>
+                                <td colspan="4">
+                                    <div class="rowGroup">
+                                        <label class="control-label spacing td-label"><span style="color: red">*</span>单位标签</label>
+                                        <select class="form-control" id="newInstitutionTag" name="newInstitutionTag" value="{$ecr.newInstitutionTag}">
+                                        </select>
+                                    </div>
+                                </td>
+                            </tr>
+                            {/eq}
                         </table>
                         {if condition="$ecr['special'] eq 0"}
                         <div class="row">

+ 13 - 1
app/enterprise/view/api/to_detail.html

@@ -182,7 +182,19 @@
                             <td class="key">
                                 {eq name="ecr.special" value="0"}企业{else/}单位{/eq}开户银行网点
                             </td>
-                            <td class="value1 word-wrap" colspan="3" data-old='{$ecr.oldBankNetwork}' data-new='{$ecr.newBankNetwork}'></td>
+                            <td class="value1 word-wrap" data-old='{$ecr.oldBankNetwork}' data-new='{$ecr.newBankNetwork}'></td>
+                            {eq name="ecr.special" value="3"}
+                            <td class="key">
+                                机构标签
+                            </td>
+                            <td class="value1 word-wrap" data-old='{$ecr.oldOrganizationTagName}' data-new='{$ecr.newOrganizationTagName}'></td>
+                            {/eq}
+                            {eq name="ecr.special" value="1"}
+                            <td class="key">
+                                单位标签
+                            </td>
+                            <td class="value1 word-wrap" data-old='{$ecr.oldInstitutionTagName}' data-new='{$ecr.newInstitutionTagName}'></td>
+                            {/eq}
                         </tr>
                     </table>
                     {if condition="$ecr['special'] == 0"}

+ 22 - 0
app/enterprise/view/api/to_update.html

@@ -130,6 +130,28 @@
                                     <input style="display: none" autocomplete="off" type="file" class="form-control" id="bankImg" name="bankImg" />
                                 </td>
                             </tr>
+                            {eq name="ecr.special" value="3"}
+                            <tr>
+                                <td colspan="4">
+                                    <div class="rowGroup">
+                                        <label class="control-label spacing td-label"><span style="color: red">*</span>机构标签</label>
+                                        <select class="form-control" id="newOrganizationTag" name="newOrganizationTag" value="{$ecr.newOrganizationTag}">
+                                        </select>
+                                    </div>
+                                </td>
+                            </tr>
+                            {/eq}
+                            {eq name="ecr.special" value="1"}
+                            <tr>
+                                <td colspan="4">
+                                    <div class="rowGroup">
+                                        <label class="control-label spacing td-label"><span style="color: red">*</span>单位标签</label>
+                                        <select class="form-control" id="newInstitutionTag" name="newInstitutionTag" value="{$ecr.newInstitutionTag}">
+                                        </select>
+                                    </div>
+                                </td>
+                            </tr>
+                            {/eq}
                         </table>
                         {if condition="$ecr['special'] eq 0"}
                         <div class="row">

+ 9 - 1
app/enterprise/view/index/center_page.html

@@ -137,9 +137,17 @@
                                                     <td class="key">
                                                         {eq name="ep.special" value="0"}企业{else/}单位{/eq}开户银行网点
                                                     </td>
-                                                    <td colspan="3">
+                                                    <td>
                                                         {$ep.bankNetwork}
                                                     </td>
+                                                    {eq name="ep.special" value="3"}
+                                                    <td class="key">机构标签</td>                                                            
+                                                    <td>{$ep.organizationTagName}</td>
+                                                    {/eq}
+                                                    {eq name="ep.special" value="1"}
+                                                    <td class="key">单位标签</td>                                                            
+                                                    <td>{$ep.institutionTagName}</td>
+                                                {/eq}
                                                 </tr>
                                             </table>
                                             {eq name="ep.special" value="0"}

+ 142 - 466
app/enterprise/view/integral/apply.html

@@ -11,7 +11,7 @@
         padding-right:4px;
         padding-left: 4px;
     }
-    #talentInfoForm label {
+    #integralInfoForm label {
         font-size: xx-small;
     }
     .has-feedback .form-control {
@@ -62,7 +62,9 @@
         text-align:center;
         border-left:1px solid #ddd;
     }
-    #annual_salary{padding-right:32px;}
+    .has-feedback label~.form-control-feedback{
+        top: 31px;
+    }
 </style>
 <div class="ibox float-e-margins">
     <div class="ibox-content">
@@ -72,16 +74,14 @@
                     <div class="tab-content">
                         <div id="tab-1" class="tab-pane active">
                             <form id="integralInfoForm" action="/enterprise/integral/apply" method="post" enctype="multipart/form-data" target="hiddenIframe">
-                                <input type="hidden" name="id" id="id" value="{$row.id}">
-                                <input type="hidden" name="year" id="year" value="{$year}">
-                                <input type="hidden" name="enterprise_id" id="enterpriseId" value="{$row.enterprise.id}">
-                                <input type="hidden" name="enterprise_type" id="type" value="{$row.enterprise.type}">
-                                <input type="hidden" name="enterprise_tag" id="enterprise_tag" value="{$row.enterprise.enterpriseTag}">
-                                <input type="file" name="photo" id="photo" style="display: none">
-                                <input type="hidden" name="checkState" id="checkState" value="{$row.checkState}">
-                                <input type="hidden" name="realState" id="realState" value="{$row.real_state}">
-                                <input type="hidden" name="files" id="files" value="{$row.modify_files}">
-                                <input type="hidden" name="fields" id="fields" value="{$row.modify_fields}">
+                                <input type="hidden" name="id" id="id" value="{$row.id}"/>
+                                <input type="hidden" name="year" id="year" value="{$year}"/>
+                                <input type="hidden" name="enterprise_id" id="enterpriseId" value="{$row.enterprise.id}"/>
+                                <input type="hidden" name="enterprise_type" id="type" value="{$row.enterprise.type}"/>
+                                <input type="hidden" name="checkState" id="checkState" value="{$row.checkState}"/>
+                                <input type="hidden" name="realState" id="realState" value="{$row.real_state}"/>
+                                <input type="hidden" name="files" id="files" value="{$row.modify_files}"/>
+                                <input type="hidden" name="fields" id="fields" value="{$row.modify_fields}"/>
                                 <div class="panel panel-default">
                                     <div class="panel-heading" onclick="$(this).next().toggle()">基础信息</div>
                                     <div class="panel-body">
@@ -93,24 +93,6 @@
                                                         <input type="text" class="form-control" id="name" name="name" value="{$row.name}"/>
                                                     </div>
                                                 </td>
-                                                <td>
-                                                    <div class="rowGroup">
-                                                        <label class="control-label spacing td-label"><span style="color: red">*</span>民族</label>
-                                                        <select class="form-control" id="nation" name="nation" value='{$row.nation}'>
-                                                        </select>
-                                                    </div>
-                                                </td>
-                                                <td rowspan="5" style="width: 200%">
-                                                    <p style="text-align: center;color: red">
-                                                        请上传近期免冠半身彩照(两寸)
-                                                    </p>
-                                                    <img id="photoImg" {if condition="$row['headimgurl']"} src="{$row.headimgurl|getStoragePath}" {else/} src="/static/img/photo.png" {/if} onclick="$('#photo').click();" style="height:147px;width:105px;margin:0 auto;display:block;">
-                                                         <hr />
-                                                    附件:
-                                                    <table class="fileTable"></table>
-                                                </td>
-                                            </tr>
-                                            <tr>
                                                 <td>
                                                     <div class="rowGroup">
                                                         <label class=" control-label spacing td-label"><span style="color: red">*</span>证件类型</label>
@@ -128,484 +110,178 @@
                                                         <input class="form-control" id="card_number" name="card_number" value="{$row.card_number}">
                                                     </div>
                                                 </td>
+                                                <td>
+                                                    <div class="rowGroup">
+                                                        <label class="control-label spacing td-label"><span style="color: red">*</span>手机号码</label>
+                                                        <input type="text" class="form-control" id="phone" name="phone" maxlength="11" value="{$row.phone}"/>
+                                                    </div>
+                                                </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="sex" name="sex" value='{$row.sex}'>
-                                                            <option value="">请选择</option>
-                                                            <option value="1">男</option>
-                                                            <option value="2">女</option>
-                                                        </select>
+                                                        <label class="control-label spacing td-label"><span style="color: red">*</span>电子邮箱</label>
+                                                        <input type="text" class="form-control" id="email" name="email"  value="{$row.email}"/>
                                                     </div>
                                                 </td>
                                                 <td>
                                                     <div class="rowGroup">
-                                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>出生日期</label>
-                                                        <input type="text" class="form-control date" id="birthday" name="birthday" value="{$row.birthday}"/>
+                                                        <label class="control-label spacing td-label"><span style="color: red">*</span>单位标签</label>
+                                                        <div class="form-control" style="border: none">{$row.enterprise.enterpristTagName}</div>
+                                                    </div>
+                                                </td>
+                                                <td>
+                                                    <div class="rowGroup">
+                                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>单位名称</label>
+                                                        <div class="form-control" style="border: none">{$row.enterprise.name}</div>
+                                                    </div>
+                                                </td>
+                                                <td>
+                                                    <div class="rowGroup">
+                                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>所属街道</label>
+                                                        <div class="form-control" style="border: none">{$row.enterprise.streetName}</div>
                                                     </div>
                                                 </td>
                                             </tr>
+                                        </table>
+                                    </div>
+                                </div>
+                                <div class="panel panel-default">
+                                    <div class="panel-heading" onclick="$(this).next().toggle()">申报项目</div>
+                                    <div class="panel-body" id="itemList">
+                                        {if condition="$row['detail']"}                                        
+                                        {volist name="row.detail" id="item"}                                 
+                                        <table style="width:100%;border-collapse: collapse;" class="table table-bordered">
                                             <tr>
+                                                <td style="width:40px;">
+                                                    <div class="rowGroup">
+                                                        <label class=" control-label spacing td-label">选择</label>
+                                                        <input type="checkbox" name="chk[]" class="form-control"/>
+                                                    </div>
+                                                </td>
                                                 <td>
                                                     <div class="rowGroup">
-                                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>政治面貌</label>
-                                                        <select class="form-control" id="politics" name="politics" value='{$row.politics}'>
+                                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>项目类别</label>
+                                                        <select class="form-control" name="projectType[]" value="{$item.projectType}" onchange="IntegralInfoDlg.onProjectTypeChange(this);">
+                                                            <option value="">请选择</option>
+                                                            <option value="1">基础分</option>
+                                                            <option value="2">贡献分</option>
+                                                            <option value="3">资历分</option>
                                                         </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="nationality" name="nationality" value="{$row.nationality}">
+                                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>积分项目</label>
+                                                        <select class="form-control" name="projectId[]" value="{$item.projectId}" onchange="IntegralInfoDlg.onProjectChange(this);">
+                                                            <option value="">请选择</option>
                                                         </select>
                                                     </div>
                                                 </td>
+                                                <td>
+                                                    <div class="rowGroup">
+                                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>积分标准</label>
+                                                        <select class="form-control" name="item_id[]" value="{$item.item_id}" onchange="IntegralInfoDlg.onItemChange(this);">
+                                                            <option value="">请选择</option>
+                                                        </select>
+                                                    </div>
+                                                </td>
+                                                <td>
+                                                    <div class="rowGroup">
+                                                        <label class="control-label spacing td-label"><span style="color: red">*</span>数额<span class="unit"></span></label>
+                                                        <input type="text" class="form-control" name="amount[]" value="{$item.amount}"/>
+                                                    </div>
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <td colspan="5">
+                                                    <table class="fileTable"></table>
+                                                </td>
                                             </tr>
+                                        </table>
+                                        {/volist}
+                                        {else/}                                        
+                                        <table style="width:100%;border-collapse: collapse;" class="table table-bordered">
                                             <tr>
-                                                <td colspan="2">
-                                                    <div class="rowGroup col-sm-4">
-                                                        <label class="control-label spacing td-label"><span style="color: red">*</span>籍贯省</label>
-                                                        <select class="form-control " onchange="TalentInfoInfoDlg.afterSelectProvince()" id="province" name="province" value='{$row.province}'>
+                                                <td style="width:40px;">
+                                                    <div class="rowGroup">
+                                                        <label class=" control-label spacing td-label">选择</label>
+                                                        <input type="checkbox" name="chk[]" class="form-control"/>
+                                                    </div>
+                                                </td>
+                                                <td>
+                                                    <div class="rowGroup">
+                                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>项目类别</label>
+                                                        <select class="form-control" name="projectType[]" value="{$row.projectType}" onchange="IntegralInfoDlg.onProjectTypeChange(this);">
+                                                            <option value="">请选择</option>
+                                                            <option value="1">基础分</option>
+                                                            <option value="2">贡献分</option>
+                                                            <option value="3">资历分</option>
                                                         </select>
                                                     </div>
-                                                    <div class="rowGroup col-sm-4">
-                                                        <label class="control-label spacing td-label"><span style="color: red">*</span>籍贯市</label>
-                                                        <select class="form-control" onchange="TalentInfoInfoDlg.afterSelectCity()" id="city" name="city" value='{$row.city}'>                                                            
+                                                </td>
+                                                <td>
+                                                    <div class="rowGroup">
+                                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>积分项目</label>
+                                                        <select class="form-control" name="projectId[]" value="{$row.projectId}" onchange="IntegralInfoDlg.onProjectChange(this);">
+                                                            <option value="">请选择</option>
                                                         </select>
                                                     </div>
-                                                    <div class="rowGroup col-sm-4">
-                                                        <label class="control-label spacing td-label"><span style="color: red">*</span>籍贯县(区)</label>
-                                                        <select class="form-control" id="county" name="county" value='{$row.county}'>                                                            
+                                                </td>
+                                                <td>
+                                                    <div class="rowGroup">
+                                                        <label class=" control-label spacing td-label"><span style="color: red">*</span>积分标准</label>
+                                                        <select class="form-control" name="item_id[]" value="{$row.item_id}" onchange="IntegralInfoDlg.onItemChange(this);">
+                                                            <option value="">请选择</option>
                                                         </select>
                                                     </div>
                                                 </td>
+                                                <td>
+                                                    <div class="rowGroup">
+                                                        <label class="control-label spacing td-label"><span style="color: red">*</span>数额<span class="unit"></span></label>
+                                                        <input type="text" class="form-control" name="amount[]" value="{$row.amount}"/>
+                                                    </div>
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <td colspan="5">
+                                                    <table class="fileTable"></table>
+                                                </td>
                                             </tr>
                                         </table>
+                                        {/if}
+                                        <div id="toolbar" style="text-align:center;">
+                                            <button type="button" class="btn btn-sm btn-info " onclick="IntegralInfoDlg.addItem()" id="">
+                                                <i class="fa fa-plus"></i>&nbsp;增加项目
+                                            </button>
+                                            <button type="button" class="btn btn-sm btn-warning " onclick="IntegralInfoDlg.deleteItem()" id="">
+                                                <i class="fa fa-remove"></i>&nbsp;移除项目
+                                            </button>
+                                        </div>
                                     </div>
                                 </div>
-                        <div class="panel panel-default">
-                            <div class="panel-heading" onclick="$(this).next().toggle()">人才基础信息</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>
-                                                <div class="form-control" style="border: none">{$row.enterprise.enterpristTagName}</div>
-                                            </div>
-                                        </td>
-                                        <td>
-                                            <div class="rowGroup">
-                                                <label class=" control-label spacing td-label"><span style="color: red">*</span>单位名称</label>
-                                                <div class="form-control" style="border: none">{$row.enterprise.name}</div>
-                                            </div>
-                                        </td>
-                                        <td>
-                                            <div class="rowGroup">
-                                                <label class=" control-label spacing td-label"><span style="color: red">*</span>所属街道</label>
-                                                <div class="form-control" style="border: none">{$row.enterprise.streetName}</div>
-                                            </div>
-                                        </td>
-                                        <td>
-                                            <div class="rowGroup">
-                                                <label class=" control-label spacing td-label"><span style="color: red">*</span>产业领域</label>
-                                                <div class="form-control" style="border: none">{$row.enterprise.industryFieldNewName}</div>
-                                            </div>
-                                        </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="talent_type" name="talent_type" value="{$row.talent_type}" onchange="TalentInfoInfoDlg.talentTypeChange()" data-value="{$row.talent_type}">
-                                                    <option value="">请选择</option>
-                                                    {volist name="row.talent_type_list" id="item"}
-                                                    <option value="{$item.code}">{$item.name}</option>
-                                                    {/volist}
-                                                </select>
-                                            </div>
-                                        </td>
-                                        <td>
-                                            <label class=" control-label spacing td-label">人才类型说明</label>
-                                            <div class="word-wrap" id="typeTips">
-
-                                            </div>
-                                        </td>
-                                        <td rowspan="3" colspan='2'>
-                                            <table class="fileTable">
-                                                <tr><td>载入附件</td></tr>
-                                            </table>
-                                        </td>
-                                    </tr>                                    
-                                    <tr class="talentType1-2" style="display: none">
-                                        <td >
-                                            <div class="rowGroup">
-                                                <label class=" control-label spacing td-label"><span style="color: red">*</span><span id="talentType_first" style="display: none">首次</span>在我市缴交社会保险或个人所得税月份</label>
-                                                <input type="text" class="form-control rangemonth" id="tax_insurance_month" name="tax_insurance_month" value="{$row.tax_insurance_month}"/>
-                                            </div>
-                                        </td>
-                                        <td>
-                                            <div class="rowGroup">
-                                                <label class=" control-label spacing td-label"><span style="color: red">*</span>劳动合同起止时间</label>
-                                                <input type="text" class="form-control rangedate" id="labor_contract_rangetime" name="labor_contract_rangetime" value="{$row.labor_contract_rangetime}" />
-                                            </div>
-                                        </td>
-                                    </tr>                                    
-                                    <tr class="talentType1-2" style="display: none">
-                                        <td >
-                                            <div class="rowGroup">
-                                                <label class=" control-label spacing td-label"><span style="color: red">*</span>工资发放渠道</label>
-                                                <input type="radio" name="salary_pay_way" value="1" {eq name="row.salary_pay_way" value="1"}checked{/eq}/>本单位&nbsp;&nbsp;
-                                                <input type="radio" name="salary_pay_way" value="2" {eq name="row.salary_pay_way" value="2"}checked{/eq}/>本单位所属集团公司及权属公司
-                                            </div>
-                                        </td>
-                                        <td>
-                                            <div class="rowGroup">
-                                                <label class=" control-label spacing td-label"><span style="color: red">*</span>工资发放月份</label>
-                                                <input type="text" class="form-control rangemonth" id="labor_contract_rangetime" name="salary_pay_month" value="{$row.salary_pay_month}" />
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr class="talentType3" style="display: none">
-                                        <td >
-                                            <div class="rowGroup">
-                                                预引进类型
-                                            </div>
-                                        </td>
-                                        <td >
-                                            <div class="rowGroup">
-                                                <input type="radio" name="pre_import_type" value="1" {eq name="row.pre_import_type" value="1"}checked{/eq}/><span style="color: red">*</span>意向合同&nbsp;&nbsp;&nbsp;&nbsp;
-                                                <input type="radio" name="pre_import_type" value="2" {eq name="row.pre_import_type" value="2"}checked{/eq}/><span style="color: red">*</span>创业企业名称预核准
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    {if condition="in_array($row['enterprise']['enterpriseTag'],['mtdw','gyqyh','mbfqy','jrjg'])"}
-                                    <tr style="display:none" id="come_in_jin">
-                                        <td>
-                                            <div class="rowGroup">
-                                                <label class="control-label spacing td-label">{if condition="$row['talent_type'] eq 1"}近三年{else/}首次{/if}来晋工作时间</label>
-                                                <input type="text" class="form-control date" id="fst_work_time" name="fst_work_time" value="{$row.fst_work_time}"/>
-                                            </div>
-                                        </td>
-                                        <td id="come_in_jin_str">
-                                            <label class=" control-label spacing td-label">近三年来晋工作时间说明</label>
-                                            <div class="word-wrap">
-                                                如您为近三年来晋工作的人才,须填写近三年来晋日期,同时上传对应佐证材料,如果来晋时间已超过三年,则此项不必填写。
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    {/if}
-                                </table>
-                            </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>
-                                                <textarea rows="5" class="form-control" id="experience" name="experience" style="border: none" placeholder="请严格按如下格式填写:
-2000.07-2005.03 xxxx有限公司 (私营企业) 总务科 后勤
-2005.03-2010.09 xx市xx单位 (事业单位) 非编 经办
-2010.09-2013.08 待业
-2013.08-至今 xx省xx单位 (参公事业单位) 在编 科员">{$row.experience}</textarea>
-                                            </div>
-                                        </td>
-                                        <td>
-                                            <div class="rowGroup">
-                                                <label class=" control-label spacing td-label"><span style="color: red">*</span>教育背景</label>
-                                                <textarea rows="5" class="form-control" id="education" name="education" style="border: none" placeholder="请严格按如下格式填写:
-1993.09-1996.07 xx市xx中学 (高中) 学生
-1996.09-2000.07 xxxxx大学 (本科) xxxx专业 学生">{$row.education}</textarea>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                </table>
-                            </div>
-                        </div>
-                        <div class="panel panel-default">
-                            <div class="panel-heading" onclick="$(this).next().toggle()">人才认定申请</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 type="text" class="form-control" name="apply_year" id="apply_year" value="{$year}" readonly disabled>
-                                            </div>
-                                        </td>
-                                        <td>
-                                            <div class="rowGroup">
-                                                <label class="control-label spacing td-label"><span style="color: red">*</span>手机号码</label>
-                                                <input type="text" class="form-control" id="phone" name="phone" maxlength="11" value="{$row.phone}"/>
-                                            </div>
-                                        </td>
-                                        <td>
-                                            <div class="rowGroup">
-                                                <label class="control-label spacing td-label"><span style="color: red">*</span>电子邮箱</label>
-                                                <input type="text" class="form-control" id="email" name="email"  value="{$row.email}"/>
-                                            </div>
-                                        </td>
-                                        <td rowspan="3" style="width: 300%">
-                                            <table class="fileTable"></table>
-                                        </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="highest_degree" name="highest_degree" value="{$row.highest_degree}"></select>
-                                            </div>
-                                        </td>
-                                        <td>
-                                            <div class="rowGroup">
-                                                <label class="control-label spacing td-label"><span style="color: red">*</span>毕业院校</label>
-                                                <input type="text" class="form-control" id="graduate_school" name="graduate_school" value="{$row.graduate_school}">
-                                            </div>
-                                        </td>
-                                        <td>
-                                            <div class="rowGroup">
-                                                <label class="control-label spacing td-label"><span style="color: red">*</span>专业</label>
-                                                <input type="text" class="form-control" id="major" name="major" value="{$row.major}"/>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                </table>
-                                <table style="width: 100%;border-collapse: collapse;border:1px solid #ddd;border-left:none;border-right:none;" class="table table-bordered">                                    
-                                    <tr>
-                                        <td>
-                                            <div class="rowGroup">
-                                                <label class="control-label spacing td-label">是否有留学经历</label>
-                                                <select class="form-control" id="study_abroad" name="study_abroad" onchange="TalentInfoInfoDlg.changeStudyAbroad()" autocomplete='off' value="{$row.study_abroad}">
-                                                    <option value="2">否</option>
-                                                    <option value="1">是</option>
-                                                </select>
-                                            </div>
-                                        </td>
-                                        <td>
-                                            <div class="rowGroup abroad_need_this" {if condition='!$row["study_abroad"] or $row["study_abroad"] eq 2'}style="display:none;"{/if}>
-                                                <label class="control-label spacing td-label"><span style="color: red">*</span>留学毕业院校</label>
-                                                <input type="text" class="form-control" id="abroad_school" name="abroad_school" value="{$row.abroad_school}"/>
-                                            </div>
-                                        </td>
-                                        <td>
-                                            <div class="rowGroup abroad_need_this" {if condition='!$row["study_abroad"] or $row["study_abroad"] eq 2'}style="display:none;"{/if}>
-                                                <label class="control-label spacing td-label"><span style="color: red">*</span>留学专业</label>
-                                                <input type="text" class="form-control" id="abroad_major" name="abroad_major" value="{$row.abroad_major}"/>
-                                            </div>
-                                        </td>
-                                        <td rowspan="3" style="width: 300%">
-                                            <table class="fileTable"></table>
-                                        </td>
-                                    </tr>
-                                </table>
-                                <table style="width: 100%;border-collapse: collapse;" class="table table-bordered">
-                                    <tr>
-                                        <td>
-                                            <div class="rowGroup">
-                                                <label class=" control-label spacing td-label"><span style="color: red">*</span>引进方式</label>
-                                                <select class="form-control" id="import_way" name="import_way" data-placeholder="引进方式" value="{$row.import_way}">
-                                                </select>
-                                            </div>
-                                        </td>
-                                        <td>
-                                            <div class="rowGroup">
-                                                <label class="control-label spacing td-label"><span style="color: red">*</span>本单位入职时间</label>
-                                                <input type="text" class="form-control date" id="cur_entry_time" name="cur_entry_time" value="{$row.cur_entry_time}"/>
-                                            </div>
-                                        </td>
-                                        <td>
-                                            <div class="rowGroup">
-                                                <label class="control-label spacing td-label"><span style="color: red">*</span>本单位现任职务</label>
-                                                <input type="text" class="form-control" id="position" name="position" value="{$row.position}"/>
-                                            </div>
-                                        </td>
-                                        <td rowspan="3" style="width: 300%">
-                                            <table class="fileTable"></table>
-                                        </td>
-                                    </tr>
-                                </table>
-                                <table style="width: 100%;border-collapse: collapse;" class="table table-bordered">
-                                    <tr>
-                                        <td>
-                                            <div class="rowGroup">
-                                                <label class="control-label spacing">职称技术资格</label>
-                                                <input type="text" class="form-control" id="pro_qua" name="pro_qua" value="{$row.pro_qua}"/>
-                                            </div>
-                                        </td>
-                                        <td rowspan="3" style="width: 100%">
-                                            <table class="fileTable"></table>
-                                        </td>
-                                    </tr>
-                                </table>
-                                <table style="width: 100%;border-collapse: collapse;" class="table table-bordered">
-                                    <tr>
-                                        <td>
-                                            <div class="rowGroup">
-                                                <label class="control-label spacing">专业技术职称</label>
-                                                <input type="text" class="form-control" id="professional" name="professional" value="{$row.professional}"/>
-                                            </div>
-                                        </td>
-                                        <td rowspan="3" style="width: 100%">
-                                            <table class="fileTable"></table>
-                                        </td>
-                                    </tr>
-                                </table>
-
-                                <table style="width: 100%;border-collapse: collapse;" class="table table-bordered">
-                                    <tr>
-                                        <td colspan="3">
-                                            <div class="rowGroup">
-                                                <label class=" control-label spacing td-label"><span style="color: red">*</span>申报来源</label>
-                                                <select class="form-control" id="source" name="source" onchange="TalentInfoInfoDlg.sourceChange()" value="{$row.source}">
-                                                </select>
-                                            </div>
-                                        </td>
-                                        <td rowspan="7" style="width: 100%">
-                                            <table class="fileTable"></table>
-                                        </td>
-                                    </tr>
-                                    <tr>
-                                        <td colspan="3">
-                                            <div class="rowGroup" {if condition="!$row['source_batch']"}style="display:none;"{/if}>
-                                                <label class=" control-label spacing" ><span style="color: red">*</span>入选名单的文件号及批次</label>
-                                                <input type="text" class="form-control" id="source_batch" name="source_batch" value="{$row.source_batch}"/>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr>
-                                        <td colspan="3">
-                                            <div class="rowGroup col-sm-6" {if condition="!$row['source_city']"}style="display:none;"{/if}>
-                                                <label class="control-label spacing"><span style="color: red">*</span>入选来源地级市</label>
-                                                <select class="form-control" id="source_city" name="source_city" value="{$row['source_city']}">
-                                                    <option value="">{$row.sourceCityName}</option>
-                                                </select>
-                                             </div>
-                                            <div class="rowGroup col-sm-6" {if condition="!$row['source_county']"}style="display:none;"{/if}>
-                                                <label class="control-label spacing"><span style="color: red">*</span>入选来源县市区</label>
-                                                <select class="form-control" id="source_county" name="source_county" value="{$row['source_county']}">
-                                                    <option value="">{$row.sourceCountyName}</option>
-                                                </select>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr>
-                                        <td colspan="3">
-                                            <div class="rowGroup col-sm-6 fujian_highcert" style="display: none">
-                                                <label class=" control-label spacing" ><span style="color: red">*</span>福建省高层次人才证书发证日期</label>
-                                                <input type="text" class="form-control date" id="fujian_highcert_pubtime" name="fujian_highcert_pubtime" value="{$row.fujian_highcert_pubtime}"/>
-                                            </div>
-                                            <div class="rowGroup col-sm-6 fujian_highcert" style="display: none">
-                                                <label class=" control-label spacing" ><span style="color: red">*</span>福建省高层次人才证书有效期</label>
-                                                <input type="text" class="form-control date" id="fujian_highcert_exptime" name="fujian_highcert_exptime" value="{$row.fujian_highcert_exptime}"/>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr>
-                                        <td colspan="3">
-                                            <div class="rowGroup col-sm-6 quanzhou_highcert" style="display: none">
-                                                <label class=" control-label spacing" ><span style="color: red">*</span>泉州高层次人才证书发证日期</label>
-                                                <input type="text" class="form-control date" id="quanzhou_highcert_pubtime" name="quanzhou_highcert_pubtime" value="{$row.quanzhou_highcert_pubtime}"/>
-                                            </div>
-                                            <div class="rowGroup col-sm-6 quanzhou_highcert" style="display: none">
-                                                <label class=" control-label spacing" ><span style="color: red">*</span>泉州高层次人才证书有效期</label>
-                                                <input type="text" class="form-control date" id="quanzhou_highcert_exptime" name="quanzhou_highcert_exptime" value="{$row.quanzhou_highcert_exptime}"/>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr>
-                                        <td colspan="3">
-                                            <div class="rowGroup col-sm-6">
-                                                <label class="control-label spacing"><span style="color: red">*</span>人才层次</label>
-                                                <select class="form-control" id="talent_arrange" name="talent_arrange" onchange="TalentInfoInfoDlg.getLayerCatdByLayer()" value="{$row.talent_arrange}"></select>
-                                            </div>
-                                            <div class="rowGroup col-sm-6">
-                                                <label class="control-label spacing"><span style="color: red">*</span>人才条款</label>
-                                                <select class="form-control" id="talent_arrange_category" name="talent_arrange_category" onchange="TalentInfoInfoDlg.getIdentifyCondition()" value="{$row.talent_arrange_category}"></select>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr>
-                                        <td colspan="2" style="overflow: inherit">
-                                            <div class="rowGroup col-sm-9">
-                                                <label class="control-label spacing"><span style="color: red">*</span>认定条件</label>
-                                                <select class="chosen" id="talent_condition" name="talent_condition" onchange="TalentInfoInfoDlg.getIdentifyNeedsFileTypes()" value="{$row.talent_condition}" style="width: 80%"></select>
-                                            </div>
-                                        </td>
-                                        <td {if condition='!$row["annual_salary"]'}style="display:none;"{/if}>
-                                            <div class="rowGroup col-sm-12">
-                                                <label class="control-label spacing"><span style="color: red">*</span>上一年度年薪(元)</label>
-                                                <div style="position:relative;">
-                                                    <input type="text" class="form-control" id="annual_salary" name="annual_salary" value="{$row.annual_salary}"/>
-                                                    <i class="control-symbol">元</i>
-                                                </div>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                </table>
-                            </div>
+                            </form>
+                            <form id="uploadForm" action="/common/api/addTalentFile" method="post" class="form-horizontal" enctype="multipart/form-data" target="hiddenIframe" style="display: none">
+                                <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="fileTypeId" name="fileTypeId" />
+                                <input type='hidden' id="index" name="index" />
+                                <input type='hidden' id="tableIndex" name="tableIndex" />
+                                <input type='hidden' id="trIndex" name="trIndex" />
+                                <input type="hidden" name="backName" value="IntegralInfoDlg.callBack"/>
+                                <input type="type" name="type" value="20"/>
+                            </form>
+                            <div class="panel-heading" onclick="$(this).next().toggle()">日志</div>
+                            <table id="logTable">
+                            </table>
                         </div>
-                        <div class="panel panel-default">
-                            <div class="panel-heading" onclick="$(this).next().toggle()">个人开户银行信息</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"><span style="color: red">*</span>开户银行</label>
-                                                <input type="text" class="form-control" onchange="TalentInfoInfoDlg.bankChange()" id="bank" name="bank" placeholder="XX银行" value="{$row.bank}"/>
-                                            </div>
-                                        </td>
-                                        <td>
-                                            <div class="rowGroup">
-                                                <label class="control-label spacing"><span style="color: red">*</span>银行行号</label>
-                                                <input type="text" class="form-control" id="bank_number" name="bank_number" value="{$row.bank_number}"/>
-                                            </div>
-                                        </td>
-                                        <td rowspan="2" style="width: 200%">
-                                            <table class="fileTable"></table>
-                                        </td>
-                                    </tr>
-                                    <tr>
-                                        <td>
-                                            <div class="rowGroup">
-                                                <label class="control-label spacing"><span style="color: red">*</span>开户银行网点</label>
-                                                <input type="text" class="form-control" id="bank_branch_name" name="bank_branch_name" placeholder="XX银行XX省XX市XX支行/分行/分理处" value="{$row.bank_branch_name}"/>
-                                            </div>
-                                        </td>
-                                        <td>
-                                            <div class="rowGroup">
-                                                <label class="control-label spacing"><span style="color: red">*</span>个人银行账号</label>
-                                                <input type="text" class="form-control" id="bank_account" name="bank_account"  value="{$row.bank_account}"/>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                </table>
-                            </div>
-                        </div>
-                        </form>
-                        <form id="uploadForm" action="/common/api/addTalentFile" method="post" class="form-horizontal" enctype="multipart/form-data" target="hiddenIframe" style="display: none">
-                            <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="fileTypeId" name="fileTypeId" >
-                            <input type='hidden' id="index" name="index" >
-                            <input type='hidden' id="tableIndex" name="tableIndex" >
-                            <input type='hidden' id="trIndex" name="trIndex" >
-                            <input type="hidden" name="backName" value="TalentInfoInfoDlg.callBack">
-                            <input type="type" name="type" value="1">
-                        </form>
-                        <div class="panel-heading" onclick="$(this).next().toggle()">日志</div>
-                        <table id="logTable">
-                        </table>
                     </div>
                 </div>
             </div>
         </div>
     </div>
 </div>
-</div>
 <iframe id="hiddenIframe" name="hiddenIframe" style="display: none;"></iframe>
 <!--<script src="${ctxPath}/static/modular/gate/talentInfo/talentInfo_info.js"></script>-->
 <script type="text/javascript">

+ 16 - 2
public/static/js/common/Feng.js

@@ -254,9 +254,11 @@ var Feng = {
     },
     addAjaxSelect: function (val) {
         var id = val.id;                                                            //下拉框对象的id
+        var obj = val.obj;
         var url = val.url;                                                          //请求地址
         var displayCode = val.displayCode;                                          //下拉框实际值名称
         var displayName = val.displayName;                                          //下拉框显示值名称
+        var bindData = val.bindData;
         var type = val.type;                                                        //请求方式 GET 或者 POST, 默认POST
         var async = val.async;                                                      //同步方式 {异步--falae, 同步--true}, 默认为同步
         if (async == null){
@@ -265,20 +267,32 @@ var Feng = {
         if (type==null){
             type == "POST";
         }
-        var select = $("#"+id);
+        var select = typeof id !="undefined"?$("#"+id):$(obj);
         select.empty();
         var ajax = new $ax(url, function(data){
             var length = data.length;
             var html = "<option value=''>---请选择---</option>";
             for(var i=0; i<length; i++){
                 if (length == 1){
-                    html = html+  "<option value=\""+data[i][displayCode]+"\">"+data[i][displayName]+"</option>";
+                    if(typeof bindData !="undefined" && bindData){
+                        html = html+  "<option value=\""+data[i][displayCode]+"\" data-"+bindData+"=\""+data[i][bindData]+"\">"+data[i][displayName]+"</option>";
+                    }else{
+                        html = html+  "<option value=\""+data[i][displayCode]+"\">"+data[i][displayName]+"</option>";
+                    }
                 }else{
+                    if(typeof bindData !="undefined" && bindData){
+                	if(data[i][displayCode]==select.attr("defval")){
+                        html += "<option selected='selected' value=\""+data[i][displayCode]+"\" data-"+bindData+"=\""+data[i][bindData]+"\">"+data[i][displayName]+"</option>";
+                	}else{
+                		html += "<option value=\""+data[i][displayCode]+"\" data-"+bindData+"=\""+data[i][bindData]+"\">"+data[i][displayName]+"</option>";
+                	}
+                    }else{
                 	if(data[i][displayCode]==select.attr("defval")){
                         html += "<option selected='selected' value=\""+data[i][displayCode]+"\">"+data[i][displayName]+"</option>";
                 	}else{
                 		html += "<option value=\""+data[i][displayCode]+"\">"+data[i][displayName]+"</option>";
                 	}
+                    }
                 }
             }
             select.append(html);

+ 2 - 0
public/static/modular/gate/enterprise/enterprise_change_edit.js

@@ -593,6 +593,8 @@ $(function () {
     var arr = [
         {"name": "newStreet", "code": "street"},
         {"name": "newEnterpriseTag", "code": "enterprise_tag"},
+        {"name": "newOrganizationTag", "code": "organization_tag"},
+        {"name": "newInstitutionTag", "code": "institution_tag"},
         {"name": "newEnterpriseType", "code": "enterprise_type"},
         {"name": "newIndustryFieldNew", "code": "industry_field"},
         {"name": "newIndustryFieldOld", "code": industryNew + "_field"},

+ 2 - 0
public/static/modular/gate/enterprise/enterprise_edit.js

@@ -234,6 +234,8 @@ $(function () {
     var arr = [
         {"name": "street", "code": "street"},
         {"name": "enterpriseTag", "code": "enterprise_tag"},
+        {"name": "organizationTag", "code": "organization_tag"},
+        {"name": "institutionTag", "code": "institution_tag"},
         {"name": "enterpriseType", "code": "enterprise_type"},
         {"name": "industryFieldNew", "code": "industry_field"},
         {"name": "industryFieldOld", "code": industryNew + "_field"},

+ 7 - 7
public/static/modular/gate/integral/integral.js

@@ -201,7 +201,7 @@ Integral.showLog = function (id) {
         area: ['80%', '80%'],
         maxmin: true,
         success: function (layero, index) {
-            Feng.getCheckLog(id, {"type": CONFIG.project_rcrd, "mainId": id, "typeFileId": "", "active": 1})
+            Feng.getCheckLog(id, {"type": CONFIG.project_integral_apply, "mainId": id, "typeFileId": "", "active": 1})
         }
     });
 
@@ -224,10 +224,10 @@ Integral.addInfo = function () {
                 btnAlign: 'c',
                 btn1: function (index, layero) {
                     var obj = layero.find("iframe")[0].contentWindow;
-                    obj.TalentInfoInfoDlg.addSubmit();
+                    obj.IntegralInfoDlg.addSubmit();
                 }, btn2: function (index, layero) {
                     var obj = layero.find("iframe")[0].contentWindow;
-                    obj.TalentInfoInfoDlg.submitToCheck();
+                    obj.IntegralInfoDlg.submitToCheck();
                     return false;
                 },
                 success: function (layero, index) {
@@ -267,10 +267,10 @@ Integral.editInfo = function () {
                     btnAlign: 'c',
                     btn1: function (index, layero) {
                         var obj = layero.find("iframe")[0].contentWindow;
-                        obj.TalentInfoInfoDlg.addSubmit();
+                        obj.IntegralInfoDlg.addSubmit();
                     }, btn2: function (index, layero) {
                         var obj = layero.find("iframe")[0].contentWindow;
-                        obj.TalentInfoInfoDlg.submitToCheck();
+                        obj.IntegralInfoDlg.submitToCheck();
                         return false;
                     },
                     success: function (layero, index) {
@@ -288,7 +288,7 @@ Integral.editInfo = function () {
         }, function (data) {
             Feng.error("校验失败!" + data.responseJSON.message + "!");
         });
-        ajax.set("type", CONFIG.project_rcrd);
+        ajax.set("type", CONFIG.project_integral_apply);
         ajax.set("year", Integral.seItem.year);
         ajax.start();
     }
@@ -330,7 +330,7 @@ Integral.delete = function () {
             }, function (data) {
                 Feng.error("删除失败!" + data.responseJSON.message + "!");
             });
-            ajax.set("talentInfoId", Integral.seItem.id);
+            ajax.set("id", Integral.seItem.id);
             ajax.start();
         }
         Feng.confirm("删除后无法恢复,确认删除吗?", operation);

Dosya farkı çok büyük olduğundan ihmal edildi
+ 170 - 656
public/static/modular/gate/integral/integralInfo.js


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor