rushfee/resource/html/tick/ticking.html

80 lines
2.0 KiB
HTML
Raw Normal View History

2022-05-16 15:07:40 +00:00
<html login="false">
<head>
<title>商品列表</title>
</head>
<body>
<div widget="toolbar" style="padding:10px;border:0;">
<input widget="edit" name="qn" label="反馈名称"/>
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
<a widget="button" iconCls="icon-add" onclick="add()">新增</a>
<a widget="button" iconCls="icon-edit" onclick="edit()">修改</a>
<a widget="button" iconCls="icon-delete" onclick="remove()">删除</a>
</div>
<div widget="autosize">
<div widget="datagrid" name="grid" style="width: 100%; height: 100%;" url="tick/TickList/getlist" allowalternating="true">
<div type="indexcolumn" width="15" header="序号"></div>
<div field="id" visible="false"></div>
<div field="no" width="10" align="center" header="反馈编号"></div>
<div field="name" width="30" header="反馈名称"></div>
<div field="remark" width="30" header="备注"></div>
</div>
</div>
</body>
<script type="text/javascript">
var grid = aos.get('grid');
grid.load();
function search(){
var params={qn:aos.get('qn').value};
grid.load(params);
}
function add(){
var param = {};
param['pageState'] = 'editnew';
aos.showWindow('canvas/tick/tickadd', param, '400px', '300px', '反馈信息添加', function(rtnValue){
grid.reload();
});
}
function edit(){
var data = grid.getSelected();
if(!data){
aos.alert('请选择一条数据。');
return;
}
var param = {};
param['pageState'] = 'editold';
param['id'] = data.id;
aos.showWindow('canvas/tick/tickedit', param, '400px', '300px', '反馈信息修改', function(rtnValue){
grid.reload();
});
}
function remove(){
var data = grid.getSelected();
if(!data){
aos.alert('请选择一条数据。');
return;
}
aos.post({
url:"tick/TickList/deleteTk",
data:{id:data.id,name:data.name,no:data.no},
success:function(){
aos.tip('删除成功。');
grid.reload();
}
});
}
</script>
</html>