82 lines
2.1 KiB
HTML
82 lines
2.1 KiB
HTML
<html login="false">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>添加/修改推送信息</title>
|
|
</head>
|
|
<body>
|
|
<div widget="toolbar" showCloseButton="false">
|
|
<a widget="button" iconCls="icon-save" onclick="save">保存</a>
|
|
|
|
</div>
|
|
|
|
<div style="padding:4px;border:0;">
|
|
<input id="id" widget="hidden" />
|
|
<input id="type" widget="hidden" />
|
|
<input name="name" widget="edit" style="width: 300px;" label="员工名称">
|
|
<br>
|
|
<input name="phone" widget=edit style="width: 300px;" label="员工电话">
|
|
<br>
|
|
<input name="openid" widget=edit style="width: 300px;" label="微信openid">
|
|
<br>
|
|
<div widget="radiobuttonlist" name ="isused" label="是否启用" data="[{id:'yes',text:'是'},{id:'no',text:'否'}]"
|
|
repeatitems="2" textfield= "text" valuefield="id" ></div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
<script type="text/javascript">
|
|
function init(param){
|
|
var type = param.type;
|
|
aos.get('type').setValue(param.type);
|
|
if('add'==type){
|
|
aos.get('isused').setValue('yes');
|
|
}else if('update'==type){
|
|
aos.get('id').setValue(param.id);
|
|
aos.get('name').setValue(param.name);
|
|
aos.get('phone').setValue(param.phone);
|
|
aos.get('openid').setValue(param.openid);
|
|
aos.get('isused').setValue(param.isused=='1' ?'yes':'no');
|
|
}
|
|
|
|
}
|
|
function save(){
|
|
var type = aos.get('type').getValue();
|
|
if('add'==type){
|
|
var param ={
|
|
type : type,
|
|
name : aos.get('name').getValue(),
|
|
phone : aos.get('phone').getValue(),
|
|
openid : aos.get('openid').getValue(),
|
|
isused : aos.get('isused').getValue()
|
|
}
|
|
}else if('update'==type){
|
|
var param ={
|
|
type : type,
|
|
id : aos.get('id').getValue(),
|
|
name : aos.get('name').getValue(),
|
|
phone : aos.get('phone').getValue(),
|
|
openid : aos.get('openid').getValue(),
|
|
isused : aos.get('isused').getValue()
|
|
}
|
|
}
|
|
aos.post({
|
|
url:'aisinoha/recommend/save',
|
|
data:param,
|
|
success: function(datas){
|
|
if(datas.code=='0000'){
|
|
//aos.tip(datas.message,3*1000);
|
|
aos.alert(datas.message);
|
|
CloseWindow(param);
|
|
}else{
|
|
aos.alert(datas.message);
|
|
}
|
|
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
</html> |