search.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title></title>
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <link href="css/mui.css" rel="stylesheet" />
  8. <script src="assets/js/jquery-3.1.0.js"></script>
  9. <script src="js/mui.js"></script>
  10. <script src="CommonJS/Data_ProcessJS/CommonData.js"></script>
  11. <script src="CommonJS/Config_JS/Config_Load.js"></script>
  12. <script src="CommonJS/DBUtil_JS/WsCommonClassAsmx.js"></script>
  13. <script src="CommonJS/HTML_ElementCommonJS/Select_Common.js"></script>
  14. <style>
  15. * {
  16. margin: 0;
  17. padding: 0;
  18. }
  19. html,
  20. body {
  21. width: 100%;
  22. height: 100%;
  23. overflow: hidden;
  24. }
  25. .logon_bg{
  26. position: absolute;
  27. width:100%;
  28. bottom: 0;
  29. }
  30. .mainDiv{
  31. top: 0;
  32. position: absolute;
  33. width: 100%;
  34. height: 100%;
  35. }
  36. .bak{
  37. width: 100%;
  38. height: 100%;
  39. }
  40. .loginmain{
  41. margin-top: 6.25rem;
  42. margin-left: 0.3125rem;
  43. margin-right: 0.3125rem;
  44. }
  45. .loginbtn{
  46. margin-top: 3.125rem;
  47. width: 95%;
  48. height: 2.5rem;
  49. margin-left: 0.3125rem;
  50. margin-right: 0.3125rem;
  51. }
  52. .loginbtn2{
  53. margin-top: 1.125rem;
  54. width: 95%;
  55. height: 2.5rem;
  56. margin-left: 0.3125rem;
  57. margin-right: 0.3125rem;
  58. }
  59. </style>
  60. <script>
  61. function queryInfo(){
  62. var whereStr = "";
  63. var district = Select_GetSelectText("select_district");
  64. var street = Select_GetSelectText("select_street");
  65. var state = Select_GetSelectText("select_state");
  66. var major = Select_GetSelectText("select_major");
  67. var idcard = $("#txt_idcarid").val();
  68. var name = $("#txt_name").val();
  69. if(district!="全部" ){
  70. whereStr += " and countysstring ='"+district+"'";
  71. }
  72. if(street!="全部" ){
  73. whereStr += " and street ='"+street+"'";
  74. }
  75. if(state!="全部" ){
  76. whereStr += " and 巡检状态 ='"+state+"'";
  77. }
  78. if(major!="全部" ){
  79. whereStr += " and 专业='"+major+"'";
  80. }
  81. if(idcard!= ""){
  82. whereStr += " and num like '%"+idcard+"%'";
  83. }
  84. if(name!=""){
  85. whereStr += " and name like '%"+name+"%'";
  86. }
  87. var username = localStorage.getItem("username");
  88. localStorage.setItem("whereStr",whereStr);
  89. window.location="main.html";
  90. }
  91. function querySuccess(evt,keyvalue){
  92. var jsonData = evt.data;
  93. if(jsonData != null){
  94. switch (keyvalue){
  95. case "queryDistrict":
  96. Select_DyCreate("select_district",jsonData,"所属区县","所属区县",true);
  97. break;
  98. case "queryStreet":
  99. Select_DyCreate("select_street",jsonData,"所属街道","所属街道",true);
  100. break;
  101. case "queryMajor":
  102. Select_DyCreate("select_major",jsonData,"code","name",true);
  103. break;
  104. case "queryState":
  105. Select_DyCreate("select_state",jsonData,"ID","状态",true);
  106. break;
  107. case "AddInfo":
  108. mui.toast("密码修改成功!");
  109. window.location="main.html";
  110. break;
  111. }
  112. }
  113. }
  114. function loadInfo(){
  115. var strSql = "select distinct 所属区县 from 村居委会 t";
  116. new WsCommonClass("QueryDataBaseJson",["sql"],[strSql],querySuccess,"queryDistrict");
  117. strSql = "SELECT distinct 所属街道 FROM 村居委会 where 1=1";
  118. new WsCommonClass("QueryDataBaseJson",["sql"],[strSql],querySuccess,"queryStreet");
  119. strSql = "select t.编码 as code,t.名称 as name,t.备注 as memo from view_编码表无证对象专业 t order by code ";
  120. new WsCommonClass("QueryDataBaseJson",["sql"],[strSql],querySuccess,"queryMajor");
  121. strSql = "select t.* from 编码表巡检状态 t";
  122. new WsCommonClass("QueryDataBaseJson",["sql"],[strSql],querySuccess,"queryState");
  123. }
  124. window.onload = function init(){
  125. loadInfo();
  126. }
  127. function clear(){
  128. Select_SetSelectedByText("select_district","全部");
  129. Select_SetSelectedByText("select_street","全部");
  130. Select_SetSelectedByText("select_state","全部");
  131. Select_SetSelectedByText("select_major","全部");
  132. $("#txt_idcard").val("");
  133. $("#txt_name").val("");
  134. localStorage.setItem("whereStr","");
  135. }
  136. </script>
  137. </head>
  138. <body>
  139. <script type="text/javascript">
  140. mui.init()
  141. </script>
  142. <div class="logon_bg">
  143. <img src="assets/image/login.png" class="bak"/>
  144. </div>
  145. <div class="mainDiv">
  146. <header class="mui-bar mui-bar-nav">
  147. <a id="back" class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
  148. <h1 class="mui-title">条件查询</h1>
  149. </header>
  150. <div class="mui-input-group loginmain" >
  151. <div class="mui-input-row">
  152. <label>地区:</label>
  153. <select id="select_district" class="mui-btn-block" ></select>
  154. </div>
  155. <div class="mui-input-row">
  156. <label>街道:</label>
  157. <select id="select_street" class="mui-btn-block" ></select>
  158. </div>
  159. <div class="mui-input-row">
  160. <label>状态:</label>
  161. <select id="select_state" class="mui-btn-block" ></select>
  162. </div>
  163. <div class="mui-input-row">
  164. <label>证件号:</label>
  165. <input id="txt_idcarid" type="text" class="mui-input-clear" value="" placeholder="证件号">
  166. </div>
  167. <div class="mui-input-row">
  168. <label>从事专业:</label>
  169. <select id="select_major" class="mui-btn-block" ></select>
  170. </div>
  171. <div class="mui-input-row">
  172. <label>姓名:</label>
  173. <input id="txt_name" type="text" class="mui-input-clear" value="" placeholder="姓名">
  174. </div>
  175. </div>
  176. <button type="button" class="mui-btn mui-btn-primary loginbtn" onclick="clear()" >重置 </button>
  177. <button type="button" class="mui-btn mui-btn-primary loginbtn2" onclick="queryInfo()" >查询 </button>
  178. </div>
  179. </body>
  180. </html>