813374b55182586c5ab11df5a60e5f5867779609.svn-base 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>锁定列</title>
  6. <!--框架必需start-->
  7. <script type="text/javascript" src="../../libs/js/jquery.js"></script>
  8. <script type="text/javascript" src="../../libs/js/language/cn.js"></script>
  9. <script type="text/javascript" src="../../libs/js/framework.js"></script>
  10. <link href="../../libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  11. <link rel="stylesheet" type="text/css" id="skin" prePath="../../"/>
  12. <link rel="stylesheet" type="text/css" id="customSkin"/>
  13. <!--框架必需end-->
  14. <!--数据表格start-->
  15. <script src="../../libs/js/table/quiGrid.js" type="text/javascript"></script>
  16. <!--数据表格end-->
  17. <style>
  18. .l-panel{
  19. border:solid 1px #cccccc;
  20. }
  21. .l-grid-header{
  22. background-image:url(../../libs/images/demo/g-header2.jpg);
  23. border-bottom: 1px solid #cdc9c3;
  24. }
  25. .l-grid-hd-cell{
  26. border-right:0;
  27. background-image:url(../../libs/images/demo/g-header-split.jpg);
  28. background-position:100% 50%;
  29. background-repeat:no-repeat;
  30. }
  31. .l-grid-row-cell-inner{
  32. line-height:65px;
  33. }
  34. .l-panel-bar{
  35. background:url(../../libs/images/demo/trans.png) repeat-x scroll left bottom #eeeeee;
  36. border-top:solid 1px #cccccc;
  37. }
  38. .l-bar-separator{
  39. border-left:solid 1px #cccccc;
  40. }
  41. .l-grid-row-cell-con-checkbox{
  42. padding:20px 0 0 0;
  43. }
  44. .l-grid-row-cell{
  45. border-right-color:#ffffff;
  46. border-bottom: 1px dotted #cccccc;
  47. }
  48. .l-grid-row-over .l-grid-row-cell,.l-grid-row-over
  49. {
  50. background:#f5f5f5;
  51. }
  52. .l-selected .l-grid-row-cell,.l-selected
  53. {
  54. background:#ffffd5;
  55. background-image: url(../../libs/images/demo/trans.png);
  56. background-repeat:repeat-x;
  57. }
  58. .l-grid-hd-cell-con-checkbox{
  59. padding-top:10px;
  60. }
  61. .l-grid-row-cell-checkbox span,.l-grid-hd-cell-checkbox .l-grid-hd-cell-inner span
  62. {
  63. display:block; width:16px; height:16px; background:url(../../libs/images/icons/checkbox.png) no-repeat;
  64. background-position:0px 0px;
  65. cursor:pointer; overflow:hidden;
  66. margin:0 auto;
  67. }
  68. .l-checked .l-grid-row-cell-checkbox span,.l-checked .l-grid-hd-cell-checkbox .l-grid-hd-cell-inner span
  69. {
  70. background-position:0px 0px;
  71. background-image:url(../../libs/images/icons/checkbox-checked.png);
  72. }
  73. .l-selected .l-grid-row-cell-checkbox span,.l-selected .l-grid-hd-cell-checkbox .l-grid-hd-cell-inner span
  74. {
  75. background-position:0px 0px;
  76. background-image:url(../../libs/images/icons/checkbox-checked.png);
  77. }
  78. .appendRowContent{
  79. text-align:left;
  80. color:red;
  81. }
  82. .l-grid-row-cell-appendRow{
  83. border-bottom: 1px solid #cdc9c3;
  84. height:30px;
  85. }
  86. .tdContentStyle1{
  87. font-size:16px;
  88. font-weight:bold;
  89. color:#a47039;
  90. }
  91. .tdContentStyle2{
  92. padding:15px 0 0 0;
  93. }
  94. </style>
  95. </head>
  96. <body>
  97. 附加行中可以放置长文本、比较多的操作按钮等内容。
  98. <div class="padding_right5">
  99. <div id="maingrid"></div>
  100. </div>
  101. <script type="text/javascript">
  102. var testData={"form.paginate.pageNo":1,"form.paginate.totalRows":13,"rows":[
  103. {"bank":"平安银行","card":"平安银行信用卡(8497)","id":125,"billDay":"10日","repayDay":"28日","cash":"¥5,000.00","appendRowHtml":'<div class="appendRowContent">查看账单:<a>2012年12月</a>&nbsp;&nbsp;<a>历史账单</a></div>'},
  104. {"bank":"平安银行","card":"平安银行信用卡(0496)","id":126,"billDay":"7日","repayDay":"28日","cash":"¥10,000.00","appendRowHtml":'<div class="appendRowContent">查看账单:<a>2012年12月</a>&nbsp;&nbsp;<a>2012年10月</a>&nbsp;&nbsp;<a>2012年9月</a>&nbsp;&nbsp;<a>历史账单</a></div>'},
  105. {"bank":"招商银行","card":"招商银行信用卡(0544)","id":127,"billDay":"20日","repayDay":"25日","cash":"¥12,000.00","appendRowHtml":'<div class="appendRowContent">查看账单:<a>2012年12月</a>&nbsp;&nbsp;<a>2012年7月</a>&nbsp;&nbsp;<a>历史账单</a></div>'},
  106. {"bank":"招商银行","card":"招商银行信用卡(6782)","id":128,"billDay":"15日","repayDay":"25日","cash":"¥15,000.00","appendRowHtml":'<div class="appendRowContent">查看账单:<a>2012年12月</a>&nbsp;&nbsp;<a>2012年3月</a>&nbsp;&nbsp;<a>历史账单</a></div>'}
  107. ]}
  108. //数据表格使用
  109. var g;
  110. function initComplete(){
  111. g = $("#maingrid").quiGrid({
  112. columns: [
  113. { display: '银行', name: 'bank', align: 'center', width: 200,
  114. render: function (rowdata, rowindex, value, column){
  115. var img;
  116. if(rowdata.bank=="平安银行"){
  117. img='<img src="../../libs/images/demo/bank1.jpg"/>';
  118. }
  119. else if(rowdata.bank=="招商银行"){
  120. img='<img src="../../libs/images/demo/bank2.jpg"/>';
  121. }
  122. return '<div class="tdContentStyle2">' + img+ '</div>';
  123. }},
  124. { display: '信用卡', name: 'card', align: 'center' , width: "30%",
  125. render: function (rowdata, rowindex, value, column){
  126. return '<div class="tdContentStyle1">' + rowdata.card+ '</div>';
  127. }
  128. },
  129. { display: '账单日', name: 'billDay', align: 'center' , width: "30%"},
  130. { display: '还款日', name: 'repayDay', align: 'center', width: "20%" },
  131. { display: '取现额度', name: 'cash', align: 'center', width: "20%" }
  132. ], data:testData, pageSize: 10, rownumbers:true, checkbox:true,percentWidthMode:true,
  133. height: '100%', width:"100%",alternatingRow:false,rowHeight:65,headerRowHeight:36
  134. });
  135. }
  136. </script>
  137. </body>
  138. </html>