@extends('layouts.app')
@section('title')创建承运商@endsection

@section('content')
    <div id="nav2">
        @component('maintenance.menu')@endcomponent
        @component('maintenance.carrier.menu')@endcomponent
    </div>
    <div class="container-fluid">
        <div class="card col-md-8 offset-md-2">
            <div class="card-body">
                <form method="POST" action="{{ url('maintenance/carrier') }}">
                    @csrf
                    <div class="form-group row">
                        <label for="name" class="col-2 col-form-label text-right">承运商名称</label>
                        <div class="col-8">
                            <input type="text" class="form-control @error('Carrier.name') is-invalid @enderror"
                                   name="Carrier[name]" autocomplete="off" value="{{ old('Carrier')['name'] }}" >
                            @error('Carrier.name')
                            <span class="invalid-feedback" role="alert">
                                <strong>{{ $errors->first('Carrier.name') }}</strong>
                            </span>
                            @enderror
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="mobile" class="col-2 col-form-label text-right">承运商电话</label>
                        <div class="col-8">
                            <input type="text" class="form-control @error('Carrier.mobile') is-invalid @enderror"
                                   name="Carrier[mobile]" autocomplete="off" value="{{ old('Carrier')['mobile'] }}" >
                            @error('Carrier.mobile')
                            <span class="invalid-feedback" role="alert">
                                <strong>{{ $errors->first('Carrier.mobile') }}</strong>
                            </span>
                            @enderror
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="delivery_fee" class="col-2 col-form-label text-right">送货费</label>
                        <div class="col-8">
                            <input type="text" class="form-control @error('Carrier.delivery_fee') is-invalid @enderror"
                                   name="Carrier[delivery_fee]" autocomplete="off" value="{{ old('Carrier')['delivery_fee'] }}" >
                            @error('Carrier.delivery_fee')
                            <span class="invalid-feedback" role="alert">
                                <strong>{{ $errors->first('Carrier.delivery_fee') }}</strong>
                            </span>
                            @enderror
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="remark" class="col-2 col-form-label text-right">备注</label>
                        <div class="col-8">
                            <textarea type="text" class="form-control "
                                      name="Carrier[remark]" autocomplete="off" >{{ old('Carrier')['remark'] }}</textarea>
                        </div>
                    </div>
                    <div class="form-group row">
                        <div class="col-8 offset-2">
                            <input type="submit" class="btn btn-success form-control">
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
@endsection
