Bez popisu

processing_audit.html 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  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. <td class="text-center authority" style="min-width: 100px;">操作</td>
  48. </tr>
  49. </theard>
  50. <tbody class="BLNR" style="border-top: none; padding: 8px;">
  51. </tbody>
  52. <!--<div class="FJ">
  53. </div>-->
  54. </table>
  55. <table>
  56. <tr>
  57. <th>工单内容:</th>
  58. <td id="workOrderContent"></td>
  59. </tr>
  60. <!-- <tr>
  61. <th class="Importent" style="text-align: left;"> 审核意见:</th>
  62. </tr>
  63. <tr>
  64. <td style="padding: 0px;"><textarea data-adaptheight id="reason" name="" rows="" cols=""
  65. style="text-indent: 2em;"></textarea></td>
  66. <input type="hidden" id="ID" />
  67. </tr> -->
  68. </table>
  69. <div class="btn_box">
  70. <button class="btns BC">同意</button>
  71. <button class="btns Submit">拒绝</button>
  72. </div>
  73. </div>
  74. <script src="../css/laydate/laydate.js"></script>
  75. <script src="../js/adjustHeight.js"></script>
  76. <script>
  77. var wid = helper.request.queryString("wid");
  78. var State;
  79. var a = $("#ID").val()
  80. Detail();
  81. $(document).ready(function () {
  82. // HGXX();
  83. Hove();
  84. getDetail();
  85. //上传附件
  86. $("#scwj").click(function () {
  87. $("#upFile").trigger("click");
  88. })
  89. $("#upFile").change(function () {
  90. upload();
  91. })
  92. $("#scfj").click(function () {
  93. $(".fjnr").text("");
  94. $("#scfj").hide();
  95. })
  96. $('.BC').click(function () {
  97. // if ($("#reason").val() == "") {
  98. // layer.msg("请填写审核意见");
  99. // } else {
  100. State = 1;
  101. JA();
  102. // }
  103. })
  104. $('.Submit').click(function () {
  105. layer.open({
  106. type: 2,
  107. content: "./processing_refuse.html?wid=" + wid + "&backid=" +
  108. ccc, //iframe的url,no代表不显示滚动条
  109. title: "拒绝",
  110. area: ["60%", "80%"], //宽高
  111. });
  112. })
  113. });
  114. //审批意见
  115. function JA() {
  116. $.post(huayi.config.callcenter_url + 'WorkOrder/AuditSplitWorkOrder', {
  117. workorderid: wid,
  118. // reason: $('#reason').val(), //办理内容
  119. state: State,
  120. backid: ccc,
  121. token: $.cookie("token")
  122. }, function (result) {
  123. result = JSON.parse(result);
  124. if (result.state.toLowerCase() == "success") {
  125. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  126. parent.layer.close(index); //再执行关闭
  127. parent.$('#orderlist').bootstrapTable('refresh');
  128. parent.layer.msg("处理成功");
  129. }
  130. })
  131. }
  132. // 获取详情
  133. function getDetail() {
  134. $.ajax({
  135. type: "get",
  136. url: huayi.config.callcenter_url + "WorkOrder/GetWorkOrder",
  137. dataType: 'json',
  138. async: false,
  139. data: {
  140. workorderid: wid,
  141. token: $.cookie("token")
  142. },
  143. success: function (result) {
  144. var content = result.data;
  145. if (result.state.toLowerCase() == "success") {
  146. if (content.data[0].F_Content === "" || content.data[0].F_Content === null) {
  147. $("#workOrderContent").text(content.data[0].F_ComContent)
  148. } else {
  149. $("#workOrderContent").text(content.data[0].F_Content)
  150. }
  151. var temp1;
  152. $.each(result.data.ejbldata, function (i, n) {
  153. var bval = n.F_Type;
  154. switch (bval + '') {
  155. case '1':
  156. bval = '主办';
  157. break;
  158. case '2':
  159. bval = '协办';
  160. break;
  161. }
  162. //是/否向当事人反馈
  163. var isProResultValue = n.F_IsProResult + "";
  164. switch (isProResultValue) {
  165. case "0":
  166. isProResultValue = "否";
  167. break;
  168. case "1":
  169. isProResultValue = "是";
  170. break;
  171. case "2":
  172. isProResultValue = "已办未果";
  173. break;
  174. }
  175. //是否满意
  176. var isSatisfiedValue = n.F_IsSatisfied + "";
  177. switch (isSatisfiedValue) {
  178. case "0":
  179. isSatisfiedValue = "未评价";
  180. break;
  181. case "1":
  182. isSatisfiedValue = "满意";
  183. break;
  184. case "2":
  185. isSatisfiedValue = "基本满意";
  186. break;
  187. case "3":
  188. isSatisfiedValue = "不满意";
  189. break;
  190. }
  191. //沟通时间
  192. var connectTimeValue = n.F_ConnectTime;
  193. switch (connectTimeValue) {
  194. case null:
  195. connectTimeValue = "";
  196. break;
  197. default:
  198. connectTimeValue = n.F_ConnectTime;
  199. }
  200. //职务
  201. var dutiesValue
  202. switch (n.F_Duties) {
  203. case "":
  204. dutiesValue = ""
  205. break;
  206. case null:
  207. dutiesValue = ""
  208. break;
  209. default:
  210. dutiesValue = n.F_Duties
  211. break;
  212. }
  213. //处理情况
  214. var situationValue
  215. switch (n.F_Situation) {
  216. case "":
  217. situationValue = ""
  218. break;
  219. case null:
  220. situationValue = ""
  221. break;
  222. default:
  223. situationValue = n.F_Situation
  224. break;
  225. }
  226. // 审核领导
  227. var auditUser
  228. switch (n.F_AuditUser) {
  229. case "":
  230. auditUser = ""
  231. break;
  232. case null:
  233. auditUser = ""
  234. break;
  235. default:
  236. auditUser = n.F_AuditUser
  237. break;
  238. }
  239. temp1 = temp1 +
  240. '<tr>' +
  241. '<td class="text-center">' + n.F_DealUser + '</td>' +
  242. '<td class="text-center">' + n.F_DealUserContact + '</td>' +
  243. '<td class="text-center">' + dutiesValue + '</td>' +
  244. '<td class="text-center">' + situationValue + '</td>' +
  245. '<td class="text-center">' + n.DeptName + '</td>' +
  246. // '<td class="text-center" data-formatter="shtype">' + bval +
  247. // '</td>' +
  248. '<td class="text-center">' + n.F_Result + '</td>' +
  249. '<td class="text-center">' + n.F_CreateTime + '</td>' +
  250. '<td class="text-center">' + isProResultValue + '</td>' +
  251. '<td class="text-center">' + isSatisfiedValue + '</td>' +
  252. '<td class="text-center">' + auditUser + '</td>' +
  253. '<td class="text-center FJ" style="color:#00a1cb;">';
  254. var FileHtml;
  255. $(n.File).each(function (j, m) {
  256. if (m.F_FileType == ".jpg" || m
  257. .F_FileType ==
  258. ".png") {
  259. FileHtml =
  260. '<img style="width:80px; height:80px" border="0" onclick="viewImage(this)" src="' +
  261. m.F_FileUrl + '" alt="' + m
  262. .F_FileName +
  263. '" fileId="' + m.F_FileId +
  264. '">';
  265. } else {
  266. FileHtml =
  267. '<div><a style="margin-right:5px;" target="view_window" href="' +
  268. m.F_FileUrl + '" download="' + m
  269. .F_FileName + '">' + m.F_FileName.substring(
  270. 19) + '</a></div>'
  271. }
  272. // htmls +=
  273. // '<div><a style="margin-right:5px;" target="view_window" href="' +
  274. // m.F_FileUrl + '" download="' + m
  275. // .F_FileName + '">' + m.F_FileName.substring(
  276. // 19) + '</a></div>';
  277. temp1 += FileHtml;
  278. })
  279. temp1 += "</td>" +
  280. '<td class="text-center authority"><button class="btns edit" index="' +
  281. n
  282. .F_WorkOrderId + '">修改</button></td>' +
  283. '</tr>'
  284. ccc = n.F_Id;
  285. });
  286. $('.BLNR').append(temp1);
  287. // $(result.data.ejbldata.File).each(function (i, n) {
  288. // HTML = '<a style="margin-right:5px;" href="' + n.F_FileUrl +
  289. // '" download="' + n
  290. // .F_FileName.substring(19) + '">' + n.F_FileName.substring(19) +
  291. // '</a>'
  292. // $(HTML).appendTo($('.FJ'));
  293. // })
  294. $(".edit").click(function () {
  295. var index = $(this).attr('index');
  296. layer.open({
  297. type: 2,
  298. content: "../CommonHtml/XGbanli.html?wid=" +
  299. index, //iframe的url,no代表不显示滚动条
  300. title: '修改办理结果',
  301. area: ['60%', '55%'], //宽高
  302. });
  303. })
  304. }
  305. }
  306. })
  307. }
  308. // 判断附件
  309. function Hove() {
  310. $(document).on("mouseover mouseout", '.tiaozhuan', function (event) {
  311. if (event.type == "mouseover") {
  312. //鼠标悬浮
  313. var miao = $(this).attr("href");
  314. if (miao == "") {
  315. $(this).removeAttr("href");
  316. $(this).removeAttr("download");
  317. $(this).html("")
  318. } else {
  319. $(this).attr("href");
  320. $(this).attr("download");
  321. }
  322. } else if (event.type == "mouseout") {
  323. //鼠标离开
  324. }
  325. })
  326. }
  327. //草稿详情
  328. function Detail() {
  329. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetDraftInfo', {
  330. workorderid: wid,
  331. type: 2,
  332. token: $.cookie("token")
  333. }, function (result) {
  334. if (result.state.toLowerCase() == "success") {
  335. if (result.data.length > 0) {
  336. $("#dealman").val(result.data[0].F_DealUser);
  337. $('#result').val(result.data[0].F_Result);
  338. a = result.data[0].F_Id;
  339. };
  340. }
  341. })
  342. }
  343. //清除
  344. function Clean() {
  345. $("#startTime").val(''),
  346. $('#assignedopinion').val('')
  347. }
  348. //上传文件
  349. function upload() {
  350. var Files = document.getElementById("upFile").files;
  351. if (Files.length > 0) {
  352. var formData = new FormData();
  353. for (var i = 0; i < Files.length; i++) {
  354. formData.append('file' + i, Files[i]);
  355. }
  356. formData.append("token", $.cookie("token"));
  357. $.ajax({
  358. url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  359. type: "POST",
  360. data: formData,
  361. /**
  362. *必须false才会自动加上正确的Content-Type
  363. */
  364. contentType: false,
  365. /**
  366. * 必须false才会避开jQuery对 formdata 的默认处理
  367. * XMLHttpRequest会对 formdata 进行正确的处理
  368. */
  369. processData: false,
  370. success: function (result) {
  371. document.getElementById("upFile").outerHTML = document.getElementById("upFile")
  372. .outerHTML;
  373. $("#upFile").change(function () {
  374. upload();
  375. });
  376. var r = $.parseJSON(result);
  377. if (r.state.toLowerCase() == "success") {
  378. $(".fjnr").text(r.data[0].F_FileName);
  379. var a = r.data;
  380. $(a).each(function (i, n) {
  381. var strs = '<span class="files" fiel-num="' + n.F_FileId + '">' + n
  382. .F_FileName.substring(19) +
  383. '<i class="fa fa-remove del_file"></i></span>'
  384. $(strs).appendTo($('.fileBox')).find('.del_file').click(function (
  385. event) {
  386. event.stopPropagation();
  387. $(this).parent().remove();
  388. file_num()
  389. })
  390. })
  391. file_num();
  392. }
  393. }
  394. });
  395. } else {
  396. layer.confirm('请上传文件!', {
  397. btn: ['确定']
  398. });
  399. }
  400. }
  401. //上传文件隐藏域值
  402. function file_num() {
  403. var str = '';
  404. var Str;
  405. $('.fileBox .files').each(function (j, m) {
  406. var aa = $(m).attr("fiel-num")
  407. console.log(aa);
  408. str += aa + ",";
  409. Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
  410. })
  411. $("#file").val(Str);
  412. }
  413. // 关闭页面
  414. function closePage() {
  415. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  416. parent.layer.close(index); //再执行关闭
  417. parent.$('#orderlist').bootstrapTable('refresh');
  418. }
  419. function viewImage(file) {
  420. var json = {
  421. "title": "", //相册标题
  422. "id": 1, //相册id
  423. "start": 0, //初始显示的图片序号,默认0
  424. "data": [ //相册包含的图片,数组格式
  425. {
  426. "alt": $(file).attr("alt"),
  427. "pid": $(file).attr("fileId"), //图片id
  428. "src": $(file).attr("src"), //原图地址
  429. "thumb": "" //缩略图地址
  430. }
  431. ]
  432. }
  433. layer.photos({
  434. photos: json,
  435. anim: 5 //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数)
  436. });
  437. }
  438. </script>
  439. </body>
  440. </html>