/** * 初始化房租补助详情对话框 */ var HouseRentingFeesInfoDlg = { houseRentingFeesInfoData : {} }; /** * 关闭此对话框 */ HouseRentingFeesInfoDlg.close = function() { parent.layer.close(window.parent.HouseRentingFees.layerIndex); } /** * */ HouseRentingFeesInfoDlg.creatFieldCheckModal = function(){ return '
'; } /** * 显示审核模态框 */ HouseRentingFeesInfoDlg.showCheckModal = function(){ var ajax = new $ax(Feng.ctxPath + "/houseRentingFees/validateIsCheck", function (data) { if(data.code==200){ layer.open({ type: 1, id:"neewFieldFormModel", title: '审核', area: ['800px', '450px'], //宽高 fix: false, //不固定 shade:0, maxmin: true, content: HouseRentingFeesInfoDlg.creatFieldCheckModal(), btn: [' 提交' ,' 关闭'], btnAlign: 'c', zIndex: layer.zIndex, success:function(layero, index){ layer.setTop(layero); $("#checkStateModel").val(data.obj.checkState); $("#checkMsg").val(data.obj.checkMsg); }, yes: function (index, layero) { HouseRentingFeesInfoDlg.check(index); } }); }else{ Feng.error(data.msg); } }, function (data) { Feng.error("校验失败!" + data.responseJSON.message + "!"); }); ajax.set("id",$("#id").val()); ajax.set("process",1); ajax.start(); } /** * 审核 * @param index */ HouseRentingFeesInfoDlg.check = function(index){ var checkState = $("#checkStateModel").val(); var checkMsg = $("#checkMsg").val(); if(checkState==null||checkState==''){ Feng.info("请选择审核状态"); return ; } if(checkMsg == null || checkMsg == ''){ Feng.info("请填写审核意见"); return ; } var ajax = new $ax(Feng.ctxPath + "/houseRentingFees/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}); ajax.start(); } /** * 提交审核 */ HouseRentingFeesInfoDlg.submitCheck = function(){ var checkState = $("#checkState").val(); if(checkState != 2 && checkState != 3){ Feng.info("不在审核范围内"); return ; } var operation = function(){ var ajax = new $ax(Feng.ctxPath + "/houseRentingFees/submitCheck", function (data) { if(data.code==200){ Feng.success(data.msg); window.parent.HouseRentingFees.table.refresh(); HouseRentingFeesInfoDlg.close(); }else{ Feng.error(data.msg); } }, function (data) { Feng.error("提交审核失败!" + data.responseJSON.message + "!"); }); ajax.setData({"id":$("#id").val()}); ajax.start(); } Feng.confirm("一旦提交无法修改,是否审核完毕且无误?", operation); } $(function() { $("select").each(function () { $(this).val($(this).attr("value")).trigger("change"); }); Feng.getCheckLog("logTable",{"type":CONFIG.project_rentingFees,"mainId":$("#id").val(),"typeFileId":"","active":1}); Feng.showMiniFileModal(CONFIG.project_rentingFees,$("#type").val(),$("#id").val()); });