Нет описания

AuditDatil.html 8.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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. </head>
  11. <body>
  12. <div class="Common">
  13. <table>
  14. <tr>
  15. <th class="Importent">是否同意:</th>
  16. <td>
  17. <select class="select_" id='isBulletin'>
  18. <option value="0">否</option>
  19. <option value="1">是</option>
  20. </select>
  21. </td>
  22. </tr>
  23. <tr>
  24. <th class="Importent">是否交办:</th>
  25. <td>
  26. <select class="select_" id='isjb'>
  27. <option value="0">否</option>
  28. <option value="1">是</option>
  29. </select>
  30. </td>
  31. <th></th>
  32. </tr>
  33. <tr>
  34. <th>主办单位:</th>
  35. <td colspan="1">
  36. <select id="maindeptid" name="select" class="selectpicker show-tick form-control" multiple
  37. data-live-search="true">
  38. </select>
  39. </td>
  40. </tr>
  41. <!-- <tr>
  42. <th>协办单位:</th>
  43. <td colspan="1">
  44. <select id="otherdeptids" name="select" class="selectpicker show-tick form-control" multiple
  45. data-live-search="true">
  46. </select>
  47. </td>
  48. </tr> -->
  49. <tr class="limittimeWrapper">
  50. <th>办理时限:</th>
  51. <td colspan="">
  52. <select class="limittime" id="limittime" style="width: 200px; height: 30px; line-height: 30px;">
  53. <!--<option value="0">选择</option>-->
  54. <option value="1">一天</option>
  55. <option value="3">三天</option>
  56. <option value="5">五天</option>
  57. <option value="7">七天</option>
  58. </select>
  59. </td>
  60. </tr>
  61. <tr class="limittimesWrapper">
  62. <th>紧急时限:</th>
  63. <td colspan="">
  64. <input type="text" id="limittimes">
  65. </td>
  66. </tr>
  67. <tr>
  68. <th class="Importent">交办意见:</th>
  69. <td colspan="7"><textarea data-adaptheight id="assignedopinion" name="" rows="4" cols=""></textarea>
  70. </td>
  71. </tr>
  72. <tr class="divShow">
  73. <th class="Importent">审核不通过原因:</th>
  74. <td colspan="7"><textarea data-adaptheight id="result" name="" rows="4" cols=""></textarea></td>
  75. </tr>
  76. </table>
  77. <div class="btn_box">
  78. <button class="btns BC">保存</button>
  79. </div>
  80. </div>
  81. <script src="../js/adjustHeight.js"></script>
  82. <script src="../css/laydate/laydate.js"></script>
  83. <script>
  84. var wid = helper.request.queryString("wid");
  85. $(document).ready(function () {
  86. if ($("#isBulletin").val() == "1") {
  87. $(".divShow").hide();
  88. } else {
  89. $(".divShow").show();
  90. }
  91. $('.BC').click(function () {
  92. if ($("#isBulletin").val() == "1") {
  93. JA();
  94. } else {
  95. if (!$("#result").val()) {
  96. layer.msg("原因不能为空");
  97. } else {
  98. JA();
  99. }
  100. }
  101. })
  102. $("#isBulletin").change(function () {
  103. if ($("#isBulletin").val() == "1") {
  104. $(".divShow").hide();
  105. } else {
  106. $(".divShow").show();
  107. }
  108. })
  109. getDetail();
  110. jbSelect($("#maindeptid"));
  111. getOtherdeptids($("#otherdeptids"))
  112. laydate.skin("blue");
  113. laydate({
  114. elem: "#limittimes",
  115. event: "focus",
  116. istime: true,
  117. format: 'YYYY-MM-DD hh:mm:ss'
  118. });
  119. });
  120. //回退
  121. function JA() {
  122. $.post(huayi.config.callcenter_url + 'WorkOrder/AuditWorkOrder', {
  123. workorderid: wid,
  124. state: $("#isBulletin").val(),
  125. reason: $("#result").val(), //回访内容
  126. isjb: $("isjb").val(), //是否交办
  127. assignid: "", // 交办id
  128. maindeptid: $("#maindeptid").val(), // 主办单位
  129. otherdeptids: $("#otherdeptids").val(), // 协办单位
  130. limittime: $("#limittime").val(), // 时限
  131. limittimes: $("#limittimes").val(), // 紧急时限
  132. assignedopinion: $("#assignedopinion").val(), // 交办意见
  133. token: $.cookie("token")
  134. }, function (result) {
  135. result = JSON.parse(result);
  136. if (result.state.toLowerCase() == "success") {
  137. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  138. console.log(index);
  139. parent.layer.close(index); //再执行关闭
  140. parent.$('#orderlist').bootstrapTable('refresh');
  141. parent.layer.msg("操作成功");
  142. }
  143. })
  144. }
  145. // 主办单位
  146. function jbSelect(obj) {
  147. obj.empty();
  148. $.getJSON(huayi.config.callcenter_url + "Department/GetDeptList", {
  149. "token": $.cookie("token"),
  150. "iscbdw": 1,
  151. }, function (data) {
  152. if (data.state.toLowerCase() == "success") {
  153. var content = data.data;
  154. $("<option value=''>请选择</option>").appendTo(obj);
  155. $(content).each(function (i, n) {
  156. $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(
  157. obj);
  158. })
  159. obj.selectpicker({
  160. noneSelectedText: '请选择' //默认显示内容
  161. });
  162. obj.selectpicker('refresh');
  163. }
  164. })
  165. }
  166. // 协办单位
  167. function getOtherdeptids(obj) {
  168. obj.empty();
  169. $.getJSON(huayi.config.callcenter_url + "Department/GetDeptList", {
  170. "token": $.cookie("token"),
  171. "iscbdw": 1,
  172. }, function (data) {
  173. if (data.state.toLowerCase() == "success") {
  174. var content = data.data;
  175. $("<option value=''>请选择</option>").appendTo(obj);
  176. $(content).each(function (i, n) {
  177. $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(
  178. obj);
  179. })
  180. obj.selectpicker({
  181. noneSelectedText: '请选择' //默认显示内容
  182. });
  183. obj.selectpicker('refresh');
  184. }
  185. })
  186. }
  187. // 获取详情
  188. function getDetail() {
  189. $.ajax({
  190. type: "get",
  191. url: huayi.config.callcenter_url + "WorkOrder/GetWorkOrder",
  192. dataType: 'json',
  193. async: false,
  194. data: {
  195. workorderid: wid,
  196. token: $.cookie("token")
  197. },
  198. success: function (result) {
  199. if (result.state.toLowerCase() == "success") {
  200. var level = Data[0].F_Level + "";
  201. if (level === "1") {
  202. $(".limittimesWrapper").hide()
  203. $(".limittimeWrapper").show()
  204. } else if (level === "2"){
  205. $(".limittimesWrapper").show()
  206. $(".limittimeWrapper").hide()
  207. }
  208. }
  209. }
  210. })
  211. }
  212. </script>
  213. </body>
  214. </html>