Kaynağa Gözat

自定义字段 客户列表

zhangshuangnan 8 yıl önce
ebeveyn
işleme
d6d898f4ee

+ 4 - 21
CallCenterWeb.UI/huJiaoManger/CustomerField.html

@@ -69,35 +69,18 @@
69 69
                 <sapn>
70 70
                     <i class="syIcon"></i>位置:
71 71
                     <a id="ReIndex" href="javaScript:;">首页</a>&gt;
72
-                    <a href="javaScript:;">外呼管理</a>&gt;
73
-                    <a href="javaScript:;">点击外呼管理</a>&gt;
72
+                    <a href="javaScript:;">系统管理</a>&gt;
73
+                    <a href="javaScript:;">系统设置</a>&gt;
74 74
                     <a href="javaScript:;" style="color: #000;">自定义字段列表</a>
75 75
                 </sapn>
76 76
             </div>
77 77
         </div>
78 78
         <div class="wrapper wrapper-content animated ">
79 79
 
80
-            <div class="th-box">
80
+            <!--<div class="th-box">
81 81
                 <div class="th-bar">
82
-                    <!--<div class="seach-box fl">
83
-                        <ul style="padding-left: 0;">
84
-                            <li>
85
-                                类型:
86
-                                <select class="TYpe" type="text" id="tel">
87
-                                    <option value="">所有类型</option>
88
-                                    <option value="nvarchar">文本</option>
89
-                                    <option value="int">整数</option>
90
-                                    <option value="datetime">日期</option>
91
-                                </select>
92
-                            </li>
93
-
94
-                            <li>
95
-                                <a class="sc_btn  Block" id="sc_btns">搜索</a>
96
-                            </li>
97
-                        </ul>
98
-                    </div>-->
99 82
                 </div>
100
-            </div>
83
+            </div>-->
101 84
             <div class="clearFix">
102 85
 
103 86
                 <div style="width: 30%;padding: 10px; float: left;">

+ 29 - 6
CallCenterWeb.UI/keHuManager/customerList.html

@@ -158,9 +158,14 @@
158 158
         .ysc {
159 159
             background: #ef2e18;
160 160
         }
161
+        .layui-layer-title{
162
+        	color: #fff!important;
163
+        	background:  #019587!important;
164
+        }
161 165
     </style>
162 166
 </head>
163 167
 <body>
168
+	<form class="container-fluid" enctype="multipart/form-data">
164 169
     <div class="container-fluid">
165 170
         <div class="daoHang clearfix">
166 171
             <div class="dhLeft">
@@ -182,18 +187,20 @@
182 187
                 </div>-->
183 188
             </div>
184 189
             <div class="anniu" style="margin: 20px 0;">
185
-                <button class="btns search"><i class="fa fa-search"></i>查询</button>
186
-                <!--<button class="btns"><i class="fa fa-sign-in"></i>导出</button>-->
190
+                <button class="btns search" type="button"><i class="fa fa-search"></i>查询</button>
191
+                <a class="btns" id="addto"><i class="fa fa-plus"></i>添加</a>
187 192
             </div>
188 193
             <table class="layui-hide" id="table1" lay-filter="demo"></table>
189 194
         </div>
190 195
     </div>
196
+   </form>
191 197
     <script type="text/html" id="barDemo">
192 198
 		  <!--<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>-->
193 199
 		  <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
194 200
 		  <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
195 201
 	</script>
196 202
     <script src="../js/layui/layui.js"></script>
203
+    <script src="../js/jquery.form.min.js"></script>
197 204
     <script>
198 205
         var sear;
199 206
         var token = $.cookie("token");
@@ -202,8 +209,18 @@
202 209
         $('.search').click(function () {
203 210
             initTable();
204 211
         });
