123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 |
- /**
- * 初始化购房补贴详情对话框
- */
- var HousepurchaseInfoDlg = {
- housepurchaseInfoData: {},
- validateFields: {
- enterpriseId: {validators: {notEmpty: {message: '所属企业不能为空'}}},
- name: {validators: {notEmpty: {message: '姓名不能为空'}}},
- declareObject: {validators: {notEmpty: {message: '申报对象不能为空'}}},
- declareType: {validators: {notEmpty: {message: '申报类型不能为空'}}},
- cardType: {validators: {notEmpty: {message: '证件类型不能为空'}}},
- idCard: {validators: {notEmpty: {message: '证件号码不能为空'}}},
- marryStatus: {validators: {notEmpty: {message: '婚姻状态不能为空'}}},
- // houseAddress: {validators: {notEmpty: {message: '房屋坐落地址不能为空'}}},
- // houseArea: {validators: {notEmpty: {message: '房源购置面积不能为空'}}},
- // recordTime: {validators: {notEmpty: {message: '商品房购房合同备案时间不能为空'}}},
- // houseMoney: {validators: {notEmpty: {message: '房屋成交金额不能为空'}}},
- // isEnjoyOther: {validators: {notEmpty: {message: '是否享受我市其他政策不能为空'}}},
- // realEstateNo: {
- // validators: {
- // notEmpty: {
- // message: '不动产权证编号不能为空'
- // },
- // regexp: {
- // regexp: /^闽\([0-9]{4}\)晋江市不动产权第\([0-9]+\)号$/,
- // message: "不动产权证编号格式不正确"
- // }
- // }
- // },
- // recordNo: {
- // validators: {
- // notEmpty: {
- // message: '备案合同编号不能为空'
- // },
- // regexp: {
- // regexp: /^\d+$/,
- // message: "备案合同编号格式不正确"
- // }
- // }
- // },
- phone: {
- validators: {
- notEmpty: {
- message: '手机号码不能为空'
- },
- regexp: {
- regexp: /0?(13|14|15|16|17|18|19)[0-9]{9}/,
- message: "手机号码格式不正确"
- }
- }
- },
- bank: {
- validators: {
- notEmpty: {
- message: '开户银行不能为空'
- },
- regexp: {
- regexp: /^[\u4e00-\u9fa5]*银行$/,
- message: "开户银行格式不正确"
- }
- }
- },
- bankAccount: {
- validators: {
- notEmpty: {
- message: '银行账号不能为空'
- },
- regexp: {
- regexp: /^\d+$/,
- message: "银行账号格式不正确"
- }
- }
- },
- // number:{
- // validators: {
- // notEmpty: {
- // message: '享受第几次购房补贴不能为空'
- // },
- // regexp: {
- // regexp: /^[1-5]$/,
- // message: "享受第几次购房补贴格式不正确"
- // }
- // }
- // }
- }
- };
- /**
- * 清除数据
- */
- HousepurchaseInfoDlg.clearData = function () {
- this.housepurchaseInfoData = {};
- }
- /**
- * 设置对话框中的数据
- * @param key 数据的名称
- * @param val 数据的具体值
- */
- HousepurchaseInfoDlg.set = function (key, val) {
- this.housepurchaseInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val;
- return this;
- }
- /**
- * 设置对话框中的数据
- * @param key 数据的名称
- * @param val 数据的具体值
- */
- HousepurchaseInfoDlg.get = function (key) {
- return $("#" + key).val();
- }
- /**
- * 关闭此对话框
- */
- HousepurchaseInfoDlg.close = function () {
- parent.layer.close(window.parent.Housepurchase.layerIndex);
- }
- /**
- * 初始化子女信息
- * @param list
- */
- HousepurchaseInfoDlg.initChildData = function (list) {
- var options = $("#cardType").html();
- var html = "";
- 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>';
- }
- $("#childData").empty().append(html);
- $("#childData select").each(function () {
- $(this).val($(this).attr("value"))
- })
- if (list == null) {
- HousepurchaseInfoDlg.addChild();
- }
- }
- /**
- * 申报对象级联
- */
- HousepurchaseInfoDlg.declareObjChange = function () {
- var declareObj = $("#declareObject").val();
- switch (declareObj) {
- case "":
- break;
- case "1": //新政策中公布入选为晋江市现代产业体系人才后再购房对象
- break;
- case "2": //旧政策中取得购房补贴指标后完成购房,且符合新政策认定标准对象(在库)
- Feng.info("此种对象请通过线下申报,线上不支持旧政策的申报流程!");
- break;
- case "3": //旧政策中取得购房补贴指标后完成购房,且符合新政策认定标准对象(在库)
- Feng.info("此种对象请通过线下申报,线上不支持旧政策的申报流程!");
- break;
- }
- }
- /**
- * 根据申报类型
- */
- 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 == 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");
- }
- }
- /**
- * 获取认定条件
- */
- HousepurchaseInfoDlg.getIdentifyCondition = function () {
- var level = $("#talentArrange").val();
- if (level == null || level == '') {
- $("#identifyCondition").empty();
- return;
- }
- Feng.addAjaxSelect({
- "id": "identifyCondition",
- "displayCode": "id",
- "displayName": "name",
- "type": "GET",
- "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel?level=" + level
- });
- }
- /**
- * 校验是否显示按钮
- * @param type 类型 1-上传按钮,2-修改删除按钮
- * @param row
- * @returns {string}
- */
- 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 ? "" : "";
- }
- }
- $(function () {
- //批量加载字典表数据
- var arr = [
- {"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));
- $(".other_talentArrange").empty().append($("#talentArrange").html());
- loadProvince();
- $("select").each(function () {
- $(this).val($(this).attr("value")).trigger("change");
- });
- var id = $("#id").val();
- Feng.getCheckLog("logTable", {"type": CONFIG.project_house, "mainId": id, "typeFileId": "", "active": 1})
- });
|