707e50fffbc804f522d932b408fba65af1875407.svn-base 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. //
  2. function updateOperate(url,params){
  3. $.ajax({
  4. url : url,
  5. type : 'post',
  6. timeout : 15000,
  7. async : false,
  8. data : params,
  9. dataType : 'json',
  10. success : function(data) {
  11. },
  12. error : function(e) {
  13. $.messager.alert('保存报表失败!', '访问服务失败!', 'error');
  14. }
  15. });
  16. }
  17. function getThing(url,params,text){
  18. var datas="" ;
  19. if(!text){
  20. text = "json";
  21. }
  22. $.ajax({
  23. url : url,
  24. type : 'post',
  25. timeout : 15000,
  26. async : false,
  27. data : params,
  28. dataType : text,
  29. success : function(data) {
  30. datas = data;
  31. },
  32. error : function(e) {
  33. $.messager.alert('获取消息失败!', '访问服务失败!', 'error');
  34. }
  35. });
  36. return datas;
  37. }
  38. function addRecords(url,params,msg,type,backUrl){
  39. var user_id = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
  40. $("body").eq(0).showLoading();
  41. /*return;*/
  42. $.ajax({
  43. url : url,
  44. type : 'post',
  45. timeout : 300000,
  46. async : false,
  47. data : params,
  48. dataType : 'json',
  49. success : function(data) {
  50. var data11=data;
  51. if(data.Msg.sucsess==true){
  52. if(type!=""&&type!=undefined){
  53. if(type=="save"){
  54. $("body").eq(0).hideLoading();
  55. top.Dialog.alert(msg+"成功");
  56. if(backUrl){
  57. window.parent.document.getElementById("frmright").setAttribute("src", backUrl);
  58. }else{
  59. window.history.go(-1);
  60. }
  61. }else{
  62. var waitdourl = $.pathname() + '/ws/xianlutingyun/XianlutingyunService/WarningTask';
  63. var paramsWaitdo = {
  64. userId : user_id
  65. };
  66. $.ajax({//代办处理
  67. url : waitdourl,
  68. data : paramsWaitdo,
  69. type : 'post',
  70. dataType : 'text',
  71. timeout : 15000,
  72. success : function(data){
  73. $("body").eq(0).hideLoading();
  74. top.Dialog.confirm(msg+"成功,是否发送短信?|是",function(){
  75. var pepData = eval("("+data11.Msg.data+")");
  76. var tel = pepData[0].tel;
  77. var name = pepData[0].name;
  78. addMsg(name,tel,"","2");
  79. },function(){
  80. if(backUrl){
  81. window.parent.document.getElementById("frmright").setAttribute("src", backUrl);
  82. }else{
  83. window.history.go(-1);
  84. }
  85. });
  86. },error : function (e){
  87. top.Dialog.alert('系统错误!');
  88. }
  89. });
  90. }
  91. }else{
  92. $("body").eq(0).hideLoading();
  93. top.Dialog.alert(msg+"成功");
  94. }
  95. }else{
  96. top.Dialog.alert(msg+"失败");
  97. }
  98. },
  99. error : function(e) {
  100. $.messager.alert('保存报表失败!', '访问服务失败!', 'error');
  101. }
  102. });
  103. }
  104. function reportHuizongSend(url,params,msg,type){
  105. var user_id = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
  106. $("body").eq(0).showLoading();
  107. $.ajax({
  108. url : url,
  109. type : 'post',
  110. timeout : 300000,
  111. async : false,
  112. data : params,
  113. dataType : 'json',
  114. success : function(data) {
  115. var data11=data;
  116. if(data.Msg.sucsess==true){
  117. if(type!=""&&type!=undefined){
  118. var waitdourl = $.pathname() + '/ws/xianlutingyun/XianlutingyunService/WarningTask';
  119. var paramsWaitdo = {
  120. userId : user_id
  121. };
  122. $.ajax({//代办处理
  123. url : waitdourl,
  124. data : paramsWaitdo,
  125. type : 'post',
  126. dataType : 'text',
  127. async : false,
  128. timeout : 300000,
  129. success : function(data){
  130. $("body").eq(0).hideLoading();
  131. top.Dialog.confirm(msg+"成功,是否发送短信?|是",function(){
  132. var pepData = eval("("+data11.Msg.data+")");
  133. var tel = pepData[0].tel;
  134. var name = pepData[0].name;
  135. addMsg(name,tel,"","2");
  136. });
  137. },error : function (e){
  138. console.log(data);
  139. top.Dialog.alert('系统错误!');
  140. }
  141. });
  142. }else{
  143. $("body").eq(0).hideLoading();
  144. top.Dialog.alert(msg+"成功");
  145. }
  146. }else{
  147. top.Dialog.alert(msg+"失败");
  148. }
  149. },
  150. error : function(e) {
  151. $.messager.alert('保存报表失败!', '访问服务失败!', 'error');
  152. }
  153. });
  154. }
  155. function addSpeicalRecords(url,params,msg,type,backUrl){
  156. var user_id = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
  157. $("body").eq(0).showLoading();
  158. /*return;*/
  159. $.ajax({
  160. url : url,
  161. type : 'post',
  162. timeout : 300000,
  163. async : false,
  164. data : params,
  165. dataType : 'json',
  166. success : function(data) {
  167. var data11=data;
  168. if(data.Msg.sucsess==true){
  169. if(type!=""&&type!=undefined){
  170. if(type=="save"){
  171. $("body").eq(0).hideLoading();
  172. top.Dialog.alert(msg+"成功");
  173. if(backUrl){
  174. window.parent.document.getElementById("frmright").setAttribute("src", backUrl);
  175. }else{
  176. window.history.go(-1);
  177. }
  178. }else{
  179. var waitdourl = $.pathname() + '/ws/xianlutingyun/XianlutingyunService/WarningTask';
  180. var paramsWaitdo = {
  181. userId : user_id
  182. };
  183. $.ajax({//代办处理
  184. url : waitdourl,
  185. data : paramsWaitdo,
  186. type : 'post',
  187. dataType : 'text',
  188. timeout : 15000,
  189. success : function(data){
  190. $("body").eq(0).hideLoading();
  191. top.Dialog.confirm(msg+"成功,是否发送短信?|是",function(){
  192. var pepData = eval("("+data11.Msg.data+")");
  193. var tel = pepData[0].tel;
  194. var name = pepData[0].name;
  195. addMsg(name,tel,"","1");
  196. },function(){
  197. if(backUrl){
  198. window.parent.document.getElementById("frmright").setAttribute("src", backUrl);
  199. }else{
  200. window.history.go(-1);
  201. }
  202. });
  203. },error : function (e){
  204. top.Dialog.alert('系统错误!');
  205. }
  206. });
  207. }
  208. }else{
  209. $("body").eq(0).hideLoading();
  210. top.Dialog.alert(msg+"成功");
  211. }
  212. }else{
  213. top.Dialog.alert(msg+"失败");
  214. }
  215. },
  216. error : function(e) {
  217. $.messager.alert('保存报表失败!', '访问服务失败!', 'error');
  218. }
  219. });
  220. }
  221. function addQuickRecords(url,params,msg,backUrl){
  222. $("body").eq(0).showLoading();
  223. $.ajax({
  224. url : url,
  225. type : 'post',
  226. timeout : 300000,
  227. data : params,
  228. dataType : 'json',
  229. success : function(data) {
  230. var data11=data;
  231. if(data.Msg.sucsess==true){
  232. $("body").eq(0).hideLoading();
  233. top.Dialog.confirm(msg+"成功,是否发送短信?|是",function(){
  234. var pepData = eval("("+data11.Msg.data+")");
  235. var tel = pepData[0].tel;
  236. var name = pepData[0].name;
  237. addMsg(name,tel,"","2");
  238. },function(){
  239. if(backUrl){
  240. window.parent.document.getElementById("frmright").setAttribute("src", backUrl);
  241. }else{
  242. window.history.go(-1);
  243. }
  244. });
  245. }else{
  246. $("body").eq(0).hideLoading();
  247. top.Dialog.alert(msg+"报表失败");
  248. }
  249. },
  250. error : function(e) {
  251. $.messager.alert('保存报表失败!', '访问服务失败!', 'error');
  252. }
  253. });
  254. }