first commit
This commit is contained in:
106
bin/WebRoot/jsp/material/cutterStandardIssued.jsp
Normal file
106
bin/WebRoot/jsp/material/cutterStandardIssued.jsp
Normal file
@ -0,0 +1,106 @@
|
||||
<!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(){
|
||||
$('#dg').datagrid({
|
||||
view: detailview,
|
||||
detailFormatter:function(index,row){
|
||||
return '<div class="ddv"></div>';
|
||||
},
|
||||
onExpandRow: function(index,row){
|
||||
var ddv = $(this).datagrid('getRowDetail',index).find('div.ddv');
|
||||
ddv.panel({
|
||||
border:false,
|
||||
cache:true,
|
||||
href:'PlantEngine_RLD/material/cutterstandard/getlist.do',
|
||||
onLoad:function(){
|
||||
$('#dg').datagrid('fixDetailRowHeight',index);
|
||||
$('#dg').datagrid('selectRow',index);
|
||||
$('#dg').datagrid('getRowDetail',index).find('form').form('load',row);
|
||||
}
|
||||
});
|
||||
$('#dg').datagrid('fixDetailRowHeight',index);
|
||||
}
|
||||
});
|
||||
});
|
||||
function saveItem(index){
|
||||
var row = $('#dg').datagrid('getRows')[index];
|
||||
var url = row.isNewRecord ? 'C:/Users/yaoyingjie/Downloads/jeasyui-app-crud3/jeasyui-app-crud3/save_user.php' : 'C:/Users/yaoyingjie/Downloads/jeasyui-app-crud3/jeasyui-app-crud3/update_user.php?id='+row.id;
|
||||
$('#dg').datagrid('getRowDetail',index).find('form').form('submit',{
|
||||
url: url,
|
||||
onSubmit: function(){
|
||||
return $(this).form('validate');
|
||||
},
|
||||
success: function(data){
|
||||
data = eval('('+data+')');
|
||||
data.isNewRecord = false;
|
||||
$('#dg').datagrid('collapseRow',index);
|
||||
$('#dg').datagrid('updateRow',{
|
||||
index: index,
|
||||
row: data
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function cancelItem(index){
|
||||
var row = $('#dg').datagrid('getRows')[index];
|
||||
if (row.isNewRecord){
|
||||
$('#dg').datagrid('deleteRow',index);
|
||||
} else {
|
||||
$('#dg').datagrid('collapseRow',index);
|
||||
}
|
||||
}
|
||||
function destroyItem(){
|
||||
var row = $('#dg').datagrid('getSelected');
|
||||
if (row){
|
||||
$.messager.confirm('Confirm','Are you sure you want to remove this user?',function(r){
|
||||
if (r){
|
||||
var index = $('#dg').datagrid('getRowIndex',row);
|
||||
$.post('destroy_user.php',{id:row.id},function(){
|
||||
$('#dg').datagrid('deleteRow',index);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function newItem(){
|
||||
$('#dg').datagrid('appendRow',{isNewRecord:true});
|
||||
var index = $('#dg').datagrid('getRows').length - 1;
|
||||
$('#dg').datagrid('expandRow', index);
|
||||
$('#dg').datagrid('selectRow', index);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Edit form in expanded row details</h2>
|
||||
<div class="demo-info" style="margin-bottom:10px">
|
||||
<div class="demo-tip icon-tip"> </div>
|
||||
<div>Click the expand button to expand a detail form.</div>
|
||||
</div>
|
||||
|
||||
|
||||
<table id="dg" title="My Users" style="width:700px;height:250px"
|
||||
url= '/PlantEngine_RLD/material/cutterstandard/getlist.do',
|
||||
toolbar="#toolbar" pagination="true"
|
||||
fitColumns="true" singleSelect="true">
|
||||
<thead>
|
||||
<tr>
|
||||
<th field="stequgospeedvalue" width="50">stequgospeedvalue</th>
|
||||
<th field="stequcaspeedvalue" width="50">stequcaspeedvalue</th>
|
||||
<th field="stprocesscumnovalue" width="50">stprocesscumnovalue</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div id="toolbar">
|
||||
<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newItem()">New</a>
|
||||
<a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="destroyItem()">Destroy</a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user