d123 vor 8 Jahren
Ursprung
Commit
2dfd917cf8

+ 216 - 0
CallCenterWeb.UI/Test/Webup.html

@@ -0,0 +1,216 @@
1
+<!doctype html>
2
+<html lang="en" class="feedback">
3
+
4
+	<head>
5
+		<meta charset="UTF-8" />
6
+		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
7
+		<title>信息上传</title>
8
+		<link rel="stylesheet" type="text/css" href="css/mui.min.css" />
9
+		<link rel="stylesheet" href="css/webuploader.css" />
10
+		<link rel="stylesheet" type="text/css" href="css/Common.css" />
11
+		<style>
12
+
13
+		</style>
14
+	</head>
15
+
16
+	<body>
17
+		<div class="mui-content">
18
+			<div class="row mui-input-row">
19
+				<textarea id='question' class="mui-input-clear question" placeholder="请详细描述你的问题和意见..."></textarea>
20
+			</div>
21
+			<div id='image-list' class="row image-list">
22
+				<div id="filePicker">
23
+				</div>
24
+			</div>
25
+			<div class="row image-list">
26
+
27
+			</div>
28
+			<form class="mui-input-group" method="post" enctype="multipart/form-data" id="uploadForm">
29
+
30
+				<div class="mui-input-row">
31
+					<label>联系人:</label>
32
+					<input type="text" class="mui-input-clear" id="Username" placeholder="">
33
+				</div>
34
+				<div class="mui-input-row">
35
+					<label>联系电话:</label>
36
+					<input type="text" class="mui-input-clear" id="Phone" placeholder="">
37
+				</div>
38
+
39
+			</form>
40
+			<div class="mui-button-row" id="Btns-box">
41
+				<button type="button" id="submit" class="mui-btn mui-btn-primary" onclick="return false;">提交</button>&nbsp;&nbsp;
42
+			</div>
43
+		</div>
44
+		<script src="js/jquery.min.js"></script>
45
+		<script src="js/mui.min.js"></script>
46
+		<script src="js/webuploader.min.js"></script>
47
+		<!--<script src="../js/feedback-page.js" type="text/javascript" charset="utf-8"></script>-->
48
+
49
+		<script type="text/javascript">
50
+			mui.init();
51
+			var files;
52
+			var Str;
53
+			var str_ary;
54
+			var reg = /,$/gi;
55
+			$("#submit").on('tap', function() {
56
+				$(".image-item ").each(function(i, n) {
57
+					var a = $(this).find('.image-box ').attr("indexs");
58
+					Str += a + ',';
59
+					console.log(Str);
60
+					str_ary = Str.split("ed")[1];
61
+					files = Str.split("ed")[1].substring(0, str_ary.length - 7).replace(reg, "");
62
+				})
63
+				console.log(files);
64
+				if(!$("#question").val()) {
65
+					mui.toast("工单内容不能为空");
66
+				} else {
67
+					$.ajax({
68
+						type: "post",
69
+						url: huayi.config.callcenter_url + 'WxLogin/AddWorkOrder',
70
+						async: true,
71
+						dataType: 'json',
72
+						data: {
73
+							cusname: $("#Username").val(), //联系人
74
+							cusphone: $("#Phone").val(), //联系电话
75
+							content: $("#question").val(), //信息内容
76
+							files: files,
77
+							openid: openid //微信openid
78
+						},
79
+						success: function(data) {
80
+							if(data.state == "success") {
81
+								Clean();
82
+								mui.toast("添加成功");
83
+
84
+								location.href = "WorkList.html";
85
+							} else {
86
+								mui.alert(data.message);
87
+							}
88
+						}
89
+					});
90
+				}
91
+
92
+			})
93
+
94
+			function Clean() {
95
+				$("#Username").val('');
96
+				$("#Phone").val('');
97
+				$("#question").val('');
98
+			}
99
+
100
+			// 图片上传demo
101
+			 var applicationPath = window.applicationPath === "" ? "" : window.applicationPath || "../../";
102
+		   var $=jQuery;
103
+				var $ = jQuery,
104
+					$list = $('#image-list'),
105
+					// 优化retina, 在retina下这个值是2
106
+					ratio = window.devicePixelRatio || 1,
107
+
108
+					// 缩略图大小
109
+					thumbnailWidth = 50 * ratio,
110
+					thumbnailHeight = 50 * ratio,
111
+
112
+					// Web Uploader实例
113
+					uploader;
114
+
115
+				// 初始化Web Uploader
116
+				$(function(){
117
+					
118
+				uploader = WebUploader.create({
119
+
120
+					// 自动上传。
121
+					auto: true,
122
+					// swf文件路径
123
+					swf: '../js/Uploader.swf',
124
+
125
+					// 文件接收服务端。
126
+					//					server: 'http://192.168.4.18:4120/WxLogin/UpdateFile',
127
+					server: 'http://192.168.4.18:4120/WxLogin/UpLoadProcess',
128
+
129
+					// 选择文件的按钮。可选。
130
+					// 内部根据当前运行是创建,可能是input元素,也可能是flash.
131
+					pick: '#filePicker',
132
+					// 图片数量限制
133
+					fileNumLimit: 4,
134
+					// 只允许选择文件,可选。
135
+					accept: {
136
+						title: 'Images',
137
+						extensions: 'gif,jpg,jpeg,bmp,png',
138
+						mimeTypes: 'image/*'
139
+					}
140
+				});
141
+				//上传图片提示
142
+				uploader.on('error', function(handler) {
143
+					if(handler == "Q_EXCEED_NUM_LIMIT") {
144
+						mui.toast("超出最大张数");
145
+					}
146
+				});
147
+				// 当有文件添加进来的时候
148
+				uploader.on('fileQueued', function(file) {
149
+					var $li = $(
150
+							'<div id="' + file.id + '" class="file-item thumbnail">' +
151
+							'<div class="image-close">X</div>' +
152
+							'<img>' +
153
+							'<div class="info">' + file.name + '</div>' +
154
+							'</div>'
155
+						),
156
+						$img = $li.find('img');
157
+
158
+					$list.prepend($li);
159
+					$(".image-close").on('tap', function() {
160
+						$(this).parent().remove();
161
+					});
162
+					// 创建缩略图
163
+					uploader.makeThumb(file, function(error, src) {
164
+						if(error) {
165
+							$img.replaceWith('<span>不能预览</span>');
166
+							return;
167
+						}
168
+
169
+						$img.attr('src', src);
170
+					}, thumbnailWidth, thumbnailHeight);
171
+				});
172
+
173
+				// 文件上传过程中创建进度条实时显示。
174
+				uploader.on('uploadProgress', function(file, percentage) {
175
+					var $li = $('#' + file.id),
176
+						$percent = $li.find('.progress span');
177
+
178
+					// 避免重复创建
179
+					if(!$percent.length) {
180
+						$percent = $('<p class="progress"><span></span></p>')
181
+							.appendTo($li)
182
+							.find('span');
183
+					}
184
+
185
+					$percent.css('width', percentage * 100 + '%');
186
+				});
187
+
188
+				// 文件上传成功,给item添加成功class, 用样式标记上传成功。
189
+				uploader.on('uploadSuccess', function(file, response) {
190
+					console.log(response);
191
+					$('#' + file.id).addClass('upload-state-done');
192
+				});
193
+
194
+				// 文件上传失败,现实上传出错。
195
+				uploader.on('uploadError', function(file) {
196
+					var $li = $('#' + file.id),
197
+						$error = $li.find('div.error');
198
+
199
+					// 避免重复创建
200
+					if(!$error.length) {
201
+						$error = $('<div class="error"></div>').appendTo($li);
202
+					}
203
+
204
+					$error.text('上传失败');
205
+				});
206
+
207
+				// 完成上传完了,成功或者失败,先删除进度条。
208
+				uploader.on('uploadComplete', function(file) {
209
+					$('#' + file.id).find('.progress').remove();
210
+				});
211
+
212
+	});
213
+		</script>
214
+	</body>
215
+
216
+</html>

