123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- <%@page contentType="text/html" pageEncoding="UTF-8"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title></title>
- <%@include file="../include.jsp"%>
- <script type="text/javascript">
- var fd_id = "<%=request.getParameter("fd_id")%>";
- var is_adjst = "<%=request.getParameter("is_adjst")%>";
- </script>
- <script type="text/javascript"
- src="<%=path%>/scripts/business/em/evaluate/admin/sysAdminEdit.js"></script>
- <script type="text/javascript">
- //取得用户id
- var user_id = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
-
- $(function() {
- //设置标题
- if("1"==is_adjst){
- $(".titleShow").text("新增体系");
- $("#WRITER_ID_799").val(user_id);
- }else{
- $(".titleShow").text("修改体系");
- formReset();
- }
- //下拉框设置
- $("#TYPE_799").initCanstSelect("BM_EVAL_TYPE");
- $("#TYPE_799").bind("change",function(){
- var val = $(this).attr("relValue").trim();
- //console.log(val);
- typeSelect(val);
- });
- $("#EVAL_ORDER_799").initCanstSelect("BM_EVAL_STRUCTURE");
-
- //返回
- $("#back").hover(function(){
- $(this).attr("src","/nwyj/images/temp/back_hover.png");
- },function(){
- $(this).attr("src","/nwyj/images/temp/back.png");
- });
- sysAdminEdit.init();
- });
-
-
- //选择体系类型时,表单变化
- function typeSelect(selval){
- if("2"==selval){//多选扣分型
- $(".showSelect1").hide();
- $(".showSelect2").show();
- $("#EVAL_ID_799").removeClass("validate[required]");
- }else{//单选得分型
- $(".showSelect1").show();
- $(".showSelect2").hide();
- $("#EVAL_ID_799").addClass("validate[required]");
- var deptUrl = $.pathname() + '/ws/targetManage/ManageService/getEvalScore';
- $.post(deptUrl,{},function(data){
- //console.log(data);
- $("#EVAL_ID_799").data("data",{list:data});
- $("#EVAL_ID_799").bind("change",function(){
- $("#EVAL_NUM_799").val($(this).attr("relText"));
- });
- $("#EVAL_ID_799").render();
- }, "json");
- }
- }
-
- function formReset(){
- if(fd_id==null || ""==fd_id){
- $('#editForm').ajaxWrite({data:[]});
- $("#REMARK_799").val('');//备注
- return;
- }
- var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
- var params = {
- classid : '799',
- objectID : fd_id
- };
- $.request.query(url,params,function(data){
- //console.log(data);
- $('#editForm').ajaxWrite({data:data});
- typeSelect(data.TYPE_799)
- $('#editForm input[name="classid"]').val('799');
- $("#NAME_799").val(data.NAME_799);//体系名称
- $("#LEVEL_NUM_799").val(data.LEVEL_NUM_799);//体系名称
- $("#REMARK_799").val(data.REMARK_799);//备注
-
- });
- }
-
- function createEvalClick(){
- var evalnumid = $("#EVAL_ID_799").val();
- //console.log(evalnumid);
- var diag = new top.Dialog();
- diag.Title = "新增分值类型";
- diag.ShowMaxButton=false;
- diag.ShowMinButton=false;
- diag.Width= 450;
- diag.Height=300;
- diag.ButtonAlign="center";
- //点击确定按钮的监听方法
- diag.OKEvent = function(){
- var inputValue = diag.innerFrame.contentWindow.getDateToParent();
- var params = {
- json : JSON.stringify(inputValue)
- };
- var deptUrl = $.pathname() + '/ws/targetManage/ManageService/createEvalScore';
- $.post(deptUrl,params,function(data){
- //console.log(data);
- $("#EVAL_ID_799").data("data",{list:data.data});
- $("#EVAL_ID_799").setValue(data.value);
- $("#EVAL_ID_799").render();
- $("#EVAL_NUM_799").val(data.key);
- diag.close();
- }, "json");
-
- };
- diag.URL = "/nwyj/page/business/em/evaluate/admin/sysAdminScore.jsp?fd_id="+evalnumid;
- diag.ShowButtonRow=true;
- diag.show();
- }
- </script>
- <style >
- .mybox{
- width: 1000px;
- margin: 10px auto;
- padding: 10px 20px;
- background: #fff;
- }
- .class_color{
- background-color: rgb(237, 239, 253);
- }
- </style>
- </head>
- <body >
- <div class="mybox" id="formContent" align="center">
- <div class="" align="center">
- <a href="javascript:;"><img id="back" align="left" src="/nwyj/images/temp/back.png" /></a>
- <font style="font-weight: bold;font-size: 20px;line-height: 45px;" class="titleShow"> </font>
- </div>
- <form id="editForm">
- <input name="classid" value="799" type="hidden" />
- <input name="FD_OBJECTID799" id="FD_OBJECTID799" type="hidden" />
- <input id="WRITER_ID_799" name="WRITER_ID_799" type="hidden" />
- <input id="WRITE_TIME_799" name="WRITE_TIME_799" type="hidden" />
- <input id="EVAL_NUM_799" name="EVAL_NUM_799" type="hidden" />
- <!-- 保存和重置 -->
- <br />
- <div class="" align="right" >
- <input value="保存" type="button" id="save" />
- <input value="重置" type="button" id="reset" onclick="formReset();"/>
- <!-- 新增重置 -->
- </div>
- <br />
- <!-- 正文表格 -->
- <table class="tableStyle" align="center" id="contentTable">
- <tr>
- <td colspan="1" align="right" class="class_color"><span class="star">*</span>体系名:</td>
- <td colspan="5" align="left">
- <input id="NAME_799" name="NAME_799" class="validate[required]" type="text" style="width:95%;" maxlength='50' />
- </td>
- </tr>
- <tr>
- <td colspan="1" align="right" class="class_color" ><span class="star">*</span>体系层级数:</td>
- <td colspan="2" align="left">
- <input id="LEVEL_NUM_799" name="LEVEL_NUM_799" class="validate[required]" type="text" style="width:250px;"></input>
- </td>
- <td colspan="1" align="right" class="class_color" ><span class="star">*</span>体系类型:</td>
- <td colspan="2" align="left">
- <select id="TYPE_799" name="TYPE_799" class="validate[required]" editable=false prompt="请选择" selWidth="255" ></select>
- </td>
- </tr>
-
- <tr>
- <td colspan="1" align="right" class="class_color"><span class="star">*</span>顺序结构方式:</td>
- <td colspan="2" align="left">
- <select id="EVAL_ORDER_799" name="EVAL_ORDER_799" class="validate[required]" editable=false prompt="请选择" selWidth="255"></select>
- </td>
- <td colspan="1" align="right" class="showSelect1 class_color" style="display:none;"><span class="star">*</span>评分类型:</td>
- <td colspan="2" align="left" class="showSelect1" style="display:none;" >
- <select id="EVAL_ID_799" name="EVAL_ID_799" class="" editable=false prompt="请选择" selWidth="255" ></select>
- <input style="margin:3px 0 0 10px;" type="button" value="添加类型" id="createEvalNum" onclick="createEvalClick();"/>
- </td>
- <td colspan="3" class="showSelect2"></td>
- </tr>
- <tr>
- <td colspan="1" align="right" class="class_color"><span>备注:</span></td>
- <td colspan="5" align="left">
- <textarea id="REMARK_799" name="REMARK_799" style="width:95%;"></textarea>
- </td>
- </tr>
-
- </table>
- </form>
- </div>
- </body>
- </html>
|