Browse Source

购房补贴++

sugangqiang 10 tháng trước cách đây
mục cha
commit
7e91ab9a62

+ 36 - 0
app/common/api/HouseApi.php

@@ -0,0 +1,36 @@
+<?php
+
+namespace app\common\api;
+
+use app\common\state\MainState;
+use think\facade\Db;
+use app\common\model\HousePurchase as houseModel;
+use app\common\model\HousePurchaseChildren as houseChildModel;
+
+/**
+ * Description of HouseApi
+ *
+ * @author sgq
+ */
+class HouseApi {
+
+    public static function getInfoById($id) {
+        return houseModel::findOrEmpty($id)->toArray();
+    }
+
+    public static function getHouseInfo($idCard) {
+        if (\StrUtil::isEmpOrNull($idCard)) {
+            return null;
+        }
+        $where = [];
+        $where[] = ["idCard", "=", $idCard];
+        return houseModel::where($where)->find();
+    }
+
+    public static function getChildren($id) {
+        $where = [];
+        $where[] = ["pId", "=", $id];
+        return houseChildModel::where($where)->select()->toArray();
+    }
+
+}

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

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

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

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

+ 86 - 26
app/enterprise/controller/House.php

@@ -8,17 +8,14 @@ use think\facade\Log;
 use app\common\api\EnterpriseApi;
 use app\common\api\TalentLogApi;
 use think\exception\ValidateException;
-use app\enterprise\validate\LivingAllowance as LivingAllowanceValidator;
 use app\common\state\ProjectState;
-use app\common\state\LivingAllowanceState as LaState;
 use app\common\api\BatchApi;
-use app\enterprise\api\LivingAllowanceApi as EnterpriseLaApi;
-use app\common\api\LivingAllowanceApi as CommonLaApi;
-use app\common\model\LivingAllowance as LaModel;
+use app\common\api\HouseApi;
 use app\common\model\TalentLog;
+use app\common\api\DictApi;
 
 /**
- * Description of LivingAllowance
+ * Description of House
  * 购房补贴
  * @author sgq
  */
@@ -29,40 +26,99 @@ class House extends EnterpriseController {
     }
 
     public function list() {
-        $res = EnterpriseLaApi::getList($this->request);
-        return json($res);
+        $params = $this->request;
+        $order = trim($params["order"]) ?: "desc";
+        $offset = trim($params["offset"]) ?: 0;
+        $limit = trim($params["limit"]) ?: 10;
+        $where = [];
+        $where[] = ["type", "=", $this->user["type"]];
+        $where[] = ["enterpriseId", "=", $this->user["uid"]];
+        if ($params["year"]) {
+            $where[] = ["year", "=", $params["year"]];
+        }
+        if (\StrUtil::isNotEmpAndNull($params["name"])) {
+            $where[] = ["name", "like", "%" . $params["name"] . "%"];
+        }
+        if (\StrUtil::isNotEmpAndNull($params["idCard"])) {
+            $where[] = ["idCard", "like", "%" . $params["idCard"] . "%"];
+        }
+        if ($params["talentArrange"]) {
+            $where[] = ["talentArrange", "=", $params["talentArrange"]];
+        }
+        if (\StrUtil::isNotEmpAndNull($params["spouseName"])) {
+            $where[] = ["spouseName", "like", "%" . $params["spouseName"] . "%"];
+        }
+        if (\StrUtil::isNotEmpAndNull($params["spouseIdcard"])) {
+            $where[] = ["spouseIdcard", "like", "%" . $params["spouseIdcard"] . "%"];
+        }
+        if (\StrUtil::isNotEmpAndNull($params["childName"])) {
+            $where[] = ["childName", "like", "%" . $params["childName"] . "%"];
+        }
+        if (\StrUtil::isNotEmpAndNull($params["childIdCard"])) {
+            $where[] = ["childIdCard", "like", "%" . $params["childIdCard"] . "%"];
+        }
+        if ($params["marryStatus"]) {
+            $where[] = ["marryStatus", "=", $params["marryStatus"]];
+        }
+
+        $count = Db::table("un_housepurchase")->where($where)->count();
+        $list = Db::table("un_housepurchase")->where($where)->limit($offset, $limit)->order("createTime $order")->select()->toArray();
+        //获取字典表婚姻状态
+        $marryMap = DictApi::selectByParentCode("marry_status");
+        $cardTypeMap = DictApi::selectByParentCode("card_type");
+        $streetMap = DictApi::selectByParentCode("street");
+        $levelMap = DictApi::selectByParentCode("talent_arrange");
+
+        $whrCondition = [];
+        $whrCondition[] = ["type", "=", $this->user["type"]];
+        $conditionMap = \app\common\model\TalentCondition::where($whrCondition)->column("name", "id");
+        foreach ($list as &$item) {
+            $item["marryStatusName"] = $marryMap[$item["marryStatus"]];
+            $item["cardTypeName"] = $cardTypeMap[$item["cardType"]];
+            $item["spouseCardTypeName"] = $cardTypeMap[$item["spouseCardType"]];
+            $item["childCardTypeName"] = $cardTypeMap[$item["childCardType"]];
+            $item["streetName"] = $streetMap[$item["street"]];
+            $item["talentArrangeName"] = $levelMap[$item["talentArrange"]];
+            $item["identifyConditionCH"] = $conditionMap[$item["identifyCondition"]];
+        }unset($item);
+        return json(["rows" => $list, "total" => $count]);
     }
 
     /**
      * 申请
      */
     public function apply(\think\Request $request) {
-        $type = $this->user["type"];
         $param = $request->param();
         $id = isset($param["id"]) ? $param["id"] : 0;
-        $info = CommonLaApi::getInfoById($id);
-        $ep = EnterpriseApi::getOne($this->user["uid"]);
-        if (!chkEnterpriseFull($ep))
-            return;
-        /* if ($info && !in_array($info["checkState"], [LaState::LA_SAVE, LaState::LA_FIRST_REJECT])) {
-          return view("", ["row" => $info, "enterprise" => $ep, "hand" => "select"]);
-          } */
+        $vars = [];
+        if ($id) {
+            $info = HouseApi::getInfoById($id);
+            $childrenList = HouseApi::getChildren($id);
+            $houseInfo = HouseApi::getHouseInfo($info["idCard"]);
+            $dicts = DictApi::selectByParentCode("card_type");
+            $vars["dicts"] = $dicts;
+            $vars["row"] = $info;
+            $vars["hand"] = $houseInfo ? 2 : 1;
+            $vars["childrenList"] = $childrenList;
+        }
         if ($request->isPost()) {
             return $this->save($info, $request);
         }
-        $hand = $info ? "update" : "add";
-        $batch = $info["year"] ?: BatchApi::getValidBatch(ProjectState::LIVINGALLOWANCE, $this->user["type"])["batch"];
-        return view("", ["year" => $batch, "row" => $info, "enterprise" => $ep, "hand" => $hand]);
+        $batch = $info["year"] ?: BatchApi::getValidBatch(ProjectState::HOUSE, $this->user["type"])["batch"];
+        $vars["year"] = $batch;
+        $vars["type"] = $this->user["type"];
+        return view("", $vars);
     }
 
     public function detail(\think\Request $request) {
-        $param = $request->param();
-        $id = $param["id"];
-        $info = CommonLaApi::getInfoById($id);
-        $ep = EnterpriseApi::getOne($this->user["uid"]);
-        if (!chkEnterpriseFull($ep))
-            return;
-        return view("apply", ["row" => $info, "enterprise" => $ep, "hand" => "select"]);
+        $info = HouseApi::getInfoById($id);
+        $childrenList = HouseApi::getChildren($id);
+        $dicts = DictApi::selectByParentCode("card_type");
+        $vars["dicts"] = $dicts;
+        $vars["row"] = $info;
+        $vars["childrenList"] = $childrenList;
+        $vars["type"] = $this->user["type"];
+        return view("", $vars);
     }
 
     private function other_validate($info) {
@@ -356,4 +412,8 @@ class House extends EnterpriseController {
         return json(["msg" => "删除成功"]);
     }
 
+    public function getTalentInfo($id) {
+        
+    }
+
 }

+ 5 - 3
app/enterprise/controller/Talent.php

@@ -1704,9 +1704,11 @@ class Talent extends EnterpriseController {
             $talentAllowances = \app\common\model\TalentAllowance::where($where)->select()->toArray();
             $ids = array_unique(array_column($talentAllowances, "talentId"));
         } else if ($type == 2) {    //购房补贴
-            //allowanceWrapper.eq("year",year).eq("enterpriseId",sessionUser.getId()).setSqlSelect("talentId");
-            //List<Housepurchase> allowanceInfoList = this.housepurchaseService.selectList(allowanceWrapper);
-            //ids = allowanceInfoList.stream().map(Housepurchase :: getTalentId).distinct().collect(Collectors.joining(","));
+            $where = [];
+            $where[] = ["year", "=", $year];
+            $where[] = ["enterpriseId", "=", $this->user["uid"]];
+            $housePurchases = \app\common\model\HousePurchase::where($where)->select()->toArray();
+            $ids = array_unique(array_column($housePurchases, "talentId"));
         }
         $whr = [];
         $whr[] = ["ti.checkState", "=", TalentState::CERTIFICATED];

+ 14 - 10
app/enterprise/view/housepurchase/apply.html → app/enterprise/view/house/apply.html

@@ -95,7 +95,7 @@
                                                     <div class="row" id="basicData">
                                                         <div class="col-sm-12">
                                                             <div class="rowGroup col-sm-3" {eq name="type" value="2"}style="display: none"{/eq}>
