123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- <%@ 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">
-
- /**人员名称*/
- var nameFormatter_result = function(value , row , index){
- if(row.securityPerson!=null){
- return row.securityPerson.name ;
- }else{
- return "";
- }
- };
-
- /**身份证号*/
- var idCardFormatter_result = function(value , row , index){
- if(row.securityPerson!=null){
- return row.securityPerson.idCard ;
- }else{
- return "";
- }
- };
-
- /**联系电话*/
- var phoneFormatter_result = function(value , row , index){
- if(row.securityPerson!=null){
- return row.securityPerson.phone ;
- }else{
- return "";
- }
- };
-
- /**录入房源*/
- var houseInputFormatter_result = function(value, row, index){
- return "<img src='<%=basePath%>/images/pencil.png' title='录入房源' onclick=houseInput(" + row.securitypersonId + ") style='cursor:pointer' />";
- };
-
- function houseInput(id){
- $("#securityPersonId").val(id);
-
- $("#houseYaohaoDialog").dialog({
- buttons:[{
- text : '确定',
- iconCls : 'icon-ok',
- handler : function(){
- var selectedItem = $('#houseDataGrid_yaohaoHouse').datagrid('getSelected');
- if(selectedItem.houseState == 4){
- $.messager.alert("提示","该房屋已分配!");
- return ;
- }
- var houseId = selectedItem.id;
- var yaohaoId = $("#yaohaoId").val();
- var securityPersonId = $("#securityPersonId").val();
- $.messager.confirm('提示', '确定要录入该房源吗?', function(r){
- if (r){
- //if(selectedItem=''){$.messager.alert("警告","请选择至少一条待公示的数据!");}
- $.ajax({
- type: "post",
- dataType: "json",
- url: "yaohaoAction_yaohaoResultInput?houseId="+houseId+"&yaohaoId="+yaohaoId+"&securityPersonId="+securityPersonId,
- complete :function(){$("#load").hide();},
- success: function(msg){
- $("#houseYaohaoDialog").dialog('close');
- $('#rentPlanApplyDataGrid_result').datagrid('reload');
- }
- })
- }
- });
- }
- },{
- text : '取消',
- iconCls : 'icon-cancel',
- handler : function(){
- $("#houseYaohaoDialog").dialog('close');
- }
- }],
- onLoad : function(){
- var yaohaoId = $("#yaohaoId").val();
- yaohaoHouse_load(yaohaoId);
- }
- });
- }
-
- var result_load = function(id){
- $('#tabs_result').tabs('select', 1);
- $("#yaohaoId").val(id);
- //加载摇号信息
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "yaohaoAction_findById",//要访问的后台地址
- data:{"yaohao.id":id },
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- var rentPlanId = msg.obj.rentPlan.id;
- //加载配租方案
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "rentPlanAction_findById",//要访问的后台地址
- data:{"rentPlan.id":rentPlanId },
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- $("#title_result").text(msg.obj.title);
- $("#content_result").text(msg.obj.content);
- $("#startDate_result").text(msg.obj.startDate.substring(0,10));
- $("#endDate_result").text(msg.obj.endDate.substring(0,10));
- }
- }
- });
- }
- }
- });
- $('#rentPlanApplyDataGrid_result').datagrid({
- rownumbers:true,
- border:false,
- sortOrder:'desc',
- url:whzl.basePath + '/yaohaoAction_rentPlanApplysById?yaohao.id=' + id,
- checkOnSelect:true,
- selectOnCheck:false,
- loadFilter:function(result){
- if(result.success){
- return result.obj;
- }else{
- $.messager.alert("提示",result.message);
- return ;
- }
- }
- });
- }
- </script>
- <div class="easyui-tabs" id="tabs_result">
- <div title="基本信息" id="jbxx_result">
- <table class="mytable" style="width: 100%;">
- <tr>
- <th width="30%">配租方案标题</th>
- <td width="70%" colspan = "3">
- <span id="title_result" />
- </td>
- </tr>
- <tr>
- <th width="30%" >配租方案开始时间</th>
- <td width="20%" >
- <span id="startDate_result" />
- </td>
- <th width="30%" >配租方案结束时间</th>
- <td width="20%" >
- <span id="endDate_result" />
- </td>
- </tr>
- <tr>
- <th>配租方案内容</th>
- <td colspan = "3" >
- <span id="content_result" />
- </td>
- </tr>
- </table>
- </div>
-
- <div title="人员信息" id="yxdj_result">
- <input id="yaohaoId" type="hidden">
- <input id="securityPersonId" type="hidden">
- <table id="rentPlanApplyDataGrid_result" title="人员信息">
- <thead>
- <tr>
- <th data-options="field:'securitypersonName',align:'center',sortable:true,width:80">姓名</th>
- <th data-options="field:'securitypersonIdCard',align:'center',sortable:true,width:180">身份证号码</th>
- <th data-options="field:'securitypersonPhone',align:'center',width:120">联系电话</th>
- <th data-options="field:'address',align:'center',width:200">房源地址</th>
- <th data-options="field:'houseInput',align:'center',width:60,formatter:houseInputFormatter_result">录入房源</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- <div id="houseYaohaoDialog" data-options="title:' 待配房源',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/yaohaoAction_toYaohaoHouse'">
- </div>
|