夏邑12345_前端

Timesq.html 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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 > <input type="text" id="startTime" class="laydate-icon" style="height: 32px;"></td>
  17. </tr>
  18. <tr>
  19. <th class="Importent">申请延时原因:</th>
  20. <td colspan="2">
  21. <textarea data-adaptheight id="reason" name="" rows="" cols=""></textarea>
  22. </td>
  23. </tr>
  24. </table>
  25. <div class="btn_box">
  26. <button class="btns">保存</button>
  27. </div>
  28. </div>
  29. <script src="../css/laydate/laydate.js"></script>
  30. <script src="../js/adjustHeight.js"></script>
  31. <script >
  32. laydate.skin('blue');
  33. laydate({
  34. elem: '#startTime',
  35. event: 'focus',
  36. min:minDate()
  37. });
  38. function minDate(){
  39. var now = new Date();
  40. return now.getFullYear()+"-" + (now.getMonth()+1) + "-" + now.getDate();
  41. }
  42. var wid = helper.request.queryString("wid");
  43. $(document).ready(function() {
  44. $(".btns").click(function(){
  45. if($("#reason").val()==''){
  46. layer.msg("申请原因不为空");
  47. }else {
  48. JA();
  49. }
  50. })
  51. })
  52. //批示
  53. function JA() {
  54. $.post(huayi.config.callcenter_url + 'WorkOrder/DelayWorkOrder', {
  55. workorderid: wid,
  56. reason:$("#reason").val(),
  57. newlimittime:$("#startTime").val(),
  58. "token": $.cookie("token")
  59. }, function(result) {
  60. result = JSON.parse(result);
  61. if(result.state.toLowerCase() == "success") {
  62. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  63. parent.layer.close(index); //再执行关闭
  64. parent.load();
  65. parent.layer.msg("申请延时成功");
  66. }
  67. })
  68. }
  69. </script>
  70. </body>
  71. </html>