-                                                                <label class=" control-label spacing"><span style="color: red">*</span>申报对象</label>
+                                                                 <label class=" control-label spacing"><span style="color: red">*</span>申报对象</label>
                                                                 <select class="form-control" id="declareObject" name="declareObject" value="{$row.declareObject}" onchange="HousepurchaseInfoDlg.declareObjChange()">
                                                                     <option value="">请选择</option>
                                                                     <option value="1" {eq name="type" value="2"}selected="selected"{/eq}>依据晋政文〔2019〕107号经我市认定后公布入选,且符合申报适用对象的晋江市优秀人才</option>
@@ -103,7 +103,7 @@
                                                                 </select>
                                                             </div>
                                                             <div class="rowGroup col-sm-3" {eq name="type" value="2"}style="display: none"{/eq}>
-                                                                <label class=" control-label spacing"><span style="color: red">*</span>申报类型</label>
+                                                                 <label class=" control-label spacing"><span style="color: red">*</span>申报类型</label>
                                                                 <select class="form-control" id="declareType" name="declareType" value="{$row.declareType}" onchange="HousepurchaseInfoDlg.typeChange()">
                                                                     <option value="">请选择</option>
                                                                     <option value="1" {eq name="type" value="2"}selected="selected"{/eq}>购房补贴</option>
@@ -112,7 +112,11 @@
                                                             </div>
                                                             <div class="rowGroup col-sm-3">
                                                                 <label class=" control-label spacing"><span style="color: red">*</span>姓名</label>
-                                                                <input type="text" class="form-control" id="name" name="name" value="{$row.name}" readonly="readonly">
+                                                                {if condition="$row['id']"}
+                                                                <input type="text" class="form-control" readonly="readonly" id="name" name="name" value="{$row.name}" >
+                                                                {else/}
+                                                                <select type="text" class="form-control" id="name" name="name" onchange="HousepurchaseInfoDlg.nameChange()"></select>
+                                                                {/if}
                                                             </div>
                                                             <div class="rowGroup col-sm-3">
                                                                 <label class=" control-label spacing"><span style="color: red">*</span>证件类型</label>
@@ -212,31 +216,31 @@
                                                                 </select>
                                                             </div>
                                                             <div class="rowGroup col-sm-3" {eq name="type" value="1"}style="display: none"{/eq}>
-                                                                <label class="control-label spacing">不动产权证编号</label>
+                                                                 <label class="control-label spacing">不动产权证编号</label>
                                                                 <input type="text" class="form-control" id="realEstateNo" name="realEstateNo" value="{$row.realEstateNo}" {eq name="hand" value="2"}readonly="readonly"{/eq}/>
                                                             </div>
                                                             <div class="rowGroup col-sm-3" {eq name="type" value="1"}style="display: none"{/eq}>
-                                                                <label class="control-label spacing">备案合同编号</label>
+                                                                 <label class="control-label spacing">备案合同编号</label>
                                                                 <input type="text" class="form-control" id="recordNo" name="recordNo" value="{$row.recordNo}" {eq name="hand" value="2"}readonly="readonly"{/eq}/>
                                                             </div>
                                                             <div class="rowGroup col-sm-3" {eq name="type" value="1"}style="display: none"{/eq}>
-                                                                <label class="control-label spacing"><span style="color: red">*</span>房屋坐落地址</label>
+                                                                 <label class="control-label spacing"><span style="color: red">*</span>房屋坐落地址</label>
                                                                 <input type="text" class="form-control" id="houseAddress" name="houseAddress" value="{$row.houseAddress}" {eq name="hand" value="2"}readonly="readonly"{/eq}/>
                                                             </div>
                                                             <div class="rowGroup col-sm-3" {eq name="type" value="1"}style="display: none"{/eq}>
-                                                                <label class="control-label spacing"><span style="color: red">*</span>房屋建筑面积(m2)</label>
+                                                                 <label class="control-label spacing"><span style="color: red">*</span>房屋建筑面积(m2)</label>
                                                                 <input type="text" class="form-control" id="houseArea" name="houseArea" value="{$row.houseArea}" {eq name="hand" value="2"}readonly="readonly"{/eq}/>
                                                             </div>
                                                             <div class="rowGroup col-sm-3" {eq name="type" value="1"}style="display: none"{/eq}>
-                                                                <label class="control-label spacing"><span style="color: red">*</span>购房合同备案时间/不动产权证书办理时间</label>
+                                                                 <label class="control-label spacing"><span style="color: red">*</span>购房合同备案时间/不动产权证书办理时间</label>
                                                                 <input type="text" class="form-control date" id="recordTime" name="recordTime" value="{$row.recordTime}" {eq name="hand" value="2"}readonly="readonly"{/eq}/>
                                                             </div>
                                                             <div class="rowGroup col-sm-3" {eq name="type" value="1"}style="display: none"{/eq}>
-                                                                <label class="control-label spacing"><span style="color: red">*</span>房屋成交金额(元)</label>
+                                                                 <label class="control-label spacing"><span style="color: red">*</span>房屋成交金额(元)</label>
                                                                 <input type="text" class="form-control" id="houseMoney" name="houseMoney" value="{$row.houseMoney}" {eq name="hand" value="2"}readonly="readonly"{/eq}/>
                                                             </div>
                                                             <div class="rowGroup col-sm-3" {eq name="type" value="1"}style="display: none"{/eq}>
-                                                                <label class="control-label spacing"><span style="color: red">*</span>是否享受我市其他政策</label>
+                                                                 <label class="control-label spacing"><span style="color: red">*</span>是否享受我市其他政策</label>
                                                                 <select class="form-control" id="isEnjoyOther" name="isEnjoyOther" value="{$row.isEnjoyOther}">
                                                                     <option value="">请选择</option>
                                                                     <option value="1">是</option>

+ 0 - 0
app/enterprise/view/housepurchase/view.html → app/enterprise/view/house/detail.html


+ 0 - 0
app/enterprise/view/housepurchase/housepurchase_add.html → app/enterprise/view/house/housepurchase_add.html


+ 17 - 13
app/enterprise/view/housepurchase/index.html → app/enterprise/view/house/index.html

@@ -45,22 +45,26 @@
                                 </div>
                             </div>
                             <div class="col-sm-3">
-                                <div class="input-group-btn">
-                                    <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
-                                        人才层次
-                                    </button>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            人才层次
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="talentArrange">
+                                    </select>
                                 </div>
-                                <select class="form-control" id="talentArrange">
-                                </select>
                             </div>
                             <div class="col-sm-3">
-                                <div class="input-group-btn">
-                                    <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
-                                        婚姻状态
-                                    </button>
+                                <div class="input-group input-group-sm">
+                                    <div class="input-group-btn">
+                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
+                                            婚姻状态
+                                        </button>
+                                    </div>
+                                    <select class="form-control" id="marryStatus">
+                                    </select>
                                 </div>
-                                <select class="form-control" id="marryStatus">
-                                </select>
                             </div>
                             <div class="col-sm-3">
                                 <div class="input-group input-group-sm">
@@ -135,6 +139,6 @@
     </div>
 </div>
 <script type="text/javascript">
-    document.write('<script src="/static/modular/gate/house/housepurchase.js?v='+(new Date()).getTime()+'"><\/script>');
+    document.write('<script src="/static/modular/gate/house/housepurchase.js?v=' + (new Date()).getTime() + '"><\/script>');
 </script>
 {/block}

+ 13 - 13
public/static/modular/common/jjcommon.js

@@ -3,26 +3,26 @@
  * @param content
  * @param nextId
  */
