//回访信息
function detialVisit(result) {
var html= '';
var html1 = '';
var html2 = '';
var visitRole = ['GLY','ZXLD']
if (visitRole.indexOf(roleCode)!== -1) {
$(".visitLimit").show()
}
if(result.data.length < 0) {
html = '
' +
'| ' + n.UserName + ' | ' +
'
';
} else {
$(".HGXX").empty();
$(result.data).each(function(i, n) {
var a;
var b;
if(String(n.F_IsSatisfie) === "0") {
a = "不满意";
} else if(String(n.F_IsSatisfie) == "1") {
a = "满意";
}
if(n.F_Type == 0) {
b = "电话";
} else if(n.F_Type == 1) {
b = "微信";
} else if(n.F_Type == 2) {
b = "智能回访";
} else if(n.F_Type == 3) {
b = "网站";
} else if(n.F_Type == 4) {
b = "微博";
} else if(n.F_Type == 5) {
b = "信箱";
}
html+= '' +
'| ' + (i + 1) +
' | ' +
'' + n.F_VisitUser +
' | ' +
'' + b + ' | ' +
'' + n.F_Result +
' | ' +
'' + a + ' | ' +
'' + n.F_CreateTime +
' | ' +
'' + encryptPhoneNumber +
' | '
html += ''
var audioFile = '';
console.log(n.File)
if(n.File && n.File.length>0) {
audioFile += '' +
'  ' +
' ';
} else if(n.FilePath) {
audioFile += '' +
'  ' +
' ';
}
html += audioFile
html1 = html
html1 += ' |
'
html2 = html
if (visitRole.indexOf(roleCode)!== -1) {
var itemHf = JSON.stringify(n).replace(/"/g, "'")
html2 += ''
html2 += '' +
'修改' +
' | ';
}
html2 += ''
})
$(html2).appendTo($(".HGXX"));
$(html1).appendTo($(".HGXX1"));
$(".phoneTitle3").click(function() {
var isSecret
if($('.MJ').text() == "普通") {
isSecret = 1
} else {
isSecret = 2
}
layer.open({
type: 2,
content: "./callerNumber.html?phoneNumber=" + encodeURIComponent(phoneNumber) + "&wid=" + wid + "&isSecret=" + isSecret + "&type=1", //iframe的url,no代表不显示滚动条
title: "回访号码",
area: ["40%", "25%"], //宽高
});
})
}
}
//var title =item?'编辑':'添加'
//var contentUrl=item?"./addOrEditUser.html?item="+encodeURIComponent(JSON.stringify(item)):"./addOrEditUser.html"
function visitHandle(item) {
var title =item?'编辑回访记录':'添加回访记录'
var contentUrl
var visitUrl = "./cpns/detailEditVisit.html?wid="+wid
if (item) {
contentUrl = visitUrl+"&item="+encodeURIComponent(JSON.stringify(item))
} else {
contentUrl = visitUrl
}
layer.open({
type: 2,
content: contentUrl,
title: title,
area: ["80%", "60%"], //宽高
});
}
function deleteVisit (id) {
layer.confirm(
"确定删除?", {
btn: ["是", "否"], //按钮
},
function () {
$.post(
huayi.config.callcenter_url +
"WorkOrder/DeleteVisitInfoByAdmin", {
id: id,
token: $.cookie("token"),
},
function (result) {
result = JSON.parse(result);
if (result.state.toLowerCase() == "success") {
layer.msg("删除成功");
load('6')
}
}
);
}
);
// layer.confirm(
// "确定删除?", {
// btn: ["是", "否"], //按钮
// },
// function () {
// console.log('删除')
// $.ajax({
// type:'post',
// dataType: 'json',
// url:huayi.config.callcenter_url + "DeleteVisitInfoByAdmin",
// async:true,
// success:function(data){
// if(data.state == "success") {
// layer.msg("删除成功");
// load('6')
// }
// }
// });
// }
// );
}
function recordingFun(htmlstr) {
var path = $(htmlstr).attr("item");
layer.open({
type: 2,
content: "../CommonHtml/recording.html?path=" + path, //iframe的url,no代表不显示滚动条
title: '录音',
area: ['30%', '20%'], //宽高
maxmin: true,
shade: 0
});
}