3258c2f45c1d6444f70b0aea67406a13776c3a60.svn-base 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <%@page language="java" pageEncoding="UTF-8"%>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>装备台账明细——发电机</title>
  7. <!--框架必需start-->
  8. <%@include file="../../../../include2.jsp" %>
  9. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/nav/pageNumber.js"></script>
  10. <script type="text/javascript" src="/nwyj/scripts/ECM_gridtemplate/changeFormat.js"></script>
  11. <link href="<%=path%>/scripts/ECM_gridtemplate/changeFormat.css" rel="stylesheet" type="text/css"/>
  12. <!--引用资源文件,JS CSS-->
  13. <script type="text/javascript" src="<%=path%>/scripts/jquery/plugins/jquery.extension.util.js"></script>
  14. <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/common.js"></script>
  15. <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/utils/utils.js"></script>
  16. <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/frameWork/frameWork.js"></script>
  17. <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/utils/Request.js"></script>
  18. <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/searchUtil.js"></script>
  19. <link href="<%=path%>/scripts/freamwork/com/sinosoft/common/searchUtil.css" rel="stylesheet" type="text/css"/>
  20. <!--基本选项卡start-->
  21. <!--框架必需end-->
  22. <!-- 按钮权限start -->
  23. <script type="text/javascript" src="/nwyj/scripts/freamwork/com/sinosoft/common/common.js"></script>
  24. <!-- 按钮权限end -->
  25. <script type="text/javascript">
  26. var deptId=top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();//登录人的单位ID
  27. //数据表格
  28. var g;
  29. var condition = "";
  30. var value1 = (window.location.href).split('?')[1];
  31. var name = (window.location.href).split('?')[2];
  32. if(name=="content_min"){//容量在0到10之间
  33. if(value1==deptId)//传过来的单位ID等于本单位ID。只查跟自己单位挂着的发电机。
  34. condition = "IS_DEL='0' AND COMP_ID = '"+value1+"' AND (convert(double,CONTENT) BETWEEN '0' AND '10')";
  35. else//单位ID不等于登录人本单位ID情况下,可判定为查下属单位的明细,下属单位明细需要递归到最底层单位。
  36. condition = "IS_DEL='0' AND COMP_ID in (select dept_id from SYS_DEPARTMENT WHERE dept_type='1' start with dept_id = '"+value1+"' connect by prior dept_id = parent_id) AND (convert(double,CONTENT) BETWEEN '0' AND '10')";
  37. }else if(name=="content_mid"){//容量在11到50之间
  38. if(value1==deptId)
  39. condition = "IS_DEL='0' AND COMP_ID = '"+value1+"' AND (convert(double,CONTENT) BETWEEN '11' AND '50')";
  40. else
  41. condition = "IS_DEL='0' AND COMP_ID in (select dept_id from SYS_DEPARTMENT WHERE dept_type='1' start with dept_id = '"+value1+"' connect by prior dept_id = parent_id) AND (convert(double,CONTENT) BETWEEN '11' AND '50')";
  42. }else if(name=="content_max"){//容量在51以上
  43. if(value1==deptId)
  44. condition = "IS_DEL='0' AND COMP_ID = '"+value1+"' AND (convert(double,CONTENT) >= '51' )";
  45. else
  46. condition = "IS_DEL='0' AND COMP_ID in (select dept_id from SYS_DEPARTMENT WHERE dept_type='1' start with dept_id = '"+value1+"' connect by prior dept_id = parent_id) AND (convert(double,CONTENT) >= '51' )";
  47. }else if(name=="kused"){//可调拨的情况下
  48. if(value1==deptId)
  49. condition = "IS_DEL='0' AND COMP_ID = '"+value1+"' AND IS_USED='1'";
  50. else
  51. condition = "IS_DEL='0' AND COMP_ID in (select dept_id from SYS_DEPARTMENT WHERE dept_type='1' start with dept_id = '"+value1+"' connect by prior dept_id = parent_id) AND IS_USED='1'";
  52. }else if(name=="bused"){//不可调拨的情况下
  53. if(value1==deptId)
  54. condition = "IS_DEL='0' AND COMP_ID = '"+value1+"' AND IS_USED='2' ";
  55. else
  56. condition = "IS_DEL='0' AND COMP_ID in (select dept_id from SYS_DEPARTMENT WHERE dept_type='1' start with dept_id = '"+value1+"' connect by prior dept_id = parent_id) AND IS_USED='2' ";
  57. }
  58. var loadParams = {
  59. "listId" : '266',
  60. "condition" : condition,
  61. direction:'DESC',
  62. sort: 'UPDATEDATE'
  63. };
  64. function initComplete(){
  65. g = $("#maingrid").quiGrid({
  66. columns: [{
  67. display: '所属单位', name: 'COMP_ID_266_SHOW', width: "10%", align: 'center' ,showTitle:true
  68. },{
  69. display: '装备名称', name: 'NAME_266', width: "10%", align: 'center' ,showTitle:true
  70. },{
  71. display: '容量(kW)', name: 'CONTENT_266', width: "10%", align: 'center' ,showTitle:true
  72. },{
  73. display: '数量', name: 'NUM_266', width: "5%", align: 'center' ,showTitle:true
  74. },{
  75. display: '燃料', name: 'GAS_266_SHOW', width: "5%", align: 'center' ,showTitle:true
  76. },{
  77. display: '供应商', name: 'PROVIDER_266', width: "10%", align: 'center' ,showTitle:true
  78. },{
  79. display: '购买日期(年月)', name: 'BUY_DATE_266', width: "10%", align: 'center' ,showTitle:true
  80. },{
  81. display: '装备存放场所', name: 'STORE_PLACE_266', width: "10%", align: 'center' ,showTitle:true
  82. },{
  83. display: '负责人', name: 'INPIRE_266', width: "5%", align: 'center' ,showTitle:true
  84. },{
  85. display: '手机', name: 'MOBILE_PHONE_266', width: "10%", align: 'center' ,showTitle:true
  86. },{
  87. display: '电压等级 (V)', name: 'VOLTAGE_LEVEL_266_SHOW', width: "5%", align: 'center',showTitle:true
  88. },{
  89. display: '调用状态', name: 'IS_USED_266_SHOW', width: "10%", align: 'center' ,showTitle:true
  90. }],
  91. url :'/nwyj/ws/crud/CRUDService/queryQui',
  92. params:loadParams,
  93. pageSize: 10,
  94. rownumbers:true,
  95. width:"100%",
  96. checkbox:true,
  97. percentWidthMode:true
  98. });
  99. }
  100. </script>
  101. </head>
  102. <body style="height:500px;overflow: auto;">
  103. <div class="adding_right5" style="height:500px; overflow-y:auto">
  104. <div id="maingrid" style="margin: 0; padding: 0"></div>
  105. </div>
  106. </body>
  107. </html>