123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348 |
- <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
- <jsp:include page="../../common/include.jsp" />
- <% String basePath = request.getScheme()+ "://" + request.getServerName() + ":" +request.getServerPort() + request.getContextPath(); %>
- <script type="text/javascript"><!--
- /**用户显示区*/
- $(function() {
- $('#yaohaoDataGrid').datagrid({
- rownumbers:true,
- fit:true,
- pageSize:20,
- pageList : [ 10, 20, 30, 40, 50 ],
- fitColumns:false,
- border:false,
- sortOrder:'desc',
- pagination:true,
- idField:'id',
- url:whzl.basePath + '/yaohaoAction_listYaohao',
- toolbar:'#searchtool',
- checkOnSelect:true,
- selectOnCheck:false,
- nowrap:true,
- loadFilter:function(result){
- if(result.success){
- return result.obj;
- }else{
- $.messager.alert("提示",result.message);
- return ;
- }
- }
- });
- });
-
-
- /**查询*/
- function searchFun(){
- $("#yaohaoDataGrid").datagrid("load", {
- "yaohao.title":$("#tblQuery").find("input[id='title']").val()
- });
- $('#yaohaoDataGrid').datagrid({
- columns:columns,
- frozenColumns:frozenColumns
- });
- toolBar("yaohaoDataGrid","setYaohaoDialog","yaohao");
- }
-
- /*清除查询条件**/
- function ClearQuery() {
- $("#tblQuery").find("input").val("");
- $("#tblQuery").find("select").val("-1");
- }
-
- var dateFormatter = function(value,row,index){
- if(value != null){
- return value.substring(0,10);
- }else{
- return "";
- }
- }
-
- /**详细*/
- var detailsFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/js/easyui/themes/itemicon/detail.png' title='查看详情' onclick=yaohaoDetails('" + row.id + "','" + row.rentPlan.id + "') style='cursor:pointer' />";
- };
-
- /**详细页面对话框*/
- var yaohaoDetails = function(id){
- $("#detailYaohaoDialog").dialog(
- {
- buttons : [
- {
- text : '确定',
- iconCls : 'icon-ok',
- handler : function(){
- $("#detailYaohaoDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- detail_load(id);
- }
- }
- );
- };
-
- /**修改*/
- var updateFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/images/pencil.png' title='修改' onclick=updateRow(" + row.id + ") style='cursor:pointer' />";
- };
-
- /**更新事件*/
- function updateRow(){
- var row = $('#yaohaoDataGrid').datagrid('getSelected');
- if(row == null){
- $.messager.alert("提示","请先选择要修改的摇号方案!");
- }
- var id = row.id;
-
- yaohaoUpdate(id,0);
- }
-
- /**修改摇号信息*/
- function yaohaoUpdate(id,page){
- $('#updateYaohaoDialog').dialog(
- {
- buttons : [
- {
- text : '上一步',
- iconCls : 'icon-undo',
- handler : function(){
- if($('#tabs_update').tabs('getTabIndex', $('#tabs_update').tabs('getSelected')) != 0){
- $('#tabs_update').tabs('select', $('#tabs_update').tabs('getTabIndex', $('#tabs_update').tabs('getSelected')) - 1);
- }
- }
- },
- {
- text : '下一步',
- iconCls : 'icon-redo',
- handler : function(){
- if($('#tabs_update').tabs('getTabIndex', $('#tabs_update').tabs('getSelected')) != 2){
- $('#tabs_update').tabs('select', $('#tabs_update').tabs('getTabIndex', $('#tabs_update').tabs('getSelected')) + 1);
- }else{
- update_submit(id);
- }
-
- }
- },
- {
- text : '取消',
- iconCls : 'icon-cancel',
- handler : function(){
- $("#updateYaohaoDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- update_load(id,page);
- }
- }
- );
- }
-
- /**摇号*/
- var yaohaoFormatter = function(value , row , index){
- return "<a title='开始摇号' href='yaohaoAction_yaohao?yaohao.id=" + row.id + "' target='_blank' style='cursor:pointer'> <img src='<%=basePath%>/js/easyui/themes/itemicon/yaohao.png'/> </a>";
- };
-
- /**增加摇号*/
- function yaohaoAdd(){
- $('#addYaohaoDialog').dialog(
- {
- buttons : [
- {
- text : '下一步',
- iconCls : 'icon-redo',
- handler : function(){
- add_submit();
- }
- },
- {
- text : '取消',
- iconCls : 'icon-cancel',
- handler : function(){
- $("#addYaohaoDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- add_load();
- }
- }
- );
- }
-
-
- /**小区名称*/
- var communityNameFormatter = function(value , row , index){
- return row.communityName ;
- };
-
- /**居住地点*/
- var addressFormatter = function(value , row , index){
- return row.address ;
- };
-
- /**房号*/
- var houseNumberFormatter = function(value , row , index){
- return row.houseNumber ;
- };
-
- /**面积*/
- var areaFormatter = function(value , row , index){
- return row.area ;
- };
-
- /**人员名称*/
- var nameFormatter = function(value , row , index){
- return row.securityPerson.name ;
- };
-
- /**身份证号*/
- var idCardFormatter = function(value , row , index){
- return row.securityPerson.idCard ;
- };
-
- /**联系电话*/
- var phoneFormatter = function(value , row , index){
- return row.securityPerson.phone ;
- };
-
- /**适用户型*/
- var roomTypeFormatter = function(value , row , index){
- if(row.securityPerson.securityNum >=3){
- return "二居室";
- }else{
- return "一居室";
- }
- };
-
- /**意向小区*/
- var communityNameApplyFormatter = function(value , row , index){
- return row.communityName ;
- };
-
- /**小区名称*/
- var yaohaoItem_communityNameFormatter = function(value , row , index){
- if(row.house != null){
- return row.house.communityName ;
- }
- };
-
- /**居住地点*/
- var yaohaoItem_addressFormatter = function(value , row , index){
- if(row.house != null){
- return row.house.address ;
- }
- };
-
- /**房号*/
- var yaohaoItem_houseNumberFormatter = function(value , row , index){
- if(row.house != null){
- return row.house.houseNumber ;
- }
- };
-
- /**面积*/
- var yaohaoItem_areaFormatter = function(value , row , index){
- if(row.house != null){
- return row.house.area ;
- }
- };
-
- /**人员名称*/
- var yaohaoItem_nameFormatter = function(value , row , index){
- if(row.securityPerson != null){
- return row.securityPerson.name ;
- }
- };
-
- /**身份证号*/
- var yaohaoItem_idCardFormatter = function(value , row , index){
- if(row.securityPerson != null){
- return row.securityPerson.idCard ;
- }
- };
-
- /**手动输入摇号结果*/
- var manualInputResultFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/js/easyui/themes/itemicon/update.png' title='输入结果' onclick=manualInputResult(" + row.id + ") style='cursor:pointer' />";
- }
-
- function manualInputResult(id){
- $("#resultYaohaoDialog").dialog({
- buttons:[{
- text : '取消',
- iconCls : 'icon-cancel',
- handler : function(){
- $("#resultYaohaoDialog").dialog("close");
- }
- }],
- onLoad : function(){
- result_load(id);
- }
- })
- }
- --></script>
- <div class="easyui-layout" data-options="fit:true,border:false">
- <div data-options="region:'center',border:false">
- <div id="searchtool" data-options="region:'north' , border:false">
- <div class="clear"></div>
- <table id="tblQuery" style="width:100%;">
- <tr>
- <td align="right" style="width: 10%;"><span>摇号标题</span></td>
- <td style="width: 20%;"><input id="title" name="yaohao.title" type="text" style="width: 100px;"/></td>
- <td align="left" style="width: 70%;">
- <a href="javascript:yaohaoAdd();" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true">新增</a>
- <a href="javascript:searchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
- <a href="javascript:ClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
- <a href="javascript:updateRow();" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true">修改</a>
- </td>
- </tr>
-
- </table>
- <div class="clear"></div>
- </div>
-
- <table id="yaohaoDataGrid">
- <thead>
- <tr>
- <th data-options="field:'title',sortable:true,width:255">标题</th>
- <th data-options="field:'date',sortable:true,width:150,formatter:dateFormatter">摇号日期</th>
- <th data-options="field:'details',align:'center',width:60,formatter:detailsFormatter">查看详情</th>
- <th data-options="field:'yaohao',align:'center',width:60,formatter:yaohaoFormatter">开始摇号</th>
- <th data-options="field:'manualInputResult',align:'center',width:60,formatter:manualInputResultFormatter">录入结果</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- <div id="detailYaohaoDialog" data-options="title:' 摇号方案详情',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/yaohaoAction_toDetail'">
- </div>
- <div id="addYaohaoDialog" data-options="title:' 添加摇号',iconCls:'icon-add',width:800,height:420,modal:true,href:'<%=basePath %>/yaohaoAction_toAdd'">
- </div>
- <div id="updateYaohaoDialog" data-options="title:' 修改摇号方案',iconCls:'icon-edit',width:800,height:420,modal:true,href:'<%=basePath %>/yaohaoAction_toUpdate'">
- </div>
- <div id="addSecurityPersonDialog" data-options="title:' 待选人员列表',iconCls:'icon-edit',width:800,height:420,modal:true,href:'<%=basePath %>/rentPlanAction_toSecurityPersonList'">
- </div>
- <div id="addHouseDialog" data-options="title:' 待选房源列表',iconCls:'icon-edit',width:800,height:420,modal:true,href:'<%=basePath %>/rentPlanAction_toHouseSelectList'">
- </div>
- <div id="setYaohaoDialog" data-options="title:' 个性化设置',iconCls:'icon-cog',width:500,height:370,modal:true,href:'<%=basePath %>/columnSetAction_toSet?tname=yaohao'">
- </div>
- <div id="resultYaohaoDialog" data-options="title:' 摇号结果录入',iconCls:'icon-details',width:900,height:420,modal:true,href:'<%=basePath %>/yaohaoAction_toResult'">
- </div>
- <script type="text/javascript">
- <!--
- parent.$.messager.progress('close');
- //-->
- </script>
|