123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322 |
- <%-- 打印合同 --%>
- <%@ 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">
- //家庭收入情况
- var incomeTypeObj = null;
- var incomeType_array = null;
-
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"incomeType" ,"aa10.name":"家庭收入类型" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- incomeTypeObj = msg.obj.rows;
- }
- }
- });
-
- /**小区显示区*/
- $(function() {
- $('#rentDataGrid5').datagrid({
- rownumbers:true,
- fit:true,
- pageSize:10,
- pageList : [ 10, 20, 30, 40, 50 ],
- fitColumns:false,
- border:false,
- sortOrder:'desc',
- pagination:true,
- idField:'id',
- toolbar:'#searchtool',
- url:whzl.basePath + '/rent10Action_rentList?rentStatus=0',
- pageNumber:1,
- nowrap:true,
- loadFilter:function(result){
- console.log(result.obj)
- if(result.success){
- return result.obj;
- }else{
- $.messager.alert("提示",result.message);
- return ;
- }
- }
- });
- });
-
- /**查询*/
- function searchFun(){
- $("#rentDataGrid5").datagrid("load", {
- "rent10.house.community.id":trim($('#communityId').combobox("getValue")),
- "rent10.house.no":trim($('#no').combobox("getValue")),
- "rent10.house.houseNumber":trim($('#houseNumber').combobox("getValue")),
- "rent10.lesseeId":trim($('#lesseeId').val()),
- "createStartDay":trim($('#createStartDay').datebox('getValue')),
- "createEndDay":trim($('#createEndDay').datebox('getValue')),
- "rent10.startDay":trim($('#startDay').datebox('getValue')),
- "rent10.endDay":trim($('#endDay').datebox('getValue'))
- });
- }
-
- /*清除查询条件**/
- function ClearQuery() {
- $("#tblQuery").find("input").val("");
- $("#tblQuery").find("select").val("-1");
- }
-
- var communityNameFormatter = function(value , row , index){
- return row.house.communityName;
- }
- var noFormatter = function(value , row , index){
- return row.house.no;
- }
- var houseNumberFormatter = function(value , row , index){
- return row.house.houseNumber;
- }
-
- var dateFormatter = function(value , row , index){
- return dealDate(value);
- }
-
- //合同当前状态
- var rentStatusFormatter = function(value , row , index){
- if(value == 1) {
- return "正常";
- }else if(value == 0) {
- return "作废";
- }else if(value == 2) {
- return "申请作废中";
- }
- }
- /**详情*/
- var detailFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/images/details.png' title='详情' onclick=rentDetail(" + row.id + ") style='cursor:pointer' />";
- }
-
- var rentDetail = function(id){
- $("#rentDetailDialog").dialog(
- {
- buttons : [
- {
- text : '关闭',
- iconCls : 'icon-ok',
- handler : function(){
- $("#rentDetailDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- rentDetail_load(id);
- }
- }
- );
- };
-
- /**打印租金合同*/
- var printRentFormatter = function(value , row , index){
- if(row.contractNo!=null&&row.contractNo!=""){
- return "<img src='<%=basePath%>/js/easyui/themes/itemicon/print.png' title='打印' onclick=printRent(" + row.id + ",'" + row.house.communityName + "') style='cursor:pointer' />"
- }else{
- return "";
- }
- }
-
-
- /**模板选择对话框*/
- var printRent = function(id,communityName){
- $("#templetSelectDialog").dialog(
- {
- buttons : [
- {
- text : '关闭',
- iconCls : 'icon-ok',
- handler : function(){
- $("#templetSelectDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- templet_load(id,communityName);
- }
- }
- );
- };
- var printStateFormatter = function(value , row , index){
- if(value == 0){
- return "未打印";
- }else if(value == 1){
- return "已打印";
- }
- }
-
- var pdfSelectFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/js/easyui/themes/itemicon/print.png' title='选择PDF' onclick=pdfSelect(" + row.id+",'"+row.lessee+"') style='cursor:pointer' />"
- }
-
- var pdfSelect = function(id,lesseeName){
- $("#pdfSelectDialog").dialog(
- {
- buttons : [
- {
- text : '关闭',
- iconCls : 'icon-ok',
- handler : function(){
- $("#pdfSelectDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- pdfSelect_load(id,lesseeName);
- }
- }
- );
- };
-
- /**上传附件*/
- uploadFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/images/up.png' title='确认退房' onclick=uploadRent10(" + row.id + ") style='cursor:pointer' />"
- }
-
- function uploadRent10(id){
- $("#uploadDialog").dialog({
- buttons : [{
- text : '提交',
- iconCls : 'icon-ok',
- handler : function(){
- uploadRent10File_submit(id);
- $("#uploadDialog").dialog("close");
- }
- },{
- text : '取消',
- iconCls : 'icon-cancel',
- handler : function(){
- $("#uploadDialog").dialog("close");
- }
- }],
- onLoad : function(){
- detail_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%;font-size:12px;">
- <tr>
- <td><span>小区名称</span></td>
- <td>
- <input id="communityId">
- <input id="no" style="width: 60px;">幢
- <input id="houseNumber" style="width: 80px;">室
- </td>
- <td>承租人身份证号</td>
- <td><input id="lesseeId"/></td>
- <td align="center">
- <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>
- <tr>
- <td><span>录入合同时间从</span></td>
- <td>
- <input class="easyui-datebox" id="createStartDay"/> 至
- <input class="easyui-datebox" id="createEndDay"/>
- </td>
- <td><span>合同时间从</span></td>
- <td>
- <input class="easyui-datebox" id="startDay"/> 至
- <input class="easyui-datebox" id="endDay"/>
- </td>
- </tr>
- </table>
- <div class="clear"></div>
- </div>
-
- <table id="rentDataGrid5">
- <thead frozen="true">
- <tr>
- <th data-options="field:'id',checkbox:true,width:30">ID</th>
- <th data-options="field:'contractNo',align:'center',width:110">合同编号</th>
- <th data-options="field:'communityName',sortable:true,width:100,formatter:communityNameFormatter">小区名称</th>
- </tr>
- </thead>
- <thead>
- <tr>
- <th data-options="field:'no',width:80,formatter:noFormatter">楼号</th>
- <th data-options="field:'houseNumber',width:80,formatter:houseNumberFormatter">房号</th>
- <th data-options="field:'lessee',width:80">承租人</th>
- <th data-options="field:'lesseeId',width:150">承租人身份证</th>
- <th data-options="field:'startDay',width:80,formatter:dateFormatter">开始时间</th>
- <th data-options="field:'endDay',width:80,formatter:dateFormatter">结束时间</th>
- <th data-options="field:'rentStatus',width:80,formatter:rentStatusFormatter">当前状态</th>
- <th data-options="field:'detail',width:80,formatter:detailFormatter">详情</th>
- <th data-options="field:'printState',width:80,formatter:printStateFormatter">打印状态</th>
- <th data-options="field:'printRent',align:'center',width:60,formatter:printRentFormatter">打印</th>
- <th data-options="field:'pdfSelect',align:'center',width:60,formatter:pdfSelectFormatter">选择模板</th>
- <th data-options="field:'upload',align:'center',width:60,formatter:uploadFormatter">上传PDF</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- <div id="rentDetailDialog" data-options="title:' 合同详情信息',iconCls:'icon-detail',width:1000,height:500,modal:true,href:'<%=basePath %>/rent10Action_toRentDetail'">
- </div>
- <div id="templetSelectDialog" data-options="title:' 选择合同模板',iconCls:'icon-details',width:420,height:320,modal:true,href:'<%=basePath %>/rent10Action_toSelectList'">
- </div>
- <div id="pdfSelectDialog" data-options="title:' 选择合同模板',iconCls:'icon-details',width:1000,height:400,modal:true,href:'<%=basePath %>/rent10Action_toPdfSelect'">
- </div>
- <div id="uploadDialog" data-options="title:' 上传附件',iconCls:'icon-detail',width:400,height:300,modal:true,href:'<%=basePath %>/rent10Action_toUploadRent10'">
- </div>
- <script type="text/javascript">
- $(function(){
- parent.$.messager.progress('close');
- $('#communityId').combobox({
- url: whzl.basePath + '/communityAction_findAll',
- valueField:'value',
- textField:'text',
- filter:function(q,row){
- var opts=$(this).combobox("options");
- //return row[opts.textField].indexOf(q)==0;//
- return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
- },
- onChange:function (newValue,oldValue) {
- $('#no').combobox("setValue","");
- $('#houseNumber').combobox("setValue","");
- $('#no').combobox('reload',whzl.basePath + '/houseAction_findAllNo?house.community.id='+$('#communityId').combobox("getValue"));
- }
- });
- $('#no').combobox({
- //editable:false,
- url: whzl.basePath + '/houseAction_findAllNo?house.community.id='+$('#communityId').combobox("getValue"),
- valueField:'value',
- textField:'text',
- filter:function(q,row){
- var opts=$(this).combobox("options");
- //return row[opts.textField].indexOf(q)==0;//
- return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
- },
- onChange:function (newValue,oldValue) {
- $('#houseNumber').combobox("setValue","");
- $('#houseNumber').combobox('reload',whzl.basePath + '/houseAction_findAllHouseNumber?house.community.id='+$('#communityId').combobox("getValue") + '&house.no='+newValue);
- }
- });
- $('#houseNumber').combobox({
- //editable:false,
- url: whzl.basePath + '/houseAction_findAllHouseNumber?house.community.id='+$('#communityId').combobox("getValue") + '&house.no='+$('#no').combobox("getValue"),
- valueField:'value',
- textField:'text',
- filter:function(q,row){
- var opts=$(this).combobox("options");
- //return row[opts.textField].indexOf(q)==0;//
- return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
- }
- });
- })
- </script>
|