瀏覽代碼

修改126邮箱页面样式和查看详情的方法;

fanlongfei 8 年之前
父節點
當前提交
8070ac0c8a
共有 2 個文件被更改,包括 71 次插入14 次删除
  1. 6 9
      WebUI/CallCenterWeb.UI/WebSite/email.html
  2. 65 5
      WebUI/CallCenterWeb.UI/js/email.js

+ 6 - 9
WebUI/CallCenterWeb.UI/WebSite/email.html

@@ -10,10 +10,7 @@
10 10
     <script src="../Script/Common/huayi.config.js"></script>
11 11
 	<script src="../css/laydate/laydate.js"></script>
12 12
     <style>
13
-        .treeTable {
14
-            height: 400px;
15
-            /*overflow-y: auto;*/
16
-        }
13
+
17 14
         .content {
18 15
             width: 270px;
19 16
             height: 100%;
@@ -24,9 +21,9 @@
24 21
             cursor: pointer;
25 22
         }
26 23
        
27
-	   .mytable {
28
-	            table-layout: fixed;
29
-	        }
24
+	    .mytable {
25
+            table-layout: fixed;
26
+        }
30 27
 	    .mytable tbody tr td {
31 28
 	        overflow: hidden;
32 29
 	        text-overflow: ellipsis;
@@ -111,7 +108,7 @@
111 108
 	               		</div>
112 109
 	               		<!--table-->
113 110
 		               	<div style="width: 100%;padding: 10px;">
114
-		                    <table id="tableEmail0" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
111
+		                    <table class="mytable" id="tableEmail0" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
115 112
 		                        <thead>
116 113
 			                        <tr>
117 114
 										<!--<th data-field="state" data-checkbox="true" data-align="center"></th>  不要删除-->
@@ -154,7 +151,7 @@
154 151
 	               		</div>
155 152
 	               		<!--table-->
156 153
 		                <div style="width: 100%;padding: 10px;">
157
-		                    <table id="tableEmail1" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
154
+		                    <table class="mytable" id="tableEmail1" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
158 155
 		                        <thead>
159 156
                                     <tr>
160 157
 										<!--<th data-field="state" data-checkbox="true" data-align="center"></th>-->

+ 65 - 5
WebUI/CallCenterWeb.UI/js/email.js

@@ -72,8 +72,17 @@ function initTable(tables,type) {
72 72
 			};
73 73
 			return param;
74 74
 		},
75
-		onLoadSuccess: function() { //加载成功时执行
75
+		onLoadSuccess: function(data) { //加载成功时执行
76 76
 			//layer.msg("加载成功");
77
+			var result = data.rows;
78
+            
79
+            if(result){
80
+            	debugger;
81
+            	for(var k = 0; k < result.length; k++){
82
+            	    /*$(document).on('click','.lookEmail_'+index+'_'+k+'',{resultData: result[k]},look);*/
83
+            	    $('.lookEmail_'+index+'_'+k+'').on('click',{resultData: result[k]},look);
84
+            	}	            	
85
+            }
77 86
 		},
78 87
 		onLoadError: function() { //加载失败时执行
79 88
 			//layer.msg("加载数据失败", { time: 1500, icon: 2 });
@@ -81,7 +90,6 @@ function initTable(tables,type) {
81 90
 	});
82 91
 }
83 92
 
84
-
85 93
 var html = 
86 94
 	'<div class="treeTable emailDetail">'+
87 95
 		'<h3 class="con_title"></h3>'+
@@ -117,10 +125,62 @@ var html =
117 125
 	'</div>';
118 126
 var tc;
119 127
 //操作 添加查看详情
120
-function emailDetail(val,row){
121
-	return '<div class="lookEmail"><a onclick="look(\''+row.E_EmailId+'\')" title="查看详情"><i class="fa fa-navicon" style="margin-right:2px;"></i>详情</a></div>'
128
+function emailDetail(val,row,index1){
129
+	/*return '<div class="lookEmail"><a onclick="look(\''+row.E_EmailId+'\')" title="查看详情"><i class="fa fa-navicon" style="margin-right:2px;"></i>详情</a></div>'*/
130
+	return '<div class="lookEmail_'+ index+'_'+index1 +'"><a title="查看详情"><i class="fa fa-navicon" style="margin-right:2px;"></i>详情</a></div>'
122 131
 }
123 132
 //通过现有的接口遍历 查看详情
133
+function look(e){
134
+	var con = e.data.resultData;
135
+	e.stopPropagation();
136
+	e.preventDefault();
137
+	if(con){
138
+		tc = layer.open({
139
+			type: 1,
140
+			title: '邮件详情',
141
+			area: ['70%', '80%'], //宽高
142
+			content: html
143
+		});	
144
+		$('.eid').html(con.E_EmailId);
145
+		$('.con_title').html(con.E_Title);
146
+		$('.cjr').html(con.E_Email);
147
+		$('.wid').html(con.E_Address);
148
+		$('.time').html(con.E_EmailTime);
149
+		$('.contentDetail').html(con.E_Content);
150
+		if($('.contentDetail').html() == ' '){
151
+			$('.contentDetail').html('邮件内容为空。');
152
+		}
153
+		var fUrl = con.E_AttachmentsUrl;
154
+		if(fUrl){
155
+			fUrl = fUrl.split(',');
156
+			for(var j = 0; j < fUrl.length; j++){
157
+				fUrl[j] = fUrl[j].substring(1);
158
+				var fileUrl = huayi.config.callcenter_url + fUrl[j];
159
+				//$('.contentUrl').append('<p class="fieURL" onclick="downloadFile(\''+encodeURI(fileUrl)+'\')">'+fielUrl+'</p>');
160
+				$('.contentUrl').append('<p class="fieURL"><a href="'+fileUrl+'" download="filename">'+fileUrl+'</a></p>');
161
+			}
162
+			
163
+		}else{
164
+			$('.contentUrl p:first-child').html('没有附件。');						
165
+		}
166
+		//先审核,才可以添加工单
167
+		if((con.E_IsWorkOrder == 1) && (con.E_IsAudit == 1)){
168
+			$(".addEmail").attr('disabled',true);  
169
+			$(".auditing").attr('disabled',true);
170
+		}else if((con.E_IsWorkOrder != 1) && (con.E_IsAudit == 1)){
171
+			$(".addEmail").attr('disabled',false);  
172
+			$(".auditing").attr('disabled',true);
173
+		}else if((con.E_IsWorkOrder != 1) && (con.E_IsAudit != 1)){
174
+			$(".addEmail").attr('disabled',true);  
175
+			$(".auditing").attr('disabled',false);
176
+		}	
177
+	}	
178
+}
179
+
180
+
181
+
182
+
183
+/*
124 184
 function look(str){
125 185
 	$.getJSON(huayi.config.callcenter_url + "EmailSend/GetEmailMessageList", {
126 186
 		page: $('.page-number.active a').html(),
@@ -181,7 +241,7 @@ function look(str){
181 241
 	})	
182 242
 }
183 243
 
184
-
244
+*/
185 245
 
186 246
 
187 247
 //通过新的接口 获取邮件信息列表