liuzhen лет назад: 6
Родитель
Сommit
ac20f39a06

+ 77 - 0
CallCenterWeb.UI/commonTpl/sanfangtonghua.html

@@ -0,0 +1,77 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<title>添加或编辑客户信息</title>
7
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+		<!-- <link href="../js/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" /> -->
9
+		<link rel="stylesheet" type="text/css" href="../js/bootstrap-treeview/bootstrap-treeview.min.css" />
10
+		<script src="../Script/Common/huayi.load.js"></script>
11
+		<script src="../Script/Common/huayi.config.js"></script>
12
+		<link rel="stylesheet" href="../css/customer.css" />
13
+	</head>
14
+
15
+	<body>
16
+		<div class="container">
17
+			<div class="tab_contents" id="tab_user_contents">
18
+				<ul class="project_items form-horizontal showtabs">
19
+					<!--<h3 class="col-md-12 project_items_title">基本信息</h3>-->
20
+	<!-- 				<li class="form-group">
21
+						<label for="customer_key" class="col-md-2"><b class="text_require">*</b>关键词</label>
22
+						<div class="col-md-9">
23
+							<input id="customer_key" class="form-control" type="text" autocomplete="off" placeholder="请输入关键词" />
24
+						</div>
25
+					</li> -->
26
+					<li class="form-group">
27
+						<label for="customer_code" class="col-md-2">部门</label>
28
+						<div class="col-md-9">
29
+							<input id="customer_code" class="form-control" type="text" autocomplete="off" placeholder="请输入部门" />
30
+						</div>
31
+					</li>
32
+					<li class="form-group">
33
+						<label for="customer_legalName" class="col-md-2">科室</label>
34
+						<div class="col-md-9">
35
+							<input id="customer_legalName" class="form-control" type="text" autocomplete="off" placeholder="请输入科室" />
36
+						</div>
37
+					</li>
38
+					
39
+					<li class="form-group">
40
+						<label for="customer_lehalTel" class="col-md-2">电话</label>
41
+						<div class="col-md-9">
42
+							<input id="customer_lehalTel" class="form-control" type="text" autocomplete="off" placeholder="请输入电话" />
43
+						</div>
44
+					</li>
45
+					
46
+					<li class="form-group">
47
+						<label for="customer_comaddress" class="col-md-2">医师</label>
48
+						<div class="col-md-9">
49
+							<input id="customer_comaddress" class="form-control" type="text" autocomplete="off" placeholder="请输入医师" />
50
+						</div>
51
+					</li>
52
+					<li class="form-group">
53
+						<label for="customer_keshi" class="col-md-2">科室</label>
54
+						<div class="col-md-9">
55
+							<input id="customer_keshi" class="form-control" type="text" autocomplete="off" placeholder="请输入科室" />
56
+						</div>
57
+					</li>
58
+					
59
+				
60
+					
61
+				</ul>
62
+				<div class="form-group clearfix">
63
+					<div class="col-md-offset-3 col-md-10">
64
+						<button class="project_save btn btn-primary" id="save_btns" type="button" disabled="disabled">保存</button>
65
+					</div>
66
+				</div>
67
+			</div>
68
+		</div>
69
+		<script src="../js/laydate/laydate.js"></script>
70
+		<script src="../js/bootstrap-treeview/bootstrap-treeview.min.js"></script>
71
+		<!-- <script src="../js/bootstrap-select/js/bootstrap-select.js"></script> -->
72
+		<!-- <script src="../js/bootstrap-select/js/i18n/defaults-zh_CN.js"></script> -->
73
+		<script src="../Script/Common/regexs.js"></script>
74
+		<script src="../keHuManager/js/sanfangtonghua.js"></script>
75
+	</body>
76
+
77
+</html>

+ 77 - 0
CallCenterWeb.UI/commonTpl/sanfangtonghuabianji.html

@@ -0,0 +1,77 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<title>编辑客户信息</title>
7
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+		<!-- <link href="../js/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" /> -->
9
+		<link rel="stylesheet" type="text/css" href="../js/bootstrap-treeview/bootstrap-treeview.min.css" />
10
+		<script src="../Script/Common/huayi.load.js"></script>
11
+		<script src="../Script/Common/huayi.config.js"></script>
12
+		<link rel="stylesheet" href="../css/customer.css" />
13
+	</head>
14
+
15
+	<body>
16
+		<div class="container">
17
+			<div class="tab_contents" id="tab_user_contents">
18
+				<ul class="project_items form-horizontal showtabs">
19
+					<!--<h3 class="col-md-12 project_items_title">基本信息</h3>-->
20
+	<!-- 				<li class="form-group">
21
+						<label for="customer_key" class="col-md-2"><b class="text_require">*</b>关键词</label>
22
+						<div class="col-md-9">
23
+							<input id="customer_key" class="form-control" type="text" autocomplete="off" placeholder="请输入关键词" />
24
+						</div>
25
+					</li> -->
26
+					<li class="form-group">
27
+						<label for="customer_code" class="col-md-2">部门</label>
28
+						<div class="col-md-9">
29
+							<input id="customer_code" class="form-control" type="text" autocomplete="off" value="" />
30
+						</div>
31
+					</li>
32
+					<li class="form-group">
33
+						<label for="customer_legalName" class="col-md-2">科室</label>
34
+						<div class="col-md-9">
35
+							<input id="customer_legalName" class="form-control" type="text" autocomplete="off" placeholder="请输入科室" />
36
+						</div>
37
+					</li>
38
+					
39
+					<li class="form-group">
40
+						<label for="customer_lehalTel" class="col-md-2">电话</label>
41
+						<div class="col-md-9">
42
+							<input id="customer_lehalTel" class="form-control" type="text" autocomplete="off" placeholder="请输入电话" />
43
+						</div>
44
+					</li>
45
+					
46
+					<li class="form-group">
47
+						<label for="customer_comaddress" class="col-md-2">医师</label>
48
+						<div class="col-md-9">
49
+							<input id="customer_comaddress" class="form-control" type="text" autocomplete="off" placeholder="请输入医师" />
50
+						</div>
51
+					</li>
52
+					<li class="form-group">
53
+						<label for="customer_keshi" class="col-md-2">科室</label>
54
+						<div class="col-md-9">
55
+							<input id="customer_keshi" class="form-control" type="text" autocomplete="off" placeholder="请输入科室" />
56
+						</div>
57
+					</li>
58
+					
59
+				
60
+					
61
+				</ul>
62
+				<div class="form-group clearfix">
63
+					<div class="col-md-offset-3 col-md-10">
64
+						<button class="project_save btn btn-primary " id="save_edit"  type="button" >保存</button>
65
+					</div>
66
+				</div>
67
+			</div>
68
+		</div>
69
+		<script src="../js/laydate/laydate.js"></script>
70
+		<script src="../js/bootstrap-treeview/bootstrap-treeview.min.js"></script>
71
+		<!-- <script src="../js/bootstrap-select/js/bootstrap-select.js"></script> -->
72
+		<!-- <script src="../js/bootstrap-select/js/i18n/defaults-zh_CN.js"></script> -->
73
+		<script src="../Script/Common/regexs.js"></script>
74
+		<script src="../keHuManager/js/sanfangtonghuabianji.js"></script>
75
+	</body>
76
+
77
+</html>

