123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <script type="text/javascript">
- var getObjectURL = function (file) {
- var url = null;
- if (window.createObjectURL != undefined) {
- url = window.createObjectURL(file);
- } else if (window.URL != undefined) {
- url = window.URL.createObjectURL(file);
- } else if (window.webkitURL != undefined) {
- url = window.webkitURL.createObjectURL(file);
- }
- return url;
- }
- //本地预览故障照片
- $(function () {
- $("#materialFile_add").change(function(){
- alert(132)
- var obj = document.getElementById('materialFile_add') ;
- if(imageFormat(obj)){
- $("#materialFile_add_file").children('div').remove();
- for(var i=0;i<this.files.length;i++){
- //var $image = $("<div style='width: 100px;height: 40px;float:left;'><a href='" + getObjectURL(this.files[i]) + "' rel='lightbox[materialFile_add]'><img src='" + getObjectURL(this.files[i]) + "' width='100' height='40' /></a></div>");
- var $image = $("<div style='width: 120px;height: 80px;float:left;'><a href='" + getObjectURL(this.files[i]) + "' rel='lightbox[materialFile_add]'><img src='" + getObjectURL(this.files[i]) + "' width='120' height='80'/></a><img src='images/de.png' id='img" + i + "' onclick='removeImg1(" + i + ")' width='15' height='15' style='float: right;position: relative;top: -77px;right: 2px; cursor:pointer;'></div>");
- $("#materialFile_add_file").append ($image);
- }
- }
- })
- });
- var removeImg1=function(id){
- $("#img" + id).parent().remove();
- }
-
-
- //从租房合同中获取基本信息
- function addHouseRepairFromLeaseContract(){
- $('#contractDialog').dialog({
- buttons : [{
- text : '确定',
- iconCls : 'icon-ok',
- handler : function(){
- var leaseContractId = selectId_submit();
- $("#leaseContractId_add").val(leaseContractId);
- $("#contractDialog").dialog("close");
- }
- },{
- text : '取消',
- iconCls : 'icon-cancel',
- handler : function(){
- $("#contractDialog").dialog("close");
- }
- }],
- onLoad : function(){
- select_load1();
- }
- });
- }
- //根据房屋id号获取信息
- function addHouseRepairFromHouse(){
- $("#addHouseDialog").dialog({
- buttons : [{
- text : '确定',
- iconCls : 'icon-ok',
- handler : function(){
- var houseIds = house_select_submit();
- $.ajax({
- type: "post",//使用get方法访问后台
- dataType: "json",//返回json格式的数据
- url: "houseAction_findById",//要访问的后台地址
- data: "house.id="+houseIds,//要发送的数据
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
-
- $("#name_add").val(msg.obj.lessee);
- $("#idCard_add").val(msg.obj.lesseeId);
- $("#phone_add").val(msg.obj.lesseeTel);
- $("#houseId_add").val(msg.obj.id);
- $("#houseAddress_add").val(msg.obj.address);
- $("#developerDeadline_add").datebox('setValue', dealDate(msg.obj.developerDeadline));
- $("#addHouseDialog").dialog("close");
- if(msg.obj.decorationId!=undefined){
- $.ajax({
- type: "post",//使用get方法访问后台
- dataType: "json",//返回json格式的数据
- url: "decorationAction_findById",//要访问的后台地址
- data: "decoration.id="+msg.obj.decorationId,//要发送的数据
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg2){
- $("#decorationId_houseRepairAdd").val(msg2.obj.id);
- $("#decorationName_houseRepairAdd").val(msg2.obj.name);
- $("#dm_parlor_houseRepairAdd").val(msg2.obj.dm_parlor);
- $("#qm_parlor_houseRepairAdd").val(msg2.obj.qm_parlor);
- $("#xdd_parlor_houseRepairAdd").val(msg2.obj.xdd_parlor);
- $("#dm_kitchen_houseRepairAdd").val(msg2.obj.dm_kitchen);
- $("#qm_kitchen_houseRepairAdd").val(msg2.obj.qm_kitchen);
- $("#dd_kitchen_houseRepairAdd").val(msg2.obj.dd_kitchen);
- $("#cg_kitchen_houseRepairAdd").val(msg2.obj.cg_kitchen);
- $("#yyj_kitchen_houseRepairAdd").val(msg2.obj.yyj_kitchen);
- $("#rqz_kitchen_houseRepairAdd").val(msg2.obj.rqz_kitchen);
- $("#xcp_kitchen_houseRepairAdd").val(msg2.obj.xcp_kitchen);
- $("#slt_kitchen_houseRepairAdd").val(msg2.obj.slt_kitchen);
- $("#xdd_kitchen_houseRepairAdd").val(msg2.obj.xdd_kitchen);
- $("#rqrsq_kitchen_houseRepairAdd").val(msg2.obj.rqrsq_kitchen);
- $("#dm_bathroom_houseRepairAdd").val(msg2.obj.dm_bathroom);
- $("#qm_bathroom_houseRepairAdd").val(msg2.obj.qm_bathroom);
- $("#dd_bathroom_houseRepairAdd").val(msg2.obj.dd_bathroom);
- $("#yb_bathroom_houseRepairAdd").val(msg2.obj.yb_bathroom);
- $("#hs_bathroom_houseRepairAdd").val(msg2.obj.hs_bathroom);
- $("#mt_bathroom_houseRepairAdd").val(msg2.obj.mt_bathroom);
- $("#xlp_bathroom_houseRepairAdd").val(msg2.obj.xlp_bathroom);
- $("#xdd_bathroom_houseRepairAdd").val(msg2.obj.xdd_bathroom);
- $("#tzm_houseRepairAdd").val(msg2.obj.tzm);
- }
- })
- }
-
- }
- });
- }
- }],
- onLoad : function(){
- //house_select_load('&house.houseState=5');
- house_select_load();
- }
- });
-
- }
- </script>
- <div class="easyui-tabs" id="tabs_add">
- <div title="维修信息" id="info_add">
- <table class="mytable" style="width: 100%;" >
- <tr>
- <th>
- <a href="javascript:addHouseRepairFromHouse();" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true">从房源中选择</a>
- </th>
- </tr>
- </table>
- <form id="addHouseRepairForm" method="post">
- <table class="mytable" style="width:100%;">
- <tr>
- <th width="20%">身份证号</th>
- <td width="30%">
- <input type="text" id="idCard_add" name="houseRepair.idCard">
- </td>
- <th width="20%">保障人员姓名</th>
- <td width="30%">
- <input class="easyui-validatebox" type="text" id="name_add" name="houseRepair.name">
- <input type="hidden" id="houseId_add" name="houseRepair.houseId" />
- </td>
- </tr>
-
- <tr>
- <th>联系电话</th>
- <td>
- <input type="text" id="phone_add" name="houseRepair.phone">
- </td>
-
- <th>故障类别</th>
- <td>
- <select name="houseRepair.repairCategory" id="repairCategory_add" class="easyui-validatebox" required="true" style="width:172px">
- <option value="">请选择</option>
- </select>
- </td>
-
- </tr>
- <tr>
- <th>小区地址</th>
- <td colspan="3">
- <input class="easyui-validatebox" readonly="readonly" id="houseAddress_add" name="houseRepair.address" style="width:513">
- </td>
- </tr>
-
- <tr>
- <th>保修期至</th>
- <td>
- <input class="easyui-datebox" id="developerDeadline_add" name="houseRepair.developerDeadline">
- </td>
- <th>报修时间</th>
- <td>
- <input type="text" id="reportTime_add" name="houseRepair.reportTime" class="easyui-datebox" value="new Date()" readonly="readonly">
- </td>
- </tr>
-
- <tr>
- <th>报修人</th>
- <td>
- <input type="text" id="repairPeople_add" name="houseRepair.repairPeople">
- </td>
- <th>报修人联系电话</th>
- <td>
- <input type="text" id="repairPeoplePhone_add" name="houseRepair.repairPeoplePhone">
- </td>
- </tr>
-
- <tr>
-
- <th>故障说明</th>
- <td colspan="3">
- <textarea rows="3" style="width: 513" id="problem_add" name="houseRepair.problem" class="easyui-validatebox" required="true" ></textarea>
- </td>
- </tr>
-
- </table>
- </form>
- </div>
-
- <div title="故障照片" id="photo_add">
- <form id="materialFileAddForm" method="post" enctype="multipart/form-data">
- <table class="mytable" style="width: 100%;">
- <tr>
- <th width="20%">上传附件</th>
- <td width="80%">
- <div >
- <input type="hidden" id="id_materialFile" name="houseRepair.id" />
- <input type="file" accept="image/gif, image/jpeg" multiple name="materialFile" id="materialFile_add" class="easyui-validatebox" style="float:left; width:0px"/>
- <input type="button" value="上传" onclick="materialFile_add.click()">
-
- </div>
- </td>
- </tr>
- <tr>
- <td colspan="2" id="materialFile_add_file" height=110>
- </td>
- </tr>
- </table>
- </form>
- </div>
-
- <!-- <div title="装修清单" id="decoration_add">
- <form id="addDecorationFormFromHouseRepair" method="post">
- <table class="mytable" style="width: 100%;">
- <tr>
- <th>清单名称</th>
- <td colspan="3">
- <input type="hidden" id="decorationId_houseRepairAdd" name="decoration.id" value="0"/>
- <input type="text" id="decorationName_houseRepairAdd" name="decoration.name" style="width: 500px;" class="easyui-validatebox" />
- </td>
- </tr>
- <tr>
- <th colspan="4">一:客厅、卧室、阳台</th>
- </tr>
- <tr>
- <th>地面:</th>
- <td colspan="3"><input type="text" id="dm_parlor_houseRepairAdd" name="decoration.dm_parlor" style="width: 500px;"/></td>
- </tr>
- <tr>
- <th width="20%">墙面:</th>
- <td width="30%"><input type="text" id="qm_parlor_houseRepairAdd" name="decoration.qm_parlor"/></td>
- <th width="20%">吸顶灯:</th>
- <td width="30%"><input type="text" id="xdd_parlor_houseRepairAdd" name="decoration.xdd_parlor"/></td>
- </tr>
- <tr>
- <th colspan="4">二:厨房</th>
- </tr>
- <tr>
- <th>地面:</th>
- <td><input type="text" id="dm_kitchen_houseRepairAdd" name="decoration.dm_kitchen"/></td>
- <th>墙面:</th>
- <td><input type="text" id="qm_kitchen_houseRepairAdd" name="decoration.qm_kitchen"/></td>
- </tr>
- <tr>
- <th>吊顶:</th>
- <td><input type="text" id="dd_kitchen_houseRepairAdd" name="decoration.dd_kitchen"/></td>
- <th>橱柜:</th>
- <td><input type="text" id="cg_kitchen_houseRepairAdd" name="decoration.cg_kitchen"/></td>
- </tr>
- <tr>
- <th>油烟机:</th>
- <td><input type="text" id="yyj_kitchen_houseRepairAdd" name="decoration.yyj_kitchen"/></td>
- <th>燃气灶:</th>
- <td><input type="text" id="rqz_kitchen_houseRepairAdd" name="decoration.rqz_kitchen"/></td>
- </tr>
- <tr>
- <th>洗菜盆:</th>
- <td><input type="text" id="xcp_kitchen_houseRepairAdd" name="decoration.xcp_kitchen"/></td>
- <th>水龙头:</th>
- <td><input type="text" id="slt_kitchen_houseRepairAdd" name="decoration.slt_kitchen"/></td>
- </tr>
- <tr>
- <th>吸顶灯:</th>
- <td><input type="text" id="xdd_kitchen_houseRepairAdd" name="decoration.xdd_kitchen"/></td>
- <th>燃气热水器:</th>
- <td><input type="text" id="rqrsq_kitchen_houseRepairAdd" name="decoration.rqrsq_kitchen"/></td>
- </tr>
- <tr>
- <th colspan="4">三:卫生间</th>
- </tr>
- <tr>
- <th>地面:</th>
- <td><input type="text" id="dm_bathroom_houseRepairAdd" name="decoration.dm_bathroom"/></td>
- <th>墙面:</th>
- <td><input type="text" id="qm_bathroom_houseRepairAdd" name="decoration.qm_bathroom"/></td>
- </tr>
- <tr>
- <th>吊顶:</th>
- <td><input type="text" id="dd_bathroom_houseRepairAdd" name="decoration.dd_bathroom"/></td>
- <th>浴霸:</th>
- <td><input type="text" id="yb_bathroom_houseRepairAdd" name="decoration.yb_bathroom"/></td>
- </tr>
- <tr>
- <th>花洒:</th>
- <td><input type="text" id="hs_bathroom_houseRepairAdd" name="decoration.hs_bathroom"/></td>
- <th>马桶:</th>
- <td><input type="text" id="mt_bathroom_houseRepairAdd" name="decoration.mt_bathroom"/></td>
- </tr>
- <tr>
- <th>立柱洗脸盆:</th>
- <td><input type="text" id="xlp_bathroom_houseRepairAdd" name="decoration.xlp_bathroom"/></td>
- <th>吸顶灯:</th>
- <td><input type="text" id="xdd_bathroom_houseRepairAdd" name="decoration.xdd_bathroom"/></td>
- </tr>
- <tr>
- <th>四、套装门</th>
- <td colspan="3"><input type="text" id="tzm_houseRepairAdd" name="decoration.tzm" style="width: 500px"/></td>
- </tr>
- </table>
- </form>
- </div>-->
- </div>
|