houseRepairPhotoAdd.jsp 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <script type="text/javascript">
  3. var task_load = function(id){
  4. //$('#tabs_infoadd').tabs('select', 1);
  5. $.ajax({
  6. type: "post",//使用get方法访问后台
  7. dataType: "json",//返回json格式的数据
  8. url: "houseRepairAction_findById",//要访问的后台地址
  9. data: "houseRepair.id="+id,//要发送的数据
  10. complete :function(){$("#load").hide();},
  11. success: function(msg){
  12. $("#name_photo").text(msg.obj.name);
  13. $("#idCard_photo").text(msg.obj.securityPerson.idCard);
  14. $("#phone_photo").text(msg.obj.phone);
  15. $("#communityName_photo").text(msg.obj.house.address);
  16. $("#problem_photo").text(msg.obj.problem);
  17. $("#repairPeople_photo").text(msg.obj.repairPeople);
  18. $("#repairPeoplePhone_photo").text(msg.obj.repairPeoplePhone);
  19. $("#reportTime_photo").text(dealDate(msg.obj.reportTime));
  20. $("#developerDeadline_photo").text(msg.obj.house.developerDeadline);
  21. }
  22. });
  23. /* $("#id_materialFile").val(id);
  24. $("#materialFile_add").change(function(){
  25. $("#materialFileAddForm").form('submit',{
  26. url : whzl.basePath+'/houseRepairAction_addUploadFile',
  27. success: function(result){
  28. $("#materialFile_add").attr("value","");
  29. $.ajax({
  30. type: "post",
  31. dataType: "json",//返回json格式的数据
  32. url: "houseRepairAction_findById",
  33. data: "houseRepair.id="+id,
  34. success: function(msg){
  35. $("#materialFile_add_file").children('div').remove();
  36. for(var i=0;i< msg.obj.materialFile.length;i++){
  37. var $image = $("<div style='width: 100px;height: 40px;float:left;'><a href='" + msg.obj.materialFile[i].filePath + "' rel='lightbox[materialFile_add]'><img src='" + msg.obj.materialFile[i].filePath + "' width='100' height='40'/></a><img src='images/de.png' id='img" + msg.obj.materialFile[i].id + "' onclick='removeImg(" + msg.obj.materialFile[i].id + ")' width='15' height='15' style='float: right;position: relative;top: -38px;right: 2px; cursor:pointer;'></div>");
  38. $("#materialFile_add_file").append ($image);
  39. }
  40. }
  41. });
  42. }
  43. });
  44. });*/
  45. }
  46. </script>
  47. <div class="easyui-tabs" id="tabs_infoadd">
  48. <div title="维修信息" id="info_add">
  49. <table class="mytable" style="width: 100%;">
  50. <tr>
  51. <th width="20%">保障人员姓名</th>
  52. <td width="30%">
  53. <span id="name_photo"></span>
  54. </td>
  55. <th width="20%">身份证号码</th>
  56. <td width="30%">
  57. <span id="idCard_photo"></span>
  58. </td>
  59. </tr>
  60. <tr>
  61. <th>联系电话</th>
  62. <td>
  63. <span id="phone_photo"></span>
  64. </td>
  65. <th>报修小区楼号</th>
  66. <td>
  67. <span id="communityName_photo"></span>
  68. </td>
  69. </tr>
  70. <tr>
  71. <th>保修期至</th>
  72. <td>
  73. <span id="developerDeadline_photo"></span>
  74. </td>
  75. <th>报修时间</th>
  76. <td>
  77. <span id="reportTime_photo"></span>
  78. </td>
  79. </tr>
  80. <tr>
  81. <th>报修人</th>
  82. <td>
  83. <span id="repairPeople_photo"></span>
  84. </td>
  85. <th>报修人联系电话</th>
  86. <td>
  87. <span id="repairPeoplePhone_photo"></span>
  88. </td>
  89. </tr>
  90. <tr>
  91. <th>问题描述</th>
  92. <td colspan="3">
  93. <span id="problem_photo"></span>
  94. </td>
  95. </tr>
  96. </table>
  97. </div>
  98. <div title="故障照片" id="photo_add">
  99. <form id="materialFileAddForm" method="post" enctype="multipart/form-data">
  100. <table class="mytable" style="width: 100%;" id="materialFileAdd_table">
  101. <tr>
  102. <th>上传附件</th>
  103. <td>
  104. <span id="materialFile_add_file">
  105. <input type="hidden" id="id_materialFile" name="houseRepair.id" />
  106. <input type="button" value="上传" onclick="materialFile_add.click()">
  107. <input type="file" accept="image/gif, image/jpeg" multiple name="materialFile" id="materialFile_add" class="easyui-validatebox" style="float:left; width:0px" >
  108. </span>
  109. </td>
  110. </tr>
  111. </table>
  112. </form>
  113. </div>
  114. </div>