205
-
206
-                initTable()
212
+ 		//添加
213
+        $('#addto').click(function () {
214
+//         top.$("iframe:visible")[0].src = "keHuManager/customerListAdd.html";
215
+			layer.open({
216
+				type: 2,
217
+				content: "../keHuManager/customerListAdd.html", //iframe的url,no代表不显示滚动条
218
+				title: '客户列表添加',
219
+				area: ['75%', '80%'], //宽高
220
+			});
221
+        });
222
+ 
223
+        initTable()
207 224
         function initTable() {
208 225
             var colsData = [];
209 226
             var arrData = [];
@@ -299,14 +316,20 @@
299 316
 					        		if(res.state.toLowerCase()=='success'){
300 317
 					        			  layer.close(index);
301 318
 					        			  layer.msg('删除成功!');
319
+					        			   initTable();
302 320
 					        		}
303 321
 					        		
304 322
 					        	}
305 323
 					        });
306
-					      
307 324
 					      });
308 325
 					    } else if(obj.event === 'edit'){
309
-					      layer.alert('编辑行:<br>'+ JSON.stringify(data))
326
+						    	layer.open({
327
+										type: 2,
328
+										content: "../keHuManager/customerListEdit.html?id="+data.id, //iframe的url,no代表不显示滚动条
329
+										title: '客户列表修改',
330
+										area: ['75%', '80%'], //宽高
331
+								});
332
+//					      layer.alert('编辑行:<br>'+ JSON.stringify(data))
310 333
 					    }
311 334
 				  });
312 335
          });

+ 242 - 0
CallCenterWeb.UI/keHuManager/customerListAdd.html

