miaofuhao 5 years ago
parent
commit
a554e7e0f4

+ 0 - 80
CallCenterWeb.UI/keHuManager/ContactPersonManger.html

@@ -1,80 +0,0 @@
1
-<!DOCTYPE html>
2
-<html>
3
-
4
-	<head>
5
-		<meta charset="UTF-8">
6
-		<meta name="viewport" content="width=device-width, initial-scale=1.0">
7
-		<script src="../Script/Common/huayi.load.js"></script>
8
-		<script src="../Script/Common/huayi.config.js"></script>
9
-		<link rel="stylesheet" href="../js/layui/css/layui.css" />
10
-		<link href="../js/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" />
11
-		<link rel="stylesheet" href="../css/init.css" />
12
-		<title>客户管理</title>
13
-	</head>
14
-
15
-	<body class="gray-bg">
16
-		<div class="daoHang clearfix">
17
-			<div class="dhLeft">
18
-				<sapn><i class="syIcon"></i>位置:
19
-					<a href="javaScript:;" id="ReIndex">首页</a>&gt;
20
-					<a href="javaScript:;">客户管理</a>&gt;
21
-					<a href="" class="nowPosition">客户档案管理</a>
22
-				</sapn>
23
-			</div>
24
-			<div class="dhRight">
25
-				<a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
26
-			</div>
27
-		</div>
28
-		<div class="wrapper wrapper-content animated fadeInRight">
29
-
30
-			<div class="toolBox clearfix">
31
-				<div class="pull-left">
32
-					<div class="form-inline">
33
-						<div class="time-box form-group">
34
-							<i class="tub fa fa-calendar"></i>
35
-							<input class="form-control search_time" type="text" id="s_times" placeholder="请选择时间">
36
-						</div>
37
-						<div class="form-group">
38
-							<select class="form-control selectpicker" id="sc_rengin" data-live-search="true">
39
-								<option value="0">请选择区域</option>
40
-							</select>
41
-						</div>
42
-						<div class="form-group">
43
-							<select class="form-control selectpicker" id="sc_pro" data-live-search="true">
44
-								<option value="0">请选择项目</option>
45
-							</select>
46
-						</div>
47
-						<div class="form-group">
48
-							<select class="form-control selectpicker" id="sc_floor" data-live-search="true">
49
-								<option value="0">请选择期号</option>
50
-							</select>
51
-						</div>
52
-						<div class="form-group">
53
-							<input id="s_name" type="text" class="form-control" placeholder="请输入联系人" />
54
-						</div>
55
-						<div class="form-group">
56
-							<input id="s_tel" type="text" class="form-control" placeholder="请输入手机号" />
57
-						</div>
58
-					</div>
59
-				</div>
60
-				<div class="pull-right">
61
-					<button type="button" class="btns search">搜索</button>
62
-					<button type="button" class="btns" onclick="btn_add()">添加</button>
63
-					<input type="button" class="btns" onclick="btn_export()" value="导入" />
64
-				</div>
65
-			</div>
66
-			<div class="th-content">
67
-				<table class="layui-hide" id="t_callTotal" lay-filter="demoEvent"></table>
68
-			</div>
69
-			<div class="th-content">
70
-				<table class="layui-hide" id="t_callTotal1"></table>
71
-			</div>
72
-		</div>
73
-
74
-		<script src="../js/layui/layui.js"></script>
75
-		<script src="../js/bootstrap-select/js/bootstrap-select.js"></script>
76
-		<script src="../js/bootstrap-select/js/i18n/defaults-zh_CN.js"></script>
77
-		<script src="./js/keHuManger.js"></script>
78
-	</body>
79
-
80
-</html>

+ 0 - 94
CallCenterWeb.UI/keHuManager/customerInfo.html

@@ -1,94 +0,0 @@
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
-		<script src="../Script/Common/huayi.load.js"></script>
9
-		<script src="../Script/Common/huayi.config.js"></script>
10
-		<link href="../css/WorkOrder/Search.css" rel="stylesheet">
11
-		<link href="../js/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" />
12
-		<link href="../css/init.css" rel="stylesheet" />
13
-		<style>
14
-			.tool_bars{
15
-				margin-bottom: 10px;
16
-			}
17
-		</style>
18
-	</head>
19
-
20
-	<body class="gray-bg">
21
-		<div class="daoHang clearfix">
22
-			<div class="dhLeft">
23
-				<sapn><i class="syIcon"></i>位置:
24
-					<a href="javaScript:;" id="ReIndex">首页</a>&gt;
25
-					<a href="javaScript:;">客户管理</a>&gt;
26
-					<a href="" class="nowPosition">客户信息</a>
27
-				</sapn>
28
-			</div>
29
-			<div class="dhRight">
30
-				<a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
31
-			</div>
32
-		</div>
33
-		<div class="wrapper wrapper-content animated fadeInRight">
34
-			<div class="toolBox clearfix">
35
-				<div class="pull-left">
36
-					<div class="form-inline">
37
-<!-- 						<div class="time-box form-group">
38
-							<i class="tub fa fa-calendar"></i>
39
-							<input class="form-control search_time" type="text" id="sc_time" placeholder="请选择起止时间">
40
-						</div> 
41
-						<div class="form-group">
42
-							<select class="form-control selectpicker" id="sc_subtrade" data-live-search="true">
43
-								<option value="">请选择所属行业</option>
44
-							</select>
45
-						</div>
46
-						<div class="form-group">
47
-							<select class="form-control selectpicker" id="sc_layer" data-live-search="true">
48
-								<option value="">请选择客户信誉等级</option>
49
-							</select>
50
-						</div>-->
51
-						<div class="form-group">
52
-							<input type="text" class="form-control" id="sc_key" placeholder="请输入关键词" />
53
-						</div>
54
-						<div class="form-group">
55
-							<input type="text" class="form-control" id="sc_contel" placeholder="请输入客户电话" />
56
-						</div>
57
-					</div>
58
-				</div>
59
-
60
-				<div class="pull-right tool_bars">
61
-					<button class="btns" id="sc_btns">搜索</button>
62
-					<button class="btns" id="btn_add">添加</button>
63
-					<input type="button" class="btns" onclick="btn_export()" value="导入" />
64
-					<button class="btns hide_btn" onclick="btn_deletes()">批量删除</button>
65
-				</div>
66
-			</div>
67
-
68
-			<div style="width: 100%;padding: 10px;">
69
-				<table id="cusList" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
70
-					<thead>
71
-						<tr>
72
-							<th data-checkbox="true"></th>
73
-							<th data-field="F_CustomerCode" data-align="center">客户编号</th>
74
-							<!-- <th data-field="F_KeyWords" data-align="center">关键词</th> -->
75
-							<th data-field="F_LegalName" data-align="center">客户姓名</th>
76
-							<th data-field="F_Gender" data-align="center">性别</th>
77
-							<th data-field="F_LegalTel" data-align="center">客户电话</th>
78
-							<th data-field="F_Address" data-align="center">客户地址</th>
79
-							
80
-							<th data-field="F_CustomerId" data-formatter="formatterOprate" data-align="center">操作</th>
81
-						</tr>
82
-					</thead>
83
-				</table>
84
-			</div>
85
-			
86
-		</div>
87
-		<script src="../js/laydate/laydate.js"></script>
88
-		<script src="../js/bootstrap-select/js/bootstrap-select.js"></script>
89
-		<script src="../js/bootstrap-select/js/i18n/defaults-zh_CN.js"></script>
90
-		<script src="js/customerInfo.js"></script>
91
-
92
-	</body>
93
-
94
-</html>

+ 0 - 569
CallCenterWeb.UI/keHuManager/js/Yjianzhuanjie.js

@@ -1,569 +0,0 @@
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
-	adddep();
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: 1, //	否	string	id
115
-			F_Department:dname, //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="  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
-}
484
-//获取所属部门
485
-var setting2 = {
486
-	data: {
487
-		key: {
488
-			name: "text"
489
-		},
490
-		simpleData: {
491
-			enable: true,
492
-			idKey: "id",
493
-			rootPId: 0
494
-		}
495
-	},
496
-	callback: {
497
-		onClick: ztreeDep
498
-	}
499
-};
500
-var did; //部门id
501
-var deptCode; //部门 code
502
-var dname; //部门name
503
-function ztreeDep(event, treeId, treeNode) {
504
-	did = treeNode.id;
505
-	deptCode = treeNode.code;
506
-	dname = treeNode.text;
507
-	$('.inps2').val(dname);
508
-	getSection();
509
-};
510
-
511
-function adddep() {
512
-	$.get(huayi.config.callcenter_url + "Department/GetDeptList", {
513
-		"token": $.cookie("token"),
514
-	}, function(result) {
515
-		result = $.parseJSON(result);
516
-		$.fn.zTree.init($("#xlAdd_depTree"), setting2, result.data); //实例化树形图
517
-		$.fn.zTree.init($("#xlAdd_depTreeZJ"), setting2, result.data); //实例化树形图
518
-	});
519
-}
520
-$('.inps').focus(function() {
521
-	$(this).siblings('.addTree').css('display', 'block');
522
-})
523
-$('.xl').click(function() {
524
-	var xl = $(this).siblings('.addTree');
525
-	if(xl.css('display') == 'block') {
526
-		xl.css('display', 'none')
527
-	} else {
528
-		xl.css('display', 'block')
529
-	}
530
-})
531
-$('.addTree').mouseleave(function() {
532
-	$(this).css('display', 'none')
533
-})
534
-//清除选择的部门
535
-//删除
536
-	$(".inpBox_list").hover(function(event) {
537
-		$(this).children(".de_icon").show();
538
-		event.stopPropagation();
539
-	}, function() {
540
-		$(this).children(".de_icon").hide();
541
-	});
542
-	$(".de_icon").click(function(event) {
543
-		event.stopPropagation();
544
-		$(this).siblings("input").val("");
545
-	});
546
-
547
-//获取科室
548
-function getSection() {
549
-	$("#customer_legalName").empty();
550
-	$("#customer_legalName").append("<option selected='selected' value=''>请选择科室</option>")
551
-	$.ajax({
552
-		type: "get",
553
-		url: huayi.config.callcenter_url + "Department/GetTreeListByPid",
554
-        dataType: 'json',
555
-		async: true,
556
-		data: {
557
-			token: $.cookie("token"),
558
-			pid: did,
559
-		},
560
-		success: function(result) {
561
-			if (result.state === "success"){
562
-				var res = result.data;
563
-				$(res).each(function(i, n) {
564
-					$("#customer_legalName").append("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>");
565
-				})
566
-			}
567
-		},
568
-	});
569
-}

+ 0 - 169
CallCenterWeb.UI/keHuManager/js/Yjzhuanjiebianji.js

@@ -1,169 +0,0 @@
1
-$(function(){
2
-	var edit_id = helper.request.queryString("edit_id");
3
-	getEditInfo(edit_id);
4
-	adddep();//获取部门
5
-	//点击编辑保存
6
-	$('#save_edit').click(function(){
7
-$.ajax({
8
-		type: 'post',
9
-		url: huayi.config.callcenter_url + "Conversation/Update",
10
-		dataType: 'json',
11
-		async: true,
12
-		beforeSend: function() { //触发ajax请求开始时执行
13
-			$('#save_edit').attr("disabled", true);
14
-			$('#save_edit').text('保存中...');
15
-			loadIndex = layer.load();
16
-		},
17
-		data: {
18
-			id: edit_id,
19
-			F_Department: did, //部门id
20
-			F_Type: 1, //	否	string	id
21
-			F_Section: $('#customer_legalName').val(), //string 
22
-			F_Telephone: $('#customer_lehalTel').val(), //string 客户电话
23
-			F_Physician: $('#customer_comaddress').val(), //string 客户地址 
24
-			F_Title: $('#customer_keshi').val(), // string 是否需要去银行拿回单(一般纳税人)	
25
-			token: $.cookie("token")
26
-		},
27
-		success: function(data) {
28
-			layer.close(loadIndex);
29
-			if (data.state === "success") {
30
-				var index = parent.layer.getFrameIndex(window.name);
31
-				parent.layer.close(index);
32
-				parent.$('.phonelistZJ').bootstrapTable('refresh');
33
-				parent.layer.msg("保存成功");
34
-			} else {
35
-				$('#save_edit').attr("disabled", false);
36
-				$('#save_edit').text('保存');
37
-			}
38
-		},
39
-		error: function(textStatus) {
40
-			layer.close(loadIndex);
41
-			layer.confirm('网络繁忙,请稍后再试...', {
42
-				icon: 7,
43
-				closeBtn: 0,
44
-				btn: ['确定'] //按钮
45
-			});
46
-			$('#save_edit').attr("disabled", false);
47
-			$('#save_edit').text('保存');
48
-		},
49
-		complete: function(XMLHttpRequest, textStatus) {
50
-			layer.close(loadIndex);
51
-			if (textStatus == 'timeout') {
52
-				var xmlhttp = window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHttp");
53
-				xmlhttp.abort();
54
-				layer.confirm('网络超时,请稍后再试...', {
55
-					icon: 7,
56
-					closeBtn: 0,
57
-					btn: ['确定'] //按钮
58
-				});
59
-			}
60
-			$('#save_edit').attr("disabled", false);
61
-			$('#save_edit').text('保存');
62
-		},
63
-	});
64
-	})
65
-})
66
-function getEditInfo(edit_id){
67
-	$.getJSON(huayi.config.callcenter_url + "Conversation/GetDetails", {
68
-		id: edit_id, //客户id
69
-		token: $.cookie("token")
70
-	}, function(data) {
71
-		if(data.state=='success'){
72
-			var data = data.data;
73
-			did = data.F_Department + ""; //部门id
74
-			$('.clear_button').val(data.F_DepartmentName); //部门名称
75
-			$('#customer_legalName option:selected').text(data.F_SectionName); //科室名称
76
-			$('#customer_legalName option:selected').val(data.F_Section); //科室id
77
-			$('#customer_lehalTel').val(data.F_Telephone); //电话
78
-			$('#customer_comaddress').val(data.F_Physician); //医师姓名
79
-			$('#customer_keshi').val(data.F_Title); //职称
80
-		}
81
-		
82
-	})
83
-}
84
-//获取所属部门
85
-var setting2 = {
86
-	data: {
87
-		key: {
88
-			name: "text"
89
-		},
90
-		simpleData: {
91
-			enable: true,
92
-			idKey: "id",
93
-			rootPId: 0
94
-		}
95
-	},
96
-	callback: {
97
-		onClick: ztreeDep
98
-	}
99
-};
100
-var did; //部门id
101
-var deptCode; //部门 code
102
-var dname; //部门name
103
-function ztreeDep(event, treeId, treeNode) {
104
-	did = treeNode.id;
105
-	deptCode = treeNode.code;
106
-	dname = treeNode.text;
107
-	$('.inps2').val(dname);
108
-	getSection();
109
-};
110
-
111
-function adddep() {
112
-	$.get(huayi.config.callcenter_url + "Department/GetDeptList", {
113
-		"token": $.cookie("token"),
114
-	}, function(result) {
115
-		result = $.parseJSON(result);
116
-		$.fn.zTree.init($("#xlAdd_depTreeZJ"), setting2, result.data); //实例化树形图
117
-	});
118
-}
119
-$('.inps').focus(function() {
120
-	$(this).siblings('.addTree').css('display', 'block');
121
-})
122
-$('.xl').click(function() {
123
-	var xl = $(this).siblings('.addTree');
124
-	if(xl.css('display') == 'block') {
125
-		xl.css('display', 'none')
126
-	} else {
127
-		xl.css('display', 'block')
128
-	}
129
-})
130
-$('.addTree').mouseleave(function() {
131
-	$(this).css('display', 'none')
132
-})
133
-//清除选择的部门
134
-//删除
135
-	$(".inpBox").hover(function(event) {
136
-		$(this).children(".de_icon").show();
137
-		event.stopPropagation();
138
-	}, function() {
139
-		$(this).children(".de_icon").hide();
140
-	});
141
-	$(".de_icon").click(function(event) {
142
-		event.stopPropagation();
143
-		$(this).siblings("input").val("");
144
-	});
145
-	
146
-//获取科室
147
-function getSection() {
148
-	$("#customer_legalName").empty();
149
-	$("#customer_legalName").append("<option selected='selected' value=''>请选择科室</option>")
150
-	$.ajax({
151
-		type: "get",
152
-		url: huayi.config.callcenter_url + "Department/GetTreeListByPid",
153
-        dataType: 'json',
154
-		async: true,
155
-		data: {
156
-			token: $.cookie("token"),
157
-			pid: did,
158
-		},
159
-		success: function(result) {
160
-			if (result.state === "success"){
161
-				var res = result.data;
162
-				$(res).each(function(i, n) {
163
-					$("#customer_legalName").append("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>");
164
-				})
165
-			}
166
-		},
167
-	});
168
-}
169
-

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

