| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@include file="/context/mytags.jsp"%>
- <style>
- .ui_buttons{
- text-align: center !important;
- }
- </style>
- <t:base type="jquery,easyui,tools,DatePicker"></t:base>
- <script src = "plug-in/tools/jquery.tips.js"></script>
- <c:if test="${param.filter==1}">
- <c:set var="filterName">-急待处理</c:set>
- </c:if>
- <c:if test="${param.filter==2}">
- <c:set var="filterName">-逾期</c:set>
- </c:if>
- <div class="easyui-layout" fit="true">
- <div region="center" style="padding:0px;border:0px">
- <t:datagrid name="projecttaskList" fitColumns="true" sortName="createDate" sortOrder="desc" checkbox="false" title="我的任务${filterName}"
- actionUrl="projecttaskController.do?userTaskDatagrid&filter=${param.filter}" idField="id" queryMode="group" onLoadSuccess="onloaded">
- <t:dgCol title="主键" field="id" hidden="true" width="120"></t:dgCol>
- <t:dgCol title="标题" field="name" width="320"></t:dgCol>
- <t:dgCol title="详情" field="description" width="200"></t:dgCol>
- <t:dgCol title="流程名称" hidden="true" field="sourceid" dictionary="p_activiti_task,id,process_name" width="120"></t:dgCol>
- <t:dgCol title="任务发起人" field="createName" width="120"></t:dgCol>
- <t:dgCol title="开始时间" field="planstarttime" formatter="yyyy-MM-dd" align="center" width="80"></t:dgCol>
- <t:dgCol title="截止时间" field="planendtime" formatter="yyyy-MM-dd" align="center" width="80"></t:dgCol>
- <t:dgCol title="状态" field="taskstatus" width="120" dictionary="taskstatus"></t:dgCol>
- <t:dgCol title="类型" field="tasktype" hidden="true" width="120"></t:dgCol>
- <t:dgCol title="" field="executeType" hidden="true" width="120"></t:dgCol>
- <t:dgCol title="" field="form" hidden="true" width="120"></t:dgCol>
- <t:dgCol title="工作类型" field="sourcetype" hidden="true" width="120" dictionary="tasksourcetype"></t:dgCol>
- <t:dgCol title="" field="sourceid" hidden="true" width="120"></t:dgCol>
- <t:dgCol title="" field="tasktype" hidden="true" width="120"></t:dgCol>
- <t:dgToolBar title="查看" icon="icon-search" url="projecttaskController.do?goUpdate" funname="detail" height="500"></t:dgToolBar>
- <t:dgCol title="common.operation" field="opt"></t:dgCol>
- <t:dgFunOpt exp="taskstatus#eq#0,1" urlclass="ace_button" urlfont="fa-cog" funname="toDoTask(id,name,executeType,form)" title=" 办理" ></t:dgFunOpt>
- <t:dgFunOpt exp="sourcetype#eq#activititask" urlclass="ace_button" urlfont="fa-file-text-o"
- funname="viewActivitiTask(sourceid,sourcetype,tasktype)" title=" 签报内容" urlStyle="background-color:#5c7a29" ></t:dgFunOpt>
- <t:dgFunOpt exp="sourcetype#eq#activititask" urlclass="ace_button" urlfont="fa-commenting-o"
- funname="startus(sourceid,sourcetype,tasktype)" title=" 查看流程" urlStyle="background-color:#007947" ></t:dgFunOpt>
- </t:datagrid>
- </div>
- </div>
- <script type="text/javascript">
- $(document).ready(function(){
- });
- function onloaded(){
- var _grid = $('#projecttaskList');
- var tableTd = $('div.datagrid-body td[field="description"]');
- tableTd.each(function () {
- var $this = $(this);
- var index = $this.parent('tr').attr('datagrid-row-index');
- var rows = _grid.datagrid('getRows');
- var currentRow = rows[index];
- var content = '<div style="font-size:16px; max-width:350px;word-break: break-all; word-wrap: break-word;">' + currentRow.description + '</div>';
- $this.tips({ content: content, wrapColor: 'black' });
- });
- }
- function closeTask(id){
- }
- function detail(title,url, id){
- var rowsData = $('#'+id).datagrid('getSelections');
- // if (rowData.id == '') {
- // tip('请选择查看项目');
- // return;
- // }
- if (!rowsData || rowsData.length == 0) {
- tip('请选择查看项目');
- return;
- }
- if (rowsData.length > 1) {
- tip('请选择一条记录再查看');
- return;
- }
- url += '&load=detail&id='+rowsData[0].id;
- createdetailwindow(title,url,'800px','700px');
- }
- //导入
- function ImportXls() {
- openuploadwin('Excel导入', 'projecttaskController.do?upload', "projecttaskList");
- }
- //导出
- function ExportXls() {
- JeecgExcelExport("projecttaskController.do?exportXls","projecttaskList");
- }
- //模板下载
- function ExportXlsByT() {
- JeecgExcelExport("projecttaskController.do?exportXlsByT","projecttaskList");
- }
- function toDoTask(id,name,executeType,form){
- // var width = window.top.document.body.offsetWidth - 300;
- /* var windowHeight = window.top.document.body.offsetHeight-100; */
- var url = "projecttaskController.do?doExeTask&id="+id;
- var width = "850";
- var height = "500";
- $.ajax({
- async : false,
- cache : false,
- type : 'POST',
- url : url,// 请求的action路径
- error : function() {// 请求失败处理函数
- },
- success : function(data) {
- var d = data; // ------ $.parseJSON(data);
- if (d.success) {
- //form == ’‘,则说明此任务不是执行流中的任务
- if(form == '' || executeType=='offline'){
- var tasktype = d.obj.tasktype;
- if(tasktype == 'maintainbill')
- height = 660;
- var viewurl = "projecttaskController.do?goExeTaskView&id="+id;
- // createwindow('完成工作: ' + name,viewurl, width,height);
- $.dialog({
- content: 'url:'+viewurl,
- title : '完成工作: ' + name,
- lock : true,
- zIndex: getzIndex(),
- opacity : 0.3,
- width: width,
- height: height,
- ok:function(){
- iframe = this.iframe.contentWindow;
- saveObj();
- return false;
- }
- // ,okVal:'完成任务'
- ,cancel: function(){
- },
- button: [
- {
- name: '暂存',
- callback: function(){
- iframe = this.iframe.contentWindow;
- $('#formobj', iframe.document).form('submit', {
- url : 'taskResultController.do?doUpdate&finished=0',
- onSubmit : function() {
- //iframe.editor.sync();
- },
- success : function(r) {
- //iframe.api.opener.refresh();
- iframe.closeCurrentDialog();
- tip('暂存成功');
- reloadTable('projecttaskList');
- return false;
- }
- });
- // saveObj();
- return false;
- },
- class:"ui_state_highlight",
- focus: true
- }
- ]
- });
- }else{
- $.dialog({
- content: 'url:'+form,
- title : '完成工作: ' + name,
- lock : true,
- zIndex: getzIndex(),
- opacity : 0.3,
- width: width,
- height: height,
- ok:function(){
- var done =true;
- $.ajax(
- {
- url:'projecttaskController.do?checkResult'
- ,async:false
- ,type:'POST'
- ,dataType:'json'
- ,data:{
- id:id
- }
- ,success:function(d){
- done = d.done;
- if(done){
- $.post('projecttaskController.do?finishTask',{id:id},function(){
- reloadTable('projecttaskList');
- })
- }else {
- top.layer.alert(d.reason);
- }
- }
- ,error:function(d){
- }
- }
- )
- return done;
- }
- // ,okVal:'完成任务'
- ,cancel: function(){
- }
- });
- }
- } else {
- layer.alert(d.msg)
- }
- }
- });
- }
- //查看签报
- function viewActivitiTask(sourceid,sourcetype,tasktype) {
- /* var title='查看签报';
- var url = '${webBasePath}/tBusActivitiGreenController.do?goView&id='+sourceid;
- createdetailwindow(title, url,800,400);
- */
- $.ajax(
- {
- url : 'projecttaskController.do?findProcInstId'// 请求的action路径
- ,async:false
- ,type:'POST'
- ,dataType:'json'
- ,data:{
- sourceid:sourceid,
- tasktype:tasktype
- }
- ,success:function(d){
- if(d.success){
- goProcessHisTab(d.obj);
- }else {
- top.layer.alert(d.msg);
- }
- }
- ,error:function(d){
- }
- }
- );
- }
- //查看流程
- function startus(sourceid,sourcetype,tasktype ){
- $.ajax(
- {
- url : 'projecttaskController.do?findProcInstId'// 请求的action路径
- ,async:false
- ,type:'POST'
- ,dataType:'json'
- ,data:{
- sourceid:sourceid,
- tasktype:tasktype
- }
- ,success:function(d){
- if(d.success){
- processtracking(sourceid,d.obj);
- }else {
- top.layer.alert(d.msg);
- }
- }
- ,error:function(d){
- }
- }
- );
- }
- function none(){}
- </script>
|