projectTaskPlan-add.jsp 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <title>工作计划</title>
  7. <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  8. <script type="text/javascript">
  9. </script>
  10. </head>
  11. <body>
  12. <t:formvalid formid="formobj" dialog="false" usePlugin="password" layout="table" action="projectTaskPlanController.do?doAdd" tiptype="1" callback="callback" >
  13. <input id="id" name="id" type="hidden" value="${projectTaskPlanPage.id }"/>
  14. <input id="status" name="status" type="hidden" value="1"/>
  15. <input id="tasktype" name="tasktype" type="hidden" value="${projectTaskPlanPage.tasktype}"/>
  16. <%-- <t:dictSelect field="status" type="hidden" extendJson="{class:'form-control'}" typeGroupCode="billstatus" hasLabel="false" title="计划状态"></t:dictSelect> --%>
  17. <table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
  18. <tr>
  19. <td align="right">
  20. <label class="Validform_label">
  21. 计划编码:
  22. </label>
  23. </td>
  24. <td class="value">
  25. <input id="code" name="code" type="text" style="width: 150px" class="inputxt" ignore="ignore" readonly="readonly" />
  26. <span class="Validform_checktip"></span>
  27. <label class="Validform_label" >提交后系统自动生成</label>
  28. </td>
  29. </tr>
  30. <tr>
  31. <td align="right">
  32. <label class="Validform_label">
  33. <span color="red" class="requiredIcon">*</span>计划名称:
  34. </label>
  35. </td>
  36. <td class="value">
  37. <input id="name" name="name" type="text" style="width: 150px" class="inputxt" datatype="*" ignore="ignore" />
  38. <span class="Validform_checktip"></span>
  39. <label class="Validform_label" style="display: none;">计划名称</label>
  40. </td>
  41. </tr>
  42. <%-- <tr>
  43. <td align="right">
  44. <label class="Validform_label">
  45. <span color="red" class="requiredIcon">*</span> 计划类型:
  46. </label>
  47. </td>
  48. <td class="value">
  49. <t:dictSelect id="tasktype" field="tasktype" type="list" typeGroupCode="tasktype" defaultVal="${projectTaskPlanPage.tasktype}" hasLabel="false" title="计划类型" ></t:dictSelect>
  50. <span class="Validform_checktip"></span>
  51. <label class="Validform_label" style="display: none;">计划类型</label>
  52. </td>
  53. </tr> --%>
  54. <tr>
  55. <td align="right">
  56. <label class="Validform_label">
  57. <span color="red" class="requiredIcon">*</span> 计划工作时间:
  58. </label>
  59. </td>
  60. <td class="value">
  61. <input id="cron" name="cron" type="text" style="width: 150px" class="inputxt" datatype="*" readonly="readonly" ignore="ignore" />
  62. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="cronSetting" onclick="openCronSetting()">设置</a>
  63. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="cronRedo" onclick="cleanCron()">清空</a>
  64. <span class="Validform_checktip"></span>
  65. <label class="Validform_label" style="display: none;">计划工作时间</label>
  66. </td>
  67. </tr>
  68. <tr>
  69. <td align="right">
  70. <label class="Validform_label">
  71. <span color="red" class="requiredIcon">*</span> 提醒时间:提前
  72. </label>
  73. </td>
  74. <td class="value">
  75. <input id="msgAdvanceQuantity" name="msgAdvanceQuantity" type="text" class="inputxt" datatype="n" ignore="checked" value="${msgAdvanceQuantity}">
  76. <%-- <span class="Validform_checktip" style="display: none;">提前量</span> --%>
  77. <t:dictSelect field="msgAdvanceType" type="list" extendJson="{class:'form-control'}" typeGroupCode="msgTipType" hasLabel="false" title="消息提醒时间类型"></t:dictSelect>
  78. <label class="Validform_label"> 提醒 </label>
  79. </td>
  80. </tr>
  81. <tr>
  82. <tr>
  83. <td align="right">
  84. <label class="Validform_label">
  85. <span color="red" class="requiredIcon">*</span> 每日生成工作数量上限:
  86. </label>
  87. </td>
  88. <td class="value">
  89. <input id="taskquantity" name="taskquantity" type="text" class="inputxt" datatype="n" ignore="checked" value="${taskquantity}">
  90. </td>
  91. </tr>
  92. <tr>
  93. <td align="right">
  94. <label class="Validform_label">
  95. <span color="red" class="requiredIcon">*</span> 工作所属角色:
  96. </label>
  97. </td>
  98. <td class="value">
  99. <t:dictSelect field="ownerrole" type="list" dictTable="t_s_role" dictField="id" dictText="rolename" datatype="*" defaultVal="${projectTaskPlanPage.ownerrole}" hasLabel="false" title="工作所属角色" dictCondition=" where rolecode like 'T_%'"></t:dictSelect>
  100. <span class="Validform_checktip"></span>
  101. <label class="Validform_label" style="display: none;">工作所属角色</label>
  102. </td>
  103. </tr>
  104. <tr>
  105. <td align="right">
  106. <label class="Validform_label"> 分配项目: </label>
  107. </td>
  108. <td class="value">
  109. <%-- <input id="projectnames" name="projectnames" type="text" readonly="readonly" class="inputxt" value="${projectTaskPlanPage.projectnames}"> --%>
  110. <textarea id="projectnames" name="projectnames" ignore="ignore" style="width: 280px" rows="6" readonly="readonly" >${projectTaskPlanPage.projectnames}</textarea>
  111. <input id="projectids" name="projectids" type="hidden" value="${projectTaskPlanPage.projectids}">
  112. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="jzdepartSearch" onclick="openDepartmentSelectjz()">选择</a>
  113. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="jzdepartRedo" onclick="callbackCleanjz()">清空</a>
  114. <span class="Validform_checktip" style="display: none;">分配项目</span>
  115. </td>
  116. </tr>
  117. <tr>
  118. <td align="right">
  119. <label class="Validform_label">
  120. 计划详述:
  121. </label>
  122. </td>
  123. <td class="value" >
  124. <textarea id="description" name="description" ignore="ignore" style="width: 280px" rows="6" placeholder="请输入计划描述(最多输入文字数200)" ></textarea>
  125. <span class="Validform_checktip"></span>
  126. <label class="Validform_label" style="display: none;">计划详述</label>
  127. </td>
  128. </tr>
  129. <tr>
  130. <td height="50px" align="center" colspan="8">
  131. <div style="display:none"><input type="submit" id ="btnsub" value=""/></div>
  132. <a href="#" class="easyui-linkbutton l-btn" iconcls="icon-le-ok" onclick="btn_ok()">提交</a>
  133. <a style="margin-left:20px" href="#" class="easyui-linkbutton l-btn" plain="true" iconcls="icon-le-back" onclick="btn_back()">返回</a>
  134. </td>
  135. </tr>
  136. </table>
  137. </t:formvalid>
  138. <%-- <div style="display:none"><input type="submit" id ="btnsub" value=""/></div>
  139. <a href="#" class="easyui-linkbutton l-btn" iconcls="icon-le-ok" onclick="btn_ok()">提交</a>
  140. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-return" onclick="backOnClick()">返回</a>
  141. </div> --%>
  142. </body>
  143. <script src = "webpage/com/xcgl/projecttaskplan/projectTaskPlan.js"></script>
  144. <script>
  145. $(document).ready(function(){
  146. /* if($("#tasktype").val().length == 0)
  147. document.getElementById("tasktype").readonly=false; */
  148. });
  149. function btn_ok(){
  150. $("#btnsub").click();
  151. }
  152. function callback(data){
  153. if(data.success){
  154. layer.alert(data.msg, function(index){
  155. window.location.href="projectTaskPlanController.do?list&type="+$("#tasktype").val();
  156. layer.close(index);
  157. });
  158. }
  159. else{
  160. layer.alert(data.msg);
  161. }
  162. }
  163. function btn_back(){
  164. var url = 'projectTaskPlanController.do?list&type='+$("#tasktype").val();
  165. window.location.href=url;
  166. }
  167. //项目多选
  168. function openDepartmentSelectjz() {
  169. $.dialog.setting.zIndex = getzIndex();
  170. var projectIds = $("#projectids").val();
  171. $.dialog({content: 'url:projectTaskPlanController.do?jzdepartSelect&jzorgIds='+projectIds, zIndex: 2100, title: '项目列表', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
  172. {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackDepartmentSelectjz, focus: true},
  173. {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  174. ]}).zindex();
  175. }
  176. function callbackDepartmentSelectjz() {
  177. var iframe = this.iframe.contentWindow;
  178. var treeObj = iframe.$.fn.zTree.getZTreeObj("jzdepartSelect");
  179. var nodes = treeObj.getCheckedNodes(true);
  180. if(nodes.length>0){
  181. var ids='',names='';
  182. for(i=0;i<nodes.length;i++){
  183. var node = nodes[i];
  184. ids += node.id+',';
  185. names += node.name+',';
  186. }
  187. // 把最后的逗号去掉
  188. names = names.substring(0,names.length - 1);
  189. $('#projectnames').val(names);
  190. $('#projectnames').blur();
  191. $('#projectids').val(ids);
  192. }
  193. }
  194. function callbackCleanjz(){
  195. $('#projectnames').val('');
  196. $('#projectids').val('');
  197. }
  198. function openCronSetting(){
  199. $.dialog.setting.zIndex = getzIndex();
  200. var cron = $("#cron").val();
  201. $.dialog({id:'cronsetting', content: 'url:projectTaskPlanController.do?cronsetting&cron='+cron, zIndex: 2100, title: '工作计划启动时间设置', lock: true, width: '950px', height: '600px', opacity: 0.4, button: [
  202. {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbackCronSetting
  203. , focus: true},
  204. {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  205. ]}).zindex();
  206. }
  207. function callbackCronSetting(){
  208. var iframe = this.iframe.contentWindow;
  209. var cron = iframe.getCron();
  210. if(cron.indexOf('false') == 0){
  211. alert(cron.substring(5));
  212. return false;
  213. }else{
  214. $('#cron').val(cron);
  215. return true;
  216. }
  217. }
  218. function cleanCron(){
  219. $('#cron').val('');
  220. }
  221. </script>