Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/command/workOrderList.jsp

357 lines
17 KiB
Plaintext
Raw Permalink Normal View History

2026-01-16 14:13:44 +08:00
<%@ 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>
<style type="text/css">
.content-wrapper, .main-footer {
margin-left: 230px !important;
}
</style>
<!-- 引用页头及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 init = function() {
$("#status").select2({
ajax: {
type:'POST',
url: ext.contextPath +'/command/workOrder/getListForSelect.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: -1,//禁用搜索框
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
};
$(function(){
init();
$("#table").bootstrapTable({ // 对应table标签的id
url: ext.contextPath + '/command/workOrder/getList.do', // 获取表格数据的url
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
striped: true, //表格显示条纹默认为false
pagination: true, // 在表格底部显示分页组件默认false
pageList: [7, 20,50], // 设置页面可以显示的数据条数
pageSize: 7, // 页面数据条数
pageNumber: 1, // 首页页码
sidePagination: 'server', // 设置为服务器端分页
smartDisplay: false,
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_status: $('#status').val()
}
},
sortName: 'id', // 要排序的字段
sortOrder: 'desc', // 排序规则
onClickRow:function(row){
// viewFun(row.id,row.type);
},
columns: [
// {
// checkbox: true, // 显示一个勾选框
// },
{
width: '60px',
field: 'worknumber', // 返回json数据中的name
title: '工单编号', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
width: '120px',
field: 'applydt', // 返回json数据中的name
title: '发起时间', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
width: '80px',
field: 'status', // 返回json数据中的name
title: '状态', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle', // 上下居中
formatter:function(value, row){
var str='';
if(row.status=="2"){
str = '已完成';
}else{
str = '未完成';
}
return str;
}
},{
field: 'describe', // 返回json数据中的name
title: '描述', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
field: 'op',
title: "操作",
align: 'center',
valign: 'middle',
width: 220, // 定义列的宽度单位为像素px
formatter: function (value, row, index) {
// console.log(row);
var str = '';
str += '<button class="btn btn-default btn-sm" onclick="viewTaskTraceFun(\''+row.processid+'\',\''+row.processdefid+'\')" data-toggle="tooltip" title="流程图"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 流程图</span></button>';
str += '<button class="btn btn-default btn-sm" onclick="viewDetailFun(\''+row.businessid+'\',\''+row.businesstype+'\')" data-toggle="tooltip" title="查看详情"><i class="fa fa-history"></i><span class="hidden-md hidden-lg"> 查看详情</span></button>'
if(row.type=='人才'){
str += '<button class="btn btn-default btn-sm" onclick="viewFun(\''+row.id+'\',\''+row.type+'\')" data-toggle="tooltip" title="工单浏览"><i class="fa fa-book"></i><span class="hidden-md hidden-lg"> 工单浏览</span></button>'
}else if(row.type=='设备'){
str += '<button class="btn btn-default btn-sm" onclick="viewFun1(\''+row.id+'\',\''+row.type+'\')" data-toggle="tooltip" title="工单浏览"><i class="fa fa-book"></i><span class="hidden-md hidden-lg"> 工单浏览</span></button>'
}else if(row.type=='物资'){
str += '<button class="btn btn-default btn-sm" onclick="viewFun2(\''+row.id+'\',\''+row.type+'\')" data-toggle="tooltip" title="工单浏览"><i class="fa fa-book"></i><span class="hidden-md hidden-lg"> 工单浏览</span></button>'
}
str='<div class="btn-group" >'+str+'</div>';
return str;
}
/*,{
width: '20px',
title: "操作",
align: 'center',
valign: 'middle',
formatter: function (value, row, index) {
var buts= '';
if(row.status==0){
buts += '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
}
buts += '<button class="btn btn-default btn-sm" onclick="viewFun(\''+row.id+'\',\''+row.type+'\')" data-toggle="tooltip" title="查看详情"><i class="fa fa-history"></i><span class="hidden-md hidden-lg"> 查看详情</span></button>';
buts='<div class="btn-group" >'+buts+'</div>';
return buts;
}
}*/
}
],
onLoadSuccess: function(){ //加载成功时执行
adjustBootstrapTableView("table");
},
onLoadError: function(){ //加载失败时执行
console.info("加载数据失败");
}
});
});
//模糊查询功能
var dosearch = function () {
$("#table").bootstrapTable('refresh');
};
var viewFun = function(id,type) {
if(type=='人才'){
$.post(ext.contextPath + '/command/expertDeploy/view.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
}
};
var viewFun1 = function(id,type) {
if(type=='设备'){
$.post(ext.contextPath + '/command/equipmentDeploy/view.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
}
};
var viewFun2 = function(id,type) {
if(type=='物资'){
$.post(ext.contextPath + '/command/materialDeploy/view.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
}
};
function viewTodo(o){
if(o=='daiban'){
document.getElementById('dydaiban').style.marginTop='0px';
document.getElementById('dydaiban').style.borderTop='3px solid rgb(0,213,236)';
document.getElementById('dydaiban').style.backgroundColor='white';
document.getElementById('dydaiban').style.color='rgb(0,213,236)';
document.getElementById('dyyiban').style.marginTop='3px';
document.getElementById('dyyiban').style.borderTop='0px';
document.getElementById('dyyiban').style.backgroundColor='';
document.getElementById('dyyiban').style.color='black';
}else{
document.getElementById('dyyiban').style.marginTop='0px';
document.getElementById('dyyiban').style.borderTop='3px solid rgb(0,213,236)';
document.getElementById('dyyiban').style.backgroundColor='white';
document.getElementById('dyyiban').style.color='rgb(0,213,236)';
document.getElementById('dydaiban').style.marginTop='3px';
document.getElementById('dydaiban').style.borderTop='0px';
document.getElementById('dydaiban').style.backgroundColor='';
document.getElementById('dydaiban').style.color='black';
}
}
//技术
var doskill = function() {
$.post(ext.contextPath + '/command/expertDeploy/add.do', {} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
//设备
var doequipment = function() {
$.post(ext.contextPath + '/command/equipmentDeploy/add.do', {} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
//物资
var domaterial = function() {
$.post(ext.contextPath + '/command/materialDeploy/add.do', {} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var viewTaskTraceFun = function(pid,ppid,taskId) {
graphTrace(pid,ppid,taskId);
};
var viewDetailFun = function(id,type) {
stopBubbleDefaultEvent();
// console.info(type)
// console.info('${ProcessType_ProcessAdjustment}')
// console.log(type.indexOf('${ProcessType_ProcessAdjustment}'))
// console.log(type.indexOf('${Type_Detail}'))
// console.log(type.indexOf('${I_Stock}'))
// console.log(type.indexOf('ExpertDeploy'))
// console.log(type.indexOf('EquipmentDeploy'))
if(type.indexOf('ExpertDeploy')!=-1){
$.post(ext.contextPath + '/command/expertDeploy/showExpertDeployDetailView.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('expertDeployDetailModal');
});
}
else if(type.indexOf('EquipmentDeploy')!=-1){
$.post(ext.contextPath + '/command/equipmentDeploy/showEquipmentDeployDetailView.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('equipmentDeployDetailModal');
});
}
else if(type.indexOf('MaterialDeploy')!=-1){
$.post(ext.contextPath + '/command/materialDeploy/showMaterialDeployDetailView.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('materialDeployDetailModal');
});
}
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');
});
};
};
</script>
</head>
<div id="traceDiv"></div>
<div id="handleDetailDiv"></div>
<body id="body"
class="page-header-fixed page-sidebar-closed-hide-logo page-content-white page-md sidebar-mini">
<div class="page-wrapper">
<!-- 引用top页 -->
<jsp:include page="/jsp/topout.jsp"></jsp:include>
<!-- BEGIN CONTAINER -->
<div class="page-container">
<!-- 引用侧边页 -->
<jsp:include page="/jsp/leftout.jsp"></jsp:include>
<!-- BEGIN CONTENT -->
<div class="content-wrapper">
<div id="subDiv" style="width: 350px;height:10px;line-height: 5px;"></div>
<div id="user4SelectDiv"></div>
<div class="page-content">
<div class="nav nav-pills pull-left" style="width: 600px;padding:10px;">
<security:authorize buttonUrl="command/expertDeploy/add.do">
<label for="number1" class="label-padding" style="float:left;line-height:2.8;">工单发起类型 >&nbsp;&nbsp;</label>
<button type="button" class="btn btn-success" onclick="doskill();" style="float:left"> 技术支持申请</button>
<button type="button" class="btn btn-success" onclick="doequipment();" style="float:left;margin-left:20px;"> 设备调拨申请</button>
<button type="button" class="btn btn-success" onclick="domaterial();" style="float:left;margin-left:20px;"> 物资调拨申请</button>
</security:authorize>
</div>
<div class="form-group pull-right form-inline" style=" padding:10px;">
<div class="input-group input-group-sm pull-left">
<select class="form-control select2 pull-left" id="status" name ="status" style="width: 120px;" onchange="dosearch()">
</select>
</div>
<div class="input-group input-group-sm" style="width: 300px; ">
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="描述" >
<div class="input-group-btn">
<button class="btn btn-info" onclick="dosearch();">搜索</button>
</div>
</div>
</div>
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<table id="table"></table>
</div>
</div>
</div>
</div>
</div>
</body>
<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">
<!-- Ionicons -->
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/ionicons/css/ionicons.min.css"/>
<!-- 文件上传-->
<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>
</html>