first commit
This commit is contained in:
169
WebRoot/jsp/equipment/equipmentMaintainEdit.jsp
Normal file
169
WebRoot/jsp/equipment/equipmentMaintainEdit.jsp
Normal file
@ -0,0 +1,169 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/equipment/equipmentmaintain/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
//刷新列表
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
function selectequipmentmaintain(equipmentid,equipmentcardid){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择设备',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/equipment/equipmentmaintain/showListForSelect.do',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectFun();
|
||||
if(res!=null){
|
||||
console.log("enter",res);
|
||||
dialog.dialog('destroy');
|
||||
$("#"+equipmentid).textbox("setValue",res.equipmentid);
|
||||
$("#"+equipmentcardid).val(res.id);
|
||||
$("#equipmentname").html(res.equipmentname);
|
||||
$("#equipmentclassid").html(res.equipmentclass);
|
||||
$("#equipmentmodel").html(res.equipmentmodel);
|
||||
$("#areaid").html(res.geographyarea);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#equipmentid").textbox('textbox').bind("click", function () {
|
||||
selectequipmentmaintain("equipmentid","equipmentcardid");
|
||||
});
|
||||
});
|
||||
function selectmaintenanceman(mancaption,maintenanceman){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择维修者',
|
||||
width: 700,
|
||||
height:420,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/equipment/equipmentmaintain/showMaintenancemanForSelect.do',
|
||||
toolbar:'',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
var res=dialog.find('iframe').get(0).contentWindow.selectFun();
|
||||
if(res!=null){
|
||||
console.log("enter",res);
|
||||
dialog.dialog('destroy');
|
||||
$("#"+mancaption).textbox("setValue",res.name);
|
||||
$("#"+maintenanceman).val(res.id);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
// dialog.find('iframe').get(0).contentWindow.selectCancel();
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#mancaption").textbox('textbox').bind("click", function () {
|
||||
selectmaintenanceman("mancaption","maintenanceman");
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input type="hidden" name="id" value="${equipmentmaintain.id}"/>
|
||||
<table class="table">
|
||||
|
||||
<tr>
|
||||
<th >设备编号</th>
|
||||
<td><input id="equipmentid" name="equipmentid" class="easyui-textbox" data-options="required:true,validType:'isBlank',"value="${equipmentmaintain.equipmentcode}" readonly/>
|
||||
<input id="equipmentcardid" name="equipmentcardid" type="hidden" value="${equipmentmaintain.equipmentcardid}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<td><span id="equipmentname"></span> </td>
|
||||
<script type="text/javascript">
|
||||
document.getElementById('equipmentname').innerText="${equipmentmaintain.equipmentname}";
|
||||
</script>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备类型</th>
|
||||
<td><span id="equipmentclassid"></span> </td>
|
||||
<script type="text/javascript">
|
||||
document.getElementById('equipmentclassid').innerText="${equipmentmaintain.equipmentclassid}";
|
||||
</script>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备型号</th>
|
||||
<td><span id="equipmentmodel"></span> </td>
|
||||
<script type="text/javascript">
|
||||
document.getElementById('equipmentmodel').innerText="${equipmentmaintain.equipmentmodel}";
|
||||
</script>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>存放位置</th>
|
||||
<td><span id="areaid"></span> </td>
|
||||
<script type="text/javascript">
|
||||
document.getElementById('areaid').innerText="${equipmentmaintain.areaid}";
|
||||
</script>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >维修者</th>
|
||||
<td><input id="mancaption" name="mancaption" class="easyui-textbox" data-options="required:true,validType:'isBlank',"value="${equipmentmaintain.mancaption}" readonly/>
|
||||
<input id="maintenanceman" name="maintenanceman" type="hidden" value="${equipmentmaintain.maintenanceman}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >维修描述</th>
|
||||
<td ><input id="describe" name="describe" class="easyui-textbox"
|
||||
data-options="multiline:true" style="overflow:auto;width:100%;height:80px;"
|
||||
validtype="length[0,250]" invalidMessage="有效长度0-250"
|
||||
value="${ equipmentmaintain.describe}" /></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user