rentUpdate.jsp 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <script type="text/javascript">
  3. var detail_load = function(rentId){
  4. $("#rentId_update").val(rentId);
  5. $.ajax({
  6. type: "post",//使用get方法访问后台
  7. dataType: "json",//返回json格式的数据
  8. url: "rent10Action_findById",//要访问的后台地址
  9. data: "rent10.id="+rentId,//要发送的数据
  10. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  11. success: function(msg){
  12. if(msg.success){
  13. $("#contractNo_update").val(msg.obj.contractNo);
  14. $("#billNo_update").val(msg.obj.billNo);
  15. $("#depositBillNo_update").val(msg.obj.depositBillNo);
  16. }
  17. }
  18. })
  19. $.ajax({
  20. type: "post",//使用get方法访问后台
  21. dataType: "json",//返回json格式的数据
  22. url: "rent10Action_sequenceFindById",//要访问的后台地址
  23. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  24. success: function(msg){
  25. if(msg.success){
  26. $("#sequence_update").val(msg.obj);
  27. }
  28. }
  29. })
  30. }
  31. var updateRent10_submit = function(){
  32. $('#updateForm').form('submit',{
  33. url : whzl.basePath+'/rent10Action_updateRent10ContractNo',
  34. success : function(result){
  35. var parseResult = $.parseJSON(result);
  36. if(parseResult.success){
  37. $("#updateDialog").dialog("close");
  38. $("#rentDataGrid4").datagrid("reload");
  39. }
  40. }
  41. });
  42. }
  43. </script>
  44. <form id="updateForm" method="post">
  45. <table class="mytable" style="width: 100%;">
  46. <tr>
  47. <th>合同号</th>
  48. <td>
  49. <input type="text" id="contractNo_update" name="rent10.contractNo" class="easyui-validatebox" required="true">
  50. <input type="hidden" id="rentId_update" name="rent10.id"/>
  51. </td>
  52. <th>最新合同序号</th>
  53. <td>
  54. <input type="text" id="sequence_update" name="rent10.remarks">
  55. </td>
  56. </tr>
  57. <tr>
  58. <th>租金票据号</th>
  59. <td>
  60. <input type="text" id="billNo_update" name="rent10.billNo" class="easyui-validatebox" required="true">
  61. </td>
  62. <th>押金票据号</th>
  63. <td>
  64. <input type="text" id="depositBillNo_update" name="rent10.depositBillNo">
  65. </td>
  66. </tr>
  67. </table>
  68. </form>