+ 76 - 0
CallCenterWeb.UI/Test/css/Common.css

@@ -0,0 +1,76 @@
1
+/*通过CSS/
2
+ */
3
+
4
+.mui-pull-left{
5
+	color: #fff!important;
6
+}
7
+.mui-pull-right,.mui-title{
8
+	color: #fff;
9
+}body{
10
+	background-color: #fff!important;
11
+}
12
+#Btns-box{
13
+background-color: #fff!important;
14
+padding-top: 50px;
15
+text-align: -webkit-auto;
16
+}
17
+#submit{
18
+	border: 1px solid #2f4050;
19
+    background-color: #2f4050;
20
+        padding: 10px 30px;
21
+}
22
+#u_code{
23
+	float: none;
24
+	width: 35%;
25
+}
26
+#get_code{
27
+	background-color: #007aff;
28
+    padding: 5px 10px;
29
+    color: #fff;
30
+    border-radius: 5px;
31
+    font-size: 15px;
32
+}
33
+.mui-segmented-control.mui-segmented-control-inverted~.mui-slider-progress-bar{
34
+	background-color:#57cebf!important;
35
+}
36
+.mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active{
37
+color:#57cebf!important;
38
+}
39
+.mui-slider-indicator.mui-segmented-control{
40
+	background-color:#fff ;
41
+}
42
+.mui-grid-view.mui-grid-9 {
43
+    margin: 0;
44
+    padding: 0;
45
+    /* border-top: 1px solid #eee; */
46
+    /* border-left: 1px solid #eee; */
47
+    background-color: #fff;
48
+}
49
+.mui-grid-view.mui-grid-9 .mui-table-view-cell {
50
+    margin: 0;
51
+    padding: 11px 15px;
52
+    vertical-align: top;
53
+    border: none;
54
+}
55
+.mui-grid-bottom{
56
+	height: 2px;
57
+    background-color: #57cebf;
58
+    display: block;
59
+    width: 20px;
60
+    margin: 0 auto;
61
+}
62
+.size-20{
63
+	font-size: 30px;
64
+}
65
+.size-14{
66
+	font-size: 12px!important;
67
+}
68
+.mui-grid-view.mui-grid-9 .mui-table-view-cell{
69
+	margin: 20px 0;
70
+}
71
+.mui-grid-view.mui-grid-9{
72
+	border-top: none;
73
+}
74
+.mui-slider .mui-segmented-control.mui-segmented-control-inverted~.mui-slider-group .mui-slider-item{
75
+	border-bottom:none;
76
+}

