LD 5 年 前
コミット
a1840d4b60

+ 5 - 13
app/Services/WaybillService.php

@@ -58,19 +58,11 @@ Class WaybillService
 
     public function store(Request $request){
         return DB::transaction(function ()use($request){
-            $waybill=new Waybill([
-                'type'=>$request->type,
-                'status'=>'未审核',
-                'waybill_number'=>Uuid::uuid1(),
-                'owner_id'=>$request->owner_id,
-                'wms_bill_number'=>$request->wms_bill_number,
-                'origination'=>$request->origination,
-                'destination'=>$request->destination,
-                'recipient'=>$request->recipient,
-                'recipient_mobile'=>$request->recipient_mobile,
-                'charge'=>$request->charge,
-                'ordering_remark'=>$request->ordering_remark
-            ]);
+            $waybill=new Waybill();
+            $inputs = $request->all();
+            $inputs['status']='未审核';
+            $inputs['waybill_number']=Uuid::uuid1();
+            $waybill->fill($inputs);
             if ($request->collect_fee)$waybill->collect_fee=$request->collect_fee;
             $waybill->save();
             $number_id=$waybill->id;

ファイルの差分が大きいため隠しています
+ 579 - 308
public/js/app.js


+ 32 - 6
resources/views/waybill/create.blade.php

@@ -108,20 +108,46 @@
                         </div>
                     </div>
                     {{--zengjun start--}}
-                    @can('运输管理-运费')
+{{--                    @can('运输管理-运费')--}}
+                        <div class="form-group row">
+                            <label for="charge" class="col-2 col-form-label text-right ">运输收费(元)</label>
+                            <div class="col-8">
+                                <input type="text" class="form-control @error('charge') is-invalid @enderror"
+                                       name="charge" autocomplete="off" value="{{ old('charge') }}" >
+                                @error('charge')
+                                <span class="invalid-feedback" role="alert">
+                                        <strong>{{ $message }}</strong>
+                                    </span>
+                                @enderror
+                            </div>
+                        </div>
+
+
                     <div class="form-group row">
-                        <label for="charge" class="col-2 col-form-label text-right ">收费(元)</label>
+                        <label for="other_charge" class="col-2 col-form-label text-right text-muted">其他收费(元)</label>
                         <div class="col-8">
-                            <input type="text" class="form-control @error('charge') is-invalid @enderror"
-                                   name="charge" autocomplete="off" value="{{ old('charge') }}" >
-                            @error('charge')
+                            <input type="text" class="form-control @error('other_charge') is-invalid @enderror"
+                                   name="other_charge" autocomplete="off" value="@if(old('other_charge')){{ old('other_charge') }}@endif"  >
+                            @error('other_charge')
                             <span class="invalid-feedback" role="alert">
                                         <strong>{{ $message }}</strong>
                                     </span>
                             @enderror
                         </div>
                     </div>
-                    @endcan
+                    <div class="form-group row">
+                        <label for="other_charge_remark" class="col-2 col-form-label text-right text-muted">其他收费备注</label>
+                        <div class="col-8">
+                            <input type="text" class="form-control @error('other_charge') is-invalid @enderror"
+                                   name="other_charge_remark" autocomplete="off" value="@if(old('other_charge_remark')){{ old('other_charge_remark') }}@endif"  >
+                            @error('other_charge_remark')
+                            <span class="invalid-feedback" role="alert">
+                                        <strong>{{ $message }}</strong>
+                                    </span>·
+                            @enderror
+                        </div>
+                    </div>
+{{--                    @endcan--}}
                     {{--zengjun end--}}
                     <div class="form-group row">
                         <label for="collect_fee" class="col-2 col-form-label text-right text-muted">到付金额(元)</label>

+ 1 - 1
resources/views/waybill/index.blade.php

@@ -196,7 +196,7 @@
                             <span v-if="waybill.carType">@{{ waybill.carType.name }}<i v-if="waybill.carType.length">(@{{waybill.carType.length}}米)</i></span></span></td>
                     <td class="td-cool"><span v-if="waybill.warehouse_weight">@{{waybill.warehouse_weight|filterZero}}  @{{waybill.warehouse_weight_unit}}</span></td>
                     <td class="td-cool"><span v-if="waybill.carrier_weight">@{{waybill.carrier_weight|filterZero}}  @{{waybill.carrier_weight_unit}}</span></td>
-                    <td class="td-cool" style="position: relative" @mouseenter="btnRefreshWeightZoomOut(waybill)" @mouseleave="btnRefreshWeightZoomIn(waybill)">
+                    <td class="td-cool text-center" style="position: relative" @mouseenter="btnRefreshWeightZoomOut(waybill)" @mouseleave="btnRefreshWeightZoomIn(waybill)">
                         <span v-if="waybill.warehouse_weight_other&&waybill.btn_refresh_weight=='zoomIn'"> @{{waybill.warehouse_weight_other}}  @{{waybill.warehouse_weight_unit_other}}</span>
                         <button type="button" class="btn btn-sm btn-outline-info" @click="refreshWaveHouseWeight(waybill.wms_bill_number)"
                                 :style="[

+ 1 - 1
resources/views/waybill/menu.blade.php

@@ -8,7 +8,7 @@
             </li> @endcan
             @can('运输管理-录入')
             <li class="nav-item">
-                <a class="nav-link" href="{{url('waybill/create?type=ZF')}}" :class="{active:isActive('create',2)}">录入</a>
+                <a class="nav-link" href="{{url('waybill/create?type=ZX')}}" :class="{active:isActive('create',2)}">录入</a>
             </li> @endcan
             @can('运输管理-发运')
             <li class="nav-item">

+ 27 - 1
resources/views/waybill/waybillEdit.blade.php

@@ -96,7 +96,7 @@
                         </div>
                     </div>
                     <div class="form-group row">
-                        <label for="charge" class="col-2 col-form-label text-right text-primary">收费(元) *</label>
+                        <label for="charge" class="col-2 col-form-label text-right text-primary">运输收费(元) *</label>
                         <div class="col-8">
                             <input type="text" class="form-control @error('charge') is-invalid @enderror"
                                    name="charge" autocomplete="off" value="@if(old('charge')){{ old('charge') }}@else{{$waybill->charge}}@endif"  >
@@ -107,6 +107,32 @@
                             @enderror
                         </div>
                     </div>
+
+                    <div class="form-group row">
+                        <label for="other_charge" class="col-2 col-form-label text-right text-muted">其他收费(元)</label>
+                        <div class="col-8">
+                            <input type="text" class="form-control @error('other_charge') is-invalid @enderror"
+                                   name="other_charge" autocomplete="off" value="@if(old('other_charge')){{ old('other_charge') }}@else{{$waybill->other_charge}}@endif"  >
+                            @error('other_charge')
+                            <span class="invalid-feedback" role="alert">
+                                        <strong>{{ $message }}</strong>
+                                    </span>
+                            @enderror
+                        </div>
+                    </div>
+                    <div class="form-group row">
+                        <label for="other_charge_remark" class="col-2 col-form-label text-right text-muted">其他收费备注</label>
+                        <div class="col-8">
+                            <input type="text" class="form-control @error('other_charge') is-invalid @enderror"
+                                   name="other_charge_remark" autocomplete="off" value="@if(old('other_charge_remark')){{ old('other_charge_remark') }}@else{{$waybill->other_charge_remark}}@endif"  >
+                            @error('other_charge_remark')
+                            <span class="invalid-feedback" role="alert">
+                                        <strong>{{ $message }}</strong>
+                                    </span>·
+                            @enderror
+                        </div>
+                    </div>
+
                     <div class="form-group row">
                         <label for="collect_fee" class="col-2 col-form-label text-right text-muted">到付金额(元)</label>
                         <div class="col-8">

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません