exchangeHouseIntentUpdate.jsp 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <script type="text/javascript">
  3. var exchangeHouseIntent_update_submit = function(){
  4. if($('#exchangeReason').val() != ''){
  5. $('#updateExchangeHouseIntentForm').form('submit',{
  6. url : whzl.basePath+'/exchangeHouseIntentAction_updateExchangeHouseIntent',
  7. success : function(result){
  8. var parseResult = $.parseJSON(result);
  9. if(parseResult.success){
  10. $("#updateExchangeHouseIntentDialog").dialog("close");
  11. $('#exchangeHouseIntentDataGrid').datagrid('reload');
  12. $.messager.alert('提示','修改成功!');
  13. }
  14. }
  15. }
  16. );
  17. }else{
  18. $.messager.alert('提示','请填写意向换房原因!');
  19. }
  20. }
  21. var exchangeHouseIntent_update_load = function(id){
  22. $.ajax({
  23. type: "post",//使用get方法访问后台
  24. dataType: "json",//返回json格式的数据
  25. url: "exchangeHouseIntentAction_findById",//要访问的后台地址
  26. data: "exchangeHouseIntent.id="+id,//要发送的数据
  27. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  28. success: function(msg){//msg为返回的数据,在这里做数据绑定
  29. $("#id_update").val(msg.obj.id);
  30. $("#securityPersonIdCard_update").val(msg.obj.securityPerson.idCard);
  31. $("#securityPersonName_update").val(msg.obj.securityPerson.name);
  32. $("#securityPersonPhone_update").val(msg.obj.securityPerson.phone);
  33. $("#securityNum_update").numberbox('setValue',msg.obj.securityPerson.securityNum);
  34. $("#houseAddress_update").val(msg.obj.house.address);
  35. var array = (msg.obj.communities).split(",");
  36. var nums = [ ];
  37. for (var i=0 ; i< array.length ; i++)
  38. {
  39. nums.push(array[i].replace(/\s+/g,""));
  40. }
  41. $('#communities_update').combobox('setValues',nums);
  42. $("#communitieNames_update").val(msg.obj.communitieNames);
  43. $("#houseArea_update").numberbox('setValue',msg.obj.house.area);
  44. var garageArea = msg.obj.house.garageAreava;
  45. if(garageArea == null){
  46. garageArea = 0;
  47. }
  48. $("#garageArea_update").numberbox('setValue',garageArea);
  49. $("#exchangeReason_update").text(msg.obj.exchangeReason);
  50. }
  51. });
  52. $('#communities_update').combobox({
  53. url: whzl.basePath + '/communityAction_findAll',
  54. valueField:'value',
  55. textField:'text',
  56. multiple:true,
  57. filter:function(q,row){
  58. var opts=$(this).combobox("options");
  59. return row[opts.textField].indexOf(q)>-1;
  60. },
  61. onChange:function (newValue,oldValue) {
  62. $('#communitieNames_update').val($('#communities_update').combobox('getText'));
  63. }
  64. });
  65. }
  66. </script>
  67. <form id="updateExchangeHouseIntentForm" method="post">
  68. <table class="mytable" style="width:100%;">
  69. <tr>
  70. <th colspan="4">换房意向人员登记信息</th>
  71. </tr>
  72. <tr>
  73. <th width="20%">身份证号</th>
  74. <td width="30%">
  75. <input class="easyui-validatebox" type="text" id="securityPersonIdCard_update" readonly="readonly">
  76. <input type="hidden" id="id_update" name="exchangeHouseIntent.id" />
  77. <input type="hidden" id="securityPersonHouseId_update" name="securityPersonHouse.id" />
  78. </td>
  79. <th width="20%">姓名</th>
  80. <td width="30%">
  81. <input class="easyui-validatebox" type="text" id="securityPersonName_update" readonly="readonly">
  82. </td>
  83. </tr>
  84. <tr>
  85. <th>联系电话</th>
  86. <td>
  87. <input type="text" class="easyui-validatebox" readonly="readonly" id="securityPersonPhone_update">
  88. </td>
  89. <th>保障人口数量</th>
  90. <td >
  91. <input type="text" class="easyui-numberbox" readonly="readonly" id="securityNum_update">
  92. </td>
  93. </tr>
  94. <tr>
  95. <th>房源面积</th>
  96. <td>
  97. <input type="text" class="easyui-numberbox" precision="2" readonly="readonly" id="houseArea_update">
  98. </td>
  99. <th>车库面积</th>
  100. <td>
  101. <input type="text" class="easyui-numberbox" precision="2" readonly="readonly" id="garageArea_update" >
  102. </td>
  103. </tr>
  104. <tr>
  105. <th>现住房源地址</th>
  106. <td colspan="3">
  107. <input type="text" class="easyui-validatebox" readonly="readonly" id="houseAddress_update" style="width:370px" >
  108. </td>
  109. </tr>
  110. <tr>
  111. <th>意向房源小区</th>
  112. <td colspan="3">
  113. <input id="communities_update" name="exchangeHouseIntent.communities" style="width:370px;">
  114. <input id="communitieNames_update" name="exchangeHouseIntent.communitieNames" type="hidden" >
  115. </td>
  116. </tr>
  117. <tr>
  118. <th >换房原因</th>
  119. <td colspan="3">
  120. <textarea rows="2" cols="50" id="exchangeReason_update" name= "exchangeHouseIntent.exchangeReason" class="easyui-validatebox" ></textarea>
  121. </th>
  122. </tr>
  123. </table>
  124. </form>