first commit
This commit is contained in:
360
WebRoot/jsp/workorder/RepairBlocList4Content.jsp
Normal file
360
WebRoot/jsp/workorder/RepairBlocList4Content.jsp
Normal file
@ -0,0 +1,360 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
|
||||
<%@page import="com.sipai.entity.maintenance.MaintainCommStr" %>
|
||||
<%request.setAttribute("Maintain_RepairType_Small", MaintainCommStr.Maintain_RepairType_Small);%>
|
||||
<%request.setAttribute("Maintain_RepairType_Medium", MaintainCommStr.Maintain_RepairType_Medium);%>
|
||||
<%request.setAttribute("Maintain_IN", MaintainCommStr.Maintain_IN);%>
|
||||
<%request.setAttribute("Maintain_OUT", MaintainCommStr.Maintain_OUT);%>
|
||||
<!-- 引入bootstrap-treeview-->
|
||||
<%--<script type="text/javascript"--%>
|
||||
<%-- src="<%=request.getContextPath()%>/node_modules/patternfly-bootstrap-treeview/dist/bootstrap-treeview.min.js"--%>
|
||||
<%-- charset="utf-8"></script>--%>
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
.repairName{
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
#tv {
|
||||
/*border: 1px solid #D6D6D6;*/
|
||||
display: none;
|
||||
/*margin-top: 5px;*/
|
||||
width: 300px;
|
||||
height: 400px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var doSearchSelect4L = function () {
|
||||
$("#repairTable").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
$('#repairType').click(function () {
|
||||
$('#tv').show();
|
||||
})
|
||||
|
||||
function doSelect() {
|
||||
var detailId = '${detailId}';
|
||||
var checkedItems = $("#repairTable").bootstrapTable('getSelections');
|
||||
var datas = "";
|
||||
var repairName = "";//自修工时
|
||||
var insideRepairTime = "";//自修工时
|
||||
var outsideRepairCost = "";//委外工时费
|
||||
var materialCost = "";//物资费用
|
||||
var totalCost = "";//总费用
|
||||
$.each(checkedItems, function (index, item) {
|
||||
datas += item.id + ",";
|
||||
repairName += item.repairName + ",";
|
||||
insideRepairTime += item.insideRepairTime + ",";
|
||||
outsideRepairCost += item.outsideRepairCost + ",";
|
||||
materialCost += item.materialCost + ",";
|
||||
totalCost += item.totalCost + ",";
|
||||
});
|
||||
if (datas == "") {
|
||||
showAlert('d', '请先选择记录', 'mainAlertdiv2');
|
||||
} else {
|
||||
$.post(ext.contextPath + '/workorder/workorderRepairContent/dosave4Library.do', {
|
||||
libraryRepairIds: datas,
|
||||
unitId: '${param.unitId}',
|
||||
detailId: detailId,
|
||||
repairName: repairName,
|
||||
insideRepairTime: insideRepairTime,
|
||||
outsideRepairCost: outsideRepairCost,
|
||||
materialCost: materialCost,
|
||||
totalCost: totalCost
|
||||
}, function (data) {
|
||||
if (data == 1) {
|
||||
$("#table_repair_detail").bootstrapTable('refresh');
|
||||
closeModal("subModalDetail");
|
||||
} else {
|
||||
showAlert('d', '保存失败', 'mainAlertdiv2');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
function queryParams(params) {
|
||||
var typestr = $('#typestr').val();
|
||||
var temp = {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
unitId: '${param.unitId}',
|
||||
typestr: typestr,
|
||||
search_name: $('#search_name').val()
|
||||
};
|
||||
return temp;
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$("#search_name").keyup(function () {
|
||||
if (event.keyCode == 13) {
|
||||
event.preventDefault();
|
||||
//回车执行查询
|
||||
doSearchSelect4L();
|
||||
event.stopPropagation();
|
||||
}
|
||||
});
|
||||
|
||||
var eqClassId = '${eqId}';
|
||||
|
||||
$.post(ext.contextPath + '/equipment/equipmentClass/getTree4EquipmentCard.do', {unitId: unitId}, function (data) {
|
||||
var treeData = data.result;
|
||||
$('#tv').treeview({
|
||||
data: treeData,
|
||||
levels: 3,
|
||||
color: "#000", // 每一级通用的 节点字体颜色
|
||||
backColor: "#fff", // 每一级通用的 节点字背景色
|
||||
onhoverColor: "skyblue", // 选中浮动颜色
|
||||
showBorder: false, // 不显示边框
|
||||
showTags: true, // 是否在每个节点的右侧显示标签。 其值必须在每个节点的数据结构中提供
|
||||
highlightSelected: true, // 是否突出显示选定的节点
|
||||
selectedColor: "#fff", // 设置选定节点的前景色
|
||||
selectedBackColor: "skyblue", // 设置选定节点的背景色
|
||||
onNodeSelected: function (event, data) {
|
||||
$('#repairType').val(data.text);
|
||||
eqClassId = data.id
|
||||
$('#tv').hide();
|
||||
$("#repairTable").bootstrapTable('refresh');
|
||||
}
|
||||
});
|
||||
var node = $('#tv').treeview('findNodes', ['${eqId}', 'id']);
|
||||
$('#tv').treeview('selectNode', [node[0], { silent: true }]);
|
||||
$('#repairType').val(node[0].text);
|
||||
|
||||
}, 'json');
|
||||
|
||||
|
||||
$("#repairTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/workorder/workorderRepairContent/getListJsonByClassId.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [5], // 设置页面可以显示的数据条数
|
||||
pageSize: 5, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
detailId: "${detailId}",
|
||||
unitId: '${param.unitId}',
|
||||
search_name: $('#search_name').val(),
|
||||
eqClassId: eqClassId
|
||||
}
|
||||
},
|
||||
/* onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
viewFun(row.id);
|
||||
}, */
|
||||
/*responseHandler: function(res){
|
||||
return res.result
|
||||
},*/
|
||||
sortName: 'insdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
//rowStyle:rowStyleRepair,//通过自定义函数设置行样式
|
||||
columns: [
|
||||
{
|
||||
field: 'cs',
|
||||
checkbox: true, // 显示一个勾选框
|
||||
width: '40px'
|
||||
}, {
|
||||
field: 'repairNumber', // 返回json数据中的name
|
||||
title: '维修编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '14%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.repairNumber;
|
||||
}
|
||||
}, {
|
||||
field: 'repairName', // 返回json数据中的name
|
||||
title: '维修名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '14%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span class='repairName' title='" + row.repairName + "'>" + row.repairName + "</span>";
|
||||
}
|
||||
}, {
|
||||
field: 'repairPartyType', // 返回json数据中的name
|
||||
title: '委外/自修', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '12%',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.repairPartyType == '${Maintain_IN}') {
|
||||
return '自修';
|
||||
}
|
||||
if (row.repairPartyType == '${Maintain_OUT}') {
|
||||
return '委外';
|
||||
}
|
||||
}
|
||||
}, {
|
||||
field: 'repairType', // 返回json数据中的name
|
||||
title: '小修/中修', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '12%',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.repairType == '${Maintain_RepairType_Small}') {
|
||||
return '小修';
|
||||
}
|
||||
if (row.repairType == '${Maintain_RepairType_Medium}') {
|
||||
return '中修';
|
||||
}
|
||||
}
|
||||
}, {
|
||||
field: 'insideRepairTime', // 返回json数据中的name
|
||||
title: '自修工时(时)', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '12%',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.repairPartyType == '${Maintain_IN}') {
|
||||
/*if (row.libraryRepairEquBiz != null) {
|
||||
return row.libraryRepairEquBiz.insideRepairTime;
|
||||
} else {
|
||||
return '-';
|
||||
}*/
|
||||
return row.insideRepairTime;
|
||||
}
|
||||
if (row.repairPartyType == '${Maintain_OUT}') {
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
}, {
|
||||
field: 'outsideRepairCost', // 返回json数据中的name
|
||||
title: '委外费用(元)', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '12%',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.repairPartyType == '${Maintain_IN}') {
|
||||
return '-';
|
||||
}
|
||||
if (row.repairPartyType == '${Maintain_OUT}') {
|
||||
/*if (row.libraryRepairEquBiz != null) {
|
||||
return row.libraryRepairEquBiz.outsideRepairCost;
|
||||
} else {
|
||||
return '-';
|
||||
}*/
|
||||
return row.outsideRepairCost;
|
||||
}
|
||||
}
|
||||
}, {
|
||||
field: 'materialCost', // 返回json数据中的name
|
||||
title: '物资费(元)', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '12%',
|
||||
formatter: function (value, row, index) {
|
||||
/*if (row.libraryRepairEquBiz != null) {
|
||||
return row.libraryRepairEquBiz.materialCost;
|
||||
} else {
|
||||
return '-';
|
||||
}*/
|
||||
return row.materialCost;
|
||||
}
|
||||
}, {
|
||||
field: 'totalCost', // 返回json数据中的name
|
||||
title: '总费用(元)', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '12%',
|
||||
formatter: function (value, row, index) {
|
||||
/*if (row.libraryRepairEquBiz != null) {
|
||||
return row.libraryRepairEquBiz.totalCost;
|
||||
} else {
|
||||
return '-';
|
||||
}*/
|
||||
return row.totalCost;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("repairTable");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="subModalDetail">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div id="mainAlertdiv2"></div>
|
||||
<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="width:100%">
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="form-inline">
|
||||
<div class="form-group hidden">
|
||||
<input type="hidden" id="jobIds" name="jobIds" class="form-control" placeholder="职位Ids"
|
||||
value="${jobIds }">
|
||||
<ul id="companyForUserSelect" style="list-style-type:none;padding-left:0px;width:260px;">
|
||||
<li class="dropdown" style="width:260px;">
|
||||
<!-- Menu toggle button -->
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"
|
||||
style="width:260px;"
|
||||
onclick="document.getElementById('user_tree').style.display = 'block';">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"
|
||||
style="height:34px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold">公司:</span>
|
||||
<input class="form-control " id="coname_input" name="coname_input"
|
||||
placeholder="请选择"
|
||||
style="height:34px;width: 200px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;"
|
||||
readonly/>
|
||||
</div><!-- /input-group -->
|
||||
</a>
|
||||
<ul id="user_tree" class="dropdown-menu" data-stopPropagation="true">
|
||||
<li class="header">
|
||||
<div id="companiestree" style="width: 250px;height:300px; overflow:auto;"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="input-group input-group-sm pull-left" style="width: 250px;">
|
||||
<input type="text" id="repairType" autocomplete="off" name="repairType"
|
||||
class="form-control" style="height:34px" placeholder="类型筛选">
|
||||
<div id="tv"></div>
|
||||
</div>
|
||||
<div class="input-group input-group-sm pull-right" style="width: 250px;">
|
||||
<input type="text" id="search_name" autocomplete="off" name="search_name"
|
||||
class="form-control" style="height:34px" placeholder="搜索内容">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="doSearchSelect4L();" style="height:34px"><i
|
||||
class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<table id="repairTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doSelect()">确认</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
263
WebRoot/jsp/workorder/consume4Selects.jsp
Normal file
263
WebRoot/jsp/workorder/consume4Selects.jsp
Normal file
@ -0,0 +1,263 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<script type="text/javascript">
|
||||
var doSearchDetail = function () {
|
||||
$("#table_outStockRecordDetail").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
function doSelectDetail() {
|
||||
//var checkItems = $("#table_outStockRecordDetail").bootstrapTable('getAllSelections');
|
||||
// var datas="";
|
||||
// datas_name="";
|
||||
// $.each(selectionIds, function(index, item){
|
||||
// if(datas!=""){
|
||||
// datas+=",";
|
||||
// }
|
||||
// datas+=item;
|
||||
// });
|
||||
if ($("#table_outStockRecordDetail").bootstrapTable('getSelections').length == 0) {
|
||||
alert("请选择物品!");
|
||||
} else {
|
||||
var num;
|
||||
num = prompt("请输入消耗物品的数量:");
|
||||
if ((/(^[1-9]\d*$)/.test(num))) {
|
||||
var goodsIdSelect = $("#table_outStockRecordDetail").bootstrapTable('getSelections')[0].goods.id;
|
||||
var price = $("#table_outStockRecordDetail").bootstrapTable('getSelections')[0]._price;
|
||||
doFinishSelects(goodsIdSelect, num, price, '${param.OutStockRecordDetailIds}','${param.entityId}');
|
||||
<%--console.log('${param.OutStockRecordDetailIds}');--%>
|
||||
closeModal("subPDetailModal");
|
||||
} else {
|
||||
alert("请输入正确的数字!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var $table;
|
||||
var switchStatus = false;
|
||||
var selectionIds = []; //保存选中ids
|
||||
var dosearchTable = function () {
|
||||
$("#table_outStockRecordDetail").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
function stateFormatter(value, row, index) {
|
||||
var flag = false;
|
||||
$.each(eval('${consumeIds}'), function (index, item) {
|
||||
if (row.id == item.id) {
|
||||
flag = true;
|
||||
}
|
||||
});
|
||||
if (flag)
|
||||
return {
|
||||
checked: true//设置选中
|
||||
};
|
||||
return value;
|
||||
}
|
||||
|
||||
var $table;
|
||||
var switchStatus = false;
|
||||
var selectionIds = []; //保存选中ids
|
||||
function initialSelectionIds() {
|
||||
var check_array = eval('${consumeIds}');
|
||||
if (check_array != null && check_array.length > 0) {
|
||||
selectionIds = new Array(check_array.length);
|
||||
for (var i = 0; i < check_array.length; i++) {
|
||||
selectionIds[i] = check_array[i].id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getCheckedIds() {
|
||||
var ids = "";
|
||||
var check_array = eval('${consumeIds}');
|
||||
$.each(check_array, function (index, item) {
|
||||
if (ids != "") {
|
||||
ids += ",";
|
||||
}
|
||||
ids += item.id;
|
||||
});
|
||||
return ids;
|
||||
}
|
||||
|
||||
$(function () {
|
||||
//选择部门
|
||||
// $.post(ext.contextPath + "/user/getDeptByBizId4Select.do", {companyId:'${param.companyId}'}, 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;} // 函数用于呈现当前的选择
|
||||
// });
|
||||
// selelct.val('').trigger("change");
|
||||
// selelct.on("change",function(e){
|
||||
// dosearchTable();
|
||||
// });
|
||||
// },'json');
|
||||
initialSelectionIds();
|
||||
$table = $("#table_outStockRecordDetail").bootstrapTable({
|
||||
url: ext.contextPath + '/sparepart/consumeDetail/getOutConsumeDetailList.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(),
|
||||
insuser: 'insuser'
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
// singleSelect: true
|
||||
columns: [
|
||||
{
|
||||
field: 'check',
|
||||
radio: true,
|
||||
width: '40px'
|
||||
}, {
|
||||
field: 'goods.name', // 返回json数据中的name
|
||||
title: '物品名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '24%'
|
||||
}, {
|
||||
field: 'goods.number', // 返回json数据中的name
|
||||
title: '物品编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '23%'
|
||||
}, {
|
||||
field: 'goods.model', // 返回json数据中的name
|
||||
title: '规格型号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '23%'
|
||||
},
|
||||
/*{
|
||||
field: 'goods.brand', // 返回json数据中的name
|
||||
title: '品牌', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '15%'
|
||||
}, */
|
||||
{
|
||||
field: 'goods.unit', // 返回json数据中的name
|
||||
title: '单位', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%'
|
||||
}, {
|
||||
field: '_allnumber', // 返回json数据中的name
|
||||
title: '出库数量', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%'
|
||||
}, {
|
||||
field: '_nownumber', // 返回json数据中的name
|
||||
title: '剩余数量', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '10%'
|
||||
// formatter: function (value, row, index) {
|
||||
// return row.outNumber-row.consumeNumber
|
||||
// }
|
||||
}/*,{
|
||||
field: 'totalMoney', // 返回json数据中的name
|
||||
title: '合计/元', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},*/
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table_outStockRecordDetail");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
//绑定选中事件、取消事件、全部选中、全部取消
|
||||
$table.on('check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table', function (e, rows) {
|
||||
var ids = $.map(!$.isArray(rows) ? [rows] : rows, function (row) {
|
||||
return row.id;
|
||||
});
|
||||
func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference';
|
||||
selectionIds = _[func](selectionIds, ids);
|
||||
});
|
||||
});
|
||||
//选中事件操作数组
|
||||
var union = function (array, ids) {
|
||||
$.each(ids, function (i, id) {
|
||||
if ($.inArray(id, array) == -1) {
|
||||
array[array.length] = id;
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
//取消选中事件操作数组
|
||||
var difference = function (array, ids) {
|
||||
$.each(ids, function (i, id) {
|
||||
var index = $.inArray(id, array);
|
||||
if (index != -1) {
|
||||
array.splice(index, 1);
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
var _ = {"union": union, "difference": difference};
|
||||
|
||||
//表格分页之前处理多选框数据
|
||||
function responseHandler(res) {
|
||||
$.each(res.rows, function (i, row) {
|
||||
row.checkStatus = $.inArray(row.id, selectionIds) != -1; //判断当前行的数据id是否存在与选中的数组,存在则将多选框状态变为true
|
||||
});
|
||||
return res;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="subPDetailModal">
|
||||
<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 " style="width:100%">
|
||||
<div id="alertDetailDiv"></div>
|
||||
<%--<div class="form-group form-inline" style="padding:0;">
|
||||
<div class="form-group form-inline" >
|
||||
<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>
|
||||
<table id="table_outStockRecordDetail"></table>
|
||||
<!-- <div id="table_outStockRecordDetail" style="height:230px;overflow:auto;width:100%"></div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doSelectDetail()">确认</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
93
WebRoot/jsp/workorder/fileinputMinio.jsp
Normal file
93
WebRoot/jsp/workorder/fileinputMinio.jsp
Normal file
@ -0,0 +1,93 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
var filelist = new Array();
|
||||
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function initFileInput(ctrlName, uploadUrl) {
|
||||
var control = $('#' + ctrlName);
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
uploadUrl: uploadUrl, //上传的地址
|
||||
uploadAsync: true,
|
||||
allowedFileExtensions: ['jpg', 'png', 'gif', 'pdf', 'doc', 'xls', 'docx', 'ppt', 'pptx', 'xlsx'],//接收的文件后缀
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove: true,
|
||||
showCaption: false,//是否显示标题
|
||||
showClose: false,//右上角关闭按钮
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount: true,
|
||||
previewFileIcon: "<i class='fa fa-file'></i>",
|
||||
preferIconicPreview: true,//是否强制相关文件展示icon
|
||||
initialPreviewAsData: true,
|
||||
previewFileIconSettings: {
|
||||
'doc': '<i class="fa fa-file-word-o" style="color:#3c8dbc;margin-left:-100px"></i>',
|
||||
'docx': '<i class="fa fa-file-word-o" style="color:#3c8dbc;margin-left:-100px"></i>',
|
||||
'xls': '<i class="fa fa-file-excel-o" style="color:#00a65a ;margin-left:-100px"></i>',
|
||||
|
||||
'xlsx': '<i class="fa fa-file-excel-o" style="color:#00a65a ;margin-left:-100px"></i>',
|
||||
'pptx': '<i class="fa fa-file-powerpoint-o" style="color:#f39c12;margin-left:-100px "></i>',
|
||||
'ppt': '<i class="fa fa-file-powerpoint-o" style="color:#f39c12;margin-left:-100px "></i>',
|
||||
//'jpg': '<i class="fa fa-file-image-o" style="color:#00a65a "></i>',
|
||||
'pdf': '<i class="fa fa-file-pdf-o" style="color:#dd4b39 ;margin-left:-100px"></i>',
|
||||
'zip': '<i class="fa fa-file-zip-o" ></i>',
|
||||
},
|
||||
|
||||
uploadExtraData: function (previewId, index) { //传参
|
||||
var data = {
|
||||
"masterId": '${masterId}', //此处自定义传参
|
||||
"tbName": '${tbName}',
|
||||
"nameSpace": '${nameSpace}'
|
||||
};
|
||||
return data;
|
||||
},
|
||||
layoutTemplates: {
|
||||
actionDelete: ''
|
||||
},
|
||||
});
|
||||
control.on("filebatchselected", function (event, data, previewId, index) {
|
||||
$(this).fileinput("upload");
|
||||
});
|
||||
//导入文件上传完成之后的事件
|
||||
control.on("filedeleted", function (event, data, previewId, index) {
|
||||
if (data.response.suc) {
|
||||
getFileListMinio('${param.divId}', '${id}');
|
||||
}
|
||||
}); control.on("fileuploaded", function (event, data, previewId, index) {
|
||||
if (data.response.suc) {
|
||||
getFileListMinio('${param.divId}', '${id}');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function () {
|
||||
// initFileInput("filelist",ext.contextPath+ "/base/inputFile.do");
|
||||
initFileInput("filelist", ext.contextPath + "/base/updateFile.do");
|
||||
})
|
||||
</script>
|
||||
<div class="modal fade" id="fileInputModal">
|
||||
<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="fileInputModalForm" style="padding:10px">
|
||||
<%-- <input type="hidden" class="form-control" id ="masterId" name ="masterId" value="${masterId}"> --%>
|
||||
<div class="form-group">
|
||||
<input type="file" name="filelist" id="filelist" multiple class="file-loading"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
265
WebRoot/jsp/workorder/overHaulRecordAdd.jsp
Normal file
265
WebRoot/jsp/workorder/overHaulRecordAdd.jsp
Normal file
@ -0,0 +1,265 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceCommString"%>
|
||||
<%@page import="com.sipai.tools.CommString"%>
|
||||
<%request.setAttribute("Active_False", CommString.Active_False); %>
|
||||
<%request.setAttribute("Active_True", CommString.Active_True); %>
|
||||
<%request.setAttribute("OVERHAUL",MaintenanceCommString.MAINTENANCE_TYPE_OVERHAUL); %>
|
||||
<%request.setAttribute("INTER_MAINTENANCE",MaintenanceCommString.INTER_MAINTENANCE); %>
|
||||
<%request.setAttribute("EXTERANL_MAINTENANCE",MaintenanceCommString.EXTERANL_MAINTENANCE); %>
|
||||
<%request.setAttribute("COMMON_MAINTENANCE",MaintenanceCommString.COMMON_MAINTENANCE); %>
|
||||
<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">
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
setTimeout(function(){
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/maintenance/startDetail.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal("subModal");
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
companyid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '厂区不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
equipmentId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '设备名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
plannedenddt: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '计划完成日期不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
solvername: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '接收人员不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
/* planConsumeTime: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '计划耗时不能为空'
|
||||
}
|
||||
}
|
||||
}, */
|
||||
problemcontent: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '检修内容不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
var companyId = "";
|
||||
$(function() {
|
||||
//选择厂区
|
||||
$.post(ext.contextPath + "/user/getSearchBizsByUserId4Select.do", {}, function(data) {
|
||||
//选择厂区为一个厂时隐藏选择框
|
||||
if(data.length == 1){
|
||||
$("#companyid").css("display", "none");
|
||||
$("#input_companyid").val(data[0].text);
|
||||
$("#hidden_companyid").val(data[0].id);
|
||||
companyId = data[0].id;
|
||||
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId:companyId}, function(data) {
|
||||
$("#processsectionid").empty();
|
||||
var selelct_ =$("#processsectionid").select2({
|
||||
data: data,
|
||||
cache : false,
|
||||
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!=null && data.length>0){
|
||||
selelct_.val(data[0].id).trigger("change");
|
||||
}
|
||||
},'json');
|
||||
}else{
|
||||
$("#hidden_companyid").attr("disabled","disabled");
|
||||
$("#input_companyid").css("display", "none");
|
||||
refreshSelect();
|
||||
var selelct =$("#companyid").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){
|
||||
companyId= $(this).val();
|
||||
//重新选择厂区后清空设备和工艺段数据
|
||||
$("#equipname").val("");
|
||||
$("#equipid").val("");
|
||||
$("#processSectionId").val("");
|
||||
$("#processectionname").val("");
|
||||
});
|
||||
selelct.val('').trigger("change");
|
||||
}
|
||||
},'json');
|
||||
|
||||
$('#plannedenddt').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format:'yyyy-mm-dd',
|
||||
}).on('hide',function(e) {
|
||||
//当日期选择框关闭时,执行刷新校验
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('plannedenddt', 'NOT_VALIDATED',null)
|
||||
.validateField('plannedenddt');
|
||||
});
|
||||
$("#active").select2({minimumResultsForSearch: 10}).val('${Active_True}').trigger("change");
|
||||
$("#maintenanceWay").select2({minimumResultsForSearch: 10}).val('${INTER_MAINTENANCE}').trigger("change");
|
||||
});
|
||||
//选择设备,根据厂区id选择厂内设备
|
||||
var selectEquipmentCard = function() {
|
||||
$.post(ext.contextPath + '/equipment/showEquipmentCardForSelect.do', {companyId:companyId, equipmentId:$("#equipid").val()} , function(data) {
|
||||
$("#emSubDiv").html(data);
|
||||
openModal('emSubModal');
|
||||
});
|
||||
};
|
||||
//选择人员,可多选
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#solver").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"solver",textId:"solvername",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
</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 id="alertDiv"></div>
|
||||
<input type="hidden" id="type" name ="type" value="${OVERHAUL}" >
|
||||
<input type="hidden" class="form-control" name ="id" value="${id}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*所属厂区</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="companyid" name ="companyid" style="width: 270px;">
|
||||
</select>
|
||||
<input class="form-control" id="input_companyid" style="border: none;background: transparent;">
|
||||
<input type="hidden" id="hidden_companyid" name ="companyid">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*设备名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input id="equipid" name="equipmentId" type="hidden" value="" />
|
||||
<input class="form-control" id="equipname" name ="equipname" style="width: 270px;" onclick="selectEquipmentCard()" placeholder="请先选择厂区">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工艺段</label>
|
||||
<div class="col-sm-6">
|
||||
<input id="processSectionId" name="processSectionId" type="hidden" value="" />
|
||||
<input type="text" class="form-control" id="processectionname" placeholder="工艺段" disabled="disabled" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*计划完成日期</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="plannedenddt" name="plannedenddt" style="width: 230px;" placeholder="请选择"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*接收人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="solvername" name ="solvername" placeholder="接收人员" onclick="showUser4SelectsFun();">
|
||||
<input id="solver" name="solver" type="hidden" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*计划耗时(天)</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="planConsumeTime" name ="planConsumeTime" placeholder="计划耗时" >
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">检修方式</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="maintenanceWay" name ="maintenanceWay" style="width: 270px;">
|
||||
<option value="${INTER_MAINTENANCE}" selected="selected">内部检修</option>
|
||||
<option value="${EXTERANL_MAINTENANCE}">外部检修</option>
|
||||
<option value="${COMMON_MAINTENANCE}">联合检修</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计划费用</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="planMoney" name ="planMoney" placeholder="计划费用" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*检修内容</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control " id="problemcontent" name="problemcontent" rows="2" ></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</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="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
243
WebRoot/jsp/workorder/overHaulRecordEdit.jsp
Normal file
243
WebRoot/jsp/workorder/overHaulRecordEdit.jsp
Normal file
@ -0,0 +1,243 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.tools.CommString"%>
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceCommString"%>
|
||||
<%request.setAttribute("Active_False", CommString.Active_False); %>
|
||||
<%request.setAttribute("Active_True", CommString.Active_True); %>
|
||||
<%request.setAttribute("OVERHAUL",MaintenanceCommString.MAINTENANCE_TYPE_OVERHAUL); %>
|
||||
<%request.setAttribute("INTER_MAINTENANCE",MaintenanceCommString.INTER_MAINTENANCE); %>
|
||||
<%request.setAttribute("EXTERANL_MAINTENANCE",MaintenanceCommString.EXTERANL_MAINTENANCE); %>
|
||||
<%request.setAttribute("COMMON_MAINTENANCE",MaintenanceCommString.COMMON_MAINTENANCE); %>
|
||||
<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">
|
||||
|
||||
function doupdate() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
setTimeout(function(){
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/maintenance/doupdateOverHaulRecord.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal("subModal");
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
companyid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '厂区不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
equipmentId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '设备名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
startDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '计划日期不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
planConsumeTime: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '计划耗时不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
problemcontent: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '检修内容不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
var companyId = "${maintenanceDetail.companyid}";
|
||||
$(function() {
|
||||
//选择厂区
|
||||
$.post(ext.contextPath + "/user/getSearchBizsByUserId4Select.do", {}, function(data) {
|
||||
//选择厂区为一个厂时隐藏选择框
|
||||
if(data.length == 1){
|
||||
$("#companyid").css("display", "none");
|
||||
$("#input_companyid").val(data[0].text);
|
||||
$("#hidden_companyid").val(data[0].id);
|
||||
companyId = data[0].id;
|
||||
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId:companyId}, function(data) {
|
||||
$("#processsectionid").empty();
|
||||
var selelct_ =$("#processsectionid").select2({
|
||||
data: data,
|
||||
cache : false,
|
||||
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!=null && data.length>0){
|
||||
selelct_.val(data[0].id).trigger("change");
|
||||
}
|
||||
},'json');
|
||||
}else{
|
||||
$("#hidden_companyid").attr("disabled","disabled");
|
||||
$("#input_companyid").css("display", "none");
|
||||
var selelct =$("#companyid").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){
|
||||
companyId = $(this).val();
|
||||
//重新选择厂区后清空设备和工艺段数据
|
||||
if(companyId != "${maintenanceDetail.companyid}"){
|
||||
$("#equipname").val("");
|
||||
$("#equipid").val("");
|
||||
$("#processSectionId").val("");
|
||||
$("#processectionname").val("");
|
||||
}
|
||||
});
|
||||
selelct.val('${maintenanceDetail.companyid}').trigger("change");
|
||||
}
|
||||
},'json');
|
||||
$("#maintenanceWay").select2({minimumResultsForSearch: 10}).val("${maintenanceDetail.maintenanceWay}").trigger("change");
|
||||
//选择时间
|
||||
$('#startDate').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format:'yyyy-mm-dd',
|
||||
}).on('hide',function(e) {
|
||||
//当日期选择框关闭时,执行刷新校验
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('startDate', 'NOT_VALIDATED',null)
|
||||
.validateField('startDate');
|
||||
});
|
||||
});
|
||||
//选择设备,根据厂区id选择厂内设备
|
||||
var selectEquipmentCard = function() {
|
||||
$.post(ext.contextPath + '/equipment/showEquipmentCardForSelect.do', {companyId:companyId, equipmentId:$("#equipid").val()} , function(data) {
|
||||
$("#emSubDiv").html(data);
|
||||
openModal('emSubModal');
|
||||
});
|
||||
};
|
||||
</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 id="alertDiv"></div>
|
||||
<input type="hidden" id="id" name ="id" value="${maintenanceDetail.id}" >
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*所属厂区</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="companyid" name ="companyid" style="width: 270px;">
|
||||
</select>
|
||||
<input class="form-control" id="input_companyid" style="border: none;background: transparent;">
|
||||
<input type="hidden" id="hidden_companyid" name ="companyid">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*设备名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input id="equipid" name="equipmentId" type="hidden" value="${maintenanceDetail.equipmentId}" />
|
||||
<input class="form-control" id="equipname" style="width: 270px;" value="${equipmentName}" onclick="selectEquipmentCard()">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工艺段</label>
|
||||
<div class="col-sm-6">
|
||||
<input id="processSectionId" name="processSectionId" type="hidden" value="${maintenanceDetail.processSectionId}" />
|
||||
<input type="text" class="form-control" id="processectionname" value="${processectionname}" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*计划日期</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="startDate" name="startDate" style="width: 230px;" placeholder="请选择" value="${maintenanceDetail.startDate.substring(0,10)}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*计划耗时(天)</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="planConsumeTime" name ="planConsumeTime" placeholder="计划耗时" value="${maintenanceDetail.planConsumeTime}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">检修方式</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="maintenanceWay" name ="maintenanceWay" style="width: 270px;">
|
||||
<option value="${INTER_MAINTENANCE}">内部检修</option>
|
||||
<option value="${EXTERANL_MAINTENANCE}">外部检修</option>
|
||||
<option value="${COMMON_MAINTENANCE}">联合检修</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计划费用</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="planMoney" name ="planMoney" placeholder="计划费用" value="${maintenanceDetail.planMoney}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*检修内容</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control " id="problemcontent" name="problemcontent" rows="2" >${maintenanceDetail.problemcontent}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</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()" id="btn_update">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
372
WebRoot/jsp/workorder/overHaulRecordList.jsp
Normal file
372
WebRoot/jsp/workorder/overHaulRecordList.jsp
Normal file
@ -0,0 +1,372 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail"%>
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceCommString"%>
|
||||
<%@ 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("OVERHAUL",MaintenanceCommString.MAINTENANCE_TYPE_OVERHAUL); %>
|
||||
<%request.setAttribute("Finish", MaintenanceDetail.Status_Finish); %>
|
||||
<%request.setAttribute("Start", MaintenanceDetail.Status_Start); %>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<!-- <style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style> -->
|
||||
<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 addFun = function() {
|
||||
$.post(ext.contextPath + '/maintenance/doaddOverHaulRecord.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/maintenance/doeditOverHaulRecord.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewFun = function(id){
|
||||
$.post(ext.contextPath + '/maintenance/showMaintenanceDetailView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('maintenanceDetailModal');
|
||||
});
|
||||
}
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
//console.log('getSelections',checkedItems);
|
||||
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 + '/maintenance/deleteDetails.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
var refreshSelect = function() {
|
||||
var selelct_ =$("#processSection").select2({
|
||||
data: null,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
});
|
||||
$("#processSection").empty();
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
|
||||
};
|
||||
|
||||
var companyId = "";
|
||||
$(function() {
|
||||
$.post(ext.contextPath + "/user/getSearchBizsByUserId4Select.do", {}, function(data) {
|
||||
if(data.length == 1){
|
||||
//选择厂区为一个厂时隐藏选择框
|
||||
$("#search_code").css("display", "none");
|
||||
$("#company").text(data[0].text);
|
||||
companyId=data[0].id;
|
||||
dosearch();
|
||||
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId:companyId}, function(data) {
|
||||
$("#processSection").empty();
|
||||
var selelct_ =$("#processSection").select2({
|
||||
data: data,
|
||||
cache : false,
|
||||
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'})
|
||||
selelct_.val('').trigger("change");
|
||||
selelct_.on("change",function(e){
|
||||
dosearch();
|
||||
});
|
||||
|
||||
},'json');
|
||||
}else{
|
||||
$("#company").css("display", "none");
|
||||
var selelct=$("#search_code").select2({
|
||||
data : data ,
|
||||
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'})
|
||||
selelct.val('').trigger("change");
|
||||
refreshSelect();
|
||||
selelct.on("change",function(e){
|
||||
companyId= $(this).val();
|
||||
dosearch();
|
||||
refreshSelect();
|
||||
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId:companyId}, function(data) {
|
||||
$("#processSection").empty();
|
||||
var selelct_ =$("#processSection").select2({
|
||||
data: data,
|
||||
cache : false,
|
||||
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'})
|
||||
selelct_.val('').trigger("change");
|
||||
selelct_.on("change",function(e){
|
||||
dosearch();
|
||||
});
|
||||
},'json');
|
||||
});
|
||||
}
|
||||
},'json');
|
||||
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/maintenance/getOverHaulRecordList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
singleSelect: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,
|
||||
companyId : companyId,
|
||||
pSectionId : $('#processSection').val(),
|
||||
search_name:$('#search_name').val(),
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},{
|
||||
field: 'detailNumber', // 返回json数据中的name
|
||||
title: '检修记录编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},{
|
||||
field: 'equipmentCard.equipmentname', // 返回json数据中的name
|
||||
title: '设备名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},{
|
||||
field: 'processSection.name', // 返回json数据中的name
|
||||
title: '工艺段', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},{
|
||||
field: 'plannedenddt', // 返回json数据中的name
|
||||
title: '计划完成日期', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
return row.plannedenddt.substring(0,10);
|
||||
}
|
||||
},/* {
|
||||
field: 'planConsumeTime', // 返回json数据中的name
|
||||
title: '计划耗时(天)', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
}, */{
|
||||
field: 'problemcontent', // 返回json数据中的name
|
||||
title: '检修内容', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'status', // 返回json数据中的name
|
||||
title: '检修状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function (value, row, index) {
|
||||
switch (value){
|
||||
case '${Start}':
|
||||
return "已下发";
|
||||
case '${Finish}':
|
||||
return "已完成";
|
||||
default :
|
||||
return "";
|
||||
}
|
||||
}
|
||||
},/* {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts='';
|
||||
buts+= '<security:authorize buttonUrl="maintenance/editOverHaulRecord.do">';
|
||||
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+= '</security:authorize>';
|
||||
buts+= '<security:authorize buttonUrl="maintenance/deleteOverHaulRecord.do">';
|
||||
buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
buts+= '</security:authorize>';
|
||||
|
||||
buts='<div class="btn-group" >'+buts+'</div>';
|
||||
return buts;
|
||||
}
|
||||
} */
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
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"></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" style="width: 220px;height:10px;"></div>
|
||||
<div id="roleUserDiv"></div>
|
||||
<div id="emSubDiv"></div>
|
||||
<div id="traceDiv"></div>
|
||||
<div id="subDetailDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div class="form-group form-inline">
|
||||
<div class="form-group">
|
||||
<label class="form-label" id="companylabel">水厂:</label>
|
||||
<label class="form-label" id="company" style="width:180px;border: none;background: transparent;" ></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<select class="form-control select2 " id="search_code" name ="search_code" style="width: 220px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="padding:0;">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="maintenance/addOverHaulRecord.do">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
<div class="form-group pull-right form-inline" >
|
||||
<div class="input-group input-group-sm pull-left">
|
||||
<div class="form-group ">
|
||||
<label class="form-label">工艺段:</label>
|
||||
<select class="form-control select2 " id="processSection" name ="processSection" style="width: 120px;"></select>
|
||||
</div>
|
||||
</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>
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</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>
|
||||
423
WebRoot/jsp/workorder/overhaulAdd.jsp
Normal file
423
WebRoot/jsp/workorder/overhaulAdd.jsp
Normal file
@ -0,0 +1,423 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.maintenance.EquipmentPlanType" %>
|
||||
<%@page import="com.sipai.entity.workorder.Overhaul" %>
|
||||
<%@page import="com.sipai.entity.maintenance.MaintainCommStr" %>
|
||||
|
||||
<%request.setAttribute("Code_Type_Dx", EquipmentPlanType.Code_Type_Dx); %>
|
||||
|
||||
<% request.setAttribute("PlanType_IN", Overhaul.PlanType_IN);%>
|
||||
<% request.setAttribute("PlanType_OUT", Overhaul.PlanType_OUT);%>
|
||||
|
||||
<% request.setAttribute("Maintain_IN", MaintainCommStr.Maintain_IN);%>
|
||||
<% request.setAttribute("Maintain_OUT", MaintainCommStr.Maintain_OUT);%>
|
||||
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<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 masterId = '${id}';
|
||||
var tbName = 'tb_maintenance_problem_fille'; //数据表
|
||||
var nameSpace = 'MaintenanceProblem';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
/* var student = {
|
||||
"caption":"lilei",
|
||||
|
||||
}
|
||||
previewConfigs[0]=student; */
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove: false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse: false,//选择按钮
|
||||
showClose: false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
fileActionSettings: {
|
||||
showDrag: false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount: true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig: previewConfigs,
|
||||
layoutTemplates: {
|
||||
actionUpload: ''
|
||||
},
|
||||
deleteUrl: ext.contextPath + "/base/deleteInputFile.do",
|
||||
deleteExtraData: function () { //传参
|
||||
var data = {
|
||||
"tbName": tbName
|
||||
};
|
||||
return data;
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function () {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow", "auto");
|
||||
});
|
||||
}
|
||||
|
||||
//名称定义不可修改
|
||||
var getFileList = function () {
|
||||
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId: masterId, tbName: tbName}, function (data) {
|
||||
//console.info(data)
|
||||
if (data.length > 0) {
|
||||
previews = new Array();
|
||||
$('#maintenancefile').show();
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path = path.substring(path.indexOf('webapps') + 7, path.length);
|
||||
path = ext.basePath.replace(ext.contextPath, '') + path.replace(/\\/g, "\/");
|
||||
;
|
||||
previews.push(path);
|
||||
previewConfig['width'] = '50px';
|
||||
previewConfig['caption'] = data[i].filename;
|
||||
previewConfig['key'] = data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput("maintenanceDetailFile");
|
||||
} else {
|
||||
$('#maintenanceDetailFile').hide();
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
};
|
||||
var fileinput = function () {
|
||||
//var url='/maintenance/updateProblemFile.do';//保存数据表方法
|
||||
$.post(ext.contextPath + '/base/fileinput.do', {
|
||||
masterId: masterId,
|
||||
tbName: tbName,
|
||||
nameSpace: nameSpace
|
||||
}, function (data) {
|
||||
$("#fileInputDiv").html(data);
|
||||
openModal('fileInputModal');
|
||||
});
|
||||
};
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#solver").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "solver",
|
||||
textId: "solvername",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
/* function dolaunch() {
|
||||
$('#status').val('${Status_Launch}')
|
||||
dosave();
|
||||
} */
|
||||
function dosave() {
|
||||
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('equipname', 'NOT_VALIDATED', null)
|
||||
.validateField('equipname');
|
||||
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/workorder/overhaul/dosave.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
showAlert('s', '保存成功');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
projectName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '项目名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
planDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '计划日期不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
equipname: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '设备不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
cycleQuota: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '大修周期定额不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
budgetCost: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '预算金额不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
projectTypeName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '大修类型不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
//流程审核文件上传所需参数
|
||||
var masterId_process = '${id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process = 'ProcessUploadFile';//保存文件夹
|
||||
var status = 'delete';//有删除权限
|
||||
|
||||
|
||||
$(function () {
|
||||
$('#planDate').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd',
|
||||
}).on('hide', function (e) {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('planDate', 'NOT_VALIDATED', null)
|
||||
.validateField('planDate');
|
||||
});
|
||||
$('#planDate').datepicker('setDate', '${nowDate.substring(0, 10)}');
|
||||
|
||||
getFileList();
|
||||
//getFileList_process();
|
||||
|
||||
var selectType = $("#projectTypeName").select2({minimumResultsForSearch: 10});
|
||||
$.post(ext.contextPath + "/maintenance/equipmentPlanType/getSelectList4Code.do", {code: '${Code_Type_Dx}'}, function (data) {
|
||||
$("#projectTypeName").empty();
|
||||
var selelct_ = $("#projectTypeName").select2({
|
||||
data: data,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过10个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct_.val('').trigger("change");
|
||||
selelct_.on('change', function (e) {
|
||||
$('#projectType').val(e.target.value);
|
||||
})
|
||||
}, 'json');
|
||||
|
||||
//是否委外
|
||||
$("#outsourcingType").select2({minimumResultsForSearch: 10});
|
||||
$("#budgetType").select2({minimumResultsForSearch: 10});
|
||||
|
||||
})
|
||||
|
||||
//选择设备,根据厂区id和工艺段id选择厂内设备,可多选
|
||||
var showEquipment4SelectsFun = function (formId, hiddenId, textId) {
|
||||
var equipmentIds = $('#' + hiddenId).val();
|
||||
var companyId = $('#unitId').val();
|
||||
if (null == companyId || '' == companyId) {
|
||||
showAlert('d', "请先选择厂区!");
|
||||
return;
|
||||
}
|
||||
$.post(ext.contextPath + '/equipment/showEquipmentCardForAbnormitySelects.do', {
|
||||
formId: formId,
|
||||
hiddenId: hiddenId,
|
||||
textId: textId,
|
||||
companyId: companyId,
|
||||
equipmentIds: equipmentIds
|
||||
}, function (data) {
|
||||
$("#equ4SelectDiv").html(data);
|
||||
openModal("equipment4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
<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">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" enctype="multipart/form-data">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" name="id" value="${id}">
|
||||
<input type="hidden" class="form-control" id="jobNumber" name="jobNumber" value="${jobNumber}"
|
||||
readonly>
|
||||
<p style="display: none" class="form-control-static">${jobNumber}</p>
|
||||
<!-- <input type="hidden" id="unitId" name ="unitId" value="${param.unitId}" > -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*项目名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="projectName" name="projectName"
|
||||
value="${overhaul.projectName}" autocomplete="off" placeholder="项目名称">
|
||||
|
||||
<%-- <input type="hidden" class="form-control" id="jobNumber" name="jobNumber"--%>
|
||||
<%-- value="${jobNumber}" readonly>--%>
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">项目负责人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="hidden" class="form-control" id="sendUserId" name="sendUserId"
|
||||
value="${userId}">
|
||||
<p class="form-control-static">${userName}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label class="col-sm-2 control-label">*大修类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2" id="projectTypeName" name="projectTypeName"
|
||||
style="width: 270px;"></select>
|
||||
<input type="hidden" class="form-control" id="projectType" name="projectType" value=""/>
|
||||
</div>
|
||||
|
||||
|
||||
<label class="col-sm-2 control-label">厂区</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="hidden" id="unitId" name="unitId" value="${param.unitId}"/>
|
||||
<p class="form-control-static">${companyName}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">预算类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="budgetType" name="budgetType" class="form-control select2"
|
||||
style="width: 270px;">
|
||||
<option value="${PlanType_IN}" selected>预算内</option>
|
||||
<option value="${PlanType_OUT}">预算外</option>
|
||||
</select>
|
||||
<%-- <input type="hidden" class="form-control" id="budgetType" name="budgetType"--%>
|
||||
<%-- value="${PlanType_OUT}">--%>
|
||||
<%-- <p class="form-control-static">预算外</p>--%>
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">*预算金额(元)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="budgetCost" name="budgetCost"
|
||||
value="${overhaul.budgetCost}" autocomplete="off" placeholder="预算金额">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*是否委外</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="outsourcingType" name="outsourcingType" class="form-control select2"
|
||||
style="width: 270px;">
|
||||
<option value="${Maintain_IN}" selected>自修</option>
|
||||
<option value="${Maintain_OUT}">委外</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*大修周期定额(元)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="cycleQuota" name="cycleQuota"
|
||||
value="${overhaul.budgetCost}" autocomplete="off" placeholder="大修周期定额">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*计划时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="planDate" name="planDate"
|
||||
style="width: 232px;" autocomplete="off" placeholder="点击选择">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label class="col-sm-2 control-label">项目描述</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" style="width: 100%" id="projectDescribe"
|
||||
name="projectDescribe" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">接收人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="solvername" name ="solvername" placeholder="请选择接收人员" onclick="showUser4SelectsFun();">
|
||||
<input id="solver" name="solver" type="hidden" />
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- <div class="form-group" style="margin:8px">
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput()" id="btn_save"><i class="fa fa-paperclip"></i>上传图片</button>
|
||||
</div>
|
||||
<div class="form-group" style="margin:8px;">
|
||||
<input type="file" name="maintenanceDetailFile" id="maintenanceDetailFile" multiple class="file-loading" />
|
||||
</div> -->
|
||||
|
||||
<!-- 文件上传,显示 -->
|
||||
<!-- <div class="form-group" style="margin:8px">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()" id="btn_save"><i class="fa fa-paperclip"></i>上传文件</button>
|
||||
</div> -->
|
||||
<div class="file-border" id="fileArea">
|
||||
</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>
|
||||
417
WebRoot/jsp/workorder/overhaulContent.jsp
Normal file
417
WebRoot/jsp/workorder/overhaulContent.jsp
Normal file
@ -0,0 +1,417 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.maintenance.EquipmentPlanType" %>
|
||||
<%@page import="com.sipai.entity.workorder.Overhaul" %>
|
||||
<%@page import="com.sipai.entity.maintenance.MaintainCommStr" %>
|
||||
|
||||
<%request.setAttribute("Code_Type_Dx", EquipmentPlanType.Code_Type_Dx); %>
|
||||
|
||||
<% request.setAttribute("PlanType_IN", Overhaul.PlanType_IN);%>
|
||||
<% request.setAttribute("PlanType_OUT", Overhaul.PlanType_OUT);%>
|
||||
|
||||
<% request.setAttribute("Maintain_IN", MaintainCommStr.Maintain_IN);%>
|
||||
<% request.setAttribute("Maintain_OUT", MaintainCommStr.Maintain_OUT);%>
|
||||
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<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 masterId = '${id}';
|
||||
var tbName = 'tb_maintenance_problem_fille'; //数据表
|
||||
var nameSpace = 'MaintenanceProblem';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
/* var student = {
|
||||
"caption":"lilei",
|
||||
|
||||
}
|
||||
previewConfigs[0]=student; */
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove: false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse: false,//选择按钮
|
||||
showClose: false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
fileActionSettings: {
|
||||
showDrag: false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount: true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig: previewConfigs,
|
||||
layoutTemplates: {
|
||||
actionUpload: ''
|
||||
},
|
||||
deleteUrl: ext.contextPath + "/base/deleteInputFile.do",
|
||||
deleteExtraData: function () { //传参
|
||||
var data = {
|
||||
"tbName": tbName
|
||||
};
|
||||
return data;
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function () {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow", "auto");
|
||||
});
|
||||
}
|
||||
|
||||
//名称定义不可修改
|
||||
var getFileList = function () {
|
||||
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId: masterId, tbName: tbName}, function (data) {
|
||||
//console.info(data)
|
||||
if (data.length > 0) {
|
||||
previews = new Array();
|
||||
$('#maintenancefile').show();
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path = path.substring(path.indexOf('webapps') + 7, path.length);
|
||||
path = ext.basePath.replace(ext.contextPath, '') + path.replace(/\\/g, "\/");
|
||||
;
|
||||
previews.push(path);
|
||||
previewConfig['width'] = '50px';
|
||||
previewConfig['caption'] = data[i].filename;
|
||||
previewConfig['key'] = data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput("maintenanceDetailFile");
|
||||
} else {
|
||||
$('#maintenanceDetailFile').hide();
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
};
|
||||
var fileinput = function () {
|
||||
//var url='/maintenance/updateProblemFile.do';//保存数据表方法
|
||||
$.post(ext.contextPath + '/base/fileinput.do', {
|
||||
masterId: masterId,
|
||||
tbName: tbName,
|
||||
nameSpace: nameSpace
|
||||
}, function (data) {
|
||||
$("#fileInputDiv").html(data);
|
||||
openModal('fileInputModal');
|
||||
});
|
||||
};
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#solver").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "solver",
|
||||
textId: "solvername",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
/* function dolaunch() {
|
||||
$('#status').val('${Status_Launch}')
|
||||
dosave();
|
||||
} */
|
||||
function dosave() {
|
||||
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('equipname', 'NOT_VALIDATED', null)
|
||||
.validateField('equipname');
|
||||
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/workorder/overhaul/dosave.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
showAlert('s', '保存成功');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
projectName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '项目名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
projectContent: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '项目内容不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
planStartDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '计划开始时间'
|
||||
}
|
||||
}
|
||||
},
|
||||
planEndDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '计划完成时间'
|
||||
}
|
||||
}
|
||||
},
|
||||
ratedWorkingHours: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '额定工时不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
objUserId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '接单人不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
//流程审核文件上传所需参数
|
||||
var masterId_process = '${id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process = 'ProcessUploadFile';//保存文件夹
|
||||
var status = 'delete';//有删除权限
|
||||
|
||||
|
||||
$(function () {
|
||||
$('.modal-dialog').width(1200)
|
||||
initDatepicker('planStartDate')
|
||||
initDatepicker('planEndDate')
|
||||
getFileList();
|
||||
getFileList_process();
|
||||
|
||||
var selectType = $("#projectTypeName").select2({minimumResultsForSearch: 10});
|
||||
$.post(ext.contextPath + "/maintenance/equipmentPlanType/getSelectList4Code.do", {code: '${Code_Type_Dx}'}, function (data) {
|
||||
$("#projectTypeName").empty();
|
||||
var selelct_ = $("#projectTypeName").select2({
|
||||
data: data,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过10个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct_.val('').trigger("change");
|
||||
selelct_.on('change', function (e) {
|
||||
$('#projectType').val(e.target.value);
|
||||
})
|
||||
}, 'json');
|
||||
|
||||
//是否委外
|
||||
$("#outsourcingType").select2({minimumResultsForSearch: 10});
|
||||
|
||||
|
||||
})
|
||||
|
||||
//选择设备,根据厂区id和工艺段id选择厂内设备,可多选
|
||||
var showEquipment4SelectsFun = function (formId, hiddenId, textId) {
|
||||
var equipmentIds = $('#' + hiddenId).val();
|
||||
var companyId = $('#unitId').val();
|
||||
if (null == companyId || '' == companyId) {
|
||||
showAlert('d', "请先选择厂区!");
|
||||
return;
|
||||
}
|
||||
$.post(ext.contextPath + '/equipment/showEquipmentCardForAbnormitySelects.do', {
|
||||
formId: formId,
|
||||
hiddenId: hiddenId,
|
||||
textId: textId,
|
||||
companyId: companyId,
|
||||
equipmentIds: equipmentIds
|
||||
}, function (data) {
|
||||
$("#equ4SelectDiv").html(data);
|
||||
openModal("equipment4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function showUser4OneSelectFun() {
|
||||
$.post(ext.contextPath + '/user/userForOneSelect.do',
|
||||
{formId: "addForm", hiddenId: "objUserId", textId: "objUserName"},
|
||||
function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal('user4SelectModal');
|
||||
});
|
||||
}
|
||||
|
||||
function jobList() {
|
||||
$("#jobId").select2({
|
||||
ajax: {
|
||||
url: ext.contextPath + "/user/getJsonJobByUser.do?userId=" + $('#objUserId').val(),
|
||||
dataType: 'json',
|
||||
type: "GET",
|
||||
processResults: function (data) {
|
||||
var obj = jQuery.parseJSON(data);
|
||||
return {
|
||||
results: obj,
|
||||
text: 'name'
|
||||
};
|
||||
}
|
||||
},
|
||||
cache: false,
|
||||
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;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
}
|
||||
|
||||
function initDatepicker(idName){
|
||||
$('#'+idName).datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd',
|
||||
}).on('hide', function (e) {
|
||||
$('#subForm2').data('bootstrapValidator')
|
||||
.updateStatus(idName, 'NOT_VALIDATED', null)
|
||||
.validateField(idName);
|
||||
});
|
||||
$('#'+idName).datepicker('setDate', '${nowDate.substring(0, 10)}');
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal2">
|
||||
|
||||
<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="subForm2" enctype="multipart/form-data">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" name="id" value="${id}">
|
||||
<!-- <input type="hidden" id="unitId" name ="unitId" value="${param.unitId}" > -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*项目名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input class="form-control" id="projectName" name="projectName"
|
||||
value="">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*项目内容</label>
|
||||
<div class="col-sm-4">
|
||||
<input class="form-control" id="projectContent" name="projectContent"
|
||||
value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*计划开始时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="planStartDate" name="planStartDate"
|
||||
style="width: 132px;" autocomplete="off" placeholder="点击选择">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">*计划完成时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="planEndDate" name="planEndDate"
|
||||
style="width: 132px;" autocomplete="off" placeholder="点击选择">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*额定工时</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="ratedWorkingHours" name="ratedWorkingHours"
|
||||
value="" autocomplete="off" placeholder="额定工时">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*接单人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" id="objUserName" name="objUserName" class="form-control"
|
||||
placeholder="请输入文本" onclick="showUser4OneSelectFun();" onchange="jobList()"/>
|
||||
<input type="hidden" id="objUserId" name="objUserId" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-group" style="margin:8px">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()"
|
||||
><i class="fa fa-paperclip"></i>附件上传
|
||||
</button>
|
||||
</div>
|
||||
<div id="fileArea"></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>
|
||||
1086
WebRoot/jsp/workorder/overhaulEdit.jsp
Normal file
1086
WebRoot/jsp/workorder/overhaulEdit.jsp
Normal file
File diff suppressed because it is too large
Load Diff
166
WebRoot/jsp/workorder/overhaulItemContentAdd.jsp
Normal file
166
WebRoot/jsp/workorder/overhaulItemContentAdd.jsp
Normal file
@ -0,0 +1,166 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#solver").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {
|
||||
formId: "subFormItemContent",
|
||||
hiddenId: "userId",
|
||||
textId: "userName",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
$("#subFormItemContent").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
contents: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '分项内容不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
startDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '开始时间不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
baseHours: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '定额工时不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//初始化计划开始时间
|
||||
$('#startDate').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd',
|
||||
}).on('hide', function (e) {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('startDate', 'NOT_VALIDATED', null)
|
||||
.validateField('startDate');
|
||||
});
|
||||
//初始化计划结束时间
|
||||
$('#finishDate').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd',
|
||||
}).on('hide', function (e) {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('finishDate', 'NOT_VALIDATED', null)
|
||||
.validateField('finishDate');
|
||||
});
|
||||
|
||||
function doItemSaveContent(id) {
|
||||
$("#subFormItemContent").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subFormItemContent").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/workorder/overhaulItemContent/dosave.do", $("#subFormItemContent").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
// showAlert('s','保存成功');
|
||||
closeModal('subModaloverhaulItemContent')
|
||||
$("#table_overhaul_item_content").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModaloverhaulItemContent">
|
||||
<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强制为subFormItemContent -->
|
||||
<form class="form-horizontal" id="subFormItemContent">
|
||||
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" name="id" value="${uuId}">
|
||||
<input type="hidden" class="form-control" name="itemId" value="${param.projectId}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*分项内容</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="contents" name="contents" placeholder="请填写分项内容" autocomplete="off">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">分项进度(%)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="progress" name="progress"
|
||||
placeholder="请填写分项进度" value="0" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*开始时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="startDate" name="startDate"
|
||||
style="width: 132px;" autocomplete="off" placeholder="请选择开始时间" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">完成时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="finishDate" name="finishDate"
|
||||
style="width: 132px;" autocomplete="off" placeholder="请选择结束时间" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*额定工时(小时)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="baseHours" name="baseHours" value="0"
|
||||
placeholder="请填写额定工时" autocomplete="off">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">实际工时(小时)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="workingHours" name="workingHours" value="0"
|
||||
placeholder="请填写实际工时" autocomplete="off">
|
||||
</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="doItemSaveContent('${uuId}')">保存</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
170
WebRoot/jsp/workorder/overhaulItemContentEdit.jsp
Normal file
170
WebRoot/jsp/workorder/overhaulItemContentEdit.jsp
Normal file
@ -0,0 +1,170 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#solver").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {
|
||||
formId: "subFormItemContent",
|
||||
hiddenId: "userId",
|
||||
textId: "userName",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
$("#subFormItemContent").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
contents: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '分项内容不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
startDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '开始时间不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
baseHours: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '定额工时不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//初始化计划开始时间
|
||||
$('#startDate').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd',
|
||||
}).on('hide', function (e) {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('startDate', 'NOT_VALIDATED', null)
|
||||
.validateField('startDate');
|
||||
});
|
||||
$('#startDate').datepicker('setDate', '${overhaulItemContent.startDate.substring(0, 10)}');
|
||||
|
||||
//初始化计划结束时间
|
||||
$('#finishDate').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd',
|
||||
}).on('hide', function (e) {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('finishDate', 'NOT_VALIDATED', null)
|
||||
.validateField('finishDate');
|
||||
});
|
||||
$('#finishDate').datepicker('setDate', '${overhaulItemContent.finishDate.substring(0, 10)}');
|
||||
|
||||
function doItemUpdateContent() {
|
||||
$("#subFormItemContent").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subFormItemContent").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/workorder/overhaulItemContent/doupdate.do", $("#subFormItemContent").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
// showAlert('s','保存成功');
|
||||
closeModal('subModaloverhaulItemContent')
|
||||
$("#table_overhaul_item_content").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModaloverhaulItemContent">
|
||||
<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强制为subFormItemContent -->
|
||||
<form class="form-horizontal" id="subFormItemContent">
|
||||
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" name="id" value="${overhaulItemContent.id}">
|
||||
<input type="hidden" class="form-control" name="itemId" value="${overhaulItemContent.itemId}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*分项内容</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="contents" name="contents" placeholder="请填写分项内容"
|
||||
value="${overhaulItemContent.contents}" autocomplete="off">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">分项进度(%)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="progress" name="progress"
|
||||
placeholder="请填写分项进度" value="${overhaulItemContent.progress}" step="0.01"
|
||||
autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*开始时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="startDate" name="startDate"
|
||||
style="width: 132px;" autocomplete="off" placeholder="请选择开始时间">
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">完成时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="finishDate" name="finishDate"
|
||||
style="width: 132px;" autocomplete="off" placeholder="请选择结束时间">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*额定工时(小时)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="baseHours" name="baseHours"
|
||||
placeholder="请填写额定工时" value="${overhaulItemContent.baseHours}" step="0.01"
|
||||
autocomplete="off">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">实际工时(小时)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="workingHours" name="workingHours"
|
||||
placeholder="请填写实际工时" value="${overhaulItemContent.workingHours}" step="0.01"
|
||||
autocomplete="off">
|
||||
</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="doItemUpdateContent()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
268
WebRoot/jsp/workorder/overhaulItemEquipment.jsp
Normal file
268
WebRoot/jsp/workorder/overhaulItemEquipment.jsp
Normal file
@ -0,0 +1,268 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.maintenance.EquipmentPlanType" %>
|
||||
<%@page import="com.sipai.entity.workorder.Overhaul" %>
|
||||
<%@page import="com.sipai.entity.maintenance.MaintainCommStr" %>
|
||||
|
||||
<%request.setAttribute("Code_Type_Dx", EquipmentPlanType.Code_Type_Dx); %>
|
||||
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<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">
|
||||
|
||||
|
||||
function dosave() {
|
||||
|
||||
$("#subForm3").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm3").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
|
||||
if ('${overhaulItemEquipment.id}') {
|
||||
$.post(ext.contextPath + "/workorder/overhaulItemEquipment/doupdate.do", $("#subForm3").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
showAlert('s', '保存成功');
|
||||
closeModal('subModaloverhaulItemProject')
|
||||
$("#table_overhaul_item_device").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
} else {
|
||||
$.post(ext.contextPath + "/workorder/overhaulItemEquipment/dosave.do", $("#subForm3").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
showAlert('s', '保存成功');
|
||||
closeModal('subModaloverhaulItemProject')
|
||||
$("#table_overhaul_item_device").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm3").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
equipmentId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '设备编号不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
quotaHour: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '定额工时不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
quotaFee: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '定额费用不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
planStartDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '计划开始时间不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
planEndDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '计划完成时间不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(function () {
|
||||
|
||||
if('${edit}'=='0'){
|
||||
$('#equipmentId').attr('readonly', 'readonly');
|
||||
$('#equipname').attr('readonly', 'readonly');
|
||||
$('#equipname').css('pointer-events', 'none');
|
||||
$('#quotaHour').attr('readonly', 'readonly');
|
||||
$('#quotaFee').attr('readonly', 'readonly');
|
||||
$('#planStartDate').attr('readonly', 'readonly');
|
||||
$('#planStartDate').css('pointer-events', 'none');
|
||||
$('#planEndDate').attr('readonly', 'readonly');
|
||||
$('#planEndDate').css('pointer-events', 'none');
|
||||
// $('#fileupbt').css('display','none');
|
||||
}
|
||||
|
||||
|
||||
initDatepicker('planStartDate')
|
||||
initDatepicker('planEndDate')
|
||||
if ('${overhaulItemEquipment.equipmentId}') {
|
||||
$('#planStartDate').datepicker('setDate', '${overhaulItemEquipment.planStartDate.substring(0, 10)}');
|
||||
$('#planEndDate').datepicker('setDate', '${overhaulItemEquipment.planEndDate.substring(0, 10)}');
|
||||
}
|
||||
|
||||
var selectType = $("#projectTypeName").select2({minimumResultsForSearch: 10});
|
||||
$.post(ext.contextPath + "/maintenance/equipmentPlanType/getSelectList4Code.do", {code: '${Code_Type_Dx}'}, function (data) {
|
||||
$("#projectTypeName").empty();
|
||||
var selelct_ = $("#projectTypeName").select2({
|
||||
data: data,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过10个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct_.val('').trigger("change");
|
||||
selelct_.on('change', function (e) {
|
||||
$('#projectType').val(e.target.value);
|
||||
})
|
||||
}, 'json');
|
||||
|
||||
})
|
||||
|
||||
//选择设备,根据厂区id和工艺段id选择厂内设备,可多选
|
||||
var showEquipment4SelectsFun = function (formId, hiddenId, textId) {
|
||||
var equipmentIds = $('#' + hiddenId).val();
|
||||
var companyId = $('#unitId').val();
|
||||
if (null == companyId || '' == companyId) {
|
||||
showAlert('d', "请先选择厂区!");
|
||||
return;
|
||||
}
|
||||
$.post(ext.contextPath + '/equipment/showEquipmentCardForAbnormitySelects.do', {
|
||||
formId: formId,
|
||||
hiddenId: hiddenId,
|
||||
textId: textId,
|
||||
companyId: companyId,
|
||||
equipmentIds: equipmentIds
|
||||
}, function (data) {
|
||||
$("#equ4SelectDiv").html(data);
|
||||
openModal("equipment4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
//初始化时间选择器
|
||||
function initDatepicker(idName) {
|
||||
$('#' + idName).datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd',
|
||||
}).on('hide', function (e) {
|
||||
// $('#subForm2').data('bootstrapValidator')
|
||||
// .updateStatus(idName, 'NOT_VALIDATED', null)
|
||||
// .validateField(idName);
|
||||
});
|
||||
$('#' + idName).datepicker('setDate', '${nowDate.substring(0, 10)}');
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModaloverhaulItemProject">
|
||||
<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="subForm3" enctype="multipart/form-data">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" name="id" value="${overhaulItemEquipment.id}">
|
||||
<input type="hidden" class="form-control" name="pid" value="${pid}">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
|
||||
<label class="col-sm-2 control-label">*设备名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input id="equipmentId" name="equipmentId" type="hidden"
|
||||
value="${overhaulItemEquipment.equipmentId}"/>
|
||||
<input class="form-control" id="equipname" name="equipname"
|
||||
onclick="showEquipment4SelectsFun('subForm3','equipmentId','equipname');"
|
||||
placeholder="点击选择" value="${equipmentName}" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">*额定工时</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="quotaHour" name="quotaHour"
|
||||
value="${overhaulItemEquipment.quotaHour}" autocomplete="off" placeholder="额定工时">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label class="col-sm-2 control-label">*定额费用</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="quotaFee" name="quotaFee"
|
||||
value="${overhaulItemEquipment.quotaFee}" autocomplete="off" placeholder="定额费用">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*计划开始时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="planStartDate" name="planStartDate"
|
||||
style="width: 132px;" autocomplete="off" placeholder="点击选择">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">*计划完成时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="planEndDate" name="planEndDate"
|
||||
style="width: 132px;" autocomplete="off" placeholder="点击选择">
|
||||
|
||||
</div>
|
||||
</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>
|
||||
225
WebRoot/jsp/workorder/overhaulItemProjectAdd.jsp
Normal file
225
WebRoot/jsp/workorder/overhaulItemProjectAdd.jsp
Normal file
@ -0,0 +1,225 @@
|
||||
<%@ taglib prefix="c" uri="/jodd" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var masterId = '${jobNumber}';
|
||||
var masterId_process = masterId;
|
||||
var tbName = 'tb_maintenance_problem_fille'; //数据表
|
||||
var nameSpace = 'maintenance';//保存文件夹
|
||||
var bucketName = 'maintenance';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
|
||||
function doItemSaveProject(id) {
|
||||
getFileList(()=>{
|
||||
$("#subFormItemProject").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subFormItemProject").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/workorder/overhaulItemProject/dosave.do", $("#subFormItemProject").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
// showAlert('s','保存成功');
|
||||
closeModal('subModaloverhaulItemProject')
|
||||
$("#table_overhaul_item_project").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res,'alertDiv2');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#solver").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {
|
||||
formId: "subFormItemProject",
|
||||
hiddenId: "userId",
|
||||
textId: "userName",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
$("#subFormItemProject").bootstrapValidator({
|
||||
live: 'enabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
projectTypeName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '项目名不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
planStartDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '计划开始时间不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
planFinishDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '计划结束时间不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//初始化计划开始时间
|
||||
$('#planStartDate').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd',
|
||||
}).on('hide', function (e) {
|
||||
$('#subFormItemProject').data('bootstrapValidator')
|
||||
.updateStatus('planStartDate', 'NOT_VALIDATED', null)
|
||||
.validateField('planStartDate');
|
||||
});
|
||||
//初始化计划结束时间
|
||||
$('#planFinishDate').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd',
|
||||
}).on('hide', function (e) {
|
||||
$('#subFormItemProject').data('bootstrapValidator')
|
||||
.updateStatus('planFinishDate', 'NOT_VALIDATED', null)
|
||||
.validateField('planFinishDate');
|
||||
});
|
||||
|
||||
//项目类型下拉数据
|
||||
var selectType = $("#projectTypeName").select2({minimumResultsForSearch: 10});
|
||||
$.post(ext.contextPath + "/workorder/overhaulType/getSelectList.do", {}, function (data) {
|
||||
$("#projectTypeName").empty();
|
||||
var selelct_ = $("#projectTypeName").select2({
|
||||
data: data,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过10个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct_.val('').trigger("change");
|
||||
selelct_.on('change', function (e) {
|
||||
$('#projectTypeId').val(e.target.value);
|
||||
})
|
||||
}, 'json');
|
||||
|
||||
|
||||
|
||||
var getFileList = function (back) {
|
||||
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId: masterId, tbName: tbName}, function (data) {
|
||||
//console.info(data)
|
||||
// if (data.length > 0) {
|
||||
$('#annex').val(data.length)
|
||||
back()
|
||||
}, 'json');
|
||||
|
||||
};
|
||||
$(function () {
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModaloverhaulItemProject">
|
||||
<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">
|
||||
<!-- 新增界面formid强制为subFormItemProject -->
|
||||
<form class="form-horizontal" id="subFormItemProject">
|
||||
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv2"></div>
|
||||
<input type="hidden" class="form-control" name="id" value="${uuId}">
|
||||
<input type="hidden" class="form-control" name="unitId" value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name="projectId" value="${param.projectId}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">分项工单号</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="jobNumber" name="jobNumber" autocomplete="off"
|
||||
placeholder="请填写工单号" value="${jobNumber}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*项目名称</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2" id="projectTypeName" name="projectTypeName"
|
||||
style="width: 170px;"></select>
|
||||
<input type="hidden" class="form-control" id="projectTypeId" name="projectTypeId" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*计划开始时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="planStartDate" name="planStartDate"
|
||||
autocomplete="off" placeholder="请选择计划开始时间" value="${nowDate}">
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*计划完成时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="planFinishDate" name="planFinishDate"
|
||||
autocomplete="off" placeholder="请选择计划完成时间">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-group" style="margin:8px">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput('maintenancefile')"
|
||||
><i class="fa fa-paperclip"></i>附件上传
|
||||
</button>
|
||||
</div>
|
||||
<input type="hidden" id="annex" name="annex">
|
||||
<div class="form-group" style="margin:8px;">
|
||||
<input type="file" name="maintenancefile" id="maintenancefile" multiple
|
||||
class="file-loading"/>
|
||||
</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="doItemSaveProject('${uuId}')">保存</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
208
WebRoot/jsp/workorder/overhaulItemProjectAudit.jsp
Normal file
208
WebRoot/jsp/workorder/overhaulItemProjectAudit.jsp
Normal file
@ -0,0 +1,208 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#receiveUserIds").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subFormItemProject",hiddenId:"receiveUserIds",textId:"receiveUserIdsName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
$("#subFormItemProject").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
passstatus: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '请选择审核结果!'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#planStartDate').html('${overhaulItemProject.planStartDate.substring(0, 10)}');
|
||||
$('#planFinishDate').html('${overhaulItemProject.planFinishDate.substring(0, 10)}');
|
||||
|
||||
//加载大修分项-项目table
|
||||
getWorkOverhaulItem('${overhaulItemProject.id}');
|
||||
//加载人员绩效table
|
||||
getWorkAchievements('${overhaulItemProject.id}');
|
||||
|
||||
processSelectNode("${businessUnitAudit.taskid}");
|
||||
|
||||
doCountWorkingHours();
|
||||
//计算总工时及剩余工时
|
||||
function doCountWorkingHours(){
|
||||
var id = '${overhaulItemProject.id}';
|
||||
var difficultyDegree = $('#difficultyDegree').val();
|
||||
var workEvaluateScore = $('#workEvaluateScore').val();
|
||||
$.post(ext.contextPath + '/workorder/overhaulItemProject/doCountWorkingHours.do', {id:id,difficultyDegree:difficultyDegree,workEvaluateScore:workEvaluateScore} , function(data) {
|
||||
var datastr = JSON.parse(data);
|
||||
$('#workAlltime').html(Math.floor(datastr.workAlltime * 100) / 100);//工单总工时
|
||||
$('#actAlltime').html(Math.floor(datastr.actAlltime * 100) / 100);//绩效总工时
|
||||
$('#surplustime').html(Math.floor(datastr.surplustime * 100) / 100);//剩余工时
|
||||
});
|
||||
}
|
||||
|
||||
//异步修改难度系数和评价得分
|
||||
function doRevise(){
|
||||
var id = '${overhaulItemProject.id}';
|
||||
var difficultyDegree = $('#difficultyDegree').val();
|
||||
var workEvaluateScore = $('#workEvaluateScore').val();
|
||||
$.post(ext.contextPath + '/workorder/overhaulItemProject/doRevise.do', {id:id,difficultyDegree:difficultyDegree,workEvaluateScore:workEvaluateScore} , function(data) {
|
||||
var datastr = JSON.parse(data);
|
||||
if(datastr.res == 1){
|
||||
//修改成功
|
||||
doCountWorkingHours();//计算总工时及剩余工时
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModaloverhaulItemProject">
|
||||
<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">
|
||||
<!-- 新增界面formid强制为subFormItemProject -->
|
||||
<form class="form-horizontal" id="subFormItemProject">
|
||||
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<!-- <input type="hidden" class="form-control" name ="id" value="${overhaulItemProject.id}"> -->
|
||||
<input type="hidden" class="form-control" name ="unitId" value="${overhaulItemProject.unitId}">
|
||||
<input type="hidden" class="form-control" name ="projectId" value="${overhaulItemProject.projectId}">
|
||||
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<!-- 退回默认退给接单人 -->
|
||||
<input type="hidden" id="targetusers" name="targetusers" value="${overhaulItemProject.receiveUserId}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工单号</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${overhaulItemProject.jobNumber}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">项目名称</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${overhaulItemProject.overhaulType.name}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计划开始时间</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static" id="planStartDate"></p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">计划完成时间</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static" id="planFinishDate"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*难度系数</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="difficultyDegree" name="difficultyDegree" value="${overhaulItemProject.difficultyDegree}"
|
||||
onchange="doRevise();" step = "0.01">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*评级得分(%)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="workEvaluateScore" name="workEvaluateScore" value="${overhaulItemProject.workEvaluateScore}"
|
||||
onchange="doRevise();" step = "0.01">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">发送至</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="receiveUserIdsName" name ="receiveUserIdsName" placeholder="请选择接收人员" onclick="showUser4SelectsFun();" value="${overhaulItemProject.receiveUsersName}" readonly>
|
||||
<input id="receiveUserIds" name="receiveUserIds" type="hidden" value="${overhaulItemProject.receiveUserIds}"/>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*审核结果</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="passstatus" name ="passstatus" style="width: 270px;">
|
||||
<option value= true>通过</option>
|
||||
<option value= false>驳回</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*下一节点</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="routeNum" name ="routeNum" style="width: 270px;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*审核意见</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id ="auditopinion" name ="auditopinion" placeholder="审核意见"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">工单内容及进度</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="doItemAddContent('${overhaulItemProject.id}')" class="btn btn-box-tool" data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deleteItemContentsFun()" class="btn btn-box-tool" data-toggle="tooltip" title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_overhaul_item_content" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">参与人员绩效 </h3>
|
||||
<span style="color: #6495ED;">工单工时:</span><span style="color: #6495ED;" id="workAlltime">0</span>
|
||||
<span style="color: #6495ED;">绩效工时:</span><span style="color: #6495ED;" id="actAlltime">0</span>
|
||||
<span style="color: #6495ED;">剩余工时:</span><span style="color: #6495ED;" id="surplustime">0</span>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="doAchievementAdd('${overhaulItemProject.id}')" class="btn btn-box-tool" data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deleteAchievementFun()" class="btn btn-box-tool" data-toggle="tooltip" title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_achievements" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</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="doItemUpdateProject()">保存</button> -->
|
||||
<button type="button" class="btn btn-primary" onclick="doItemAudit()">审核</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
278
WebRoot/jsp/workorder/overhaulItemProjectEdit.jsp
Normal file
278
WebRoot/jsp/workorder/overhaulItemProjectEdit.jsp
Normal file
@ -0,0 +1,278 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<jsp:include page="/jsp/workorder/workorderOverhaulItemContent.jsp"></jsp:include>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var masterId = '${overhaulItemProject.jobNumber}';
|
||||
var masterId_process = masterId;
|
||||
var tbName = 'tb_maintenance_problem_fille'; //数据表
|
||||
var tbName_process = 'tb_maintenance_problem_fille'; //数据表
|
||||
var nameSpace_process = 'MaintenanceProblem';//保存文件夹
|
||||
var nameSpace = 'maintenance';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
var status = 'delete'
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
var oid = '${overhaulItemProject.id}';
|
||||
|
||||
function doItemUpdateProject() {
|
||||
|
||||
|
||||
getFileList(() => {
|
||||
$('#subFormItemProject').data('bootstrapValidator')
|
||||
.updateStatus('planStartDate', 'NOT_VALIDATED', null)
|
||||
.validateField('planStartDate');
|
||||
$('#subFormItemProject').data('bootstrapValidator')
|
||||
.updateStatus('planFinishDate', 'NOT_VALIDATED', null)
|
||||
.validateField('planFinishDate');
|
||||
$("#subFormItemProject").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subFormItemProject").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/workorder/overhaulItemProject/doupdate.do", $("#subFormItemProject").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
// showAlert('s', '保存成功');
|
||||
closeModal('subModaloverhaulItemProject')
|
||||
$("#table_overhaul_item_project").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#receiveUserIds").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {
|
||||
formId: "subFormItemProject",
|
||||
hiddenId: "receiveUserIds",
|
||||
textId: "receiveUserIdsName",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
$("#subFormItemProject").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
projectName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '项目名不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
planStartDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '计划开始时间不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
planFinishDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '计划完成时间不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//初始化计划开始时间
|
||||
$('#planStartDate').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd',
|
||||
}).on('hide', function (e) {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('planStartDate', 'NOT_VALIDATED', null)
|
||||
.validateField('planStartDate');
|
||||
});
|
||||
$('#planStartDate').datepicker('setDate', '${overhaulItemProject.planStartDate.substring(0, 10)}');
|
||||
|
||||
//初始化计划结束时间
|
||||
$('#planFinishDate').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd',
|
||||
}).on('hide', function (e) {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('planFinishDate', 'NOT_VALIDATED', null)
|
||||
.validateField('planFinishDate');
|
||||
});
|
||||
$('#planFinishDate').datepicker('setDate', '${overhaulItemProject.planFinishDate.substring(0, 10)}');
|
||||
|
||||
//加载大修分项-关联的内容
|
||||
getOverhaulItemContent('${overhaulItemProject.id}');
|
||||
|
||||
|
||||
//名称定义不可修改
|
||||
var getFileList = function (back) {
|
||||
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId: masterId, tbName: tbName}, function (data) {
|
||||
//console.info(data)
|
||||
// if (data.length > 0) {
|
||||
$('#annex').val(data.length)
|
||||
back()
|
||||
}, 'json');
|
||||
};
|
||||
$(function () {
|
||||
|
||||
status = '${edit}' == '1' ? 'delete' : 'view'
|
||||
// getFileList_process_minio(masterId_process, tbName_process, nameSpace, status)
|
||||
if ('${edit}' == '0' || '${edit}' == 0) {
|
||||
getFileListMinio('maintenancefile','${overhaulItemProject.jobNumber}',true);
|
||||
$('#overhaulJobNumberEdit').hide();
|
||||
$('#projectTypeId').attr('readonly', 'readonly');
|
||||
$('#planStartDate').attr('readonly', 'readonly');
|
||||
$('#planStartDate').css('pointer-events', 'none');
|
||||
|
||||
$('#planFinishDate').attr('readonly', 'readonly');
|
||||
$('#planFinishDate').css('pointer-events', 'none');
|
||||
|
||||
$('#fileupbt').css('display', 'none');
|
||||
} else {
|
||||
getFileListMinio('maintenancefile','${overhaulItemProject.jobNumber}',false);
|
||||
$('#overhaulJobNumberShow').hide();
|
||||
}
|
||||
|
||||
|
||||
// showFileInput("maintenanceDetailFile")
|
||||
})
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModaloverhaulItemProject">
|
||||
<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">
|
||||
<!-- 新增界面formid强制为subFormItemProject -->
|
||||
<form class="form-horizontal" id="subFormItemProject">
|
||||
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" name="id" value="${overhaulItemProject.id}">
|
||||
<input type="hidden" class="form-control" name="unitId" value="${overhaulItemProject.unitId}">
|
||||
<input type="hidden" class="form-control" name="projectId" value="${overhaulItemProject.projectId}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">分项工单号</label>
|
||||
<div class="col-sm-4">
|
||||
<!-- <p class="form-control-static">${jobNumber}</p> -->
|
||||
<div id="overhaulJobNumberEdit">
|
||||
<input type="text" class="form-control" id="jobNumber" name="jobNumber"
|
||||
value="${overhaulItemProject.jobNumber}">
|
||||
</div>
|
||||
<div id="overhaulJobNumberShow">
|
||||
<p class="form-control-static">${overhaulItemProject.jobNumber}</p>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*项目名称</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="col-sm-4">
|
||||
<input type="hidden" class="form-control" id="projectTypeId" name="projectTypeId"
|
||||
value="${overhaulItemProject.projectTypeId}"/>
|
||||
<p class="form-control-static">${overhaulItemProject.overhaulType.name}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*计划开始时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="planStartDate" name="planStartDate"
|
||||
autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*计划完成时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="planFinishDate" name="planFinishDate"
|
||||
autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%--<div class="form-group">
|
||||
<label class="col-sm-2 control-label">发送至</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="receiveUserIdsName" name="receiveUserIdsName"
|
||||
placeholder="请选择接收人员" onclick="showUser4SelectsFun();"
|
||||
value="${overhaulItemProject.receiveUsersName}" readonly>
|
||||
<input id="receiveUserIds" name="receiveUserIds" type="hidden"
|
||||
value="${overhaulItemProject.receiveUserIds}"/>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-group" style="margin:8px">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<button type="button" id="fileupbt" class="btn btn-default btn-file"
|
||||
onclick="fileinput('maintenancefile','${overhaulItemProject.id}')"
|
||||
><i class="fa fa-paperclip"></i>附件上传
|
||||
</button>
|
||||
</div>
|
||||
<input type="hidden" id="annex" name="annex">
|
||||
<div class="form-group" style="margin:8px;">
|
||||
<input type="file" name="maintenancefile" id="maintenancefile" multiple
|
||||
class="file-loading"/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<%-- <div class="box box-primary">--%>
|
||||
<%-- <div class="box-header with-border">--%>
|
||||
<%-- <h3 class="box-title">工单内容及进度</h3>--%>
|
||||
<%-- <div class="box-tools pull-right">--%>
|
||||
<%-- <a onclick="doItemAddContent('${overhaulItemProject.id}')" class="btn btn-box-tool"--%>
|
||||
<%-- data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>--%>
|
||||
<%-- <a onclick="deleteItemContentsFun()" class="btn btn-box-tool" data-toggle="tooltip"--%>
|
||||
<%-- title="删除"><i class="glyphicon glyphicon-minus"></i></a>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- <div class="box-body ">--%>
|
||||
<%-- <table id="table_overhaul_item_content" style="table-layout:fixed;"></table>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- </div>--%>
|
||||
|
||||
</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="doItemUpdateProject()">保存</button>
|
||||
<%--<button type="button" class="btn btn-primary" onclick="doItemSubmit('${overhaulItemProject.id}')">下发
|
||||
</button>--%>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
150
WebRoot/jsp/workorder/overhaulItemProjectHandle.jsp
Normal file
150
WebRoot/jsp/workorder/overhaulItemProjectHandle.jsp
Normal file
@ -0,0 +1,150 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
|
||||
<jsp:include page="/jsp/maintenance/workorderOverhaulItemProject.jsp"></jsp:include>
|
||||
<jsp:include page="/jsp/maintenance/workorderOverhaulItemContent.jsp"></jsp:include>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#receiveUserIds").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subFormItemProject",hiddenId:"receiveUserIds",textId:"receiveUserIdsName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
$("#subFormItemProject").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
projectName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '项目名不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
planStartDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '计划开始时间不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
planFinishDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '计划结束时间不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#planStartDate').html('${overhaulItemProject.planStartDate.substring(0, 10)}');
|
||||
$('#planFinishDate').html('${overhaulItemProject.planFinishDate.substring(0, 10)}');
|
||||
|
||||
//加载大修分项-项目
|
||||
getWorkOverhaulItem('${overhaulItemProject.id}');
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModaloverhaulItemProject">
|
||||
<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">
|
||||
<!-- 新增界面formid强制为subFormItemProject -->
|
||||
<form class="form-horizontal" id="subFormItemProject">
|
||||
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<!-- <input type="hidden" class="form-control" name ="id" value="${overhaulItemProject.id}"> -->
|
||||
<input type="hidden" class="form-control" name ="unitId" value="${overhaulItemProject.unitId}">
|
||||
<input type="hidden" class="form-control" name ="projectId" value="${overhaulItemProject.projectId}">
|
||||
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name ="status" value="${param.status}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<!-- 默认发单人就是工单评价人 -->
|
||||
<input type="hidden" id="targetusers" name="targetusers" value="${overhaulItemProject.insuser}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工单号</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${overhaulItemProject.jobNumber}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">项目名称</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${overhaulItemProject.overhaulType.name}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计划开始时间</label>
|
||||
<div class="col-sm-4">
|
||||
<!-- <div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="planStartDate" name="planStartDate" style="width: 132px;" autocomplete="off" readonly="true">
|
||||
</div> -->
|
||||
<p class="form-control-static" id="planStartDate"></p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">计划完成时间</label>
|
||||
<div class="col-sm-4">
|
||||
<!-- <div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="planFinishDate" name="planFinishDate" style="width: 132px;" autocomplete="off" readonly="true">
|
||||
</div> -->
|
||||
<p class="form-control-static" id="planFinishDate"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">发送至</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="receiveUserIdsName" name ="receiveUserIdsName" placeholder="请选择接收人员" onclick="showUser4SelectsFun();" value="${overhaulItemProject.receiveUsersName}" readonly>
|
||||
<input id="receiveUserIds" name="receiveUserIds" type="hidden" value="${overhaulItemProject.receiveUserIds}"/>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
</form>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">工单内容及进度</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="doItemAddContent('${overhaulItemProject.id}')" class="btn btn-box-tool" data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deleteItemContentsFun()" class="btn btn-box-tool" data-toggle="tooltip" title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_overhaul_item_content" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</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="doItemUpdateProject()">保存</button> -->
|
||||
<button type="button" class="btn btn-primary" onclick="doItemHandle()">提交</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
98
WebRoot/jsp/workorder/overhaulItemProjectView.jsp
Normal file
98
WebRoot/jsp/workorder/overhaulItemProjectView.jsp
Normal file
@ -0,0 +1,98 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
|
||||
<jsp:include page="/jsp/maintenance/workorderOverhaulItemContentView.jsp"></jsp:include>
|
||||
<jsp:include page="/jsp/workorder/workorderAchievementView.jsp"></jsp:include>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
//加载大修分项-项目
|
||||
getWorkOverhaulItem('${overhaulItemProject.id}');
|
||||
//加载人员绩效table
|
||||
getWorkAchievements('${overhaulItemProject.id}');
|
||||
|
||||
$('#planStartDate').html('${overhaulItemProject.planStartDate.substring(0, 10)}');
|
||||
$('#planFinishDate').html('${overhaulItemProject.planFinishDate.substring(0, 10)}');
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModaloverhaulItemProject">
|
||||
<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">
|
||||
<!-- 新增界面formid强制为subFormItemProject -->
|
||||
<form class="form-horizontal" id="subFormItemProject">
|
||||
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" name ="id" value="${overhaulItemProject.id}">
|
||||
<input type="hidden" class="form-control" name ="unitId" value="${overhaulItemProject.unitId}">
|
||||
<input type="hidden" class="form-control" name ="projectId" value="${overhaulItemProject.projectId}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工单号</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${overhaulItemProject.jobNumber}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">项目名称</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${overhaulItemProject.overhaulType.name}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计划开始时间</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static" id="planStartDate">${overhaulItemProject.planStartDate}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">计划完成时间</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static" id="planFinishDate">${overhaulItemProject.planFinishDate}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">发送至</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="receiveUserIdsName" name ="receiveUserIdsName" placeholder="请选择接收人员" onclick="showUser4SelectsFun();" value="${overhaulItemProject.receiveUsersName}" readonly>
|
||||
<input id="receiveUserIds" name="receiveUserIds" type="hidden" value="${overhaulItemProject.receiveUserIds}"/>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
</form>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">工单内容及进度</h3>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_overhaul_item_content" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">参与人员绩效</h3>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_achievements" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
391
WebRoot/jsp/workorder/overhaulList.jsp
Normal file
391
WebRoot/jsp/workorder/overhaulList.jsp
Normal file
@ -0,0 +1,391 @@
|
||||
<%@page import="com.sipai.entity.maintenance.Maintain" %>
|
||||
<%@ 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" %>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
|
||||
<%request.setAttribute("Status_11", Maintain.Status_11);%>
|
||||
<%request.setAttribute("Status_21", Maintain.Status_21);%>
|
||||
<%request.setAttribute("Status_22", Maintain.Status_22);%>
|
||||
<%request.setAttribute("Status_31", Maintain.Status_31);%>
|
||||
<%request.setAttribute("Status_41", Maintain.Status_41);%>
|
||||
<%request.setAttribute("Status_42", Maintain.Status_42);%>
|
||||
<%request.setAttribute("Status_51", Maintain.Status_51);%>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
<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 addFun = function () {
|
||||
$.post(ext.contextPath + '/workorder/overhaul/doadd.do', {unitId: unitId}, function (data) {
|
||||
$("#mainAlertdiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/workorder/overhaul/doedit.do', {id: id, flag: getFlag()}, function (data) {
|
||||
$("#mainAlertdiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
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(willDelete => {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/workorder/overhauler/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 + '/workorder/overhaul/deletes.do', {ids: datas}, function (data) {
|
||||
if (data.res > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var dosearch = function () {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
$(function () {
|
||||
if ('${type}' == '0') {
|
||||
$('#overhaulShow').show()
|
||||
} else {
|
||||
$('#overhaulShow').hide()
|
||||
}
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/workorder/overhaul/getList.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_code: $('#search_code').val(),
|
||||
search_name: $('#search_name').val(),
|
||||
unitId: unitId,
|
||||
processStatus: getstatus(),
|
||||
}
|
||||
},
|
||||
sortName: 'insdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewMaintainPlanFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
width: '40px'
|
||||
},
|
||||
{
|
||||
field: 'jobNumber', // 返回json数据中的name
|
||||
title: '工单号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%'
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '项目名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
formatter: function (value, row, index) {
|
||||
// if (row.equipmentCard != null && row.equipmentCard != '') {
|
||||
return row.projectName;
|
||||
// }
|
||||
}
|
||||
},
|
||||
// {
|
||||
// field: '', // 返回json数据中的name
|
||||
// title: '设备名称', // 表格表头显示文字
|
||||
// align: 'center', // 左右居中
|
||||
// valign: 'middle',
|
||||
// width: '15%',
|
||||
// formatter: function (value, row, index) {
|
||||
// if (row.equipmentCard != null && row.equipmentCard != '') {
|
||||
// return row.equipmentCard.equipmentname;
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '大修类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '15%',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.equipmentPlanType != null && row.equipmentPlanType != '') {
|
||||
return row.equipmentPlanType.name;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '计划日期', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '15%',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.planDate != null && row.planDate != '') {
|
||||
return row.planDate.substring(0, 10);
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'maintainerid', // 返回json数据中的name
|
||||
title: '厂区', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '8%',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.company != null && row.company != '') {
|
||||
return row.company.sname;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '接单人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '8%',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.receiveUser != null && row.receiveUser != '') {
|
||||
return row.receiveUser.caption;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'processStatus', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '8%',
|
||||
formatter: function (value, row, index) {
|
||||
switch (value) {
|
||||
case '${Status_11}':
|
||||
return '计划中';
|
||||
case '${Status_21}':
|
||||
return '审核中';
|
||||
case '${Status_22}':
|
||||
return '审核驳回';
|
||||
case '${Status_31}':
|
||||
return '实施中';
|
||||
case '${Status_41}':
|
||||
return '验收中';
|
||||
case '${Status_42}':
|
||||
return '验收未通过';
|
||||
case '${Status_51}':
|
||||
return '已完成';
|
||||
default:
|
||||
return value;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '6%',
|
||||
formatter: function (value, row, index) {
|
||||
var buts = '';
|
||||
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 = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function getstatus() {
|
||||
let type = '${type}'
|
||||
let status = '51'
|
||||
switch (type) {
|
||||
case '0':
|
||||
status = '11,22'
|
||||
break;
|
||||
case '1':
|
||||
status = '31,42'
|
||||
break;
|
||||
default:
|
||||
status = '51'
|
||||
|
||||
}
|
||||
return status
|
||||
}
|
||||
|
||||
function getFlag() {
|
||||
let type = '${type}'
|
||||
let flag = 11
|
||||
switch (type) {
|
||||
case '0':
|
||||
flag = 11
|
||||
break;
|
||||
case '1':
|
||||
flag = 31
|
||||
break;
|
||||
default:
|
||||
flag = 51
|
||||
|
||||
}
|
||||
return flag
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<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>
|
||||
</ol>
|
||||
</section>
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv" style="width: 220px;height:10px;"></div>
|
||||
<div id="roleUserDiv"></div>
|
||||
<div id="traceDiv"></div>
|
||||
<div id="subDetailDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="subDiv_overhaulItemProject"></div>
|
||||
<div id="subDiv_overhaulItemContent"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div>
|
||||
<div id="overhaulShow" class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addFun();"><i class="fa fa-plus"></i> 新增
|
||||
</button>
|
||||
<button type="button" class="btn btn-default" onclick="deletesFun();"><i class="fa fa-trash-o"></i>
|
||||
删除
|
||||
</button>
|
||||
</div>
|
||||
<table id="table" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="<%=request.getContextPath()%>/JS/ofileUpload.js" charset="utf-8"></script>
|
||||
<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>
|
||||
|
||||
<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>
|
||||
102
WebRoot/jsp/workorder/overhaulTypeAdd.jsp
Normal file
102
WebRoot/jsp/workorder/overhaulTypeAdd.jsp
Normal file
@ -0,0 +1,102 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.tools.CommString"%>
|
||||
<% request.setAttribute("Flag_Active", CommString.Flag_Active); %>
|
||||
<% request.setAttribute("Flag_Unactive", CommString.Flag_Unactive); %>
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
||||
//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/workorder/overhaulType/dosave.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal("subModal");
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
morder: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '顺序不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(function() {
|
||||
|
||||
});
|
||||
|
||||
</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 id="alertDiv"></div>
|
||||
<input name="id" id="id" type="hidden" value="${id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="name" name ="name" placeholder="名称" value="${overhaulType.name}" >
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*顺序</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="morder" name ="morder" placeholder="顺序" value="${overhaulType.morder}" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*流程Id</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="activitiId" name ="activitiId" placeholder="流程Id" value="${overhaulType.activitiId}" >
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">启用状态</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2" id="active" name ="active" >
|
||||
<option value="${Flag_Active}">启用</option>
|
||||
<option value="${Flag_Unactive}">禁用</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</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="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
103
WebRoot/jsp/workorder/overhaulTypeEdit.jsp
Normal file
103
WebRoot/jsp/workorder/overhaulTypeEdit.jsp
Normal file
@ -0,0 +1,103 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@page import="com.sipai.tools.CommString"%>
|
||||
<% request.setAttribute("Flag_Active", CommString.Flag_Active); %>
|
||||
<% request.setAttribute("Flag_Unactive", CommString.Flag_Unactive); %>
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
||||
//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/workorder/overhaulType/doupdate.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal("subModal");
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
morder: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '顺序不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(function() {
|
||||
|
||||
});
|
||||
|
||||
</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 id="alertDiv"></div>
|
||||
<input name="id" id="id" type="hidden" value="${overhaulType.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="name" name ="name" placeholder="名称" value="${overhaulType.name}" >
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*顺序</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="morder" name ="morder" placeholder="顺序" value="${overhaulType.morder}" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*流程Id</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="activitiId" name ="activitiId" placeholder="流程Id" value="${overhaulType.activitiId}" >
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">启用状态</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2" id="active" name ="active" >
|
||||
<option value="${Flag_Active}" <c:if test="${overhaulType.active == Flag_Active}">selected</c:if>>启用</option>
|
||||
<option value="${Flag_Unactive}" <c:if test="${overhaulType.active == Flag_Unactive}">selected</c:if>>禁用</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</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="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
262
WebRoot/jsp/workorder/overhaulTypeList.jsp
Normal file
262
WebRoot/jsp/workorder/overhaulTypeList.jsp
Normal file
@ -0,0 +1,262 @@
|
||||
<%@page import="com.sipai.tools.CommString"%>
|
||||
<%@ 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"%>
|
||||
|
||||
<%@page import="com.sipai.tools.CommString"%>
|
||||
<% request.setAttribute("Flag_Active", CommString.Flag_Active); %>
|
||||
<% request.setAttribute("Flag_Unactive", CommString.Flag_Unactive); %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
.table-hover>tbody>tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/workorder/overhaulType/doadd.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/workorder/overhaulType/doedit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
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 + '/workorder/overhaulType/dodelete.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 + '/workorder/overhaulType/dodeletes.do', {ids:datas} , function(data) {
|
||||
if(data.res>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//表格查询参数
|
||||
function queryParamsFun(params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//厂区选择后,初始化工艺段,加载表格
|
||||
var initFun = function(){
|
||||
// initoverhaulType();
|
||||
$('#table').bootstrapTable('destroy');
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/workorder/overhaulType/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
singleSelect:true,
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: queryParamsFun,
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '25%',
|
||||
},{
|
||||
field: 'morder', // 返回json数据中的name
|
||||
title: '顺序', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '25%',
|
||||
},{
|
||||
field: 'activitiId', // 返回json数据中的name
|
||||
title: '流程Id', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '30%',
|
||||
},{
|
||||
field: 'active', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
switch (value){
|
||||
case '0' :
|
||||
return "禁用";
|
||||
case '1' :
|
||||
return "启用";
|
||||
default :
|
||||
return "";
|
||||
}
|
||||
}
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '10%', // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts='';
|
||||
buts+= '<security:authorize buttonUrl="workorder/overhaulType/edit.do">';
|
||||
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+= '</security:authorize>';
|
||||
buts+= '<security:authorize buttonUrl="workorder/overhaulType/delete.do">';
|
||||
buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
buts+= '</security:authorize>';
|
||||
buts='<div class="btn-group" >'+buts+'</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initFun()" >
|
||||
<div class="wrapper">
|
||||
<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>
|
||||
</ol>
|
||||
</section>
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<!-- <div id="subDiv" style="width: 220px;height:10px;"></div> -->
|
||||
<div id="subDiv"></div>
|
||||
<div id="subDivDetail"></div>
|
||||
<div id="roleUserDiv"></div>
|
||||
<div id="emSubDiv"></div>
|
||||
<div id="traceDiv"></div>
|
||||
<div id="subDiv_Equipment"></div>
|
||||
<div id="subDetailDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<form id="searchForm">
|
||||
<div id="companySelectTree" style="display:none;"></div>
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="workorder/overhaulType/add.do">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</form>
|
||||
<table id="table"></table>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
201
WebRoot/jsp/workorder/workorderAchievementAdd.jsp
Normal file
201
WebRoot/jsp/workorder/workorderAchievementAdd.jsp
Normal file
@ -0,0 +1,201 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#solver").val();
|
||||
/*$.post(ext.contextPath + '/user/userForSelect.do', {
|
||||
formId: "subFormAch",
|
||||
hiddenId: "userId",
|
||||
textId: "userName",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});*/
|
||||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subFormAch",hiddenId:"userId",textId:"userName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function dosaveAchievement() {
|
||||
$("#subFormAch").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subFormAch").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/workorder/workorderAchievement/dosave.do", $("#subFormAch").serialize(), function (data) {
|
||||
// $.post(ext.contextPath + "/workorder/workorderAchievement/dosave.do", {projectRole:'角色1'}, function(data) {
|
||||
if (data.res == 1) {
|
||||
|
||||
//计算总工时及剩余工时
|
||||
// doCountWorkingHours();
|
||||
|
||||
closeModal('subModalAchievement')
|
||||
$("#table_achievements").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subFormAch").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
userName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '请选择人员'
|
||||
}
|
||||
}
|
||||
},
|
||||
projectRole: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '项目角色不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
workTime: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工单工时不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
// evaluateScore: {
|
||||
// validators: {
|
||||
// notEmpty: {
|
||||
// message: '评价得分不能为空'
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// skillWeight: {
|
||||
// validators: {
|
||||
// notEmpty: {
|
||||
// message: '个人绩效工时不能为空'
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// actualWorkTime: {
|
||||
// validators: {
|
||||
// notEmpty: {
|
||||
// message: '工单工时不能为空'
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
participateContent: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '参与内容不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function workTimeFunction() {
|
||||
var workTime = $('#workTime').val();
|
||||
var evaluateScore = $('#evaluateScore').val();
|
||||
var skillWeight = $('#skillWeight').val();
|
||||
|
||||
var actualWorkTime = 0;
|
||||
if (evaluateScore != null && evaluateScore != '' && evaluateScore != '0' && skillWeight != null && skillWeight != '' && skillWeight != '0') {
|
||||
actualWorkTime = parseFloat(workTime) + (parseFloat(evaluateScore) * parseFloat(skillWeight));
|
||||
} else {
|
||||
actualWorkTime = workTime;
|
||||
}
|
||||
$('#actualWorkTime').val(actualWorkTime);
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModalAchievement">
|
||||
<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强制为subFormAch -->
|
||||
<form class="form-horizontal" id="subFormAch">
|
||||
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" name="id" value="${uuId2}">
|
||||
<input type="hidden" class="form-control" name="pid" value="${param.pid}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*人员</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="userName" name="userName" placeholder="请选择人员"
|
||||
onclick="showUser4SelectsFun();" autocomplete="off">
|
||||
<input id="userId" name="userId" type="hidden"/>
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">*工单工时</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="workTime" name="workTime"
|
||||
value="${workorderAchievement.workTime}" onchange="workTimeFunction()"
|
||||
autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">项目角色</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="projectRole" name="projectRole"
|
||||
value="${workorderAchievement.projectRole}" autocomplete="off">
|
||||
</div>
|
||||
<!-- <label class="col-sm-2 control-label">*评价得分</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="evaluateScore" name="evaluateScore" value="${workorderAchievement.evaluateScore}" onchange="workTimeFunction()" autocomplete="off">
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*技能等级权重</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="skillWeight" name="skillWeight" value="${workorderAchievement.skillWeight}" onchange="workTimeFunction()" autocomplete="off">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*个人绩效工时</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="actualWorkTime" name="actualWorkTime" value="${workorderAchievement.actualWorkTime}" readonly="true" autocomplete="off">
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*参与内容</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="participateContent" name="participateContent" rows="3"
|
||||
placeholder="参与内容">${workorderAchievement.participateContent}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">说明</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="explain" name="explain" rows="3"
|
||||
placeholder="说明">${workorderAchievement.explain}</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="dosaveAchievement()">保存</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
195
WebRoot/jsp/workorder/workorderAchievementEdit.jsp
Normal file
195
WebRoot/jsp/workorder/workorderAchievementEdit.jsp
Normal file
@ -0,0 +1,195 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#solver").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {
|
||||
formId: "subFormAch",
|
||||
hiddenId: "userId",
|
||||
textId: "userName",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function dosaveAchievement() {
|
||||
$("#subFormAch").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subFormAch").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/workorder/workorderAchievement/doupdate.do", $("#subFormAch").serialize(), function (data) {
|
||||
// $.post(ext.contextPath + "/workorder/workorderAchievement/dosave.do", {projectRole:'角色1'}, function(data) {
|
||||
if (data.res == 1) {
|
||||
|
||||
//计算总工时及剩余工时
|
||||
//doCountWorkingHours();
|
||||
|
||||
closeModal('subModalAchievement')
|
||||
$("#table_achievements").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subFormAch").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
userName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '请选择人员'
|
||||
}
|
||||
}
|
||||
},
|
||||
projectRole: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '项目角色不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
workTime: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工单工时不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
// evaluateScore: {
|
||||
// validators: {
|
||||
// notEmpty: {
|
||||
// message: '评价得分不能为空'
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// skillWeight: {
|
||||
// validators: {
|
||||
// notEmpty: {
|
||||
// message: '个人绩效工时不能为空'
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// actualWorkTime: {
|
||||
// validators: {
|
||||
// notEmpty: {
|
||||
// message: '工单工时不能为空'
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
participateContent: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '参与内容不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function workTimeFunction() {
|
||||
var workTime = $('#workTime').val();
|
||||
var evaluateScore = $('#evaluateScore').val();
|
||||
var skillWeight = $('#skillWeight').val();
|
||||
|
||||
var actualWorkTime = 0;
|
||||
if (evaluateScore != null && evaluateScore != '' && evaluateScore != '0' && skillWeight != null && skillWeight != '' && skillWeight != '0') {
|
||||
actualWorkTime = parseFloat(workTime) + (parseFloat(evaluateScore) * parseFloat(skillWeight));
|
||||
} else {
|
||||
actualWorkTime = workTime;
|
||||
}
|
||||
$('#actualWorkTime').val(actualWorkTime);
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModalAchievement">
|
||||
<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强制为subFormAch -->
|
||||
<form class="form-horizontal" id="subFormAch">
|
||||
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" name="id" value="${workorderAchievement.id}">
|
||||
<input type="hidden" class="form-control" name="pid" value="${workorderAchievement.pid}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*人员</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="userName" name="userName" placeholder="请选择人员"
|
||||
onclick="showUser4SelectsFun();" value="${userName}">
|
||||
<input id="userId" name="userId" type="hidden" value="${workorderAchievement.userId}"/>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*工单工时</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="workTime" name="workTime"
|
||||
value="${workorderAchievement.workTime}" step="0.01" onchange="workTimeFunction()">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">项目角色</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="projectRole" name="projectRole"
|
||||
value="${workorderAchievement.projectRole}">
|
||||
</div>
|
||||
<!-- <label class="col-sm-2 control-label">*评价得分</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="evaluateScore" name="evaluateScore" value="${workorderAchievement.evaluateScore}" step="0.01" onchange="workTimeFunction()">
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*技能等级权重</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="skillWeight" name="skillWeight" value="${workorderAchievement.skillWeight}" step="0.01" onchange="workTimeFunction()">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*个人绩效工时</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="actualWorkTime" name="actualWorkTime" value="${workorderAchievement.actualWorkTime}" step="0.01" >
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*参与内容</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="participateContent" name="participateContent" rows="3"
|
||||
placeholder="参与内容">${workorderAchievement.participateContent}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">说明</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="explain" name="explain" rows="3"
|
||||
placeholder="说明">${workorderAchievement.explain}</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="dosaveAchievement()">保存</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
157
WebRoot/jsp/workorder/workorderAchievementView.jsp
Normal file
157
WebRoot/jsp/workorder/workorderAchievementView.jsp
Normal file
@ -0,0 +1,157 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<script type="text/javascript">
|
||||
/*
|
||||
* 加载绩效附表
|
||||
*/
|
||||
function getWorkAchievements(pid){
|
||||
$("#table_achievements").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/workorder/workorderAchievement/getList.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,
|
||||
pid: pid
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '姓名', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
formatter: function (value, row, index) {
|
||||
if(row.user!=null && row.user!=''){
|
||||
return row.user.caption;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '项目角色', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.projectRole;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '参与内容', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + row.participateContent + "'>" + row.participateContent + "</span>";
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '绩效工时(小时)', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.workTime;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '说明', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + row.explain + "'>" + row.explain + "</span>";
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table_achievements");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* 删除
|
||||
*/
|
||||
var deleteAchievementFun = function () {
|
||||
var checkedItems = $("#table_achievements").bootstrapTable('getSelections');
|
||||
var datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
datas += item.id + ",";
|
||||
});
|
||||
if (datas == "") {
|
||||
showAlert('d', '请先选择记录', 'mainAlertdiv2');
|
||||
} 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 + '/workorder/workorderAchievement/dodeletes.do', { ids: datas }, function (data) {
|
||||
var datastr = eval('(' + data + ')');
|
||||
if (datastr.code == 1) {
|
||||
|
||||
//计算总工时及剩余工时
|
||||
doCountWorkingHours();
|
||||
|
||||
$("#table_achievements").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv2');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var doAchievementAdd = function(pid){
|
||||
$.post(ext.contextPath + '/workorder/workorderAchievement/doadd.do', {pid:pid} , function(data) {
|
||||
$("#subDiv_achievement").html(data);
|
||||
openModal('subModalAchievement');
|
||||
});
|
||||
}
|
||||
|
||||
var doAchievementEdit = function(id){
|
||||
$.post(ext.contextPath + '/workorder/workorderAchievement/doedit.do', {id:id} , function(data) {
|
||||
$("#subDiv_achievement").html(data);
|
||||
openModal('subModalAchievement');
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
115
WebRoot/jsp/workorder/workorderConsumeEdit.jsp
Normal file
115
WebRoot/jsp/workorder/workorderConsumeEdit.jsp
Normal file
@ -0,0 +1,115 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function doupdate() {
|
||||
$.post(ext.contextPath + "/workorder/workorderConsume/doupdate.do", $("#subFormDetail").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
$("#table_outStockDetail").bootstrapTable('refresh');
|
||||
closeModal("subModalDetail");
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
$("#subFormDetail").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
repairName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '维修内容不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
selfActualHour: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '实际工时不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
outsourceActualFee: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '委外实际工时费不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* 自动计划合计金额
|
||||
*/
|
||||
function totalPriceFunction() {
|
||||
var number = $('#number').val();
|
||||
var price = $('#price').val();
|
||||
var totalPrice = number * price;
|
||||
$('#totalPrice').val(totalPrice.toFixed(2));
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModalDetail">
|
||||
<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强制为subFormDetail -->
|
||||
<form class="form-horizontal" id="subFormDetail">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${workorderConsume.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">物品名称</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${workorderConsume.goods.name}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">规格型号</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${workorderConsume.goods.model}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">消耗数量</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="number" name="number"
|
||||
value="${workorderConsume.number}" step="0.01" onchange="totalPriceFunction()">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">单价(元)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="price" name="price"
|
||||
value="${workorderConsume.price}" step="0.01" onchange="totalPriceFunction()">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">合计(元)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="totalPrice" name="totalPrice"
|
||||
value="${workorderConsume.totalPrice}" step="0.01" readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</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()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
484
WebRoot/jsp/workorder/workorderDetailEndList.jsp
Normal file
484
WebRoot/jsp/workorder/workorderDetailEndList.jsp
Normal file
@ -0,0 +1,484 @@
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail" %>
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceCommString" %>
|
||||
<%@page import="com.sipai.entity.workorder.WorkorderDetail" %>
|
||||
<%@ 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_Start", WorkorderDetail.Status_Start);%>
|
||||
<%request.setAttribute("Status_Finish", WorkorderDetail.Status_Finish);%>
|
||||
<%request.setAttribute("Status_Compete", WorkorderDetail.Status_Compete);%>
|
||||
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_REPAIR", MaintenanceCommString.MAINTENANCE_TYPE_REPAIR);%>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_OVERHAUL", MaintenanceCommString.MAINTENANCE_TYPE_OVERHAUL);%>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_MAINTAIN", MaintenanceCommString.MAINTENANCE_TYPE_MAINTAIN);%>
|
||||
|
||||
<%request.setAttribute("REPAIR", WorkorderDetail.REPAIR);%>
|
||||
<%request.setAttribute("MAINTAIN", WorkorderDetail.MAINTAIN);%>
|
||||
<%request.setAttribute("ANTISEPTIC", WorkorderDetail.ANTISEPTIC);%>
|
||||
<%request.setAttribute("LUBRICATION", WorkorderDetail.LUBRICATION);%>
|
||||
<%request.setAttribute("INSTRUMENT", WorkorderDetail.INSTRUMENT);%>
|
||||
|
||||
<%request.setAttribute("planIn", WorkorderDetail.planIn);%>
|
||||
<%request.setAttribute("planOut", WorkorderDetail.planOut);%>
|
||||
|
||||
<%request.setAttribute("smallRepair", WorkorderDetail.smallRepair);%>
|
||||
<%request.setAttribute("middleRepair", WorkorderDetail.middleRepair);%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<head>
|
||||
|
||||
<%--<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">--%>
|
||||
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- 文件上传-->
|
||||
<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>
|
||||
<style type="text/css">
|
||||
.main-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.content-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main-footer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.table-hover > tbody > tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
//新增
|
||||
var addFun = function () {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/doAddEndRepair.do', {unitId: unitId}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
//浏览
|
||||
var viewFun = function (id, type) {
|
||||
stopBubbleDefaultEvent();
|
||||
if (type == '${REPAIR}') {
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/doViewRepair.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
if (type == '${MAINTAIN}') {
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/doViewMaintain.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//流程详情
|
||||
var viewDetailFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/showWorkorderDetailRepairProcessView.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('processViewModal');
|
||||
});
|
||||
};
|
||||
var getExs = function () {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
datas += "'" + item.id + "',"
|
||||
});
|
||||
console.log("datas is ", datas)
|
||||
if (datas === "") {
|
||||
showAlert('d', '请选中之后导出', 'mainAlertdiv');
|
||||
} else {
|
||||
window.open(ext.contextPath + "/workorder/workorderDetail/doExportRep.do?ids=" + datas + "&type=repair");
|
||||
}
|
||||
}
|
||||
var deletesFun = function () {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
//进入流程的不能删除
|
||||
if (item.status == null || item.status == '0' || item.status == '' || item.status == '${Status_Compete}') {
|
||||
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 + '/workorder/workorderDetail/delete4Repair.do', {ids: datas}, function (data) {
|
||||
if (data > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//刷新表格
|
||||
var dosearch = function () {
|
||||
initFun();
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
//加载完厂区后,初始化工艺段和表格
|
||||
function initFun() {
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/workorder/workorderDetail/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
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: unitId,
|
||||
// processSectionId: $('#processSection').val(),
|
||||
status: '${Status_Finish}',
|
||||
type: '${type}',//维修类型
|
||||
date: $('#reservationtimeD').val(),
|
||||
name: $('#name').val(),
|
||||
// sdt: beginTimeStore2,
|
||||
// edt: endTimeStore2,
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {
|
||||
// viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true,
|
||||
<%--width: '40px',--%>
|
||||
<%--formatter: function (value, row, index) {--%>
|
||||
<%-- if (row.status == null || row.status == '0' || row.status == '' || row.status == '${Status_Compete}') {--%>
|
||||
<%-- return {disabled: false,}--%>
|
||||
<%-- } else {--%>
|
||||
<%-- return {disabled: true,}--%>
|
||||
<%-- }--%>
|
||||
<%--}--%>
|
||||
},
|
||||
{
|
||||
field: 'type', // 返回json数据中的name
|
||||
title: '类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) { //REPAIR MAINTAIN
|
||||
if (value == '${REPAIR}') {
|
||||
return '维修';
|
||||
}
|
||||
if (value == '${MAINTAIN}') {
|
||||
return '保养';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'company.name', // 返回json数据中的name
|
||||
title: '所属厂区', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},
|
||||
{
|
||||
field: 'jobNumber', // 返回json数据中的name
|
||||
title: '工单编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},
|
||||
{
|
||||
field: 'jobName', // 返回json数据中的name
|
||||
title: '工单名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},
|
||||
{
|
||||
field: 'equipmentCard.equipmentcardid', // 返回json数据中的name
|
||||
title: '设备编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'equipmentCard.equipmentname', // 返回json数据中的name
|
||||
title: '设备名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
/*{
|
||||
field: 'performanceHour', // 返回json数据中的name
|
||||
title: '绩效工时', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},*/
|
||||
{
|
||||
field: 'insdt', // 返回json数据中的name
|
||||
title: '发起时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
return value.substring(0, 19);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status', // 返回json数据中的name
|
||||
title: '问题状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function (value, row, index) {
|
||||
if (value == '${Status_Start}' && row.type == '${TYPE_SUPPLEMENT}') {
|
||||
return '处理中';
|
||||
} else if (value == '${Status_Start}') {
|
||||
return '已下发';
|
||||
} else if (value == '${Status_Compete}') {
|
||||
return '待抢单';
|
||||
} else if (value == '${Status_Finish}') {
|
||||
return '已完成';
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = '';
|
||||
buts += '<button type="button" class="btn btn-default btn-sm" title="浏览" onclick="viewFun(\'' + row.id + '\',\'' + row.type + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 浏览</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="viewDetailFun(\'' + row.id + '\')" 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");
|
||||
console.info("加载数据成功");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
};
|
||||
|
||||
function initDate1() {
|
||||
var locale = {
|
||||
"format": 'YYYY-MM-DD HH:mm',
|
||||
"separator": " ~ ",
|
||||
"applyLabel": "确定",
|
||||
"cancelLabel": "取消",
|
||||
"fromLabel": "起始时间",
|
||||
"toLabel": "结束时间'",
|
||||
"customRangeLabel": "自定义",
|
||||
"weekLabel": "W",
|
||||
"daysOfWeek": ["日", "一", "二", "三", "四", "五", "六"],
|
||||
"monthNames": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||||
"firstDay": 1
|
||||
};
|
||||
|
||||
var oldreservationtime1 = "${param.oldreservationtime1}";
|
||||
if (oldreservationtime1 != "" && oldreservationtime1.length > 0) {
|
||||
beginTimeStore1 = oldreservationtime1.substring(0, 16);
|
||||
endTimeStore1 = oldreservationtime1.substring(19, 36);
|
||||
$('#reservationtimeD').val(oldreservationtime1);
|
||||
} else {
|
||||
beginTimeStore1 = moment().subtract(3, 'days').format('YYYY-MM-DD HH:mm');
|
||||
endTimeStore1 = moment().subtract(0, 'days').format('YYYY-MM-DD HH:mm');
|
||||
$('#reservationtimeD').val(beginTimeStore1 + locale.separator + endTimeStore1);
|
||||
}
|
||||
|
||||
$('#reservationtimeD').daterangepicker({
|
||||
"timePicker": true,
|
||||
"timePicker24Hour": true,
|
||||
"linkedCalendars": false,
|
||||
"autoUpdateInput": false,
|
||||
"timePickerIncrement": 10,
|
||||
"locale": locale,
|
||||
//汉化按钮部分
|
||||
ranges: {
|
||||
// '今日': [moment(), moment().subtract(-1, 'days')],
|
||||
'昨日': [moment().subtract(1, 'days'), moment()],
|
||||
'最近7日': [moment().subtract(6, 'days'), moment().subtract(-1, 'days')],
|
||||
'本月': [moment().startOf('month'), moment().endOf('month').subtract(-1, 'days')],
|
||||
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month').subtract(-1, 'days')]
|
||||
},
|
||||
startDate: beginTimeStore1,
|
||||
endDate: endTimeStore1
|
||||
}, function (start, end, label) {
|
||||
beginTimeStore1 = start.format(this.locale.format);
|
||||
endTimeStore1 = end.format(this.locale.format);
|
||||
if (!this.startDate) {
|
||||
this.element.val('');
|
||||
} else {
|
||||
this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
$(function () {
|
||||
initDate1();
|
||||
$(".daterangepicker").css({'width': '680px'});
|
||||
var flag = IsApp();
|
||||
if (flag == true) {
|
||||
|
||||
} else {
|
||||
$(".main-header").show();
|
||||
$(".content-header").show();
|
||||
$(".main-footer").show();
|
||||
}
|
||||
$('#reservationtimeD').val('');
|
||||
initFun();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<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 id="subDiv_achievement"></div>
|
||||
<div id="subDivDetail"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div id="fault4SelectDiv"></div>
|
||||
<div id="handleDetailDiv"></div>
|
||||
<div id="maintainPlanDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="emSubDiv"></div>
|
||||
<div>
|
||||
<div class="form-group " style="padding:0;">
|
||||
<div class="btn-group" style="width: 280px;padding-bottom:10px;">
|
||||
<%--<security:authorize buttonUrl="maintenance/addDetail.do">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i
|
||||
class="fa fa-plus"></i> 补录
|
||||
</button>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i
|
||||
class="fa fa-trash-o"></i> 删除
|
||||
</button>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="getExs();"><i
|
||||
class="fa fa-file-excel-o" aria-hidden="true"></i> 批量导出
|
||||
</button>
|
||||
</security:authorize>--%>
|
||||
</div>
|
||||
<div class="form-group pull-right form-inline">
|
||||
<div class="input-group input-group-sm pull-left">
|
||||
<input type="text" autocomplete="off" class="form-control pull-left"
|
||||
style="height: 34px; width: 200px;" id="reservationtimeD" style="width:320px;"
|
||||
placeholder="请选择日期">
|
||||
</div>
|
||||
<div class="input-group input-group-sm pull-right" style="width: 200px;">
|
||||
<div class="input-group input-group-sm" style="width: 200px;">
|
||||
<input type="text" id="name" name="name" style="height: 34px;"
|
||||
class="form-control pull-right"
|
||||
placeholder="请输入人员姓名">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height: 34px;" onclick="dosearch();"><i
|
||||
class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
document.write("<scr" + "ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js\"></sc" + "ript>")
|
||||
document.write("<scr" + "ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js\"></sc" + "ript>")
|
||||
</script>
|
||||
<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>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
522
WebRoot/jsp/workorder/workorderDetailEndMaintainAdd.jsp
Normal file
522
WebRoot/jsp/workorder/workorderDetailEndMaintainAdd.jsp
Normal file
@ -0,0 +1,522 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
|
||||
<%@page import="com.sipai.entity.workorder.WorkorderDetail" %>
|
||||
<%request.setAttribute("MAINTAIN", WorkorderDetail.MAINTAIN);%>
|
||||
<%request.setAttribute("ANTISEPTIC", WorkorderDetail.ANTISEPTIC);%>
|
||||
<%request.setAttribute("LUBRICATION", WorkorderDetail.LUBRICATION);%>
|
||||
<%request.setAttribute("INSTRUMENT", WorkorderDetail.INSTRUMENT);%>
|
||||
|
||||
<%@page import="com.sipai.tools.CommString" %>
|
||||
<%request.setAttribute("Active_False", CommString.Active_False); %>
|
||||
<%request.setAttribute("Active_True", CommString.Active_True); %>
|
||||
|
||||
<%@ page import="com.sipai.entity.activiti.ProcessType" %>
|
||||
<%request.setAttribute("Workorder_Maintain", ProcessType.Workorder_Maintain); %>
|
||||
|
||||
<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 masterId = '${id}';
|
||||
var tbName = 'tb_maintenance_problem_fille'; //数据表
|
||||
var nameSpace = 'MaintenanceProblem';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
/* var student = {
|
||||
"caption":"lilei",
|
||||
|
||||
}
|
||||
previewConfigs[0]=student; */
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove: false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse: false,//选择按钮
|
||||
showClose: false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
fileActionSettings: {
|
||||
showDrag: false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount: true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig: previewConfigs,
|
||||
layoutTemplates: {
|
||||
actionUpload: ''
|
||||
},
|
||||
deleteUrl: ext.contextPath + "/base/deleteInputFile.do",
|
||||
deleteExtraData: function () { //传参
|
||||
var data = {
|
||||
"tbName": tbName
|
||||
};
|
||||
return data;
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function () {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow", "auto");
|
||||
});
|
||||
}
|
||||
|
||||
//名称定义不可修改
|
||||
var getFileList = function () {
|
||||
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId: masterId, tbName: tbName}, function (data) {
|
||||
//console.info(data)
|
||||
if (data.length > 0) {
|
||||
previews = new Array();
|
||||
$('#maintenancefile').show();
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path = path.substring(path.indexOf('webapps') + 7, path.length);
|
||||
path = ext.basePath.replace(ext.contextPath, '') + path.replace(/\\/g, "\/");
|
||||
;
|
||||
previews.push(path);
|
||||
previewConfig['width'] = '50px';
|
||||
previewConfig['caption'] = data[i].filename;
|
||||
previewConfig['key'] = data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput("maintenanceDetailFile");
|
||||
} else {
|
||||
$('#maintenanceDetailFile').hide();
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
};
|
||||
var fileinput = function () {
|
||||
//var url='/maintenance/updateProblemFile.do';//保存数据表方法
|
||||
$.post(ext.contextPath + '/base/fileinput.do', {
|
||||
masterId: masterId,
|
||||
tbName: tbName,
|
||||
nameSpace: nameSpace
|
||||
}, function (data) {
|
||||
$("#fileInputDiv").html(data);
|
||||
openModal('fileInputModal');
|
||||
});
|
||||
};
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#receiveUserId").val();
|
||||
$.post(ext.contextPath + '/user/layerUser.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "receiveUserId",
|
||||
textId: "targetUsersName",
|
||||
userIds: userIds,
|
||||
unitId: unitId, //获取右上角的厂id
|
||||
type: '${Workorder_Maintain}' //根据不同流程找到第一个节点的配置职位 ProcessType中的id
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
var showContacts4SelectsFun = function () {
|
||||
var userIds = $("#contactids").val();
|
||||
var companyId = $("#companyid").val();
|
||||
//alert(companyId)
|
||||
if (null == companyId || '' == companyId) {
|
||||
showAlert('d', "请先选择厂区!");
|
||||
return;
|
||||
}
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "contactids",
|
||||
textId: "contactname",
|
||||
userIds: userIds,
|
||||
companyId: companyId
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
/* function dolaunch() {
|
||||
$('#status').val('${Status_Launch}')
|
||||
dosave();
|
||||
} */
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/workorder/workorderDetail/doInEndRepair.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
targetUsersName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '接收人员不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
planDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '计划日期不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
jobName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工单名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
equipname: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '设备不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
//流程审核文件上传所需参数
|
||||
var masterId_process = '${id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process = 'ProcessUploadFile';//保存文件夹
|
||||
var status = 'delete';//有删除权限
|
||||
|
||||
|
||||
$(function () {
|
||||
//初始化隐藏
|
||||
$("#inputEqu").hide();
|
||||
|
||||
$('#planDate').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd',
|
||||
}).on('hide', function (e) {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('planDate', 'NOT_VALIDATED', null)
|
||||
.validateField('planDate');
|
||||
});
|
||||
$('#planDate').datepicker('setDate', '${nowDate.substring(0, 10)}');
|
||||
//选择工艺段
|
||||
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId: "${company.id}"}, function (data) {
|
||||
var selelct_ = $("#processSectionId").select2({
|
||||
data: data,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过10个,启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct_.on('change', function () {
|
||||
//工艺段选择后,清空原有工艺段选择的设备
|
||||
$("#equipmentIds").val("");
|
||||
$("#equipname").val("");
|
||||
})
|
||||
}, 'json');
|
||||
|
||||
getFileList();
|
||||
getFileList_process();
|
||||
|
||||
compete();
|
||||
})
|
||||
|
||||
//选择设备,根据厂区id和工艺段id选择厂内设备,可多选
|
||||
/*var showEquipment4SelectsFun = function (formId, hiddenId, textId) {
|
||||
var equipmentIds = $('#' + hiddenId).val();
|
||||
var pSectionId = $("#processSectionId").val();
|
||||
var companyId = '${company.id}';
|
||||
$.post(ext.contextPath + '/equipment/showEquipmentCardForAbnormitySelects.do', {
|
||||
formId: formId,
|
||||
hiddenId: hiddenId,
|
||||
textId: textId,
|
||||
companyId: companyId,
|
||||
equipmentIds: equipmentIds,
|
||||
pSectionId: pSectionId
|
||||
}, function (data) {
|
||||
$("#equ4SelectDiv").html(data);
|
||||
openModal("equipment4SelectModal");
|
||||
});
|
||||
};*/
|
||||
|
||||
//选择设备,根据厂区id和工艺段id选择厂内设备,可多选
|
||||
var showEquipment4SelectsFun = function (formId, hiddenId, textId) {
|
||||
var companyId = '${company.id}';
|
||||
var equipmentIds = $('#' + hiddenId).val();
|
||||
var processSectionId = $("#processSectionId").val();
|
||||
$.post(ext.contextPath + '/equipment/selectEquipmentCard4Choice.do', {
|
||||
formId: formId,
|
||||
hiddenId: hiddenId,
|
||||
textId: textId,
|
||||
unitId: companyId,
|
||||
equipmentIds: equipmentIds,
|
||||
processSectionId: processSectionId,
|
||||
choiceType: 'main'//通过保养模块过来的,需要筛选近期需要保养的功能
|
||||
}, function (data) {
|
||||
$("#equ4SelectDiv").html(data);
|
||||
openModal("equipment4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
//保存选择设备 datas为id
|
||||
var doFinishSelectEquipment = function (datas_id, datas_name) {
|
||||
console.log(datas_id, datas_name)
|
||||
if (datas_id.indexOf(",") != -1 || datas_id.indexOf(",") != -1) {
|
||||
alert('无法选择多台设备!');
|
||||
} else {
|
||||
$('#equipmentIds').val(datas_id);
|
||||
$('#equipname').val(datas_name);
|
||||
closeModal("equipment4SelectModal");
|
||||
jobNameFuction();
|
||||
}
|
||||
}
|
||||
|
||||
//选择故障类型,可多选
|
||||
var showProblemType4SelectsFun = function (formId, hiddenId, textId) {
|
||||
var problemTypeIds = $('#' + hiddenId).val();
|
||||
$.post(ext.contextPath + '/maintenance/faultLibrary/showFaultTypeForSelects.do', {
|
||||
formId: formId,
|
||||
hiddenId: hiddenId,
|
||||
textId: textId,
|
||||
problemTypeIds: problemTypeIds
|
||||
}, function (data) {
|
||||
$("#problemTyp4SelectDiv").html(data);
|
||||
openModal("problemTyp4SelectModal");
|
||||
});
|
||||
};
|
||||
var inputEquFun = function () {
|
||||
$("#selectEqu").hide();
|
||||
$("#inputEqu").show();
|
||||
$("#equipmentIds").val("");
|
||||
$("#equipname").val("");
|
||||
}
|
||||
var selectEquFun = function () {
|
||||
$("#selectEqu").show();
|
||||
$("#inputEqu").hide();
|
||||
$("#manualInputEquipment").val("");
|
||||
}
|
||||
|
||||
//选择故障库
|
||||
var showFaultLibrary = function (formId, hiddenId, textId) {
|
||||
var libraryId = $('#' + hiddenId).val();
|
||||
var equipmentIds = $("#equipmentIds").val();
|
||||
if (companyId == "" || equipmentIds == "" || companyId == null || equipmentIds == null) {
|
||||
showAlert('d', '请先选择设备');
|
||||
} else {
|
||||
$.post(ext.contextPath + '/maintenance/libraryFaultBloc/showFaultLibrary4Equpment.do', {
|
||||
libraryId: libraryId,
|
||||
companyId: companyId,
|
||||
equipmentIds: equipmentIds
|
||||
}, function (data) {
|
||||
$("#library4SelectDiv").html(data);
|
||||
openModal('library4SelectModal');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//弹出班组列表
|
||||
var showTeam4Handle = function () {
|
||||
var userIds = $("#targetusers").val();
|
||||
var jobIds = '';
|
||||
$.post(ext.contextPath + '/user/teamForSelectByCompany.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "targetusers",
|
||||
textId: "targetTeamsName",
|
||||
userIds: userIds,
|
||||
jobIds: jobIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function compete() {
|
||||
//默认下发给人员 隐藏班组
|
||||
$("#selectDepts").attr("style", "display:none;");
|
||||
//初始化抢单
|
||||
var selelct_compete = $("#compete").select2({
|
||||
minimumResultsForSearch: 10
|
||||
});
|
||||
selelct_compete.on('change', function () {
|
||||
var compete = $('#compete').val();
|
||||
if ('${Active_True}' == compete) {//切换到抢单
|
||||
$("#selectUsers").attr("style", "display:none;");
|
||||
$("#selectDepts").attr("style", "display:block;");
|
||||
|
||||
$("#targetUsersName").val('');
|
||||
}
|
||||
if ('${Active_False}' == compete) {//切换到非抢单
|
||||
$("#selectUsers").attr("style", "display:block;");
|
||||
$("#selectDepts").attr("style", "display:none;");
|
||||
|
||||
$("#targetTeamsName").val('');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//自动显示工单名称
|
||||
function jobNameFuction() {
|
||||
var nowTime = '${nowDate.substring(0, 10)}';
|
||||
var equipname = $('#equipname').val();
|
||||
var type = $('#type').val();
|
||||
if (type == '${MAINTAIN}') {
|
||||
type = '保养';
|
||||
}
|
||||
if (type == '${ANTISEPTIC}') {
|
||||
type = '防腐';
|
||||
}
|
||||
if (type == '${LUBRICATION}') {
|
||||
type = '润滑';
|
||||
}
|
||||
if (type == '${INSTRUMENT}') {
|
||||
type = '仪表';
|
||||
}
|
||||
$('#jobName').val(nowTime + '_' + equipname + '_' + type);
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-xlg">
|
||||
<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" enctype="multipart/form-data">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" name="id" value="${id}">
|
||||
<input type="hidden" class="form-control" name="saveType" value="1">
|
||||
<input type="hidden" class="form-control" name="isCompete" value="0">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">所属公司</label>
|
||||
<div class="col-sm-10">
|
||||
<input name="unitId" type="hidden" value="${company.id}"/>
|
||||
<p class="form-control-static">${company.name}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工单编号</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="jobNumber" name="jobNumber" value="${jobNumber}"
|
||||
readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*保养设备</label>
|
||||
<div class="col-sm-10">
|
||||
<input id="equipmentIds" name="equipmentId" type="hidden" value=""/>
|
||||
<input class="form-control" id="equipname" name="equipname"
|
||||
onclick="showEquipment4SelectsFun('subForm','equipmentIds','equipname');"
|
||||
placeholder="点击选择设备..." autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工单名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="jobName" name="jobName" value="${jobName}"
|
||||
placeholder="选择设备后会自动生成..."
|
||||
autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">保养类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="type" name="type" class="form-control select2" onblur="jobNameFuction()">
|
||||
<option value="${MAINTAIN}"
|
||||
<c:if test="${'${MAINTAIN}' == workorderDetail.type }">selected</c:if>>
|
||||
保养
|
||||
</option>
|
||||
<option value="${ANTISEPTIC}"
|
||||
<c:if test="${'${ANTISEPTIC}' == workorderDetail.type }">selected</c:if>>
|
||||
防腐
|
||||
</option>
|
||||
<option value="${LUBRICATION}"
|
||||
<c:if test="${'${LUBRICATION}' == workorderDetail.type }">selected</c:if>>
|
||||
润滑
|
||||
</option>
|
||||
<option value="${INSTRUMENT}"
|
||||
<c:if test="${'${INSTRUMENT}' == workorderDetail.type }">selected</c:if>>
|
||||
仪表
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<!-- <label class="col-sm-2 control-label">计划费用/元</label>
|
||||
<div class="col-sm-4">
|
||||
<input class="form-control" id="planMoney" name ="planMoney" type="number" value= 0.00 min = "0" step= "50.01" placeholder="请输入">
|
||||
</div> -->
|
||||
|
||||
<label class="col-sm-2 control-label">计划完成时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="planDate" name="planDate"
|
||||
style="width: 132px;" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">保养内容:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control " id="schemeResume" name="schemeResume" rows="2"
|
||||
placeholder="保养内容...">${workorderDetail.schemeResume}</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>
|
||||
</div>
|
||||
</div>
|
||||
643
WebRoot/jsp/workorder/workorderDetailEndMaintainList.jsp
Normal file
643
WebRoot/jsp/workorder/workorderDetailEndMaintainList.jsp
Normal file
@ -0,0 +1,643 @@
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail" %>
|
||||
<%@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" %>
|
||||
|
||||
<%@page import="com.sipai.entity.workorder.WorkorderDetail" %>
|
||||
<%request.setAttribute("Status_Start", WorkorderDetail.Status_Start);%>
|
||||
<%request.setAttribute("Status_Finish", WorkorderDetail.Status_Finish);%>
|
||||
<%request.setAttribute("Status_Compete", WorkorderDetail.Status_Compete);%>
|
||||
|
||||
<%request.setAttribute("REPAIR", WorkorderDetail.REPAIR);%>
|
||||
<%request.setAttribute("MAINTAIN", WorkorderDetail.MAINTAIN);%>
|
||||
<%request.setAttribute("ANTISEPTIC", WorkorderDetail.ANTISEPTIC);%>
|
||||
<%request.setAttribute("LUBRICATION", WorkorderDetail.LUBRICATION);%>
|
||||
<%request.setAttribute("INSTRUMENT", WorkorderDetail.INSTRUMENT);%>
|
||||
|
||||
<%request.setAttribute("planIn", WorkorderDetail.planIn);%>
|
||||
<%request.setAttribute("planOut", WorkorderDetail.planOut);%>
|
||||
|
||||
<%request.setAttribute("smallRepair", WorkorderDetail.smallRepair);%>
|
||||
<%request.setAttribute("middleRepair", WorkorderDetail.middleRepair);%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- 文件上传-->
|
||||
<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>
|
||||
<style type="text/css">
|
||||
.main-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.content-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main-footer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.table-hover > tbody > tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var bizid = '';
|
||||
var $table;
|
||||
var switchStatus = false;
|
||||
var selectionIds = []; //保存选中ids
|
||||
|
||||
var beginTimeStore2 = '';
|
||||
var endTimeStore2 = '';
|
||||
|
||||
function initDate1() {
|
||||
var locale = {
|
||||
"format": 'YYYY-MM-DD HH:mm',
|
||||
"separator": " ~ ",
|
||||
"applyLabel": "确定",
|
||||
"cancelLabel": "取消",
|
||||
"fromLabel": "起始时间",
|
||||
"toLabel": "结束时间'",
|
||||
"customRangeLabel": "自定义",
|
||||
"weekLabel": "W",
|
||||
"daysOfWeek": ["日", "一", "二", "三", "四", "五", "六"],
|
||||
"monthNames": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||||
"firstDay": 1
|
||||
};
|
||||
|
||||
var oldreservationtime1 = "${param.oldreservationtime1}";
|
||||
if (oldreservationtime1 != "" && oldreservationtime1.length > 0) {
|
||||
beginTimeStore1 = oldreservationtime1.substring(0, 16);
|
||||
endTimeStore1 = oldreservationtime1.substring(19, 36);
|
||||
$('#reservationtimeD').val(oldreservationtime1);
|
||||
} else {
|
||||
beginTimeStore1 = moment().subtract(3, 'days').format('YYYY-MM-DD HH:mm');
|
||||
endTimeStore1 = moment().subtract(0, 'days').format('YYYY-MM-DD HH:mm');
|
||||
$('#reservationtimeD').val(beginTimeStore1 + locale.separator + endTimeStore1);
|
||||
}
|
||||
|
||||
$('#reservationtimeD').daterangepicker({
|
||||
"timePicker": true,
|
||||
"timePicker24Hour": true,
|
||||
"linkedCalendars": false,
|
||||
"autoUpdateInput": false,
|
||||
"timePickerIncrement": 10,
|
||||
"locale": locale,
|
||||
//汉化按钮部分
|
||||
ranges: {
|
||||
// '今日': [moment(), moment().subtract(-1, 'days')],
|
||||
'昨日': [moment().subtract(1, 'days'), moment()],
|
||||
'最近7日': [moment().subtract(6, 'days'), moment().subtract(-1, 'days')],
|
||||
'本月': [moment().startOf('month'), moment().endOf('month').subtract(-1, 'days')],
|
||||
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month').subtract(-1, 'days')]
|
||||
},
|
||||
startDate: beginTimeStore1,
|
||||
endDate: endTimeStore1
|
||||
}, function (start, end, label) {
|
||||
beginTimeStore1 = start.format(this.locale.format);
|
||||
endTimeStore1 = end.format(this.locale.format);
|
||||
if (!this.startDate) {
|
||||
this.element.val('');
|
||||
} else {
|
||||
this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
//浏览
|
||||
var viewFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/doViewMaintain.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
//流程详情
|
||||
var viewDetailFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/showWorkorderDetailRepairProcessView.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('processViewModal');
|
||||
});
|
||||
};
|
||||
//刷新表格
|
||||
var dosearch = function () {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
//加载完厂区后,初始化工艺段和表格
|
||||
function initFun() {
|
||||
//选择工艺段
|
||||
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId: bizid}, function (data) {
|
||||
$("#processSection").empty();
|
||||
var selelct_ = $("#processSection").select2({
|
||||
data: data,
|
||||
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;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct_.val("").trigger("change");
|
||||
selelct_.on("change", function (e) {
|
||||
dosearch();
|
||||
});
|
||||
}, 'json');
|
||||
|
||||
$table = $("#table").bootstrapTable({
|
||||
url: ext.contextPath + '/workorder/workorderDetail/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50, 100, 200, 500], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
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: bizid,
|
||||
status: '1',//1为已完成
|
||||
type: '${MAINTAIN},${ANTISEPTIC},${LUBRICATION},${INSTRUMENT}',
|
||||
date: $('#reservationtimeD').val(),
|
||||
name: $('#name').val(),
|
||||
monthDt: '${param.monthDt}',
|
||||
equipmentId: '${equipmentId}',//用于app调用网页传参使用
|
||||
isCompete: $('#isCompete1').val(),
|
||||
searchContent: $('#searchContent').val(),
|
||||
// jobNumber: $('#jobNumber1').val(),
|
||||
// jobName: $('#jobName1').val(),
|
||||
// equipmentcardid: $('#equipmentcardid').val(),
|
||||
// equipmentname: $('#equipmentname').val(),
|
||||
saveType: $('#saveType1').val()
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {
|
||||
// viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true,
|
||||
width: '40px'
|
||||
/*formatter: function (value, row, index) {//设置满足条件的行可以使用复选框
|
||||
if (row.saveType != '1') {
|
||||
return {
|
||||
disabled: true
|
||||
}
|
||||
} else {
|
||||
return {disabled: false}
|
||||
}
|
||||
}*/
|
||||
},
|
||||
{
|
||||
field: 'company.name', // 返回json数据中的name
|
||||
title: '所属厂区', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%'
|
||||
},
|
||||
{
|
||||
field: 'jobNumber', // 返回json数据中的name
|
||||
title: '工单编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '15%'
|
||||
},
|
||||
{
|
||||
field: 'equipmentCard.equipmentcardid', // 返回json数据中的name
|
||||
title: '设备编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '14%'
|
||||
},
|
||||
{
|
||||
field: 'equipmentCard.equipmentname', // 返回json数据中的name
|
||||
title: '设备名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '14%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + value + "'>" + value + "</span>";
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'schemeResume', // 返回json数据中的name
|
||||
title: '保养内容', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '19%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + value + "'>" + value + "</span>";
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'type', // 返回json数据中的name
|
||||
title: '类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '5%',
|
||||
formatter: function (value, row, index) { //'${MAINTAIN},${ANTISEPTIC},${LUBRICATION},${INSTRUMENT}'
|
||||
switch (value) {
|
||||
case '${MAINTAIN}':
|
||||
return '通用';
|
||||
case '${ANTISEPTIC}':
|
||||
return '防腐';
|
||||
case '${LUBRICATION}':
|
||||
return '润滑';
|
||||
case '${INSTRUMENT}':
|
||||
return '仪表';
|
||||
default:
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'insdt', // 返回json数据中的name
|
||||
title: '发起时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
return value.substring(0, 19);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'user.caption', // 返回json数据中的name
|
||||
title: '保养人员', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '7%'
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '80px', // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = '';
|
||||
buts += '<button type="button" class="btn btn-default btn-sm" title="浏览" onclick="viewFun(\'' + row.id + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 浏览</span></button>';
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
console.info("加载数据成功");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
})
|
||||
//绑定选中事件、取消事件、全部选中、全部取消
|
||||
$table.on('check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table', function (e, rows) {
|
||||
var ids = $.map(!$.isArray(rows) ? [rows] : rows, function (row) {
|
||||
return row.id;
|
||||
});
|
||||
func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference';
|
||||
selectionIds = _[func](selectionIds, ids);
|
||||
});
|
||||
|
||||
//设备类型tree
|
||||
$.post(ext.contextPath + '/equipment/equipmentClass/getTreeJson.do', {
|
||||
ng: '',
|
||||
unitId: bizid
|
||||
}, function (data) {
|
||||
var datastr = data.result;
|
||||
if (datastr.length == 1 && !datastr[0].hasOwnProperty("nodes")) {
|
||||
//当登陆者的pid以下没有子节点时显示单独一个span
|
||||
$("#search_pid3").val(datastr[0].id);
|
||||
$("#companyselect3").hide();
|
||||
//$("#companyName3").text("公司: " + data[0].text);
|
||||
initMenu();
|
||||
} else if ((data.length == 1 && data.nodes != "") || datastr.length > 1) {
|
||||
//第一次加载时赋值
|
||||
$("#search_pid3").val(datastr[0].id);
|
||||
$("#cname_input3").val(datastr[0].text);
|
||||
//initMenu();
|
||||
$('#companytree3').treeview({
|
||||
data: datastr,
|
||||
showBorder: false,
|
||||
levels: 3,
|
||||
});
|
||||
$('#companytree3').on('nodeSelected', function (event, data) {
|
||||
$("#search_pid3").val(data.id);
|
||||
$("#cname_input3").val(data.text);
|
||||
document.getElementById('ul_tree3').style.display = "none";
|
||||
//initMenu();
|
||||
});
|
||||
} else {
|
||||
//待完善
|
||||
}
|
||||
;
|
||||
}, 'json');
|
||||
//防止点击树的+号收起下拉框
|
||||
$("#ul_tree3").on("click", function (e) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
//点击空白隐藏树
|
||||
$(document).click(function (e) {
|
||||
var divTree = $('#ul_tree3'); // 设置目标区域
|
||||
if (!divTree.is(e.target) && divTree.has(e.target).length === 0) {
|
||||
divTree.hide()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//选中事件操作数组
|
||||
var union = function (array, ids) {
|
||||
$.each(ids, function (i, id) {
|
||||
if ($.inArray(id, array) == -1) {
|
||||
array[array.length] = id;
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
|
||||
//取消选中事件操作数组
|
||||
var difference = function (array, ids) {
|
||||
$.each(ids, function (i, id) {
|
||||
var index = $.inArray(id, array);
|
||||
if (index != -1) {
|
||||
array.splice(index, 1);
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
var _ = {"union": union, "difference": difference};
|
||||
|
||||
//表格分页之前处理多选框数据
|
||||
function responseHandler(res) {
|
||||
$.each(res.rows, function (i, row) {
|
||||
row.checkStatus = $.inArray(row.id, selectionIds) != -1; //判断当前行的数据id是否存在与选中的数组,存在则将多选框状态变为true
|
||||
});
|
||||
return res;
|
||||
}
|
||||
|
||||
var getExs = function () {
|
||||
var datas = selectionIds.toString();
|
||||
if (datas === "") {
|
||||
showAlert('d', '请选中之后导出', 'mainAlertdiv');
|
||||
} else {
|
||||
// window.open(ext.contextPath + "/workorder/workorderDetail/doExportMain.do?ids=" + datas + "&type=maintain");
|
||||
var params = {
|
||||
responseType: 'blob',
|
||||
ids: datas,
|
||||
type: 'maintain'
|
||||
};
|
||||
postExcelFile(params, ext.contextPath + '/workorder/workorderDetail/doExportMain.do');
|
||||
}
|
||||
}
|
||||
|
||||
function postExcelFile(params, url) { //params是post请求需要的参数,url是请求url地址
|
||||
var form = document.createElement("form");
|
||||
form.style.display = 'none';
|
||||
form.action = url;
|
||||
form.method = "post";
|
||||
document.body.appendChild(form);
|
||||
for (var key in params) {
|
||||
var input = document.createElement("input");
|
||||
input.type = "hidden";
|
||||
input.name = key;
|
||||
input.value = params[key];
|
||||
form.appendChild(input);
|
||||
}
|
||||
form.submit();
|
||||
form.remove();
|
||||
}
|
||||
|
||||
//新增 - 补录
|
||||
var addFun = function () {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/doAddEndMaintain.do', {unitId: bizid}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
$(function () {
|
||||
bizid = unitId;
|
||||
|
||||
//用于app调用平台网页使用
|
||||
if (bizid == null || bizid == 'undefined') {
|
||||
bizid = '${unitId}';
|
||||
}
|
||||
|
||||
initDate1();
|
||||
|
||||
$(".daterangepicker").css({'width': '680px'});
|
||||
var flag = IsApp();
|
||||
if (flag == true) {
|
||||
|
||||
} else {
|
||||
$(".main-header").show();
|
||||
$(".content-header").show();
|
||||
$(".main-footer").show();
|
||||
}
|
||||
$('#reservationtimeD').val('');
|
||||
initFun();
|
||||
});
|
||||
|
||||
var deletesFun = function () {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
// if (item.saveType == 1) {
|
||||
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 + '/workorder/workorderDetail/delete4Repair.do', {ids: datas}, function (data) {
|
||||
var obj = $.parseJSON(data)
|
||||
if (obj.result > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div id="fault4SelectDiv"></div>
|
||||
<div id="handleDetailDiv"></div>
|
||||
<div id="maintainPlanDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="emSubDiv"></div>
|
||||
<div class="input-group input-group-sm pull-left">
|
||||
|
||||
<security:authorize buttonUrl="workorder/workorderDetail/supplement_main.do">
|
||||
<button type="button" class="btn btn-default btn-sm hidden-xs" onclick="addFun();">
|
||||
<i class="fa fa-plus"></i> 补录
|
||||
</button>
|
||||
</security:authorize>
|
||||
|
||||
<c:if test="${userId == 'emp01'}">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i
|
||||
class="fa fa-trash-o"></i> 删除
|
||||
</button>
|
||||
</c:if>
|
||||
|
||||
<security:authorize buttonUrl="workorder/workorderDetail/export_main.do">
|
||||
<button type="button" class="btn btn-default btn-sm hidden-xs" onclick="getExs();">
|
||||
<i class="fa fa-file-excel-o" aria-hidden="true"></i> 批量导出
|
||||
</button>
|
||||
</security:authorize>
|
||||
|
||||
</div>
|
||||
<div class="form-group pull-right form-inline hidden-xs">
|
||||
<div class="form-group">
|
||||
<label class="form-label">发单类型:</label>
|
||||
<select class="form-control select2 " id="isCompete1" name="isCompete1"
|
||||
style="width: 150px; height: 34px; border-radius: 5px;">
|
||||
<option value="1">抢单</option>
|
||||
<option value="0">派单</option>
|
||||
<option value="" selected>全部</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group input-group-sm" style="width: 150px;">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" autocomplete="off" class="form-control pull-left"
|
||||
style="height: 34px; width: 150px; border-radius: 5px;"
|
||||
id="reservationtimeD" style="width:320px;" placeholder="请选择日期">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label">是否补录:</label>
|
||||
<select class="form-control select2 " id="saveType1" name="saveType1"
|
||||
style="width: 150px; height: 34px; border-radius: 5px;">
|
||||
<option value="1">是</option>
|
||||
<option value="0">否</option>
|
||||
<option value="" selected>全部</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="searchContent" name="searchContent"
|
||||
style="height: 34px; border-radius: 5px;"
|
||||
class="form-control pull-right"
|
||||
placeholder="模糊搜索:工单编号/工单名称/设备编号/设备名称">
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group input-group-sm pull-right" style="width: 150px; padding-left: 5px">
|
||||
<div class="input-group input-group-sm " style="width: 150px;">
|
||||
<input type="text" id="name" name="name" style="height: 34px;" class="form-control pull-right"
|
||||
placeholder="请输入人员姓名">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height: 34px;" onclick="dosearch();"><i
|
||||
class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<table id="table" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
document.write("<scr" + "ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js\"></sc" + "ript>")
|
||||
document.write("<scr" + "ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js\"></sc" + "ript>")
|
||||
</script>
|
||||
<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>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
610
WebRoot/jsp/workorder/workorderDetailEndRepairAdd.jsp
Normal file
610
WebRoot/jsp/workorder/workorderDetailEndRepairAdd.jsp
Normal file
@ -0,0 +1,610 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@page import="com.sipai.entity.workorder.WorkorderDetail" %>
|
||||
|
||||
<%request.setAttribute("planIn", WorkorderDetail.planIn);%>
|
||||
<%request.setAttribute("planOut", WorkorderDetail.planOut);%>
|
||||
|
||||
<%request.setAttribute("smallRepair", WorkorderDetail.smallRepair);%>
|
||||
<%request.setAttribute("middleRepair", WorkorderDetail.middleRepair);%>
|
||||
|
||||
<%@page import="com.sipai.tools.CommString" %>
|
||||
<%request.setAttribute("Active_False", CommString.Active_False); %>
|
||||
<%request.setAttribute("Active_True", CommString.Active_True); %>
|
||||
|
||||
<%@ page import="com.sipai.entity.activiti.ProcessType" %>
|
||||
<%request.setAttribute("Workorder_Repair", ProcessType.Workorder_Repair); %>
|
||||
|
||||
<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 masterId = '${id}';
|
||||
var tbName = 'tb_maintenance_problem_fille'; //数据表
|
||||
var nameSpace = 'MaintenanceProblem';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove: false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse: false,//选择按钮
|
||||
showClose: false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
fileActionSettings: {
|
||||
showDrag: false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount: true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig: previewConfigs,
|
||||
layoutTemplates: {
|
||||
actionUpload: ''
|
||||
},
|
||||
deleteUrl: ext.contextPath + "/base/deleteInputFile.do",
|
||||
deleteExtraData: function () { //传参
|
||||
var data = {
|
||||
"tbName": tbName
|
||||
};
|
||||
return data;
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function () {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow", "auto");
|
||||
});
|
||||
}
|
||||
|
||||
//名称定义不可修改
|
||||
var getFileList = function () {
|
||||
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId: masterId, tbName: tbName}, function (data) {
|
||||
//console.info(data)
|
||||
if (data.length > 0) {
|
||||
previews = new Array();
|
||||
$('#maintenancefile').show();
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path = path.substring(path.indexOf('webapps') + 7, path.length);
|
||||
path = ext.basePath.replace(ext.contextPath, '') + path.replace(/\\/g, "\/");
|
||||
;
|
||||
previews.push(path);
|
||||
previewConfig['width'] = '50px';
|
||||
previewConfig['caption'] = data[i].filename;
|
||||
previewConfig['key'] = data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput("maintenanceDetailFile");
|
||||
} else {
|
||||
$('#maintenanceDetailFile').hide();
|
||||
}
|
||||
}, 'json');
|
||||
};
|
||||
|
||||
var fileinput = function () {
|
||||
$.post(ext.contextPath + '/base/fileinput.do', {
|
||||
masterId: masterId,
|
||||
tbName: tbName,
|
||||
nameSpace: nameSpace
|
||||
}, function (data) {
|
||||
$("#fileInputDiv").html(data);
|
||||
openModal('fileInputModal');
|
||||
});
|
||||
};
|
||||
|
||||
//弹出人员列表
|
||||
var showUser4Handle = function () {
|
||||
var userIds = $("#receiveUserId").val();
|
||||
$.post(ext.contextPath + '/user/layerUser.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "receiveUserId", //输入框的id
|
||||
textId: "targetUsersName", //输入框的name
|
||||
userIds: userIds, //已选的人员id
|
||||
unitId: unitId, //获取右上角的厂id
|
||||
type: '${Workorder_Repair}' //根据不同流程找到第一个节点的配置职位 ProcessType中的id
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
//弹出班组列表
|
||||
var showTeam4Handle = function () {
|
||||
var userIds = $("#targetusers").val();
|
||||
var jobIds = '';
|
||||
$.post(ext.contextPath + '/user/teamForSelectByCompany.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "targetusers",
|
||||
textId: "targetTeamsName",
|
||||
userIds: userIds,
|
||||
jobIds: jobIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
$('#subForm').data('bootstrapValidator').updateStatus('equipmentNames', 'NOT_VALIDATED', null).validateField('equipmentNames');
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/workorder/workorderDetail/doInEndRepair.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
targetUsersName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '维修人员不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
targetTeamsName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '抢单班组不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
planDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '要求维修完成日期不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
faultDescription: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '故障现象描述不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
equipmentNames: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '故障设备不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
//流程审核文件上传所需参数
|
||||
var masterId_process = '${id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process = 'ProcessUploadFile';//保存文件夹
|
||||
var status = 'delete';//有删除权限
|
||||
|
||||
|
||||
$(function () {
|
||||
//初始化隐藏
|
||||
$("#inputEqu").hide();
|
||||
|
||||
//计划完成时间
|
||||
$('#planDate').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd',
|
||||
}).on('hide', function (e) {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('planDate', 'NOT_VALIDATED', null)
|
||||
.validateField('planDate');
|
||||
});
|
||||
$('#planDate').datepicker('setDate', '${nowDate.substring(0, 10)}');
|
||||
|
||||
$("#abnormityDate").datetimepicker({
|
||||
todayBtn: true,
|
||||
clearBtn: true,
|
||||
autoclose: true,
|
||||
todayHighlight: 1,//今天高亮
|
||||
endDate: new Date(),
|
||||
minuteStep: 5, //分钟间隔为5分
|
||||
format: 'yyyy-mm-dd hh:ii',
|
||||
startView: "month", //初始化视图
|
||||
minView: 0,
|
||||
maxView: "year",
|
||||
language: 'zh-CN',
|
||||
defaultDate: new Date()
|
||||
}).on('changeDate', function (ev) {
|
||||
$('#subForm').data('bootstrapValidator').updateStatus('abnormityDate', 'NOT_VALIDATED', null).validateField('abnormityDate');
|
||||
});
|
||||
|
||||
$("#repairDate").datetimepicker({
|
||||
todayBtn: true,
|
||||
clearBtn: true,
|
||||
autoclose: true,
|
||||
todayHighlight: 1,//今天高亮
|
||||
endDate: new Date(),
|
||||
minuteStep: 5, //分钟间隔为5分
|
||||
format: 'yyyy-mm-dd hh:ii',
|
||||
startView: "month", //初始化视图
|
||||
minView: 0,
|
||||
maxView: "year",
|
||||
language: 'zh-CN',
|
||||
defaultDate: new Date()
|
||||
}).on('changeDate', function (ev) {
|
||||
$('#subForm').data('bootstrapValidator').updateStatus('repairDate', 'NOT_VALIDATED', null).validateField('repairDate');
|
||||
});
|
||||
|
||||
//选择工艺段
|
||||
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId: "${company.id}"}, function (data) {
|
||||
var selelct_ = $("#processSectionId").select2({
|
||||
data: data,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过10个,启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct_.on('change', function () {
|
||||
//工艺段选择后,清空原有工艺段选择的设备
|
||||
$("#equipmentIds").val("");
|
||||
$("#equipmentNames").val("");
|
||||
})
|
||||
}, 'json');
|
||||
|
||||
getFileList();
|
||||
getFileList_process();
|
||||
|
||||
//维修类型
|
||||
var selectType = $("#repairPlanType").select2({minimumResultsForSearch: 10})
|
||||
//小修中修
|
||||
var selectType = $("#repairType").select2({minimumResultsForSearch: 10})
|
||||
|
||||
|
||||
//默认下发给人员 隐藏班组
|
||||
$("#selectDepts").attr("style", "display:none;");
|
||||
//初始化抢单
|
||||
var selelct_compete = $("#compete").select2({
|
||||
minimumResultsForSearch: 10
|
||||
});
|
||||
selelct_compete.on('change', function () {
|
||||
var compete = $('#compete').val();
|
||||
if ('${Active_True}' == compete) {//切换到抢单
|
||||
$("#selectUsers").attr("style", "display:none;");
|
||||
$("#selectDepts").attr("style", "display:block;");
|
||||
|
||||
$("#targetUsersName").val('');
|
||||
}
|
||||
if ('${Active_False}' == compete) {//切换到非抢单
|
||||
$("#selectUsers").attr("style", "display:block;");
|
||||
$("#selectDepts").attr("style", "display:none;");
|
||||
|
||||
$("#targetTeamsName").val('');
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
//选择设备,根据厂区id和工艺段id选择厂内设备,可多选
|
||||
/*var showEquipment4SelectsFun = function (formId, hiddenId, textId) {
|
||||
var equipmentIds = $('#' + hiddenId).val();
|
||||
var pSectionId = $("#processSectionId").val();
|
||||
var companyId = '${company.id}';
|
||||
if (null == companyId || '' == companyId || null == pSectionId || '' == pSectionId) {
|
||||
showAlert('d', "请先选择厂区和工艺段!");
|
||||
return;
|
||||
}
|
||||
$.post(ext.contextPath + '/equipment/showEquipmentCardForAbnormitySelects.do', {
|
||||
formId: formId,
|
||||
hiddenId: hiddenId,
|
||||
textId: textId,
|
||||
companyId: companyId,
|
||||
equipmentIds: equipmentIds,
|
||||
pSectionId: pSectionId
|
||||
}, function (data) {
|
||||
$("#equ4SelectDiv").html(data);
|
||||
openModal("equipment4SelectModal");
|
||||
});
|
||||
};*/
|
||||
|
||||
var showEquipment4SelectsFun = function (formId, hiddenId, textId) {
|
||||
var companyId = '${company.id}';
|
||||
var equipmentIds = $('#' + hiddenId).val();
|
||||
var processSectionId = $("#processSectionId").val();
|
||||
if (companyId == "" || processSectionId == "" || companyId == null || processSectionId == null) {
|
||||
showAlert('d', '请先选择工艺段');
|
||||
} else {
|
||||
// $.post(ext.contextPath + '/equipment/showEquipmentCardForAbnormitySelects.do', {
|
||||
$.post(ext.contextPath + '/equipment/selectEquipmentCard4Choice.do', {
|
||||
formId: formId,
|
||||
hiddenId: hiddenId,
|
||||
textId: textId,
|
||||
unitId: companyId,
|
||||
equipmentIds: equipmentIds,
|
||||
processSectionId: processSectionId
|
||||
}, function (data) {
|
||||
$("#equ4SelectDiv").html(data);
|
||||
openModal("equipment4SelectModal");
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//保存选择设备 datas为id
|
||||
var doFinishSelectEquipment = function (datas_id, datas_name) {
|
||||
if (datas_id.indexOf(",") != -1 || datas_id.indexOf(",") != -1) {
|
||||
alert('无法选择多台设备!');
|
||||
} else {
|
||||
$('#equipmentIds').val(datas_id);
|
||||
$('#equipmentNames').val(datas_name);
|
||||
closeModal("equipment4SelectModal");
|
||||
jobNameFuction();
|
||||
}
|
||||
}
|
||||
|
||||
//选择故障类型,可多选
|
||||
var showProblemType4SelectsFun = function (formId, hiddenId, textId) {
|
||||
var problemTypeIds = $('#' + hiddenId).val();
|
||||
$.post(ext.contextPath + '/maintenance/faultLibrary/showFaultTypeForSelects.do', {
|
||||
formId: formId,
|
||||
hiddenId: hiddenId,
|
||||
textId: textId,
|
||||
problemTypeIds: problemTypeIds
|
||||
}, function (data) {
|
||||
$("#problemTyp4SelectDiv").html(data);
|
||||
openModal("problemTyp4SelectModal");
|
||||
});
|
||||
};
|
||||
var inputEquFun = function () {
|
||||
$("#selectEqu").hide();
|
||||
$("#inputEqu").show();
|
||||
$("#equipmentIds").val("");
|
||||
$("#equipmentNames").val("");
|
||||
}
|
||||
var selectEquFun = function () {
|
||||
$("#selectEqu").show();
|
||||
$("#inputEqu").hide();
|
||||
$("#manualInputEquipment").val("");
|
||||
}
|
||||
|
||||
//选择故障库
|
||||
var showFaultLibrary = function (formId, hiddenId, textId) {
|
||||
var libraryId = $('#' + hiddenId).val();
|
||||
var equipmentIds = $("#equipmentIds").val();
|
||||
if (companyId == "" || equipmentIds == "" || companyId == null || equipmentIds == null) {
|
||||
showAlert('d', '请先选择设备');
|
||||
} else {
|
||||
$.post(ext.contextPath + '/maintenance/libraryFaultBloc/showFaultLibrary4Equpment.do', {
|
||||
libraryId: libraryId,
|
||||
companyId: companyId,
|
||||
equipmentIds: equipmentIds
|
||||
}, function (data) {
|
||||
$("#library4SelectDiv").html(data);
|
||||
openModal('library4SelectModal');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//自动显示工单名称
|
||||
function jobNameFuction() {
|
||||
var nowTime = '${nowDate.substring(0, 10)}';
|
||||
var equipmentNames = $('#equipmentNames').val();
|
||||
var type = '维修';
|
||||
$('#jobName').val(nowTime + '_' + equipmentNames + '_' + type);
|
||||
}
|
||||
|
||||
//选择故障库
|
||||
var showFaultLibrary = function (formId, hiddenId, textId) {
|
||||
var libraryId = $('#' + hiddenId).val();
|
||||
var equipmentIds = $("#equipmentIds").val();
|
||||
if ('${param.unitId}' == "" || equipmentIds == "" || '${param.unitId}' == null || equipmentIds == null) {
|
||||
showAlert('d', '请先选择设备');
|
||||
} else {
|
||||
$.post(ext.contextPath + '/maintenance/libraryFaultBloc/showFaultLibrary4Equpment.do', {
|
||||
libraryId: libraryId,
|
||||
companyId: '${param.unitId}',
|
||||
equipmentIds: equipmentIds
|
||||
}, function (data) {
|
||||
$("#library4SelectDiv").html(data);
|
||||
openModal('library4SelectModal');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-xlg">
|
||||
<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" enctype="multipart/form-data">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" name="id" value="${id}">
|
||||
<input type="hidden" class="form-control" name="type" id="type" value="${type}">
|
||||
<input type="hidden" class="form-control" name="saveType" id="saveType" value="1">
|
||||
<input type="hidden" class="form-control" name="isCompete" id="isCompete" value="0">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">所属公司</label>
|
||||
<div class="col-sm-4">
|
||||
<input name="unitId" type="hidden" value="${company.id}"/>
|
||||
<p class="form-control-static">${company.name}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">工艺段</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="processSectionId" name="processSectionId" class="form-control select2"
|
||||
style="width: 185px;" value="">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*故障设备</label>
|
||||
<div class="col-sm-10">
|
||||
<input id="equipmentIds" name="equipmentId" type="hidden" value=""/>
|
||||
<input class="form-control" id="equipmentNames" name="equipmentNames"
|
||||
onclick="showEquipment4SelectsFun('subForm','equipmentIds','equipmentNames');"
|
||||
placeholder="请先选择工艺段" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工单编号</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="jobNumber" name="jobNumber" value="${jobNumber}"
|
||||
readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工单名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="jobName" name="jobName" value="${jobName}"
|
||||
placeholder="工单名称" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">维修类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="repairPlanType" name="repairPlanType" class="form-control select2"
|
||||
style="width: 188px;">
|
||||
<option value="${planOut}"
|
||||
<c:if test="${'${planOut}' == workorderDetail.repairPlanType }">selected</c:if>>
|
||||
计划外
|
||||
</option>
|
||||
<option value="${planIn}"
|
||||
<c:if test="${'${planIn}' == workorderDetail.repairPlanType }">selected</c:if>>
|
||||
计划内
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">小修/中修</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="repairType" name="repairType" class="form-control select2"
|
||||
style="width: 188px;">
|
||||
<option value="${smallRepair}"
|
||||
<c:if test="${'${smallRepair}' == workorderDetail.repairType }">selected</c:if>>
|
||||
小修
|
||||
</option>
|
||||
<option value="${middleRepair}"
|
||||
<c:if test="${'${middleRepair}' == workorderDetail.repairType }">selected</c:if>>
|
||||
中修
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">故障时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="abnormityDate" name="abnormityDate"
|
||||
style="width: 150px;" value="${nowDate.substring(0, 16)}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">维修时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="repairDate" name="repairDate"
|
||||
style="width: 150px;" value="${nowDate.substring(0, 16)}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计划完成日期</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="planDate" name="planDate"
|
||||
style="width: 150px;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="inputEqu">
|
||||
<label class="col-sm-2 control-label">*输入设备</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" id="manualInputEquipment" name="manualInputEquipment"
|
||||
placeholder="只有在选择界面中找不到的设备才可以手动输入...">
|
||||
</div>
|
||||
<div class="col-sm-2" style="padding-left:0;">
|
||||
<button type="button" class="btn btn-primary" onclick="selectEquFun()">选择设备</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">故障现象描述:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control " id="abnormityDescription" name="faultDescription" rows="2"
|
||||
ondblclick="showFaultLibrary('subForm','libraryId','abnormityDescription');"
|
||||
placeholder="故障现象描述...">${workorderDetail.faultDescription}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">维修方案及要求简述:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control " id="schemeResume" name="schemeResume" rows="2"
|
||||
placeholder="维修方案及要求简述...">${workorderDetail.schemeResume}</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>
|
||||
619
WebRoot/jsp/workorder/workorderDetailEndRepairList.jsp
Normal file
619
WebRoot/jsp/workorder/workorderDetailEndRepairList.jsp
Normal file
@ -0,0 +1,619 @@
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail" %>
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceCommString" %>
|
||||
<%@page import="com.sipai.entity.workorder.WorkorderDetail" %>
|
||||
<%@ 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_Start", WorkorderDetail.Status_Start);%>
|
||||
<%request.setAttribute("Status_Finish", WorkorderDetail.Status_Finish);%>
|
||||
<%request.setAttribute("Status_Compete", WorkorderDetail.Status_Compete);%>
|
||||
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_REPAIR", MaintenanceCommString.MAINTENANCE_TYPE_REPAIR);%>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_OVERHAUL", MaintenanceCommString.MAINTENANCE_TYPE_OVERHAUL);%>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_MAINTAIN", MaintenanceCommString.MAINTENANCE_TYPE_MAINTAIN);%>
|
||||
|
||||
<%request.setAttribute("REPAIR", WorkorderDetail.REPAIR);%>
|
||||
<%request.setAttribute("MAINTAIN", WorkorderDetail.MAINTAIN);%>
|
||||
<%request.setAttribute("ANTISEPTIC", WorkorderDetail.ANTISEPTIC);%>
|
||||
<%request.setAttribute("LUBRICATION", WorkorderDetail.LUBRICATION);%>
|
||||
<%request.setAttribute("INSTRUMENT", WorkorderDetail.INSTRUMENT);%>
|
||||
|
||||
<%request.setAttribute("planIn", WorkorderDetail.planIn);%>
|
||||
<%request.setAttribute("planOut", WorkorderDetail.planOut);%>
|
||||
|
||||
<%request.setAttribute("smallRepair", WorkorderDetail.smallRepair);%>
|
||||
<%request.setAttribute("middleRepair", WorkorderDetail.middleRepair);%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<head>
|
||||
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- 文件上传-->
|
||||
<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>
|
||||
<style type="text/css">
|
||||
.main-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.content-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main-footer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.table-hover > tbody > tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var bizid = '';
|
||||
var $table;
|
||||
var switchStatus = false;
|
||||
var selectionIds = []; //保存选中ids
|
||||
|
||||
function getCheckedIds() {
|
||||
var ids = "";
|
||||
var check_array = eval('');
|
||||
$.each(check_array, function (index, item) {
|
||||
if (ids != "") {
|
||||
ids += ",";
|
||||
}
|
||||
ids += item.id;
|
||||
});
|
||||
return ids;
|
||||
}
|
||||
|
||||
//新增 - 补录
|
||||
var addFun = function () {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/doAddEndRepair.do', {unitId: bizid}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
//浏览
|
||||
var viewFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/doViewRepair.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
//流程详情
|
||||
var viewDetailFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/showWorkorderDetailRepairProcessView.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('processViewModal');
|
||||
});
|
||||
};
|
||||
|
||||
//金山项目导出(暂时不用)
|
||||
var getExs_JS = function () {
|
||||
var datas = selectionIds;
|
||||
if (datas == 0) {
|
||||
showAlert('d', '请选中之后导出', 'mainAlertdiv');
|
||||
} else {
|
||||
window.open(ext.contextPath + "/workorder/workorderDetail/doExportRepairJS.do?ids=" + datas + "&type=repair");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
var getExs = function () {
|
||||
var datas = selectionIds;
|
||||
if (datas == 0) {
|
||||
showAlert('d', '请选中之后导出', 'mainAlertdiv');
|
||||
} else {
|
||||
var params = {
|
||||
responseType: 'blob',
|
||||
ids: datas,
|
||||
type: 'repair'
|
||||
};
|
||||
postExcelFile(params, ext.contextPath + '/workorder/workorderDetail/doExportRepair.do');
|
||||
}
|
||||
}
|
||||
|
||||
function postExcelFile(params, url) { //params是post请求需要的参数,url是请求url地址
|
||||
var form = document.createElement("form");
|
||||
form.style.display = 'none';
|
||||
form.action = url;
|
||||
form.method = "post";
|
||||
document.body.appendChild(form);
|
||||
for (var key in params) {
|
||||
var input = document.createElement("input");
|
||||
input.type = "hidden";
|
||||
input.name = key;
|
||||
input.value = params[key];
|
||||
form.appendChild(input);
|
||||
}
|
||||
form.submit();
|
||||
form.remove();
|
||||
}
|
||||
|
||||
var deletesFun = function () {
|
||||
var datas = selectionIds;
|
||||
if (datas == "") {
|
||||
showAlert('d', '请选中之后删除', 'mainAlertdiv');
|
||||
} else {
|
||||
datas = datas.toString();
|
||||
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 + '/workorder/workorderDetail/delete4Repair.do', {ids: datas}, function (data) {
|
||||
var obj = $.parseJSON(data)
|
||||
if (obj.result > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//刷新表格
|
||||
var dosearch = function () {
|
||||
initFun();
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
//加载完厂区后,初始化工艺段和表格
|
||||
function initFun() {
|
||||
$table = $("#table").bootstrapTable({
|
||||
url: ext.contextPath + '/workorder/workorderDetail/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50, 100, 200, 500], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
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: bizid,
|
||||
status: '1',//1为已完成
|
||||
type: '${REPAIR}',//维修类型
|
||||
date: $('#reservationtimeD').val(),
|
||||
name: $('#name').val(),
|
||||
monthDt: '${param.monthDt}',
|
||||
equipmentId: '${equipmentId}',//用于app调用网页传参使用
|
||||
isCompete: $('#isCompete').val(),
|
||||
searchContent: $('#searchContent').val(),
|
||||
// jobNumber: $('#jobNumber1').val(),
|
||||
// jobName: $('#jobName1').val(),
|
||||
// equipmentcardid: $('#equipmentcardid').val(),
|
||||
// equipmentname: $('#equipmentname').val(),
|
||||
saveType: $('#saveType1').val()
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {
|
||||
// viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
width: '40px',
|
||||
formatter: function (i, row) { // 每次加载 checkbox 时判断当前 row 的 id 是否已经存在全局 Set() 里
|
||||
if ($.inArray(row.id, Array.from(selectionIds)) != -1) { // 因为 Set是集合,需要先转换成数组
|
||||
return {
|
||||
checked: true// 存在则选中
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'company.sname', // 返回json数据中的name
|
||||
title: '所属厂区', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '7%'
|
||||
},
|
||||
{
|
||||
field: 'jobNumber', // 返回json数据中的name
|
||||
title: '工单编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '13%'
|
||||
},
|
||||
{
|
||||
field: 'equipmentCard.equipmentcardid', // 返回json数据中的name
|
||||
title: '设备编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '12%'
|
||||
},
|
||||
{
|
||||
field: 'equipmentCard.equipmentname', // 返回json数据中的name
|
||||
title: '设备名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '20%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + value + "'>" + value + "</span>";
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'faultDescription', // 返回json数据中的name
|
||||
title: '故障现象', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '32%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + value + "'>" + value + "</span>";
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'insdt', // 返回json数据中的name
|
||||
title: '故障时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.abnormityDate != null && row.abnormityDate != '') {
|
||||
return row.abnormityDate.substring(0, 19);
|
||||
} else {
|
||||
return value.substring(0, 19);
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'user.caption', // 返回json数据中的name
|
||||
title: '维修人员', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '6%'
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 80, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = '';
|
||||
buts += '<button type="button" class="btn btn-default btn-sm" title="浏览" onclick="viewFun(\'' + row.id + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 浏览</span></button>';
|
||||
// buts += '<button class="btn btn-default btn-sm" onclick="viewDetailFun(\'' + row.id + '\')" 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");
|
||||
console.info("加载数据成功");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
//绑定选中事件、取消事件、全部选中、全部取消
|
||||
$table.on('check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table', function (e, rows) {
|
||||
var ids = $.map(!$.isArray(rows) ? [rows] : rows, function (row) {
|
||||
return row.id;
|
||||
});
|
||||
func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference';
|
||||
selectionIds = _[func](selectionIds, ids);
|
||||
});
|
||||
};
|
||||
|
||||
function initDate1() {
|
||||
var locale = {
|
||||
"format": 'YYYY-MM-DD HH:mm',
|
||||
"separator": " ~ ",
|
||||
"applyLabel": "确定",
|
||||
"cancelLabel": "取消",
|
||||
"fromLabel": "起始时间",
|
||||
"toLabel": "结束时间'",
|
||||
"customRangeLabel": "自定义",
|
||||
"weekLabel": "W",
|
||||
"daysOfWeek": ["日", "一", "二", "三", "四", "五", "六"],
|
||||
"monthNames": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||||
"firstDay": 1
|
||||
};
|
||||
|
||||
var oldreservationtime1 = "${param.oldreservationtime1}";
|
||||
if (oldreservationtime1 != "" && oldreservationtime1.length > 0) {
|
||||
beginTimeStore1 = oldreservationtime1.substring(0, 16);
|
||||
endTimeStore1 = oldreservationtime1.substring(19, 36);
|
||||
$('#reservationtimeD').val(oldreservationtime1);
|
||||
} else {
|
||||
beginTimeStore1 = moment().subtract(3, 'days').format('YYYY-MM-DD HH:mm');
|
||||
endTimeStore1 = moment().subtract(0, 'days').format('YYYY-MM-DD HH:mm');
|
||||
$('#reservationtimeD').val(beginTimeStore1 + locale.separator + endTimeStore1);
|
||||
}
|
||||
|
||||
$('#reservationtimeD').daterangepicker({
|
||||
"timePicker": true,
|
||||
"timePicker24Hour": true,
|
||||
"linkedCalendars": false,
|
||||
"autoUpdateInput": false,
|
||||
"timePickerIncrement": 10,
|
||||
"locale": locale,
|
||||
//汉化按钮部分
|
||||
ranges: {
|
||||
// '今日': [moment(), moment().subtract(-1, 'days')],
|
||||
'昨日': [moment().subtract(1, 'days'), moment()],
|
||||
'最近7日': [moment().subtract(6, 'days'), moment().subtract(-1, 'days')],
|
||||
'本月': [moment().startOf('month'), moment().endOf('month').subtract(-1, 'days')],
|
||||
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month').subtract(-1, 'days')]
|
||||
},
|
||||
startDate: beginTimeStore1,
|
||||
endDate: endTimeStore1
|
||||
}, function (start, end, label) {
|
||||
beginTimeStore1 = start.format(this.locale.format);
|
||||
endTimeStore1 = end.format(this.locale.format);
|
||||
if (!this.startDate) {
|
||||
this.element.val('');
|
||||
} else {
|
||||
this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
//弹窗 异常单
|
||||
var viewFunAbnormity = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/maintenance/abnormity/doview_new.do', {id: id, ycCount: 1}, function (data) {
|
||||
$("#subDivAbnormity").html(data);
|
||||
openModal('subAbnormalModal');
|
||||
});
|
||||
};
|
||||
|
||||
//选中事件操作数组
|
||||
var union = function (array, ids) {
|
||||
$.each(ids, function (i, id) {
|
||||
if ($.inArray(id, array) == -1) {
|
||||
array[array.length] = id;
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
|
||||
//取消选中事件操作数组
|
||||
var difference = function (array, ids) {
|
||||
$.each(ids, function (i, id) {
|
||||
var index = $.inArray(id, array);
|
||||
if (index != -1) {
|
||||
array.splice(index, 1);
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
var _ = {"union": union, "difference": difference};
|
||||
|
||||
//表格分页之前处理多选框数据
|
||||
function responseHandler(res) {
|
||||
$.each(res.rows, function (i, row) {
|
||||
row.checkStatus = $.inArray(row.id, selectionIds) != -1; //判断当前行的数据id是否存在与选中的数组,存在则将多选框状态变为true
|
||||
});
|
||||
return res;
|
||||
}
|
||||
|
||||
$(function () {
|
||||
bizid = unitId;
|
||||
|
||||
//用于app调用平台网页使用
|
||||
if (bizid == null || bizid == 'undefined') {
|
||||
bizid = '${unitId}';
|
||||
}
|
||||
|
||||
initDate1();
|
||||
|
||||
$(".daterangepicker").css({'width': '680px'});
|
||||
var flag = IsApp();
|
||||
if (flag == true) {
|
||||
|
||||
} else {
|
||||
$(".main-header").show();
|
||||
$(".content-header").show();
|
||||
$(".main-footer").show();
|
||||
}
|
||||
$('#reservationtimeD').val('');
|
||||
initFun();
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="subDivAbnormity"></div>
|
||||
<div id="subDiv_achievement"></div>
|
||||
<div id="subDivDetail"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div id="fault4SelectDiv"></div>
|
||||
<div id="handleDetailDiv"></div>
|
||||
<div id="maintainPlanDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="emSubDiv"></div>
|
||||
<div>
|
||||
<div class="input-group input-group-sm pull-left">
|
||||
<security:authorize buttonUrl="workorder/workorderDetail/supplement.do">
|
||||
<button type="button" class="btn btn-default btn-sm hidden-xs" onclick="addFun();"><i
|
||||
class="fa fa-plus"></i> 补录
|
||||
</button>
|
||||
</security:authorize>
|
||||
|
||||
<c:if test="${userId == 'emp01'}">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i
|
||||
class="fa fa-trash-o"></i> 删除
|
||||
</button>
|
||||
</c:if>
|
||||
|
||||
<%--金山项目--%>
|
||||
<%--<security:authorize buttonUrl="workorder/workorderDetail/export_js.do">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="getExs_JS();"><i
|
||||
class="fa fa-file-excel-o" aria-hidden="true"></i> 批量导出
|
||||
</button>
|
||||
</security:authorize>--%>
|
||||
|
||||
<%--通用项目--%>
|
||||
<security:authorize buttonUrl="workorder/workorderDetail/export.do">
|
||||
<button type="button" class="btn btn-default btn-sm hidden-xs" onclick="getExs();"><i
|
||||
class="fa fa-file-excel-o" aria-hidden="true"></i> 批量导出
|
||||
</button>
|
||||
</security:authorize>
|
||||
|
||||
</div>
|
||||
<%-- <div class="form-group pull-right form-inline hidden-xs">--%>
|
||||
<%-- <div class="input-group input-group-sm pull-left">--%>
|
||||
<%-- <input type="text" autocomplete="off" class="form-control pull-left"--%>
|
||||
<%-- style="height: 34px; width: 200px;" id="reservationtimeD" style="width:320px;"--%>
|
||||
<%-- placeholder="请选择日期">--%>
|
||||
<%-- </div>--%>
|
||||
<%-- <div class="input-group input-group-sm pull-right" style="width: 200px;">--%>
|
||||
<%-- <div class="input-group input-group-sm " style="width: 200px;">--%>
|
||||
<%-- <input type="text" id="name" name="name" style="height: 34px;"--%>
|
||||
<%-- class="form-control pull-right"--%>
|
||||
<%-- placeholder="请输入人员姓名" autocomplete="off">--%>
|
||||
<%-- <div class="input-group-btn">--%>
|
||||
<%-- <button class="btn btn-default" style="height: 34px;" onclick="dosearch();"><i--%>
|
||||
<%-- class="fa fa-search"></i>--%>
|
||||
<%-- </button>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- </div>--%>
|
||||
|
||||
<%-- </div>--%>
|
||||
<div class="form-group pull-right form-inline hidden-xs">
|
||||
<div class="form-group">
|
||||
<label class="form-label">发单类型:</label>
|
||||
<select class="form-control select2 " id="isCompete" name="isCompete"
|
||||
style="width: 150px; height: 34px; border-radius: 5px;">
|
||||
<option value="1">抢单</option>
|
||||
<option value="0">派单</option>
|
||||
<option value="" selected>全部</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group input-group-sm" style="width: 150px;">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" autocomplete="off" class="form-control pull-left"
|
||||
style="height: 34px; width: 150px; border-radius: 5px;"
|
||||
id="reservationtimeD" style="width:320px;" placeholder="请选择日期">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label">是否补录:</label>
|
||||
<select class="form-control select2 " id="saveType1" name="saveType1"
|
||||
style="width: 150px; height: 34px; border-radius: 5px;">
|
||||
<option value="1">是</option>
|
||||
<option value="0">否</option>
|
||||
<option value="" selected>全部</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="searchContent" name="searchContent"
|
||||
style="height: 34px; border-radius: 5px;"
|
||||
class="form-control pull-right"
|
||||
placeholder="模糊搜索:工单编号/工单名称/设备编号/设备名称">
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group input-group-sm pull-right" style="width: 150px; padding-left: 5px">
|
||||
<div class="input-group input-group-sm " style="width: 150px;">
|
||||
<input type="text" id="name" name="name" style="height: 34px;"
|
||||
class="form-control pull-right"
|
||||
placeholder="请输入人员姓名">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height: 34px;" onclick="dosearch();"><i
|
||||
class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
document.write("<scr" + "ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js\"></sc" + "ript>")
|
||||
document.write("<scr" + "ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js\"></sc" + "ript>")
|
||||
</script>
|
||||
<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>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
<%--文件上传 minio--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFile.js" charset="utf-8"></script>
|
||||
</html>
|
||||
646
WebRoot/jsp/workorder/workorderDetailMaintainAdd.jsp
Normal file
646
WebRoot/jsp/workorder/workorderDetailMaintainAdd.jsp
Normal file
@ -0,0 +1,646 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
|
||||
<%@page import="com.sipai.entity.workorder.WorkorderDetail" %>
|
||||
<%request.setAttribute("MAINTAIN", WorkorderDetail.MAINTAIN);%>
|
||||
<%request.setAttribute("ANTISEPTIC", WorkorderDetail.ANTISEPTIC);%>
|
||||
<%request.setAttribute("LUBRICATION", WorkorderDetail.LUBRICATION);%>
|
||||
<%request.setAttribute("INSTRUMENT", WorkorderDetail.INSTRUMENT);%>
|
||||
|
||||
<%@page import="com.sipai.tools.CommString" %>
|
||||
<%request.setAttribute("Active_False", CommString.Active_False); %>
|
||||
<%request.setAttribute("Active_True", CommString.Active_True); %>
|
||||
|
||||
<%@ page import="com.sipai.entity.activiti.ProcessType" %>
|
||||
<%request.setAttribute("Workorder_Maintain", ProcessType.Workorder_Maintain); %>
|
||||
|
||||
<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 masterId = '${id}';
|
||||
var tbName = 'tb_maintenance_problem_fille'; //数据表
|
||||
var nameSpace = 'MaintenanceProblem';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
/* var student = {
|
||||
"caption":"lilei",
|
||||
|
||||
}
|
||||
previewConfigs[0]=student; */
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove: false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse: false,//选择按钮
|
||||
showClose: false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
fileActionSettings: {
|
||||
showDrag: false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount: true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig: previewConfigs,
|
||||
layoutTemplates: {
|
||||
actionUpload: ''
|
||||
},
|
||||
deleteUrl: ext.contextPath + "/base/deleteInputFile.do",
|
||||
deleteExtraData: function () { //传参
|
||||
var data = {
|
||||
"tbName": tbName
|
||||
};
|
||||
return data;
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function () {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow", "auto");
|
||||
});
|
||||
}
|
||||
|
||||
//名称定义不可修改
|
||||
var getFileList = function () {
|
||||
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId: masterId, tbName: tbName}, function (data) {
|
||||
//console.info(data)
|
||||
if (data.length > 0) {
|
||||
previews = new Array();
|
||||
$('#maintenancefile').show();
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path = path.substring(path.indexOf('webapps') + 7, path.length);
|
||||
path = ext.basePath.replace(ext.contextPath, '') + path.replace(/\\/g, "\/");
|
||||
;
|
||||
previews.push(path);
|
||||
previewConfig['width'] = '50px';
|
||||
previewConfig['caption'] = data[i].filename;
|
||||
previewConfig['key'] = data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput("maintenanceDetailFile");
|
||||
} else {
|
||||
$('#maintenanceDetailFile').hide();
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
};
|
||||
var fileinput = function () {
|
||||
//var url='/maintenance/updateProblemFile.do';//保存数据表方法
|
||||
$.post(ext.contextPath + '/base/fileinput.do', {
|
||||
masterId: masterId,
|
||||
tbName: tbName,
|
||||
nameSpace: nameSpace
|
||||
}, function (data) {
|
||||
$("#fileInputDiv").html(data);
|
||||
openModal('fileInputModal');
|
||||
});
|
||||
};
|
||||
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#receiveUserId").val();
|
||||
/*$.post(ext.contextPath + '/user/userForSelect4FirstActiviti.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "receiveUserId",
|
||||
textId: "targetUsersName",
|
||||
userIds: userIds,
|
||||
type: 'maintain'
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});*/
|
||||
$.post(ext.contextPath + '/user/layerUser.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "receiveUserId",
|
||||
textId: "targetUsersName",
|
||||
userIds: userIds,
|
||||
unitId: unitId, //获取右上角的厂id
|
||||
type: '${Workorder_Maintain}' //根据不同流程找到第一个节点的配置职位 ProcessType中的id
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
var showContacts4SelectsFun = function () {
|
||||
var userIds = $("#contactids").val();
|
||||
var companyId = $("#companyid").val();
|
||||
//alert(companyId)
|
||||
if (null == companyId || '' == companyId) {
|
||||
showAlert('d', "请先选择厂区!");
|
||||
return;
|
||||
}
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "contactids",
|
||||
textId: "contactname",
|
||||
userIds: userIds,
|
||||
companyId: companyId
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function dosave() {
|
||||
var compete = $('#compete').val();
|
||||
if (compete == '${Active_True}') {
|
||||
dohandle_y();//抢单
|
||||
} else {
|
||||
dohandle_n();//非抢单
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定班组执行 -- 抢单
|
||||
*/
|
||||
function dohandle_y() {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('targetUsersName', 'NOT_VALIDATED', null)
|
||||
.validateField('targetUsersName');
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('equipname', 'NOT_VALIDATED', null)
|
||||
.validateField('equipname');
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('jobName', 'NOT_VALIDATED', null)
|
||||
.validateField('jobName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
//select置为disable后不能返回值到后台
|
||||
$("#companyid").removeAttr("disabled");
|
||||
var serialData = $("#subForm").serialize();
|
||||
$("#companyid").attr("disabled", "disabled");
|
||||
$.post(ext.contextPath + "/workorder/workorderDetail/startCompete4Repair.do", serialData, function (data) {
|
||||
if (data.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal')
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else if (data.res == 2) {
|
||||
showAlert('d', '未检测到维修工单流程,请先部署维修工单流程!');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
非抢单
|
||||
*/
|
||||
function dohandle_n() {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('targetUsersName', 'NOT_VALIDATED', null)
|
||||
.validateField('targetUsersName');
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('equipname', 'NOT_VALIDATED', null)
|
||||
.validateField('equipname');
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('jobName', 'NOT_VALIDATED', null)
|
||||
.validateField('jobName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
//select置为disable后不能返回值到后台
|
||||
$("#companyid").removeAttr("disabled");
|
||||
var serialData = $("#subForm").serialize();
|
||||
$("#companyid").attr("disabled", "disabled");
|
||||
$.post(ext.contextPath + "/workorder/workorderDetail/startWorkorderDetail.do", serialData, function (data) {
|
||||
if (data.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal')
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else if (data.res == 2) {
|
||||
showAlert('d', '未检测到维修工单流程,请先部署维修工单路线!');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
targetUsersName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '接收人员不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
planDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '计划日期不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
jobName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工单名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
equipname: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '设备不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
//流程审核文件上传所需参数
|
||||
var masterId_process = '${id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process = 'ProcessUploadFile';//保存文件夹
|
||||
var status = 'delete';//有删除权限
|
||||
|
||||
|
||||
$(function () {
|
||||
//初始化隐藏
|
||||
$("#inputEqu").hide();
|
||||
|
||||
$('#planDate').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd',
|
||||
}).on('hide', function (e) {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('planDate', 'NOT_VALIDATED', null)
|
||||
.validateField('planDate');
|
||||
});
|
||||
$('#planDate').datepicker('setDate', '${nowDate.substring(0, 10)}');
|
||||
//选择工艺段
|
||||
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId: "${company.id}"}, function (data) {
|
||||
var selelct_ = $("#processSectionId").select2({
|
||||
data: data,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过10个,启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct_.on('change', function () {
|
||||
//工艺段选择后,清空原有工艺段选择的设备
|
||||
$("#equipmentIds").val("");
|
||||
$("#equipname").val("");
|
||||
})
|
||||
}, 'json');
|
||||
|
||||
getFileList();
|
||||
getFileList_process();
|
||||
|
||||
compete();
|
||||
})
|
||||
|
||||
//选择设备,根据厂区id和工艺段id选择厂内设备,可多选
|
||||
var showEquipment4SelectsFun = function (formId, hiddenId, textId) {
|
||||
var companyId = '${company.id}';
|
||||
var equipmentIds = $('#' + hiddenId).val();
|
||||
var processSectionId = $("#processSectionId").val();
|
||||
// $.post(ext.contextPath + '/equipment/showEquipmentCardForAbnormitySelects.do', {
|
||||
$.post(ext.contextPath + '/equipment/selectEquipmentCard4Choice.do', {
|
||||
formId: formId,
|
||||
hiddenId: hiddenId,
|
||||
textId: textId,
|
||||
unitId: companyId,
|
||||
equipmentIds: equipmentIds,
|
||||
processSectionId: processSectionId,
|
||||
choiceType: 'main'//通过保养模块过来的,需要筛选近期需要保养的功能
|
||||
}, function (data) {
|
||||
$("#equ4SelectDiv").html(data);
|
||||
openModal("equipment4SelectModal");
|
||||
});
|
||||
};
|
||||
//保存选择设备 datas为id
|
||||
var doFinishSelectEquipment = function (datas_id, datas_name) {
|
||||
console.log(datas_id, datas_name)
|
||||
if (datas_id.indexOf(",") != -1 || datas_id.indexOf(",") != -1) {
|
||||
alert('无法选择多台设备!');
|
||||
} else {
|
||||
$('#equipmentIds').val(datas_id);
|
||||
$('#equipname').val(datas_name);
|
||||
closeModal("equipment4SelectModal");
|
||||
jobNameFuction();
|
||||
}
|
||||
}
|
||||
<%--var showEquipment4SelectsFun = function (formId, hiddenId, textId) {--%>
|
||||
<%-- var equipmentIds = $('#' + hiddenId).val();--%>
|
||||
<%-- var pSectionId = $("#processSectionId").val();--%>
|
||||
<%-- var companyId = '${company.id}';--%>
|
||||
<%-- /*if (null == companyId || '' == companyId || null == pSectionId || '' == pSectionId) {--%>
|
||||
<%-- showAlert('d', "请先选择厂区和工艺段!");--%>
|
||||
<%-- return;--%>
|
||||
<%-- }*/--%>
|
||||
<%-- $.post(ext.contextPath + '/equipment/showEquipmentCardForAbnormitySelects.do', {--%>
|
||||
<%-- formId: formId,--%>
|
||||
<%-- hiddenId: hiddenId,--%>
|
||||
<%-- textId: textId,--%>
|
||||
<%-- companyId: companyId,--%>
|
||||
<%-- equipmentIds: equipmentIds,--%>
|
||||
<%-- pSectionId: pSectionId--%>
|
||||
<%-- }, function (data) {--%>
|
||||
<%-- $("#equ4SelectDiv").html(data);--%>
|
||||
<%-- openModal("equipment4SelectModal");--%>
|
||||
<%-- });--%>
|
||||
<%--};--%>
|
||||
//选择故障类型,可多选
|
||||
var showProblemType4SelectsFun = function (formId, hiddenId, textId) {
|
||||
var problemTypeIds = $('#' + hiddenId).val();
|
||||
$.post(ext.contextPath + '/maintenance/faultLibrary/showFaultTypeForSelects.do', {
|
||||
formId: formId,
|
||||
hiddenId: hiddenId,
|
||||
textId: textId,
|
||||
problemTypeIds: problemTypeIds
|
||||
}, function (data) {
|
||||
$("#problemTyp4SelectDiv").html(data);
|
||||
openModal("problemTyp4SelectModal");
|
||||
});
|
||||
};
|
||||
var inputEquFun = function () {
|
||||
$("#selectEqu").hide();
|
||||
$("#inputEqu").show();
|
||||
$("#equipmentIds").val("");
|
||||
$("#equipname").val("");
|
||||
}
|
||||
var selectEquFun = function () {
|
||||
$("#selectEqu").show();
|
||||
$("#inputEqu").hide();
|
||||
$("#manualInputEquipment").val("");
|
||||
}
|
||||
|
||||
//选择故障库
|
||||
var showFaultLibrary = function (formId, hiddenId, textId) {
|
||||
var libraryId = $('#' + hiddenId).val();
|
||||
var equipmentIds = $("#equipmentIds").val();
|
||||
if (companyId == "" || equipmentIds == "" || companyId == null || equipmentIds == null) {
|
||||
showAlert('d', '请先选择设备');
|
||||
} else {
|
||||
$.post(ext.contextPath + '/maintenance/libraryFaultBloc/showFaultLibrary4Equpment.do', {
|
||||
libraryId: libraryId,
|
||||
companyId: companyId,
|
||||
equipmentIds: equipmentIds
|
||||
}, function (data) {
|
||||
$("#library4SelectDiv").html(data);
|
||||
openModal('library4SelectModal');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//弹出班组列表
|
||||
var showTeam4Handle = function () {
|
||||
var userIds = $("#targetusers").val();
|
||||
var jobIds = '';
|
||||
$.post(ext.contextPath + '/user/teamForSelectByCompany.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "targetusers",
|
||||
textId: "targetTeamsName",
|
||||
userIds: userIds,
|
||||
jobIds: jobIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function compete() {
|
||||
//默认下发给人员 隐藏班组
|
||||
$("#selectDepts").attr("style", "display:none;");
|
||||
//初始化抢单
|
||||
var selelct_compete = $("#compete").select2({
|
||||
minimumResultsForSearch: 10
|
||||
});
|
||||
selelct_compete.on('change', function () {
|
||||
var compete = $('#compete').val();
|
||||
if ('${Active_True}' == compete) {//切换到抢单
|
||||
$("#selectUsers").attr("style", "display:none;");
|
||||
$("#selectDepts").attr("style", "display:block;");
|
||||
|
||||
$("#targetUsersName").val('');
|
||||
}
|
||||
if ('${Active_False}' == compete) {//切换到非抢单
|
||||
$("#selectUsers").attr("style", "display:block;");
|
||||
$("#selectDepts").attr("style", "display:none;");
|
||||
|
||||
$("#targetTeamsName").val('');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//自动显示工单名称
|
||||
function jobNameFuction() {
|
||||
var nowTime = '${nowDate.substring(0, 10)}';
|
||||
var equipname = $('#equipname').val();
|
||||
var type = $('#type').val();
|
||||
if (type == '${MAINTAIN}') {
|
||||
type = '保养';
|
||||
}
|
||||
if (type == '${ANTISEPTIC}') {
|
||||
type = '防腐';
|
||||
}
|
||||
if (type == '${LUBRICATION}') {
|
||||
type = '润滑';
|
||||
}
|
||||
if (type == '${INSTRUMENT}') {
|
||||
type = '仪表';
|
||||
}
|
||||
$('#jobName').val(nowTime + '_' + equipname + '_' + type);
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-xlg">
|
||||
<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" enctype="multipart/form-data">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" name="id" value="${id}">
|
||||
<%-- <input type="hidden" class="form-control" name="type" value="${type}">--%>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">所属公司</label>
|
||||
<div class="col-sm-10">
|
||||
<input name="unitId" type="hidden" value="${company.id}"/>
|
||||
<p class="form-control-static">${company.name}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工单编号</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="jobNumber" name="jobNumber" value="${jobNumber}"
|
||||
readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*保养设备</label>
|
||||
<div class="col-sm-10">
|
||||
<input id="equipmentIds" name="equipmentId" type="hidden" value=""/>
|
||||
<input class="form-control" id="equipname" name="equipname"
|
||||
onclick="showEquipment4SelectsFun('subForm','equipmentIds','equipname');"
|
||||
placeholder="点击选择设备..." autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工单名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="jobName" name="jobName" value="${jobName}"
|
||||
placeholder="选择设备后会自动生成..."
|
||||
autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">保养类型</label>
|
||||
<div class="col-sm-10">
|
||||
<select id="type" name="type" class="form-control select2" onblur="jobNameFuction()">
|
||||
<option value="${MAINTAIN}"
|
||||
<c:if test="${'${MAINTAIN}' == workorderDetail.type }">selected</c:if>>
|
||||
保养
|
||||
</option>
|
||||
<option value="${ANTISEPTIC}"
|
||||
<c:if test="${'${ANTISEPTIC}' == workorderDetail.type }">selected</c:if>>
|
||||
防腐
|
||||
</option>
|
||||
<option value="${LUBRICATION}"
|
||||
<c:if test="${'${LUBRICATION}' == workorderDetail.type }">selected</c:if>>
|
||||
润滑
|
||||
</option>
|
||||
<option value="${INSTRUMENT}"
|
||||
<c:if test="${'${INSTRUMENT}' == workorderDetail.type }">selected</c:if>>
|
||||
仪表
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<!-- <label class="col-sm-3 control-label">计划费用/元</label>
|
||||
<div class="col-sm-3">
|
||||
<input class="form-control" id="planMoney" name ="planMoney" type="number" value= 0.00 min = "0" step= "50.01" placeholder="请输入">
|
||||
</div> -->
|
||||
|
||||
<label class="col-sm-2 control-label">计划完成时间</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="planDate" name="planDate"
|
||||
style="width: 132px;" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">保养内容</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control " id="schemeResume" name="schemeResume" rows="2"
|
||||
placeholder="保养内容...">${workorderDetail.schemeResume}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<c:if test="${compete == '0'}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*是否抢单</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control select2" id="compete" name="isCompete"
|
||||
style="width: 270px;">
|
||||
<option value="${Active_True}">是</option>
|
||||
<option value="${Active_False}" selected="selected">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<div id="selectUsers" class="form-group">
|
||||
<label class="col-sm-2 control-label">*接收人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name="targetUsersName"
|
||||
placeholder="请选择接收人员" onclick="showUser4SelectsFun();" autocomplete="off">
|
||||
<input id="receiveUserId" name="receiveUserId" type="hidden"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="selectDepts" class="form-group">
|
||||
<label class="col-sm-2 control-label">*抢单班组</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetTeamsName" name="targetTeamsName"
|
||||
placeholder="参与抢单班组" onclick="showTeam4Handle();" autocomplete="off">
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</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" id="targetUsersName" name="targetUsersName"
|
||||
placeholder="请选择接收人员" onclick="showUser4SelectsFun();" autocomplete="off">
|
||||
<input id="solver" name="receiveUserId" type="hidden"/>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<!-- <div class="form-group" style="margin:8px">
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput()" id="btn_save"><i class="fa fa-paperclip"></i>上传图片</button>
|
||||
</div> -->
|
||||
<!-- <div class="form-group" style="margin:8px;">
|
||||
<input type="file" name="maintenanceDetailFile" id="maintenanceDetailFile" multiple class="file-loading" />
|
||||
</div> -->
|
||||
<!-- 文件上传,显示 -->
|
||||
<!-- <div class="form-group" style="margin:8px">
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()" id="btn_save"><i class="fa fa-paperclip"></i>上传文件</button>
|
||||
</div>
|
||||
<div class="file-border" id="fileArea">
|
||||
</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>
|
||||
449
WebRoot/jsp/workorder/workorderDetailMaintainAudit.jsp
Normal file
449
WebRoot/jsp/workorder/workorderDetailMaintainAudit.jsp
Normal file
@ -0,0 +1,449 @@
|
||||
<%@ 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" %>
|
||||
|
||||
<%--维修内容--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderMaintainContent.js"
|
||||
charset="utf-8"></script>
|
||||
<%--消耗品--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderConsume.js"
|
||||
charset="utf-8"></script>
|
||||
<%--参与人员绩效--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderAchievement.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<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 masterId_process = '${scrapApply.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process = 'ProcessUploadFile';//保存文件夹
|
||||
var status = 'delete';//有删除权限
|
||||
|
||||
function doSubmit() {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('targetUsersName', 'NOT_VALIDATED', null)
|
||||
.validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/workorder/workorderDetail/doWorkorderDetailMaintainAuditProcess.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModalAudit')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '操作执行失败,请重试');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#targetusers").val();
|
||||
var jobIds = $("#targetjobs").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByCompany.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "targetusers",
|
||||
textId: "targetUsersName",
|
||||
userIds: userIds,
|
||||
jobIds: jobIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
$(function () {
|
||||
|
||||
$('#completeDate').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
language: "zh-CN",
|
||||
autoclose: true,
|
||||
startView: 1,
|
||||
minViewMode: 0,
|
||||
maxViewMode: 0,
|
||||
}).on('hide', function (e) {
|
||||
$('#subForm').data('bootstrapValidator').updateStatus('completeDate', 'NOT_VALIDATED', null).validateField('completeDate');
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/compareDate.do', {
|
||||
sdt: $("#repairDate").val() + " 00:00:00",
|
||||
edt: $("#completeDate").val() + " 00:00:00"
|
||||
}, function (data) {
|
||||
if (data == 1) {
|
||||
layer.open({
|
||||
title: '提示'
|
||||
, content: '验收时间无法比保养完成时间早!'
|
||||
});
|
||||
$("#completeDate").datepicker('setDate', new Date());
|
||||
}
|
||||
});
|
||||
});
|
||||
$("#completeDate").datepicker('setDate', new Date());
|
||||
|
||||
var id = '${entity.id}';
|
||||
//加载维修内容(编辑页面)
|
||||
getRepairContent(id);
|
||||
//加载绩效(编辑页面)
|
||||
getWorkAchievements(id);
|
||||
//加载消耗品(编辑页面)
|
||||
getWorkConsume(id);
|
||||
|
||||
//初始化文件显示
|
||||
getFileList_process();
|
||||
//初始化选择框,方法在workflow.js里
|
||||
processSelectNode("${businessUnitAudit.taskid}");
|
||||
//输入框验证
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
targetUsersName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '提交人员不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
completeDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '完成日期不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
//显示流程详情
|
||||
var id = '${entity.id}';
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/showWorkorderDetailRepairProcessView.do', {
|
||||
id: id,
|
||||
inModal: 'inModal'
|
||||
}, function (data) {
|
||||
$("#showView").html(data);
|
||||
});
|
||||
|
||||
//附表内容
|
||||
$("#table_detail").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/waterTestDetail/getList.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,
|
||||
pid: '${entity.id}'
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '化验指标名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '32%',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.libraryWaterTest != null && row.libraryWaterTest != '') {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + row.libraryWaterTest.mPoint.parmname + "'>" + row.libraryWaterTest.mPoint.parmname + "</span>";
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '额定工时', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '12%',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.libraryWaterTest != null && row.libraryWaterTest != '') {
|
||||
return row.libraryWaterTest.baseHours;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '额定费用', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '12%',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.libraryWaterTest != null && row.libraryWaterTest != '') {
|
||||
return row.libraryWaterTest.baseCost;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '实际工时', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '12%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.actualTime;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '实际费用', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '12%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.actualCost;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '实施人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + row.implementUserName + "'>" + row.implementUserName + "</span>";
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '8%', // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = '';
|
||||
buts += '<button class="btn btn-default btn-sm" title="查看" onclick="viewFunDetail(\'' + row.id + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 查看</span></button>';
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table_detail");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
var viewFunDetail = function (id) {
|
||||
$.post(ext.contextPath + '/process/waterTestDetail/doview.do', {id: id}, function (data) {
|
||||
$("#subDivDetail").html(data);
|
||||
openModal('subModalDetail');
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModalAudit">
|
||||
<div class="modal-dialog modal-xlg">
|
||||
<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">保养工单(${taskName})</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-7 col-xs-12">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" enctype="multipart/form-data">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工单号</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${entity.jobNumber}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">工单名称</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${entity.jobName}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">设备编号</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${entity.equipmentCard.equipmentcardid}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">设备名称</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${entity.equipmentCard.equipmentname}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计划时间</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${fn:substring(entity.planDate, 0, 10)}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">保养完成时间</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${fn:substring(entity.repairDate, 0, 10)}</p>
|
||||
<input id="repairDate" type="hidden" value="${entity.repairDate}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">验收完成日期</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group input-group-sm" style="width: 150px;">
|
||||
<input type="text" autocomplete="off" class="form-control pull-left"
|
||||
style="height: 34px; width: 150px; border-radius: 5px;"
|
||||
name="completeDate" id="completeDate" style="width:320px;"
|
||||
placeholder="请选择日期">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" class="form-control" name="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name="processid"
|
||||
value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name="businessid"
|
||||
value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name=unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name="taskdefinitionkey"
|
||||
value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*审核结果</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="passstatus" name="passstatus"
|
||||
style="width: 270px;">
|
||||
<option value=true>通过</option>
|
||||
<option value=false>驳回</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*下一节点</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="routeNum" name="routeNum"
|
||||
style="width: 270px;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div id="reject" class="form-group">
|
||||
<label class="col-sm-2 control-label">*审核意见</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id="auditopinion" name="auditopinion"
|
||||
placeholder="处理意见"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div id="selectUsers" class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name="targetUsersName"
|
||||
placeholder="下一级人员" onclick="showUser4SelectsFun();">
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
<input class="form-control" id="targetjobs" name="targetjobs" type="hidden"
|
||||
value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<!-- <div class="form-group" style="margin:8px">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()" id="btn_save"><i
|
||||
class="fa fa-paperclip"></i>上传文件</button>
|
||||
</div> -->
|
||||
<%--<div id="fileArea">
|
||||
</div>--%>
|
||||
</form>
|
||||
|
||||
<!-- <div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">化验指标内容</h3> (工时单位:小时 费用单位:元)
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_detail" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">保养内容</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="addFun_Content('${entity.id}','${entity.unitId}')"
|
||||
class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deleteFun_Content()" class="btn btn-box-tool" data-toggle="tooltip"
|
||||
title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
<a onclick="addFun4Library_Content('${entity.id}','${entity.unitId}')"
|
||||
class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="导入"><i class="glyphicon glyphicon-th-list"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_repair_detail" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">消耗物品</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="addDetailFun('${entity.id}')" class="btn btn-box-tool"
|
||||
data-toggle="tooltip"
|
||||
title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deletesDetailFun()" class="btn btn-box-tool" data-toggle="tooltip"
|
||||
title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
<a onclick="addConsume4Library('${entity.id}','${entity.unitId}')"
|
||||
class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="导入"><i class="glyphicon glyphicon-th-list"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<table id="table_outStockDetail"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">参与人员绩效</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="doAchievementAdd('${entity.id}')" class="btn btn-box-tool"
|
||||
data-toggle="tooltip"
|
||||
title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deleteAchievementFun()" class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="删除"><i
|
||||
class="glyphicon glyphicon-minus"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_achievements" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-5 col-xs-12" id="showView"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doSubmit()" id="btn_update">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
322
WebRoot/jsp/workorder/workorderDetailMaintainHandle.jsp
Normal file
322
WebRoot/jsp/workorder/workorderDetailMaintainHandle.jsp
Normal file
@ -0,0 +1,322 @@
|
||||
<%@ 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" %>
|
||||
|
||||
<%--维修内容--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderMaintainContent.js"
|
||||
charset="utf-8"></script>
|
||||
<%--消耗品--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderConsume.js"
|
||||
charset="utf-8"></script>
|
||||
<%--参与人员绩效--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderAchievement.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<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 masterId_process = '${scrapApply.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process = 'ProcessUploadFile';//保存文件夹
|
||||
var status = 'delete';//有删除权限
|
||||
|
||||
function doSubmit() {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('targetUsersName', 'NOT_VALIDATED', null)
|
||||
.validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/workorder/workorderDetail/doWorkorderDetailMaintainHandleProcess.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModalHandle')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '操作执行失败,请重试');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
var showUser4Handle = function () {
|
||||
var userIds = $("#targetusers").val();
|
||||
var jobIds = $("#targetjobs").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByCompany.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "targetusers",
|
||||
textId: "targetUsersName",
|
||||
userIds: userIds,
|
||||
jobIds: jobIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
$(function () {
|
||||
var id = '${entity.id}';
|
||||
//加载维修内容(编辑页面)
|
||||
getRepairContent(id);
|
||||
//加载绩效(编辑页面)
|
||||
getWorkAchievements(id);
|
||||
//加载消耗品(编辑页面)
|
||||
getWorkConsume(id);
|
||||
|
||||
//初始化文件显示
|
||||
getFileList_process();
|
||||
//初始化选择框,方法在workflow.js里
|
||||
processSelectNodeForHandle("${businessUnitHandle.taskid}");
|
||||
//输入框验证
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
targetUsersName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '提交人员不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
repairDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '保养日期不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
//显示右边流程
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/showWorkorderDetailRepairProcessView.do', {
|
||||
id: id,
|
||||
inModal: 'inModal'
|
||||
}, function (data) {
|
||||
$("#showView").html(data);
|
||||
});
|
||||
|
||||
$('#repairDate').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
language: "zh-CN",
|
||||
autoclose: true,
|
||||
startView: 1,
|
||||
minViewMode: 0,
|
||||
maxViewMode: 0,
|
||||
}).on('hide', function (e) {
|
||||
$('#subForm').data('bootstrapValidator').updateStatus('repairDate', 'NOT_VALIDATED', null).validateField('repairDate');
|
||||
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/compareDate.do', {
|
||||
sdt: '${fn:substring(entity.insdt, 0, 10)}' + ' 00:00:00',
|
||||
edt: $("#repairDate").val() + " 00:00:00"
|
||||
}, function (data) {
|
||||
if (data == 1) {
|
||||
layer.open({
|
||||
title: '提示'
|
||||
, content: '当前选择保养完成时间将早于发单时间!'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#repairDate").datepicker('setDate', new Date());
|
||||
})
|
||||
|
||||
setTimeout(function () {
|
||||
var routeName = $("#routeNum").find("option:selected").text();
|
||||
if (routeName == "结束流程") {
|
||||
$("#selectUsers").hide();
|
||||
} else {
|
||||
$("#selectUsers").show();
|
||||
}
|
||||
}, 500);
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModalHandle">
|
||||
<div class="modal-dialog modal-xlg">
|
||||
<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">保养工单(${taskName})</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-7 col-xs-12">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" enctype="multipart/form-data">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工单号</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${entity.jobNumber}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">工单名称</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${entity.jobName}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">设备编号</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${entity.equipmentCard.equipmentcardid}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">设备名称</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${entity.equipmentCard.equipmentname}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计划时间</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${fn:substring(entity.planDate, 0, 10)}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">保养完成日期</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group input-group-sm" style="width: 150px;">
|
||||
<input type="text" autocomplete="off" class="form-control pull-left"
|
||||
style="height: 34px; width: 150px; border-radius: 5px;"
|
||||
name="repairDate" id="repairDate" style="width:320px;"
|
||||
placeholder="请选择日期">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计划内容</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${entity.schemeResume}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" class="form-control" name="id" value="${businessUnitHandle.id}">
|
||||
<input type="hidden" class="form-control" name="processid"
|
||||
value="${businessUnitHandle.processid}">
|
||||
<input type="hidden" class="form-control" name="taskid"
|
||||
value="${businessUnitHandle.taskid}">
|
||||
<input type="hidden" class="form-control" name="businessid"
|
||||
value="${businessUnitHandle.businessid}">
|
||||
<input type="hidden" class="form-control" name="taskdefinitionkey"
|
||||
value="${businessUnitHandle.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" name="unitid"
|
||||
value="${businessUnitHandle.unitid}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*下一节点</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="routeNum" name="routeNum"
|
||||
style="width: 270px;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div id="reject" class="form-group">
|
||||
<label class="col-sm-2 control-label">*处理意见</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id="auditopinion" name="auditopinion"
|
||||
placeholder="处理意见">已保养</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div id="selectUsers" class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name="targetUsersName"
|
||||
placeholder="下一级人员" onclick="showUser4Handle();">
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
<input class="form-control" id="targetjobs" name="targetjobs" type="hidden"
|
||||
value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<!-- <div class="form-group" style="margin:8px">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()" id="btn_save"><i
|
||||
class="fa fa-paperclip"></i>上传文件</button>
|
||||
</div> -->
|
||||
<%--<div id="fileArea">
|
||||
</div>--%>
|
||||
</form>
|
||||
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">保养内容</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="addFun_Content('${entity.id}','${entity.unitId}')"
|
||||
class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deleteFun_Content()" class="btn btn-box-tool" data-toggle="tooltip"
|
||||
title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
<%--<a onclick="addFun4Library_Content('${entity.id}','${entity.unitId}')" class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="导入"><i class="glyphicon glyphicon-th-list"></i></a>--%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_repair_detail" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">消耗物品</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="addDetailFun('${entity.id}')" class="btn btn-box-tool"
|
||||
data-toggle="tooltip"
|
||||
title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deletesDetailFun()" class="btn btn-box-tool" data-toggle="tooltip"
|
||||
title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
<a onclick="addConsume4Library('${entity.id}','${entity.unitId}')"
|
||||
class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="导入"><i class="glyphicon glyphicon-th-list"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<table id="table_outStockDetail"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">参与人员绩效</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="doAchievementAdd('${entity.id}')" class="btn btn-box-tool"
|
||||
data-toggle="tooltip"
|
||||
title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deleteAchievementFun()" class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="删除"><i
|
||||
class="glyphicon glyphicon-minus"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_achievements" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-5 col-xs-12" id="showView"></div>
|
||||
|
||||
</div>
|
||||
</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="doSubmit()" id="btn_update">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
594
WebRoot/jsp/workorder/workorderDetailMaintainList.jsp
Normal file
594
WebRoot/jsp/workorder/workorderDetailMaintainList.jsp
Normal file
@ -0,0 +1,594 @@
|
||||
<%@ page import="com.sipai.entity.activiti.ProcessType" %>
|
||||
<%@ 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" %>
|
||||
|
||||
<%@page import="com.sipai.entity.workorder.WorkorderDetail" %>
|
||||
<%request.setAttribute("Status_Start", WorkorderDetail.Status_Start);%>
|
||||
<%request.setAttribute("Status_Finish", WorkorderDetail.Status_Finish);%>
|
||||
<%request.setAttribute("Status_Compete", WorkorderDetail.Status_Compete);%>
|
||||
|
||||
<%request.setAttribute("REPAIR", WorkorderDetail.REPAIR);%>
|
||||
<%request.setAttribute("MAINTAIN", WorkorderDetail.MAINTAIN);%>
|
||||
<%request.setAttribute("ANTISEPTIC", WorkorderDetail.ANTISEPTIC);%>
|
||||
<%request.setAttribute("LUBRICATION", WorkorderDetail.LUBRICATION);%>
|
||||
<%request.setAttribute("INSTRUMENT", WorkorderDetail.INSTRUMENT);%>
|
||||
|
||||
<%request.setAttribute("planIn", WorkorderDetail.planIn);%>
|
||||
<%request.setAttribute("planOut", WorkorderDetail.planOut);%>
|
||||
|
||||
<%request.setAttribute("smallRepair", WorkorderDetail.smallRepair);%>
|
||||
<%request.setAttribute("middleRepair", WorkorderDetail.middleRepair);%>
|
||||
|
||||
<%request.setAttribute("Workorder_Maintain", ProcessType.Workorder_Maintain.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>
|
||||
<!-- 文件上传-->
|
||||
<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>
|
||||
<style type="text/css">
|
||||
.main-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.content-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main-footer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.table-hover > tbody > tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
var beginTimeStore2 = '';
|
||||
var endTimeStore2 = '';
|
||||
|
||||
//新增
|
||||
var addFun = function () {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/doAddMaintain.do', {unitId: unitId}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
//浏览
|
||||
var viewFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/doViewMaintain.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
//抢单
|
||||
var doCompete = function (id) {
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/doCompete4Repair.do', {id: id, userId: '${userId}'}, function (data) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
});
|
||||
}
|
||||
|
||||
//流程详情
|
||||
var viewDetailFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/showWorkorderDetailRepairProcessView.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('processViewModal');
|
||||
});
|
||||
};
|
||||
|
||||
var deletesFun = function () {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
//console.log('getSelections',checkedItems);
|
||||
var datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
//进入流程的不能删除
|
||||
/*if (item.status == null || item.status == '0' || item.status == '') {
|
||||
datas += item.id + ",";
|
||||
}*/
|
||||
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 + '/workorder/workorderDetail/delete4Maintain.do', {ids: datas}, function (data) {
|
||||
var obj = $.parseJSON(data);
|
||||
if (obj.result > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
//刷新表格
|
||||
var dosearch = function () {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
//跳转至待办
|
||||
function TaskListFun4Type(id) {
|
||||
window.parent.addTab('taskList', '待办事项', 'activiti/workflow/taskList.do?modelKey=${Workorder_Maintain}-' + unitId + '&businessKey=' + id);
|
||||
}
|
||||
|
||||
//加载完厂区后,初始化工艺段和表格
|
||||
function initFun() {
|
||||
//选择工艺段
|
||||
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId: unitId}, function (data) {
|
||||
$("#processSection").empty();
|
||||
var selelct_ = $("#processSection").select2({
|
||||
data: data,
|
||||
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;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct_.val("").trigger("change");
|
||||
selelct_.on("change", function (e) {
|
||||
dosearch();
|
||||
});
|
||||
}, 'json');
|
||||
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/workorder/workorderDetail/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
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: unitId,
|
||||
// processSectionId: $('#processSection').val(),
|
||||
status: '0',//0为进行中
|
||||
type: '${MAINTAIN},${ANTISEPTIC},${LUBRICATION},${INSTRUMENT}',
|
||||
monthDt: '${param.monthDt}',
|
||||
name: $('#name').val(),
|
||||
date: $('#reservationtimeD').val(),
|
||||
isCompete: $('#isCompete').val(),
|
||||
searchContent: $('#searchContent').val(),
|
||||
// jobNumber: $('#jobNumber').val(),
|
||||
// jobName: $('#jobName').val(),
|
||||
// equipmentcardid: $('#equipmentcardid').val(),
|
||||
// equipmentname: $('#equipmentname').val()
|
||||
// sdt: beginTimeStore2,
|
||||
// edt: endTimeStore2,
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {
|
||||
// viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
<%--{--%>
|
||||
<%-- checkbox: true,--%>
|
||||
<%-- width: '40px',--%>
|
||||
<%-- formatter: function (value, row, index) {--%>
|
||||
<%-- if (row.status == null || row.status == '0' || row.status == '' || row.status == '${Status_Compete}') {--%>
|
||||
<%-- return {disabled: false,}--%>
|
||||
<%-- } else {--%>
|
||||
<%-- return {disabled: true,}--%>
|
||||
<%-- }--%>
|
||||
<%-- }--%>
|
||||
<%--},--%>
|
||||
{
|
||||
checkbox: true,
|
||||
width: '40px'
|
||||
},
|
||||
{
|
||||
field: 'company.name', // 返回json数据中的name
|
||||
title: '所属厂区', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '7%'
|
||||
},
|
||||
{
|
||||
field: 'jobNumber', // 返回json数据中的name
|
||||
title: '工单编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '15%'
|
||||
},
|
||||
{
|
||||
field: 'equipmentCard.equipmentcardid', // 返回json数据中的name
|
||||
title: '设备编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '14%'
|
||||
},
|
||||
{
|
||||
field: 'equipmentCard.equipmentname', // 返回json数据中的name
|
||||
title: '设备名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '14%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + value + "'>" + value + "</span>";
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'schemeResume', // 返回json数据中的name
|
||||
title: '保养内容', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '15%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + value + "'>" + value + "</span>";
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'type', // 返回json数据中的name
|
||||
title: '类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '5%',
|
||||
formatter: function (value, row, index) { //'${MAINTAIN},${ANTISEPTIC},${LUBRICATION},${INSTRUMENT}'
|
||||
switch (value) {
|
||||
case '${MAINTAIN}':
|
||||
return '通用';
|
||||
case '${ANTISEPTIC}':
|
||||
return '防腐';
|
||||
case '${LUBRICATION}':
|
||||
return '润滑';
|
||||
case '${INSTRUMENT}':
|
||||
return '仪表';
|
||||
default:
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'insdt', // 返回json数据中的name
|
||||
title: '发起时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
return value.substring(0, 19);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'user.caption', // 返回json数据中的name
|
||||
title: '保养人员', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '7%'
|
||||
},
|
||||
{
|
||||
field: 'status', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '7%',
|
||||
formatter: function (value, row, index) {
|
||||
if (value == '${Status_Start}' && row.type == '${TYPE_SUPPLEMENT}') {
|
||||
return '处理中';
|
||||
} else if (value == '${Status_Start}') {
|
||||
return '已下发';
|
||||
} else if (value == '${Status_Compete}') {
|
||||
return '待抢单';
|
||||
} else if (value == '${Status_Finish}') {
|
||||
return '已完成';
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '120px',
|
||||
formatter: function (value, row, index) {
|
||||
var buts = '';
|
||||
buts += '<button type="button" class="btn btn-default btn-sm" title="浏览" onclick="viewFun(\'' + row.id + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 浏览</span></button>';
|
||||
if(row.status == '${Status_Compete}'){
|
||||
buts += '<button type="button" class="btn btn-default btn-sm" title="抢单" onclick="doCompete(\'' + row.id + '\')"><i class="fa fa-tag"></i><span class="hidden-md hidden-lg"> 处理</span></button>';
|
||||
}else{
|
||||
buts += '<button type="button" class="btn btn-default btn-sm" title="处理" onclick="TaskListFun4Type(\'' + row.id + '\')"><i class="fa fa-play"></i><span class="hidden-md hidden-lg"> 处理</span></button>';
|
||||
}
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
console.info("加载数据成功");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
//设备类型tree
|
||||
$.post(ext.contextPath + '/equipment/equipmentClass/getTreeJson.do', {
|
||||
ng: '',
|
||||
unitId: unitId
|
||||
}, function (data) {
|
||||
var datastr = data.result;
|
||||
if (datastr.length == 1 && !datastr[0].hasOwnProperty("nodes")) {
|
||||
//当登陆者的pid以下没有子节点时显示单独一个span
|
||||
$("#search_pid3").val(datastr[0].id);
|
||||
$("#companyselect3").hide();
|
||||
//$("#companyName3").text("公司: " + data[0].text);
|
||||
initMenu();
|
||||
} else if ((data.length == 1 && data.nodes != "") || datastr.length > 1) {
|
||||
//第一次加载时赋值
|
||||
$("#search_pid3").val(datastr[0].id);
|
||||
$("#cname_input3").val(datastr[0].text);
|
||||
//initMenu();
|
||||
$('#companytree3').treeview({
|
||||
data: datastr,
|
||||
showBorder: false,
|
||||
levels: 3,
|
||||
});
|
||||
$('#companytree3').on('nodeSelected', function (event, data) {
|
||||
$("#search_pid3").val(data.id);
|
||||
$("#cname_input3").val(data.text);
|
||||
document.getElementById('ul_tree3').style.display = "none";
|
||||
//initMenu();
|
||||
});
|
||||
} else {
|
||||
//待完善
|
||||
}
|
||||
;
|
||||
}, 'json');
|
||||
//防止点击树的+号收起下拉框
|
||||
$("#ul_tree3").on("click", function (e) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
//点击空白隐藏树
|
||||
$(document).click(function (e) {
|
||||
var divTree = $('#ul_tree3'); // 设置目标区域
|
||||
if (!divTree.is(e.target) && divTree.has(e.target).length === 0) {
|
||||
divTree.hide()
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
$(function () {
|
||||
initDate1();
|
||||
var flag = IsApp();
|
||||
if (flag == true) {
|
||||
|
||||
} else {
|
||||
$(".main-header").show();
|
||||
$(".content-header").show();
|
||||
$(".main-footer").show();
|
||||
}
|
||||
$('#reservationtimeD').val('');
|
||||
initFun();
|
||||
});
|
||||
|
||||
function initDate1() {
|
||||
var locale = {
|
||||
"format": 'YYYY-MM-DD HH:mm',
|
||||
"separator": " ~ ",
|
||||
"applyLabel": "确定",
|
||||
"cancelLabel": "取消",
|
||||
"fromLabel": "起始时间",
|
||||
"toLabel": "结束时间'",
|
||||
"customRangeLabel": "自定义",
|
||||
"weekLabel": "W",
|
||||
"daysOfWeek": ["日", "一", "二", "三", "四", "五", "六"],
|
||||
"monthNames": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||||
"firstDay": 1
|
||||
};
|
||||
|
||||
var oldreservationtime1 = "${param.oldreservationtime1}";
|
||||
if (oldreservationtime1 != "" && oldreservationtime1.length > 0) {
|
||||
beginTimeStore1 = oldreservationtime1.substring(0, 16);
|
||||
endTimeStore1 = oldreservationtime1.substring(19, 36);
|
||||
$('#reservationtimeD').val(oldreservationtime1);
|
||||
} else {
|
||||
beginTimeStore1 = moment().subtract(3, 'days').format('YYYY-MM-DD HH:mm');
|
||||
endTimeStore1 = moment().subtract(0, 'days').format('YYYY-MM-DD HH:mm');
|
||||
$('#reservationtimeD').val(beginTimeStore1 + locale.separator + endTimeStore1);
|
||||
}
|
||||
|
||||
$('#reservationtimeD').daterangepicker({
|
||||
"timePicker": true,
|
||||
"timePicker24Hour": true,
|
||||
"linkedCalendars": false,
|
||||
"autoUpdateInput": false,
|
||||
"timePickerIncrement": 10,
|
||||
"locale": locale,
|
||||
//汉化按钮部分
|
||||
ranges: {
|
||||
// '今日': [moment(), moment().subtract(-1, 'days')],
|
||||
'昨日': [moment().subtract(1, 'days'), moment()],
|
||||
'最近7日': [moment().subtract(6, 'days'), moment().subtract(-1, 'days')],
|
||||
'本月': [moment().startOf('month'), moment().endOf('month').subtract(-1, 'days')],
|
||||
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month').subtract(-1, 'days')]
|
||||
},
|
||||
startDate: beginTimeStore1,
|
||||
endDate: endTimeStore1
|
||||
}, function (start, end, label) {
|
||||
beginTimeStore1 = start.format(this.locale.format);
|
||||
endTimeStore1 = end.format(this.locale.format);
|
||||
if (!this.startDate) {
|
||||
this.element.val('');
|
||||
} else {
|
||||
this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div id="fault4SelectDiv"></div>
|
||||
<div id="handleDetailDiv"></div>
|
||||
<div id="maintainPlanDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="emSubDiv"></div>
|
||||
<div>
|
||||
<div class="form-group pull-left" style="padding:0;">
|
||||
<div class="btn-group" style="width: 380px;">
|
||||
<security:authorize buttonUrl="maintenance/addDetail.do">
|
||||
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i
|
||||
class="fa fa-plus"></i> 新增
|
||||
</button>
|
||||
|
||||
<c:if test="${userId == 'emp01'}">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i
|
||||
class="fa fa-trash-o"></i> 删除
|
||||
</button>
|
||||
</c:if>
|
||||
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group pull-right form-inline hidden-xs">
|
||||
<div class="form-group">
|
||||
<label class="form-label">发单类型:</label>
|
||||
<select class="form-control select2 " id="isCompete" name="isCompete"
|
||||
style="width: 150px; height: 34px; border-radius: 5px;">
|
||||
<option value="1">抢单</option>
|
||||
<option value="0">派单</option>
|
||||
<option value="" selected>全部</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group input-group-sm" style="width: 150px;">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" autocomplete="off" class="form-control pull-left" style="height: 34px; width: 150px; border-radius: 5px;"
|
||||
id="reservationtimeD" style="width:320px;" placeholder="请选择日期">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="searchContent" name="searchContent" style="height: 34px; border-radius: 5px;"
|
||||
class="form-control pull-right"
|
||||
placeholder="模糊搜索:工单编号/工单名称/设备编号/设备名称">
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group input-group-sm pull-right" style="width: 150px; padding-left: 5px">
|
||||
<div class="input-group input-group-sm " style="width: 150px;">
|
||||
<input type="text" id="name" name="name" style="height: 34px;" class="form-control pull-right"
|
||||
placeholder="请输入人员姓名">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height: 34px;" onclick="dosearch();"><i
|
||||
class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
document.write("<scr" + "ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js\"></sc" + "ript>")
|
||||
document.write("<scr" + "ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js\"></sc" + "ript>")
|
||||
</script>
|
||||
<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>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
202
WebRoot/jsp/workorder/workorderDetailMaintainView.jsp
Normal file
202
WebRoot/jsp/workorder/workorderDetailMaintainView.jsp
Normal file
@ -0,0 +1,202 @@
|
||||
<%@ 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" %>
|
||||
|
||||
<%@page import="com.sipai.entity.workorder.WorkorderDetail" %>
|
||||
<%request.setAttribute("planIn", WorkorderDetail.planIn);%>
|
||||
<%request.setAttribute("planOut", WorkorderDetail.planOut);%>
|
||||
<%request.setAttribute("smallRepair", WorkorderDetail.smallRepair);%>
|
||||
<%request.setAttribute("middleRepair", WorkorderDetail.middleRepair);%>
|
||||
|
||||
<%--维修内容--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderRepairContent.js"
|
||||
charset="utf-8"></script>
|
||||
<%--消耗品--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderConsume.js"
|
||||
charset="utf-8"></script>
|
||||
<%--参与人员绩效--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderAchievement.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
.select2-container {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
//流程审核文件上传所需参数
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process = 'ProcessUploadFile';//保存文件夹
|
||||
var status = 'delete';//有删除权限
|
||||
|
||||
$(function () {
|
||||
var id = '${entity.id}';
|
||||
//加载维修内容(浏览页面)
|
||||
getRepairContentView(id);
|
||||
//加载工时(浏览页面)
|
||||
getWorkAchievementsView(id);
|
||||
//加载消耗品(浏览页面)
|
||||
getWorkConsumeView(id);
|
||||
|
||||
//加载维修流程
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/showWorkorderDetailRepairProcessView.do', {
|
||||
id: id,
|
||||
inModal: 'inModal'
|
||||
}, function (data) {
|
||||
$("#showView").html(data);
|
||||
});
|
||||
|
||||
//查询抢单班组
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/selectCompeteTeamNames.do', {
|
||||
id: id
|
||||
}, function (data) {
|
||||
$("#competeTeamIds").html(data);
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-xlg">
|
||||
<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">
|
||||
<div class="row">
|
||||
<div class="col-md-7 col-xs-12">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" enctype="multipart/form-data">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">设备编号</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${entity.equipmentCard.equipmentcardid}</p>
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">设备名称</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${entity.equipmentCard.equipmentname}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工单号</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${entity.jobNumber}</p>
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">工单名称</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${entity.jobName}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计划时间</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${fn:substring(entity.planDate, 0, 10)}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">保养内容</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${entity.schemeResume}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">发单人员:</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${entity.issueUser.caption}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">发单时间:</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${fn:substring(entity.insdt, 0, 19)}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">保养人员:</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${entity.receiveUser.caption}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">完成时间:</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${fn:substring(entity.completeDate, 0, 10)}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<c:if test="${entity.isCompete=='1'}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">抢单班组</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static" id="competeTeamIds"></p>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<div id="fileArea">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">保养内容</h3>
|
||||
<div class="box-tools pull-right">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_repair_detail" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">消耗物品</h3>
|
||||
<div class="box-tools pull-right">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<table id="table_outStockDetail"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">工时分配</h3>
|
||||
<div class="box-tools pull-right">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_achievements" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-5 col-xs-12" id="showView"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
212
WebRoot/jsp/workorder/workorderDetailMaintain_processView.jsp
Normal file
212
WebRoot/jsp/workorder/workorderDetailMaintain_processView.jsp
Normal file
@ -0,0 +1,212 @@
|
||||
<%@page import="com.sipai.entity.business.BusinessUnit" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();%>
|
||||
<%String serverPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();%>
|
||||
<%request.setAttribute("Status_Finish", Maintenance.Status_Finish);%>
|
||||
<!-- 补录状态 -->
|
||||
<%request.setAttribute("TYPE_SUPPLEMENT", Maintenance.TYPE_SUPPLEMENT);%>
|
||||
<!-- 运维主流程状态 -->
|
||||
<%request.setAttribute("TYPE_MAINTENANCE", Maintenance.TYPE_MAINTENANCE);%>
|
||||
<%request.setAttribute("UNIT_HANDLE", BusinessUnit.UNIT_HANDLE);%>
|
||||
<!-- bootstrap-star-rating -->
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/css/star-rating.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/js/star-rating.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
//var masterId=$('#maintenanceId').val();
|
||||
var tbName_problem = 'tb_maintenance_problem_fille'; //数据表
|
||||
var tbName_maintenance = 'tb_maintenance_file'; //数据表
|
||||
var nameSpace = 'MaintenanceProblem';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
/* var student = {
|
||||
"caption":"lilei",
|
||||
|
||||
}
|
||||
previewConfigs[0]=student; */
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove: false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse: false,//选择按钮
|
||||
showClose: false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
resizeImage: true,
|
||||
fileActionSettings: {
|
||||
showDrag: false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount: true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig: previewConfigs,
|
||||
layoutTemplates: {
|
||||
actionUpload: '',
|
||||
actionDelete: ''
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function () {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow", "auto");
|
||||
});
|
||||
}
|
||||
|
||||
var viewHandleDetailFun = function (id) {
|
||||
$.post(ext.contextPath + '/maintenance/showHandleDetailView.do', {id: id}, function (data) {
|
||||
$("#handleDetailDiv").html(data);
|
||||
openModal('handleDetailModal');
|
||||
});
|
||||
};
|
||||
|
||||
//流程审核文件上传所需参数
|
||||
var masterId_process = '${param.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process = 'ProcessUploadFile';//保存文件夹
|
||||
var status = 'view';//有查看权限
|
||||
|
||||
$(function () {
|
||||
getFileList_process();
|
||||
$("#judgemaintainerstaff").rating('refresh', {showClear: false, showCaption: false, readonly: true});
|
||||
$("#judgeresult").rating('refresh', {showClear: false, showCaption: false, readonly: true});
|
||||
var result = '${businessUnitRecords}';
|
||||
result = result.replace(new RegExp("\r\n", "gm"), "");
|
||||
var json = JSON.parse(result);
|
||||
$.each(json, function (index, item) {
|
||||
if (item.id != null && item.id != "") {
|
||||
previews = new Array();
|
||||
$('#' + item.id).show();
|
||||
var data = item.files;
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path = path.substring(path.indexOf('webapps') + 7, path.length);
|
||||
path = ext.basePath.replace(ext.contextPath, '') + path.replace(/\\/g, "\/");
|
||||
previews.push(path);
|
||||
previewConfig['width'] = '30px';
|
||||
previewConfig['caption'] = data[i].filename;
|
||||
previewConfig['key'] = data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput(item.id);
|
||||
}
|
||||
});
|
||||
})
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
var printpage = function (myDiv) {
|
||||
$('.printContent').show();
|
||||
var printHtml = document.getElementById(myDiv).innerHTML;
|
||||
var wind = window.open("", "newwin", "width=1550,height=565,top=80,left=80,toolbar=no,scrollbars=yes,menubar=no");
|
||||
var link = document.createElement('link');
|
||||
link.type = 'text/css';
|
||||
link.rel = 'stylesheet';
|
||||
link.href = '<%=serverPath%><%=contextPath%>/plugins/bootstrap-ext/dist/bootstrap.min.css';
|
||||
wind.document.head.appendChild(link);
|
||||
|
||||
wind.document.body.innerHTML = printHtml;
|
||||
wind.print();
|
||||
wind.close();
|
||||
$('.printContent').hide();
|
||||
};
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
</script>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- The time line -->
|
||||
<ul class="timeline">
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<li>
|
||||
<c:choose>
|
||||
<c:when test='${finishFlag && status.last}'>
|
||||
<i class="fa fa-check bg-blue"></i>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<i class="fa fa-clock-o bg-grey"></i>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<div class="timeline-item">
|
||||
<span class="time"><i class="fa fa-clock-o"></i> ${item.insdt.substring(0,16)}</span>
|
||||
<h3 class="timeline-header"><a href="#">${item.taskName}</a> ${item.user.caption}</h3>
|
||||
<div class="timeline-body" style="padding-left:5px;padding-right:5px;">
|
||||
<div>
|
||||
${item.record}
|
||||
<c:if test="${UNIT_HANDLE==item.type}">
|
||||
<a style="cursor:pointer" onclick="viewHandleDetailFun('${item.id}')">查看详情</a>
|
||||
</c:if>
|
||||
</div>
|
||||
<c:if test="${item.id!=''}">
|
||||
<div style="padding-top:5px;">
|
||||
<input type="file" id='${item.id}' multiple class="file-loading"/>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<%-- <c:forEach items="${item.files}" var="file" >
|
||||
<img src="${file.abspath.substring(file.abspath.indexOf('webapps')+7,file.abspath.length())}" height="200" width="200" class="margin">
|
||||
</c:forEach> --%>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</c:forEach>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<!--
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文件附件:</label>
|
||||
</div>
|
||||
<div class="file-border" id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
-->
|
||||
|
||||
<!-- 流程打印布局 开始-->
|
||||
<div id="maintenanceDetail">
|
||||
<div class="printContent" style="display:none">
|
||||
<h4 style="text-align:center;">流程处理详情</h4>
|
||||
</div>
|
||||
<div class="printContent" style="display:none">
|
||||
<table style="border-collapse:collapse;margin:0 auto">
|
||||
<tr>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">时间</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">发起人</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">任务</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">流程内容详情</td>
|
||||
</tr>
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<tr>
|
||||
<td style="border:1px solid black;width:150px;text-align: center;">${item.insdt.substring(0,16)}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.user.caption}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.taskName}</td>
|
||||
<td style="border:1px solid black;width:300px;">${item.record}</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
</div>
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div class="form-group">
|
||||
<!-- <label class="col-sm-2 control-label">文件附件:</label> -->
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<div class="file-border" id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- 流程打印布局 结束-->
|
||||
@ -0,0 +1,194 @@
|
||||
<%@page import="com.sipai.entity.business.BusinessUnit" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();%>
|
||||
<%String serverPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();%>
|
||||
<%request.setAttribute("Status_Finish", Maintenance.Status_Finish);%>
|
||||
<!-- 补录状态 -->
|
||||
<%request.setAttribute("TYPE_SUPPLEMENT", Maintenance.TYPE_SUPPLEMENT);%>
|
||||
<!-- 运维主流程状态 -->
|
||||
<%request.setAttribute("TYPE_MAINTENANCE", Maintenance.TYPE_MAINTENANCE);%>
|
||||
<%request.setAttribute("UNIT_HANDLE", BusinessUnit.UNIT_HANDLE);%>
|
||||
<!-- bootstrap-star-rating -->
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/css/star-rating.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/js/star-rating.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
//var masterId=$('#maintenanceId').val();
|
||||
var tbName_problem = 'tb_maintenance_problem_fille'; //数据表
|
||||
var tbName_maintenance = 'tb_maintenance_file'; //数据表
|
||||
var nameSpace = 'MaintenanceProblem';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
/* var student = {
|
||||
"caption":"lilei",
|
||||
|
||||
}
|
||||
previewConfigs[0]=student; */
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove: false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse: false,//选择按钮
|
||||
showClose: false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
resizeImage: true,
|
||||
fileActionSettings: {
|
||||
showDrag: false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount: true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig: previewConfigs,
|
||||
layoutTemplates: {
|
||||
actionUpload: '',
|
||||
actionDelete: ''
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function () {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow", "auto");
|
||||
});
|
||||
}
|
||||
|
||||
var viewHandleDetailFun = function (id) {
|
||||
$.post(ext.contextPath + '/maintenance/showHandleDetailView.do', {id: id}, function (data) {
|
||||
$("#handleDetailDiv").html(data);
|
||||
openModal('handleDetailModal');
|
||||
});
|
||||
};
|
||||
|
||||
//流程审核文件上传所需参数
|
||||
var masterId_process = '${param.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process = 'ProcessUploadFile';//保存文件夹
|
||||
var status = 'view';//有查看权限
|
||||
|
||||
$(function () {
|
||||
|
||||
})
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
var printpage = function (myDiv) {
|
||||
$('.printContent').show();
|
||||
var printHtml = document.getElementById(myDiv).innerHTML;
|
||||
var wind = window.open("", "newwin", "width=1550,height=565,top=80,left=80,toolbar=no,scrollbars=yes,menubar=no");
|
||||
|
||||
var link = document.createElement('link');
|
||||
link.type = 'text/css';
|
||||
link.rel = 'stylesheet';
|
||||
link.href = '<%=serverPath%><%=contextPath%>/plugins/bootstrap-ext/dist/bootstrap.min.css';
|
||||
wind.document.head.appendChild(link);
|
||||
/*
|
||||
var style = document.createElement('style');
|
||||
style.type = 'text/css';
|
||||
style.rel = 'stylesheet';
|
||||
style.appendChild(document.createTextNode(ss));
|
||||
wind.document.head.appendChild(style);
|
||||
*/
|
||||
wind.document.body.innerHTML = printHtml;
|
||||
//console.log(wind.document);
|
||||
wind.print();
|
||||
wind.close();
|
||||
$('.printContent').hide();
|
||||
};
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
</script>
|
||||
<div class="modal fade" id="mainViewModal">
|
||||
<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 " style="padding-left:0;padding-right:0;">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- The time line -->
|
||||
<ul class="timeline">
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<li>
|
||||
<c:choose>
|
||||
<c:when test='${finishFlag && status.last}'>
|
||||
<i class="fa fa-check bg-blue"></i>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<i class="fa fa-clock-o bg-grey"></i>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<div class="timeline-item">
|
||||
<span class="time"><i
|
||||
class="fa fa-clock-o"></i> ${item.insdt.substring(0,16)}</span>
|
||||
<h3 class="timeline-header"><a
|
||||
href="#">${item.taskName}</a> ${item.user.caption}</h3>
|
||||
<div class="timeline-body" style="padding-left:5px;padding-right:5px;">
|
||||
<div>
|
||||
${item.record}
|
||||
</div>
|
||||
<c:if test="${item.id!=''}">
|
||||
<%--<div style="padding-top:5px;">
|
||||
<input type="file" id='${item.id}' multiple class="file-loading"/>
|
||||
</div>--%>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</c:forEach>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 流程打印布局 开始 -->
|
||||
<div id="inStockExcuteDetail">
|
||||
<div class="printContent" style="display:none">
|
||||
<h4 style="text-align:center;">流程处理详情</h4>
|
||||
</div>
|
||||
<div class="printContent" style="display:none">
|
||||
<table style="border-collapse:collapse;margin:0 auto">
|
||||
<tr>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">时间</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">发起人</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">任务</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">流程内容详情</td>
|
||||
</tr>
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<tr>
|
||||
<td style="border:1px solid black;width:150px;text-align: center;">${item.insdt.substring(0,16)}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.user.caption}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.taskName}</td>
|
||||
<td style="border:1px solid black;width:300px;">${item.record}</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 流程打印布局 结束-->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" onclick="printpage('inStockExcuteDetail');"><i
|
||||
class="fa fa-print"></i>打印
|
||||
</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
704
WebRoot/jsp/workorder/workorderDetailRepairAdd.jsp
Normal file
704
WebRoot/jsp/workorder/workorderDetailRepairAdd.jsp
Normal file
@ -0,0 +1,704 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@page import="com.sipai.entity.workorder.WorkorderDetail" %>
|
||||
|
||||
<%request.setAttribute("planIn", WorkorderDetail.planIn);%>
|
||||
<%request.setAttribute("planOut", WorkorderDetail.planOut);%>
|
||||
|
||||
<%request.setAttribute("smallRepair", WorkorderDetail.smallRepair);%>
|
||||
<%request.setAttribute("middleRepair", WorkorderDetail.middleRepair);%>
|
||||
|
||||
<%@page import="com.sipai.tools.CommString" %>
|
||||
<%request.setAttribute("Active_False", CommString.Active_False); %>
|
||||
<%request.setAttribute("Active_True", CommString.Active_True); %>
|
||||
|
||||
<%@ page import="com.sipai.entity.activiti.ProcessType" %>
|
||||
<%request.setAttribute("Workorder_Repair", ProcessType.Workorder_Repair); %>
|
||||
|
||||
<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 masterId = '${id}';
|
||||
var tbName = 'tb_maintenance_problem_fille'; //数据表
|
||||
var nameSpace = 'MaintenanceProblem';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove: false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse: false,//选择按钮
|
||||
showClose: false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
fileActionSettings: {
|
||||
showDrag: false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount: true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig: previewConfigs,
|
||||
layoutTemplates: {
|
||||
actionUpload: ''
|
||||
},
|
||||
deleteUrl: ext.contextPath + "/base/deleteInputFile.do",
|
||||
deleteExtraData: function () { //传参
|
||||
var data = {
|
||||
"tbName": tbName
|
||||
};
|
||||
return data;
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function () {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow", "auto");
|
||||
});
|
||||
}
|
||||
|
||||
//名称定义不可修改
|
||||
var getFileList = function () {
|
||||
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId: masterId, tbName: tbName}, function (data) {
|
||||
//console.info(data)
|
||||
if (data.length > 0) {
|
||||
previews = new Array();
|
||||
$('#maintenancefile').show();
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path = path.substring(path.indexOf('webapps') + 7, path.length);
|
||||
path = ext.basePath.replace(ext.contextPath, '') + path.replace(/\\/g, "\/");
|
||||
;
|
||||
previews.push(path);
|
||||
previewConfig['width'] = '50px';
|
||||
previewConfig['caption'] = data[i].filename;
|
||||
previewConfig['key'] = data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput("maintenanceDetailFile");
|
||||
} else {
|
||||
$('#maintenanceDetailFile').hide();
|
||||
}
|
||||
}, 'json');
|
||||
};
|
||||
|
||||
var fileinput = function () {
|
||||
$.post(ext.contextPath + '/base/fileinput.do', {
|
||||
masterId: masterId,
|
||||
tbName: tbName,
|
||||
nameSpace: nameSpace
|
||||
}, function (data) {
|
||||
$("#fileInputDiv").html(data);
|
||||
openModal('fileInputModal');
|
||||
});
|
||||
};
|
||||
|
||||
//弹出人员列表
|
||||
var showUser4Handle = function () {
|
||||
var userIds = $("#receiveUserId").val();
|
||||
$.post(ext.contextPath + '/user/layerUser.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "receiveUserId", //输入框的id
|
||||
textId: "targetUsersName", //输入框的name
|
||||
userIds: userIds, //已选的人员id
|
||||
unitId: unitId, //获取右上角的厂id
|
||||
type: '${Workorder_Repair}' //根据不同流程找到第一个节点的配置职位 ProcessType中的id
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
//弹出班组列表
|
||||
var showTeam4Handle = function () {
|
||||
var userIds = $("#targetusers").val();
|
||||
var jobIds = '';
|
||||
$.post(ext.contextPath + '/user/teamForSelectByCompany.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "targetusers",
|
||||
textId: "targetTeamsName",
|
||||
userIds: userIds,
|
||||
jobIds: jobIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function dosave() {
|
||||
var compete = $('#compete').val();
|
||||
if (compete == '${Active_True}') {
|
||||
dohandle_y();//抢单
|
||||
} else {
|
||||
dohandle_n();//非抢单
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定班组执行 -- 抢单
|
||||
*/
|
||||
function dohandle_y() {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('targetTeamsName', 'NOT_VALIDATED', null)
|
||||
.validateField('targetTeamsName');
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('equipmentNames', 'NOT_VALIDATED', null)
|
||||
.validateField('equipmentNames');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
//select置为disable后不能返回值到后台
|
||||
$("#companyid").removeAttr("disabled");
|
||||
var serialData = $("#subForm").serialize();
|
||||
$("#companyid").attr("disabled", "disabled");
|
||||
$.post(ext.contextPath + "/workorder/workorderDetail/startCompete4Repair.do", serialData, function (data) {
|
||||
if (data.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal')
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else if (data.res == 2) {
|
||||
showAlert('d', '未检测到维修工单流程,请先部署维修工单流程!');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定人员执行 -- 非抢单
|
||||
*/
|
||||
function dohandle_n() {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('targetUsersName', 'NOT_VALIDATED', null)
|
||||
.validateField('targetUsersName');
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('equipmentNames', 'NOT_VALIDATED', null)
|
||||
.validateField('equipmentNames');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
//select置为disable后不能返回值到后台
|
||||
$("#companyid").removeAttr("disabled");
|
||||
var serialData = $("#subForm").serialize();
|
||||
$("#companyid").attr("disabled", "disabled");
|
||||
$.post(ext.contextPath + "/workorder/workorderDetail/startWorkorderDetail.do", serialData, function (data) {
|
||||
if (data.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal')
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else if (data.res == 2) {
|
||||
showAlert('d', '未检测到维修工单流程,请先部署维修工单流程!');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
targetUsersName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '维修人员不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
targetTeamsName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '抢单班组不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
planDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '要求维修完成日期不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
faultDescription: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '故障现象描述不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
equipmentNames: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '故障设备不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
//流程审核文件上传所需参数
|
||||
var masterId_process = '${id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process = 'ProcessUploadFile';//保存文件夹
|
||||
var status = 'delete';//有删除权限
|
||||
|
||||
|
||||
$(function () {
|
||||
//初始化隐藏
|
||||
$("#inputEqu").hide();
|
||||
|
||||
$('#planDate').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: 'yyyy-mm-dd',
|
||||
}).on('hide', function (e) {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('planDate', 'NOT_VALIDATED', null)
|
||||
.validateField('planDate');
|
||||
});
|
||||
$('#planDate').datepicker('setDate', '${nowDate.substring(0, 10)}');
|
||||
//选择工艺段
|
||||
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId: "${company.id}"}, function (data) {
|
||||
var selelct_ = $("#processSectionId").select2({
|
||||
data: data,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过10个,启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct_.on('change', function () {
|
||||
//工艺段选择后,清空原有工艺段选择的设备
|
||||
$("#equipmentIds").val("");
|
||||
$("#equipmentNames").val("");
|
||||
})
|
||||
}, 'json');
|
||||
|
||||
getFileList();
|
||||
getFileList_process();
|
||||
|
||||
//维修类型
|
||||
var selectType = $("#repairPlanType").select2({minimumResultsForSearch: 10})
|
||||
//小修中修
|
||||
var selectType = $("#repairType").select2({minimumResultsForSearch: 10})
|
||||
|
||||
|
||||
//默认下发给人员 隐藏班组
|
||||
$("#selectDepts").attr("style", "display:none;");
|
||||
//初始化抢单
|
||||
var selelct_compete = $("#compete").select2({
|
||||
minimumResultsForSearch: 10
|
||||
});
|
||||
selelct_compete.on('change', function () {
|
||||
var compete = $('#compete').val();
|
||||
if ('${Active_True}' == compete) {//切换到抢单
|
||||
$("#selectUsers").attr("style", "display:none;");
|
||||
$("#selectDepts").attr("style", "display:block;");
|
||||
|
||||
$("#targetUsersName").val('');
|
||||
}
|
||||
if ('${Active_False}' == compete) {//切换到非抢单
|
||||
$("#selectUsers").attr("style", "display:block;");
|
||||
$("#selectDepts").attr("style", "display:none;");
|
||||
|
||||
$("#targetTeamsName").val('');
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
//选择设备,根据厂区id和工艺段id选择厂内设备,可多选
|
||||
/*var showEquipment4SelectsFun = function (formId, hiddenId, textId) {
|
||||
var equipmentIds = $('#' + hiddenId).val();
|
||||
var pSectionId = $("#processSectionId").val();
|
||||
var companyId = '${company.id}';
|
||||
if (null == companyId || '' == companyId || null == pSectionId || '' == pSectionId) {
|
||||
showAlert('d', "请先选择厂区和工艺段!");
|
||||
return;
|
||||
}
|
||||
$.post(ext.contextPath + '/equipment/showEquipmentCardForAbnormitySelects.do', {
|
||||
formId: formId,
|
||||
hiddenId: hiddenId,
|
||||
textId: textId,
|
||||
companyId: companyId,
|
||||
equipmentIds: equipmentIds,
|
||||
pSectionId: pSectionId
|
||||
}, function (data) {
|
||||
$("#equ4SelectDiv").html(data);
|
||||
openModal("equipment4SelectModal");
|
||||
});
|
||||
};*/
|
||||
|
||||
var showEquipment4SelectsFun = function (formId, hiddenId, textId) {
|
||||
var companyId = '${company.id}';
|
||||
// var equipmentIds = $('#' + hiddenId).val();
|
||||
var processSectionId = $("#processSectionId").val();
|
||||
if (companyId == "" || processSectionId == "" || companyId == null || processSectionId == null) {
|
||||
showAlert('d', '请先选择工艺段');
|
||||
} else {
|
||||
// $.post(ext.contextPath + '/equipment/showEquipmentCardForAbnormitySelects.do', {
|
||||
$.post(ext.contextPath + '/equipment/selectEquipmentCard4Choice.do', {
|
||||
formId: formId,
|
||||
hiddenId: hiddenId,
|
||||
textId: textId,
|
||||
unitId: companyId,
|
||||
equipmentIds: '',
|
||||
processSectionId: processSectionId
|
||||
}, function (data) {
|
||||
$("#equ4SelectDiv").html(data);
|
||||
openModal("equipment4SelectModal");
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//保存选择设备 datas为id
|
||||
var doFinishSelectEquipment = function (datas_id, datas_name) {
|
||||
if (datas_id.indexOf(",") != -1 || datas_id.indexOf(",") != -1) {
|
||||
alert('无法选择多台设备!');
|
||||
} else {
|
||||
$('#equipmentIds').val(datas_id);
|
||||
$('#equipmentNames').val(datas_name);
|
||||
// closeModal("equipment4SelectModal");
|
||||
jobNameFuction();
|
||||
|
||||
$.get(ext.contextPath + '/equipment/getEquipmentSimple.do', {
|
||||
id: datas_id
|
||||
}, function (data) {
|
||||
var obj = $.parseJSON(data);
|
||||
var processSectionId = $("#processSectionId").val();
|
||||
//如果选择的设备工艺段和外面的工艺段不一样的话 给与提示 然后将外面的工艺段修改掉
|
||||
if (obj.processsectionid != unitId + '_' + processSectionId) {
|
||||
layer.open({
|
||||
title: '提示'
|
||||
, content: '已修改为设备所在工艺段!'
|
||||
});
|
||||
//由于设备台账关联的是工艺段的id 这边关联的是工艺段的code 如果需要处理下
|
||||
var processCode = obj.processsectionid.replace(unitId + "_", "")
|
||||
//修改外面选择的工艺段
|
||||
$("#processSectionId").select2().val(processCode).trigger("change");
|
||||
}
|
||||
$('#equipmentIds').val(datas_id);
|
||||
$('#equipmentNames').val(datas_name);
|
||||
closeModal("equipment4SelectModal");
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//选择故障类型,可多选
|
||||
var showProblemType4SelectsFun = function (formId, hiddenId, textId) {
|
||||
var problemTypeIds = $('#' + hiddenId).val();
|
||||
$.post(ext.contextPath + '/maintenance/faultLibrary/showFaultTypeForSelects.do', {
|
||||
formId: formId,
|
||||
hiddenId: hiddenId,
|
||||
textId: textId,
|
||||
problemTypeIds: problemTypeIds
|
||||
}, function (data) {
|
||||
$("#problemTyp4SelectDiv").html(data);
|
||||
openModal("problemTyp4SelectModal");
|
||||
});
|
||||
};
|
||||
var inputEquFun = function () {
|
||||
$("#selectEqu").hide();
|
||||
$("#inputEqu").show();
|
||||
$("#equipmentIds").val("");
|
||||
$("#equipmentNames").val("");
|
||||
}
|
||||
var selectEquFun = function () {
|
||||
$("#selectEqu").show();
|
||||
$("#inputEqu").hide();
|
||||
$("#manualInputEquipment").val("");
|
||||
}
|
||||
|
||||
//选择故障库
|
||||
var showFaultLibrary = function (formId, hiddenId, textId) {
|
||||
var libraryId = $('#' + hiddenId).val();
|
||||
var equipmentIds = $("#equipmentIds").val();
|
||||
if (companyId == "" || equipmentIds == "" || companyId == null || equipmentIds == null) {
|
||||
showAlert('d', '请先选择设备');
|
||||
} else {
|
||||
$.post(ext.contextPath + '/maintenance/libraryFaultBloc/showFaultLibrary4Equpment.do', {
|
||||
libraryId: libraryId,
|
||||
companyId: companyId,
|
||||
equipmentIds: equipmentIds
|
||||
}, function (data) {
|
||||
$("#library4SelectDiv").html(data);
|
||||
openModal('library4SelectModal');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//自动显示工单名称
|
||||
function jobNameFuction() {
|
||||
var nowTime = '${nowDate.substring(0, 10)}';
|
||||
var equipmentNames = $('#equipmentNames').val();
|
||||
var type = '维修';
|
||||
$('#jobName').val(nowTime + '_' + equipmentNames + '_' + type);
|
||||
}
|
||||
|
||||
//选择故障库
|
||||
var showFaultLibrary = function (formId, hiddenId, textId) {
|
||||
var libraryId = $('#' + hiddenId).val();
|
||||
var equipmentIds = $("#equipmentIds").val();
|
||||
if ('${param.unitId}' == "" || equipmentIds == "" || '${param.unitId}' == null || equipmentIds == null) {
|
||||
showAlert('d', '请先选择设备');
|
||||
} else {
|
||||
$.post(ext.contextPath + '/maintenance/libraryFaultBloc/showFaultLibrary4Equpment.do', {
|
||||
libraryId: libraryId,
|
||||
companyId: '${param.unitId}',
|
||||
equipmentIds: equipmentIds
|
||||
}, function (data) {
|
||||
$("#library4SelectDiv").html(data);
|
||||
openModal('library4SelectModal');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-xlg">
|
||||
<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" enctype="multipart/form-data">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" name="id" value="${id}">
|
||||
<input type="hidden" class="form-control" name="type" id="type" value="${type}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">所属公司</label>
|
||||
<div class="col-sm-4">
|
||||
<input name="unitId" type="hidden" value="${company.id}"/>
|
||||
<p class="form-control-static">${company.name}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">工艺段</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="processSectionId" name="processSectionId" class="form-control select2"
|
||||
style="width: 270px;" value="">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*故障设备</label>
|
||||
<div class="col-sm-10">
|
||||
<input id="equipmentIds" name="equipmentId" type="hidden" value=""/>
|
||||
<input class="form-control" id="equipmentNames" name="equipmentNames"
|
||||
onclick="showEquipment4SelectsFun('subForm','equipmentIds','equipmentNames');"
|
||||
placeholder="请先选择工艺段" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工单编号</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="jobNumber" name="jobNumber" value="${jobNumber}"
|
||||
readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工单名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="jobName" name="jobName" value="${jobName}"
|
||||
placeholder="工单名称" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">维修类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="repairPlanType" name="repairPlanType" class="form-control select2"
|
||||
style="width: 270px;">
|
||||
<option value="${planOut}"
|
||||
<c:if test="${'${planOut}' == workorderDetail.repairPlanType }">selected</c:if>>
|
||||
计划外
|
||||
</option>
|
||||
<option value="${planIn}"
|
||||
<c:if test="${'${planIn}' == workorderDetail.repairPlanType }">selected</c:if>>
|
||||
计划内
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">小修/中修</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="repairType" name="repairType" class="form-control select2"
|
||||
style="width: 270px;">
|
||||
<option value="${smallRepair}"
|
||||
<c:if test="${'${smallRepair}' == workorderDetail.repairType }">selected</c:if>>
|
||||
小修
|
||||
</option>
|
||||
<option value="${middleRepair}"
|
||||
<c:if test="${'${middleRepair}' == workorderDetail.repairType }">selected</c:if>>
|
||||
中修
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<!-- <label class="col-sm-2 control-label">计划费用/元</label>
|
||||
<div class="col-sm-4">
|
||||
<input class="form-control" id="planMoney" name ="planMoney" type="number" value= 0.00 min = "0" step= "50.01" placeholder="请输入">
|
||||
</div> -->
|
||||
|
||||
<label class="col-sm-2 control-label">计划完成时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="planDate" name="planDate"
|
||||
style="width: 232px;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">是否委外</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="maintenanceWay" name="maintenanceWay" class="form-control select2">
|
||||
<option value="in" <c:if test="${'in' == maintenanceDetail.maintenanceWay }">selected</c:if>>自修</option>
|
||||
<option value="out" <c:if test="${'out' == maintenanceDetail.maintenanceWay }">selected</c:if>>委外</option>
|
||||
</select>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- <div class="form-group" id = "selectEqu">
|
||||
<label class="col-sm-2 control-label">*故障设备</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="equipmentIds" name="equipmentId" type="hidden" value="" />
|
||||
<input class="form-control" id="equipmentNames" name ="equipmentNames" onclick="showEquipment4SelectsFun('subForm','equipmentIds','equipmentNames');" placeholder="请先选择厂区和工艺段" autocomplete="off">
|
||||
</div>
|
||||
<div class="col-sm-2" style="padding-left:0;">
|
||||
<button type="button" class="btn btn-primary" onclick="inputEquFun()" >手输设备</button>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="form-group" id="inputEqu">
|
||||
<label class="col-sm-2 control-label">*输入设备</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" id="manualInputEquipment" name="manualInputEquipment"
|
||||
placeholder="只有在选择界面中找不到的设备才可以手动输入...">
|
||||
</div>
|
||||
<div class="col-sm-2" style="padding-left:0;">
|
||||
<button type="button" class="btn btn-primary" onclick="selectEquFun()">选择设备</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*问题详情</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id="problemcontent" name ="problemcontent" placeholder="问题详情...">${problem }</textarea>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*故障描述</label>
|
||||
<div class="col-sm-10">
|
||||
<input id="libraryId" name="libraryId" type="hidden" value="" />
|
||||
<textarea class="form-control " id="problemcontent" name="problemcontent" rows="2" ondblclick="showFaultLibrary('subForm','libraryId','problemcontent');" placeholder="双击可选择故障库"></textarea>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">故障现象描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control " id="abnormityDescription" name="faultDescription" rows="2"
|
||||
ondblclick="showFaultLibrary('subForm','libraryId','abnormityDescription');"
|
||||
placeholder="故障现象描述...">${workorderDetail.faultDescription}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">维修方案及要求简述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control " id="schemeResume" name="schemeResume" rows="2"
|
||||
placeholder="维修方案及要求简述...">${workorderDetail.schemeResume}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<c:if test="${compete == '0'}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*是否抢单</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="compete" name="isCompete"
|
||||
style="width: 270px;">
|
||||
<option value="${Active_True}">是</option>
|
||||
<option value="${Active_False}" selected="selected">否</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<div id="selectUsers" class="form-group">
|
||||
<label class="col-sm-2 control-label">*接收人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name="targetUsersName"
|
||||
placeholder="请选择接收人员" onclick="showUser4Handle();" autocomplete="off">
|
||||
<input id="receiveUserId" name="receiveUserId" type="hidden"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="selectDepts" class="form-group">
|
||||
<label class="col-sm-2 control-label">*抢单班组</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetTeamsName" name="targetTeamsName"
|
||||
placeholder="参与抢单班组" onclick="showTeam4Handle();" autocomplete="off">
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group" style="margin:8px">
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput()" id="btn_save"><i class="fa fa-paperclip"></i>上传图片</button>
|
||||
</div> -->
|
||||
<!-- <div class="form-group" style="margin:8px;">
|
||||
<input type="file" name="maintenanceDetailFile" id="maintenanceDetailFile" multiple class="file-loading" />
|
||||
</div> -->
|
||||
<!-- 文件上传,显示 -->
|
||||
<!-- <div class="form-group" style="margin:8px">
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()" id="btn_save"><i class="fa fa-paperclip"></i>上传文件</button>
|
||||
</div>
|
||||
<div class="file-border" id="fileArea">
|
||||
</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>
|
||||
412
WebRoot/jsp/workorder/workorderDetailRepairAudit.jsp
Normal file
412
WebRoot/jsp/workorder/workorderDetailRepairAudit.jsp
Normal file
@ -0,0 +1,412 @@
|
||||
<%@ 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" %>
|
||||
|
||||
<%@page import="com.sipai.entity.workorder.WorkorderDetail" %>
|
||||
<%request.setAttribute("planIn", WorkorderDetail.planIn);%>
|
||||
<%request.setAttribute("planOut", WorkorderDetail.planOut);%>
|
||||
<%request.setAttribute("smallRepair", WorkorderDetail.smallRepair);%>
|
||||
<%request.setAttribute("middleRepair", WorkorderDetail.middleRepair);%>
|
||||
|
||||
<%--维修内容--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderRepairContent.js"
|
||||
charset="utf-8"></script>
|
||||
<%--消耗品--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderConsume.js"
|
||||
charset="utf-8"></script>
|
||||
<%--参与人员绩效--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderAchievement.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
.select2-container {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var masterId = '${entity.id}';
|
||||
var tbName = 'tb_maintenance_problem_fille'; //数据表
|
||||
var nameSpace = 'maintenance';//保存文件夹
|
||||
var bucketName = 'maintenance';
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
|
||||
function doSubmit() {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('targetUsersName', 'NOT_VALIDATED', null)
|
||||
.validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/workorder/workorderDetail/doWorkorderDetailRepairAuditProcess.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModalAudit')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '操作执行失败,请重试');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
//选人
|
||||
var showUser4Audit = function () {
|
||||
var userIds = $("#targetusers").val();
|
||||
var jobIds = $("#targetjobs").val();
|
||||
$.post(ext.contextPath + '/user/layerUser.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "targetusers", //输入框的id
|
||||
textId: "targetUsersName", //输入框的name
|
||||
userIds: userIds, //已选的人员id
|
||||
unitId: unitId, //获取右上角的厂id
|
||||
jobIds: jobIds //职位ids
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
$(function () {
|
||||
var id = '${entity.id}';
|
||||
//加载维修内容(编辑页面)
|
||||
getRepairContent(id);
|
||||
//加载绩效(编辑页面)
|
||||
getWorkAchievements(id);
|
||||
//加载消耗品(编辑页面)
|
||||
getWorkConsume(id);
|
||||
|
||||
//初始化文件显示
|
||||
getFileListMinioPic('abnormityFileId', 'view', masterId, previews, previewConfigs);
|
||||
//初始化选择框,方法在workflow.js里
|
||||
processSelectNode("${businessUnitAudit.taskid}");
|
||||
|
||||
//输入框验证
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
targetUsersName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '提交人员不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
completeDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '验收时间不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/showWorkorderDetailRepairProcessView.do', {
|
||||
id: id,
|
||||
inModal: 'inModal'
|
||||
}, function (data) {
|
||||
$("#showView").html(data);
|
||||
});
|
||||
|
||||
$("#completeDate").datetimepicker({
|
||||
todayBtn: true,
|
||||
clearBtn: true,
|
||||
autoclose: true,
|
||||
todayHighlight: 1,//今天高亮
|
||||
endDate: new Date(),
|
||||
minuteStep: 5, //分钟间隔为5分
|
||||
format: 'yyyy-mm-dd hh:ii',
|
||||
startView: "month", //初始化视图
|
||||
minView: 0,
|
||||
maxView: "year",
|
||||
language: 'zh-CN',
|
||||
defaultDate: new Date()
|
||||
}).on('changeDate', function (ev) {
|
||||
$('#subForm').data('bootstrapValidator').updateStatus('completeDate', 'NOT_VALIDATED', null).validateField('completeDate');
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/compareDate.do', {
|
||||
sdt: $("#repairDate").val() + " 00:00:00",
|
||||
edt: $("#completeDate").val() + ":00"
|
||||
}, function (data) {
|
||||
if (data == 1) {
|
||||
layer.open({
|
||||
title: '提示'
|
||||
, content: '验收时间无法比维修完成时间早!'
|
||||
});
|
||||
$("#completeDate").datetimepicker('setDate', new Date());
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/*$('#completeDate').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
language: "zh-CN",
|
||||
autoclose: true,
|
||||
startView: 1,
|
||||
minViewMode: 0,
|
||||
maxViewMode: 0,
|
||||
}).on('hide', function (e) {
|
||||
$('#subForm').data('bootstrapValidator').updateStatus('completeDate', 'NOT_VALIDATED', null).validateField('completeDate');
|
||||
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/compareDate.do', {
|
||||
sdt: $("#repairDate").val() + " 00:00:00",
|
||||
edt: $("#completeDate").val() + " 00:00:00"
|
||||
}, function (data) {
|
||||
if (data == 1) {
|
||||
layer.open({
|
||||
title: '提示'
|
||||
, content: '验收时间无法比维修完成时间早!'
|
||||
});
|
||||
$("#completeDate").datepicker('setDate', new Date());
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#completeDate").datepicker('setDate', new Date());*/
|
||||
})
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModalAudit">
|
||||
<div class="modal-dialog modal-xlg">
|
||||
<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">维修工单(${taskName})</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-7 col-xs-12">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" enctype="multipart/form-data">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">设备名称</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">
|
||||
${entity.equipmentCard.equipmentname}
|
||||
</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">设备编号</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">
|
||||
${entity.equipmentCard.equipmentcardid}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工单号</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${entity.jobNumber}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工单名称</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${entity.jobName}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计划完成日期</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${fn:substring(entity.planDate, 0, 10)}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">维修提交时间</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${fn:substring(entity.repairDate, 0, 16)}</p>
|
||||
<input id="repairDate" type="hidden" value="${entity.repairDate}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">验收完成时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group input-group-sm" style="width: 150px;">
|
||||
<input type="text" autocomplete="off" class="form-control pull-left"
|
||||
style="height: 34px; width: 150px; border-radius: 5px;"
|
||||
name="completeDate" id="completeDate" style="width:320px;"
|
||||
placeholder="请选择日期" value="${nowDate}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">故障现象</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${entity.faultDescription}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">维修方案</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${entity.schemeResume}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%--<div class="form-group">
|
||||
<label class="col-sm-2 control-label">故障设备</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${entity.equipmentCard.equipmentname}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">计划完成时间</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${fn:substring(entity.planDate, 0, 10)}</p>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">维修类型</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">
|
||||
<c:if test="${planIn == entity.repairPlanType }">计划内</c:if>
|
||||
<c:if test="${planOut == entity.repairPlanType }">计划外</c:if>
|
||||
</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">小修/中修</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">
|
||||
<c:if test="${smallRepair == entity.repairType }">小修</c:if>
|
||||
<c:if test="${middleRepair == entity.repairType }">中修</c:if>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" class="form-control" name="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name="processid"
|
||||
value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name="businessid"
|
||||
value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name=unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name="taskdefinitionkey"
|
||||
value="${businessUnitAudit.taskdefinitionkey}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*审核结果</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="passstatus" name="passstatus"
|
||||
style="width: 270px;">
|
||||
<option value=true>通过</option>
|
||||
<option value=false>驳回</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*下一节点</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="routeNum" name="routeNum"
|
||||
style="width: 270px;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div id="reject" class="form-group">
|
||||
<label class="col-sm-2 control-label">*审核意见</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id="auditopinion" name="auditopinion"
|
||||
placeholder="处理意见"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div id="selectUsers" class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name="targetUsersName"
|
||||
placeholder="下一级人员" onclick="showUser4Audit();">
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
<input class="form-control" id="targetjobs" name="targetjobs" type="hidden"
|
||||
value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<!-- <div class="form-group" style="margin:8px">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()" id="btn_save"><i
|
||||
class="fa fa-paperclip"></i>上传文件</button>
|
||||
</div> -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">维修图片</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="file" name="abnormityFileId" id="abnormityFileId" multiple
|
||||
class="file-loading"/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">维修内容</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="addFun_Content('${entity.id}','${entity.unitId}')"
|
||||
class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deleteFun_Content()" class="btn btn-box-tool" data-toggle="tooltip"
|
||||
title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
<a onclick="addFun4Library_Content1('${entity.id}','${entity.unitId}', '${entity.equipmentCard.equipmentclassid}')"
|
||||
class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="导入"><i class="glyphicon glyphicon-th-list"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_repair_detail" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">消耗物品</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="addDetailFun()" class="btn btn-box-tool" data-toggle="tooltip"
|
||||
title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deletesDetailFun()" class="btn btn-box-tool" data-toggle="tooltip"
|
||||
title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
<%--<a onclick="addConsume4Library('${entity.id}','${entity.unitId}')"
|
||||
class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="导入"><i class="glyphicon glyphicon-th-list"></i></a>--%>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<table id="table_outStockDetail"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">参与人员绩效</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="doAchievementAdd('${entity.id}')" class="btn btn-box-tool"
|
||||
data-toggle="tooltip"
|
||||
title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deleteAchievementFun()" class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="删除"><i
|
||||
class="glyphicon glyphicon-minus"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_achievements" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-5 col-xs-12" id="showView"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doSubmit()" id="btn_update">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
426
WebRoot/jsp/workorder/workorderDetailRepairHandle.jsp
Normal file
426
WebRoot/jsp/workorder/workorderDetailRepairHandle.jsp
Normal file
@ -0,0 +1,426 @@
|
||||
<%@ 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" %>
|
||||
|
||||
<%@page import="com.sipai.entity.workorder.WorkorderDetail" %>
|
||||
<%request.setAttribute("planIn", WorkorderDetail.planIn);%>
|
||||
<%request.setAttribute("planOut", WorkorderDetail.planOut);%>
|
||||
<%request.setAttribute("smallRepair", WorkorderDetail.smallRepair);%>
|
||||
<%request.setAttribute("middleRepair", WorkorderDetail.middleRepair);%>
|
||||
|
||||
<%--维修内容--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderRepairContent.js"
|
||||
charset="utf-8"></script>
|
||||
<%--消耗品--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderConsume.js"
|
||||
charset="utf-8"></script>
|
||||
<%--参与人员绩效--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderAchievement.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
.select2-container {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var masterId = '${entity.id}';
|
||||
var tbName = 'tb_maintenance_problem_fille'; //数据表
|
||||
var nameSpace = 'maintenance';//保存文件夹
|
||||
var bucketName = 'maintenance';
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
|
||||
function doSubmit() {
|
||||
$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED', null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/workorder/workorderDetail/doWorkorderDetailRepairHandleProcess.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModalHandle')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '操作执行失败,请重试');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
//选人
|
||||
var showUser4Handle = function () {
|
||||
var userIds = $("#targetusers").val();
|
||||
var jobIds = $("#targetjobs").val();
|
||||
$.post(ext.contextPath + '/user/layerUser.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "targetusers", //输入框的id
|
||||
textId: "targetUsersName", //输入框的name
|
||||
userIds: userIds, //已选的人员id
|
||||
unitId: unitId, //获取右上角的厂id
|
||||
jobIds: jobIds //职位ids
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
//弹窗选择设备
|
||||
var showEquipment4SelectsFun = function (formId, hiddenId, textId) {
|
||||
var equipmentIds = $('#' + hiddenId).val();
|
||||
$.post(ext.contextPath + '/equipment/selectEquipmentCard4Choice.do', {
|
||||
formId: formId,
|
||||
hiddenId: hiddenId,
|
||||
textId: textId,
|
||||
unitId: '${entity.unitId}',
|
||||
equipmentIds: equipmentIds
|
||||
}, function (data) {
|
||||
$("#equ4SelectDiv").html(data);
|
||||
openModal("equipment4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function doFinishSelectEquipment(datas_id, datas_name) {
|
||||
if (datas_id.indexOf(",") != -1 || datas_id.indexOf(",") != -1) {
|
||||
alert('无法选择多台设备!');
|
||||
} else {
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/updateEquipmentId.do', {
|
||||
id: '${entity.id}',
|
||||
equipmentId: datas_id
|
||||
}, function (data) {
|
||||
$('#equipmentIds').val(datas_id);
|
||||
$('#equipmentNames').val(datas_name);
|
||||
closeModal("equipment4SelectModal");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
var id = '${entity.id}';
|
||||
//加载维修内容(编辑页面)
|
||||
getRepairContent(id);
|
||||
//加载绩效(编辑页面)
|
||||
getWorkAchievements(id);
|
||||
//加载消耗品(编辑页面)
|
||||
getWorkConsume(id);
|
||||
|
||||
//初始化文件显示
|
||||
getFileListMinioPic('abnormityFileId', 'edit', masterId, previews, previewConfigs);
|
||||
//初始化选择框,方法在workflow.js里
|
||||
<%--processSelectNodeForHandle("${businessUnitHandle.taskid}");--%>
|
||||
|
||||
processSelectNodeForHandle("${businessUnitAudit.taskid}");
|
||||
var selelct = $("#passstatus").select2({
|
||||
minimumResultsForSearch: -1,//禁用搜索框
|
||||
});
|
||||
selelct.val('true').trigger("change");
|
||||
|
||||
|
||||
//输入框验证
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
targetUsersName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '提交人员不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
repairDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '维修日期不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/showWorkorderDetailRepairProcessView.do', {
|
||||
id: id,
|
||||
inModal: 'inModal'
|
||||
}, function (data) {
|
||||
$("#showView").html(data);
|
||||
});
|
||||
|
||||
$("#repairDate").datetimepicker({
|
||||
todayBtn: true,
|
||||
clearBtn: true,
|
||||
autoclose: true,
|
||||
todayHighlight: 1,//今天高亮
|
||||
endDate: new Date(),
|
||||
minuteStep: 5, //分钟间隔为5分
|
||||
format: 'yyyy-mm-dd hh:ii',
|
||||
startView: "month", //初始化视图
|
||||
minView: 0,
|
||||
maxView: "year",
|
||||
language: 'zh-CN',
|
||||
defaultDate: new Date()
|
||||
}).on('changeDate', function (ev) {
|
||||
$('#subForm').data('bootstrapValidator').updateStatus('repairDate', 'NOT_VALIDATED', null).validateField('repairDate');
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/compareDate.do', {
|
||||
sdt: '${fn:substring(entity.insdt, 0, 10)}' + ' 00:00:00',
|
||||
edt: $("#repairDate").val() + ":00"
|
||||
}, function (data) {
|
||||
if (data == 1) {
|
||||
layer.open({
|
||||
title: '提示'
|
||||
, content: '当前选择维修完成时间将早于发单时间!'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// $('#repairDate').datetimepicker('setDate',(new Date()));//赋值,当前日期
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModalHandle">
|
||||
<div class="modal-dialog modal-xlg">
|
||||
<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">维修工单(${taskName})</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-7 col-xs-12">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" enctype="multipart/form-data">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<input type="hidden" class="form-control" name="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name="processid"
|
||||
value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name="businessid"
|
||||
value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name=unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name="taskdefinitionkey"
|
||||
value="${businessUnitAudit.taskdefinitionkey}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">设备名称</label>
|
||||
<div class="col-sm-4">
|
||||
<%--<p class="form-control-static">
|
||||
${entity.equipmentCard.equipmentname}
|
||||
</p>--%>
|
||||
<input id="equipmentIds" name="equipmentId" type="hidden"
|
||||
value="${entity.equipmentId}"/>
|
||||
<input class="form-control" id="equipmentNames" name="equipmentNames"
|
||||
onclick="showEquipment4SelectsFun('subForm','equipmentIds','equipmentNames');"
|
||||
placeholder="" autocomplete="off"
|
||||
value="${entity.equipmentCard.equipmentname}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">设备编号</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">
|
||||
${entity.equipmentCard.equipmentcardid}
|
||||
</p>
|
||||
</div>
|
||||
<%--<label class="col-sm-2 control-label">计划完成时间</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${fn:substring(entity.planDate, 0, 10)}</p>
|
||||
</div>--%>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工单号</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${entity.jobNumber}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工单名称</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${entity.jobName}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计划完成时间</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${fn:substring(entity.planDate, 0, 10)}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">维修提交时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group input-group-sm" style="width: 150px;">
|
||||
<input type="text" autocomplete="off" class="form-control pull-left"
|
||||
style="height: 34px; width: 150px; border-radius: 5px;"
|
||||
name="repairDate" id="repairDate" style="width:320px;"
|
||||
placeholder="请选择日期" value="${nowDate}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">故障现象</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${entity.faultDescription}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">维修方案</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${entity.schemeResume}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">维修类型</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">
|
||||
<c:if test="${planIn == entity.repairPlanType }">计划内</c:if>
|
||||
<c:if test="${planOut == entity.repairPlanType }">计划外</c:if>
|
||||
</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">小修/中修</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">
|
||||
<c:if test="${smallRepair == entity.repairType }">小修</c:if>
|
||||
<c:if test="${middleRepair == entity.repairType }">中修</c:if>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*处理类型</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="passstatus" name="passstatus"
|
||||
style="width: 270px;">
|
||||
<option value=true>提交</option>
|
||||
<option value=false>退回</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*下一节点</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="routeNum" name="routeNum"
|
||||
style="width: 270px;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="reject" class="form-group">
|
||||
<label class="col-sm-2 control-label">*处理意见</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id="auditopinion" name="auditopinion"
|
||||
placeholder="处理意见"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div id="selectUsers" class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name="targetUsersName"
|
||||
placeholder="下一级人员" onclick="showUser4Handle();">
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
<input class="form-control" id="targetjobs" name="targetjobs" type="hidden"
|
||||
value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<%--<div class="form-group" style="margin:8px">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()" id="btn_save"><i
|
||||
class="fa fa-paperclip"></i>上传文件</button>
|
||||
</div>
|
||||
<div id="fileArea">
|
||||
</div>--%>
|
||||
|
||||
<div class="form-group" style="margin:8px">
|
||||
<button type="button" class="btn btn-default btn-file"
|
||||
onclick="fileinputPic('abnormityFileId')"
|
||||
id="btn_save"><i
|
||||
class="fa fa-paperclip"></i>维修图片
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="margin:8px;">
|
||||
<input type="file" name="abnormityFileId" id="abnormityFileId" multiple
|
||||
class="file-loading"/>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">维修内容</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="addFun_Content('${entity.id}','${entity.unitId}')"
|
||||
class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deleteFun_Content()" class="btn btn-box-tool" data-toggle="tooltip"
|
||||
title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
<a onclick="addFun4Library_Content('${entity.id}','${entity.unitId}')"
|
||||
class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="维修库导入"><i
|
||||
class="glyphicon glyphicon-th-list"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_repair_detail" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">消耗物品</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="addDetailFun('${entity.id}')" class="btn btn-box-tool"
|
||||
data-toggle="tooltip"
|
||||
title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deletesDetailFun()" class="btn btn-box-tool" data-toggle="tooltip"
|
||||
title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
<%--<a onclick="addConsume4Library('${entity.id}','${entity.unitId}')" class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="导入"><i class="glyphicon glyphicon-th-list"></i></a>--%>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<table id="table_outStockDetail"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">参与人员绩效</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="doAchievementAdd('${entity.id}')" class="btn btn-box-tool"
|
||||
data-toggle="tooltip"
|
||||
title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deleteAchievementFun()" class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="删除"><i
|
||||
class="glyphicon glyphicon-minus"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_achievements" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-5 col-xs-12" id="showView"></div>
|
||||
|
||||
</div>
|
||||
</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="doSubmit()" id="btn_update">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
381
WebRoot/jsp/workorder/workorderDetailRepairIssue.jsp
Normal file
381
WebRoot/jsp/workorder/workorderDetailRepairIssue.jsp
Normal file
@ -0,0 +1,381 @@
|
||||
<%@ 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" %>
|
||||
|
||||
<%@page import="com.sipai.entity.workorder.WorkorderDetail" %>
|
||||
<%request.setAttribute("planIn", WorkorderDetail.planIn);%>
|
||||
<%request.setAttribute("planOut", WorkorderDetail.planOut);%>
|
||||
<%request.setAttribute("smallRepair", WorkorderDetail.smallRepair);%>
|
||||
<%request.setAttribute("middleRepair", WorkorderDetail.middleRepair);%>
|
||||
|
||||
<%--维修内容--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderRepairContent.js"
|
||||
charset="utf-8"></script>
|
||||
<%--消耗品--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderConsume.js"
|
||||
charset="utf-8"></script>
|
||||
<%--参与人员绩效--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderAchievement.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
.select2-container {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var masterId = '${entity.id}';
|
||||
var tbName = 'tb_maintenance_problem_fille'; //数据表
|
||||
var nameSpace = 'maintenance';//保存文件夹
|
||||
var bucketName = 'maintenance';
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
|
||||
function doSubmit() {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('targetUsersName', 'NOT_VALIDATED', null)
|
||||
.validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/workorder/workorderDetail/doWorkorderDetailRepairIssueProcess.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModalHandle')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '操作执行失败,请重试');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
//选人
|
||||
var showUser4Handle = function () {
|
||||
var userIds = $("#targetusers").val();
|
||||
var jobIds = $("#targetjobs").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByCompany.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "targetusers",
|
||||
textId: "targetUsersName",
|
||||
userIds: userIds,
|
||||
jobIds: jobIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
//弹窗选择设备
|
||||
var showEquipment4SelectsFun = function (formId, hiddenId, textId) {
|
||||
var equipmentIds = $('#' + hiddenId).val();
|
||||
$.post(ext.contextPath + '/equipment/selectEquipmentCard4Choice.do', {
|
||||
formId: formId,
|
||||
hiddenId: hiddenId,
|
||||
textId: textId,
|
||||
unitId: '${entity.unitId}',
|
||||
equipmentIds: equipmentIds
|
||||
}, function (data) {
|
||||
$("#equ4SelectDiv").html(data);
|
||||
openModal("equipment4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function doFinishSelectEquipment(datas_id, datas_name) {
|
||||
if (datas_id.indexOf(",") != -1 || datas_id.indexOf(",") != -1) {
|
||||
alert('无法选择多台设备!');
|
||||
} else {
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/updateEquipmentId.do', {
|
||||
id: '${entity.id}',
|
||||
equipmentId: datas_id
|
||||
}, function (data) {
|
||||
$('#equipmentIds').val(datas_id);
|
||||
$('#equipmentNames').val(datas_name);
|
||||
closeModal("equipment4SelectModal");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
var id = '${entity.id}';
|
||||
//加载维修内容(编辑页面)
|
||||
getRepairContent(id);
|
||||
//加载绩效(编辑页面)
|
||||
getWorkAchievements(id);
|
||||
//加载消耗品(编辑页面)
|
||||
getWorkConsume(id);
|
||||
|
||||
//初始化文件显示
|
||||
getFileListMinioPic('abnormityFileId', 'edit', masterId, previews, previewConfigs);
|
||||
//初始化选择框,方法在workflow.js里
|
||||
processSelectNodeForHandle("${businessUnitHandle.taskid}");
|
||||
/*
|
||||
processSelectNode("
|
||||
${businessUnitHandle.taskid}");
|
||||
*/
|
||||
|
||||
//输入框验证
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
targetUsersName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '提交人员不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/showWorkorderDetailRepairProcessView.do', {
|
||||
id: id,
|
||||
inModal: 'inModal'
|
||||
}, function (data) {
|
||||
$("#showView").html(data);
|
||||
});
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModalHandle">
|
||||
<div class="modal-dialog modal-xlg">
|
||||
<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">维修工单(${taskName})</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-7 col-xs-12">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" enctype="multipart/form-data">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<input type="hidden" class="form-control" name="id" value="${businessUnitHandle.id}">
|
||||
<input type="hidden" class="form-control" name="processid"
|
||||
value="${businessUnitHandle.processid}">
|
||||
<input type="hidden" class="form-control" name="taskid"
|
||||
value="${businessUnitHandle.taskid}">
|
||||
<input type="hidden" class="form-control" name="businessid"
|
||||
value="${businessUnitHandle.businessid}">
|
||||
<input type="hidden" class="form-control" name=unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name="taskdefinitionkey"
|
||||
value="${businessUnitHandle.taskdefinitionkey}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">设备名称</label>
|
||||
<div class="col-sm-4">
|
||||
<%--<p class="form-control-static">
|
||||
${entity.equipmentCard.equipmentname}
|
||||
</p>--%>
|
||||
<input id="equipmentIds" name="equipmentId" type="hidden"
|
||||
value="${entity.equipmentId}"/>
|
||||
<input class="form-control" id="equipmentNames" name="equipmentNames"
|
||||
onclick="showEquipment4SelectsFun('subForm','equipmentIds','equipmentNames');"
|
||||
placeholder="" autocomplete="off"
|
||||
value="${entity.equipmentCard.equipmentname}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">设备编号</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">
|
||||
${entity.equipmentCard.equipmentcardid}
|
||||
</p>
|
||||
</div>
|
||||
<%--<label class="col-sm-2 control-label">计划完成时间</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${fn:substring(entity.planDate, 0, 10)}</p>
|
||||
</div>--%>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工单号</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${entity.jobNumber}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工单名称</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${entity.jobName}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计划完成时间</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${fn:substring(entity.planDate, 0, 10)}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">故障现象</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${entity.faultDescription}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">维修方案</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${entity.schemeResume}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">维修类型</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">
|
||||
<c:if test="${planIn == entity.repairPlanType }">计划内</c:if>
|
||||
<c:if test="${planOut == entity.repairPlanType }">计划外</c:if>
|
||||
</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">小修/中修</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">
|
||||
<c:if test="${smallRepair == entity.repairType }">小修</c:if>
|
||||
<c:if test="${middleRepair == entity.repairType }">中修</c:if>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%--<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*处理类型</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="passstatus" name="passstatus"
|
||||
style="width: 270px;">
|
||||
<option value=true>提交</option>
|
||||
<option value=false>退回</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*下一节点</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="routeNum" name="routeNum"
|
||||
style="width: 270px;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="reject" class="form-group">
|
||||
<label class="col-sm-2 control-label">*处理意见</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id="auditopinion" name="auditopinion"
|
||||
placeholder="处理意见"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="selectUsers" class="form-group">
|
||||
<label class="col-sm-2 control-label">下发至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name="targetUsersName"
|
||||
placeholder="下一级人员" onclick="showUser4Handle();">
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
<input class="form-control" id="targetjobs" name="targetjobs" type="hidden"
|
||||
value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 文件上传,显示 -->
|
||||
<%--<div class="form-group" style="margin:8px">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()" id="btn_save"><i
|
||||
class="fa fa-paperclip"></i>上传文件</button>
|
||||
</div>
|
||||
<div id="fileArea">
|
||||
</div>--%>
|
||||
|
||||
<div class="form-group" style="margin:8px">
|
||||
<button type="button" class="btn btn-default btn-file"
|
||||
onclick="fileinputPic('abnormityFileId')"
|
||||
id="btn_save"><i
|
||||
class="fa fa-paperclip"></i>维修图片
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="margin:8px;">
|
||||
<input type="file" name="abnormityFileId" id="abnormityFileId" multiple
|
||||
class="file-loading"/>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">维修内容</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="addFun_Content('${entity.id}','${entity.unitId}')"
|
||||
class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deleteFun_Content()" class="btn btn-box-tool" data-toggle="tooltip"
|
||||
title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
<a onclick="addFun4Library_Content('${entity.id}','${entity.unitId}')"
|
||||
class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="维修库导入"><i
|
||||
class="glyphicon glyphicon-th-list"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_repair_detail" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">消耗物品</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="addDetailFun('${entity.id}')" class="btn btn-box-tool"
|
||||
data-toggle="tooltip"
|
||||
title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deletesDetailFun()" class="btn btn-box-tool" data-toggle="tooltip"
|
||||
title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
<%--<a onclick="addConsume4Library('${entity.id}','${entity.unitId}')" class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="导入"><i class="glyphicon glyphicon-th-list"></i></a>--%>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<table id="table_outStockDetail"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">参与人员绩效</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="doAchievementAdd('${entity.id}')" class="btn btn-box-tool"
|
||||
data-toggle="tooltip"
|
||||
title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deleteAchievementFun()" class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="删除"><i
|
||||
class="glyphicon glyphicon-minus"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_achievements" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-5 col-xs-12" id="showView"></div>
|
||||
|
||||
</div>
|
||||
</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="doSubmit()" id="btn_update">下发</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
547
WebRoot/jsp/workorder/workorderDetailRepairList.jsp
Normal file
547
WebRoot/jsp/workorder/workorderDetailRepairList.jsp
Normal file
@ -0,0 +1,547 @@
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceCommString" %>
|
||||
<%@page import="com.sipai.entity.workorder.WorkorderDetail" %>
|
||||
<%@ 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_Start", WorkorderDetail.Status_Start);%>
|
||||
<%request.setAttribute("Status_Finish", WorkorderDetail.Status_Finish);%>
|
||||
<%request.setAttribute("Status_Compete", WorkorderDetail.Status_Compete);%>
|
||||
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_REPAIR", MaintenanceCommString.MAINTENANCE_TYPE_REPAIR);%>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_OVERHAUL", MaintenanceCommString.MAINTENANCE_TYPE_OVERHAUL);%>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_MAINTAIN", MaintenanceCommString.MAINTENANCE_TYPE_MAINTAIN);%>
|
||||
|
||||
<%request.setAttribute("REPAIR", WorkorderDetail.REPAIR);%>
|
||||
<%request.setAttribute("MAINTAIN", WorkorderDetail.MAINTAIN);%>
|
||||
<%request.setAttribute("ANTISEPTIC", WorkorderDetail.ANTISEPTIC);%>
|
||||
<%request.setAttribute("LUBRICATION", WorkorderDetail.LUBRICATION);%>
|
||||
<%request.setAttribute("INSTRUMENT", WorkorderDetail.INSTRUMENT);%>
|
||||
|
||||
<%request.setAttribute("planIn", WorkorderDetail.planIn);%>
|
||||
<%request.setAttribute("planOut", WorkorderDetail.planOut);%>
|
||||
|
||||
<%request.setAttribute("smallRepair", WorkorderDetail.smallRepair);%>
|
||||
<%request.setAttribute("middleRepair", WorkorderDetail.middleRepair);%>
|
||||
|
||||
<%@page import="com.sipai.entity.activiti.ProcessType" %>
|
||||
<%request.setAttribute("Workorder_Repair", ProcessType.Workorder_Repair.getId());%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<head>
|
||||
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- 文件上传-->
|
||||
<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>
|
||||
|
||||
<%--文件上传 minio--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFile.js" charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
.main-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.content-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main-footer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.table-hover > tbody > tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
//新增
|
||||
var addFun = function () {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/doAddRepair.do', {unitId: unitId}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
//浏览
|
||||
var viewFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/doViewRepair.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var cancelFun = function (id) {
|
||||
console.log(id);
|
||||
}
|
||||
|
||||
var deletesFun = function () {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
//进入流程的不能删除
|
||||
/*if (item.status == null || item.status == '0' || item.status == '' || item.status == '
|
||||
|
||||
|
||||
${Status_Compete}') {
|
||||
datas += item.id + ",";
|
||||
}*/
|
||||
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 + '/workorder/workorderDetail/delete4Repair.do', {ids: datas}, function (data) {
|
||||
var obj = $.parseJSON(data)
|
||||
if (obj.result > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//刷新表格
|
||||
var dosearch = function () {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
//抢单
|
||||
var doCompete = function (id) {
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/doCompete4Repair.do', {id: id, userId: '${userId}'}, function (data) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
});
|
||||
}
|
||||
|
||||
//跳转至待办
|
||||
function TaskListFun4Type(id) {
|
||||
window.parent.addTab('taskList', '待办事项', 'activiti/workflow/taskList.do?modelKey=${Workorder_Repair}-'+unitId+'&businessKey='+id);
|
||||
}
|
||||
|
||||
//加载完厂区后,初始化工艺段和表格
|
||||
function initFun() {
|
||||
//选择工艺段
|
||||
/*$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId: unitId}, function (data) {
|
||||
$("#processSection").empty();
|
||||
var selelct_ = $("#processSection").select2({
|
||||
data: data,
|
||||
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;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct_.val("").trigger("change");
|
||||
selelct_.on("change", function (e) {
|
||||
dosearch();
|
||||
});
|
||||
}, 'json');*/
|
||||
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/workorder/workorderDetail/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50, 100, 200, 500], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
name: $('#name').val(),
|
||||
date: $('#reservationtimeD').val(),
|
||||
search_code: unitId,
|
||||
status: '0',//0为进行中
|
||||
// processSectionId: $('#processSection').val(),
|
||||
type: '${REPAIR}',//维修类型
|
||||
monthDt: '${param.monthDt}',
|
||||
isCompete: $('#isCompete').val(),
|
||||
searchContent: $('#searchContent').val()
|
||||
// jobNumber: $('#jobNumber1').val(),
|
||||
// jobName: $('#jobName1').val(),
|
||||
// equipmentcardid: $('#equipmentcardid').val(),
|
||||
// equipmentname: $('#equipmentname').val()
|
||||
// saveType: $('#saveType1').val()
|
||||
// sdt: beginTimeStore2,
|
||||
// edt: endTimeStore2,
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {
|
||||
// viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true,
|
||||
width: '40px'
|
||||
},
|
||||
{
|
||||
field: 'company.sname', // 返回json数据中的name
|
||||
title: '所属厂区', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '7%'
|
||||
},
|
||||
{
|
||||
field: 'jobNumber', // 返回json数据中的name
|
||||
title: '工单编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '13%'
|
||||
},
|
||||
{
|
||||
field: 'equipmentCard.equipmentcardid', // 返回json数据中的name
|
||||
title: '设备编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '12%'
|
||||
},
|
||||
{
|
||||
field: 'equipmentCard.equipmentname', // 返回json数据中的name
|
||||
title: '设备名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '16%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + value + "'>" + value + "</span>";
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'faultDescription', // 返回json数据中的name
|
||||
title: '故障现象', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '22%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + value + "'>" + value + "</span>";
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'insdt', // 返回json数据中的name
|
||||
title: '发起时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
return value.substring(0, 19);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'user.caption', // 返回json数据中的name
|
||||
title: '维修人员', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '6%'
|
||||
},
|
||||
{
|
||||
field: 'abnormityTimeString', // 返回json数据中的name
|
||||
title: '故障总时长', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '8%'
|
||||
},
|
||||
{
|
||||
field: 'status', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '6%',
|
||||
formatter: function (value, row, index) {
|
||||
if (value == '${Status_Start}' && row.type == '${TYPE_SUPPLEMENT}') {
|
||||
return '处理中';
|
||||
} else if (value == '${Status_Start}') {
|
||||
return '已下发';
|
||||
} else if (value == '${Status_Compete}') {
|
||||
return '待抢单';
|
||||
} else if (value == '${Status_Finish}') {
|
||||
return '已完成';
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = '';
|
||||
buts += '<button type="button" class="btn btn-default btn-sm" title="浏览" onclick="viewFun(\'' + row.id + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 浏览</span></button>';
|
||||
if(row.status == '${Status_Compete}'){
|
||||
buts += '<button type="button" class="btn btn-default btn-sm" title="抢单" onclick="doCompete(\'' + row.id + '\')"><i class="fa fa-tag"></i><span class="hidden-md hidden-lg"> 处理</span></button>';
|
||||
}else{
|
||||
buts += '<button type="button" class="btn btn-default btn-sm" title="处理" onclick="TaskListFun4Type(\'' + row.id + '\')"><i class="fa fa-play"></i><span class="hidden-md hidden-lg"> 处理</span></button>';
|
||||
} buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
console.info("加载数据成功");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
//弹窗 异常单
|
||||
var viewFunAbnormity = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/maintenance/abnormity/doview_new.do', {id: id, ycCount: 1}, function (data) {
|
||||
$("#subDivAbnormity").html(data);
|
||||
openModal('subAbnormalModal');
|
||||
});
|
||||
};
|
||||
|
||||
$(function () {
|
||||
// initDate2();
|
||||
$(".daterangepicker").css({'width': '680px'});
|
||||
|
||||
var flag = IsApp();
|
||||
if (flag == true) {
|
||||
|
||||
} else {
|
||||
$(".main-header").show();
|
||||
$(".content-header").show();
|
||||
$(".main-footer").show();
|
||||
}
|
||||
initDate1();
|
||||
|
||||
$('#reservationtimeD').val('');
|
||||
initFun();
|
||||
});
|
||||
|
||||
function initDate1() {
|
||||
var locale = {
|
||||
"format": 'YYYY-MM-DD HH:mm',
|
||||
"separator": " ~ ",
|
||||
"applyLabel": "确定",
|
||||
"cancelLabel": "取消",
|
||||
"fromLabel": "起始时间",
|
||||
"toLabel": "结束时间'",
|
||||
"customRangeLabel": "自定义",
|
||||
"weekLabel": "W",
|
||||
"daysOfWeek": ["日", "一", "二", "三", "四", "五", "六"],
|
||||
"monthNames": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||||
"firstDay": 1
|
||||
};
|
||||
|
||||
var oldreservationtime1 = "${param.oldreservationtime1}";
|
||||
if (oldreservationtime1 != "" && oldreservationtime1.length > 0) {
|
||||
beginTimeStore1 = oldreservationtime1.substring(0, 16);
|
||||
endTimeStore1 = oldreservationtime1.substring(19, 36);
|
||||
$('#reservationtimeD').val(oldreservationtime1);
|
||||
} else {
|
||||
beginTimeStore1 = moment().subtract(3, 'days').format('YYYY-MM-DD HH:mm');
|
||||
endTimeStore1 = moment().subtract(0, 'days').format('YYYY-MM-DD HH:mm');
|
||||
$('#reservationtimeD').val(beginTimeStore1 + locale.separator + endTimeStore1);
|
||||
}
|
||||
|
||||
$('#reservationtimeD').daterangepicker({
|
||||
"timePicker": true,
|
||||
"timePicker24Hour": true,
|
||||
"linkedCalendars": false,
|
||||
"autoUpdateInput": false,
|
||||
"timePickerIncrement": 10,
|
||||
"locale": locale,
|
||||
//汉化按钮部分
|
||||
ranges: {
|
||||
// '今日': [moment(), moment().subtract(-1, 'days')],
|
||||
'昨日': [moment().subtract(1, 'days'), moment()],
|
||||
'最近7日': [moment().subtract(6, 'days'), moment().subtract(-1, 'days')],
|
||||
'本月': [moment().startOf('month'), moment().endOf('month').subtract(-1, 'days')],
|
||||
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month').subtract(-1, 'days')]
|
||||
},
|
||||
startDate: beginTimeStore1,
|
||||
endDate: endTimeStore1
|
||||
}, function (start, end, label) {
|
||||
beginTimeStore1 = start.format(this.locale.format);
|
||||
endTimeStore1 = end.format(this.locale.format);
|
||||
if (!this.startDate) {
|
||||
this.element.val('');
|
||||
} else {
|
||||
this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="subDivAbnormity"></div>
|
||||
<div id="subDiv_achievement"></div>
|
||||
<div id="subDivDetail"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div id="fault4SelectDiv"></div>
|
||||
<div id="handleDetailDiv"></div>
|
||||
<div id="maintainPlanDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="emSubDiv"></div>
|
||||
|
||||
<div id="library4SelectDiv"></div>
|
||||
<div>
|
||||
<div class="form-group pull-left" style="padding:0;">
|
||||
<div class="btn-group" style="width: 380px;">
|
||||
<security:authorize buttonUrl="maintenance/addDetail.do">
|
||||
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i
|
||||
class="fa fa-plus"></i> 新增
|
||||
</button>
|
||||
|
||||
<%-- <c:if test="${userId == 'emp01'}">--%>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i
|
||||
class="fa fa-trash-o"></i> 删除
|
||||
</button>
|
||||
<%-- </c:if>--%>
|
||||
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group pull-right form-inline hidden-xs">
|
||||
<div class="form-group">
|
||||
<label class="form-label">发单类型:</label>
|
||||
<select class="form-control select2 " id="isCompete" name="isCompete"
|
||||
style="width: 150px; height: 34px; border-radius: 5px;">
|
||||
<option value="1">抢单</option>
|
||||
<option value="0">派单</option>
|
||||
<option value="" selected>全部</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group input-group-sm" style="width: 150px;">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" autocomplete="off" class="form-control pull-left"
|
||||
style="height: 34px; width: 150px; border-radius: 5px;"
|
||||
id="reservationtimeD" style="width:320px;" placeholder="请选择日期">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="searchContent" name="searchContent"
|
||||
style="height: 34px; border-radius: 5px;"
|
||||
class="form-control pull-right"
|
||||
placeholder="模糊搜索:工单编号/工单名称/设备编号/设备名称">
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group input-group-sm pull-right" style="width: 150px; padding-left: 5px">
|
||||
<div class="input-group input-group-sm " style="width: 150px;">
|
||||
<input type="text" id="name" name="name" style="height: 34px;"
|
||||
class="form-control pull-right"
|
||||
placeholder="请输入人员姓名">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height: 34px;" onclick="dosearch();"><i
|
||||
class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
document.write("<scr" + "ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js\"></sc" + "ript>")
|
||||
document.write("<scr" + "ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js\"></sc" + "ript>")
|
||||
</script>
|
||||
<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>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
164
WebRoot/jsp/workorder/workorderDetailRepairList4Date.jsp
Normal file
164
WebRoot/jsp/workorder/workorderDetailRepairList4Date.jsp
Normal file
@ -0,0 +1,164 @@
|
||||
<%@ taglib prefix="c" uri="/jodd" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<%@page import="com.sipai.tools.CommString" %>
|
||||
<%request.setAttribute("Active_False", CommString.Active_False); %>
|
||||
<%request.setAttribute("Active_True", CommString.Active_True); %>
|
||||
|
||||
<%@ page import="com.sipai.entity.maintenance.EquipmentPlan" %>
|
||||
<%request.setAttribute("Status_NoStart", EquipmentPlan.Status_NoStart); %>
|
||||
<%request.setAttribute("Status_Start", EquipmentPlan.Status_Start); %>
|
||||
<%request.setAttribute("Status_Finish", EquipmentPlan.Status_Finish); %>
|
||||
|
||||
<%@page import="com.sipai.entity.maintenance.EquipmentPlanType" %>
|
||||
<%request.setAttribute("Code_Type_Wx", EquipmentPlanType.Code_Type_Wx); %>
|
||||
<%request.setAttribute("Code_Type_By", EquipmentPlanType.Code_Type_By); %>
|
||||
<%request.setAttribute("Code_Type_Dx", EquipmentPlanType.Code_Type_Dx); %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
//厂区ID
|
||||
var companyId = "${company.id}";
|
||||
|
||||
$(function () {
|
||||
|
||||
$("#table_workOrder").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/workorder/workorderDetail/getJson4Date.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
dateStr: '${param.dateStr}',
|
||||
type: '${param.type}'
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'company.name', // 返回json数据中的name
|
||||
title: '所属厂区', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},
|
||||
{
|
||||
field: 'jobNumber', // 返回json数据中的name
|
||||
title: '工单编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},
|
||||
{
|
||||
field: 'jobName', // 返回json数据中的name
|
||||
title: '工单名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},
|
||||
{
|
||||
field: 'equipmentCard.equipmentcardid', // 返回json数据中的name
|
||||
title: '设备编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'equipmentCard.equipmentname', // 返回json数据中的name
|
||||
title: '设备名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'insdt', // 返回json数据中的name
|
||||
title: '发起时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
return value.substring(0, 19);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status', // 返回json数据中的name
|
||||
title: '问题状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function (value, row, index) {
|
||||
if (value == '${Status_Start}' && row.type == '${TYPE_SUPPLEMENT}') {
|
||||
return '处理中';
|
||||
} else if (value == '${Status_Start}') {
|
||||
return '已下发';
|
||||
} else if (value == '${Status_Compete}') {
|
||||
return '待抢单';
|
||||
} else if (value == '${Status_Finish}') {
|
||||
return '已完成';
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '60px', // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = '';
|
||||
buts += '<button class="btn btn-default btn-sm" title="查看" onclick="viewFun(\'' + row.id + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg">查看</span></button>';
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table_workOrder");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
//浏览
|
||||
var viewFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/doViewRepair.do', {id: id}, function (data) {
|
||||
$("#subDiv_workorder_view").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var doRefreshEquipmentCards = function () {
|
||||
$("#table_workOrder").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal4Date">
|
||||
<div class="modal-dialog modal-xlg">
|
||||
<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">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body ">
|
||||
<table id="table_workOrder" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
372
WebRoot/jsp/workorder/workorderDetailRepairListApp.jsp
Normal file
372
WebRoot/jsp/workorder/workorderDetailRepairListApp.jsp
Normal file
@ -0,0 +1,372 @@
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail" %>
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceCommString" %>
|
||||
<%@page import="com.sipai.entity.workorder.WorkorderDetail" %>
|
||||
<%@ 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_Start", WorkorderDetail.Status_Start);%>
|
||||
<%request.setAttribute("Status_Cancel", WorkorderDetail.Status_Cancel);%>
|
||||
<%request.setAttribute("Status_Finish", WorkorderDetail.Status_Finish);%>
|
||||
<%request.setAttribute("Status_Compete", WorkorderDetail.Status_Compete);%>
|
||||
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_REPAIR", MaintenanceCommString.MAINTENANCE_TYPE_REPAIR);%>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_OVERHAUL", MaintenanceCommString.MAINTENANCE_TYPE_OVERHAUL);%>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_MAINTAIN", MaintenanceCommString.MAINTENANCE_TYPE_MAINTAIN);%>
|
||||
|
||||
<%request.setAttribute("REPAIR", WorkorderDetail.REPAIR);%>
|
||||
<%request.setAttribute("MAINTAIN", WorkorderDetail.MAINTAIN);%>
|
||||
<%request.setAttribute("ANTISEPTIC", WorkorderDetail.ANTISEPTIC);%>
|
||||
<%request.setAttribute("LUBRICATION", WorkorderDetail.LUBRICATION);%>
|
||||
<%request.setAttribute("INSTRUMENT", WorkorderDetail.INSTRUMENT);%>
|
||||
|
||||
<%request.setAttribute("planIn", WorkorderDetail.planIn);%>
|
||||
<%request.setAttribute("planOut", WorkorderDetail.planOut);%>
|
||||
|
||||
<%request.setAttribute("smallRepair", WorkorderDetail.smallRepair);%>
|
||||
<%request.setAttribute("middleRepair", WorkorderDetail.middleRepair);%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<head>
|
||||
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- 文件上传-->
|
||||
<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>
|
||||
|
||||
<%--文件上传 minio--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFile.js" charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.table-hover > tbody > tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.contentAPPTitle .col-xs-3, .contentAPPTitle .col-xs-4 {
|
||||
padding-right: 5px;
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
.contentAPPTitle .select2-container .select2-selection--single {
|
||||
font-size: 12px;
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.contentAPPTitle .select2-selection__arrow {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.contentAPPTitle .select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
color: #444;
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
#contentAPPBody .col-xs-3, #contentAPPBody .col-xs-6, #contentAPPBody .col-xs-12 {
|
||||
padding-right: 0px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
#contentAPP .panel {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#contentAPP .row {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#contentAPP .panel-body {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#contentAPP .app-fontSize-18 {
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
#contentAPP .app-title, .app-datetime {
|
||||
color: #9f9f9f;
|
||||
}
|
||||
|
||||
#contentAPP .app-content {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.status {
|
||||
color: #ff9d2b;
|
||||
border: 2px solid #ff9d2b;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
//新增
|
||||
var addFun = function () {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/doAddRepair.do', {unitId: unitId}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
//浏览
|
||||
var viewFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/doViewRepair.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
//弹窗 异常单
|
||||
var viewFunAbnormity = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/maintenance/abnormity/doview_new.do', {id: id, ycCount: 1}, function (data) {
|
||||
$("#subDivAbnormity").html(data);
|
||||
openModal('subAbnormalModal');
|
||||
});
|
||||
};
|
||||
|
||||
var companyId = unitId;
|
||||
$(function () {
|
||||
companyId = unitId;
|
||||
// refreshtypeForSelect();
|
||||
|
||||
initAPP();
|
||||
|
||||
/*var statusSelectAPP = $("#statusSelectAPP").select2({
|
||||
minimumResultsForSearch: 10,
|
||||
placeholder: '状态',
|
||||
}).val('all').trigger("change");
|
||||
statusSelectAPP.on("change", function (e) {
|
||||
initAPP();
|
||||
});*/
|
||||
var statusSelectAPP = $("#statusSelectAPP").select2({
|
||||
minimumResultsForSearch: 10
|
||||
})
|
||||
statusSelectAPP.on("change", function (e) {
|
||||
initAPP();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function initAPP() {
|
||||
var htmlStr = '<div class="panel panel-default">' +
|
||||
'<div class="panel-body text-center">正在努力加载的数据中,请稍后......</div>' +
|
||||
'</div>';
|
||||
$("#contentAPPBody").html(htmlStr);
|
||||
var list = {
|
||||
type: 'repair',
|
||||
unitId: '${unitId}',
|
||||
statusSelectAPP: $("#statusSelectAPP").val()
|
||||
};
|
||||
// 存在
|
||||
$.ajax({
|
||||
//请求方式
|
||||
type: "POST",
|
||||
//请求的媒体类型
|
||||
// contentType: "application/json;charset=UTF-8",
|
||||
//请求地址
|
||||
url: ext.contextPath + '/workorder/workorderDetail/getlistApp.do',
|
||||
//数据,json字符串
|
||||
data: list,
|
||||
dataType: "json",
|
||||
//请求成功
|
||||
success: function (result) {
|
||||
// console.log(result);
|
||||
htmlStr = '';
|
||||
if (result.length > 0) {
|
||||
$.each(result, function (key, value) {
|
||||
var equipmentcardid = '-';
|
||||
var equipmentname = '-';
|
||||
var repairDate = '-';
|
||||
if (value.equipmentCard != null) {
|
||||
equipmentcardid = value.equipmentCard.equipmentcardid;
|
||||
equipmentname = value.equipmentCard.equipmentname;
|
||||
}
|
||||
if (value.repairDate != null) {
|
||||
repairDate = value.repairDate.substring(0, 19);
|
||||
}
|
||||
var status = $("#statusSelectAPP").val();
|
||||
if (status == '0') {
|
||||
status = '处理中';
|
||||
} else {
|
||||
status = '已完成';
|
||||
}
|
||||
|
||||
var str = "";
|
||||
str += '<button class="btn btn-default btn-sm" title="浏览" onclick="viewFun(\'' + value.id + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg">浏览</span></button>';
|
||||
htmlStr += '<div class="panel panel-default">' +
|
||||
'<div class="panel-body app-title">' +
|
||||
'<div class="row">' +
|
||||
'<div class="col-xs-3">设备编号:</div>' +
|
||||
'<div class="col-xs-6 app-datetime">' + equipmentcardid + '</div>' +
|
||||
'<div class="col-xs-3"><span class="status">' + status + '</span></div>' +
|
||||
'</div>' +
|
||||
'<div class="row">' +
|
||||
'<div class="col-xs-3">工单编号:</div>' +
|
||||
'<div class="col-xs-9 app-datetime">' + value.jobNumber + '</div>' +
|
||||
'</div>' +
|
||||
'<div class="row">' +
|
||||
'<div class="col-xs-3">设备名称:</div>' +
|
||||
'<div class="col-xs-9 app-datetime">' + equipmentname + '</div>' +
|
||||
'</div>' +
|
||||
'<div class="row">' +
|
||||
'<div class="col-xs-3">维修日期:</div>' +
|
||||
'<div class="col-xs-9 app-datetime">' + repairDate + '</div>' +
|
||||
'</div>' +
|
||||
'<div class="row">' +
|
||||
'<div class="col-xs-3">故障现象:</div>' +
|
||||
'<div class="col-xs-9 app-datetime">' + value.faultDescription + '</div>' +
|
||||
'</div>' +
|
||||
'<div class="row">' +
|
||||
'<div class="col-xs-3">操作:</div><div class="col-xs-9"><div class="btn-group app-content" >' + str + '</div></div>' +
|
||||
// '<div class="col-xs-3"><span class="status">' + '处理中' + '</span></div>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
})
|
||||
} else {
|
||||
htmlStr = '<div class="panel panel-default">' +
|
||||
'<div class="panel-body text-center">没有找到匹配的记录</div>' +
|
||||
'</div>';
|
||||
}
|
||||
$("#contentAPPBody").html(htmlStr);
|
||||
},
|
||||
//请求失败,包含具体的错误信息
|
||||
error: function (e) {
|
||||
console.log(e.status);
|
||||
console.log(e.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="subDivAbnormity"></div>
|
||||
<div id="subDiv_achievement"></div>
|
||||
<div id="subDivDetail"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div id="fault4SelectDiv"></div>
|
||||
<div id="handleDetailDiv"></div>
|
||||
<div id="maintainPlanDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="emSubDiv"></div>
|
||||
|
||||
<div id="library4SelectDiv"></div>
|
||||
|
||||
<%--<div>
|
||||
<div class="row contentAPPTitle">
|
||||
<div class="col-xs-12">
|
||||
<div class="col-xs-4">
|
||||
<select class="form-control select2 input-sm " id="statusSelectAPP"
|
||||
name="statusSelectAPP" style="width: 100%;float: left;">
|
||||
<option value="0">未完成</option>
|
||||
<option value="1">已完成</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="contentAPP">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body text-center">正在努力加载的数据中,请稍后......</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>--%>
|
||||
|
||||
|
||||
<div id="contentAPP">
|
||||
<div class="row contentAPPTitle">
|
||||
<div class="col-xs-12">
|
||||
<%--<div class="col-xs-4">
|
||||
<select class="form-control select2 input-sm " name="statusSelectAPP">
|
||||
<option value="${Start}">待处理</option>
|
||||
<option value="${Processing}">处理中</option>
|
||||
<option value="${Clear}">已销单</option>
|
||||
<option value="${Finish}">已完成</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<select class="form-control select2 input-sm " name="statusSelectAPP">
|
||||
<option value="${Start}">待处理</option>
|
||||
<option value="${Processing}">处理中</option>
|
||||
<option value="${Clear}">已销单</option>
|
||||
<option value="${Finish}">已完成</option>
|
||||
</select>
|
||||
</div>--%>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control select2 input-sm " id="statusSelectAPP" name="statusSelectAPP">
|
||||
<option value="0">处理中</option>
|
||||
<%--<option value="${Status_Compete}">待抢单</option>
|
||||
<option value="${Status_Cancel}">已取消</option>--%>
|
||||
<option value="1">已完成</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-left" id="contentAPPBody">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body text-center">正在努力加载的数据中,请稍后......</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
document.write("<scr" + "ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js\"></sc" + "ript>")
|
||||
document.write("<scr" + "ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js\"></sc" + "ript>")
|
||||
</script>
|
||||
<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>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
394
WebRoot/jsp/workorder/workorderDetailRepairView.jsp
Normal file
394
WebRoot/jsp/workorder/workorderDetailRepairView.jsp
Normal file
@ -0,0 +1,394 @@
|
||||
<%@ 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" %>
|
||||
|
||||
<%@page import="com.sipai.entity.workorder.WorkorderDetail" %>
|
||||
<%request.setAttribute("planIn", WorkorderDetail.planIn);%>
|
||||
<%request.setAttribute("planOut", WorkorderDetail.planOut);%>
|
||||
<%request.setAttribute("smallRepair", WorkorderDetail.smallRepair);%>
|
||||
<%request.setAttribute("middleRepair", WorkorderDetail.middleRepair);%>
|
||||
<%request.setAttribute("Status_Compete", WorkorderDetail.Status_Compete);%>
|
||||
|
||||
<%@page import="com.sipai.tools.CommString" %>
|
||||
<%request.setAttribute("Active_True", CommString.Active_True);%>
|
||||
|
||||
<%@ page import="com.sipai.entity.activiti.ProcessType" %>
|
||||
<%request.setAttribute("Workorder_Repair", ProcessType.Workorder_Repair); %>
|
||||
|
||||
<%--维修内容--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderRepairContent.js"
|
||||
charset="utf-8"></script>
|
||||
<%--消耗品--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderConsume.js"
|
||||
charset="utf-8"></script>
|
||||
<%--参与人员绩效--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/workorder/workorderAchievement.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
.select2-container {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var tbName = 'tb_maintenance_problem_fille'; //数据表
|
||||
var nameSpace = 'maintenance';//保存文件夹
|
||||
var bucketName = 'maintenance';
|
||||
var masterId = '';
|
||||
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
var previews2 = new Array();
|
||||
var previewConfigs2 = new Array();
|
||||
|
||||
|
||||
//弹出人员列表
|
||||
var showUser4Handle = function () {
|
||||
/*var userIds = $("#receiveUserId").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect4FirstActiviti.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "receiveUserId",
|
||||
textId: "targetUsersName",
|
||||
userIds: userIds,
|
||||
type: 'repair'
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});*/
|
||||
var userIds = $("#receiveUserId").val();
|
||||
$.post(ext.contextPath + '/user/layerUser.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "receiveUserId", //输入框的id
|
||||
textId: "targetUsersName", //输入框的name
|
||||
userIds: userIds, //已选的人员id
|
||||
unitId: unitId, //获取右上角的厂id
|
||||
type: '${Workorder_Repair}' //根据不同流程找到第一个节点的配置职位 ProcessType中的id
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
var dosave = function () {
|
||||
if ($('receiveUserId').val() == '') {
|
||||
showAlert('d', '请选择下发人员');
|
||||
}
|
||||
var serialData = $("#subForm").serialize();
|
||||
$.post(ext.contextPath + "/workorder/workorderDetail/startWorkorderDetail.do",
|
||||
{
|
||||
id: '${entity.id}',
|
||||
receiveUserId: $("#receiveUserId").val()
|
||||
},
|
||||
function (data) {
|
||||
if (data.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal')
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else if (data.res == 2) {
|
||||
showAlert('d', '未检测到维修工单流程,请先部署维修工单流程!');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function viewTime(id) {
|
||||
$.post(ext.contextPath + "/workorder/workorderDetail/getAbnormityTime.do", {
|
||||
id: id
|
||||
},
|
||||
function (data) {
|
||||
var htmlstr = '';
|
||||
if (data.isAbnormity) {
|
||||
htmlstr += '<div style="padding: 10px;">该工单为' + '<span style="color: #2aabd2;">异常上报产生</span>' + ',开始时间为上报时间,结束时间为确认时间(如工单未完成,则显示当前时间)</div>';
|
||||
} else {
|
||||
htmlstr += '<div style="padding: 10px;">该工单为' + '<span style="color: #2aabd2;">直接派单产生</span>' + ',开始时间为发单时间,结束时间为确认时间(如工单未完成,则显示当前时间)</div>';
|
||||
}
|
||||
htmlstr += '<div style="padding: 10px;">开始时间:' + data.sdt + '</div>';
|
||||
htmlstr += '<div style="padding: 10px;">结束时间:' + data.edt + '</div>';
|
||||
htmlstr += '<div style="padding: 10px;">总故障时长:' + data.timeStr + '</div>';
|
||||
layer.open({
|
||||
type: 1, // page 层类型
|
||||
area: ['500px', '300px'],
|
||||
title: '说明',
|
||||
shade: 0.6, // 遮罩透明度
|
||||
shadeClose: true, // 点击遮罩区域,关闭弹层
|
||||
// maxmin: true, // 允许全屏最小化
|
||||
anim: 0, // 0-6 的动画形式,-1 不开启
|
||||
content: htmlstr
|
||||
});
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
$(function () {
|
||||
//初始化文件显示(异常上报)
|
||||
<%--getFileListMinioPic('abnormityId', 'view', '${entity.abnormityId}', previews, previewConfigs);--%>
|
||||
//初始化文件显示(维修的)
|
||||
getFileListMinioPic('repairFileId', 'view', '${entity.id}', previews2, previewConfigs2);
|
||||
|
||||
var id = '${entity.id}';
|
||||
//加载维修内容(浏览页面)
|
||||
getRepairContentView(id);
|
||||
//加载工时(浏览页面)
|
||||
getWorkAchievementsView(id);
|
||||
//加载消耗品(浏览页面)
|
||||
getWorkConsumeView(id);
|
||||
|
||||
//加载维修流程
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/showWorkorderDetailRepairProcessView.do', {
|
||||
id: id,
|
||||
inModal: 'inModal'
|
||||
}, function (data) {
|
||||
$("#showView").html(data);
|
||||
});
|
||||
|
||||
//查询抢单班组
|
||||
$.post(ext.contextPath + '/workorder/workorderDetail/selectCompeteTeamNames.do', {
|
||||
id: id
|
||||
}, function (data) {
|
||||
$("#competeTeamIds").html(data);
|
||||
});
|
||||
|
||||
if ('${wxCount}' === '1') {
|
||||
document.getElementById("ycButton").style.display = "none";
|
||||
}
|
||||
// 如果状态为待抢单则可选择下发人员
|
||||
if ('${entity.status}' != '${Status_Compete}') {
|
||||
document.getElementById("selectUsers").style.display = "none";
|
||||
document.getElementById("saveBtu").style.display = "none";
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-xlg">
|
||||
<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">
|
||||
<div class="row">
|
||||
<div class="col-md-7 col-xs-12">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" enctype="multipart/form-data">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">设备名称</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">
|
||||
${entity.equipmentCard.equipmentname}
|
||||
</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">设备编号</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">
|
||||
${entity.equipmentCard.equipmentcardid}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工单号</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${entity.jobNumber}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工单名称</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${entity.jobName}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计划完成日期</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${fn:substring(entity.planDate, 0, 10)}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">实际完成时间</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${fn:substring(entity.completeDate, 0, 16)}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">故障现象</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${entity.faultDescription}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">维修方案</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${entity.schemeResume}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">维修类型</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">
|
||||
<c:if test="${planIn == entity.repairPlanType }">计划内</c:if>
|
||||
<c:if test="${planOut == entity.repairPlanType }">计划外</c:if>
|
||||
</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">小修/中修</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">
|
||||
<c:if test="${smallRepair == entity.repairType }">小修</c:if>
|
||||
<c:if test="${middleRepair == entity.repairType }">中修</c:if>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">发单人员:</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${entity.issueUser.caption}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">故障时间:</label>
|
||||
<div class="col-sm-4">
|
||||
<c:if test="${entity.abnormityDate!=null}">
|
||||
<p class="form-control-static">${fn:substring(entity.abnormityDate, 0, 16)}</p>
|
||||
</c:if>
|
||||
<c:if test="${entity.abnormityDate==null}">
|
||||
<p class="form-control-static">${fn:substring(entity.insdt, 0, 16)}</p>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">维修人员:</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${entity.receiveUser.caption}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">维修时间:</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${fn:substring(entity.repairDate, 0, 16)}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<c:if test="${entity.isCompete=='1'}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">抢单班组</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static" id="competeTeamIds"></p>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<%--<div class="form-group">
|
||||
<label class="col-sm-2 control-label">异常图片</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="file" name="abnormityId" id="abnormityId"
|
||||
class="file-loading"/>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">故障总时长</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static" style="color: #0AB1DF;cursor:pointer"
|
||||
onclick="viewTime('${entity.id}');">${entity.abnormityTimeString}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">维修图片</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="file" name="repairFileId" id="repairFileId"
|
||||
class="file-loading"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="selectUsers" class="form-group">
|
||||
<label class="col-sm-2 control-label">*接收人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name="targetUsersName"
|
||||
placeholder="请选择接收人员" onclick="showUser4Handle();" autocomplete="off">
|
||||
<input id="receiveUserId" name="receiveUserId" type="hidden"/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">维修内容</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<%--<a onclick="addFun_Content('${entity.id}','${entity.unitId}')" class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deleteFun_Content()" class="btn btn-box-tool" data-toggle="tooltip"
|
||||
title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
<a onclick="addFun4Library_Content('${entity.id}','${entity.unitId}')" class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="导入"><i class="glyphicon glyphicon-th-list"></i></a>--%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_repair_detail" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">消耗物品</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<%--<a onclick="addDetailFun('${entity.id}')" class="btn btn-box-tool"
|
||||
data-toggle="tooltip"
|
||||
title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deletesDetailFun()" class="btn btn-box-tool" data-toggle="tooltip"
|
||||
title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
<a onclick="addConsume4Library('${entity.id}','${entity.unitId}')" class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="导入"><i class="glyphicon glyphicon-th-list"></i></a>--%>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<table id="table_outStockDetail"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">参与人员绩效</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<%--<a onclick="doAchievementAdd('${entity.id}')" class="btn btn-box-tool"
|
||||
data-toggle="tooltip"
|
||||
title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deleteAchievementFun()" class="btn btn-box-tool"
|
||||
data-toggle="tooltip" title="删除"><i
|
||||
class="glyphicon glyphicon-minus"></i></a>--%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_achievements" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-5 col-xs-12" id="showView"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<c:if test="${entity.abnormityId!=null}">
|
||||
<button id="ycButton" type="button" class="btn btn-default pull-right"
|
||||
onclick="viewFunAbnormity('${abnormity.id}');">查看异常单
|
||||
</button>
|
||||
</c:if>
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button id="saveBtu" type="button" class="btn btn-primary pull-right" onclick="dosave();">下发</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
195
WebRoot/jsp/workorder/workorderDetailRepair_processView.jsp
Normal file
195
WebRoot/jsp/workorder/workorderDetailRepair_processView.jsp
Normal file
@ -0,0 +1,195 @@
|
||||
<%@page import="com.sipai.entity.business.BusinessUnit" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();%>
|
||||
<%String serverPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();%>
|
||||
<%request.setAttribute("Status_Finish", Maintenance.Status_Finish);%>
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/css/star-rating.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/js/star-rating.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var tbName_problem = 'tb_maintenance_problem_fille'; //数据表
|
||||
var tbName_maintenance = 'tb_maintenance_file'; //数据表
|
||||
var nameSpace = 'maintenance';//保存文件夹
|
||||
var bucketName = 'maintenance';
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove: false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse: false,//选择按钮
|
||||
showClose: false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
resizeImage: true,
|
||||
fileActionSettings: {
|
||||
showDrag: false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount: true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig: previewConfigs,
|
||||
layoutTemplates: {
|
||||
actionUpload: '',
|
||||
actionDelete: ''
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function () {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow", "auto");
|
||||
});
|
||||
}
|
||||
|
||||
var viewHandleDetailFun = function (id) {
|
||||
$.post(ext.contextPath + '/maintenance/showHandleDetailView.do', {id: id}, function (data) {
|
||||
$("#handleDetailDiv").html(data);
|
||||
openModal('handleDetailModal');
|
||||
});
|
||||
};
|
||||
|
||||
//流程审核文件上传所需参数
|
||||
var masterId_process = '${param.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process = 'ProcessUploadFile';//保存文件夹
|
||||
var status = 'view';//有查看权限
|
||||
|
||||
$(function () {
|
||||
getFileList_process();
|
||||
$("#judgemaintainerstaff").rating('refresh', {showClear: false, showCaption: false, readonly: true});
|
||||
$("#judgeresult").rating('refresh', {showClear: false, showCaption: false, readonly: true});
|
||||
var result = '${businessUnitRecords}';
|
||||
result = result.replace(new RegExp("\r\n", "gm"), "");
|
||||
var json = JSON.parse(result);
|
||||
$.each(json, function (index, item) {
|
||||
if (item.id != null && item.id != "") {
|
||||
previews = new Array();
|
||||
$('#' + item.id).show();
|
||||
var data = item.files;
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var previewConfig = new Object();
|
||||
var path = 'data:image/png;base64,' + data[i].streamFile;
|
||||
previews.push(path);
|
||||
previewConfig['width'] = '50px';
|
||||
previewConfig['caption'] = data[i].filename;
|
||||
previewConfig['key'] = data[i].id;
|
||||
previewConfig['showRemove'] = false;//不显示移除按钮
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput(item.id);
|
||||
}
|
||||
});
|
||||
})
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
var printpage = function (myDiv) {
|
||||
$('.printContent').show();
|
||||
var printHtml = document.getElementById(myDiv).innerHTML;
|
||||
var wind = window.open("", "newwin", "width=1550,height=565,top=80,left=80,toolbar=no,scrollbars=yes,menubar=no");
|
||||
var link = document.createElement('link');
|
||||
link.type = 'text/css';
|
||||
link.rel = 'stylesheet';
|
||||
link.href = '<%=serverPath%><%=contextPath%>/plugins/bootstrap-ext/dist/bootstrap.min.css';
|
||||
wind.document.head.appendChild(link);
|
||||
|
||||
wind.document.body.innerHTML = printHtml;
|
||||
wind.print();
|
||||
wind.close();
|
||||
$('.printContent').hide();
|
||||
};
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
</script>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- The time line -->
|
||||
<ul class="timeline">
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<li>
|
||||
<c:choose>
|
||||
<c:when test='${finishFlag && status.last}'>
|
||||
<i class="fa fa-check bg-blue"></i>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<i class="fa fa-clock-o bg-grey"></i>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<div class="timeline-item">
|
||||
<span class="time"><i class="fa fa-clock-o"></i> ${item.insdt.substring(0,16)}</span>
|
||||
<h3 class="timeline-header"><a href="#">${item.taskName}</a> ${item.user.caption}</h3>
|
||||
<div class="timeline-body" style="padding-left:5px;padding-right:5px;">
|
||||
<div>
|
||||
${item.record}
|
||||
</div>
|
||||
|
||||
<c:if test="${item.id!=''}">
|
||||
<div style="padding-top:5px;">
|
||||
<input type="file" id='${item.id}' multiple class="file-loading"/>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</c:forEach>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<!--
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文件附件:</label>
|
||||
</div>
|
||||
<div class="file-border" id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
-->
|
||||
|
||||
<!-- 流程打印布局 开始-->
|
||||
<div id="maintenanceDetail">
|
||||
<div class="printContent" style="display:none">
|
||||
<h4 style="text-align:center;">流程处理详情</h4>
|
||||
</div>
|
||||
<div class="printContent" style="display:none">
|
||||
<table style="border-collapse:collapse;margin:0 auto">
|
||||
<tr>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">时间</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">发起人</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">任务</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">流程内容详情</td>
|
||||
</tr>
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<tr>
|
||||
<td style="border:1px solid black;width:150px;text-align: center;">${item.insdt.substring(0,16)}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.user.caption}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.taskName}</td>
|
||||
<td style="border:1px solid black;width:300px;">${item.record}</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
</div>
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div class="form-group">
|
||||
<!-- <label class="col-sm-2 control-label">文件附件:</label> -->
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<div class="file-border" id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- 流程打印布局 结束-->
|
||||
@ -0,0 +1,194 @@
|
||||
<%@page import="com.sipai.entity.business.BusinessUnit" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();%>
|
||||
<%String serverPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();%>
|
||||
<%request.setAttribute("Status_Finish", Maintenance.Status_Finish);%>
|
||||
<!-- 补录状态 -->
|
||||
<%request.setAttribute("TYPE_SUPPLEMENT", Maintenance.TYPE_SUPPLEMENT);%>
|
||||
<!-- 运维主流程状态 -->
|
||||
<%request.setAttribute("TYPE_MAINTENANCE", Maintenance.TYPE_MAINTENANCE);%>
|
||||
<%request.setAttribute("UNIT_HANDLE", BusinessUnit.UNIT_HANDLE);%>
|
||||
<!-- bootstrap-star-rating -->
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/css/star-rating.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/js/star-rating.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
//var masterId=$('#maintenanceId').val();
|
||||
var tbName_problem = 'tb_maintenance_problem_fille'; //数据表
|
||||
var tbName_maintenance = 'tb_maintenance_file'; //数据表
|
||||
var nameSpace = 'MaintenanceProblem';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
/* var student = {
|
||||
"caption":"lilei",
|
||||
|
||||
}
|
||||
previewConfigs[0]=student; */
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove: false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse: false,//选择按钮
|
||||
showClose: false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
resizeImage: true,
|
||||
fileActionSettings: {
|
||||
showDrag: false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount: true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig: previewConfigs,
|
||||
layoutTemplates: {
|
||||
actionUpload: '',
|
||||
actionDelete: ''
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function () {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow", "auto");
|
||||
});
|
||||
}
|
||||
|
||||
var viewHandleDetailFun = function (id) {
|
||||
$.post(ext.contextPath + '/maintenance/showHandleDetailView.do', {id: id}, function (data) {
|
||||
$("#handleDetailDiv").html(data);
|
||||
openModal('handleDetailModal');
|
||||
});
|
||||
};
|
||||
|
||||
//流程审核文件上传所需参数
|
||||
var masterId_process = '${param.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process = 'ProcessUploadFile';//保存文件夹
|
||||
var status = 'view';//有查看权限
|
||||
|
||||
$(function () {
|
||||
|
||||
})
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
var printpage = function (myDiv) {
|
||||
$('.printContent').show();
|
||||
var printHtml = document.getElementById(myDiv).innerHTML;
|
||||
var wind = window.open("", "newwin", "width=1550,height=565,top=80,left=80,toolbar=no,scrollbars=yes,menubar=no");
|
||||
|
||||
var link = document.createElement('link');
|
||||
link.type = 'text/css';
|
||||
link.rel = 'stylesheet';
|
||||
link.href = '<%=serverPath%><%=contextPath%>/plugins/bootstrap-ext/dist/bootstrap.min.css';
|
||||
wind.document.head.appendChild(link);
|
||||
/*
|
||||
var style = document.createElement('style');
|
||||
style.type = 'text/css';
|
||||
style.rel = 'stylesheet';
|
||||
style.appendChild(document.createTextNode(ss));
|
||||
wind.document.head.appendChild(style);
|
||||
*/
|
||||
wind.document.body.innerHTML = printHtml;
|
||||
//console.log(wind.document);
|
||||
wind.print();
|
||||
wind.close();
|
||||
$('.printContent').hide();
|
||||
};
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
</script>
|
||||
<div class="modal fade" id="repairViewModal">
|
||||
<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 " style="padding-left:0;padding-right:0;">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- The time line -->
|
||||
<ul class="timeline">
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<li>
|
||||
<c:choose>
|
||||
<c:when test='${finishFlag && status.last}'>
|
||||
<i class="fa fa-check bg-blue"></i>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<i class="fa fa-clock-o bg-grey"></i>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<div class="timeline-item">
|
||||
<span class="time"><i
|
||||
class="fa fa-clock-o"></i> ${item.insdt.substring(0,16)}</span>
|
||||
<h3 class="timeline-header"><a
|
||||
href="#">${item.taskName}</a> ${item.user.caption}</h3>
|
||||
<div class="timeline-body" style="padding-left:5px;padding-right:5px;">
|
||||
<div>
|
||||
${item.record}
|
||||
</div>
|
||||
<c:if test="${item.id!=''}">
|
||||
<%--<div style="padding-top:5px;">
|
||||
<input type="file" id='${item.id}' multiple class="file-loading"/>
|
||||
</div>--%>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</c:forEach>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 流程打印布局 开始 -->
|
||||
<div id="inStockExcuteDetail">
|
||||
<div class="printContent" style="display:none">
|
||||
<h4 style="text-align:center;">流程处理详情</h4>
|
||||
</div>
|
||||
<div class="printContent" style="display:none">
|
||||
<table style="border-collapse:collapse;margin:0 auto">
|
||||
<tr>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">时间</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">发起人</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">任务</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">流程内容详情</td>
|
||||
</tr>
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<tr>
|
||||
<td style="border:1px solid black;width:150px;text-align: center;">${item.insdt.substring(0,16)}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.user.caption}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.taskName}</td>
|
||||
<td style="border:1px solid black;width:300px;">${item.record}</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 流程打印布局 结束-->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" onclick="printpage('inStockExcuteDetail');"><i
|
||||
class="fa fa-print"></i>打印
|
||||
</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
326
WebRoot/jsp/workorder/workorderDetailWorkingHours.jsp
Normal file
326
WebRoot/jsp/workorder/workorderDetailWorkingHours.jsp
Normal file
@ -0,0 +1,326 @@
|
||||
<%@ 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>
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
var ids = '';
|
||||
|
||||
//搜索
|
||||
function dosearch() {
|
||||
ids = '';
|
||||
initFun();
|
||||
}
|
||||
|
||||
//加载完厂区后,初始化工艺段和表格
|
||||
function initFun() {
|
||||
ids = '';
|
||||
$('#table').bootstrapTable('destroy');
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '//workorder/workorderAchievement/getListWorkingHours.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [1000], // 设置页面可以显示的数据条数
|
||||
pageSize: 1000, // 页面数据条数
|
||||
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(),
|
||||
groupTypeId: $('#grouptype').val(),
|
||||
unitId: unitId,
|
||||
userName: $('#userName').val(),
|
||||
sdtAndEdt: $('#reservationtimeD').val(),
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {
|
||||
// viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{ checkbox: true, // 显示一个勾选框
|
||||
formatter: function (value, row, index) {
|
||||
if (row.id) {
|
||||
ids+=row.id+",";
|
||||
}
|
||||
return {disabled: false,}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'caption', // 返回json数据中的name
|
||||
title: '姓名', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%'
|
||||
}, {
|
||||
field: 'pTime', // 返回json数据中的name
|
||||
title: '运行巡检(小时)', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
// formatter: function (value, row, index) {
|
||||
// if (row.workTime_patrolRecord_p != null && row.workTime_patrolRecord_p != 0) {
|
||||
// return row.workTime_patrolRecord_p;
|
||||
// } else {
|
||||
// return '-';
|
||||
// }
|
||||
// }
|
||||
}, {
|
||||
field: 'eTime', // 返回json数据中的name
|
||||
title: '设备巡检(小时)', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
}, {
|
||||
field: 'repairTime', // 返回json数据中的name
|
||||
title: '维修工单(小时)', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
}, {
|
||||
field: 'maintainTime', // 返回json数据中的name
|
||||
title: '保养工单(小时)', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
}, {
|
||||
field: 'sumTime', // 返回json数据中的name
|
||||
title: '工时', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%',
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 80, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = '';
|
||||
buts += '<button type="button" class="btn btn-default btn-sm" title="浏览" onclick="viewFun(\'' + row.id + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 浏览</span></button>';
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
console.info("加载数据成功");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function viewFun(id) {
|
||||
var sdtAndEdt = $('#reservationtimeD').val();
|
||||
$.post(ext.contextPath + '/workorder/workorderAchievement/getUserOneWorkingHours.do', {sdtAndEdt: sdtAndEdt, userId: id}, function (data) {
|
||||
$("#workorderUserTimeDiv").html(data);
|
||||
openModal('workorderUserTimeDataModal');
|
||||
});
|
||||
}
|
||||
|
||||
function initDate1() {
|
||||
var locale = {
|
||||
"format": 'YYYY-MM-DD HH:mm',
|
||||
"separator": " ~ ",
|
||||
"applyLabel": "确定",
|
||||
"cancelLabel": "取消",
|
||||
"fromLabel": "起始时间",
|
||||
"toLabel": "结束时间'",
|
||||
"customRangeLabel": "自定义",
|
||||
"weekLabel": "W",
|
||||
"daysOfWeek": ["日", "一", "二", "三", "四", "五", "六"],
|
||||
"monthNames": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||||
"firstDay": 1
|
||||
};
|
||||
|
||||
var oldreservationtime1 = "${param.oldreservationtime1}";
|
||||
if (oldreservationtime1 != "" && oldreservationtime1.length > 0) {
|
||||
beginTimeStore1 = oldreservationtime1.substring(0, 16);
|
||||
endTimeStore1 = oldreservationtime1.substring(19, 36);
|
||||
$('#reservationtimeD').val(oldreservationtime1);
|
||||
} else {
|
||||
// beginTimeStore1 = moment().subtract(3, 'days').format('YYYY-MM-DD HH:mm');
|
||||
beginTimeStore1 = '${monthStartDate}';
|
||||
endTimeStore1 = moment().subtract(0, 'days').format('YYYY-MM-DD HH:mm');
|
||||
$('#reservationtimeD').val(beginTimeStore1 + locale.separator + endTimeStore1);
|
||||
}
|
||||
|
||||
$('#reservationtimeD').daterangepicker({
|
||||
"timePicker": true,
|
||||
"timePicker24Hour": true,
|
||||
"linkedCalendars": false,
|
||||
"autoUpdateInput": false,
|
||||
"timePickerIncrement": 10,
|
||||
"locale": locale,
|
||||
//汉化按钮部分
|
||||
ranges: {
|
||||
// '今日': [moment(), moment().subtract(-1, 'days')],
|
||||
'昨日': [moment().subtract(1, 'days'), moment()],
|
||||
'最近7日': [moment().subtract(6, 'days'), moment().subtract(-1, 'days')],
|
||||
'本月': [moment().startOf('month'), moment().endOf('month').subtract(-1, 'days')],
|
||||
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month').subtract(-1, 'days')]
|
||||
},
|
||||
startDate: beginTimeStore1,
|
||||
endDate: endTimeStore1
|
||||
}, function (start, end, label) {
|
||||
beginTimeStore1 = start.format(this.locale.format);
|
||||
endTimeStore1 = end.format(this.locale.format);
|
||||
if (!this.startDate) {
|
||||
this.element.val('');
|
||||
} else {
|
||||
this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function downloadPost() {
|
||||
if (unitId == "") {//获取验证结果,如果成功,执行下面代码
|
||||
showAlert('d','请先选择厂区','mainAlertdiv');
|
||||
}else{
|
||||
var checkedItems = $("#table").bootstrapTable('getAllSelections');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if (datas === "") {
|
||||
datas = ids;
|
||||
}
|
||||
$.post(ext.contextPath + "/work/mpoint/getUnType.do?unitId=" + unitId, {} , function(res) {
|
||||
var resp = eval('(' + res + ')');
|
||||
if (resp.status) {
|
||||
// console.log(datas)
|
||||
var sdtAndEdt = $('#reservationtimeD').val();
|
||||
window.open(ext.contextPath + "/workorder/workorderAchievement/doExport.do?unitId=" + unitId
|
||||
+"&ids="+datas +"&sdtAndEdt="+sdtAndEdt);
|
||||
} else {
|
||||
showAlert('d',resp.msg,'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
$.post(ext.contextPath + '/work/groupType/getSelect2ForSearch.do', function (data) {
|
||||
var select = $("#grouptype").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;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
select.val(data[0].id).trigger("change");//设置选中
|
||||
$("#grouptype").on("select2:select", function (e) {
|
||||
ids = '';
|
||||
$("#table").bootstrapTable('refresh');
|
||||
});
|
||||
}, 'json');
|
||||
|
||||
initDate1();
|
||||
initFun();
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
|
||||
<div id="workorderUserTimeDiv"></div>
|
||||
|
||||
<div id="workorderUserListDiv"></div>
|
||||
|
||||
<div id="library4SelectDiv"></div>
|
||||
<div>
|
||||
<div class="form-group " style="padding:0;">
|
||||
<div class="btn-group" style="width: 300px;padding-bottom:10px;height: 34px;">
|
||||
<div>
|
||||
<label class="form-label ">班组类型:</label>
|
||||
<select class="form-control select2" id="grouptype"
|
||||
name="grouptype" style="width: 150px;height: 34px;"></select>
|
||||
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="downloadPost();"><i
|
||||
class="fa fa-file-excel-o"></i> 导出
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group pull-right form-inline">
|
||||
<div class="input-group input-group-sm pull-left">
|
||||
<input type="text" autocomplete="off" class="form-control pull-left"
|
||||
style="height: 34px; width: 200px;" id="reservationtimeD" style="width:320px;"
|
||||
placeholder="请选择日期">
|
||||
</div>
|
||||
<div class="input-group input-group-sm pull-right" style="width: 200px;">
|
||||
<input type="text" id="userName" name="userName" style="height: 34px;"
|
||||
class="form-control pull-right"
|
||||
placeholder="请输入人员姓名" autocomplete="off">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height: 34px;" onclick="dosearch();"><i
|
||||
class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="table"></table>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
</html>
|
||||
117
WebRoot/jsp/workorder/workorderList.jsp
Normal file
117
WebRoot/jsp/workorder/workorderList.jsp
Normal file
@ -0,0 +1,117 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<head></title>
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
//加载完厂区后,初始化工艺段和表格
|
||||
function initFun() {
|
||||
ids = '';
|
||||
$('#table').bootstrapTable('destroy');
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '//workorder/workorderAchievement/getListByUserId.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
// sort: params.sort, // 要排序的字段
|
||||
// order: params.order,
|
||||
type: '${type}',
|
||||
userId: '${userId}',
|
||||
sdtAndEdt: '${sdtAndEdt}'
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {
|
||||
// viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'user.caption', // 返回json数据中的name
|
||||
title: '姓名', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%'
|
||||
},
|
||||
{
|
||||
field: 'projectRole', // 返回json数据中的name
|
||||
title: '项目角色', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%'
|
||||
},
|
||||
{
|
||||
field: 'workTime', // 返回json数据中的name
|
||||
title: '绩效工时', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%'
|
||||
},
|
||||
{
|
||||
field: 'participateContent', // 返回json数据中的name
|
||||
title: '参与内容', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%'
|
||||
},
|
||||
{
|
||||
field: 'explain', // 返回json数据中的name
|
||||
title: '说明', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%'
|
||||
},
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
console.info("加载数据成功");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
$(function () {
|
||||
initFun();
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<div class="modal fade" id="workorderUserListDataModal">
|
||||
<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>
|
||||
<h3 class="modal-title">个人工时统计列表</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
218
WebRoot/jsp/workorder/workorderOverhaulItemContent.jsp
Normal file
218
WebRoot/jsp/workorder/workorderOverhaulItemContent.jsp
Normal file
@ -0,0 +1,218 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<script type="text/javascript">
|
||||
/*
|
||||
* 加载绩效附表
|
||||
*/
|
||||
function getOverhaulItemContent(pid) {
|
||||
//附表内容
|
||||
$("#table_overhaul_item_content").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/workorder/overhaulItemContent/getList.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,
|
||||
pid: pid
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'cs',
|
||||
checkbox: true, // 显示一个勾选框
|
||||
width: '40px'
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '分项内容', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.contents;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '分项进度', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.progress;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '分项额定工时', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '15%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.baseHours;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '分项实际工时', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '15%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.workingHours;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '分项开始时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '15%',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.startDate != null && row.startDate != '') {
|
||||
return row.startDate.substring(0, 10);
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '分项完成时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '15%',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.finishDate != null && row.finishDate != '') {
|
||||
return row.finishDate.substring(0, 10);
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '10%', // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = '';
|
||||
buts += '<button class="btn btn-default btn-sm" title="编辑" onclick="editItemContentFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table_overhaul_item_content");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var doItemAddContent = function (pid, unitId) {
|
||||
$.post(ext.contextPath + '/workorder/overhaulItemContent/doadd.do', {
|
||||
projectId: pid,
|
||||
unitId: unitId
|
||||
}, function (data) {
|
||||
$("#subDiv_overhaulItemContent").html(data);
|
||||
openModal('subModaloverhaulItemContent');
|
||||
});
|
||||
};
|
||||
|
||||
var editItemContentFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/workorder/overhaulItemContent/doedit.do', {id: id}, function (data) {
|
||||
$("#subDiv_overhaulItemContent").html(data);
|
||||
openModal('subModaloverhaulItemContent');
|
||||
});
|
||||
};
|
||||
|
||||
var deleteItemContentFun = 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(willDelete => {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/workorder/overhaulItemContent/dodelete.do', {id: id}, function (data) {
|
||||
if (data == 1) {
|
||||
$("#table_overhaul_item_content").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deleteItemContentsFun = function () {
|
||||
var checkedItems = $("#table_overhaul_item_content").bootstrapTable('getSelections');
|
||||
var datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
datas += item.id + ",";
|
||||
});
|
||||
if (datas == "") {
|
||||
showAlert('d', '请先选择记录');
|
||||
} 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 + '/workorder/overhaulItemContent/dodeletes.do', {ids: datas}, function (data) {
|
||||
console.log(data);
|
||||
if (data.result > 0) {
|
||||
$("#table_overhaul_item_content").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
516
WebRoot/jsp/workorder/workorderOverhaulItemProject.jsp
Normal file
516
WebRoot/jsp/workorder/workorderOverhaulItemProject.jsp
Normal file
@ -0,0 +1,516 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<script type="text/javascript">
|
||||
/*
|
||||
* 加载绩效附表
|
||||
*/
|
||||
|
||||
function getOverhaulItemProjectContent(pid, edit) {
|
||||
|
||||
let columns = [
|
||||
{
|
||||
field: 'cs',
|
||||
checkbox: true, // 显示一个勾选框
|
||||
width: '40px'
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '分项工单号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.jobNumber;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '分项项目名', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.overhaulType != null && row.overhaulType != '') {
|
||||
return row.overhaulType.name;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '计划开始日期', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.planStartDate != null && row.planStartDate != '') {
|
||||
return row.planStartDate.substring(0, 10);
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '计划结束日期', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.planFinishDate != null && row.planFinishDate != '') {
|
||||
return row.planFinishDate.substring(0, 10);
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '附件', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.annex;
|
||||
}
|
||||
}, {
|
||||
field: '', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.status;
|
||||
}
|
||||
}
|
||||
]
|
||||
// if (edit) {
|
||||
columns.push({
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '10%', // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = '';
|
||||
buts += '<button class="btn btn-default btn-sm" title="编辑" onclick="editItemProjectFun(\'' + row.id + '\',' + edit + ')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
//附表内容
|
||||
$("#table_overhaul_item_project").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/workorder/overhaulItemProject/getList.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,
|
||||
pid: pid
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: columns,
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table_overhaul_item_project");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getOverhaulItemDeviceContent(pid, edit) {
|
||||
let columns = [
|
||||
{
|
||||
field: 'cs',
|
||||
checkbox: true, // 显示一个勾选框
|
||||
width: '40px'
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '设备编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.equipmentId;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '设备名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '15%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.equipmentName;
|
||||
}
|
||||
}, {
|
||||
field: '', // 返回json数据中的name
|
||||
title: '原资产值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '15%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.equipmentName;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '定额工时', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '15%',
|
||||
formatter: function (value, row, index) {
|
||||
if (edit) {
|
||||
return initCell(row.id, "quotaHour", "text", "定额工时", row.quotaHour);
|
||||
}
|
||||
return row.quotaHour;
|
||||
}
|
||||
}, {
|
||||
field: '', // 返回json数据中的name
|
||||
title: '定额费用', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '15%',
|
||||
formatter: function (value, row, index) {
|
||||
if (edit) {
|
||||
return initCell(row.id, "quotaFee", "text", "定额费用", row.quotaFee);
|
||||
}
|
||||
return row.quotaFee;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '计划开始日期', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '15%',
|
||||
formatter: function (value, row, index) {
|
||||
if (edit) {
|
||||
return initCell(row.id, "planStartDate", "date", "计划开始日期", row.planStartDate.substring(0, 10));
|
||||
}
|
||||
if (row.planStartDate != null && row.planStartDate != '') {
|
||||
return row.planStartDate.substring(0, 10);
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '计划结束日期', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '15%',
|
||||
formatter: function (value, row, index) {
|
||||
if (edit) {
|
||||
return initCell(row.id, "planEndDate", "date", "计划结束日期", row.planEndDate.substring(0, 10));
|
||||
}
|
||||
if (row.planEndDate != null && row.planEndDate != '') {
|
||||
return row.planEndDate.substring(0, 10);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
field: '', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.status;
|
||||
}
|
||||
}
|
||||
]
|
||||
// // if (edit){
|
||||
// columns.push({
|
||||
// title: "操作",
|
||||
// align: 'center',
|
||||
// valign: 'middle',
|
||||
// width: '10%', // 定义列的宽度,单位为像素px
|
||||
// formatter: function (value, row, index) {
|
||||
// var buts = '';
|
||||
//
|
||||
// buts += '<button class="btn btn-default btn-sm" title="编辑" onclick="editItemDeviceFun(\'' + row.id+'\',\''+ edit + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
// buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
// return buts;
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
var curCell = {};
|
||||
//附表内容
|
||||
$("#table_overhaul_item_device").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/workorder/overhaulItemEquipment/getList.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,
|
||||
pid: pid
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: columns,
|
||||
onClickRow: function (cell, $element) {
|
||||
let view = $('.editable-input').find('input');
|
||||
curCell = cell
|
||||
if (curCell[$element.find('a').attr('name')] === '' || curCell[$element.find('a').attr('name')] === 0) {
|
||||
view.attr('placeholder', view.val());
|
||||
view.val('');
|
||||
// console.log('1111111')
|
||||
view.on('change', (e) => {
|
||||
curCell[$element.find('a').attr('name')] = view.val()
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table_overhaul_item_device");
|
||||
$("#table_overhaul_item_device a").editable({
|
||||
emptyclass: 'emptyEditView',
|
||||
url: function (params) {
|
||||
var sName = $(this).attr("name");
|
||||
curCell[sName] = params.value;
|
||||
var id = curCell["id"];
|
||||
console.log(curCell)
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ext.contextPath + '/workorder/overhaulItemEquipment/doupdate.do?id=' + id + "&" + sName + "=" + params.value,
|
||||
dataType: 'JSON',
|
||||
success: function (data, textStatus, jqXHR) {
|
||||
},
|
||||
error: function (res) {
|
||||
if (res.status == 400) {
|
||||
showAlert('d', '输入有误,请检查输入', 'mainAlertdiv')
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
type: 'text'
|
||||
});
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var doItemAddProject = function (pid, unitId) {
|
||||
$.post(ext.contextPath + '/workorder/overhaulItemProject/doadd.do', {
|
||||
projectId: pid,
|
||||
unitId: unitId
|
||||
}, function (data) {
|
||||
$("#subDetailDiv").html(data);
|
||||
openModal('subModaloverhaulItemProject');
|
||||
});
|
||||
};
|
||||
var doItemAddDevice = function (pid, unitId) {
|
||||
$.post(ext.contextPath + '/workorder/overhaulItemEquipment/doadd.do', {
|
||||
projectId: pid,
|
||||
unitId: unitId
|
||||
}, function (data) {
|
||||
$("#subDetailDiv").html(data);
|
||||
openModal('subModaloverhaulItemProject');
|
||||
});
|
||||
};
|
||||
var editItemProjectFun = function (id, edit) {
|
||||
console.log(edit)
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/workorder/overhaulItemProject/doedit.do', {
|
||||
id: id,
|
||||
edit: edit ? '1' : '0'
|
||||
}, function (data) {
|
||||
$("#subDetailDiv").html(data);
|
||||
openModal('subModaloverhaulItemProject');
|
||||
});
|
||||
};
|
||||
var editItemDeviceFun = function (id, edit) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/workorder/overhaulItemEquipment/doedit.do', {
|
||||
id: id,
|
||||
edit: edit ? '1' : '0'
|
||||
}, function (data) {
|
||||
$("#subDetailDiv").html(data);
|
||||
openModal('subModaloverhaulItemProject');
|
||||
});
|
||||
};
|
||||
var deleteItemProjectFun = 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(willDelete => {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/workorder/overhaulItemProject/dodelete.do', {id: id}, function (data) {
|
||||
if (data == 1) {
|
||||
$("#table_overhaul_item_project").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deleteItemDeviceFun = 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(willDelete => {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/workorder/overhaulItemEquipment/dodelete.do', {id: id}, function (data) {
|
||||
if (data == 1) {
|
||||
$("#table_overhaul_item_project").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deleteItemProjectsFun = function () {
|
||||
var checkedItems = $("#table_overhaul_item_project").bootstrapTable('getSelections');
|
||||
var datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
datas += item.id + ",";
|
||||
});
|
||||
if (datas == "") {
|
||||
showAlert('d', '请先选择记录');
|
||||
} 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 + '/workorder/overhaulItemProject/dodeletes.do', {ids: datas}, function (data) {
|
||||
console.log(data);
|
||||
if (data.result > 0) {
|
||||
$("#table_overhaul_item_project").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var deleteItemDevicesFun = function () {
|
||||
var checkedItems = $("#table_overhaul_item_device").bootstrapTable('getSelections');
|
||||
var datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
datas += item.id + ",";
|
||||
});
|
||||
if (datas == "") {
|
||||
showAlert('d', '请先选择记录');
|
||||
} 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 + '/workorder/overhaulItemEquipment/dodeletes.do', {ids: datas}, function (data) {
|
||||
console.log(data);
|
||||
if (data.result > 0) {
|
||||
$("#table_overhaul_item_device").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// 编辑表格
|
||||
var initCell = function (id, name, dataTyp, dataTitle, value) {
|
||||
|
||||
if (value === undefined || value == null || value == "") {
|
||||
value = '';
|
||||
}
|
||||
|
||||
return '<a href="#" name="' + name + '" data-type="' + dataTyp + '" data-pk="' + id + '" data-title="' + dataTitle + '" style="text-decoration: none;border: none;outline: none;line-height: 47px">' + value + '</a>'
|
||||
// return "<a href=\"#\" name=\""+name+"\" data-type=\""+dataType+"\" data-pk=\"" + id + "\" data-title=\""+dataTitle+"\">" + value + "</a>"
|
||||
}
|
||||
|
||||
</script>
|
||||
121
WebRoot/jsp/workorder/workorderRepairContentAdd.jsp
Normal file
121
WebRoot/jsp/workorder/workorderRepairContentAdd.jsp
Normal file
@ -0,0 +1,121 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosaveContent() {
|
||||
$.post(ext.contextPath + "/workorder/workorderRepairContent/dosave.do", $("#subFormDetail").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
$("#table_repair_detail").bootstrapTable('refresh');
|
||||
closeModal("subModalDetail");
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
$("#subFormDetail").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
repairName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '维修内容不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
selfActualHour: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '实际工时不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
outsourceActualFee: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '委外实际工时费不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModalDetail">
|
||||
<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强制为subFormDetail -->
|
||||
<form class="form-horizontal" id="subFormDetail">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${uuid}"/>
|
||||
<input type="hidden" name="detailId" id="detailId" value="${param.id}"/>
|
||||
<input type="hidden" name="unitId" id="unitId" value="${param.unitId}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工作内容</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="repairName" name="repairName"
|
||||
value="" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工时定额(小时)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="selfQuotaHour" name="selfQuotaHour"
|
||||
placeholder=""
|
||||
value="0" readonly>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*实际工时(小时)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="selfActualHour" name="selfActualHour"
|
||||
step="0.01"
|
||||
value="0" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">委外工时费定额(元)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="outsourceQuotaFee" name="outsourceQuotaFee"
|
||||
placeholder=""
|
||||
value="0" readonly>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*委外实际工时费(元)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="outsourceActualFee" name="outsourceActualFee"
|
||||
placeholder=""
|
||||
value="0" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">实际与定额差异说明</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control " id="memo" name="memo" rows="2"
|
||||
placeholder="实际与定额差异说明..." autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</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="dosaveContent()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
120
WebRoot/jsp/workorder/workorderRepairContentEdit.jsp
Normal file
120
WebRoot/jsp/workorder/workorderRepairContentEdit.jsp
Normal file
@ -0,0 +1,120 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function doupdateContent() {
|
||||
$.post(ext.contextPath + "/workorder/workorderRepairContent/doupdate.do", $("#subFormDetail").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
$("#table_repair_detail").bootstrapTable('refresh');
|
||||
closeModal("subModalDetail");
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
$("#subFormDetail").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
repairName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '维修内容不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
selfActualHour: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '实际工时不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
outsourceActualFee: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '委外实际工时费不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModalDetail">
|
||||
<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强制为subFormDetail -->
|
||||
<form class="form-horizontal" id="subFormDetail">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${workorderRepairContent.id}"/>
|
||||
<input type="hidden" name="unitId" id="unitId" value="${workorderRepairContent.unitId}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工作内容</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="repairName" name="repairName"
|
||||
value="${workorderRepairContent.repairName}" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工时定额(小时)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="selfQuotaHour" name="selfQuotaHour"
|
||||
placeholder=""
|
||||
value="${workorderRepairContent.selfQuotaHour}" readonly>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*实际工时(小时)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="selfActualHour" name="selfActualHour"
|
||||
step="0.01"
|
||||
value="${workorderRepairContent.selfActualHour}" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">委外工时费定额(元)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="outsourceQuotaFee" name="outsourceQuotaFee"
|
||||
placeholder=""
|
||||
value="${workorderRepairContent.outsourceQuotaFee}" readonly>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*委外实际工时费(元)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="outsourceActualFee" name="outsourceActualFee"
|
||||
placeholder=""
|
||||
value="${workorderRepairContent.outsourceActualFee}" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">实际与定额差异说明</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control " id="memo" name="memo" rows="2"
|
||||
placeholder="实际与定额差异说明..." autocomplete="off">${workorderRepairContent.memo}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</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="doupdateContent()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
113
WebRoot/jsp/workorder/workorderUserTimeView.jsp
Normal file
113
WebRoot/jsp/workorder/workorderUserTimeView.jsp
Normal file
@ -0,0 +1,113 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.tools.CommString" %>
|
||||
<%@page import="com.sipai.entity.enums.AchievementTypeEnum" %>
|
||||
<%request.setAttribute("TYPE_REPAIR", AchievementTypeEnum.TYPE_REPAIR); %>
|
||||
<%request.setAttribute("TYPE_MAINTAIN", AchievementTypeEnum.TYPE_MAINTAIN); %>
|
||||
<%request.setAttribute("TYPE_P", AchievementTypeEnum.TYPE_P); %>
|
||||
<%request.setAttribute("TYPE_E", AchievementTypeEnum.TYPE_E); %>
|
||||
<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">
|
||||
$(function () {
|
||||
})
|
||||
|
||||
function getWorkList(type) {
|
||||
$.post(ext.contextPath + '/workorder/workorderAchievement/showUserWorkList.do', {sdtAndEdt: '${sdtAndEdt}', userId: '${userId}', type: type}, function (data) {
|
||||
$("#workorderUserListDiv").html(data);
|
||||
openModal('workorderUserListDataModal');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<div class="modal fade" id="workorderUserTimeDataModal">
|
||||
<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>
|
||||
<h3 class="modal-title">个人工时统计</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<h4>总计</h4>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">时间范围</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group">
|
||||
<p class="form-control-static">${sdtAndEdt}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">人员名称</label>
|
||||
<div class="col-sm-3">
|
||||
<p class="form-control-static">${workUserTimeRespDto.caption}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">个人工时</label>
|
||||
<div class="col-sm-3">
|
||||
<p class="form-control-static">${workUserTimeRespDto.sumTime}</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4>维修:</h4>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">维修工单</label>
|
||||
<div class="col-sm-3">
|
||||
<p class="form-control-static" style="color: #0b93d5;cursor:pointer;" onclick="getWorkList('${TYPE_REPAIR.name}');">${workUserTimeRespDto.repairCount}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">维修工时</label>
|
||||
<div class="col-sm-3">
|
||||
<p class="form-control-static">${workUserTimeRespDto.repairTime}</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4>保养:</h4>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">保养工单</label>
|
||||
<div class="col-sm-3">
|
||||
<p class="form-control-static" style="color: #0b93d5;cursor:pointer;" onclick="getWorkList('${TYPE_MAINTAIN.name}');">${workUserTimeRespDto.maintainCount}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">保养工时</label>
|
||||
<div class="col-sm-3">
|
||||
<p class="form-control-static">${workUserTimeRespDto.maintainTime}</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4>运行巡检:</h4>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">运行工单</label>
|
||||
<div class="col-sm-3">
|
||||
<p class="form-control-static" style="color: #0b93d5;cursor:pointer;" onclick="getWorkList('${TYPE_P.name}');">${workUserTimeRespDto.pCount}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">运行工时</label>
|
||||
<div class="col-sm-3">
|
||||
<p class="form-control-static">${workUserTimeRespDto.pTime}</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4>设备巡检:</h4>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">设备工单</label>
|
||||
<div class="col-sm-3">
|
||||
<p style="color: #0b93d5;cursor:pointer;" class="form-control-static" onclick="getWorkList('${TYPE_E.name}');">${workUserTimeRespDto.eCount}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">设备工时</label>
|
||||
<div class="col-sm-3">
|
||||
<p class="form-control-static">${workUserTimeRespDto.eTime}</p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user