Bez popisu

AuditDatil.html 8.6KB

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