index.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
  6. <meta name="apple-mobile-web-app-capable" content="yes">
  7. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  8. <title>湖北智慧水运</title>
  9. <link href="../css/mui.min.css" rel="stylesheet">
  10. <link href="../css/base.min.css" rel="stylesheet">
  11. <link rel="stylesheet" type="text/css" href="../css/shenpi.css" />
  12. <script type="text/javascript" src="../js/zepto.min.js"></script>
  13. <script type="text/javascript" src="../js/iscroll.js" charset="utf-8"></script>
  14. <script type="text/javascript">
  15. var page_no =0;
  16. var page_count =10;
  17. function aaa(){
  18. $.ajax({
  19. type: 'post',
  20. url: '../../whsqbpcontroller/getZysqbpPageListByJyr.do',
  21. data:{page_no:page_no,page_count:page_count,code:getQueryString("code")},
  22. dataType: 'json',
  23. success: function(data){
  24. console.log(data)
  25. if(data.length==0)
  26. {
  27. layer.open({
  28. shade:false,
  29. content: '没有相关数据',
  30. style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',
  31. time:1
  32. });
  33. $('.lists').html('');
  34. return;
  35. }
  36. for(var i=0;i<data.length;i++){
  37. var aa = data[i];
  38. var color = "";
  39. var json = {
  40. "1":"(未提交)",
  41. "4":"",
  42. "9":"",
  43. "2":"(已完成)",
  44. "3":"(审核中)",
  45. "8":"(已作废)",
  46. "5":"(取消作业)",
  47. "6":"(取消完成)",
  48. "7":"(变更作业)",
  49. "10":"(变更已完成)"
  50. }
  51. var jsoncolor = {"3":"red","5":"red","7":"red",}
  52. var kwcolor ="";
  53. if((data[i].recordStatus=="2"||data[i].recordStatus=="10")&&!(data[i].kgzt=="Y"&&data[i].wgzt=="Y")){
  54. kwcolor="blue";
  55. }
  56. $(".lists").append('<tr class="'+jsoncolor[data[i].recordStatus]+' '+kwcolor+'" value="'+data[i].id+'" onclick="tiaohzuan('+data[i].id+')" ><td class="titlered2" >'+datetoyue(data[i].bgsj)+','+data[i].wxhwmcbh+'('+data[i].cm+')('+data[i].zydw.aqbmfzr+')'+json[data[i].recordStatus]+'</td></tr>');
  57. }
  58. if(data.length>=page_count){
  59. showJZ();
  60. }else{
  61. hideJZ();
  62. }
  63. myScroll.refresh();
  64. }})
  65. }
  66. $(function(){
  67. $("#wanchengyijian").live("click",function(){
  68. location.href="whzysbtx.html";
  69. })
  70. $("#chaxun").live("click",function(){
  71. location.href="whzycx.html";
  72. })
  73. $.ajax({
  74. type: 'post',
  75. url: '../../aqusercontroller/getByCode.do',
  76. data:{count:"10",code:getQueryString("code")},
  77. dataType: 'json',
  78. success: function(data){
  79. if(data.sfjyr=="Y"){
  80. $("#jingyingren").show()
  81. }else if(data.sfjyr=="N"){
  82. $("#xingzhengren").show()
  83. }
  84. }});
  85. aaa();
  86. $(".tiaozhuan").live("click",function(){
  87. var value = $(this).attr("value");
  88. location.href = "dcttl3.html?value="+value;
  89. })
  90. })
  91. function tiaohzuan(value){
  92. location.href = "dcttl3.html?value="+value;
  93. }
  94. var myScroll,
  95. pullDownEl, pullDownOffset,
  96. pullUpEl, pullUpOffset,
  97. generatedCount = 0;
  98. /**
  99. * 下拉刷新 (自定义实现此方法)
  100. * myScroll.refresh(); 数据加载完成后,调用界面更新方法
  101. */
  102. function pullDownAction () {
  103. hideJZ();
  104. $(".lists").html("");
  105. page_no=0;
  106. aaa();
  107. }
  108. /**
  109. * 滚动翻页 (自定义实现此方法)
  110. * myScroll.refresh(); // 数据加载完成后,调用界面更新方法
  111. */
  112. function pullUpAction () {
  113. page_no+=1;
  114. aaa();
  115. }
  116. /**
  117. * 初始化iScroll控件
  118. */
  119. function loaded() {
  120. pullDownEl = document.getElementById('pullDown');
  121. pullDownOffset = pullDownEl.offsetHeight;
  122. pullUpEl = document.getElementById('pullUp');
  123. pullUpOffset = pullUpEl.offsetHeight;
  124. myScroll = new iScroll('wrapper', {
  125. scrollbarClass: 'myScrollbar',
  126. useTransition: false,
  127. topOffset: pullDownOffset,
  128. onRefresh: function () {
  129. if (pullDownEl.className.match('loading')) {
  130. pullDownEl.className = '';
  131. pullDownEl.querySelector('.pullDownLabel').innerHTML = '下拉刷新...';
  132. } else if (pullUpEl.className.match('loading')) {
  133. pullUpEl.className = '';
  134. pullUpEl.querySelector('.pullUpLabel').innerHTML = '上拉加载更多...';
  135. }
  136. },
  137. onScrollMove: function () {
  138. if (this.y > 5 && !pullDownEl.className.match('flip')) {
  139. pullDownEl.className = 'flip';
  140. pullDownEl.querySelector('.pullDownLabel').innerHTML = '松手开始更新...';
  141. this.minScrollY = 0;
  142. } else if (this.y < 5 && pullDownEl.className.match('flip')) {
  143. pullDownEl.className = '';
  144. pullDownEl.querySelector('.pullDownLabel').innerHTML = '下拉刷新...';
  145. this.minScrollY = -pullDownOffset;
  146. } else if (this.y < (this.maxScrollY - 5) && !pullUpEl.className.match('flip')) {
  147. pullUpEl.className = 'flip';
  148. pullUpEl.querySelector('.pullUpLabel').innerHTML = '松手开始更新...';
  149. this.maxScrollY = this.maxScrollY;
  150. } else if (this.y > (this.maxScrollY + 5) && pullUpEl.className.match('flip')) {
  151. pullUpEl.className = '';
  152. pullUpEl.querySelector('.pullUpLabel').innerHTML = '上拉加载更多...';
  153. this.maxScrollY = pullUpOffset;
  154. }
  155. },
  156. onScrollEnd: function () {
  157. if (pullDownEl.className.match('flip')) {
  158. pullDownEl.className = 'loading';
  159. pullDownEl.querySelector('.pullDownLabel').innerHTML = '加载中...';
  160. pullDownAction(); // ajax call
  161. } else if (pullUpEl.className.match('flip')) {
  162. pullUpEl.className = 'loading';
  163. pullUpEl.querySelector('.pullUpLabel').innerHTML = '加载中...';
  164. pullUpAction(); // ajax call
  165. }
  166. }
  167. });
  168. setTimeout(function () { document.getElementById('wrapper').style.left = '0'; }, 800);
  169. }
  170. //初始化绑定iScroll控件
  171. document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
  172. document.addEventListener('DOMContentLoaded', loaded, false);
  173. </script>
  174. <style type="text/css" media="all">
  175. #header {
  176. position:absolute; z-index:2;
  177. top:0; left:0;
  178. width:100%;
  179. height:45px;
  180. line-height:45px;
  181. padding:0;
  182. color:#eee;
  183. font-size:22px;
  184. text-align:center;
  185. color:white;
  186. background: #2196f3;
  187. }
  188. #header a {
  189. color:white;
  190. text-decoration:none;
  191. }
  192. #wrapper {
  193. position:absolute; z-index:1;
  194. top:30px; bottom:0px; left:-9999px;
  195. width:100%;
  196. overflow:auto;
  197. }
  198. .sousuotiaojian{
  199. position: absolute;
  200. left:0px;
  201. margin:0px;
  202. top:45px;
  203. height:48px;
  204. line-height:48px;
  205. text-align: center
  206. ;padding-left: 5px;
  207. padding-right: 5px;
  208. position: relative;
  209. border: 1px solid gray;
  210. border-radius:5px;
  211. }
  212. #scroller {
  213. position:absolute; z-index:1;
  214. /* -webkit-touch-callout:none;*/
  215. -webkit-tap-highlight-color:rgba(0,0,0,0);
  216. width:100%;
  217. padding:0;
  218. }
  219. #myFrame {
  220. position:absolute;
  221. top:0; left:0;
  222. }
  223. /**
  224. *
  225. * Pull down styles
  226. *
  227. */
  228. #pullDown, #pullUp {
  229. background:#fff;
  230. height:45px;
  231. line-height:45px;
  232. font-weight:bold;
  233. font-size:14px;
  234. color:#888;
  235. padding-left: 50%;
  236. margin-left:-54.5px;
  237. }
  238. #pullDown .pullDownIcon, #pullUp .pullUpIcon {
  239. display:block; float:left;
  240. width:40px; height:40px;
  241. background:url(../images/pull-icon@2x.png) 0 0 no-repeat;
  242. -webkit-background-size:40px 80px; background-size:40px 80px;
  243. -webkit-transition-property:-webkit-transform;
  244. -webkit-transition-duration:250ms;
  245. }
  246. #pullDown .pullDownIcon {
  247. -webkit-transform:rotate(0deg) translateZ(0);
  248. }
  249. #pullUp .pullUpIcon {
  250. -webkit-transform:rotate(-180deg) translateZ(0);
  251. }
  252. #pullDown.flip .pullDownIcon {
  253. -webkit-transform:rotate(-180deg) translateZ(0);
  254. }
  255. #pullUp.flip .pullUpIcon {
  256. -webkit-transform:rotate(0deg) translateZ(0);
  257. }
  258. #pullDown.loading .pullDownIcon, #pullUp.loading .pullUpIcon {
  259. background-position:0 100%;
  260. -webkit-transform:rotate(0deg) translateZ(0);
  261. -webkit-transition-duration:0ms;
  262. -webkit-animation-name:loading;
  263. -webkit-animation-duration:2s;
  264. -webkit-animation-iteration-count:infinite;
  265. -webkit-animation-timing-function:linear;
  266. }
  267. @-webkit-keyframes loading {
  268. from { -webkit-transform:rotate(0deg) translateZ(0); }
  269. to { -webkit-transform:rotate(360deg) translateZ(0); }
  270. }
  271. ul,li{padding: 0px;margin: 0px;}
  272. .mui-media-body{
  273. overflow: hidden;
  274. text-overflow: ellipsis;
  275. white-space: nowrap;
  276. }
  277. .container{
  278. padding-left:0px;
  279. padding-right:0px;
  280. }
  281. .mui-input-group:after {
  282. position: absolute;
  283. right: 0;
  284. bottom: 0;
  285. left: 0;
  286. height: 0px;
  287. content: '';
  288. background-color: #c8c7cc;
  289. -webkit-transform: scaleY(.5);
  290. transform: scaleY(.5);
  291. }
  292. .red{color: red}
  293. .header-logo{
  294. width:50%;
  295. text-align:right;
  296. }
  297. .layermmain .section { vertical-align: middle;}
  298. .icback{
  299. font-size: 22px;
  300. }
  301. .nav{position: fixed;}
  302. .header {
  303. width:100%;
  304. height:45px;
  305. line-height:45px;
  306. padding:0;
  307. color:#eee;
  308. font-size:22px;
  309. text-align:center;
  310. color:white;
  311. background: #2196f3;
  312. }
  313. .blue{color: blue;}
  314. </style>
  315. </head>
  316. <body>
  317. <div id="header"><a>危货作业申报</a></div>
  318. <div id="wrapper" style="margin-bottom:70px" >
  319. <div id="scroller">
  320. <div id="pullDown" style="margin-top:17px" >
  321. <div><span class="pullDownIcon"></span><span class="pullDownLabel">下拉刷新...</span></div>
  322. </div>
  323. <div id="mui-content">
  324. <div class="content-inner">
  325. <div class="container">
  326. <div class="table-responsive">
  327. <table class="table" title="Default Tabl" style="width: 90%;text-align: center;" align="center">
  328. <tbody id="content" class="lists">
  329. </tbody>
  330. </table>
  331. </div>
  332. </div>
  333. </div>
  334. </div>
  335. <div id="pullUp">
  336. </div>
  337. </div>
  338. </div>
  339. <nav id="jingyingren" style="width: 100%;display:none;height: 50px;position: fixed;bottom: 0px;background: white;">
  340. <button class="mui-btn mui-btn-positive" type="button" style="width: 40%;background: #2196f3;border: 0px;margin-left: 9%;height: 40px;" id="wanchengyijian">申报申请</button>&nbsp;&nbsp;
  341. <button class="mui-btn mui-btn-positive" type="button" style="width: 40%;background: #2196f3;border: 0px;height: 40px;" id="chaxun">查询</button>
  342. </nav>
  343. <nav id="xingzhengren" style="width: 100%;height: 50px;display:none;position: fixed;bottom: 0px;background: white;">
  344. <button class="mui-btn mui-btn-positive" type="button" style="width: 80%;margin-left: 9%;background: #2196f3;border: 0px;height: 40px;" id="chaxun">查询</button>
  345. </nav>
  346. </body>
  347. </html>