You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
3.2 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. @extends('admin.layouts.app')
  2. @section('title', '优惠券修改')
  3. @section('content')
  4. <script language="javascript" type="text/javascript" src="http://<?php echo env('APP_DOMAIN'); ?>/js/My97DatePicker/WdatePicker.js"></script>
  5. <h5 class="sub-header"><a href="<?php echo route('admin_bonus'); ?>">优惠券列表</a> > 优惠券修改</h5>
  6. <form id="addarc" method="post" action="" role="form" enctype="multipart/form-data" class="table-responsive">{{ csrf_field() }}
  7. <table class="table table-striped table-bordered">
  8. <tbody>
  9. <tr>
  10. <td align="right" width="150px">名称:</td>
  11. <td><input name="name" type="text" id="name" value="<?php echo $post['name']; ?>" class="required" style="width:30%" placeholder="在此输入名称"><input style="display:none;" name="id" type="text" id="id" value="<?php echo $id; ?>"></td>
  12. </tr>
  13. <tr>
  14. <td align="right">金额:</td>
  15. <td><input name="money" type="text" id="money" value="<?php echo $post['money']; ?>" size="10"></td>
  16. </tr>
  17. <tr>
  18. <td align="right">满多少使用:</td>
  19. <td><input name="min_amount" type="text" id="min_amount" value="<?php echo $post['min_amount']; ?>" size="10"></td>
  20. </tr>
  21. <tr>
  22. <td align="right">数量:</td>
  23. <td><input name="num" type="text" id="num" value="<?php echo $post['num']; ?>" size="5"> (-1表示不限)</td>
  24. </tr>
  25. <tr>
  26. <td align="right">期限:</td>
  27. <td>
  28. 起:<input value="<?php echo $post['start_time']; ?>" size="18" onclick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" id="start_time" name="start_time" placeholder="开始时间"> -
  29. 止:<input value="<?php echo $post['end_time']; ?>" size="18" onclick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" id="end_time" name="end_time" placeholder="结束时间">
  30. </td>
  31. </tr>
  32. <tr>
  33. <td align="right">是否可用:</td>
  34. <td>
  35. <input type="radio" value='0' name="status" <?php if(isset($post['status']) && $post['status']==0){echo 'checked';} ?> />&nbsp;是&nbsp;&nbsp;
  36. <input type="radio" value='1' name="status" <?php if(isset($post['status']) && $post['status']==1){echo 'checked';} ?> />&nbsp;否
  37. </td>
  38. </tr>
  39. <tr>
  40. <td colspan="2"><button type="submit" class="btn btn-success" value="Submit">保存(Submit)</button>&nbsp;&nbsp;<button type="reset" class="btn btn-default" value="Reset">重置(Reset)</button></td>
  41. </tr>
  42. </tbody></table></form><!-- 表单结束 -->
  43. <script>
  44. $(function(){
  45. $(".required").blur(function(){
  46. var $parent = $(this).parent();
  47. $parent.find(".formtips").remove();
  48. if(this.value=="")
  49. {
  50. $parent.append(' <small class="formtips onError"><font color="red">不能为空!</font></small>');
  51. }
  52. else
  53. {
  54. $parent.append(' <small class="formtips onSuccess"><font color="green">OK</font></small>');
  55. }
  56. });
  57. //重置
  58. $('#addarc input[type="reset"]').click(function(){
  59. $(".formtips").remove();
  60. });
  61. $("#addarc").submit(function(){
  62. $(".required").trigger('blur');
  63. var numError = $('#addarc .onError').length;
  64. if(numError){return false;}
  65. });
  66. });
  67. </script>
  68. @endsection