editOilIn.jsp 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
  2. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  4. <html>
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  7. <title>编辑进油登记</title>
  8. <link href="/shares/js/yw/master1/liger/skins/ynet/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  9. <link href="${pageContext.request.contextPath }/main.css" rel="stylesheet" type="text/css" />
  10. <link href="/shares/css/yw/master1/reset.css" rel="stylesheet" type="text/css" />
  11. <script type="text/javascript" src="/shares/js/jquery-1.3.2.min.js"></script>
  12. <script type="text/javascript" src="/shares/js/file.js"></script>
  13. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  14. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  15. <script type="text/javascript" src="/shares/js/constant.js"></script>
  16. <script type="text/javascript" src="/shares/js/common.js"></script>
  17. <script src="/shares/xheditor/xheditor-1.1.14/xheditor-1.1.14-zh-cn.min.js" type="text/javascript"></script>
  18. <script src="${pageContext.request.contextPath}/liger/lib/json2.js" type="text/javascript"></script>
  19. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
  20. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  21. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerTextBox.js" type="text/javascript"></script>
  22. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
  23. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
  24. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerSpinner.js" type="text/javascript"></script>
  25. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
  26. <script type="text/javascript" src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js"></script>
  27. <link rel="stylesheet" type="text/css" href="/shares/css/yw/master1/${sessionScope.loginFrom}/jquery.jscrollpane.codrops1.css" />
  28. <script type="text/javascript" src="/shares/js/yw/master1/jquery.mousewheel.js"></script>
  29. <!-- the jScrollPane script -->
  30. <script type="text/javascript" src="/shares/js/yw/master1/jquery.jscrollpane.min.js"></script>
  31. <script type="text/javascript" src="/shares/js/yw/master1/scroll-startstop.events.jquery.js"></script>
  32. <script type="text/javascript" src="/shares/js/yw/master1/scroll.js"></script>
  33. <script type="text/javascript">
  34. //焦点
  35. $(document).ready(function() {
  36. $("input[type='text']:first").focus();
  37. //$("#oil_depot_id").ligerComboBox();
  38. //$("#oil_num_id").ligerComboBox();
  39. //$("#oilType").ligerComboBox();
  40. });
  41. function checkForm(){
  42. var rs = $.validate({
  43. name : "oil_depot_id",
  44. model : [ {
  45. type : "require",
  46. msg : "油库不能为空!"
  47. }]
  48. });
  49. rs = $.validate({
  50. name : "oil_num_id",
  51. model : [ {
  52. type : "require",
  53. msg : "油号不能为空!"
  54. } ]
  55. }) && rs;
  56. rs = $.validate({
  57. name : "oilIn.in_time",
  58. model : [ {
  59. type : "require",
  60. msg : "进油时间不能为空!"
  61. } ]
  62. }) && rs;
  63. if (rs) {
  64. return true;
  65. }else{
  66. return false;
  67. }
  68. }
  69. $(function() {
  70. $("#in_time").ligerDateEditor({showTime: true,labelAlign : 'left',width : 171,height : 21});
  71. });
  72. function refresh(obj){
  73. if(obj == "1"){
  74. parent.location.reload();
  75. }
  76. }
  77. function check(event) {
  78. var e = window.event || event;
  79. var target = e.srcElement || e.target;
  80. var k = e.keyCode;
  81. if(isFunKey(k)) {
  82. return true;
  83. }
  84. var c = getChar(k);
  85. if(target.value.length == '' && (c == '-' || c == '+')) {
  86. return true;
  87. }
  88. if(isNaN(target.value + getChar(k))) {
  89. return false;
  90. }
  91. return true;
  92. }
  93. function isFunKey(code) {
  94. // 8 --> Backspace
  95. // 35 --> End
  96. // 36 --> Home
  97. // 37 --> Left Arrow
  98. // 39 --> Right Arrow
  99. // 46 --> Delete
  100. // 112~123 --> F1~F12
  101. var funKeys = [8, 35, 36, 37, 39, 46];
  102. for(var i = 112; i <= 123; i++) {
  103. funKeys.push(i);
  104. }
  105. for(var i = 0; i < funKeys.length; i++) {
  106. if(funKeys[i] == code) {
  107. return true;
  108. }
  109. }
  110. return false;
  111. }
  112. function getChar(k) {
  113. if(k >= 48 && k <= 57) {
  114. return String.fromCharCode(k);
  115. }
  116. if(k >= 96 && k <= 105) {
  117. return String.fromCharCode(k - 48);
  118. }
  119. if(k == 110 || k == 190 || k== 188 ) {
  120. return ".";
  121. }
  122. if(k == 109 || k == 189) {
  123. return "-";
  124. }
  125. if(k == 107 || k == 187) {
  126. return "+";
  127. }
  128. return "#";
  129. }
  130. </script>
  131. <style type="text/css">
  132. .file-style{
  133. width: 550px;
  134. }
  135. .file-style input[type='file'] {
  136. width:385px ;
  137. height:24px;
  138. line-height:22px;
  139. vertical-align: bottom;
  140. background-color: #fff;
  141. border: 1px solid #cccccc;
  142. margin-top: 2px;
  143. margin-bottom: 2px;
  144. }
  145. body {
  146. background: #fff;
  147. }
  148. </style>
  149. </head>
  150. <body style="background: none; overflow: hidden;" ontouchmove="event.preventDefault();">
  151. <%@ include file="/include/message.jsp"%>
  152. <form action="MTOilDepot.do" method="post" onsubmit="return checkForm()">
  153. <div class="s_title b10 f6">
  154. <img src="/shares/images/master1/gg_ico.png" width="27" height="26" /> 编辑进油
  155. <div class="article_title">
  156. <input class="art_back" style="width: 50px;" title="返回" name="" onclick="history.back();" type="button" />
  157. <input class="art_sub" title="保存" name="" type="submit" value=""/>
  158. </div>
  159. </div>
  160. <div id="jp-container" class="jp-container liuyan">
  161. <div class="forum-container">
  162. <center>
  163. <table class="l-table-edit line">
  164. <tr>
  165. <th colspan="4">
  166. 进油记录
  167. </th>
  168. </tr>
  169. <tr>
  170. <td class="l-table-edit-text" width="15%">油库<FONT COLOR="red">*</FONT>:</td>
  171. <td class="l-table-edit-td" width="85%" colspan="3">
  172. <select name="oilIn.oil_depot_id" id="oil_depot_id" class="default-select" style="width: 173px;">
  173. <option value="${oilIns.oil_depot_id }">${oilIns.oil_depot_name }</option>
  174. <c:forEach items="${depots }" var="depots">
  175. <c:if test="${oilIns.oil_depot_id != depots.universalid}">
  176. <option value="${depots.universalid }">${depots.oil_depot_name }</option>
  177. </c:if>
  178. </c:forEach>
  179. </select>
  180. </td>
  181. </tr>
  182. <tr>
  183. <td class="l-table-edit-text">油号<FONT COLOR="red">*</FONT>:</td>
  184. <td class="l-table-edit-td" colspan="3">
  185. <select name="oilIn.oil_num_id" id="oil_num_id" class="default-select" style="width: 173px;">
  186. <option value="${oilIns.oil_num_id }">${oilIns.dictionary_name }</option>
  187. <c:forEach items="${dictionaries }" var="dictionaries">
  188. <c:if test="${oilIns.oil_num_id != dictionaries.dictionary_code}">
  189. <option value="${dictionaries.dictionary_code }">${dictionaries.dictionary_name }</option>
  190. </c:if>
  191. </c:forEach>
  192. </select>
  193. </td>
  194. </tr>
  195. <tr>
  196. <td class="l-table-edit-text">进油时间<FONT COLOR="red">*</FONT>:</td>
  197. <td class="l-table-edit-td" colspan="3">
  198. <input type="text" id="in_time" name="oilIn.in_time" value="${oilIns.in_times}">
  199. <input type="hidden" id="in_time" name="oilIn.in_time" value="">
  200. </td>
  201. </tr>
  202. <tr>
  203. <td class="l-table-edit-text">进油量<FONT COLOR="red">*</FONT>:</td>
  204. <td class="l-table-edit-td" colspan="3">
  205. <select id="oilType" name="oilType" style="width: 173px;">
  206. <option value="1">升</option>
  207. <option value="2">公斤</option>
  208. </select>
  209. <input type="text" id="oil_mass" name="oilIn.oil_mass" value="${oilIns.oil_mass }" style="ime-mode:disabled;" onpaste="return false" onkeydown="return check(event)" onkeyup="if(isNaN(this.value)||this.value<0||this.value>100000000000) this.value='0'">
  210. </td>
  211. </tr>
  212. <tr>
  213. <td class="l-table-edit-text">备注:</td>
  214. <td class="l-table-edit-td" colspan="3">
  215. <div style="float: left;">
  216. <textarea id="remark" name="oilIn.remark" rows="3" cols="61">${oilIns.remark}</textarea>
  217. </div>
  218. </td>
  219. </tr>
  220. </table>
  221. <input type="hidden" id="universalid" name="oilIn.universalid" value="${oilIns.universalid}">
  222. <input type="hidden" name="oilIn2.oil_depot_id" value="${oilIns.oil_depot_id}">
  223. <input type="hidden" name="oilIn2.oil_num_id" value="${oilIns.oil_num_id}">
  224. <input type="hidden" name="oilIn2.oil_mass" value="${oilIns.oil_mass}">
  225. <input type="hidden" id="task" name="task" value="doEditOilIn">
  226. <input type="hidden" id="tabid" name="tabid" value="${requestScope.tabid}">
  227. </center>
  228. </div>
  229. </div>
  230. </form>
  231. </body>
  232. </html>