rushfee/resource/html/rush/mianzhenghu.html

79 lines
2.7 KiB
HTML

<html login="false">
<head>
<title>免收户维护</title>
</head>
<body>
<div widget="toolbar" showCloseButton="false">
<input name="cust_name" widget="edit" style="width: 300px;" label="客户名称">
<input name="cust_tax_code" widget="edit" style="width: 300px;" label="客户税号">
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
<a widget="button" iconcls="icon-add" onclick="addCust()">新增</a>
<a widget="button" iconcls="icon-delete" onclick="deleteCust()">删除</a>
</div>
<div widget="autosize">
<div widget="datagrid" name="grid" style="height:95%" url="mianzheng/getList" multiSelect="true"
allowalternating="true" >
<div type="checkcolumn" width="5" header ="选择"></div>
<div type="indexcolumn" width="5" header="序号"></div>
<div field="cust_name" width="30" header="客户名称"></div>
<div field="tax_code" width="60" header="客户税号"></div>
</div>
</div>
</body>
<script type="text/javascript">
var grid = aos.get('grid');
function search(){
var params={cust_name:aos.get('cust_name').value,
cust_tax_code:aos.get('cust_tax_code').value};
grid.load(params);
}
function addCust(){
var param = {};
param['pageState'] = 'editnew';
aos.showWindow('canvas/rush/mianzhengAdd', param, '400px', '300px', '新增免收户', function(rtnValue){
grid.reload();
});
}
function deleteCust() {
var rows=grid.getSelecteds();
if (rows==null||rows==''){
aos.alert('请勾选要删除的项');
return ;
} else{
aos.confirm("请检查信息,是否确认删除?",null,function(action) {
if(action == 'cancel')
{return;}else if(action=='ok'){
for(var i=0;i<rows.length;i++){
var data={
cust_name:rows[i].cust_name,
cust_tax_code:rows[i].tax_code,
}
aos.post({
url:"mianzheng/deleteCust",
data:data,
success:function(data, textStatus, jqXHR){
if(data.isOk == 1){
aos.tip('删除成功');
grid.reload();
}
else{
aos.tip(data.msg);
}
}
});
}
}
});
}
}
</script>
</html>