商丘12345 前端

banli_zilei.html 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  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. <!--办理内容-->
  30. <div style="width: 100%;padding: 10px;">
  31. <table class="table" border="" cellspacing="0" cellpadding="0" style="border: 1px solid #e7eaec;">
  32. <theard>
  33. <tr>
  34. <td class="text-center" style="min-width: 100px;">派单时间</td>
  35. <td class="text-center" style="min-width: 100px;">办理期限</td>
  36. <td class="text-center" style="min-width: 100px;">内容</td>
  37. </tr>
  38. </theard>
  39. <tbody class="BLNR" style="border-top: none; padding: 8px;"></tbody>
  40. </table>
  41. </div>
  42. <!--重新办理-->
  43. <div style="width: 100%;padding: 10px;">
  44. <table class="table" border="" cellspacing="0" cellpadding="0" style="border: 1px solid #e7eaec;">
  45. <theard>
  46. <tr>
  47. <td class="text-center" style="min-width:50px;">序号</td>
  48. <td class="text-center" style="min-width:50px;">办理时间</td>
  49. <td class="text-center" style="min-width:50px;">内容</td>
  50. <td class="text-center" style="min-width:50px;">审批时间</td>
  51. <td class="text-center" style="min-width:50px;">审批内容</td>
  52. <td class="text-center" style="min-width:50px;">审批意见</td>
  53. <td class="text-center" style="min-width:50px;">类型</td>
  54. <td class="text-center" style="min-width:50px;">是否有处理结果</td>
  55. <td class="text-center" style="min-width:50px;">处理方案/进程</td>
  56. <td class="text-center" style="min-width:50px;">是否保密</td>
  57. <td class="text-center" style="min-width:50px;">联系方式</td>
  58. <td class="text-center" style="min-width:50px;">沟通时间</td>
  59. <td class="text-center" style="min-width:50px;">沟通方式</td>
  60. <td class="text-center" style="min-width:50px;">答复内容</td>
  61. <td class="text-center" style="min-width:50px;">是否满意</td>
  62. <td class="text-center" style="min-width:50px;">附件</td>
  63. </tr>
  64. </theard>
  65. <tbody class="HGXX" style="border-top: none; padding: 8px;"></tbody>
  66. <!--<div class="FJ"></div>-->
  67. </table>
  68. </div>
  69. <div class="Common">
  70. <table>
  71. <tr>
  72. <th class="Importent">承办人:</th>
  73. <td> <input id="dealman" type="text" style="height: 32px;"></td>
  74. </tr>
  75. <tr>
  76. <th class="Importent">办理内容:</th>
  77. <td><textarea data-adaptheight id="result" name="" rows="" cols=""></textarea></td>
  78. <input type="hidden" id="ID" />
  79. </tr>
  80. <tr>
  81. <th>是否有处理结果:</th>
  82. <td id="isProResultRadio" style="font-size: 12px">
  83. <label style="margin-right: 10px">
  84. <input type="radio" value="1" name="isDisposeResult" style="vertical-align: -2px;" />是
  85. </label>
  86. <label>
  87. <input type="radio" value="2" name="isDisposeResult" style="vertical-align: -2px;" />否
  88. </label>
  89. </td>
  90. </tr>
  91. <tr class="prosituation-wrapper">
  92. <th>处理方案/进程:</th>
  93. <td>
  94. <textarea data-adaptheight id="prosituation" name="" rows="6" cols="" ></textarea>
  95. </td>
  96. </tr>
  97. <tr class="annotation-wrapper">
  98. <th style="color:#FF0000;">注释:</th>
  99. <td style="color:#FF0000">请提交加盖单位公章的相关说明文件</td>
  100. </tr>
  101. <tr class="dealcontact-wrapper">
  102. <th>联系方式:</th>
  103. <td>
  104. <input type="text" id="dealcontact">
  105. </td>
  106. </tr>
  107. <tr class="connecttime-wrapper">
  108. <th>沟通时间:</th>
  109. <td>
  110. <input type="text" class="laydate-icon" id="connecttime" style="width: 172px; height: 32px; border-color: rgb(158, 158, 158);">
  111. </td>
  112. </tr>
  113. <tr class="connectmode-wrapper">
  114. <th>沟通方式:</th>
  115. <td>
  116. <input type="text" id="connectmode">
  117. </td>
  118. </tr>
  119. <tr class="replycontent-wrapper">
  120. <th>答复内容:</th>
  121. <td>
  122. <input type="text" id="replycontent">
  123. </td>
  124. </tr>
  125. <tr class="isstaisfied-wrapper">
  126. <th>是否满意:</th>
  127. <td id="isStaisfiedRadio" style="font-size: 12px">
  128. <label style="margin-right: 10px;">
  129. <input type="radio" value="1" name="isstaisfied" style="vertical-align: -2px;" />满意
  130. </label>
  131. <label style="margin-right: 10px;">
  132. <input type="radio" value="2" name="isstaisfied" style="vertical-align: -2px;" />基本满意
  133. </label>
  134. <label style="margin-right: 10px;">
  135. <input type="radio" value="3" name="isstaisfied" style="vertical-align: -2px;" />不满意
  136. </label>
  137. </td>
  138. </tr>
  139. <tr>
  140. <th class="Importent">附件:</th>
  141. <td>
  142. <div class="fileBox">
  143. </div>
  144. <span class="fjnr"></span>
  145. <input class="input" type="file" name="upFile" id="upFile" multiple="multiple" style="display: none;">
  146. <input class="input" type="button" value="上传" id="scwj" />
  147. <!--<input class="input" type="button" value="删除附件" id="scfj" style="display:none;" />-->
  148. <input type="hidden" id="file" />
  149. <span style="color:#FF0000; border: none;">
  150. (文件格式为png,jpg,mp4,mp3,pdf,doc,docx,xls,xlsx)
  151. </span>
  152. </td>
  153. </tr>
  154. </table>
  155. <div class="btn_box">
  156. <button class="btns Submit">保存并办理</button>
  157. </div>
  158. </div>
  159. <script src="../css/laydate/laydate.js"></script>
  160. <script src="../js/adjustHeight.js"></script>
  161. <script>
  162. var wid = helper.request.queryString("wid");
  163. var isProtect = helper.request.queryString("isProtect");
  164. var State;
  165. var a = $("#ID").val()
  166. Detail();
  167. $(document).ready(function () {
  168. laydate.skin('blue');
  169. laydate({
  170. elem: '#connecttime',
  171. event: 'focus',
  172. istoday: true,
  173. istime: true,
  174. type: 'datetime',
  175. format: 'YYYY-MM-DD hh:mm:ss',
  176. });
  177. HGXX();
  178. BLNR();
  179. // Hove();
  180. // LOAD();
  181. //上传附件
  182. $("#scwj").click(function () {
  183. $("#upFile").trigger("click");
  184. })
  185. $("#upFile").change(function () {
  186. upload();
  187. })
  188. $("#scfj").click(function () {
  189. $(".fjnr").text("");
  190. $("#scfj").hide();
  191. })
  192. // $('.BC').click(function() {
  193. // if($("#dealman").val()==""){
  194. // layer.msg("办理人不能为空");
  195. // }else if($("#result").val()==""){
  196. // layer.msg("办理内容不能为空");
  197. // }else{
  198. // State = 0;
  199. // JA();
  200. // }
  201. //
  202. // })
  203. $('.Submit').click(function () {
  204. if ($("#dealman").val() == "") {
  205. layer.msg("办理人不能为空");
  206. } else if ($("#result").val() == "") {
  207. layer.msg("办理内容不能为空");
  208. } else {
  209. State = 1;
  210. JA();
  211. }
  212. })
  213. $(".prosituation-wrapper").hide(); //处理方案/进程
  214. $(".annotation-wrapper").hide(); //注释
  215. $(".dealcontact-wrapper").hide(); //联系方式
  216. $(".connecttime-wrapper").hide(); //沟通时间
  217. $(".connectmode-wrapper").hide(); //沟通方式
  218. $(".replycontent-wrapper").hide(); //答复内容
  219. $(".isstaisfied-wrapper").hide(); //是否满意
  220. /*
  221. * 处理结果
  222. * 是 1
  223. * 否 2
  224. */
  225. $('#isProResultRadio').find('input[type="radio"]').on('change', function() {
  226. $("#prosituation").val(""); //处理方案/进程
  227. $("#dealcontact").val(""); //联系方式
  228. $("#connecttime").val(""); //沟通时间
  229. $("#connectmode").val(""); //沟通方式
  230. $("#replycontent").val(""); //答复内容
  231. $('#isStaisfiedRadio input[name="isstaisfied"]:checked').prop("checked", false); //是否满意
  232. isProResultJudge($(this).val());
  233. });
  234. });
  235. //交办
  236. function JA() {
  237. $.post(huayi.config.callcenter_url + 'WorkOrder/DealWorkOrder', {
  238. workorderid: wid,
  239. dealman: $("#dealman").val(), //承办人
  240. result: $('#result').val(), //办理内容
  241. isproresult: $('#isProResultRadio input[name="isDisposeResult"]:checked').val(), //处理结果
  242. prosituation: $("#prosituation").val(), //处理方案/进程
  243. dealcontact: $("#dealcontact").val(), //联系方式
  244. connecttime: $("#connecttime").val(), //沟通时间
  245. connectmode: $("#connectmode").val(), //沟通方式
  246. replycontent: $("#replycontent").val(), //答复内容
  247. isstaisfied: $('#isStaisfiedRadio input[name="isstaisfied"]:checked').val(), //是否满意
  248. state: State,
  249. feedbackid: a,
  250. files: $("#file").val(),
  251. token: $.cookie("token")
  252. }, function (result) {
  253. result = JSON.parse(result);
  254. if (result.state.toLowerCase() == "success") {
  255. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  256. parent.layer.close(index); //再执行关闭
  257. parent.load();
  258. parent.layer.msg("办理成功");
  259. $('.fileBox').html('');
  260. }
  261. })
  262. }
  263. // 工单详情
  264. function HGXX() {
  265. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetSecondDealInfo', {
  266. workorderid: wid,
  267. token: $.cookie("token")
  268. }, function (result) {
  269. // result = JSON.stringify(result)
  270. // alert(result)
  271. console.log(result);
  272. if (result.state.toLowerCase() == "success") {
  273. var temp;
  274. var Agree;
  275. $.each(result.data.fkinfo, function (i, n) {
  276. // var r = JSON.stringify(n.File);
  277. if (n.F_IsAudit == 1) {
  278. Agree = "同意";
  279. } else if (n.F_IsAudit == 2) {
  280. Agree = "拒绝";
  281. } else if (n.F_IsAudit == 0) {
  282. Agree = "";
  283. }
  284. var bval = n.F_Type;
  285. switch(bval + '') {
  286. case '1':
  287. bval = '主办';
  288. break;
  289. case '2':
  290. bval = '协办';
  291. break;
  292. }
  293. //是否有处理结果
  294. var isProResultValue = n.F_IsProResult + "";
  295. switch (isProResultValue) {
  296. case "0":
  297. isProResultValue = "默认";
  298. break;
  299. case "1":
  300. isProResultValue = "是";
  301. break;
  302. case "2":
  303. isProResultValue = "否";
  304. break;
  305. }
  306. //是否保密
  307. var isProtectValue = n.F_IsProtect + "";
  308. switch (isProtectValue) {
  309. case "1":
  310. isProtectValue = "是";
  311. break;
  312. case "0":
  313. isProtectValue = "否";
  314. break;
  315. }
  316. //是否保密
  317. var isSatisfiedValue = n.F_IsSatisfied + "";
  318. switch (isSatisfiedValue) {
  319. case "0":
  320. isSatisfiedValue = "未评价";
  321. break;
  322. case "1":
  323. isSatisfiedValue = "满意";
  324. break;
  325. case "2":
  326. isSatisfiedValue = "基本满意";
  327. break;
  328. case "3":
  329. isSatisfiedValue = "不满意";
  330. break;
  331. }
  332. // 审批时间
  333. var auditTimeValue
  334. switch (n.F_AuditTime) {
  335. case "":
  336. auditTimeValue = ""
  337. break;
  338. case null:
  339. auditTimeValue = ""
  340. break;
  341. default:
  342. auditTimeValue = n.F_AuditTime
  343. break;
  344. }
  345. //审批内容
  346. var auditReasonValue
  347. switch (n.F_AuditReason) {
  348. case "":
  349. auditReasonValue = ""
  350. break;
  351. case null:
  352. auditReasonValue = ""
  353. break;
  354. default:
  355. auditReasonValue = n.F_AuditReason
  356. break;
  357. }
  358. temp = '<tr>' +
  359. '<td class="text-center">' + (i + 1) + '</td>' +
  360. '<td class="text-center">' + n.F_CreateTime + '</td>' +
  361. '<td class="text-center">' + n.F_Result + '</td>' +
  362. '<td class="text-center">' + auditTimeValue + '</td>' +
  363. '<td class="text-center">' + auditReasonValue + '</td>' +
  364. '<td class="text-center">' + Agree + '</td>' +
  365. '<td class="text-center" data-formatter="shtype">' + bval + '</td>' +
  366. '<td class="text-center">' + isProResultValue + '</td>' +
  367. '<td class="text-center">' + n.F_ProSituation + '</td>' +
  368. '<td class="text-center">' + isProtectValue + '</td>' +
  369. '<td class="text-center">' + n.F_DealUserContact + '</td>' +
  370. '<td class="text-center">' + n.F_ConnectTime + '</td>' +
  371. '<td class="text-center">' + n.F_ConnectMode + '</td>' +
  372. '<td class="text-center">' + n.F_ReplyContent + '</td>' +
  373. '<td class="text-center">' + isSatisfiedValue + '</td>' +
  374. '<td class="text-center FJ" style="color:#00a1cb;"></td>' +
  375. '</tr>';
  376. // var tmp = '';
  377. // if (n.File) {
  378. // $.each(n.File, function (d, f) {
  379. // tmp += '<a style="margin-right:5px;" href="' + f.F_FileUrl + '" download="' + f.F_FileUrl + '">' + f.F_FileName.substring(19) + '</a>';
  380. // })
  381. // }
  382. $(temp).appendTo($('.HGXX'))
  383. // .find('.FJ')
  384. // .append(tmp);
  385. });
  386. //
  387. // alert(i);
  388. }
  389. })
  390. }
  391. // <a class="tiaozhuan" style="margin-right:5px;" href="' + (n.File == null ? '' : n.File[0].F_FileUrl) + '" download="' + (n.File == null ? '' : n.File[0].F_FileUrl) + '" >附件</a>
  392. // function Hove(){
  393. // $(document).on("mouseover mouseout",'.tiaozhuan',function(event){
  394. // if(event.type == "mouseover"){
  395. // //鼠标悬浮
  396. // var miao=$(this).attr("href");
  397. // if (miao=="") {
  398. // $(this).removeAttr("href");
  399. // $(this).removeAttr("download");
  400. // $(this).html("");
  401. //
  402. // } else{
  403. // $(this).attr("href");
  404. // $(this).attr("download");
  405. // }
  406. // }else if(event.type == "mouseout"){
  407. // //鼠标离开
  408. // }
  409. // })
  410. //
  411. //
  412. // }
  413. // $(window).load(function(){
  414. // alert("DDD");
  415. // alert($(".tiaozhuan").attr("href"));
  416. // var miao1=$(".tiaozhuan").attr("href");
  417. // if (miao1=="") {
  418. // alert("aaa");
  419. //// $(this).html("");
  420. // } else{
  421. // alert("bbb");
  422. // $(this).html("");
  423. // }
  424. // });
  425. // 派单内容给
  426. function BLNR() {
  427. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetSecondDealInfo', {
  428. workorderid: wid,
  429. token: $.cookie("token")
  430. }, function (result) {
  431. // result = JSON.stringify(result)
  432. // console.log(result);
  433. if (result.state.toLowerCase() == "success") {
  434. var temp2;
  435. $.each(result.data.pdinfo, function (i, n) {
  436. temp2 = temp2 + '<tr><td class="text-center">' + n.F_CreateTime + '</td><td class="text-center">' + n.F_LimitTime + '</td><td class="text-center">' + n.F_AssignedOpinion + '</td></tr>';
  437. });
  438. $('.BLNR').append(temp2);
  439. }
  440. })
  441. }
  442. //草稿详情
  443. function Detail() {
  444. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetDraftInfo', {
  445. workorderid: wid,
  446. type: 2,
  447. token: $.cookie("token")
  448. }, function (result) {
  449. if (result.state.toLowerCase() == "success") {
  450. if (result.data.length > 0) {
  451. var IsProResultValue = result.data[0].F_IsProResult + "";
  452. isProResultJudge(IsProResultValue);
  453. $("#dealman").val(result.data[0].F_DealUser); //承办人
  454. $("#result").val(result.data[0].F_Result); //办理内容
  455. $('#isProResultRadio input[name="isDisposeResult"][value="' + result.data[0].F_IsProResult +'"]').prop("checked", true);//是否有处理结果
  456. $("#prosituation").val(result.data[0].F_ProSituation); //处理方案/进程
  457. $("#dealcontact").val(result.data[0].F_DealUserContact); //联系方式
  458. $("#connecttime").val(result.data[0].F_ConnectTime); //沟通时间
  459. $("#connectmode").val(result.data[0].F_ConnectMode); //沟通方式
  460. $("#replycontent").val(result.data[0].F_ReplyContent); //答复内容
  461. $('#isStaisfiedRadio input[name="isstaisfied"][value="' + result.data[0].F_IsSatisfied +'"]').prop("checked", true); //是否满意
  462. a = result.data[0].F_Id;
  463. };
  464. }
  465. })
  466. }
  467. //清除
  468. function Clean() {
  469. $("#startTime").val(''),
  470. $('#assignedopinion').val('')
  471. }
  472. //上传文件
  473. function upload() {
  474. var Files = document.getElementById("upFile").files;
  475. if (Files.length > 0) {
  476. var formData = new FormData();
  477. for (var i = 0; i < Files.length; i++) {
  478. formData.append('file' + i, Files[i]);
  479. }
  480. formData.append("token", $.cookie("token"));
  481. var typeName=Files[0].name.split('.')[1];
  482. if (typeName=="png"||typeName=='jpg'||typeName=='mp4'||typeName=='mp3'||typeName=='pdf'||typeName=='doc'||typeName=='docx'||typeName=='xls'||typeName=='xlsx') {
  483. $.ajax({
  484. url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  485. type: "POST",
  486. data: formData,
  487. /**
  488. *必须false才会自动加上正确的Content-Type
  489. */
  490. contentType: false,
  491. /**
  492. * 必须false才会避开jQuery对 formdata 的默认处理
  493. * XMLHttpRequest会对 formdata 进行正确的处理
  494. */
  495. processData: false,
  496. success: function (result) {
  497. document.getElementById("upFile").outerHTML = document.getElementById("upFile").outerHTML;
  498. $("#upFile").change(function () {
  499. upload();
  500. });
  501. var r = $.parseJSON(result);
  502. if (r.state.toLowerCase() == "success") {
  503. //$(".fjnr").text(r.data[0].F_FileName);
  504. var a = r.data;
  505. $(a).each(function (i, n) {
  506. var strs = '<span class="files" fiel-num="' + n.F_FileId + '">' + n.F_FileName.substring(19) + '<i class="fa fa-remove del_file"></i></span>'
  507. $(strs).appendTo($('.fileBox')).find('.del_file').click(function (event) {
  508. event.stopPropagation();
  509. $(this).parent().remove();
  510. file_num()
  511. })
  512. })
  513. file_num();
  514. }
  515. }
  516. });
  517. }else{
  518. layer.msg("格式不正确");
  519. }
  520. } else {
  521. layer.confirm('请上传文件!', {
  522. btn: ['确定']
  523. });
  524. }
  525. }
  526. //上传文件隐藏域值
  527. function file_num() {
  528. var str = '';
  529. var Str;
  530. $('.fileBox .files').each(function (j, m) {
  531. var aa = $(m).attr("fiel-num")
  532. console.log(aa);
  533. str += aa + ",";
  534. Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
  535. })
  536. $("#file").val(Str);
  537. }
  538. // 处理结果判断
  539. function isProResultJudge (isProResultdata) {
  540. if(isProResultdata === '1') {
  541. if (isProtect === "1" ) {
  542. $(".prosituation-wrapper").hide(); //处理方案/进程
  543. $(".annotation-wrapper").hide(); //注释
  544. $(".dealcontact-wrapper").show(); //联系方式
  545. $(".connecttime-wrapper").hide(); //沟通时间
  546. $(".connectmode-wrapper").hide(); //沟通方式
  547. $(".replycontent-wrapper").hide(); //答复内容
  548. $(".isstaisfied-wrapper").hide(); //是否满意
  549. } else if (isProtect === "0") {
  550. $(".prosituation-wrapper").hide(); //处理方案/进程
  551. $(".annotation-wrapper").hide(); //注释
  552. $(".dealcontact-wrapper").hide(); //联系方式
  553. $(".connecttime-wrapper").show(); //沟通时间
  554. $(".connectmode-wrapper").show(); //沟通方式
  555. $(".replycontent-wrapper").show(); //答复内容
  556. $(".isstaisfied-wrapper").show(); //是否满意
  557. }
  558. } else if (isProResultdata === '2') {
  559. $(".prosituation-wrapper").show(); //处理方案/进程
  560. $(".annotation-wrapper").show(); //注释
  561. $(".dealcontact-wrapper").hide(); //联系方式
  562. $(".connecttime-wrapper").hide(); //沟通时间
  563. $(".connectmode-wrapper").hide(); //沟通方式
  564. $(".replycontent-wrapper").hide(); //答复内容
  565. $(".isstaisfied-wrapper").hide(); //是否满意
  566. }
  567. }
  568. </script>
  569. </body>
  570. </html>