rushfee/build/classes/html/revisit/hwPhoneEdit.html

66 lines
1.9 KiB
HTML

<html login="false">
<head>
<title>修改华为电话账号</title>
</head>
<body>
<div widget="toolbar">
<a widget="button" iconCls="icon-save" onclick="save" linkToState="editold,editnew">保存</a>
<a widget="button" iconCls="icon-exit" onclick="CloseWindow()">退出</a>
</div>
<input widget="hidden" name="id" label="id" readonly="true" style="margin-top:5px"/> <br/>
<input widget="hidden" name="userId" label="userId" readonly="true" style="margin-top:5px"/> <br/>
<input widget="edit" name="userName" label="员工姓名" required="true" style="margin-top:5px" readonly="readonly"/>
<input widget="num" name="agentId" label="工号" required="true" style="margin-top:5px" />
<input widget="num" name="phoneNo" label="分机号" required="true" style="margin-top:5px" />
</body>
<script type="text/javascript">
function init(param){
var pageState = param['pageState'];
if(pageState){
aos.setState(pageState)
}
aos.getForm().setData(param);
}
function save(){
if(aos.get('userId').getValue()==null||aos.get('userId').getValue()=="")
{ aos.tip('请选择职员');
return;
}
if(aos.get('agentId').getValue()==null||aos.get('agentId').getValue()=="")
{ aos.tip('请填写工号');
return;
}
if(aos.get('phoneNo').getValue()==null||aos.get('phoneNo').getValue()=="")
{ aos.tip('请填写分机号');
return;
}
var one = {};
one['id']=aos.get('id').getValue();
one['userId']=aos.get('userId').getValue();
one['agentId']=aos.get('agentId').getValue();
one['phoneNo']=aos.get('phoneNo').getValue();
aos.post({
url:"hwphone/editAccount",
data:one,
success:function(data, textStatus, jqXHR){
if(data.isOk=='1'){
aos.tip(data.msg);
CloseWindow();
}
else{
aos.tip(data.msg);
}
}
});
}
</script>
</html>