61678d9d0e2960e73f324e3496a2b52b7faf3746.svn-base 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. $(function(){
  2. //用户所属单位
  3. var getCorp_names = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_names();
  4. $("#SUBMIT_UNIT_750").val(getCorp_names);
  5. //取登录用户信息
  6. var userName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
  7. $("#SUBMIT_PERSION1_750").val(userName);
  8. //获取当前系统时间
  9. $("#SUBMIT_TIME_750").val(getDateTime());
  10. $("#asdf").bind("click",function(){
  11. check(diag);
  12. });
  13. });
  14. //获得当前系统时间:年月日时分秒
  15. function getDateTime(){
  16. var s="";
  17. var d = allGetServerTime();
  18. var vYear = d.getFullYear();
  19. var vMon = d.getMonth() + 1;
  20. var vDay = d.getDate();
  21. var h = d.getHours();
  22. var m = d.getMinutes();
  23. var se = d.getSeconds();
  24. s=vYear+"-"+(vMon<10 ? "0" + vMon : vMon)+"-"+(vDay<10 ? "0"+ vDay : vDay)+" "+(h<10 ? "0"+ h : h)+":"+(m<10 ? "0" + m : m)+":"+(se<10 ? "0" +se : se);
  25. return s;
  26. }
  27. //保存新增文件
  28. function saveForm(){
  29. $("body").eq(0).showLoading();
  30. var formValue = $('#fillForm').serialize(); //序列化表单
  31. var url = $.pathname() + '/ws/crud/CRUDService/create';
  32. $.ajax({
  33. url : url,
  34. type : 'post',
  35. data : formValue,
  36. dataType : 'text',
  37. timeout : 60000,
  38. success : function(data){
  39. $("body").eq(0).hideLoading();
  40. //弹窗的提示及关闭
  41. top.Dialog.alert("提交成功!",function(){
  42. if(top.Dialog || top.Dialog.close){
  43. top.Dialog.close();
  44. }
  45. });
  46. $(top.document.body).find("#main_index_tab").hide();//隐藏顶部的滚动信息
  47. $('#frmright',window.parent.document).attr('src',$.pathname()+'/page/system/questionHuiZong/questionHuiZong_List.jsp');
  48. //$.messager.alert('提交成功');
  49. //window.location.href="questionHuiZong_List.jsp";
  50. //top.Dialog.close();//关闭新增窗口
  51. //g.rend();//刷新页面
  52. },
  53. error : function(){
  54. top.Dialog.alert("操作失败!",function(){
  55. if(top.Dialog || top.Dialog.close){
  56. top.Dialog.close();
  57. }
  58. });
  59. $('frmright,window.parent.document').Attr('src',$.pathname()+'/page/system/questionHuiZong/questionHuiZong_List.jsp');
  60. }
  61. });
  62. }
  63. //附件下载
  64. function download(){
  65. var diag = new top.Dialog();
  66. diag.Title = "附件下载";
  67. diag.Width = "510px";
  68. diag.Height = 390;
  69. diag.URL = "/nwyj/page/system/questionHuiZong/download.jsp";
  70. diag.show();
  71. //弹框的关闭按钮
  72. diag.CancelEvent = function(){
  73. diag.close();
  74. diag=null;
  75. parent.resetWindowSize();
  76. };
  77. }
  78. //下载操作手册
  79. function download1(){
  80. // window.open(url, windowName, windowFeatures, optionalArg4);
  81. // window.open("/nwyj/upload/manual.zip");
  82. // window.location.href="/nwyj/page/system/questionHuiZong/FileDownload.jsp";
  83. // top.Dialog.close();//关闭新增窗口
  84. $(top.document.body).find("#main_index_tab").hide();
  85. $(top.document.body).find("#frmright").attr("src","/nwyj/page/system/questionHuiZong/FileDownload.jsp");
  86. top.Dialog.close();//关闭新增窗口
  87. }
  88. //下载操作视频
  89. function download2(){
  90. // window.open(url, windowName, windowFeatures, optionalArg4);
  91. // window.open("/nwyj/WebContent/page/system/questionHuiZong/TVDownload.jsp");
  92. // top.Dialog.close();//关闭新增窗口
  93. $(top.document.body).find("#main_index_tab").hide();
  94. $(top.document.body).find("#frmright").attr("src","/nwyj/page/system/questionHuiZong/TVDownload.jsp");
  95. top.Dialog.close();//关闭新增窗口
  96. }
  97. //查看历史问题记录
  98. function check(diag){
  99. $(top.document.body).find("#main_index_tab").hide();
  100. $(top.document.body).find("#frmright").attr("src","/nwyj/page/system/questionHuiZong/questionHuiZong_List.jsp");
  101. top.Dialog.close();//关闭新增窗口
  102. }
  103. //常见问题和解决办法
  104. function select(){
  105. $(top.document.body).find("#main_index_tab").hide();
  106. $(top.document.body).find("#frmright").attr("src","/nwyj/page/system/questionHuiZong/questionHuiZong_FAQ.jsp");
  107. top.Dialog.close();//关闭新增窗口
  108. }
  109. //返回
  110. function goBack() {
  111. var url = "/nwyj/page/system/questionHuiZong/questionHuiZong_List.jsp";
  112. window.parent.document.getElementById("frmright").setAttribute("src", ""+encodeURI(url));
  113. }
  114. // $.messager=top.Dialog;