bgzy.html 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>湖北智慧水运</title>
  5. <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
  6. <meta http-equiv="description" content="this is my page">
  7. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
  9. <link href="../css/base.min.css" rel="stylesheet">
  10. <link rel="stylesheet" type="text/css" href="../css/mui.min.css" />
  11. <link rel="stylesheet" type="text/css" href="../css/shenpi.css" />
  12. <script type="text/javascript" src="../js/zepto.min.js"></script>
  13. </head>
  14. <script>
  15. $(function(){
  16. $("#isokchuandui").live("click",function(){
  17. if($(this).attr("checked")){
  18. $("#chuandui").removeClass("mui-hidden")
  19. }else{
  20. $("#chuandui").addClass("mui-hidden")
  21. }
  22. })
  23. $.ajax({
  24. type: 'post',
  25. url: '../../whsqbpcontroller/getById.do',
  26. data:{id:getQueryString("value")},
  27. dataType: 'json',
  28. success: function(data){
  29. console.log(data)
  30. $("#cm").val(data.cm)
  31. $("#zysl").val(data.zysl)
  32. if(data.zysjq!=""&&data.zysjq!=null){
  33. $("#zysjq-date").val(dateutil(data.zysjq).date)
  34. $("#zysjq-time").val(dateutil(data.zysjq).time)
  35. }
  36. if(data.zysjz!=""&&data.zysjz!=null){
  37. $("#zysjz-date").val(dateutil(data.zysjz).date)
  38. $("#zysjz-time").val(dateutil(data.zysjz).time)
  39. }
  40. $("#hc").val(data.hc)
  41. }})
  42. $("#queding").live("click",function(){
  43. var cm = $("#c-cm").val();
  44. if(cm==""){
  45. showmessage("船名不能为空")
  46. return;
  47. }
  48. var zysl = $("#c-zysl").val();
  49. if(zysl==""){
  50. showmessage("作业数量不能为空")
  51. return;
  52. }
  53. var hc =$("#hc").val();
  54. if(hc==""){
  55. showmessage("航次不能为空")
  56. return;
  57. }
  58. //作业时间止
  59. var zysjz = $("#c-zysjz-date").val()+" "+$("#c-zysjz-time").val();
  60. //作业时间止
  61. var zysjq = $("#c-zysjq-date").val()+" "+$("#c-zysjq-time").val();
  62. var begin=new Date(zysjq.replace(/-/g,"/"));
  63. var end=new Date(zysjz.replace(/-/g,"/"));
  64. //js判断日期
  65. if(begin-end>0){
  66. showmessage("作业时间止要大于作业时间起!");
  67. return ;
  68. }
  69. var bgyy = $("#c-bgyy").val();
  70. if(bgyy==""){
  71. showmessage("变更原因不能为空!")
  72. return;
  73. }
  74. $.ajax({
  75. type: 'post',
  76. url: '../../whsqbpcontroller/doBgzy.do',
  77. data:{id:getQueryString("value"),
  78. cm:cm,
  79. zysl:zysl,
  80. hc:hc,
  81. zysjq:zysjq,
  82. zysjz:zysjz,
  83. bgyy:bgyy
  84. },
  85. dataType: 'json',
  86. success: function(data){
  87. if(data!=null&&data!=""){
  88. showmessage("变更成功")
  89. setTimeout(function(){
  90. // location.href="index.html"
  91. history.back("-1")
  92. }, 1000);
  93. }else{
  94. showmessage("变更失败")
  95. }
  96. }});
  97. })
  98. $("#quxiao").live("click",function(){
  99. history.back(-1);
  100. })
  101. })
  102. </script>
  103. <style>
  104. *{margin: 0px;padding: 0px}
  105. .header {
  106. width:100%;
  107. height:45px;
  108. line-height:45px;
  109. padding:0;
  110. color:#eee;
  111. font-size:22px;
  112. text-align:center;
  113. color:white;
  114. background: #2196f3;
  115. position: fixed;
  116. top: 0px;
  117. }
  118. .header a{color: white;}
  119. .mui-content-padded {
  120. margin: 0px;
  121. margin-top:30px;
  122. margin-bottom: 5px;
  123. color: black;
  124. font-size: 20px;
  125. }
  126. .mui-select{
  127. border: 1px solid rgba(0,0,0,.2);
  128. border-radius: 3px;
  129. margin-bottom: 0px;
  130. }
  131. .wubiankuang{border: 0px;}
  132. .red{color: red;}
  133. #container {
  134. width: 400px;
  135. display: table
  136. }
  137. .left, .mid {
  138. display: table-cell;
  139. }
  140. .mid {
  141. width: 100%;
  142. }
  143. .mui-btn-positive{margin-top: 20px;}
  144. .left{
  145. white-space:nowrap;
  146. }
  147. </style>
  148. <body >
  149. <header class="header">
  150. <a href="#">危货作业申报</a>
  151. </header>
  152. <div class="mui-content" style="padding-left: 10px;padding-right: 10px;background: white;margin-top: 70px;padding-bottom: 30px">
  153. <h2 align="center" style="height: 60px;border-bottom: 1px solid #000000;">原有信息</h2>
  154. <h5 class="mui-content-padded red">船名</h5>
  155. <div class="mui-input-row mui-text">
  156. <input id="cm" type="text" style="border: 0px" readonly="readonly" class="mui-input-clear" placeholder="请输入船名" >
  157. </div>
  158. <h5 class="mui-content-padded red">作业数量</h5>
  159. <div class="mui-input-row mui-text" style="">
  160. <div style="position: absolute;right: 8px;z-index: 999;top: 4px">
  161. </div>
  162. <input type="text" id="zysl" style="border: 0px;" readonly="readonly" placeholder="" class="mui-input-clear" >
  163. </div>
  164. <h5 class="mui-content-padded red">作业时间起</h5>
  165. <div class="mui-input-row mui-text" >
  166. <div style="position: absolute;left:48%;margin-left: -33px;z-index: 999;top: 4px">
  167. <img src="../image/rili.png" style="width: 30px;height: 30px">
  168. </div>
  169. <div style="position: absolute;left:99%;margin-left: -33px;z-index: 999;top: 4px">
  170. <img src="../image/time.png" style="width: 30px;height: 30px">
  171. </div>
  172. <input id="zysjq-date" readonly="readonly" type="date" placeholder="年/月/日" style="width: 48%;margin-right: 1%;" class="mui-input-clear" ><input readonly="readonly" id="zysjq-time" style="width: 50%;" type="time" class="mui-input-clear" placeholder="时/分/秒" >
  173. </div>
  174. <h5 class="mui-content-padded red">作业时间止</h5>
  175. <div class="mui-input-row mui-text" >
  176. <div style="position: absolute;left:48%;margin-left: -33px;z-index: 999;top: 4px">
  177. <img src="../image/rili.png" style="width: 30px;height: 30px">
  178. </div>
  179. <div style="position: absolute;left:99%;margin-left: -33px;z-index: 999;top: 4px">
  180. <img src="../image/time.png" style="width: 30px;height: 30px">
  181. </div>
  182. <input id="zysjz-date" readonly="readonly" type="date" placeholder="年/月/日" style="width: 48%;margin-right: 1%;" class="mui-input-clear" ><input readonly="readonly" id="zysjz-time" style="width: 50%;" type="time" class="mui-input-clear" placeholder="时/分/秒" >
  183. </div>
  184. <h5 class="mui-content-padded red">航次</h5>
  185. <div class="mui-input-row mui-text" style="">
  186. <div style="position: absolute;right: 8px;z-index: 999;top: 4px">
  187. </div>
  188. <input type="text" id="hc" style="border: 0px;" readonly="readonly" placeholder="" class="mui-input-clear" >
  189. </div>
  190. <h2 align="center" style="height: 60px;border-top: 1px solid #000000;border-bottom: 1px solid #000000;">变更信息</h2>
  191. <h5 class="mui-content-padded red">船名</h5>
  192. <div class="mui-input-row mui-text">
  193. <input id="c-cm" type="text" class="mui-input-clear" placeholder="请输入船名" >
  194. </div>
  195. <h5 class="mui-content-padded red">作业数量</h5>
  196. <div class="mui-input-row mui-text">
  197. <input onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" type="number" id="c-zysl" class="mui-input-clear" placeholder="请输入作业数量" >
  198. </div>
  199. <h5 class="mui-content-padded red">作业时间起</h5>
  200. <div class="mui-input-row mui-text" >
  201. <div style="position: absolute;left:48%;margin-left: -33px;z-index: 999;top: 4px">
  202. <img src="../image/rili.png" style="width: 30px;height: 30px">
  203. </div>
  204. <div style="position: absolute;left:99%;margin-left: -33px;z-index: 999;top: 4px">
  205. <img src="../image/time.png" style="width: 30px;height: 30px">
  206. </div>
  207. <input id="c-zysjq-date" type="date" placeholder="年/月/日" style="width: 48%;margin-right: 1%;" class="mui-input-clear" ><input id="c-zysq-time" style="width: 50%;" type="time" class="mui-input-clear" placeholder="时/分/秒" >
  208. </div>
  209. <h5 class="mui-content-padded red">作业时间止</h5>
  210. <div class="mui-input-row mui-text" >
  211. <div style="position: absolute;left:48%;margin-left: -33px;z-index: 999;top: 4px">
  212. <img src="../image/rili.png" style="width: 30px;height: 30px">
  213. </div>
  214. <div style="position: absolute;left:99%;margin-left: -33px;z-index: 999;top: 4px">
  215. <img src="../image/time.png" style="width: 30px;height: 30px">
  216. </div>
  217. <input id="c-zysjz-date" type="date" placeholder="年/月/日" style="width: 48%;margin-right: 1%;" class="mui-input-clear" ><input id="c-zysjz-time" style="width: 50%;" type="time" class="mui-input-clear" placeholder="时/分/秒" >
  218. </div>
  219. <h5 class="mui-content-padded red">航次</h5>
  220. <div class="mui-input-row mui-text" style="">
  221. <div style="position: absolute;right: 8px;z-index: 999;top: 4px">
  222. </div>
  223. <input type="text" id="c-hc" placeholder="" class="mui-input-clear" >
  224. </div>
  225. <h5 class="mui-content-padded red">变更原因</h5>
  226. <div class="mui-input-row mui-text">
  227. <textarea id="c-bgyy" style="height: 100px;" placeholder="请输入变更原因"></textarea>
  228. </div>
  229. <div style="margin-top: 30px;text-align: center;">
  230. <button class="mui-btn mui-btn-positive" type="button" style="width: 40%;background: #2196f3;border: 0px;height: 40px;" id="queding">确定</button>&nbsp;&nbsp;&nbsp;&nbsp;
  231. <button class="mui-btn mui-btn-positive" type="button" style="width: 40%;background: #2196f3;border: 0px;height: 40px;" id="quxiao">取消</button>
  232. </div>
  233. </div>
  234. </body>
  235. </html>