| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595 |
- /**
- * 初始化购房补贴详情对话框
- */
- var HousepurchaseInfoDlg = {
- housepurchaseInfoData: {}
- };
- var locked = false;
- /**
- * 关闭此对话框
- */
- HousepurchaseInfoDlg.close = function () {
- parent.layer.close(window.parent.Housepurchase.layerIndex);
- }
- /**
- * 显示初审审核模态框
- */
- HousepurchaseInfoDlg.showFirstCheckModal = function () {
- var process = $("#process").val();
- var ajax = new $ax(Feng.ctxPath + "/admin/house/validateIsCheck", function (data) {
- if (data.code == 200) {
- layer.open({
- type: 1,
- id: "checkModel",
- title: '审核',
- area: ['800px', '450px'], //宽高
- fix: false, //不固定
- shade: 0,
- maxmin: true,
- content: HousepurchaseInfoDlg.createFirstCheckHtml(data.obj.number),
- btn: ['<i class="fa fa-save"></i> 提交', '<i class="fa fa-eraser"></i> 关闭'],
- btnAlign: 'c',
- zIndex: layer.zIndex,
- success: function (layero, index) {
- layer.setTop(layero);
- var obj = data.obj.obj;
- var fileList = data.obj.fileTypeList;
- var html = '';
- for (var key in fileList) {
- html = html + '<ul><li style="width: 100%"><input type="checkbox" value="' + fileList[key].id + '"><span>' + fileList[key].name + '</span></li></ul>';
- }
- $("#field_file").empty().append(html);
- $("#checkForm")[0].reset();
- $("#checkStateFirstModal").val(obj.checkState).trigger("change");
- $("#checkMsgFirst").val(obj.checkMsg);
- if (Feng.isNotEmptyStr(obj.fields)) {
- $("#field_info input").each(function () {
- var arr = obj.fields.split(",");
- for (var key in arr) {
- if ($(this).val() == arr[key])
- this.checked = true;
- }
- });
- }
- if (Feng.isNotEmptyStr(obj.files)) {
- $("#field_file input").each(function () {
- if (obj.files.indexOf($(this).val()) != -1)
- this.checked = true;
- });
- }
- },
- yes: function (index, layero) {
- var checkState = $("#checkStateFirstModal").val();
- var checkMsg = $("#checkMsgFirst").val();
- if (checkState == null || checkState == '') {
- Feng.info("请选择审核状态");
- return;
- }
- if (checkMsg == null || checkMsg == '') {
- Feng.info("请填写审核意见");
- return;
- }
- var fields = '', files = '';
- $("#field_info li input").each(function (index) {
- if ($(this).is(":checked")) {
- fields = fields + $(this).val() + ",";
- }
- });
- $("#field_file li input").each(function (index) {
- if ($(this).is(":checked")) {
- files = files + $(this).val() + ",";
- }
- });
- if (checkState == 2 && fields == '' && files == '') {
- Feng.info("请选择可修改的字段或附件!");
- return;
- }
- if (locked)
- return;
- locked = true;
- var ajax = new $ax(Feng.ctxPath + "/admin/house/check", function (data) {
- if (data.code == 200) {
- layer.close(index);
- Feng.success(data.msg);
- } else {
- Feng.error(data.msg);
- }
- locked = false;
- }, function (data) {
- Feng.error("提交审核失败!" + data.responseJSON.message + "!");
- locked = false;
- });
- ajax.setData({
- "id": $("#id").val(), "checkState": checkState, "checkMsg": checkMsg,
- "process": $("#process").val(), "fields": fields, "files": files
- })
- ajax.start();
- }
- });
- } else {
- Feng.error(data.msg);
- }
- }, function (data) {
- Feng.error("校验失败!" + data.responseJSON.message + "!");
- });
- ajax.setData({"id": $("#id").val(), "process": process, "companyId": $("#companyId").val()})
- ajax.start();
- }
- /**
- * 显示各单位审核页面
- */
- HousepurchaseInfoDlg.showDepCheckModal = function () {
- var process = $("#process").val();
- var ajax = new $ax(Feng.ctxPath + "/admin/house/validateIsCheck", function (data) {
- if (data.code == 200) {
- var company = data.obj.company;
- var obj = data.obj.obj;
- layer.open({
- type: 1,
- id: "checkModel",
- title: company.name + '核查结果录入',
- area: ['800px', '450px'], //宽高
- fix: false, //不固定
- shade: 0,
- maxmin: true,
- content:
- "<form id=\"depForm\" class=\"form-horizontal\">\n" +
- '<div class="form-group" style="margin: 10px;">\n' +
- '<label for="checkMsg" class="control-label" >核查结果备注</label>\n' +
- '<textarea class="form-control" id="hcMsg" placeholder="" rows="6"></textarea>\n' +
- "</div>\n" +
- "</form>",
- btn: ['<i class="fa fa-save"></i> 提交', '<i class="fa fa-eraser"></i> 关闭'],
- btnAlign: 'c',
- zIndex: layer.zIndex,
- success: function (layero, index) {
- layer.setTop(layero);
- if (company.code = CONFIG.COM_ZJJ)
- $("#hcMsg").val(obj.zjjCheckDetail);
- if (company.code = CONFIG.COM_ZRZYJ)
- $("#hcMsg").val(obj.zrzzjCheckDetail);
- if (company.code = CONFIG.COM_MZJ)
- $("#hcMsg").val(obj.mzjCheckDetail);
- },
- yes: function (index, layero) {
- var msg = $("#hcMsg").val();
- if (Feng.isEmptyStr(msg)) {
- Feng.info("请填写核查结果!");
- return;
- }
- var ajax = new $ax(Feng.ctxPath + "/admin/house/depCheck", function (data) {
- if (data.code == 200) {
- layer.close(index);
- Feng.success(data.msg);
- } else {
- Feng.error(data.msg);
- }
- }, function (data) {
- Feng.error("提交审核失败!" + data.responseJSON.message + "!");
- });
- ajax.setData({"id": $("#id").val(), "description": msg, "companyId": company.id})
- ajax.start();
- }
- });
- } else {
- Feng.error(data.msg);
- }
- }, function (data) {
- Feng.error("校验失败!" + data.responseJSON.message + "!");
- });
- ajax.setData({"id": $("#id").val(), "process": process, "companyId": $("#companyId").val()})
- ajax.start();
- }
- /**
- * 显示复核审核页面
- */
- HousepurchaseInfoDlg.showThirdCheckModal = function () {
- var process = $("#process").val();
- var ajax = new $ax(Feng.ctxPath + "/admin/house/validateIsCheck", function (data) {
- if (data.code == 200) {
- layer.open({
- type: 1,
- id: "checkModel",
- title: '审核',
- area: ['800px', '450px'], //宽高
- fix: false, //不固定
- shade: 0,
- maxmin: true,
- content: HousepurchaseInfoDlg.createThirdCheckHtml(),
- btn: ['<i class="fa fa-save"></i> 提交', '<i class="fa fa-eraser"></i> 关闭'],
- btnAlign: 'c',
- zIndex: layer.zIndex,
- success: function (layero, index) {
- layer.setTop(layero);
- $('#toDep').chosen({width: '100%', placeholder_text_multiple: '请选择驳回部门'});
- $("#checkStateFirstModal").val(data.obj.obj.checkState);
- if (data.obj.obj.checkState == 2) {
- $("#toProcessDiv,#toDepDiv").css("display", "block");
- }
- if (data.obj.obj.checkState == 3) {
- $("#cashTypeDiv").css("display", "block");
- }
- $("#checkMsgFirst").val(data.obj.obj.checkMsg);
- $("#toProcess").val(data.obj.obj.toProcess);
- $("#cashType").val(data.obj.obj.cashType).trigger("change");
- if (Feng.isNotEmptyStr(data.obj.obj.toDep)) {
- $("#toDep").val(data.obj.obj.toDep.split(",")).trigger("chosen:updated");
- }
- },
- yes: function (index, layero) {
- var checkState = $("#checkStateFirstModal").val();
- var checkMsg = $("#checkMsgFirst").val();
- var toProcess = $("#toProcess").val();
- var toDep = $("#toDep").val();
- var cashType = $("#cashType").val();
- if (checkState == null || checkState == '') {
- Feng.info("请选择审核状态");
- return;
- }
- if (checkMsg == null || checkMsg == '') {
- Feng.info("请填写审核意见");
- return;
- }
- if (checkState == 2) {
- if (Feng.isEmptyStr(toProcess)) {
- Feng.info("请选择驳回至流程");
- return;
- }
- if (toProcess == 2 && Feng.isEmptyStr(toDep)) {
- Feng.info("请选择驳回单位");
- return;
- }
- }
- if (checkState == 3 && Feng.isEmptyStr(cashType)) {
- Feng.info("请选择兑现状态");
- return;
- }
- var companyCodes = "", cashObjs = "";
- for (var key in toDep) {
- if (Feng.isNotEmptyStr(top[key])) {
- companyCodes = companyCodes + toDep[key] + ",";
- }
- }
- companyCodes = companyCodes.substring(0, companyCodes.length - 1);
- cashObjs = cashObjs.substring(0, cashObjs.length - 1);
- var ajax = new $ax(Feng.ctxPath + "/admin/house/check", function (data) {
- if (data.code == 200) {
- layer.close(index);
- Feng.success(data.msg);
- } else {
- Feng.error(data.msg);
- }
- }, function (data) {
- Feng.error("审核失败!" + data.responseJSON.message + "!");
- });
- ajax.setData({
- "id": $("#id").val(),
- "checkState": checkState,
- "checkMsg": checkMsg,
- "cashType": cashType,
- "process": $("#process").val(),
- "companyId": $("#companyId").val(),
- "toProcess": $("#toProcess").val(),
- "toDep": companyCodes
- });
- ajax.start();
- }
- });
- } else {
- Feng.error(data.msg);
- }
- }, function (data) {
- Feng.error("校验失败!" + data.responseJSON.message + "!");
- });
- ajax.setData({"id": $("#id").val(), "process": process, "companyId": $("#companyId").val()})
- ajax.start();
- }
- /**
- * 公示再审核保存数据
- */
- HousepurchaseInfoDlg.saveDepDataAtAfter = function () {
- }
- /**
- * 公示再审核提交
- */
- HousepurchaseInfoDlg.showAfterCheckModal = function () {
- var process = $("#process").val();
- var ajax = new $ax(Feng.ctxPath + "/admin/house/validateIsCheck", function (data) {
- if (data.code == 200) {
- layer.open({
- type: 1,
- id: "checkModel",
- title: '审核',
- area: ['800px', '450px'], //宽高
- fix: false, //不固定
- shade: 0,
- maxmin: true,
- content: HousepurchaseInfoDlg.createAfterCheckHtml(),
- btn: ['<i class="fa fa-save"></i> 提交', '<i class="fa fa-eraser"></i> 关闭'],
- btnAlign: 'c',
- zIndex: layer.zIndex,
- success: function (layero, index) {
- layer.setTop(layero);
- var housepurchase = data.obj.housepurchase;
- $("#decideMoneyDetail").val(housepurchase.decideMoneyDetail);
- $("#realEnjoyMoney").val(housepurchase.realEnjoyMoney);
- },
- yes: function (index, layero) {
- var declareType = $("#declareType").val();
- var checkState = $("#checkStateFirstModal").val();
- var checkMsg = $("#checkMsgFirst").val();
- var cashType = $("#cashType").val();
- var decideMoneyDetail = $("#decideMoneyDetail").val();
- var shouldEnjoyMoney = $("#shouldEnjoyMoney").val();
- if (checkState == null || checkState == '') {
- Feng.info("请选择审核状态");
- return;
- }
- if (checkMsg == null || checkMsg == '') {
- Feng.info("请填写审核意见");
- return;
- }
- if (checkState == 3) {
- if (Feng.isEmptyStr(cashType)) {
- Feng.info("请选择兑现状态");
- return;
- }
- if (cashType == 1) {
- if (declareType == 1 && Feng.isEmptyStr(shouldEnjoyMoney)) {
- Feng.info("请填写应享受金额");
- return;
- }
- }
- }
- var cashObjs = "";
- cashObjs = cashObjs.substring(0, cashObjs.length - 1);
- var operation = function () {
- var ajax = new $ax(Feng.ctxPath + "/admin/house/afterCheck", function (data) {
- if (data.code == 200) {
- Feng.success(data.msg);
- layer.close(index);
- HousepurchaseInfoDlg.close();
- window.parent.Housepurchase.table.refresh();
- } else {
- Feng.error(data.msg);
- }
- }, function (data) {
- Feng.error("审核失败!" + data.responseJSON.message + "!");
- });
- ajax.setData({
- "id": $("#id").val(),
- "checkState": checkState,
- "checkMsg": checkMsg,
- "cashType": cashType,
- "decideMoneyDetail": decideMoneyDetail,
- "shouldEnjoyMoney": shouldEnjoyMoney
- });
- ajax.start();
- }
- Feng.confirm("一旦提交无法修改,是否审核完毕且无误?", operation);
- }
- });
- } else {
- Feng.error(data.msg);
- }
- }, function (data) {
- Feng.error("校验失败!" + data.responseJSON.message + "!");
- });
- ajax.setData({"id": $("#id").val(), "process": process, "companyId": $("#companyId").val()})
- ajax.start();
- }
- /**
- * 提交审核
- */
- HousepurchaseInfoDlg.submitCheck = function () {
- var operation = function () {
- var ajax = new $ax(Feng.ctxPath + "/admin/house/submitCheck", function (data) {
- if (data.code == 200) {
- Feng.success(data.msg);
- window.parent.Housepurchase.table.refresh();
- HousepurchaseInfoDlg.close();
- } else {
- Feng.error(data.msg);
- }
- }, function (data) {
- Feng.error("提交审核失败!" + data.responseJSON.message + "!");
- });
- ajax.setData({"id": $("#id").val(), "process": $("#process").val(), "companyId": $("#companyId").val()});
- ajax.start();
- }
- Feng.confirm("一旦提交无法修改,是否审核完毕且无误?", operation);
- }
- HousepurchaseInfoDlg.createFirstCheckHtml = function () {
- var declareType = $("#declareType").val();
- var field =
- // '<li style="width:10%"><input type="checkbox" value="phone"/><span>手机号码</span></li>\n' +
- '<li style="width:10%"><input type="checkbox" value="marryStatus"/><span>婚姻状态</span></li>\n' +
- '<li style="width:10%"><input type="checkbox" value="spouseName"/><span>配偶姓名</span></li>\n' +
- '<li style="width:20.5%"><input type="checkbox" value="spouseCardType"/><span>配偶证件类型</span></li>\n' +
- '<li style="width:20.5%"><input type="checkbox" value="spouseIdcard"/><span>配偶证件号码</span></li>\n' +
- '<li style="width:20.5%"><input type="checkbox" value="spouseIsLibrary"/><span>配偶是否在库人才</span></li>\n';
- if (declareType == 1) {
- field = field +
- '<li style="width:20.5%"><input type="checkbox" value="realEstateNo"/><span>不动产权证编号</span></li>\n' +
- '<li style="width:20.5%"><input type="checkbox" value="recordNo"/><span>备案合同编号</span></li>\n' +
- '<li style="width:20.5%"><input type="checkbox" value="houseAddress"/><span>房屋坐落地址</span></li>\n' +
- '<li style="width:20.5%"><input type="checkbox" value="houseArea"/><span>房屋建筑面积</span></li>\n' +
- '<li style="width:63%"><input type="checkbox" value="recordTime"/><span>商品房购房合同备案时间/不动产权证书办理时间</span></li>\n' +
- '<li style="width:20.5%"><input type="checkbox" value="houseMoney"/><span>房屋成交金额</span></li>\n' +
- '<li style="width:20.5%"><input type="checkbox" value="isEnjoyOther"/><span>是否享受我市其他政策</span></li>\n';
- }
- return '<form id="checkForm">\n' +
- ' <div class="form-group" style="margin: 10px;">\n' +
- ' <label for="checkState" class="control-label">审核状态</label>\n' +
- ' <select class="form-control" id="checkStateFirstModal" onchange="HousepurchaseInfoDlg.toggleField()">\n' +
- ' <option value="">请选择</option>\n' +
- ' <option value="3">审核通过</option>\n' +
- ' <option value="2">审核驳回</option>\n' +
- ' </select>\n' +
- ' </div>\n' +
- ' <div class="form-group" style="margin: 10px;">\n' +
- ' <label for="checkMsg" class="control-label" >审核意见</label>\n' +
- ' <textarea class="form-control" id="checkMsgFirst" placeholder="" rows="6"></textarea>\n' +
- ' <div id="field" style="padding-top: 5px;display: none">\n' +
- ' <label for="checkMsg" class="control-label">可修改字段</label>\n' +
- ' <div id="field_info">\n' +
- ' <ul>\n' +
- field +
- ' </ul>\n' +
- ' </div>\n' +
- ' <label for="checkMsg" class="control-label">可修改附件</label>\n' +
- ' <div id="field_file">\n' +
- ' </div>\n' +
- ' <div class="form-group" style="text-align: center">\n' +
- ' <button type="button" class="btn btn-primary" onclick="Feng.checkAll(\'field\')">全选</button>\n' +
- ' <button type="button" class="btn btn-success" onclick="Feng.unCheckAll(\'field\')">反选</button>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </form>';
- }
- /**
- * 公示在审核
- */
- HousepurchaseInfoDlg.createAfterCheckHtml = function () {
- var idCard = $("#idCard").val();
- var name = $("#name").val();
- var spouseName = $("#spouseName").val();
- var spouseIdcard = $("#spouseIdcard").val();
- var options = "<option value='" + idCard + "'>" + name + "</option>";
- if (Feng.isNotEmptyStr(spouseIdcard)) {
- options = options + "<option value='" + spouseIdcard + "'>" + spouseName + "</option>";
- }
- return '<form id="checkForm">\n' +
- '<div class="form-group" style="margin: 10px;">\n' +
- '<label for="checkState" class="control-label">审核状态</label>\n' +
- '<select class="form-control" id="checkStateFirstModal" onchange="HousepurchaseInfoDlg.afterToggleField(this)">\n' +
- '<option value="">请选择</option>\n' +
- '<option value="3">审核通过</option>\n' +
- '<option value="-1">审核不通过</option>\n' +
- '</select>\n' +
- '</div>\n' +
- '<div class="form-group" style="margin: 10px;">\n' +
- '<label for="checkMsg" class="control-label" >审核意见</label>\n' +
- '<textarea class="form-control" id="checkMsgFirst" placeholder="" rows="4"></textarea>\n' +
- '</div>\n' +
- '<div class="form-group" style="margin: 10px;" >\n' +
- '<label for="processLable" class=" control-label">兑现状态</label>\n' +
- '<select class="form-control" id="cashType" onchange="HousepurchaseInfoDlg.afterCashTypeChange()">\n' +
- '<option value="">请选择</option>\n' +
- '<option value="1">兑现</option>\n' +
- '<option value="2">不予兑现</option>\n' +
- '</select>\n' +
- '</div>\n' +
- '<div class="form-group" style="display: none;margin: 10px;" id="descideDesc">\n' +
- '<label for="processLable" class=" control-label">计算说明</label>\n' +
- '<textarea class="form-control" id="decideMoneyDetail" rows="4"></textarea>\n' +
- '</div>\n' +
- '<div class="form-group" style="display: none;margin: 10px;" id="moneyDiv">\n' +
- '<label for="processLable" class=" control-label">应该享受金额(不扣除其他政策金额前)</label>\n' +
- '<input class="form-control" id="shouldEnjoyMoney">\n' +
- '</div>\n' +
- '</form>';
- }
- HousepurchaseInfoDlg.afterToggleField = function (context) {
- var checkState = $(context).val();
- if (checkState == -1) {
- $("#cashType").attr("style", "pointer-events: none;background-color: #eee;").val(2).trigger("change");
- } else {
- $("#cashType").removeAttr("style").val("");
- }
- }
- HousepurchaseInfoDlg.afterCashTypeChange = function () {
- var declareType = $("#declareType").val();
- var cashType = $("#cashType").val();
- if (cashType == 1) {
- if (declareType == 1) {
- $("#descideDesc,#moneyDiv").css("display", "block");
- } else {
- $("#descideDesc,#moneyDiv").css("display", "none");
- }
- } else {
- $("#descideDesc,#moneyDiv").css("display", "none");
- $("#descideDesc,#moneyDiv").val("");
- }
- }
- /**
- * 复核页面
- */
- HousepurchaseInfoDlg.createThirdCheckHtml = function () {
- var idCard = $("#idCard").val();
- var name = $("#name").val();
- var spouseName = $("#spouseName").val();
- var spouseIdcard = $("#spouseIdcard").val();
- var options = "<option value='" + idCard + "'>" + name + "</option>";
- if (Feng.isNotEmptyStr(spouseIdcard)) {
- options = options + "<option value='" + spouseIdcard + "'>" + spouseName + "</option>";
- }
- return '<form id="checkForm">\n' +
- '<div class="form-group" style="margin: 10px;">\n' +
- '<label for="checkState" class="control-label">审核状态</label>\n' +
- '<select class="form-control" id="checkStateFirstModal" onchange="HousepurchaseInfoDlg.thirdToggleField()">\n' +
- '<option value="">请选择</option>\n' +
- '<option value="3">审核通过</option>\n' +
- '<option value="2">审核驳回</option>\n' +
- '<option value="-1">审核不通过</option>\n' +
- '</select>\n' +
- '</div>\n' +
- '<div class="form-group" style="margin: 10px;">\n' +
- '<label for="checkMsg" class="control-label" >审核意见</label>\n' +
- '<textarea class="form-control" id="checkMsgFirst" placeholder="" rows="6"></textarea>\n' +
- '</div>\n' +
- '<div class="form-group" style="display: none;margin: 10px;" id="cashTypeDiv">\n' +
- '<label for="processLable" class=" control-label">兑现状态</label>\n' +
- '<select class="form-control" id="cashType" onchange="HousepurchaseInfoDlg.afterCashTypeChange()">\n' +
- '<option value="">请选择</option>\n' +
- '<option value="1">兑现</option>\n' +
- '<option value="2">不予兑现</option>\n' +
- '</select>\n' +
- '</div>\n' +
- '<div class="form-group" style="display: none;margin: 10px;" id="toProcessDiv" >\n' +
- '<label for="processLable" class=" control-label">驳回至</label>\n' +
- '<select class="form-control" id="toProcess" >\n' +
- '<option value="">请选择</option>\n' +
- '<option value="1">初级审核</option>\n' +
- '<option value="2">部门审核</option>\n' +
- '</select>\n' +
- '</div>\n' +
- '<div class="form-group" style="display: none;margin: 10px;" id="toDepDiv" >\n' +
- '<label for="processLable" class=" control-label">驳回单位</label>\n' +
- '<select class="form-control" id="toDep" multiple>\n' +
- '<option value="">请选择</option>\n' +
- '<option value="' + CONFIG.COM_MZJ + '">民政局</option>\n' +
- '<option value="' + CONFIG.COM_ZRZYJ + '">自然资源局</option>\n' +
- '<option value="' + CONFIG.COM_ZJJ + '">住建局</option>\n' +
- '</select>\n' +
- '</div>\n' +
- '</form>';
- }
- /**
- * 显示字段或者隐藏字段选择
- */
- HousepurchaseInfoDlg.toggleField = function () {
- var checkState = $("#checkStateFirstModal").val();
- var process = $("#process").val();
- var checkMsgFirst = $("#checkMsgFirst").val();
- if (checkState == 2 && process == 1) {
- $("#field").show();
- $("#checkMsgFirst").val("");
- } else if (checkState == 3) {
- $("#field").hide();
- $("#field").find("input[type=checkbox]").removeAttr("checked");
- if (Feng.isEmptyStr(checkMsgFirst)) {
- $("#checkMsgFirst").val("审核通过");
- }
- } else if (checkState == -1) {
- $("#field").hide();
- $("#checkMsgFirst").val("审核不通过");
- }
- }
- /**
- * 复核状态变更
- */
- HousepurchaseInfoDlg.thirdToggleField = function () {
- var checkState = $("#checkStateFirstModal").val();
- if (checkState == -1) {
- $("#checkMsgFirst").val("审核不通过");
- $("#toProcess,#toDep,#cashType").val("");
- $("#toProcessDiv,#toDepDiv,#cashTypeDiv,#cashObjDiv").css("display", "none");
- }
- if (checkState == 2) {
- $("#checkMsgFirst").val("");
- $("#cashType").val("");
- $("#cashTypeDiv,#cashObjDiv").css("display", "none");
- $("#toProcessDiv,#toDepDiv").css("display", "block");
- }
- if (checkState == 3) {
- $("#checkMsgFirst").val("审核通过");
- $("#toProcess,#toDep").val("");
- $("#toProcessDiv,#toDepDiv").css("display", "none");
- $("#cashTypeDiv").css("display", "block");
- }
- }
- /**
- * 删除享受其他政策
- * @param context
- */
- HousepurchaseInfoDlg.deleteEnjoyOther = function (context) {
- var id = $(context).parent().next().find("input[name='id']").val()
- var pId = $(context).parent().next().find("input[name='pId']").val()
- if (Feng.isEmptyStr(id)) {
- $(context).parent().parent().remove();
- } else {
- var operation = function () {
- var ajax = new $ax(Feng.ctxPath + "/admin/house/validateIsCheck", function (data) {
- if (data.code == 200) {
- var ajax1 = new $ax(Feng.ctxPath + "/admin/house/deleteOtherOrHouse", function (data) {
- if (data.code == 200) {
- Feng.success(data.msg);
- $(context).parent().parent().remove();
- } else {
- Feng.info(data.msg);
- }
- }, function (data) {
- Feng.error("删除失败!" + data.responseJSON.message + "!");
- });
- ajax1.set("id", id);
- ajax1.set("type", 1);
- ajax1.start();
- } else {
- Feng.error(data.msg);
- }
- }, function (data) {
- Feng.error("校验失败!" + data.responseJSON.message + "!");
- });
- ajax.setData({"id": $("#id").val(), "process": $("#process").val(), "companyId": $("#companyId").val()})
- ajax.start();
- }
- Feng.confirm("一旦删除无法恢复,确认删除吗?", operation);
- }
- }
- /**
- * 删除其他房产信息
- * @param context
- */
- HousepurchaseInfoDlg.deleteOtherHouse = function (context) {
- var id = $(context).parent().next().find("input[name='id']").val()
- var pId = $(context).parent().next().find("input[name='pId']").val()
- if (Feng.isEmptyStr(id)) {
- $(context).parent().parent().remove();
- } else {
- var operation = function () {
- var ajax = new $ax(Feng.ctxPath + "/admin/house/validateIsCheck", function (data) {
- if (data.code == 200) {
- var ajax1 = new $ax(Feng.ctxPath + "/admin/house/deleteOtherOrHouse", function (data) {
- if (data.code == 200) {
- Feng.success(data.msg);
- $(context).parent().parent().remove();
- } else {
- Feng.info(data.msg);
- }
- }, function (data) {
- Feng.error("删除失败!" + data.responseJSON.message + "!");
- });
- ajax1.set("id", id);
- ajax1.set("type", 2);
- ajax1.start();
- } else {
- Feng.error(data.msg);
- }
- }, function (data) {
- Feng.error("校验失败!" + data.responseJSON.message + "!");
- });
- ajax.setData({"id": $("#id").val(), "process": $("#process").val(), "companyId": $("#companyId").val()})
- ajax.start();
- }
- Feng.confirm("一旦删除无法恢复,确认删除吗?", operation);
- }
- }
- /**
- * 删除配偶信息
- * @param context
- */
- HousepurchaseInfoDlg.deleteSpouse = function (context) {
- var id = $(context).parent().next().find("input[name='id']").val()
- if (Feng.isEmptyStr(id)) {
- $(context).parent().parent().remove();
- } else {
- var operation = function () {
- var ajax = new $ax(Feng.ctxPath + "/admin/house/validateIsCheck", function (data) {
- if (data.code == 200) {
- var ajax1 = new $ax(Feng.ctxPath + "/admin/house/deleteSpouse", function (data) {
- if (data.code == 200) {
- Feng.success(data.msg);
- $(context).parent().parent().remove();
- } else {
- Feng.info(data.msg);
- }
- }, function (data) {
- Feng.error("删除失败!" + data.responseJSON.message + "!");
- });
- ajax1.set("id", id);
- ajax1.start();
- } else {
- Feng.error(data.msg);
- }
- }, function (data) {
- Feng.error("校验失败!" + data.responseJSON.message + "!");
- });
- ajax.setData({"id": $("#id").val(), "process": $("#process").val(), "companyId": $("#companyId").val()})
- ajax.start();
- }
- Feng.confirm("一旦删除无法恢复,确认删除吗?", operation);
- }
- }
- /***
- * 保存部门内审核录入数据
- */
- HousepurchaseInfoDlg.saveDepCheckData = function () {
- var companyCode = $("#companyCode").val();
- var mainId = $("#id").val();
- var declareType = $("#declareType").val();
- var error = "";
- var obj = null;
- switch (companyCode) {
- case CONFIG.COM_ZJJ:
- var enjoyOtherObject = new Array();
- var otherHouseObject = new Array();
- var checkIsTradeRecord = $("#zjjData").find("select[name='checkIsTradeRecord']").val();
- var checkRecordTime = $("#zjjData").find("input[name='checkRecordTime']").val();
- var zjjCheckDetail = $("#zjjData").find("input[name='zjjCheckDetail']").val();
- if (declareType == 1) {
- if (Feng.isEmptyStr(checkIsTradeRecord)) {
- Feng.info("请选择是否交易备案");
- return;
- }
- if (checkIsTradeRecord == 1 && Feng.isEmptyStr(checkRecordTime)) {
- Feng.info("请选填写交易备案时间");
- return;
- }
- }
- var error = HousepurchaseInfoDlg.getZjjData(enjoyOtherObject, otherHouseObject);
- if (Feng.isNotEmptyStr(error)) {
- Feng.info(error);
- return;
- }
- obj = {
- "id": mainId,
- "companyId": $("#companyId").val(),
- "checkIsTradeRecord": checkIsTradeRecord,
- "checkRecordTime": checkRecordTime,
- "zjjCheckDetail": zjjCheckDetail,
- "otherList": enjoyOtherObject,
- "houseList": otherHouseObject
- };
- var ajax = new $ax(Feng.ctxPath + "/admin/house/zjjCheck", function (data) {
- if (data.code == 200) {
- HousepurchaseInfoDlg.initZzj(data.obj.otherList, data.obj.houseList);
- Feng.success(data.msg);
- } else {
- Feng.info(data.msg);
- }
- }, function (data) {
- Feng.error("提交失败!" + data.responseJSON.message + "!");
- });
- ajax.setcontentType("application/json;charset=utf-8");
- ajax.setData(JSON.stringify(obj));
- ajax.start();
- break;
- case CONFIG.COM_ZRZYJ:
- var otherHouseObject = new Array();
- var isHasBdcCard = $("#isHasBdcCard").val();
- var bdcRegistTime = $("#bdcRegistTime").val();
- var isOwner = $("#isOwner").val();
- var transferMethod = $("#transferMethod").val();
- var transferTime = $("#transferTime").val();
- var zrzzjCheckDetail = $("#zrzzjCheckDetail").val();
- if (declareType == 1) {
- if (Feng.isEmptyStr(isHasBdcCard)) {
- Feng.info("请选择是否已办理不动产权证");
- return;
- }
- if (isHasBdcCard == 1 && Feng.isEmptyStr(bdcRegistTime)) {
- Feng.info("请填写不动产权证书登记时间");
- return;
- }
- if (Feng.isEmptyStr(isOwner)) {
- Feng.info("请选择其购置的房屋是否还在名下");
- return;
- }
- if (isOwner == 2 && Feng.isEmptyStr(transferMethod)) {
- Feng.info("请填写过户方式");
- return;
- }
- if (isOwner == 2 && Feng.isEmptyStr(transferTime)) {
- Feng.info("请填写过户时间");
- return;
- }
- }
- var error = HousepurchaseInfoDlg.getZrzyjData(otherHouseObject);
- if (Feng.isNotEmptyStr(error)) {
- Feng.info(error);
- return;
- }
- obj = {
- "id": mainId,
- "companyId": $("#companyId").val(),
- "isHasBdcCard": isHasBdcCard,
- "bdcRegistTime": bdcRegistTime,
- "isOwner": isOwner,
- "transferMethod": transferMethod,
- "transferTime": transferTime,
- "zrzzjCheckDetail": zrzzjCheckDetail,
- "houseList": otherHouseObject
- };
- var ajax = new $ax(Feng.ctxPath + "/admin/house/zrzyjCheck", function (data) {
- if (data.code == 200) {
- HousepurchaseInfoDlg.initZrzyj(data.obj.houseList);
- Feng.success(data.msg);
- } else {
- Feng.info(data.msg);
- }
- }, function (data) {
- Feng.error("提交失败!" + data.responseJSON.message + "!");
- });
- ajax.setcontentType("application/json;charset=utf-8");
- ajax.setData(JSON.stringify(obj));
- ajax.start();
- break;
- case CONFIG.COM_MZJ:
- var spouseObj = new Array();
- var mzjCheckDetail = $("#mzjCheckDetail").val();
- var error = HousepurchaseInfoDlg.getMzjData(spouseObj);
- if (Feng.isNotEmptyStr(error)) {
- Feng.info(error);
- return;
- }
- obj = {
- "id": mainId,
- "companyId": $("#companyId").val(),
- "mzjCheckDetail": mzjCheckDetail,
- "spouseList": spouseObj
- };
- var ajax = new $ax(Feng.ctxPath + "/admin/house/mzjCheck", function (data) {
- if (data.code == 200) {
- HousepurchaseInfoDlg.initMzj(data.obj.spouseList);
- Feng.success(data.msg);
- } else {
- Feng.info(data.msg);
- }
- }, function (data) {
- Feng.error("提交失败!" + data.responseJSON.message + "!");
- });
- ajax.setcontentType("application/json;charset=utf-8");
- ajax.setData(JSON.stringify(obj));
- ajax.start();
- break;
- break;
- }
- }
- HousepurchaseInfoDlg.getZjjData = function (enjoyOtherObject, otherHouseObject) {
- var error = "";
- $("#zzjOtherBody .panel-body").not(".history").each(function (index) {
- var id = $(this).find("input[name='id']").val();
- var pId = $(this).find("input[name='pId']").val();
- var name = $(this).find("input[name='name']").val();
- var idCard = $(this).find("input[name='idCard']").val();
- var houseAddress = $(this).find("input[name='houseAddress']").val();
- var recordNo = $(this).find("input[name='recordNo']").val();
- var enjoyPolicyName = $(this).find("input[name='enjoyPolicyName']").val();
- var money = $(this).find("input[name='money']").val();
- var enjoyTime = $(this).find("input[name='enjoyTime']").val();
- var description = $(this).find("input[name='description']").val();
- if (Feng.isNotEmptyStr(id) || Feng.isNotEmptyStr(pId) || Feng.isNotEmptyStr(name) || Feng.isNotEmptyStr(houseAddress) || Feng.isNotEmptyStr(idCard) ||
- Feng.isNotEmptyStr(recordNo) || Feng.isNotEmptyStr(enjoyPolicyName) || Feng.isNotEmptyStr(money) || Feng.isNotEmptyStr(enjoyTime)) {
- if (Feng.isEmptyStr(name)) {
- error = error + "享受其他政策" + (index + 1) + ")享受人姓名为空;\n";
- }
- if (Feng.isEmptyStr(idCard)) {
- error = error + "享受其他政策" + (index + 1) + ")享受人证件号码为空;\n";
- }
- if (Feng.isEmptyStr(houseAddress)) {
- error = error + "享受其他政策" + (index + 1) + "房屋坐落地址为空;\n";
- }
- if (Feng.isEmptyStr(recordNo)) {
- error = error + "享受其他政策" + (index + 1) + "合同编号为空;\n";
- }
- if (Feng.isEmptyStr(enjoyPolicyName)) {
- error = error + "享受其他政策" + (index + 1) + "享受政策名称为空;\n";
- }
- if (Feng.isEmptyStr(money)) {
- error = error + "享受其他政策" + (index + 1) + "补贴发放金额为空;\n";
- } else if (!/^([1-9][0-9]*)+(\.[0-9]{1,10})?$/.test(money)) {
- error = error + "享受其他政策" + (index + 1) + "金额格式不正确;\n";
- }
- if (Feng.isEmptyStr(enjoyTime)) {
- error = error + "享受其他政策" + (index + 1) + "发放时间为空;\n";
- } else if (!/^\d{4}-\d{2}-\d{2}$/.test(enjoyTime)) {
- error = error + "享受其他政策" + (index + 1) + "发放时间格式不正确;\n";
- }
- enjoyOtherObject.push({
- "id": id,
- "pId": pId,
- "name": name,
- "idCard": idCard,
- "houseAddress": houseAddress,
- "recordNo": recordNo,
- "enjoyPolicyName": enjoyPolicyName,
- "money": money,
- "description": description,
- "enjoyTime": enjoyTime
- });
- }
- });
- if (Feng.isNotEmptyStr(error)) {
- return error;
- }
- $("#zzjOtherHouse .panel-body").each(function (index) {
- var error = "";
- var id = $(this).find("input[name='id']").val();
- var pId = $(this).find("input[name='pId']").val();
- var type = $(this).find("input[name='type']").val();
- var name = $(this).find("input[name='name']").val();
- var idCard = $(this).find("input[name='idCard']").val();
- var number = $(this).find("input[name='number']").val();
- var houseAddress = $(this).find("input[name='houseAddress']").val();
- var area = $(this).find("input[name='area']").val();
- var recordTime = $(this).find("input[name='recordTime']").val();
- var tradeMethod = $(this).find("input[name='tradeMethod']").val();
- var description = $(this).find("input[name='description']").val();
- if (Feng.isNotEmptyStr(id) || Feng.isNotEmptyStr(pId) || Feng.isNotEmptyStr(type) || Feng.isNotEmptyStr(name) || Feng.isNotEmptyStr(number) || Feng.isNotEmptyStr(idCard) ||
- Feng.isNotEmptyStr(houseAddress) || Feng.isNotEmptyStr(area) || Feng.isNotEmptyStr(recordTime) || Feng.isNotEmptyStr(tradeMethod)) {
- if (Feng.isEmptyStr(name)) {
- error = error + "其他房产信息" + (index + 1) + "购房人姓名为空;\n";
- }
- if (Feng.isEmptyStr(idCard)) {
- error = error + "其他房产信息" + (index + 1) + "购房人证件号码为空;\n";
- }
- if (Feng.isEmptyStr(number)) {
- error = error + "其他房产信息" + (index + 1) + "合同编号为空;\n";
- }
- if (Feng.isEmptyStr(houseAddress)) {
- error = error + "其他房产信息" + (index + 1) + "房屋坐落地址为空;\n";
- }
- if (Feng.isEmptyStr(area)) {
- error = error + "其他房产信息" + (index + 1) + "面积为空;\n";
- } else if (!/^([1-9][0-9]*)+(\.[0-9]{0,10})?$/.test(area)) {
- error = error + "其他房产信息" + (index + 1) + "面积格式不正确;\n";
- }
- if (Feng.isEmptyStr(recordTime)) {
- error = error + "其他房产信息记录中第" + (index + 1) + "交易备案时间为空;\n";
- } else if (!/^\d{4}-\d{2}-\d{2}$/.test(recordTime)) {
- error = error + "其他房产信息" + (index + 1) + "交易备案时间格式不正确;\n";
- }
- if (Feng.isEmptyStr(tradeMethod)) {
- error = error + "其他房产信息" + (index + 1) + "交易方式为空;\n";
- }
- otherHouseObject.push({
- "id": id,
- "type": type,
- "name": name,
- "idCard": idCard,
- "number": number,
- "houseAddress": houseAddress,
- "area": area,
- "recordTime": recordTime,
- "tradeMethod": tradeMethod,
- "description": description
- });
- }
- });
- if (Feng.isNotEmptyStr(error)) {
- return error;
- }
- return null;
- }
- HousepurchaseInfoDlg.getMzjData = function (mzjSpouseList) {
- var error = "";
- $("#mzjMarryData .panel-body").each(function (index) {
- var id = $(this).find("input[name='id']").val();
- var pId = $(this).find("input[name='pId']").val();
- var type = $(this).find("select[name='type']").val();
- var registerTime = $(this).find("input[name='registerTime']").val();
- var name = $(this).find("input[name='name']").val();
- var idCard = $(this).find("input[name='idCard']").val();
- if (Feng.isNotEmptyStr(id) || Feng.isNotEmptyStr(pId) || Feng.isNotEmptyStr(type) || Feng.isNotEmptyStr(name) || Feng.isNotEmptyStr(idCard) ||
- Feng.isNotEmptyStr(registerTime)) {
- if (Feng.isEmptyStr(type)) {
- error = error + "婚姻状况" + (index + 1) + "没有选择登记类型;\n";
- }
- if (Feng.isEmptyStr(registerTime)) {
- error = error + "婚姻状况" + (index + 1) + "登记时间为空;\n";
- }
- if (Feng.isEmptyStr(name)) {
- error = error + "婚姻状况" + (index + 1) + "配偶姓名为空;\n";
- }
- if (Feng.isEmptyStr(idCard)) {
- error = error + "婚姻状况" + (index + 1) + "配偶证件号码为空;\n";
- } else if (!/^\d{4}-\d{2}-\d{2}$/.test(registerTime)) {
- error = error + "婚姻状况" + (index + 1) + "登记时间格式不正确;\n";
- }
- mzjSpouseList.push({
- "id": id,
- "type": type,
- "registerTime": registerTime,
- "name": name,
- "idCard": idCard
- });
- }
- });
- if (Feng.isNotEmptyStr(error)) {
- return error;
- }
- return null;
- }
- HousepurchaseInfoDlg.getZrzyjData = function (otherHouseObject) {
- var error = "";
- $("#zrzyOtherHouse .panel-body").each(function (index) {
- var id = $(this).find("input[name='id']").val();
- var pId = $(this).find("input[name='pId']").val();
- var type = $(this).find("input[name='type']").val();
- var name = $(this).find("input[name='name']").val();
- var idCard = $(this).find("input[name='idCard']").val();
- var houseAddress = $(this).find("input[name='houseAddress']").val();
- var number = $(this).find("input[name='number']").val();
- var area = $(this).find("input[name='area']").val();
- var recordTime = $(this).find("input[name='recordTime']").val();
- var description = $(this).find("input[name='description']").val();
- if (Feng.isNotEmptyStr(id) || Feng.isNotEmptyStr(pId) || Feng.isNotEmptyStr(type) || Feng.isNotEmptyStr(name) || Feng.isNotEmptyStr(idCard) ||
- Feng.isNotEmptyStr(houseAddress) || Feng.isNotEmptyStr(area) || Feng.isNotEmptyStr(recordTime) || Feng.isNotEmptyStr(number)) {
- if (Feng.isEmptyStr(name)) {
- error = error + "房产信息" + (index + 1) + "产权人姓名为空;\n";
- }
- if (Feng.isEmptyStr(idCard)) {
- error = error + "房产信息" + (index + 1) + "产权人证件号码为空;\n";
- }
- if (Feng.isEmptyStr(houseAddress)) {
- error = error + "房产信息" + (index + 1) + "房屋坐落地址为空;\n";
- }
- if (Feng.isEmptyStr(area)) {
- error = error + "房产信息" + (index + 1) + "面积为空;\n";
- } else if (!/^([1-9][0-9]*)+(\.[0-9]{1,10})?$/.test(area)) {
- error = error + "其他房产信息" + (index + 1) + "面积格式不正确;\n";
- }
- if (Feng.isEmptyStr(recordTime)) {
- error = error + "房产信息" + (index + 1) + "房屋登记时间为空;\n";
- } else if (!/^\d{4}-\d{2}-\d{2}$/.test(recordTime)) {
- error = error + "房产信息" + (index + 1) + "房屋登记时间格式不正确;\n";
- }
- otherHouseObject.push({
- "id": id,
- "type": type,
- "name": name,
- "idCard": idCard,
- "houseAddress": houseAddress,
- "area": area,
- "recordTime": recordTime,
- "number": number,
- "description": description
- });
- }
- });
- if (Feng.isNotEmptyStr(error)) {
- return error;
- }
- return null;
- }
- /**
- * 公示再审核修改住建局、自然资源局录入数据
- */
- HousepurchaseInfoDlg.afterCheckEdit = function () {
- var mainId = $("#id").val();
- var declareType = $("#declareType").val();
- var enjoyOtherObject = new Array();
- var mzjSpouseList = new Array();
- var zjjOtherHouseObject = new Array();
- var zrzyjOtherHouseObject = new Array();
- var checkIsTradeRecord = $("#zjjData").find("select[name='checkIsTradeRecord']").val();
- var checkRecordTime = $("#zjjData").find("input[name='checkRecordTime']").val();
- var zjjCheckDetail = $("#zjjData").find("input[name='zjjCheckDetail']").val();
- var mzjCheckDetail = $("#mzjCheckDetail").val();
- var error = HousepurchaseInfoDlg.getMzjData(mzjSpouseList);
- if (Feng.isNotEmptyStr(error)) {
- Feng.info(error);
- return;
- }
- if (declareType == 1) {
- if (Feng.isEmptyStr(checkIsTradeRecord)) {
- Feng.info("请选择是否交易备案");
- return;
- }
- if (checkIsTradeRecord == 1 && Feng.isEmptyStr(checkRecordTime)) {
- Feng.info("请选填写交易备案时间");
- return;
- }
- }
- var error = HousepurchaseInfoDlg.getZjjData(enjoyOtherObject, zjjOtherHouseObject);
- if (Feng.isNotEmptyStr(error)) {
- Feng.info(error);
- return;
- }
- var isHasBdcCard = $("#isHasBdcCard").val();
- var bdcRegistTime = $("#bdcRegistTime").val();
- var isOwner = $("#isOwner").val();
- var transferMethod = $("#transferMethod").val();
- var transferTime = $("#transferTime").val();
- var zrzzjCheckDetail = $("#zrzzjCheckDetail").val();
- if (declareType == 1) {
- if (Feng.isEmptyStr(isHasBdcCard)) {
- Feng.info("请选择是否已办理不动产权证");
- return;
- }
- if (isHasBdcCard == 1 && Feng.isEmptyStr(bdcRegistTime)) {
- Feng.info("请填写不动产权证书登记时间");
- return;
- }
- if (Feng.isEmptyStr(isOwner)) {
- Feng.info("请选择其购置的房屋是否还在名下");
- return;
- }
- if (isOwner == 2 && Feng.isEmptyStr(transferMethod)) {
- Feng.info("请填写过户方式");
- return;
- }
- if (isOwner == 2 && Feng.isEmptyStr(transferTime)) {
- Feng.info("请填写过户时间");
- return;
- }
- }
- error = HousepurchaseInfoDlg.getZrzyjData(zrzyjOtherHouseObject);
- if (Feng.isNotEmptyStr(error)) {
- Feng.info(error);
- return;
- }
- var obj = {
- "id": mainId,
- "checkIsTradeRecord": checkIsTradeRecord,
- "checkRecordTime": checkRecordTime,
- "zjjCheckDetail": zjjCheckDetail,
- "isHasBdcCard": isHasBdcCard,
- "bdcRegistTime": bdcRegistTime,
- "isOwner": isOwner,
- "transferMethod": transferMethod,
- "transferTime": transferTime,
- "zrzzjCheckDetail": zrzzjCheckDetail,
- "zjjHouseList": zjjOtherHouseObject,
- "zrzyjHouseList": zrzyjOtherHouseObject,
- "mzjCheckDetail": mzjCheckDetail,
- "mzjSpouseList": mzjSpouseList,
- "otherList": enjoyOtherObject
- };
- var ajax = new $ax(Feng.ctxPath + "/admin/house/afterCheckEdit", function (data) {
- if (data.code == 200) {
- HousepurchaseInfoDlg.initZzj(data.obj.otherList, data.obj.zjjOtherHouseObject);
- HousepurchaseInfoDlg.initZrzyj(data.obj.zrzyjOtherHouseObject);
- Feng.success(data.msg);
- } else {
- Feng.info(data.msg);
- }
- }, function (data) {
- Feng.error("提交失败!" + data.responseJSON.message + "!");
- });
- ajax.setcontentType("application/json;charset=utf-8");
- ajax.setData(JSON.stringify(obj));
- ajax.start();
- }
- HousepurchaseInfoDlg.initZzj = function (otherList, houseList) {
- if (otherList != null) {
- var html = "";
- for (var key in otherList) {
- html = html +
- '<div class="panel panel-default" >\n' +
- ' <div class="panel-heading">\n' +
- ' <span class="caret" onclick="$(this).parent().next().toggle()"></span>\n' +
- ' <span class="houseTitle" >' + otherList[key].enjoyPolicyName + '</span>\n' +
- ' <button type="button" class="close" aria-label="Close" style="float: right" onclick="HousepurchaseInfoDlg.deleteEnjoyOther(this)">\n' +
- ' <span aria-hidden="true">×</span>\n' +
- ' </button>\n' +
- ' </div>\n' +
- ' <div class="panel-body">\n' +
- ' <div class="col-sm-12">\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <input type="hidden" name="id" value="' + otherList[key].id + '"/>\n' +
- ' <input type="hidden" name="pId" value="' + otherList[key].pId + '"/>\n' +
- ' <label class="control-label spacing">享受人姓名</label>\n' +
- ' <input type="text" class="form-control" name="name" value="' + otherList[key].name + '"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">享受人证件号码</label>\n' +
- ' <input type="text" class="form-control" name="idCard" value="' + otherList[key].idCard + '"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">房屋坐落地址</label>\n' +
- ' <input type="text" class="form-control" name="houseAddress" value="' + otherList[key].houseAddress + '"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">合同编号</label>\n' +
- ' <input type="text" class="form-control" name="recordNo" value="' + otherList[key].recordNo + '"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">享受政策名称(例:XX年度第X批XX购房补助)</label>\n' +
- ' <input type="text" class="form-control" name="enjoyPolicyName" placeholder="例:XX年度第X批XX购房补助" value="' + otherList[key].enjoyPolicyName + '" onchange="$(this).parent().parent().parent().parent().find(\'.houseTitle\').text($(this).val())"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">补贴发放金额(元)</label>\n' +
- ' <input type="text" class="form-control" name="money" value="' + otherList[key].money + '"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">发放时间</label>\n' +
- ' <input type="text" class="form-control date" name="enjoyTime" value="' + otherList[key].enjoyTime + '"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">备注</label>\n' +
- ' <input type="text" class="form-control" name="description" value="' + otherList[key].description + '"/>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>';
- }
- $("#zzjOtherBody .panel-default").not(".history").remove();
- $("#zzjOtherBody").append(html);
- }
- if (houseList != null) {
- var html = "";
- for (var key in houseList) {
- html = html +
- '<div class="panel panel-default">\n' +
- ' <div class="panel-heading">\n' +
- ' <span class="caret" onclick="$(this).parent().next().toggle()"></span>\n' +
- ' <span class="houseTitle" >' + houseList[key].houseAddress + '</span>\n' +
- ' <button type="button" class="close" aria-label="Close" style="float: right" onclick="HousepurchaseInfoDlg.deleteOtherHouse(this)">\n' +
- ' <span aria-hidden="true">×</span>\n' +
- ' </button>\n' +
- ' </div>\n' +
- ' <div class="panel-body">\n' +
- ' <div class="col-sm-12">\n' +
- ' <input type="hidden" name="id" value="' + houseList[key].id + '"/>\n' +
- ' <input type="hidden" name="pId" value="' + houseList[key].pId + '"/>\n' +
- ' <input type="hidden" name="type" value="' + houseList[key].type + '"/>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">购房人姓名</label>\n' +
- ' <input type="text" class="form-control" name="name" value="' + houseList[key].name + '"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">购房人证件号码</label>\n' +
- ' <input type="text" class="form-control" name="idCard" value="' + houseList[key].idCard + '"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">房屋坐落地址</label>\n' +
- ' <input type="text" class="form-control" name="houseAddress" value="' + houseList[key].houseAddress + '" onchange="$(this).parent().parent().parent().parent().find(\'.houseTitle\').text($(this).val())"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">合同编号</label>\n' +
- ' <input type="text" class="form-control" name="number" value="' + houseList[key].number + '"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">面积(m2)</label>\n' +
- ' <input type="text" class="form-control" name="area" value="' + houseList[key].area + '"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">交易备案时间</label>\n' +
- ' <input type="text" class="form-control date" name="recordTime" value="' + houseList[key].recordTime + '"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">交易方式(购买、出售、签约注销、备案注销等)</label>\n' +
- ' <input type="text" class="form-control" name="tradeMethod" value="' + houseList[key].tradeMethod + '"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">备注</label>\n' +
- ' <input type="text" class="form-control" name="description" value="' + houseList[key].description + '"/>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>';
- }
- $("#zzjOtherHouse").empty().append(html);
- }
- }
- HousepurchaseInfoDlg.initZrzyj = function (houseList) {
- if (houseList != null) {
- var html = "";
- for (var key in houseList) {
- html = html +
- '<div class="panel panel-default">\n' +
- ' <div class="panel-heading">\n' +
- ' <span class="caret" onclick="$(this).parent().next().toggle()"></span>\n' +
- ' <span class="houseTitle">' + houseList[key].houseAddress + '</span>\n' +
- ' <button type="button" class="close" aria-label="Close" style="float: right" onclick="HousepurchaseInfoDlg.deleteOtherHouse(this)">\n' +
- ' <span aria-hidden="true">×</span>\n' +
- ' </button>\n' +
- ' </div>\n' +
- ' <div class="panel-body">\n' +
- ' <div class="col-sm-12">\n' +
- ' <input type="hidden" name="id" value="' + houseList[key].id + '"/>\n' +
- ' <input type="hidden" name="pId" value="' + houseList[key].pId + '"/>\n' +
- ' <input type="hidden" name="type" value="' + houseList[key].type + '"/>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">产权人姓名</label>\n' +
- ' <input type="text" class="form-control" name="name" value="' + houseList[key].name + '"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">产权人证件号码</label>\n' +
- ' <input type="text" class="form-control" name="idCard" value="' + houseList[key].idCard + '"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">房屋坐落地址</label>\n' +
- ' <input type="text" class="form-control" name="houseAddress" value="' + houseList[key].houseAddress + '" onchange="$(this).parent().parent().parent().parent().find(\'.houseTitle\').text($(this).val())"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">不动产权号</label>\n' +
- ' <input type="text" class="form-control" name="number" value="' + houseList[key].number + '"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">面积(m2)</label>\n' +
- ' <input type="text" class="form-control" name="area" value="' + houseList[key].area + '"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">房屋登记时间</label>\n' +
- ' <input type="text" class="form-control date" name="recordTime" value="' + houseList[key].recordTime + '"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">备注</label>\n' +
- ' <input type="text" class="form-control" name="description" value="' + houseList[key].description + '"/>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>'
- }
- $("#zrzyOtherHouse").empty().append(html);
- }
- }
- HousepurchaseInfoDlg.initMzj = function (spouseList) {
- if (spouseList != null) {
- var html = "";
- for (var key in spouseList) {
- html = html +
- '<div class="panel panel-default">\n' +
- ' <div class="panel-heading">\n' +
- ' <span class="caret" onclick="$(this).parent().next().toggle()"></span>\n' +
- ' <span class="houseTitle">' + spouseList[key].registerTime + '</span>\n' +
- ' <button type="button" class="close" aria-label="Close" style="float: right" onclick="HousepurchaseInfoDlg.deleteSpouse(this)">\n' +
- ' <span aria-hidden="true">×</span>\n' +
- ' </button>\n' +
- ' </div>\n' +
- ' <div class="panel-body">\n' +
- ' <div class="col-sm-12">\n' +
- ' <input type="hidden" name="id" />\n' +
- ' <input type="hidden" name="pId" />\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">登记类型</label>\n' +
- ' <select type="text" class="form-control" name="type" value="' + spouseList[key].type + '">\n' +
- ' <option value="">请选择</option>\n' +
- ' <option value="1">初婚</option>\n' +
- ' <option value="2">复婚</option>\n' +
- ' <option value="3">再婚</option>\n' +
- ' <option value="4">离婚</option>\n' +
- ' </select>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">登记时间</label>\n' +
- ' <input type="text" class="form-control date" name="registerTime" value="' + spouseList[key].registerTime + '"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">配偶姓名</label>\n' +
- ' <input type="text" class="form-control" name="name" value="' + spouseList[key].name + '"/>\n' +
- ' </div>\n' +
- ' <div class="rowGroup col-sm-3">\n' +
- ' <label class="control-label spacing">配偶证件号码</label>\n' +
- ' <input type="text" class="form-control" name="idCard" value="' + spouseList[key].idCard + '"/>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>\n' +
- ' </div>'
- }
- $("#mzjMarryData").empty().append(html);
- $("select").each(function () {
- $(this).val($(this).attr("value"));
- });
- }
- }
- HousepurchaseInfoDlg.initDate = function () {
- $(".date").removeAttr('lay-key');
- $(".date").each(function () {
- laydate.render({
- elem: this
- , type: 'date'
- , trigger: 'click'
- });
- });
- }
- $(function () {
- $("select").each(function () {
- $(this).val($(this).attr("value"));
- });
- Feng.getCheckLog("logTable", {
- "type": CONFIG.project_house,
- "mainId": $("#id").val(),
- "typeFileId": "",
- "active": 1
- })
- HousepurchaseInfoDlg.initDate();
- Feng.showMiniFileModal(CONFIG.project_house, $("#type").val(), $("#id").val());
- initNoBtnFileTable(CONFIG.project_house, 'fileTable');
- var declareType = $("#declareType").val();
- if (declareType == 1) {
- $('#historyTable').bootstrapTable({
- url: Feng.ctxPath + "/admin/house/getHistoryRecord?id=" + $("#id").val(),
- method: 'POST',
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
- showRefresh: false, // 是否显示刷新按钮
- clickToSelect: true, // 是否启用点击选中行
- singleSelect: true, // 设置True 将禁止多选
- striped: true, // 是否显示行间隔色
- pagination: false, // 设置为 true 会在表格底部显示分页条
- paginationHAlign: "left",
- paginationDetailHAlign: "right",
- sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
- showColumns: false,
- rowStyle: function (row, index) {
- return {
- css: {
- "word-break": "break-word",
- "white-space": "inherit"
- }
- }
- },
- columns:
- [
- {
- title: '年度',
- field: 'year',
- visible: true,
- align: 'center',
- valign: 'middle',
- width: "80px",
- 'class': 'uitd_showTip',
- },
- {
- title: '姓名',
- field: 'name',
- visible: true,
- align: 'center',
- valign: 'middle',
- width: "100px",
- 'class': 'uitd_showTip'
- },
- {
- title: '证件号码',
- field: 'idCard',
- visible: true,
- align: 'center',
- valign: 'middle',
- width: "150px",
- 'class': 'uitd_showTip'
- },
- {
- title: '婚姻状态',
- field: 'marryStatusName',
- visible: true,
- align: 'center',
- valign: 'middle',
- width: "100px",
- 'class': 'uitd_showTip'
- },
- {
- title: '配偶姓名',
- field: 'spouseName',
- visible: true,
- align: 'center',
- valign: 'middle',
- width: "100px",
- 'class': 'uitd_showTip'
- },
- {
- title: '配偶证件号码',
- field: 'spouseIdcard',
- visible: true,
- align: 'center',
- valign: 'middle',
- width: "100px",
- 'class': 'uitd_showTip'
- },
- {
- title: '房屋地址',
- field: 'houseAddress',
- visible: true,
- align: 'center',
- valign: 'middle',
- width: "100px",
- 'class': 'uitd_showTip'
- },
- {
- title: '房屋建筑面积',
- field: 'houseArea',
- visible: true,
- align: 'center',
- valign: 'middle',
- width: "100px",
- 'class': 'uitd_showTip'
- },
- {
- title: '房源成交金额',
- field: 'houseMoney',
- visible: true,
- align: 'center',
- valign: 'middle',
- width: "100px",
- 'class': 'uitd_showTip'
- },
- {
- title: '计算结果',
- field: 'realEnjoyMoney',
- visible: true,
- align: 'center',
- valign: 'middle',
- 'class': 'uitd_showTip',
- width: "100px",
- formatter: function (value, row, index) {
- if (row.cashType == 1 && row.declareType == 1) {
- var html = "1.可享受总金额(首套房产金额):" + (parseFloat(row.totalMoney) / 10000).toFixed(2) +
- "万元</br>2.个人余额(未扣除本次):" + (parseFloat(row.balanceMoney) / 10000).toFixed(2) +
- "万元</br>3.房产余额(未扣除本次):" + (parseFloat(row.houseBalanceMoney) / 10000).toFixed(2) +
- "万元</br>4.上一年度未扣除其他政策金额:" + (parseFloat(row.lastOtherMoney) / 10000).toFixed(2) +
- "万元</br>5.本年度新增享受其他政策金额:" + (parseFloat(row.nowOtherMoney) / 10000).toFixed(2) +
- "万元</br>6.本年度人才层次可享受金额:" + (parseFloat(row.talentArrangeMoney) / 10000).toFixed(2) +
- "万元</br>7.本年度应享受金额(2,3,6比较得到):" + (parseFloat(row.shouldEnjoyMoney) / 10000).toFixed(2) +
- "万元</br>8.本年度扣除享受其他政策金额:" + (parseFloat(row.nowSubOtherMoney) / 10000).toFixed(2) +
- "万元</br>9.本年度未扣除享受其他政策金额:" + (parseFloat(row.nowNotSubOtherMoney) / 10000).toFixed(2) +
- "万元</br>10.本年度最终可到账金额:" + (parseFloat(row.realEnjoyMoney) / 10000).toFixed(2) + "万元";
- return "<span class='label label-success' onclick=\"layer.alert('" + html + "', {title:'计算结果', skin: 'layui-layer-molv',closeBtn: 0})\" >" +
- "<i class=\"fa fa-book\"></i>查看" +
- "</span>";
- } else {
- return "无";
- }
- }
- }
- ]
- ,
- onPostBody: function () {
- $('#' + id + "td.uitd_showTip").bind("mouseover", function () {
- var htm = $(this).html();
- $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
- });
- }
- });
- }
- });
|