@@ -1,109 +0,0 @@
1
-/**
2
- * 客户信息详情
3
- * */
4
-
5
-var taxCusFinId;// 财税信息自增id
6
-var taxCustomerId;// 客户id
7
-
8
-$(document).ready(function() {
9
-	var edit_id = helper.request.queryString("edit_id");
10
-	if (edit_id) {
11
-		getCustomer(edit_id); //获取客户信息
12
-	}
13
-});
14
-
15
-//获取客户详情
16
-function getCustomer(ids) {
17
-	$.getJSON(huayi.config.callcenter_url + "Conversation/GetDetails", {
18
-		id: ids, //客户id
19
-		token: $.cookie("token")
20
-	}, function(data) {
21
-		if (data.state.toLowerCase() == "success") {
22
-			var cusBase = data.data;
23
-			
24
-				$('#customer_code').text(cusBase.F_DepartmentName); //string 部门
25
-				$('#customer_companyname').text(cusBase.F_SectionName); //string 科室
26
-				$('#customer_comaddress').text(cusBase.F_Telephone); //string 客户电话
27
-				$('#customer_legalName').text(cusBase.F_Physician); //string 医师姓名 
28
-				$('#customer_lehalTel').text(cusBase.F_Title); //string 职称  
29
-//			    $('#customer_subtrade').text(cusBase.F_Gender); //string 客户地址 
30
-			var cusLists = data.data && data.data.ContactList;
31
-			if (cusLists && cusLists.length > 0) {
32
-				$('#cusLists').empty();
33
-				$('#conectLits').show();
34
-				for (var i = 0; i < cusLists.length; i++) {
35
-					var tplstr = '';
36
-					tplstr = '<div class="clearfix cusListItem">'+
37
-										'<a href="javascript:;" class="aBtn hide_btn" onclick="btn_edit(\''+ cusLists[i].F_CustomerId +'\',\''+ cusLists[i].F_ManId +'\')" title="修改">修改</a>'+
38
-										'<a href="javascript:;" class="aBtn aBtn1 hide_btn" onclick="btn_delete(\''+ cusLists[i].F_ManId +'\')" title="删除">删除</a>'+
39
-										'<li class="col-md-3 col-sm-4">' +
40
-											'<label>姓名:</label>' +
41
-											'<span>'+ cusLists[i].F_Name +'</span>' +
42
-										'</li>'+
43
-										'<li class="col-md-3 col-sm-4">' +
44
-											'<label>电话:</label>' +
45
-											'<a href="jvascript:;" onclick="calloutopt('+ cusLists[i].F_Telephone +')">'+ helper.filter.cutTel(cusLists[i].F_Telephone) +'<img src="../img/Phones.png" alt="phone" /></a>'+
46
-										'</li>'+
47
-										'<li class="col-md-3 col-sm-4">' +
48
-											'<label>邮箱:</label>' +
49
-											'<span>'+ cusLists[i].F_Email +'</span>' +
50
-										'</li>'+
51
-										'<li class="col-md-3 col-sm-4">' +
52
-											'<label>职务:</label>' +
53
-											'<span>'+ cusLists[i].F_Duties +'</span>' +
54
-										'</li>'+
55
-										'<li class="col-md-3 col-sm-4">' +
56
-											'<label>QQ:</label>' +
57
-											'<span>'+ cusLists[i].F_QQ +'</span>' +
58
-										'</li>'+
59
-										'<li class="col-md-3 col-sm-4">' +
60
-											'<label>MSN:</label>' +
61
-											'<span>'+ cusLists[i].F_MSN +'</span>' +
62
-										'</li>'+
63
-										'<li class="col-md-12 col-sm-12">' +
64
-											'<label>备注:</label>' +
65
-											'<span>'+ cusLists[i].F_Remark +'</span>' +
66
-										'</li>'+
67
-										'<li class="col-md-12 col-sm-12">'+
68
-											'<label for="customer_F_IsMain">是否主要联系人:</label>'+
69
-											'<span>'+ (cusLists[i].F_IsMain === true ? '是' : '否') +'</span>'+
70
-										'</li>'+
71
-										'</div>';
72
-					$('#cusLists').append(tplstr);
73
-					
74
-					if($.cookie("userRoleId") == '17' || $.cookie("userRoleId") == '57' ){
75
-						$('.hide_btn').show();
76
-					}
77
-					
78
-				}
79
-			}
80
-		}
81
-	});
82
-}
83
-
84
-//外呼
85
-function calloutopt(telphone) {
86
-	event.stopPropagation();
87
-	if(telphone) {
88
-		$.ajax({
89
-			type: "get",
90
-			url: huayi.config.callcenter_url + "CallOutOpt/GetCallOutprefix",
91
-			async: true,
92
-			dataType: 'json',
93
-			data: {
94
-				phone: telphone,
95
-				token: $.cookie("token")
96
-			},
97
-			success: function(result) {
98
-				if(result.state.toLowerCase() === "success") {
99
-					top.obj.Type = "MakeCall";
100
-					top.obj.DestinationNumber = result.data.phone;
101
-					top.obj.Header = result.data.fix;
102
-					top.obj.TaskType = "0"; //0:拨号外呼;1:问卷外呼;
103
-					top.obj.TaskPhoneID = ''; // 原来是 回访的电话工单ID
104
-					top.Send();
105
-				}
106
-			}
107
-		});
108
-	}
109
-}

+ 0 - 214
CallCenterWeb.UI/keHuManager/js/addOrEditContacts.js

@@ -1,214 +0,0 @@
1
-/**
2
- * 修改增加联系人信息
3
- * */
4
-$(function() {
5
-// 	//获取所属行业//获取税务类别//获取客户信誉等级
6
-// 	$.when(helper.getDropList.getlistDropByDic($('#customer_subtrade'), 'KHSSHY'),
7
-// 			helper.getDropList.getlistDropByDic($('#customer_taxCategory'), 'SWLB'),
8
-// 			helper.getDropList.getlistDropByDic($('#customer_layer'), 'KHLayer'))
9
-// 		.done(function() {
10
-			var edit_id = helper.request.queryString("edit_id");
11
-			if (edit_id) {
12
-				getCustomer(edit_id);
13
-			}
14
-			//绑定验证(所有 input.form-control)
15
-			$('#tab_user_contents').find("input[class='form-control']").on('blur keyup', valideInput);
16
-		// });
17
-
18
-});
19
-
20
-//获取客户详情
21
-function getCustomer(ids) {
22
-	$.getJSON(huayi.config.callcenter_url + "CustomerNew/GetCustomer", {
23
-		cusid: ids, //客户id
24
-		token: $.cookie("token")
25
-	}, function(data) {
26
-		if (data.state.toLowerCase() == "success") {
27
-			var contactList = data.data.ContactList;
28
-			var mid = helper.request.queryString("mid");
29
-			var contactInfo = {};
30
-			if(contactList && contactList.length > 0){
31
-				for(var i = 0; i < contactList.length; i++) {
32
-					if(contactList[i].F_ManId == mid){
33
-						contactInfo = contactList[i];
34
-						break;
35
-					}
36
-				}
37
-			}
38
-			if (contactInfo) {
39
-				$('#F_Name').val(contactInfo.F_Name);// string 联系人姓名
40
-				$('#F_Telephone').val(contactInfo.F_Telephone);// string 电话
41
-				$('#F_Email').val(contactInfo.F_Email);// string 邮箱
42
-				$('#F_Duties').val(contactInfo.F_Duties);// string 职务
43
-				$('#F_QQ').val(contactInfo.F_QQ);// string QQ
44
-				$('#F_MSN').val(contactInfo.F_MSN);// string MSN	
45
-				$('#F_Remark').val(contactInfo.F_Remark);// string 备注
46
-				$('#customer_isMain').find('input[type="radio"][value="'+ contactInfo.F_IsMain  +'"]').prop('checked', true);
47
-				$('#F_Name').trigger('blur');
48
-			}
49
-		}
50
-	});
51
-}
52
-
53
-//保存
54
-function saveCustomer() {
55
-	if (!$.trim($('#F_Name').val()) ||
56
-		!$.trim($('#F_Telephone').val())) {
57
-		layer.msg('带红色星号的是必填项,请填写或选择后再保存!');
58
-		return;
59
-	}
60
-	var wURL, loadIndex;
61
-	var edit_id = helper.request.queryString("edit_id");
62
-	var mid = helper.request.queryString("mid");
63
-	if (mid) {
64
-		wURL = "CustomerNew/UpdateContact";
65
-	} else {
66
-		wURL = "CustomerNew/AddContact";
67
-	}
68
-	$.ajax({
69
-		type: 'post',
70
-		url: huayi.config.callcenter_url + wURL,
71
-		dataType: 'json',
72
-		async: true,
73
-		beforeSend: function() { //触发ajax请求开始时执行
74
-			$('#save_btns').attr("disabled", true);
75
-			$('#save_btns').text('保存中...');
76
-			loadIndex = layer.load();
77
-		},
78
-		data: {
79
-			F_CustomerId: edit_id,//int客户id,允许为0
80
-			F_ManId: mid,//int	联系人id			
81
-			F_Name: $('#F_Name').val(),// string 联系人姓名
82
-			F_Telephone: $('#F_Telephone').val(),// string 电话
83
-			F_Email: $('#F_Email').val(),// string 邮箱
84
-			F_Duties: $('#F_Duties').val(),// string 职务
85
-			F_QQ: $('#F_QQ').val(),// string QQ
86
-			F_MSN: $('#F_MSN').val(),// string MSN	
87
-			F_Remark: $('#F_Remark').val(),// string 备注
88
-			F_IsMain: $('#customer_isMain').find('input[type="radio"]:checked').val(),//bool 是否主要联系人
89
-			token: $.cookie("token")
90
-		},
91
-		success: function(data) {
92
-			layer.close(loadIndex);
93
-			if (data.state === "success") {
94
-				var index = parent.layer.getFrameIndex(window.name);
95
-				parent.layer.close(index);
96
-				if(mid){
97
-					parent.getCustomer(edit_id); //客户信息详情页面
98
-				}else{
99
-					parent.$('#cusList').bootstrapTable('refresh');
100
-				}
101
-				parent.layer.msg("保存成功");
102
-			} else {
103
-				$('#save_btns').attr("disabled", false);
104
-				$('#save_btns').text('保存');
105
-			}
106
-		},
107
-		error: function(textStatus) {
108
-			layer.close(loadIndex);
109
-			layer.confirm('网络繁忙,请稍后再试...', {
110
-				icon: 7,
111
-				closeBtn: 0,
112
-				btn: ['确定'] //按钮
113
-			});
114
-			$('#save_btns').attr("disabled", false);
115
-			$('#save_btns').text('保存');
116
-		},
117
-		complete: function(XMLHttpRequest, textStatus) {
118
-			layer.close(loadIndex);
119
-			if (textStatus == 'timeout') {
120
-				var xmlhttp = window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHttp");
121
-				xmlhttp.abort();
122
-				layer.confirm('网络超时,请稍后再试...', {
123
-					icon: 7,
124
-					closeBtn: 0,
125
-					btn: ['确定'] //按钮
126
-				});
127
-			}
128
-			$('#save_btns').attr("disabled", false);
129
-			$('#save_btns').text('保存');
130
-		},
131
-	});
132
-}
133
-
134
-
135
-//验证(所有 input.form-control)的方法
136
-function valideInput() {
137
-	var _that = $(this);
138
-	//console.log($(this).attr('id'));
139
-	switch ($(this).attr('id')) {
140
-		case 'F_Name': //验证姓名
141
-			valideMethods(_that, regexs.userNameReg, '格式不正确(只能输入2-20位汉字可以包含·•)!', false);
142
-			break;
143
-		case 'F_Telephone': //验证电话
144
-			valideMethods(_that, regexs.phone, '您输入的电话号码格式不正确!', false);
145
-			break;
146
-		case 'F_Email': //验证 邮箱
147
-			valideMethods(_that, regexs.email, '请输入正确格式的邮箱!', true);
148
-			break;
149
-		case 'F_Duties': //验证 职务
150
-			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
151
-			break;
152
-		case 'F_QQ': //QQ
153
-			valideMethods(_that, regexs.QQreg, '请输入正确格式的QQ号!', true);
154
-			break;
155
-		case 'F_MSN': //MSN
156
-			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
157
-			break;
158
-	}
159
-	if ($('#tab_user_contents').find('.has-error').length > 0) {
160
-		$('.project_save').attr('disabled', true);
161
-		$('#save_btns').off('click', saveCustomer);
162
-	} else {
163
-		$('.project_save').attr('disabled', false);
164
-		$('#save_btns').off('click', saveCustomer);
165
-		$('#save_btns').on('click', saveCustomer);
166
-	}
167
-}
168
-/**
169
- * 验证方法
170
- * _this :传递的this
171
- * regRlues: 验证的规则
172
- * msg: 提示信息
173
- * isRes:boolean 是否允许验证的内容为空,true:允许为空,false:不允许为空
174
- * */
175
-function valideMethods(_this, regRlues, msg, isRes) {
176
-	var txtTpips = _this.parent().parent().find('.text-tips');
177
-	if (txtTpips) {
178
-		txtTpips.parent().remove();
179
-	}
180
-	if (!isRes) {
181
-		//不为空
182
-		if (!regRlues.test($.trim(_this.val()))) {
183
-			_this.parent().parent().removeClass('has-success has-feedback').addClass('has-error has-feedback');
184
-			_this.parent().find('.glyphicon').remove();
185
-			$('<span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"></span>').appendTo(_this.parent());
186
-			$('<div class="col-md-10 col-md-offset-2"><span class="text-tips">' + msg + '</span></div>').appendTo(_this.parent()
187
-				.parent());
188
-			$('.project_save').attr('disabled', true);
189
-		} else {
190
-			_this.parent().parent().removeClass('has-error has-feedback').addClass('has-success has-feedback');
191
-			_this.parent().find('.glyphicon').remove();
192
-			$('<span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>').appendTo(_this.parent());
193
-		}
194
-	} else {
195
-		//为空不验证;但是有内容就验证;
196
-		if ($.trim(_this.val())) {
197
-			if (!regRlues.test($.trim(_this.val()))) {
198
-				_this.parent().parent().removeClass('has-success has-feedback').addClass('has-error has-feedback');
199
-				_this.parent().find('.glyphicon').remove();
200
-				$('<span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"></span>').appendTo(_this.parent());
201
-				$('<div class="col-md-10 col-md-offset-2"><span class="text-tips">' + msg + '</span></div>').appendTo(_this.parent()
202
-					.parent());
203
-				$('.project_save').attr('disabled', true);
204
-			} else {
205
-				_this.parent().parent().removeClass('has-error has-feedback').addClass('has-success has-feedback');
206
-				_this.parent().find('.glyphicon').remove();
207
-				$('<span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>').appendTo(_this.parent());
208
-			}
209
-		} else {
210
-			_this.parent().find('.glyphicon').remove();
211
-			_this.parent().parent().removeClass('has-error has-success has-feedback');
212
-		}
213
-	}
214
-}

