暫無描述

lawsuits.html 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  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 type="text/css">
  11. .isStandard,
  12. .bulletUnit {
  13. display: none;
  14. }
  15. .bulletUnit ul {
  16. list-style: none;
  17. margin: 0;
  18. padding: 0;
  19. }
  20. .bulletUnit ul li {
  21. float: left;
  22. margin-right: 20px;
  23. text-align: center;
  24. padding: 6px 0;
  25. }
  26. .bulletUnit li input {
  27. display: none;
  28. }
  29. .bulletUnit li label {
  30. margin: 0;
  31. font-weight: normal;
  32. display: block;
  33. width: 100%;
  34. border: 1px solid #ccc;
  35. padding: 2px 10px;
  36. cursor: pointer;
  37. }
  38. .bulletUnit li label:hover {
  39. /*border-color: #fe6604;*/
  40. }
  41. .bulletUnit .checkedDept {
  42. border-color: #fe6604;
  43. }
  44. select:disabled {
  45. background-color: #eee;
  46. }
  47. .reasons {
  48. display: none;
  49. height: 160px;
  50. }
  51. #reasons {
  52. height: 160px;
  53. }
  54. #msg1,
  55. #msg2,
  56. #msg3,
  57. #phone {
  58. border: none;
  59. border-bottom: 1px solid #ccc;
  60. margin-bottom: 20px;
  61. background-color: #FFFFFF;
  62. color: #00a1cb;
  63. }
  64. #msg4 {
  65. width: 250px;
  66. height: 50px;
  67. border: none;
  68. border-bottom: 1px solid #ccc;
  69. margin-bottom: 20px;
  70. vertical-align: top;
  71. }
  72. #msg2 {
  73. vertical-align: top;
  74. height: 25px;
  75. }
  76. #msg1:focus,
  77. #msg2:focus,
  78. #msg3:focus,
  79. #msg4:focus,
  80. #phone:focus {
  81. outline: none;
  82. }
  83. </style>
  84. </head>
  85. <body>
  86. <div class="Common">
  87. <table>
  88. <tr>
  89. <th class="Importent">回访结果:</th>
  90. <td>
  91. <input checked="true" type="radio" value="1" name="huifang" />满意
  92. <input type="radio" value="0" name="huifang" />不满意
  93. </td>
  94. </tr>
  95. <!--<tr>
  96. <th class="Importent">是否通报:</th>
  97. <td>
  98. <select class="select_" id='isBulletin'>
  99. <option value="0">否</option>
  100. <option value="1">是</option>
  101. </select>
  102. </td>
  103. </tr>
  104. <tr id="bulletinUnit" class="bulletUnit">
  105. <th class="Importent">通报单位:</th>
  106. <td>
  107. <ul>
  108. </ul>
  109. </td>
  110. </tr>-->
  111. <tr class="bulletUnit">
  112. <th class="Importent">通报原因:</th>
  113. <td>
  114. <select name="" class="form-control orderType">
  115. <option value="0">请选择通报原因</option>
  116. </select>
  117. </td>
  118. <!--<td><textarea name="" rows="4" cols="" id="bulletinReason"></textarea></td>-->
  119. </tr>
  120. <tr class="reasons">
  121. <th class="Importent">其他原因:</th>
  122. <td colspan="2"><textarea data-adaptheight id="reasons" name="" rows="6" cols=""></textarea></td>
  123. </tr>
  124. <tr>
  125. <th class="Importent">是否规范:</th>
  126. <td>
  127. <select class="select_" id='isStandard'>
  128. <option value="0">是</option>
  129. <option value="1">否</option>
  130. </select>
  131. </td>
  132. </tr>
  133. <tr class="isStandard">
  134. <th class="Importent">不规范原因:</th>
  135. <td>
  136. <select name="" class="form-control standard">
  137. <option value="0">请选择不规范原因</option>
  138. </select>
  139. </td>
  140. </tr>
  141. <tr>
  142. <th class="Importent">备注:</th>
  143. <td colspan="2"><textarea data-adaptheight id="finalopinion" name="" rows="6" cols=""></textarea></td>
  144. </tr>
  145. </table>
  146. <div class="" style="margin: 20px 0 0 10px;">
  147. 尊敬的市民,您于<input id="msg1" type="text" disabled />反映的<textarea id="msg2" type="text"></textarea>问题,工单号:<input
  148. id="msg3" type="text" disabled />,<br />
  149. 处理结果如下:<textarea id="msg4" type="text"></textarea>如有异议,请您再次致电12345,感谢您的支持。<br />
  150. 通知号码:<input id="phone" type="text" />
  151. <button class="btns sendMsg">发送短信</button>
  152. </div>
  153. <div class="btn_box">
  154. <button class="btns_save">保存</button>
  155. </div>
  156. </div>
  157. <input type="hidden" name="depID" id="depID" value="" />
  158. <script src="../js/adjustHeight.js"></script>
  159. <script>
  160. var wid = helper.request.queryString("wid");
  161. var bulletinUnits = ''; //通报单位
  162. $(document).ready(function () {
  163. //获取工单信息
  164. loadTEL();
  165. //通报原因
  166. getOrderType();
  167. //获取单位
  168. getUnit();
  169. //不规范原因
  170. getIsStandard();
  171. //是否通报
  172. $('#isBulletin').change(function () {
  173. if ($('#isBulletin').val() == '0') {
  174. //默认不通报,通报单位通报原因不显示
  175. $('.bulletUnit').hide();
  176. } else if ($('#isBulletin').val() == '1') {
  177. //选择是 ,显示通报单位通报原因;
  178. $('.bulletUnit').show();
  179. }
  180. });
  181. //是否规范
  182. $('#isStandard').change(function () {
  183. if ($('#isStandard').val() == '0') {
  184. //默认规范
  185. $('.isStandard').hide();
  186. } else if ($('#isStandard').val() == '1') {
  187. $('.isStandard').show();
  188. }
  189. });
  190. $(".btns_save").click(function () {
  191. debugger
  192. if ($('#isBulletin').val() == 0) {
  193. JA(bulletinUnits);
  194. } else if ($('#isBulletin').val() == 1) {
  195. debugger
  196. // if($("input[name='checkbox']:checkbox:checked").length <= 0){
  197. // layer.msg("您没有选择通报单位。");
  198. // }else
  199. if (!$(".orderType").val() || $('.orderType').val() == 0) {
  200. layer.msg("通报原因没有填写。");
  201. return
  202. } else if ($(".orderType").val() == 76 && !$('#reasons').val()) {
  203. layer.msg('其他通报原因没有填写');
  204. return
  205. } else {
  206. $("input[name='checkbox']:checkbox:checked").each(function () {
  207. bulletinUnits += $(this).val() + ',';
  208. });
  209. bulletinUnits = bulletinUnits.substring(0, bulletinUnits.length - 1);
  210. JA(bulletinUnits);
  211. }
  212. }
  213. });
  214. })
  215. function JA(bUnits) {
  216. var standardID = $('.standard').val()
  217. if ($('#isStandard').val() == 1 && standardID == 0) {
  218. layer.msg('请选择不规范原因');
  219. return
  220. } else if ($('#isStandard').val() == 0) {
  221. standardID = ''
  222. }
  223. $.post(huayi.config.callcenter_url + 'WorkOrder/FinishWorkOrder', {
  224. workorderid: wid,
  225. issatisfie: $('input[name="huifang"]:checked ').val(),
  226. finalopinion: $("#finalopinion").val(),
  227. isnotice: $('#isBulletin').val(), //0不通告1通告
  228. deptids: $('#depID').val(), //通报单位
  229. // noticereson: $('#bulletinReason').val(),//通报原因
  230. noticeid: $('.orderType').val(), //通报id
  231. noticeinfo: $('.orderType').find("option:selected").text(),
  232. noticereson: $('#reasons').val(), //其他通报原因
  233. isstandard: $('#isStandard').val(), //是否规范0是1否
  234. standardids: standardID, //不规范id
  235. "token": $.cookie("token")
  236. }, function (result) {
  237. result = JSON.parse(result);
  238. if (result.state.toLowerCase() == "success") {
  239. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  240. parent.layer.close(index); //再执行关闭
  241. parent.$('#orderlist').bootstrapTable('refresh');
  242. parent.layer.msg("结案成功");
  243. }
  244. })
  245. }
  246. //获取工单信息
  247. function loadTEL() {
  248. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkOrder', {
  249. workorderid: wid,
  250. "token": $.cookie("token")
  251. }, function (result) {
  252. if (result.state.toLowerCase() == "success") {
  253. var Data = result.data.data;
  254. $('#msg3').val(Data[0].F_WorkOrderId)
  255. $('#msg1').val(Data[0].F_CreateTime)
  256. $('#msg2').text(Data[0].F_ComTitle)
  257. $('#msg4').val(result.data.bldata && result.data.bldata[result.data.bldata.length - 1]
  258. .F_Situation)
  259. $("#phone").val(Data[0].F_ConPhone)
  260. }
  261. })
  262. }
  263. //发送短信
  264. $('.sendMsg').click(function () {
  265. if (!$('#msg4').val()) {
  266. layer.msg('请填写结果')
  267. return
  268. }
  269. if (!$('#phone').val()) {
  270. layer.msg('请填写通知号码')
  271. return
  272. }
  273. $.ajax({
  274. type: "post",
  275. url: huayi.config.callcenter_url + 'WorkOrder/SmsHand',
  276. async: true,
  277. data: {
  278. msg1: $('#msg1').val(),
  279. msg2: $('#msg2').val(),
  280. msg3: $('#msg3').val(),
  281. msg4: $('#msg4').val(),
  282. mobile: $('#phone').val(),
  283. token: $.cookie("token")
  284. },
  285. success: function (res) {
  286. res = JSON.parse(res)
  287. if (res.state.toLowerCase() == 'success') {
  288. layer.msg('短信发送成功')
  289. } else {
  290. layer.msg('短信发送失败')
  291. }
  292. }
  293. });
  294. })
  295. //获取单位
  296. function getUnit() {
  297. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetAllAssignDept', {
  298. workorderid: wid,
  299. token: $.cookie("token")
  300. }, function (result) {
  301. if (result.state.toLowerCase() == "success") {
  302. $('#depID').val(result.data[0].F_DeptId)
  303. if (result.data.length > 0) {
  304. $('#isBulletin').removeAttr("disabled");
  305. for (var i = 0; i < result.data.length; i++) {
  306. $('#bulletinUnit ul').append('<li><input type="checkbox" name="checkbox" id="unit' +
  307. i + '" value=""/>' +
  308. '<label for="unit' + i + '">' + result.data[i].F_DeptName + '</label></li>');
  309. }
  310. if (('#bulletinUnit input').length > 0) {
  311. $('#bulletinUnit input').each(function (index) {
  312. if ($(this).is('[type=checkbox]')) {
  313. var cinput = $(this);
  314. var label = $('label[for=' + cinput.attr('id') + ']');
  315. cinput.bind('updateState', function () {
  316. if (cinput.is(':checked')) {
  317. label.addClass('checkedDept');
  318. cinput.val(result.data[index].F_DeptId);
  319. } else {
  320. label.removeClass('checkedDept');
  321. cinput.val('');
  322. }
  323. })
  324. .trigger('updateState')
  325. .click(function () {
  326. $('input[name=' + $(this).attr('name') + ']').trigger(
  327. 'updateState');
  328. });
  329. }
  330. });
  331. }
  332. } else {
  333. $('#isBulletin').attr("disabled", "disabled");
  334. }
  335. }
  336. })
  337. }
  338. function getOrderType() {
  339. $.get(huayi.config.callcenter_url + 'Dictionary/GetDicValueListByParentId', {
  340. "token": $.cookie("token"),
  341. pid: 62
  342. }, function (result) {
  343. result = $.parseJSON(result);
  344. var Count = result.data;
  345. $(Count).each(function (i, n) {
  346. $('<option value="' + n.F_ValueId + '">' + n.F_Value + '</option>').appendTo($(
  347. ".orderType"));
  348. })
  349. });
  350. }
  351. //不规范原因
  352. function getIsStandard() {
  353. $.get(huayi.config.callcenter_url + 'Dictionary/GetDicValueListByParentId', {
  354. "token": $.cookie("token"),
  355. pid: 78
  356. }, function (result) {
  357. result = $.parseJSON(result);
  358. var Count = result.data;
  359. $(Count).each(function (i, n) {
  360. $('<option value="' + n.F_ValueId + '">' + n.F_Value + '</option>').appendTo($(
  361. ".standard"));
  362. })
  363. });
  364. }
  365. $('.orderType').change(() => {
  366. if ($('.orderType').val() == 76) {
  367. $('.reasons').show()
  368. } else {
  369. $('.reasons').hide()
  370. }
  371. })
  372. </script>
  373. </body>
  374. </html>