-function bankChange(content,nextId) {
+function bankChange(content, nextId) {
     var bank = $(content).val();
-    if($.trim(bank)=='中国工商银行'){
-        $("#"+ nextId).val('102391050013');
-    }else {
-        $("#"+ nextId).val('');
+    if ($.trim(bank) == '中国工商银行') {
+        $("#" + nextId).val('102391050013');
+    } else {
+        $("#" + nextId).val('');
     }
 }
 
 /**
  * 加载省份
  */
-function loadProvince(){
+function loadProvince() {
     //加载省份
     Feng.addAjaxSelect({
         "id": "provinceCode",
         "displayCode": "code",
         "displayName": "name",
         "type": "GET",
-        "url": Feng.ctxPath + "/api/commonLocation/getProvinceSelect"
+        "url": Feng.ctxPath + "/common/tool/getProvinceSelect"
     });
 }
 
@@ -32,11 +32,11 @@ function loadProvince(){
  * @param target1       市
  * @param target2       县
  */
-function afterSelectProvince(content,target1,target2){
+function afterSelectProvince(content, target1, target2) {
     var province = $(content).val();
     $("#" + target1).empty();
     $("#" + target2).empty();
-    if(province==null||province==''){
+    if (province == null || province == '') {
         return;
     }
     Feng.addAjaxSelect({
@@ -44,7 +44,7 @@ function afterSelectProvince(content,target1,target2){
         "displayCode": "code",
         "displayName": "name",
         "type": "GET",
-        "url": Feng.ctxPath + "/api/commonLocation/findCityByProvinceSelect/"+province
+        "url": Feng.ctxPath + "/common/tool/findCityByProvinceSelect/code/" + province
     });
 }
 
@@ -53,10 +53,10 @@ function afterSelectProvince(content,target1,target2){
  * @param content
  * @param target
  */
-function afterSelectCity(content,target){
+function afterSelectCity(content, target) {
     var city = $(content).val();
     $("#" + target).empty();
-    if(city==null||city==''){
+    if (city == null || city == '') {
         return;
     }
     Feng.addAjaxSelect({
@@ -64,7 +64,7 @@ function afterSelectCity(content,target){
         "displayCode": "code",
         "displayName": "name",
         "type": "GET",
-        "url": Feng.ctxPath + "/api/commonLocation/findCountyByCitySelect/"+city
+        "url": Feng.ctxPath + "/common/tool/findCountyByCitySelect/code/" + city
     });
 }
 

+ 87 - 80
public/static/modular/gate/house/housepurchase.js

@@ -2,8 +2,8 @@
  * 购房补贴管理初始化
  */
 var Housepurchase = {
-    id: "housepurchaseTable",	//表格id
-    seItem: null,		//选中的条目
+    id: "housepurchaseTable", //表格id
+    seItem: null, //选中的条目
     table: null,
     layerIndex: -1
 };
@@ -14,76 +14,82 @@ var Housepurchase = {
 Housepurchase.initColumn = function () {
     return [
         {field: 'selectItem', radio: true},
-        {title: '申报年度', field: 'year', visible: true, align: 'center', valign: 'middle',width:"80px"},
-        {title: '申报类型', field: 'declareType', visible: true, align: 'center', valign: 'middle',width:"100px",
-            formatter(value,row,index){
-                if(value==1){
+        {title: '申报年度', field: 'year', visible: true, align: 'center', valign: 'middle', width: "80px"},
+        {title: '申报类型', field: 'declareType', visible: true, align: 'center', valign: 'middle', width: "100px",
+            formatter(value, row, index) {
+                if (value == 1) {
                     return "购房补贴";
-                }else if(value==2){
+                } else if (value == 2) {
                     return "免租入住";
                 }
             }
         },
-        {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle',width:"100px"},
-        {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle',width:"130px"},
-        {title: '人才层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle',width:"90px"},
-        {title: '联系电话', field: 'phone', visible: true, align: 'center', valign: 'middle',width:"100px"},
-        {title: '婚姻状态', field: 'marryStatusName', visible: true, align: 'center', valign: 'middle',width:"80px"},
-        {title: '配偶姓名', field: 'spouseName', visible: true, align: 'center', valign: 'middle',width:"100px"},
-        {title: '配偶证件号码', field: 'spouseIdcard', visible: true, align: 'center', valign: 'middle',width:"150px"},
-        {title: '房屋坐落地址', field: 'houseAddress', visible: true, align: 'center', valign: 'middle',width:"120px"},
-        {title: '房屋建筑面积', field: 'houseArea', visible: true, align: 'center', valign: 'middle',width:"120px"},
-        {title: '不动产权证编号', field: 'realEstateNo', visible: true, align: 'center', valign: 'middle',width:"120px"},
-        {title: '房屋成交金额', field: 'houseMoney', visible: true, align: 'center', valign: 'middle',width:"120px"},
-        {title: '兑现状态', field: "cashType", visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"80px",
-            formatter : function (value,row,index){
-                if(Feng.isEmptyStr(value))return "<span style='color: black'>未判定</span>";
-                if(row.publicState >= 3){
-                    if(value==1)return "<span style='color: green'>兑现</span>";
-                    if(value==2)return "<span style='color: red'>不予兑现</span>";
-                }else{
+        {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', width: "100px"},
+        {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle', width: "130px"},
+        {title: '人才层次', field: 'talentArrangeName', visible: true, align: 'center', valign: 'middle', width: "90px"},
+        {title: '联系电话', field: 'phone', visible: true, align: 'center', valign: 'middle', width: "100px"},
+        {title: '婚姻状态', field: 'marryStatusName', visible: true, align: 'center', valign: 'middle', width: "80px"},
+        {title: '配偶姓名', field: 'spouseName', visible: true, align: 'center', valign: 'middle', width: "100px"},
+        {title: '配偶证件号码', field: 'spouseIdcard', visible: true, align: 'center', valign: 'middle', width: "150px"},
+        {title: '房屋坐落地址', field: 'houseAddress', visible: true, align: 'center', valign: 'middle', width: "120px"},
+        {title: '房屋建筑面积', field: 'houseArea', visible: true, align: 'center', valign: 'middle', width: "120px"},
+        {title: '不动产权证编号', field: 'realEstateNo', visible: true, align: 'center', valign: 'middle', width: "120px"},
+        {title: '房屋成交金额', field: 'houseMoney', visible: true, align: 'center', valign: 'middle', width: "120px"},
+        {title: '兑现状态', field: "cashType", visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "80px",
+            formatter: function (value, row, index) {
+                if (Feng.isEmptyStr(value))
+                    return "<span style='color: black'>未判定</span>";
+                if (row.publicState >= 3) {
+                    if (value == 1)
+                        return "<span style='color: green'>兑现</span>";
+                    if (value == 2)
+                        return "<span style='color: red'>不予兑现</span>";
+                } else {
                     return "<span style='color: black'>未判定</span>";
                 }
             }
         },
-        {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle',width:"100px",
-            formatter : function (value,row,index) {
-                if(value==1){
+        {title: '审核状态', field: 'checkState', visible: true, align: 'center', valign: 'middle', width: "100px",
+            formatter: function (value, row, index) {
+                if (value == 1) {
                     return "<span class='label'>待提交</span>"
-                }else if(value==10){
+                } else if (value == 10) {
                     return "<span class='label label-danger'>已驳回</span>"
-                }else{
-                    if(row.publicState >=3){
-                        if(value==-1){
+                } else {
+                    if (row.publicState >= 3) {
+                        if (value == -1) {
                             return "<span class='label label-danger'>审核不通过</span>"
-                        }else if(value==40){
+                        } else if (value == 40) {
                             return "<span class='label label-primary'>审核通过</span>"
-                        }else{
+                        } else {
                             return "<span class='label label-success'>审核中</span>"
                         }
-                    }else{
+                    } else {
                         return "<span class='label label-success'>审核中</span>"
                     }
                 }
             }
         },
-        {title: '是否兑现', field: "publicState", visible: true, align: 'center', valign: 'middle','class': 'uitd_showTip',width:"80px",
-            formatter : function (value,row,index){
-                if(value < 3){
+        {title: '是否兑现', field: "publicState", visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "80px",
+            formatter: function (value, row, index) {
+                if (value < 3) {
                     return "<span class='label label-default'>未知</span>";
                 }
-                if(value == 3 ){
-                    if(row.cashType == 1) return "<span class='label label-danger'>待兑现</span>";
-                    if(row.cashType == 2) return "<span class='label label-info'>无需兑现</span>";
+                if (value == 3) {
+                    if (row.cashType == 1)
+                        return "<span class='label label-danger'>待兑现</span>";
+                    if (row.cashType == 2)
+                        return "<span class='label label-info'>无需兑现</span>";
                 }
-                if(value==4)return "<span class='label label-primary'>已兑现</span>";
+                if (value == 4)
+                    return "<span class='label label-primary'>已兑现</span>";
             }
         },
-        {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle',width:"80px",
-            formatter : function (value,row,index){
-                return "<span class='label label-success' onclick=\"Feng.getCheckLogModel('"+value+"','"+CONFIG.project_house+"',null)\" >" +
-                    "<i class=\"fa fa-book\"></i>日志" +
-                    "</span>";
+        {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "80px",
+            formatter: function (value, row, index) {
+                return "<span class='label label-success' onclick=\"Feng.getCheckLogModel('" + value + "','" + CONFIG.project_house + "',null)\" >" +
+                        "<i class=\"fa fa-book\"></i>日志" +
+                        "</span>";
             }
         }
     ];
@@ -94,10 +100,10 @@ Housepurchase.initColumn = function () {
  */
 Housepurchase.check = function () {
     var selected = $('#' + this.id).bootstrapTable('getSelections');
-    if(selected.length == 0){
+    if (selected.length == 0) {
         Feng.info("请先选中表格中的某一记录!");
         return false;
-    }else{
+    } else {
         Housepurchase.seItem = selected[0];
         return true;
     }
@@ -107,42 +113,42 @@ Housepurchase.check = function () {
  * 点击添加购房补贴
  */
 Housepurchase.openAddHousepurchase = function () {
-    var ajax = new $ax(Feng.ctxPath + "/api/commonBatch/valiateIsAdd", function (data) {
-        if(data.code==200){
+    var ajax = new $ax("/common/batch/checkBatchValid", function (data) {
+        if (data.code == 200) {
             var index = layer.open({
                 type: 2,
                 title: '添加购房补贴',
                 area: ['800px', '420px'], //宽高
                 fix: false, //不固定
                 maxmin: true,
-                content: Feng.ctxPath + '/api/housepurchase/housepurchase_add?year='+data.obj,
-                btn: ['<i class="fa fa-eye"></i>&nbsp;&nbsp;保存未提交','<i class="fa fa-check layui-bg-green"></i>&nbsp;&nbsp;提交审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
+                content: Feng.ctxPath + '/enterprise/house/apply?year=' + data.batch,
+                btn: ['<i class="fa fa-eye"></i>&nbsp;&nbsp;保存未提交', '<i class="fa fa-check layui-bg-green"></i>&nbsp;&nbsp;提交审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
                 btnAlign: 'c',
                 btn1: function (index, layero) {
                     var obj = layero.find("iframe")[0].contentWindow;
                     obj.HousepurchaseInfoDlg.addSubmit();
-                },btn2: function(index, layero){
+                }, btn2: function (index, layero) {
                     var obj = layero.find("iframe")[0].contentWindow;
                     obj.HousepurchaseInfoDlg.editSubmit(2);
                     return false;
                 },
-                success :function (layero, index) {
-                    layer.tips('添加基本信息并上传附件后点击','.layui-layer-btn1',{tips:[1,"#78BA32"],time:0,closeBtn :2});
+                success: function (layero, index) {
+                    layer.tips('添加基本信息并上传附件后点击', '.layui-layer-btn1', {tips: [1, "#78BA32"], time: 0, closeBtn: 2});
                 },
-                end :function () {
+                end: function () {
                     layer.closeAll('tips');
                     Housepurchase.table.refresh();
                 }
             });
             Housepurchase.layerIndex = index;
             layer.full(index);
-        }else{
+        } else {
             Feng.info(data.msg);
         }
     }, function (data) {
         Feng.error("校验失败!" + data.responseJSON.message + "!");
     });
-    ajax.set("type",CONFIG.project_house);
+    ajax.set("type", CONFIG.project_house);
     ajax.start();
 };
 
@@ -151,7 +157,7 @@ Housepurchase.openAddHousepurchase = function () {
  */
 Housepurchase.openHousepurchaseDetail = function () {
     if (this.check()) {
-        var ajax = new $ax(Feng.ctxPath + "/api/commonBatch/valiateIsEditOrSubmit", function (data) {
+        var ajax = new $ax("/common/batch/checkBatchValid", function (data) {
             if (data.code == 200) {
                 var index = layer.open({
                     type: 2,
@@ -159,41 +165,42 @@ Housepurchase.openHousepurchaseDetail = function () {
                     area: ['800px', '420px'], //宽高
                     fix: false, //不固定
                     maxmin: true,
-                    content: Feng.ctxPath + '/api/housepurchase/housepurchase_update/' + Housepurchase.seItem.id,
-                    btn: ['<i class="fa fa-eye"></i>&nbsp;&nbsp;保存未提交','<i class="fa fa-check layui-bg-green"></i>&nbsp;&nbsp;提交审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
+                    content: Feng.ctxPath + '/enterprise/house/apply/id/' + Housepurchase.seItem.id,
+                    btn: ['<i class="fa fa-eye"></i>&nbsp;&nbsp;保存未提交', '<i class="fa fa-check layui-bg-green"></i>&nbsp;&nbsp;提交审核', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
                     btnAlign: 'c',
                     btn1: function (index, layero) {
                         var obj = layero.find("iframe")[0].contentWindow;
                         obj.HousepurchaseInfoDlg.addSubmit();
-                    },btn2: function(index, layero){
+                    }, btn2: function (index, layero) {
                         var obj = layero.find("iframe")[0].contentWindow;
                         obj.HousepurchaseInfoDlg.editSubmit(2);
                         return false;
                     },
-                    success :function (layero, index) {
-                        layer.tips('添加基本信息并上传附件后点击','.layui-layer-btn1',{tips:[1,"#78BA32"],time:0,closeBtn :2});
+                    success: function (layero, index) {
+                        layer.tips('添加基本信息并上传附件后点击', '.layui-layer-btn1', {tips: [1, "#78BA32"], time: 0, closeBtn: 2});
                     },
-                    end :function () {
+                    end: function () {
                         layer.closeAll('tips');
                         Housepurchase.table.refresh();
                     }
                 });
                 Housepurchase.layerIndex = index;
                 layer.full(index);
-            }else{
+            } else {
                 Feng.info(data.msg);
             }
         }, function (data) {
             Feng.error("校验失败!" + data.responseJSON.message + "!");
         });
-        ajax.set("type",CONFIG.project_house);
-        ajax.set("year",Housepurchase.seItem.year);
+        ajax.set("type", CONFIG.project_house);
+        ajax.set("year", Housepurchase.seItem.year);
+        ajax.set("first_submit_time", TalentAllowanceInfo.seItem.firstSubmitTime);
         ajax.start();
     }
 };
 
 
-Housepurchase.openHousepurchaseSelect = function(){
+Housepurchase.openHousepurchaseSelect = function () {
     if (this.check()) {
         var index = layer.open({
             type: 2,
@@ -201,7 +208,7 @@ Housepurchase.openHousepurchaseSelect = function(){
             area: ['800px', '420px'], //宽高
             fix: false, //不固定
             maxmin: true,
-            content: Feng.ctxPath + '/api/housepurchase/housepurchase_select/' + Housepurchase.seItem.id,
+            content: Feng.ctxPath + '/enterprise/house/detail/id/' + Housepurchase.seItem.id,
             btn: ['<i class="fa fa-eraser"></i>&nbsp;&nbsp;取消'],
             btnAlign: 'c',
         });
@@ -215,12 +222,12 @@ Housepurchase.openHousepurchaseSelect = function(){
  */
 Housepurchase.delete = function () {
     if (this.check()) {
-        var operation = function() {
-            var ajax = new $ax(Feng.ctxPath + "/api/housepurchase/delete", function (data) {
-                if (data.code == 200){
+        var operation = function () {
+            var ajax = new $ax(Feng.ctxPath + "/enterprise/house/delete", function (data) {
+                if (data.code == 200) {
                     Feng.success(data.msg);
                     Housepurchase.table.refresh();
-                }else{
+                } else {
                     Feng.info(data.msg);
                 }
             }, function (data) {
@@ -237,7 +244,7 @@ Housepurchase.delete = function () {
  * 查询表单提交参数对象
  * @returns {{}}
  */
-Housepurchase.formParams = function() {
+Housepurchase.formParams = function () {
     var queryData = {};
     queryData['year'] = $("#year").val();
     queryData['name'] = $("#name").val();
@@ -261,7 +268,7 @@ Housepurchase.search = function () {
 /**
  * 重置
  */
-Housepurchase.reset = function(){
+Housepurchase.reset = function () {
     $("#year").val("");
     $("#name").val("");
     $("#idCard").val("");
@@ -275,12 +282,12 @@ Housepurchase.reset = function(){
 
 $(function () {
     var defaultColunms = Housepurchase.initColumn();
-    var table = new BSTable(Housepurchase.id, "/api/housepurchase/list", defaultColunms);
+    var table = new BSTable(Housepurchase.id, "/enterprise/house/list", defaultColunms);
     table.setPaginationType("server");
     Housepurchase.table = table.init();
     //批量加载字典表数据
     var arr = [
-        {"name":"marryStatus","code":"un_marryStatus"},
-        {"name":"talentArrange","code":"un_talentLevel"}];
+        {"name": "marryStatus", "code": "marry_status"},
+        {"name": "talentArrange", "code": "talent_arrange"}];
     Feng.findChildDictBatch(JSON.stringify(arr));
 });

+ 271 - 260
public/static/modular/gate/house/housepurchase_info.js

@@ -3,7 +3,7 @@
  * 初始化购房补贴详情对话框
  */
 var HousepurchaseInfoDlg = {
-    housepurchaseInfoData : {},
+    housepurchaseInfoData: {},
     validateFields: {
         enterpriseId: {validators: {notEmpty: {message: '所属企业不能为空'}}},
         name: {validators: {notEmpty: {message: '姓名不能为空'}}},
@@ -89,7 +89,7 @@ var HousepurchaseInfoDlg = {
 /**
  * 清除数据
  */
-HousepurchaseInfoDlg.clearData = function() {
+HousepurchaseInfoDlg.clearData = function () {
     this.housepurchaseInfoData = {};
 }
 
@@ -98,7 +98,7 @@ HousepurchaseInfoDlg.clearData = function() {
  * @param key 数据的名称
  * @param val 数据的具体值
  */
-HousepurchaseInfoDlg.set = function(key, val) {
+HousepurchaseInfoDlg.set = function (key, val) {
     this.housepurchaseInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val;
     return this;
 }
@@ -108,70 +108,70 @@ HousepurchaseInfoDlg.set = function(key, val) {
  * @param key 数据的名称
  * @param val 数据的具体值
  */
-HousepurchaseInfoDlg.get = function(key) {
+HousepurchaseInfoDlg.get = function (key) {
     return $("#" + key).val();
 }
 
 /**
  * 关闭此对话框
  */
-HousepurchaseInfoDlg.close = function() {
+HousepurchaseInfoDlg.close = function () {
     parent.layer.close(window.parent.Housepurchase.layerIndex);
 }
 
 /**
  * 收集数据
  */
-HousepurchaseInfoDlg.collectData = function() {
+HousepurchaseInfoDlg.collectData = function () {
     this
-    .set('id')
-    .set('talentId')
-    .set('type')
-    .set('declareType')
-    .set('declareObject')
-    .set('year')
-    .set('name')
-    .set('cardType')
-    .set('idCard')
-    .set('provinceCode')
-    .set('cityCode')
-    .set('countyCode')
-    .set('street')
-    .set('talentType')
-    .set('talentArrange')
-    .set('certificateStartTime')
-    .set('certificateEndTime')
-    .set('identifyCondition')
-    .set('idenfityConditionName')
-    .set('identifyGetTime')
-    .set('phone')
-    .set('marryStatus')
-    .set('spouseName')
-    .set('spouseCardType')
-    .set('spouseIdcard')
-    .set('childName')
-    .set('childCardType')
-    .set('childIdCard')
-    .set('number')
-    .set('houseAddress')
-    .set('houseArea')
-    .set('recordTime')
-    .set('houseMoney')
-    .set('realEstateNo')
-    .set('recordNo')
-    .set('isEnjoyOther')
-    .set('bank')
-    .set('bankNetwork')
-    .set('bankAccount')
-    .set('bankNumber')
-    .set('spouseIsLibrary');
-    if($("#provinceCode").val()!=null && $("#provinceCode").val()!=''){
+            .set('id')
+            .set('talentId')
+            .set('type')
+            .set('declareType')
+            .set('declareObject')
+            .set('year')
+            .set('name')
+            .set('cardType')
+            .set('idCard')
+            .set('provinceCode')
+            .set('cityCode')
+            .set('countyCode')
+            .set('street')
+            .set('talentType')
+            .set('talentArrange')
+            .set('certificateStartTime')
+            .set('certificateEndTime')
+            .set('identifyCondition')
+            .set('idenfityConditionName')
+            .set('identifyGetTime')
+            .set('phone')
+            .set('marryStatus')
+            .set('spouseName')
+            .set('spouseCardType')
+            .set('spouseIdcard')
+            .set('childName')
+            .set('childCardType')
+            .set('childIdCard')
+            .set('number')
+            .set('houseAddress')
+            .set('houseArea')
+            .set('recordTime')
+            .set('houseMoney')
+            .set('realEstateNo')
+            .set('recordNo')
+            .set('isEnjoyOther')
+            .set('bank')
+            .set('bankNetwork')
+            .set('bankAccount')
+            .set('bankNumber')
+            .set('spouseIsLibrary');
+    if ($("#provinceCode").val() != null && $("#provinceCode").val() != '') {
         this.housepurchaseInfoData["provinceName"] = $("#provinceCode").find("option:selected").text();
     }
-    if($("#cityCode").val()!=null && $("#cityCode").val()!=''){
+    if ($("#cityCode").val() != null && $("#cityCode").val() != '') {
         this.housepurchaseInfoData["cityName"] = $("#cityCode").find("option:selected").text();
     }
-    if($("#countyCode").val()!=null && $("#countyCode").val()!=''){
+    if ($("#countyCode").val() != null && $("#countyCode").val() != '') {
         this.housepurchaseInfoData["countyName"] = $("#countyCode").find("option:selected").text();
     }
 }
@@ -185,21 +185,23 @@ HousepurchaseInfoDlg.validate = function () {
     return $("#houseInfoForm").data('bootstrapValidator').isValid();
 }
 
-HousepurchaseInfoDlg.nameChange = function(){
-    var talentId = $("#talentId").val();
+HousepurchaseInfoDlg.nameChange = function () {
+    var talentId = $("#name").val();
     var declareType = $("#declareType").val();
-    if(Feng.isEmptyStr(declareType)){
+    if (Feng.isEmptyStr(declareType)) {
         Feng.info("请先选择申报类型");
-        $("#talentId").val("").trigger('chosen:updated');;
+        $("#name").val("").trigger('chosen:updated');
+        ;
         return;
     }
-    if(Feng.isNotEmptyStr(talentId)){
-        var ajax = new $ax(Feng.ctxPath + "/api/housepurchase/init/"+talentId, function(data){
-            if(data.code == 200){
+    if (Feng.isNotEmptyStr(talentId)) {
+        var ajax = new $ax(Feng.ctxPath + "/enterprise/house/getTalentInfo/id/" + talentId, function (data) {
+            if (data.code == 200) {
                 var talentInfo = data.obj.talentInfo;
                 var houseInfo = data.obj.houseInfo;
-                if(houseInfo.count>=5){
-                    Feng.info("当前申报人所关联房产已享受5次补贴,无法再次申报");return;
+                if (houseInfo.count >= 5) {
+                    Feng.info("当前申报人所关联房产已享受5次补贴,无法再次申报");
+                    return;
                 }
                 $("#name").val(talentInfo.name);
                 $("#cardType").val(talentInfo.cardType);
@@ -219,14 +221,14 @@ HousepurchaseInfoDlg.nameChange = function(){
                 $("#identifyCondition").val(talentInfo.identifyCondition);
                 $("#idenfityConditionName").val(talentInfo.identifyConditionName);
                 $("#identifyGetTime").val(talentInfo.identifyGetTime);
-                if(Feng.isNotEmptyStr(houseInfo)){
-                    $("#realEstateNo").val(houseInfo.realEstateNo).attr("style","pointer-events: none;background-color: #eee;");
-                    $("#recordNo").val(houseInfo.recordNo).attr("style","pointer-events: none;background-color: #eee;");
-                    $("#houseAddress").val(houseInfo.houseAddress).attr("style","pointer-events: none;background-color: #eee;");
-                    $("#houseArea").val(houseInfo.houseArea).attr("style","pointer-events: none;background-color: #eee;");
-                    $("#recordTime").val(houseInfo.recordTime).attr("style","pointer-events: none;background-color: #eee;");
-                    $("#houseMoney").val(houseInfo.houseMoney).attr("style","pointer-events: none;background-color: #eee;");
-                }else{
+                if (Feng.isNotEmptyStr(houseInfo)) {
+                    $("#realEstateNo").val(houseInfo.realEstateNo).attr("style", "pointer-events: none;background-color: #eee;");
+                    $("#recordNo").val(houseInfo.recordNo).attr("style", "pointer-events: none;background-color: #eee;");
+                    $("#houseAddress").val(houseInfo.houseAddress).attr("style", "pointer-events: none;background-color: #eee;");
+                    $("#houseArea").val(houseInfo.houseArea).attr("style", "pointer-events: none;background-color: #eee;");
+                    $("#recordTime").val(houseInfo.recordTime).attr("style", "pointer-events: none;background-color: #eee;");
+                    $("#houseMoney").val(houseInfo.houseMoney).attr("style", "pointer-events: none;background-color: #eee;");
+                } else {
                     $("#realEstateNo").val("").removeAttr("style");
                     $("#recordNo").val("").attr("style");
                     $("#houseAddress").val("").attr("style");
@@ -234,15 +236,15 @@ HousepurchaseInfoDlg.nameChange = function(){
                     $("#recordTime").val("").attr("style");
                     $("#houseMoney").val("").attr("style");
                 }
-            }else{
+            } else {
                 $("#talentId,#cardType,#idCard,#provinceCode,#cityCode,#countyCode,#street,#phone,#bank,#bankNumber,#bankNetwork,#bankAccount,#talentArrange,#identifyCondition,#identifyConditionName,#identifyGetTime").val("");
                 Feng.info(data.msg);
             }
-        },function(data){
+        }, function (data) {
             Feng.error("查询失败!" + data.responseJSON.message + "!");
         });
-        ajax.set("year",$("#year").val())
-        ajax.set("declareType",declareType)
+        ajax.set("year", $("#year").val())
+        ajax.set("declareType", declareType)
         ajax.start();
     }
 }
@@ -250,49 +252,50 @@ HousepurchaseInfoDlg.nameChange = function(){
 /**
  * 添加未成年子女
  */
-HousepurchaseInfoDlg.addChild = function(){
+HousepurchaseInfoDlg.addChild = function () {
     var options = $("#cardType").html();
     $("#childData").append(
-        '<div class="col-sm-12">\n' +
+            '<div class="col-sm-12">\n' +
             '<input type="hidden"  name="id"/>\n' +
-            '<input type="hidden" name="pId"/>'+
+            '<input type="hidden" name="pId"/>' +
             '<div class="rowGroup col-sm-3">\n' +
-                '<input type="text" class="form-control" name="childName" placeholder="未成年子女姓名"/>\n' +
+            '<input type="text" class="form-control" name="childName" placeholder="未成年子女姓名"/>\n' +
             '</div>\n' +
             '<div class="rowGroup col-sm-3">\n' +
-                '<select class="form-control" name="childCardType" placeholder="未成年子女证件类型">\n' +
-                        options+
-                '</select>\n' +
+            '<select class="form-control" name="childCardType" placeholder="未成年子女证件类型">\n' +
+            options +
+            '</select>\n' +
             '</div>\n' +
             '<div class="rowGroup col-sm-3">\n' +
-                '<input type="text" class="form-control" name="childIdCard" placeholder="未成年子女证件号码"/>\n' +
+            '<input type="text" class="form-control" name="childIdCard" placeholder="未成年子女证件号码"/>\n' +
             '</div>\n' +
             '<div class="add-btn"  onclick="HousepurchaseInfoDlg.addChild()"></div>\n' +
-            '<div class="reduce"  onclick="HousepurchaseInfoDlg.reduceChild(this)"></div>'+
-        '</div>');
+            '<div class="reduce"  onclick="HousepurchaseInfoDlg.reduceChild(this)"></div>' +
+            '</div>');
 }
 
 /**
  * 删除子女信息
  */
-HousepurchaseInfoDlg.reduceChild = function(context){
+HousepurchaseInfoDlg.reduceChild = function (context) {
     var id = $(context).parent().find("input[name='id']").val();
-    if(Feng.isEmptyStr(id)){
+    if (Feng.isEmptyStr(id)) {
         $(context).parent().remove();
-    }else{
-        if(!validateIsEdit())return;
+    } else {
+        if (!validateIsEdit())
+            return;
         var operation = function () {
-            var ajax = new $ax(Feng.ctxPath + "/api/housepurchase/deleteChildren", function(data){
-                if(data.code == 200){
+            var ajax = new $ax(Feng.ctxPath + "/api/housepurchase/deleteChildren", function (data) {
+                if (data.code == 200) {
                     $(context).parent().remove();
                     Feng.success(data.msg);
-                }else{
+                } else {
                     Feng.info(data.msg);
                 }
-            },function(data){
+            }, function (data) {
                 Feng.error("删除失败!" + data.responseJSON.message + "!");
             });
-            ajax.set("id",id);
+            ajax.set("id", id);
             ajax.start();
         }
         Feng.confirm("删除后无法恢复,确认删除吗?", operation);
@@ -302,54 +305,54 @@ HousepurchaseInfoDlg.reduceChild = function(context){
 /**
  * 提交添加
  */
-HousepurchaseInfoDlg.addSubmit = function() {
+HousepurchaseInfoDlg.addSubmit = function () {
     var id = $("#id").val();
-    if(Feng.isNotEmptyStr(id)){
+    if (Feng.isNotEmptyStr(id)) {
         HousepurchaseInfoDlg.editSubmit(1);
         return;
     }
     this.clearData();
     this.collectData();
-    if(!HousepurchaseInfoDlg.validate()){
-        return ;
+    if (!HousepurchaseInfoDlg.validate()) {
+        return;
     }
-    if(Feng.isNotEmptyStr(this.housepurchaseInfoData.houseMoney) && !/^([1-9][0-9]*)+(\.[0-9]{0,10})?$/.test(this.housepurchaseInfoData.houseMoney)){
+    if (Feng.isNotEmptyStr(this.housepurchaseInfoData.houseMoney) && !/^([1-9][0-9]*)+(\.[0-9]{0,10})?$/.test(this.housepurchaseInfoData.houseMoney)) {
         Feng.info("房屋成交金额格式不正确!");
-        return ;
+        return;
     }
-    if(Feng.isNotEmptyStr(this.housepurchaseInfoData.houseArea) && !/^([1-9][0-9]*)+(\.[0-9]{0,10})?$/.test(this.housepurchaseInfoData.houseArea)){
+    if (Feng.isNotEmptyStr(this.housepurchaseInfoData.houseArea) && !/^([1-9][0-9]*)+(\.[0-9]{0,10})?$/.test(this.housepurchaseInfoData.houseArea)) {
         Feng.info("房屋建筑面积格式不正确!");
-        return ;
+        return;
     }
-    if(this.housepurchaseInfoData.declareObject == 2 || this.housepurchaseInfoData.declareObject == 3){
+    if (this.housepurchaseInfoData.declareObject == 2 || this.housepurchaseInfoData.declareObject == 3) {
         Feng.info("此种申报对象请通过线下申报,系统不支持旧政策申报流程!");
-        return ;
+        return;
     }
     //提交信息
     var child = new Array();
     var error = "";
     $("#childData .col-sm-12").each(function (index) {
-        var id 	= $(this).find("input[name='id']").val();
+        var id = $(this).find("input[name='id']").val();
         var pId = $(this).find("input[name='pId']").val();
         var childName = $(this).find("input[name='childName']").val();
         var childCardType = $(this).find("select[name='childCardType']").val();
         var childIdCard = $(this).find("input[name='childIdCard']").val();
-        if (Feng.isNotEmptyStr(id) || Feng.isNotEmptyStr(pId) || Feng.isNotEmptyStr(childName) || Feng.isNotEmptyStr(childCardType) || Feng.isNotEmptyStr(childIdCard)){
-            if(Feng.isEmptyStr(childName)){
-                error =  error + "第"+ (index + 1) + "行未成年子女姓名为空;\n";
+        if (Feng.isNotEmptyStr(id) || Feng.isNotEmptyStr(pId) || Feng.isNotEmptyStr(childName) || Feng.isNotEmptyStr(childCardType) || Feng.isNotEmptyStr(childIdCard)) {
+            if (Feng.isEmptyStr(childName)) {
+                error = error + "第" + (index + 1) + "行未成年子女姓名为空;\n";
             }
-            if(Feng.isEmptyStr(childCardType)){
-                error =  error + "第"+ (index + 1) + "行未成年子女证件类型为空;\n";
+            if (Feng.isEmptyStr(childCardType)) {
+                error = error + "第" + (index + 1) + "行未成年子女证件类型为空;\n";
             }
-            if(Feng.isEmptyStr(childIdCard)){
-                error =  error + "第"+ (index + 1) + "行未成年子女证件号码为空;\n";
+            if (Feng.isEmptyStr(childIdCard)) {
+                error = error + "第" + (index + 1) + "行未成年子女证件号码为空;\n";
             }
-            child.push({"id":id,"pId":pId,"name":childName,"cardType":childCardType,"idCard":childIdCard});
+            child.push({"id": id, "pId": pId, "name": childName, "cardType": childCardType, "idCard": childIdCard});
         }
     });
     this.housepurchaseInfoData['childList'] = child;
-    var ajax = new $ax(Feng.ctxPath + "/api/housepurchase/add", function(data){
-        if(data.code == 200){
+    var ajax = new $ax(Feng.ctxPath + "/api/housepurchase/add", function (data) {
+        if (data.code == 200) {
             var obj = data.obj;
             var childList = obj.childList;
             Feng.success(data.msg);
@@ -357,12 +360,12 @@ HousepurchaseInfoDlg.addSubmit = function() {
             $("#type").val(obj.type);
             $("#fileLi").removeAttr("style");
             $("#checkState").val(obj.checkState);
-            $("#talentId").prop("disabled",true).trigger("chosen:updated");
+            $("#talentId").prop("disabled", true).trigger("chosen:updated");
             HousepurchaseInfoDlg.initChildData(childList);
-        }else{
+        } else {
             Feng.info(data.msg);
         }
-    },function(data){
+    }, function (data) {
         Feng.error("添加失败!" + data.responseJSON.message + "!");
     });
     ajax.setcontentType("application/json;charset=utf-8");
@@ -373,54 +376,55 @@ HousepurchaseInfoDlg.addSubmit = function() {
 /**
  * 提交修改
  */
-HousepurchaseInfoDlg.editSubmit = function(type) {
+HousepurchaseInfoDlg.editSubmit = function (type) {
     this.clearData();
     this.collectData();
-    if(!validateIsEdit())return;
-    if(!HousepurchaseInfoDlg.validate()){           //校验
-        return ;
+    if (!validateIsEdit())
+        return;
+    if (!HousepurchaseInfoDlg.validate()) {           //校验
+        return;
     }
-    if(this.housepurchaseInfoData.declareObject == 2 || this.housepurchaseInfoData.declareObject == 3){
+    if (this.housepurchaseInfoData.declareObject == 2 || this.housepurchaseInfoData.declareObject == 3) {
         Feng.info("此种申报对象请通过线下申报,系统不支持旧政策申报流程!");
-        return ;
+        return;
     }
     //提交信息
     var child = new Array();
     var error = "";
     $("#childData .col-sm-12").each(function (index) {
-        var id 	= $(this).find("input[name='id']").val();
+        var id = $(this).find("input[name='id']").val();
         var pId = $(this).find("input[name='pId']").val();
         var childName = $(this).find("input[name='childName']").val();
         var childCardType = $(this).find("select[name='childCardType']").val();
         var childIdCard = $(this).find("input[name='childIdCard']").val();
-        if (Feng.isNotEmptyStr(id) || Feng.isNotEmptyStr(pId) || Feng.isNotEmptyStr(childName) || Feng.isNotEmptyStr(childCardType) || Feng.isNotEmptyStr(childIdCard)){
-            if(Feng.isEmptyStr(childName)){
-                error =  error + "第"+ (index + 1) + "行未成年子女姓名为空;\n";
+        if (Feng.isNotEmptyStr(id) || Feng.isNotEmptyStr(pId) || Feng.isNotEmptyStr(childName) || Feng.isNotEmptyStr(childCardType) || Feng.isNotEmptyStr(childIdCard)) {
+            if (Feng.isEmptyStr(childName)) {
+                error = error + "第" + (index + 1) + "行未成年子女姓名为空;\n";
             }
-            if(Feng.isEmptyStr(childCardType)){
-                error =  error + "第"+ (index + 1) + "行未成年子女证件类型为空;\n";
+            if (Feng.isEmptyStr(childCardType)) {
+                error = error + "第" + (index + 1) + "行未成年子女证件类型为空;\n";
             }
-            if(Feng.isEmptyStr(childIdCard)){
-                error =  error + "第"+ (index + 1) + "行未成年子女证件号码为空;\n";
+            if (Feng.isEmptyStr(childIdCard)) {
+                error = error + "第" + (index + 1) + "行未成年子女证件号码为空;\n";
             }
-            child.push({"id":id,"pId":pId,"name":childName,"cardType":childCardType,"idCard":childIdCard});
+            child.push({"id": id, "pId": pId, "name": childName, "cardType": childCardType, "idCard": childIdCard});
         }
     });
     this.housepurchaseInfoData['childList'] = child;
     //提交信息
-    var ajax = new $ax(Feng.ctxPath + "/api/housepurchase/update", function(data){
-        if(data.code == 200){
-            if(type == 1){
+    var ajax = new $ax(Feng.ctxPath + "/api/housepurchase/update", function (data) {
+        if (data.code == 200) {
+            if (type == 1) {
                 var childList = data.obj.childList;
                 Feng.success(data.msg);
                 HousepurchaseInfoDlg.initChildData(childList);
-            }else{
+            } else {
                 HousepurchaseInfoDlg.submitToCheck();
             }
-        }else{
+        } else {
             Feng.info(data.msg);
         }
-    },function(data){
+    }, function (data) {
         Feng.error("修改失败!" + data.responseJSON.message + "!");
     });
     ajax.setcontentType("application/json;charset=utf-8");
@@ -432,53 +436,53 @@ HousepurchaseInfoDlg.editSubmit = function(type) {
  * 初始化子女信息
  * @param list
  */
-HousepurchaseInfoDlg.initChildData = function(list){
+HousepurchaseInfoDlg.initChildData = function (list) {
     var options = $("#cardType").html();
     var html = "";
-    for(var key in list) {
+    for (var key in list) {
         html = html +
-            '<div class="col-sm-12">\n' +
-            '<input type="hidden"  name="id" value="'+list[key].id+'"/>\n' +
-            '<input type="hidden" name="pId" value="'+list[key].pId+'"/>' +
-            '<div class="rowGroup col-sm-3">\n' +
-            '<input type="text" class="form-control" name="childName" value="'+list[key].name+'" placeholder="未成年子女姓名"/>\n' +
-            '</div>\n' +
-            '<div class="rowGroup col-sm-3">\n' +
-            '<select class="form-control" name="childCardType" value="'+list[key].cardType+'" placeholder="未成年子女证件类型">\n' +
-            options +
-            '</select>\n' +
-            '</div>\n' +
-            '<div class="rowGroup col-sm-3">\n' +
-            '<input type="text" class="form-control" name="childIdCard" value="'+list[key].idCard+'" placeholder="未成年子女证件号码"/>\n' +
-            '</div>\n' +
-            '<div class="add-btn"  onclick="HousepurchaseInfoDlg.addChild()"></div>\n' +
-            '<div class="reduce"  onclick="HousepurchaseInfoDlg.reduceChild(this)"></div>'+
-            '</div>';
+                '<div class="col-sm-12">\n' +
+                '<input type="hidden"  name="id" value="' + list[key].id + '"/>\n' +
+                '<input type="hidden" name="pId" value="' + list[key].pId + '"/>' +
+                '<div class="rowGroup col-sm-3">\n' +
+                '<input type="text" class="form-control" name="childName" value="' + list[key].name + '" placeholder="未成年子女姓名"/>\n' +
+                '</div>\n' +
+                '<div class="rowGroup col-sm-3">\n' +
+                '<select class="form-control" name="childCardType" value="' + list[key].cardType + '" placeholder="未成年子女证件类型">\n' +
+                options +
+                '</select>\n' +
+                '</div>\n' +
+                '<div class="rowGroup col-sm-3">\n' +
+                '<input type="text" class="form-control" name="childIdCard" value="' + list[key].idCard + '" placeholder="未成年子女证件号码"/>\n' +
+                '</div>\n' +
+                '<div class="add-btn"  onclick="HousepurchaseInfoDlg.addChild()"></div>\n' +
+                '<div class="reduce"  onclick="HousepurchaseInfoDlg.reduceChild(this)"></div>' +
+                '</div>';
     }
-    if(Feng.isEmptyStr(html)){
+    if (Feng.isEmptyStr(html)) {
         html = html +
-            '<div class="col-sm-12">\n' +
-            '<input type="hidden"  name="id" />\n' +
-            '<input type="hidden" name="pId" />' +
-            '<div class="rowGroup col-sm-3">\n' +
-            '<input type="text" class="form-control" name="childName"  placeholder="未成年子女姓名"/>\n' +
-            '</div>\n' +
-            '<div class="rowGroup col-sm-3">\n' +
-            '<select class="form-control" name="childCardType" placeholder="未成年子女证件类型">\n' +
-            options +
-            '</select>\n' +
-            '</div>\n' +
-            '<div class="rowGroup col-sm-3">\n' +
-            '<input type="text" class="form-control" name="childIdCard"  placeholder="未成年子女证件号码"/>\n' +
-            '</div>\n' +
-            '<div class="add-btn"  onclick="HouseRentingInfoDlg.addChild()"></div>\n' +
-            '</div>';
+                '<div class="col-sm-12">\n' +
+                '<input type="hidden"  name="id" />\n' +
+                '<input type="hidden" name="pId" />' +
+                '<div class="rowGroup col-sm-3">\n' +
+                '<input type="text" class="form-control" name="childName"  placeholder="未成年子女姓名"/>\n' +
+                '</div>\n' +
+                '<div class="rowGroup col-sm-3">\n' +
+                '<select class="form-control" name="childCardType" placeholder="未成年子女证件类型">\n' +
+                options +
+                '</select>\n' +
+                '</div>\n' +
+                '<div class="rowGroup col-sm-3">\n' +
+                '<input type="text" class="form-control" name="childIdCard"  placeholder="未成年子女证件号码"/>\n' +
+                '</div>\n' +
+                '<div class="add-btn"  onclick="HouseRentingInfoDlg.addChild()"></div>\n' +
+                '</div>';
     }
     $("#childData").empty().append(html);
     $("#childData select").each(function () {
         $(this).val($(this).attr("value"))
     })
-    if(list == null){
+    if (list == null) {
         HousepurchaseInfoDlg.addChild();
     }
 }
@@ -487,17 +491,18 @@ HousepurchaseInfoDlg.initChildData = function(list){
 /**
  * 提交审核
  */
-HousepurchaseInfoDlg.submitToCheck = function(){
-    if(!validateIsEdit())return;
+HousepurchaseInfoDlg.submitToCheck = function () {
+    if (!validateIsEdit())
+        return;
     var ajax = new $ax(Feng.ctxPath + "/api/housepurchase/valiateIsSubmit", function (data) {
-        if(data.code == 200){
-            var operation = function() {
+        if (data.code == 200) {
+            var operation = function () {
                 var ajax = new $ax(Feng.ctxPath + "/api/housepurchase/submitToCheck", function (data) {
-                    if(data.code==200){
+                    if (data.code == 200) {
                         Feng.success(data.msg);
                         window.parent.Housepurchase.table.refresh();
                         HousepurchaseInfoDlg.close();
-                    }else{
+                    } else {
                         Feng.error(data.msg);
                     }
                 }, function (data) {
@@ -507,14 +512,14 @@ HousepurchaseInfoDlg.submitToCheck = function(){
                 ajax.start();
             }
             Feng.confirm("请确认基础信息已核对无误,相应附件已上传,一旦提交,无法修改", operation);
-        }else{
+        } else {
             Feng.error(data.msg);
         }
     }, function (data) {
         Feng.error("查询失败!" + data.responseJSON.message + "!");
     });
-    ajax.set("type",CONFIG.project_house);
-    ajax.set("id",$("#id").val())
+    ajax.set("type", CONFIG.project_house);
+    ajax.set("id", $("#id").val())
     ajax.start();
 }
 
@@ -524,7 +529,7 @@ HousepurchaseInfoDlg.submitToCheck = function(){
 /**
  * 申报对象级联
  */
-HousepurchaseInfoDlg.declareObjChange = function(){
+HousepurchaseInfoDlg.declareObjChange = function () {
     var declareObj = $("#declareObject").val();
     switch (declareObj) {
         case "":
@@ -543,25 +548,25 @@ HousepurchaseInfoDlg.declareObjChange = function(){
 /**
  * 根据申报类型
  */
-HousepurchaseInfoDlg.typeChange = function(){
+HousepurchaseInfoDlg.typeChange = function () {
     var type = $("#declareType").val();
-    if(type == null){
-        $("#realEstateNo,#recordNo,#houseAddress,#houseArea,#recordTime,#houseMoney,#number,#isEnjoyOther").val("").parent().css("display","none");
+    if (type == null) {
+        $("#realEstateNo,#recordNo,#houseAddress,#houseArea,#recordTime,#houseMoney,#number,#isEnjoyOther").val("").parent().css("display", "none");
     }
-    if(type == 1){
-        $("#realEstateNo,#recordNo,#houseAddress,#houseArea,#recordTime,#houseMoney,#number,#isEnjoyOther").parent().css("display","block");
+    if (type == 1) {
+        $("#realEstateNo,#recordNo,#houseAddress,#houseArea,#recordTime,#houseMoney,#number,#isEnjoyOther").parent().css("display", "block");
     }
-    if(type == 2){
-        $("#realEstateNo,#recordNo,#houseAddress,#houseArea,#recordTime,#houseMoney,#number,#isEnjoyOther").val("").parent().css("display","none");
+    if (type == 2) {
+        $("#realEstateNo,#recordNo,#houseAddress,#houseArea,#recordTime,#houseMoney,#number,#isEnjoyOther").val("").parent().css("display", "none");
     }
 }
 
 /**
  * 获取认定条件
  */
-HousepurchaseInfoDlg.getIdentifyCondition = function(){
+HousepurchaseInfoDlg.getIdentifyCondition = function () {
     var level = $("#talentArrange").val();
-    if(level==null||level==''){
+    if (level == null || level == '') {
         $("#identifyCondition").empty();
         return;
     }
@@ -570,7 +575,7 @@ HousepurchaseInfoDlg.getIdentifyCondition = function(){
         "displayCode": "id",
         "displayName": "name",
         "type": "GET",
-        "url": Feng.ctxPath + "/api/common/findIdentifyConditionByLevel?talentLevel="+level
+        "url": Feng.ctxPath + "/api/common/findIdentifyConditionByLevel?talentLevel=" + level
     });
 }
 
@@ -581,41 +586,41 @@ HousepurchaseInfoDlg.getIdentifyCondition = function(){
  * @param row
  * @returns {string}
  */
-function validUploadButton(type,row,fileId){
+function validUploadButton(type, row, fileId) {
     var files = $("#files").val();
     var checkState = $("#checkState").val();
-    if(Feng.isEmptyStr(checkState)||checkState==1 || (checkState == 10 && files.indexOf(row.id)!=-1)){
-        return type == 1?
-            "<button type='button' onclick=\"checkFile(this,'"+row.id+"','"+null+"')\" style='margin-right: 10px' class=\"btn btn-xs btn-info\">" +
-            "<i class=\"fa fa-upload\"></i>上传" +
-            "</button>"
-            :
-            "<button type=\'button\' onclick=\"checkFile(this,'"+row.id+"','"+fileId+"')\" style=\'margin-right: 10px\' class=\"btn btn-xs btn-info\">" +
-            "<i class=\"fa fa-paste\"></i>修改" +
-            "</button>" +
-            "<button type='button' onclick=\"deleteFile('"+fileId+"','"+CONFIG.project_house+"')\" class=\"btn btn-xs btn-danger\">" +
-            "<i class=\"fa fa-times\"></i>删除" +
-            "</button>";
-    }else{
-        return type == 1?"":"" ;
+    if (Feng.isEmptyStr(checkState) || checkState == 1 || (checkState == 10 && files.indexOf(row.id) != -1)) {
+        return type == 1 ?
+                "<button type='button' onclick=\"checkFile(this,'" + row.id + "','" + null + "')\" style='margin-right: 10px' class=\"btn btn-xs btn-info\">" +
+                "<i class=\"fa fa-upload\"></i>上传" +
+                "</button>"
+                :
+                "<button type=\'button\' onclick=\"checkFile(this,'" + row.id + "','" + fileId + "')\" style=\'margin-right: 10px\' class=\"btn btn-xs btn-info\">" +
+                "<i class=\"fa fa-paste\"></i>修改" +
+                "</button>" +
+                "<button type='button' onclick=\"deleteFile('" + fileId + "','" + CONFIG.project_house + "')\" class=\"btn btn-xs btn-danger\">" +
+                "<i class=\"fa fa-times\"></i>删除" +
+                "</button>";
+    } else {
+        return type == 1 ? "" : "";
     }
 }
 
-function validateIsEdit(){
+function validateIsEdit() {
     var id = $("#id").val();
     var checkState = $("#checkState").val();
-    if(Feng.isEmptyStr(id)){
+    if (Feng.isEmptyStr(id)) {
         Feng.info("请先填写基础信息并上传附件");
         return false;
     }
-    if(checkState != 1 && checkState != 10){
-        if(checkState==-1){
+    if (checkState != 1 && checkState != 10) {
+        if (checkState == -1) {
             Feng.error("您的申报审核不通过,无法修改");
             return false;
-        }else if(checkState>=40){
+        } else if (checkState >= 40) {
             Feng.error("您的申报已审核通过,无法修改");
             return false;
-        }else{
+        } else {
             Feng.error("您的申报正在审核中,请耐心等待");
             return false;
         }
@@ -627,20 +632,21 @@ function validateIsEdit(){
 HousepurchaseInfoDlg.setNoChangeField = function () {
     var checkState = $("#checkState").val();
     var fields = $("#fields").val();
-    if(checkState==10){
+    if (checkState == 10) {
         $("#basicData input,textarea").each(function () {
-            $(this).attr("readonly","readonly");
+            $(this).attr("readonly", "readonly");
         });
         $("#basicData select").each(function () {
-            $(this).attr("disabled","disabled");
+            $(this).attr("disabled", "disabled");
         });
-        if(fields!=null && fields!=''){
+        if (fields != null && fields != '') {
             var arr = fields.split(",");
-            for(var key in arr){
+            for (var key in arr) {
                 var name = $("#" + arr[key]).prop("tagName");
-                if(name=='select' || name=='SELECT'){
+                if (name == 'select' || name == 'SELECT') {
                     $("#" + arr[key]).removeAttr("disabled");
-                }if(name=="input" || name=='textarea' || name=="INPUT" || name=='TEXTAREA'){
+                }
+                if (name == "input" || name == 'textarea' || name == "INPUT" || name == 'TEXTAREA') {
                     $("#" + arr[key]).removeAttr("readonly");
                 }
             }
@@ -651,26 +657,28 @@ HousepurchaseInfoDlg.setNoChangeField = function () {
 /**
  * 获取房产信息
  */
-HousepurchaseInfoDlg.getHouseInfo = function(){
+HousepurchaseInfoDlg.getHouseInfo = function () {
     var idCard = $("#idCard").val();
     var spouseIdcard = $("#spouseIdcard").val();
-    if(Feng.isEmptyStr(idCard)){
-        Feng.info("请选择申报人");return ;
+    if (Feng.isEmptyStr(idCard)) {
+        Feng.info("请选择申报人");
+        return;
     }
-    var ajax = new $ax(Feng.ctxPath + "/api/housepurchase/getHouseInfo", function(data){
-        if(data.code == 200){
+    var ajax = new $ax(Feng.ctxPath + "/api/housepurchase/getHouseInfo", function (data) {
+        if (data.code == 200) {
             var houseInfo = data.obj;
-            if(houseInfo.count>=5){
-                Feng.info("当前申报人(或配偶)所关联房产已享受5次补贴,无法再次申报");return;
+            if (houseInfo.count >= 5) {
+                Feng.info("当前申报人(或配偶)所关联房产已享受5次补贴,无法再次申报");
+                return;
             }
-            if(Feng.isNotEmptyStr(houseInfo)){
-                $("#realEstateNo").val(houseInfo.realEstateNo).attr("style","pointer-events: none;background-color: #eee;");
-                $("#recordNo").val(houseInfo.recordNo).attr("style","pointer-events: none;background-color: #eee;");
-                $("#houseAddress").val(houseInfo.houseAddress).attr("style","pointer-events: none;background-color: #eee;");
-                $("#houseArea").val(houseInfo.houseArea).attr("style","pointer-events: none;background-color: #eee;");
-                $("#recordTime").val(houseInfo.recordTime).attr("style","pointer-events: none;background-color: #eee;");
-                $("#houseMoney").val(houseInfo.houseMoney).attr("style","pointer-events: none;background-color: #eee;");
-            }else{
+            if (Feng.isNotEmptyStr(houseInfo)) {
+                $("#realEstateNo").val(houseInfo.realEstateNo).attr("style", "pointer-events: none;background-color: #eee;");
+                $("#recordNo").val(houseInfo.recordNo).attr("style", "pointer-events: none;background-color: #eee;");
+                $("#houseAddress").val(houseInfo.houseAddress).attr("style", "pointer-events: none;background-color: #eee;");
+                $("#houseArea").val(houseInfo.houseArea).attr("style", "pointer-events: none;background-color: #eee;");
+                $("#recordTime").val(houseInfo.recordTime).attr("style", "pointer-events: none;background-color: #eee;");
+                $("#houseMoney").val(houseInfo.houseMoney).attr("style", "pointer-events: none;background-color: #eee;");
+            } else {
                 $("#realEstateNo").val("").removeAttr("style");
                 $("#recordNo").val("").attr("style");
                 $("#houseAddress").val("").attr("style");
@@ -678,59 +686,62 @@ HousepurchaseInfoDlg.getHouseInfo = function(){
                 $("#recordTime").val("").attr("style");
                 $("#houseMoney").val("").attr("style");
             }
-        }else{
+        } else {
             $("#talentId,#cardType,#idCard,#provinceCode,#cityCode,#countyCode,#street,#phone,#bank,#bankNumber,#bankNetwork,#bankAccount,#talentArrange,#identifyCondition,#identifyConditionName,#identifyGetTime").val("");
             Feng.info(data.msg);
         }
-    },function(data){
+    }, function (data) {
         Feng.error("查询失败!" + data.responseJSON.message + "!");
     });
-    ajax.set("idCard",idCard);
-    ajax.set("spouseIdcard",spouseIdcard);
+    ajax.set("idCard", idCard);
+    ajax.set("spouseIdcard", spouseIdcard);
     ajax.start();
 }
 
 
-$(function() {
+$(function () {
     Feng.initValidatorTip("houseInfoForm", HousepurchaseInfoDlg.validateFields);
     Feng.addAjaxSelect({
-        "id": 'talentId',
+        "id": 'name',
         "displayCode": "id",
         "displayName": "name",
         "type": "GET",
-        "url": Feng.ctxPath + "/api/talentInfo/findTalentByEnterpriseInLibrary?type=2&year="+$("#year").val()
+        "url": Feng.ctxPath + "/enterprise/talent/findTalentByEnterpriseInLibrary?type=2&year=" + $("#year").val()
     });
     //批量加载字典表数据
     var arr = [
-        {"name":"cardType","code":"un_cardType"},
-        {"name":"spouseCardType","code":"un_cardType"},
-        {"name":"childCardType","code":"un_cardType"},
-        {"name":"marryStatus","code":"un_marryStatus"},
-        {"name":"talentArrange","code":"un_talentLevel"},
-        {"name":"street","code":"un_street"}];
+        {"name": "cardType", "code": "card_type"},
+        {"name": "spouseCardType", "code": "card_type"},
+        {"name": "childCardType", "code": "card_type"},
+        {"name": "marryStatus", "code": "marry_status"},
+        {"name": "talentArrange", "code": "talent_arrange"},
+        {"name": "street", "code": "street"}];
     Feng.findChildDictBatch(JSON.stringify(arr));
     $("select[name='childCardType']").append($("#cardType").html());
     $(".other_talentArrange").empty().append($("#talentArrange").html());
     loadProvince();
     //加载时间控件
-    $(".date").each(function(){laydate.render({
-            elem: this,type: 'date',trigger: 'click'
+    $(".date").each(function () {
+        laydate.render({
+            elem: this, type: 'date', trigger: 'click'
         });
     });
     var id = $("#id").val();
-    if(Feng.isNotEmptyStr(id)){
-        $("select").each(function () {$(this).val($(this).attr("value")).trigger("change");});
+    if (Feng.isNotEmptyStr(id)) {
+        $("select").each(function () {
+            $(this).val($(this).attr("value")).trigger("change");
+        });
         $("#fileLi").removeAttr("style");
-        Feng.getCheckLog("logTable",{"type":CONFIG.project_house,"mainId":id,"typeFileId":"","active":1})
-    }else{
-        $("#fileLi").attr("style","pointer-events: none");
-        $("#talentId").on('chosen:ready', function(e, params) {
-            $(".chosen-container-single .chosen-single").css("padding","4px 0px 0px 4px");
+        Feng.getCheckLog("logTable", {"type": CONFIG.project_house, "mainId": id, "typeFileId": "", "active": 1})
+    } else {
+        $("#fileLi").attr("style", "pointer-events: none");
+        $("#talentId").on('chosen:ready', function (e, params) {
+            $(".chosen-container-single .chosen-single").css("padding", "4px 0px 0px 4px");
         });
         $("#talentId").chosen({
-            search_contains:true,       //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
+            search_contains: true,       //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
             disable_search: false,
-            width:"100%",
+            width: "100%",
             enable_split_word_search: true
         });
     }
@@ -748,7 +759,7 @@ $(function() {
         "hideEasing": "linear",
         "showMethod": "fadeIn",
         "hideMethod": "fadeOut",
-        "tapToDismiss":true
+        "tapToDismiss": true
     };
     toastr.success("免租入住仅人才标签为在站博士后的人才申报!!!");
 });