Geen omschrijving

banli_zilei.html 43KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952
  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" list="dealmanList" type="text" style="height: 32px;" autocomplete="off">
  76. <datalist id="dealmanList">
  77. </datalist>
  78. </td>
  79. <th class="Importent">联系方式:</th>
  80. <td>
  81. <input type="text" id="dealcontact">
  82. </td>
  83. <th class="Importent">职务:</th>
  84. <td>
  85. <input type="text" id="duties">
  86. </td>
  87. </tr>
  88. <tr>
  89. <th class="Importent">处理结果:</th>
  90. <td colspan="5"><textarea data-adaptheight id="situation" name="" rows="6" cols=""></textarea></td>
  91. </tr>
  92. <tr>
  93. <th class="Importent">是/否向当事人反馈:</th>
  94. <td id="isProResultRadio" style="font-size: 12px">
  95. <label style="margin-right: 10px">
  96. <input type="radio" value="1" name="isDisposeResult" style="vertical-align: -2px;" />是
  97. </label>
  98. <label>
  99. <input type="radio" value="0" name="isDisposeResult" style="vertical-align: -2px;" />否
  100. </label>
  101. </td>
  102. </tr>
  103. <!-- <tr class="dealWithRemark-wrapper">
  104. <th>已办未果备注:</th>
  105. <td colspan="5">
  106. <textarea data-adaptheight id="dealWithRemark" name="" rows="6" cols=""></textarea>
  107. </td>
  108. </tr> -->
  109. <tr class="prosituation-wrapper">
  110. <th>处理方案/进程:</th>
  111. <td colspan="5">
  112. <textarea data-adaptheight id="prosituation" name="" rows="6" cols=""></textarea>
  113. </td>
  114. </tr>
  115. <tr class="annotation-wrapper">
  116. <th style="color:#FF0000;">注释:</th>
  117. <td style="color:#FF0000" colspan="5">请提交加盖单位公章的相关说明文件,不添加文件说明将被扣考核分</td>
  118. </tr>
  119. <tr class="connecttime-wrapper">
  120. <th>沟通时间:</th>
  121. <td>
  122. <input type="text" class="laydate-icon" id="connecttime"
  123. style="width: 172px; height: 32px; border-color: rgb(158, 158, 158);">
  124. </td>
  125. </tr>
  126. <tr class="connectmode-wrapper">
  127. <th>沟通方式:</th>
  128. <td>
  129. <input type="text" id="connectmode">
  130. </td>
  131. </tr>
  132. <!--<tr class="replycontent-wrapper">
  133. <th>答复内容:</th>
  134. <td colspan="5">
  135. <textarea id="replycontent" name="" rows="6" cols="" ></textarea>
  136. </td>
  137. </tr>-->
  138. <tr class="isstaisfied-wrapper">
  139. <th>是否满意:</th>
  140. <td id="isStaisfiedRadio" style="font-size: 12px" colspan="5">
  141. <label style="margin-right: 10px;">
  142. <input type="radio" value="1" name="isstaisfied" style="vertical-align: -2px;" />满意
  143. </label>
  144. <label style="margin-right: 10px;">
  145. <input type="radio" value="2" name="isstaisfied" style="vertical-align: -2px;" />基本满意
  146. </label>
  147. <label style="margin-right: 10px;">
  148. <input type="radio" value="3" name="isstaisfied" style="vertical-align: -2px;" />不满意
  149. </label>
  150. </td>
  151. </tr>
  152. <tr>
  153. <th class="Importent">附件:</th>
  154. <td colspan="5">
  155. <div class="fileBox">
  156. </div>
  157. <span class="fjnr"></span>
  158. <input class="input" type="file" name="upFile" id="upFile" multiple="multiple"
  159. style="display: none;">
  160. <input class="input" type="button" value="上传" id="scwj" />
  161. <!--<input class="input" type="button" value="删除附件" id="scfj" style="display:none;" />-->
  162. <input type="hidden" id="file" />
  163. <span style="color:#FF0000; border: none;">
  164. (文件格式为png,jpg,mp4,mp3,pdf,doc,docx,xls,xlsx)
  165. </span>
  166. </td>
  167. </tr>
  168. <tr>
  169. <td style="text-align: right"><button class="btns handleBtn">查看办理结果</button></td>
  170. <td colspan="5">
  171. <textarea data-adaptheight id="result" name="" rows="4" cols=""></textarea>
  172. </td>
  173. <input type="hidden" id="ID" />
  174. </tr>
  175. </table>
  176. <div class="btn_box">
  177. <button class="btns Submit">提交</button>
  178. </div>
  179. </div>
  180. <script src="../css/laydate/laydate.js"></script>
  181. <script src="../js/adjustHeight.js"></script>
  182. <script>
  183. var wid = helper.request.queryString("wid");
  184. var isProtect = helper.request.queryString("isProtect");
  185. var State;
  186. var a = $("#ID").val();
  187. var simpleDetailStrStart = "";
  188. var simpleDetailStrEnd = "";
  189. var simpleDetailStr = "";
  190. Detail();
  191. $(document).ready(function () {
  192. laydate.skin('blue');
  193. laydate({
  194. elem: '#connecttime',
  195. event: 'focus',
  196. istoday: true,
  197. istime: true,
  198. type: 'datetime',
  199. format: 'YYYY-MM-DD hh:mm:ss',
  200. });
  201. simpleDetail();
  202. HGXX();
  203. BLNR();
  204. getHistoryList();
  205. // Hove();
  206. // LOAD();
  207. //上传附件
  208. $("#scwj").click(function () {
  209. $("#upFile").trigger("click");
  210. })
  211. $("#upFile").change(function () {
  212. upload();
  213. })
  214. $("#scfj").click(function () {
  215. $(".fjnr").text("");
  216. $("#scfj").hide();
  217. })
  218. // $('.BC').click(function() {
  219. // if($("#dealman").val()==""){
  220. // layer.msg("办理人不能为空");
  221. // }else if($("#result").val()==""){
  222. // layer.msg("办理内容不能为空");
  223. // }else{
  224. // State = 0;
  225. // JA();
  226. // }
  227. //
  228. // })
  229. $('.Submit').click(function () {
  230. if ($("#dealman").val() == "") {
  231. layer.msg("办理人不能为空");
  232. } else if ($("#situation").val() == "") {
  233. layer.msg("处理结果不能为空");
  234. } else if ($('#isProResultRadio input[name="isDisposeResult"]:checked').val() == null) {
  235. layer.msg("请选择是/否向当事人反馈");
  236. } else if ($("#dealcontact").val() == "") {
  237. layer.msg("联系方式不能为空")
  238. } else if ($("#duties").val() == "") {
  239. layer.msg("职务不能为空")
  240. } else if ($("#result").val() == "") {
  241. layer.msg("请生成办理结果")
  242. } else {
  243. State = 1;
  244. JA();
  245. }
  246. })
  247. $(".prosituation-wrapper").hide(); //处理方案/进程
  248. $(".annotation-wrapper").hide(); //注释
  249. $(".connecttime-wrapper").hide(); //沟通时间
  250. $(".connectmode-wrapper").hide(); //沟通方式
  251. // $(".replycontent-wrapper").hide(); //答复内容
  252. $(".isstaisfied-wrapper").hide(); //是否满意
  253. // $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  254. /*
  255. * 处理结果
  256. * 是 1
  257. * 否 2
  258. */
  259. $('#isProResultRadio').find('input[type="radio"]').on('change', function () {
  260. $("#prosituation").val(""); //处理方案/进程
  261. $("#connecttime").val(""); //沟通时间
  262. $("#connectmode").val(""); //沟通方式
  263. $("#result").val(""); //办理结果
  264. // $("#replycontent").val(""); //答复内容
  265. $('#isStaisfiedRadio input[name="isstaisfied"]:checked').prop("checked", false); //是否满意
  266. isProResultJudge($(this).val());
  267. });
  268. //办理结果
  269. $('.handleBtn').click(function () {
  270. if ($('#isProResultRadio input[name="isDisposeResult"]:checked').val() === "1") {
  271. var isStaisfiedRadioData;
  272. if (
  273. $(
  274. '#isStaisfiedRadio input[name="isstaisfied"]:checked'
  275. ).val() === "1"
  276. ) {
  277. isStaisfiedRadioData = "满意";
  278. } else if (
  279. $(
  280. '#isStaisfiedRadio input[name="isstaisfied"]:checked'
  281. ).val() === "2"
  282. ) {
  283. isStaisfiedRadioData = "基本满意";
  284. } else if (
  285. $(
  286. '#isStaisfiedRadio input[name="isstaisfied"]:checked'
  287. ).val() === "3"
  288. ) {
  289. isStaisfiedRadioData = "不满意";
  290. } else {
  291. isStaisfiedRadioData = "未评价";
  292. }
  293. simpleDetailStrEnd =
  294. $("#situation").val() +
  295. " [办理结果:" +
  296. "已办理,承办人:" +
  297. $("#dealman").val() +
  298. ",职务:" +
  299. $("#duties").val() +
  300. ",联系电话:" +
  301. $("#dealcontact").val() +
  302. "," +
  303. $("#dealman").val() +
  304. "向当事人进行了反馈,当事人对结果表示" +
  305. isStaisfiedRadioData +
  306. "。]";
  307. simpleDetailStr =
  308. simpleDetailStrStart + simpleDetailStrEnd;
  309. $("#result").val(simpleDetailStr);
  310. } else if ($('#isProResultRadio input[name="isDisposeResult"]:checked').val() === "0") {
  311. simpleDetailStrEnd =
  312. $("#situation").val() +
  313. " [办理结果:" +
  314. "已办理,承办人:" +
  315. $("#dealman").val() +
  316. ",职务:" +
  317. $("#duties").val() +
  318. ",联系电话:" +
  319. $("#dealcontact").val() +
  320. "," +
  321. $("#dealman").val() +
  322. "没有向当事人进行反馈" +
  323. "。]";
  324. simpleDetailStr =
  325. simpleDetailStrStart + simpleDetailStrEnd;
  326. $("#result").val(simpleDetailStr);
  327. }
  328. // if ($('#isProResultRadio input[name="isDisposeResult"]:checked').val() === '1') {
  329. // if (isProtect === "1") {
  330. // simpleDetailStrEnd = "经落实,具体情况回复如下:" + $("#situation").val() + " 办理结果:" +
  331. // "已办理 承办人:" + $("#dealman").val() + " 职务:" + $("#duties").val() + " 联系电话:" +
  332. // $("#dealcontact").val()
  333. // simpleDetailStr = simpleDetailStrStart + simpleDetailStrEnd;
  334. // $("#result").val(simpleDetailStr);
  335. // } else if (isProtect === "0") {
  336. // if ($('#isStaisfiedRadio input[name="isstaisfied"]:checked').val() === "0") {
  337. // var isStaisfiedRadioData = "未评价";
  338. // } else if ($('#isStaisfiedRadio input[name="isstaisfied"]:checked').val() ===
  339. // "1") {
  340. // var isStaisfiedRadioData = "满意";
  341. // } else if ($('#isStaisfiedRadio input[name="isstaisfied"]:checked').val() ===
  342. // "2") {
  343. // var isStaisfiedRadioData = "基本满意";
  344. // } else if ($('#isStaisfiedRadio input[name="isstaisfied"]:checked').val() ===
  345. // "3") {
  346. // var isStaisfiedRadioData = "不满意";
  347. // } else {
  348. // var isStaisfiedRadioData = "未评价";
  349. // }
  350. // simpleDetailStrEnd = "经落实,具体情况回复如下:" + $("#situation").val() + " 办理结果:" +
  351. // "已办理 承办人:" + $("#dealman").val() + " 职务:" + $("#duties").val() + " 联系电话:" +
  352. // $("#dealcontact").val() + "; " + $("#dealman").val() + "用" + $(
  353. // "#connectmode").val() + "方式在" + $("#connecttime").val() +
  354. // "对反映人进行了回复,反映人对结果表示" + isStaisfiedRadioData
  355. // simpleDetailStr = simpleDetailStrStart + simpleDetailStrEnd;
  356. // $("#result").val(simpleDetailStr);
  357. // }
  358. // } else if ($('#isProResultRadio input[name="isDisposeResult"]:checked').val() === '2') {
  359. // simpleDetailStrEnd = "经落实,具体情况回复如下:" + $("#situation").val() + " 办理结果:" +
  360. // "未办理 承办人:" + $("#dealman").val() + " 职务:" + $("#duties").val() + " 联系电话:" + $(
  361. // "#dealcontact").val() + "; 处理方案/进程:" + $("#prosituation").val();
  362. // simpleDetailStr = simpleDetailStrStart + simpleDetailStrEnd;
  363. // $("#result").val(simpleDetailStr);
  364. // } else {
  365. // simpleDetailStr = simpleDetailStrStart + simpleDetailStrEnd;
  366. // $("#result").val(simpleDetailStr);
  367. // }
  368. })
  369. });
  370. //交办
  371. function JA() {
  372. $.post(huayi.config.callcenter_url + 'WorkOrder/DealWorkOrder', {
  373. workorderid: wid,
  374. dealman: $("#dealman").val(), //承办人
  375. result: $('#result').val(), //处理情况
  376. situation: $("#situation").val(), //办理结果
  377. isproresult: $('#isProResultRadio input[name="isDisposeResult"]:checked').val(), //处理结果
  378. // IsProResult: $('#isProResultRadio input[name="isDisposeResult"]:checked').val(), // 已办未果
  379. prosituation: $("#prosituation").val(), //处理方案/进程
  380. // Unsuccessful: $("#dealWithRemark").val(), //已办未果备注
  381. dealcontact: $("#dealcontact").val(), //联系方式
  382. duties: $("#duties").val(), //职务
  383. connecttime: $("#connecttime").val(), //沟通时间
  384. connectmode: $("#connectmode").val(), //沟通方式
  385. // replycontent: $("#replycontent").val(), //答复内容
  386. isstaisfied: $('#isStaisfiedRadio input[name="isstaisfied"]:checked').val(), //是否满意
  387. state: State,
  388. feedbackid: a,
  389. files: $("#file").val(),
  390. token: $.cookie("token")
  391. }, function (result) {
  392. result = JSON.parse(result);
  393. if (result.state.toLowerCase() == "success") {
  394. addHistory();
  395. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  396. parent.layer.close(index); //再执行关闭
  397. parent.load();
  398. parent.layer.msg("办理成功");
  399. $('.fileBox').html('');
  400. }
  401. })
  402. }
  403. // 工单详情
  404. function HGXX() {
  405. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetSecondDealInfo', {
  406. workorderid: wid,
  407. token: $.cookie("token")
  408. }, function (result) {
  409. // result = JSON.stringify(result)
  410. // alert(result)
  411. if (result.state.toLowerCase() == "success") {
  412. var temp;
  413. var Agree;
  414. $.each(result.data.fkinfo, function (i, n) {
  415. // var r = JSON.stringify(n.File);
  416. if (n.F_IsAudit == 1) {
  417. Agree = "同意";
  418. } else if (n.F_IsAudit == 2) {
  419. Agree = "拒绝";
  420. } else if (n.F_IsAudit == 0) {
  421. Agree = "";
  422. }
  423. var bval = n.F_Type;
  424. switch (bval + '') {
  425. case '1':
  426. bval = '主办';
  427. break;
  428. case '2':
  429. bval = '协办';
  430. break;
  431. }
  432. //是/否向当事人反馈
  433. var isProResultValue = n.F_IsProResult + "";
  434. switch (isProResultValue) {
  435. case "0":
  436. isProResultValue = "否";
  437. break;
  438. case "1":
  439. isProResultValue = "是";
  440. break;
  441. case "2":
  442. isProResultValue = "已办未果";
  443. break;
  444. }
  445. //是否满意
  446. var isSatisfiedValue = n.F_IsSatisfied + "";
  447. switch (isSatisfiedValue) {
  448. case "0":
  449. isSatisfiedValue = "未评价";
  450. break;
  451. case "1":
  452. isSatisfiedValue = "满意";
  453. break;
  454. case "2":
  455. isSatisfiedValue = "基本满意";
  456. break;
  457. case "3":
  458. isSatisfiedValue = "不满意";
  459. break;
  460. }
  461. //沟通时间
  462. var connectTimeValue = n.F_ConnectTime;
  463. switch (connectTimeValue) {
  464. case null:
  465. connectTimeValue = "";
  466. break;
  467. default:
  468. connectTimeValue = n.F_ConnectTime;
  469. }
  470. // 审批时间
  471. var auditTimeValue
  472. switch (n.F_AuditTime) {
  473. case "":
  474. auditTimeValue = ""
  475. break;
  476. case null:
  477. auditTimeValue = ""
  478. break;
  479. default:
  480. auditTimeValue = n.F_AuditTime
  481. break;
  482. }
  483. //审批内容
  484. var auditReasonValue
  485. switch (n.F_AuditReason) {
  486. case "":
  487. auditReasonValue = ""
  488. break;
  489. case null:
  490. auditReasonValue = ""
  491. break;
  492. default:
  493. auditReasonValue = n.F_AuditReason
  494. break;
  495. }
  496. //职务
  497. var dutiesValue
  498. switch (n.F_Duties) {
  499. case "":
  500. dutiesValue = ""
  501. break;
  502. case null:
  503. dutiesValue = ""
  504. break;
  505. default:
  506. dutiesValue = n.F_Duties
  507. break;
  508. }
  509. //处理情况
  510. var situationValue
  511. switch (n.F_Situation) {
  512. case "":
  513. situationValue = ""
  514. break;
  515. case null:
  516. situationValue = ""
  517. break;
  518. default:
  519. situationValue = n.F_Situation
  520. break;
  521. }
  522. temp = '<tr>' +
  523. '<td class="text-center">' + (i + 1) + '</td>' +
  524. '<td class="text-center">' + n.F_DealUser + '</td>' +
  525. '<td class="text-center">' + n.F_DealUserContact + '</td>' +
  526. '<td class="text-center">' + dutiesValue + '</td>' +
  527. '<td class="text-center">' + situationValue + '</td>' +
  528. '<td class="text-center">' + n.F_CreateTime + '</td>' +
  529. '<td class="text-center">' + n.F_Result + '</td>' +
  530. '<td class="text-center">' + auditTimeValue + '</td>' +
  531. '<td class="text-center">' + auditReasonValue + '</td>' +
  532. '<td class="text-center">' + Agree + '</td>' +
  533. '<td class="text-center" data-formatter="shtype">' + bval + '</td>' +
  534. '<td class="text-center">' + isProResultValue + '</td>' +
  535. '<td class="text-center">' + n.F_ProSituation + '</td>' +
  536. // '<td class="text-center">' + connectTimeValue + '</td>' +
  537. // '<td class="text-center">' + n.F_ConnectMode + '</td>' +
  538. // '<td class="text-center">' + isSatisfiedValue + '</td>' +
  539. '<td class="text-center FJ" style="color:#00a1cb;"></td>' +
  540. '</tr>';
  541. var tmp = '';
  542. if (n.File) {
  543. $.each(n.File, function (d, f) {
  544. tmp += '<a style="margin-right:5px;" href="' + f.F_FileUrl +
  545. '" download="' + f.F_FileUrl + '">' + f.F_FileName
  546. .substring(19) + '</a>';
  547. })
  548. }
  549. $(temp).appendTo($('.HGXX'))
  550. .find('.FJ')
  551. .append(tmp);
  552. });
  553. //
  554. // alert(i);
  555. }
  556. })
  557. }
  558. // <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>
  559. // function Hove(){
  560. // $(document).on("mouseover mouseout",'.tiaozhuan',function(event){
  561. // if(event.type == "mouseover"){
  562. // //鼠标悬浮
  563. // var miao=$(this).attr("href");
  564. // if (miao=="") {
  565. // $(this).removeAttr("href");
  566. // $(this).removeAttr("download");
  567. // $(this).html("");
  568. //
  569. // } else{
  570. // $(this).attr("href");
  571. // $(this).attr("download");
  572. // }
  573. // }else if(event.type == "mouseout"){
  574. // //鼠标离开
  575. // }
  576. // })
  577. //
  578. //
  579. // }
  580. // $(window).load(function(){
  581. // alert("DDD");
  582. // alert($(".tiaozhuan").attr("href"));
  583. // var miao1=$(".tiaozhuan").attr("href");
  584. // if (miao1=="") {
  585. // alert("aaa");
  586. //// $(this).html("");
  587. // } else{
  588. // alert("bbb");
  589. // $(this).html("");
  590. // }
  591. // });
  592. // 派单内容给
  593. function BLNR() {
  594. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetSecondDealInfo', {
  595. workorderid: wid,
  596. token: $.cookie("token")
  597. }, function (result) {
  598. // result = JSON.stringify(result)
  599. if (result.state.toLowerCase() == "success") {
  600. var temp2;
  601. $.each(result.data.pdinfo, function (i, n) {
  602. temp2 = temp2 + '<tr><td class="text-center">' + n.F_CreateTime +
  603. '</td><td class="text-center">' + n.F_LimitTime +
  604. '</td><td class="text-center">' + n.F_AssignedOpinion + '</td></tr>';
  605. });
  606. $('.BLNR').append(temp2);
  607. }
  608. })
  609. }
  610. //草稿详情
  611. function Detail() {
  612. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetDraftInfo', {
  613. workorderid: wid,
  614. type: 2,
  615. token: $.cookie("token")
  616. }, function (result) {
  617. if (result.state.toLowerCase() == "success") {
  618. if (result.data.length > 0) {
  619. var IsProResultValue = result.data[0].F_IsProResult + "";
  620. isProResultJudge(IsProResultValue);
  621. $("#dealman").val(result.data[0].F_DealUser); //承办人
  622. $("#duties").val(result.data[0].F_Duties); //职务
  623. // $("#result").text(result.data[0].F_Result); //处理结果
  624. $("#situation").val(result.data[0].F_Situation); //处理情况
  625. $('#isProResultRadio input[name="isDisposeResult"][value="' + result.data[0]
  626. .F_IsProResult + '"]').prop("checked", true); //是/否向当事人反馈
  627. $("#prosituation").val(result.data[0].F_ProSituation); //处理方案/进程
  628. $("#dealcontact").val(result.data[0].F_DealUserContact); //联系方式
  629. $("#connecttime").val(result.data[0].F_ConnectTime); //沟通时间
  630. $("#connectmode").val(result.data[0].F_ConnectMode); //沟通方式
  631. // $("#replycontent").val(result.data[0].F_ReplyContent); //答复内容
  632. $('#isStaisfiedRadio input[name="isstaisfied"][value="' + result.data[0].F_IsSatisfied +
  633. '"]').prop("checked", true); //是否满意
  634. a = result.data[0].F_Id;
  635. };
  636. }
  637. })
  638. }
  639. //清除
  640. function Clean() {
  641. $("#startTime").val(''),
  642. $('#assignedopinion').val('')
  643. }
  644. //上传文件
  645. function upload() {
  646. var Files = document.getElementById("upFile").files;
  647. if (Files.length > 0) {
  648. var formData = new FormData();
  649. for (var i = 0; i < Files.length; i++) {
  650. formData.append('file' + i, Files[i]);
  651. }
  652. formData.append("token", $.cookie("token"));
  653. var typeName = Files[0].name.split('.')[1];
  654. if (typeName == "png" || typeName == 'jpg' || typeName == 'mp4' || typeName == 'mp3' || typeName ==
  655. 'pdf' || typeName == 'doc' || typeName == 'docx' || typeName == 'xls' || typeName == 'xlsx') {
  656. $.ajax({
  657. url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  658. type: "POST",
  659. data: formData,
  660. /**
  661. *必须false才会自动加上正确的Content-Type
  662. */
  663. contentType: false,
  664. /**
  665. * 必须false才会避开jQuery对 formdata 的默认处理
  666. * XMLHttpRequest会对 formdata 进行正确的处理
  667. */
  668. processData: false,
  669. success: function (result) {
  670. document.getElementById("upFile").outerHTML = document.getElementById("upFile")
  671. .outerHTML;
  672. $("#upFile").change(function () {
  673. upload();
  674. });
  675. var r = $.parseJSON(result);
  676. if (r.state.toLowerCase() == "success") {
  677. //$(".fjnr").text(r.data[0].F_FileName);
  678. var a = r.data;
  679. $(a).each(function (i, n) {
  680. var strs = '<span class="files" fiel-num="' + n.F_FileId +
  681. '">' + n.F_FileName.substring(19) +
  682. '<i class="fa fa-remove del_file"></i></span>'
  683. $(strs).appendTo($('.fileBox')).find('.del_file').click(
  684. function (event) {
  685. event.stopPropagation();
  686. $(this).parent().remove();
  687. file_num()
  688. })
  689. })
  690. file_num();
  691. }
  692. }
  693. });
  694. } else {
  695. layer.msg("格式不正确");
  696. }
  697. } else {
  698. layer.confirm('请上传文件!', {
  699. btn: ['确定']
  700. });
  701. }
  702. }
  703. //上传文件隐藏域值
  704. function file_num() {
  705. var str = '';
  706. var Str;
  707. $('.fileBox .files').each(function (j, m) {
  708. var aa = $(m).attr("fiel-num")
  709. str += aa + ",";
  710. Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
  711. })
  712. $("#file").val(Str);
  713. }
  714. // 处理结果判断
  715. function isProResultJudge(isProResultdata) {
  716. // if (isProResultdata === '1') {
  717. // if (isProtect === "1") {
  718. // $(".prosituation-wrapper").hide(); //处理方案/进程
  719. // $(".annotation-wrapper").hide(); //注释
  720. // $(".connecttime-wrapper").hide(); //沟通时间
  721. // $(".connectmode-wrapper").hide(); //沟通方式
  722. // // $(".replycontent-wrapper").hide(); //答复内容
  723. // $(".isstaisfied-wrapper").hide(); //是否满意
  724. // // $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  725. // } else if (isProtect === "0") {
  726. // $(".prosituation-wrapper").hide(); //处理方案/进程
  727. // $(".annotation-wrapper").hide(); //注释
  728. // $(".connecttime-wrapper").show(); //沟通时间
  729. // $(".connectmode-wrapper").show(); //沟通方式
  730. // // $(".replycontent-wrapper").show(); //答复内容
  731. // $(".isstaisfied-wrapper").show(); //是否满意
  732. // // $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  733. // }
  734. // } else if (isProResultdata === '2') {
  735. // $(".prosituation-wrapper").show(); //处理方案/进程
  736. // $(".annotation-wrapper").show(); //注释
  737. // $(".connecttime-wrapper").hide(); //沟通时间
  738. // $(".connectmode-wrapper").hide(); //沟通方式
  739. // // $(".replycontent-wrapper").hide(); //答复内容
  740. // $(".isstaisfied-wrapper").hide(); //是否满意
  741. // // $(".dealWithRemark-wrapper").show(); // 已办未果备注
  742. // }
  743. if (isProResultdata === "1") {
  744. // if (isProtect === "1") {
  745. // $(".prosituation-wrapper").hide(); //处理方案/进程
  746. // $(".annotation-wrapper").hide(); //注释
  747. // $(".connecttime-wrapper").hide(); //沟通时间
  748. // $(".connectmode-wrapper").hide(); //沟通方式
  749. // // $(".replycontent-wrapper").hide(); //答复内容
  750. // $(".isstaisfied-wrapper").show(); //是否满意
  751. // $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  752. // } else if (isProtect === "0") {
  753. $(".prosituation-wrapper").hide(); //处理方案/进程
  754. $(".annotation-wrapper").hide(); //注释
  755. $(".connecttime-wrapper").hide(); //沟通时间
  756. $(".connectmode-wrapper").hide(); //沟通方式
  757. // $(".replycontent-wrapper").show(); //答复内容
  758. $(".isstaisfied-wrapper").show(); //是否满意
  759. $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  760. // }
  761. } else if (isProResultdata === "2") {
  762. $(".prosituation-wrapper").show(); //处理方案/进程
  763. $(".annotation-wrapper").show(); //注释
  764. $(".connecttime-wrapper").hide(); //沟通时间
  765. $(".connectmode-wrapper").hide(); //沟通方式
  766. // $(".replycontent-wrapper").hide(); //答复内容
  767. $(".isstaisfied-wrapper").hide(); //是否满意
  768. $(".dealWithRemark-wrapper").show(); // 已办未果备注
  769. } else if (isProResultdata === "0") {
  770. $(".prosituation-wrapper").hide(); //处理方案/进程
  771. $(".annotation-wrapper").hide(); //注释
  772. $(".connecttime-wrapper").hide(); //沟通时间
  773. $(".connectmode-wrapper").hide(); //沟通方式
  774. // $(".replycontent-wrapper").show(); //答复内容
  775. $(".isstaisfied-wrapper").hide(); //是否满意
  776. $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  777. }
  778. }
  779. //简易版工单详情
  780. function simpleDetail() {
  781. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkorderSimp', {
  782. workorderid: wid,
  783. token: $.cookie("token")
  784. }, function (result) {
  785. if (result.state.toLowerCase() == "success") {
  786. var data = result.data[0];
  787. // var date = (new Date(data.F_CreateTime)).getTime();
  788. var date = new Date()
  789. var year = date.getFullYear();
  790. var month = date.getMonth();
  791. var day = date.getDate();
  792. var hour = date.getHours();
  793. var minutes = date.getMinutes();
  794. var seconds = date.getSeconds();
  795. month = month + 1;
  796. if (month >= 1 && month <= 9) {
  797. month = "0" + month
  798. }
  799. if (day >= 1 && day <= 9) {
  800. day = "0" + day
  801. }
  802. var daysTime = year + "年" + month + "月" + day + "日 " + hour + "时" + minutes + "分" +
  803. seconds + "秒"
  804. simpleDetailStrStart =
  805. // data.deptname +
  806. $.cookie("userName") +
  807. "于时间(" +
  808. daysTime +
  809. ")回复:"
  810. // data.SourceName +
  811. // "来源工单(编号:" +
  812. // data.F_WorkOrderId +
  813. // ")反映" +
  814. // data.F_ComTitle +
  815. // "问题,";
  816. }
  817. })
  818. }
  819. function getHistoryList() {
  820. $("#dealmanList").empty()
  821. $.ajax({
  822. type: "get",
  823. url: huayi.config.callcenter_url + "History/GetList",
  824. async: true,
  825. dataType: "json",
  826. data: {
  827. name: "contractor",
  828. token: $.cookie("token"),
  829. },
  830. success: function (res) {
  831. if (res.state == "success") {
  832. $.each(res.data, function (index, val) {
  833. if (val.F_Count !== "") {
  834. var data = JSON.parse(val.F_Count)
  835. $("#dealmanList").append("<option value='" + data.name +
  836. "'data-contact='" + data.contact + "'data-job='" + data
  837. .job + "'>")
  838. }
  839. })
  840. $("#dealmanList").append("<option value='清除历史记录'>")
  841. } else {
  842. layer.confirm(res.message, {
  843. icon: 2,
  844. btn: ['确定']
  845. });
  846. }
  847. }
  848. });
  849. }
  850. $("#dealman").change(function () {
  851. var name = $("#dealman").val()
  852. if (name === "清除历史记录") {
  853. $("#dealman").val("")
  854. deleteHistory()
  855. return
  856. }
  857. $("#dealmanList").find("option").each(function () {
  858. if (name == $(this).val()) {
  859. $("#dealcontact").val($(this).attr("data-contact"))
  860. $("#duties").val($(this).attr("data-job"))
  861. }
  862. })
  863. // $("#dealcontact").attr("data-contact")
  864. // $("#duties").attr("data-job")
  865. })
  866. function addHistory() {
  867. var contractorObject = {
  868. name: $("#dealman").val(),
  869. contact: $("#dealcontact").val(),
  870. job: $("#duties").val(),
  871. }
  872. var contractorObjectStr = JSON.stringify(contractorObject);
  873. $.ajax({
  874. type: "post",
  875. url: huayi.config.callcenter_url + "History/Add",
  876. async: true,
  877. dataType: "json",
  878. data: {
  879. name: "contractor",
  880. count: contractorObjectStr,
  881. token: $.cookie("token"),
  882. },
  883. success: function (res) {
  884. var res = $.parseJSON(res)
  885. if (res.state == "success") {
  886. } else {
  887. layer.confirm(res.message, {
  888. icon: 2,
  889. btn: ['确定']
  890. });
  891. }
  892. }
  893. });
  894. }
  895. function deleteHistory() {
  896. $.ajax({
  897. type: "post",
  898. url: huayi.config.callcenter_url + "History/Delete",
  899. async: true,
  900. dataType: "json",
  901. data: {
  902. type: 1,
  903. token: $.cookie("token"),
  904. },
  905. success: function (res) {
  906. if (res.state == "success") {
  907. getHistoryList()
  908. } else {
  909. }
  910. }
  911. });
  912. }
  913. </script>
  914. </body>
  915. </html>