|
|
@@ -45,15 +45,15 @@ var html =
|
|
45
|
45
|
'<span class="eid" style="display:none"></span>'+
|
|
46
|
46
|
'<div class="con_message">'+
|
|
47
|
47
|
'<span>发件人:</span>'+
|
|
48
|
|
- '<sapn class="cjr"></sapn>'+
|
|
|
48
|
+ '<sapn class="cjr">-</sapn>'+
|
|
49
|
49
|
'<span>邮件地址:</span>'+
|
|
50
|
|
- '<sapn class="wid"></sapn>'+
|
|
|
50
|
+ '<sapn class="wid">-</sapn>'+
|
|
51
|
51
|
'<span>日期:</span>'+
|
|
52
|
|
- '<sapn class="time"></sapn>'+
|
|
|
52
|
+ '<sapn class="time">-</sapn>'+
|
|
53
|
53
|
'</div>'+
|
|
54
|
54
|
'<table class="con_content table table-striped table-hover">'+
|
|
55
|
55
|
'<tr style="background-color: #fff;">'+
|
|
56
|
|
- '<td class="contentDetail">'+
|
|
|
56
|
+ '<td class="contentDetail" style="border-top: none;text-indent: 2em;">'+
|
|
57
|
57
|
'</td>'+
|
|
58
|
58
|
'</tr>'+
|
|
59
|
59
|
'<tr style="background-color: #f3f3f4;">'+
|
|
|
@@ -77,37 +77,83 @@ var tc;
|
|
77
|
77
|
function emailDetail(val,row){
|
|
78
|
78
|
return '<div class="lookEmail"><a onclick="look(\''+row.E_EmailId+'\')" title="查看详情"><i class="fa fa-navicon" style="margin-right:2px;"></i>详情</a></div>'
|
|
79
|
79
|
}
|
|
80
|
|
-
|
|
81
|
|
-
|
|
|
80
|
+//通过现有的接口遍历 查看详情
|
|
82
|
81
|
function look(str){
|
|
83
|
|
- $.getJSON(huayi.config.callcenter_url + "EmailSend/GetEmailInfoById", {
|
|
84
|
|
- uid: str,
|
|
|
82
|
+ $.getJSON(huayi.config.callcenter_url + "EmailSend/GetEmailMessage", {
|
|
85
|
83
|
token: $.cookie("token")
|
|
86
|
84
|
}, function(result) {
|
|
87
|
|
- var con = result.data;
|
|
88
|
|
- if(result.state.toLowerCase() == "success") {
|
|
89
|
|
- tc = layer.open({
|
|
90
|
|
- type: 1,
|
|
91
|
|
- title: '邮件详情',
|
|
92
|
|
- area: ['70%', '80%'], //宽高
|
|
93
|
|
- content: html
|
|
94
|
|
- });
|
|
95
|
|
- $('.eid').html(con.E_EmailId);
|
|
96
|
|
- $('.con_title').html(con.E_Title);
|
|
97
|
|
- $('.cjr').html(con.E_Email);
|
|
98
|
|
- $('.wid').html(con.E_Address);
|
|
99
|
|
- $('.time').html(con.E_EmailTime);
|
|
100
|
|
- $('.contentDetail').html(con.E_Content);
|
|
101
|
|
- $('.contentUrl p').html(con.E_AttachmentsUrl);
|
|
102
|
|
- if(con.E_IsAudit == 1){
|
|
103
|
|
- $('.addEmail').show(); //添加按钮
|
|
104
|
|
- }else{
|
|
105
|
|
- $('.auditing').show(); //审核按钮
|
|
|
85
|
+ var con = result.rows;
|
|
|
86
|
+ if(con.length > 0){
|
|
|
87
|
+ // console.log(con);
|
|
|
88
|
+ // console.log(con[0].E_EmailId);
|
|
|
89
|
+ for(var i = 0; i < con.length; i++){
|
|
|
90
|
+ if(str == con[i].E_EmailId){
|
|
|
91
|
+ tc = layer.open({
|
|
|
92
|
+ type: 1,
|
|
|
93
|
+ title: '邮件详情',
|
|
|
94
|
+ area: ['70%', '80%'], //宽高
|
|
|
95
|
+ content: html
|
|
|
96
|
+ });
|
|
|
97
|
+ $('.eid').html(con[i].E_EmailId);
|
|
|
98
|
+ $('.con_title').html(con[i].E_Title);
|
|
|
99
|
+ $('.cjr').html(con[i].E_Email);
|
|
|
100
|
+ $('.wid').html(con[i].E_Address);
|
|
|
101
|
+ $('.time').html(con[i].E_EmailTime);
|
|
|
102
|
+
|
|
|
103
|
+ $('.contentDetail').html(con[i].E_Content);
|
|
|
104
|
+ if($('.contentDetail').html() == ' '){
|
|
|
105
|
+ $('.contentDetail').html('邮件内容为空。');
|
|
|
106
|
+ }
|
|
|
107
|
+
|
|
|
108
|
+ $('.contentUrl p').html(con[i].E_AttachmentsUrl);
|
|
|
109
|
+ if(!$('.contentUrl p').html()){
|
|
|
110
|
+ $('.contentUrl p').html('没有附件。');
|
|
|
111
|
+ }
|
|
|
112
|
+
|
|
|
113
|
+ if(con[i].E_IsAudit == 1){
|
|
|
114
|
+ $('.addEmail').show(); //添加按钮
|
|
|
115
|
+ }else{
|
|
|
116
|
+ $('.auditing').show(); //审核按钮
|
|
|
117
|
+ }
|
|
|
118
|
+ }
|
|
106
|
119
|
}
|
|
107
|
120
|
}
|
|
108
|
121
|
})
|
|
109
|
122
|
}
|
|
110
|
123
|
|
|
|
124
|
+
|
|
|
125
|
+
|
|
|
126
|
+
|
|
|
127
|
+//通过新的接口 获取邮件信息列表
|
|
|
128
|
+//function look(str){
|
|
|
129
|
+// $.getJSON(huayi.config.callcenter_url + "EmailSend/GetEmailInfoById", {
|
|
|
130
|
+// uid: str,
|
|
|
131
|
+// token: $.cookie("token")
|
|
|
132
|
+// }, function(result) {
|
|
|
133
|
+// var con = result.data;
|
|
|
134
|
+// if(result.state.toLowerCase() == "success") {
|
|
|
135
|
+// tc = layer.open({
|
|
|
136
|
+// type: 1,
|
|
|
137
|
+// title: '邮件详情',
|
|
|
138
|
+// area: ['70%', '80%'], //宽高
|
|
|
139
|
+// content: html
|
|
|
140
|
+// });
|
|
|
141
|
+// $('.eid').html(con.E_EmailId);
|
|
|
142
|
+// $('.con_title').html(con.E_Title);
|
|
|
143
|
+// $('.cjr').html(con.E_Email);
|
|
|
144
|
+// $('.wid').html(con.E_Address);
|
|
|
145
|
+// $('.time').html(con.E_EmailTime);
|
|
|
146
|
+// $('.contentDetail').html(con.E_Content);
|
|
|
147
|
+// $('.contentUrl p').html(con.E_AttachmentsUrl);
|
|
|
148
|
+// if(con.E_IsAudit == 1){
|
|
|
149
|
+// $('.addEmail').show(); //添加按钮
|
|
|
150
|
+// }else{
|
|
|
151
|
+// $('.auditing').show(); //审核按钮
|
|
|
152
|
+// }
|
|
|
153
|
+// }
|
|
|
154
|
+// })
|
|
|
155
|
+//}
|
|
|
156
|
+
|
|
111
|
157
|
//审核
|
|
112
|
158
|
$(document).on('click','.auditing',function(){
|
|
113
|
159
|
$.post(huayi.config.callcenter_url + "EmailSend/IsAudit", {
|
|
|
@@ -118,7 +164,6 @@ $(document).on('click','.auditing',function(){
|
|
118
|
164
|
E_Content: $('.contentDetail').html(),
|
|
119
|
165
|
token: $.cookie("token")
|
|
120
|
166
|
}, function(result) {
|
|
121
|
|
- var con = result.data;
|
|
122
|
167
|
if(result.state.toLowerCase() == "success") {
|
|
123
|
168
|
layer.msg("审核成功");
|
|
124
|
169
|
$('.auditing').hide();
|
|
|
@@ -137,7 +182,7 @@ $(document).on('click','.addEmail',function(){
|
|
137
|
182
|
content: $('.contentDetail').html(),
|
|
138
|
183
|
token: $.cookie("token")
|
|
139
|
184
|
}, function(result) {
|
|
140
|
|
- var con = result.data;
|
|
|
185
|
+ console.log(result);
|
|
141
|
186
|
if(result.state.toLowerCase() == "success") {
|
|
142
|
187
|
layer.msg("添加成功");
|
|
143
|
188
|
$('.addEmail').hide();
|