waybillEdit.blade.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. @extends('layouts.app')
  2. @section('content')
  3. <div id="nav2">
  4. @component('waybill.menu')
  5. <li class="nav-item">
  6. <a class="nav-link" href="{{URL::current()}}" :class="{active:isActive('waybillEdit',2)}">修改</a>
  7. </li>
  8. @endcomponent
  9. </div>
  10. <div class="container-fluid mt-3" id="update">
  11. <div class="card">
  12. <div class="card-body">
  13. <form method="POST" action='{{url("waybill/waybillUpdate/{$waybill->id}")}}'>
  14. @csrf
  15. <div class="form-group row">
  16. <label for="type" class="col-2 col-form-label text-right text-primary">运单类型 *</label>
  17. <div class="h5 mb-3 col-8">
  18. <button type="button" @click="type='专线'" class="btn" :class="type=='专线'?'btn-primary':'btn-outline-primary'">专线</button>
  19. <button type="button" @click="type='直发车'" class="btn ml-2" :class="type!='专线'?'btn-primary':'btn-outline-primary'">直发车</button>
  20. </div>
  21. </div>
  22. <input hidden type="text" name="type" :value="type">
  23. <div class="form-group row">
  24. <label for="province_id" class="col-2 col-form-label text-right text-primary">货主 *</label>
  25. <div class="col-8">
  26. <select name="owner_id" class="form-control" style="width: 30%;">
  27. @foreach($owners as $owner)
  28. @if($owner->id==$waybill->owner_id)
  29. <option value="{{$owner->id}}" selected>{{$owner->name}}</option>
  30. @else
  31. <option value="{{$owner->id}}">{{$owner->name}}</option>
  32. @endif
  33. @endforeach
  34. </select>
  35. </div>
  36. </div>
  37. <div class="form-group row">
  38. <label for="wms_bill_number" class="col-2 col-form-label text-right text-muted">WMS单号</label>
  39. <div class="col-8">
  40. <input type="text" class="form-control @error('wms_bill_number') is-invalid @enderror"
  41. name="wms_bill_number" autocomplete="off" value="@if(old('wms_bill_number')){{ old('wms_bill_number') }}@else{{$waybill->wms_bill_number}}@endif" >
  42. @error('wms_bill_number')
  43. <span class="invalid-feedback" role="alert">
  44. <strong>{{ $message }}</strong>
  45. </span>
  46. @enderror
  47. </div>
  48. </div>
  49. <div class="form-group row">
  50. <label for="origination" class="col-2 col-form-label text-right text-primary">始发地 *</label>
  51. <div class="col-8">
  52. <input type="text" class="form-control @error('origination') is-invalid @enderror"
  53. name="origination" autocomplete="off" value="@if(old('origination')){{ old('origination') }}@else{{$waybill->origination}}@endif" >
  54. @error('origination')
  55. <span class="invalid-feedback" role="alert">
  56. <strong>{{ $message }}</strong>
  57. </span>
  58. @enderror
  59. </div>
  60. </div>
  61. <div class="form-group row">
  62. <label for="destination" class="col-2 col-form-label text-right text-primary">目的地 *</label>
  63. <div class="col-8">
  64. <input type="text" class="form-control @error('destination') is-invalid @enderror"
  65. name="destination" autocomplete="off" value="@if(old('destination')){{ old('destination') }}@else{{$waybill->destination}}@endif" >
  66. @error('origination')
  67. <span class="invalid-feedback" role="alert">
  68. <strong>{{ $message }}</strong>
  69. </span>
  70. @enderror
  71. </div>
  72. </div>
  73. <div class="form-group row">
  74. <label for="recipient" class="col-2 col-form-label text-right text-primary">收件人 *</label>
  75. <div class="col-8">
  76. <input type="text" class="form-control @error('recipient') is-invalid @enderror"
  77. name="recipient" autocomplete="off" value="@if(old('recipient')){{ old('recipient') }}@else{{$waybill->recipient}}@endif" >
  78. @error('recipient')
  79. <span class="invalid-feedback" role="alert">
  80. <strong>{{ $message }}</strong>
  81. </span>
  82. @enderror
  83. </div>
  84. </div>
  85. <div class="form-group row">
  86. <label for="recipient_mobile" class="col-2 col-form-label text-right text-primary">收件人电话 *</label>
  87. <div class="col-8">
  88. <input type="text" class="form-control @error('recipient_mobile') is-invalid @enderror"
  89. name="recipient_mobile" autocomplete="off" value="@if(old('recipient_mobile')){{ old('recipient_mobile') }}@else{{$waybill->recipient_mobile}}@endif" >
  90. @error('recipient_mobile')
  91. <span class="invalid-feedback" role="alert">
  92. <strong>{{ $message }}</strong>
  93. </span>
  94. @enderror
  95. </div>
  96. </div>
  97. <div class="form-group row">
  98. <label for="charge" class="col-2 col-form-label text-right text-primary">运输收费(元) *</label>
  99. <div class="col-8">
  100. <input type="text" class="form-control @error('charge') is-invalid @enderror"
  101. name="charge" autocomplete="off" value="@if(old('charge')){{ old('charge') }}@else{{$waybill->charge}}@endif" >
  102. @error('charge')
  103. <span class="invalid-feedback" role="alert">
  104. <strong>{{ $message }}</strong>
  105. </span>
  106. @enderror
  107. </div>
  108. </div>
  109. <div class="form-group row">
  110. <label for="other_charge" class="col-2 col-form-label text-right text-muted">其他收费(元)</label>
  111. <div class="col-8">
  112. <input type="text" class="form-control @error('other_charge') is-invalid @enderror"
  113. name="other_charge" autocomplete="off" value="@if(old('other_charge')){{ old('other_charge') }}@else{{$waybill->other_charge}}@endif" >
  114. @error('other_charge')
  115. <span class="invalid-feedback" role="alert">
  116. <strong>{{ $message }}</strong>
  117. </span>
  118. @enderror
  119. </div>
  120. </div>
  121. <div class="form-group row">
  122. <label for="other_charge_remark" class="col-2 col-form-label text-right text-muted">其他收费备注</label>
  123. <div class="col-8">
  124. <input type="text" class="form-control @error('other_charge') is-invalid @enderror"
  125. name="other_charge_remark" autocomplete="off" value="@if(old('other_charge_remark')){{ old('other_charge_remark') }}@else{{$waybill->other_charge_remark}}@endif" >
  126. @error('other_charge_remark')
  127. <span class="invalid-feedback" role="alert">
  128. <strong>{{ $message }}</strong>
  129. </span>·
  130. @enderror
  131. </div>
  132. </div>
  133. <div class="form-group row">
  134. <label for="collect_fee" class="col-2 col-form-label text-right text-muted">到付金额(元)</label>
  135. <div class="col-8">
  136. <input type="text" class="form-control @error('collect_fee') is-invalid @enderror"
  137. name="collect_fee" autocomplete="off" value="@if(old('collect_fee')){{ old('collect_fee') }}@else{{$waybill->collect_fee}}@endif" >
  138. @error('collect_fee')
  139. <span class="invalid-feedback" role="alert">
  140. <strong>{{ $message }}</strong>
  141. </span>
  142. @enderror
  143. </div>
  144. </div>
  145. <div class="form-group row">
  146. <label for="ordering_remark" class="col-2 col-form-label text-right text-muted">下单备注</label>
  147. <div class="col-8">
  148. <textarea class="form-control @error('ordering_remark') is-invalid @enderror"
  149. name="ordering_remark" autocomplete="off" >@if(old('ordering_remark')){{ old('ordering_remark') }}@else{{$waybill->ordering_remark}}@endif</textarea>
  150. @error('ordering_remark')
  151. <span class="invalid-feedback" role="alert">
  152. <strong>{{ $message }}</strong>
  153. </span>
  154. @enderror
  155. </div>
  156. </div>
  157. <div class="form-group row">
  158. <div class="col-8 offset-2">
  159. <input type="submit" class="btn btn-outline-dark form-control">
  160. </div>
  161. </div>
  162. </form>
  163. </div>
  164. </div>
  165. </div>
  166. @endsection
  167. @section('lastScript')
  168. <script>
  169. new Vue({
  170. el:"#update",
  171. data:{
  172. type:"{{$waybill->type}}",
  173. },
  174. });
  175. </script>
  176. @endsection