|
|
@@ -54,7 +54,7 @@ $(document).ready(function(){
|
|
54
|
54
|
success: function(result) {
|
|
55
|
55
|
if(result.data.groname == "思念组") {
|
|
56
|
56
|
$(".KF").show();
|
|
57
|
|
- debugger
|
|
|
57
|
+
|
|
58
|
58
|
typeGroup=1
|
|
59
|
59
|
} else {
|
|
60
|
60
|
typeGroup=2
|
|
|
@@ -80,7 +80,6 @@ $('.pre-add').click(function() {
|
|
80
|
80
|
var Number = helper.request.queryString("Number");
|
|
81
|
81
|
var CallID = helper.request.queryString("CallID");
|
|
82
|
82
|
|
|
83
|
|
-
|
|
84
|
83
|
var KHid;
|
|
85
|
84
|
$(".mfhtel").val(Number);
|
|
86
|
85
|
$(".hidTel").val(Number);
|
|
|
@@ -241,40 +240,7 @@ $('.treeList_market1m').mouseleave(function() {
|
|
241
|
240
|
// });
|
|
242
|
241
|
$('#testInput1').comboSelect();
|
|
243
|
242
|
|
|
244
|
|
-//获取客户信息
|
|
245
|
|
-$.getJSON(huayi.config.callcenter_url + 'Customer/GetCustomerByTel', {
|
|
246
|
|
- "tel": Number,
|
|
247
|
|
- "token": $.cookie("token")
|
|
248
|
|
-}, function(result) {
|
|
249
|
|
- if(result.state.toLowerCase() == "success" && result.data != null) {
|
|
250
|
|
- KHid = result.data.F_CustomerId;
|
|
251
|
|
- $("#khid").val(result.data.F_CustomerId);
|
|
252
|
|
- $('.ldname').val(result.data.F_CustomerName); //客户姓名
|
|
253
|
|
- console.log(result.data.F_Province);
|
|
254
|
|
- if(result.data.F_Province){
|
|
255
|
|
- $("#testInput1_input").val(result.data.F_Province); //省份
|
|
256
|
|
- }else{
|
|
257
|
|
- $("#testInput1_input").val('');
|
|
258
|
|
- }
|
|
259
|
|
- if(result.data.F_CustomerIndustry){
|
|
260
|
|
- $("#testInput2_input").val(result.data.F_CustomerIndustry); //来电单位
|
|
261
|
|
- }else{
|
|
262
|
|
- $("#testInput2_input").val('');
|
|
263
|
|
- }
|
|
264
|
|
- //客服部显示
|
|
265
|
|
- $("#callCustomer").val(result.data.F_CustomerName); //客户姓名
|
|
266
|
|
-
|
|
267
|
|
- $("#lddep").val(result.data.F_CustomerIndustry); //来电单位
|
|
268
|
|
- $("#fkdep").val(result.data.fkdep)
|
|
269
|
|
- //市场部显示
|
|
270
|
|
- $("#marketName").val(result.data.F_CustomerName);
|
|
271
|
|
-
|
|
272
|
|
- $("#lddepr").val(result.data.F_CustomerIndustry);
|
|
273
|
|
- $("#fkdep").val(result.data.fkdep)
|
|
274
|
|
- }else{
|
|
275
|
|
- $("#testInput2_input").val('');
|
|
276
|
|
- }
|
|
277
|
|
-})
|
|
|
243
|
+
|
|
278
|
244
|
var timestamp = Date.parse(new Date());
|
|
279
|
245
|
$('.head-pic .lahei .la-before').show();
|
|
280
|
246
|
$('.head-pic .lahei .la-after').hide();
|
|
|
@@ -422,7 +388,6 @@ $(".addts").click(function() {
|
|
422
|
388
|
success: function(data) {
|
|
423
|
389
|
if(data.state.toLowerCase() == 'success') {
|
|
424
|
390
|
layer.msg("保存成功!");
|
|
425
|
|
- debugger
|
|
426
|
391
|
loadOld();
|
|
427
|
392
|
$('#name').val(""); //姓名
|
|
428
|
393
|
$('.inps2').val(''); //区域
|
|
|
@@ -512,7 +477,6 @@ $(".add_").click(function() {
|
|
512
|
477
|
success: function(data) {
|
|
513
|
478
|
if(data.state.toLowerCase() == 'success') {
|
|
514
|
479
|
loadOld();
|
|
515
|
|
- debugger
|
|
516
|
480
|
layer.msg("保存成功!");
|
|
517
|
481
|
$('#namem').val(""); //姓名
|
|
518
|
482
|
$('#buyDatem').val(""); //购买日期
|
|
|
@@ -535,8 +499,45 @@ $(".add_").click(function() {
|
|
535
|
499
|
});
|
|
536
|
500
|
|
|
537
|
501
|
})
|
|
538
|
|
-
|
|
|
502
|
+//获取客户信息
|
|
|
503
|
+$.ajax({
|
|
|
504
|
+ type: "get",
|
|
|
505
|
+ url: huayi.config.callcenter_url + "Customer/GetList",
|
|
|
506
|
+ dataType: 'json',
|
|
|
507
|
+ async: false,
|
|
|
508
|
+ data: {
|
|
|
509
|
+ tel: Number,
|
|
|
510
|
+ type:1,
|
|
|
511
|
+ token: $.cookie("token")
|
|
|
512
|
+ },
|
|
|
513
|
+ success: function(result) {
|
|
|
514
|
+
|
|
|
515
|
+ if(result.state.toLowerCase() == "success" && result.rows.length ==1) {
|
|
|
516
|
+ KHid = result.rows[0].F_Id;
|
|
|
517
|
+ $("#namem").val(result.rows[0].F_Name);
|
|
|
518
|
+ $("#name").val(result.rows[0].F_Name);
|
|
|
519
|
+ $("#khid").val(result.rows[0].F_Id);
|
|
|
520
|
+ $('.ldname').val(result.rows[0].F_Name); //客户姓名
|
|
|
521
|
+ console.log(result.rows[0].F_Province);
|
|
|
522
|
+ if(result.rows[0].F_Province){
|
|
|
523
|
+ $(".countryName").val(result.rows[0].F_Area+result.rows[0].F_Province+result.rows[0].F_City); //省份
|
|
|
524
|
+ }else{
|
|
|
525
|
+ $(".countryName").val('');
|
|
|
526
|
+ }
|
|
|
527
|
+ }else{
|
|
|
528
|
+ $('.ldname').val("");
|
|
|
529
|
+ $(".countryName").val('');
|
|
|
530
|
+ }
|
|
|
531
|
+ }
|
|
|
532
|
+ });
|
|
|
533
|
+$.getJSON(huayi.config.callcenter_url + 'Customer/GetList', {
|
|
|
534
|
+ tel: Number,
|
|
|
535
|
+ token: $.cookie("token")
|
|
|
536
|
+}, function(result) {
|
|
|
537
|
+
|
|
|
538
|
+});
|
|
539
|
539
|
//客户资料
|
|
|
540
|
+
|
|
540
|
541
|
$('.khzl tbody>tr>td input').attr('readonly', true);
|
|
541
|
542
|
$('.save').hide();
|
|
542
|
543
|
$('.cancel').hide();
|
|
|
@@ -574,15 +575,16 @@ $(".save").click(function() {
|
|
574
|
575
|
});
|
|
575
|
576
|
return;
|
|
576
|
577
|
}
|
|
|
578
|
+
|
|
577
|
579
|
$.post(huayi.config.callcenter_url + 'Customer/AddCustomer', {
|
|
578
|
|
- id: $(".hidCallID").val(),
|
|
579
|
|
- cid: KHid,
|
|
|
580
|
+ id: KHid,
|
|
|
581
|
+ type:1,
|
|
580
|
582
|
name: khmc,
|
|
581
|
583
|
area: $('.inps2').val(), //区域
|
|
582
|
584
|
province: $('.inps3').val(), //省份
|
|
583
|
585
|
city: $('.inps4').val(), //城市
|
|
584
|
586
|
customerindustry: testInput2, //来电单位
|
|
585
|
|
- mobile: tel1,
|
|
|
587
|
+ tel: tel1,
|
|
586
|
588
|
"token": $.cookie("token")
|
|
587
|
589
|
}, function(result) {
|
|
588
|
590
|
result = $.parseJSON(result);
|
|
|
@@ -1115,7 +1117,6 @@ function ckxq(str) {
|
|
1115
|
1117
|
//清空
|
|
1116
|
1118
|
function Clean() {
|
|
1117
|
1119
|
//左侧
|
|
1118
|
|
- //debugger;
|
|
1119
|
1120
|
$('.ldname').val(''); //投诉人
|
|
1120
|
1121
|
$('#khid').val('');
|
|
1121
|
1122
|
$('.tsdh').val(''); //投诉电话
|
|
|
@@ -1266,7 +1267,6 @@ function Selects(objs) {
|
|
1266
|
1267
|
$(City_).each(function(i, n) {
|
|
1267
|
1268
|
html = "<option value='" + n + "'>" + n + "</option>";
|
|
1268
|
1269
|
$(html).appendTo(objs);
|
|
1269
|
|
- debugger
|
|
1270
|
1270
|
});
|
|
1271
|
1271
|
objs.comboSelect();
|
|
1272
|
1272
|
|