Нет описания

lawsuits.html 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  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. if ($('#isBulletin').val() == 0) {
  192. JA(bulletinUnits);
  193. } else if ($('#isBulletin').val() == 1) {
  194. // if($("input[name='checkbox']:checkbox:checked").length <= 0){
  195. // layer.msg("您没有选择通报单位。");
  196. // }else
  197. if (!$(".orderType").val() || $('.orderType').val() == 0) {
  198. layer.msg("通报原因没有填写。");
  199. return
  200. } else if ($(".orderType").val() == 76 && !$('#reasons').val()) {
  201. layer.msg('其他通报原因没有填写');
  202. return
  203. } else {
  204. $("input[name='checkbox']:checkbox:checked").each(function () {
  205. bulletinUnits += $(this).val() + ',';
  206. });
  207. bulletinUnits = bulletinUnits.substring(0, bulletinUnits.length - 1);
  208. JA(bulletinUnits);
  209. }
  210. }
  211. });
  212. })
  213. function JA(bUnits) {
  214. var standardID = $('.standard').val()
  215. if ($('#isStandard').val() == 1 && standardID == 0) {
  216. layer.msg('请选择不规范原因');
  217. return
  218. } else if ($('#isStandard').val() == 0) {
  219. standardID = ''
  220. }
  221. $.post(huayi.config.callcenter_url + 'WorkOrder/FinishWorkOrder', {
  222. workorderid: wid,
  223. issatisfie: $('input[name="huifang"]:checked ').val(),
  224. finalopinion: $("#finalopinion").val(),
  225. isnotice: $('#isBulletin').val(), //0不通告1通告
  226. deptids: $('#depID').val(), //通报单位
  227. // noticereson: $('#bulletinReason').val(),//通报原因
  228. noticeid: $('.orderType').val(), //通报id
  229. noticeinfo: $('.orderType').find("option:selected").text(),
  230. noticereson: $('#reasons').val(), //其他通报原因
  231. isstandard: $('#isStandard').val(), //是否规范0是1否
  232. standardids: standardID, //不规范id
  233. "token": $.cookie("token")
  234. }, function (result) {
  235. result = JSON.parse(result);
  236. if (result.state.toLowerCase() == "success") {
  237. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  238. parent.layer.close(index); //再执行关闭
  239. parent.$('#orderlist').bootstrapTable('refresh');
  240. parent.layer.msg("结案成功");
  241. }
  242. })
  243. }
  244. //获取工单信息
  245. function loadTEL() {
  246. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkOrder', {
  247. workorderid: wid,
  248. "token": $.cookie("token")
  249. }, function (result) {
  250. if (result.state.toLowerCase() == "success") {
  251. var Data = result.data.data;
  252. $('#msg3').val(Data[0].F_WorkOrderId)
  253. $('#msg1').val(Data[0].F_CreateTime)
  254. $('#msg2').text(Data[0].F_ComTitle)
  255. $('#msg4').val(result.data.bldata && result.data.bldata[result.data.bldata.length - 1]
  256. .F_Situation)
  257. $("#phone").val(Data[0].F_ConPhone)
  258. }
  259. })
  260. }
  261. //发送短信
  262. $('.sendMsg').click(function () {
  263. if (!$('#msg4').val()) {
  264. layer.msg('请填写结果')
  265. return
  266. }
  267. if (!$('#phone').val()) {
  268. layer.msg('请填写通知号码')
  269. return
  270. }
  271. $.ajax({
  272. type: "post",
  273. url: huayi.config.callcenter_url + 'WorkOrder/SmsHand',
  274. async: true,
  275. data: {
  276. msg1: $('#msg1').val(),
  277. msg2: $('#msg2').val(),
  278. msg3: $('#msg3').val(),
  279. msg4: $('#msg4').val(),
  280. mobile: $('#phone').val(),
  281. token: $.cookie("token")
  282. },
  283. success: function (res) {
  284. res = JSON.parse(res)
  285. if (res.state.toLowerCase() == 'success') {
  286. layer.msg('短信发送成功')
  287. } else {
  288. layer.msg('短信发送失败')
  289. }
  290. }
  291. });
  292. })
  293. //获取单位
  294. function getUnit() {
  295. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetAllAssignDept', {
  296. workorderid: wid,
  297. token: $.cookie("token")
  298. }, function (result) {
  299. if (result.state.toLowerCase() == "success") {
  300. $('#depID').val(result.data[0].F_DeptId)
  301. if (result.data.length > 0) {
  302. $('#isBulletin').removeAttr("disabled");
  303. for (var i = 0; i < result.data.length; i++) {
  304. $('#bulletinUnit ul').append('<li><input type="checkbox" name="checkbox" id="unit' +
  305. i + '" value=""/>' +
  306. '<label for="unit' + i + '">' + result.data[i].F_DeptName + '</label></li>');
  307. }
  308. if (('#bulletinUnit input').length > 0) {
  309. $('#bulletinUnit input').each(function (index) {
  310. if ($(this).is('[type=checkbox]')) {
  311. var cinput = $(this);
  312. var label = $('label[for=' + cinput.attr('id') + ']');
  313. cinput.bind('updateState', function () {
  314. if (cinput.is(':checked')) {
  315. label.addClass('checkedDept');
  316. cinput.val(result.data[index].F_DeptId);
  317. } else {
  318. label.removeClass('checkedDept');
  319. cinput.val('');
  320. }
  321. })
  322. .trigger('updateState')
  323. .click(function () {
  324. $('input[name=' + $(this).attr('name') + ']').trigger(
  325. 'updateState');
  326. });
  327. }
  328. });
  329. }
  330. } else {
  331. $('#isBulletin').attr("disabled", "disabled");
  332. }
  333. }
  334. })
  335. }
  336. function getOrderType() {
  337. $.get(huayi.config.callcenter_url + 'Dictionary/GetDicValueListByParentId', {
  338. "token": $.cookie("token"),
  339. pid: 62
  340. }, function (result) {
  341. result = $.parseJSON(result);
  342. var Count = result.data;
  343. $(Count).each(function (i, n) {
  344. $('<option value="' + n.F_ValueId + '">' + n.F_Value + '</option>').appendTo($(
  345. ".orderType"));
  346. })
  347. });
  348. }
  349. //不规范原因
  350. function getIsStandard() {
  351. $.get(huayi.config.callcenter_url + 'Dictionary/GetDicValueListByParentId', {
  352. "token": $.cookie("token"),
  353. pid: 78
  354. }, function (result) {
  355. result = $.parseJSON(result);
  356. var Count = result.data;
  357. $(Count).each(function (i, n) {
  358. $('<option value="' + n.F_ValueId + '">' + n.F_Value + '</option>').appendTo($(
  359. ".standard"));
  360. })
  361. });
  362. }
  363. $('.orderType').change(() => {
  364. if ($('.orderType').val() == 76) {
  365. $('.reasons').show()
  366. } else {
  367. $('.reasons').hide()
  368. }
  369. })
  370. </script>
  371. </body>
  372. </html>