Nenhuma Descrição

processing_audit.html 16KB

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