| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <!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 href="../css/layer/need/layer.css" />
- <link rel="stylesheet" href="../css/init.css" />
- <title>回退</title>
- </head>
- <body>
- <div class="Common">
- <table>
- <tr>
- <th class="Importent">退回原因:</th>
- <td colspan="7"><textarea data-adaptheight id="result" name="" rows="4" cols=""></textarea></td>
- </tr>
- </table>
- <div class="btn_box">
- <button class="btns BC">保存</button>
- </div>
- </div>
- <script src="../js/adjustHeight.js"></script>
- <script>
- var wid = helper.request.queryString("wid");
- var tab = helper.request.queryString("tab");
- //alert(wid)
- $(document).ready(function() {
- $('.BC').click(function() {
- if(!$("#result").val()) {
- layer.msg("原因不能为空");
- } else if(tab) {
- editTh();
- } else {
- JA();
- }
- })
- });
- if(tab) {
- XQ();
- }
- //回退
- function editTh() {
- $.post(huayi.config.callcenter_url + 'WorkOrder/EditSuperInfoByAdmin', {
- id: wid,
- superopinion: $("#result").val(), //回访内容
- token: $.cookie("token")
- }, function(result) {
- result = JSON.parse(result);
- if(result.state.toLowerCase() == "success") {
- parent.parent.layer.closeAll();
- parent.parent.$('#orderlist').bootstrapTable('refresh');
- parent.parent.layer.msg("操作成功!");
- // var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- // console.log(index);
- // parent.layer.close(index); //再执行关闭
- // parent.load();
- // parent.layer.msg("操作成功");
- }
- })
- }
- //回退
- function JA() {
- $.post(huayi.config.callcenter_url + 'WorkOrder/ReturnWorkOrder', {
- workorderid: wid,
- backreason: $("#result").val(), //回访内容
- token: $.cookie("token")
- }, function(result) {
- result = JSON.parse(result);
- if(result.state.toLowerCase() == "success") {
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- console.log(index);
- parent.layer.close(index); //再执行关闭
- parent.$('#orderlist').bootstrapTable('refresh');
- parent.layer.msg("操作成功");
- }
- })
- }
- function XQ() {
- $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetInfoByAdmin', {
- id: wid,
- type: 5,
- token: $.cookie("token")
- }, function(result) {
- if(result.state.toLowerCase() == "success") {
- var type = result.data[0].F_Type;
- var Ltype = "";
- if(type == 1) {
- Ltype = "领导批示";
- } else if(type == 2) {
- Ltype = "市长指示";
- } else if(type == 3) {
- Ltype = "回退";
- }
- $("#result").val(result.data[0].F_SuperOpinion);
- console.log(result);
- }
- })
- }
- </script>
- </body>
- </html>
|