123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <script type="text/javascript">
- //小区单价
- var communityPrice = 0;
- //车库单价
- var garagePrice = 0;
- //房源面积
- var area = 0
- //车库面积
- var garageArea = 0
- //折扣
- var discount = 0;
- //核定月租金
- var priceMonth = 0;
- //月租金补贴
- var btpriceMonth = 0;
- //应收月租金
- var sspriceMonth = 0;
- //车库月租金
- var garagePriceMonth = 0;
- //合计应收月租金
- var rent = 0;
- //合计应收年租金
- var rentYear = 0;
- //月份
- var month = 0
-
- var checkoutRents_load = function(houseId){
- $.ajax({
- type: "post",//使用get方法访问后台
- dataType: "json",//返回json格式的数据
- url: "rent10Action_findByHouseId",//要访问的后台地址
- data: "house.id="+houseId,//要发送的数据
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){
- console.log(msg.obj);
- $("#name_community_checkout").text(msg.obj.house.community.name);
- $("#houseNumber_house_checkout").text(msg.obj.house.houseNumber);
- $("#area_house_checkout").text(msg.obj.house.area);
- $("#garageArea_house_checkout").text(msg.obj.house.garageArea);
-
- $("#price_community_checkout").text(msg.obj.price);
- $("#garagePrice_community_checkout").text(msg.obj.garagePrice);
- $("#btprice1_community_checkout").text(msg.obj.btprice1);
- $("#btprice2_community_checkout").text(msg.obj.btprice2);
- $("#btprice3_community_checkout").text(msg.obj.btprice3);
- $("#ssprice1_community_checkout").text(msg.obj.ssprice1);
- $("#ssprice2_community_checkout").text(msg.obj.ssprice2);
- $("#ssprice3_community_checkout").text(msg.obj.ssprice3);
- $("#price_checkout").val(msg.obj.price);
- $("#garagePrice_checkout").val(msg.obj.garagePrice);
- $("#btprice1_checkout").val(msg.obj.btprice1);
- $("#btprice2_checkout").val(msg.obj.btprice2);
- $("#btprice3_checkout").val(msg.obj.btprice3);
- $("#ssprice1_checkout").val(msg.obj.ssprice1);
- $("#ssprice2_checkout").val(msg.obj.ssprice2);
- $("#ssprice3_checkout").val(msg.obj.ssprice3);
- $("#lessee_checkout").val(msg.obj.lessee);
- $("#lesseeId_checkout").val(msg.obj.lesseeId);
- $("#population_checkout").val(msg.obj.population);
- $("#lesseeTel_checkout").val(msg.obj.lesseeTel);
- $("#incomeType_checkout").val(msg.obj.incomeType);
- $("#jmType_checkout").val(msg.obj.jmType);
-
- $("#startDay").text(dealDate(msg.obj.startDay));
- $("#endDay").text(dealDate(msg.obj.endDay));
- $("#priceMonth_span_checkout").text(msg.obj.priceMonth);
- $("#btpriceMonth_span_checkout").text(msg.obj.btpriceMonth);
- $("#sspriceMonth_span_checkout").text(msg.obj.sspriceMonth);
- $("#garagePriceMonth_span_checkout").text(msg.obj.garagePriceMonth);
- $("#jmpriceMonth_span_checkout").text(msg.obj.jmpriceMonth);
- $("#house_checkout").val(msg.obj.house.id);
- $("#priceMonth_checkout").val(msg.obj.priceMonth);
- $("#btpriceMonth_checkout").val(msg.obj.btpriceMonth);
- $("#sspriceMonth_checkout").val(msg.obj.sspriceMonth);
- $("#garagePriceMonth_checkout").val(msg.obj.garagePriceMonth);
- $("#rent_checkout").val(msg.obj.rent);
- $("#jmpriceMonth_checkout").val(msg.obj.jmpriceMonth);
-
- $("#rent_span_checkout").text(msg.obj.rent);
-
- $('#endDay_checkout').datebox('setValue', msg.obj.endDay);
- $("#house_checkout").val(houseId);
- if(msg.obj.price != null){
- communityPrice = msg.obj.price;
- }
- if(msg.obj.garagePrice != null){
- garagePrice = msg.obj.garagePrice;
- }
- if(msg.obj.house.area != null){
- area = msg.obj.house.area;
- }
- if(msg.obj.house.garageArea != null){
- garageArea = msg.obj.house.garageArea;
- }
- }
- })
- }
- function calculateRent(){
- if($("#incomeType_checkout").val()==''){
- alert("请选择家庭收入类别");
- }else{
- if($("#startDay_checkout").datebox('getValue') == ''||$("#endDay_checkout").datebox('getValue')==''){
- alert("请选择合同起止时间");
- }else{
- var startDay = $("#startDay_checkout").datebox('getValue');
- var endDay = $("#endDay_checkout").datebox('getValue');
- var rent = $("#rent_span_checkout").text();
- month = countMonthCheckout(startDay,endDay);
- if(month>0){
- $("#monthTip_span").text("多缴");
- $("#rentYear_span").text("合计实退租金");
- }else{
- $("#monthTip_span").text("欠缴");
- $("#rentYear_span").text("合计欠缴租金");
- }
- $("#month_checkout").text(month);
- //合计应收年租金
- rentYear = Number(rent * month).toFixed(0);
- $("#rentYear_span_checkout").text(rentYear);
- $("#rentYear_checkout").val(rentYear);
- }
- }
- }
-
- var checkoutRents_submit = function(){
- if(!idCard1($("#lesseeId_checkout").val())){
- alert("请核对身份证号!");
- return false;
- }
- //if(rentYear == 0){
- if($("#rentYear_checkout").val() == ""){
- alert("请完善并核对租金信息!");
- }else{
- $('#incomeType_checkout').attr("disabled",false);
- $('#jmType_checkout').attr("disabled",false);
- if($("#file_checkout").val() == null||$("#file_checkout").val() == ""){
- $.messager.alert("提示","请上传附件");
- }else{
- $('#checkoutRentForm').form('submit',{
- url : whzl.basePath+'/rent10Action_checkoutRent10',
- success : function(){
- $("#checkoutDialog").dialog("close");
- searchFun();
- }
- });
- }
- }
- }
-
- function countMonthCheckout(start,end){
- var endDate = new Date(end);
- var startDate = new Date(start);
- var renNumber = 0;
- var yearToMonth = (endDate.getFullYear() - startDate.getFullYear()) * 12;
- var monthToMonth = endDate.getMonth() - startDate.getMonth();
- var day = endDate.getDate() - startDate.getDate();
- if(day>0){
- renNumber = yearToMonth + monthToMonth +1;
- }else{
- renNumber = yearToMonth + monthToMonth;
- }
- return renNumber;
- }
-
- $(function(){
- //选中开始时间自动计算结束时间
- $('#startDay_checkout').datebox({
- onSelect: function(date){
- //判断是否小于开始时间,大于结束时间
- var endDate = new Date($("#endDay").text());
- var startDate = new Date($("#startDay").text());
- var tDate = new Date(date);
- if(tDate>startDate ){
-
- }else{
- $('#startDay_checkout').datebox('setValue', '');
- $.messager.alert("提示","退房时间必须在开始和结束时间内!");
- }
- }
- });
- })
-
- </script>
- <table class="mytable" style="width: 100%;">
- <tr>
- <th colspan="12">收费标准 单位:元/㎡•月</th>
- </tr>
- <tr>
- <th width="8.3%">小区名称</th>
- <th width="8.3%">房号</th>
- <th width="8.3%">面积</th>
- <th width="8.3%">车库面积</th>
- <th width="8.3%">租金价格</th>
- <th width="8.3%">车库价格</th>
- <th width="8.3%">低保补贴</th>
- <th width="8.3%">低收入补贴</th>
- <th width="8.3%">中低收入<br />补贴</th>
- <th width="8.3%">低保实收</th>
- <th width="8.3%">低收入实收</th>
- <th width="8.3%">中低收入<br />实收</th>
- </tr>
- <tr>
- <td><span id="name_community_checkout"></span></td>
- <td><span id="houseNumber_house_checkout"></span></td>
- <td><span id="area_house_checkout"></span></td>
- <td><span id="garageArea_house_checkout"></span></td>
- <td><span id="price_community_checkout"></span></td>
- <td><span id="garagePrice_community_checkout"></span></td>
- <td><span id="btprice1_community_checkout"></span></td>
- <td><span id="btprice2_community_checkout"></span></td>
- <td><span id="btprice3_community_checkout"></span></td>
- <td><span id="ssprice1_community_checkout"></span></td>
- <td><span id="ssprice2_community_checkout"></span></td>
- <td><span id="ssprice3_community_checkout"></span></td>
- </tr>
- </table>
- <form id="checkoutRentForm" method="post" enctype="multipart/form-data">
- <table class="mytable" style="width: 100%;">
-
- <tr>
- <th colspan="7">人员信息</th>
- </tr>
- <tr>
- <th width="25%">户主姓名</th>
- <td width="25%" colspan="2">
- <input type="text" id="lessee_checkout" name="rent10.lessee" readonly="readonly">
- </td>
- <th width="25%" colspan="2">身份证号</th>
- <td width="25%" colspan="2">
- <input type="text" id="lesseeId_checkout" name="rent10.lesseeId" readonly="readonly">
- </td>
- </tr>
- <tr>
- <th>家庭人口</th>
- <td colspan="2">
- <input type="text" id="population_checkout" name="rent10.population" readonly="readonly">
- </td>
- <th colspan="2">联系电话</th>
- <td colspan="2">
- <input type="text" id="lesseeTel_checkout" name="rent10.lesseeTel" readonly="readonly">
- </td>
- </tr>
- <tr>
- <th>家庭收入类别</th>
- <td colspan="2">
- <select id="incomeType_checkout" name="rent10.incomeType" style="width: 173px" disabled="disabled">
- <option value="">请选择</option>
- <option value="1">低保</option>
- <option value="2">低收入</option>
- <option value="3">中低收入</option>
- </select>
- </td>
- <th colspan="2">是否减免</th>
- <td colspan="2">
- <select id="jmType_checkout" name="rent10.jmType" style="width: 173px" disabled="disabled">
- <option value="0">否</option>
- <option value="1">是</option>
- </select>
- </td>
- </tr>
- <tr>
- <th>附件</th>
- <td colspan="6">
- <input type="file" multiple="multiple" name="upload" id="file_checkout">
- </td>
- </tr>
- <tr>
- <th colspan="7">交租信息</th>
- </tr>
- <tr>
- <th>合同开始时间</th>
- <td colspan="2">
- <span id="startDay"></span>
- </td>
- <th colspan="2">合同结束时间</th>
- <td colspan="2">
- <span id="endDay"></span>
- </td>
- </tr>
- <tr>
- <th>退租时间</th>
- <td colspan="2">
- <input class="easyui-datebox" type="text" id="startDay_checkout" name="rent10.startDay" class="easyui-validatebox" required="true">
- </td>
- <th colspan="2">合同结束时间</th>
- <td colspan="2">
- <input class="easyui-datebox" type="text" id="endDay_checkout" name="rent10.endDay" readonly="readonly">
- <input type="button" value="计算" onclick="calculateRent()"/>
- </td>
- </tr>
- <tr>
- <th rowspan="2" width="25%">
- <span>租金 </span><span id="monthTip_span"></span> <span id="month_checkout" style="color: red"></span> 个月
- <input id="house_checkout" name="rent10.house.id" type="hidden"/>
- <input id="priceMonth_checkout" name="rent10.priceMonth" type="hidden"/>
- <input id="btpriceMonth_checkout" name="rent10.btpriceMonth" type="hidden"/>
- <input id="sspriceMonth_checkout" name="rent10.sspriceMonth" type="hidden"/>
- <input id="garagePriceMonth_checkout" name="rent10.garagePriceMonth" type="hidden"/>
- <input id="rent_checkout" name="rent10.rent" type="hidden"/>
- <input id="rentYear_checkout" name="rent10.rentYear" type="hidden"/>
- <input id="jmpriceMonth_checkout" name="rent10.jmpriceMonth" type="hidden"/>
- <input id="price_checkout" name="rent10.price" type="hidden"/>
- <input id="garagePrice_checkout" name="rent10.garagePrice" type="hidden"/>
- <input id="btprice1_checkout" name="rent10.btprice1" type="hidden"/>
- <input id="btprice2_checkout" name="rent10.btprice2" type="hidden"/>
- <input id="btprice3_checkout" name="rent10.btprice3" type="hidden"/>
- <input id="ssprice1_checkout" name="rent10.ssprice1" type="hidden"/>
- <input id="ssprice2_checkout" name="rent10.ssprice2" type="hidden"/>
- <input id="ssprice3_checkout" name="rent10.ssprice3" type="hidden"/>
- </th>
- <th width="12.5%">核定月租金</th>
- <th width="12.5%">月租金补贴</th>
- <th width="12.5%">应收月租金</th>
- <th width="12.5%">车库月租金</th>
- <th width="12.5%">月减免金额</th>
- <th width="12.5%">合计实收月租金</th>
- </tr>
- <tr>
- <td><span id="priceMonth_span_checkout"></span></td>
- <td><span id="btpriceMonth_span_checkout"></span></td>
- <td><span id="sspriceMonth_span_checkout"></span></td>
- <td><span id="garagePriceMonth_span_checkout"></span></td>
- <td><span id="jmpriceMonth_span_checkout"></span></td>
- <td><span id="rent_span_checkout"></span></td>
- </tr>
- <tr>
- <th><span id="rentYear_span">合计实退租金</span>(<span style="color: red;">正退负补</span>)</th>
- <td colspan="6">
- <span id="rentYear_span_checkout"></span>
- <input type="hidden" name="rent10.rentType" value="2">
- <input type="hidden" name="rent10.rentStatus" value="1">
- </td>
- </tr>
- <tr>
- <th>退押金</th>
- <td colspan="2">
- <input type="text" id="deposit_checkout" name="rent10.deposit">
- </td>
- <th colspan="2">退电费</th>
- <td colspan="2">
- <input type="text" id="" name="">
- </td>
- </tr>
- <tr>
- <th>退水费</th>
- <td colspan="2">
- <input type="text" id="" name="">
- </td>
- </tr>
- </table>
- </form>
|