projecttaskList.jsp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  4. <style type="text/css">
  5. .datagrid-btable .datagrid-cell{text-overflow:ellipsis;white-space: nowrap;}
  6. </style>
  7. <script type="text/javascript" src="<%=basePath%>/plug-in/jquery/jquery.jqprint.js"></script>
  8. <script src = "plug-in/tools/jquery.tips.js"></script>
  9. <%-- <script type="text/javascript" src="<%=basePath%>/plug-in/jquery/jquery-migrate-1.2.1.min.js"></script> --%>
  10. <div class="easyui-layout" fit="true">
  11. <div region="center" style="padding:0px;border:0px">
  12. <t:datagrid name="projecttaskList" pageSize="20" sortName="code" sortOrder="desc" checkbox="false" pagination="true" fitColumns="true" title="项目工作" actionUrl="projecttaskController.do?datagrid&tasktype=${tasktype}" idField="id" fit="true" queryMode="group" onLoadSuccess="onloaded">
  13. <t:dgCol title="主键" field="id" hidden="true" queryMode="single" width="120"></t:dgCol>
  14. <t:dgCol title="创建人名称" field="createName" hidden="true" queryMode="single" width="120"></t:dgCol>
  15. <t:dgCol title="创建人登录名称" field="createBy" hidden="true" queryMode="single" width="120"></t:dgCol>
  16. <t:dgCol title="创建日期" field="createDate" formatter="yyyy-MM-dd" hidden="true" queryMode="single" width="120"></t:dgCol>
  17. <t:dgCol title="更新人名称" field="updateName" hidden="true" queryMode="single" width="120"></t:dgCol>
  18. <t:dgCol title="更新人登录名称" field="updateBy" hidden="true" queryMode="single" width="120"></t:dgCol>
  19. <t:dgCol title="更新日期" field="updateDate" formatter="yyyy-MM-dd" hidden="true" queryMode="single" width="120"></t:dgCol>
  20. <t:dgCol title="工作编码" field="code" hidden="true" queryMode="single" width="120"></t:dgCol>
  21. <t:dgCol title="工作名称" field="name" queryMode="single" width="220"></t:dgCol>
  22. <t:dgCol title="工作描述" field="description" queryMode="single" width="240" showLen="18"></t:dgCol>
  23. <t:dgCol title="工作计划" field="taskplanid" hidden="true" queryMode="single" width="120"></t:dgCol>
  24. <t:dgCol title="消息时间" field="msgtime" hidden="true" formatter="yyyy-MM-dd hh:mm" queryMode="single" width="120"></t:dgCol>
  25. <t:dgCol title="计划开始时间" field="planstarttime" hidden="true" formatter="yyyy-MM-dd hh:mm" queryMode="group" width="120"></t:dgCol>
  26. <t:dgCol title="计划完成时间" field="planendtime" formatter="yyyy-MM-dd hh:mm" queryMode="group" width="120"></t:dgCol>
  27. <t:dgCol title="实际开始时间" field="exestarttime" hidden="true" formatter="yyyy-MM-dd hh:mm" queryMode="single" width="120"></t:dgCol>
  28. <t:dgCol title="实际完成时间" field="exeendtime" formatter="yyyy-MM-dd hh:mm" queryMode="single" width="120"></t:dgCol>
  29. <t:dgCol title="任务所属人" field="ownername" queryMode="single" width="70"></t:dgCol>
  30. <t:dgCol title="执行人" field="executer" hidden="true" queryMode="single" width="120"></t:dgCol>
  31. <t:dgCol title="所属项目及部门" field="projectname" queryMode="single" width="120"></t:dgCol>
  32. <t:dgCol title="工作状态" field="taskstatus" queryMode="single" dictionary="taskstatus" width="70"></t:dgCol>
  33. <t:dgCol title="工作类型" field="tasktype" hidden="true" queryMode="single" dictionary="tasktype" width="120"></t:dgCol>
  34. <t:dgCol title="工作来源" field="sourceid" hidden="true" queryMode="single" width="120"></t:dgCol>
  35. <t:dgCol title="来源类型" field="sourcetype" hidden="true" queryMode="single" dictionary="tasksourcetype" width="120"></t:dgCol>
  36. <t:dgCol title="关闭原因" field="closemsg" hidden="true" queryMode="single" width="200"></t:dgCol>
  37. <t:dgCol title="操作" field="opt" ></t:dgCol>
  38. <%-- <t:dgDelOpt title="删除" url="projecttaskController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/> --%>
  39. <t:dgFunOpt exp="taskstatus#eq#0" urlclass="ace_button" urlfont="fa-cog" funname="closeTask(id)" title="关闭工作" />
  40. <t:dgFunOpt exp="taskstatus#ne#20" urlclass="ace_button" urlfont="fa-arrow-circle-o-right" funname="exeTask(id)" title="开始执行" />
  41. <t:dgOpenOpt exp="taskstatus#eq#20" width="600" height="600" url="taskResultController.do?list&taskid={id}" urlclass="ace_button" urlfont="fa-check" title="查看结果"></t:dgOpenOpt>
  42. <%-- <t:dgToolBar title="录入" icon="icon-add" operationCode="add" url="projecttaskController.do?goAdd" funname="add"></t:dgToolBar> --%>
  43. <%-- <t:dgToolBar title="修改" icon="icon-edit" operationCode="edit" url="projecttaskController.do?goUpdate" funname="update"></t:dgToolBar> --%>
  44. <t:dgToolBar title="查看" icon="icon-search" url="projecttaskController.do?goUpdate" funname="detail"></t:dgToolBar>
  45. <t:dgToolBar title="打印" icon="icon-print" operationCode="print" funname="printall"></t:dgToolBar>
  46. <%-- <t:dgToolBar title="导入" icon="icon-putout" operationCode="put" funname="ImportXls"></t:dgToolBar>
  47. <t:dgToolBar title="批量删除" icon="icon-remove" operationCode="remove" url="projecttaskController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar>--%>
  48. <t:dgToolBar title="导出" icon="icon-put" operationCode="put" funname="ExportXls"></t:dgToolBar>
  49. <%-- <t:dgToolBar title="模板下载" icon="icon-putout" operationCode="putout" funname="ExportXlsByT"></t:dgToolBar> --%>
  50. </t:datagrid>
  51. </div>
  52. </div>
  53. <div id="pinjie1">
  54. <div name="pinjie2" style="padding:3px; height: auto" class="datagrid-toolbar">
  55. <div name="searchColums" style="margin:23px 0 18px 0;margin-top: 15px;margin-bottom: 8px;">
  56. <%-- <input type="hidden" id="orgCode" name="orgCode" value="${orgCode}"> --%>
  57. <table style="padding:0px" cellpadding="0" cellspacing="1" >
  58. <tbody>
  59. <tr>
  60. <td align="right" style="width: 74px;">
  61. <label class="Validform_label">
  62. 项目/部门:
  63. </label>
  64. </td>
  65. <td class="value" colspan="3">
  66. <input readonly="true" type="text" id="projectname" name="projectname" style="width: 157px" placeholder="请选择项目名称" onclick="openDepartmentSelect()">
  67. <input id="projectid" name="projectid" type="hidden" value="">
  68. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openDepartmentSelect()">选择</a>
  69. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo" onclick="callbackClean()">清空</a>
  70. </td>
  71. <td align="right" style="width: 74px;">
  72. <label class="Validform_label">
  73. 所属人:
  74. </label>
  75. </td>
  76. <td class="value" colspan="3">
  77. <input readonly="true" type="text" id="ownername" name="ownername" style="width: 157px" placeholder="请选择人员" onclick="openUserSelect()">
  78. <input id="owner" name="owner" type="hidden" value="">
  79. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="partnerSearch" onclick="openUserSelect()">选择</a>
  80. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="partnerRedo" onclick="callbackCleanUser()">清空</a>
  81. </td>
  82. </tr>
  83. <tr height="50px">
  84. <td align="right" style="width: 74px;">
  85. <label class="Validform_label">
  86. 工作名称:
  87. </label>
  88. </td>
  89. <td class="value">
  90. <input id="name" name="name" type="text" style="width: 157px; " class="inputxt" placeholder="工作名称">
  91. </td>
  92. <td align="right" style="width: 74px;">
  93. <label class="Validform_label">
  94. 工作描述:
  95. </label>
  96. </td>
  97. <td class="value">
  98. <input id="description" name="description" type="text" style="width: 157px; " class="inputxt" placeholder="工作描述">
  99. </td>
  100. <td align="right" style="width: 74px;">
  101. <label class="Validform_label">
  102. 计划完成时间
  103. </label>
  104. </td>
  105. <td class="value">
  106. <input id="planendtime_begin1" name="planendtime_begin1" type="text" style="width: 150px; " class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" >~
  107. <input id="planendtime_end2" name="planendtime_end2" type="text" style="width: 150px; " class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" >
  108. </td>
  109. </tr>
  110. </tbody>
  111. </table>
  112. </div>
  113. </div>
  114. </div>
  115. <div id="pinjiechaxun1">
  116. <div name="pinjiechaxun2" style="padding:3px; height: auto" class="datagrid-toolbar">
  117. <span style="float:right;margin-bottom:4px;">
  118. <span>
  119. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-search" id="contractListSearch" onclick="projecttaskListsearch()">查询</a>
  120. </span>
  121. <span>
  122. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-reload " id="contractListRedo" onclick="searchReset('projecttaskList')">重置</a>
  123. </span>
  124. </div>
  125. </div>
  126. <script src = "webpage/com/xcgl/projecttask/projecttaskList.js"></script>
  127. <script type="text/javascript">
  128. $(document).ready(function(){
  129. $(":input[name='planendtime_begin']").css("width","150px");
  130. $(":input[name='planendtime_begin']").css("margin","5px");
  131. $(":input[name='planendtime_end']").css("width","150px");
  132. $(":input[name='planendtime_end']").css("margin","5px");
  133. $(":input[name='taskstatus']").css("width","150px");
  134. $(":input[name='taskstatus']").css("margin","5px");
  135. $(":input[name='owner']").css("width","150px");
  136. $(":input[name='owner']").css("margin","5px");
  137. $(":input[name='code']").css("width","150px");
  138. $(":input[name='code']").css("margin","5px");
  139. $(":input[name='name']").css("width","150px");
  140. $(":input[name='name']").css("margin","5px");
  141. $(":input[name='description']").css("width","150px");
  142. $(":input[name='description']").css("margin","5px");
  143. $(":input[name='projectid']").css("width","150px");
  144. $(":input[name='projectid']").css("margin","5px");
  145. var datagrid = $("#projecttaskListtb");
  146. datagrid.prepend($("#pinjie1 div[name='pinjie2']").html());
  147. $("#pinjie1").html('');
  148. datagrid.children(".datagrid-toolbar").children("span:first").after($("#pinjiechaxun1 div[name='pinjiechaxun2']").html());
  149. $("#pinjiechaxun1").html('');
  150. });
  151. function detail(title,url, id){
  152. var rowsData = $('#'+id).datagrid('getSelections');
  153. // if (rowData.id == '') {
  154. // tip('请选择查看项目');
  155. // return;
  156. // }
  157. if (!rowsData || rowsData.length == 0) {
  158. tip('请选择查看项目');
  159. return;
  160. }
  161. if (rowsData.length > 1) {
  162. tip('请选择一条记录再查看');
  163. return;
  164. }
  165. url += '&load=detail&id='+rowsData[0].id;
  166. createdetailwindow(title,url,'800px','700px');
  167. }
  168. //导入
  169. function ImportXls() {
  170. openuploadwin('Excel导入', 'projecttaskController.do?upload', "projecttaskList");
  171. }
  172. //导出
  173. function ExportXls() {
  174. JeecgExcelExport("projecttaskController.do?exportXls","projecttaskList");
  175. }
  176. //模板下载
  177. function ExportXlsByT() {
  178. JeecgExcelExport("projecttaskController.do?exportXlsByT","projecttaskList");
  179. }
  180. //选择项目名称,列表================
  181. function openDepartmentSelect() {
  182. var orgIds = $("#projectid").val();
  183. $.dialog({
  184. content: 'url:publicpageController.do?departSelect&ids='+orgIds, zIndex: getzIndex(), title: '所属部门列表', lock: true, width: '700px', height: '500px', opacity: 0.4, button: [
  185. {name: '<t:mutiLang langKey="common.confirm"/>', callback: function (){
  186. var iframe = this.iframe.contentWindow;
  187. if(iframe.getReason().length>0){
  188. var strData=eval(iframe.getReason());
  189. for(var key in strData[0]){
  190. if(key=="strId"){
  191. $("#projectid").val(strData[0][key]);
  192. }else if(key=="strName"){
  193. $("#projectname").val(strData[0][key]);
  194. }
  195. }
  196. }
  197. }, focus: true},
  198. {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  199. ]}).zindex();
  200. }
  201. function callbackClean(){
  202. $('#projectname').val('');
  203. $('#projectid').val('');
  204. }
  205. //选择供应商
  206. function openUserSelect() {
  207. var partnerIds = $("#owner").val();
  208. $.dialog({
  209. content: 'url:publicpageController.do?userSelect&ids='+partnerIds, zIndex: getzIndex(), title: '人员列表', lock: true, width: '1000px', height: '600px', opacity: 0.4, button: [
  210. {name: '<t:mutiLang langKey="common.confirm"/>', callback: function (){
  211. var iframe = this.iframe.contentWindow;
  212. if(iframe.getReason().length>0){
  213. var strData=eval(iframe.getReason());
  214. for(var key in strData[0]){
  215. if(key=="strId"){
  216. $("#owner").val(strData[0][key]);
  217. }else if(key=="strName"){
  218. $("#ownername").val(strData[0][key]);
  219. }
  220. }
  221. }
  222. }, focus: true},
  223. {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  224. ]}).zindex();
  225. }
  226. function callbackCleanUser(){
  227. $('#ownername').val('');
  228. $('#owner').val('');
  229. }
  230. function onloaded(){
  231. var _grid = $('#projecttaskList');
  232. var tableTd = $('div.datagrid-body td[field="name"]');
  233. tableTd.each(function () {
  234. var $this = $(this);
  235. var index = $this.parent('tr').attr('datagrid-row-index');
  236. var rows = _grid.datagrid('getRows');
  237. var currentRow = rows[index];
  238. var content = '<div style="font-size:16px; max-width:700px;word-break: break-all; word-wrap: break-word;">' + currentRow.name + '</div>';
  239. $this.tips({ content: content, wrapColor: 'black' });
  240. });
  241. tableTd = $('div.datagrid-body td[field="description"]');
  242. tableTd.each(function () {
  243. var $this = $(this);
  244. var index = $this.parent('tr').attr('datagrid-row-index');
  245. var rows = _grid.datagrid('getRows');
  246. var currentRow = rows[index];
  247. var content = '<div style="font-size:16px; max-width:700px;word-break: break-all; word-wrap: break-word;">' + currentRow.description + '</div>';
  248. $this.tips({ content: content, wrapColor: 'black' });
  249. });
  250. }
  251. </script>