+ 112 - 0
CallCenterWeb.UI/Test/css/WorkSeach.css

@@ -0,0 +1,112 @@
1
+body{
2
+				font-size: 14px;
3
+			}
4
+			input{
5
+				font-size: 14px;
6
+			}
7
+.mui-bar-popover {
8
+				width: 30%;
9
+			}
10
+			
11
+			.mui-popover.mui-bar-popover .mui-table-view {
12
+				width: 100%;
13
+			}
14
+			
15
+			.mui-table-view .mui-table-view-cell>a:not(.mui-btn) {
16
+				text-align: center;
17
+			}
18
+			
19
+			.mui-table-view-cell {
20
+				padding: 1px 15px!important;
21
+			}
22
+			
23
+			.san {
24
+				font-size: 14px;
25
+				margin-right: 5px
26
+			}
27
+			
28
+			.nav_a {
29
+				border-right: 1px solid #ccc;
30
+			}
31
+			
32
+			.radio_box {
33
+				display: inline-block;
34
+			}
35
+			
36
+			.mui-radio input[type=radio]:before {
37
+				font-size: 20px;
38
+				vertical-align: middle;
39
+			}
40
+			
41
+			.mui-radio.mui-left input[type=radio] {
42
+				line-height: 24px!important;
43
+			}
44
+			
45
+			.mui-radio.mui-left label {
46
+				padding-right: 1px!important;
47
+				padding-left: 51px!important;
48
+			}
49
+			
50
+			.ztext {
51
+				width: 100%;
52
+				margin: 0;
53
+				border: 0;
54
+			}
55
+			
56
+			.action {
57
+				padding: 5px 15px;
58
+			}
59
+			
60
+			.type_down {
61
+				float: right!important;
62
+				display: inline-block!important;
63
+				vertical-align: middle!important;
64
+				line-height: 42px;
65
+			}
66
+			
67
+			.type_con {
68
+				width: 55%!important;
69
+				float: left!important;
70
+				vertical-align: middle!important;
71
+				display: inline-block!important;
72
+				padding: 10px 0!important;
73
+			}
74
+			
75
+			.label {
76
+				width: 30%!important;
77
+				padding: 11px 0px!important;
78
+			}
79
+			
80
+			.get_yzm {
81
+				padding: 5px!important;
82
+				width: auto!important;
83
+			}
84
+			
85
+			.yzm_con {
86
+				float: left!important;
87
+				width: 40%!important;
88
+			}
89
+			
90
+			.mui-bar-nav {
91
+				background-color: #00a1cb;
92
+			}
93
+			
94
+			.mui-input-row label {
95
+				text-align: -webkit-right;
96
+			}
97
+			
98
+			.mui-btn-block {
99
+				padding: 10px;
100
+				width: 100%;
101
+			}
102
+			
103
+			.mui-title {
104
+				color: #fff;
105
+			}
106
+			.mui-icon{
107
+				font-size: 18px!important;
108
+				color: #ccc;
109
+			}
110
+			.mui-select{
111
+				font-size: 14px!important;
112
+			}

