Няма описание

lawsuits.html 11KB

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