+ 0 - 481
CallCenterWeb.UI/keHuManager/js/addOrEditCusInfo.js

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

+ 0 - 472
CallCenterWeb.UI/keHuManager/js/addOrEditCustomer.js

@@ -1,472 +0,0 @@
1
-/**
2
- * 修改增加客户信息
3
- * */
4
-$(function() {
5
-	var user_Id = helper.request.queryString("eid");
6
-	var pid = helper.request.queryString("pid");
7
-	//判断是否是添加住户
8
-	if(pid){
9
-		$('#purchase_info').hide();//隐藏购房信息
10
-	}else{
11
-		$('#purchase_info').show();//显购房信息
12
-	}
13
-	
14
-	//出生年月
15
-	laydate.render({
16
-		elem: '#customer_birthday',
17
-		theme: '#1ab394',
18
-		//type: 'month',
19
-		calendar: true
20
-	});
21
-	//获取 区域 项目 期号下拉
22
-	helper.getDropList.getProLocations($('#head_form_rengin'), $('#head_form_pro'), $('#head_form_floor'));
23
-
24
-	//获取房主关系
25
-	helper.getDropList.getlistDropByDic($('#ower_relationship'), 'FZGX');
26
-	//getProLists(); //项目下拉
27
-
28
-	if(user_Id) {
29
-		user_Id = '' + user_Id;
30
-		user_Id = user_Id.indexOf('_') === -1 ? user_Id : user_Id.split('_')[0];
31
-		getCustomer(user_Id);
32
-	}
33
-	//绑定验证(所有 input.form-control)
34
-	$('#tab_user_contents').find("input[class='form-control']").on('blur keyup', valideInput);
35
-
36
-	/*
37
-		$('#customer_scaleResume').on('focus click', function() {
38
-			$('#reginsTreeView').removeClass('hidden').addClass('show');
39
-		});
40
-		$('#customer_scaleResume').on('keyup', function() {
41
-			if($(this).val() == '') {
42
-				$('reginsTreeView').treeview('uncheckAll', {
43
-					silent: true
44
-				});
45
-				$(this).attr('data-id', '0');
46
-			}
47
-		});
48
-		$('#customer_scaleResume + .caret').on('click', function() {
49
-			$('#reginsTreeView').removeClass('hidden').addClass('show');
50
-		});
51
-		$('#reginsTreeView').mouseleave(function() {
52
-			$(this).removeClass('show').addClass('hidden');
53
-		});*/
54
-
55
-});
56
-
57
-//获取单个用户
58
-function getCustomer(ids) {
59
-	$.getJSON(huayi.config.callcenter_url + "Customer/GetCustomer", {
60
-		cid: ids,
61
-		token: $.cookie("token")
62
-	}, function(data) {
63
-		if(data.state.toLowerCase() == "success") {
64
-			data = data.data;
65
-			if(data) {
66
-				//基本信息
67
-				$('#customer_name').val(data.F_CustomerName); //是	string	姓名/联系人
68
-				$('#customer_code').val(data.F_CustomerCode); //是	string	客户工作单位
69
-				if(data.F_CustomerEName) {
70
-					$('#customer_sex').find("input[type='radio'][value= " + data.F_CustomerEName + "]").prop("checked", true); //性别
71
-				}
72
-				$('#customer_birthday').val(data.F_CustomerPym); //否	string	出生年月
73
-				$('#customer_card').val(data.F_LegalRepresentativeCardID); //否	string	身份证号
74
-				$('#customer_education').val(data.F_CustomerLayer); //否	int	学历
75
-				$('#customer_postCode').val(data.F_PostCode); //否	string	收入层次
76
-				$('#customer_business').val(data.F_BusinessProfile); //否	string	客户职业
77
-				$('#customer_openingBank').val(data.F_OpeningBank); //否	string	职务
78
-				$('#customer_website').val(data.F_Website); //否	string	兴趣爱好
79
-				$('#customer_brand').val(data.F_Url); //否	string	车辆品牌
80
-				$('#customer_kind').val(data.F_Kind); //否	string	车牌号码
81
-
82
-				//联系信息
83
-				$('#customer_mobile').val(data.F_Mobile); //否	string	手机号码
84
-				//				$('#customer_tel').val(data.F_Telephone); //否	string	电话
85
-				//				$('#customer_fax').val(data.F_Fax); //否	string	传真
86
-				//				$('#customer_email').val(data.F_Email); //否	string	邮箱
87
-				$('#customer_address').val(data.F_Address); //否	string	通讯住址
88
-				$('#customer_nature').val(data.F_Nature); //否	string	籍贯(精准到县)
89
-
90
-				//购房信息
91
-				//				if(data.F_ScaleResume && data.F_CategoryId) {
92
-				//					$('#customer_scaleResume').val(data.F_ScaleResume); //否	string	所购项目
93
-				//					$('#customer_scaleResume').attr('data-id', data.F_CategoryId); //否	string	所购项目id
94
-				////					$('#customer_scaleResume').on('focus',function(){
95
-				////						$('#btn-select-node').trigger('click');
96
-				////					});
97
-				//				} else {
98
-				//					$('#customer_scaleResume').val('请选择所购项目');
99
-				//					$('#customer_scaleResume').attr('data-id', 0);
100
-				//				}
101
-
102
-				$('#head_form_rengin').selectpicker('val', data.F_Layer).trigger('change'); //区域 待修改
103
-				$('#head_form_pro').selectpicker('val', data.F_CategoryId).trigger('change'); //项目
104
-				$('#head_form_floor').selectpicker('val', data.F_CustomerType).trigger('change'); //期号
105
-				$('#customer_natures').val(data.F_CustomerNature);//		否	string	楼号
106
-				$('#customer_class').val(data.F_CustomerClass); //		否	string	单元号
107
-				
108
-				$('#customer_floor').val(data.F_BusinessLicenseID); //否	string	所购楼层信息
109
-				$('#ower_relationship').selectpicker('val', data.F_CustomerNatureID).trigger('change'); //房主关系
110
-				$('#customer_trade').val(data.F_TradeId); //否	int	总房款
111
-				$('#customer_regionId').val(data.F_RegionId); //否	int	老带新套数
112
-				$('#customer_bankAccount').val(data.F_BankAccount); //否	string	老带新项目
113
-				$('#customer_legalRepresentative').val(data.F_LegalRepresentative); //否	string	置业顾问
114
-
115
-				//家庭情况
116
-				if(data.F_TaxID) {
117
-					$('#customer_merrige').find("input[type='radio'][value= " + data.F_TaxID + "]").prop("checked", true); //性别
118
-				}
119
-				$('#customer_mainProduct').val(data.F_MainProduct); //否	string	家庭人口
120
-				$('#customer_spouse').val(data.F_CustomerFrom); //否	string	客户配偶情况
121
-				$('#customer_children').val(data.F_TrackInfo); //否	string	客户子女情况
122
-				$('#customer_parent').val(data.F_TrackState); //否	string	客户父母情况
123
-				$('#customer_consumption').val(data.F_ImportDegree); //否	string	客户消费偏好
124
-				$('#customer_notes').val(data.F_Notes); //否	string	其他备注
125
-
126
-				//基本信息
127
-				if(data.Sex) {
128
-					$('#accountSex').find("input[type='radio'][value= " + data.Sex + "]").prop("checked", true); //性别
129
-				}
130
-				if(data.Birthday) {
131
-					$('#accountBirthday').val(data.Birthday.split(' ')[0].substring(0, 7)); //出生年月
132
-				}
133
-				
134
-				$('#customer_name').trigger('blur');
135
-			}
136
-		}
137
-	});
138
-}
139
-//保存项目
140
-function saveCustomer() {
141
-	var user_Id = helper.request.queryString("eid");
142
-	var pid = helper.request.queryString("pid");
143
-	var eID;
144
-	var house;
145
-	
146
-	//判断是否是添加住户
147
-	if(pid){
148
-		if(!$.trim($('#customer_name').val()) ||
149
-			!$.trim($('#customer_card').val()) ||
150
-			($.trim($('#ower_relationship').val()) === "0") ||
151
-			!$.trim($('#customer_mobile').val())
152
-		) {
153
-			layer.msg('带红色星号的是必填项,请填写或选择后再保存!');
154
-			return;
155
-		}
156
-	}else{
157
-		if(!$.trim($('#customer_name').val()) ||
158
-			!$.trim($('#customer_card').val()) ||
159
-			($.trim($('#ower_relationship').val()) === "0") ||
160
-			!$.trim($('#customer_mobile').val()) ||
161
-			($.trim($('#head_form_rengin').val()) === "0") ||
162
-			($.trim($('#head_form_pro').val()) === "0") ||
163
-			($.trim($('#head_form_floor').val()) === "0") ||
164
-			!$.trim($('#customer_floor').val())
165
-	
166
-		) {
167
-			layer.msg('带红色星号的是必填项,请填写或选择后再保存!');
168
-			return;
169
-		}
170
-	}
171
-
172
-	if(user_Id) {
173
-		webURL = 'Customer/Update';
174
-		user_Id = '' + user_Id;
175
-		if(user_Id.indexOf('_') > -1) {
176
-			eID = user_Id.split('_')[0];
177
-			house = user_Id.split('_')[1];
178
-		} else {
179
-			eID = user_Id;
180
-		}
181
-	} else {
182
-		webURL = 'Customer/Add';
183
-		pid = pid === "" ? 0 : helper.request.queryString("pid");
184
-	}
185
-	$.post(huayi.config.callcenter_url + webURL, {
186
-		F_CustomerId: eID, //F_UserId为0是添加,>0修改
187
-		//基本信息
188
-		F_CustomerName: $('#customer_name').val(), //是	string	姓名/联系人
189
-		F_CustomerCode: $('#customer_code').val(), //是	string	客户工作单位
190
-		F_CustomerEName: $('#customer_sex').find("input[type='radio']:checked").val(), //否	string	性别(男,女)
191
-		F_CustomerPym: $('#customer_birthday').val(), //否	string	出生年月
192
-		F_LegalRepresentativeCardID: $('#customer_card').val(), //否	string	身份证号
193
-		F_CustomerLayer: $('#customer_education').val(), //否	int	学历
194
-		F_PostCode: $('#customer_postCode').val(), //否	string	收入层次
195
-		F_BusinessProfile: $('#customer_business').val(), //否	string	客户职业
196
-		F_OpeningBank: $('#customer_openingBank').val(), //否	string	职务
197
-		F_Website: $('#customer_website').val(), //否	string	兴趣爱好
198
-		F_Url: $('#customer_brand').val(), //否	string	车辆品牌
199
-		F_Kind: $('#customer_kind').val(), //否	string	车牌号码
200
-
201
-		//联系信息
202
-		F_Mobile: $('#customer_mobile').val(), //否	string	手机号码
203
-		//		F_Telephone: $('#customer_tel').val(), //否	string	电话
204
-		//		F_Fax: $('#customer_fax').val(), //否	string	传真
205
-		//		F_Email: $('#customer_email').val(), //否	string	邮箱
206
-		F_Address: $('#customer_address').val(), //否	string	通讯住址
207
-		F_Nature: $('#customer_nature').val(), //否	string	籍贯(精准到县)
208
-		//购房信息
209
-		//F_ScaleResume: $('#customer_scaleResume').val(), //否	string	所购项目
210
-		//F_CategoryId: $('#customer_scaleResume').attr('data-id'), //否	string	所购项目id
211
-		F_Layer: $('#head_form_rengin').val(), //	否	int	区域id
212
-		F_CustomerNatureID: $('#ower_relationship').val(), //否	int	房主关系
213
-		F_ScaleResume: $('#head_form_pro').find('option:selected').text(), //	否	string	所购项目
214
-		F_CategoryId: $('#head_form_pro').val(), //	否	string	所购项目id
215
-		F_CustomerType: $('#head_form_floor').val(), //	否	string	期号id
216
-		
217
-		F_CustomerNature: $('#customer_natures').val(), //		否	string	楼号
218
-		F_CustomerClass: $('#customer_class').val(), //		否	string	单元号
219
-		
220
-		F_BusinessLicenseID: $('#customer_floor').val(), //否	string	所购楼层信息(房间号)
221
-		F_TradeId: $('#customer_trade').val(), //否	int	总房款
222
-		F_RegionId: $('#customer_regionId').val(), //否	int	老带新套数
223
-		F_BankAccount: $('#customer_bankAccount').val(), //否	string	老带新项目
224
-		F_LegalRepresentative: $('#customer_legalRepresentative').val(), //否	string	置业顾问
225
-		//家庭情况
226
-		F_TaxID: $('#customer_merrige').find("input[type='radio']:checked").val(), //否	string	婚姻状况
227
-		F_MainProduct: $('#customer_mainProduct').val(), //否	string	家庭人口
228
-		F_CustomerFrom: $('#customer_spouse').val(), //否	string	客户配偶情况
229
-		F_TrackInfo: $('#customer_children').val(), //否	string	客户子女情况
230
-		F_TrackState: $('#customer_parent').val(), //否	string	客户父母情况
231
-		F_ImportDegree: $('#customer_consumption').val(), //否	string	客户消费偏好
232
-		F_Notes: $('#customer_notes').val(), //否	string	其他备注
233
-
234
-		parentid: pid, //否	int	用户级别 父级子级 修改的时候不传
235
-		token: $.cookie("token")
236
-	}, function(data) {
237
-		data = JSON.parse(data);
238
-		if(data.state.toLowerCase() == "success") {
239
-			var index = parent.layer.getFrameIndex(window.name);
240
-			parent.layer.close(index);
241
-			if(pid === 0 || house != "house") {
242
-				parent.table.reload('t_callTotal');
243
-			} else {
244
-				parent.table.reload('t_callTotal1');
245
-			}
246
-			parent.layer.msg("保存成功");
247
-		}
248
-	});
249
-}
250
-
251
-//验证(所有 input.form-control)的方法
252
-function valideInput() {
253
-	var _that = $(this);
254
-	//console.log($(this).attr('id'));
255
-	switch($(this).attr('id')) {
256
-		case 'customer_name': //验证姓名
257
-			valideMethods(_that, regexs.userNameReg, '格式不正确(只能输入2-20位汉字可以包含·•)!', false);
258
-			break;
259
-		case 'customer_code': //验证客户单位
260
-			valideMethods(_that, regexs.proTitle, '格式不正确(2-30位,只能输入中英文数字 空格 + - 中文标点)!', true);
261
-			break;
262
-		case 'customer_card': //验证身份证号码
263
-			valideMethods(_that, regexs.identityCard, '身份证号码格式不正确!', false);
264
-			break;
265
-		case 'customer_postCode': //验证收入层次
266
-			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
267
-			break;
268
-		case 'customer_business': //验证客户职业
269
-			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
270
-			break;
271
-		case 'customer_openingBank': //验证职务
272
-			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
273
-			break;
274
-		case 'customer_website': //兴趣爱好
275
-			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
276
-			break;
277
-		case 'customer_brand': //验证车辆品牌
278
-			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
279
-			break;
280
-		case 'customer_kind': //验证车牌号码
281
-			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
282
-			break;
283
-
284
-		case 'customer_mobile': //验证手机号码
285
-			valideMethods(_that, regexs.phone, '您输入的手机号码格式不正确!', false);
286
-			break;
287
-		case 'customer_tel': //验证电话
288
-			valideMethods(_that, regexs.fax, '您输入的电话格式不正确!', true);
289
-			break;
290
-		case 'customer_fax': //验证传真
291
-			valideMethods(_that, regexs.fax, '您输入的传真格式不正确!', true);
292
-			break;
293
-		case 'customer_email': //验证email
294
-			valideMethods(_that, regexs.email, '您输入的邮箱格式不正确!', true);
295
-			break;
296
-		case 'customer_address': //验证通讯住址
297
-			valideMethods(_that, regexs.address, '格式不正确(只能包含中文、英文、数字、下划线、中英文逗号、中英文句号)!', true);
298
-			break;
299
-		case 'customer_nature': //验证籍贯(精准到县)
300
-			valideMethods(_that, regexs.address, '格式不正确(只能包含中文、英文、数字、下划线、中英文逗号、中英文句号)!', true);
301
-			break;
302
-
303
-		case 'customer_floor': //验证所购楼层信息
304
-			valideMethods(_that, regexs.roomNum, '格式不正确(只能输入匹配中文、英文、数字、下划线 和 \ - —— #)!', false);
305
-			break;
306
-		case 'customer_trade': //总房款
307
-			valideMethods(_that, regexs.nums, '格式不正确(只能包含数字)!', true);
308
-			break;
309
-		case 'customer_regionId': //老带新套数
310
-			valideMethods(_that, regexs.nums, '格式不正确(只能包含数字)!', true);
311
-			break;
312
-		case 'customer_bankAccount': //老带新项目
313
-			valideMethods(_that, regexs.chOrnum, '格式不正确(只能包含数字、文字)!', true);
314
-			break;
315
-		case 'customer_legalRepresentative': //置业顾问
316
-			valideMethods(_that, regexs.chOren, '格式不正确(只能输入汉字或字母)!', true);
317
-			break;
318
-
319
-		case 'customer_mainProduct': //验证家庭人口
320
-			valideMethods(_that, regexs.chOrnum, '格式不正确(只能包含数字、文字)!', true);
321
-			break;
322
-
323
-	}
324
-	if($('#tab_user_contents').find('.has-error').length > 0) {
325
-		$('.project_save').attr('disabled', true);
326
-		$('#btn_save').off('click', saveCustomer);
327
-	} else {
328
-		$('.project_save').attr('disabled', false);
329
-		$('#btn_save').off('click', saveCustomer);
330
-		$('#btn_save').on('click', saveCustomer);
331
-	}
332
-}
333
-/**
334
- * 验证方法
335
- * _this :传递的this
336
- * regRlues: 验证的规则
337
- * msg: 提示信息
338
- * isRes:boolean 是否允许验证的内容为空,true:允许为空,false:不允许为空
339
- * */
340
-function valideMethods(_this, regRlues, msg, isRes) {
341
-	var txtTpips = _this.parent().parent().find('.text-tips');
342
-	if(txtTpips) {
343
-		txtTpips.parent().remove();
344
-	}
345
-	if(!isRes) {
346
-		//不为空
347
-		if(!regRlues.test($.trim(_this.val()))) {
348
-			_this.parent().parent().removeClass('has-success has-feedback').addClass('has-error has-feedback');
349
-			_this.parent().find('.glyphicon').remove();
350
-			$('<span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"></span>').appendTo(_this.parent());
351
-			$('<div class="col-md-5"><span class="text-tips">' + msg + '</span></div>').appendTo(_this.parent().parent());
352
-			$('.project_save').attr('disabled', true);
353
-		} else {
354
-			_this.parent().parent().removeClass('has-error has-feedback').addClass('has-success has-feedback');
355
-			_this.parent().find('.glyphicon').remove();
356
-			$('<span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>').appendTo(_this.parent());
357
-		}
358
-	} else {
359
-		//为空不验证;但是有内容就验证;
360
-		if($.trim(_this.val())) {
361
-			if(!regRlues.test($.trim(_this.val()))) {
362
-				_this.parent().parent().removeClass('has-success has-feedback').addClass('has-error has-feedback');
363
-				_this.parent().find('.glyphicon').remove();
364
-				$('<span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"></span>').appendTo(_this.parent());
365
-				$('<div class="col-md-5"><span class="text-tips">' + msg + '</span></div>').appendTo(_this.parent().parent());
366
-				$('.project_save').attr('disabled', true);
367
-			} else {
368
-				_this.parent().parent().removeClass('has-error has-feedback').addClass('has-success has-feedback');
369
-				_this.parent().find('.glyphicon').remove();
370
-				$('<span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>').appendTo(_this.parent());
371
-			}
372
-		} else {
373
-			_this.parent().find('.glyphicon').remove();
374
-			_this.parent().parent().removeClass('has-error has-success has-feedback');
375
-		}
376
-	}
377
-}
378
-
379
-////项目下拉(树形下拉)
380
-//function getProLists() {
381
-//	$.getJSON(huayi.config.callcenter_url + 'CusRegionCategory/GetRegionListTree2', {
382
-//		token: $.cookie("token")
383
-//	}, function(result) {
384
-//		if(result.state.toLowerCase() == "success") {
385
-//			result = result.data;
386
-//			if(result) {
387
-//				var defaultDatas = [];
388
-//				var childrenObj = [];
389
-//				for(var i = 0, resultLength = result.length; i < resultLength; i++) {
390
-//					if(result[i].ParentId === 0) {
391
-//						defaultDatas.push({
392
-//							id: result[i].id,
393
-//							ParentId: result[i].ParentId,
394
-//							text: result[i].text,
395
-//							children: []
396
-//						});
397
-//					} else {
398
-//						childrenObj.push({
399
-//							id: result[i].id,
400
-//							ParentId: result[i].ParentId,
401
-//							text: result[i].text,
402
-//						});
403
-//					}
404
-//				}
405
-//
406
-//				for(var k = 0, defaultDatasLength = defaultDatas.length; k < defaultDatasLength; k++) {
407
-//					for(var j = 0, childrenLength = childrenObj.length; j < childrenLength; j++) {
408
-//						if(defaultDatas[k].id === childrenObj[j].ParentId) {
409
-//							defaultDatas[k].children.push({
410
-//								id: childrenObj[j].id,
411
-//								ParentId: childrenObj[j].ParentId,
412
-//								text: childrenObj[j].text,
413
-//								children: null
414
-//							});
415
-//						}
416
-//					}
417
-//				}
418
-//				var $sTree = $('#reginsTreeView').treeview({
419
-//					color: "#428bca",
420
-//					expandIcon: 'glyphicon glyphicon-chevron-right',
421
-//					collapseIcon: 'glyphicon glyphicon-chevron-down',
422
-//					nodeIcon: 'fa fa-folder-o',
423
-//					//selectedIcon: "glyphicon glyphicon-stop",
424
-//					//icon: "glyphicon glyphicon-stop",
425
-//					//emptyIcon: 'glyphicon',
426
-//					//showCheckbox: true,
427
-//					selectable: true,
428
-//					state: {
429
-//						selected: true
430
-//					},
431
-//					data: defaultDatas,
432
-//					onNodeSelected: function(event, node) {
433
-////						$('#customer_scaleResume').off('focus',function(){
434
-////							$('#btn-select-node').trigger('click');
435
-////						});
436
-//						$sTree.treeview('clearSearch');
437
-//						$('#customer_scaleResume').val(node.text);
438
-//						$('#customer_scaleResume').attr('data-id', node.id);
439
-//						$('#reginsTreeView').removeClass('show').addClass('hidden');
440
-//					},
441
-//					onNodeUnselected: function(event, node) {
442
-////						$('#customer_scaleResume').off('focus',function(){
443
-////							$('#btn-select-node').trigger('click');
444
-////						});
445
-//						$('#customer_scaleResume').val('请选择所购项目');
446
-//						$('#customer_scaleResume').attr('data-id', 0);
447
-//					}
448
-//				});
449
-//				$('#reginsTreeView').treeview('collapseAll', {
450
-//					silent: true
451
-//				});
452
-//				var findSNodes = function() {
453
-//					return $sTree.treeview('search', [$('#customer_scaleResume').val(), {
454
-//						ignoreCase: false,
455
-//						exactMatch: false
456
-//					}]);
457
-//				};
458
-//				
459
-//				var selectableNodes = findSNodes();
460
-//				
461
-//				$('#customer_scaleResume').on('keyup focus', function(e) {
462
-//					selectableNodes = findSNodes();
463
-//				});
464
-////				$('#btn-select-node').on('click', function (e) {
465
-////			        $sTree.treeview('selectNode', [ selectableNodes[0], { silent: true}]);
466
-////			    });
467
-//				
468
-//			}
469
-//
470
-//		}
471
-//	})
472
-//}

