Bez popisu

editProcessingResult.html 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <script src="../Script/Common/huayi.load.js"></script>
  6. <script src="../Script/Common/huayi.config.js"></script>
  7. <link rel="stylesheet" href="../css/init.css" />
  8. <title>修改</title>
  9. </head>
  10. <body>
  11. <div class="Common">
  12. <table>
  13. <tr>
  14. <th class="Importent">办理结果:</th>
  15. <td colspan="7"><textarea data-adaptheight id="result" name="" rows="" cols=""></textarea></td>
  16. </tr>
  17. <tr>
  18. <th class="Importent">工单内容:</th>
  19. <td colspan="7"><textarea data-adaptheight id="content" name="" rows="" cols=""></textarea></td>
  20. </tr>
  21. </table>
  22. <div class="btn_box">
  23. <input type="hidden" id="F_guid" value="" />
  24. <button class="btns CB">保存</button>
  25. <button class="btns mediaTransfer">转公开</button>
  26. </div>
  27. </div>
  28. <!--<script src="../js/main.js?v=1.5"></script>-->
  29. <script src="../js/adjustHeight.js"></script>
  30. <script src="../js/guid.js"></script>
  31. <script>
  32. var wid = helper.request.queryString("wid");
  33. $(document).ready(function () {
  34. $('.CB').click(function () {
  35. CB();
  36. })
  37. getDetail()
  38. });
  39. //重办
  40. function CB() {
  41. if ($('#replace').val() == '') {
  42. layer.msg("请输入重办原因");
  43. return;
  44. }
  45. $.post(huayi.config.callcenter_url + 'WorkOrder/EditResult', {
  46. workorderid: wid,
  47. result: $("#result").val(),
  48. content: $("#content").val(),
  49. token: $.cookie("token")
  50. }, function (result) {
  51. result = JSON.parse(result);
  52. if (result.state.toLowerCase() == "success") {
  53. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  54. parent.layer.close(index); //再执行关闭
  55. parent.$('#orderlist').bootstrapTable('refresh');
  56. parent.layer.msg("操作成功");
  57. }
  58. })
  59. }
  60. //转媒体
  61. $('.mediaTransfer').click(function () {
  62. layer.open({
  63. content: '是否要转公开?',
  64. btn: ['是', '否'],
  65. yes: function (index, layero) {
  66. $.post(huayi.config.callcenter_url + "WorkOrder/ReleaseWorkOrder", {
  67. workorderid: wid, //工单编号
  68. isrelease: 1, //(0撤回,1转媒体)
  69. isopen: 1,
  70. token: $.cookie("token")
  71. }, function (result) {
  72. var data = JSON.parse(result);
  73. if (data.state == "success") {
  74. $(".mediaTransfer").hide();
  75. var index = parent.layer.getFrameIndex(window
  76. .name); //先得到当前iframe层的索引
  77. parent.layer.close(index); //再执行关闭
  78. parent.$('#orderlist').bootstrapTable('refresh');
  79. parent.layer.msg("操作成功");
  80. }
  81. })
  82. }
  83. })
  84. });
  85. // 获取详情
  86. function getDetail() {
  87. $.ajax({
  88. type: "get",
  89. url: huayi.config.callcenter_url + "WorkOrder/GetWorkOrder",
  90. dataType: 'json',
  91. async: false,
  92. data: {
  93. workorderid: wid,
  94. token: $.cookie("token")
  95. },
  96. success: function (result) {
  97. if (result.state.toLowerCase() == "success") {
  98. var content = result.data;
  99. // var bldataLength = content.bldata.length
  100. if (content.data[0].F_Content === "" || content.data[0].F_Content === null) {
  101. $("#content").text(content.data[0].F_ComContent)
  102. } else {
  103. $("#content").text(content.data[0].F_Content)
  104. }
  105. $("#result").val(content.data[0].F_Result)
  106. // if ( bldataLength > 0) {
  107. // $("#result").val(content.bldata[bldataLength - 1].F_Result)
  108. // }
  109. }
  110. }
  111. })
  112. }
  113. </script>
  114. </body>
  115. </html>