exchangeHousePrint.jsp 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
  2. <jsp:include page="../../common/include.jsp" />
  3. <% String basePath = request.getScheme()+ "://" + request.getServerName() + ":" +request.getServerPort() + request.getContextPath(); %>
  4. <%@taglib prefix="s" uri="/struts-tags" %>
  5. <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
  6. <script type="text/javascript">
  7. /* $.ajax({
  8. type: "post",//使用post方法访问后台
  9. dataType: "json",//返回json格式的数据
  10. url: "leaseContractAction_findById",//要访问的后台地址
  11. data:{"leaseContract.id":${leaseContract.id} },
  12. success: function(msg){//msg为返回的数据,在这里做数据绑定
  13. if(msg.success){
  14. $("#contractNo").text(msg.obj.contractNo);
  15. $("#securityPersonName").text(msg.obj.securityPerson.name);
  16. $("#houseAddress").text(msg.obj.houseAddress);
  17. $("#houseArea").text(new Number(msg.obj.houseArea).toFixed(2));
  18. $("#garageArea").text(new Number(msg.obj.garageArea).toFixed(2));
  19. $("#houseMoney").text(new Number(msg.obj.housePrice * msg.obj.houseArea).toFixed(2));
  20. $("#houseReduce").text(new Number((msg.obj.housePrice-msg.obj.protectPrice) * 24 * msg.obj.securityNum).toFixed(2));
  21. $("#moneyActual").text(new Number(msg.obj.moneyActual).toFixed(2));
  22. $("#garageMoney").text(new Number(msg.obj.garagePrice * msg.obj.garageArea).toFixed(2));
  23. $("#moneyActual12").text(new Number(msg.obj.moneyActual * 12).toFixed(2));
  24. if(msg.obj.startDate != null){
  25. $("#startDate").text(msg.obj.startDate.substring(0,10));
  26. }
  27. if(msg.obj.endDate != null){
  28. $("#endDate").text(msg.obj.endDate.substring(0,10));
  29. }
  30. }
  31. }
  32. });
  33. */
  34. $.ajax({
  35. type: "post",//使用post方法访问后台
  36. dataType: "json",//返回json格式的数据
  37. url: "exchangeHouseAction_findById",//要访问的后台地址
  38. data:{"exchangeHouse.id":${exchangeHouse.id} },
  39. success: function(msg){
  40. if(msg.success){
  41. $("#securityPerson1.name").text(msg.obj.securityPerson1.name);
  42. }
  43. }
  44. });
  45. </script>
  46. ${templet.content }