123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252 |
- <%@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" %>
- <!--引用资源文件,JS CSS-->
- <script type="text/javascript" src="<%=path%>/scripts/jquery/plugins/jquery.extension.util.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/common.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/utils/utils.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/frameWork/frameWork.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/common/common.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/business/he/common/common.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/utils/Request.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/qui/libs/js/tree/ztree/ztree.js"></script>
- <link href="<%=path%>/scripts/qui/libs/js/tree/ztree/ztree.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript">
- var fd_id = "<%=request.getParameter("fd_id")%>";
- //取得用户真实名字
- var realName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
- //部门id
- var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getDeptids();
- //部门名称
- var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getDeptnames();
- //父部门id
- var parentId = top.com.sinosoft.lz.system.user.LoginInfo.getParent_ids();
- //alert(fd_id);
- //默认加载
- $(function(){
- var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
- var params = {
- classid : '374',
- objectID : fd_id
- };
- //项目级别
- $('#LEVEL_374').initCanstSelect('BM_PROJET_LEVEL');
-
- $.request.query(url,params,function(data){
- $("#NAME_374").html(data.NAME_374);//评价项目名
- $("#LEVEL_374").html(data.LEVEL_374_SHOW);//项目级别
- $("#ITEM_376").val(data.FD_OBJECTID374);
- url = $.pathname() + '/ws/crud/CRUDService/getDatByList/';
- var params = {
- classid : '376',
- condition:' ITEM = '+data.FD_OBJECTID374+' AND is_del=0'
- };
- $.request.query(url,params,function(itmeData){
- if(itmeData != null && itmeData.length != 0){
- var len = itmeData.length;
-
- for(var i =0;i < len;i++){
- if(i == 0){
- $('#editForm').ajaxWrite({data:itmeData[0]});
- addOneRow(itmeData[i].FD_OBJECTID376,itmeData[i].FD_OBJECTID376,itmeData[i].DETAIL_376);
- }else{
- addRow(itmeData[i].FD_OBJECTID376,itmeData[i].FD_OBJECTID376,itmeData[i].DETAIL_376);
- }
- }
- }else{
- addOneRow();
- }
- });
- });
-
- //填报人
- $("#WRITER_376").val(realName);
- //填报部门
- $("#WRITE_DEPT_376").val(deptName);//广电信息中心
- //填报时间
- $("#WRITE_TIME_376").val(getDateTime());
- });
-
- //返回主页面
- function goBack() {
- //获取iframe中的元素值
- var iframe = parent.document.getElementsByName("frmright")[0];
- iframe.src = "/nwyj/page/business/em/evaluate/targetManage/TargetManage.jsp";
- }
- //保存方法
- function save(){
-
- var len = $('.dataClas').length;
- for(var i = 0;i < len;i++){
- $("#FD_OBJECTID376").val($('.dataClas').eq(i).attr('id'));
- $("#DETAIL_376").val($('.dataClas').eq(i).val());
- $form = $('#editForm');
- var fd_id = $("#FD_OBJECTID376").val();
- var url = $.pathname() + '/ws/crud/CRUDService/create/';
- if(fd_id != null && fd_id != ""){
- url = $.pathname() + '/ws/crud/CRUDService/update/';
- }
- $.ajax({
- url : url,
- type : 'post',
- data : $form.serialize(),
- dataType : 'json',
- timeout : 60000,
- success : function(data){
-
- // goBack();
- },
- error : function(){
- top.Dialog.alert("操作失败!");
- }
- });
-
-
- }
- top.Dialog.alert("保存成功!");
- goBack();
- //alert($('.dataClas').eq(2).val());
-
- }
- //获得当前系统时间
- function getDateTime(){
- var s="";
- var d = allGetServerTime();
- var vYear = d.getFullYear();
- var vMon = d.getMonth() + 1;
- var vDay = d.getDate();
- var h = d.getHours();
- var m = d.getMinutes();
- var se = d.getSeconds();
- s=vYear+"-"+(vMon<10 ? "0" + vMon : vMon)+"-"+(vDay<10 ? "0"+ vDay : vDay)+" "+(h<10 ? "0"+ h : h)+":"+(m<10 ? "0" + m : m)+":"+(se<10 ? "0" +se : se);
- return s;
- }
- function addOneRow(id,name,val){
- if(val == null || val == undefined){
- val = '';
- }
- if(id == null){
- id = '';
- }
- if(name == null){
- name = '';
- }
- $("#rows").append("<tr><td width='15%' align='right'>评估内容:</td><td width='75%' colspan='3'><input id='"+id+"' class='dataClas' style='width:89%;' name='"+name+"' value='"+val+"' type='text'/> <input value='添加一行' onclick='addRow();' type='button'/></td></tr>");
- }
- function addRow(id,name,val){
- if(val == null || val == undefined){
- val = '';
- }
- if(id == null){
- id = '';
- }
- if(name == null){
- name = '';
- }
- $("#rows").append("<tr><td width='15%' align='right'>评估内容:</td><td width='75%' colspan='3'><input id='"+id+"' class='dataClas' style='width:89%;' name='"+name+"' value='"+val+"' type='text'/> <input value='删除一行' onclick='delRow(this);' type='button'/></td></tr>");
- }
- function delRow(obj){
-
- var fd_id = $(obj).parent().children().attr('id');
- $(obj).parent().parent().remove();
- if(fd_id != null && fd_id != ""){
-
- var url = $.pathname() +"/ws/crud/CRUDService/delete/";
- var params = {
- objectIDs : fd_id,
- classid : 376
- };
- top.Dialog.confirm("确定要删除吗?|删除", function() {
- $.request.del(url,params,function(result){
- if (result.Msg.sucsess == true) {
- top.Dialog.alert("删除成功!");
-
- } else {
- top.Dialog.alert("删除失败!");
- }
- });
- });
- }
- }
- </script>
- <style type="text/css">
- input{
- height:30px;
- line-height: 30px;
- background: #eee none;
- border:1px solid #ccc;
- color:#333333;
- background-color:rgb(255,255,255);
- }
- body,div,ul,li,p{
- margin:0;
- padding:0;
- font-size: 14px;
- }
- .d_ground{
- border: 1px solid #cdcaca;
- background: white;
- width:1000px;
- }
- .fieldset{
- border-style:solid;
- border-width:1px;
- border-color:#cdcaca;
- margin:0px 20px 20px 20px;
- width: 935px
- }
- .button_jl{
- margin:5px 10px 10px 0px;
- float:right;
- }
- .back{
- margin:8px 0px 0px 15px;
- }
- </style>
- </head>
- <body style="width: 1000px; margin:0 auto; margin-top:15px" align="center"><!-- style="height: 545px;" -->
- <div class="d_ground" id="formContent" >
- <div style="height: 40px;background: white;" align="center">
- <a>
- <img align="left" class="back" alt="返回" title="返回" src="/nwyj/images/temp/back.png" onclick="goBack();"></img>
- </a>
- <font style="font-weight: bold;font-size: 20px;line-height: 45px;color: #3e62a0">项目评价内容</font>
- </div>
- <hr />
-
- <div class="button_jl">
- <input value="取消" onclick="goBack();" type="button" />
- <input value="保存" onclick="save();" type="button"/>
- </div>
-
- <form id="editForm" style="margin: 0px 10px 10px 10px">
- <input name="classid" value="376" type="hidden" />
- <input name="FD_OBJECTID376" id="FD_OBJECTID376" type="hidden"/>
- <input id="WRITER_376" name="WRITER_376" type="hidden"/>
- <input id="WRITE_DEPT_376" name="WRITE_DEPT_376" type="hidden"/>
- <input id="WRITE_TIME_376" name="WRITE_TIME_376" type="hidden"/>
- <input id="DETAIL_376" name="DETAIL_376" type="hidden" />
- <input id="ITEM_376" name="ITEM_376" type="hidden"/>
- <table id="rows" class="tableStyle">
- <tr>
- <td width="15%" align="right">评价项目名:</td>
- <td width="30%"><div id="NAME_374"></div></td>
- <td width="15%" align="right">项目级别:</td>
- <td width="30%"><div id="LEVEL_374"></div></td>
- </tr>
- <!-- <tr>
- <td width="15%" align="right">评估内容:</td>
- <td width="75%" colspan="3"><input id="DETAIL_376" name="DETAIL_376" type="text" style="width:90%"/> <input value="添加内容" onclick="addRow();" type="button"/></td>
- </tr> -->
- </table>
- </form>
- </div>
- </body>
|