Sin descripción

Define_audit.html 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  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>
  11. .input {
  12. background-color: #FFF;
  13. background-image: none;
  14. border: 1px solid #ccc;
  15. border-radius: 1px;
  16. color: inherit;
  17. padding: 6px 12px
  18. }
  19. .fjnr {
  20. padding: 0 !important;
  21. border: none !important;
  22. }
  23. .Common table th {
  24. width: 10%;
  25. }
  26. </style>
  27. </head>
  28. <body>
  29. <div class="Common">
  30. <!--审核信息-->
  31. <div class="complain DCL ">
  32. <div style="width: 100%;padding: 10px;">
  33. <table class="Table" border="" cellspacing="0" cellpadding="0">
  34. <theard>
  35. <tr>
  36. <td class="text-center" style="min-width:100px;">次数</td>
  37. <td class="text-center" style="min-width:100px;">申请时间</td>
  38. <td class="text-center" style="min-width:100px;">申请原因</td>
  39. <td class="text-center" style="min-width:100px;">状态</td>
  40. <td class="text-center" style="min-width:100px;">审核时间</td>
  41. <td class="text-center" style="min-width:80px;">审核意见</td>
  42. </tr>
  43. </theard>
  44. <tbody class="YTHHS">
  45. </tbody>
  46. </table>
  47. </div>
  48. </div>
  49. <table>
  50. <tr>
  51. <th class="Importent">审核结果:</th>
  52. <td id="isProResultRadio" style="font-size: 12px">
  53. <label style="margin-right: 10px">
  54. <input type="radio" value="1" name="isDisposeResult" style="vertical-align: -2px;" />同意
  55. </label>
  56. <label>
  57. <input type="radio" value="2" name="isDisposeResult" style="vertical-align: -2px;" />拒绝
  58. </label>
  59. </td>
  60. </tr>
  61. <tr class="refuse_reason" style="height: 100px;">
  62. <th>拒绝理由:</th>
  63. <td colspan="5">
  64. <textarea data-adaptheight id="prosituation" name="" rows="6" cols="" ></textarea>
  65. </td>
  66. </tr>
  67. </table>
  68. <div class="btn_box">
  69. <button class="btns submit">保存</button>
  70. </div>
  71. </div>
  72. <input type="hidden" name="" id="perid" value="" />
  73. <script src="../css/laydate/laydate.js"></script>
  74. <script src="../js/adjustHeight.js"></script>
  75. <script>
  76. var wid = helper.request.queryString("wid");
  77. $(document).ready(function () {
  78. audit_information();//获取审核信息
  79. $('.submit').click(function () {
  80. submit();
  81. })
  82. $(".refuse_reason").hide(); //拒绝理由
  83. /*
  84. * 审核结果
  85. * 同意 1
  86. * 拒绝2
  87. */
  88. $('#isProResultRadio').find('input[type="radio"]').on('change', function() {
  89. isProResultJudge($(this).val())
  90. });
  91. });
  92. //保存
  93. function submit() {
  94. if(!$('#isProResultRadio input[name="isDisposeResult"]:checked').val()){
  95. layer.msg('请选择审核结果');
  96. return false;
  97. }
  98. if($('#isProResultRadio input[name="isDisposeResult"]:checked').val()==2 && !$('#prosituation').val()){
  99. layer.msg('请填写拒绝理由');
  100. return false;
  101. }
  102. $.post(huayi.config.callcenter_url + 'WorkOrder/DefinitionWorkOrder', {
  103. workorderid: wid,
  104. state: $('#isProResultRadio input[name="isDisposeResult"]:checked').val(), //审核结果
  105. reason: $("#prosituation").val(), //拒绝理由
  106. perid:$('#perid').val(),//履职界定id
  107. token: $.cookie("token")
  108. }, function (result) {
  109. result = JSON.parse(result);
  110. if (result.state.toLowerCase() == "success") {
  111. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  112. parent.layer.close(index); //再执行关闭
  113. parent.$('#orderlist').bootstrapTable('refresh');
  114. parent.layer.msg("保存成功");
  115. }
  116. })
  117. }
  118. // 拒绝理由
  119. function isProResultJudge (isProResultdata) {
  120. if(isProResultdata === '1') {
  121. $(".refuse_reason").hide(); //拒绝理由
  122. } else if (isProResultdata === '2') {
  123. $(".refuse_reason").show(); //拒绝理由
  124. }
  125. }
  126. //获取审核信息
  127. function audit_information(){
  128. $.ajax({
  129. type:"get",
  130. url:huayi.config.callcenter_url + 'WorkOrder/GetAuditInfo',
  131. async:true,
  132. data:{
  133. workorderid:wid,
  134. type:3,
  135. "token": $.cookie("token")
  136. },
  137. success:function(result){
  138. //审核信息
  139. var Ths = '';
  140. $(".YTHHS").empty();
  141. $($.parseJSON(result).data).each(function(i, n) {
  142. var a = '未审核';
  143. var AuditTime;
  144. var AuditReason;
  145. if(n.F_IsAudit == '1') {
  146. a = '同意';
  147. }
  148. if(n.F_IsAudit == '2') {
  149. a = '拒绝';
  150. }
  151. if(n.F_AuditTime == null) {
  152. AuditTime="";
  153. }else{
  154. AuditTime=n.F_AuditTime
  155. }
  156. if(n.F_AuditReason == null) {
  157. AuditReason = '';
  158. }else{
  159. AuditReason=n.F_AuditReason
  160. }
  161. $('#perid').val(n.F_Id);//履职界定id
  162. Ths += '<tr>' +
  163. '<td class="text-center">' + (i + 1) + '</td>' +
  164. '<td class="text-center">' + n.F_CreateTime + '</td>' +
  165. '<td class="text-center">' + n.F_Result + '</td>' +
  166. '<td class="text-center">' + a + '</td>' +
  167. '<td class="text-center">' + AuditTime + '</td>' +
  168. '<td class="text-center">' + AuditReason + '</td>' +
  169. '</tr>';
  170. })
  171. $(Ths).appendTo($(".YTHHS"));
  172. }
  173. });
  174. }
  175. </script>
  176. </body>
  177. </html>