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.

53 lines
1.9 KiB

7 years ago
  1. @extends('admin.layouts.app')
  2. @section('title', '人工充值')
  3. @section('content')
  4. <h2 class="sub-header">人工充值</h2>
  5. <form id="addarc" method="post" action="" role="form" enctype="multipart/form-data" class="table-responsive">{{ csrf_field() }}
  6. <table class="table table-striped table-bordered">
  7. <tbody>
  8. <tr>
  9. <td colspan="2">当前充值用户:<?php if($user['user_name']){echo $user['user_name'];}else{echo $user['mobile'];} ?>,账户余额<font color="red"><?php echo $user['money']; ?></font>元</td>
  10. </tr>
  11. <tr>
  12. <td colspan="2">说明:正数为增加,负数为扣除</td>
  13. </tr>
  14. <tr>
  15. <td align="right" width="150px">充值金额:</td>
  16. <td>
  17. <input name="money" class="required" type="text" id="money" value="" /><input name="id" type="hidden" value="<?php echo $user['id']; ?>" />
  18. </td>
  19. </tr>
  20. <tr>
  21. <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>
  22. </tr>
  23. </tbody></table></form><!-- 表单结束 -->
  24. <script>
  25. $(function(){
  26. $(".required").blur(function(){
  27. var $parent = $(this).parent();
  28. $parent.find(".formtips").remove();
  29. if(this.value=="")
  30. {
  31. $parent.append(' <small class="formtips onError"><font color="red">不能为空!</font></small>');
  32. }
  33. else
  34. {
  35. $parent.append(' <small class="formtips onSuccess"><font color="green">OK</font></small>');
  36. }
  37. });
  38. //重置
  39. $('#addarc input[type="reset"]').click(function(){
  40. $(".formtips").remove();
  41. });
  42. $("#addarc").submit(function(){
  43. $(".required").trigger('blur');
  44. var numError = $('#addarc .onError').length;
  45. if(numError){return false;}
  46. });
  47. });
  48. </script>
  49. @endsection