123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <% String basePath = request.getScheme()+ "://" + request.getServerName() + ":" +request.getServerPort() + request.getContextPath(); %>
- <script type="text/javascript"><!--
- //户型
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"roomType" ,"aa10.name":"户型" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- roomTypeObj = msg.obj.rows;
- var select_arr = [];
- var data = roomTypeObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- roomType_array = select_arr.join("");
- }
- }
- });
-
- //房源状态
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"houseState" ,"aa10.name":"房屋状态"},
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- stateObj = msg.obj.rows;
- var select_arr = [];
- var data = stateObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- state_array = select_arr.join("");
- }
- }
- });
-
- var yaohaoHouse_load = function(id){
- $('#houseDataGrid_yaohaoHouse').datagrid({
- idField:'id',
- rownumbers:true,
- border:false,
- sortOrder:'desc',
- url:whzl.basePath + '/yaohaoAction_findHousesById?yaohao.id=' + id,
- checkOnSelect:true,
- selectOnCheck:true,
- singleSelect: true,
- rowStyler:function(index,row){
- if(row.houseState == '4'){
- return 'background-color:pink;color:blue;font-weight:bold;';
- }
- },
- loadFilter:function(result){
- if(result.success){
- return result.obj;
- }else{
- $.messager.alert("提示",result.message);
- return ;
- }
- }
- });
- }
- //户型
- var roomTypeObj = null;
-
- var roomType_array = null;
-
- //房源状态
- var stateObj = null;
-
- var state_array = null;
- /**小区名称*/
- var communityNameFormatter_yaohaoHouse = function(value , row , index){
- return row.communityName;
- };
-
- /**居住地点*/
- var addressFormatter_yaohaoHouse = function(value , row , index){
- return row.address ;
- };
-
- /**房号*/
- var houseNumberFormatter_yaohaoHouse = function(value , row , index){
- return row.houseNumber;
- };
-
- /**面积*/
- var areaFormatter_yaohaoHouse = function(value , row , index){
- return row.area;
- };
-
- /**户型*/
- var roomTypeFormatter_yaohaoHouse = function(value , row , index){
- var roomType = "";
- for(var nItem = 0; nItem < roomTypeObj.length; nItem++ ){
- if(roomTypeObj[nItem].code == value){
- roomType = roomTypeObj[nItem].value;
- break;
- }
- }
- return roomType;
- };
-
- /**状态*/
- var stateFormatter_yaohaoHouse = function(value , row , index){
- var state = "";
- for(var nItem = 0; nItem < stateObj.length; nItem++ ){
- if(stateObj[nItem].code == value){
- state = stateObj[nItem].value;
- break;
- }
- }
- return state;
- };
- --></script>
- <div class="easyui-tabs" id="tabs_yaohaoHouse">
- <div title="房源信息" id="fyxx_yaohaoHouse">
- <table id="houseDataGrid_yaohaoHouse" title="房源信息" >
- <thead frozen="true">
- <tr>
- <th data-options="field:'id',checkbox:true,width:50">ID</th>
- </tr>
- </thead>
- <thead>
- <tr>
- <th data-options="field:'communityName',width:100,formatter:communityNameFormatter_yaohaoHouse">小区名称</th>
- <th data-options="field:'address',width:200,formatter:addressFormatter_yaohaoHouse">地址</th>
- <th data-options="field:'houseNumber',width:40,formatter:houseNumberFormatter_yaohaoHouse">房号</th>
- <th data-options="field:'area',width:60,formatter:areaFormatter_yaohaoHouse">面积</th>
- <th data-options="field:'roomType',width:60,formatter:roomTypeFormatter_yaohaoHouse">户型</th>
- <th data-options="field:'houseState',width:100,formatter:stateFormatter_yaohaoHouse">状态</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
|