123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336 |
- <%@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>
- <link rel="stylesheet" type="text/css"
- href="/nwyj/scripts/qui/libs/css/import_basic.css" />
- <link rel="stylesheet" type="text/css" id="skin"
- prePath="/nwyj/scripts/qui/" scrollerY="false" />
- <link rel="stylesheet" type="text/css" id="customSkin" />
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/jquery.js"></script>
- <script type="text/javascript"
- src="/nwyj/scripts/qui/libs/js/language/cn.js"></script>
- <script type="text/javascript"
- src="/nwyj/scripts/qui/libs/js/framework.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/main.js"></script>
- <!--框架必需end-->
- <script type="text/javascript"
- src="/nwyj/scripts/qui/libs/js/text/vticker.js"></script>
- <!--自动提示框start-->
- <script type='text/javascript'
- src='/nwyj/scripts/qui/libs/js/form/suggestion.js'></script>
- <!--自动提示框end-->
- <!--数据表格start-->
- <script type="text/javascript"
- src="/nwyj/scripts/qui/libs/js/table/quiGrid.js"></script>
- <!--数据表格end-->
- <!--表单提交start-->
- <script type="text/javascript"
- src="/nwyj/scripts/qui/libs/js/form/form.js"></script>
- <!--表单提交end-->
- <!--表单验证start-->
- <script type="text/javascript"
- src="/nwyj/scripts/qui/libs/js/form/validation.js"></script>
- <script type="text/javascript"
- src="/nwyj/scripts/qui/libs/js/form/validationRule.js"></script>
- <!--表单提交end-->
- <!--数据表格end-->
- <script type="text/javascript"
- src="/nwyj/scripts/qui/libs/thirdparty/highcharts/js/highcharts.js"></script>
- <!--弹窗组件start-->
- <script type="text/javascript"
- src="/nwyj/scripts/qui/libs/js/popup/messager.js"></script>
- <script type="text/javascript"
- src="/nwyj/scripts/qui/libs/js/popup/drag.js"></script>
- <script type="text/javascript"
- src="/nwyj/scripts/qui/libs/js/popup/dialog.js"></script>
- <!--弹窗组件end-->
- <!--布局组件start-->
- <script type="text/javascript"
- src="/nwyj/scripts/qui/libs/js/nav/layout.js"></script>
- <!--布局组件start-->
- <!--基本选项卡start-->
- <script type="text/javascript"
- src="/nwyj/scripts/qui/libs/js/nav/basicTab.js"></script>
- <!--基本选项卡end-->
- <!--动态选项卡start-->
- <script type="text/javascript"
- src="/nwyj/scripts/qui/libs/js/nav/dynamicTab.js"></script>
- <!--动态选项卡end-->
- <!--树组件start-->
- <link rel="stylesheet" type="text/css"
- href="/nwyj/scripts/qui/libs/js/tree/ztree/ztree.css" />
- <script type="text/javascript"
- src="/nwyj/scripts/qui/libs/js/tree/ztree/ztree.js"></script>
- <script type="text/javascript"
- src="/nwyj/scripts/qui/libs/js/tree/ztree/exhide.js"></script>
- <!-- 树形下拉框start -->
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/selectTree.js"></script>
- <!-- 树形下拉框end -->
-
- <!-- 扩展工具js -->
- <script type="text/javascript"
- src="/nwyj/scripts/jquery/plugins/jquery.extension.util.js"></script>
- <script type="text/javascript"
- src="/nwyj/scripts/freamwork/com/sinosoft/common/utils/Request.js"></script>
- <script type="text/javascript"
- src="/nwyj/scripts/freamwork/com/sinosoft/common/common.js"></script>
- <script type="text/javascript"
- src="/nwyj/scripts/freamwork/com/sinosoft/common/DateUtil.js"></script>
- <script type="text/javascript"
- src="/nwyj/scripts/commom/common/common.js"></script>
- <!--浮动面板start-->
- <script type="text/javascript"
- src="/nwyj/scripts/qui/libs/js/popup/floatPanel.js"></script>
- <!--浮动面板end-->
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/datePicker/WdatePicker.js"></script>
- <script type="text/javascript" src="addReportRequire.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/setiframeheight.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/freamwork/com/sinosoft/system/invoking/invoking.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/showLoading/jquery.showLoading.js"></script>
- <link type="text/css" href="/nwyj/page/business/em/report/reportCss/report.css" rel="stylesheet"/>
- <style type="text/css">
- body{
- padding:0px;
- margin:0px;
- }
-
- ._button{
-
- margin-left: 81%;
- margin-top: 10px;
- margin-bottom: 10px;
- }
- .planDiv{
- margin:0 auto;
-
- position: relative;
- top:5px;
- }
- .mainCon{
- float:none;
- }
- .add{
- margin: 10px 0 0 0 ;
- }
- .button{
- min-width: 40px;
- }
- </style>
- <script type="text/javascript">
- var fd_id = "<%=request.getParameter("fd_id")%>";
- //获取用户Id
- var userId = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
- //获取用户部门Id
- var dept_id = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
- //获取公司Id
- var comp_id = top.com.sinosoft.lz.system.user.LoginInfo.getParent_ids();
- var role_id = top.com.sinosoft.lz.system.user.LoginInfo.getRoleids();
- var dept_name = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_names();
- var real_name = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
- var login_name = top.com.sinosoft.lz.system.user.LoginInfo.getLogin_name();
- var is_overTime = false;
- //获取时间
-
- function goback(){
- window.parent.document.getElementById("frmright").setAttribute("src", "/nwyj/page/business/am/report/reportinputrequest/Report_Require.jsp");
- }
- function pagereset(){
- window.parent.document.getElementById("frmright").setAttribute("src", "/nwyj/page/business/am/report/reportinputrequest/addReportRequire.jsp?fd_id="+fd_id);
- };
- $(function(){
- $("#back").hover(function(){
- $(this).attr("src","/nwyj/images/temp/back_hover.png");
- },function(){
- $(this).attr("src","/nwyj/images/temp/back.png");
- });
-
-
-
- $("#COMP_ID_429").val(dept_id);
- $("#COMP_NAME_429").val(dept_name);
- $("#USER_ID_429").val(userId);
- $("#USER_NAME_429").val(real_name);
- $("#FILL_IN_SCHEDULE_429").initCanstSelect('BM_AM_ReportStat_LJP');
- /* $("#FILL_IN_SCHEDULE_429").data("data",circleJson);
- $("#FILL_IN_SCHEDULE_429").render(); */
- var deptUrl = $.pathname() + '/ws/rcbaobiao/RcBbService/getRequireTabList';
- $.post(deptUrl,{comp_id:dept_id},function(data){
- $("#report_type").data("data",data);
- $("#report_type").render();
- }, "json");
- var getRoleId = getRole_id(role_id);
- var deptUrl = $.pathname()+ "/ws/xianlutingyun/XianlutingyunService/getChildComp";
- $.post(deptUrl,{comp_id:dept_id,role_id:getRoleId},function(data){
- $("#REPORT_DEPT_429").data("data",data);
- $("#REPORT_DEPT_429").render();
- }, "json");
-
- $(".tem_content").each(function(){
- $(this).hide();
- });
- $(".tem_content #TEMPORARY_TIME_429").removeClass("validate[required]");
- if(fd_id!=undefined&&fd_id!=""&&fd_id!="null"){//修改表单
- var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
- var params = {
- classid : '429',
- objectID : fd_id
- };
- $.request.query(url,params,function(data){
- $('#requireForm').ajaxWrite({data:data});
- var reportName = data.PROJECT_NAME_429.split("_")[0];
- var circle_num = data.FILL_IN_SCHEDULE_429;
- if(circle_num=="5"){
- $(".tem_content").each(function(){
- $(this).show();
- });
- $(".tem_content #TEMPORARY_TIME_429").addClass("validate[required]");
- }
- });
- }else{//新增
-
- }
-
- if(fd_id=="null"){
- $("#add").text("新增填报要求");
- $("#title").text("新增填报要求");
- }else{
- $("#add").text("修改填报要求");
- $("#title").text("修改填报要求");
-
- }
- });
-
-
- //获取当前时间
- function getTime(){
- var now=allGetServerTime();
- var year = now.getFullYear();
- var month=now.getMonth()+1;
- if(month>=1&&month<=9){
- month = "0"+month;
- }
- //获取日期
- var day=now.getDate();
- if(day>=1&&day<=9){
- day = "0"+day;
- }
- var currenttime = year+"-"+month+"-"+day;
-
- return currenttime;
- };
-
- function checkTime(tem_val){
- var currtime = getTime();
- tem_val = Date.parse(new Date(tem_val.replace(/-/g,"/")));
- currtime = Date.parse(new Date(currtime.replace(/-/g,"/")));
- if(tem_val<currtime){
- is_overTime = true;
- top.Dialog.alert("自定义时间应大于当前时间!");
- }
- }
-
- function getProjectName(){
- is_overTime = false;
- var circle_num = $("#FILL_IN_SCHEDULE_429").attr("relvalue");
- if(circle_num=="5"){
- $(".tem_content").each(function(){
- $(this).show();
- });
- $(".tem_content #TEMPORARY_TIME_429").addClass("validate[required]");
- }else{
- $(".tem_content").each(function(){
- $(this).hide();
- });
- $(".tem_content #TEMPORARY_TIME_429").val("");
- $(".tem_content #TEMPORARY_TIME_429").removeClass("validate[required]");
- }
- var reportType = $("#report_type").attr("reltext");
- var circle = $("#FILL_IN_SCHEDULE_429").attr("reltext");
- var tem_val = $("#TEMPORARY_TIME_429").val();
- if(tem_val!=""){
- checkTime(tem_val);
- }
- reportType = (reportType==undefined || reportType=="请选择")?"":reportType;
- circle = circle=="自定义"?tem_val:circle;
- circle = (circle==undefined || reportType=="请选择")?"":circle;
- $("#PROJECT_NAME_429").val(reportType+"_"+circle+"_"+"报表填报计划")
- }
-
-
- function getRole_id(id){
- if(id.indexOf(",")!=-1){
- var role_ids = id.split(",");
- for(var i=0;i<role_ids.length;i++){
- if(role_ids[i]=="R002105430210"||role_ids[i]=="R002105430211"||role_ids[i]=="R002105430212"||role_ids[i]=="R002105430213"){
- return role_ids[i];
- }
- }
- }else{
- return id;
- }
- }
- </script>
- </head>
- <body >
- <div class="box1"panelWidth="100%" panelHeight="500">
- <div class="title_msg" id="add"></div>
- <div class="pic" onclick="goback();" id="go">
- <a href="javascript:;">
- <img alt="返回" title="返回" src="/nwyj/images/temp/back.png" id="back">
- </a>
- </div>
- <div class="_button">
- <input type="button" value="保存并发布" id="saveAndRelease">
- <input value="保存" type="button" id="save"/>
- <input value="重置" type="button" onclick="pagereset();"/>
- </div>
- <fieldset>
- <legend id="title"></legend>
- <div class="planDiv">
- <form action="" id="requireForm">
- <input type="hidden" name="classid" value="429">
- <input type="hidden" name="FD_OBJECTID429" value=""/>
- <input type="hidden" value="0" id="SEND_STAT_429" name="SEND_STAT_429">
- <input type="hidden" id="COMP_ID_429" name="COMP_ID_429">
- <input type="hidden" id="COMP_NAME_429" name="COMP_NAME_429">
- <input type="hidden" id="USER_ID_429" name="USER_ID_429">
- <input type="hidden" id="REPORT_DEPT_NAME_429" name="REPORT_DEPT_NAME_429">
- <input type="hidden" id="USER_NAME_429" name="USER_NAME_429">
- <table class="tableStyle">
- <tr>
- <td width="10%" align="right"><span class="star">*</span>报表类型:</td>
- <td width="40%">
- <select id="report_type" prompt="请选择" selWidth="380" class="validate[required]" onchange="getProjectName();" name="REPORT_TYPE_429"></select>
- </td>
- <td width="10%" align="right"><span class="star">*</span>填报要求名称:</td>
- <td width="40%"><input type="text" readonly="readonly" name="PROJECT_NAME_429" id="PROJECT_NAME_429" style="width:90%" class="validate[required,length[0,40]]" ></td>
- </tr>
- <tr>
- <td width="10%" align="right"><span class="star">*</span>填报单位:</td>
- <td width="90%" colspan="3">
- <div class="selectTree validate[required]" id="REPORT_DEPT_429" name="REPORT_DEPT_429" multiMode="true" allSelectable="true" exceptParent="true" selWidth="380" ></div>
- </td>
- </tr>
- <tr>
- <td width="10%" align="right"><span class="star">*</span>填报周期:</td>
- <td width="40%">
- <select id="FILL_IN_SCHEDULE_429" name="FILL_IN_SCHEDULE_429" prompt="请选择" selWidth="380" class="validate[required]" onchange="getProjectName();"></select>
- </td>
- <td width="10%" align="right" class="tem_content"><span class="star" >*</span>自定义时间:</td>
- <td width="40%" class="tem_content">
- <input type="text" id="TEMPORARY_TIME_429" readOnly="readOnly" style="width:297px" name="TEMPORARY_TIME_429"
- class="date" dateFmt="yyyy-MM-dd" onchange="getProjectName();"/>
- </td>
- </tr>
- </table>
- </form>
- </div>
- </fieldset>
- </div>
- </body>
- </html>
|