+ 0 - 228
CallCenterWeb.UI/keHuManager/js/addOrEditTax.js

@@ -1,228 +0,0 @@
1
-/**
2
- * 修改财税情况
3
- * */
4
-var taxCode; //	string 客户编号	
5
-$(function() {
6
-	var edit_id = helper.request.queryString("edit_id");
7
-	if (edit_id) {
8
-		getCustomer(edit_id);
9
-	}
10
-	$('#tab_user_contents').find("input[class='form-control']").on('blur keyup', valideInput);
11
-});
12
-
13
-//获取详情
14
-function getCustomer(ids) {
15
-	$.getJSON(huayi.config.callcenter_url + "CustomerNew/GetFinc", {
16
-		cusid: ids, //客户id
17
-		token: $.cookie("token")
18
-	}, function(data) {
19
-		if (data.state.toLowerCase() == "success") {
20
-			data = data.data;
21
-			$('#tax_code').val(data.F_CustomerCode); //	string 客户编号	
22
-			taxCode = data.F_CustomerCode; //	string 客户编号	
23
-			$('#tax_MonthState').find('input[type="radio"][value="'+ data.F_MonthState +'"]').prop('checked', true); //	string 本月财税情况:已结清/未结清
24
-			$('#tax_AnnualIncome').val(data.F_AnnualIncome); //	string 本年收入(元)
25
-			$('#tax_AnnualProfit').val(data.F_AnnualProfit); //	string 本年利润	
26
-			$('#tax_AnnualCost').val(data.F_AnnualCost); //	string 本年费用
27
-			$('#tax_AnnualPersonCount').val(data.F_AnnualPersonCount); //	string 本年人数	
28
-			$('#tax_AnnualWages').val(data.F_AnnualWages); //	string 本年工资	
29
-			$('#tax_QuarterlyCost').val(data.F_QuarterlyCost); //	string	本季费用
30
-			$('#tax_QuarterlyPersonCount').val(data.F_QuarterlyPersonCount); //	string	本季人数	
31
-			$('#tax_QuarterlyWages').val(data.F_QuarterlyWages); //	string	本季工资	
32
-			$('#tax_QuarterlyIncome').val(data.F_QuarterlyIncome); //	string	本季收入
33
-			$('#tax_QPVAT').val(data.F_QPVAT); //	string	本季应交税额-增值税	
34
-			$('#tax_QPSurtax').val(data.F_QPSurtax); //	string	本季应交税额-附加税	
35
-			$('#tax_QPTaxes').val(data.F_QPTaxes); //	string	本季应交税额-企业所得税
36
-			$('#tax_QPConTax').val(data.F_QPConTax); //	string	本季应交税额-文化事业建设税	
37
-			$('#tax_QPPerinTax').val(data.F_QPPerinTax); //	string	本季应交税额-个税	
38
-			$('#tax_QPStampTax').val(data.F_QPStampTax); //	string	本季应交税额-其他税额
39
-			$('#tax_AnnualIncome').trigger('blur');
40
-		}
41
-	});
42
-}
43
-
44
-//保存
45
-function saveCustomer() {
46
-	var loadIndex;
47
-	var edit_id = helper.request.queryString("edit_id"); // 客户id
48
-	var mid = helper.request.queryString("mid"); // 财税信息自增id
49
-	$.ajax({
50
-		type: 'post',
51
-		url: huayi.config.callcenter_url + 'CustomerNew/SaveFinance',
52
-		dataType: 'json',
53
-		async: true,
54
-		beforeSend: function() { //触发ajax请求开始时执行
55
-			$('#save_btns').attr("disabled", true);
56
-			$('#save_btns').text('保存中...');
57
-			loadIndex = layer.load();
58
-		},
59
-		data: {
60
-			F_CusFinId: mid, //主ID
61
-			F_CustomerId: edit_id, //int 客户id,允许为0
62
-			F_CustomerCode: taxCode, //	string 客户编号	
63
-			F_MonthState: $('#tax_MonthState').find('input[type="radio"]:checked').val(), //	string 本月财税情况:已结清/未结清
64
-			F_AnnualIncome: $('#tax_AnnualIncome').val(), //	string 本年收入(元)
65
-			F_AnnualProfit: $('#tax_AnnualProfit').val(), //	string 本年利润	
66
-			F_AnnualCost: $('#tax_AnnualCost').val(), //	string 本年费用
67
-			F_AnnualPersonCount: $('#tax_AnnualPersonCount').val(), //	string 本年人数	
68
-			F_AnnualWages: $('#tax_AnnualWages').val(), //	string 本年工资	
69
-			F_QuarterlyCost: $('#tax_QuarterlyCost').val(), //	string	本季费用
70
-			F_QuarterlyPersonCount: $('#tax_QuarterlyPersonCount').val(), //	string	本季人数	
71
-			F_QuarterlyWages: $('#tax_QuarterlyWages').val(), //	string	本季工资	
72
-			F_QuarterlyIncome: $('#tax_QuarterlyIncome').val(), //	string	本季收入
73
-			F_QPVAT: $('#tax_QPVAT').val(), //	string	本季应交税额-增值税	
74
-			F_QPSurtax: $('#tax_QPSurtax').val(), //	string	本季应交税额-附加税	
75
-			F_QPTaxes: $('#tax_QPTaxes').val(), //	string	本季应交税额-企业所得税
76
-			F_QPConTax: $('#tax_QPConTax').val(), //	string	本季应交税额-文化事业建设税	
77
-			F_QPPerinTax: $('#tax_QPPerinTax').val(), //	string	本季应交税额-个税	
78
-			F_QPStampTax: $('#tax_QPStampTax').val(), //	string	本季应交税额-其他税额
79
-			token: $.cookie("token")
80
-		},
81
-		success: function(data) {
82
-			layer.close(loadIndex);
83
-			if (data.state === "success") {
84
-				var index = parent.layer.getFrameIndex(window.name);
85
-				parent.layer.close(index);
86
-				parent.getTaxDetail(edit_id); //获取财税情况
87
-				parent.layer.msg("保存成功");
88
-			} else {
89
-				$('#save_btns').attr("disabled", false);
90
-				$('#save_btns').text('保存');
91
-			}
92
-		},
93
-		error: function(textStatus) {
94
-			layer.close(loadIndex);
95
-			layer.confirm('网络繁忙,请稍后再试...', {
96
-				icon: 7,
97
-				closeBtn: 0,
98
-				btn: ['确定'] //按钮
99
-			});
100
-			$('#save_btns').attr("disabled", false);
101
-			$('#save_btns').text('保存');
102
-		},
103
-		complete: function(XMLHttpRequest, textStatus) {
104
-			layer.close(loadIndex);
105
-			if (textStatus == 'timeout') {
106
-				var xmlhttp = window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHttp");
107
-				xmlhttp.abort();
108
-				layer.confirm('网络超时,请稍后再试...', {
109
-					icon: 7,
110
-					closeBtn: 0,
111
-					btn: ['确定'] //按钮
112
-				});
113
-			}
114
-			$('#save_btns').attr("disabled", false);
115
-			$('#save_btns').text('保存');
116
-		},
117
-	});
118
-}
119
-
120
-
121
-//验证(所有 input.form-control)的方法
122
-function valideInput() {
123
-	var _that = $(this);
124
-	//console.log($(this).attr('id'));
125
-	switch($(this).attr('id')) {
126
-		case 'tax_AnnualIncome': //本年收入
127
-			valideMethods(_that, regexs.amountMoney, '格式不正确(只能输入中文、英文、正数)!', true);
128
-			break;
129
-		case 'tax_AnnualProfit': //本年利润
130
-			valideMethods(_that, regexs.profitMoney, '格式不正确(只能输入中文、英文、正负数)!', true);
131
-			break;
132
-		case 'tax_AnnualCost': //本年费用
133
-			valideMethods(_that, regexs.amountMoney, '格式不正确(只能输入中文、英文、正数)!', true);
134
-			break;
135
-		case 'tax_AnnualPersonCount': //本年人数
136
-			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
137
-			break;
138
-		case 'tax_AnnualWages': //本年工资
139
-			valideMethods(_that, regexs.amountMoney, '格式不正确(只能输入中文、英文、正数)!', true);
140
-			break;
141
-		case 'tax_QuarterlyCost': //本季费用
142
-			valideMethods(_that, regexs.amountMoney, '格式不正确(只能输入中文、英文、正数)!', true);
143
-			break;
144
-		case 'tax_QuarterlyPersonCount': //本季人数
145
-			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
146
-			break;
147
-		case 'tax_QuarterlyWages': //本季工资
148
-			valideMethods(_that, regexs.amountMoney, '格式不正确(只能输入中文、英文、正数)!', true);
149
-			break;
150
-		case 'tax_QuarterlyIncome': //本季收入
151
-			valideMethods(_that, regexs.amountMoney, '格式不正确(只能输入中文、英文、正数)!', true);
152
-			break;
153
-		case 'tax_QPSurtax': //本季应交税额-增值税
154
-			valideMethods(_that, regexs.amountMoney, '格式不正确(只能输入中文、英文、正数)!', true);
155
-			break;
156
-		case 'tax_QPSurtax': //本季应交税额-附加税
157
-			valideMethods(_that, regexs.amountMoney, '格式不正确(只能输入中文、英文、正数)!', true);
158
-			break;
159
-		case 'tax_QPTaxes': //本季应交税额-企业所得税
160
-			valideMethods(_that, regexs.amountMoney, '格式不正确(只能输入中文、英文、正数)!', true);
161
-			break;
162
-		case 'tax_QPConTax': //本季应交税额-文化事业建设税
163
-			valideMethods(_that, regexs.amountMoney, '格式不正确(只能输入中文、英文、正数)!', true);
164
-			break;
165
-		case 'tax_QPPerinTax': //本季应交税额-个税
166
-			valideMethods(_that, regexs.amountMoney, '格式不正确(只能输入中文、英文、正数)!', true);
167
-			break;
168
-		case 'tax_QPStampTax': //本季应交税额-其他税额
169
-			valideMethods(_that, regexs.amountMoney, '格式不正确(只能输入中文、英文、正数)!', true);
170
-			break;
171
-	}
172
-	
173
-	if ($('#tab_user_contents').find('.has-error').length > 0) {
174
-		$('.project_save').attr('disabled', true);
175
-		$('#save_btns').off('click', saveCustomer);
176
-	} else {
177
-		$('.project_save').attr('disabled', false);
178
-		$('#save_btns').off('click', saveCustomer);
179
-		$('#save_btns').on('click', saveCustomer);
180
-	}
181
-}
182
-/**
183
- * 验证方法
184
- * _this :传递的this
185
- * regRlues: 验证的规则
186
- * msg: 提示信息
187
- * isRes:boolean 是否允许验证的内容为空,true:允许为空,false:不允许为空
188
- * */
189
-function valideMethods(_this, regRlues, msg, isRes) {
190
-	var txtTpips = _this.parent().parent().find('.text-tips');
191
-	if (txtTpips) {
192
-		txtTpips.parent().remove();
193
-	}
194
-	if (!isRes) {
195
-		//不为空
196
-		if (!regRlues.test($.trim(_this.val()))) {
197
-			_this.parent().parent().removeClass('has-success has-feedback').addClass('has-error has-feedback');
198
-			_this.parent().find('.glyphicon').remove();
199
-			$('<span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"></span>').appendTo(_this.parent());
200
-			$('<div class="col-md-10 col-md-offset-2"><span class="text-tips">' + msg + '</span></div>').appendTo(_this.parent()
201
-				.parent());
202
-			$('.project_save').attr('disabled', true);
203
-		} else {
204
-			_this.parent().parent().removeClass('has-error has-feedback').addClass('has-success has-feedback');
205
-			_this.parent().find('.glyphicon').remove();
206
-			$('<span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>').appendTo(_this.parent());
207
-		}
208
-	} else {
209
-		//为空不验证;但是有内容就验证;
210
-		if ($.trim(_this.val())) {
211
-			if (!regRlues.test($.trim(_this.val()))) {
212
-				_this.parent().parent().removeClass('has-success has-feedback').addClass('has-error has-feedback');
213
-				_this.parent().find('.glyphicon').remove();
214
-				$('<span class="glyphicon glyphicon-remove form-control-feedback" aria-hidden="true"></span>').appendTo(_this.parent());
215
-				$('<div class="col-md-10 col-md-offset-2"><span class="text-tips">' + msg + '</span></div>').appendTo(_this.parent()
216
-					.parent());
217
-				$('.project_save').attr('disabled', true);
218
-			} else {
219
-				_this.parent().parent().removeClass('has-error has-feedback').addClass('has-success has-feedback');
220
-				_this.parent().find('.glyphicon').remove();
221
-				$('<span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>').appendTo(_this.parent());
222
-			}
223
-		} else {
224
-			_this.parent().find('.glyphicon').remove();
225
-			_this.parent().parent().removeClass('has-error has-success has-feedback');
226
-		}
227
-	}
228
-}

