email.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. function email(elid){
  2. $('.mailDetail').hide();
  3. $('.mailAddressee').hide();
  4. //$('.send').hide();
  5. $("#html_"+elid).show();
  6. $("#client_"+elid).show();
  7. //$("#send_"+elid).show();
  8. }
  9. function tabC(a,b){
  10. $('#tab'+a).show();
  11. $('#tab'+b).hide();
  12. }
  13. $(function() {
  14. $("select[node-city]").change(function(){
  15. var id=$(this).val();
  16. var city=$("select[city]");
  17. var url="/ajaxGetLv2";
  18. $.ajax({
  19. url:url,
  20. type: "post",
  21. cache: false,
  22. dataType: "json",
  23. data: {
  24. lv1:id
  25. },
  26. global: true,
  27. success: function(data){
  28. var optionHtml='<option value="ALL">全部</option>';
  29. for(let i=0;i<data.info.length;i++){
  30. optionHtml+='<option value="'+data.info[i]['idKey']+'">'+data.info[i]['name']+'</option>';
  31. console.log(data.info[i]);
  32. }
  33. city.html(optionHtml);
  34. },
  35. error:function(err){
  36. }
  37. });
  38. });
  39. $("a[node-mail]").click(function(){
  40. $(this).attr('disabled',"true");
  41. });
  42. $("#natureNULL").click(function(){
  43. if($("#natureNULL").attr("checked")=='checked'){
  44. $("#natureNULL").val('NULL');
  45. $("input[name='nature[]']").attr("disabled",true);
  46. }else{
  47. $("#natureNULL").val('');
  48. $("input[name='nature[]']").attr("disabled",false);
  49. }
  50. });
  51. $("p[id^='send_']").click(function(){
  52. $(this).html('已发送');
  53. });
  54. $("input[id^='title']").keyup(function(){
  55. $("span[name='titleHtml']").html($(this).val());
  56. });
  57. $("input[id^='inlineradio1']").click(function(){
  58. $("#emailTemplate1").show();
  59. $("#emailTemplate2").hide();
  60. $("#emailTemplate3").hide();
  61. });
  62. $("input[id^='inlineradio2']").click(function(){
  63. $("#emailTemplate1").hide();
  64. $("#emailTemplate2").show();
  65. $("#emailTemplate3").hide();
  66. });
  67. $("input[id^='inlineradio3']").click(function(){
  68. $("#emailTemplate1").hide();
  69. $("#emailTemplate2").hide();
  70. $("#emailTemplate3").show();
  71. });
  72. $("textarea[id^='content']").keyup(function(){
  73. $("p[name='contentHtml']").html($(this).val());
  74. });
  75. $("textarea[id^='content']").charCount({
  76. allowed: 59,
  77. warning: 10,
  78. counterText: '剩余为'
  79. });
  80. })