rushfee/build/classes/html/revisit/hwPhoneAdd.html

90 lines
2.1 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>
<br/>
<input widget="autocomplete" name="userId" label="员工姓名" required="true" url="hwphone/getUserList"
popupEmptyText="请选择" textField="cname" valueField="cguid"
showClose="true" oncloseclick ="conCloseClick"/>
<br/>
<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 conCloseClick (e){
var obj =e.sender;
obj.setText("");
obj.setValue("");
}
function init(param){
// aos.post({
// url:"rush/telaccount/getone",
// data:param,
// success:function(rtnData){
//
// if(null!=rtnData){
// aos.get('account').setValue(rtnData.account);
//
// }
// else{
//
// aos.tip('没有可分配的鸿联账号!!!');
// }
//
//
//
// }
// });
}
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['userId']=aos.get('userId').getValue();
one['agentId']=aos.get('agentId').getValue();
one['phoneNo']=aos.get('phoneNo').getValue();
aos.post({
url:"hwphone/addAccount",
data:one,
success:function(data, textStatus, jqXHR){
if(data.isOk=='1'){
aos.tip(data.msg);
CloseWindow();
}
else{
aos.tip(data.msg);
}
}
});
}
</script>
</html>