+ 0 - 210
CallCenterWeb.UI/keHuManager/js/cusDetails.js

@@ -1,210 +0,0 @@
1
-/**
2
- * 客户信息详情
3
- * */
4
-
5
-var taxCusFinId;// 财税信息自增id
6
-var taxCustomerId;// 客户id
7
-
8
-$(document).ready(function() {
9
-	var edit_id = helper.request.queryString("edit_id");
10
-	if (edit_id) {
11
-		getCustomer(edit_id); //获取客户信息
12
-		getTaxDetail(edit_id).then(function(data){
13
-			if($.cookie("userRoleId") == '17' || $.cookie("userRoleId") == '57' ){
14
-				$('.hide_btn').show();
15
-				$('#btn_editTax').show();
16
-			}
17
-			taxCusFinId = data.F_CusFinId;// 财税信息自增id
18
-			taxCustomerId = data.F_CustomerId;// 客户id
19
-		}); //获取财税情况
20
-	}
21
-});
22
-
23
-//获取客户详情
24
-function getCustomer(ids) {
25
-	$.getJSON(huayi.config.callcenter_url + "Customer/GetCustomer", {
26
-		cid: ids, //客户id
27
-		token: $.cookie("token")
28
-	}, function(data) {
29
-		if (data.state.toLowerCase() == "success") {
30
-			var cusBase = data.data;
31
-			// $('#customer_bedept').text(data.data && data.data.BeDeptName); // int 客户归属部门
32
-		
33
-				// $('#customer_key').text(cusBase.F_KeyWords); //string 关键词	
34
-				$('#customer_code').text(cusBase.F_CustomerCode); //string 客户编号
35
-				$('#customer_companyname').text(cusBase.F_LegalName); //string 客户姓名
36
-				$('#customer_comaddress').text(cusBase.F_LegalTel); //string 客户电话
37
-				$('#customer_legalName').text(cusBase.F_Address); //string 客户地址 
38
-				$('#customer_lehalTel').text(cusBase.F_CreatedOn); //string 创建时间  
39
-			    $('#customer_subtrade').text(cusBase.F_Gender); //string 客户地址 
40
-				
41
-		
42
-			var cusLists = data.data && data.data.ContactList;
43
-			if (cusLists && cusLists.length > 0) {
44
-				$('#cusLists').empty();
45
-				$('#conectLits').show();
46
-				for (var i = 0; i < cusLists.length; i++) {
47
-					var tplstr = '';
48
-					tplstr = '<div class="clearfix cusListItem">'+
49
-										'<a href="javascript:;" class="aBtn hide_btn" onclick="btn_edit(\''+ cusLists[i].F_CustomerId +'\',\''+ cusLists[i].F_ManId +'\')" title="修改">修改</a>'+
50
-										'<a href="javascript:;" class="aBtn aBtn1 hide_btn" onclick="btn_delete(\''+ cusLists[i].F_ManId +'\')" title="删除">删除</a>'+
51
-										'<li class="col-md-3 col-sm-4">' +
52
-											'<label>姓名:</label>' +
53
-											'<span>'+ cusLists[i].F_Name +'</span>' +
54
-										'</li>'+
55
-										'<li class="col-md-3 col-sm-4">' +
56
-											'<label>电话:</label>' +
57
-											'<a href="jvascript:;" onclick="calloutopt('+ cusLists[i].F_Telephone +')">'+ helper.filter.cutTel(cusLists[i].F_Telephone) +'<img src="../img/Phones.png" alt="phone" /></a>'+
58
-										'</li>'+
59
-										'<li class="col-md-3 col-sm-4">' +
60
-											'<label>邮箱:</label>' +
61
-											'<span>'+ cusLists[i].F_Email +'</span>' +
62
-										'</li>'+
63
-										'<li class="col-md-3 col-sm-4">' +
64
-											'<label>职务:</label>' +
65
-											'<span>'+ cusLists[i].F_Duties +'</span>' +
66
-										'</li>'+
67
-										'<li class="col-md-3 col-sm-4">' +
68
-											'<label>QQ:</label>' +
69
-											'<span>'+ cusLists[i].F_QQ +'</span>' +
70
-										'</li>'+
71
-										'<li class="col-md-3 col-sm-4">' +
72
-											'<label>MSN:</label>' +
73
-											'<span>'+ cusLists[i].F_MSN +'</span>' +
74
-										'</li>'+
75
-										'<li class="col-md-12 col-sm-12">' +
76
-											'<label>备注:</label>' +
77
-											'<span>'+ cusLists[i].F_Remark +'</span>' +
78
-										'</li>'+
79
-										'<li class="col-md-12 col-sm-12">'+
80
-											'<label for="customer_F_IsMain">是否主要联系人:</label>'+
81
-											'<span>'+ (cusLists[i].F_IsMain === true ? '是' : '否') +'</span>'+
82
-										'</li>'+
83
-										'</div>';
84
-					$('#cusLists').append(tplstr);
85
-					
86
-					if($.cookie("userRoleId") == '17' || $.cookie("userRoleId") == '57' ){
87
-						$('.hide_btn').show();
88
-					}
89
-					
90
-				}
91
-			}
92
-		}
93
-	});
94
-}
95
-
96
-// //获取财税情况
97
-// function getTaxDetail(ids){
98
-// 	var dtd = $.Deferred();
99
-// 	$.getJSON(huayi.config.callcenter_url + "CustomerNew/GetFinc",{
100
-// 		cusid: ids, // 客户id
101
-// 		token: $.cookie("token")
102
-// 	},function(data){
103
-// 		if(data.state.toLowerCase() === 'success'){
104
-// 			data = data.data;
105
-// 			$('#tax_code').text(data.F_CustomerCode); //	string 客户编号	
106
-// 			$('#tax_MonthState').text(data.F_MonthState); //	string 本月财税情况:已结清/未结清
107
-// 			$('#tax_AnnualIncome').text(data.F_AnnualIncome); //	string 本年收入(元)
108
-// 			$('#tax_AnnualProfit').text(data.F_AnnualProfit); //	string 本年利润	
109
-// 			$('#tax_AnnualCost').text(data.F_AnnualCost); //	string 本年费用
110
-// 			$('#tax_AnnualPersonCount').text(data.F_AnnualPersonCount); //	string 本年人数	
111
-// 			$('#tax_AnnualWages').text(data.F_AnnualWages); //	string 本年工资	
112
-// 			$('#tax_QuarterlyCost').text(data.F_QuarterlyCost); //	string	本季费用
113
-// 			$('#tax_QuarterlyPersonCount').text(data.F_QuarterlyPersonCount); //	string	本季人数	
114
-// 			$('#tax_QuarterlyWages').text(data.F_QuarterlyWages); //	string	本季工资	
115
-// 			$('#tax_QuarterlyIncome').text(data.F_QuarterlyIncome); //	string	本季收入
116
-// 			$('#tax_QPVAT').text(data.F_QPVAT); //	string	本季应交税额-增值税	
117
-// 			$('#tax_QPSurtax').text(data.F_QPSurtax); //	string	本季应交税额-附加税	
118
-// 			$('#tax_QPTaxes').text(data.F_QPTaxes); //	string	本季应交税额-企业所得税
119
-// 			$('#tax_QPConTax').text(data.F_QPConTax); //	string	本季应交税额-文化事业建设税	
120
-// 			$('#tax_QPPerinTax').text(data.F_QPPerinTax); //	string	本季应交税额-个税	
121
-// 			$('#tax_QPStampTax').text(data.F_QPStampTax); //	string	本季应交税额-其他税额
122
-// 			dtd.resolve(data);
123
-// 		}
124
-// 	});
125
-// 	return dtd.promise();
126
-// }
127
-
128
-/**
129
- * 修改财税情况
130
- * editId 客户id
131
- * mid 自增id
132
- * */
133
-function btn_editTax() {
134
-	layer.open({
135
-		type: 2,
136
-		title: '修改财税情况',
137
-		maxmin: true, //开启最大化最小化按钮
138
-		area: ['60%', '70%'],
139
-		content: '../commonTpl/addOrEditTax.html?edit_id=' + taxCustomerId + '&mid=' + taxCusFinId
140
-	});
141
-}
142
-
143
-/**
144
- * 修改联系人信息
145
- * editId 客户id
146
- * */
147
-function btn_edit(editId, mid) {
148
-	layer.open({
149
-		type: 2,
150
-		title: '修改联系人信息',
151
-		maxmin: true, //开启最大化最小化按钮
152
-		area: ['60%', '70%'],
153
-		content: '../commonTpl/addOrEditContacts.html?edit_id=' + editId + '&mid=' + mid
154
-	});
155
-}
156
-
157
-//删除
158
-function btn_delete(cid) {
159
-	layer.confirm('确定删除当前联系人信息吗?', {
160
-		icon: 7,
161
-		btn: ['是', '否'] //按钮
162
-	}, function(index) {
163
-		/*执行删除*/
164
-		$.ajax({
165
-			type: "post",
166
-			url: huayi.config.callcenter_url + "CustomerNew/DelContact",
167
-			dataType: 'json',
168
-			async: true,
169
-			data: {
170
-				ids: cid,//客户Id,可多选[1,2,3]
171
-				token: $.cookie("token")
172
-			},
173
-			success: function(data) {
174
-				layer.msg("删除成功!");
175
-				var edit_id = helper.request.queryString("edit_id");
176
-				if (edit_id) {
177
-					getCustomer(edit_id); //获取客户信息
178
-				}
179
-				layer.close(index);
180
-			}
181
-		});
182
-	});
183
-}
184
-
185
-//外呼
186
-function calloutopt(telphone) {
187
-	event.stopPropagation();
188
-	if(telphone) {
189
-		$.ajax({
190
-			type: "get",
191
-			url: huayi.config.callcenter_url + "CallOutOpt/GetCallOutprefix",
192
-			async: true,
193
-			dataType: 'json',
194
-			data: {
195
-				phone: telphone,
196
-				token: $.cookie("token")
197
-			},
198
-			success: function(result) {
199
-				if(result.state.toLowerCase() === "success") {
200
-					top.obj.Type = "MakeCall";
201
-					top.obj.DestinationNumber = result.data.phone;
202
-					top.obj.Header = result.data.fix;
203
-					top.obj.TaskType = "0"; //0:拨号外呼;1:问卷外呼;
204
-					top.obj.TaskPhoneID = ''; // 原来是 回访的电话工单ID
205
-					top.Send();
206
-				}
207
-			}
208
-		});
209
-	}
210
-}

