| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384 |
- <%@ page language="java" contentType="text/html;charset=GBK"
- pageEncoding="GBK"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
- <!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>
- <title>非项目任务项管理-添加任务</title>
- <link
- href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css"
- rel="stylesheet" type="text/css" />
- <link href="/shares/xheditor/xheditor-1.1.14/demos/common.css"
- rel="stylesheet" type="text/css" media="screen" />
-
- <link href="/shares/css/yw/tms/task.css" rel="stylesheet"
- type="text/css" />
- <link href="${pageContext.request.contextPath }/main.css"
- rel="stylesheet" type="text/css" />
- <script
- src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js"
- type="text/javascript"></script>
-
- <script
- src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js"
- type="text/javascript"></script>
- <script
- src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDateEditor.js"
- type="text/javascript"></script>
- <script
- src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDialog.js"
- type="text/javascript"></script>
- <script
- src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerCheckBox.js"
- type="text/javascript"></script>
- <script
- src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerResizable.js"
- type="text/javascript"></script>
- <script
- src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerComboBox.js"
- type="text/javascript"></script>
- <script src="/shares/js/common.js" type="text/javascript"></script>
- <script
- src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerTab.js"
- type="text/javascript"></script>
- <script
- src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js"
- type="text/javascript"></script>
-
-
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <link rel="stylesheet" type="text/css" href="/shares/css/yw/master1/win/jquery.jscrollpane.codrops1.css" />
- <!-- the mousewheel plugin -->
- <script type="text/javascript" src="/shares/js/yw/master1/jquery.mousewheel.js"></script>
- <!-- the jScrollPane script -->
- <script type="text/javascript" src="/shares/js/yw/master1/jquery.jscrollpane.min.js"></script>
- <script type="text/javascript" src="/shares/js/yw/master1/scroll-startstop.events.jquery.js"></script>
- <script type="text/javascript" src="/shares/js/yw/master1/scroll.js"></script>
- <link href="/shares/css/yw/master1/reset.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript"
- src="/shares/xheditor/xheditor-1.1.14/xheditor-1.1.14-zh-cn.min.js"></script>
- <style type="text/css">
- .l-table-edit-text {
- width: 100px;
- font-weight: bold;
- color: #cc000
- }
-
- .default-select {
- width: 500px;
- height: 22px;
- line-height: 22px;
- }
-
- .short-select {
- width: 273px;
- height: 22px;
- line-height: 22px;
- }
-
- .default-text {
- width: 270px;
- height: 22px;
- line-height: 22px
- }
-
- .short-text {
- width: 270px;
- line-height: 22px;
- height: 22px;
- }
- .l-text{
- width: 270px;
- line-height: 22px;
- height: 22px;
- }
- .text {
- height: 22px;
- line-height: 22px;
- margin-right: 10px;
- display: inline-block;
- margin-left: 1px
- }
-
- .title {
- font-size: 20px;
- font-weight: bold;
- padding-bottom: 20px;
- padding-left: 5px;
- border-bottom: 1px solid #ededed;
- vertical-align: middle;
- }
- .l-table-edit-td{
- width:270px;
- }
- .l-table-edit-text{
- width:89px;
- }
- .forum-container-2 .l-table-edit-text{
- width:99px;
- }
- .projectTable{margin: 5px}
- .projectTable tr{height: 25px; padding-bottom: 2px; margin: 10px auto}
- .projectTable .left-text {width: 80px; }
- .jp-container{
- height:500px;
- position:relative;
- overflow:hidden;
- }
- </style>
- <script type="text/javascript">
- var userScope = "${userScope}";
- var tab;
- if(userScope == "all"){
- tab = "1";
- }else if(userScope == "dept"){
- tab = "2";
- }
- $(function(){
- var msg="${msg}";
- if(msg !=""){
- if("操作成功"==msg){
- $.ligerDialog({content:msg, title:"操作成功",type:"success",width:250,height:55,allowClose : false,
- buttons:[ {text:"关闭",onclick:function(){closeAndReload();}}]
- });
- }else{
- $.ligerDialog.success(msg);
- }
- }
- $("#startDate").ligerDateEditor({
- labelWidth : 100,
- labelAlign : 'right',
- showTime: true,
- initValue:'${map.startDate }'
- });
- $("#endDate").ligerDateEditor({
- labelWidth : 100,
- labelAlign : 'right',
- showTime: true,
- initValue:'${map.endDate }'
- });
- });
- function toAddUser(){
- var dept=$("#relate_dep_id").val();
- if(!dept){
- $.ligerDialog.warn('请在项目信息中选择涉及部门');
- return;
- }
- loadTypeTree("usernameButton",{tab:"2",type:"user",backId:"user_id",backName:"user_name",tabParam:[{tab:"2",root:dept}]});
- $.ligerDialog.open({width:380, target: $("#target1"),title:"添加项目人员" });
- }
-
- //关闭当前页面刷新列表必须要传入tabid
- function closeAndReload(){
- var old_tabid = '${tabid}';
- if(old_tabid.length > 0){
- var tabid = getCurrentTabId();
- window.parent.f_selectTab(old_tabid);
- window.parent.f_reloadTab(old_tabid);
- window.parent.f_closeTab(tabid);
- }
- }
-
- function delUser(team_id,project_id){
- if(confirm("确定要删除")){
- $.ajax({
- type:"POST",
- url:"pmProject.do?task=delteamuser&team_id="+team_id+"&project_id="+project_id+"&time=" + new Date().getTime(),
- timeout:10000,
- cache:false,
- dataType:"json",
- success:function(msg){
- //closeWaittingDialog();
- if(msg > 0){
- $.ligerDialog.hide();
- $.ligerDialog.success("删除成功");
- initTeamgrid();
- }else{
- $.ligerDialog.warn("删除失败");
- }
- }
- });
- }
- }
- function closeDiv(){
- $.ligerDialog.hide();
- }
- function submitForm(){
- var obj = window.top;
- $("#tasktitle_msg").empty();
- $("#taskDetail_msg").empty();
- $("#planjobtime_msg").empty();
- $("#endDate_msg").empty();
- $("#startDate_msg").empty();
- $("#planjobtime_msg_").empty();
- $("#tasktitle_msg_").empty();
- var rs = $.validate({
- name : "tasktitle",
- model : [ {
- type : "require",
- msg : "请输入任务标题!"
- }, {
- type : "len",
- min : 1,
- max : 50,
- msg : "任务标题最长50个字以内!"
- } ]
- });
- rs = $.validate({
- name : "taskDetail",
- model : [ {
- type : "len",
- min : 0,
- max : 50,
- msg : "任务描述最长50个字以内!",
- msgBox : "taskDetail_msg"
- } ]
- }) && rs;
- rs = $.validate({
- name : "planjobtime",
- model : [ {
- type : "isNumber",
- msg : "请输入数字!"
- } ,{
- type : "require",
- msg : "请输入计划工作量!"
- }]
- }) && rs;
- rs = $.validate({
- name : "endDate",
- model : [ {
- type : "require",
- msg : "请选择正确的时间格式!",
- msgBox : "endDate_msg"
- } ]
- }) && rs;
- rs = $.validate({
- name : "startDate",
- model : [ {
- type : "require",
- msg : "请选择正确的时间格式!",
- msgBox : "startDate_msg"
- } ]
- }) && rs;
- if(rs){
- if ($("#planjobtime").val() <= 0){
- $("#planjobtime_msg").append("<font color=\"red\">计划工作量应大于0!</font>");
- document.all.planjobtime.focus();
- rs = false;
- }else if (new Date(Date.parse($("#endDate").val().replace("-","/"))) <= new Date(Date.parse($("#startDate").val().replace("-","/")))){
- $("#endDate_msg").append("<font color=\"red\">结束时间不能早于或等于开始时间!</font>");
- document.all.endDate.focus();
- rs = false;
- }
- }
- if (rs && comp_date()) {
- $("#_project").submit();
- }
- }
- function comp_date(){
- var start_date=$("#startDate").val();
- var end_date=$("#endDate").val();
- if(start_date =="" || start_date==null){
- return true;
- }
- if(end_date =="" || end_date==null){
- return true;
- }
-
- var starts=start_date.split("-");
- var starttime = new Date(starts[0], starts[1], starts[2]);
- var starttimes = starttime.getTime();
-
- var ends=end_date.split("-");
- var endtime = new Date(ends[0], ends[1], ends[2]);
- var endtimes = endtime.getTime();
- if(starttimes>endtimes){
- $("#end_dateMsg").html("开始时间不得早于结束时间");
- return false;
- }
- $("#end_dateMsg").html("");
- return true;
- }
- </script>
- </head>
- <body style="overflow:hidden;" ontouchmove="event.preventDefault();">
- <form method='post' name="_project" id="_project" <c:if test="${map.edit == 'edit' }"> action="mtTaskCenterMgr.do?task=editTask"</c:if> <c:if test="${map.edit == null }"> action="mtTaskCenterMgr.do?task=createTask"</c:if>>
- <input type="hidden" name="universalid" id="universalid" value="${universalid }" />
- <!-- 任务的id -->
- <input type="hidden" name="taskid" id="taskid" value="${map.taskid }" />
- <div class="s_title b10 f6">
- <img src="/shares/images/master1/gg_ico.png" width="27" height="26" /><c:if test="${map.edit == 'edit' }"> 修改非项目任务</c:if> <c:if test="${map.edit == null }"> 新增非项目任务</c:if>
- </div>
- <div id="title" class="form-button" style=" margin-top: 40px">
- <input type="button" id="back" class="l-button" value="返回" onclick="history.back(-1);" />
- <input type="button" value="保存" class="l-button" onclick="submitForm()" />
- </div>
- <div id="jp-container" class="jp-container liuyan" >
- <div class="forum-container-2" style="overflow: hidden;">
- <table border="0" cellspacing="1" cellpadding="0" style="border: 1px solid #ededed;">
- <tr>
- <td class="l-table-edit-text">任务标题<font color="red">*</font>:</td>
- <td class="l-table-edit-td">
- <input type="text" name="tasktitle" id="tasktitle" value="${map.tasktitle }" maxlength="50" class="default-text"/>
- <div id="tasktitle_msg" style="display: inline;"></div>
- <div id="tasktitle_msg_" style="display: inline;"></div>
- </td>
- <td class="l-table-edit-text">任务类型:</td>
- <td class="l-table-edit-td" >
- <select name="tasktype" id="tasktype" class="short-select" >
- <c:forEach var="list" items="${listTaskType}">
- <c:choose>
- <c:when test="${list.value_name eq requestScope.map.tasktype}">
- <option value="${list.data_id }" selected="selected">${list.value_name }</option>
- </c:when>
- <c:otherwise>
- <option value="${list.data_id }">${list.value_name }</option>
- </c:otherwise>
- </c:choose>
- </c:forEach>
- </select>
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">任务责任人<font color="red">*</font>:</td>
- <td class="l-table-edit-td" >
- <input type="text" style="width: 190px" class="default-text" name="receive_name" id="receive_name" readonly="readonly" value="${user_name }" />
- <input type="hidden" name="receiveIds" id="receiveIds" readonly="readonly" value="${user_id}"/>
- <label id="pmMsg"></label>
- </td>
- <td class="l-table-edit-text">计划工作量<font color="red">*</font>:</td>
- <td class="l-table-edit-td">
- <input type="text" name="planjobtime" id="planjobtime" value="${map.planjobtime }" maxlength="50" class="default-text"/>
- <div id="planjobtime_msg" style="display: inline;"></div>
- <div id="planjobtime_msg_" style="display: inline;"></div>
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">任务开始时间<font color="red">*</font>:</td>
- <td class="l-table-edit-td">
- <input type="text" name="startDate" id="startDate" value="${map.startDate }" maxlength="50" class="default-text"/>
- <div id="startDate_msg" style="display: inline;"></div>
- </td>
- <td class="l-table-edit-text">任务结束时间<font color="red">*</font>:</td>
- <td class="l-table-edit-td">
- <input type="text" name="endDate" id="endDate" value="${map.endDate }" maxlength="50" class="default-text"/>
- <div id="endDate_msg" style="display: inline;"></div>
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">任务描述<font color="red"></font>:</td>
- <td class="l-table-edit-td">
- <textarea id="taskDetail" name="taskDetail" rows="5" cols="50">${map.taskDetail }</textarea>
- <div id="taskDetail_msg" style="display: inline;"></div>
- </td>
- </tr>
- </table>
- </div>
- <input type="hidden" name="state" id="state" value="${map.state }" />
- <input type="hidden" name="type" value="${type }" />
- <input type="hidden" id="tabid" name="tabid" value="${param.tabid }"/>
- </div>
- </form>
- </body>
- </html>
|