addDataDictionary.jsp 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <%@ page language="java" contentType="text/html;charset=GBK"
  2. pageEncoding="GBK"%>
  3. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  5. <html xmlns="http://www.w3.org/1999/xhtml">
  6. <head>
  7. <Title>项目管理->添加项目</Title>
  8. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  9. <link href="/shares/xheditor/xheditor-1.1.14/demos/common.css" rel="stylesheet" type="text/css" media="screen" />
  10. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/Gray/css/form.css" rel="stylesheet" type="text/css" />
  11. <link href="/shares/css/yw/tms/task.css" rel="stylesheet" type="text/css" />
  12. <link href="${pageContext.request.contextPath }/main.css" rel="stylesheet" type="text/css" />
  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 src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  16. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
  17. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
  18. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
  19. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
  20. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
  21. <script src="/shares/js/common.js" type="text/javascript"></script>
  22. <script type="text/javascript" src="/shares/xheditor/xheditor-1.1.14/xheditor-1.1.14-zh-cn.min.js"></script>
  23. <style type="text/css">
  24. .l-table-edit-text {
  25. width: 100px;
  26. font-weight: bold;
  27. color: #cc000
  28. }
  29. .default-select {
  30. width: 250px;
  31. height: 22px;
  32. line-height: 22px;
  33. }
  34. .short-select {
  35. width: 250px;
  36. height: 22px;
  37. line-height: 22px;
  38. }
  39. .default-text {
  40. width: 250px;
  41. height: 22px;
  42. line-height: 22px
  43. }
  44. .short-text {
  45. width: 150px;
  46. line-height: 22px;
  47. height: 22px;
  48. }
  49. .l-text{
  50. width: 150px;
  51. line-height: 22px;
  52. height: 22px;
  53. }
  54. .text {
  55. height: 22px;
  56. line-height: 22px;
  57. margin-right: 10px;
  58. display: inline-block;
  59. margin-left: 1px
  60. }
  61. .title {
  62. font-size: 20px;
  63. font-weight: bold;
  64. padding-bottom: 20px;
  65. padding-left: 5px;
  66. border-bottom: 1px solid #ededed;
  67. vertical-align: middle;
  68. }
  69. </style>
  70. <script type="text/javascript">
  71. $(function() {
  72. searchList();
  73. // showSuccessMsg('${i }');
  74. });
  75. </script>
  76. </head>
  77. <body>
  78. <form method='post' name="theForm" id="theForm"
  79. action="TmsDataDictionaryAction.do?task=doAddTmsDataDictionary" onsubmit="return checkForm();">
  80. <div id="title" class="form-button">
  81. <input type="submit" class="l-button" value="保存" />
  82. <input type="button" value="关闭" class="l-button" onclick="closeWindow();"/>
  83. </div>
  84. <div style="height: 400px; margin-top: 23px" >
  85. <div class="forum-container-2" >
  86. <table border="0" cellspacing="1" cellpadding="0"
  87. style="border: 1px solid #ededed; width:100%; margin-top: 0px";margin-right: 0px; margin-left: 0px;">
  88. <thead>
  89. <tr>
  90. <th colspan="5">
  91. <div class="l-table-edit line">请填写以下标准基本信息</div>
  92. </th>
  93. </tr>
  94. </thead>
  95. <tr>
  96. <td class="l-table-edit-text" style="width:89px;">标准名称<FONT COLOR="red">*</FONT>:
  97. </td>
  98. <td class="l-table-edit-td">
  99. <input type="hidden" name="universalid" id="universalid" value="${map.universalid }">
  100. <input type="text" class="default-text" name="dname" id="dname" value="${map.dname }">
  101. <label id="dnameMsg"></label>
  102. </td>
  103. <td></td>
  104. <td class="l-table-edit-text" style="width:89px;">摘要:
  105. </td>
  106. <td class="l-table-edit-td">
  107. <input type="text" class="default-text" name="remark" id="remark" value="${map.remark }" />
  108. </td>
  109. </tr>
  110. <tr>
  111. <td class="l-table-edit-text" style="width:89px;">编码<FONT COLOR="red">*</FONT>:
  112. </td>
  113. <td class="l-table-edit-td">
  114. <input type="text" class="default-text" name="dvalue" id="dvalue" value="${map.dvalue }" />
  115. <label id="dvalueMsg"></label>
  116. </td>
  117. <td></td>
  118. <td class="l-table-edit-text" style="width:89px;">排序号:
  119. </td>
  120. <td class="l-table-edit-td">
  121. <input type="text" class="default-text" name="dorder" id="dorder" value="${map.dorder }" />
  122. <label id="dorderMsg"></label>
  123. </td>
  124. </tr>
  125. <tr>
  126. <td class="l-table-edit-text" style="width:89px;">是否有效:
  127. </td>
  128. <td class="l-table-edit-td" colspan="4">
  129. <select name="isValid" id="isValid" class="default-select">
  130. <c:if test="${map.isValid eq '1' }">
  131. <option value="0" selected="selected">是</option>
  132. <option value="1">否</option>
  133. </c:if>
  134. <c:if test="${map.isValid eq '0' }">
  135. <option value="0" >是</option>
  136. <option value="1" selected="selected">否</option>
  137. </c:if>
  138. </select>
  139. </td>
  140. </tr>
  141. </table>
  142. </div>
  143. <div>
  144. <div id="title" style="background-color: #E5ECF9;padding-top: 3px;padding-bottom: 3px;">
  145. 标准项配置 &nbsp;&nbsp;&nbsp;&nbsp;<input type="button" class="l-button" disabled="disabled" value="新增标准项" />
  146. </div>
  147. <div id="maingrid1" style=" margin:0;padding: 0"></div>
  148. </div>
  149. </div>
  150. <%@ include file="/include/message.jsp"%>
  151. </form>
  152. </body>
  153. <script type="text/javascript">
  154. function showSuccessMsg(i){
  155. if(i > 0){
  156. var succMsg = '<a href="#">${map.dname }</a>&nbsp;新建成功!'
  157. +' <br/><br/>是否继续编辑标准?<br/><br/>是否继续?';
  158. $.ligerDialog({content:succMsg, title:"操作成功",type:"success",width:350,height:150,allowClose : false,
  159. buttons:[ { text:"是",onclick:function(){window.location.href="TmsDataDictionaryAction.do?task=toEditTmsDataDictionary&universalid="+i;} } ,
  160. {text:"否",onclick:function(){closeWindow();}}
  161. ]
  162. });
  163. }else{
  164. if( i == -98){
  165. $.ligerDialog.warn("操作失败,当前的标准名称或编码已存在!");
  166. }else if( i == -2){
  167. $.ligerDialog.warn("标准名不能为空!");
  168. }else if(i == -1){
  169. $.ligerDialog.warn("编码不能为空!");
  170. }else if(i == -99){
  171. $.ligerDialog.warn("数据异常,请刷新后重试!");
  172. }
  173. }
  174. }
  175. var manager;
  176. function searchList() {
  177. var parentId = document.getElementById("universalid");//父节点名称
  178. var jsonObject = {"parentId":""};
  179. if (parentId.value != "" && typeof (parentId.value) != "undefined") {
  180. jsonObject.parentId=parentId.value;
  181. }else{
  182. jsonObject.parentId=-1;
  183. }
  184. if(manager == undefined){
  185. $(function() {
  186. manager = $("#maingrid1").ligerGrid({
  187. columns : [
  188. {
  189. display : '字典项',
  190. name : 'dname',
  191. align : 'center',
  192. width : 220,
  193. render : function(rowdata, rowindex, value) {
  194. var h = "";
  195. h += "<a href='javascript:toDetails(\""
  196. + rowdata.universalid + "\")'>"
  197. + value + "</a> ";
  198. return h;
  199. }
  200. },
  201. {
  202. display : '编码',
  203. name : 'dvalue',
  204. width : 180,
  205. align : 'center'
  206. },
  207. {
  208. display : '排序号',
  209. name : 'dorder',
  210. width : 100,
  211. align : 'center'
  212. },{
  213. display : '是否默认',
  214. name : 'lose_false',
  215. width : 80,
  216. align : 'center',
  217. render : function(rowdata, rowindex, value) {
  218. var h = "";
  219. if(value == 1){
  220. h += "是 ";
  221. }else{
  222. h += "否";
  223. }
  224. return h;
  225. }
  226. },
  227. {
  228. display : '是否有效',
  229. name : 'lose_false',
  230. width : 80,
  231. align : 'center',
  232. render : function(rowdata, rowindex, value) {
  233. var h = "";
  234. if(value == 1){
  235. h += "<font style='color:#ff0000'>否</font> ";
  236. }else{
  237. h += "是";
  238. }
  239. return h;
  240. }
  241. }, {
  242. display : '操作',
  243. name : 'projtypename',
  244. width : 120,
  245. align : 'center',
  246. isSort: false,
  247. render : function(rowdata, rowindex, value) {
  248. var h = "";
  249. h += "<a href='javascript:seeUser("+ rowdata.pm + ")'>查看</a> ";
  250. h += "<a href='javascript:seeUser("+ rowdata.pm + ")'>修改</a> ";
  251. h += "<a href='javascript:seeUser("+ rowdata.pm + ")'>删除</a> ";
  252. return h;
  253. }
  254. }],
  255. pageSize : 20,
  256. width : "99.9%",
  257. height : "99%",
  258. parms :jsonObject,
  259. //where : f_getWhere(),
  260. //data: $.extend(true,{},CustomersData),
  261. //onSuccess: ,
  262. pageParmName : 'curPage', //页索引参数名,(提交给服务器)
  263. pagesizeParmName : 'pageSize' //页记录数参数名,(提交给服务器)
  264. });
  265. });
  266. }else{
  267. manager._setParms(jsonObject);
  268. manager.loadData();
  269. }
  270. }
  271. </script>
  272. </html>