Datei-Diff unterdrückt, da er zu groß ist
+ 4672 - 0
CallCenterWeb.UI/Test/css/mui.min.css


+ 107 - 0
CallCenterWeb.UI/Test/css/webuploader.css

@@ -0,0 +1,107 @@
1
+.webuploader-container {
2
+	position: relative;
3
+}
4
+
5
+.webuploader-element-invisible {
6
+	position: absolute !important;
7
+	clip: rect(1px 1px 1px 1px);
8
+	/* IE6, IE7 */
9
+	clip: rect(1px, 1px, 1px, 1px);
10
+}
11
+
12
+.webuploader-pick {
13
+	position: relative;
14
+	display: inline-block;
15
+	cursor: pointer;
16
+	padding: 10px 15px;
17
+	color: #fff;
18
+	text-align: center;
19
+	border-radius: 3px;
20
+	overflow: hidden;
21
+}
22
+
23
+.webuploader-pick-disable {
24
+	opacity: 0.6;
25
+	pointer-events: none;
26
+}
27
+
28
+#filePicker {
29
+	width: 75px;
30
+	height: 75px;
31
+	background-image: url(../images/iconfont-tianjia.png);
32
+	background-size: 100% 100%;
33
+	display: inline-block;
34
+	position: relative;
35
+	border-radius: 5px;
36
+	margin: 0 10px 10px;
37
+}
38
+
39
+
40
+/*样式*/
41
+
42
+.thumbnail {
43
+	width: 75px;
44
+	height: 75px;
45
+	background-color: #fff;
46
+	border: 1px solid #ddd;
47
+	border-radius: 4px;
48
+}
49
+
50
+.file-item {
51
+	float: left;
52
+	position: relative;
53
+	margin: 0 10px 10px;
54
+	padding: 4px;
55
+}
56
+
57
+.thumbnail img {
58
+	width: 100%;
59
+}
60
+
61
+.file-item .error {
62
+	position: absolute;
63
+	top: 4px;
64
+	left: 4px;
65
+	right: 4px;
66
+	background: red;
67
+	color: white;
68
+	text-align: center;
69
+	height: 20px;
70
+	font-size: 14px;
71
+	line-height: 23px;
72
+}
73
+
74
+.file-item .info {
75
+	position: absolute;
76
+	left: 4px;
77
+	bottom: 4px;
78
+	right: 4px;
79
+	height: 20px;
80
+	line-height: 20px;
81
+	text-indent: 5px;
82
+	background: rgba(0, 0, 0, 0.6);
83
+	color: white;
84
+	overflow: hidden;
85
+	white-space: nowrap;
86
+	text-overflow: ellipsis;
87
+	font-size: 12px;
88
+	z-index: 10;
89
+}
90
+
91
+.image-close {
92
+	position: absolute;
93
+	display: inline-block;
94
+	right: -6px;
95
+	top: -6px;
96
+	width: 20px;
97
+	height: 20px;
98
+	text-align: center;
99
+	line-height: 20px;
100
+	border-radius: 12px;
101
+	background-color: #FF5053;
102
+	color: #f3f3f3;
103
+	border: solid 1px #FF5053;
104
+	font-size: 9px;
105
+	font-weight: 200;
106
+	z-index: 1;
107
+}

BIN
CallCenterWeb.UI/Test/images/iconfont-tianjia.png


BIN
CallCenterWeb.UI/Test/images/qihoo.png


BIN
CallCenterWeb.UI/Test/images/qq.png


BIN
CallCenterWeb.UI/Test/images/sinaweibo.png


BIN
CallCenterWeb.UI/Test/images/user-photo.png


BIN
CallCenterWeb.UI/Test/images/weixin.png


Datei-Diff unterdrückt, da er zu groß ist
+ 4 - 0
CallCenterWeb.UI/Test/js/jquery.min.js


Datei-Diff unterdrückt, da er zu groß ist
+ 9 - 0
CallCenterWeb.UI/Test/js/mui.min.js


Datei-Diff unterdrückt, da er zu groß ist
+ 2517 - 0
CallCenterWeb.UI/Test/js/webuploader.min.js