<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
<style type="text/css">
|
th{
|
width : 100px;
|
}
|
</style>
|
<script type="text/javascript">
|
$(function () {
|
|
// 下拉框选择控件,下拉框的内容是动态查询数据库信息
|
$('#eqp').combobox({
|
url: '${pageContext.request.contextPath}/pms/overhaul/getAllEqus.do',
|
editable: false, //不可编辑状态
|
cache: false,
|
panelHeight: '150',
|
valueField: 'id',
|
textField: 'equipmentName',
|
onSelect: function () {
|
var eqpName = $('#eqp').combobox('getText');
|
$('#eqpName').val(eqpName);
|
/*var teamId = $('#team').combobox('getValue');*/
|
if (eqpName != "") {
|
$.ajax({
|
type: "POST",
|
url: "${pageContext.request.contextPath}/pms/overhaul/getAllStaff.do",
|
data: {"eqpName": eqpName},
|
cache: false,
|
dataType: "json",
|
success: function (data) {
|
$('#staffs').html("");
|
if (!data.success) {
|
$('#staffs').html("<span style=\"color: red;font-weight:bold\">该机种在当前时段没有排班信息,请重新选择机种!</span>");
|
} else {
|
if (data.obj.length < 1) {
|
$('#staffs').html("<span style=\"color: red;font-weight:bold\">没有查询到负责该机台与该班组中空闲的维修工信息!</span>");
|
} else {
|
var htmlStr = "";
|
console.info(data.obj);
|
console.info(data.obj.length);
|
for (var i = 0; i < data.obj.length; i++) {
|
htmlStr += "<div style='float:left;width: 30%;'><input name=\"reqUsrNam\" type=\"checkbox\" value=\""+data.obj[i].user_name+"\" onclick='fun()'/>" + data.obj[i].user_name + " [" + data.obj[i].type_name + "]</div>"
|
}
|
$('#staffs').html(htmlStr);
|
}
|
}
|
}
|
});
|
}
|
}
|
});
|
|
$.ajax({
|
type: "POST",
|
url: "${pageContext.request.contextPath}/pms/overhaul/getDescription.do",
|
data: {"faultTypeDetail": 1},
|
cache: false,
|
dataType: "json",
|
success: function (data) {
|
var des =[];
|
$('#description').combobox('clear'); //清空选中项
|
for(var i=0;i<data.length;i++){
|
des.push({"text":data[i][0],"id":data[i][0]});
|
}
|
$("#description").combobox("loadData", des); //赋值
|
}
|
});
|
|
$('#faultTypeDetail').combobox({
|
onSelect: function () {
|
var faultTypeDetail = $('#faultTypeDetail').combobox('getValue');
|
/*var teamId = $('#team').combobox('getValue');*/
|
if (faultTypeDetail != "") {
|
$.ajax({
|
type: "POST",
|
url: "${pageContext.request.contextPath}/pms/overhaul/getDescription.do",
|
data: {"faultTypeDetail": faultTypeDetail},
|
cache: false,
|
dataType: "json",
|
success: function (data) {
|
var des =[];
|
$('#description').combobox('clear'); //清空选中项
|
for(var i=0;i<data.length;i++){
|
des.push({"text":data[i][0],"id":data[i][0]});
|
}
|
$("#description").combobox("loadData", des); //赋值
|
}
|
});
|
}
|
}
|
});
|
|
$('#description').combobox({
|
onLoadSuccess: function () {
|
$('#description').next('.combo').find('input').blur(function () {
|
/* $("#des").val($('#description').combobox('getText'));*/
|
$('#description').combobox('setValue',$('#description').combobox('getText') )
|
//alert($("#description").val());
|
});
|
}
|
});
|
|
// 下拉框选择控件,下拉框的内容是动态查询数据库信息
|
/*$('#team').combobox({
|
url:'${pageContext.request.contextPath}/pms/overhaul/getAllTeams.do',
|
editable:false, //不可编辑状态
|
cache: false,
|
panelHeight: '150',
|
valueField:'id',
|
textField:'name',
|
onSelect: function(){
|
var eqpName = $('#eqp').combobox('getText');
|
var teamId = $('#team').combobox('getValue');
|
if(eqpName!=""&&teamId!=""){
|
$.ajax({
|
type: "POST",
|
url: "${pageContext.request.contextPath}/pms/overhaul/getAllStaff.do",
|
data : {"eqpName":eqpName,"teamId":teamId},
|
cache: false,
|
dataType : "json",
|
success: function(data){
|
$('#staffs').html("");
|
if(jQuery.isEmptyObject(data)||""==data||data.length==0){
|
$('#staffs').html("<span style=\"color: red;font-weight:bold\">没有查询到负责该机台与该班组中空闲的维修工信息!</span>");
|
}else{
|
var htmlStr="";
|
console.info(data);
|
console.info(data.length);
|
for(var i = 0;i < data.length; i++){
|
htmlStr+="<div style='float:left;width: 30%;'><input name=\"requestUserName\" type=\"checkbox\" value=\""+data[i].user_name+"\" />"+data[i].user_name+" ["+data[i].type_name+"]</div>"
|
}
|
$('#staffs').html(htmlStr);
|
}
|
}
|
});
|
}
|
}
|
});*/
|
|
});
|
|
function fun(){
|
obj = document.getElementsByName("reqUsrNam");
|
check_val = [];
|
for(k in obj){
|
if(obj[k].checked)
|
check_val.push(obj[k].value);
|
}
|
$("input[name='requestUserName']").val(check_val);
|
}
|
</script>
|
<div class="easyui-layout" data-options="fit:true,border:false">
|
<div data-options="region:'center',border:false" title="" style="overflow: hidden;padding:5px">
|
<form id="form" method="post">
|
<fieldset>
|
<legend>维修呼叫记录新增</legend>
|
<table class="table" style="width: 100%;table-layout: fixed;">
|
<%--<tr>
|
<th>维保工单号</th>
|
<td>
|
<input name="orderNo" class="easyui-validatebox" data-options="panelHeight:'auto',editable:false,width:173,required:true"/>
|
</td>--%>
|
<%--<th>呼叫人</th>
|
<td>
|
<input name="sumitter" class="easyui-validatebox" data-options="panelHeight:'auto',editable:false,width:173,required:true"/>
|
</td>
|
</tr>--%>
|
<%--<tr>--%>
|
<%--<th>保养类型</th>
|
<td>
|
<select name="maintenamceType"
|
class="easyui-combobox"
|
data-options="panelHeight:'auto',editable:false,width:173">
|
<%–1. 轮保 2 润滑 3 停产检修 4 周期性保养 5 点检–%>
|
<option value="1">轮保</option>
|
<option value="2">润滑</option>
|
<option value="5">点检</option>
|
<option value="3">停产检修</option>
|
<option value="4">周期性保养</option>
|
</select>
|
</td>--%>
|
<%--<th>班次</th>
|
<td>
|
<input type="text" id="shift" name="shiftId" class="easyui-combobox easyui-validatebox"
|
data-options="textField:'name',valueField:'id',url:'${pageContext.request.contextPath}/pms/overhaul/getAllShifts.do'"/>
|
</td>
|
<th>班组</th>
|
<td>
|
<input type="text" id="team" name="teamId" class="easyui-combobox easyui-validatebox"/>
|
</td>
|
</tr>--%>
|
<tr>
|
<th>设备名称</th>
|
<td colspan="3">
|
<input type="text" id="eqp" name="eqpId" class="easyui-combobox easyui-validatebox"/>
|
<input type="hidden" id="eqpName" name="eqpName"/>
|
</td>
|
</tr>
|
<tr>
|
<th>故障详细类型</th>
|
<td>
|
<select id="faultTypeDetail" name="faultTypeDetail"
|
data-options="panelHeight:'auto',editable:false,width:173">
|
<%--1.机械,2.电气,3.计量 4.其他--%>
|
<option value="1">机械</option>
|
<option value="2">电气</option>
|
<option value="3">计量</option>
|
<option value="4">其他</option>
|
</select>
|
</td>
|
<th>故障描述</th>
|
<td>
|
<select id="description" name="description" class="easyui-combobox" style="width:173px;" data-options="valueField:'id', textField:'text'" />
|
</td>
|
<%--<th>原因类别</th>
|
<td>
|
<select name="reasonCategory"
|
class="easyui-combobox"
|
data-options="panelHeight:'auto',editable:false,width:173">
|
<%–1.功效,2震动,3 泄露,4破损,5,磨损,6变形,7油污,
|
8松动,9抖动,10掺漏,11积垢,12断裂,13温度,
|
14异响,15错位,16间隙–%>
|
<option value="1">功效</option>
|
<option value="2">震动</option>
|
<option value="3">泄露</option>
|
<option value="4">破损</option>
|
<option value="5">磨损</option>
|
<option value="6">变形</option>
|
<option value="7">油污</option>
|
<option value="8">松动</option>
|
<option value="9">抖动</option>
|
<option value="10">掺漏</option>
|
<option value="11">积垢</option>
|
<option value="12">断裂</option>
|
<option value="13">温度</option>
|
<option value="14">异响</option>
|
<option value="15">错位</option>
|
<option value="16">间隙</option>
|
</select>
|
</td>--%>
|
<%--<th>处理措施</th>
|
<td>
|
<input type="text" name="troubleInfo" class="easyui-combobox easyui-validatebox"
|
data-options="textField:'name',valueField:'id'"/><%–,url:'${pageContext.request.contextPath }/pms/maintain/queryAllUnit.do'–%>
|
</td>--%>
|
</tr>
|
<tr>
|
<th>备注</th>
|
<td colspan="3">
|
<textarea style="width:460px;height:60px;resize:none" name="remark"></textarea>
|
</td>
|
</tr>
|
<tr>
|
<%--<th>维修时长(小时)</th>
|
<td>
|
<input type="text" name="duration" class="easyui-numberbox " min="0" max="999" precision="2" data-options="required:true"/>
|
</td>--%>
|
|
<th>维修人</th>
|
<td colspan="3" id="staffs">
|
<%--<input type="text" name="requestUserName" class="easyui-combobox easyui-validatebox"
|
data-options="textField:'user_name',valueField:'user_name',url:'${pageContext.request.contextPath}/pms/overhaul/getAllStaff.do'"/>--%>
|
<span style="color: red;font-weight:bold">请先选择[设备名称]选项!</span>
|
</td>
|
<input type="hidden" name="requestUserName" value="">
|
</tr>
|
<%--<tr>--%>
|
<%--<th>故障类型</th>
|
<td>
|
<select name="faultType"
|
class="easyui-combobox"
|
data-options="panelHeight:'auto',editable:false,width:173">
|
<%–1.劣化,2突发–%>
|
<option value="1">劣化</option>
|
<option value="2">突发</option>
|
</select>
|
</td>--%>
|
|
|
<%--<th>呼叫时间</th>
|
<td>
|
<input type="text" name="requestTime" class="easyui-my97" datefmt="yyyy-MM-dd HH:mm:ss" style="width:173px"/>
|
</td>--%>
|
<%--</tr>--%>
|
<%--<tr>
|
<th>呼叫时间</th>
|
<td>
|
<input type="text" name="requestTime" class="easyui-my97" datefmt="yyyy-MM-dd HH:mm:ss" style="width:173px"/>
|
</td>
|
|
<th>受理时间</th>
|
<td>
|
<input type="text" name="handleStartTime" class="easyui-my97" datefmt="yyyy-MM-dd HH:mm:ss" style="width:173px"/>
|
</td>
|
</tr>--%>
|
<%--<tr>
|
<th>故障发生时间</th>
|
<td>
|
<input type="text" name="actionTime" class="easyui-my97" datefmt="yyyy-MM-dd HH:mm:ss" style="width:173px"/>
|
</td>
|
|
<th>结束时间</th>
|
<td>
|
<input type="text" name="handleEndTime" class="easyui-my97" datefmt="yyyy-MM-dd HH:mm:ss" style="width:173px"/>
|
</td>
|
</tr>--%>
|
</table>
|
</fieldset>
|
</form>
|
</div>
|
<div id="pickPidDialog" class="easyui-dialog" title="选择父级资源" style="width:250px;height:300px;"
|
data-options="iconCls:'icon-save',resizable:true,modal:true,closed:true">
|
<table id="pickPidTreeGrid"></table>
|
</div>
|
</div>
|