商丘12345 前端

lawsuits.html 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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. .bulletUnit{
  12. display: none;
  13. }
  14. .bulletUnit ul{
  15. list-style: none;
  16. margin: 0;
  17. padding: 0;
  18. }
  19. .bulletUnit ul li{
  20. float: left;
  21. margin-right: 20px;
  22. text-align: center;
  23. padding: 6px 0;
  24. }
  25. .bulletUnit li input{
  26. display: none;
  27. }
  28. .bulletUnit li label{
  29. margin: 0;
  30. font-weight: normal;
  31. display: block;
  32. width: 100%;
  33. border: 1px solid #ccc;
  34. padding: 2px 10px;
  35. cursor: pointer;
  36. }
  37. .bulletUnit li label:hover{
  38. /*border-color: #fe6604;*/
  39. }
  40. .bulletUnit .checkedDept{
  41. border-color: #fe6604;
  42. }
  43. select:disabled{
  44. background-color: #eee;
  45. }
  46. .reasons{
  47. display: none;
  48. height: 160px;
  49. }
  50. #reasons{
  51. height: 160px;
  52. }
  53. </style>
  54. </head>
  55. <body>
  56. <div class="Common">
  57. <table>
  58. <tr>
  59. <th class="Importent">回访结果:</th>
  60. <td>
  61. <input checked="true" type="radio" value="1" name="huifang" />满意
  62. <input type="radio" value="0" name="huifang"/>不满意
  63. </td>
  64. </tr>
  65. <tr>
  66. <th class="Importent">是否通报:</th>
  67. <td>
  68. <select class="select_" id='isBulletin'>
  69. <option value="0">否</option>
  70. <option value="1">是</option>
  71. </select>
  72. </td>
  73. </tr>
  74. <tr id="bulletinUnit" class="bulletUnit">
  75. <th class="Importent">通报单位:</th>
  76. <td>
  77. <ul>
  78. </ul>
  79. </td>
  80. </tr>
  81. <tr class="bulletUnit">
  82. <th class="Importent">通报原因:</th>
  83. <td>
  84. <select name="" class="form-control orderType">
  85. <option value="0">请选择通报原因</option>
  86. </select>
  87. </td>
  88. <!--<td><textarea name="" rows="4" cols="" id="bulletinReason"></textarea></td>-->
  89. </tr>
  90. <tr class="reasons">
  91. <th class="Importent">其他原因:</th>
  92. <td colspan="2"><textarea data-adaptheight id="reasons" name="" rows="6" cols=""></textarea></td>
  93. </tr>
  94. <tr>
  95. <th class="Importent">备注:</th>
  96. <td colspan="2"><textarea data-adaptheight id="finalopinion" name="" rows="6" cols=""></textarea></td>
  97. </tr>
  98. </table>
  99. <div class="btn_box">
  100. <button class="btns">保存</button>
  101. </div>
  102. </div>
  103. <script src="../js/adjustHeight.js"></script>
  104. <script>
  105. var wid = helper.request.queryString("wid");
  106. var bulletinUnits = '';//通报单位
  107. $(document).ready(function() {
  108. //通报原因
  109. getOrderType();
  110. //获取单位
  111. getUnit();
  112. //是否通报
  113. $('#isBulletin').change(function(){
  114. if($('#isBulletin').val() == '0'){
  115. //默认不通报,通报单位通报原因不显示
  116. $('.bulletUnit').hide();
  117. }else if($('#isBulletin').val()== '1'){
  118. //选择是 ,显示通报单位通报原因;
  119. $('.bulletUnit').show();
  120. }
  121. });
  122. $(".btns").click(function(){
  123. if($('#isBulletin').val() == 0){
  124. JA(bulletinUnits);
  125. }else if($('#isBulletin').val() == 1){
  126. // if($("input[name='checkbox']:checkbox:checked").length <= 0){
  127. // layer.msg("您没有选择通报单位。");
  128. // }else
  129. if(!$(".orderType").val() || $('.orderType').val()==0){
  130. layer.msg("通报原因没有填写。");
  131. return
  132. }else if ($(".orderType").val()==76&& !$('#reasons').val()){
  133. layer.msg('其他通报原因没有填写');
  134. return
  135. }else {
  136. $("input[name='checkbox']:checkbox:checked").each(function(){
  137. bulletinUnits += $(this).val() + ',';
  138. });
  139. bulletinUnits = bulletinUnits.substring(0,bulletinUnits.length-1);
  140. JA(bulletinUnits);
  141. }
  142. }
  143. });
  144. })
  145. function JA(bUnits) {
  146. $.post(huayi.config.callcenter_url + 'WorkOrder/FinishWorkOrder', {
  147. workorderid: wid,
  148. issatisfie:$('input[name="huifang"]:checked ').val(),
  149. finalopinion: $("#finalopinion").val(),
  150. isnotice: $('#isBulletin').val(),//0不通告1通告
  151. deptids: bUnits,//通报单位
  152. noticereson: $('#bulletinReason').val(),//通报原因
  153. noticeid:$('.orderType').val(),//通报id
  154. content:$('#reasons').val(),//其他通报原因
  155. "token": $.cookie("token")
  156. }, function(result) {
  157. result = JSON.parse(result);
  158. if(result.state.toLowerCase() == "success") {
  159. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  160. parent.layer.close(index); //再执行关闭
  161. parent.$('#orderlist').bootstrapTable('refresh');
  162. parent.layer.msg("结案成功");
  163. }
  164. })
  165. }
  166. //获取单位
  167. function getUnit() {
  168. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetAllAssignDept', {
  169. workorderid: wid,
  170. token: $.cookie("token")
  171. }, function(result) {
  172. if(result.state.toLowerCase() == "success") {
  173. if(result.data.length > 0) {
  174. $('#isBulletin').removeAttr("disabled");
  175. for(var i = 0; i < result.data.length; i++){
  176. $('#bulletinUnit ul').append('<li><input type="checkbox" name="checkbox" id="unit'+i+'" value=""/>'+
  177. '<label for="unit'+i+'">'+ result.data[i].F_DeptName +'</label></li>');
  178. }
  179. if(('#bulletinUnit input').length>0){
  180. $('#bulletinUnit input').each(function(index){
  181. if($(this).is('[type=checkbox]')){
  182. var cinput = $(this);
  183. var label = $('label[for='+cinput.attr('id')+']');
  184. cinput.bind('updateState', function(){
  185. if(cinput.is(':checked')){
  186. label.addClass('checkedDept');
  187. cinput.val(result.data[index].F_DeptId);
  188. }else{
  189. label.removeClass('checkedDept');
  190. cinput.val('');
  191. }
  192. })
  193. .trigger('updateState')
  194. .click(function(){
  195. $('input[name='+ $(this).attr('name') +']').trigger('updateState');
  196. });
  197. }
  198. });
  199. }
  200. }else{
  201. $('#isBulletin').attr("disabled","disabled");
  202. }
  203. }
  204. })
  205. }
  206. function getOrderType() {
  207. $.get(huayi.config.callcenter_url + 'Dictionary/GetDicValueListByParentId', {
  208. "token": $.cookie("token"),
  209. pid: 62
  210. }, function(result) {
  211. result = $.parseJSON(result);
  212. var Count = result.data;
  213. $(Count).each(function(i, n) {
  214. $('<option value="' + n.F_ValueId + '">' + n.F_Value + '</option>').appendTo($(".orderType"));
  215. })
  216. });
  217. }
  218. $('.orderType').change(()=>{
  219. if($('.orderType').val()==76){
  220. $('.reasons').show()
  221. }else{
  222. $('.reasons').hide()
  223. }
  224. })
  225. </script>
  226. </body>
  227. </html>