Keine Beschreibung

banli.html 30KB

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