221 lines
7.5 KiB
Plaintext
221 lines
7.5 KiB
Plaintext
<%@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() {
|
|
$.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 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/model/getProcessTechnicsList.do?modelid=${param.modelid}&processid=${param.processid}',
|
|
striped : true,
|
|
rownumbers : true,
|
|
pagination : true,
|
|
singleSelect: false,
|
|
ctrlSelect:true,
|
|
selectOnCheck: false,
|
|
checkOnSelect: false,
|
|
nowrap:false,
|
|
idField : 'id',
|
|
pageSize : 50,
|
|
pageList : [ 20, 50, 100],
|
|
columns : [ [
|
|
{width : '100', title : '主流程', field : 'mainprocedure', sortable : true, halign:'center'},
|
|
{width : '100', title : '分工序', field : 'subprocedure', sortable : true, halign:'center'},
|
|
{width : '50', title : '序号', field : 'contentno', sortable : false, halign:'center'},
|
|
{width : '180', title : '管控项目', field : 'subject', sortable : true, halign:'center'},
|
|
{width : '180', title : '管控规格', field : 'specifications', sortable : true, halign:'center'},
|
|
{width : '100', title : '管控方式', field : 'mode', sortable : true, halign:'center'},
|
|
{width : '100', title : '管控工具', field : 'tool', sortable : true, halign:'center'},
|
|
{width : '100', title : '管控频率', field : 'frequency', sortable : true, halign:'center'},
|
|
{width : '100', title : '管控人员', field : 'people', sortable : true, halign:'center'},
|
|
{width : '100', title : '不良品管制', field : 'rejects', sortable : true, halign:'center'},
|
|
{width : '100', title : '管控文件/规范', field : 'filename', sortable : true, halign:'center'},
|
|
{width : '100', title : '管控表单', field : 'formname', sortable : true, halign:'center'},
|
|
{width : '100', title : '备注', field : 'remark', sortable : true, halign:'center'}
|
|
] ],
|
|
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
|
|
});
|
|
if('${param.processid}'!=''){
|
|
//alert($('#import'))
|
|
document.getElementById('import').style.display = "none";;
|
|
}
|
|
});
|
|
var importFun = function() {
|
|
var severaddr='/activiti/workflow/model/saveImportTechnics.do';
|
|
var dialog = parent.ext.modalDialog({
|
|
title : '选择文件',
|
|
width: 600,
|
|
height:300,
|
|
closeOnEscape:true,
|
|
url : ext.contextPath + '/base/doimportExcel.do?dest='+severaddr+'¶m=${param.modelid}',
|
|
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>
|
|
<form id="searchForm">
|
|
<table class="tooltable">
|
|
<tr>
|
|
<td>主流程</td>
|
|
<td><input name="mainprocedure" class="easyui-textbox" /></td>
|
|
<td>分工序</td>
|
|
<td><input id="subprocedure" name="subprocedure" 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>
|
|
|
|
<a id ="import" name ="import" href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_add',plain:true"
|
|
onclick="importFun();">导入</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> |