商丘12345 前端

processing_audit.html 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  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 href="../css/layer/need/layer.css" />
  8. <link rel="stylesheet" href="../css/init.css" />
  9. <title>办理工单</title>
  10. <style>
  11. .input {
  12. background-color: #FFF;
  13. background-image: none;
  14. border: 1px solid #ccc;
  15. border-radius: 1px;
  16. color: inherit;
  17. padding: 6px 12px
  18. }
  19. .fjnr {
  20. padding: 0!important;
  21. border: none!important;
  22. }
  23. .HGXX td{
  24. padding: 8px;
  25. }
  26. </style>
  27. </head>
  28. <body>
  29. <div class="Common" style="padding: 10px;">
  30. <table class="table" border="" cellspacing="0" cellpadding="0" style="border: 1px solid #e7eaec; text-align: center;">
  31. <theard>
  32. <tr>
  33. <td class="text-center" style="min-width:50px;">承办人</td>
  34. <td class="text-center" style="min-width:50px;">联系方式</td>
  35. <td class="text-center" style="min-width:50px;">职务</td>
  36. <td class="text-center" style="min-width:50px;">办理时间</td>
  37. <td class="text-center" style="min-width:50px;">办理情况</td>
  38. <td class="text-center" style="min-width:50px;">类型</td>
  39. <td class="text-center" style="min-width:50px;">是否有处理结果</td>
  40. <td class="text-center" style="min-width:50px;">处理方案/进程</td>
  41. <td class="text-center" style="min-width:50px;">沟通时间</td>
  42. <td class="text-center" style="min-width:50px;">沟通方式</td>
  43. <td class="text-center" style="min-width:50px;">答复内容</td>
  44. <td class="text-center" style="min-width:50px;">是否满意</td>
  45. <td class="text-center" style="min-width: 50px;">附件</td>
  46. </tr>
  47. </theard>
  48. <tbody class="BLNR" style="border-top: none; padding: 8px;">
  49. </tbody>
  50. <!--<div class="FJ">
  51. </div>-->
  52. </table>
  53. <table>
  54. <tr>
  55. <th class="Importent" style="text-align: left;"> 审核意见:</th>
  56. </tr>
  57. <tr>
  58. <td style="padding: 0px;"><textarea data-adaptheight id="reason" name="" rows="" cols="" style="text-indent: 2em;"></textarea></td>
  59. <input type="hidden" id="ID"/>
  60. </tr>
  61. </table>
  62. <div class="btn_box">
  63. <button class="btns BC">同意</button>
  64. <button class="btns Submit">拒绝</button>
  65. </div>
  66. </div>
  67. <script src="../css/laydate/laydate.js"></script>
  68. <script src="../js/adjustHeight.js" ></script>
  69. <script>
  70. var wid = helper.request.queryString("wid");
  71. var State;
  72. var a=$("#ID").val()
  73. Detail();
  74. $(document).ready(function() {
  75. // HGXX();
  76. BLNR();
  77. Hove();
  78. //上传附件
  79. $("#scwj").click(function() {
  80. $("#upFile").trigger("click");
  81. })
  82. $("#upFile").change(function() {
  83. upload();
  84. })
  85. $("#scfj").click(function() {
  86. $(".fjnr").text("");
  87. $("#scfj").hide();
  88. })
  89. $('.BC').click(function() {
  90. if($("#reason").val()==""){
  91. layer.msg("请填写审核意见");
  92. }else{
  93. State = 1;
  94. JA();
  95. }
  96. })
  97. $('.Submit').click(function() {
  98. if($("#reason").val()==""){
  99. layer.msg("请填写审核意见");
  100. }else{
  101. State = 2;
  102. JA();
  103. }
  104. })
  105. });
  106. //审批意见
  107. function JA() {
  108. $.post(huayi.config.callcenter_url + 'WorkOrder/AuditSplitWorkOrder', {
  109. workorderid: wid,
  110. reason: $('#reason').val(), //办理内容
  111. state: State,
  112. backid:ccc,
  113. token: $.cookie("token")
  114. }, function(result) {
  115. result = JSON.parse(result);
  116. if(result.state.toLowerCase() == "success") {
  117. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  118. parent.layer.close(index); //再执行关闭
  119. parent.$('#orderlist').bootstrapTable('refresh');
  120. parent.layer.msg("处理成功");
  121. }
  122. })
  123. }
  124. // 工单详情
  125. // function HGXX() {
  126. // $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetSecondDealInfo', {
  127. // workorderid: wid,
  128. // token: $.cookie("token")
  129. // }, function(result) {
  130. // // result = JSON.stringify(result)
  131. // if(result.state.toLowerCase() == "success") {
  132. // var temp;
  133. // $.each(result.data.pdinfo,function(i, n) {
  134. // var i=0;
  135. // i++;
  136. // temp = temp + '<td class="text-center">'+i+'</td><td class="text-center">'+n.F_CreateTime+'</td><td class="text-center">'+n.F_AssignedOpinion+'</td><td class="text-center">'+n.F_LimitTime+'</td><td class="text-center">'+n.F_OtherDeptIds+'</td>';
  137. //// ccc=n.F_Id;
  138. //
  139. // });
  140. //
  141. // $('.HGXX').append(temp);
  142. // }
  143. // })
  144. // }
  145. //办理内容
  146. function BLNR() {
  147. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetNewSecondDealInfo', {
  148. workorderid: wid,
  149. token: $.cookie("token")
  150. }, function (result) {
  151. if (result.state.toLowerCase() == "success") {
  152. var temp1;
  153. $.each(result.data, function (i, n) {
  154. var bval = n.F_Type;
  155. switch(bval + '') {
  156. case '1':
  157. bval = '主办';
  158. break;
  159. case '2':
  160. bval = '协办';
  161. break;
  162. }
  163. //是否有处理结果
  164. var isProResultValue = n.F_IsProResult + "";
  165. switch (isProResultValue) {
  166. case "0":
  167. isProResultValue = "默认";
  168. break;
  169. case "1":
  170. isProResultValue = "是";
  171. break;
  172. case "2":
  173. isProResultValue = "否";
  174. break;
  175. }
  176. //是否满意
  177. var isSatisfiedValue = n.F_IsSatisfied + "";
  178. switch (isSatisfiedValue) {
  179. case "0":
  180. isSatisfiedValue = "未评价";
  181. break;
  182. case "1":
  183. isSatisfiedValue = "满意";
  184. break;
  185. case "2":
  186. isSatisfiedValue = "基本满意";
  187. break;
  188. case "3":
  189. isSatisfiedValue = "不满意";
  190. break;
  191. }
  192. //沟通时间
  193. var connectTimeValue = n.F_ConnectTime;
  194. switch (connectTimeValue) {
  195. case null:
  196. connectTimeValue = "";
  197. break;
  198. default :
  199. connectTimeValue = n.F_ConnectTime;
  200. }
  201. temp1 = temp1 +
  202. '<td class="text-center">' + n.F_DealUser + '</td>' +
  203. '<td class="text-center">' + n.F_DealUserContact + '</td>' +
  204. '<td class="text-center">' + n.F_Duties + '</td>' +
  205. '<td class="text-center">' + n.F_CreateTime + '</td>' +
  206. '<td class="text-center">' + n.F_Result + '</td>' +
  207. '<td class="text-center" data-formatter="shtype">' + bval + '</td>' +
  208. '<td class="text-center">' + isProResultValue + '</td>' +
  209. '<td class="text-center">' + n.F_ProSituation + '</td>' +
  210. '<td class="text-center">' + connectTimeValue + '</td>' +
  211. '<td class="text-center">' + n.F_ConnectMode + '</td>' +
  212. '<td class="text-center">' + n.F_ReplyContent + '</td>' +
  213. '<td class="text-center">' + isSatisfiedValue + '</td>' +
  214. '<td class="text-center FJ" style="color:#00a1cb;"></td>';
  215. ccc = n.F_Id;
  216. });
  217. $('.BLNR').append(temp1);
  218. $(result.data[0].File).each(function (i, n) {
  219. HTML = '<a style="margin-right:5px;" href="' + n.F_FileUrl + '" download="' + n.F_FileName.substring(19)+ '">' + n.F_FileName.substring(19) + '</a>'
  220. $(HTML).appendTo($('.FJ'));
  221. })
  222. }
  223. })
  224. }
  225. // <a class="tiaozhuan" style="margin-left: -5px; width:100%; display:block; text-align: center;" href="' + (n.File == null ? '' : n.File[0].F_FileUrl) + '" download="' + (n.File == null ? '' : n.File[0].F_FileUrl) + '" >附件</a>
  226. // 判断附件
  227. function Hove(){
  228. $(document).on("mouseover mouseout",'.tiaozhuan',function(event){
  229. if(event.type == "mouseover"){
  230. //鼠标悬浮
  231. var miao=$(this).attr("href");
  232. if (miao=="") {
  233. $(this).removeAttr("href");
  234. $(this).removeAttr("download");
  235. $(this).html("")
  236. } else{
  237. $(this).attr("href");
  238. $(this).attr("download");
  239. }
  240. }else if(event.type == "mouseout"){
  241. //鼠标离开
  242. }
  243. })
  244. }
  245. //草稿详情
  246. function Detail() {
  247. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetDraftInfo', {
  248. workorderid: wid,
  249. type: 2,
  250. token: $.cookie("token")
  251. }, function(result) {
  252. if (result.state.toLowerCase() == "success") {
  253. if (result.data.length > 0) {
  254. $("#dealman").val(result.data[0].F_DealUser);
  255. $('#result').val(result.data[0].F_Result);
  256. a = result.data[0].F_Id;
  257. };
  258. }
  259. })
  260. }
  261. //清除
  262. function Clean(){
  263. $("#startTime").val(''),
  264. $('#assignedopinion').val('')
  265. }
  266. //上传文件
  267. function upload() {
  268. var Files = document.getElementById("upFile").files;
  269. if (Files.length > 0) {
  270. var formData = new FormData();
  271. for (var i = 0; i < Files.length; i++) {
  272. formData.append('file' + i, Files[i]);
  273. }
  274. formData.append("token", $.cookie("token"));
  275. $.ajax({
  276. url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  277. type: "POST",
  278. data: formData,
  279. /**
  280. *必须false才会自动加上正确的Content-Type
  281. */
  282. contentType: false,
  283. /**
  284. * 必须false才会避开jQuery对 formdata 的默认处理
  285. * XMLHttpRequest会对 formdata 进行正确的处理
  286. */
  287. processData: false,
  288. success: function (result) {
  289. document.getElementById("upFile").outerHTML = document.getElementById("upFile").outerHTML;
  290. $("#upFile").change(function () {
  291. upload();
  292. });
  293. var r = $.parseJSON(result);
  294. if (r.state.toLowerCase() == "success") {
  295. $(".fjnr").text(r.data[0].F_FileName);
  296. var a = r.data;
  297. $(a).each(function (i, n) {
  298. var strs = '<span class="files" fiel-num="' + n.F_FileId + '">' + n.F_FileName.substring(19) + '<i class="fa fa-remove del_file"></i></span>'
  299. $(strs).appendTo($('.fileBox')).find('.del_file').click(function (event) {
  300. event.stopPropagation();
  301. $(this).parent().remove();
  302. file_num()
  303. })
  304. })
  305. file_num();
  306. }
  307. }
  308. });
  309. } else {
  310. layer.confirm('请上传文件!', {
  311. btn: ['确定']
  312. });
  313. }
  314. }
  315. //上传文件隐藏域值
  316. function file_num(){
  317. var str = '';
  318. var Str;
  319. $('.fileBox .files').each(function(j,m){
  320. var aa=$(m).attr("fiel-num")
  321. console.log(aa);
  322. str += aa + ",";
  323. Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
  324. })
  325. $("#file").val(Str);
  326. }
  327. </script>
  328. </body>
  329. </html>