+ 0 - 191
CallCenterWeb.UI/keHuManager/js/customerInfo.js

@@ -1,191 +0,0 @@
1
-/**
2
- * 客户信息
3
- * */
4
-
5
-$(document).ready(function() {
6
-	//初始化时间
7
-// 	laydate.render({
8
-// 		elem: '#sc_time',
9
-// 		range: '~',
10
-// 		theme: '#1ab394',
11
-// 		calendar: true
12
-// 	});
13
-
14
-	//获取所属行业
15
-	// helper.getDropList.getlistDropByDic($('#sc_subtrade'), 'KHSSHY');
16
-
17
-	//获取客户信誉等级
18
-	// helper.getDropList.getlistDropByDic($('#sc_layer'), 'KHLayer');
19
-	
20
-	if($.cookie("userRoleId") == '17' || $.cookie("userRoleId") == '57' ){
21
-		$('.hide_btn').show();
22
-	}
23
-	initTable();
24
-	$("#sc_btns").on('click',initTable);
25
-	$('#btn_add').on('click', btn_add);
26
-});
27
-
28
-//客户信息的列表
29
-function initTable() {
30
-	//先销毁表格
31
-	$('#cusList').bootstrapTable('destroy');
32
-	//初始化表格,动态从服务器加载数据
33
-	$("#cusList").bootstrapTable({
34
-		method: "get", //使用get请求到服务器获取数据
35
-		url: huayi.config.callcenter_url + "Customer/GetList", //获取数据的Servlet地址
36
-		contentType: 'application/x-www-form-urlencoded',
37
-		striped: true, //表格显示条纹
38
-		pagination: true, //启动分页
39
-		pageSize: 10, //每页显示的记录数
40
-		pageNumber: 1, //当前第几页
41
-		pageList: [10, 20, 50, 100], //记录数可选列表
42
-		search: false, //是否启用查询
43
-		showColumns: false, //显示下拉框勾选要显示的列
44
-		showRefresh: false, //显示刷新按钮
45
-		sidePagination: "server", //表示服务端请求
46
-		//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
47
-		//设置为limit可以获取limit, offset, search, sort, order
48
-		queryParamsType: "undefined",
49
-		queryParams: function queryParams(params) { //设置查询参数
50
-			var param = {
51
-				pageindex: params.pageNumber, //int 页码,默认为1	
52
-				pagesize: params.pageSize, //int 条数,默认为10
53
-				keyword: $('#sc_key').val(),//string 关键词
54
-				tel: $('#sc_contel').val(),//string 客户电话
55
-				
56
-				token: $.cookie("token")
57
-			};
58
-			return param;
59
-		},
60
-		onLoadSuccess: function() { //加载成功时执行
61
-			//layer.msg("加载成功");
62
-			if($.cookie("userRoleId") == '17' || $.cookie("userRoleId") == '57' ){
63
-				$('.hide_btn').show();
64
-			}
65
-		},
66
-		onLoadError: function() { //加载失败时执行
67
-			//layer.msg("加载数据失败", { time: 1500, icon: 2 });
68
-		}
69
-	});
70
-}
71
-
72
-
73
-//格式化操作
74
-function formatterOprate(val, row) {
75
-	return '<ul class="tool_downs">' +
76
-		'<li><a href="javascript:;" class="aBtn" authorize="yes" id="HY_details_' + row.F_CustomerId + '" onclick="btn_details(\'' + row.F_CustomerId + '\')" title="详情">详情</a></li>' +
77
-		'<li><a href="javascript:;" class="aBtn hide_btn" authorize="yes" id="HY_edit_' + row.F_CustomerId + '" onclick="btn_edit(\'' + row.F_CustomerId + '\')" title="修改">修改</a></li>' +
78
-		// '<li><a href="javascript:;" class="aBtn" authorize="yes" id="HY_addCus_' + row.F_CustomerId + '" onclick="btn_addCus(\'' + row.F_CustomerId + '\')" title="添加联系人信息">添加</a></li>' +
79
-		'<li><a href="javascript:;" class="aBtn hide_btn" authorize="yes" id="HY_delete_' + row.F_CustomerId + '" onclick="btn_delete(' + row.F_CustomerId + ')" title="删除">删除</a></li>' +
80
-		'</ul>';
81
-}
82
-
83
-
84
-/**
85
- * 添加
86
- * */
87
-function btn_add() {
88
-	layer.open({
89
-		type: 2,
90
-		title: '添加客户信息',
91
-		maxmin: true, //开启最大化最小化按钮
92
-		area: ['80%', '90%'],
93
-		content: '../commonTpl/addOrEditCusInfo.html'
94
-	});
95
-}
96
-
97
-/**
98
- * 修改
99
- * editId 客户id
100
- * */
101
-function btn_edit(editId) {
102
-	layer.open({
103
-		type: 2,
104
-		title: '修改客户信息',
105
-		maxmin: true, //开启最大化最小化按钮
106
-		area: ['80%', '90%'],
107
-		content: '../commonTpl/addOrEditCusInfo.html?edit_id=' + editId
108
-	});
109
-}
110
-
111
-/**
112
- * 详情
113
- * editId 客户id
114
- * */
115
-function btn_details(editId) {
116
-	layer.open({
117
-		type: 2,
118
-		title: '客户信息详情',
119
-		maxmin: true, //开启最大化最小化按钮
120
-		area: ['80%', '90%'],
121
-		content: '../commonTpl/cusDetails.html?edit_id=' + editId
122
-	});
123
-}
124
-
125
-/**
126
- * 添加联系人信息
127
- * editId 客户id
128
- * */
129
-function btn_addCus(editId) {
130
-	layer.open({
131
-		type: 2,
132
-		title: '添加联系人信息',
133
-		maxmin: true, //开启最大化最小化按钮
134
-		area: ['60%', '70%'],
135
-		content: '../commonTpl/addOrEditContacts.html?edit_id=' + editId
136
-	});
137
-}
138
-
139
-//导入客户信息
140
-function btn_export() {
141
-	layer.open({
142
-		maxmin: true, //开启最大化最小化按钮
143
-		type: 2,
144
-		content: "../commonTpl/importCustomers.html", //iframe的url,no代表不显示滚动条
145
-		title: '导入客户信息',
146
-		area: ['50%', '55%'], //宽高
147
-	});
148
-}
149
-
150
-
151
-//批量删除
152
-function btn_deletes() {
153
-	var ids = $.map($('#cusList').bootstrapTable('getSelections'),
154
-		function(row) {
155
-			return row.F_CustomerId;
156
-		});
157
-	/*判断长度*/
158
-	if (ids.length <= 0) {
159
-		layer.confirm('请选择要删除的选项', {
160
-			icon: 7,
161
-			btn: ['确定'] //按钮
162
-		});
163
-		return;
164
-	}
165
-	btn_delete(ids);
166
-}
167
-
168
-//删除
169
-function btn_delete(cid) {
170
-	layer.confirm('确定删除当前记录?', {
171
-		icon: 7,
172
-		btn: ['是', '否'] //按钮
173
-	}, function(index) {
174
-		/*执行删除*/
175
-		$.ajax({
176
-			type: "post",
177
-			url: huayi.config.callcenter_url + "Customer/DelCustomer",
178
-			dataType: 'json',
179
-			async: true,
180
-			data: {
181
-				ids: cid,//客户Id,可多选[1,2,3]
182
-				token: $.cookie("token")
183
-			},
184
-			success: function(data) {
185
-				layer.msg("删除成功!");
186
-				$('#cusList').bootstrapTable('refresh');
187
-				layer.close(index);
188
-			}
189
-		});
190
-	});
191
-}

+ 0 - 831
CallCenterWeb.UI/keHuManager/js/keHuManger.js

