Nessuna descrizione

banli_zilei.html 42KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930
  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. console.log(result);
  412. if (result.state.toLowerCase() == "success") {
  413. var temp;
  414. var Agree;
  415. $.each(result.data.fkinfo, function (i, n) {
  416. // var r = JSON.stringify(n.File);
  417. if (n.F_IsAudit == 1) {
  418. Agree = "同意";
  419. } else if (n.F_IsAudit == 2) {
  420. Agree = "拒绝";
  421. } else if (n.F_IsAudit == 0) {
  422. Agree = "";
  423. }
  424. var bval = n.F_Type;
  425. switch (bval + '') {
  426. case '1':
  427. bval = '主办';
  428. break;
  429. case '2':
  430. bval = '协办';
  431. break;
  432. }
  433. //是/否向当事人反馈
  434. var isProResultValue = n.F_IsProResult + "";
  435. switch (isProResultValue) {
  436. case "0":
  437. isProResultValue = "否";
  438. break;
  439. case "1":
  440. isProResultValue = "是";
  441. break;
  442. case "2":
  443. isProResultValue = "已办未果";
  444. break;
  445. }
  446. //是否满意
  447. var isSatisfiedValue = n.F_IsSatisfied + "";
  448. switch (isSatisfiedValue) {
  449. case "0":
  450. isSatisfiedValue = "未评价";
  451. break;
  452. case "1":
  453. isSatisfiedValue = "满意";
  454. break;
  455. case "2":
  456. isSatisfiedValue = "基本满意";
  457. break;
  458. case "3":
  459. isSatisfiedValue = "不满意";
  460. break;
  461. }
  462. //沟通时间
  463. var connectTimeValue = n.F_ConnectTime;
  464. switch (connectTimeValue) {
  465. case null:
  466. connectTimeValue = "";
  467. break;
  468. default:
  469. connectTimeValue = n.F_ConnectTime;
  470. }
  471. // 审批时间
  472. var auditTimeValue
  473. switch (n.F_AuditTime) {
  474. case "":
  475. auditTimeValue = ""
  476. break;
  477. case null:
  478. auditTimeValue = ""
  479. break;
  480. default:
  481. auditTimeValue = n.F_AuditTime
  482. break;
  483. }
  484. //审批内容
  485. var auditReasonValue
  486. switch (n.F_AuditReason) {
  487. case "":
  488. auditReasonValue = ""
  489. break;
  490. case null:
  491. auditReasonValue = ""
  492. break;
  493. default:
  494. auditReasonValue = n.F_AuditReason
  495. break;
  496. }
  497. //职务
  498. var dutiesValue
  499. switch (n.F_Duties) {
  500. case "":
  501. dutiesValue = ""
  502. break;
  503. case null:
  504. dutiesValue = ""
  505. break;
  506. default:
  507. dutiesValue = n.F_Duties
  508. break;
  509. }
  510. //处理情况
  511. var situationValue
  512. switch (n.F_Situation) {
  513. case "":
  514. situationValue = ""
  515. break;
  516. case null:
  517. situationValue = ""
  518. break;
  519. default:
  520. situationValue = n.F_Situation
  521. break;
  522. }
  523. temp = '<tr>' +
  524. '<td class="text-center">' + (i + 1) + '</td>' +
  525. '<td class="text-center">' + n.F_DealUser + '</td>' +
  526. '<td class="text-center">' + n.F_DealUserContact + '</td>' +
  527. '<td class="text-center">' + dutiesValue + '</td>' +
  528. '<td class="text-center">' + situationValue + '</td>' +
  529. '<td class="text-center">' + n.F_CreateTime + '</td>' +
  530. '<td class="text-center">' + n.F_Result + '</td>' +
  531. '<td class="text-center">' + auditTimeValue + '</td>' +
  532. '<td class="text-center">' + auditReasonValue + '</td>' +
  533. '<td class="text-center">' + Agree + '</td>' +
  534. '<td class="text-center" data-formatter="shtype">' + bval + '</td>' +
  535. '<td class="text-center">' + isProResultValue + '</td>' +
  536. '<td class="text-center">' + n.F_ProSituation + '</td>' +
  537. // '<td class="text-center">' + connectTimeValue + '</td>' +
  538. // '<td class="text-center">' + n.F_ConnectMode + '</td>' +
  539. // '<td class="text-center">' + isSatisfiedValue + '</td>' +
  540. '<td class="text-center FJ" style="color:#00a1cb;"></td>' +
  541. '</tr>';
  542. var tmp = '';
  543. if (n.File) {
  544. $.each(n.File, function (d, f) {
  545. tmp += '<a style="margin-right:5px;" href="' + f.F_FileUrl +
  546. '" download="' + f.F_FileUrl + '">' + f.F_FileName
  547. .substring(19) + '</a>';
  548. })
  549. }
  550. $(temp).appendTo($('.HGXX'))
  551. .find('.FJ')
  552. .append(tmp);
  553. });
  554. //
  555. // alert(i);
  556. }
  557. })
  558. }
  559. // <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>
  560. // function Hove(){
  561. // $(document).on("mouseover mouseout",'.tiaozhuan',function(event){
  562. // if(event.type == "mouseover"){
  563. // //鼠标悬浮
  564. // var miao=$(this).attr("href");
  565. // if (miao=="") {
  566. // $(this).removeAttr("href");
  567. // $(this).removeAttr("download");
  568. // $(this).html("");
  569. //
  570. // } else{
  571. // $(this).attr("href");
  572. // $(this).attr("download");
  573. // }
  574. // }else if(event.type == "mouseout"){
  575. // //鼠标离开
  576. // }
  577. // })
  578. //
  579. //
  580. // }
  581. // $(window).load(function(){
  582. // alert("DDD");
  583. // alert($(".tiaozhuan").attr("href"));
  584. // var miao1=$(".tiaozhuan").attr("href");
  585. // if (miao1=="") {
  586. // alert("aaa");
  587. //// $(this).html("");
  588. // } else{
  589. // alert("bbb");
  590. // $(this).html("");
  591. // }
  592. // });
  593. // 派单内容给
  594. function BLNR() {
  595. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetSecondDealInfo', {
  596. workorderid: wid,
  597. token: $.cookie("token")
  598. }, function (result) {
  599. // result = JSON.stringify(result)
  600. // console.log(result);
  601. if (result.state.toLowerCase() == "success") {
  602. var temp2;
  603. $.each(result.data.pdinfo, function (i, n) {
  604. temp2 = temp2 + '<tr><td class="text-center">' + n.F_CreateTime +
  605. '</td><td class="text-center">' + n.F_LimitTime +
  606. '</td><td class="text-center">' + n.F_AssignedOpinion + '</td></tr>';
  607. });
  608. $('.BLNR').append(temp2);
  609. }
  610. })
  611. }
  612. //草稿详情
  613. function Detail() {
  614. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetDraftInfo', {
  615. workorderid: wid,
  616. type: 2,
  617. token: $.cookie("token")
  618. }, function (result) {
  619. if (result.state.toLowerCase() == "success") {
  620. if (result.data.length > 0) {
  621. var IsProResultValue = result.data[0].F_IsProResult + "";
  622. isProResultJudge(IsProResultValue);
  623. $("#dealman").val(result.data[0].F_DealUser); //承办人
  624. $("#duties").val(result.data[0].F_Duties); //职务
  625. // $("#result").text(result.data[0].F_Result); //处理结果
  626. $("#situation").val(result.data[0].F_Situation); //处理情况
  627. $('#isProResultRadio input[name="isDisposeResult"][value="' + result.data[0]
  628. .F_IsProResult + '"]').prop("checked", true); //是/否向当事人反馈
  629. $("#prosituation").val(result.data[0].F_ProSituation); //处理方案/进程
  630. $("#dealcontact").val(result.data[0].F_DealUserContact); //联系方式
  631. $("#connecttime").val(result.data[0].F_ConnectTime); //沟通时间
  632. $("#connectmode").val(result.data[0].F_ConnectMode); //沟通方式
  633. // $("#replycontent").val(result.data[0].F_ReplyContent); //答复内容
  634. $('#isStaisfiedRadio input[name="isstaisfied"][value="' + result.data[0].F_IsSatisfied +
  635. '"]').prop("checked", true); //是否满意
  636. a = result.data[0].F_Id;
  637. };
  638. }
  639. })
  640. }
  641. //清除
  642. function Clean() {
  643. $("#startTime").val(''),
  644. $('#assignedopinion').val('')
  645. }
  646. //上传文件
  647. function upload() {
  648. var Files = document.getElementById("upFile").files;
  649. if (Files.length > 0) {
  650. var formData = new FormData();
  651. for (var i = 0; i < Files.length; i++) {
  652. formData.append('file' + i, Files[i]);
  653. }
  654. formData.append("token", $.cookie("token"));
  655. var typeName = Files[0].name.split('.')[1];
  656. if (typeName == "png" || typeName == 'jpg' || typeName == 'mp4' || typeName == 'mp3' || typeName ==
  657. 'pdf' || typeName == 'doc' || typeName == 'docx' || typeName == 'xls' || typeName == 'xlsx') {
  658. $.ajax({
  659. url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  660. type: "POST",
  661. data: formData,
  662. /**
  663. *必须false才会自动加上正确的Content-Type
  664. */
  665. contentType: false,
  666. /**
  667. * 必须false才会避开jQuery对 formdata 的默认处理
  668. * XMLHttpRequest会对 formdata 进行正确的处理
  669. */
  670. processData: false,
  671. success: function (result) {
  672. document.getElementById("upFile").outerHTML = document.getElementById("upFile")
  673. .outerHTML;
  674. $("#upFile").change(function () {
  675. upload();
  676. });
  677. var r = $.parseJSON(result);
  678. if (r.state.toLowerCase() == "success") {
  679. //$(".fjnr").text(r.data[0].F_FileName);
  680. var a = r.data;
  681. $(a).each(function (i, n) {
  682. var strs = '<span class="files" fiel-num="' + n.F_FileId +
  683. '">' + n.F_FileName.substring(19) +
  684. '<i class="fa fa-remove del_file"></i></span>'
  685. $(strs).appendTo($('.fileBox')).find('.del_file').click(
  686. function (event) {
  687. event.stopPropagation();
  688. $(this).parent().remove();
  689. file_num()
  690. })
  691. })
  692. file_num();
  693. }
  694. }
  695. });
  696. } else {
  697. layer.msg("格式不正确");
  698. }
  699. } else {
  700. layer.confirm('请上传文件!', {
  701. btn: ['确定']
  702. });
  703. }
  704. }
  705. //上传文件隐藏域值
  706. function file_num() {
  707. var str = '';
  708. var Str;
  709. $('.fileBox .files').each(function (j, m) {
  710. var aa = $(m).attr("fiel-num")
  711. console.log(aa);
  712. str += aa + ",";
  713. Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
  714. })
  715. $("#file").val(Str);
  716. }
  717. // 处理结果判断
  718. function isProResultJudge(isProResultdata) {
  719. // if (isProResultdata === '1') {
  720. // if (isProtect === "1") {
  721. // $(".prosituation-wrapper").hide(); //处理方案/进程
  722. // $(".annotation-wrapper").hide(); //注释
  723. // $(".connecttime-wrapper").hide(); //沟通时间
  724. // $(".connectmode-wrapper").hide(); //沟通方式
  725. // // $(".replycontent-wrapper").hide(); //答复内容
  726. // $(".isstaisfied-wrapper").hide(); //是否满意
  727. // // $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  728. // } else if (isProtect === "0") {
  729. // $(".prosituation-wrapper").hide(); //处理方案/进程
  730. // $(".annotation-wrapper").hide(); //注释
  731. // $(".connecttime-wrapper").show(); //沟通时间
  732. // $(".connectmode-wrapper").show(); //沟通方式
  733. // // $(".replycontent-wrapper").show(); //答复内容
  734. // $(".isstaisfied-wrapper").show(); //是否满意
  735. // // $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  736. // }
  737. // } else if (isProResultdata === '2') {
  738. // $(".prosituation-wrapper").show(); //处理方案/进程
  739. // $(".annotation-wrapper").show(); //注释
  740. // $(".connecttime-wrapper").hide(); //沟通时间
  741. // $(".connectmode-wrapper").hide(); //沟通方式
  742. // // $(".replycontent-wrapper").hide(); //答复内容
  743. // $(".isstaisfied-wrapper").hide(); //是否满意
  744. // // $(".dealWithRemark-wrapper").show(); // 已办未果备注
  745. // }
  746. if (isProResultdata === "1") {
  747. // if (isProtect === "1") {
  748. // $(".prosituation-wrapper").hide(); //处理方案/进程
  749. // $(".annotation-wrapper").hide(); //注释
  750. // $(".connecttime-wrapper").hide(); //沟通时间
  751. // $(".connectmode-wrapper").hide(); //沟通方式
  752. // // $(".replycontent-wrapper").hide(); //答复内容
  753. // $(".isstaisfied-wrapper").show(); //是否满意
  754. // $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  755. // } else if (isProtect === "0") {
  756. $(".prosituation-wrapper").hide(); //处理方案/进程
  757. $(".annotation-wrapper").hide(); //注释
  758. $(".connecttime-wrapper").hide(); //沟通时间
  759. $(".connectmode-wrapper").hide(); //沟通方式
  760. // $(".replycontent-wrapper").show(); //答复内容
  761. $(".isstaisfied-wrapper").show(); //是否满意
  762. $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  763. // }
  764. } else if (isProResultdata === "2") {
  765. $(".prosituation-wrapper").show(); //处理方案/进程
  766. $(".annotation-wrapper").show(); //注释
  767. $(".connecttime-wrapper").hide(); //沟通时间
  768. $(".connectmode-wrapper").hide(); //沟通方式
  769. // $(".replycontent-wrapper").hide(); //答复内容
  770. $(".isstaisfied-wrapper").hide(); //是否满意
  771. $(".dealWithRemark-wrapper").show(); // 已办未果备注
  772. } else if (isProResultdata === "0") {
  773. $(".prosituation-wrapper").hide(); //处理方案/进程
  774. $(".annotation-wrapper").hide(); //注释
  775. $(".connecttime-wrapper").hide(); //沟通时间
  776. $(".connectmode-wrapper").hide(); //沟通方式
  777. // $(".replycontent-wrapper").show(); //答复内容
  778. $(".isstaisfied-wrapper").hide(); //是否满意
  779. $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  780. }
  781. }
  782. //简易版工单详情
  783. function simpleDetail() {
  784. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkorderSimp', {
  785. workorderid: wid,
  786. token: $.cookie("token")
  787. }, function (result) {
  788. if (result.state.toLowerCase() == "success") {
  789. var data = result.data[0];
  790. simpleDetailStrStart = data.F_CreateTime + " " + data.deptname + "部门接到" + data.SourceName +
  791. "来源工单(编号:" + data.F_WorkOrderId + ")反映" + data.F_ComTitle + "问题,"
  792. }
  793. })
  794. }
  795. function getHistoryList() {
  796. $("#dealmanList").empty()
  797. $.ajax({
  798. type: "get",
  799. url: huayi.config.callcenter_url + "History/GetList",
  800. async: true,
  801. dataType: "json",
  802. data: {
  803. name: "contractor",
  804. token: $.cookie("token"),
  805. },
  806. success: function (res) {
  807. if (res.state == "success") {
  808. $.each(res.data, function (index, val) {
  809. console.log("val", val)
  810. if (val.F_Count !== "") {
  811. var data = JSON.parse(val.F_Count)
  812. console.log("data", data)
  813. $("#dealmanList").append("<option value='" + data.name +
  814. "'data-contact='" + data.contact + "'data-job='" + data
  815. .job + "'>")
  816. }
  817. })
  818. $("#dealmanList").append("<option value='清除历史记录'>")
  819. } else {
  820. layer.confirm(res.message, {
  821. icon: 2,
  822. btn: ['确定']
  823. });
  824. }
  825. }
  826. });
  827. }
  828. $("#dealman").change(function () {
  829. var name = $("#dealman").val()
  830. if (name === "清除历史记录") {
  831. $("#dealman").val("")
  832. deleteHistory()
  833. return
  834. }
  835. $("#dealmanList").find("option").each(function () {
  836. if (name == $(this).val()) {
  837. $("#dealcontact").val($(this).attr("data-contact"))
  838. $("#duties").val($(this).attr("data-job"))
  839. }
  840. })
  841. // $("#dealcontact").attr("data-contact")
  842. // $("#duties").attr("data-job")
  843. })
  844. function addHistory() {
  845. var contractorObject = {
  846. name: $("#dealman").val(),
  847. contact: $("#dealcontact").val(),
  848. job: $("#duties").val(),
  849. }
  850. var contractorObjectStr = JSON.stringify(contractorObject);
  851. $.ajax({
  852. type: "post",
  853. url: huayi.config.callcenter_url + "History/Add",
  854. async: true,
  855. dataType: "json",
  856. data: {
  857. name: "contractor",
  858. count: contractorObjectStr,
  859. token: $.cookie("token"),
  860. },
  861. success: function (res) {
  862. var res = $.parseJSON(res)
  863. if (res.state == "success") {
  864. } else {
  865. layer.confirm(res.message, {
  866. icon: 2,
  867. btn: ['确定']
  868. });
  869. }
  870. }
  871. });
  872. }
  873. function deleteHistory() {
  874. $.ajax({
  875. type: "post",
  876. url: huayi.config.callcenter_url + "History/Delete",
  877. async: true,
  878. dataType: "json",
  879. data: {
  880. type: 1,
  881. token: $.cookie("token"),
  882. },
  883. success: function (res) {
  884. if (res.state == "success") {
  885. getHistoryList()
  886. } else {
  887. }
  888. }
  889. });
  890. }
  891. </script>
  892. </body>
  893. </html>