@@ -0,0 +1,242 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<script src="../Script/Common/huayi.load.js"></script>
7
+		<script src="../Script/Common/huayi.http.js"></script>
8
+		<script src="../Script/Common/huayi.config.js"></script>
9
+		<link rel="stylesheet" href="../css/jquery-ui.css" />
10
+		<link rel="stylesheet" href="../css/tpkerjqui.css" />
11
+		<link rel="stylesheet" href="../css/timePicker.css" />
12
+		<link rel="stylesheet" href="../css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css">
13
+		<link rel="stylesheet" href="../css/stty.css" />
14
+		<link rel="stylesheet" href="../css/init.css" />
15
+		<link rel="stylesheet" type="text/css" href="../js/bootstrap-treeview/bootstrap-treeview.min.css" />
16
+		<title>添加任务</title>
17
+		<style>
18
+			.page-title {
19
+				padding: 0px;
20
+				font-size: 16px;
21
+				font-weight: bold;
22
+				letter-spacing: -1px;
23
+				display: block;
24
+				color: #1570A6;
25
+				margin: 20px 0px 15px 0px;
26
+			}
27
+			
28
+			hr {
29
+				margin: 20px 0;
30
+				border: 0;
31
+				border-top: 1px solid #E0DFDF;
32
+				border-bottom: 1px solid #FEFEFE;
33
+			}
34
+			.bjCon {
35
+				padding-top: 20px;
36
+				/*border: 1px solid #e5e5e5;
37
+				border-top: 0;*/
38
+			}
39
+			
40
+			.bjright table td input {
41
+				padding-left: 30px;
42
+			}
43
+			
44
+			.tub {
45
+				position: absolute;
46
+				left: 18px;
47
+				top: 13px;
48
+				font-size: 18px;
49
+				color: #ccc;
50
+			}
51
+			
52
+			.ui-datepicker.ui-widget-content {
53
+				background: none !important;
54
+				background-color: #eee !important;
55
+			}
56
+			
57
+			.ui-widget-header .ui-icon {
58
+				background-image: url(../img/ui-icons_444444_256x240.png) !important;
59
+			}
60
+			
61
+			.box {
62
+				width: 55%;
63
+				margin: 0 auto;
64
+				margin-top: 5%;
65
+			}
66
+			
67
+			.box .btop {
68
+				height: 35px;
69
+				background: #1ab394;
70
+				color: #fff;
71
+				line-height: 35px;
72
+				padding: 0 15px;
73
+				/* margin-bottom: 15px; */
74
+			}
75
+			
76
+			.btl {
77
+				float: left;
78
+				margin: 0;
79
+			}
80
+			
81
+			.btr {
82
+				float: right;
83
+				margin: 0;
84
+				cursor: pointer;
85
+			}
86
+			
87
+			.boxCon {
88
+				width: 100%;
89
+				min-height: 400px;
90
+				background: #fff;
91
+				text-align: center;
92
+				padding: 10px 15px;
93
+				height: auto;
94
+				overflow-y: scroll;
95
+			}
96
+			.select_ {
97
+				width: 150px;
98
+				background-color: #FFF;
99
+				background-image: none;
100
+				border: 1px solid #ccc;
101
+				border-radius: 1px;
102
+				color: inherit;
103
+				padding: 6px 12px;
104
+				outline: none;
105
+				vertical-align: middle;
106
+				margin-top: 20px;
107
+				margin-right: 20px;
108
+			}
109
+			   .tool {
110
+            margin: 20px 0;
111
+        }
112
+
113
+        .searchbox input {
114
+            width: 99%;
115
+            height: 98%;
116
+            border: 0;
117
+            outline: none;
118
+            padding-left: 10px;
119
+        }
120
+
121
+        .secon {
122
+            width: 100%;
123
+            height: 34px;
124
+            margin-bottom: 15px;
125
+        }
126
+
127
+        .secl {
128
+            width: 65%;
129
+            display: inline-block;
130
+            height: 100%;
131
+            margin: 0;
132
+            border: 1px solid #eee;
133
+        }
134
+			
135
+		
136
+		</style>
137
+	</head>
138
+	<body>
139
+		<form class="container-fluid" enctype="multipart/form-data">
140
+			<div class="row-fluid clearfix">
141
+				 <div class="tool clearfix">
142
+	                <div class="searchbox col-sm-2">
143
+	                    <div class="secon">
144
+	                        <b>号码:</b>
145
+	                        <p class="secl"><input type="text" placeholder="号码" class="phone" /></p>
146
+	                    </div>
147
+	                </div>
148
+            </div>
149
+			</div>
150
+			<p style="text-align: center; padding: 20px 0;">
151
+
152
+				<button class="btns sureCun" type="button">保存</button>
153
+				<a class="btns" id="return">取消</a>
154
+			</p>
155
+		</form>
156
+
157
+		<script src="../js/jquery-ui.js"></script>
158
+		<script src="../js/timePicker.js"></script>
159
+		<!--<script src="../js/ajaxfileupload.js"></script>-->
160
+		<script src="../dianXiao/js/jquery.form.min.js"></script>
161
+		<script src="../js/bootstrap-treeview/bootstrap-treeview.min.js"></script>
162
+		<script>
163
+			var token = $.cookie("token");
164
+			
165
+			$(document).ready(function() {
166
+				//取消
167
+		        $('#return').click(function () {
168
+		           var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
169
+					parent.layer.close(index); //再执行关闭  
170
+		        });
171
+				
172
+				 $.ajax({
173
+			        	type:"get",
174
+			        	url: huayi.config.callcenter_url + 'Customer/GetCustomerField',
175
+			        	async:true,
176
+			        	dataType:'json',
177
+			        	data:{
178
+			        		token: token,
179
+			        	},
180
+			        	success:function(res){
181
+			        		if(res.state.toLowerCase()=='success'){
182
+			        			$('.tool').html('');
183
+			        			var nameList=res.data.namelist,
184
+			        			    headList=res.data.headlist;
185
+			        			    $(nameList).each(function(i,n){
186
+			        			    	$('<div class="searchbox col-sm-3">'+
187
+							                    '<div class="secon">'+
188
+							                       '<b>'+headList[i] +':</b>'+
189
+							                        '<p class="secl"><input type="text" class="phone"  name="'+n+'"/></p>'+
190
+							                    '</div>'+
191
+							               '</div>').appendTo('.tool')
192
+						        			    	
193
+			        			    })
194
+
195
+			        		}
196
+			        		
197
+			        	}
198
+			        });
199
+			        
200
+			        
201
+			        
202
+			        $('.sureCun').click(function() {
203
+					
204
+						$(".container-fluid")
205
+							.attr("method", "post")
206
+							.attr("action", huayi.config.callcenter_url + "Customer/AddCustomer")
207
+							.attr("enctype", "multipart/form-data");
208
+						$(".container-fluid").ajaxSubmit({
209
+							dataType: "json",
210
+							data: {
211
+//								deptid: $("#department").attr('data-id'),
212
+								token: token
213
+							},
214
+							success: function(res) {
215
+								//debugger;
216
+								if(res.state.toLowerCase() == "success") {
217
+									var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
218
+									parent.layer.close(index); //再执行关闭  
219
+									parent.layer.msg(res.message);
220
+									parent.initTable();
221
+								} else {
222
+									layer.msg(res.message);
223
+								}
224
+
225
+							}
226
+						});
227
+
228
+				})
229
+
230
+			        
231
+			        
232
+			      
233
+			})
234
+				
235
+				
236
+		
237
+
238
+				
239
+		</script>
240
+	</body>
241
+
242
+</html>

