7d9a2b082ad1e972937413441163dd92499c1465.svn-base 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title></title>
  7. <%@include file="../include.jsp"%>
  8. <script type="text/javascript">
  9. var fd_id = "<%=request.getParameter("fd_id")%>";
  10. var is_adjst = "<%=request.getParameter("is_adjst")%>";
  11. </script>
  12. <script type="text/javascript"
  13. src="<%=path%>/scripts/business/em/evaluate/admin/sysAdminEdit.js"></script>
  14. <script type="text/javascript">
  15. //取得用户id
  16. var user_id = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
  17. $(function() {
  18. //设置标题
  19. if("1"==is_adjst){
  20. $(".titleShow").text("新增体系");
  21. $("#WRITER_ID_799").val(user_id);
  22. }else{
  23. $(".titleShow").text("修改体系");
  24. formReset();
  25. }
  26. //下拉框设置
  27. $("#TYPE_799").initCanstSelect("BM_EVAL_TYPE");
  28. $("#TYPE_799").bind("change",function(){
  29. var val = $(this).attr("relValue").trim();
  30. //console.log(val);
  31. typeSelect(val);
  32. });
  33. $("#EVAL_ORDER_799").initCanstSelect("BM_EVAL_STRUCTURE");
  34. //返回
  35. $("#back").hover(function(){
  36. $(this).attr("src","/nwyj/images/temp/back_hover.png");
  37. },function(){
  38. $(this).attr("src","/nwyj/images/temp/back.png");
  39. });
  40. sysAdminEdit.init();
  41. });
  42. //选择体系类型时,表单变化
  43. function typeSelect(selval){
  44. if("2"==selval){//多选扣分型
  45. $(".showSelect1").hide();
  46. $(".showSelect2").show();
  47. $("#EVAL_ID_799").removeClass("validate[required]");
  48. }else{//单选得分型
  49. $(".showSelect1").show();
  50. $(".showSelect2").hide();
  51. $("#EVAL_ID_799").addClass("validate[required]");
  52. var deptUrl = $.pathname() + '/ws/targetManage/ManageService/getEvalScore';
  53. $.post(deptUrl,{},function(data){
  54. //console.log(data);
  55. $("#EVAL_ID_799").data("data",{list:data});
  56. $("#EVAL_ID_799").bind("change",function(){
  57. $("#EVAL_NUM_799").val($(this).attr("relText"));
  58. });
  59. $("#EVAL_ID_799").render();
  60. }, "json");
  61. }
  62. }
  63. function formReset(){
  64. if(fd_id==null || ""==fd_id){
  65. $('#editForm').ajaxWrite({data:[]});
  66. $("#REMARK_799").val('');//备注
  67. return;
  68. }
  69. var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
  70. var params = {
  71. classid : '799',
  72. objectID : fd_id
  73. };
  74. $.request.query(url,params,function(data){
  75. //console.log(data);
  76. $('#editForm').ajaxWrite({data:data});
  77. typeSelect(data.TYPE_799)
  78. $('#editForm input[name="classid"]').val('799');
  79. $("#NAME_799").val(data.NAME_799);//体系名称
  80. $("#LEVEL_NUM_799").val(data.LEVEL_NUM_799);//体系名称
  81. $("#REMARK_799").val(data.REMARK_799);//备注
  82. });
  83. }
  84. function createEvalClick(){
  85. var evalnumid = $("#EVAL_ID_799").val();
  86. //console.log(evalnumid);
  87. var diag = new top.Dialog();
  88. diag.Title = "新增分值类型";
  89. diag.ShowMaxButton=false;
  90. diag.ShowMinButton=false;
  91. diag.Width= 450;
  92. diag.Height=300;
  93. diag.ButtonAlign="center";
  94. //点击确定按钮的监听方法
  95. diag.OKEvent = function(){
  96. var inputValue = diag.innerFrame.contentWindow.getDateToParent();
  97. var params = {
  98. json : JSON.stringify(inputValue)
  99. };
  100. var deptUrl = $.pathname() + '/ws/targetManage/ManageService/createEvalScore';
  101. $.post(deptUrl,params,function(data){
  102. //console.log(data);
  103. $("#EVAL_ID_799").data("data",{list:data.data});
  104. $("#EVAL_ID_799").setValue(data.value);
  105. $("#EVAL_ID_799").render();
  106. $("#EVAL_NUM_799").val(data.key);
  107. diag.close();
  108. }, "json");
  109. };
  110. diag.URL = "/nwyj/page/business/em/evaluate/admin/sysAdminScore.jsp?fd_id="+evalnumid;
  111. diag.ShowButtonRow=true;
  112. diag.show();
  113. }
  114. </script>
  115. <style >
  116. .mybox{
  117. width: 1000px;
  118. margin: 10px auto;
  119. padding: 10px 20px;
  120. background: #fff;
  121. }
  122. .class_color{
  123. background-color: rgb(237, 239, 253);
  124. }
  125. </style>
  126. </head>
  127. <body >
  128. <div class="mybox" id="formContent" align="center">
  129. <div class="" align="center">
  130. <a href="javascript:;"><img id="back" align="left" src="/nwyj/images/temp/back.png" /></a>
  131. <font style="font-weight: bold;font-size: 20px;line-height: 45px;" class="titleShow"> </font>
  132. </div>
  133. <form id="editForm">
  134. <input name="classid" value="799" type="hidden" />
  135. <input name="FD_OBJECTID799" id="FD_OBJECTID799" type="hidden" />
  136. <input id="WRITER_ID_799" name="WRITER_ID_799" type="hidden" />
  137. <input id="WRITE_TIME_799" name="WRITE_TIME_799" type="hidden" />
  138. <input id="EVAL_NUM_799" name="EVAL_NUM_799" type="hidden" />
  139. <!-- 保存和重置 -->
  140. <br />
  141. <div class="" align="right" >
  142. <input value="保存" type="button" id="save" />
  143. <input value="重置" type="button" id="reset" onclick="formReset();"/>
  144. <!-- 新增重置 -->
  145. </div>
  146. <br />
  147. <!-- 正文表格 -->
  148. <table class="tableStyle" align="center" id="contentTable">
  149. <tr>
  150. <td colspan="1" align="right" class="class_color"><span class="star">*</span>体系名:</td>
  151. <td colspan="5" align="left">
  152. <input id="NAME_799" name="NAME_799" class="validate[required]" type="text" style="width:95%;" maxlength='50' />
  153. </td>
  154. </tr>
  155. <tr>
  156. <td colspan="1" align="right" class="class_color" ><span class="star">*</span>体系层级数:</td>
  157. <td colspan="2" align="left">
  158. <input id="LEVEL_NUM_799" name="LEVEL_NUM_799" class="validate[required]" type="text" style="width:250px;"></input>
  159. </td>
  160. <td colspan="1" align="right" class="class_color" ><span class="star">*</span>体系类型:</td>
  161. <td colspan="2" align="left">
  162. <select id="TYPE_799" name="TYPE_799" class="validate[required]" editable=false prompt="请选择" selWidth="255" ></select>
  163. </td>
  164. </tr>
  165. <tr>
  166. <td colspan="1" align="right" class="class_color"><span class="star">*</span>顺序结构方式:</td>
  167. <td colspan="2" align="left">
  168. <select id="EVAL_ORDER_799" name="EVAL_ORDER_799" class="validate[required]" editable=false prompt="请选择" selWidth="255"></select>
  169. </td>
  170. <td colspan="1" align="right" class="showSelect1 class_color" style="display:none;"><span class="star">*</span>评分类型:</td>
  171. <td colspan="2" align="left" class="showSelect1" style="display:none;" >
  172. <select id="EVAL_ID_799" name="EVAL_ID_799" class="" editable=false prompt="请选择" selWidth="255" ></select>
  173. <input style="margin:3px 0 0 10px;" type="button" value="添加类型" id="createEvalNum" onclick="createEvalClick();"/>
  174. </td>
  175. <td colspan="3" class="showSelect2"></td>
  176. </tr>
  177. <tr>
  178. <td colspan="1" align="right" class="class_color"><span>备注:</span></td>
  179. <td colspan="5" align="left">
  180. <textarea id="REMARK_799" name="REMARK_799" style="width:95%;"></textarea>
  181. </td>
  182. </tr>
  183. </table>
  184. </form>
  185. </div>
  186. </body>
  187. </html>