+ 5 - 2
CallCenterWeb.UI/css/wh.css

@@ -5,7 +5,9 @@ body {
5 5
 .fl {
6 6
 	float: left;
7 7
 }
8
-
8
+.three_call ul li {
9
+	float: left;
10
+}
9 11
 .WH ul li {
10 12
 	float: left;
11 13
 }
@@ -19,7 +21,7 @@ body {
19 21
 .input {
20 22
 	outline: none;
21 23
 }
22
-
24
+.three_call,
23 25
 .WH {
24 26
 	margin: 0 auto;
25 27
 	overflow: hidden;
@@ -29,6 +31,7 @@ body {
29 31
 	overflow: hidden;
30 32
 	background: rgb(245, 245, 245);
31 33
 	padding: 10px;
34
+	width: 60%;
32 35
 }
33 36
 
34 37
 .Color {

+ 13 - 13
CallCenterWeb.UI/index.html

@@ -1256,7 +1256,7 @@
1256 1256
 		</div>
1257 1257
 
1258 1258
   <!--三方通话-->
1259
-  <div class="WH animated fadeInDown hidens ">
1259
+  <div class="three_call animated fadeInDown hidens">
1260 1260
 			<!--top-->
1261 1261
 			<div class="clearflow Color">
1262 1262
 				<div class="WH-top">
@@ -1268,9 +1268,9 @@
1268 1268
 					<div class="KeyWord col-sm-4">
1269 1269
 						<div class="WH_input  clearflow">
1270 1270
 							<div class="clearflow WH_Itop">
1271
-								<input id="Result" type="text" class="fl" value="" maxlength="18" autofocus="autofocus" />
1271
+								<input id="Result" type="text" class="fl connect" value="" maxlength="18" autofocus="autofocus" style='text-align:center; vertical-align:middel;' />
1272 1272
 								<input id="hidwhtype" type="hidden" value="" />
1273
-								<i class="img fl hidens"></i>
1273
+								<i class="img fl "></i>
1274 1274
 							</div>
1275 1275
 						</div>
1276 1276
 						<div class="Num_box clearflow">
@@ -1347,12 +1347,12 @@
1347 1347
 					<!--右边图表-->
1348 1348
 					<div class="col-sm-8 Rbg">
1349 1349
 						<div class="bg bg_cotent">
1350
-							<ul class="bg_title clearflow">
1350
+							<ul class="bg_titleTH clearflow">
1351 1351
 								<li class="lactive" itemid="0">转接记录</li>
1352 1352
 								<li itemid="1">内线电话</li>
1353 1353
 								<!--<li itemid="2">客户电话</li>-->
1354 1354
 							</ul>
1355
-							<div class="bg_box phonediv">
1355
+							<div class="bg_box phonedivTH">
1356 1356
 								<div class="cx">
1357 1357
 									<span class="blanks">
1358 1358
                                     电话号码:
@@ -1361,7 +1361,7 @@
1361 1361
 									<span class="ty">搜索</span>
1362 1362
 								</div>
1363 1363
 								<div class="phone_bg" style="width: 100%;padding: 10px;">
1364
-									<table class="phonelist fixed-table-container" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true" data-height="400">
1364
+									<table class="phonelistSF fixed-table-container" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true" data-height="400">
1365 1365
 										<thead>
1366 1366
 											<tr>
1367 1367
 												<th data-field="ID" data-align="center">编号</th>
@@ -1388,7 +1388,7 @@
1388 1388
 									</table>
1389 1389
 								</div>
1390 1390
 							</div>
1391
-							<div class="bg_box phonediv" style="display:none;">
1391
+							<div class="bg_box phonedivTH" style="display:none;">
1392 1392
 								<div class="cx">
1393 1393
 									<span class="blanks">
1394 1394
                                    	 部门:
@@ -1405,12 +1405,12 @@
1405 1405
                                     <input type="text" id="gsname" />
1406 1406
                                 </span>
1407 1407
 									<span class="ty">搜索</span>
1408
-									<span class="ty Tiana">添加</span>
1408
+									<span class="ty sanFangAdd">添加</span>
1409 1409
 									<span class="ty DaoRu">导入</span>
1410 1410
 									<span class="ty Pilsan">批量删除</span>
1411 1411
 								</div>
1412 1412
 								<div class="phone_bg" style="width: 100%;padding: 10px;">
1413
-									<table class="phonelist" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
1413
+									<table class="phonelistSF" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
1414 1414
 										<thead>
1415 1415
 											<tr>
1416 1416
 												<th data-checkbox="true" data-align="center"></th>
@@ -1419,14 +1419,14 @@
1419 1419
 												<th data-field="F_Department" data-align="center">部门</th>
1420 1420
 												<th data-field="F_Section" data-align="center">科室</th>
1421 1421
 												<th data-field="F_Telephone" data-formatter="view" data-align="center">内线电话</th>
1422
-												<th data-field="ID" data-formatter="formatterOprate">操作</th>
1422
+												<th data-field="ID" data-formatter="formatterOprateSF">操作</th>
1423 1423
 												
1424 1424
 											</tr>
1425 1425
 										</thead>
1426 1426
 									</table>
1427 1427
 								</div>
1428 1428
 							</div>
1429
-							<div class="bg_box phonediv" style="display:none;">
1429
+							<div class="bg_box phonedivTH" style="display:none;">
1430 1430
 								<div class="cx">
1431 1431
 									<span class="blanks">
1432 1432
                                     电话号码:
@@ -1439,7 +1439,7 @@
1439 1439
 									<span class="ty">搜索</span>
1440 1440
 								</div>
1441 1441
 								<div class="phone_bg" style="width: 100%;padding: 10px;">
1442
-									<table class="phonelist" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
1442
+									<table class="phonelistSF" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
1443 1443
 										<thead>
1444 1444
 											<tr>
1445 1445
 												<th data-field="F_Telephone" data-formatter="view">电话号码</th>
@@ -1474,7 +1474,7 @@
1474 1474
 							<div class="clearflow WH_Itop">
1475 1475
 								<input id="Result" type="text" class="fl connect" value="" maxlength="18" autofocus="autofocus" style='text-align:center; vertical-align:middel;' />
1476 1476
 								<input id="hidwhtype" type="hidden" value="" />
1477
-								<i class="img fl hidens"></i>
1477
+								<i class="img fl "></i>
1478 1478
 							</div>
1479 1479
 						</div>
1480 1480
 						<div class="Num_box clearflow">

+ 182 - 15
CallCenterWeb.UI/js/index.js

@@ -82,9 +82,9 @@ $(document).ready(function() {
82 82
 						break; //外呼
83 83
 					case "Meeting":
84 84
 						$("#hidwhtype").val(fun);
85
-						whtp();
85
+						three_phone();
86 86
 						//obj.DestinationNumber = "1012";
87
-						break; //多方通话
87
+						break; //一键转接
88 88
 					case "Transfer":
89 89
 						$("#hidwhtype").val(fun);
90 90
 						whtp();
@@ -182,6 +182,11 @@ $(document).ready(function() {
182 182
 		$(this).addClass("lactive").siblings().removeClass("lactive");
183 183
 		loadYJZJ();
184 184
 	})
185
+	//三方通话
186
+	$(".bg_titleTH li").click(function() {
187
+		$(this).addClass("lactive").siblings().removeClass("lactive");
188
+		loadSFTH();
189
+	})
185 190
 	$(".ty").click(function() {
186 191
 		loadWH();
187 192
 	});
@@ -425,18 +430,18 @@ function whtp() {
425 430
 	loadWH();
426 431
 }
427 432
 //三方通话弹出
428
-//function three_phone() {
429
-//	$("#Result").val("");
430
-//	if ($(".three_call").hasClass("fadeOutUp")) {
431
-//		$(".three_call").removeClass("fadeOutUp").addClass("fadeInDown");
432
-//	}
433
-//	$(".three_call").removeClass("hidens");
434
-//
435
-//	$('.first').removeClass('first');
436
-//	$('three_call').addClass('first');
437
-//
438
-//	loadWH();
439
-//}
433
+function three_phone() {
434
+	$("#Result").val("");
435
+	if ($(".three_call").hasClass("fadeOutUp")) {
436
+		$(".three_call").removeClass("fadeOutUp").addClass("fadeInDown");
437
+	}
438
+	$(".three_call").removeClass("hidens");
439
+
440
+	$('.first').removeClass('first');
441
+	$('three_call').addClass('first');
442
+
443
+	loadSFTH();
444
+}
440 445
 //加载外呼电话列表
441 446
 function loadWH() {
442 447
 	$(".phonediv").hide();
@@ -704,6 +709,141 @@ function loadYJZJ() {
704 709
 			break;
705 710
 	}
706 711
 }
712
+function loadSFTH() {
713
+	$(".phonedivTH").hide();
714
+	var n = $(".bg_titleTH .lactive").attr("itemid");
715
+	switch (n) {
716
+		case '0':
717
+			var obj = $(".phonedivTH").eq(0);
718
+			obj.show();
719
+
720
+			//先销毁表格
721
+			var table = obj.find(".phonelistSF");
722
+			table.bootstrapTable('destroy');
723
+			//初始化表格,动态从服务器加载数据
724
+			table.bootstrapTable({
725
+				method: "get", //使用get请求到服务器获取数据
726
+				url: huayi.config.callcenter_url + "Conversation/GetList", //获取数据的Servlet地址
727
+				contentType: 'application/x-www-form-urlencoded',
728
+				striped: true, //表格显示条纹
729
+				pagination: true, //启动分页
730
+				pageSize: 10, //每页显示的记录数
731
+				pageNumber: 1, //当前第几页
732
+				pageList: [10, 20, 50, 100], //记录数可选列表
733
+				search: false, //是否启用查询
734
+				showColumns: false, //显示下拉框勾选要显示的列
735
+				showRefresh: false, //显示刷新按钮
736
+				sidePagination: "server", //表示服务端请求
737
+				//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
738
+				//设置为limit可以获取limit, offset, search, sort, order
739
+				queryParamsType: "undefined",
740
+				queryParams: function queryParams(params) { //设置查询参数
741
+					var param = {
742
+						type:2,
743
+//						page: params.pageNumber,
744
+//						pagesize: params.pageSize,
745
+//						tel: $("#lastphone").val(),
746
+						token: $.cookie("token")
747
+					};
748
+					return param;
749
+				},
750
+				onLoadSuccess: function() { //加载成功时执行
751
+					//layer.msg("加载成功");
752
+				},
753
+				onLoadError: function() { //加载失败时执行
754
+					//layer.msg("加载数据失败", { time: 1500, icon: 2 });
755
+				}
756
+			});
757
+			break;
758
+		case '1':
759
+			var obj = $(".phonedivTH").eq(1);
760
+			obj.show();
761
+			getDepts(); //获取部门下拉
762
+
763
+			var table = obj.find(".phonelistSF");
764
+			table.bootstrapTable('destroy');
765
+			//初始化表格,动态从服务器加载数据
766
+			table.bootstrapTable({
767
+				method: "post", //使用get请求到服务器获取数据
768
+				url: huayi.config.callcenter_url + "Conversation/GetList", //获取数据的Servlet地址
769
+				contentType: 'application/x-www-form-urlencoded',
770
+				striped: true, //表格显示条纹
771
+				pagination: true, //启动分页
772
+				pageSize: 10, //每页显示的记录数
773
+				pageNumber: 1, //当前第几页
774
+				pageList: [10, 20, 50, 100], //记录数可选列表
775
+				search: false, //是否启用查询
776
+				showColumns: false, //显示下拉框勾选要显示的列
777
+				showRefresh: false, //显示刷新按钮
778
+				sidePagination: "server", //表示服务端请求
779
+				//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
780
+				//设置为limit可以获取limit, offset, search, sort, order
781
+				queryParamsType: "undefined",
782
+				queryParams: function queryParams(params) { //设置查询参数
783
+					var param = {
784
+						type:2,
785
+						page: params.pageNumber,
786
+						pagesize: params.pageSize,
787
+						zxzid: $('#s_department').val(),
788
+						tel: $("#gsphone").val(),
789
+						name: $("#gsname").val(),
790
+						'token': $.cookie("token")
791
+					};
792
+					return param;
793
+				},
794
+				onLoadSuccess: function() { //加载成功时执行
795
+					//layer.msg("加载成功");
796
+				},
797
+				onLoadError: function() { //加载失败时执行
798
+					//layer.msg("加载数据失败", { time: 1500, icon: 2 });
799
+				}
800
+			});
801
+			break;
802
+		case '2':
803
+			var obj = $(".phonedivTH").eq(2);
804
+			obj.show();
805
+
806
+			var table = obj.find(".phonelistSF");
807
+			table.bootstrapTable('destroy');
808
+			//初始化表格,动态从服务器加载数据
809
+			table.bootstrapTable({
810
+				method: "get", //使用get请求到服务器获取数据
811
+				url: huayi.config.callcenter_url + "CallOutScreen/GetCustomerList", //获取数据的Servlet地址
812
+				contentType: 'application/x-www-form-urlencoded',
813
+				striped: true, //表格显示条纹
814
+				pagination: true, //启动分页
815
+				pageSize: 10, //每页显示的记录数
816
+				pageNumber: 1, //当前第几页
817
+				pageList: [10, 20, 50, 100], //记录数可选列表
818
+				search: false, //是否启用查询
819
+				showColumns: false, //显示下拉框勾选要显示的列
820
+				showRefresh: false, //显示刷新按钮
821
+				sidePagination: "server", //表示服务端请求
822
+				//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
823
+				//设置为limit可以获取limit, offset, search, sort, order
824
+				queryParamsType: "undefined",
825
+				queryParams: function queryParams(params) { //设置查询参数
826
+					var param = {
827
+						page: params.pageNumber,
828
+						pagesize: params.pageSize,
829
+						tel: $("#khphone").val(),
830
+						name: $("#khname").val(),
831
+						token: $.cookie("token")
832
+					};
833
+					return param;
834
+				},
835
+				onLoadSuccess: function() { //加载成功时执行
836
+					//layer.msg("加载成功");
837
+				},
838
+				onLoadError: function() { //加载失败时执行
839
+					//layer.msg("加载数据失败", { time: 1500, icon: 2 });
840
+				}
841
+			});
842
+			break;
843
+	}
844
+}
845
+
846
+
707 847
 //格式化最近电话处理方式
708 848
 function formatterDealType(val, row) {
709 849
 	//处理方式0:IVR处理1骚扰电话2自助服务3转值班电话4留言5呼损6人工处理
@@ -772,13 +912,30 @@ function formatterOprate(val, row) {
772 912
 		'<li><a href="javascript:;" class="aBtn hide_btn" style="margin-left:20px;" authorize="yes" id="HY_delete_' + row.ID + '" onclick="btn_delete(' + row.ID + ')" title="删除">删除</a></li>' +
773 913
 		'</ul>';
774 914
 }
775
-
915
+function formatterOprateSF(val, row) {
916
+	return '<ul class="tool_downs">' +
917
+		'<li><a href="javascript:;" class="aBtn" authorize="yes"  id="HY_details_' + row.ID + '" onclick="btn_details(\'' + row.ID + '\')" title="详情">详情</a></li>' +
918
+		'<li><a href="javascript:;" class="aBtn" style="margin-left:20px;" authorize="yes"  id="HY_details_' + row.ID + '" onclick="btn_editSF(\'' + row.ID + '\')" title="编辑">编辑</a></li>' +
919
+		'<li><a href="javascript:;" class="aBtn hide_btn" style="margin-left:20px;" authorize="yes" id="HY_delete_' + row.ID + '" onclick="btn_delete(' + row.ID + ')" title="删除">删除</a></li>' +
920
+		'</ul>';
921
+}
776 922
 
777 923
 
778 924
 
779 925
 $('.Tiana').on('click', btn_add);
926
+$('.sanFangAdd').on('click',sanFang_add)
780 927
 $('.DaoRu').on('click', btn_export);
781 928
 $('.Pilsan').on('click',btn_deletes);
929
+//三方通话添加
930
+function sanFang_add() {
931
+	layer.open({
932
+		type: 2,
933
+		title: '添加客户信息',
934
+		maxmin: true, //开启最大化最小化按钮
935
+		area: ['50%', '60%'],
936
+		content: './commonTpl/sanfangtonghua.html'
937
+	});
938
+}
782 939
 //一键转接添加
783 940
 function btn_add() {
784 941
 	layer.open({
@@ -804,6 +961,16 @@ function btn_details(editId) {
804 961
 		content: './commonTpl/Yjzhuanxiangqing.html?edit_id=' + editId
805 962
 	});
806 963
 }
964
+//三方编辑
965
+function btn_editSF(editId){
966
+	layer.open({
967
+		type: 2,
968
+		title: '客户信息详情',
969
+		maxmin: true, //开启最大化最小化按钮
970
+		area: ['60%', '80%'],
971
+		content: './commonTpl/sanfangtonghuabianji.html?edit_id=' + editId
972
+	});
973
+}
807 974
 //编辑页面
808 975
 function btn_edit(editId){
809 976
 	layer.open({

+ 1 - 1
CallCenterWeb.UI/keHuManager/js/Yjzhuanxiangqing.js

@@ -25,7 +25,7 @@ function getCustomer(ids) {
25 25
 				$('#customer_companyname').text(cusBase.F_Section); //string 客户姓名
26 26
 				$('#customer_comaddress').text(cusBase.F_Telephone); //string 客户电话
27 27
 				$('#customer_legalName').text(cusBase.F_Physician); //string 医师姓名 
28
-				$('#customer_lehalTel').text(cusBase.F_Title); //string 创建时间  
28
+				$('#customer_lehalTel').text(cusBase.F_Title); //string 科室  
29 29
 //			    $('#customer_subtrade').text(cusBase.F_Gender); //string 客户地址 
30 30
 			var cusLists = data.data && data.data.ContactList;
31 31
 			if (cusLists && cusLists.length > 0) {

+ 483 - 0
CallCenterWeb.UI/keHuManager/js/sanfangtonghua.js

@@ -0,0 +1,483 @@
1
+/**
2
+ * 修改增加客户信息
3
+ * */
4
+var indexNum = 0;
5
+$(function() {
6
+
7
+	laydate.render({
8
+		elem: '#customer_handoverDate',
9
+		theme: '#1ab394',
10
+		calendar: true
11
+	});
12
+	
13
+	laydate.render({
14
+		elem: '#customer_feeExpires',
15
+		theme: '#1ab394',
16
+		calendar: true
17
+	});
18
+
19
+	//获取所属部门 
20
+	getDepts('customerTreeView', 'customer_bedept')
21
+		.then(function() {
22
+			var edit_id = helper.request.queryString("edit_id");
23
+			if (edit_id) {
24
+				getCustomer(edit_id);
25
+			}
26
+			//绑定验证(所有 input.form-control)
27
+			$('#tab_user_contents').find("input[class='form-control']").on('blur keyup', valideInput);
28
+		});
29
+
30
+});
31
+
32
+//获取客户详情
33
+function getCustomer(ids) {
34
+	$.getJSON(huayi.config.callcenter_url + "Customer/GetCustomer", {
35
+		cid: ids, //客户id
36
+		token: $.cookie("token")
37
+	}, function(data) {
38
+		if (data.state.toLowerCase() == "success") {
39
+			$('#contactLists').hide();
40
+			var cusBase = data.data;
41
+			// $('#customer_bedept').val(data.data && data.data.BeDeptName); // int 客户归属部门
42
+			
43
+				// $('#customer_key').val(cusBase.F_KeyWords); //string 关键词	
44
+				$('#customer_code').val(cusBase.F_CustomerCode); //string 客户编号
45
+				$('#customer_legalName').val(cusBase.F_LegalName); //string 客户姓名
46
+				$('#customer_lehalTel').val(cusBase.F_LegalTel); //string 客户电话
47
+				// $('#customer_comaddress').val(cusBase.F_Address); //string 客户地址 
48
+				// $('#customer_lehalTel').val(cusBase.F_CreatedOn); //string 创建时间  
49
+				$('#customer_comaddress').val(cusBase.F_Address); //string 客户地址 
50
+		
51
+                 if(data.F_Gender==="男"){
52
+					$("input[type=radio][value='1']").prop("checked", true);
53
+				}else{
54
+					$("input[type=radio][value='2']").prop("checked", true);
55
+				}
56
+				// $('#order_xieton').find('input[type="radio"][value="' + cusBase.F_Gender + '"]').prop('checked',true); // string 是否需要去银行拿回单(一般纳税人)
57
+			
58
+
59
+
60
+				$('#customer_code').trigger('blur');
61
+			
62
+		
63
+		}
64
+	});
65
+}
66
+
67
+//保存
68
+function saveCustomer() {
69
+	var contactList = $('#contactList').find('.contactList_item');
70
+	for (var i = 0; i < contactList.length; i++) {
71
+		// var F_Name = $(contactList[i]).find('input[id*="F_Name_"]').val();
72
+		// var F_Telephone = $(contactList[i]).find('input[id*="F_Telephone_"]').val();
73
+
74
+
75
+		// if (!regexs.chOrenOrnum.test($.trim(F_Name))) {
76
+		// 	layer.confirm('您添加的联系人姓名格式不正确(只能输入中文、英文、数字)!', {
77
+		// 		icon: 2,
78
+		// 		btn: ['确定']
79
+		// 	});
80
+		// 	return;
81
+		// }
82
+		// if (!regexs.phone.test($.trim(F_Telephone))) {
83
+		// 	layer.confirm('您添加的联系人电话号码格式不正确!', {
84
+		// 		icon: 2,
85
+		// 		btn: ['确定']
86
+		// 	});
87
+		// 	return;
88
+		// }
89
+		
90
+		
91
+		
92
+		
93
+	}
94
+	var wURL, loadIndex, contactLists;
95
+	var edit_id = helper.request.queryString("edit_id");
96
+	if (edit_id) {
97
+		wURL = "Customer/Update";
98
+		contactLists = null;
99
+	} else {
100
+		wURL = "Conversation/Add";
101
+		contactLists = getFields();
102
+	}
103
+	$.ajax({
104
+		type: 'post',
105
+		url: huayi.config.callcenter_url + wURL,
106
+		dataType: 'json',
107
+		async: true,
108
+		beforeSend: function() { //触发ajax请求开始时执行
109
+			$('#save_btns').attr("disabled", true);
110
+			$('#save_btns').text('保存中...');
111
+			loadIndex = layer.load();
112
+		},
113
+		data: {
114
+			F_Type: 2, //	否	string	id
115
+			F_Department:$('#customer_code').val(), //string 
116
+			F_Section:$('#customer_legalName').val(), //string 
117
+			F_Telephone:$('#customer_lehalTel').val(), //string 客户电话
118
+			F_Physician:$('#customer_comaddress').val(), //string 客户地址 
119
+			F_Title: $('#customer_keshi').val(), // string 是否需要去银行拿回单(一般纳税人)	
120
+			token: $.cookie("token")
121
+		},
122
+		success: function(data) {
123
+			layer.close(loadIndex);
124
+			if (data.state === "success") {
125
+				var index = parent.layer.getFrameIndex(window.name);
126
+				parent.layer.close(index);
127
+				parent.$('.phonelistZJ').bootstrapTable('refresh');
128
+				parent.layer.msg("保存成功");
129
+			} else {
130
+				$('#save_btns').attr("disabled", false);
131
+				$('#save_btns').text('保存');
132
+			}
133
+		},
134
+		error: function(textStatus) {
135
+			layer.close(loadIndex);
136
+			layer.confirm('网络繁忙,请稍后再试...', {
137
+				icon: 7,
138
+				closeBtn: 0,
139
+				btn: ['确定'] //按钮
140
+			});
141
+			$('#save_btns').attr("disabled", false);
142
+			$('#save_btns').text('保存');
143
+		},
144
+		complete: function(XMLHttpRequest, textStatus) {
145
+			layer.close(loadIndex);
146
+			if (textStatus == 'timeout') {
147
+				var xmlhttp = window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHttp");
148
+				xmlhttp.abort();
149
+				layer.confirm('网络超时,请稍后再试...', {
150
+					icon: 7,
151
+					closeBtn: 0,
152
+					btn: ['确定'] //按钮
153
+				});
154
+			}
155
+			$('#save_btns').attr("disabled", false);
156
+			$('#save_btns').text('保存');
157
+		},
158
+	});
159
+}
160
+
161
+//添加联系人
162
+function btn_add() {
163
+	var tplstr = '';
164
+	tplstr = '<div class="contactList_item col-md-offset-2 clearfix">' +
165
+		'<div class="form-group col-md-5 col-sm-5">' +
166
+		'<div class="input-group">' +
167
+		'<span class="input-group-addon">联系人姓名</span>' +
168
+		'<input id="F_Name_' + indexNum +
169
+		'" type="text" class="form-control" placeholder="请输入联系人姓名" aria-describedby="联系人姓名">' +
170
+		'</div>' +
171
+		'</div>' +
172
+		'<div class="form-group col-md-5 col-sm-5">' +
173
+		'<div class="input-group">' +
174
+		'<span class="input-group-addon">联系人电话</span>' +
175
+		'<input id="F_Telephone_' + indexNum +
176
+		'" type="text" class="form-control" placeholder="请输入联系人电话" aria-describedby="联系人电话">' +
177
+		'</div>' +
178
+		'</div>' +
179
+		'<div class="form-group col-md-5 col-sm-5">' +
180
+		'<div class="input-group">' +
181
+		'<span class="input-group-addon">联系人邮箱</span>' +
182
+		'<input id="F_Email_' + indexNum +
183
+		'" type="text" class="form-control" placeholder="请输入联系人邮箱" aria-describedby="联系人邮箱">' +
184
+		'</div>' +
185
+		'</div>' +
186
+		'<div class="form-group col-md-5 col-sm-5">' +
187
+		'<div class="input-group">' +
188
+		'<span class="input-group-addon">联系人职务</span>' +
189
+		'<input id="F_Duties_' + indexNum +
190
+		'" type="text" class="form-control" placeholder="请输入联系人职务" aria-describedby="联系人职务">' +
191
+		'</div>' +
192
+		'</div>' +
193
+		'<div class="form-group col-md-5 col-sm-5">' +
194
+		'<div class="input-group">' +
195
+		'<span class="input-group-addon">联系人QQ</span>' +
196
+		'<input id="F_QQ_' + indexNum + '" type="text" class="form-control" placeholder="请输入联系人QQ" aria-describedby="联系人QQ">' +
197
+		'</div>' +
198
+		'</div>' +
199
+		'<div class="form-group col-md-5 col-sm-5">' +
200
+		'<div class="input-group">' +
201
+		'<span class="input-group-addon">联系人MSN</span>' +
202
+		'<input id="F_MSN_' + indexNum +
203
+		'" type="text" class="form-control" placeholder="请输入联系人MSN" aria-describedby="联系人MSN">' +
204
+		'</div>' +
205
+		'</div>' +
206
+		'<div class="form-group col-md-10 col-sm-10">' +
207
+		'<div class="input-group">' +
208
+		'<span class="input-group-addon">联系人备注</span>' +
209
+		'<input id="F_Remark_' + indexNum +
210
+		'" type="text" class="form-control" placeholder="请输入联系人备注" aria-describedby="联系人备注">' +
211
+		'</div>' +
212
+		'</div>' +
213
+		'<div class="form-group col-md-5 col-sm-5">' +
214
+		'<div class="input-group">' +
215
+		'<span class="input-group-addon">是否主要联系人</span>' +
216
+		'<div class="isMain" id="F_IsMain_' + indexNum + '">' +
217
+		'<label class="radio-inline">' +
218
+		'<input type="radio" name="inlineOptions_' + indexNum + '" value="true"> 是' +
219
+		'</label>' +
220
+		'<label class="radio-inline">' +
221
+		'<input type="radio" name="inlineOptions_' + indexNum + '" value="false" checked="checked"> 否' +
222
+		'</label>' +
223
+		'</div>' +
224
+		'</div>' +
225
+		'</div>' +
226
+		'<button class="form-control btn btn-default" style="width:60px;margin-left:15px" onclick="btn_delete($(this))">删除</button>' +
227
+		'</div>';
228
+	$('#contactList').prepend(tplstr);
229
+	indexNum++;
230
+}
231
+
232
+//删除联系人
233
+function btn_delete(el) {
234
+	el.parent().remove();
235
+}
236
+
237
+//获取联系人信息
238
+function getFields() {
239
+	var goodslists = [];
240
+	var goodsLists_items = $('#contactList').find('.contactList_item');
241
+	$.each(goodsLists_items, function(i, v) {
242
+		goodslists.push({
243
+			"F_Name": $(v).find('input[id*="F_Name_"]').val(),
244
+			"F_Telephone": $(v).find('input[id*="F_Telephone_"]').val(),
245
+			"F_Email": $(v).find('input[id*="F_Email_"]').val(),
246
+			"F_Duties": $(v).find('input[id*="F_Duties_"]').val(),
247
+			"F_QQ": $(v).find('input[id*="F_QQ_"]').val(),
248
+			"F_MSN": $(v).find('input[id*="F_MSN_"]').val(),
249
+			"F_Remark": $(v).find('input[id*="F_Remark_"]').val(),
250
+			"F_IsMain": $(v).find('div[id*="F_IsMain_"]').find('input[type="radio"]:checked').val(),
251
+		});
252
+	});
253
+	//去重
254
+	// helper.methods.uniqueObjArray(goodslists, 'F_Name');
255
+	return goodslists;
256
+}
257
+
258
+
259
+/**
260
+ * 获取客户归属部门
261
+ * el1, 树形结构元素id名 customerTreeView
262
+ * el2, 搜索框元素id名 customer_bedept
263
+ * */
264
+function getDepts(el1, el2) {
265
+	var dtd = $.Deferred(); //在函数内部,新建一个Deferred对象
266
+	//初始化 样式
267
+	$('#' + el2).on('focus click', function() {
268
+		$('#' + el1).removeClass('hidden').addClass('show');
269
+	});
270
+	$('#' + el2).on('keyup', function() {
271
+		if ($(this).val() == '') {
272
+			$('#' + el1).treeview('uncheckAll', {
273
+				silent: true
274
+			});
275
+			$(this).attr('data-id', '0');
276
+		}
277
+	});
278
+	$('#' + el2 + ' .caret').on('click', function() {
279
+		$('#' + el1).removeClass('hidden').addClass('show');
280
+	});
281
+	$('#' + el1).mouseleave(function() {
282
+		$(this).removeClass('show').addClass('hidden');
283
+	});
284
+
285
+	$.getJSON(huayi.config.callcenter_url + 'Department/GetDeptList', {
286
+		token: $.cookie("token")
287
+	}, function(result) {
288
+		if (result.state.toLowerCase() == "success") {
289
+			var defaultDatas = helper.methods.buildTree(result.data);
290
+			var sortChildrenArr = helper.methods.objToArray(defaultDatas[0].children);
291
+			sortChildrenArr.sort(helper.methods.compare('sort'));
292
+			var sortChildrenObj = helper.methods.arrayToObj(sortChildrenArr);
293
+			defaultDatas[0].children = sortChildrenObj;
294
+			if (defaultDatas) {
295
+				var $sTree = $('#' + el1).treeview({
296
+					color: "#1ab394",
297
+					selectedBackColor: '#1ab394',
298
+					expandIcon: 'glyphicon glyphicon-chevron-right',
299
+					collapseIcon: 'glyphicon glyphicon-chevron-down',
300
+					nodeIcon: 'fa fa-folder-o',
301
+					//selectedIcon: "glyphicon glyphicon-stop",
302
+					//icon: "glyphicon glyphicon-stop",
303
+					//emptyIcon: 'glyphicon',
304
+					//showCheckbox: true,
305
+					selectable: true,
306
+					state: {
307
+						selected: true
308
+					},
309
+					data: defaultDatas,
310
+					onNodeSelected: function(event, node) {
311
+						$sTree.treeview('clearSearch');
312
+						$('#' + el2).val(node.text);
313
+						$('#' + el2).attr('data-id', node.id);
314
+						$('#' + el1).removeClass('show').addClass('hidden');
315
+					},
316
+					onNodeUnselected: function(event, node) {
317
+						$('#' + el2).attr('data-id', 0);
318
+						$('#' + el2).attr('placeholder', '请选择客户归属部门');
319
+					}
320
+				});
321
+				//				$('#' + el1).treeview('collapseAll', {
322
+				//					silent: true
323
+				//				});
324
+				$('#' + el1).treeview('expandAll', {
325
+					levels: 2,
326
+					silent: true
327
+				});
328
+				var findSNodes = function() {
329
+					return $sTree.treeview('search', [$('#' + el2).val(), {
330
+						ignoreCase: false,
331
+						exactMatch: false
332
+					}]);
333
+				};
334
+				$('#' + el2).on('keyup focus', function(e) {
335
+					var selectableNodes = findSNodes();
336
+					//var m = $('#' + el1).treeview('getParent', selectableNodes);
337
+					//$('#' + el1).treeview('selectNode', [ m, { silent: true } ]);
338
+				});
339
+			}
340
+			dtd.resolve(); // 改变Deferred对象的执行状态
341
+		}
342
+	})
343
+	return dtd.promise(); // 返回promise对象
344
+}
345
+
346
+
347
+//验证(所有 input.form-control)的方法
348
+function valideInput() {
349
+	var _that = $(this);
350
+	//console.log($(this).attr('id'));
351
+	switch ($(this).attr('id')) {
352
+//		case 'customer_code': //验证客户编号
353
+//			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', false);
354
+//			break;
355
+//		case 'customer_companyname': //验证公司名称
356
+//			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', false);
357
+//			break;
358
+//		case 'customer_legalName': //验证法人姓名
359
+//			valideMethods(_that, regexs.userNameReg, '格式不正确(只能输入2-20位汉字可以包含·•)!', true);
360
+//			break;
361
+//		case 'customer_lehalTel': //验证法人电话
362
+//			valideMethods(_that, regexs.phone, '您输入的电话号码格式不正确!', true);
363
+//			break;
364
+//		case 'customer_subtrade': //验证所属行业
365
+//			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
366
+//			break;
367
+//		case 'customer_taxCategory': //验证 税务类别
368
+//			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
369
+//			break;
370
+		// case 'customer_invoiceRange': //验证 开票范围
371
+		// 	valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
372
+		// 	break;
373
+//		case 'customer_layer': //验证 客户信誉等级
374
+//			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
375
+//			break;
376
+//		case 'customer_berelatedAcc': //客户归属涉税会计
377
+//			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
378
+//			break;
379
+//		case 'customer_beauditAcc': //客户归属审核会计
380
+//			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
381
+//			break;
382
+//		case 'customer_bemakeAcc': //客户归属做账会计
383
+//			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
384
+//			break;
385
+		// case 'customer_RegisteredAddress': //注册地址
386
+		// 	valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
387
+		// 	break;
388
+//		case 'customer_LegalIDCards': //法人身份证
389
+//			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
390
+//			break;
391
+//		case 'customer_Qualification': //企业资质荣誉
392
+//			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
393
+//			break;
394
+//		case 'customer_FinancialManager': //客户公司财务负责人
395
+//			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
396
+//			break;
397
+//		case 'customer_BusinessOwner': //客户归属业务负责人
398
+//			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
399
+//			break;
400
+		// case 'customer_Remark1': //备注1
401
+		// 	valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
402
+		// 	break;
403
+		// case 'customer_Remark2': //备注2
404
+		// 	valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
405
+		// 	break;
406
+		// case 'customer_Remark3': //备注3
407
+		// 	valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
408
+		// 	break;
409
+//		case 'customer_service': //客服
410
+//			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
411
+//			break;
412
+		// case 'customer_address': //地址
413
+		// 	valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
414
+		// 	break;
415
+		// case 'customer_address1': //地址1
416
+		// 	valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
417
+		// 	break;
418
+		// case 'customer_address2': //地址2
419
+		// 	valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
420
+		// 	break;
421
+		// case 'customer_address3': //地址3
422
+		// 	valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
423
+		// 	break;
424
+		// case 'customer_address4': //地址4
425
+		// 	valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
426
+		// 	break;
427
+	}
428
+	if ($('#tab_user_contents').find('.has-error').length > 0) {
429
+		$('.project_save').attr('disabled', true);
430
+		$('#save_btns').off('click', saveCustomer);
431
+	} else {
432
+		$('.project_save').attr('disabled', false);
433
+		$('#save_btns').off('click', saveCustomer);
434
+		$('#save_btns').on('click', saveCustomer);
435
+	}
436
+}
437
+/**
438
+ * 验证方法
439
+ * _this :传递的this
440
+ * regRlues: 验证的规则
441
+ * msg: 提示信息
442
+ * isRes:boolean 是否允许验证的内容为空,true:允许为空,false:不允许为空
443
+ * */
444
+function valideMethods(_this, regRlues, msg, isRes) {
445
+	var txtTpips = _this.parent().parent().find('.text-tips');
446
+	if (txtTpips) {
447
+		txtTpips.parent().remove();
448
+	}
449
+	if (!isRes) {
450
+		//不为空
451
+		if (!regRlues.test($.trim(_this.val()))) {
452
+			_this.parent().parent().removeClass('has-success has-feedback').addClass('has-error has-feedback');
453
+			_this.parent().find('.glyphicon').remove();
454
+			$('<span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"></span>').appendTo(_this.parent());
455
+			$('<div class="col-md-10 col-md-offset-2"><span class="text-tips">' + msg + '</span></div>').appendTo(_this.parent()
456
+				.parent());
457
+			$('.project_save').attr('disabled', true);
458
+		} else {
459
+			_this.parent().parent().removeClass('has-error has-feedback').addClass('has-success has-feedback');
460
+			_this.parent().find('.glyphicon').remove();
461
+			$('<span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>').appendTo(_this.parent());
462
+		}
463
+	} else {
464
+		//为空不验证;但是有内容就验证;
465
+		if ($.trim(_this.val())) {
466
+			if (!regRlues.test($.trim(_this.val()))) {
467
+				_this.parent().parent().removeClass('has-success has-feedback').addClass('has-error has-feedback');
468
+				_this.parent().find('.glyphicon').remove();
469
+				$('<span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"></span>').appendTo(_this.parent());
470
+				$('<div class="col-md-10 col-md-offset-2"><span class="text-tips">' + msg + '</span></div>').appendTo(_this.parent()
471
+					.parent());
472
+				$('.project_save').attr('disabled', true);
473
+			} else {
474
+				_this.parent().parent().removeClass('has-error has-feedback').addClass('has-success has-feedback');
475
+				_this.parent().find('.glyphicon').remove();
476
+				$('<span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>').appendTo(_this.parent());
477
+			}
478
+		} else {
479
+			_this.parent().find('.glyphicon').remove();
480
+			_this.parent().parent().removeClass('has-error has-success has-feedback');
481
+		}
482
+	}
483
+}

+ 109 - 0
CallCenterWeb.UI/keHuManager/js/sanfangtonghuabianji.js

@@ -0,0 +1,109 @@
1
+$(function(){
2
+	var edit_id = helper.request.queryString("edit_id");
3
+	getEditInfo(edit_id);
4
+	//点击编辑保存
5
+	$('#save_edit').click(function(){
6
+//		var F_Department=$('#customer_code').val();
7
+//		var F_Section=$('#customer_legalName').val();
8
+//		var F_Telephone=$('#customer_lehalTel').val();
9
+//		var F_Physician=$('#customer_comaddress').val();
10
+//		var F_Title=$('#customer_keshi').val();
11
+//		$.post(huayi.config.callcenter_url + "Conversation/Update",{
12
+//			id:edit_id,
13
+//			F_Type:1,
14
+//			F_Department:F_Department,
15
+//			F_Section:F_Section,
16
+//			F_Telephone:F_Telephone,
17
+//			F_Physician:F_Physician,
18
+//			F_Title:F_Title,
19
+//			"token": $.cookie("token")
20
+//		},function(res){
21
+//			if (res.state == "success") {
22
+//				var index = parent.layer.getFrameIndex(window.name);
23
+//				parent.layer.close(index);
24
+//				parent.$('.phonelistZJ').bootstrapTable('refresh');
25
+//				parent.layer.msg("保存成功");
26
+//			} else {
27
+//				$('#save_edit').attr("disabled", false);
28
+//				$('#save_edit').text('保存');
29
+//			}
30
+//		})
31
+$.ajax({
32
+		type: 'post',
33
+		url: huayi.config.callcenter_url + "Conversation/Update",
34
+		dataType: 'json',
35
+		async: true,
36
+		beforeSend: function() { //触发ajax请求开始时执行
37
+			$('#save_edit').attr("disabled", true);
38
+			$('#save_edit').text('保存中...');
39
+			loadIndex = layer.load();
40
+		},
41
+		data: {
42
+			id:edit_id,
43
+			F_Type: 2, //	否	string	id
44
+			F_Department:$('#customer_code').val(), //string 
45
+			F_Section:$('#customer_legalName').val(), //string 
46
+			F_Telephone:$('#customer_lehalTel').val(), //string 客户电话
47
+			F_Physician:$('#customer_comaddress').val(), //string 客户地址 
48
+			F_Title: $('#customer_keshi').val(), // string 是否需要去银行拿回单(一般纳税人)	
49
+			token: $.cookie("token")
50
+		},
51
+		success: function(data) {
52
+			layer.close(loadIndex);
53
+			if (data.state === "success") {
54
+				var index = parent.layer.getFrameIndex(window.name);
55
+				parent.layer.close(index);
56
+				parent.$('.phonelistSF').bootstrapTable('refresh');
57
+				parent.layer.msg("保存成功");
58
+			} else {
59
+				$('#save_edit').attr("disabled", false);
60
+				$('#save_edit').text('保存');
61
+			}
62
+		},
63
+		error: function(textStatus) {
64
+			layer.close(loadIndex);
65
+			layer.confirm('网络繁忙,请稍后再试...', {
66
+				icon: 7,
67
+				closeBtn: 0,
68
+				btn: ['确定'] //按钮
69
+			});
70
+			$('#save_edit').attr("disabled", false);
71
+			$('#save_edit').text('保存');
72
+		},
73
+		complete: function(XMLHttpRequest, textStatus) {
74
+			layer.close(loadIndex);
75
+			if (textStatus == 'timeout') {
76
+				var xmlhttp = window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHttp");
77
+				xmlhttp.abort();
78
+				layer.confirm('网络超时,请稍后再试...', {
79
+					icon: 7,
80
+					closeBtn: 0,
81
+					btn: ['确定'] //按钮
82
+				});
83
+			}
84
+			$('#save_edit').attr("disabled", false);
85
+			$('#save_edit').text('保存');
86
+		},
87
+	});
88
+	})
89
+})
90
+function getEditInfo(edit_id){
91
+	$.getJSON(huayi.config.callcenter_url + "Conversation/GetDetails", {
92
+		id: edit_id, //客户id
93
+		token: $.cookie("token")
94
+	}, function(data) {
95
+		if(data.state=='success'){
96
+			var F_Department=data.data.F_Department;//部门
97
+			var F_Section=data.data.F_Section;//科室
98
+			var F_Telephone=data.data.F_Telephone;//电话
99
+			var F_Physician=data.data.F_Physician;//医师
100
+			var F_Title=data.data.F_Title;//科室
101
+			$('#customer_code').val(F_Department);
102
+			$('#customer_legalName').val(F_Section);
103
+			$('#customer_lehalTel').val(F_Telephone);
104
+			$('#customer_comaddress').val(F_Physician);
105
+			$('#customer_keshi').val(F_Title);
106
+		}
107
+		
108
+	})
109
+}