暂无描述

banli_zilei.html 41KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905
  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. // if (isProtect === "1") {
  272. simpleDetailStrEnd =
  273. $("#situation").val() +
  274. " [办理结果:" +
  275. "已办理 承办人:" +
  276. $("#dealman").val() +
  277. " 职务:" +
  278. $("#duties").val() +
  279. " 联系电话:" +
  280. $("#dealcontact").val() +
  281. " “承办人”向当事人进行了反馈,当事人对结果表示“满意/不满意”" +
  282. "]";
  283. simpleDetailStr =
  284. simpleDetailStrStart + simpleDetailStrEnd;
  285. $("#result").val(simpleDetailStr);
  286. } else if ($('#isProResultRadio input[name="isDisposeResult"]:checked').val() === "0") {
  287. simpleDetailStrEnd =
  288. $("#situation").val() +
  289. " [办理结果:" +
  290. "已办理 承办人:" +
  291. $("#dealman").val() +
  292. " 职务:" +
  293. $("#duties").val() +
  294. " 联系电话:" +
  295. $("#dealcontact").val() +
  296. ",“承办人”没有向当事人进行反馈" +
  297. "]";
  298. simpleDetailStr =
  299. simpleDetailStrStart + simpleDetailStrEnd;
  300. $("#result").val(simpleDetailStr);
  301. }
  302. // if ($('#isProResultRadio input[name="isDisposeResult"]:checked').val() === '1') {
  303. // if (isProtect === "1") {
  304. // simpleDetailStrEnd = "经落实,具体情况回复如下:" + $("#situation").val() + " 办理结果:" +
  305. // "已办理 承办人:" + $("#dealman").val() + " 职务:" + $("#duties").val() + " 联系电话:" +
  306. // $("#dealcontact").val()
  307. // simpleDetailStr = simpleDetailStrStart + simpleDetailStrEnd;
  308. // $("#result").val(simpleDetailStr);
  309. // } else if (isProtect === "0") {
  310. // if ($('#isStaisfiedRadio input[name="isstaisfied"]:checked').val() === "0") {
  311. // var isStaisfiedRadioData = "未评价";
  312. // } else if ($('#isStaisfiedRadio input[name="isstaisfied"]:checked').val() ===
  313. // "1") {
  314. // var isStaisfiedRadioData = "满意";
  315. // } else if ($('#isStaisfiedRadio input[name="isstaisfied"]:checked').val() ===
  316. // "2") {
  317. // var isStaisfiedRadioData = "基本满意";
  318. // } else if ($('#isStaisfiedRadio input[name="isstaisfied"]:checked').val() ===
  319. // "3") {
  320. // var isStaisfiedRadioData = "不满意";
  321. // } else {
  322. // var isStaisfiedRadioData = "未评价";
  323. // }
  324. // simpleDetailStrEnd = "经落实,具体情况回复如下:" + $("#situation").val() + " 办理结果:" +
  325. // "已办理 承办人:" + $("#dealman").val() + " 职务:" + $("#duties").val() + " 联系电话:" +
  326. // $("#dealcontact").val() + "; " + $("#dealman").val() + "用" + $(
  327. // "#connectmode").val() + "方式在" + $("#connecttime").val() +
  328. // "对反映人进行了回复,反映人对结果表示" + isStaisfiedRadioData
  329. // simpleDetailStr = simpleDetailStrStart + simpleDetailStrEnd;
  330. // $("#result").val(simpleDetailStr);
  331. // }
  332. // } else if ($('#isProResultRadio input[name="isDisposeResult"]:checked').val() === '2') {
  333. // simpleDetailStrEnd = "经落实,具体情况回复如下:" + $("#situation").val() + " 办理结果:" +
  334. // "未办理 承办人:" + $("#dealman").val() + " 职务:" + $("#duties").val() + " 联系电话:" + $(
  335. // "#dealcontact").val() + "; 处理方案/进程:" + $("#prosituation").val();
  336. // simpleDetailStr = simpleDetailStrStart + simpleDetailStrEnd;
  337. // $("#result").val(simpleDetailStr);
  338. // } else {
  339. // simpleDetailStr = simpleDetailStrStart + simpleDetailStrEnd;
  340. // $("#result").val(simpleDetailStr);
  341. // }
  342. })
  343. });
  344. //交办
  345. function JA() {
  346. $.post(huayi.config.callcenter_url + 'WorkOrder/DealWorkOrder', {
  347. workorderid: wid,
  348. dealman: $("#dealman").val(), //承办人
  349. result: $('#result').val(), //处理情况
  350. situation: $("#situation").val(), //办理结果
  351. isproresult: $('#isProResultRadio input[name="isDisposeResult"]:checked').val(), //处理结果
  352. // IsProResult: $('#isProResultRadio input[name="isDisposeResult"]:checked').val(), // 已办未果
  353. prosituation: $("#prosituation").val(), //处理方案/进程
  354. // Unsuccessful: $("#dealWithRemark").val(), //已办未果备注
  355. dealcontact: $("#dealcontact").val(), //联系方式
  356. duties: $("#duties").val(), //职务
  357. connecttime: $("#connecttime").val(), //沟通时间
  358. connectmode: $("#connectmode").val(), //沟通方式
  359. // replycontent: $("#replycontent").val(), //答复内容
  360. isstaisfied: $('#isStaisfiedRadio input[name="isstaisfied"]:checked').val(), //是否满意
  361. state: State,
  362. feedbackid: a,
  363. files: $("#file").val(),
  364. token: $.cookie("token")
  365. }, function (result) {
  366. result = JSON.parse(result);
  367. if (result.state.toLowerCase() == "success") {
  368. addHistory();
  369. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  370. parent.layer.close(index); //再执行关闭
  371. parent.load();
  372. parent.layer.msg("办理成功");
  373. $('.fileBox').html('');
  374. }
  375. })
  376. }
  377. // 工单详情
  378. function HGXX() {
  379. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetSecondDealInfo', {
  380. workorderid: wid,
  381. token: $.cookie("token")
  382. }, function (result) {
  383. // result = JSON.stringify(result)
  384. // alert(result)
  385. console.log(result);
  386. if (result.state.toLowerCase() == "success") {
  387. var temp;
  388. var Agree;
  389. $.each(result.data.fkinfo, function (i, n) {
  390. // var r = JSON.stringify(n.File);
  391. if (n.F_IsAudit == 1) {
  392. Agree = "同意";
  393. } else if (n.F_IsAudit == 2) {
  394. Agree = "拒绝";
  395. } else if (n.F_IsAudit == 0) {
  396. Agree = "";
  397. }
  398. var bval = n.F_Type;
  399. switch (bval + '') {
  400. case '1':
  401. bval = '主办';
  402. break;
  403. case '2':
  404. bval = '协办';
  405. break;
  406. }
  407. //是/否向当事人反馈
  408. var isProResultValue = n.F_IsProResult + "";
  409. switch (isProResultValue) {
  410. case "0":
  411. isProResultValue = "否";
  412. break;
  413. case "1":
  414. isProResultValue = "是";
  415. break;
  416. case "2":
  417. isProResultValue = "已办未果";
  418. break;
  419. }
  420. //是否满意
  421. var isSatisfiedValue = n.F_IsSatisfied + "";
  422. switch (isSatisfiedValue) {
  423. case "0":
  424. isSatisfiedValue = "未评价";
  425. break;
  426. case "1":
  427. isSatisfiedValue = "满意";
  428. break;
  429. case "2":
  430. isSatisfiedValue = "基本满意";
  431. break;
  432. case "3":
  433. isSatisfiedValue = "不满意";
  434. break;
  435. }
  436. //沟通时间
  437. var connectTimeValue = n.F_ConnectTime;
  438. switch (connectTimeValue) {
  439. case null:
  440. connectTimeValue = "";
  441. break;
  442. default:
  443. connectTimeValue = n.F_ConnectTime;
  444. }
  445. // 审批时间
  446. var auditTimeValue
  447. switch (n.F_AuditTime) {
  448. case "":
  449. auditTimeValue = ""
  450. break;
  451. case null:
  452. auditTimeValue = ""
  453. break;
  454. default:
  455. auditTimeValue = n.F_AuditTime
  456. break;
  457. }
  458. //审批内容
  459. var auditReasonValue
  460. switch (n.F_AuditReason) {
  461. case "":
  462. auditReasonValue = ""
  463. break;
  464. case null:
  465. auditReasonValue = ""
  466. break;
  467. default:
  468. auditReasonValue = n.F_AuditReason
  469. break;
  470. }
  471. //职务
  472. var dutiesValue
  473. switch (n.F_Duties) {
  474. case "":
  475. dutiesValue = ""
  476. break;
  477. case null:
  478. dutiesValue = ""
  479. break;
  480. default:
  481. dutiesValue = n.F_Duties
  482. break;
  483. }
  484. //处理情况
  485. var situationValue
  486. switch (n.F_Situation) {
  487. case "":
  488. situationValue = ""
  489. break;
  490. case null:
  491. situationValue = ""
  492. break;
  493. default:
  494. situationValue = n.F_Situation
  495. break;
  496. }
  497. temp = '<tr>' +
  498. '<td class="text-center">' + (i + 1) + '</td>' +
  499. '<td class="text-center">' + n.F_DealUser + '</td>' +
  500. '<td class="text-center">' + n.F_DealUserContact + '</td>' +
  501. '<td class="text-center">' + dutiesValue + '</td>' +
  502. '<td class="text-center">' + situationValue + '</td>' +
  503. '<td class="text-center">' + n.F_CreateTime + '</td>' +
  504. '<td class="text-center">' + n.F_Result + '</td>' +
  505. '<td class="text-center">' + auditTimeValue + '</td>' +
  506. '<td class="text-center">' + auditReasonValue + '</td>' +
  507. '<td class="text-center">' + Agree + '</td>' +
  508. '<td class="text-center" data-formatter="shtype">' + bval + '</td>' +
  509. '<td class="text-center">' + isProResultValue + '</td>' +
  510. '<td class="text-center">' + n.F_ProSituation + '</td>' +
  511. // '<td class="text-center">' + connectTimeValue + '</td>' +
  512. // '<td class="text-center">' + n.F_ConnectMode + '</td>' +
  513. // '<td class="text-center">' + isSatisfiedValue + '</td>' +
  514. '<td class="text-center FJ" style="color:#00a1cb;"></td>' +
  515. '</tr>';
  516. var tmp = '';
  517. if (n.File) {
  518. $.each(n.File, function (d, f) {
  519. tmp += '<a style="margin-right:5px;" href="' + f.F_FileUrl +
  520. '" download="' + f.F_FileUrl + '">' + f.F_FileName
  521. .substring(19) + '</a>';
  522. })
  523. }
  524. $(temp).appendTo($('.HGXX'))
  525. .find('.FJ')
  526. .append(tmp);
  527. });
  528. //
  529. // alert(i);
  530. }
  531. })
  532. }
  533. // <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>
  534. // function Hove(){
  535. // $(document).on("mouseover mouseout",'.tiaozhuan',function(event){
  536. // if(event.type == "mouseover"){
  537. // //鼠标悬浮
  538. // var miao=$(this).attr("href");
  539. // if (miao=="") {
  540. // $(this).removeAttr("href");
  541. // $(this).removeAttr("download");
  542. // $(this).html("");
  543. //
  544. // } else{
  545. // $(this).attr("href");
  546. // $(this).attr("download");
  547. // }
  548. // }else if(event.type == "mouseout"){
  549. // //鼠标离开
  550. // }
  551. // })
  552. //
  553. //
  554. // }
  555. // $(window).load(function(){
  556. // alert("DDD");
  557. // alert($(".tiaozhuan").attr("href"));
  558. // var miao1=$(".tiaozhuan").attr("href");
  559. // if (miao1=="") {
  560. // alert("aaa");
  561. //// $(this).html("");
  562. // } else{
  563. // alert("bbb");
  564. // $(this).html("");
  565. // }
  566. // });
  567. // 派单内容给
  568. function BLNR() {
  569. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetSecondDealInfo', {
  570. workorderid: wid,
  571. token: $.cookie("token")
  572. }, function (result) {
  573. // result = JSON.stringify(result)
  574. // console.log(result);
  575. if (result.state.toLowerCase() == "success") {
  576. var temp2;
  577. $.each(result.data.pdinfo, function (i, n) {
  578. temp2 = temp2 + '<tr><td class="text-center">' + n.F_CreateTime +
  579. '</td><td class="text-center">' + n.F_LimitTime +
  580. '</td><td class="text-center">' + n.F_AssignedOpinion + '</td></tr>';
  581. });
  582. $('.BLNR').append(temp2);
  583. }
  584. })
  585. }
  586. //草稿详情
  587. function Detail() {
  588. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetDraftInfo', {
  589. workorderid: wid,
  590. type: 2,
  591. token: $.cookie("token")
  592. }, function (result) {
  593. if (result.state.toLowerCase() == "success") {
  594. if (result.data.length > 0) {
  595. var IsProResultValue = result.data[0].F_IsProResult + "";
  596. isProResultJudge(IsProResultValue);
  597. $("#dealman").val(result.data[0].F_DealUser); //承办人
  598. $("#duties").val(result.data[0].F_Duties); //职务
  599. // $("#result").text(result.data[0].F_Result); //处理结果
  600. $("#situation").val(result.data[0].F_Situation); //处理情况
  601. $('#isProResultRadio input[name="isDisposeResult"][value="' + result.data[0]
  602. .F_IsProResult + '"]').prop("checked", true); //是/否向当事人反馈
  603. $("#prosituation").val(result.data[0].F_ProSituation); //处理方案/进程
  604. $("#dealcontact").val(result.data[0].F_DealUserContact); //联系方式
  605. $("#connecttime").val(result.data[0].F_ConnectTime); //沟通时间
  606. $("#connectmode").val(result.data[0].F_ConnectMode); //沟通方式
  607. // $("#replycontent").val(result.data[0].F_ReplyContent); //答复内容
  608. $('#isStaisfiedRadio input[name="isstaisfied"][value="' + result.data[0].F_IsSatisfied +
  609. '"]').prop("checked", true); //是否满意
  610. a = result.data[0].F_Id;
  611. };
  612. }
  613. })
  614. }
  615. //清除
  616. function Clean() {
  617. $("#startTime").val(''),
  618. $('#assignedopinion').val('')
  619. }
  620. //上传文件
  621. function upload() {
  622. var Files = document.getElementById("upFile").files;
  623. if (Files.length > 0) {
  624. var formData = new FormData();
  625. for (var i = 0; i < Files.length; i++) {
  626. formData.append('file' + i, Files[i]);
  627. }
  628. formData.append("token", $.cookie("token"));
  629. var typeName = Files[0].name.split('.')[1];
  630. if (typeName == "png" || typeName == 'jpg' || typeName == 'mp4' || typeName == 'mp3' || typeName ==
  631. 'pdf' || typeName == 'doc' || typeName == 'docx' || typeName == 'xls' || typeName == 'xlsx') {
  632. $.ajax({
  633. url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  634. type: "POST",
  635. data: formData,
  636. /**
  637. *必须false才会自动加上正确的Content-Type
  638. */
  639. contentType: false,
  640. /**
  641. * 必须false才会避开jQuery对 formdata 的默认处理
  642. * XMLHttpRequest会对 formdata 进行正确的处理
  643. */
  644. processData: false,
  645. success: function (result) {
  646. document.getElementById("upFile").outerHTML = document.getElementById("upFile")
  647. .outerHTML;
  648. $("#upFile").change(function () {
  649. upload();
  650. });
  651. var r = $.parseJSON(result);
  652. if (r.state.toLowerCase() == "success") {
  653. //$(".fjnr").text(r.data[0].F_FileName);
  654. var a = r.data;
  655. $(a).each(function (i, n) {
  656. var strs = '<span class="files" fiel-num="' + n.F_FileId +
  657. '">' + n.F_FileName.substring(19) +
  658. '<i class="fa fa-remove del_file"></i></span>'
  659. $(strs).appendTo($('.fileBox')).find('.del_file').click(
  660. function (event) {
  661. event.stopPropagation();
  662. $(this).parent().remove();
  663. file_num()
  664. })
  665. })
  666. file_num();
  667. }
  668. }
  669. });
  670. } else {
  671. layer.msg("格式不正确");
  672. }
  673. } else {
  674. layer.confirm('请上传文件!', {
  675. btn: ['确定']
  676. });
  677. }
  678. }
  679. //上传文件隐藏域值
  680. function file_num() {
  681. var str = '';
  682. var Str;
  683. $('.fileBox .files').each(function (j, m) {
  684. var aa = $(m).attr("fiel-num")
  685. console.log(aa);
  686. str += aa + ",";
  687. Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
  688. })
  689. $("#file").val(Str);
  690. }
  691. // 处理结果判断
  692. function isProResultJudge(isProResultdata) {
  693. // if (isProResultdata === '1') {
  694. // if (isProtect === "1") {
  695. // $(".prosituation-wrapper").hide(); //处理方案/进程
  696. // $(".annotation-wrapper").hide(); //注释
  697. // $(".connecttime-wrapper").hide(); //沟通时间
  698. // $(".connectmode-wrapper").hide(); //沟通方式
  699. // // $(".replycontent-wrapper").hide(); //答复内容
  700. // $(".isstaisfied-wrapper").hide(); //是否满意
  701. // // $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  702. // } else if (isProtect === "0") {
  703. // $(".prosituation-wrapper").hide(); //处理方案/进程
  704. // $(".annotation-wrapper").hide(); //注释
  705. // $(".connecttime-wrapper").show(); //沟通时间
  706. // $(".connectmode-wrapper").show(); //沟通方式
  707. // // $(".replycontent-wrapper").show(); //答复内容
  708. // $(".isstaisfied-wrapper").show(); //是否满意
  709. // // $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  710. // }
  711. // } else if (isProResultdata === '2') {
  712. // $(".prosituation-wrapper").show(); //处理方案/进程
  713. // $(".annotation-wrapper").show(); //注释
  714. // $(".connecttime-wrapper").hide(); //沟通时间
  715. // $(".connectmode-wrapper").hide(); //沟通方式
  716. // // $(".replycontent-wrapper").hide(); //答复内容
  717. // $(".isstaisfied-wrapper").hide(); //是否满意
  718. // // $(".dealWithRemark-wrapper").show(); // 已办未果备注
  719. // }
  720. if (isProResultdata === "1") {
  721. // if (isProtect === "1") {
  722. // $(".prosituation-wrapper").hide(); //处理方案/进程
  723. // $(".annotation-wrapper").hide(); //注释
  724. // $(".connecttime-wrapper").hide(); //沟通时间
  725. // $(".connectmode-wrapper").hide(); //沟通方式
  726. // // $(".replycontent-wrapper").hide(); //答复内容
  727. // $(".isstaisfied-wrapper").show(); //是否满意
  728. // $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  729. // } else if (isProtect === "0") {
  730. $(".prosituation-wrapper").hide(); //处理方案/进程
  731. $(".annotation-wrapper").hide(); //注释
  732. $(".connecttime-wrapper").hide(); //沟通时间
  733. $(".connectmode-wrapper").hide(); //沟通方式
  734. // $(".replycontent-wrapper").show(); //答复内容
  735. $(".isstaisfied-wrapper").show(); //是否满意
  736. $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  737. // }
  738. } else if (isProResultdata === "2") {
  739. $(".prosituation-wrapper").show(); //处理方案/进程
  740. $(".annotation-wrapper").show(); //注释
  741. $(".connecttime-wrapper").hide(); //沟通时间
  742. $(".connectmode-wrapper").hide(); //沟通方式
  743. // $(".replycontent-wrapper").hide(); //答复内容
  744. $(".isstaisfied-wrapper").hide(); //是否满意
  745. $(".dealWithRemark-wrapper").show(); // 已办未果备注
  746. } else if (isProResultdata === "0") {
  747. $(".prosituation-wrapper").hide(); //处理方案/进程
  748. $(".annotation-wrapper").hide(); //注释
  749. $(".connecttime-wrapper").hide(); //沟通时间
  750. $(".connectmode-wrapper").hide(); //沟通方式
  751. // $(".replycontent-wrapper").show(); //答复内容
  752. $(".isstaisfied-wrapper").hide(); //是否满意
  753. $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  754. }
  755. }
  756. //简易版工单详情
  757. function simpleDetail() {
  758. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkorderSimp', {
  759. workorderid: wid,
  760. token: $.cookie("token")
  761. }, function (result) {
  762. if (result.state.toLowerCase() == "success") {
  763. var data = result.data[0];
  764. simpleDetailStrStart = data.F_CreateTime + " " + data.deptname + "部门接到" + data.SourceName +
  765. "来源工单(编号:" + data.F_WorkOrderId + ")反映" + data.F_ComTitle + "问题,"
  766. }
  767. })
  768. }
  769. function getHistoryList() {
  770. $("#dealmanList").empty()
  771. $.ajax({
  772. type: "get",
  773. url: huayi.config.callcenter_url + "History/GetList",
  774. async: true,
  775. dataType: "json",
  776. data: {
  777. name: "contractor",
  778. token: $.cookie("token"),
  779. },
  780. success: function (res) {
  781. if (res.state == "success") {
  782. $.each(res.data, function (index, val) {
  783. console.log("val", val)
  784. if (val.F_Count !== "") {
  785. var data = JSON.parse(val.F_Count)
  786. console.log("data", data)
  787. $("#dealmanList").append("<option value='" + data.name +
  788. "'data-contact='" + data.contact + "'data-job='" + data
  789. .job + "'>")
  790. }
  791. })
  792. $("#dealmanList").append("<option value='清除历史记录'>")
  793. } else {
  794. layer.confirm(res.message, {
  795. icon: 2,
  796. btn: ['确定']
  797. });
  798. }
  799. }
  800. });
  801. }
  802. $("#dealman").change(function () {
  803. var name = $("#dealman").val()
  804. if (name === "清除历史记录") {
  805. $("#dealman").val("")
  806. deleteHistory()
  807. return
  808. }
  809. $("#dealmanList").find("option").each(function () {
  810. if (name == $(this).val()) {
  811. $("#dealcontact").val($(this).attr("data-contact"))
  812. $("#duties").val($(this).attr("data-job"))
  813. }
  814. })
  815. // $("#dealcontact").attr("data-contact")
  816. // $("#duties").attr("data-job")
  817. })
  818. function addHistory() {
  819. var contractorObject = {
  820. name: $("#dealman").val(),
  821. contact: $("#dealcontact").val(),
  822. job: $("#duties").val(),
  823. }
  824. var contractorObjectStr = JSON.stringify(contractorObject);
  825. $.ajax({
  826. type: "post",
  827. url: huayi.config.callcenter_url + "History/Add",
  828. async: true,
  829. dataType: "json",
  830. data: {
  831. name: "contractor",
  832. count: contractorObjectStr,
  833. token: $.cookie("token"),
  834. },
  835. success: function (res) {
  836. var res = $.parseJSON(res)
  837. if (res.state == "success") {
  838. } else {
  839. layer.confirm(res.message, {
  840. icon: 2,
  841. btn: ['确定']
  842. });
  843. }
  844. }
  845. });
  846. }
  847. function deleteHistory() {
  848. $.ajax({
  849. type: "post",
  850. url: huayi.config.callcenter_url + "History/Delete",
  851. async: true,
  852. dataType: "json",
  853. data: {
  854. type: 1,
  855. token: $.cookie("token"),
  856. },
  857. success: function (res) {
  858. if (res.state == "success") {
  859. getHistoryList()
  860. } else {
  861. }
  862. }
  863. });
  864. }
  865. </script>
  866. </body>
  867. </html>