暫無描述

create.blade.php 7.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. @extends('admin/master')
  2. @section('content')
  3. <body>
  4. @if(count($errors) > 0)
  5. <div class="Huialert Huialert-info" id="error">
  6. @foreach($errors->all() as $error)
  7. <li>{{$error}}</li>
  8. @endforeach
  9. </div>
  10. @endif
  11. <div class="page-container">
  12. <form action="/admin/deposit/store" method="post" class="form form-horizontal">
  13. <input type="hidden" name="_token" value="{{ csrf_token() }}" />
  14. @if(!$phone)
  15. <div class="row cl">
  16. <label class="form-label col-xs-4 col-sm-2">
  17. 用户名:</label>
  18. <div class="formControls col-xs-6 col-sm-6">
  19. <input type="text" class="input-text" value="{{old('name')}}" placeholder="" name="name">
  20. </div>
  21. </div>
  22. <div class="row cl">
  23. <label class="form-label col-xs-4 col-sm-2">
  24. <font color='red'>* </font>手机号:</label>
  25. <div class="formControls col-xs-6 col-sm-6">
  26. <input type="text" class="input-text" value="{{old('phone')}}" placeholder="" name="phone">
  27. </div>
  28. </div>
  29. @else
  30. <div class="row cl">
  31. <label class="form-label col-xs-4 col-sm-2">
  32. <font color='red'>* </font>账号:</label>
  33. <div class="formControls col-xs-6 col-sm-6">
  34. {{$phonei}}
  35. <input type="hidden" class="input-text" value="{{$phone}}" placeholder="" name="phone">
  36. </div>
  37. </div>
  38. @endif
  39. <div class="row cl">
  40. <label class="form-label col-xs-4 col-sm-2">
  41. <font color='red'>* </font>选择套餐:</label>
  42. <div class="formControls col-xs-6 col-sm-6">
  43. <span class="select-box">
  44. <select size="1" name="package_id" id='package_id'>
  45. <option value="0" @if(old('package_id')=='0') selected @endif>- 请选择 -</option>
  46. @foreach($packages as $package)
  47. <option value="{{$package['id']}}" @if(old('package_id')=='{{$package["id"]}}') selected @endif >{{$package['note']}}</option>
  48. @endforeach
  49. </select>
  50. </span>
  51. </div>
  52. </div>
  53. <div class="row cl">
  54. <label class="form-label col-xs-4 col-sm-2">
  55. 自定义金额:</label>
  56. <div class="formControls col-xs-6 col-sm-6">
  57. <input type="text" class="input-text" value="{{old('pay_money')}}" placeholder="填写自定义金额套餐将不会生效" name="pay_money">
  58. </div>
  59. </div>
  60. <div class="row cl">
  61. <label class="form-label col-xs-4 col-sm-2">
  62. <font color='red'>* </font>充值时间:</label>
  63. <div class="formControls col-xs-6 col-sm-6">
  64. <input id="pay_time" type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss' })" autocomplete="off" class="input-text Wdate" style="width:30%;text-align:center;" name="pay_time" value="{{old('pay_time')}}"> <font color='red'> </font>
  65. </div>
  66. </div>
  67. <div class="row cl">
  68. <label class="form-label col-xs-4 col-sm-2">
  69. <font color='red'>* </font>支付方式:</label>
  70. <div class="formControls col-xs-6 col-sm-6">
  71. <input type="radio" name="payment_type" value="1" @if(old('payment_type')==='1') checked @else checked @endif>
  72. <label for="status-1" style="margin-right: 27px;">微信支付</label>
  73. <input type="radio" name="payment_type" value="3" @if(old('payment_type')==='3') checked @endif>
  74. <label for="status-0" style="margin-right: 27px;">个体户支付</label>
  75. </div>
  76. </div>
  77. @if($self_role !='销售' && $self_role != '分销销售')
  78. <div class="row cl">
  79. <label class="form-label col-xs-4 col-sm-2">
  80. 选择销售员(不选默认当前用户):</label>
  81. <div class="formControls col-xs-6 col-sm-6">
  82. <span class="select-box">
  83. <select id='admins' size="1" name="admin_id">
  84. <option value="0" @if(old('admin_id')=='') selected @endif>-- 选择销售 --</option>
  85. @foreach($adminlist as $v)
  86. <option value="{{$v['id']}}" @if(old('admin_id')==$v['id']) selected @endif>{{$v['realname']}}</option>
  87. @endforeach
  88. </select>
  89. &nbsp;&nbsp;
  90. </span>
  91. </div>
  92. </div>
  93. @endif
  94. <div class="row cl">
  95. <div class="col-9 col-offset-2">
  96. <button class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">&nbsp;&nbsp;提交&nbsp;&nbsp;</button>&nbsp;
  97. <button class="btn btn-default" type="reset" onclick="return_index();">&nbsp;&nbsp;返回&nbsp;&nbsp;</button>&nbsp;
  98. {{--<a href="javascript:void(0)" class="btn btn-default radius" onclick="redirect('{{url('/admin/admin/all')}}')">返回并查看结果</a>--}}
  99. </div>
  100. </div>
  101. </form>
  102. </div>
  103. <!--_footer 作为公共模版分离出去-->
  104. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  105. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  106. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  107. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  108. <!--/_footer 作为公共模版分离出去-->
  109. <!--请在下方写此页面业务相关的脚本-->
  110. <script type="text/javascript" src="/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  111. <script type="text/javascript">
  112. $(function(){
  113. setTimeout("$('#error').hide()",3000);
  114. var tdate = today_date();
  115. $('#pay_time').val(tdate);
  116. });
  117. /*返回*/
  118. function return_index(){
  119. var phone = '{{$phone}}'
  120. if(phone){
  121. location.href='/admin/deposit/index?phone='+phone;
  122. }
  123. else{
  124. location.href='/admin/deposit/customerList';
  125. }
  126. }
  127. function today_date(){
  128. var today=new Date();
  129. var h=today.getFullYear();
  130. var m=today.getMonth()+1;
  131. var d=today.getDate();
  132. var hh=today.getHours();
  133. var mm=today.getMinutes();
  134. var ss=today.getSeconds();
  135. m= m<10?"0"+m:m;
  136. d= d<10?"0"+d:d;
  137. hh = hh < 10 ? "0" + hh:hh;
  138. mm = mm < 10 ? "0" + mm:mm;
  139. ss = ss < 10 ? "0" + ss:ss;
  140. return h+"-"+m+"-"+d+" "+hh+":"+mm+":"+ss;
  141. }
  142. </script>
  143. </body>
  144. @endsection