rushfee/build/classes/html/rush/twicemessage.html

134 lines
4.7 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<html login="false">
<head>
<title>短信发送</title>
</head>
<body >
<div widget="toolbar" >
<a widget="button" id = "message" iconCls="icon-mail" onclick="message">发送短信</a>
<a widget="button" iconCls="icon-exit" onclick="CloseWindow()" >退出</a>
</div>
<input widget="combox" name="contact" valueField="mobile" textField="text" label="短信接受人" showNullItem="false" onvaluechanged="getmobile" style="margin-top:5px" />
<input widget="edit" name="mobile" label="电话" readonly="true" />
<input name="message" widget="hidden" />
<br/>
<input widget="textarea" name="msg" label="短信内容" width="505px" height="100px"/>
<br/>
<br/>
<span id="warning" style="margin-left:65px">提示:短信接收人可以下拉选择,第一条为常用联系人</span>
</body>
<script type="text/javascript">
var grid = aos.get('contact');
var url="rush/search/getContact?customer_id=";
function init(param){
aos.get('message').setValue(param.customer_id);
var msgurl=url+param.customer_id;
grid.load(msgurl);
aos.get('contact').select(0);
aos.get('mobile').setValue(aos.get('contact').getValue());
var cust_name=param.cust_name;
aos.post({
url:"rush/message/getContent",
success:function(rtnData){
if(rtnData!=null&&rtnData.length>0){
var jjdq='';
var yjdq='';
for(var i=0;i<rtnData.length;i++){
if(rtnData[i]['text']=='jjdq'){
jjdq=rtnData[i]['memo'];
}
if(rtnData[i]['text']=='yjdq'){
yjdq=rtnData[i]['memo'];
}
}
// aos.get("msg").setValue(cust_name+"您的税控系统服务费即将到期为保证正常使用请微信搜索“河南航天信息”关注公众号点击“服务支持”选择“在线交费”缴费成功即可抽奖科沃斯扫地机器人、小米智能家具套装暖心恒温杯、百元红包等您来拿如有疑问请拨打95113");
aos.get("msg").setValue(cust_name+""+jjdq);
}
},
fail:function (e) {
alert("发生错误!"+e);
}
});
}
function getmobile(){
var getmobile = {};
aos.get('mobile').setValue(aos.get('contact').getValue());
}
var flag = 0 ;
//发送短信功能成功后插入rush_log表。并返回插入数据的id。
function message(){
var msgparam = aos.getForm().getData();
msgparam['msg']=aos.get('msg').getValue();
msgparam['mobile']=aos.get('mobile').getValue();
var mobile = aos.get('mobile').getValue();
if(mobile=='无' || mobile== null || mobile=='' || mobile.length != 11 || mobile.substr(0,1) != '1'){
aos.alert('选中的电话号码不符合要求,不允许发送短信,请选择其它号码,谢谢~');
return;
}
if(flag==0){
aos.post({
url:"rush/call/testSendSMS",
data:msgparam,
success:function(rtnData){
aos.alert('发送成功');
var param = aos.getForm().getData();
param['info']="联系"+aos.get('contact').getValue()+"("+aos.get('mobile').getValue()+");"+"短信内容:"+aos.get('msg').getValue();
param['action']='message';
param['time']='0';
aos.post({
url:"rush/search/insertLog",
data:param,
success:function(rtnData){
CloseWindow(rtnData);
}
});
}
});
}
flag = flag + 1 ;
}
/* var timeoutflag = null;
$('#message').click(function() {
if(timeoutflag != null){
clearTimeout(timeoutflag);
timeoutflag = null;
}
else{
timeoutflag=setTimeout(function(){
// dosomething();//此处是一个会请求远程的ajax 异步操作;
var msgparam = aos.getForm().getData();
msgparam['msg']=aos.get('msg').getValue();
msgparam['mobile']=aos.get('mobile').getValue();
var mobile = aos.get('mobile').getValue();
if(mobile=='无' || mobile== null || mobile=='' || mobile.length != 11 || mobile.substr(0,1) != '1'){
aos.alert('选中的电话号码不符合要求,不允许发送短信,请选择其它号码,谢谢~');
return;
}
aos.post({
url:"rush/call/testSendSMS",
data:msgparam,
success:function(rtnData){
aos.alert('发送成功');
var param = aos.getForm().getData();
param['info']="联系"+aos.get('contact').getValue()+"("+aos.get('mobile').getValue()+");"+"短信内容:"+aos.get('msg').getValue();
param['action']='message';
param['time']='0';
aos.post({
url:"rush/search/insertLog",
data:param,
success:function(rtnData){
CloseWindow(rtnData);
}
});
}
});
},3000);
}
}); */
</script>
</html>