123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- var realName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
- var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getDeptnames();
- var userId = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
- $(function(){
-
- var msg =top.frmright.$("#reply_content").val();
- $("#msg").val(msg);
- /*var name = parent.frmright.$("#tel").val();*/
- /*$("#msg").val(name);*/
- });
- function reply(){
- $("#msg_content").show();
- $("#send").show();
- $("#rep").hide();
- $("#replys").addClass("validate[required]");
- }
- function cancle(){
- /*$("#msg_content").hide();
- $("#send").hide();
- $("#rep").show();
- $("#replys").removeClass("validate[required]");
- $("#replys").val("");*/
- top.Dialog.confirm("确定不回复吗?|确定",function(){
- $(parent.document.body).find("#_ButtonClose_replyWindow").click();
- });
- }
- function editValidate() {
- var valid = $("#MsgForm").validationEngine({
- returnIsValid : true,
- });
- if(valid==true){
- refer();
- }else{
- top.Dialog.alert("回复内容不能为空");
- }
- }
- function refer(){
- // var patt= /[\\\"\#\%]+/g;
- //var patts = /[]+/g;
- /*if(patt.test($("#replys").val())){
- top.Dialog.alert("不能输入单斜杠、英文双引号、#、%、反斜杠等特殊字符");
- return;
- }*/
- /* else{*/
- /*$("body").eq(0).showLoading();*/
- // var msg1 =$("#replys").val();
- var msg1 = $("#replys").val().replace(/\n/g,'');
- var msg2 = msg1.replace(/\"+/g,'');
- var msg3 = msg2.replace(/\\+/g,'/');
- $.post("/nwyj/ws/sendsms/SendSmsService/saveMessage",{
-
- smsRecTel:parent.frmright.$("#tel").val(),
- smsTime:getTime(),
- smsContent:msg3,
- smsPeople:parent.frmright.$("#name").val(),
- smsSendId:userId,
- /*deptName:deptName,*/
- realName:realName,
- type:"短信回复"
-
- },function(result){
-
- if(result.Msg.sucsess==true){
- /*$("body").eq(0).hideLoading();*/
- top.Dialog.alert("回复成功",null,null,null,null);
- // clear_msg();
- $(parent.document.body).find("#_ButtonClose_replyWindow").click();
- }else{
- top.Dialog.alert("回复失败");
- }
- },'json');
- }
-
- /*}*/
- function getTime(){
-
- var now=allGetServerTime();
- //获取年份
- var year=now.getFullYear();
- //获取月份
- var month=now.getMonth()+1;
- if(month>=1&&month<=9){
- month = "0"+month;
- }
- //获取日期
- var day=now.getDate();
- if(day>=1&&day<=9){
- day = "0"+day;
- }
- //获取小时
- var hours=now.getHours();
- if(hours>=1&&hours<=9){
- hours = "0"+hours;
- }
- //获取分钟
- var minutes=now.getMinutes();
- if(minutes>=1&&minutes<=9){
- minutes = "0"+minutes;
- }
- //获取秒
- var seconds=now.getSeconds();
- if(seconds>=1&&seconds<=9){
- seconds = "0"+seconds;
- }
- var currentTime =year+"-"+month+"-"+day+" "+hours+":"+minutes+":"+seconds;
- return currentTime;
- }
|