@@ -1,831 +0,0 @@
1
-/**
2
- * 客户档案管理
3
- * */
4
-var table; //业主
5
-var table1; //住户
6
-var token = $.cookie("token");
7
-$(function() {
8
-	layui.use('laydate', function() {
9
-		var laydate = layui.laydate;
10
-		//日期
11
-		laydate.render({
12
-			elem: '#s_times',
13
-			range: '~',
14
-			theme: '#1ab394',
15
-			calendar: true,
16
-		});
17
-	});
18
-	//获取区域项目期号
19
-	helper.getDropList.getProLocations($('#sc_rengin'), $('#sc_pro'), $('#sc_floor'));
20
-	
21
-	getTableDataList(); //获取业主信息
22
-	$('.search').click(function() {
23
-		getTableDataList();
24
-		$('#t_callTotal1').siblings('.layui-form').hide();
25
-	});
26
-
27
-	//上传文件
28
-	$("#btndr").click(function() {
29
-		$("#upFile").trigger("click");
30
-	})
31
-	$("#upFile").change(function() {
32
-		upload();
33
-	})
34
-});
35
-//加载表格业主信息
36
-function getTableDataList() {
37
-	layui.use('table', function() {
38
-		table = layui.table;
39
-
40
-		table.on('tool(demoEvent)', function(obj) {
41
-			var data = obj.data;
42
-			if(obj.event === 'showInfo') {
43
-				getHouseHoldList(data.F_CustomerId);
44
-			}
45
-		});
46
-
47
-		//方法级渲染
48
-		table.render({
49
-			elem: '#t_callTotal',
50
-			url: huayi.config.callcenter_url + "Customer/GetList",
51
-			method: 'get', //如果无需自定义HTTP类型,可不加该参数
52
-			skin: 'row', //line (行边框风格) row (列边框风格) nob (无边框风格)
53
-			even: true, //开启隔行背景
54
-			size: 'md', //sm,lg,md尺寸的表格
55
-			cellMinWidth: 180,
56
-			loading: true,
57
-			page: true,
58
-			limits: [10, 15, 20, 50, 100],
59
-			where: {
60
-				pid: 0,
61
-				name: $('#s_name').val(), //是	string	姓名
62
-				tel: $('#s_tel').val(), //电话	是	string	电话
63
-				starttime: $('#s_times').val() && $('#s_times').val().split(' ~ ')[0], //是	开始
64
-				endtime: $('#s_times').val() && $('#s_times').val().split(' ~ ')[1], //否	结束	
65
-				areaid: $('#sc_rengin').val(), //否	string	区域id
66
-				regionid: $('#sc_pro').val(), //否	string	项目id
67
-				stageid: $('#sc_floor').val(), //否	string	期号id
68
-				token: token,
69
-			}, //如果无需传递额外参数,可不加该参数
70
-			request: {
71
-				pageName: 'page', //页码的参数名称,默认:page
72
-				limitName: 'pagesize' //每页数据量的参数名,默认:limit
73
-			},
74
-			response: {
75
-				statusName: 'state', //数据状态的字段名称,默认:code
76
-				statusCode: 'success', //成功的状态码,默认:0
77
-				msgName: 'message', //状态信息的字段名称,默认:msg
78
-				countName: 'total', //数据总数的字段名称,默认:count
79
-				dataName: 'rows', //数据列表的字段名称,默认:data
80
-			}, //如果无需自定义数据响应名称,可不加该参数
81
-			cols: [
82
-				[{
83
-						field: 'F_CustomerName',
84
-						title: '姓名',
85
-						align: 'center',
86
-						event: 'showInfo',
87
-						style: 'cursor: pointer;',
88
-						fixed: true,
89
-						sort: true,
90
-						width: 140,
91
-					},
92
-					{
93
-						field: 'F_Mobile',
94
-						title: '手机号码',
95
-						event: 'showInfo',
96
-						style: 'cursor: pointer;',
97
-						align: 'center',
98
-						width: 120,
99
-					},
100
-					{
101
-					    field: 'F_StatusCodeName',
102
-						title: '微信会员',
103
-						event: 'showInfo',
104
-						style: 'cursor: pointer;',
105
-						align: 'center',
106
-						width: 90,
107
-					},
108
-                    {
109
-                        field: 'CustomerTypeName',
110
-                        title: '客户类型',
111
-                        event: 'showInfo',
112
-                        style: 'cursor: pointer;',
113
-                        align: 'center',
114
-                        width: 90,
115
-                    },
116
-					{
117
-						field: 'OwnerRelations',
118
-						title: '房主关系',
119
-						event: 'showInfo',
120
-						style: 'cursor: pointer;',
121
-						align: 'center',
122
-						width: 90,
123
-					},
124
-					{
125
-					    field: 'areaname',
126
-					    title: '区域',
127
-					    event: 'showInfo',
128
-					    style: 'cursor: pointer;',
129
-					    align: 'center',
130
-					    width: '',
131
-					},
132
-					{
133
-						field: 'ProName',
134
-						title: '项目',
135
-						event: 'showInfo',
136
-						style: 'cursor: pointer;',
137
-						align: 'center',
138
-						width: '',
139
-					},
140
-					{
141
-					    field: 'buldingname',
142
-						title: '期',
143
-						event: 'showInfo',
144
-						style: 'cursor: pointer;',
145
-						align: 'center',
146
-						width: 80,
147
-					},
148
-					{
149
-					    field: 'F_CustomerNature',
150
-						title: '楼号',
151
-						event: 'showInfo',
152
-						style: 'cursor: pointer;',
153
-						align: 'center',
154
-						width: 80,
155
-					},
156
-					{
157
-					    field: 'F_CustomerClass',
158
-						title: '单元号',
159
-						event: 'showInfo',
160
-						style: 'cursor: pointer;',
161
-						align: 'center',
162
-						width: 80,
163
-					},
164
-					{
165
-						field: 'F_BusinessLicenseID',
166
-						title: '楼层信息(房间号)',
167
-						event: 'showInfo',
168
-						style: 'cursor: pointer;',
169
-						align: 'center',
170
-						width: '',
171
-					},
172
-					{
173
-						field: 'F_Address',
174
-						title: '通讯住址',
175
-						event: 'showInfo',
176
-						style: 'cursor: pointer;',
177
-						align: 'center',
178
-						width: '',
179
-					},
180
-					{
181
-						field: 'F_TradeId',
182
-						title: '总房款',
183
-						event: 'showInfo',
184
-						style: 'cursor: pointer;',
185
-						align: 'center',
186
-						width: '',
187
-					},
188
-
189
-					{
190
-						field: 'F_RegionId',
191
-						title: '老带新套数',
192
-						event: 'showInfo',
193
-						style: 'cursor: pointer;',
194
-						align: 'center',
195
-						width: '',
196
-					},
197
-					{
198
-						field: 'F_BankAccount',
199
-						title: '老带新项目',
200
-						event: 'showInfo',
201
-						style: 'cursor: pointer;',
202
-						align: 'center',
203
-						width: '',
204
-					},
205
-					{
206
-						field: 'F_LegalRepresentative',
207
-						title: '置业顾问',
208
-						event: 'showInfo',
209
-						style: 'cursor: pointer;',
210
-						align: 'center',
211
-						width: '',
212
-					},
213
-					{
214
-						field: 'F_CustomerEName',
215
-						title: '性别(男,女)',
216
-						event: 'showInfo',
217
-						style: 'cursor: pointer;',
218
-						align: 'center',
219
-						width: 80,
220
-					},
221
-					{
222
-						field: 'F_CustomerPym',
223
-						title: '出生年月',
224
-						event: 'showInfo',
225
-						style: 'cursor: pointer;',
226
-						align: 'center',
227
-						width: '',
228
-					},
229
-					{
230
-						field: 'F_LegalRepresentativeCardID',
231
-						title: '身份证号',
232
-						event: 'showInfo',
233
-						style: 'cursor: pointer;',
234
-						align: 'center',
235
-						width: '',
236
-					},
237
-					{
238
-						field: 'F_Nature',
239
-						title: '籍贯',
240
-						event: 'showInfo',
241
-						style: 'cursor: pointer;',
242
-						align: 'center',
243
-						width: '',
244
-					},
245
-					{
246
-						field: 'F_Url',
247
-						title: '车辆品牌',
248
-						event: 'showInfo',
249
-						style: 'cursor: pointer;',
250
-						align: 'center',
251
-						width: '',
252
-					},
253
-					{
254
-						field: 'F_Kind',
255
-						title: '车牌号码',
256
-						event: 'showInfo',
257
-						style: 'cursor: pointer;',
258
-						align: 'center',
259
-						width: '',
260
-					},
261
-					//					{
262
-					//						field: 'F_Telephone',
263
-					//						title: '电话',
264
-					//						event: 'showInfo',
265
-					//						style: 'cursor: pointer;',
266
-					//						align: 'center',
267
-					//						width: '',
268
-					//					},
269
-					//					{
270
-					//						field: 'F_Fax',
271
-					//						title: '传真',
272
-					//						event: 'showInfo',
273
-					//						style: 'cursor: pointer;',
274
-					//						align: 'center',
275
-					//						width: '',
276
-					//					},
277
-					//					{
278
-					//						field: 'F_Email',
279
-					//						title: '邮箱',
280
-					//						event: 'showInfo',
281
-					//						style: 'cursor: pointer;',
282
-					//						align: 'center',
283
-					//						width: '',
284
-					//					},
285
-					{
286
-						field: 'F_CustomerLayer',
287
-						title: '学历',
288
-						event: 'showInfo',
289
-						style: 'cursor: pointer;',
290
-						align: 'center',
291
-						templet: function(d) {
292
-							return '<span>'+ formatterEducation(d.F_CustomerLayer) +'</span>';
293
-						},
294
-						width: '',
295
-					},
296
-					{
297
-						field: 'F_PostCode',
298
-						title: '收入层次',
299
-						event: 'showInfo',
300
-						style: 'cursor: pointer;',
301
-						align: 'center',
302
-						width: '',
303
-					},
304
-					{
305
-						field: 'F_CustomerCode',
306
-						title: '客户工作单位',
307
-						event: 'showInfo',
308
-						style: 'cursor: pointer;',
309
-						align: 'center',
310
-						width: '',
311
-					},
312
-					{
313
-						field: 'F_BusinessProfile',
314
-						title: '客户职业',
315
-						event: 'showInfo',
316
-						style: 'cursor: pointer;',
317
-						align: 'center',
318
-						width: '',
319
-					},
320
-					{
321
-						field: 'F_OpeningBank',
322
-						title: '职务',
323
-						event: 'showInfo',
324
-						style: 'cursor: pointer;',
325
-						align: 'center',
326
-						width: '',
327
-					},
328
-					{
329
-						field: 'F_Website',
330
-						title: '兴趣爱好',
331
-						event: 'showInfo',
332
-						style: 'cursor: pointer;',
333
-						align: 'center',
334
-						width: '',
335
-					},
336
-					{
337
-						field: 'F_TaxID',
338
-						title: '婚姻状况',
339
-						event: 'showInfo',
340
-						style: 'cursor: pointer;',
341
-						align: 'center',
342
-						width: 80,
343
-					},
344
-					{
345
-						field: 'F_MainProduct',
346
-						title: '家庭人口',
347
-						event: 'showInfo',
348
-						style: 'cursor: pointer;',
349
-						align: 'center',
350
-						width: 80,
351
-					},
352
-					{
353
-						field: 'F_CustomerFrom',
354
-						title: '客户配偶情况',
355
-						event: 'showInfo',
356
-						style: 'cursor: pointer;',
357
-						align: 'center',
358
-						width: '',
359
-					},
360
-					{
361
-						field: 'F_TrackInfo',
362
-						title: '客户子女情况',
363
-						event: 'showInfo',
364
-						style: 'cursor: pointer;',
365
-						align: 'center',
366
-						width: '',
367
-					},
368
-					{
369
-						field: 'F_TrackState',
370
-						title: '客户父母情况',
371
-						event: 'showInfo',
372
-						style: 'cursor: pointer;',
373
-						align: 'center',
374
-						width: '',
375
-					},
376
-					{
377
-						field: 'F_ImportDegree',
378
-						title: '客户消费偏好',
379
-						event: 'showInfo',
380
-						style: 'cursor: pointer;',
381
-						align: 'center',
382
-						width: '',
383
-					},
384
-					{
385
-						field: 'F_Notes',
386
-						title: '备注',
387
-						event: 'showInfo',
388
-						style: 'cursor: pointer;',
389
-						align: 'center',
390
-						width: '',
391
-					},
392
-					{
393
-						field: 'F_CustomerId',
394
-						title: '操作',
395
-						align: 'center',
396
-						fixed: 'right',
397
-						templet: function(d) {
398
-							var tstr = 	'<a href="javascript:;" class="aBtn" onclick="btn_addU(\'' + d.F_CustomerId + '\')" title="添加住户信息">添加住户</a>' +
399
-										'<a href="javascript:;" class="aBtn" onclick="btn_edit(\'' + d.F_CustomerId + '\')" title="修改">修改</a>';
400
-							//判断微信是否注册0未注册,1已注册(1、已经导入的业主信息,需要注册后才能登陆;2、没有导入的信息,不能注册)
401
-							if(d.F_StatusCode === 1){
402
-								tstr += '<a href="javascript:;" class="aBtn" onclick="btn_modifyPws(\'' + d.F_CustomerId + '\',\'' + d.F_Mobile + '\', 0)" title="密码初始化">密码初始化</a>';
403
-							}
404
-							tstr += '<a href="javascript:;" class="aBtn" onclick="btn_delete(\'' + d.F_CustomerId + '\')" title="删除">删除</a>';
405
-							return tstr;
406
-						},
407
-						width: '220',
408
-					},
409
-				]
410
-			],
411
-			height: 'full-338'
412
-		});
413
-	});
414
-}
415
-
416
-//添加业主信息
417
-function btn_add() {
418
-	layer.open({
419
-		type: 2,
420
-		title: '添加客户信息',
421
-		maxmin: true, //开启最大化最小化按钮
422
-		area: ['90%', '80%'],
423
-		content: '../commonTpl/addOrEditCustomer.html'
424
-	});
425
-}
426
-
427
-//修改业主信息
428
-function btn_edit(eid) {
429
-	layer.open({
430
-		type: 2,
431
-		title: '修改客户信息',
432
-		maxmin: true, //开启最大化最小化按钮
433
-		area: ['90%', '80%'],
434
-		content: "../commonTpl/addOrEditCustomer.html?eid=" + eid
435
-	});
436
-
437
-}
438
-//删除业主信息 或 住户信息
439
-function btn_delete(delid) {
440
-	var dID;
441
-	delid = '' + delid;
442
-	if(delid.indexOf('_') > -1) {
443
-		dID = delid.split('_')[0];
444
-		var house = delid.split('_')[1];
445
-	} else {
446
-		dID = delid;
447
-	}
448
-	var laye = layer.confirm('您确定要删除当前信息吗?', {
449
-		btn: ['确定', '取消'] //可以无限个按钮
450
-	}, function() {
451
-		$.ajax({
452
-			type: "post",
453
-			url: huayi.config.callcenter_url + "Customer/DelCustomer",
454
-			async: true,
455
-			dataType: "json",
456
-			data: {
457
-				ids: dID,
458
-				token: token,
459
-			},
460
-			success: function(data) {
461
-				if(data.state.toLowerCase() == 'success') {
462
-					if(house === "house") {
463
-						table.reload('t_callTotal1');
464
-					} else {
465
-						table.reload('t_callTotal');
466
-					}
467
-					layer.msg("删除成功!");
468
-				}
469
-			}
470
-		});
471
-	}, function(index) {
472
-		layer.close(laye);
473
-	});
474
-}
475
-
476
-//添加住户信息
477
-function btn_addU(pid) {
478
-	layer.open({
479
-		type: 2,
480
-		title: '添加住户信息',
481
-		maxmin: true, //开启最大化最小化按钮
482
-		area: ['90%', '80%'],
483
-		content: '../commonTpl/addOrEditCustomer.html?pid=' + pid,
484
-	});
485
-}
486
-//修改住户信息
487
-function btn_editU(eid,pid) {
488
-	layer.open({
489
-		type: 2,
490
-		title: '修改住户信息',
491
-		maxmin: true, //开启最大化最小化按钮
492
-		area: ['90%', '80%'],
493
-		content: "../commonTpl/addOrEditCustomer.html?eid=" + eid + "&pid=" + pid
494
-	});
495
-}
496
-
497
-//加载住户信息
498
-function getHouseHoldList(fpid) {
499
-	layui.use('table', function() {
500
-		table1 = layui.table;
501
-		//方法级渲染
502
-		table1.render({
503
-			elem: '#t_callTotal1',
504
-			url: huayi.config.callcenter_url + "Customer/GetList",
505
-			method: 'get', //如果无需自定义HTTP类型,可不加该参数
506
-			skin: 'row', //line (行边框风格) row (列边框风格) nob (无边框风格)
507
-			even: true, //开启隔行背景
508
-			size: 'sm', //sm,md,lg尺寸的表格
509
-			cellMinWidth: 180,
510
-			loading: true,
511
-			page: true,
512
-			limits: [10, 15, 20, 50, 100],
513
-			where: {
514
-				pid: fpid,
515
-				name: '', //是	string	姓名
516
-				tel: '', //电话	是	string	电话
517
-				starttime: '', //是	开始
518
-				endtime: '', //否	结束			
519
-				token: token,
520
-			}, //如果无需传递额外参数,可不加该参数
521
-			request: {
522
-				pageName: 'page', //页码的参数名称,默认:page
523
-				limitName: 'pagesize' //每页数据量的参数名,默认:limit
524
-			},
525
-			response: {
526
-				statusName: 'state', //数据状态的字段名称,默认:code
527
-				statusCode: 'success', //成功的状态码,默认:0
528
-				msgName: 'message', //状态信息的字段名称,默认:msg
529
-				countName: 'total', //数据总数的字段名称,默认:count
530
-				dataName: 'rows', //数据列表的字段名称,默认:data
531
-			}, //如果无需自定义数据响应名称,可不加该参数
532
-			cols: [
533
-				[{
534
-						field: 'F_CustomerName',
535
-						title: '姓名',
536
-						align: 'center',
537
-						fixed: true,
538
-						sort: true,
539
-						width: 140,
540
-					},
541
-					{
542
-						field: 'F_Mobile',
543
-						title: '手机号码',
544
-						align: 'center',
545
-						width: '',
546
-					},
547
-					{
548
-					    field: 'F_StatusCodeName',
549
-						title: '微信会员',
550
-						event: 'showInfo',
551
-						style: 'cursor: pointer;',
552
-						align: 'center',
553
-						width: 90,
554
-					},
555
-					{
556
-						field: 'CustomerTypeName',
557
-						title: '客户类型',
558
-						event: 'showInfo',
559
-						style: 'cursor: pointer;',
560
-						align: 'center',
561
-						width: '',
562
-					},
563
-					{
564
-						field: 'OwnerRelations',
565
-						title: '房主关系',
566
-						event: 'showInfo',
567
-						style: 'cursor: pointer;',
568
-						align: 'center',
569
-						width: '',
570
-					},
571
-					{
572
-						field: 'ProName',
573
-						title: '所购项目',
574
-						align: 'center',
575
-						width: '',
576
-					},
577
-					{
578
-						field: 'F_BusinessLicenseID',
579
-						title: '所购楼层信息(房间号)',
580
-						align: 'center',
581
-						width: '',
582
-					},
583
-					{
584
-						field: 'F_Address',
585
-						title: '通讯住址',
586
-						align: 'center',
587
-						width: '',
588
-					},
589
-					{
590
-						field: 'F_TradeId',
591
-						title: '总房款',
592
-						align: 'center',
593
-						width: '',
594
-					},
595
-
596
-					{
597
-						field: 'F_RegionId',
598
-						title: '老带新套数',
599
-						align: 'center',
600
-						width: '',
601
-					},
602
-					{
603
-						field: 'F_BankAccount',
604
-						title: '老带新项目',
605
-						align: 'center',
606
-						width: '',
607
-					},
608
-					{
609
-						field: 'F_LegalRepresentative',
610
-						title: '置业顾问',
611
-						align: 'center',
612
-						width: '',
613
-					},
614
-					{
615
-						field: 'F_CustomerEName',
616
-						title: '性别(男,女)',
617
-						align: 'center',
618
-						width: '',
619
-					},
620
-					{
621
-						field: 'F_CustomerPym',
622
-						title: '出生年月',
623
-						align: 'center',
624
-						width: '',
625
-					},
626
-					{
627
-						field: 'F_LegalRepresentativeCardID',
628
-						title: '身份证号',
629
-						align: 'center',
630
-						width: '',
631
-					},
632
-					{
633
-						field: 'F_Nature',
634
-						title: '籍贯',
635
-						align: 'center',
636
-						width: '',
637
-					},
638
-					{
639
-						field: 'F_Url',
640
-						title: '车辆品牌',
641
-						align: 'center',
642
-						width: '',
643
-					},
644
-					{
645
-						field: 'F_Kind',
646
-						title: '车牌号码',
647
-						align: 'center',
648
-						width: '',
649
-					},
650
-					//					{
651
-					//						field: 'F_Telephone',
652
-					//						title: '电话',
653
-					//						align: 'center',
654
-					//						width: '',
655
-					//					},
656
-					//					{
657
-					//						field: 'F_Fax',
658
-					//						title: '传真',
659
-					//						align: 'center',
660
-					//						width: '',
661
-					//					},
662
-					//					{
663
-					//						field: 'F_Email',
664
-					//						title: '邮箱',
665
-					//						align: 'center',
666
-					//						width: '',
667
-					//					},
668
-					{
669
-						field: 'F_CustomerLayer',
670
-						title: '学历',
671
-						align: 'center',
672
-						templet: function(d) {
673
-							return '<span>'+ formatterEducation(d.F_CustomerLayer) +'</span>';
674
-						},
675
-						width: '',
676
-					},
677
-					{
678
-						field: 'F_PostCode',
679
-						title: '收入层次',
680
-						align: 'center',
681
-						width: '',
682
-					},
683
-					{
684
-						field: 'F_BusinessProfile',
685
-						title: '客户职业',
686
-						align: 'center',
687
-						width: '',
688
-					},
689
-					{
690
-						field: 'F_CustomerCode',
691
-						title: '客户工作单位',
692
-						align: 'center',
693
-						width: '',
694
-					},
695
-					{
696
-						field: 'F_OpeningBank',
697
-						title: '职务',
698
-						align: 'center',
699
-						width: '',
700
-					},
701
-					{
702
-						field: 'F_Website',
703
-						title: '兴趣爱好',
704
-						align: 'center',
705
-						width: '',
706
-					},
707
-					{
708
-						field: 'F_TaxID',
709
-						title: '婚姻状况',
710
-						align: 'center',
711
-						width: '',
712
-					},
713
-					{
714
-						field: 'F_MainProduct',
715
-						title: '家庭人口',
716
-						align: 'center',
717
-						width: '',
718
-					},
719
-					{
720
-						field: 'F_CustomerFrom',
721
-						title: '客户配偶情况',
722
-						align: 'center',
723
-						width: '',
724
-					},
725
-					{
726
-						field: 'F_TrackInfo',
727
-						title: '客户子女情况',
728
-						align: 'center',
729
-						width: '',
730
-					},
731
-					{
732
-						field: 'F_TrackState',
733
-						title: '客户父母情况',
734
-						align: 'center',
735
-						width: '',
736
-					},
737
-					{
738
-						field: 'F_ImportDegree',
739
-						title: '客户消费偏好',
740
-						align: 'center',
741
-						width: '',
742
-					},
743
-					{
744
-						field: 'F_Notes',
745
-						title: '备注',
746
-						align: 'center',
747
-						width: '',
748
-					},
749
-					{
750
-						field: 'F_CustomerId',
751
-						title: '操作',
752
-						align: 'center',
753
-						fixed: 'right',
754
-						templet: function(d) {
755
-							var tstr = 	'<a href="javascript:;" class="aBtn" onclick="btn_editU(\'' + d.F_CustomerId + '_house\',\''+ d.F_CustomerId +'\')" title="修改">修改</a>';
756
-							//判断微信是否注册0未注册,1已注册(1、已经导入的业主信息,需要注册后才能登陆;2、没有导入的信息,不能注册)
757
-							if(d.F_StatusCode === 1){
758
-								tstr += '<a href="javascript:;" class="aBtn" onclick="btn_modifyPws(\'' + d.F_CustomerId + '\',\'' + d.F_Mobile + '\', 1)" title="密码初始化">密码初始化</a>';
759
-							}
760
-							tstr += '<a href="javascript:;" class="aBtn" onclick="btn_delete(\'' + d.F_CustomerId + '_house\')" title="删除">删除</a>';
761
-							return tstr;
762
-						},
763
-						width: '200',
764
-					},
765
-				]
766
-			],
767
-			height: 'full-550'
768
-		});
769
-	});
770
-}
771
-
772
-//微信会员 - 初始化密码
773
-function btn_modifyPws(cid, ctel, ishouse) {
774
-	layer.open({
775
-		type: 2,
776
-		content: "../commonTpl/modifyPws.html?cid=" + cid + "&ctel=" + ctel + "&ishouse=" + ishouse, //iframe的url,no代表不显示滚动条
777
-		title: '微信会员-初始化密码',
778
-		area: ['50%', '55%'], //宽高
779
-	});
780
-}
781
-
782
-//导入客户信息
783
-function btn_export() {
784
-	layer.open({
785
-		maxmin: true, //开启最大化最小化按钮
786
-		type: 2,
787
-		content: "../commonTpl/importCustomers.html", //iframe的url,no代表不显示滚动条
788
-		title: '导入客户信息',
789
-		area: ['50%', '55%'], //宽高
790
-	});
791
-}
792
-
793
-//格式化学历
794
-function formatterEducation(edu){
795
-	var eduStr = ''; 
796
-	switch (edu){
797
-		case '0':
798
-				eduStr = '小学';
799
-			break;
800
-		case '1':
801
-				eduStr = '初中';
802
-			break;
803
-		case '2':
804
-				eduStr = '高中';
805
-			break;
806
-		case '3':
807
-				eduStr = '中专';
808
-			break;
809
-		case '4':
810
-				eduStr = '大专(高职等)';
811
-			break;
812
-		case '5':
813
-				eduStr = '本科';
814
-			break;
815
-		case '6':
816
-				eduStr = '学士';
817
-			break;
818
-		case '7':
819
-				eduStr = '硕士研究生';
820
-			break;
821
-		case '8':
822
-				eduStr = '博士研究生';
823
-			break;
824
-		case '9':
825
-				eduStr = '博士后';
826
-			break;
827
-		default:
828
-			break;
829
-	}
830
-	return eduStr;
831
-}

