| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- $(document).ready(function () {})
- //外呼
- function btn_outbound(phone, id) {
- recordsCallOutId = id;
- if(phone) {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "CallOutOpt/GetCallOutprefix",
- async: true,
- dataType: 'json',
- data: {
- token: $.cookie("token"),
- phone: phone
- },
- success: function(result) {
- // result = $.parseJSON(result);
- if(result.state.toLowerCase() == "success") {
- var guid = uuid();
- parent.obj.Type = 'MakeCall';
- parent.obj.DestinationNumber = result.data.phone;
- parent.obj.Header = result.data.fix;
- parent.obj.TaskType = "0"; //0:拨号外呼;1:95005回访外呼;2:电销回访外呼
- parent.obj.TaskPhoneID = ""; //回访的电话ID
- parent.obj.TaskID = guid; //回访记录编号
- parent.Send();
- parent.iframeOutbound = 1;
- recordsCallOutPhone = result.data.phone;
- }
- }
- });
- }
- }
- function timingCallOut() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "RegRecordsCallOut/GetList",
- async: true,
- dataType: 'json',
- data: {
- token: $.cookie("token"),
- },
- success: function(result) {
- if(result.state.toLowerCase() == "success") {
- var res = result.rows[0]
- if (res.F_RecCode === "0") {
- btn_outbound(res.F_userPhone, res.F_ID)
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "RegRecordsCallOut/Update3",
- async: true,
- dataType: 'json',
- data: {
- token: $.cookie("token"),
- id: res.F_ID
- },
- success: function(result) {
- $("#workorderlist").bootstrapTable('refresh');
- }
- });
- } else {
- }
- }
- }
- });
- }
- function judgmentCallOut() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "RegRecordsCallOut/GetFlag",
- async: true,
- dataType: 'json',
- data: {
- token: $.cookie("token"),
- },
- success: function(result) {
- if(result.state.toLowerCase() == "success") {
- if(result.data == true) {
- console.log("1111")
- clearInterval(timeId);
- iframeOutbound === 1
- timingCallOut()
- }
- }
- }
- });
- }
|