editOrderFormSetting.jsp 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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.orderFormSetting.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.orderFormSetting.n_reset_type}";
  26. $("#n_reset_type").val(n_reset_type);
  27. $("#ylbutton").click(function(){
  28. var yl = "";
  29. var rs = $.validate({
  30. name : "v_layout",
  31. model : [ {
  32. type : "require",
  33. msg : "前缀定义不能为空!"
  34. }
  35. ]
  36. }) ;
  37. rs = $.validate({
  38. name : "n_digits",
  39. model : [ {
  40. type : "require",
  41. msg : "编码位数不能为空!"
  42. }, {
  43. type : "isNumber",
  44. msg : "编码位数必须为数字!"
  45. },{
  46. type:"size",
  47. min:'4',
  48. msg:"位数最小值不能小于4!"
  49. },{
  50. type:"size",
  51. max:'50',
  52. msg:"位数最大值不能大于50!"
  53. }
  54. ]
  55. }) && rs ;
  56. if(rs){
  57. yl += $("#v_layout").val();
  58. var n_digits = $("#n_digits").val();
  59. var n_type1 = $('input:radio[name="n_type"]:checked').val();
  60. if(n_type1 == "3"){
  61. yl += "2012";
  62. } else if(n_type1 == "2"){
  63. yl += "201201";
  64. } else if(n_type1 == "1"){
  65. yl += "20120101";
  66. }
  67. n_digits = n_digits - 1;
  68. for(var i=0; i<n_digits; i++){
  69. yl += "0";
  70. }
  71. yl+="1";
  72. $("#yl").text(yl);
  73. }
  74. });
  75. $("#n_reset_type").ligerComboBox();
  76. });
  77. </script>
  78. </head>
  79. <body>
  80. <form action="orderFormSettingAction.do" method="post" onsubmit="return checkForm();">
  81. <div id="title" class="form-button">
  82. <input type="submit" class="l-button" value="保存" />
  83. <input onclick="closeWindow();" type="button" value="关闭" class="l-button">
  84. </div>
  85. <div class="container-layout">
  86. <div class="forum-container">
  87. <center>
  88. <table class="l-table-edit line">
  89. <tr>
  90. <th colspan="2">修改单号编号设置</th>
  91. </tr>
  92. <tr>
  93. <td class="l-table-edit-text">单据编号名称<FONT COLOR="red">*</FONT>:</td>
  94. <td class="l-table-edit-td">
  95. <input type="text" class="width_150" id="order_form_name" name="order_form_name" value="${requestScope.orderFormSetting.order_form_name }">
  96. </td>
  97. </tr>
  98. <tr>
  99. <td class="l-table-edit-text">备注:</td>
  100. <td class="l-table-edit-td">
  101. <textarea id="v_remark" name="v_remark" rows="5" cols="50">${requestScope.orderFormSetting.v_remark }</textarea>
  102. </td>
  103. </tr>
  104. <!-- <tr> -->
  105. <!-- <td class="l-table-edit-text">所属单位<FONT COLOR="red">*</FONT>:</td> -->
  106. <!-- <td class="l-table-edit-td"> -->
  107. <%-- <input type="text" class="width_150" id="groupname" name="groupname" value="${requestScope.orderFormSetting.groupname }"> --%>
  108. <%-- <input type="hidden" id="v_dept" name="v_dept" value="${requestScope.orderFormSetting.v_dept }"> --%>
  109. <!-- <input type="button" class="l-button" id="v_dept_button" name="v_dept_button" value="选择单位"> -->
  110. <!-- </td> -->
  111. <!-- </tr> -->
  112. <tr>
  113. <td class="l-table-edit-text">流水号模式<FONT COLOR="red">*</FONT>:</td>
  114. <td class="l-table-edit-td">
  115. <input type="radio" id="n_type" name="n_type" value="0">无&nbsp;&nbsp;&nbsp;
  116. <input type="radio" id="n_type" name="n_type" value="1">年月日(20120101)&nbsp;&nbsp;&nbsp;
  117. <input type="radio" id="n_type" name="n_type" value="2">年月(201201)&nbsp;&nbsp;&nbsp;
  118. <input type="radio" id="n_type" name="n_type" value="3">年(2012)&nbsp;&nbsp;&nbsp;
  119. </td>
  120. </tr>
  121. <tr>
  122. <td class="l-table-edit-text">重置计数方式<FONT COLOR="red">*</FONT>:</td>
  123. <td class="l-table-edit-td">
  124. <select name="n_reset_type" class="width_150" id="n_reset_type" >
  125. <c:forEach items="${requestScope.n_reset_types }" var="n_state">
  126. <option value="${n_state.dvalue }" >${n_state.dname }</option>
  127. </c:forEach>
  128. </select>
  129. </td>
  130. </tr>
  131. <tr>
  132. <td class="l-table-edit-text">单据编号前缀定义<FONT COLOR="red">*</FONT>:</td>
  133. <td class="l-table-edit-td">
  134. <input type="text" class="width_150" id="v_layout" name="v_layout" value="${requestScope.orderFormSetting.v_layout }">
  135. </td>
  136. </tr>
  137. <tr>
  138. <td class="l-table-edit-text">单据编号编码位数<FONT COLOR="red">*</FONT>:</td>
  139. <td class="l-table-edit-td">
  140. <input type="text" class="width_150" id="n_digits" name="n_digits" value="${requestScope.orderFormSetting.n_digits }">
  141. </td>
  142. </tr>
  143. <tr>
  144. <td class="l-table-edit-text">预览:</td>
  145. <td class="l-table-edit-td">
  146. <label id="yl" name="yl"></label>
  147. <input type="button" id="ylbutton" class="l-button" value="点击预览">
  148. </td>
  149. </tr>
  150. <tr>
  151. <td colspan="2" style="text-align: center;">
  152. &nbsp;
  153. </td>
  154. </tr>
  155. </table>
  156. <input type="hidden" id="order_form_id" name="order_form_id" value="${requestScope.orderFormSetting.order_form_id }">
  157. <input type="hidden" id="task" name="task" value="edit">
  158. <input type="hidden" id="tabid" name="tabid" value="${param.tabid }">
  159. <input type="hidden" id="v_dept" name="v_dept" value="${requestScope.orderFormSetting.v_dept }">
  160. </center>
  161. </div>
  162. </div>
  163. </form>
  164. <%@ include file="/include/message.jsp"%>
  165. </body>
  166. </html>