+ 0 - 81
CallCenterWeb.UI/keHuManager/js/modifyPws.js

@@ -1,81 +0,0 @@
1
-/**
2
- * 微信会员修改密码
3
- * */
4
-var cid = helper.request.queryString("cid");
5
-var ctel = helper.request.queryString("ctel");
6
-var ishouse = helper.request.queryString("ishouse");
7
-
8
-$(function(){
9
-	$('#Username').val(ctel);
10
-	$('#Password').on('keyup',validate);
11
-	$('#Password2').on('keyup',validate);
12
-	$('#modifyPasswordBtn').off('click',modifyPassword);
13
-	$('#modifyPasswordBtn').on('click',modifyPassword);
14
-});
15
-
16
-
17
-//修改密码
18
-function modifyPassword(){
19
-	if(!regexs.passwordReg.test($.trim($('#Password').val()))) {
20
-		layer.confirm('请输入有效的新密码(6-32个字符只能是字母、下划线、数字)', {
21
-			icon: 2,
22
-			btn: ['确定'] 
23
-		});
24
-		return;
25
-	}
26
-	if(!regexs.passwordReg.test($.trim($('#Password2').val()))) {
27
-		layer.confirm('请输入有效的确认密码(6-32个字符只能是字母、下划线、数字)', {
28
-			icon: 2,
29
-			btn: ['确定'] 
30
-		});
31
-		return;
32
-	}
33
-	
34
-	$.post(huayi.config.callcenter_url + "Customer/CustomerResetPwd", {
35
-		cusid: cid,//	是	string	id
36
-		usercode: ctel,//	是	string	手机号账号
37
-		pwd: $('#Password').val(),//	是	string	密码
38
-		repeatpwd: $('#Password2').val(),//	否	string	密码2
39
-		token: $.cookie("token")		
40
-	}, function(data) {
41
-		data = JSON.parse(data);
42
-		if(data.state.toLowerCase() === "success") {
43
-			var index = parent.layer.getFrameIndex(window.name);
44
-			parent.layer.close(index);
45
-			if(ishouse === "0") { //0 是业主 1是住户
46
-				parent.table.reload('t_callTotal');
47
-			} else {
48
-				parent.table.reload('t_callTotal1');
49
-			}
50
-			parent.layer.msg("密码初始化成功!");
51
-		}
52
-	});
53
-}
54
-
55
-function validate() {
56
-    var pwd = $.trim($("#Password").val());
57
-    var pwd2 = $.trim($("#Password2").val());
58
-    if(!pwd){
59
-    	$("#pasInfo").text("新密码不能为空!");
60
-        $("#pasInfo").css("color","red");
61
-        $("#modifyPasswordBtn").prop("disabled", true);
62
-    	return;
63
-    }else{
64
-    	$("#pasInfo").text("");
65
-		$("#modifyPasswordBtn").prop("disabled", true);
66
-    }
67
-    if(!pwd2){
68
-    	$("#pas2Info").text("新密码不能为空!");
69
-        $("#pas2Info").css("color","red") 
70
-  		$("#modifyPasswordBtn").prop("disabled", true);
71
-    }
72
-    if(pwd == pwd2){
73
-        $("#pas2Info").text("新密码和确认密码相同");
74
-        $("#pas2Info").css("color","green");
75
-    	$("#modifyPasswordBtn").prop("disabled", false);
76
-    }else {
77
-        $("#pas2Info").text("新密码和确认密码不相同");
78
-        $("#pas2Info").css("color","red");
79
-        $("#modifyPasswordBtn").prop("disabled", true);
80
-    }
81
-}

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

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

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

@@ -1,196 +0,0 @@
1
-$(function(){
2
-	var edit_id = helper.request.queryString("edit_id");
3
-	getEditInfo(edit_id);
4
-	adddep();//部门下拉
5
-	//点击编辑保存
6
-	$('#save_edit').click(function(){
7
-//		var F_Department=$('#customer_code').val();
8
-//		var F_Section=$('#customer_legalName').val();
9
-//		var F_Telephone=$('#customer_lehalTel').val();
10
-//		var F_Physician=$('#customer_comaddress').val();
11
-//		var F_Title=$('#customer_keshi').val();
12
-//		$.post(huayi.config.callcenter_url + "Conversation/Update",{
13
-//			id:edit_id,
14
-//			F_Type:1,
15
-//			F_Department:F_Department,
16
-//			F_Section:F_Section,
17
-//			F_Telephone:F_Telephone,
18
-//			F_Physician:F_Physician,
19
-//			F_Title:F_Title,
20
-//			"token": $.cookie("token")
21
-//		},function(res){
22
-//			if (res.state == "success") {
23
-//				var index = parent.layer.getFrameIndex(window.name);
24
-//				parent.layer.close(index);
25
-//				parent.$('.phonelistZJ').bootstrapTable('refresh');
26
-//				parent.layer.msg("保存成功");
27
-//			} else {
28
-//				$('#save_edit').attr("disabled", false);
29
-//				$('#save_edit').text('保存');
30
-//			}
31
-//		})
32
-$.ajax({
33
-		type: 'post',
34
-		url: huayi.config.callcenter_url + "Conversation/Update",
35
-		dataType: 'json',
36
-		async: true,
37
-		beforeSend: function() { //触发ajax请求开始时执行
38
-			$('#save_edit').attr("disabled", true);
39
-			$('#save_edit').text('保存中...');
40
-			loadIndex = layer.load();
41
-		},
42
-		data: {
43
-			id:edit_id,
44
-//			id:did,
45
-			F_Type: 2, //	否	string	id
46
-			F_Department: did, //部门id
47
-//			F_Department:$('#customer_code').val(), //string 
48
-			F_Section:$('#customer_legalName').val(), //string 
49
-			F_Telephone:$('#customer_lehalTel').val(), //string 客户电话
50
-			F_Physician:$('#customer_comaddress').val(), //string 客户地址 
51
-			F_Title: $('#customer_keshi').val(), // string 是否需要去银行拿回单(一般纳税人)	
52
-			token: $.cookie("token")
53
-		},
54
-		success: function(data) {
55
-			layer.close(loadIndex);
56
-			if (data.state === "success") {
57
-				var index = parent.layer.getFrameIndex(window.name);
58
-				parent.layer.close(index);
59
-				parent.$('.phonelistSF').bootstrapTable('refresh');
60
-				parent.layer.msg("保存成功");
61
-			} else {
62
-				$('#save_edit').attr("disabled", false);
63
-				$('#save_edit').text('保存');
64
-			}
65
-		},
66
-		error: function(textStatus) {
67
-			layer.close(loadIndex);
68
-			layer.confirm('网络繁忙,请稍后再试...', {
69
-				icon: 7,
70
-				closeBtn: 0,
71
-				btn: ['确定'] //按钮
72
-			});
73
-			$('#save_edit').attr("disabled", false);
74
-			$('#save_edit').text('保存');
75
-		},
76
-		complete: function(XMLHttpRequest, textStatus) {
77
-			layer.close(loadIndex);
78
-			if (textStatus == 'timeout') {
79
-				var xmlhttp = window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHttp");
80
-				xmlhttp.abort();
81
-				layer.confirm('网络超时,请稍后再试...', {
82
-					icon: 7,
83
-					closeBtn: 0,
84
-					btn: ['确定'] //按钮
85
-				});
86
-			}
87
-			$('#save_edit').attr("disabled", false);
88
-			$('#save_edit').text('保存');
89
-		},
90
-	});
91
-	})
92
-})
93
-function getEditInfo(edit_id){
94
-	$.getJSON(huayi.config.callcenter_url + "Conversation/GetDetails", {
95
-		id: edit_id, //客户id
96
-		token: $.cookie("token")
97
-	}, function(data) {
98
-		if(data.state=='success'){
99
-			var data = data.data;
100
-			did = data.F_Department + ""; //部门id
101
-			$('.clear_button').val(data.F_DepartmentName); //部门名称
102
-			$('#customer_legalName option:selected').text(data.F_SectionName); //科室名称
103
-			$('#customer_legalName option:selected').val(data.F_Section); //科室id
104
-			$('#customer_lehalTel').val(data.F_Telephone); //电话
105
-			$('#customer_comaddress').val(data.F_Physician); //医师姓名
106
-			$('#customer_keshi').val(data.F_Title); //职称
107
-		}
108
-		
109
-	})
110
-}
111
-//获取所属部门
112
-var setting2 = {
113
-	data: {
114
-		key: {
115
-			name: "text"
116
-		},
117
-		simpleData: {
118
-			enable: true,
119
-			idKey: "id",
120
-			rootPId: 0
121
-		}
122
-	},
123
-	callback: {
124
-		onClick: ztreeDep
125
-	}
126
-};
127
-var did; //部门id
128
-var deptCode; //部门 code
129
-var dname; //部门name
130
-function ztreeDep(event, treeId, treeNode) {
131
-	did = treeNode.id;
132
-	deptCode = treeNode.code;
133
-	dname = treeNode.text;
134
-	$('.inps2').val(dname);
135
-	getSection();
136
-};
137
-
138
-function adddep() {
139
-	$.get(huayi.config.callcenter_url + "Department/GetDeptList", {
140
-		"token": $.cookie("token"),
141
-	}, function(result) {
142
-		result = $.parseJSON(result);
143
-		$.fn.zTree.init($("#xlAdd_depTreeSF"), setting2, result.data); //实例化树形图
144
-	});
145
-}
146
-$('.inps').focus(function() {
147
-	$(this).siblings('.addTree').css('display', 'block');
148
-})
149
-$('.xl').click(function() {
150
-	var xl = $(this).siblings('.addTree');
151
-	if(xl.css('display') == 'block') {
152
-		xl.css('display', 'none')
153
-	} else {
154
-		xl.css('display', 'block')
155
-	}
156
-})
157
-$('.addTree').mouseleave(function() {
158
-	$(this).css('display', 'none')
159
-})
160
-//清除选择的部门
161
-//删除
162
-	$(".inpBox").hover(function(event) {
163
-		$(this).children(".de_icon").show();
164
-		event.stopPropagation();
165
-	}, function() {
166
-		$(this).children(".de_icon").hide();
167
-	});
168
-	$(".de_icon").click(function(event) {
169
-		event.stopPropagation();
170
-		$(this).siblings("input").val("");
171
-	});
172
-	
173
-
174
-//获取科室
175
-function getSection() {
176
-	$("#customer_legalName").empty();
177
-	$("#customer_legalName").append("<option selected='selected' value=''>请选择科室</option>")
178
-	$.ajax({
179
-		type: "get",
180
-		url: huayi.config.callcenter_url + "Department/GetTreeListByPid",
181
-        dataType: 'json',
182
-		async: true,
183
-		data: {
184
-			token: $.cookie("token"),
185
-			pid: did,
186
-		},
187
-		success: function(result) {
188
-			if (result.state === "success"){
189
-				var res = result.data;
190
-				$(res).each(function(i, n) {
191
-					$("#customer_legalName").append("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>");
192
-				})
193
-			}
194
-		},
195
-	});
196
-}