+ 237 - 0
CallCenterWeb.UI/keHuManager/customerListEdit.html

@@ -0,0 +1,237 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<script src="../Script/Common/huayi.load.js"></script>
7
+		<script src="../Script/Common/huayi.http.js"></script>
8
+		<script src="../Script/Common/huayi.config.js"></script>
9
+		<link rel="stylesheet" href="../css/jquery-ui.css" />
10
+		<link rel="stylesheet" href="../css/tpkerjqui.css" />
11
+		<link rel="stylesheet" href="../css/timePicker.css" />
12
+		<link rel="stylesheet" href="../css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css">
13
+		<link rel="stylesheet" href="../css/stty.css" />
14
+		<link rel="stylesheet" href="../css/init.css" />
15
+		<link rel="stylesheet" type="text/css" href="../js/bootstrap-treeview/bootstrap-treeview.min.css" />
16
+		<title>添加任务</title>
17
+		<style>
18
+			.page-title {
19
+				padding: 0px;
20
+				font-size: 16px;
21
+				font-weight: bold;
22
+				letter-spacing: -1px;
23
+				display: block;
24
+				color: #1570A6;
25
+				margin: 20px 0px 15px 0px;
26
+			}
27
+			
28
+			hr {
29
+				margin: 20px 0;
30
+				border: 0;
31
+				border-top: 1px solid #E0DFDF;
32
+				border-bottom: 1px solid #FEFEFE;
33
+			}
34
+			.bjCon {
35
+				padding-top: 20px;
36
+				/*border: 1px solid #e5e5e5;
37
+				border-top: 0;*/
38
+			}
39
+			
40
+			.bjright table td input {
41
+				padding-left: 30px;
42
+			}
43
+			
44
+			.tub {
45
+				position: absolute;
46
+				left: 18px;
47
+				top: 13px;
48
+				font-size: 18px;
49
+				color: #ccc;
50
+			}
51
+			
52
+			.ui-datepicker.ui-widget-content {
53
+				background: none !important;
54
+				background-color: #eee !important;
55
+			}
56
+			
57
+			.ui-widget-header .ui-icon {
58
+				background-image: url(../img/ui-icons_444444_256x240.png) !important;
59
+			}
60
+			
61
+			.box {
62
+				width: 55%;
63
+				margin: 0 auto;
64
+				margin-top: 5%;
65
+			}
66
+			
67
+			.box .btop {
68
+				height: 35px;
69
+				background: #1ab394;
70
+				color: #fff;
71
+				line-height: 35px;
72
+				padding: 0 15px;
73
+				/* margin-bottom: 15px; */
74
+			}
75
+			
76
+			.btl {
77
+				float: left;
78
+				margin: 0;
79
+			}
80
+			
81
+			.btr {
82
+				float: right;
83
+				margin: 0;
84
+				cursor: pointer;
85
+			}
86
+			
87
+			.boxCon {
88
+				width: 100%;
89
+				min-height: 400px;
90
+				background: #fff;
91
+				text-align: center;
92
+				padding: 10px 15px;
93
+				height: auto;
94
+				overflow-y: scroll;
95
+			}
96
+			.select_ {
97
+				width: 150px;
98
+				background-color: #FFF;
99
+				background-image: none;
100
+				border: 1px solid #ccc;
101
+				border-radius: 1px;
102
+				color: inherit;
103
+				padding: 6px 12px;
104
+				outline: none;
105
+				vertical-align: middle;
106
+				margin-top: 20px;
107
+				margin-right: 20px;
108
+			}
109
+			   .tool {
110
+            margin: 20px 0;
111
+        }
112
+
113
+        .searchbox input {
114
+            width: 99%;
115
+            height: 98%;
116
+            border: 0;
117
+            outline: none;
118
+            padding-left: 10px;
119
+        }
120
+
121
+        .secon {
122
+            width: 100%;
123
+            height: 34px;
124
+            margin-bottom: 15px;
125
+        }
126
+
127
+        .secl {
128
+            width: 65%;
129
+            display: inline-block;
130
+            height: 100%;
131
+            margin: 0;
132
+            border: 1px solid #eee;
133
+        }
134
+			
135
+		
136
+		</style>
137
+	</head>
138
+
139
+	<body>
140
+		<form class="container-fluid" enctype="multipart/form-data">
141
+			<div class="row-fluid clearfix">
142
+				 <div class="tool clearfix">
143
+	                <div class="searchbox col-sm-2">
144
+	                    <div class="secon">
145
+	                        <b>号码:</b>
146
+	                        <p class="secl"><input type="text" placeholder="号码" class="phone" /></p>
147
+	                    </div>
148
+	                </div>
149
+            </div>
150
+			</div>
151
+			<p style="text-align: center; padding: 20px 0;">
152
+
153
+				<button class="btns sureCun" type="button">保存</button>
154
+				<a class="btns" id="return">取消</a>
155
+			</p>
156
+		</form>
157
+
158
+		<script src="../js/jquery-ui.js"></script>
159
+		<script src="../js/timePicker.js"></script>
160
+		<!--<script src="../js/ajaxfileupload.js"></script>-->
161
+		<script src="../dianXiao/js/jquery.form.min.js"></script>
162
+		<script src="../js/bootstrap-treeview/bootstrap-treeview.min.js"></script>
163
+		<script>
164
+			var token = $.cookie("token");
165
+			var id=helper.request.queryString("id");
166
+			
167
+			$(document).ready(function() {
168
+				//取消
169
+		        $('#return').click(function () {
170
+		           var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
171
+					parent.layer.close(index); //再执行关闭  
172
+		        });
173
+				
174
+				 $.ajax({
175
+			        	type:"get",
176
+			        	url: huayi.config.callcenter_url + 'Customer/GetCustomer',
177
+			        	async:true,
178
+			        	dataType:'json',
179
+			        	data:{
180
+			        		token: token,
181
+			        		id:id
182
+			        	},
183
+			        	success:function(res){
184
+			        		if(res.state.toLowerCase()=='success'){
185
+			        			$('.tool').html('');
186
+			        			var nameList=res.data.namelist,
187
+			        			    headList=res.data.headlist,
188
+			        			    dataList=res.data.datalist;
189
+			        			    $(nameList).each(function(i,n){
190
+			        			    	$('<div class="searchbox col-sm-3">'+
191
+							                    '<div class="secon">'+
192
+							                       '<b>'+headList[i] +':</b>'+
193
+							                        '<p class="secl"><input type="text" class="phone"  name="'+n+'" value="'+dataList[i] +'"/></p>'+
194
+							                    '</div>'+
195
+							               '</div>').appendTo('.tool')
196
+						        			    	
197
+			        			    })
198
+
199
+			        		}
200
+			        		
201
+			        	}
202
+			        });
203
+			        
204
+			        $('.sureCun').click(function() {
205
+						$(".container-fluid")
206
+							.attr("method", "post")
207
+							.attr("action", huayi.config.callcenter_url + "Customer/AddCustomer")
208
+							.attr("enctype", "multipart/form-data");
209
+						$(".container-fluid").ajaxSubmit({
210
+							dataType: "json",
211
+							data: {
212
+								id: id,
213
+								token: token
214
+							},
215
+							success: function(res) {
216
+								//debugger;
217
+								if(res.state.toLowerCase() == "success") {
218
+									var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
219
+									parent.layer.close(index); //再执行关闭  
220
+									parent.msg(res.message);
221
+									parent.initTable();
222
+								} else {
223
+									layer.msg(res.message);
224
+								}
225
+
226
+							}
227
+						});
228
+
229
+				})
230
+			      
231
+			})
232
+				
233
+				
234
+		</script>
235
+	</body>
236
+
237
+</html>