暫無描述

detailEditVisit.html 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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">
  15. 回访人:
  16. </th>
  17. <td><input type="text" id="visituser" /></td>
  18. <th>
  19. 回访方式:
  20. </th>
  21. <td>
  22. <select class="select_" id="type">
  23. <option value="0">电话</option>
  24. <option value="1">微信</option>
  25. <option value="2">APP</option>
  26. <option value="3">网站</option>
  27. <option value="4">微博</option>
  28. <option value="5">信箱</option>
  29. </select>
  30. </td>
  31. </tr>
  32. <tr>
  33. <th class="Importent">回访满意度:</th>
  34. <td>
  35. <input checked="true" type="radio" value="1" name="huifang" />满意
  36. <input type="radio" value="0" name="huifang" />不满意
  37. </td>
  38. </tr>
  39. <tr>
  40. <th class="Importent">回访信息:</th>
  41. <td colspan="7"><textarea data-adaptheight id="result" name="" rows="" cols=""></textarea></td>
  42. </tr>
  43. <tr>
  44. <th>录音:</th>
  45. <td colspan="7">
  46. <div class="fileBox"></div>
  47. <input class="input" type="file" name="upFile" id="upFile" multiple="multiple" style="display: none;">
  48. <input class="input" type="button" value="上传" id="scwj" />
  49. <input type="hidden" id="file" />
  50. <span style="color:#FF0000; border: none;">
  51. (文件格式为png,jpg,mp4,mp3,pdf,doc,docx,xls,xlsx)
  52. </span>
  53. </td>
  54. </tr>
  55. </table>
  56. <div class="btn_box">
  57. <button class="btns Closure">提交</button>
  58. </div>
  59. <span class="F_ConPhone" style="display: none;"></span>
  60. </div>
  61. <!--<script src="../js/main.js?v=1.5"></script>-->
  62. <script src="../../js/adjustHeight.js"></script>
  63. <script src="../../js/guid.js"></script>
  64. <script src="../../js/sm2/sm2.js"></script>
  65. <script src="../../js/sm2/decrypt.js"></script>
  66. <script src="../../Script/Common/huayi.common.js"></script>
  67. <script>
  68. var wid = helper.request.queryString("wid");
  69. var item = helper.request.queryString("item");
  70. var visitId;
  71. $(document).ready(function () {
  72. if (item) {
  73. itemData = JSON.parse(decodeURIComponent(item))
  74. loadHF()
  75. }
  76. })
  77. $('.Closure').click(function () {
  78. console.log(visitId)
  79. Closure();
  80. });
  81. //上传附件
  82. $("#scwj").click(function() {
  83. console.log($("#file").val())
  84. if ($("#file").val()) {
  85. layer.msg("只能上传一个录音,如需修改请删除原录音")
  86. } else if ($("#file").val() === 0) {
  87. layer.msg("只能上传一个录音,如需修改请删除原录音")
  88. } else {
  89. $("#upFile").trigger("click");
  90. }
  91. })
  92. $("#upFile").change(function() {
  93. upload('upFile', '.fileBox', ['mp3'], "#file");
  94. })
  95. $("#scfj").click(function() {
  96. $(".fjnr").text("");
  97. $("#scfj").hide();
  98. })
  99. //结案
  100. function Closure() {
  101. var params ={
  102. visituser: $("#visituser").val(), // 回访人
  103. type: $("#type").val(), // 回访方式
  104. issatisfie: $(' input[name="huifang"]:checked ').val(), // 满意度
  105. id: visitId, // 回访id
  106. result: $("#result").val(), // 回访情况
  107. file: $("#file").val(), // 回访附件
  108. token: $.cookie("token")
  109. }
  110. var apiUrl
  111. if (visitId) {
  112. apiUrl = "WorkOrder/EditVisitInfoByAdmin"
  113. params.id = visitId
  114. } else{
  115. apiUrl = "WorkOrder/AddVisitInfoByAdmin"
  116. params.workOrderId = wid
  117. }
  118. $.ajax({
  119. type: "post",
  120. url: huayi.config.callcenter_url + apiUrl,
  121. dataType: 'json',
  122. async: true,
  123. data: params,
  124. success: function(data) {
  125. /*验证请求*/
  126. if(data.state == "success") {
  127. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  128. parent.layer.close(index); //再执行关闭
  129. parent.layer.msg("操作成功");
  130. parent.load('6')
  131. // parent.$('#orderlist').bootstrapTable('refresh');
  132. }
  133. }
  134. });
  135. }
  136. //回访
  137. function loadHF(){
  138. console.log(itemData)
  139. visitId = itemData.F_Id
  140. $("#visituser").val(itemData.F_VisitUser)
  141. $("#type").val(itemData.F_Type)
  142. $('input[name="huifang"][value="' + itemData.F_IsSatisfie + '"]').prop("checked", "checked"); //1当即办理,0网络转办
  143. $("#result").val(itemData.F_Result)
  144. if (itemData.File && itemData.File.length>0) {
  145. var strs =
  146. '<span class="files" fiel-num="' + itemData.File[0].F_FileId +
  147. '">' +itemData.File[0].F_FileName.substring(19) +
  148. '<i class="fa fa-remove del_file"></i></span>';
  149. $(strs).appendTo($(".fileBox")).find(".del_file").click(function(event) {
  150. $(this).parent().remove();
  151. file_num1();
  152. });
  153. file_num1();
  154. } else if (itemData.FilePath) {
  155. var flieData = itemData.FilePath.split('.')
  156. var fialeName = flieData[flieData.length-1]
  157. console.log(flieData[flieData.length-1])
  158. var strs =
  159. '<span class="files">' +fialeName +
  160. '<i class="fa fa-remove del_file"></i></span>';
  161. $("#file").val(0)
  162. $(strs).appendTo($(".fileBox")).find(".del_file").click(function(event) {
  163. $(this).parent().remove();
  164. file_num1();
  165. });
  166. }
  167. }
  168. //上传文件隐藏域值
  169. function file_num1() {
  170. var str = "";
  171. var Str;
  172. $(".fileBox .files").each(function(j, m) {
  173. var aa = $(m).attr("fiel-num");
  174. str += aa + ",";
  175. Str =
  176. str.substring(str.length - 1) == "," ?
  177. str.substring(0, str.length - 1) :
  178. str;
  179. });
  180. $("#file").val(Str);
  181. }
  182. </script>
  183. </body>
  184. </html>