addOrderFormSetting.jsp 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <%@ page language="java" contentType="text/html;charset=GBK"
  2. pageEncoding="GBK"%>
  3. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  8. <title>创建表单</title>
  9. <link href="${ pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  10. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  11. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  12. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  13. <script type="text/javascript" src="/shares/js/yw/erp/orderFormSetting.js"></script>
  14. <script type="text/javascript" src="/shares/js/constant.js"></script>
  15. <script type="text/javascript" src="/shares/js/common.js"></script>
  16. <script type="text/javascript">
  17. $(document).ready(function(){
  18. // loadTypeTree("v_dept_button",{type:"deptsingle", tab:"1", backId:"v_dept", backName:"groupname"});
  19. var n_type = "${requestScope.fserial.n_type}";
  20. if(n_type != null && n_type != ""){
  21. $('input:radio[name="n_type"][value="'+n_type+'"]').attr("checked",true);
  22. } else {
  23. $('input:radio[name="n_type"][value="0"]').attr("checked",true);
  24. }
  25. var n_reset_type = "${requestScope.fserial.n_reset_type}";
  26. if(n_reset_type == ""){
  27. $("#n_reset_type").val(0);
  28. } else {
  29. $("#n_reset_type").val(n_reset_type);
  30. }
  31. $("#ylbutton").click(function(){
  32. var yl = "";
  33. var rs = $.validate({
  34. name : "v_layout",
  35. model : [ {
  36. type : "require",
  37. msg : "前缀定义不能为空!"
  38. }
  39. ]
  40. }) ;
  41. rs = $.validate({
  42. name : "n_digits",
  43. model : [ {
  44. type : "require",
  45. msg : "编码位数不能为空!"
  46. }, {
  47. type : "isNumber",
  48. msg : "编码位数必须为数字!"
  49. },{
  50. type:"size",
  51. min:'4',
  52. msg:"位数最小值不能小于4!"
  53. },{
  54. type:"size",
  55. max:'10',
  56. msg:"位数最大值不能大于10!"
  57. }
  58. ]
  59. }) && rs ;
  60. if(rs){
  61. yl += $("#v_layout").val();
  62. var n_digits = $("#n_digits").val();
  63. var n_type1 = $('input:radio[name="n_type"]:checked').val();
  64. if(n_type1 == "3"){
  65. yl += "2012";
  66. } else if(n_type1 == "2"){
  67. yl += "201201";
  68. } else if(n_type1 == "1"){
  69. yl += "20120101";
  70. }
  71. n_digits = n_digits - 1;
  72. for(var i=0; i<n_digits; i++){
  73. yl += "0";
  74. }
  75. yl+="1";
  76. $("#yl").text(yl);
  77. }
  78. });
  79. $("#n_reset_type").ligerComboBox();
  80. });
  81. </script>
  82. </head>
  83. <body>
  84. <form action="orderFormSettingAction.do" method="post" onsubmit="return checkForm();">
  85. <div id="title" class="form-button">
  86. <input type="submit" class="l-button" value="保存" />
  87. <input onclick="closeWindow();" type="button" value="关闭" class="l-button">
  88. </div>
  89. <div class="container-layout">
  90. <div class="forum-container">
  91. <center>
  92. <table class="l-table-edit line">
  93. <tr>
  94. <th colspan="2">创建流水号</th>
  95. </tr>
  96. <tr>
  97. <td class="l-table-edit-text">流水号名称<FONT COLOR="red">*</FONT>:</td>
  98. <td class="l-table-edit-td">
  99. <input type="text" class="width_150" id="order_form_name" name="order_form_name" value="${requestScope.fserial.order_form_name }">
  100. </td>
  101. </tr>
  102. <tr>
  103. <td class="l-table-edit-text">备注:</td>
  104. <td class="l-table-edit-td">
  105. <textarea id="v_remark" name="v_remark" rows="5" cols="50">${requestScope.fserial.v_remark }</textarea>
  106. </td>
  107. </tr>
  108. <!-- <tr> -->
  109. <!-- <td class="l-table-edit-text">所属单位<FONT COLOR="red">*</FONT>:</td> -->
  110. <!-- <td class="l-table-edit-td"> -->
  111. <%-- <input type="text" class="width_150" id="groupname" name="groupname" value="${requestScope.fserial.groupname }"> --%>
  112. <%-- <input type="hidden" id="v_dept" name="v_dept" value="${requestScope.fserial.v_dept }"> --%>
  113. <!-- <input type="button" class="l-button" id="v_dept_button" name="v_dept_button" value="选择单位"> -->
  114. <!-- </td> -->
  115. <!-- </tr> -->
  116. <tr>
  117. <td class="l-table-edit-text">流水号模式<FONT COLOR="red">*</FONT>:</td>
  118. <td class="l-table-edit-td">
  119. <input type="radio" id="n_type" name="n_type" value="0">无&nbsp;&nbsp;&nbsp;
  120. <input type="radio" id="n_type" name="n_type" value="1">年月日(20120101)&nbsp;&nbsp;&nbsp;
  121. <input type="radio" id="n_type" name="n_type" value="2">年月(201201)&nbsp;&nbsp;&nbsp;
  122. <input type="radio" id="n_type" name="n_type" value="3">年(2012)&nbsp;&nbsp;&nbsp;
  123. </td>
  124. </tr>
  125. <tr>
  126. <td class="l-table-edit-text">重置计数方式<FONT COLOR="red">*</FONT>:</td>
  127. <td class="l-table-edit-td">
  128. <select name="n_reset_type" class="width_150" id="n_reset_type">
  129. <c:forEach items="${requestScope.n_reset_types }" var="n_state">
  130. <option value="${n_state.dvalue }" >${n_state.dname }</option>
  131. </c:forEach>
  132. </select>
  133. </td>
  134. </tr>
  135. <tr>
  136. <td class="l-table-edit-text">流水号前缀定义<FONT COLOR="red">*</FONT>:</td>
  137. <td class="l-table-edit-td">
  138. <input type="text" class="width_150" id="v_layout" name="v_layout" value="${requestScope.fserial.v_layout }">
  139. </td>
  140. </tr>
  141. <tr>
  142. <td class="l-table-edit-text">流水号编码位数<FONT COLOR="red">*</FONT>:</td>
  143. <td class="l-table-edit-td">
  144. <input type="text" class="width_150" id="n_digits" name="n_digits" value="${requestScope.fserial.n_digits }">
  145. </td>
  146. </tr>
  147. <tr>
  148. <td class="l-table-edit-text">预览:</td>
  149. <td class="l-table-edit-td">
  150. <label id="yl" name="yl"></label>
  151. <input type="button" id="ylbutton" class="l-button" value="点击预览">
  152. </td>
  153. </tr>
  154. <tr>
  155. <td colspan="2" style="text-align: center;">
  156. &nbsp;
  157. </td>
  158. </tr>
  159. </table>
  160. <input type="hidden" id="order_from_id" name="order_from_id" value="${requestScope.fserial.order_from_id }">
  161. <input type="hidden" id="task" name="task" value="create">
  162. <input type="hidden" id="tabid" name="tabid" value="${param.tabid }">
  163. <input type="hidden" id="v_dept" name="v_dept" value="${session.unit.id }">
  164. </center>
  165. </div>
  166. </div>
  167. </form>
  168. <%@ include file="/include/message.jsp"%>
  169. </body>
  170. </html>