Geen omschrijving

banli_zilei.html 37KB

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