rushfee/build/classes/html/authtask/user_recommend.html

98 lines
3.0 KiB
HTML
Raw Normal View History

2022-05-16 15:07:40 +00:00
<html login="false">
<head>
<meta charset="UTF-8">
<title>新增人员推送短信推送短信</title>
</head>
<body>
<div widget ="toolbar">
<input name="u_name" widget="edit" textfield="text" style="width: 300px;" label="员工名称">
<input name="u_phone" widget="edit" textfield="text" style="width: 300px;" label="员工电话">
<a widget="button" iconCls="icon-edit" onclick="add()"style="margin-left:20px;" >添加 </a>
<a widget="button" iconCls="icon-edit" onclick="update()"style="margin-left:20px;">修改</a>
<a widget="button" iconCls="icon-delete" onclick="push_delete()"style="margin-left:20px;">删除</a>
<a widget="button" iconCls="icon-search" onclick="search()" style="margin-left:20px;">查询</a>
</div>
<div widget="autosize">
<div widget="datagrid" name="grid" style="width: 100%; height: 100%;" url="aisinoha/recommend/search">
<div type = "checkcolumn" width="10"header ="选择"></div>
<div type="indexcolumn" width="10" align="center"header="序号"></div>
<div field="id" width= "50" header= "登记序号" visible= "false"></div>
<div field="name" width= "50" align="center" header= "员工名称" ></div>
<div field="phone" width= "50" align="center" header= "员工电话"></div>
<div field="openid" width= "50" align="center" header= "微信openid"></div>
<div field="isused" width= "50" align="center" header= "是否启用"renderer= "changeRenderer"></div>
</div>
</div>
</body>
<script type="text/javascript">
var grid = aos.get('grid');
grid.load();
var type ="";
function search(){
var params={
u_name : aos.get('u_name').getValue(),
u_phone : aos.get('u_phone').getValue()
};
grid.load(params);
}
function add(){
var param={
type :'add',
};
aos.showWindow('canvas/authtask/recommend_add', param, '320px', '200px', '添加推送人员', function(rtnValue){
search();
});
}
function push_delete(){
var row = grid.getSelected();
var data={};
data['id']=row.id;
aos.post({
url:"aisinoha/recommend/delete",
data:data,
success:function(rtnData){
aos.alert(rtnData.message);
}
});
grid.removeRow(row, true);
}
function update(){
var row = grid.getSelected();//getSelecteds
if(row==null || row==''){
aos.alert('请选择一条数据!');
return;
}
if(row.length>1){
aos.alert('请选择一条数据!');
return;
}
if(row){
var param={
type :'update',
name : row.name,
phone : row.phone,
isused : row.isused,
openid : row.openid,
id : row.id
};
}
aos.showWindow('canvas/authtask/recommend_add', param, '320px', '200px', '修改推送人员', function(rtnValue){
search();
});
}
function changeRenderer(e){
var row = e.row ;
var isused = row.isused;
if(isused=='0'){
return '未启用';
}else if(isused =='1'){
return '启用';
}
}
</script>
</html>