Nenhuma Descrição

skucreate.blade.php 4.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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/goods/skustore" method="post" class="form form-horizontal">
  13. <input type="hidden" name="_token" value="{{ csrf_token() }}" />
  14. <input type="hidden" name="goods_id" value="{{$goods_id}}" />
  15. <div class="row cl">
  16. <label class="form-label col-xs-4 col-sm-2">
  17. <font color='red'>* </font>商品规格:</label>
  18. <div class="formControls col-xs-6 col-sm-6">
  19. <input type="text" class="input-text" value="{{old('propsName')}}" placeholder="" name="propsName">
  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('referenceCost')}}" onblur="getOut()" placeholder="" name="referenceCost">
  27. </div>
  28. </div>
  29. <div class="row cl">
  30. <label class="form-label col-xs-4 col-sm-2">
  31. <font color='red'>* </font>建议零售价:</label>
  32. <div class="formControls col-xs-6 col-sm-6">
  33. <input type="text" class="input-text" value="{{old('price')}}" placeholder="" name="price">
  34. </div>
  35. </div>
  36. <div class="row cl">
  37. <label class="form-label col-xs-4 col-sm-2">
  38. <font color='red'>* </font>分销商价格:</label>
  39. <div class="formControls col-xs-6 col-sm-6">
  40. <input type="text" class="input-text" value="{{old('outPrice')}}" placeholder="" name="outPrice">
  41. </div>
  42. </div>
  43. <div class="row cl">
  44. <label class="form-label col-xs-4 col-sm-2">
  45. <font color='red'>* </font>是否称重:</label>
  46. <div class="formControls col-xs-6 col-sm-6">
  47. <input type="radio" name="is_weigh" value="0" @if(old('is_weigh')==='0') checked @else checked @endif>
  48. <label for="status-1" style="margin-right: 27px;">否</label>
  49. <input type="radio" name="is_weigh" value="1" @if(old('is_weigh')==='1') checked @endif>
  50. <label for="status-0">是</label>
  51. </div>
  52. </div>
  53. <div class="row cl">
  54. <div class="col-9 col-offset-2">
  55. <button class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">&nbsp;&nbsp;提交&nbsp;&nbsp;</button>&nbsp;
  56. <button class="btn btn-default" type="reset" onclick="return_index();">&nbsp;&nbsp;返回&nbsp;&nbsp;</button>&nbsp;
  57. {{--<a href="javascript:void(0)" class="btn btn-default radius" onclick="redirect('{{url('/admin/admin/all')}}')">返回并查看结果</a>--}}
  58. </div>
  59. </div>
  60. </form>
  61. </div>
  62. <!--_footer 作为公共模版分离出去-->
  63. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  64. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  65. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  66. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  67. <!--/_footer 作为公共模版分离出去-->
  68. <!--请在下方写此页面业务相关的脚本-->
  69. <script type="text/javascript">
  70. $(function(){
  71. setTimeout("$('#error').hide()",3000);
  72. });
  73. /*返回*/
  74. function return_index(){
  75. location.href='/admin/goods/skulist?goods_id={{$goods_id}}';
  76. }
  77. function getOut(){
  78. var cost = $("input[name=referenceCost]").val();
  79. cost = parseFloat(cost);
  80. if(cost>0){
  81. outPrice = Math.ceil(cost * 1.2);
  82. $("input[name=outPrice]").val(outPrice);
  83. }
  84. }
  85. </script>
  86. </body>
  87. @endsection