123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380 |
- <%@ 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() {
- $('#rentPlanDataGrid').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 + '/rentPlanAction_listRentPlan',
- 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(){
- $("#rentPlanDataGrid").datagrid("load", {
- "rentPlan.title":$("#tblQuery").find("input[id='title']").val()
- });
- }
-
- /*清除查询条件**/
- function ClearQuery() {
- $("#tblQuery").find("input").val("");
- $("#tblQuery").find("select").val("-1");
- }
-
- var startDateFormatter = function(value,row,index){
- return value.substring(0,10);
- }
-
- var endDateFormatter = function(value,row,index){
- return value.substring(0,10);
- }
-
-
- /**详细*/
- var detailsFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/images/details.png' title='查看详情' onclick=rentPlanDetails(" + row.id + ") style='cursor:pointer' />";
- };
-
- /**详细页面对话框*/
- var rentPlanDetails = function(id){
- $("#detailRentPlanDialog").dialog(
- {
- buttons : [
- {
- text : '确定',
- iconCls : 'icon-ok',
- handler : function(){
- $("#detailRentPlanDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- detail_load(id);
- }
- }
- );
- };
-
- /**更新*/
- var updateFormatter = function(value , row , index){
- if(row.rentPlanState == null || row.rentPlanState == '' ){
- return "<img src='<%=basePath%>/images/pencil.png' title='修改' onclick=updateRow('" + row.id + "','0') style='cursor:pointer' />";
- }else{
- return "";
- }
- };
-
- /**更新事件*/
- function updateRow(id,page){
- $('#updateRentPlanDialog').dialog(
- {
- buttons : [
- {
- text : '提交',
- iconCls : 'icon-ok',
- handler : function(){
- task_submit(id);
- $("#updaterentPlanDialog").dialog("close");
- }
- },
- {
- text : '取消',
- iconCls : 'icon-cancel',
- handler : function(){
- $("#updaterentPlanDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- task_load(id,page);
- }
- }
- );
- }
-
-
- /**立即发布*/
- var publishFormatter = function(value , row , index){
- if(row.rentPlanState == null || row.rentPlanState == '' ){
- return "<img src='<%=basePath%>/images/pencil.png' title='立即发布' onclick=publishRow(" + row.id + ") style='cursor:pointer' />";
- }else{
- return "已发布";
- }
- };
-
- /**立即发布*/
- function publishRow(id){
- $.messager.confirm('提示', '确定发布该条配租方案么?发布后将无法修改', function(r){
- if (r){
- $.ajax({
- type: "post",//使用get方法访问后台
- dataType: "json",//返回json格式的数据
- url: "rentPlanAction_publish",//要访问的后台地址
- data: "rentPlan.id="+id,//要发送的数据
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- $.messager.alert('提示','发布成功!');
- $('#rentPlanDataGrid').datagrid('reload');
- }else{
- $.messager.alert('提示','发布失败!');
- }
- }
- });
- }
- });
- }
- /**更新人员*/
- var applyUpdateFormatter = function(value , row , index){
- if(row.rentPlanState == '1'){
- return "<img src='<%=basePath%>/images/pencil.png' title='修改' onclick=applyUpdateRow(" + row.id + ") style='cursor:pointer' />";
- }else{
- return "";
- }
- };
-
-
- /**人员申请修改*/
- function applyUpdateRow(id){
- $('#updateRentPlanApplyDialog').dialog(
- {
- buttons : [
- {
- text : '关闭',
- iconCls : 'icon-ok',
- handler : function(){
- $("#updateRentPlanApplyDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- rentPlanApply_load(id);
- }
- }
- );
- }
-
-
- /**生成摇号*/
- var generateYaohaoFormatter = function(value , row , index){
- if(row.rentPlanState == '1'){
- return "<img src='<%=basePath%>/images/pencil.png' title='修改' onclick=generateYaohao(" + row.id + ") style='cursor:pointer' />";
- }else if(row.rentPlanState == '2'){
- return "已生成";
- }else{
- return "";
- }
- };
-
- /**生成摇号*/
- function generateYaohao(id){
- $.messager.confirm('提示', '确定要生成摇号了吗?生成摇号后将不可再修改意向登记', function(r){
- if (r){
- $.ajax({
- type: "post",//使用get方法访问后台
- dataType: "json",//返回json格式的数据
- url: "rentPlanAction_generateYaohao",//要访问的后台地址
- data: "rentPlan.id="+id,//要发送的数据
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- $.messager.alert('提示','摇号生成成功!');
- $('#rentPlanDataGrid').datagrid('reload');
- }else{
- $.messager.alert('提示','摇号生成失败,请先完成登记意向!');
- }
- }
- });
- }
- });
- }
-
- /**增加配租方案*/
- function rentPlanAdd(){
- $('#addRentPlanDialog').dialog(
- {
- buttons : [
- {
- text : '下一步',
- iconCls : 'icon-redo',
- handler : function(){
- add_submit();
- }
- },
- {
- text : '取消',
- iconCls : 'icon-cancel',
- handler : function(){
- $("#addRentPlanDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- add_load(id);
- }
- }
- );
- }
- /**小区名称*/
- var communityNameFormatter = function(value , row , index){
- return row.house.communityName ;
- };
-
- /**居住地点*/
- var addressFormatter = function(value , row , index){
- return row.house.address ;
- };
-
- /**房号*/
- var houseNumberFormatter = function(value , row , index){
- return row.house.houseNumber ;
- };
-
- /**户型*/
- var roomTypeHouseFormatter = function(value , row , index){
- if(row.house.roomType ==2){
- return "二居室";
- }else{
- return "一居室";
- }
- };
-
- /**面积*/
- var areaFormatter = function(value , row , index){
- return row.house.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 delRentPlanHouseItemFormatter = function(value , row , index){
- return "<img src='" + whzl.basePath +"/images/edit_remove.png' title='删除' onclick=deleteRentPlanHouseItemRow(" + row.id + ") style='cursor:pointer' />";
- };
-
- /**删除*/
- var delRentPlanApplyFormatter = function(value , row , index){
- return "<img src='" + whzl.basePath +"/images/edit_remove.png' title='删除' onclick=deleteRentPlanApplyRow(" + row.id + ") style='cursor:pointer' />";
- };
-
- --></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: 70px;"><span>配租方案标题</span></td><td style="width: 120px;"><input id="title" name="rentPlan.title" type="text" style="width: 100px;"/></td>
- <td align="left" style="width: 200px;">
- <a href="javascript:rentPlanAdd();" 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>
- </td>
- </tr>
-
- </table>
- <div class="clear"></div>
- </div>
-
- <table id="rentPlanDataGrid">
- <thead frozen="true">
- <tr>
- <th data-options="field:'title',sortable:true,width:255">配租方案标题</th>
- </tr>
- </thead>
- <thead>
- <tr>
- <th data-options="field:'startDate',sortable:true,width:150,formatter:startDateFormatter">开始日期</th>
- <th data-options="field:'endDate',sortable:true,width:150,formatter:endDateFormatter">结束日期</th>
- <th data-options="field:'details',align:'center',width:60,formatter:detailsFormatter">查看详细</th>
- <th data-options="field:'update',align:'center',width:60,formatter:updateFormatter">修改</th>
- <th data-options="field:'publish',align:'center',width:60,formatter:publishFormatter">立即发布</th>
- <th data-options="field:'applyUpdate',align:'center',width:60,formatter:applyUpdateFormatter">意向登记</th>
- <th data-options="field:'generateYaohao',align:'center',width:60,formatter:generateYaohaoFormatter">摇号生成</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- <div id="detailRentPlanDialog" data-options="title:' 配租方案详情',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/rentPlanAction_toDetail'">
- </div>
- <div id="addRentPlanDialog" data-options="title:' 添加配租方案',iconCls:'icon-add',width:800,height:420,modal:true,href:'<%=basePath %>/rentPlanAction_toAdd'">
- </div>
- <div id="updateRentPlanDialog" data-options="title:' 修改配租方案',iconCls:'icon-edit',width:800,height:420,modal:true,href:'<%=basePath %>/rentPlanAction_toUpdate'">
- </div>
- <div id="updateRentPlanApplyDialog" data-options="title:' 配租方案意向登记',iconCls:'icon-edit',width:800,height:420,modal:true,href:'<%=basePath %>/rentPlanAction_toRentPlanApplyList'">
- </div>
- <div id="addHouse" data-options="title:' 选择房源',iconCls:'icon-edit',width:700,height:460,modal:true,href:'houseAction_toSelectList'">
- </div>
- <div id="addApply" data-options="title:' 选择人员',iconCls:'icon-edit',width:700,height:460,modal:true,href:'securityPersonAction_toSelectListForRentPlan'">
- </div>
- <script type="text/javascript">
- <!--
- parent.$.messager.progress('close');
- //-->
- </script>
|