Sin descripción

banli_zilei.html 28KB

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