first commit
This commit is contained in:
841
WebRoot/jsp/activiti/donetaskList.jsp
Normal file
841
WebRoot/jsp/activiti/donetaskList.jsp
Normal file
@ -0,0 +1,841 @@
|
||||
<%@page import="com.sipai.entity.activiti.ProcessType"%>
|
||||
<%@page import="com.sipai.entity.sparepart.SparePartCommString"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@page import="com.sipai.entity.business.BusinessUnit"%>
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceCommString"%>
|
||||
<%@page import="com.sipai.entity.process.ProcessAdjustment"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
|
||||
<%@ page import="com.sipai.entity.base.ServerObject"%>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
||||
|
||||
<%request.setAttribute("Status_Cancel_Problem",Maintenance.Status_Cancel_Problem);%>
|
||||
<%request.setAttribute("Status_Confirm_Maintainer",Maintenance.Status_Confirm_Maintainer);%>
|
||||
<%request.setAttribute("Status_Cancel_Maintainer",Maintenance.Status_Cancel_Maintainer);%>
|
||||
<%request.setAttribute("Status_CancelTOMaintainer",Maintenance.Status_CancelTOMaintainer);%>
|
||||
<%request.setAttribute("Status_Submit_Problem",Maintenance.Status_Submit_Problem);%>
|
||||
<%request.setAttribute("Status_Launch",Maintenance.Status_Launch);%>
|
||||
<%request.setAttribute("Status_Edit",Maintenance.Status_Edit);%>
|
||||
<%request.setAttribute("Status_Submit_Maintainer",Maintenance.Status_Submit_Maintainer);%>
|
||||
|
||||
<% request.setAttribute("UNIT_HANDLE", BusinessUnit.UNIT_HANDLE);%>
|
||||
<% request.setAttribute("UNIT_AUDIT", BusinessUnit.UNIT_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_TEAM_HANDLE", BusinessUnit.UNIT_TEAM_HANDLE);%>
|
||||
<% request.setAttribute("UNIT_OFFICE_HANDLE", BusinessUnit.UNIT_OFFICE_HANDLE);%>
|
||||
<% request.setAttribute("UNIT_OUTSOURCING_HANDLE", BusinessUnit.UNIT_OUTSOURCING_HANDLE);%>
|
||||
<% request.setAttribute("UNIT_RECEIVE_HANDLE", BusinessUnit.UNIT_RECEIVE_HANDLE);%>
|
||||
<% request.setAttribute("UNIT_BASE_AUDIT", BusinessUnit.UNIT_BASE_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_PRODUCT_AUDIT", BusinessUnit.UNIT_PRODUCT_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_CENTER_AUDIT", BusinessUnit.UNIT_CENTER_AUDIT);%>
|
||||
|
||||
<% request.setAttribute("UNIT_SUBSCRIBE_AUDIT", BusinessUnit.UNIT_SUBSCRIBE_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_DEPT_APPLY", BusinessUnit.UNIT_DEPT_APPLY);%>
|
||||
<% request.setAttribute("UNIT_INQUIRY", BusinessUnit.UNIT_INQUIRY);%>
|
||||
<% request.setAttribute("UNIT_CONTRACT_APPLY", BusinessUnit.UNIT_CONTRACT_APPLY);%>
|
||||
<% request.setAttribute("UNIT_CONTRACT_AUDIT", BusinessUnit.UNIT_CONTRACT_AUDIT);%>
|
||||
<% request.setAttribute("B_Purchase", ProcessType.B_Purchase.getId());%>
|
||||
<% request.setAttribute("B_Contract", ProcessType.B_Contract.getId());%>
|
||||
<% request.setAttribute("I_Stock", ProcessType.I_Stock.getId());%>
|
||||
<% request.setAttribute("UNIT_IN_STOCK_AUDIT", BusinessUnit.UNIT_IN_STOCK_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_IN_STOCK_HANDLE", BusinessUnit.UNIT_IN_STOCK_HANDLE);%>
|
||||
<% request.setAttribute("O_Stock", ProcessType.O_Stock.getId());%>
|
||||
<% request.setAttribute("Scetion_Stock", ProcessType.Scetion_Stock.getId());%>
|
||||
<% request.setAttribute("UNIT_OUT_STOCK_AUDIT", BusinessUnit.UNIT_OUT_STOCK_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_OUT_STOCK_HANDLE", BusinessUnit.UNIT_OUT_STOCK_HANDLE);%>
|
||||
|
||||
<% request.setAttribute("M_Plan", ProcessType.Maintain_Plan.getId());%>
|
||||
<% request.setAttribute("R_Plan", ProcessType.Repair_Plan.getId());%>
|
||||
<% request.setAttribute("UNIT_Maintain_AUDIT", BusinessUnit.UNIT_Maintain_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_Maintain_HANDLE", BusinessUnit.UNIT_Maintain_HANDLE);%>
|
||||
|
||||
<% request.setAttribute("UNIT_Repair_AUDIT", BusinessUnit.UNIT_Repair_AUDIT);%>
|
||||
|
||||
<% request.setAttribute("Stock_Check", ProcessType.Stock_Check.getId());%>
|
||||
<% request.setAttribute("UNIT_STOCK_CHECK_AUDIT", BusinessUnit.UNIT_STOCK_CHECK_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_STOCK_CHECK_HANDLE", BusinessUnit.UNIT_STOCK_CHECK_HANDLE);%>
|
||||
|
||||
<% request.setAttribute("Lose_Apply", ProcessType.Lose_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_LOSE_APPLY_AUDIT", BusinessUnit.UNIT_LOSE_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_LOSE_APPLY_ADJUST", BusinessUnit.UNIT_LOSE_APPLY_ADJUST);%>
|
||||
|
||||
<% request.setAttribute("Sale_Apply", ProcessType.Sale_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_SALE_APPLY_AUDIT", BusinessUnit.UNIT_SALE_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_SALE_APPLY_ADJUST", BusinessUnit.UNIT_SALE_APPLY_ADJUST);%>
|
||||
|
||||
<% request.setAttribute("Scrap_Apply", ProcessType.Scrap_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_SCRAP_APPLY_AUDIT", BusinessUnit.UNIT_SCRAP_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_SCRAP_APPLY_ADJUST", BusinessUnit.UNIT_SCRAP_APPLY_ADJUST);%>
|
||||
|
||||
<% request.setAttribute("Transfers_Apply", ProcessType.Transfers_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_TRANSFERS_APPLY_AUDIT", BusinessUnit.UNIT_TRANSFERS_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_TRANSFERS_APPLY_ADJUST", BusinessUnit.UNIT_TRANSFERS_APPLY_ADJUST);%>
|
||||
|
||||
<% request.setAttribute("Acceptance_Apply", ProcessType.Acceptance_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_ACCEPTANCE_APPLY_AUDIT", BusinessUnit.UNIT_ACCEPTANCE_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_ACCEPTANCE_APPLY_ADJUST", BusinessUnit.UNIT_ACCEPTANCE_APPLY_ADJUST);%>
|
||||
|
||||
<% request.setAttribute("EquipmentStop_Apply", ProcessType.EquipmentStop_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_EQUIPMENT_STOP_APPLY_AUDIT", BusinessUnit.UNIT_EQUIPMENT_STOP_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_EQUIPMENT_STOP_APPLY_ADJUST", BusinessUnit.UNIT_EQUIPMENT_STOP_APPLY_ADJUST);%>
|
||||
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_OVERHAUL",MaintenanceCommString.MAINTENANCE_TYPE_OVERHAUL); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_MAINTAIN",MaintenanceCommString.MAINTENANCE_TYPE_MAINTAIN); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_REPAIR",MaintenanceCommString.MAINTENANCE_TYPE_REPAIR); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_DEFECT",MaintenanceCommString.MAINTENANCE_TYPE_DEFECT); %>
|
||||
<% request.setAttribute("Type_Detail", ProcessType.B_Maintenance.getId());%>
|
||||
|
||||
<%--工艺调整--%>
|
||||
<% request.setAttribute("Process_Adjustment", ProcessType.Process_Adjustment.getId());%>
|
||||
<%request.setAttribute("UNIT_PROCESSADJUSTMENT_EDIT",BusinessUnit.UNIT_PROCESSADJUSTMENT_EDIT); %>
|
||||
<%request.setAttribute("UNIT_PROCESSADJUSTMENT_AUDIT",BusinessUnit.UNIT_PROCESSADJUSTMENT_AUDIT); %>
|
||||
<%request.setAttribute("UNIT_PROCESSADJUSTMENT_HANDLE",BusinessUnit.UNIT_PROCESSADJUSTMENT_HANDLE); %>
|
||||
<%request.setAttribute("UNIT_PROCESSADJUSTMENT_ANALYSIS",BusinessUnit.UNIT_PROCESSADJUSTMENT_ANALYSIS); %>
|
||||
<%request.setAttribute("UNIT_PROCESSADJUSTMENT_EVALUATE",BusinessUnit.UNIT_PROCESSADJUSTMENT_EVALUATE); %>
|
||||
<%request.setAttribute("UNIT_PROCESSADJUSTMENT_DISTRIBUTION",BusinessUnit.UNIT_PROCESSADJUSTMENT_DISTRIBUTION); %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style>
|
||||
.main-header{display:none;}
|
||||
.content-header{display:none;}
|
||||
.main-footer{display:none;}
|
||||
</style>
|
||||
<script src="<%=request.getContextPath()%>/JS/activiti/workflow.js" type="text/javascript"></script>
|
||||
<script src="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.js" type="text/javascript"></script>
|
||||
<%-- 引入CSS --%>
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.css" type="text/css">
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/CSS/style-activiti.css" type="text/css">
|
||||
<!--bootstrap-edittable 表格行内编辑 -->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-editable/css/bootstrap-editable.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-editable/js/bootstrap-editable.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-editable/js/bootstrap-table-editable.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/work/group/add.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/work/group/edit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewTaskTraceFun = function(pid,ppid,taskId) {
|
||||
graphTrace(pid,ppid,taskId);
|
||||
};
|
||||
var viewDetailFun = function(id,type) {
|
||||
stopBubbleDefaultEvent();
|
||||
if(type.indexOf('${B_Purchase}')!=-1){
|
||||
$.post(ext.contextPath + '/sparepart/subscribe/showSubscribeView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subscribeExcuteModal');
|
||||
});
|
||||
|
||||
}else if(type.indexOf('${B_Contract}')!=-1){
|
||||
$.post(ext.contextPath + '/sparepart/contract/showContractView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('contractExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Process_Adjustment}')!=-1){
|
||||
$.post(ext.contextPath + '/process/processAdjustment/showProcessAdjustmentView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('maintenanceDetailModal');
|
||||
});
|
||||
}else if(type.indexOf('${I_Stock}')!=-1){
|
||||
$.post(ext.contextPath + '/sparepart/inStockRecord/showProcessInStockView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('inStockExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${O_Stock}')!=-1){
|
||||
$.post(ext.contextPath + '/sparepart/outStockRecord/showProcessOutStockView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('outStockExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Stock_Check}')!=-1){
|
||||
$.post(ext.contextPath + '/sparepart/stockCheck/showProcessStockCheckView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('stockCheckExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${M_Plan}')!=-1){
|
||||
$.post(ext.contextPath + '/equipment/maintenancePlan/showProcessMaintainPlanView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('maintainPlanExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${R_Plan}')!=-1){
|
||||
$.post(ext.contextPath + '/equipment/equipmentRepairPlan/showProcessMaintainPlanView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('equipmentRepairPlanExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${EquipmentStop_Apply}')!=-1){//设备停用
|
||||
$.post(ext.contextPath + '/equipment/equipmentStopRecord/showProcessEquipmentStopApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('equipmentStopApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Lose_Apply}')!=-1){//丢失
|
||||
$.post(ext.contextPath + '/equipment/EquipmentLoseApply/showProcessLoseApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('loseApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Sale_Apply}')!=-1){//出售
|
||||
$.post(ext.contextPath + '/equipment/EquipmentSaleApply/showProcessSaleApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('saleApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Scrap_Apply}')!=-1){//报废
|
||||
$.post(ext.contextPath + '/equipment/EquipmentScrapApply/showProcessScrapApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('scrapApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Transfers_Apply}')!=-1){//调拨
|
||||
$.post(ext.contextPath + '/equipment/EquipmentTransfersApply/showProcessTransfersApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('transfersApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Acceptance_Apply}')!=-1){//验收
|
||||
$.post(ext.contextPath + '/equipment/equipmentAcceptanceApply/showProcessEquipmentAcceptanceApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('acceptanceApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Type_Detail}')!=-1){
|
||||
$.post(ext.contextPath + '/maintenance/showMaintenanceDetailView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('maintenanceDetailModal');
|
||||
});
|
||||
};
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function(willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/process/delete.do', {deploymentId : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
showAlert('d','请先选择记录','mainAlertdiv');
|
||||
}else{
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function(willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/work/group/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var claimFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/activiti/workflow/task/claim.do', {taskId : id}, function(data) {
|
||||
if(data==1){
|
||||
showAlert('s','签收成功','mainAlertdiv');
|
||||
$("#table").bootstrapTable('refresh')
|
||||
}else{
|
||||
showAlert('d','签收失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
};
|
||||
function goToLocation(url){
|
||||
$.post(ext.contextPath +"/user/getMenuRelation.do",{location:url},function(data){
|
||||
if(data.length>2){
|
||||
doforward(url,data[2].id,data[1].id,data[0].id)
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
var openModalPost= function(){
|
||||
|
||||
}
|
||||
var gotoTaskFun = function(type,status,processInstanceId,taskId,businessKey) {
|
||||
stopBubbleDefaultEvent();
|
||||
/* tabIndex为维护清单页面tab的index变量 */
|
||||
if(type=='${Type_Produce}'){
|
||||
//记录当前待办记录id,用于跳转页面后区别显示
|
||||
sessionStorage.setItem("businessKey", businessKey);
|
||||
switch (status) {
|
||||
case '${Status_Launch}':
|
||||
sessionStorage.setItem("tabIndex", '0');
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
case '${Status_Edit}':
|
||||
case '${Status_Cancel_Problem}':
|
||||
goToLocation('maintenance/showLaunchList.do');
|
||||
break;
|
||||
case '${Status_Cancel_Maintainer}':
|
||||
sessionStorage.setItem("tabIndex", '0')
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
case '${Status_Confirm_Maintainer}':
|
||||
sessionStorage.setItem("tabIndex", '3')
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
case '${Status_Submit_Problem}':
|
||||
sessionStorage.setItem("tabIndex", '2')
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
case '${Status_Submit_Maintainer}':
|
||||
sessionStorage.setItem("tabIndex", '1')
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
case '${Status_CancelTOMaintainer}':
|
||||
sessionStorage.setItem("tabIndex", '3')
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${B_Purchase}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_SUBSCRIBE_AUDIT}'://任务审核
|
||||
$.post(ext.contextPath + '/sparepart/subscribe/showSubscribeAudit.do', {processInstanceId:processInstanceId,taskId:taskId,subscribeId:businessKey,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_DEPT_APPLY}'://部门申请
|
||||
$.post(ext.contextPath + '/sparepart/subscribe/showDeptApply.do', {processInstanceId:processInstanceId,taskId:taskId,subscribeId:businessKey,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_INQUIRY}'://采购询价
|
||||
$.post(ext.contextPath + '/sparepart/subscribe/showSubscribeInquiry.do', {processInstanceId:processInstanceId,taskId:taskId,subscribeId:businessKey,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${B_Contract}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_CONTRACT_AUDIT}'://任务审核
|
||||
$.post(ext.contextPath + '/sparepart/contract/showContractAudit.do', {processInstanceId:processInstanceId,taskId:taskId,contractId:businessKey,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_CONTRACT_APPLY}'://合同申请
|
||||
$.post(ext.contextPath + '/sparepart/contract/showDeptApply.do', {processInstanceId:processInstanceId,taskId:taskId,contractId:businessKey,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${ProcessType_ProcessAdjustment}')>-1){
|
||||
switch (status) {
|
||||
case '${UNIT_PROCESSADJUSTMENT_AUDIT_ANALYSIS}'://调整分析
|
||||
$.post(ext.contextPath + '/work/processAdjustment/showAuditAnalysis.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_PROCESSADJUSTMENT_ADJUST}'://调整
|
||||
$.post(ext.contextPath + '/work/processAdjustment/showAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_PROCESSADJUSTMENT_AUDIT}'://审核
|
||||
$.post(ext.contextPath + '/work/processAdjustment/showAudit.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_PROCESSADJUSTMENT_HANDLE}'://执行
|
||||
$.post(ext.contextPath + '/work/processAdjustment/showHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${I_Stock}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_IN_STOCK_AUDIT}'://入库任务审核
|
||||
$.post(ext.contextPath + '/sparepart/inStockRecord/showAuditInStock.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_IN_STOCK_HANDLE}'://入库任务处理
|
||||
$.post(ext.contextPath + '/sparepart/inStockRecord/showInStockHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${O_Stock}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_OUT_STOCK_AUDIT}'://出库任务审核
|
||||
$.post(ext.contextPath + '/sparepart/outStockRecord/showAuditOutStock.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_OUT_STOCK_HANDLE}'://出库任务处理
|
||||
$.post(ext.contextPath + '/sparepart/outStockRecord/showOutStockHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Stock_Check}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_STOCK_CHECK_AUDIT}'://库存盘点审核
|
||||
$.post(ext.contextPath + '/sparepart/stockCheck/showAuditStockCheck.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_STOCK_CHECK_HANDLE}'://库存盘点处理
|
||||
$.post(ext.contextPath + '/sparepart/stockCheck/showStockCheckHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${EquipmentStop_Apply}')!=-1){
|
||||
switch (status) {
|
||||
|
||||
case '${UNIT_EQUIPMENT_STOP_APPLY_AUDIT}'://设备停用申请审核
|
||||
$.post(ext.contextPath + '/equipment/equipmentStopRecord/showAuditEquipmentStopApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_EQUIPMENT_STOP_APPLY_ADJUST}'://设备停用申请调整
|
||||
$.post(ext.contextPath + '/equipment/equipmentStopRecord/showEquipmentStopApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
|
||||
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Lose_Apply}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_LOSE_APPLY_AUDIT}'://设备丢失申请审核
|
||||
$.post(ext.contextPath + '/equipment/EquipmentLoseApply/showAuditLoseApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_LOSE_APPLY_ADJUST}'://设备丢失申请调整
|
||||
$.post(ext.contextPath + '/equipment/EquipmentLoseApply/showLoseApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Sale_Apply}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_SALE_APPLY_AUDIT}'://设备出售申请审核
|
||||
$.post(ext.contextPath + '/equipment/EquipmentSaleApply/showAuditSaleApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_SALE_APPLY_ADJUST}'://设备出售申请调整
|
||||
$.post(ext.contextPath + '/equipment/EquipmentSaleApply/showSaleApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Scrap_Apply}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_SCRAP_APPLY_AUDIT}'://设备报废申请审核
|
||||
$.post(ext.contextPath + '/equipment/EquipmentScrapApply/showAuditScrapApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_SCRAP_APPLY_ADJUST}'://设备报废申请调整
|
||||
$.post(ext.contextPath + '/equipment/EquipmentScrapApply/showScrapApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Transfers_Apply}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_TRANSFERS_APPLY_AUDIT}'://设备调拨申请审核
|
||||
$.post(ext.contextPath + '/equipment/EquipmentTransfersApply/showAuditTransfersApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_TRANSFERS_APPLY_ADJUST}'://设备调拨申请调整
|
||||
$.post(ext.contextPath + '/equipment/EquipmentTransfersApply/showTransfersApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Acceptance_Apply}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_ACCEPTANCE_APPLY_AUDIT}'://设备验收申请审核
|
||||
$.post(ext.contextPath + '/equipment/equipmentAcceptanceApply/showAuditEquipmentAcceptanceApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_ACCEPTANCE_APPLY_ADJUST}'://设备验收申请调整
|
||||
$.post(ext.contextPath + '/equipment/equipmentAcceptanceApply/showAcceptanceApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${M_Plan}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_Maintain_AUDIT}'://保养计划审核
|
||||
$.post(ext.contextPath + '/equipment/maintenancePlan/showAuditMaintainPlan.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_Maintain_HANDLE}'://保养计划编辑
|
||||
$.post(ext.contextPath + '/equipment/maintenancePlan/showMaintainPlanHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${R_Plan}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_Repair_AUDIT}'://保养计划审核
|
||||
$.post(ext.contextPath + '/equipment/equipmentRepairPlan/showAuditMaintainPlan.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_Repair_HANDLE}'://保养计划编辑
|
||||
$.post(ext.contextPath + '/equipment/equipmentRepairPlan/showMaintainPlanHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Type_Detail}')!=-1){
|
||||
var arr = new Array();
|
||||
arr = type.split("-")
|
||||
var maintenanceType = arr[2];//运维类型:保养,维修,检修
|
||||
switch (status) {
|
||||
case '${UNIT_HANDLE}':
|
||||
if(maintenanceType == '${MAINTENANCE_TYPE_MAINTAIN}'){//保养调整
|
||||
$.post(ext.contextPath + '/maintenance/showMaintainAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}else if(maintenanceType == '${MAINTENANCE_TYPE_REPAIR}'){//维修调整
|
||||
$.post(ext.contextPath + '/maintenance/showMaintainAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}else if(maintenanceType == '${MAINTENANCE_TYPE_DEFECT}'){//缺陷调整
|
||||
$.post(ext.contextPath + '/maintenance/showDefectAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
break;
|
||||
case '${UNIT_AUDIT}'://设备专责审核
|
||||
case '${UNIT_BASE_AUDIT}'://基层领导审核
|
||||
case '${UNIT_PRODUCT_AUDIT}'://生产运营中心审核
|
||||
case '${UNIT_CENTER_AUDIT}'://中层领导审核
|
||||
if(maintenanceType == '${MAINTENANCE_TYPE_MAINTAIN}'){//保养审核
|
||||
$.post(ext.contextPath + '/maintenance/showEquipmentMaintainAudit.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}else if(maintenanceType == '${MAINTENANCE_TYPE_REPAIR}'){//维修审核
|
||||
$.post(ext.contextPath + '/maintenance/showAuditDetail.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}else if(maintenanceType == '${MAINTENANCE_TYPE_DEFECT}'){//缺陷审核
|
||||
$.post(ext.contextPath + '/maintenance/showDefectAudit.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
break;
|
||||
case '${UNIT_TEAM_HANDLE}'://维修班处理
|
||||
case '${UNIT_OFFICE_HANDLE}'://设备办处理
|
||||
case '${UNIT_OUTSOURCING_HANDLE}'://外包处理
|
||||
$.post(ext.contextPath + '/maintenance/showHandleDetail.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_RECEIVE_HANDLE}'://验收
|
||||
$.post(ext.contextPath + '/maintenance/showReceiveOpinion.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
|
||||
}
|
||||
}else{
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
$(function() {
|
||||
var flag = IsApp();
|
||||
if (flag==true){
|
||||
|
||||
}else{
|
||||
$(".main-header").show();
|
||||
$(".content-header").show();
|
||||
$(".main-footer").show();
|
||||
}
|
||||
|
||||
//init();
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/activiti/workflow/doneworklist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'client', // 设置为服务器端分页
|
||||
/* queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name : $('#search_name').val()
|
||||
}
|
||||
},*/
|
||||
sortName: 'startTime', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow:function(row){
|
||||
//viewTaskTraceFun(row.historicProcessInstance.id,row.processDefinition.id,row.task.id);
|
||||
},
|
||||
columns: [{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '任务名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},{
|
||||
field: 'startTime', // 返回json数据中的name
|
||||
title: '任务下发时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},{
|
||||
field: 'endTime', // 返回json数据中的name
|
||||
title: '任务完成时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},{
|
||||
field: 'problem', // 返回json数据中的name
|
||||
title: '问题描述', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.business==null?'':row.business.problem;
|
||||
}
|
||||
},{
|
||||
field: 'taskName', // 返回json数据中的name
|
||||
title: '任务节点', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.task.name;
|
||||
}
|
||||
},{
|
||||
field: 'op',
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 80, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var str = '';
|
||||
str += '<button class="btn btn-default btn-sm" onclick="viewDetailFun(\''+row.historicProcessInstance.businessKey+'\',\''+row.type+'\')" data-toggle="tooltip" title="查看详情"><i class="fa fa-history"></i><span class="hidden-md hidden-lg"> 查看详情</span></button>'
|
||||
str='<div class="btn-group" >'+str+'</div>';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
//查看过待办,就清除之前的待办id
|
||||
sessionStorage.setItem("businessKey", "");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<!-- 流程图填充div -->
|
||||
<div id="traceDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="handleDetailDiv"></div>
|
||||
<div id="PRDetail4SelectsDiv"></div>
|
||||
<div id="stock4SelectsDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="emSubDiv"></div>
|
||||
<div id="outStock4SelectDiv"></div>
|
||||
<div id="selectCompanyDiv"></div>
|
||||
<div id="goodsAddDiv"></div>
|
||||
<div id="fault4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div>
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;"></div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
|
||||
<!-- switch-button-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js" charset="utf-8"></script>
|
||||
</html>
|
||||
78
WebRoot/jsp/activiti/importAutoActiviti.jsp
Normal file
78
WebRoot/jsp/activiti/importAutoActiviti.jsp
Normal file
@ -0,0 +1,78 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>导入人员</title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script>
|
||||
var uploader,state;
|
||||
$(function() {
|
||||
var $ = jQuery,
|
||||
$list = $('#thelist'),
|
||||
state = 'pending';
|
||||
|
||||
uploader = WebUploader.create({
|
||||
// swf文件路径
|
||||
swf: ext.contextPath+'/JS/webuploader-0.1.5/Uploader.swf',
|
||||
// 文件接收服务端。
|
||||
server: ext.contextPath+'/activiti/auto/saveImportActiviti.do',
|
||||
// 选择文件的按钮。可选。
|
||||
// 内部根据当前运行是创建,可能是input元素,也可能是flash.
|
||||
pick: {
|
||||
id: '#picker',
|
||||
multiple: false
|
||||
},
|
||||
// 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传!
|
||||
resize: false,
|
||||
accept: {
|
||||
title: 'Excel',
|
||||
extensions: 'xls,xlsx',
|
||||
mimeTypes: 'excel/*'
|
||||
}
|
||||
});
|
||||
//当有文件被添加进队列的时候
|
||||
uploader.on( 'fileQueued', function( file ) {
|
||||
$list.append( '<div id="' + file.id + '" class="item">' +
|
||||
'<h4 class="info">' + file.name + '</h4>' +
|
||||
'<p class="state">等待上传...</p>' +
|
||||
'</div>' );
|
||||
});
|
||||
});
|
||||
|
||||
var doimport = function(dialog, grid){
|
||||
//执行上传功能
|
||||
if ( state === 'uploading' ) {
|
||||
alert("文件正在上传中,请稍等");
|
||||
} else {
|
||||
uploader.upload();
|
||||
}
|
||||
|
||||
uploader.on( 'uploadError', function( file ) {
|
||||
$( '#'+file.id ).find('p.state').text('上传出错');
|
||||
});
|
||||
|
||||
uploader.on( 'uploadSuccess', function( file,response ) {
|
||||
$( '#'+file.id ).find('p.state').text('已上传');
|
||||
if(response=="1"){
|
||||
grid.datagrid('reload');
|
||||
alert("导入成功!");
|
||||
dialog.dialog('destroy');
|
||||
}else{
|
||||
alert("导入未完成!");
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="uploader" class="wu-example">
|
||||
<div class="btns">
|
||||
<div id="picker">选择文件</div>
|
||||
</div>
|
||||
<!--用来存放文件信息-->
|
||||
<div id="thelist" class="uploader-list"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
78
WebRoot/jsp/activiti/importExcel4Model.jsp
Normal file
78
WebRoot/jsp/activiti/importExcel4Model.jsp
Normal file
@ -0,0 +1,78 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>导入人员</title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script>
|
||||
var uploader,state;
|
||||
$(function() {
|
||||
var $ = jQuery,
|
||||
$list = $('#thelist'),
|
||||
state = 'pending';
|
||||
|
||||
uploader = WebUploader.create({
|
||||
// swf文件路径
|
||||
swf: ext.contextPath+'/JS/webuploader-0.1.5/Uploader.swf',
|
||||
// 文件接收服务端。
|
||||
server: ext.contextPath+'${param.dest}?param=${param.param}',
|
||||
// 选择文件的按钮。可选。
|
||||
// 内部根据当前运行是创建,可能是input元素,也可能是flash.
|
||||
pick: {
|
||||
id: '#picker',
|
||||
multiple: false
|
||||
},
|
||||
// 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传!
|
||||
resize: false,
|
||||
accept: {
|
||||
title: 'Excel',
|
||||
extensions: 'xls,xlsx',
|
||||
mimeTypes: 'excel/*'
|
||||
}
|
||||
});
|
||||
//当有文件被添加进队列的时候
|
||||
uploader.on( 'fileQueued', function( file ) {
|
||||
$list.append( '<div id="' + file.id + '" class="item">' +
|
||||
'<h4 class="info">' + file.name + '</h4>' +
|
||||
'<p class="state">等待上传...</p>' +
|
||||
'</div>' );
|
||||
});
|
||||
});
|
||||
|
||||
var doimport = function(dialog, grid){
|
||||
//执行上传功能
|
||||
if ( state === 'uploading' ) {
|
||||
alert("文件正在上传中,请稍等");
|
||||
} else {
|
||||
uploader.upload();
|
||||
}
|
||||
|
||||
uploader.on( 'uploadError', function( file ) {
|
||||
$( '#'+file.id ).find('p.state').text('上传出错');
|
||||
});
|
||||
|
||||
uploader.on( 'uploadSuccess', function( file,response ) {
|
||||
$( '#'+file.id ).find('p.state').text('已上传');
|
||||
if(response.res=="1"){
|
||||
grid.datagrid('reload');
|
||||
top.$.messager.alert('导入成功!', "以下工序:"+response.unmatch+",未查询到匹配工序,若需要,请手动编辑模型添加工序!");
|
||||
dialog.dialog('destroy');
|
||||
}else{
|
||||
alert("导入未完成!");
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="uploader" class="wu-example">
|
||||
<div class="btns">
|
||||
<div id="picker">选择文件</div>
|
||||
</div>
|
||||
<!--用来存放文件信息-->
|
||||
<div id="thelist" class="uploader-list"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
96
WebRoot/jsp/activiti/leaveAdd.jsp
Normal file
96
WebRoot/jsp/activiti/leaveAdd.jsp
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
var g = $('#leaveDefinition').combogrid('grid'); // get datagrid object
|
||||
var r = g.datagrid('getSelected'); // get the selected row
|
||||
if(r){
|
||||
$.post(ext.contextPath + "/activiti/leavew/start.do?processId="+r.id, $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}else{
|
||||
alert("请选择请假流程");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#leaveDefinition').combogrid({
|
||||
panelWidth: 400,
|
||||
idField: 'id',
|
||||
textField: 'id',
|
||||
url: ext.contextPath +'/activiti/workflow/getProcessListForSelect.do',
|
||||
columns: [[
|
||||
{field:'id',title:'流程ID',width:50},
|
||||
{field:'name',title:'名称',width:50},
|
||||
{field:'description',title:'描述',width:80},
|
||||
{field:'revision',title:'版本号',width:30}
|
||||
]],
|
||||
fitColumns: true
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td>请假流程:</td>
|
||||
<td>
|
||||
<select id="leaveDefinition" name="leaveDefinition" class="easyui-combogrid" >
|
||||
</select>
|
||||
<input name="processDefinitionId" type="hidden" value=""/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>请假类型:</td>
|
||||
<td>
|
||||
<select id="leaveType" name="leaveType" class="easyui-combobox" data-options="panelHeight:'auto'">
|
||||
<option>公休</option>
|
||||
<option>病假</option>
|
||||
<option>调休</option>
|
||||
<option>事假</option>
|
||||
<option>婚假</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>开始时间:</td>
|
||||
<td><input id="startTime" name="startTime" class="Wdate"
|
||||
value="" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
|
||||
readonly/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>结束时间:</td>
|
||||
<td><input id="endTime" name="endTime" class="Wdate"
|
||||
value="" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
|
||||
readonly/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>请假原因:</td>
|
||||
<td>
|
||||
<input id="reason" name="reason" class="easyui-textbox" style="width:100%;height:100px" value=""
|
||||
data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
140
WebRoot/jsp/activiti/leaveDetail.jsp
Normal file
140
WebRoot/jsp/activiti/leaveDetail.jsp
Normal file
@ -0,0 +1,140 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript" src="json2.js"></script>
|
||||
<script src="<%=contextPath%>/JS/activiti/leave-complete.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
|
||||
}
|
||||
function doreject(dialog,taskId) {
|
||||
// 设置流程变量
|
||||
$.messager.prompt('提示', '请填写驳回原因', function(r){
|
||||
if (r){
|
||||
complete(dialog,taskId, [{
|
||||
key: 'deptLeaderPass',
|
||||
value: false,
|
||||
type: 'B',
|
||||
comment:r
|
||||
}]);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function docomplete(dialog,taskId) {
|
||||
// 设置流程变量
|
||||
complete(dialog,taskId, [{
|
||||
key: 'deptLeaderPass',
|
||||
value: true,
|
||||
type: 'B'
|
||||
}]);
|
||||
}
|
||||
function docompleteToSub(dialog,taskId) {
|
||||
// 设置流程变量
|
||||
var list=["dept1","dept2"];
|
||||
var liststr="";
|
||||
$.each(list, function() {
|
||||
if (liststr != "") {
|
||||
liststr += "-";
|
||||
}
|
||||
liststr += this;
|
||||
});
|
||||
complete(dialog,taskId, [{
|
||||
key: 'deptLeaderPass',
|
||||
value: true,
|
||||
type: 'B'
|
||||
},{
|
||||
key: 'CodeList',
|
||||
value: liststr,
|
||||
type: 'A'
|
||||
}]);
|
||||
}
|
||||
function doreApply(dialog,taskId) {
|
||||
// 设置流程变量
|
||||
complete(dialog,taskId, [{
|
||||
key: 'reApply',
|
||||
value: true,
|
||||
type: 'B'
|
||||
}]);
|
||||
}
|
||||
function dounApply(dialog,taskId) {
|
||||
// 设置流程变量
|
||||
complete(dialog,taskId, [{
|
||||
key: 'reApply',
|
||||
value: false,
|
||||
type: 'B'
|
||||
}]);
|
||||
}
|
||||
function doPass(dialog,taskId) {
|
||||
// 设置流程变量
|
||||
complete(dialog,taskId, null);
|
||||
}
|
||||
function docompleteToCA(dialog,taskId,leaveid) {
|
||||
complete(dialog,taskId, [{
|
||||
key: 'deptLeaderPass',
|
||||
value: true,
|
||||
type: 'B'
|
||||
},{
|
||||
key: 'leaveId',
|
||||
value: leaveid,
|
||||
type: 'S'
|
||||
}]);
|
||||
}
|
||||
var advicestr="hrpass";//除了comment其它地方含中文会产生乱码
|
||||
function docompleteFinishCA(dialog,taskId,advice) {
|
||||
complete(dialog,taskId, [{
|
||||
key: 'advice',
|
||||
value: advicestr,
|
||||
type: 'S'
|
||||
}]);
|
||||
}
|
||||
$(function() {
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input name="id" type="hidden" value="${leave.id}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>请假类型</th>
|
||||
<td>
|
||||
${leave.leaveType}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>请假开始时间</th>
|
||||
<td>
|
||||
${leave.startTime}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>请假结束时间</th>
|
||||
<td>
|
||||
${leave.endTime}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>请假人员</th>
|
||||
<td>
|
||||
${leave.userId}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>请假原因</th>
|
||||
<td>
|
||||
${leave.reason}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
86
WebRoot/jsp/activiti/leaveDetailwithComment.jsp
Normal file
86
WebRoot/jsp/activiti/leaveDetailwithComment.jsp
Normal file
@ -0,0 +1,86 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript" src="json2.js"></script>
|
||||
<script src="<%=contextPath%>/JS/activiti/leave-complete.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
function doreApply(dialog,taskId) {
|
||||
// 设置流程变量
|
||||
complete(dialog,taskId, [{
|
||||
key: 'reApply',
|
||||
value: true,
|
||||
type: 'B'
|
||||
}],$(".form").serialize());
|
||||
}
|
||||
function dounApply(dialog,taskId) {
|
||||
// 设置流程变量
|
||||
complete(dialog,taskId, [{
|
||||
key: 'reApply',
|
||||
value: false,
|
||||
type: 'B'
|
||||
}]);
|
||||
}
|
||||
$(function() {
|
||||
$('#leaveType').combobox("setValue",'${leave.leaveType}');
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input name="id" type="hidden" value="${leave.id}"/>
|
||||
<div class="easyui-panel" title="审批信息" style="padding:10px;">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>领导意见</th>
|
||||
<td>
|
||||
${leave.comments[0].message}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="easyui-panel" title="请假信息" style="padding:10px;">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td>请假类型:</td>
|
||||
<td>
|
||||
<select id="leaveType" name="leaveType" class="easyui-combobox" data-options="panelHeight:'auto'">
|
||||
<option>公休</option>
|
||||
<option>病假</option>
|
||||
<option>调休</option>
|
||||
<option>事假</option>
|
||||
<option>婚假</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>开始时间:</td>
|
||||
<td><input id="startTime" name="startTime" class="Wdate"
|
||||
value="${leave.startTime}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
|
||||
readonly/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>结束时间:</td>
|
||||
<td><input id="endTime" name="endTime" class="Wdate"
|
||||
value="${leave.endTime}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
|
||||
readonly/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>请假原因:</td>
|
||||
<td>
|
||||
<input id="reason" name="reason" class="easyui-textbox" style="width:100%;height:100px" value="${leave.reason}"
|
||||
data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
119
WebRoot/jsp/activiti/leaveEdit.jsp
Normal file
119
WebRoot/jsp/activiti/leaveEdit.jsp
Normal file
@ -0,0 +1,119 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/work/group/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#deptid').combotree({
|
||||
url : ext.contextPath + '/user/getUnitsJson.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
method:'get',
|
||||
onBeforeSelect:function(node){
|
||||
if(node.id=="-1"){
|
||||
$("#deptid").tree("unselect");
|
||||
}
|
||||
},
|
||||
onLoadSuccess:function(){
|
||||
$('#deptid').combotree('setValue','${group.deptid}');
|
||||
}
|
||||
});
|
||||
|
||||
var leadernames="",leaderids="",membernames="",memberids="";
|
||||
<c:forEach var="obj" items="${group.groupmembers}">
|
||||
if("${obj.usertype}"=="leader"){
|
||||
leadernames+="${obj.username}"+",";
|
||||
leaderids+="${obj.userid}"+",";
|
||||
}
|
||||
if("${obj.usertype}"=="member"){
|
||||
membernames+="${obj.username}"+",";
|
||||
memberids+="${obj.userid}"+",";
|
||||
}
|
||||
</c:forEach>
|
||||
leadernames=leadernames.substring(0,leadernames.length-1);
|
||||
membernames=membernames.substring(0,membernames.length-1);
|
||||
$('#leadername').textbox({
|
||||
required:true,
|
||||
editable:false,
|
||||
value:leadernames
|
||||
});
|
||||
$('#leadername').textbox('textbox').bind("click",function(){
|
||||
selectUsers("leadername","leaderid","${param.iframeId}");
|
||||
});
|
||||
$('#leaderid').val(leaderids);
|
||||
|
||||
$('#membername').textbox({
|
||||
required:true,
|
||||
editable:false,
|
||||
value:membernames
|
||||
});
|
||||
$('#membername').textbox('textbox').bind("click",function(){
|
||||
selectUsers("membername","memberid","${param.iframeId}");
|
||||
});
|
||||
$('#memberid').val(memberids);
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input name="id" type="hidden" value="${group.id}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>班组名称</th>
|
||||
<td><input name="name" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${group.name}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>所属车间</th>
|
||||
<td><input id="deptid" name="deptid" class="easyui-combobox"
|
||||
data-options="required:true,validType:'isBlank'" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>组长</th>
|
||||
<td>
|
||||
<input id="leadername" name="leadername" class="easyui-textbox"/>
|
||||
<input id="leaderid" name="leaderid" type="hidden"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>组员</th>
|
||||
<td>
|
||||
<textarea id="membername" name="membername" class="easyui-textbox" data-options="multiline:true"
|
||||
style="height:100px;width:100%"></textarea>
|
||||
<input id="memberid" name="memberid" type="hidden"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
<textarea name="remark" class="easyui-textbox" data-options="multiline:true" style="height:100px;width:100%"
|
||||
validtype="length[0,250]" invalidMessage="有效长度0-250">${group.remark}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
223
WebRoot/jsp/activiti/leaveList.jsp
Normal file
223
WebRoot/jsp/activiti/leaveList.jsp
Normal file
@ -0,0 +1,223 @@
|
||||
<%@page import="org.apache.poi.ss.usermodel.Row"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script src="<%=contextPath%>/JS/activiti/workflow.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'iframeadd',
|
||||
title : '添加班组',
|
||||
url : ext.contextPath + '/activiti/leavew/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'iframeedit',
|
||||
title : '编辑班组',
|
||||
url : ext.contextPath + '/work/group/edit.do?iframeId=iframeedit&id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(pid,ppid) {
|
||||
/* var dialog = parent.ext.modalDialog({
|
||||
title : '查看用户信息',
|
||||
url : ext.contextPath + '/work/group/view.do?id=' + id
|
||||
}); */
|
||||
//alert(pid+","+ppid);
|
||||
graphTrace("",pid,ppid);
|
||||
};
|
||||
|
||||
var suspendFun = function(id,status) {
|
||||
var tip="";
|
||||
if(status=="active"){
|
||||
tip="激活";
|
||||
}else{
|
||||
tip="挂起";
|
||||
}
|
||||
parent.$.messager.confirm('提示', '您确定要'+tip+'此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/processinstance/update.do', {processInstanceId : id,state:status}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示',tip+'成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示',tip+'失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
//alert(datas);
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/work/group/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
parent.$.messager.alert('提示','成功删除'+data+'条记录','info',function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/activiti/leavew/getlist.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect:true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '请假类型', field : 'leaveType', sortable : true, halign:'center'},
|
||||
{width : '180', title : '申请时间', field : 'applyTime', sortable : true, halign:'center'},
|
||||
{width : '280', title : '申请原因', field : 'reason', sortable : false, halign:'center'},
|
||||
{width : '80', title : '用户名', field : 'userId', sortable : true, halign:'center'},
|
||||
{width : '150', title : '流程ID', field : 'processDefinitionId', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
return row.processDefinition.id;
|
||||
}},
|
||||
{width : '150', title : '是否挂起', field : 'suspended', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
var suspend=row.processInstance.suspended;
|
||||
if(suspend=='2'){
|
||||
return "已挂起";
|
||||
}else{
|
||||
return "未挂起";
|
||||
}
|
||||
}},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
|
||||
|
||||
<%if (sessionManager.havePermission(session,"activiti/leavew/showlist.do?scope=all")) {%>
|
||||
//alert(!row.task.assignee);
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.processInstanceId+'\',\''+row.processDefinition.id+'\');"/>';
|
||||
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"activiti/leavew/edit.do")) {%>
|
||||
if(row.processInstance.suspended=="2")
|
||||
str += '<img class="iconImg ext-icon-table_lightning" title="激活" onclick="suspendFun(\''+row.processInstanceId+'\',\'active\');"/>';
|
||||
else
|
||||
str += '<img class="iconImg ext-icon-table_link" title="挂起" onclick="suspendFun(\''+row.processInstanceId+'\',\'suspend\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
//var pi;
|
||||
var pager = grid.datagrid('getPager'); // get the pager of datagrid
|
||||
pager.pagination({
|
||||
beforePageText: '第', //页数文本框前显示的汉字
|
||||
afterPageText: '页 共 {pages} 页',
|
||||
displayMsg: '显示 {from}到{to},共 {total} 条记录',
|
||||
});
|
||||
|
||||
$('#search_pid').combotree({
|
||||
url : ext.contextPath + '/user/getUnitsJson.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
method:'get',
|
||||
width:200,
|
||||
onBeforeSelect:function(node){
|
||||
if(node.id=="-1"){
|
||||
$("#search_pid").tree("search_pid");
|
||||
}
|
||||
},
|
||||
editable:false
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"work/group/add.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addFun();">添加</a>
|
||||
</td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>班组名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" /></td>
|
||||
<td>所属车间</td>
|
||||
<td><input id="search_pid" name="search_pid" class="easyui-combotree"/></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||||
onclick="grid.datagrid('load',ext.serializeObject($('#searchForm')));">搜索</a>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
|
||||
onclick="$('#searchForm').form('clear');grid.datagrid('load',{});">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div data-options="region:'center',fit:true,border:false">
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
341
WebRoot/jsp/activiti/leavetaskList.jsp
Normal file
341
WebRoot/jsp/activiti/leavetaskList.jsp
Normal file
@ -0,0 +1,341 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<%-- <script src="<%=contextPath%>/JS/activiti/leave-todo.js" type="text/javascript"></script> --%>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'iframeadd',
|
||||
title : '添加班组',
|
||||
url : ext.contextPath + '/activiti/leavew/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var completeFun = function(leaveid,taskId,tdkey,name) {
|
||||
switch(tdkey)
|
||||
{
|
||||
case 'deptLeaderAudit':
|
||||
deptLeaderAuditFun(leaveid,taskId);
|
||||
break;
|
||||
case 'deptLeaderAuditToSub':
|
||||
deptLeaderAuditFunToSub(leaveid,taskId);
|
||||
break;
|
||||
case 'deptLeaderAuditToCA':
|
||||
deptLeaderAuditFunToCA(leaveid,taskId);
|
||||
break;
|
||||
case 'modifyApply':
|
||||
modifyApplyFun(leaveid,taskId,'deptLeaderAudit');
|
||||
break;
|
||||
case 'hrAudit':
|
||||
hrAuditFun(leaveid,taskId);
|
||||
break;
|
||||
case 'hrAuditCA':
|
||||
hrAuditCAFun(leaveid,taskId);
|
||||
break;
|
||||
default:
|
||||
alert("未查询到“"+tdkey+"”任务模块!");
|
||||
}
|
||||
|
||||
};
|
||||
var deptLeaderAuditFunToSub = function(leaveid,taskId) {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '任务办理',
|
||||
width : 500,
|
||||
height : 300,
|
||||
resizable:true,
|
||||
url : ext.contextPath + '/activiti/leavew/getleavedetail.do?id='+leaveid,
|
||||
buttons : [ {
|
||||
text : '通过',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.docompleteToSub(dialog, taskId);
|
||||
}
|
||||
},{
|
||||
text : '驳回',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doreject(dialog,taskId);
|
||||
}
|
||||
},{
|
||||
text : '取消',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
dialog.dialog({
|
||||
onDestroy:function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}
|
||||
});
|
||||
};
|
||||
var deptLeaderAuditFunToCA = function(leaveid,taskId) {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '任务办理',
|
||||
width : 500,
|
||||
height : 300,
|
||||
resizable:true,
|
||||
url : ext.contextPath + '/activiti/leavew/getleavedetail.do?id='+leaveid,
|
||||
buttons : [ {
|
||||
text : '通过',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.docompleteToCA(dialog, taskId,leaveid);
|
||||
}
|
||||
},{
|
||||
text : '驳回',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doreject(dialog,taskId);
|
||||
}
|
||||
},{
|
||||
text : '取消',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
dialog.dialog({
|
||||
onDestroy:function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}
|
||||
});
|
||||
};
|
||||
var deptLeaderAuditFun = function(leaveid,taskId) {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '任务办理',
|
||||
width : 500,
|
||||
height : 300,
|
||||
resizable:true,
|
||||
url : ext.contextPath + '/activiti/leavew/getleavedetail.do?id='+leaveid,
|
||||
buttons : [ {
|
||||
text : '通过',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.docomplete(dialog, taskId);
|
||||
}
|
||||
},{
|
||||
text : '驳回',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doreject(dialog,taskId);
|
||||
}
|
||||
},{
|
||||
text : '取消',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
dialog.dialog({
|
||||
onDestroy:function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}
|
||||
});
|
||||
};
|
||||
var modifyApplyFun = function(leaveid,taskId,taskKey) {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '任务办理',
|
||||
width : 500,
|
||||
height : 500,
|
||||
resizable:true,
|
||||
url : ext.contextPath + '/activiti/leavew/detail-with-vars.do?id='+leaveid+'&taskId='+taskId+'&taskKey='+taskKey,
|
||||
buttons : [ {
|
||||
text : '调整申请',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doreApply(dialog, taskId);
|
||||
}
|
||||
},{
|
||||
text : '取消申请',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dounApply(dialog,taskId);
|
||||
}
|
||||
},{
|
||||
text : '取消',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
dialog.dialog({
|
||||
onDestroy:function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}
|
||||
});
|
||||
};
|
||||
var hrAuditFun = function(leaveid,taskId) {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : 'HR审批',
|
||||
width : 500,
|
||||
height : 500,
|
||||
resizable:true,
|
||||
url : ext.contextPath + '/activiti/leavew/getleavedetail.do?id='+leaveid,
|
||||
buttons : [ {
|
||||
text : '通过',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doPass(dialog, taskId);
|
||||
}
|
||||
},{
|
||||
text : '取消',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
dialog.dialog({
|
||||
onDestroy:function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}
|
||||
});
|
||||
};
|
||||
var hrAuditCAFun = function(leaveid,taskId) {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : 'HR审批',
|
||||
width : 500,
|
||||
height : 500,
|
||||
resizable:true,
|
||||
url : ext.contextPath + '/activiti/leavew/getleavedetail.do?id='+leaveid,
|
||||
buttons : [ {
|
||||
text : '通过',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.docompleteFinishCA(dialog, taskId);
|
||||
}
|
||||
},{
|
||||
text : '取消',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
dialog.dialog({
|
||||
onDestroy:function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}
|
||||
});
|
||||
};
|
||||
var claimFun = function(id) {
|
||||
$.post(ext.contextPath + '/activiti/leavew/task/claim.do', {taskId : id}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','签收成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示','签收失败','info');
|
||||
}
|
||||
});
|
||||
};
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/activiti/leavew/gettasklist.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect:true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '请假类型', field : 'leaveType', sortable : true, halign:'center'},
|
||||
{width : '180', title : '申请时间', field : 'applyTime', sortable : true, halign:'center'},
|
||||
{width : '280', title : '申请原因', field : 'reason', sortable : false, halign:'center'},
|
||||
{width : '180', title : '任务下发时间', field : 'createTime', sortable : false, halign:'center', formatter : function(value, row) {
|
||||
return row.task.createTime;
|
||||
}},
|
||||
{width : '180', title : '任务节点', field : 'taskName', sortable : false, halign:'center', formatter : function(value, row) {
|
||||
return row.task.name;
|
||||
}},
|
||||
{width : '80', title : '用户名', field : 'userId', sortable : true, halign:'center'},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
<%if (sessionManager.havePermission(session,"activiti/leavew/edit.do")) {%>
|
||||
if(!row.task.assignee){
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="签收" onclick="claimFun(\''+row.task.id+'\');"/>';
|
||||
}else{
|
||||
str += '<img class="iconImg ext-icon-table_go" title="办理" onclick="completeFun(\''+row.id+'\',\''+row.task.id+'\',\''+row.task.taskDefinitionKey+'\',\''+row.task.name+'\');"/>';
|
||||
}
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
|
||||
$('#search_pid').combotree({
|
||||
url : ext.contextPath + '/user/getUnitsJson.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
method:'get',
|
||||
width:200,
|
||||
onBeforeSelect:function(node){
|
||||
if(node.id=="-1"){
|
||||
$("#search_pid").tree("search_pid");
|
||||
}
|
||||
},
|
||||
editable:false
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>班组名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" /></td>
|
||||
<td>所属车间</td>
|
||||
<td><input id="search_pid" name="search_pid" class="easyui-combotree"/></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||||
onclick="grid.datagrid('load',ext.serializeObject($('#searchForm')));">搜索</a>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
|
||||
onclick="$('#searchForm').form('clear');grid.datagrid('load',{});">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div data-options="region:'center',fit:true,border:false">
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
<!-- 部门领导审批 -->
|
||||
<div id="deptLeaderAudit" style="display: none">
|
||||
|
||||
<!-- table用来显示信息,方便办理任务 -->
|
||||
<%@include file="view-form.jsp" %>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
154
WebRoot/jsp/activiti/modelAdd.jsp
Normal file
154
WebRoot/jsp/activiti/modelAdd.jsp
Normal file
@ -0,0 +1,154 @@
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceCommString"%>
|
||||
<%@page import="com.sipai.entity.activiti.ProcessType"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_OVERHAUL",MaintenanceCommString.MAINTENANCE_TYPE_OVERHAUL); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_MAINTAIN",MaintenanceCommString.MAINTENANCE_TYPE_MAINTAIN); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_REPAIR",MaintenanceCommString.MAINTENANCE_TYPE_REPAIR); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_DEFECT",MaintenanceCommString.MAINTENANCE_TYPE_DEFECT); %>
|
||||
<%request.setAttribute("ProcessType_Business_Maintenance", ProcessType.B_Maintenance.getId()); %>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var editFlowFun = function(id) {
|
||||
var w = window.screen.width*0.7;
|
||||
var h = window.screen.height*0.7;
|
||||
var l = window.screen.width*(1-0.7)/2;
|
||||
window.open(ext.contextPath + '/modeler.html?modelId=' + id,'_black',
|
||||
"left="+ l
|
||||
+ ",top=50,scrollbars=yes,location=no,status=no,toolbar=no,resizable=yes"
|
||||
+ ",width="+w
|
||||
+ ",height="+h);
|
||||
};
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/activiti/workflow/model/create.do", $("#subForm").serialize(), function(data) {
|
||||
if (data != null ) {
|
||||
showAlert('s','保存成功');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}
|
||||
else{
|
||||
showAlert('d','保存失败');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '流程模板名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
processType: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '流程类型不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
$(function() {
|
||||
/* var type= $(this).val();
|
||||
var unitId='${extSystem.workshopid}'; */
|
||||
$.post(ext.contextPath + "/activiti/workflow/getProcessTypes4Combo.do", function(data) {
|
||||
var selelct =$("#processType").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct.on("change",function(e){
|
||||
$("#table1").bootstrapTable("refresh")
|
||||
var type= $(this).val();
|
||||
if('${ProcessType_Business_Maintenance}'==type){
|
||||
$("#group_maintenanceType").show();
|
||||
$("#maintenanceType").select2({minimumResultsForSearch: 10}).val("${maintenanceType}").trigger("change");
|
||||
}else{
|
||||
$("#group_maintenanceType").hide();
|
||||
}
|
||||
})
|
||||
$("#processType").select2({minimumResultsForSearch: 10}).val("${processType}").trigger("change");
|
||||
},'json');
|
||||
})
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog ">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增界面</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div id="alertDiv"></div>
|
||||
<input id ="id" name="id" type="hidden" value=""/>
|
||||
<input class="form-control" type="hidden" name ="companyid" value="${company.id }">
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">公司</label>
|
||||
<div class="col-sm-9">
|
||||
<p class="form-control-static" >${company.name}</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*流程模板名称</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name ="name" placeholder="名称" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*流程类型</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control select2 " id="processType" name ="processType" style="width: 220px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="group_maintenanceType">
|
||||
<label class="col-sm-3 control-label">运维类型</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control select2 " id="maintenanceType" name ="maintenanceType" style="width: 220px;" >
|
||||
<option value="${MAINTENANCE_TYPE_OVERHAUL}" >检修</option>
|
||||
<option value="${MAINTENANCE_TYPE_MAINTAIN}" >保养</option>
|
||||
<option value="${MAINTENANCE_TYPE_REPAIR}" >维修</option>
|
||||
<option value="${MAINTENANCE_TYPE_DEFECT}" >缺陷</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">描述</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea class="form-control" name="description" placeholder=""></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
377
WebRoot/jsp/activiti/modelEdit.jsp
Normal file
377
WebRoot/jsp/activiti/modelEdit.jsp
Normal file
@ -0,0 +1,377 @@
|
||||
<%@page import="com.sipai.entity.activiti.ProcessType"%>
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceCommString"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_OVERHAUL",MaintenanceCommString.MAINTENANCE_TYPE_OVERHAUL); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_MAINTAIN",MaintenanceCommString.MAINTENANCE_TYPE_MAINTAIN); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_REPAIR",MaintenanceCommString.MAINTENANCE_TYPE_REPAIR); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_DEFECT",MaintenanceCommString.MAINTENANCE_TYPE_DEFECT); %>
|
||||
<%request.setAttribute("ProcessType_Business_Maintenance", ProcessType.B_Maintenance.getId()); %>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var initTable = function(id) {
|
||||
$("#table1").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/activiti/workflow/model/modelNode.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
search_name: $('#search_name').val(),
|
||||
modelid:id
|
||||
}
|
||||
},
|
||||
sortName: 'resourceId', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
/* {
|
||||
field: 'properties', // 返回json数据中的name
|
||||
title: '业务/流程节点id', // 表格表头显示文字
|
||||
sortable : true,
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
return value.overrideid;
|
||||
}
|
||||
},{
|
||||
field: 'stencil', // 返回json数据中的name
|
||||
title: '节点类型', // 表格表头显示文字
|
||||
sortable : true,
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
return value.id;
|
||||
}
|
||||
}, {
|
||||
field: 'stencil', // 返回json数据中的name
|
||||
title: '节点类型', // 表格表头显示文字
|
||||
sortable : true,
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
return value.id;
|
||||
}
|
||||
}, */
|
||||
/* {
|
||||
field: 'resourceId', // 返回json数据中的name
|
||||
title: '流程节点ID', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
|
||||
}, */{
|
||||
field: 'properties', // 返回json数据中的name
|
||||
title: '流程节点名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
return value.name;
|
||||
}
|
||||
},{
|
||||
field: 'businessunit', // 返回json数据中的name
|
||||
title: '节点业务名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
if(value !=null){
|
||||
return value.name;
|
||||
}else{
|
||||
return '';
|
||||
}
|
||||
|
||||
}
|
||||
},{
|
||||
field: 'jobNames', // 返回json数据中的name
|
||||
title: '<span>节点职位<span/><span><i style="float: right;padding-top: 5px;" class="fa fa-question-circle" aria-hidden="true" title="未选职位默认为全部人员"></i><span/>', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
return value;
|
||||
}
|
||||
},{
|
||||
title: "操作",
|
||||
field: 'resourceId',
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var processTypeId=$('#processType').val();
|
||||
var companyid=$('#companyid').val();
|
||||
var jobIds = row.jobIds;
|
||||
var buts = '<button class="btn btn-default btn-sm" onclick="editNodeFun(\'' + id + '\',\'' + value + '\',\'' + processTypeId + '\',\'' + companyid + '\')" data-toggle="tooltip" title="编辑"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="editJobFun(\'' + id + '\',\'' + value + '\',\'' + companyid + '\',\'' + jobIds + '\')" data-toggle="tooltip" title="编辑职位"><i class="fa fa-users"></i><span class="hidden-md hidden-lg"> 编辑职位</span></button>';
|
||||
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
|
||||
/* return '<i class="fa fa-edit" onclick="editFun()(\'' + row.id + '\')></i>'; */
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table1");
|
||||
$("#table1").bootstrapTable("hideRow",1)
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
};
|
||||
|
||||
var editJobFun = function (modelid,resourceid,bizid,jobIds) {
|
||||
$.post(ext.contextPath + '/user/showJob4Selects.do', {modelid:modelid,resourceid:resourceid, bizid: bizid,jobIds:jobIds }, function (data) {
|
||||
$("#subDiv_Job").html(data);
|
||||
openModal('jobModal');
|
||||
});
|
||||
};
|
||||
|
||||
var modelid = $("#id").val();
|
||||
$(function() {
|
||||
initTable(modelid);
|
||||
});
|
||||
var editFlowFun = function(id) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/model/editFlow.do', {id:id} , function(data) {
|
||||
$("#subDiv1").html(data);
|
||||
openModal('modelEditModal');
|
||||
});
|
||||
/* var w = window.screen.width*0.7;
|
||||
var h = window.screen.height*0.7;
|
||||
var l = window.screen.width*(1-0.7)/2;
|
||||
window.open(ext.contextPath + '/modeler.html?modelId=' + id,'_black',
|
||||
"left="+ l
|
||||
+ ",top=50,scrollbars=yes,location=no,status=no,toolbar=no,resizable=yes"
|
||||
+ ",width="+w
|
||||
+ ",height="+h); */
|
||||
};
|
||||
|
||||
|
||||
/* 部署 */
|
||||
var deployFun = function(id) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/model/deploy.do',{modelId:id}, function(data) {
|
||||
|
||||
if(data.res=='1'){
|
||||
showAlert('s','部署成功');
|
||||
}else{
|
||||
showAlert('d',data.restr);
|
||||
}
|
||||
},'json');
|
||||
};
|
||||
function doupdate() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/activiti/workflow/model/update.do", $("#subForm").serialize(), function(data) {
|
||||
if (data != null ) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}
|
||||
else{
|
||||
showAlert('d','保存失败');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '流程模板名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
processType: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '流程类型不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
var companyid = "";
|
||||
$(function() {
|
||||
//简易公司combotree
|
||||
$.post(ext.contextPath + '/user/getUnitForTree.do', { ng: '' }, function (data) {
|
||||
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
|
||||
//当登陆者的pid以下没有子节点时显示单独一个span
|
||||
$("#search_pidinner").val(data[0].id);
|
||||
$("#companyselectinner").hide();
|
||||
$("#companyNameinner").text("公司: " + data[0].text);
|
||||
companyid = data[0].id;
|
||||
} else if ((data.length == 1 && data.nodes != "") || data.length > 1) {
|
||||
//第一次加载时赋值
|
||||
// $("#search_pidinner").val(data[0].id);
|
||||
// $("#cname_inputinner").val(data[0].text);
|
||||
// companyid = data[0].id;
|
||||
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
|
||||
$('#companytreeinner').treeview({
|
||||
data: data,
|
||||
showBorder: false,
|
||||
levels: 3,
|
||||
});
|
||||
$('#companytreeinner').on('nodeSelected', function (event, data) {
|
||||
$("#search_pidinner").val(data.id);
|
||||
$("#cname_inputinner").val(data.text);
|
||||
document.getElementById('ul_treeinner').style.display = "none";
|
||||
companyid= data.id;
|
||||
document.getElementById('companyid').value=data.id;
|
||||
});
|
||||
} else {
|
||||
//待完善
|
||||
};
|
||||
}, 'json');
|
||||
//防止点击树的+号收起下拉框
|
||||
$("#ul_treeinner").on("click", function (e) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
//点击空白隐藏树
|
||||
$(document).click(function (e) {
|
||||
var divTree = $('#ul_treeinner'); // 设置目标区域
|
||||
if (!divTree.is(e.target) && divTree.has(e.target).length === 0) {
|
||||
divTree.hide()
|
||||
}
|
||||
})
|
||||
/////
|
||||
$.post(ext.contextPath + "/activiti/workflow/getProcessTypes4Combo.do", function(data) {
|
||||
var selelct =$("#processType").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct.on("change",function(e){
|
||||
$("#table1").bootstrapTable("refresh")
|
||||
var type= $(this).val();
|
||||
if('${ProcessType_Business_Maintenance}'==type){
|
||||
$("#group_maintenanceType").show();
|
||||
$("#maintenanceType").select2({minimumResultsForSearch: 10}).val("${maintenanceType}").trigger("change");
|
||||
}else{
|
||||
$("#group_maintenanceType").hide();
|
||||
}
|
||||
})
|
||||
$("#processType").select2({minimumResultsForSearch: 10}).val("${processTypeId}").trigger("change");
|
||||
},'json');
|
||||
|
||||
|
||||
})
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog ">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑界面</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div id="alertDiv"></div>
|
||||
<input id ="id" name="id" type="hidden" value="${model.id}"/>
|
||||
<input class="form-control" type="hidden" id ="companyid" name ="companyid" value="${company.id }">
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">公司</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="form-group " style="margin-bottom:10px;">
|
||||
<input id="search_pidinner" name="search_pidinner" type="hidden" />
|
||||
<span id="companyNameinner" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold"></span>
|
||||
</div>
|
||||
<ul id="companyselectinner" style="list-style-type:none;padding-left:0px;width:300px;float: left;">
|
||||
<li class="dropdown" style="width:300px;">
|
||||
<!-- Menu toggle button -->
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"
|
||||
style="width:300px;" onclick="document.getElementById('ul_treeinner').style.display = 'block';">
|
||||
<div class="input-group">
|
||||
<input class="form-control " id="cname_inputinner" name="cname_inputinner"
|
||||
style="height:31px;width: 300px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;"
|
||||
readonly value="${company.name}"/>
|
||||
</div><!-- /input-group -->
|
||||
</a>
|
||||
<ul id="ul_treeinner" class="dropdown-menu" data-stopPropagation="true">
|
||||
<li class="header">
|
||||
<div id="companytreeinner" style="width: 275px;overflow:auto;"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<i style="float: left;padding-top: 10px;" class="fa fa-question-circle" aria-hidden="true" title="改变公司后先保存再进行其它操作"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*流程模板名称</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name ="name" value="${model.name}" >
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*流程类型</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control select2 " id="processType" name ="processType" style="width: 300px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="group_maintenanceType">
|
||||
<label class="col-sm-3 control-label">运维类型</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control select2 " id="maintenanceType" name ="maintenanceType" style="width: 300px;" >
|
||||
<option value="${MAINTENANCE_TYPE_OVERHAUL}" >检修</option>
|
||||
<option value="${MAINTENANCE_TYPE_MAINTAIN}" >保养</option>
|
||||
<option value="${MAINTENANCE_TYPE_REPAIR}" >维修</option>
|
||||
<option value="${MAINTENANCE_TYPE_DEFECT}" >缺陷</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">描述</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea class="form-control" name="description" value="${description}">${description}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审批流程</label>
|
||||
<div class="col-sm-9">
|
||||
<a class="btn btn-app hidden-xs" href="javascript:" onclick="editFlowFun('${model.id}')" data-toggle="tooltip">
|
||||
<i class="fa fa-edit"></i> 流程编辑
|
||||
</a>
|
||||
<a class="btn btn-app" href="javascript:" onclick="deployFun('${model.id}')">
|
||||
<i class="fa fa-play"></i> 流程部署
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table1"></table>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default " data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doupdate()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
30
WebRoot/jsp/activiti/modelFlowEdit.jsp
Normal file
30
WebRoot/jsp/activiti/modelFlowEdit.jsp
Normal file
@ -0,0 +1,30 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#subIframe1").attr("src",ext.contextPath + '/modeler.html?modelId=${param.id}' );
|
||||
})
|
||||
$("#modelEditModal").on("hidden.bs.modal", function() {
|
||||
$("#table1").bootstrapTable('refresh');
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade " id="modelEditModal">
|
||||
<div class="modal-dialog modal-full" style="width:99%;margin: 5px auto;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑模型</h4>
|
||||
</div>
|
||||
<div class="modal-body" style="padding:5px">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<iframe id="subIframe1" src="about:blank" mce_src="about:blank" style="width:100%;height:710px" frameborder='0' >
|
||||
</iframe>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-right" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
439
WebRoot/jsp/activiti/modelList.jsp
Normal file
439
WebRoot/jsp/activiti/modelList.jsp
Normal file
@ -0,0 +1,439 @@
|
||||
<%@page import="org.apache.poi.ss.usermodel.Row"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
|
||||
<%@ page import="com.sipai.entity.base.ServerObject"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- bootstrap switch -->
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css" />
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var companyId = "${param.unitId}";
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/activiti/workflow/model/addModel.do' ,{companyId:companyId}, function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
/* 导入 */
|
||||
var importFun = function() {
|
||||
$.post(ext.contextPath + '/activiti/workflow/model/saveImportModel.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
/* 同步 */
|
||||
var synchroFun = function() {
|
||||
$.post(ext.contextPath + '/activiti/workflow/model/savePLMProcess.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
/* 查看管控内容 */
|
||||
var viewFun = function(id) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/model/showProcessTechnicsList.do', {modelid:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/model/editModel.do', {modelid:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
//initTable(id);
|
||||
});
|
||||
};
|
||||
/* 编辑流程节点的业务 */
|
||||
var editNodeFun = function(id,resourceId,processTypeId,bizId) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/model/editNode.do', {modelid:id,resourceId:resourceId,processTypeId:processTypeId,bizId:bizId} , function(data) {
|
||||
$("#subDiv1").html(data);
|
||||
openModal('subModal1');
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/* $('#subModal').on('shown.bs.modal', function () {
|
||||
alert(); // 执行一些动作...
|
||||
}); */
|
||||
|
||||
/* var editFlowFun = function(id) {
|
||||
var w = window.screen.width*0.7;
|
||||
var h = window.screen.height*0.7;
|
||||
var l = window.screen.width*(1-0.7)/2;
|
||||
window.open(ext.contextPath + '/modeler.html?modelId=' + id,'_black',
|
||||
"left="+ l
|
||||
+ ",top=50,scrollbars=yes,location=no,status=no,toolbar=no,resizable=yes"
|
||||
+ ",width="+w
|
||||
+ ",height="+h);
|
||||
}; */
|
||||
var copyFun = function(id) {
|
||||
swal({
|
||||
text: "您确定要为该模型生成副本?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function(willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/model/copycreat.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
showAlert('s','生成成功');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','生成失败');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
/* 部署 */
|
||||
var deployFun = function(id) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/model/deploy.do',{modelId:id}, function(data) {
|
||||
if(data.res=='1'){
|
||||
//showAlert('s','部署成功');
|
||||
showAlert('s','部署成功');
|
||||
}else{
|
||||
showAlert('d',data.restr);
|
||||
//parent.$.messager.alert('提示','部署失败','info');
|
||||
}
|
||||
},'json');
|
||||
};
|
||||
|
||||
var deleteFun = function(id) {
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function(willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/model/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
showAlert('d','请先选择记录','mainAlertdiv');
|
||||
}else{
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function(willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/work/group/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var init = function() {
|
||||
$.post(ext.contextPath + '/work/group/getListForSelect.do', {} , function(data) {
|
||||
//console.info(data)
|
||||
if(data.length>0){
|
||||
for(var i=0;i<data.length;i++){
|
||||
console.info(data)
|
||||
$("#search_code").append("<option value='"+data[i].id+"'>"+data[i].text+"</option>");
|
||||
}
|
||||
/* $("#search_code").select2({
|
||||
placeholder: "请选择班组",
|
||||
language: "zh-CN",
|
||||
allowClear: true,
|
||||
data: data
|
||||
}); */
|
||||
}
|
||||
},'json');
|
||||
|
||||
};
|
||||
var dosearch = function() {
|
||||
var search_name = $('#search_name').val();
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
function showTable(){
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/activiti/workflow/model/getModelList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
search_name: $('#search_name').val(),
|
||||
search_code: companyId
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'id', // 返回json数据中的name
|
||||
title: '模板ID', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'name',
|
||||
title: '模板名称',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},/* {
|
||||
field: 'key',
|
||||
title: '模板key',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
}, */{
|
||||
field: 'createTime',
|
||||
title: '创建时间',
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
formatter : function(value, row)
|
||||
{
|
||||
//return FormatDate(value.time);
|
||||
return FormatDate(value.time);
|
||||
}
|
||||
},{
|
||||
field: 'version',
|
||||
title: '版本号',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 240, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var str = '';
|
||||
str += '<security:authorize buttonUrl="activiti/workflow/model/edit.do">';
|
||||
str += '<button class="btn btn-default btn-sm" onclick="editFun(\'' + row.id + '\')" data-toggle="tooltip" title="编辑"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
str += '<button class="btn btn-default btn-sm" onclick="copyFun(\'' + row.id + '\')" data-toggle="tooltip" title="复制"><i class="fa fa-copy"></i><span class="hidden-md hidden-lg"> 复制</span></button>';
|
||||
str += '<button class="btn btn-default btn-sm" onclick="deployFun(\'' + row.id + '\')" data-toggle="tooltip" title="部署"><i class="fa fa-play"></i><span class="hidden-md hidden-lg"> 部署</span></button>';
|
||||
str += '</security:authorize>';
|
||||
str += '<security:authorize buttonUrl="activiti/workflow/model/delete.do">';
|
||||
str += '<button class="btn btn-default btn-sm" onclick="deleteFun(\'' + row.id + '\')" data-toggle="tooltip" title="删除"><i class="fa fa-trash"></i><span class="hidden-md hidden-lg"> 删除</span></button>';
|
||||
str += '</security:authorize>';
|
||||
str ='<div class="btn-group">'+str+'</div>';
|
||||
return str;
|
||||
/* return '<i class="fa fa-edit" onclick="editFun()(\'' + row.id + '\')></i>'; */
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
})
|
||||
}
|
||||
function FormatDate (strTime) {
|
||||
var date = new Date(strTime);
|
||||
return date.Format("yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
|
||||
$(function() {
|
||||
|
||||
if(unitId!=null && unitId!=undefined && unitId!=''){
|
||||
companyId = unitId;
|
||||
}
|
||||
//简易公司combotree
|
||||
/* $.post(ext.contextPath + '/user/getUnitForTree.do', { ng: '' }, function (data) {
|
||||
//console.log("data",data[0]);
|
||||
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
|
||||
//当登陆者的pid以下没有子节点时显示单独一个span
|
||||
$("#search_pid").val(data[0].id);
|
||||
$("#companyselect").hide();
|
||||
$("#companyName").text("公司:" + data[0].text);
|
||||
} else if ((data.length == 1 && data.nodes != "") || data.length > 1) {
|
||||
//第一次加载时赋值
|
||||
$("#search_pid").val(data[0].id);
|
||||
$("#cname_input").val(data[0].text);
|
||||
showTable();
|
||||
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
|
||||
$('#companytree').treeview({
|
||||
data: data,
|
||||
showBorder: false,
|
||||
levels: 3,
|
||||
});
|
||||
$('#companytree').on('nodeSelected', function (event, data) {
|
||||
$("#search_pid").val(data.id);
|
||||
$("#cname_input").val(data.text);
|
||||
document.getElementById('ul_tree').style.display = "none";
|
||||
//$table.bootstrapTable('refresh');
|
||||
dosearch();
|
||||
});
|
||||
} else {
|
||||
//待完善
|
||||
};
|
||||
}, 'json');
|
||||
|
||||
//防止点击树的+号收起下拉框
|
||||
$("#ul_tree").on("click", function (e) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
//点击空白隐藏树
|
||||
$(document).click(function (e) {
|
||||
var divTree = $('#ul_tree'); // 设置目标区域
|
||||
if (!divTree.is(e.target) && divTree.has(e.target).length === 0) {
|
||||
divTree.hide()
|
||||
}
|
||||
})
|
||||
*/
|
||||
showTable();
|
||||
})
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<!-- <div id="mainAlertdiv"></div> -->
|
||||
<div id="subDiv"></div>
|
||||
<div id="subDiv1"></div>
|
||||
<div id="subDiv_Job"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="alertDiv"></div>
|
||||
<div id='unit4SelectDiv'></div>
|
||||
<div >
|
||||
<!-- <div class="form-group " style="margin-bottom:10px;">
|
||||
|
||||
<input id="search_pid" name="search_pid" type="hidden" />
|
||||
<span id="companyName" style="width:220px;border: none;background: transparent;"></span>
|
||||
</div>
|
||||
<ul id="companyselect" style="list-style-type:none;padding-left:0px;width:300px;">
|
||||
<li class="dropdown" style="width:300px;">
|
||||
Menu toggle button
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"
|
||||
style="width:300px;" onclick="document.getElementById('ul_tree').style.display = 'block';">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"
|
||||
style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold">公司:</span>
|
||||
<input class="form-control " id="cname_input" name="cname_input"
|
||||
style="height:31px;width: 220px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;"
|
||||
readonly />
|
||||
</div>/input-group
|
||||
</a>
|
||||
<ul id="ul_tree" class="dropdown-menu" data-stopPropagation="true">
|
||||
<li class="header">
|
||||
<div id="companytree" style="width: 275px;overflow:auto;"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul> -->
|
||||
<div class="form-group " style="padding:0;">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="activiti/workflow/model/add.do">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
<div class="form-group pull-right" >
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="模板名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
124
WebRoot/jsp/activiti/modelNodeEdit.jsp
Normal file
124
WebRoot/jsp/activiti/modelNodeEdit.jsp
Normal file
@ -0,0 +1,124 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosave() {
|
||||
$("#subForm1").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/activiti/workflow/model/saveNode.do", $("#subForm1").serialize(), function(data) {
|
||||
if (data != null ) {
|
||||
closeModal('subModal1')
|
||||
$("#table1").bootstrapTable('refresh');
|
||||
}
|
||||
else{
|
||||
showAlert('d','保存失败');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm1").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
businessid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '业务不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
/* $(function() {
|
||||
var select =$("#businessid").select2({
|
||||
ajax: {
|
||||
type:'POST',
|
||||
url: ext.contextPath +"/business/businessunit/geList4Select.do",
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: data
|
||||
}
|
||||
},
|
||||
cache: true
|
||||
},
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
select.val(['${businessid}']).trigger("change");
|
||||
}); */
|
||||
$(function() {
|
||||
$.post(ext.contextPath + "/business/businessunit/getList4Select.do",{processTypeId:'${param.processTypeId}'}, function(data) {
|
||||
var selelct =$("#businessid").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
|
||||
selelct.val('${businessid}').trigger("change");
|
||||
},'json');
|
||||
})
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal1">
|
||||
<div class="modal-dialog ">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑业务</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm1">
|
||||
<div id="alertDiv"></div>
|
||||
<input id ="id" name="id" type="hidden" value=""/>
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<input class="form-control" type="hidden" name ="companyid" value="${company.id }">
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">公司</label>
|
||||
<div class="col-sm-9">
|
||||
<p class="form-control-static" >${company.name}</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">流程节点名称</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name ="nodename" value="${nodename }" />
|
||||
<input type="hidden" class="form-control" name ="modelid" value="${modelid }" />
|
||||
<input type="hidden" class="form-control" name ="resourceId" value="${resourceId }" />
|
||||
<input type="hidden" class="form-control" name ="index" value="${index }" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">业务单元</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control select2 " id="businessid" name ="businessid" style="width: 220px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
932
WebRoot/jsp/activiti/oeProcessTaskList.jsp
Normal file
932
WebRoot/jsp/activiti/oeProcessTaskList.jsp
Normal file
@ -0,0 +1,932 @@
|
||||
<%@page import="com.sipai.entity.activiti.ProcessType"%>
|
||||
<%@page import="com.sipai.entity.sparepart.SparePartCommString"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@page import="com.sipai.entity.business.BusinessUnit"%>
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceCommString"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
|
||||
<%@ page import="com.sipai.entity.base.ServerObject"%>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
||||
<%request.setAttribute("Status_Cancel_Problem",Maintenance.Status_Cancel_Problem);%>
|
||||
<%request.setAttribute("Status_Confirm_Maintainer",Maintenance.Status_Confirm_Maintainer);%>
|
||||
<%request.setAttribute("Status_Cancel_Maintainer",Maintenance.Status_Cancel_Maintainer);%>
|
||||
<%request.setAttribute("Status_CancelTOMaintainer",Maintenance.Status_CancelTOMaintainer);%>
|
||||
<%request.setAttribute("Status_Submit_Problem",Maintenance.Status_Submit_Problem);%>
|
||||
<%request.setAttribute("Status_Launch",Maintenance.Status_Launch);%>
|
||||
<%request.setAttribute("Status_Edit",Maintenance.Status_Edit);%>
|
||||
<%request.setAttribute("Status_Submit_Maintainer",Maintenance.Status_Submit_Maintainer);%>
|
||||
|
||||
<% request.setAttribute("UNIT_HANDLE", BusinessUnit.UNIT_HANDLE);%>
|
||||
<% request.setAttribute("UNIT_AUDIT", BusinessUnit.UNIT_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_TEAM_HANDLE", BusinessUnit.UNIT_TEAM_HANDLE);%>
|
||||
<% request.setAttribute("UNIT_OFFICE_HANDLE", BusinessUnit.UNIT_OFFICE_HANDLE);%>
|
||||
<% request.setAttribute("UNIT_OUTSOURCING_HANDLE", BusinessUnit.UNIT_OUTSOURCING_HANDLE);%>
|
||||
<% request.setAttribute("UNIT_RECEIVE_HANDLE", BusinessUnit.UNIT_RECEIVE_HANDLE);%>
|
||||
<% request.setAttribute("UNIT_BASE_AUDIT", BusinessUnit.UNIT_BASE_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_PRODUCT_AUDIT", BusinessUnit.UNIT_PRODUCT_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_CENTER_AUDIT", BusinessUnit.UNIT_CENTER_AUDIT);%>
|
||||
|
||||
<% request.setAttribute("UNIT_SUBSCRIBE_AUDIT", BusinessUnit.UNIT_SUBSCRIBE_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_DEPT_APPLY", BusinessUnit.UNIT_DEPT_APPLY);%>
|
||||
<% request.setAttribute("UNIT_INQUIRY", BusinessUnit.UNIT_INQUIRY);%>
|
||||
<% request.setAttribute("UNIT_CONTRACT_APPLY", BusinessUnit.UNIT_CONTRACT_APPLY);%>
|
||||
<% request.setAttribute("UNIT_CONTRACT_AUDIT", BusinessUnit.UNIT_CONTRACT_AUDIT);%>
|
||||
<% request.setAttribute("B_Purchase", ProcessType.B_Purchase.getId());%>
|
||||
<% request.setAttribute("B_Contract", ProcessType.B_Contract.getId());%>
|
||||
<% request.setAttribute("I_Stock", ProcessType.I_Stock.getId());%>
|
||||
<% request.setAttribute("UNIT_IN_STOCK_AUDIT", BusinessUnit.UNIT_IN_STOCK_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_IN_STOCK_HANDLE", BusinessUnit.UNIT_IN_STOCK_HANDLE);%>
|
||||
<% request.setAttribute("O_Stock", ProcessType.O_Stock.getId());%>
|
||||
<% request.setAttribute("UNIT_OUT_STOCK_AUDIT", BusinessUnit.UNIT_OUT_STOCK_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_OUT_STOCK_HANDLE", BusinessUnit.UNIT_OUT_STOCK_HANDLE);%>
|
||||
|
||||
<% request.setAttribute("ProcessType_ProcessAdjustment", ProcessType.B_ProcessAdjustment.getId());%>
|
||||
<% request.setAttribute("UNIT_PROCESSADJUSTMENT_ADJUST", BusinessUnit.UNIT_PROCESSADJUSTMENT_ADJUST);%>
|
||||
<% request.setAttribute("UNIT_PROCESSADJUSTMENT_AUDIT", BusinessUnit.UNIT_PROCESSADJUSTMENT_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_PROCESSADJUSTMENT_AUDIT_ANALYSIS", BusinessUnit.UNIT_PROCESSADJUSTMENT_AUDIT_ANALYSIS);%>
|
||||
<% request.setAttribute("UNIT_PROCESSADJUSTMENT_HANDLE", BusinessUnit.UNIT_PROCESSADJUSTMENT_HANDLE);%>
|
||||
<% request.setAttribute("M_Plan", ProcessType.Maintain_Plan.getId());%>
|
||||
<% request.setAttribute("R_Plan", ProcessType.Repair_Plan.getId());%>
|
||||
<% request.setAttribute("UNIT_Maintain_AUDIT", BusinessUnit.UNIT_Maintain_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_Maintain_HANDLE", BusinessUnit.UNIT_Maintain_HANDLE);%>
|
||||
|
||||
<% request.setAttribute("UNIT_Repair_AUDIT", BusinessUnit.UNIT_Repair_AUDIT);%>
|
||||
|
||||
<% request.setAttribute("Stock_Check", ProcessType.Stock_Check.getId());%>
|
||||
<% request.setAttribute("UNIT_STOCK_CHECK_AUDIT", BusinessUnit.UNIT_STOCK_CHECK_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_STOCK_CHECK_HANDLE", BusinessUnit.UNIT_STOCK_CHECK_HANDLE);%>
|
||||
|
||||
<% request.setAttribute("Lose_Apply", ProcessType.Lose_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_LOSE_APPLY_AUDIT", BusinessUnit.UNIT_LOSE_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_LOSE_APPLY_ADJUST", BusinessUnit.UNIT_LOSE_APPLY_ADJUST);%>
|
||||
|
||||
<% request.setAttribute("Sale_Apply", ProcessType.Sale_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_SALE_APPLY_AUDIT", BusinessUnit.UNIT_SALE_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_SALE_APPLY_ADJUST", BusinessUnit.UNIT_SALE_APPLY_ADJUST);%>
|
||||
|
||||
<% request.setAttribute("Scrap_Apply", ProcessType.Scrap_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_SCRAP_APPLY_AUDIT", BusinessUnit.UNIT_SCRAP_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_SCRAP_APPLY_ADJUST", BusinessUnit.UNIT_SCRAP_APPLY_ADJUST);%>
|
||||
|
||||
<% request.setAttribute("Transfers_Apply", ProcessType.Transfers_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_TRANSFERS_APPLY_AUDIT", BusinessUnit.UNIT_TRANSFERS_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_TRANSFERS_APPLY_ADJUST", BusinessUnit.UNIT_TRANSFERS_APPLY_ADJUST);%>
|
||||
|
||||
<% request.setAttribute("Acceptance_Apply", ProcessType.Acceptance_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_ACCEPTANCE_APPLY_AUDIT", BusinessUnit.UNIT_ACCEPTANCE_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_ACCEPTANCE_APPLY_ADJUST", BusinessUnit.UNIT_ACCEPTANCE_APPLY_ADJUST);%>
|
||||
|
||||
<% request.setAttribute("EquipmentStop_Apply", ProcessType.EquipmentStop_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_EQUIPMENT_STOP_APPLY_AUDIT", BusinessUnit.UNIT_EQUIPMENT_STOP_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_EQUIPMENT_STOP_APPLY_ADJUST", BusinessUnit.UNIT_EQUIPMENT_STOP_APPLY_ADJUST);%>
|
||||
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_OVERHAUL",MaintenanceCommString.MAINTENANCE_TYPE_OVERHAUL); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_MAINTAIN",MaintenanceCommString.MAINTENANCE_TYPE_MAINTAIN); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_REPAIR",MaintenanceCommString.MAINTENANCE_TYPE_REPAIR); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_DEFECT",MaintenanceCommString.MAINTENANCE_TYPE_DEFECT); %>
|
||||
<% request.setAttribute("Type_Detail", ProcessType.B_Maintenance.getId());%>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style>
|
||||
.main-header{display:none;}
|
||||
.content-header{display:none;}
|
||||
.main-footer{display:none;}
|
||||
.content {
|
||||
padding-top: 0px;
|
||||
}
|
||||
</style>
|
||||
<script src="<%=request.getContextPath()%>/JS/activiti/workflow.js" type="text/javascript"></script>
|
||||
<script src="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.js" type="text/javascript"></script>
|
||||
<%-- 引入CSS --%>
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.css" type="text/css">
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/CSS/style-activiti.css" type="text/css">
|
||||
<!--bootstrap-edittable 表格行内编辑 -->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-editable/css/bootstrap-editable.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-editable/js/bootstrap-editable.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-editable/js/bootstrap-table-editable.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/work/group/add.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/work/group/edit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewTaskTraceFun = function(pid,ppid,taskId) {
|
||||
graphTrace(pid,ppid,taskId);
|
||||
};
|
||||
var viewDetailFun = function(id,type) {
|
||||
stopBubbleDefaultEvent();
|
||||
if(type.indexOf('${B_Purchase}')!=-1){
|
||||
//console.info(11)
|
||||
$.post(ext.contextPath + '/sparepart/subscribe/showSubscribeView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subscribeExcuteModal');
|
||||
});
|
||||
|
||||
}else if(type.indexOf('${B_Contract}')!=-1){
|
||||
$.post(ext.contextPath + '/sparepart/contract/showContractView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('contractExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${ProcessType_ProcessAdjustment}')!=-1){
|
||||
//console.info(22)
|
||||
$.post(ext.contextPath + '/work/processAdjustment/showProcessAdjustmentView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('maintenanceDetailModal');
|
||||
});
|
||||
}else if(type.indexOf('${I_Stock}')!=-1){
|
||||
$.post(ext.contextPath + '/sparepart/inStockRecord/showProcessInStockView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('inStockExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${O_Stock}')!=-1){
|
||||
$.post(ext.contextPath + '/sparepart/outStockRecord/showProcessOutStockView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('outStockExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Stock_Check}')!=-1){
|
||||
$.post(ext.contextPath + '/sparepart/stockCheck/showProcessStockCheckView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('stockCheckExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${M_Plan}')!=-1){
|
||||
$.post(ext.contextPath + '/equipment/maintenancePlan/showProcessMaintainPlanView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('maintainPlanExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${EquipmentStop_Apply}')!=-1){//设备停用
|
||||
$.post(ext.contextPath + '/equipment/equipmentStopRecord/showProcessEquipmentStopApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('equipmentStopApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Lose_Apply}')!=-1){//丢失
|
||||
$.post(ext.contextPath + '/equipment/EquipmentLoseApply/showProcessLoseApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('loseApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Sale_Apply}')!=-1){//出售
|
||||
$.post(ext.contextPath + '/equipment/EquipmentSaleApply/showProcessSaleApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('saleApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Scrap_Apply}')!=-1){//报废
|
||||
$.post(ext.contextPath + '/equipment/EquipmentScrapApply/showProcessScrapApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('scrapApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Transfers_Apply}')!=-1){//调拨
|
||||
$.post(ext.contextPath + '/equipment/EquipmentTransfersApply/showProcessTransfersApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('transfersApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Acceptance_Apply}')!=-1){//验收
|
||||
$.post(ext.contextPath + '/equipment/equipmentAcceptanceApply/showProcessEquipmentAcceptanceApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('acceptanceApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Type_Detail}')!=-1){
|
||||
//console.info(22)
|
||||
$.post(ext.contextPath + '/maintenance/showMaintenanceDetailView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('maintenanceDetailModal');
|
||||
});
|
||||
};
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function(willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/process/delete.do', {deploymentId : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
showAlert('d','请先选择记录','mainAlertdiv');
|
||||
}else{
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function(willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/work/group/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var claimFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/activiti/workflow/task/claim.do', {taskId : id}, function(data) {
|
||||
if(data==1){
|
||||
showAlert('s','签收成功','mainAlertdiv');
|
||||
$("#table").bootstrapTable('refresh')
|
||||
}else{
|
||||
showAlert('d','签收失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
};
|
||||
function goToLocation(url){
|
||||
$.post(ext.contextPath +"/user/getMenuRelation.do",{location:url},function(data){
|
||||
console.info(data)
|
||||
if(data.length>2){
|
||||
doforward(url,data[2].id,data[1].id,data[0].id)
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
var openModalPost= function(){
|
||||
|
||||
}
|
||||
var gotoTaskFun = function(type,status,processInstanceId,taskId,businessKey) {
|
||||
stopBubbleDefaultEvent();
|
||||
console.info(type)
|
||||
/* tabIndex为维护清单页面tab的index变量 */
|
||||
/* console.log('type',type);
|
||||
console.log('status',status); */
|
||||
if(type=='${Type_Produce}'){
|
||||
//记录当前待办记录id,用于跳转页面后区别显示
|
||||
sessionStorage.setItem("businessKey", businessKey);
|
||||
switch (status) {
|
||||
case '${Status_Launch}':
|
||||
sessionStorage.setItem("tabIndex", '0');
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
case '${Status_Edit}':
|
||||
case '${Status_Cancel_Problem}':
|
||||
goToLocation('maintenance/showLaunchList.do');
|
||||
break;
|
||||
case '${Status_Cancel_Maintainer}':
|
||||
sessionStorage.setItem("tabIndex", '0')
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
case '${Status_Confirm_Maintainer}':
|
||||
sessionStorage.setItem("tabIndex", '3')
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
case '${Status_Submit_Problem}':
|
||||
sessionStorage.setItem("tabIndex", '2')
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
case '${Status_Submit_Maintainer}':
|
||||
sessionStorage.setItem("tabIndex", '1')
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
case '${Status_CancelTOMaintainer}':
|
||||
sessionStorage.setItem("tabIndex", '3')
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${B_Purchase}')!=-1){
|
||||
console.info(status)
|
||||
switch (status) {
|
||||
case '${UNIT_SUBSCRIBE_AUDIT}'://任务审核
|
||||
$.post(ext.contextPath + '/sparepart/subscribe/showSubscribeAudit.do', {processInstanceId:processInstanceId,taskId:taskId,subscribeId:businessKey} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_DEPT_APPLY}'://部门申请
|
||||
$.post(ext.contextPath + '/sparepart/subscribe/showDeptApply.do', {processInstanceId:processInstanceId,taskId:taskId,subscribeId:businessKey} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_INQUIRY}'://采购询价
|
||||
$.post(ext.contextPath + '/sparepart/subscribe/showSubscribeInquiry.do', {processInstanceId:processInstanceId,taskId:taskId,subscribeId:businessKey} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${B_Contract}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_CONTRACT_AUDIT}'://任务审核
|
||||
$.post(ext.contextPath + '/sparepart/contract/showContractAudit.do', {processInstanceId:processInstanceId,taskId:taskId,contractId:businessKey} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_CONTRACT_APPLY}'://合同申请
|
||||
$.post(ext.contextPath + '/sparepart/contract/showDeptApply.do', {processInstanceId:processInstanceId,taskId:taskId,contractId:businessKey} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${ProcessType_ProcessAdjustment}')>-1){
|
||||
console.info(status)
|
||||
switch (status) {
|
||||
case '${UNIT_PROCESSADJUSTMENT_AUDIT_ANALYSIS}'://调整分析
|
||||
$.post(ext.contextPath + '/work/processAdjustment/showAuditAnalysis.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_PROCESSADJUSTMENT_ADJUST}'://调整
|
||||
$.post(ext.contextPath + '/work/processAdjustment/showAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_PROCESSADJUSTMENT_AUDIT}'://审核
|
||||
$.post(ext.contextPath + '/work/processAdjustment/showAudit.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_PROCESSADJUSTMENT_HANDLE}'://执行
|
||||
$.post(ext.contextPath + '/work/processAdjustment/showHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${I_Stock}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_IN_STOCK_AUDIT}'://入库任务审核
|
||||
$.post(ext.contextPath + '/sparepart/inStockRecord/showAuditInStock.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_IN_STOCK_HANDLE}'://入库任务处理
|
||||
$.post(ext.contextPath + '/sparepart/inStockRecord/showInStockHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${O_Stock}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_OUT_STOCK_AUDIT}'://出库任务审核
|
||||
$.post(ext.contextPath + '/sparepart/outStockRecord/showAuditOutStock.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_OUT_STOCK_HANDLE}'://出库任务处理
|
||||
$.post(ext.contextPath + '/sparepart/outStockRecord/showOutStockHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Stock_Check}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_STOCK_CHECK_AUDIT}'://库存盘点审核
|
||||
$.post(ext.contextPath + '/sparepart/stockCheck/showAuditStockCheck.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_STOCK_CHECK_HANDLE}'://库存盘点处理
|
||||
$.post(ext.contextPath + '/sparepart/stockCheck/showStockCheckHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${EquipmentStop_Apply}')!=-1){
|
||||
//console.log("status================================="+status);
|
||||
switch (status) {
|
||||
|
||||
case '${UNIT_EQUIPMENT_STOP_APPLY_AUDIT}'://设备停用申请审核
|
||||
$.post(ext.contextPath + '/equipment/equipmentStopRecord/showAuditEquipmentStopApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_EQUIPMENT_STOP_APPLY_ADJUST}'://设备停用申请调整
|
||||
$.post(ext.contextPath + '/equipment/equipmentStopRecord/showEquipmentStopApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
|
||||
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Lose_Apply}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_LOSE_APPLY_AUDIT}'://设备丢失申请审核
|
||||
$.post(ext.contextPath + '/equipment/EquipmentLoseApply/showAuditLoseApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_LOSE_APPLY_ADJUST}'://设备丢失申请调整
|
||||
$.post(ext.contextPath + '/equipment/EquipmentLoseApply/showLoseApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Sale_Apply}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_SALE_APPLY_AUDIT}'://设备出售申请审核
|
||||
$.post(ext.contextPath + '/equipment/EquipmentSaleApply/showAuditSaleApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_SALE_APPLY_ADJUST}'://设备出售申请调整
|
||||
$.post(ext.contextPath + '/equipment/EquipmentSaleApply/showSaleApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Scrap_Apply}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_SCRAP_APPLY_AUDIT}'://设备报废申请审核
|
||||
$.post(ext.contextPath + '/equipment/EquipmentScrapApply/showAuditScrapApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_SCRAP_APPLY_ADJUST}'://设备报废申请调整
|
||||
$.post(ext.contextPath + '/equipment/EquipmentScrapApply/showScrapApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Transfers_Apply}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_TRANSFERS_APPLY_AUDIT}'://设备调拨申请审核
|
||||
$.post(ext.contextPath + '/equipment/EquipmentTransfersApply/showAuditTransfersApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_TRANSFERS_APPLY_ADJUST}'://设备调拨申请调整
|
||||
$.post(ext.contextPath + '/equipment/EquipmentTransfersApply/showTransfersApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Acceptance_Apply}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_ACCEPTANCE_APPLY_AUDIT}'://设备验收申请审核
|
||||
$.post(ext.contextPath + '/equipment/equipmentAcceptanceApply/showAuditEquipmentAcceptanceApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_ACCEPTANCE_APPLY_ADJUST}'://设备验收申请调整
|
||||
$.post(ext.contextPath + '/equipment/equipmentAcceptanceApply/showAcceptanceApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${M_Plan}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_Maintain_AUDIT}'://保养计划审核
|
||||
$.post(ext.contextPath + '/equipment/maintenancePlan/showAuditMaintainPlan.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_Maintain_HANDLE}'://保养计划编辑
|
||||
$.post(ext.contextPath + '/equipment/maintenancePlan/showMaintainPlanHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Type_Detail}')!=-1){
|
||||
var arr = new Array();
|
||||
arr = type.split("-")
|
||||
var maintenanceType = arr[2];//运维类型:保养,维修,检修
|
||||
console.info(status)
|
||||
switch (status) {
|
||||
case '${UNIT_HANDLE}':
|
||||
if(maintenanceType == '${MAINTENANCE_TYPE_MAINTAIN}'){//保养调整
|
||||
$.post(ext.contextPath + '/maintenance/showMaintainAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}else if(maintenanceType == '${MAINTENANCE_TYPE_REPAIR}'){//维修调整
|
||||
$.post(ext.contextPath + '/maintenance/showMaintainAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}else if(maintenanceType == '${MAINTENANCE_TYPE_DEFECT}'){//缺陷调整
|
||||
$.post(ext.contextPath + '/maintenance/showDefectAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
break;
|
||||
case '${UNIT_AUDIT}'://设备专责审核
|
||||
case '${UNIT_BASE_AUDIT}'://基层领导审核
|
||||
case '${UNIT_PRODUCT_AUDIT}'://生产运营中心审核
|
||||
case '${UNIT_CENTER_AUDIT}'://中层领导审核
|
||||
if(maintenanceType == '${MAINTENANCE_TYPE_MAINTAIN}'){//保养审核
|
||||
$.post(ext.contextPath + '/maintenance/showEquipmentMaintainAudit.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}else if(maintenanceType == '${MAINTENANCE_TYPE_REPAIR}'){//维修审核
|
||||
$.post(ext.contextPath + '/maintenance/showAuditDetail.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}else if(maintenanceType == '${MAINTENANCE_TYPE_DEFECT}'){//缺陷审核
|
||||
$.post(ext.contextPath + '/maintenance/showDefectAudit.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
break;
|
||||
case '${UNIT_TEAM_HANDLE}'://维修班处理
|
||||
case '${UNIT_OFFICE_HANDLE}'://设备办处理
|
||||
case '${UNIT_OUTSOURCING_HANDLE}'://外包处理
|
||||
$.post(ext.contextPath + '/maintenance/showHandleDetail.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_RECEIVE_HANDLE}'://验收
|
||||
$.post(ext.contextPath + '/maintenance/showReceiveOpinion.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
|
||||
}
|
||||
}else{
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
/* window.operateEvents={
|
||||
'click td':function(e,value,row,index){
|
||||
viewTaskTraceFun(row.processInstance.id,row.processDefinition.id,row.task.id);
|
||||
}
|
||||
} */
|
||||
function loginFun(){
|
||||
var url=ext.contextPath+"/j_spring_security_check";
|
||||
var username = '${cu.name}';
|
||||
$.post(url , {namelogin:username}, function(result) {
|
||||
if (result.status==true) {
|
||||
//清除localStorage缓存
|
||||
localStorage.clear();
|
||||
} else {
|
||||
if(result!=null && result!=""){
|
||||
alert(result.res);
|
||||
}else{
|
||||
alert(result);
|
||||
}
|
||||
}
|
||||
location.replace(ext.contextPath);
|
||||
},'json');
|
||||
}
|
||||
$(function() {
|
||||
|
||||
var flag = IsApp();
|
||||
if (flag==true){
|
||||
|
||||
}else{
|
||||
$(".main-header").show();
|
||||
$(".content-header").show();
|
||||
$(".main-footer").show();
|
||||
}
|
||||
//init();
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/oeProcess/getTaskList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name : $('#search_name').val(),
|
||||
userId:'${userId}'
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow:function(row){
|
||||
viewTaskTraceFun(row.processInstance.id,row.processDefinition.id,row.task.id);
|
||||
},
|
||||
columns: [
|
||||
/* {
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '流程名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
//events: operateEvents
|
||||
}, */{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '任务名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
console.log(row)
|
||||
if(row.type.indexOf('${Type_Detail}')!=-1){
|
||||
var arr = new Array();
|
||||
arr = row.type.split("-")
|
||||
var maintenanceType = arr[2];//运维类型:保养,维修,检修
|
||||
switch(maintenanceType){
|
||||
case '${MAINTENANCE_TYPE_MAINTAIN}':
|
||||
return "保养任务";
|
||||
case '${MAINTENANCE_TYPE_REPAIR}':
|
||||
return "维修任务";
|
||||
case '${MAINTENANCE_TYPE_DEFECT}':
|
||||
return "缺陷任务";
|
||||
default:
|
||||
return "--";
|
||||
}
|
||||
}else{
|
||||
return row.name;
|
||||
}
|
||||
}
|
||||
},{
|
||||
field: 'createTime', // 返回json数据中的name
|
||||
title: '任务下发时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.task.createTime;
|
||||
}
|
||||
},{
|
||||
field: 'companyname', // 返回json数据中的name
|
||||
title: '问题厂区', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.business==null?'':row.business.company.name;
|
||||
}
|
||||
},{
|
||||
field: 'problem', // 返回json数据中的name
|
||||
title: '问题描述', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.business==null?'':row.business.problem;
|
||||
}
|
||||
},{
|
||||
field: 'taskName', // 返回json数据中的name
|
||||
title: '任务节点', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.task.name;
|
||||
}
|
||||
},{
|
||||
field: 'op',
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 80, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var str = '';
|
||||
if(!row.task.assignee){
|
||||
str += '<button class="btn btn-default btn-sm" onclick="claimFun(\''+row.task.id+'\')" data-toggle="tooltip" title="签收"><i class="fa fa-tag"></i><span class="hidden-md hidden-lg"> 签收</span></button>';
|
||||
}else{
|
||||
if(row.type.indexOf('${Type_Detail}')!=-1){
|
||||
str += '<button class="btn btn-default btn-sm" onclick="viewDetailFun(\''+row.processInstance.businessKey+'\',\''+row.type+'\')" data-toggle="tooltip" title="查看详情"><i class="fa fa-history"></i><span class="hidden-md hidden-lg"> 查看详情</span></button>'
|
||||
}
|
||||
if(row.business!=null){
|
||||
str += '<button class="btn btn-default btn-sm" onclick="gotoTaskFun(\''+row.type+'\',\''+row.business.status+'\',\''+row.processInstance.id+'\',\''+row.task.id+'\',\''+row.processInstance.businessKey+'\');" data-toggle="tooltip" title="处理"><i class="fa fa-play"></i><span class="hidden-md hidden-lg"> 处理</span></button>';
|
||||
}
|
||||
}
|
||||
str='<div class="btn-group" >'+str+'</div>';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
//查看过待办,就清除之前的待办id
|
||||
sessionStorage.setItem("businessKey", "");
|
||||
/* $('#table').on('click-cell.bs.table', function (e, field, value, row,element) { //$(element).css({"color":"blue","font-size":"16px;"});
|
||||
|
||||
console.info(e)
|
||||
console.info(field)
|
||||
console.info(value)
|
||||
console.info(element)
|
||||
|
||||
console.info("行点击")
|
||||
if(element.context.cellIndex!=5){
|
||||
viewTaskTraceFun(row.processInstance.id,row.processDefinition.id,row.task.id);
|
||||
}
|
||||
|
||||
}); */
|
||||
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id ="head_title"><a class="btn btn-primary btn-sm" onclick="loginFun()"><%= ServerObject.atttable.get("TOPTITLE")%> <i class="fa fa-hand-pointer-o"></i></a></h1>
|
||||
<!-- <ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<li class="active">Here</li>
|
||||
</ol> -->
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<!-- 流程图填充div -->
|
||||
<div id="traceDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="handleDetailDiv"></div>
|
||||
<div id="PRDetail4SelectsDiv"></div>
|
||||
<div id="stock4SelectsDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="emSubDiv"></div>
|
||||
<div id="outStock4SelectDiv"></div>
|
||||
<div id="selectCompanyDiv"></div>
|
||||
<div id="goodsAddDiv"></div>
|
||||
<div id="fault4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div >
|
||||
<div class="btn-group" style="width: 100%;">
|
||||
<!-- <button type="button" class="btn btn-default" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button> -->
|
||||
</div>
|
||||
<!-- <div class="form-group " style="padding:0;">
|
||||
<div class="form-group pull-right" >
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="问题描述">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> -->
|
||||
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
|
||||
<!-- switch-button-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js" charset="utf-8"></script>
|
||||
</html>
|
||||
51
WebRoot/jsp/activiti/processDefinitionTrace.jsp
Normal file
51
WebRoot/jsp/activiti/processDefinitionTrace.jsp
Normal file
@ -0,0 +1,51 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosave() {
|
||||
$("#traceForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#traceForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/work/group/save.do", $("#traceForm").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('traceModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("#traceForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '用户名不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="traceModal">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">流程模型</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="trace_body" style="overflow:auto;">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default " data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
103
WebRoot/jsp/activiti/processForSelect.jsp
Normal file
103
WebRoot/jsp/activiti/processForSelect.jsp
Normal file
@ -0,0 +1,103 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/activiti/workflow/getProcessDefinitionListForSelect.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
singleSelect:true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '流程名称', field : 'name', sortable : true, halign:'center',formatter:function(value, row){
|
||||
return row.processDefinition.name;
|
||||
}},
|
||||
{width : '180', title : '流程描述', field : 'description', sortable : true, halign:'center',formatter:function(value, row){
|
||||
return row.processDefinition.description;
|
||||
}},
|
||||
{width : '180', title : '流程ID', field : 'id', sortable : false, halign:'center',formatter:function(value, row){
|
||||
return row.processDefinition.id;
|
||||
}},
|
||||
{width : '180', title : '部署时间', field : 'deploymentTime', sortable : true, halign:'center',formatter:function(value, row){
|
||||
return row.deployment.deploymentTime;
|
||||
}},
|
||||
{width : '100', title : '版本号', field : 'revision', sortable : true, halign:'center',formatter:function(value, row){
|
||||
return row.processDefinition.revision;
|
||||
}}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
function selectOK() {
|
||||
//以json格式返回数据
|
||||
var jsonstr = "";
|
||||
var idstr = "";
|
||||
var idname = "";
|
||||
var rows = $('#grid').datagrid('getSelections');
|
||||
for(var i=0; i<rows.length; i++){
|
||||
idstr += rows[i].processDefinition.id+",";
|
||||
idname+= rows[i].processDefinition.name+",";
|
||||
}
|
||||
if(idstr.length>0){
|
||||
idstr = idstr.substring(0,idstr.length-1);
|
||||
idname = idname.substring(0,idname.length-1);
|
||||
}
|
||||
jsonstr = '{"id":"'+idstr+'","name":"'+idname+'"}';
|
||||
var dataset = $.parseJSON(jsonstr);
|
||||
return dataset;
|
||||
}
|
||||
function datagridload() {
|
||||
$('#searchForm').serialize() // alert(弹出提示框)
|
||||
grid.datagrid('load',ext.contextPath + '/activiti/workflow/getProcessDefinitionListForSelect.do?'+$('#searchForm').serialize());
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>流程名称</td>
|
||||
<td><input id="search_name" name="search_name" class="easyui-textbox" /></td>
|
||||
<td>流程ID</td>
|
||||
<td><input id="search_code" name="search_code" class="easyui-textbox" /></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||||
onclick="datagridload();">搜索</a>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
|
||||
onclick="$('#searchForm').form('clear');grid.datagrid('load',{});">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div data-options="region:'center',fit:true,border:false">
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
325
WebRoot/jsp/activiti/processInstanceList.jsp
Normal file
325
WebRoot/jsp/activiti/processInstanceList.jsp
Normal file
@ -0,0 +1,325 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
|
||||
<%@ page import="com.sipai.entity.base.ServerObject"%>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script src="<%=request.getContextPath()%>/JS/activiti/workflow.js" type="text/javascript"></script>
|
||||
<script src="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.js" type="text/javascript"></script>
|
||||
<%-- 引入CSS --%>
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.css" type="text/css">
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/CSS/style-activiti.css" type="text/css">
|
||||
<script type="text/javascript">
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/work/group/add.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/work/group/edit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewFun = function(ppid) {
|
||||
graphTrace("",ppid,"");
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function(willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/process/delProcessInstance.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
showAlert('d','请先选择记录','mainAlertdiv');
|
||||
}else{
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function(willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/work/group/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var init = function() {
|
||||
$.post(ext.contextPath + '/work/group/getListForSelect.do', {} , function(data) {
|
||||
//console.info(data)
|
||||
if(data.length>0){
|
||||
for(var i=0;i<data.length;i++){
|
||||
console.info(data)
|
||||
$("#search_code").append("<option value='"+data[i].id+"'>"+data[i].text+"</option>");
|
||||
}
|
||||
/* $("#search_code").select2({
|
||||
placeholder: "请选择班组",
|
||||
language: "zh-CN",
|
||||
allowClear: true,
|
||||
data: data
|
||||
}); */
|
||||
}
|
||||
},'json');
|
||||
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
$(function() {
|
||||
var select =$("#search_code").select2({
|
||||
ajax: {
|
||||
type:'POST',
|
||||
url: ext.contextPath +"/user/getUnitsByUserId4Select.do",
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: data
|
||||
}
|
||||
},
|
||||
cache: true
|
||||
},
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
|
||||
select.on("change",function(e){
|
||||
companyid=$(this).val();
|
||||
$("#table").bootstrapTable('refresh');
|
||||
});
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/activiti/workflow/getAllProcessInstaces.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
search_code: $('#search_code').val()
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '流程名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
|
||||
},{
|
||||
field: 'createTime', // 返回json数据中的name
|
||||
title: '最新任务处理时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.task==null?"":row.task.createTime;
|
||||
}
|
||||
},{
|
||||
field: 'taskName', // 返回json数据中的name
|
||||
title: '最新任务节点', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.task==null?"":row.task.name;
|
||||
}
|
||||
},{
|
||||
field: 'processDefinitionId', // 返回json数据中的name
|
||||
title: '流程定义Id', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.processDefinition.id;
|
||||
}
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var str = '';
|
||||
/* str += '<button class="btn btn-default btn-sm" onclick="viewFun(\''+row.processDefinition.id+'\')"><i class="fa fa-eye"></i></button>' */
|
||||
str +='<security:authorize buttonUrl="activiti/workflow/delete.do">';
|
||||
str += '<button class="btn btn-default btn-sm" onclick="deleteFun(\''+row.processInstance.id+'\')"><i class="fa fa-trash-o"></i></button>'
|
||||
str +='</security:authorize>';
|
||||
str='<div class="btn-group" >'+str+'</div>';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$.post(ext.contextPath + "/user/getUnitsByUserId4Select.do", {}, function(data) {
|
||||
|
||||
/* var selelct =$("#search_code").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
}); */
|
||||
|
||||
if(data.length==1){
|
||||
//选择厂区为一个厂时隐藏选择框
|
||||
//selelct.val(data[0].id).trigger("change");
|
||||
//selelct.attr("disabled","disabled");
|
||||
$("#search_code").next().css("display", "none");
|
||||
$("#company").text(data[0].text);
|
||||
$("#companylabel").html("公司:");
|
||||
}else{
|
||||
//selelct.val("").trigger("change");
|
||||
// $("#companyname").attr("disabled","disabled");
|
||||
$("#company").css("display", "none");
|
||||
}
|
||||
},'json');
|
||||
})
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id ="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<!-- 流程图填充div -->
|
||||
<div id="traceDiv"></div>
|
||||
<div >
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<!-- <button type="button" class="btn btn-default" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button> -->
|
||||
</div>
|
||||
|
||||
<div class="form-group " style="padding:0;">
|
||||
<label class="form-label" id="companylabel">公司</label>
|
||||
<select class="form-control select2 " id="search_code" name ="search_code" style="width: 220px;"></select>
|
||||
<span class="select2-selection select2-selection--single" id="company" style="width:220px;border: none;background: transparent;" ></span>
|
||||
<div class="form-group pull-right" >
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
301
WebRoot/jsp/activiti/processList.jsp
Normal file
301
WebRoot/jsp/activiti/processList.jsp
Normal file
@ -0,0 +1,301 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
|
||||
<%@ page import="com.sipai.entity.base.ServerObject"%>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script src="<%=request.getContextPath()%>/JS/activiti/workflow.js" type="text/javascript"></script>
|
||||
<script src="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.js" type="text/javascript"></script>
|
||||
<%-- 引入CSS --%>
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.css" type="text/css">
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/CSS/style-activiti.css" type="text/css">
|
||||
<script type="text/javascript">
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/work/group/add.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/work/group/edit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewFun = function(ppid) {
|
||||
graphTrace("",ppid,"");
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function(willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/process/delete.do', {deploymentId : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
showAlert('d','请先选择记录','mainAlertdiv');
|
||||
}else{
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function(willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/work/group/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var companyId = "";
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
var initFun = function () {
|
||||
//refreshSelect();
|
||||
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/activiti/workflow/getProcessList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
search_pid: companyId
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
viewFun(row.processDefinition.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '工艺名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.processDefinition.name;
|
||||
}
|
||||
},/* {
|
||||
field: 'description', // 返回json数据中的name
|
||||
title: '工艺描述', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.processDefinition.description;
|
||||
}
|
||||
}, *//* {
|
||||
field: 'id', // 返回json数据中的name
|
||||
title: '工艺ID', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.processDefinition.id;
|
||||
}
|
||||
}, */{
|
||||
field: 'deploymentTime', // 返回json数据中的name
|
||||
title: '部署时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.deployment.deploymentTime;
|
||||
}
|
||||
},{
|
||||
field: 'revision', // 返回json数据中的name
|
||||
title: '版本号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.processDefinition.revision;
|
||||
}
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var str = '';
|
||||
/* str += '<button class="btn btn-default btn-sm" onclick="viewFun(\''+row.processDefinition.id+'\')"><i class="fa fa-eye"></i></button>' */
|
||||
str +='<security:authorize buttonUrl="activiti/workflow/delete.do">';
|
||||
str += '<button class="btn btn-default btn-sm" onclick="deleteFun(\''+row.processDefinition.deploymentId+'\')"><i class="fa fa-trash-o"></i></button>'
|
||||
str +='</security:authorize>';
|
||||
str='<div class="btn-group" >'+str+'</div>';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
$(function() {
|
||||
initFun();
|
||||
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$(".select2-selection--single").css({ 'height': '30px', 'paddingTop': '4px' })
|
||||
$.post(ext.contextPath + "/user/showCompanySelectTree.do", {}, function (data) {
|
||||
$('#companySelectTree').html(data);
|
||||
|
||||
});
|
||||
initFun();
|
||||
/* $.post(ext.contextPath + "/user/getUnitsByUserId4Select.do", {}, function(data) {
|
||||
|
||||
|
||||
|
||||
if(data.length==1){
|
||||
//选择厂区为一个厂时隐藏选择框
|
||||
//selelct.val(data[0].id).trigger("change");
|
||||
//selelct.attr("disabled","disabled");
|
||||
$("#search_code").next().css("display", "none");
|
||||
$("#company").text(data[0].text);
|
||||
$("#companylabel").html("公司:");
|
||||
}else{
|
||||
//selelct.val("").trigger("change");
|
||||
// $("#companyname").attr("disabled","disabled");
|
||||
$("#company").css("display", "none");
|
||||
}
|
||||
},'json'); */
|
||||
})
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id ="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<!-- 流程图填充div -->
|
||||
<div id="traceDiv"></div>
|
||||
<div >
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<!-- <button type="button" class="btn btn-default" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button> -->
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group " style="padding:0;">
|
||||
<label class="form-label" id="companylabel">公司</label>
|
||||
<select class="form-control select2 " id="search_code" name ="search_code" style="width: 220px;"></select>
|
||||
<span class="select2-selection select2-selection--single" id="company" style="width:220px;border: none;background: transparent;" ></span>
|
||||
<div class="form-group pull-right" >
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div id="companySelectTree">
|
||||
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
259
WebRoot/jsp/activiti/processList1.jsp
Normal file
259
WebRoot/jsp/activiti/processList1.jsp
Normal file
@ -0,0 +1,259 @@
|
||||
<%@page import="org.apache.poi.ss.usermodel.Row"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script src="<%=contextPath%>/JS/activiti/workflow.js" type="text/javascript"></script>
|
||||
<script src="<%=contextPath%>/JS/qtip/jquery.qtip.min.js" type="text/javascript"></script>
|
||||
<%-- 引入CSS --%>
|
||||
<link rel="stylesheet" href="<%=contextPath%>/JS/qtip/jquery.qtip.min.css" type="text/css">
|
||||
<link rel="stylesheet" href="<%=contextPath%>/CSS/style-activiti.css" type="text/css">
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/activiti/auto/autoCreat.do', {} , function(data) {
|
||||
if(data>0){
|
||||
parent.$.messager.alert('提示','自动导入成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示','自动导入失败','info');
|
||||
}
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'iframeedit',
|
||||
title : '编辑班组',
|
||||
url : ext.contextPath + '/work/group/edit.do?iframeId=iframeedit&id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(ppid) {
|
||||
/* var dialog = parent.ext.modalDialog({
|
||||
title : '查看用户信息',
|
||||
url : ext.contextPath + '/work/group/view.do?id=' + id
|
||||
}); */
|
||||
//alert(pid+","+ppid);
|
||||
graphTrace("",ppid,"");
|
||||
};
|
||||
var viewTechnicsFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'iframeedit',
|
||||
title : '模型管控',
|
||||
url : ext.contextPath + '/activiti/workflow/model/showProcessTechnicsList.do?processid=' + id,
|
||||
buttons : [ {
|
||||
text : '关闭',
|
||||
handler : function() {
|
||||
//grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '删除此记录会将该流程关联的所有记录删除,您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/process/delete.do', {deploymentId : id}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','删除成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
/* var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
//alert(datas);
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/work/group/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
parent.$.messager.alert('提示','成功删除'+data+'条记录','info',function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}; */
|
||||
var suspendFun = function(id,status) {
|
||||
var tip="";
|
||||
if(status=="active"){
|
||||
tip="激活";
|
||||
}else{
|
||||
tip="挂起";
|
||||
}
|
||||
parent.$.messager.confirm('提示', '您确定要'+tip+'此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/processdefinition/update.do', {processDefinitionId : id,state:status}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示',tip+'成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示',tip+'失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/activiti/workflow/getProcessList.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '工艺名称', field : 'name', sortable : true, halign:'center',formatter:function(value, row){
|
||||
return row.processDefinition.name;
|
||||
}},
|
||||
{width : '180', title : '工艺描述', field : 'description', sortable : true, halign:'center',formatter:function(value, row){
|
||||
return row.processDefinition.description;
|
||||
}},
|
||||
{width : '180', title : '工艺ID', field : 'id', sortable : false, halign:'center',formatter:function(value, row){
|
||||
return row.processDefinition.id;
|
||||
}},
|
||||
{width : '180', title : '部署时间', field : 'deploymentTime', sortable : true, halign:'center',formatter:function(value, row){
|
||||
return row.deployment.deploymentTime;
|
||||
}},
|
||||
{width : '100', title : '版本号', field : 'revision', sortable : true, halign:'center',formatter:function(value, row){
|
||||
return row.processDefinition.revision;
|
||||
}},
|
||||
{title : '操作', field : 'action', width : '160', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
|
||||
<%if (sessionManager.havePermission(session,"activiti/workflow/showlist.do?scope=all")) {%>
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.processDefinition.id+'\');"/>';
|
||||
str += '<img class="iconImg ext-icon-table_sort" title="查看管控内容" onclick="viewTechnicsFun(\''+row.processDefinition.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"activiti/workflow/edit.do")) {%>
|
||||
if(row.processDefinition.suspended=="2")
|
||||
str += '<img class="iconImg ext-icon-table_lightning" title="激活" onclick="suspendFun(\''+row.processDefinition.id+'\',\'active\');"/>';
|
||||
else
|
||||
str += '<img class="iconImg ext-icon-table_link" title="挂起" onclick="suspendFun(\''+row.processDefinition.id+'\',\'suspend\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"activiti/workflow/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.processDefinition.deploymentId+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
var importFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择文件',
|
||||
width: 600,
|
||||
height:300,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/activiti/auto/doimport.do',
|
||||
buttons : [ {
|
||||
text : '上传',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doimport(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<br/>请从模型“配置界面”部署工艺路线
|
||||
<!--
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_add',plain:true"
|
||||
onclick="importFun();">自动添加</a>
|
||||
</td> -->
|
||||
<%--
|
||||
<%if (sessionManager.havePermission(session,"work/group/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%> --%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>工艺名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" /></td>
|
||||
<td>工艺ID</td>
|
||||
<td><input id="search_code" name="search_code" class="easyui-textbox"/></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||||
onclick="grid.datagrid('load',ext.serializeObject($('#searchForm')));">搜索</a>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
|
||||
onclick="$('#searchForm').form('clear');grid.datagrid('load',{});">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div data-options="region:'center',fit:true,border:false">
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
164
WebRoot/jsp/activiti/processTechnicsList.jsp
Normal file
164
WebRoot/jsp/activiti/processTechnicsList.jsp
Normal file
@ -0,0 +1,164 @@
|
||||
<%@page import="org.apache.poi.ss.usermodel.Row"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<script src="<%=contextPath%>/JS/activiti/workflow.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function() {
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/activiti/workflow/model/getProcessTechnicsList.do?modelid=${param.modelid}&processid=${param.processid}', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order // 排序规则
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
/* {
|
||||
checkbox: true, // 显示一个勾选框
|
||||
}, */
|
||||
{
|
||||
field: 'mainprocedure', // 返回json数据中的name
|
||||
title: '主流程', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'subprocedure',
|
||||
title: '分工序',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'contentno',
|
||||
title: '序号',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'subject',
|
||||
title: '管控项目',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'specifications',
|
||||
title: '管控规格',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'mode',
|
||||
title: '管控方式',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'tool',
|
||||
title: '管控工具',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'frequency',
|
||||
title: '管控频率',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'people',
|
||||
title: '管控人员',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'rejects',
|
||||
title: '不良品控制',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'filename',
|
||||
title: '管控文件/规范',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'formname',
|
||||
title: '管控表单',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'remark',
|
||||
title: '备注',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">模型管控</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="activiti/workflow/model/saveImportModel.do">
|
||||
<button type="button" class="btn btn-default" onclick="importFun();"><i class="fa fa-clipboard"></i> 导入</button>
|
||||
</security:authorize>
|
||||
<!-- <button type="button" class="btn btn-default" onclick="editFun();"><i class="fa fa-edit"></i> 编辑</button> -->
|
||||
<!-- <button type="button" class="btn btn-default" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button> -->
|
||||
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="form-group ">
|
||||
<!-- <label class="form-label">班组</label>
|
||||
<select class="form-control select2 " id="search_code" name ="search_code" style="width: 220px;"></select> -->
|
||||
<div class="form-group pull-right" style="margin-right:20px">
|
||||
<div class="input-group input-group-sm" style="width: 200px;">
|
||||
<input type="text" id="subprocedure" name="subprocedure" class="form-control pull-right" placeholder="分工序">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group pull-right" style="margin-right:20px">
|
||||
<div class="input-group input-group-sm" style="width: 200px;">
|
||||
<input type="text" id="mainprocedure" name="mainprocedure" class="form-control pull-right" placeholder="主流程">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="table"></table>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
2511
WebRoot/jsp/activiti/taskList.jsp
Normal file
2511
WebRoot/jsp/activiti/taskList.jsp
Normal file
File diff suppressed because it is too large
Load Diff
348
WebRoot/jsp/activiti/taskList4main.jsp
Normal file
348
WebRoot/jsp/activiti/taskList4main.jsp
Normal file
@ -0,0 +1,348 @@
|
||||
<%@page import="com.sipai.service.plan.DailyPlanService"%>
|
||||
<%@page import="com.sipai.entity.plan.DailyPlanTaskDemand"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<% request.setAttribute("Type_Produce", DailyPlanService.processDefKey);%>
|
||||
<%request.setAttribute("Flag_Start",DailyPlanTaskDemand.Flag_Start);%>
|
||||
<%request.setAttribute("Flag_Report",DailyPlanTaskDemand.Flag_Report);%>
|
||||
<%request.setAttribute("Flag_CarryOver",DailyPlanTaskDemand.Flag_CarryOver);%>
|
||||
<script src="<%=contextPath%>/JS/activiti/workflow.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
var grid_task;
|
||||
var addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'iframeadd',
|
||||
title : '添加班组',
|
||||
url : ext.contextPath + '/activiti/leavew/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid_task);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var completeFun = function(leaveid,taskId,tdkey,name) {
|
||||
switch(tdkey)
|
||||
{
|
||||
case 'deptLeaderAudit':
|
||||
deptLeaderAuditFun(leaveid,taskId);
|
||||
break;
|
||||
case 'deptLeaderAuditToSub':
|
||||
deptLeaderAuditFunToSub(leaveid,taskId);
|
||||
break;
|
||||
case 'deptLeaderAuditToCA':
|
||||
deptLeaderAuditFunToCA(leaveid,taskId);
|
||||
break;
|
||||
case 'modifyApply':
|
||||
modifyApplyFun(leaveid,taskId,'deptLeaderAudit');
|
||||
break;
|
||||
case 'hrAudit':
|
||||
hrAuditFun(leaveid,taskId);
|
||||
break;
|
||||
case 'hrAuditCA':
|
||||
hrAuditCAFun(leaveid,taskId);
|
||||
break;
|
||||
default:
|
||||
alert("未查询到“"+tdkey+"”任务模块!");
|
||||
}
|
||||
|
||||
};
|
||||
var gotoTaskFun = function(type,tdkey,taskId) {
|
||||
if(type=='${Type_Produce}'){
|
||||
switch(tdkey)
|
||||
{
|
||||
case 'DrawDailyPlan':
|
||||
doLook(taskId);
|
||||
break;
|
||||
case 'deptLeaderAudit':
|
||||
doLookOperate();
|
||||
break;
|
||||
case 'IssueWorkOrder':
|
||||
showWorkOrders();
|
||||
break;
|
||||
case 'StartWork':
|
||||
dostart(taskId);
|
||||
break;
|
||||
case 'HandUp':
|
||||
doreport(taskId);
|
||||
break;
|
||||
case 'CarryOver':
|
||||
docarryover(taskId);
|
||||
break;
|
||||
default:
|
||||
alert("未查询到任务模块!");
|
||||
}
|
||||
}else{
|
||||
alert("未查询到任务模块!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
var doLook = function(taskId) {
|
||||
/* var nowdate = new Date();
|
||||
var dt=nowdate.Format('yyyy-MM-dd');//月日必须都是两位 */
|
||||
|
||||
var dialog = parent.ext.modalDialog({
|
||||
id:'viewDialog',
|
||||
iframeId:'view',
|
||||
title : '查看计划',
|
||||
height:"90%",
|
||||
width:"90%",
|
||||
url : ext.contextPath + '/plan/dailyplansummary/showlist.do?taskId='+taskId,
|
||||
onDestroy:function(){
|
||||
grid_task.datagrid('reload');
|
||||
}
|
||||
});
|
||||
};
|
||||
var doLookOperate = function() {
|
||||
var nowdate = new Date();
|
||||
var dt=nowdate.Format('yyyy-MM-dd');//月日必须都是两位
|
||||
|
||||
var dialog = parent.ext.modalDialog({
|
||||
id:'viewDialog',
|
||||
iframeId:'view',
|
||||
title : '查看计划',
|
||||
height:"90%",
|
||||
width:"90%",
|
||||
url : ext.contextPath + '/plan/dailyplansummary/showlistoperate.do?dt='+dt,
|
||||
onDestroy:function(){
|
||||
grid_task.datagrid('reload');
|
||||
}
|
||||
});
|
||||
};
|
||||
var showWorkOrders = function() {
|
||||
|
||||
var dialog = parent.ext.modalDialog({
|
||||
id:'viewDialog',
|
||||
iframeId:'view',
|
||||
title : '任务调度',
|
||||
height:"90%",
|
||||
width:"90%",
|
||||
url : ext.contextPath + '/work/workorder/showlist.do',
|
||||
onDestroy:function(){
|
||||
grid_task.datagrid('reload');
|
||||
}
|
||||
});
|
||||
};
|
||||
//开工 taskId为activiti的taskid
|
||||
var dostart = function(taskId) {
|
||||
$.post(ext.contextPath + '/work/workorder/doupdate_taskdemand.do', {taskId : taskId,status:'${Flag_Start}'}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','开工成功','info',function(){
|
||||
grid_task.datagrid('reload');
|
||||
grid_task.datagrid('unselectAll');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示','开工失败','info');
|
||||
}
|
||||
});
|
||||
};
|
||||
//报工
|
||||
var doreport=function(taskId){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '工单报工',
|
||||
width: 400,
|
||||
height:500,
|
||||
url : ext.contextPath + '/work/workorder/showworkorder_carryover.do?taskId='+taskId+'&status=${Flag_Report}',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog,grid_task);
|
||||
grid_task.datagrid('unselectAll');
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
};
|
||||
//工单结转
|
||||
var docarryover=function(taskId){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '工单结转',
|
||||
width: 400,
|
||||
height:500,
|
||||
url : ext.contextPath + '/work/workorder/showworkorder_carryover.do?taskId='+taskId+'&status=${Flag_CarryOver}',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog,grid_task);
|
||||
grid_task.datagrid('unselectAll');
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
};
|
||||
var claimFun = function(id) {
|
||||
$.post(ext.contextPath + '/activiti/leavew/task/claim.do', {taskId : id}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','签收成功','info',function(){
|
||||
grid_task.datagrid('reload');
|
||||
grid_task.datagrid('unselectAll');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示','签收失败','info');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var viewFun_task = function(pid,ppid,taskId) {
|
||||
graphTrace(pid,ppid,taskId);
|
||||
};
|
||||
function loadworkorders(date){
|
||||
$("#workorderno").combobox({
|
||||
url : ext.contextPath + '/work/workorder/getList4Select.do?nowdate='+date,
|
||||
valueField : 'workorderno',
|
||||
textField : 'workorderno',
|
||||
method:'get',
|
||||
panelHeight:'auto',
|
||||
onSelect: function () {
|
||||
var datas=$("#workorderno").combobox('getData');
|
||||
var workorderno = $("#workorderno").combobox('getValue');
|
||||
var wforderid ="";
|
||||
for(var i=0;i<datas.length;i++){
|
||||
if(datas[i].workorderno==workorderno){
|
||||
wforderid=datas[i].wforderid;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$("#processInstanceId").val(wforderid);
|
||||
$("#procedureno").combobox({
|
||||
url : ext.contextPath + '/work/workorder/getProcedurelist4Select.do?workorderno='+workorderno,
|
||||
valueField : 'id',
|
||||
textField : 'name',
|
||||
method:'get',
|
||||
panelHeight:'auto',
|
||||
onLoadSuccess: function(record){
|
||||
if($("#procedureno").combobox('getData').length>0){
|
||||
$("#procedureno").combobox('select','${sessionScope.procedure}');
|
||||
}
|
||||
},
|
||||
onSelect: function () {
|
||||
}
|
||||
});
|
||||
},
|
||||
onLoadSuccess : function() {
|
||||
}
|
||||
});
|
||||
}
|
||||
var searchgrid = function() {
|
||||
grid_task.datagrid('reload',ext.contextPath + '/activiti/workflow/getProduceTaskList.do?'+$('#searchForm_task').serialize());
|
||||
};
|
||||
|
||||
$(function() {
|
||||
var nowdate = new Date();
|
||||
var dt=nowdate.Format('yyyy-MM-dd');//月日必须都是两位
|
||||
loadworkorders(dt);
|
||||
grid_task = $('#grid_task').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/activiti/workflow/getProduceTaskList.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect:true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
/* {checkbox:true , field : 'ck'}, */
|
||||
{width : '80', title : '流程名称', field : 'name', sortable : false, halign:'center'},
|
||||
{width : '120', title : '任务下发时间', field : 'createTime', sortable : false, halign:'center', formatter : function(value, row) {
|
||||
return row.task.createTime;
|
||||
}},
|
||||
{width : '80', title : '任务节点', field : 'taskName', sortable : false, halign:'center', formatter : function(value, row) {
|
||||
return row.task.name;
|
||||
}},
|
||||
{title : '操作', field : 'action', width : '70', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun_task(\''+row.processInstance.id+'\',\''+row.processDefinition.id+'\',\''+row.task.id+'\');"/>';
|
||||
if(!row.task.assignee){
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="签收" onclick="claimFun(\''+row.task.id+'\');"/>';
|
||||
}else{
|
||||
str += '<img class="iconImg ext-icon-table_go" title="办理" onclick="gotoTaskFun(\''+row.type+'\',\''+row.task.taskDefinitionKey+'\',\''+row.task.id+'\');"/>';
|
||||
}
|
||||
//str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.processInstance.id+'\');"/>';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar_task',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
<div class="easyui-layout" data-options="fit:true,border:false">
|
||||
<%if (sessionManager.havePermission(session,"activiti/workflow/searchForm")) {%>
|
||||
<div id="toolbar_task" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<form id="searchForm_task">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>工单</td>
|
||||
<td><input id="workorderno" name="workorderno" class="easyui-combobox" data-options="required:false" style="width: 100px;" />
|
||||
<input id="processInstanceId" name="processInstanceId" type="hidden" value=""/></td>
|
||||
<td>工序</td>
|
||||
<td><input id="procedureno" name="procedureno" class="easyui-combobox" style="width: 80px;" panelMaxHeight="400px" data-options="panelHeight:'auto'" value=""/></td>
|
||||
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||||
onclick="searchgrid();">搜索</a>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
|
||||
onclick="$('#searchForm').form('clear');searchgrid();">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<%}%>
|
||||
<div data-options="region:'center',fit:true,border:false">
|
||||
<table id="grid_task" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
<!-- 部门领导审批 -->
|
||||
<%-- <div id="deptLeaderAudit" style="display: none">
|
||||
|
||||
<!-- table用来显示信息,方便办理任务 -->
|
||||
<%@include file="view-form.jsp" %>
|
||||
</div> --%>
|
||||
</div>
|
||||
28
WebRoot/jsp/activiti/view-form.jsp
Normal file
28
WebRoot/jsp/activiti/view-form.jsp
Normal file
@ -0,0 +1,28 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<table class='view-info'>
|
||||
<tr>
|
||||
<td width="100" class="label">申请人:</td>
|
||||
<td name="userId"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">假种:</td>
|
||||
<td name="leaveType"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">申请时间:</td>
|
||||
<td name="applyTime"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">请假<font color="red">开始</font>时间:</td>
|
||||
<td name="startTime"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">请假<font color="red">结束</font>时间:</td>
|
||||
<td name="endTime"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">请假事由:</td>
|
||||
<td name="reason"></td>
|
||||
</tr>
|
||||
</table>
|
||||
Reference in New Issue
Block a user