123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <script type="text/javascript">
- var opinionObj = null;
- //故障类别
- var repairCategoryObj = null;
- var repairCategory_array = null;
- $(function(){
- //审核意见
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"opinion" ,"aa10.name":"审核意见" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- opinionObj = msg.obj.rows;
- var select_arr = [];
- var data = opinionObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- opinion_array = select_arr.join("");
- $("#confirmationOpinion_add").append(opinion_array);
- }
- }
- });
-
- //故障类别
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"repairCategory" ,"aa10.name":"故障类别" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- repairCategoryObj = msg.obj.rows;
- var select_arr = [];
- var data = repairCategoryObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- repairCategory_array = select_arr.join("");
- }
- }
- });
-
- });
-
- var confirm_load= function(id){
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "houseRepairAction_findById",
- data: "houseRepair.id="+id,
- success: function(msg){
- $("#id_confirmPhoto").val(msg.obj.id);
- $("#name_verify5").text(msg.obj.name);
- $("#idCard_verify5").text(msg.obj.idCard);
- $("#phone_verify5").text(msg.obj.phone);
-
- $("#address_verify5").text(msg.obj.address);
- $("#problem_verify5").text(msg.obj.problem);
- $("#developerDeadline_verify5").text(dealDate(msg.obj.developerDeadline));
- $("#houseRepairNo_verify5").text(msg.obj.houseRepairNo);
- $("#reportDate_verify5").text(dealDate(msg.obj.reportDate));
- $("#repairPeople_verify5").text(msg.obj.repairPeople);
- $("#repairPeoplePhone_verify5").text(msg.obj.repairPeoplePhone);
- $("#estimateDay_verify5").text(msg.obj.estimateDay);
- $("#maintenanceProgram_verify5").text(msg.obj.maintenanceProgram);
- $("#budget_verify5").text(msg.obj.budget);
- //故障类别
- var repairCategory = "";
- for(var nItem = 0; nItem < repairCategoryObj.length; nItem++ ){
- if(repairCategoryObj[nItem].code == msg.obj.repairCategory){
- repairCategory = repairCategoryObj[nItem].value;
- }
- }
- $("#repairCategory_verify5").text(repairCategory);
- //维修前照片
- for(var i=0;i< msg.obj.materialFile.length;i++){
- var $image = $("<a target='_blank' href='../" + msg.obj.materialFile[i].filePath + "'><img src='../" + msg.obj.materialFile[i].filePath + "' width='120' height='80'/></a>");
- $("#materialFile_confirm").append ($image);
- }
-
- for(var i=0;i< msg.obj.confirmFile.length;i++){
- var $image = $("<div style='width: 120px;height: 80px;float:left;'><a href='../" + msg.obj.confirmFile[i].filePath + "'><img src='../" + msg.obj.confirmFile[i].filePath + "' width='120' height='80'/></a><img src='images/de.png' id='img" + msg.obj.confirmFile[i].id + "' onclick='removeImg(" + msg.obj.confirmFile[i].id + ")' width='15' height='15' style='float: right;position: relative;top: -77px;right: 2px; cursor:pointer;'></div>");
- $("#confirmFile_add_file").append ($image);
- }
- if(msg.obj.verify1UserId!=null){
- var verify1Opinion;
- for(var nItem = 0; nItem < opinionObj.length; nItem++ ){
- if(opinionObj[nItem].code == msg.obj.verify1Opinion){
- verify1Opinion = opinionObj[nItem].value;
- }
- }
- $("#verify1User_verify5").text(msg.obj.verify1UserName);
- $("#verify1_verify5").text(dealDate(msg.obj.verify1Date)+" 审核意见:"+verify1Opinion+" 备注:"+msg.obj.verify1Remark+" 维修中标单位:"+msg.obj.repairCompany);
- }
- if(msg.obj.verify2UserId!=null){
- var verify2Opinion;
- for(var nItem = 0; nItem < opinionObj.length; nItem++ ){
- if(opinionObj[nItem].code == msg.obj.verify2Opinion){
- verify2Opinion = opinionObj[nItem].value;
- }
- }
- $("#verify2User_verify5").text(msg.obj.verify2UserName);
- $("#verify2_verify5").text(dealDate(msg.obj.verify2Date)+" 审核意见:"+verify2Opinion+" 备注:"+msg.obj.verify2Remark);
- }
- if(msg.obj.verify4UserId!=null){
- var verify4Opinion;
- for(var nItem = 0; nItem < opinionObj.length; nItem++ ){
- if(opinionObj[nItem].code == msg.obj.verify4Opinion){
- verify4Opinion = opinionObj[nItem].value;
- }
- }
- $("#verify4User_verify5").text(msg.obj.verify4UserName);
- $("#verify4_verify5").text(dealDate(msg.obj.verify4Date)+" 审核意见:"+verify4Opinion+" 备注:"+msg.obj.verify4Remark);
- }
- }
- });
-
- $("#confirmFile_add").change(function(){
- var obj = document.getElementById("confirmFile_add");
- if(imageFormat(obj)){
- $("#confirmFileForm").form('submit',{
- url : whzl.basePath+'/houseRepairAction_addUploadFile',
- success: function(result){
- $("#confirmFile_add").attr("value","");
- $.ajax({
- type: "post",
- dataType: "json",//返回json格式的数据
- url: "houseRepairAction_findById",
- data: "houseRepair.id="+id,
- success: function(msg){
- $("#confirmFile_add_file").children('div').remove();
- for(var i=0;i< msg.obj.confirmFile.length;i++){
- var $image = $("<div style='width: 120px;height: 80px;float:left;'><a target='_blank' href='../" + msg.obj.confirmFile[i].filePath + "'><img src='../" + msg.obj.confirmFile[i].filePath + "' width='120' height='80'/></a><img src='images/de.png' id='img" + msg.obj.confirmFile[i].id + "' onclick='removeImg(" + msg.obj.confirmFile[i].id + ")' width='15' height='15' style='float: right;position: relative;top: -77px;right: 2px; cursor:pointer;'></div>");
- $("#confirmFile_add_file").append ($image);
- }
- }
- });
- }
- });
- }
- });
- }
- var confirm_submit = function(id){
- var flag = true;
- var confirmFile = $("#confirmFile_add_file").children('div').html();
- if(confirmFile == undefined){
- $.messager.alert('提醒','请上传确认附件');
- flag = false;
- }
- if(flag){
- $('#addConfirmHouseRepairForm').form('submit',{
- url : whzl.basePath+'/houseRepairAction_verify5HouseRepair',
- success : function(result){
- var parseResult = $.parseJSON(result);
- if(parseResult.success){
- $("#houseRepairVerify5Dialog").dialog("close");
- $('#houseRepairVerify5DataGrid').datagrid('reload');
- }
- }
- });
- }
- }
-
-
-
- </script>
- <div class="easyui-tabs" id="tabs_verify5" style="height:370px;">
- <div title="报修详情" id="confirmHouseRepair">
- <table class="mytable" style="width: 100%;">
- <tr>
- <th>工单编号</th>
- <td>
- <span id="houseRepairNo_verify5"></span>
- </td>
-
- <th>报修房源地址</th>
- <td>
- <span id="address_verify5"></span>
- </td>
- </tr>
- <tr>
- <th width="20%">保障人员姓名</th>
- <td width="30%">
- <span id="name_verify5"></span>
- </td>
-
- <th width="20%">身份证号码</th>
- <td width="30%">
- <span id="idCard_verify5"></span>
- </td>
- </tr>
- <tr>
- <th>联系电话</th>
- <td>
- <span id="phone_verify5"></span>
- </td>
-
- <th>保修期至</th>
- <td>
- <span id="developerDeadline_verify5"></span>
- </td>
- </tr>
- <tr>
- <th>报修时间</th>
- <td>
- <span id="reportDate_verify5"></span>
- </td>
-
- <th>故障类别</th>
- <td>
- <span id="repairCategory_verify5"></span>
- </td>
- </tr>
-
- <tr>
- <th>故障说明</th>
- <td colspan="3">
- <span id="problem_verify5"></span>
- </td>
- </tr>
-
- <tr>
- <th>报修人</th>
- <td>
- <span id="repairPeople_verify5"></span>
- </td>
-
- <th>报修人联系电话</th>
- <td>
- <span id="repairPeoplePhone_verify5"></span>
- </td>
- </tr>
-
- </table>
- <table class="mytable" style="width: 100%;">
- <tr>
- <th width="20%">维修单位审核</th>
- <td width="80%">
- <span id="verify1User_verify5" style="width:80px;display:inline-block;"></span>
- <span id="verify1_verify5"></span>
- </td>
- </tr>
- <tr>
- <th>工程科审核</th>
- <td>
- <span id="verify2User_verify5" style="width:80px;display:inline-block;"></span>
- <span id="verify2_verify5"></span>
- </td>
- </tr>
- <tr>
- <th>审计审核</th>
- <td>
- <span id="verify4User_verify5" style="width:80px;display:inline-block;"></span>
- <span id="verify4_verify5"></span>
- </td>
- </tr>
- </table>
- </div>
- <div title="维修图片" id="confirmPhoto">
- <table class="mytable" style="width: 100%;">
- <tr>
- <th >维修前图片</th>
- </tr>
- <tr>
- <td height=110>
- <span id="materialFile_verify5"></span>
- </td>
- </tr>
- </table>
- </div>
- <div title="维修方案" id="maintenanceProgram">
- <table class="mytable" style="width: 100%;">
- <tr>
- <th width="15%">维修预算(元)</th>
- <td width="35%">
- <span id="budget_verify5"></span>
- </td>
- <th width="15%">预计工期(天)</th>
- <td>
- <span id="estimateDay_verify5"></span>
- </td>
- </tr>
- <tr>
- <th>维修方案</th>
- <td colspan="5">
- <span id="maintenanceProgram_verify5"></span>
- </td>
- </tr>
- </table>
- </div>
- </div>
- <div class="easyui-tabs" id="tabs_add">
- <div title="维修确认" id="confirm_add">
- <form id="addConfirmHouseRepairForm" method="post">
- <table class="mytable" style="width:100%;">
- <tr>
- <th width = "15%">维修开始时间</th>
- <td width = "20%">
- <input type="hidden" id="id_verify5" name="houseRepair.id">
- <input type="text" id="repairStartDate_add" name="houseRepair.repairStartDate" class="easyui-datebox" style="width: 100" required="true">
- </td>
- <th width = "15%">维修结束时间</th>
- <td width = "20%">
- <input type="text" id="repairEndDate_add" name="houseRepair.repairEndDate" class="easyui-datebox" value="new Date()" style="width: 100" required="true">
- </td>
- <th width="15%">维修是否完成</th>
- <td width="15%">
- <select id="opinion_add" name="opinion" class="easyui-validatebox" required="true">
- <option value="">请选择</option>
- <option value="1">是</option>
- <option value="2">否</option>
- </select>
- </td>
- </tr>
- <tr>
- <td colspan="6" height=110></td>
- </tr>
- </table>
- </form>
- </div>
- <div title="照片上传" id="confirmPhoto_add">
- <form id="confirmFileForm" method="post" enctype="multipart/form-data">
- <table class="mytable" style="width: 100%;" id="confirmFile_table">
- <tr>
- <th width = "20%">完成照片</th>
- <td width = "80%">
- <div>
- <input type="hidden" id="id_confirmPhoto" name="houseRepair.id">
- <input type="button" value="上传" onclick="confirmFile_add.click()">
- <input type="file" accept="image/gif, image/jpeg" multiple name="confirmFile" id="confirmFile_add" class="easyui-validatebox" style="float:left; width:0px" >
- </div>
- </td>
- </tr>
- <tr>
- <td colspan="2" id="confirmFile_add_file" height=110></td>
- </tr>
- </table>
- </form>
- </div>
- </div>
|