| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <link rel="stylesheet" href="../css/init.css" />
- <title>工单审核</title>
- <style type="text/css">
- #msg1,
- #msg2,
- #msg3,
- #phone {
- border: none;
- border-bottom: 1px solid #ccc;
- margin-bottom: 20px;
- background-color: #FFFFFF;
- color: #00a1cb;
- }
- #msg4 {
- width: 250px;
- height: 50px;
- border: none;
- border-bottom: 1px solid #ccc;
- margin-bottom: 20px;
- vertical-align: top;
- }
- #msg2 {
- vertical-align: top;
- height: 25px;
- }
- #msg1:focus,
- #msg2:focus,
- #msg3:focus,
- #msg4:focus,
- #phone:focus {
- outline: none;
- }
- </style>
- </head>
- <body>
- <div class="Common">
- <table>
- <tr>
- <th>
- 来电号码:
- </th>
- <td><a class="CallOut" id="CallOut"><span class="F_CusPhone"></span><img class="cupImg"
- style="vertical-align: text-bottom;margin-left: 5px;" src="../img/Phones.png" /></a></td>
- <th>回访方式:</th>
- <td><span class="visittype"></span></td>
- <!-- <th>
- 联系号码:
- </th>
- <td><a class="CallOut1" id="CallOut1"><span class="F_ConPhone"></span><img class="copImg"
- style="vertical-align: text-bottom;margin-left: 5px;" src="../img/Phones.png" /></a></td> -->
- </tr>
- <tr>
- <th class="Importent">
- 审核人:
- </th>
- <td><input type="text" id="visituser" /></td>
- <th>
- 审核方式:
- </th>
- <td>
- <select class="select_" id="type">
- <option value="0">电话</option>
- <option value="1">微信</option>
- <option value="2">APP</option>
- <option value="3">网站</option>
- <option value="4">微博</option>
- <option value="5">信箱</option>
- </select>
- </td>
- </tr>
- <tr>
- <th class="Importent">审核结果:</th>
- <td>
- <input checked="true" type="radio" value="1" name="huifang" />满意
- <input type="radio" value="0" name="huifang" />不满意
- </td>
- </tr>
- <tr>
- <th class="Importent">审核内容:</th>
- <td colspan="7"><textarea data-adaptheight id="result" name="" rows="" cols=""></textarea></td>
- </tr>
- <tr>
- <th class="Importent">重办原因:</th>
- <td colspan="7"><textarea data-adaptheight id="replace" name="" rows="" cols=""></textarea></td>
- </tr>
- </table>
- <!-- <div class="" style="margin: 20px 0 0 0;">
- 尊敬的市民,您于<input id="msg1" type="text" disabled />反映的<textarea id="msg2" type="text"></textarea>问题,工单号:<input
- id="msg3" type="text" disabled />,<br />
- 处理结果如下:<textarea id="msg4" type="text"></textarea>如有异议,请您再次致电12345,感谢您的支持。<br />
- 通知号码:<input id="phone" type="text" />
- <button class="btns sendMsg">发送短信</button>
- </div> -->
- <div class="btn_box">
- <input type="hidden" id="F_guid" value="" />
- <!-- <button class="btns BC">保存</button>
- <button class="btns Submit">保存并提交</button> -->
- <button class="btns returnRedo">退回重办</button>
- <button class="btns CB">提交重办</button>
- <button class="btns Transfer">已办未果</button>
- <button class="btns auditBtn" style="display: none;">审核</button>
- <button class="btns Closure">结案</button>
- <button class="btns sendMessage">发送短信</button>
- </div>
- </div>
- <!--<script src="../js/main.js?v=1.5"></script>-->
- <script src="../js/adjustHeight.js"></script>
- <script src="../js/guid.js"></script>
- <script>
- var wid = helper.request.queryString("wid");
- var IsExamine = helper.request.queryString("IsExamine"); // 0待回访未审核、1待待回访已审核
- var State;
- var nexttype;
- var a = $("#ID").val()
- loadTEL();
- Detail();
- $(document).ready(function () {
- if (String(IsExamine) === "0") {
- $(".auditBtn").show();
- $(".Closure").hide();
- } else if (String(IsExamine) === "1") {
- $(".auditBtn").hide();
- $(".Closure").show();
- }
- $('.BC').click(function () {
- State = 0;
- JA();
- });
- $('.Closure').click(function () {
- State = 1;
- Closure();
- });
- $('.returnRedo').click(function () {
- nexttype = 2;
- CB();
- });
- $('.CB').click(function () {
- State = 1;
- nexttype = 1;
- CB();
- })
- $('.Transfer').click(function () {
- Transfer();
- })
- $('.Submit').click(function () {
- State = 1;
- JA();
- })
- $('.sendMessage').click(function () {
- sendMessage()
- })
- $(".CallOut").click(function (event) {
- if ($(".F_CusPhone").text()) {
- calloutopt($(".F_CusPhone").text());
- }
- });
- $(".CallOut1").click(function (event) {
- if ($(".F_ConPhone").text()) {
- calloutopt($(".F_ConPhone").text());
- }
- });
- // 营商审核
- $(".auditBtn").click(function () {
- $.ajax({
- type: "post",
- url: huayi.config.callcenter_url +
- "WorkOrder/BusinessApproved",
- dataType: "json",
- async: false,
- data: {
- token: $.cookie("token"),
- workorderid: wid,
- },
- success: function (data) {
- if (data.state.toLowerCase() == "success") {
- var index = parent.layer.getFrameIndex(window
- .name); //先得到当前iframe层的索引
- parent.layer.close(index); //再执行关闭
- parent.$("#orderlist").bootstrapTable("refresh");
- parent.layer.msg("操作成功");
- }
- },
- });
- })
- });
- //重办
- function CB() {
- if ($('#replace').val() == '') {
- layer.msg("请输入重办原因");
- return;
- }
- $.post(huayi.config.callcenter_url + 'WorkOrder/VisitWorkOrder', {
- workorderid: wid,
- visituser: $("#visituser").val(), //审核人
- result: $("#result").val(), //审核内容
- type: $("#type").val(),
- cbreason: $('#replace').val(), //重办原因
- issatisfie: $(' input[name="huifang"]:checked ').val(),
- state: State,
- nexttype: nexttype,
- visitid: a,
- token: $.cookie("token")
- }, function (result) {
- result = JSON.parse(result);
- if (result.state.toLowerCase() == "success") {
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- parent.layer.close(index); //再执行关闭
- parent.$('#orderlist').bootstrapTable('refresh');
- parent.layer.msg("操作成功");
- }
- })
- }
- function Transfer() {
- $.post(huayi.config.callcenter_url + 'WorkOrder/Transfer', {
- workorderid: wid,
- token: $.cookie("token")
- }, function (result) {
- result = JSON.parse(result);
- if (result.state.toLowerCase() == "success") {
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- parent.layer.close(index); //再执行关闭
- parent.$('#orderlist').bootstrapTable('refresh');
- parent.layer.msg("操作成功");
- }
- })
- }
- //审核
- function JA() {
- $.post(huayi.config.callcenter_url + 'WorkOrder/VisitWorkOrder', {
- workorderid: wid,
- visituser: $("#visituser").val(), //审核人
- result: $("#result").val(), //审核内容
- type: $("#type").val(),
- issatisfie: $(' input[name="huifang"]:checked ').val(),
- state: State,
- visitid: a,
- token: $.cookie("token")
- }, function (result) {
- result = JSON.parse(result);
- if (result.state.toLowerCase() == "success") {
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- parent.layer.close(index); //再执行关闭
- parent.$('#orderlist').bootstrapTable('refresh');
- parent.layer.msg("操作成功");
- }
- })
- }
- //发送短信
- $('.sendMsg').click(function () {
- if (!$('#msg4').val()) {
- layer.msg('请填写结果')
- return
- }
- if (!$('#phone').val()) {
- layer.msg('请填写通知号码')
- return
- }
- $.ajax({
- type: "post",
- url: huayi.config.callcenter_url + 'WorkOrder/SmsHand',
- async: true,
- data: {
- msg1: $('#msg1').val(),
- msg2: $('#msg2').val(),
- msg3: $('#msg3').val(),
- msg4: $('#msg4').val(),
- mobile: $('#phone').val(),
- token: $.cookie("token")
- },
- success: function (res) {
- res = JSON.parse(res)
- if (res.state.toLowerCase() == 'success') {
- layer.msg('短信发送成功')
- } else {
- layer.msg('短信发送失败')
- }
- }
- });
- })
- //结案
- function Closure() {
- $.post(huayi.config.callcenter_url + 'WorkOrder/VisitWorkOrder', {
- workorderid: wid,
- visituser: $("#visituser").val(), //审核人
- result: $("#result").val(), //审核内容
- type: $("#type").val(),
- issatisfie: $(' input[name="huifang"]:checked ').val(),
- state: State,
- visitid: a,
- callid: $.cookie("makeCallId"),
- token: $.cookie("token")
- }, function (result) {
- result = JSON.parse(result);
- if (result.state.toLowerCase() == "success") {
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- parent.layer.close(index); //再执行关闭
- parent.layer.msg("操作成功");
- parent.$('#orderlist').bootstrapTable('refresh');
- $.cookie("makeCallId", "");
- }
- })
- }
- // 发送短信
- function sendMessage() {
- $.ajax({
- type: "post",
- url: huayi.config.callcenter_url + 'WorkOrder/SendVisit',
- async: true,
- data: {
- workorderid: wid,
- phone: $(".F_CusPhone").text(),
- token: $.cookie("token")
- },
- success: function (res) {
- res = JSON.parse(res)
- if (res.state.toLowerCase() == 'success') {
- layer.msg('短信发送成功')
- } else {
- layer.msg('短信发送失败')
- }
- }
- });
- }
- //草稿详情
- function Detail() {
- $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetDraftInfo', {
- workorderid: wid,
- type: 3,
- token: $.cookie("token")
- }, function (result) {
- if (result.state.toLowerCase() == "success") {
- if (result.data.length > 0) {
- $("#visituser").val(result.data[0].F_VisitUser);
- $("#issatisfie").val(result.data[0].F_IsSatisfie);
- $("#type").val(result.data[0].F_Type);
- $("#result").val(result.data[0].F_Result);
- }
- }
- })
- }
- //加载用户电话
- function loadTEL() {
- $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkOrderNew', {
- workorderid: wid,
- type: 0,
- "token": $.cookie("token")
- }, function (result) {
- if (result.state.toLowerCase() == "success") {
- var Data = result.data.data;
- $('#msg3').val(Data[0].F_WorkOrderId)
- $('#msg1').val(Data[0].F_CreateTime)
- $('#msg2').text(Data[0].F_ComTitle)
- $('#msg4').val(result.data.bldata && result.data.bldata[result.data.bldata.length - 1]
- .F_Situation)
- if (Data[0].F_CusPhone) {
- $(".F_CusPhone").text(Data[0].F_CusPhone);
- $('.cupImg').css('display', 'inline-block')
- } else {
- $(".F_CusPhone").css('display', 'none');
- $('.cupImg').css('display', 'none');
- }
- if (Data[0].F_ConPhone) {
- $(".F_ConPhone").text(Data[0].F_ConPhone);
- $('.copImg').css('display', 'inline-block')
- } else {
- $(".F_ConPhone").css('display', 'none');
- $('.copImg').css('display', 'none');
- }
- if (String(Data[0].F_VisitType) === "1") {
- $(".visittype").text("无需回访")
- } else {
- $(".visittype").text("正常回访")
- }
- }
- })
- }
- function calloutopt(telphone) {
- $.getJSON(huayi.config.callcenter_url + 'UserAccount/GetNowUser', {
- "token": $.cookie("token")
- }, function (result) {
- if (result.state.toLowerCase() == "success") {
- if (result.data.user.F_SeatFlag) { //判断是否话务人员
- if ($.cookie("extno")) { //判断是否登录分机号
- event.stopPropagation();
- if (telphone) {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "CallOutOpt/GetCallOutprefix",
- async: true,
- dataType: 'json',
- data: {
- token: $.cookie("token"),
- phone: telphone
- },
- success: function (result) {
- if (result.state.toLowerCase() == "success") {
- var guid = uuid();
- $("#F_guid").val(guid);
- top.obj.Type = "MakeCall";
- top.obj.DestinationNumber = result.data.phone;
- top.obj.Header = result.data.fix;
- top.obj.TaskType = "2"; //0:拨号外呼;1:未接来电外呼;2:审核外呼
- top.obj.TaskPhoneID = wid; //审核的工单ID
- top.obj.TaskID = guid; //审核记录编号
- top.Send();
- }
- }
- });
- }
- } else
- layer.msg("未绑定分机号,不能操作回拨");
- } else
- layer.msg("非话务人员登录,不能操作回拨");
- }
- });
- }
- </script>
- </body>
- </html>
|