Nessuna descrizione

processing_audit.html 16KB

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