Açıklama Yok

banli.html 26KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590
  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. simpleDetailStr =
  260. simpleDetailStrStart + simpleDetailStrEnd;
  261. $("#result").val(simpleDetailStr);
  262. } else if (isProtect === "0") {
  263. if (
  264. $(
  265. '#isStaisfiedRadio input[name="isstaisfied"]:checked'
  266. ).val() === "0"
  267. ) {
  268. var isStaisfiedRadioData = "未评价";
  269. } else if (
  270. $(
  271. '#isStaisfiedRadio input[name="isstaisfied"]:checked'
  272. ).val() === "1"
  273. ) {
  274. var isStaisfiedRadioData = "满意";
  275. } else if (
  276. $(
  277. '#isStaisfiedRadio input[name="isstaisfied"]:checked'
  278. ).val() === "2"
  279. ) {
  280. var isStaisfiedRadioData = "基本满意";
  281. } else if (
  282. $(
  283. '#isStaisfiedRadio input[name="isstaisfied"]:checked'
  284. ).val() === "3"
  285. ) {
  286. var isStaisfiedRadioData = "不满意";
  287. } else {
  288. var isStaisfiedRadioData = "未评价";
  289. }
  290. simpleDetailStrEnd =
  291. "经落实,具体情况回复如下:" +
  292. $("#situation").val() +
  293. " 办理结果:" +
  294. "已办理 承办人:" +
  295. $("#dealman").val() +
  296. " 职务:" +
  297. $("#duties").val() +
  298. " 联系电话:" +
  299. $("#dealcontact").val() +
  300. "; " +
  301. $("#dealman").val() +
  302. "用" +
  303. $("#connectmode").val() +
  304. "方式在" +
  305. $("#connecttime").val() +
  306. "对反映人进行了回复,反映人对结果表示" +
  307. isStaisfiedRadioData;
  308. simpleDetailStr =
  309. simpleDetailStrStart + simpleDetailStrEnd;
  310. $("#result").val(simpleDetailStr);
  311. }
  312. } else if (
  313. $(
  314. '#isProResultRadio input[name="isDisposeResult"]:checked'
  315. ).val() === "2"
  316. ) {
  317. simpleDetailStrEnd =
  318. "经落实,具体情况回复如下:" +
  319. $("#situation").val() +
  320. " 办理结果:" +
  321. "未办理 承办人:" +
  322. $("#dealman").val() +
  323. " 职务:" +
  324. $("#duties").val() +
  325. " 联系电话:" +
  326. $("#dealcontact").val() +
  327. "; 处理方案/进程:" +
  328. $("#prosituation").val();
  329. simpleDetailStr =
  330. simpleDetailStrStart + simpleDetailStrEnd;
  331. $("#result").val(simpleDetailStr);
  332. } else {
  333. simpleDetailStr =
  334. simpleDetailStrStart + simpleDetailStrEnd;
  335. $("#result").val(simpleDetailStr);
  336. }
  337. });
  338. });
  339. //交办
  340. function JA() {
  341. $.post(
  342. huayi.config.callcenter_url + "WorkOrder/FeedBackWorkOrder", {
  343. workorderid: wid,
  344. dealman: $("#dealman").val(), //承办人
  345. dealcontact: $("#dealcontact").val(), //联系方式
  346. duties: $("#duties").val(), //职务
  347. situation: $("#situation").val(), //处理情况
  348. result: $("#result").val(), //办理结果
  349. isproresult: $(
  350. '#isProResultRadio input[name="isDisposeResult"]:checked'
  351. ).val(), //处理结果
  352. IsProResult: $(
  353. '#isProResultRadio input[name="isDisposeResult"]:checked'
  354. ).val(), // 已办未果
  355. IsProResultState: "", // 已办未果状态
  356. prosituation: $("#prosituation").val(), //处理方案/进程
  357. Unsuccessful: $("#dealWithRemark").val(), //已办未果备注
  358. connecttime: $("#connecttime").val(), //沟通时间
  359. connectmode: $("#connectmode").val(), //沟通方式
  360. // replycontent: $("#replycontent").val(), //答复内容
  361. isstaisfied: $(
  362. '#isStaisfiedRadio input[name="isstaisfied"]:checked'
  363. ).val(), //是否满意
  364. state: State,
  365. feedbackid: a,
  366. files: $("#file").val(),
  367. token: $.cookie("token"),
  368. },
  369. function (result) {
  370. result = JSON.parse(result);
  371. if (result.state.toLowerCase() == "success") {
  372. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  373. parent.layer.close(index); //再执行关闭
  374. parent.$("#orderlist").bootstrapTable("refresh");
  375. parent.layer.msg("办理成功");
  376. $(".fileBox").html("");
  377. }
  378. }
  379. );
  380. }
  381. //草稿详情
  382. function Detail() {
  383. $.getJSON(
  384. huayi.config.callcenter_url + "WorkOrder/GetDraftInfo", {
  385. workorderid: wid,
  386. type: 2,
  387. token: $.cookie("token"),
  388. },
  389. function (result) {
  390. if (result.state.toLowerCase() == "success") {
  391. if (result.data.length > 0) {
  392. var IsProResultValue =
  393. result.data[0].F_IsProResult + "";
  394. isProResultJudge(IsProResultValue);
  395. $("#dealman").val(result.data[0].F_DealUser); //承办人
  396. // $("#result").text(result.data[0].F_Result); //办理结果
  397. $("#situation").val(result.data[0].F_Situation); //处理情况
  398. $("#duties").val(result.data[0].F_Duties); //职务
  399. $(
  400. '#isProResultRadio input[name="isDisposeResult"][value="' +
  401. result.data[0].F_IsProResult +
  402. '"]'
  403. ).prop("checked", true); //是否有处理结果
  404. $("#prosituation").val(
  405. result.data[0].F_ProSituation
  406. ); //处理方案/进程
  407. $("#dealcontact").val(
  408. result.data[0].F_DealUserContact
  409. ); //联系方式
  410. $("#connecttime").val(
  411. result.data[0].F_ConnectTime
  412. ); //沟通时间
  413. $("#connectmode").val(
  414. result.data[0].F_ConnectMode
  415. ); //沟通方式
  416. // $("#replycontent").val(result.data[0].F_ReplyContent); //答复内容
  417. $(
  418. '#isStaisfiedRadio input[name="isstaisfied"][value="' +
  419. result.data[0].F_IsSatisfied +
  420. '"]'
  421. ).prop("checked", true); //是否满意
  422. a = result.data[0].F_Id;
  423. }
  424. }
  425. }
  426. );
  427. }
  428. //清除
  429. function Clean() {
  430. $("#startTime").val(""), $("#assignedopinion").val("");
  431. }
  432. //上传文件
  433. function upload() {
  434. var Files = document.getElementById("upFile").files;
  435. if (Files.length > 0) {
  436. var formData = new FormData();
  437. for (var i = 0; i < Files.length; i++) {
  438. formData.append("file" + i, Files[i]);
  439. }
  440. formData.append("token", $.cookie("token"));
  441. var typeName = Files[0].name.split(".")[1];
  442. if (
  443. typeName == "png" ||
  444. typeName == "jpg" ||
  445. typeName == "mp4" ||
  446. typeName == "mp3" ||
  447. typeName == "pdf" ||
  448. typeName == "doc" ||
  449. typeName == "docx" ||
  450. typeName == "xls" ||
  451. typeName == "xlsx"
  452. ) {
  453. $.ajax({
  454. url: huayi.config.callcenter_url +
  455. "/WorkOrder/UploadFile",
  456. type: "POST",
  457. data: formData,
  458. /**
  459. *必须false才会自动加上正确的Content-Type
  460. */
  461. contentType: false,
  462. /**
  463. * 必须false才会避开jQuery对 formdata 的默认处理
  464. * XMLHttpRequest会对 formdata 进行正确的处理
  465. */
  466. processData: false,
  467. success: function (result) {
  468. document.getElementById(
  469. "upFile"
  470. ).outerHTML = document.getElementById(
  471. "upFile"
  472. ).outerHTML;
  473. $("#upFile").change(function () {
  474. upload();
  475. });
  476. var r = $.parseJSON(result);
  477. if (r.state.toLowerCase() == "success") {
  478. $(".fjnr").text(r.data[0].F_FileName);
  479. var a = r.data;
  480. $(a).each(function (i, n) {
  481. var strs =
  482. '<span class="files" fiel-num="' +
  483. n.F_FileId +
  484. '">' +
  485. n.F_FileName.substring(19) +
  486. '<i class="fa fa-remove del_file"></i></span>';
  487. $(strs)
  488. .appendTo($(".fileBox"))
  489. .find(".del_file")
  490. .click(function (event) {
  491. event.stopPropagation();
  492. $(this).parent().remove();
  493. file_num();
  494. });
  495. });
  496. file_num();
  497. }
  498. },
  499. });
  500. } else {
  501. layer.msg("格式不正确");
  502. }
  503. } else {
  504. layer.confirm("请上传文件!", {
  505. btn: ["确定"],
  506. });
  507. }
  508. }
  509. //上传文件隐藏域值
  510. function file_num() {
  511. var str = "";
  512. var Str;
  513. $(".fileBox .files").each(function (j, m) {
  514. var aa = $(m).attr("fiel-num");
  515. console.log(aa);
  516. str += aa + ",";
  517. Str =
  518. str.substring(str.length - 1) == "," ?
  519. str.substring(0, str.length - 1) :
  520. str;
  521. });
  522. $("#file").val(Str);
  523. }
  524. // 处理结果判断
  525. function isProResultJudge(isProResultdata) {
  526. if (isProResultdata === "1") {
  527. if (isProtect === "1") {
  528. $(".prosituation-wrapper").hide(); //处理方案/进程
  529. $(".annotation-wrapper").hide(); //注释
  530. $(".connecttime-wrapper").hide(); //沟通时间
  531. $(".connectmode-wrapper").hide(); //沟通方式
  532. // $(".replycontent-wrapper").hide(); //答复内容
  533. $(".isstaisfied-wrapper").hide(); //是否满意
  534. $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  535. } else if (isProtect === "0") {
  536. $(".prosituation-wrapper").hide(); //处理方案/进程
  537. $(".annotation-wrapper").hide(); //注释
  538. $(".connecttime-wrapper").show(); //沟通时间
  539. $(".connectmode-wrapper").show(); //沟通方式
  540. // $(".replycontent-wrapper").show(); //答复内容
  541. $(".isstaisfied-wrapper").show(); //是否满意
  542. $(".dealWithRemark-wrapper").hide(); // 已办未果备注
  543. }
  544. } else if (isProResultdata === "2") {
  545. $(".prosituation-wrapper").show(); //处理方案/进程
  546. $(".annotation-wrapper").show(); //注释
  547. $(".connecttime-wrapper").hide(); //沟通时间
  548. $(".connectmode-wrapper").hide(); //沟通方式
  549. // $(".replycontent-wrapper").hide(); //答复内容
  550. $(".isstaisfied-wrapper").hide(); //是否满意
  551. $(".dealWithRemark-wrapper").show(); // 已办未果备注
  552. }
  553. }
  554. //简易版工单详情
  555. function simpleDetail() {
  556. $.getJSON(
  557. huayi.config.callcenter_url + "WorkOrder/GetWorkorderSimp", {
  558. workorderid: wid,
  559. token: $.cookie("token"),
  560. },
  561. function (result) {
  562. if (result.state.toLowerCase() == "success") {
  563. var data = result.data[0];
  564. simpleDetailStrStart =
  565. data.F_CreateTime +
  566. " " +
  567. data.deptname +
  568. "部门接到" +
  569. data.SourceName +
  570. "来源工单(编号:" +
  571. data.F_WorkOrderId +
  572. ")反映" +
  573. data.F_ComTitle +
  574. "问题,";
  575. }
  576. }
  577. );
  578. }
  579. </script>
  580. </body>
  581. </html>