Sin descripción

banli.html 27KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605
  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. </style>
  24. </head>
  25. <body>
  26. <div class="Common">
  27. <table>
  28. <tr>
  29. <th class="Importent">承办人:</th>
  30. <td>
  31. <input id="dealman" type="text" style="height: 32px" />
  32. </td>
  33. <th class="Importent">联系方式:</th>
  34. <td>
  35. <input type="text" id="dealcontact" />
  36. </td>
  37. <th class="Importent">职务:</th>
  38. <td>
  39. <input type="text" id="duties" />
  40. </td>
  41. </tr>
  42. <tr>
  43. <th class="Importent">处理结果:</th>
  44. <td colspan="5">
  45. <textarea data-adaptheight id="situation" name="" rows="6" cols=""></textarea>
  46. </td>
  47. </tr>
  48. <tr>
  49. <th class="Importent">是否有处理结果:</th>
  50. <td id="isProResultRadio" style="font-size: 12px">
  51. <label style="margin-right: 10px">
  52. <input type="radio" value="1" name="isDisposeResult" style="vertical-align: -2px" />是
  53. </label>
  54. <label>
  55. <input type="radio" value="2" name="isDisposeResult" style="vertical-align: -2px" />已办未果
  56. </label>
  57. </td>
  58. </tr>
  59. <tr class="dealWithRemark-wrapper">
  60. <th>已办未果备注:</th>
  61. <td colspan="5">
  62. <textarea data-adaptheight id="dealWithRemark" name="" rows="6" cols=""></textarea>
  63. </td>
  64. </tr>
  65. <tr class="prosituation-wrapper">
  66. <th>处理方案/进程:</th>
  67. <td colspan="5">
  68. <textarea data-adaptheight id="prosituation" name="" rows="6" cols=""></textarea>
  69. </td>
  70. </tr>
  71. <tr class="annotation-wrapper">
  72. <th style="color: #ff0000">注释:</th>
  73. <td style="color: #ff0000" colspan="5">
  74. 请提交加盖单位公章的相关说明文件,不添加文件说明将被扣考核分
  75. </td>
  76. </tr>
  77. <tr class="connecttime-wrapper">
  78. <th>沟通时间:</th>
  79. <td>
  80. <input type="text" class="laydate-icon" id="connecttime" style="
  81. width: 172px;
  82. height: 32px;
  83. border-color: rgb(158, 158, 158);
  84. " />
  85. </td>
  86. </tr>
  87. <tr class="connectmode-wrapper">
  88. <th>沟通方式:</th>
  89. <td>
  90. <input type="text" id="connectmode" />
  91. </td>
  92. </tr>
  93. <tr class="isstaisfied-wrapper">
  94. <th>是否满意:</th>
  95. <td id="isStaisfiedRadio" style="font-size: 12px" colspan="5">
  96. <label style="margin-right: 10px">
  97. <input type="radio" value="1" name="isstaisfied" style="vertical-align: -2px" />满意
  98. </label>
  99. <label style="margin-right: 10px">
  100. <input type="radio" value="2" name="isstaisfied" style="vertical-align: -2px" />基本满意
  101. </label>
  102. <label style="margin-right: 10px">
  103. <input type="radio" value="3" name="isstaisfied" style="vertical-align: -2px" />不满意
  104. </label>
  105. </td>
  106. </tr>
  107. <tr class="files-wrappper">
  108. <th class="Importent">附件:</th>
  109. <td colspan="5">
  110. <div class="fileBox"></div>
  111. <!--<span class="fjnr"></span>-->
  112. <input class="input" type="file" name="upFile" id="upFile" multiple="multiple"
  113. style="display: none" />
  114. <input class="input" type="button" value="上传" id="scwj" />
  115. <!--<input class="input" type="button" value="删除附件" id="scfj" style="display:none;" />-->
  116. <input type="hidden" id="file" />
  117. <span style="color: #ff0000; border: none">
  118. (文件格式为png,jpg,mp4,mp3,pdf,doc,docx,xls,xlsx)
  119. </span>
  120. </td>
  121. </tr>
  122. <tr>
  123. <td>
  124. <button class="btns handleBtn">查看办理结果</button>
  125. </td>
  126. <td colspan="5">
  127. <textarea data-adaptheight id="result" name="" rows="4" cols=""></textarea>
  128. </td>
  129. <input type="hidden" id="ID" />
  130. </tr>
  131. </table>
  132. <div class="btn_box">
  133. <button class="btns BC">保存</button>
  134. <button class="btns Submit">保存并办理</button>
  135. </div>
  136. </div>
  137. <script src="../css/laydate/laydate.js"></script>
  138. <script src="../js/adjustHeight.js"></script>
  139. <script>
  140. var wid = helper.request.queryString("wid");
  141. var isProtect = helper.request.queryString("isProtect");
  142. var State;
  143. var a = $("#ID").val();
  144. var simpleDetailStrStart = "";
  145. var simpleDetailStrEnd = "";
  146. var simpleDetailStr = "";
  147. Detail();
  148. $(document).ready(function () {
  149. laydate.skin("blue");
  150. laydate({
  151. elem: "#connecttime",
  152. event: "focus",
  153. istoday: true,
  154. istime: true,
  155. type: "datetime",
  156. format: "YYYY-MM-DD hh:mm:ss",
  157. });
  158. simpleDetail();
  159. //上传附件
  160. $("#scwj").click(function () {
  161. $("#upFile").trigger("click");
  162. });
  163. $("#upFile").change(function () {
  164. upload();
  165. });
  166. $("#scfj").click(function () {
  167. $(".fjnr").text("");
  168. $("#scfj").hide();
  169. });
  170. $(".BC").click(function () {
  171. if ($('#isProResultRadio input[name="isDisposeResult"]:checked').val() == "1") {
  172. if ($("#dealman").val() == "") {
  173. layer.msg("办理人不能为空");
  174. } else if ($("#situation").val() == "") {
  175. layer.msg("处理情况不能为空");
  176. } else if ($("#dealcontact").val() == "") {
  177. layer.msg("联系方式不能为空");
  178. } else if ($("#duties").val() == "") {
  179. layer.msg("职务不能为空");
  180. } else if ($("#result").val() == "") {
  181. layer.msg("请生成办理结果");
  182. } else {
  183. State = 0;
  184. JA();
  185. }
  186. } else if ($('#isProResultRadio input[name="isDisposeResult"]:checked').val() == "2") {
  187. State = 0;
  188. JA();
  189. } else {
  190. layer.msg("请选择是否有处理结果");
  191. }
  192. });
  193. $(".Submit").click(function () {
  194. if ($('#isProResultRadio input[name="isDisposeResult"]:checked').val() == "1") {
  195. if ($("#dealman").val() == "") {
  196. layer.msg("办理人不能为空");
  197. } else if ($("#situation").val() == "") {
  198. layer.msg("处理情况不能为空");
  199. } else if ($("#dealcontact").val() == "") {
  200. layer.msg("联系方式不能为空");
  201. } else if ($("#duties").val() == "") {
  202. layer.msg("职务不能为空");
  203. } else if ($("#result").val() == "") {
  204. layer.msg("请生成办理结果");
  205. } else {
  206. State = 1;
  207. JA();
  208. }
  209. } else if ($('#isProResultRadio input[name="isDisposeResult"]:checked').val() == "2") {
  210. State = 1;
  211. JA();
  212. } else {
  213. layer.msg("请选择是否有处理结果");
  214. }
  215. });
  216. $(".prosituation-wrapper").hide(); //处理方案/进程
  217. $(".annotation-wrapper").hide(); //注释
  218. $(".connecttime-wrapper").hide(); //沟通时间
  219. $(".connectmode-wrapper").hide(); //沟通方式
  220. // $(".replycontent-wrapper").hide(); //答复内容
  221. $(".isstaisfied-wrapper").hide(); //是否满意
  222. $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  223. /*
  224. * 处理结果
  225. * 默认 0
  226. * 是 1
  227. * 否 2
  228. */
  229. $("#isProResultRadio")
  230. .find('input[type="radio"]')
  231. .on("change", function () {
  232. $("#prosituation").val(""); //处理方案/进程
  233. $("#connecttime").val(""); //沟通时间
  234. $("#connectmode").val(""); //沟通方式
  235. // $("#replycontent").val(""); //答复内容
  236. $("#result").val(""); //办理结果
  237. $(
  238. '#isStaisfiedRadio input[name="isstaisfied"]:checked'
  239. ).prop("checked", false); //是否满意
  240. isProResultJudge($(this).val());
  241. });
  242. $(".handleBtn").click(function () {
  243. if (
  244. $(
  245. '#isProResultRadio input[name="isDisposeResult"]:checked'
  246. ).val() === "1"
  247. ) {
  248. if (isProtect === "1") {
  249. simpleDetailStrEnd =
  250. // "经落实,具体情况回复如下:" +
  251. $("#situation").val() +
  252. " [办理结果:" +
  253. "已办理 承办人:" +
  254. $("#dealman").val() +
  255. " 职务:" +
  256. $("#duties").val() +
  257. " 联系电话:" +
  258. $("#dealcontact").val() +
  259. "]";
  260. simpleDetailStr =
  261. simpleDetailStrStart + simpleDetailStrEnd;
  262. $("#result").val(simpleDetailStr);
  263. } else if (isProtect === "0") {
  264. if (
  265. $(
  266. '#isStaisfiedRadio input[name="isstaisfied"]:checked'
  267. ).val() === "0"
  268. ) {
  269. var isStaisfiedRadioData = "未评价";
  270. } else if (
  271. $(
  272. '#isStaisfiedRadio input[name="isstaisfied"]:checked'
  273. ).val() === "1"
  274. ) {
  275. var isStaisfiedRadioData = "满意";
  276. } else if (
  277. $(
  278. '#isStaisfiedRadio input[name="isstaisfied"]:checked'
  279. ).val() === "2"
  280. ) {
  281. var isStaisfiedRadioData = "基本满意";
  282. } else if (
  283. $(
  284. '#isStaisfiedRadio input[name="isstaisfied"]:checked'
  285. ).val() === "3"
  286. ) {
  287. var isStaisfiedRadioData = "不满意";
  288. } else {
  289. var isStaisfiedRadioData = "未评价";
  290. }
  291. simpleDetailStrEnd =
  292. // "经落实,具体情况回复如下:" +
  293. $("#situation").val() +
  294. " [办理结果:" +
  295. "已办理 承办人:" +
  296. $("#dealman").val() +
  297. " 职务:" +
  298. $("#duties").val() +
  299. " 联系电话:" +
  300. $("#dealcontact").val() +
  301. ";] " +
  302. $("#dealman").val() +
  303. "用" +
  304. $("#connectmode").val() +
  305. "方式在" +
  306. $("#connecttime").val() +
  307. "对反映人进行了回复,反映人对结果表示" +
  308. isStaisfiedRadioData;
  309. simpleDetailStr =
  310. simpleDetailStrStart + simpleDetailStrEnd;
  311. $("#result").val(simpleDetailStr);
  312. }
  313. } else if (
  314. $(
  315. '#isProResultRadio input[name="isDisposeResult"]:checked'
  316. ).val() === "2"
  317. ) {
  318. simpleDetailStrEnd =
  319. // "经落实,具体情况回复如下:" +
  320. $("#situation").val() +
  321. " [办理结果:" +
  322. "未办理 承办人:" +
  323. $("#dealman").val() +
  324. " 职务:" +
  325. $("#duties").val() +
  326. " 联系电话:" +
  327. $("#dealcontact").val() +
  328. ";] 处理方案/进程:" +
  329. $("#prosituation").val();
  330. simpleDetailStr =
  331. simpleDetailStrStart + simpleDetailStrEnd;
  332. $("#result").val(simpleDetailStr);
  333. } else {
  334. simpleDetailStr =
  335. simpleDetailStrStart + simpleDetailStrEnd;
  336. $("#result").val(simpleDetailStr);
  337. }
  338. });
  339. });
  340. //交办
  341. function JA() {
  342. $.post(
  343. huayi.config.callcenter_url + "WorkOrder/FeedBackWorkOrder", {
  344. workorderid: wid,
  345. dealman: $("#dealman").val(), //承办人
  346. dealcontact: $("#dealcontact").val(), //联系方式
  347. duties: $("#duties").val(), //职务
  348. situation: $("#situation").val(), //处理情况
  349. result: $("#result").val(), //办理结果
  350. isproresult: $(
  351. '#isProResultRadio input[name="isDisposeResult"]:checked'
  352. ).val(), //处理结果
  353. // IsProResult: $(
  354. // '#isProResultRadio input[name="isDisposeResult"]:checked'
  355. // ).val(), // 已办未果
  356. IsProResultState: "", // 已办未果状态
  357. prosituation: $("#prosituation").val(), //处理方案/进程
  358. Unsuccessful: $("#dealWithRemark").val(), //已办未果备注
  359. connecttime: $("#connecttime").val(), //沟通时间
  360. connectmode: $("#connectmode").val(), //沟通方式
  361. // replycontent: $("#replycontent").val(), //答复内容
  362. isstaisfied: $(
  363. '#isStaisfiedRadio input[name="isstaisfied"]:checked'
  364. ).val(), //是否满意
  365. state: State,
  366. feedbackid: a,
  367. files: $("#file").val(),
  368. token: $.cookie("token"),
  369. },
  370. function (result) {
  371. result = JSON.parse(result);
  372. if (result.state.toLowerCase() == "success") {
  373. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  374. parent.layer.close(index); //再执行关闭
  375. parent.$("#orderlist").bootstrapTable("refresh");
  376. parent.layer.msg("办理成功");
  377. $(".fileBox").html("");
  378. }
  379. }
  380. );
  381. }
  382. //草稿详情
  383. function Detail() {
  384. $.getJSON(
  385. huayi.config.callcenter_url + "WorkOrder/GetDraftInfo", {
  386. workorderid: wid,
  387. type: 2,
  388. token: $.cookie("token"),
  389. },
  390. function (result) {
  391. if (result.state.toLowerCase() == "success") {
  392. if (result.data.length > 0) {
  393. var IsProResultValue =
  394. result.data[0].F_IsProResult + "";
  395. isProResultJudge(IsProResultValue);
  396. $("#dealman").val(result.data[0].F_DealUser); //承办人
  397. // $("#result").text(result.data[0].F_Result); //办理结果
  398. $("#situation").val(result.data[0].F_Situation); //处理情况
  399. $("#duties").val(result.data[0].F_Duties); //职务
  400. $('#isProResultRadio input[name="isDisposeResult"][value="' + result.data[0]
  401. .F_IsProResult + '"]').prop("checked", true); //是否有处理结果
  402. $("#prosituation").val(
  403. result.data[0].F_ProSituation
  404. ); //处理方案/进程
  405. $("#dealcontact").val(
  406. result.data[0].F_DealUserContact
  407. ); //联系方式
  408. $("#connecttime").val(
  409. result.data[0].F_ConnectTime
  410. ); //沟通时间
  411. $("#connectmode").val(
  412. result.data[0].F_ConnectMode
  413. ); //沟通方式
  414. // $("#replycontent").val(result.data[0].F_ReplyContent); //答复内容
  415. $(
  416. '#isStaisfiedRadio input[name="isstaisfied"][value="' +
  417. result.data[0].F_IsSatisfied +
  418. '"]'
  419. ).prop("checked", true); //是否满意
  420. a = result.data[0].F_Id;
  421. }
  422. }
  423. }
  424. );
  425. }
  426. //清除
  427. function Clean() {
  428. $("#startTime").val(""), $("#assignedopinion").val("");
  429. }
  430. //上传文件
  431. function upload() {
  432. var Files = document.getElementById("upFile").files;
  433. if (Files.length > 0) {
  434. var formData = new FormData();
  435. for (var i = 0; i < Files.length; i++) {
  436. formData.append("file" + i, Files[i]);
  437. }
  438. formData.append("token", $.cookie("token"));
  439. var typeName = Files[0].name.split(".")[1];
  440. if (
  441. typeName == "png" ||
  442. typeName == "jpg" ||
  443. typeName == "mp4" ||
  444. typeName == "mp3" ||
  445. typeName == "pdf" ||
  446. typeName == "doc" ||
  447. typeName == "docx" ||
  448. typeName == "xls" ||
  449. typeName == "xlsx"
  450. ) {
  451. $.ajax({
  452. url: huayi.config.callcenter_url +
  453. "/WorkOrder/UploadFile",
  454. type: "POST",
  455. data: formData,
  456. /**
  457. *必须false才会自动加上正确的Content-Type
  458. */
  459. contentType: false,
  460. /**
  461. * 必须false才会避开jQuery对 formdata 的默认处理
  462. * XMLHttpRequest会对 formdata 进行正确的处理
  463. */
  464. processData: false,
  465. success: function (result) {
  466. document.getElementById(
  467. "upFile"
  468. ).outerHTML = document.getElementById(
  469. "upFile"
  470. ).outerHTML;
  471. $("#upFile").change(function () {
  472. upload();
  473. });
  474. var r = $.parseJSON(result);
  475. if (r.state.toLowerCase() == "success") {
  476. $(".fjnr").text(r.data[0].F_FileName);
  477. var a = r.data;
  478. $(a).each(function (i, n) {
  479. var strs =
  480. '<span class="files" fiel-num="' +
  481. n.F_FileId +
  482. '">' +
  483. n.F_FileName.substring(19) +
  484. '<i class="fa fa-remove del_file"></i></span>';
  485. $(strs)
  486. .appendTo($(".fileBox"))
  487. .find(".del_file")
  488. .click(function (event) {
  489. event.stopPropagation();
  490. $(this).parent().remove();
  491. file_num();
  492. });
  493. });
  494. file_num();
  495. }
  496. },
  497. });
  498. } else {
  499. layer.msg("格式不正确");
  500. }
  501. } else {
  502. layer.confirm("请上传文件!", {
  503. btn: ["确定"],
  504. });
  505. }
  506. }
  507. //上传文件隐藏域值
  508. function file_num() {
  509. var str = "";
  510. var Str;
  511. $(".fileBox .files").each(function (j, m) {
  512. var aa = $(m).attr("fiel-num");
  513. console.log(aa);
  514. str += aa + ",";
  515. Str =
  516. str.substring(str.length - 1) == "," ?
  517. str.substring(0, str.length - 1) :
  518. str;
  519. });
  520. $("#file").val(Str);
  521. }
  522. // 处理结果判断
  523. function isProResultJudge(isProResultdata) {
  524. if (isProResultdata === "1") {
  525. if (isProtect === "1") {
  526. $(".prosituation-wrapper").hide(); //处理方案/进程
  527. $(".annotation-wrapper").hide(); //注释
  528. $(".connecttime-wrapper").hide(); //沟通时间
  529. $(".connectmode-wrapper").hide(); //沟通方式
  530. // $(".replycontent-wrapper").hide(); //答复内容
  531. $(".isstaisfied-wrapper").hide(); //是否满意
  532. $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  533. } else if (isProtect === "0") {
  534. $(".prosituation-wrapper").hide(); //处理方案/进程
  535. $(".annotation-wrapper").hide(); //注释
  536. $(".connecttime-wrapper").show(); //沟通时间
  537. $(".connectmode-wrapper").show(); //沟通方式
  538. // $(".replycontent-wrapper").show(); //答复内容
  539. $(".isstaisfied-wrapper").show(); //是否满意
  540. $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  541. }
  542. } else if (isProResultdata === "2") {
  543. $(".prosituation-wrapper").show(); //处理方案/进程
  544. $(".annotation-wrapper").show(); //注释
  545. $(".connecttime-wrapper").hide(); //沟通时间
  546. $(".connectmode-wrapper").hide(); //沟通方式
  547. // $(".replycontent-wrapper").hide(); //答复内容
  548. $(".isstaisfied-wrapper").hide(); //是否满意
  549. $(".dealWithRemark-wrapper").show(); // 已办未果备注
  550. }
  551. }
  552. //简易版工单详情
  553. function simpleDetail() {
  554. $.getJSON(
  555. huayi.config.callcenter_url + "WorkOrder/GetWorkorderSimp", {
  556. workorderid: wid,
  557. token: $.cookie("token"),
  558. },
  559. function (result) {
  560. if (result.state.toLowerCase() == "success") {
  561. var data = result.data[0];
  562. var date = (new Date(data.F_CreateTime)).getTime();
  563. date = new Date(date)
  564. var year = date.getFullYear();
  565. var month = date.getMonth();
  566. var day = date.getDate();
  567. var hour = date.getHours();
  568. var minutes = date.getMinutes();
  569. var seconds = date.getSeconds();
  570. month = month + 1;
  571. if (month >= 1 && month <= 9) {
  572. month = "0" + month
  573. }
  574. if (day >= 1 && day <= 9) {
  575. day = "0" + day
  576. }
  577. var daysTime = year + "年" + month + "月" + day + "日 " + hour + "时" + minutes + "分" +
  578. seconds + "秒"
  579. simpleDetailStrStart =
  580. data.deptname +
  581. "于时间(" +
  582. daysTime +
  583. ")回复:"
  584. // data.SourceName +
  585. // "来源工单(编号:" +
  586. // data.F_WorkOrderId +
  587. // ")反映" +
  588. // data.F_ComTitle +
  589. // "问题,";
  590. }
  591. }
  592. );
  593. }
  594. </script>
  595. </body>
  596. </html>