identityEdit.jsp 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <%--
  2. time:2012-02-03 14:40:59
  3. desc:edit the 流水号生成
  4. --%>
  5. <%@page language="java" pageEncoding="UTF-8"%>
  6. <%@include file="/commons/include/html_doctype.html"%>
  7. <% String islist=request.getParameter("islist");%>
  8. <html>
  9. <head>
  10. <title>编辑 流水号生成</title>
  11. <%@include file="/commons/include/form.jsp" %>
  12. <script type="text/javascript" src="${ctx}/servlet/ValidJs?form=identity"></script>
  13. <script type="text/javascript">
  14. $(function() {
  15. function showRequest(formData, jqForm, options) {
  16. return true;
  17. }
  18. valid(showRequest,showResponse);
  19. $("a.save").click(function() {
  20. $('#identityForm').submit();
  21. });
  22. function showResponse(responseText) {
  23. var obj=new com.hotent.form.ResultMessage(responseText);
  24. if(obj.isSuccess()){//成功
  25. $.ligerDialog.confirm( obj.getMessage()+",是否继续操作","提示信息",function(rtn){
  26. if(!rtn){
  27. var returnUrl=$("#returnUrl").val();
  28. if($("#returnUrl").length>0 && returnUrl!=""){
  29. location.href=returnUrl;
  30. return;
  31. }
  32. var linkBack=$("a.back");
  33. if(linkBack.length>0){
  34. var returnUrl=linkBack.attr("href");
  35. if(returnUrl!=""){
  36. location.href=returnUrl;
  37. return;
  38. }
  39. }
  40. }
  41. else{
  42. if(${identity.id==0}){
  43. __valid.resetForm();
  44. }
  45. }
  46. });
  47. }else{//失败
  48. $.ligerDialog.err("提示信息","流水号定义保存失败!",obj.getMessage());
  49. }
  50. }
  51. });
  52. </script>
  53. </head>
  54. <body>
  55. <div class="panel">
  56. <div class="panel-top">
  57. <div class="tbar-title">
  58. <span class="tbar-label">
  59. <c:choose>
  60. <c:when test="${identity.id == 0}">
  61. 添加流水号定义
  62. </c:when>
  63. <c:otherwise>
  64. 编辑流水号定义
  65. </c:otherwise>
  66. </c:choose>
  67. </span>
  68. </div>
  69. <div class="panel-toolbar">
  70. <div class="toolBar">
  71. <div class="group"><a class="link save" id="dataFormSave" href="javascript:;"><span></span>保存</a></div>
  72. <div class="l-bar-separator"></div>
  73. <c:choose>
  74. <c:when test="${islist=='1'}">
  75. <div class="group"><a class="link back" href="showlist.ht"><span></span>返回</a></div>
  76. </c:when>
  77. <c:otherwise>
  78. <div class="group"><a class="link back" href="list.ht"><span></span>返回</a></div>
  79. </c:otherwise>
  80. </c:choose>
  81. </div>
  82. </div>
  83. </div>
  84. <div class="panel-body">
  85. <form id="identityForm" method="post" action="save.ht">
  86. <table class="table-detail" cellpadding="0" cellspacing="0" border="0">
  87. <tr>
  88. <th width="20%">名称: </th>
  89. <td><input type="text" id="name" name="name" value="${identity.name}" class="inputText longInputText"/></td>
  90. </tr>
  91. <tr>
  92. <th width="20%">别名: </th>
  93. <td><input type="text" id="alias" name="alias" value="${identity.alias}" class="inputText longInputText"/></td>
  94. </tr>
  95. <tr>
  96. <th width="20%">规则: </th>
  97. <td>
  98. <c:choose>
  99. <c:when test="${identity.id == 0}">
  100. <input type="text" id="rule" name="rule" size="80" value="{yyyy}{MM}{dd}{NO}" class="inputText longInputText"/>
  101. </c:when>
  102. <c:otherwise>
  103. <input type="text" id="rule" name="rule" size="80" value="${identity.rule}" class="inputText longInputText"/>
  104. </c:otherwise>
  105. </c:choose>
  106. <br>
  107. {yyyy}{MM}{dd}{NO}
  108. <ul>
  109. <li>{yyyy}表示年份</li>
  110. <li>{MM}表示月份,如果月份小于10,则加零补齐,如1月份表示为01。</li>
  111. <li>{mm}表示月份,月份不补齐,如1月份表示为1。</li>
  112. <li>{DD}表示日,如果小于10号,则加零补齐,如1号表示为01。</li>
  113. <li>{dd}表示日,日期不补齐,如1号表示为1。</li>
  114. <li>{NO}表示流水号,前面补零。</li>
  115. <li>{no}表示流水号,后面补零。</li>
  116. <li>{ORG}表示当前用户所属组织的code代码</li>
  117. </ul>
  118. </td>
  119. </tr>
  120. <tr>
  121. <th width="20%">生成类型: </th>
  122. <td>
  123. <c:choose>
  124. <c:when test="${identity.id == 0}">
  125. <input type="radio" name="genType" checked="checked" value="1" />每天生成
  126. <input type="radio" name="genType" value="2" />每月生成
  127. <input type="radio" name="genType" value="3" />每年生成
  128. <input type="radio" name="genType" value="0" />递增
  129. </c:when>
  130. <c:otherwise>
  131. <input type="radio" name="genType" <c:if test="${identity.genType==1}">checked="checked"</c:if> value="1" />每天生成
  132. <input type="radio" name="genType" <c:if test="${identity.genType==2}">checked="checked"</c:if> value="2" />每月生成
  133. <input type="radio" name="genType" <c:if test="${identity.genType==3}">checked="checked"</c:if> value="3" />每年生成
  134. <input type="radio" name="genType" <c:if test="${identity.genType==0}">checked="checked"</c:if> value="0" />递增
  135. </c:otherwise>
  136. </c:choose>
  137. <br>
  138. 流水号生成规则:
  139. <ul>
  140. <li>1.每天生成。每天从初始值开始计数。</li>
  141. <li>2.递增,流水号一直增加。</li>
  142. </ul>
  143. </td>
  144. </tr>
  145. <tr>
  146. <th width="20%">流水号长度: </th>
  147. <td>
  148. <c:choose>
  149. <c:when test="${identity.id == 0}">
  150. <input type="text" id="noLength" name="noLength" value="5" class="inputText"/>
  151. </c:when>
  152. <c:otherwise>
  153. <input type="text" id="noLength" name="noLength" value="${identity.noLength}" class="inputText"/>
  154. </c:otherwise>
  155. </c:choose>
  156. <br>
  157. <ul>
  158. <li>这个长度表示当前流水号的长度数,只包括流水号部分{NO},如果长度为5,当前流水号为5,则在流水号前补4个0,表示为00005。</li>
  159. <li>{no}如果长度为5,当前流水号为501,则在流水号后面补5个0,表示为50100000,如果长度为1,则流水号一直递增。</li>
  160. </ul
  161. </td>
  162. </tr>
  163. <tr>
  164. <th width="20%">初始值: </th>
  165. <td>
  166. <c:choose>
  167. <c:when test="${identity.id == 0}">
  168. <input type="text" id="initValue" name="initValue" value="1" class="inputText"/>
  169. </c:when>
  170. <c:otherwise>
  171. <input type="text" id="initValue" name="initValue" value="${identity.initValue}" class="inputText"/>
  172. </c:otherwise>
  173. </c:choose>
  174. <br>
  175. 这个初始值表示流水号部分{NO}的初始值。如 2015102700001,初始值为1,则流水号部分的初始值为00001
  176. </td>
  177. </tr>
  178. <tr>
  179. <th width="20%">步长: </th>
  180. <td>
  181. <c:choose>
  182. <c:when test="${identity.id == 0}">
  183. <input type="text" id="step" name="step" value="1" class="inputText"/>
  184. </c:when>
  185. <c:otherwise>
  186. <input type="text" id="step" name="step" value="${identity.step}" class="inputText"/>
  187. </c:otherwise>
  188. </c:choose>
  189. <br>
  190. 流水号每次递加的数字,默认步长为1。比如步长为2,则每次获取流水号则在原来的基础上加2。
  191. </td>
  192. </tr>
  193. </table>
  194. <input type="hidden" name="id" value="${identity.id}" />
  195. </form>
  196. </div>
  197. </div>
  198. </body>
  199. </html>