Няма описание

banli_zilei.html 42KB

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