Zhouzhendong 6 سال پیش
والد
کامیت
c0ef9e85d3

+ 1 - 1
app/WaybillPriceModel.php

@@ -12,7 +12,7 @@ class WaybillPriceModel extends Model
     ];
 
     protected $appends=[
-        'logistic_name',
+        'carrier_name',
         'province_name',
         'city_name',
         'unit_name',

+ 2 - 1
resources/views/maintenance/waybillPriceModel/index.blade.php

@@ -56,6 +56,7 @@
                         <th>起步费(元)</th>
                         <th>最低计数</th>
                         <th>录入时间</th>
+                        <th>操作</th>
                     </tr>
                     <tr v-for="waybillPriceModel in waybillPriceModels">
                         <td class="text-muted">@{{waybillPriceModel.id}}</td>
@@ -90,7 +91,7 @@
             data:{
                 waybillPriceModels:[
                     @foreach( $waybillPriceModels as $waybillPriceModel )
-                        {id:'{{$waybillPriceModel->id}}',carrier:'{{$waybillPriceModel->logistic_name}}',
+                        {id:'{{$waybillPriceModel->id}}',carrier:'{{$waybillPriceModel->carrier_name}}',
                         province:'{{$waybillPriceModel->province_name}}',city:'{{$waybillPriceModel->city_name}}',
                         unit:'{{$waybillPriceModel->unit_name}}',range_min:'{{$waybillPriceModel->range_min}}',range_max:'{{$waybillPriceModel->range_max}}',
                         unit_price:'{{$waybillPriceModel->unit_price}}',base_fee:'{{$waybillPriceModel->base_fee}}',initial_weight:'{{$waybillPriceModel->initial_weight}}',

+ 2 - 3
resources/views/process/index.blade.php

@@ -111,7 +111,7 @@
                                 <th><button class="btn btn-sm btn-outline-primary" @click="addTutorial()">新增教程</button></th>
                             </tr>
                             <tr v-for="tutorial in processTutorial.tutorials">
-                                <td><u @click="showTutorial(tutorial.id)" style="cursor:pointer">@{{tutorial.name}}</u></td>
+                                <td><div style="width: 200px"><u @click="showTutorial(tutorial.id)" style="cursor:pointer;overflow: hidden;" class="text-primary">@{{tutorial.name}}</u></div></td>
                                 @can("二次加工管理-教程管理")<td><button @click="selectedTutorial(processTutorial.id,tutorial.id)" class="btn btn-sm btn-success pull-right">选择</button></td>@endcan
                             </tr>
                         </table>
@@ -288,8 +288,7 @@
                         <div class="" v-if="processOne.tutorials" {{--style="width: 200px;overflow:auto;"--}}>
                             <div v-if=" processOne.tutorials.length>0">
                             <u v-if="!processOne.detailFolding" @click="showTutorial(processOne.tutorials[0].id)" class="text-info" style="cursor:pointer;">@{{processOne.tutorials[0].name}}</u>
-                                <button href="javascript:;" class="btn btn-sm btn-outline-primary" @click="processOne.detailFolding=true;processOne.openProcessHour=false;closeProcessHour(processOne.id)"
-                                        v-if="!processOne.detailFolding"><a v-if="processOne.tutorials.length>1">@{{processOne.tutorials.length}}条,展开</a><a v-else>编辑</a></button>
+                                <button href="javascript:;" class="btn btn-sm btn-outline-primary" @click="processOne.detailFolding=true;processOne.openProcessHour=false;closeProcessHour(processOne.id)" v-if="!processOne.detailFolding"><a v-if="processOne.tutorials.length>1">@{{processOne.tutorials.length}}条,展开</a><a v-else>编辑</a></button>
                             <div v-else><button class="btn btn-sm btn-outline-dark pull-left" href="javascript:;" @click="processOne.detailFolding=false" >收起编辑</button>
                             <button @click="addTutorials(processOne.id,processOne.owner_id)" class="btn btn-sm btn-outline-info pull-left">新增与教程关联</button></div>
                             <table class="table table-sm" v-if="processOne.detailFolding">

+ 0 - 166
resources/views/waybill/billingModel/create.blade.php

@@ -1,166 +0,0 @@
-@extends('layouts.app')
-
-@section('content')
-    <div id="nav2">
-        @component('waybill.billingModel.menu')@endcomponent
-    </div>
-    <div class="container-fluid mt-3" id="list">
-        <div class="card col-md-8 offset-md-2">
-            <div class="card-body">
-                <form method="POST" action="{{ url('billingModel') }}">
-                    @csrf
-                    <div class="form-group row">
-                        <label for="carrier_id" class="col-2 col-form-label text-right">承运商</label>
-                        <div class="col-8">
-                            <select name="BillingModel[carrier_id]" style="width: 30%;height: 30px" v-model="inputting.BillingModel.carrier_id">
-                                    <option v-for="carrier in carriers" :value="carrier.id">@{{carrier.name}}</option>
-                            </select>
-                            <div class="col-sm-5">
-                                <p class="form-control-static text-danger small font-weight-bold">{{ $errors->first('BillingModel.carrier_id') }}</p>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label for="province_id"  class="col-2 col-form-label text-right">选择省份</label>
-                        <div class="col-8" >
-                            <select name="BillingModel[province_id]" style="width: 30%;height: 30px" v-model="inputting.BillingModel.province_id" @change="changeProvince($event)">
-                                <option v-for="province in provinces" :value="province.id">@{{province.name}}</option>
-                            </select>
-                            <div class="col-sm-5">
-                                <p class="form-control-static text-danger small font-weight-bold">{{ $errors->first('BillingModel.province_id') }}</p>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label for="city_id"  class="col-2 col-form-label text-right">选择城市</label>
-                        <div class="col-8" >
-                            <select name="BillingModel[city_id]" style="width: 30%;height: 30px" v-model="inputting.BillingModel.city_id">
-                                <option v-for="city in cities" :value="city.id">@{{city.name}}</option>
-                            </select>
-
-                            <div class="col-sm-5">
-                                <p class="form-control-static text-danger small font-weight-bold">{{ $errors->first('BillingModel.city_id') }}</p>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label for="unit_id"  class="col-2 col-form-label text-right">货物单位</label>
-                        <div class="col-8" >
-                            <select name="BillingModel[unit_id]" style="width: 30%;height: 30px" v-model="inputting.BillingModel.unit_id">
-                                <option v-for="unit in units" :value="unit.id">@{{unit.name}}</option>
-                            </select>
-                            <div class="col-sm-5">
-                                <p class="form-control-static text-danger small font-weight-bold">{{ $errors->first('BillingModel.unit_id') }}</p>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label for="range_min" class="col-2 col-form-label text-right">价格区间</label>
-                        <div class="col-8 form-inline">
-                            <input  type="text" style="width: 20%" class="form-control @error('BillingModel.range_min') is-invalid @enderror"
-                                   name="BillingModel[range_min]" autocomplete="off" value="{{ old('BillingModel')['range_min'] }}" >----
-                            <input type="text" style="width: 20%" class="form-control @error('BillingModel.range_max') is-invalid @enderror"
-                                   name="BillingModel[range_max]" autocomplete="off" value="{{ old('BillingModel')['range_max'] }}" >
-                            @error('BillingModel.range_min')
-                            <span class="invalid-feedback" role="alert">
-                                        <strong>{{ $message }}</strong>
-                            </span>
-                            @enderror
-                            @error('BillingModel.range_max')
-                            <span class="invalid-feedback" role="alert">
-                                        <strong>{{ $message }}</strong>
-                                    </span>
-                            @enderror
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label for="unit_price" class="col-2 col-form-label text-right">单价</label>
-                        <div class="col-8">
-                            <input type="text" class="form-control @error('BillingModel.unit_price') is-invalid @enderror"
-                                   name="BillingModel[unit_price]" autocomplete="off" value="{{ old('BillingModel')['unit_price'] }}" >
-                            @error('BillingModel.unit_price')
-                            <span class="invalid-feedback" role="alert">
-                                        <strong>{{ $message }}</strong>
-                                    </span>
-                            @enderror
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label for="initial_weight" class="col-2 col-form-label text-right">始重</label>
-                        <div class="col-8">
-                            <input type="text" class="form-control @error('BillingModel.initial_weight') is-invalid @enderror"
-                                   name="BillingModel[initial_weight]" autocomplete="off" value="{{ old('BillingModel')['initial_weight'] }}" >
-                            @error('BillingModel.initial_weight')
-                            <span class="invalid-feedback" role="alert">
-                                        <strong>{{ $message }}</strong>
-                                    </span>
-                            @enderror
-                        </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
-
-@section('lastScript')
-    <script>
-        let insertVue=new Vue({
-            el:'#list',
-            data:{
-                inputting:{
-                    BillingModel:{
-                        @if(isset(old('BillingModel')['province_id']))
-                        province_id:'{{old('BillingModel')['province_id']}}',
-                        @endif
-                        @if(isset(old('BillingModel')['city_id']))
-                        city_id:'{{old('BillingModel')['city_id']}}',
-                        @endif
-                        @if(isset(old('BillingModel')['carrier_id']))
-                        carrier_id:'{{old('BillingModel')['carrier_id']}}',
-                        @endif
-                        @if(isset(old('BillingModel')['unit_id']))
-                        unit_id:'{{old('BillingModel')['unit_id']}}',
-                        @endif
-                    }
-                },
-                provinces:[
-                    @foreach($provinces as $province)
-                        {id:'{{$province->id}}',name:'{{$province->name}}',cities:{!! $province->cities !!} },
-                    @endforeach
-                ],
-                cities:[
-                ],
-                carriers:[
-                    @foreach($carriers as $carrier)
-                        {id:'{{$carrier->id}}',name:'{{$carrier->name}}'},
-                    @endforeach
-                ],
-                units:[
-                    @foreach($units as $unit)
-                    {id:'{{$unit->id}}',name:'{{$unit->name}}'},
-                    @endforeach
-                ],
-            },
-           methods:{
-               changeProvince(){
-                   let _this=this;
-                   let province_id=this.inputting.BillingModel.province_id;
-                   this.provinces.forEach(function (province) {
-                       if(province.id+''===province_id+''){
-                           _this.cities=province.cities;
-                           return
-                       }
-                       return null
-                   })
-               }
-           },
-        });
-
-    </script>
-@endsection

+ 0 - 176
resources/views/waybill/billingModel/edit.blade.php

@@ -1,176 +0,0 @@
-@extends('layouts.app')
-
-@section('content')
-    <div id="nav2">
-        @component('waybill.billingModel.menu')
-                <li class="nav-item">
-                    <a class="nav-link" href="{{URL::current()}}" :class="{active:isActive('edit',4)}">修改</a>
-                </li>
-        @endcomponent
-    </div>
-    <div class="container-fluid mt-3" id="list">
-        <div class="card">
-            <div class="card-body">
-                <form method="POST" action='{{url("billingModel/{$billingModel->id}")}}'>
-                    @csrf
-                    @method('PUT')
-                    <div class="form-group row">
-                        <label for="carrier_id" class="col-2 col-form-label text-right">承运商</label>
-                        <div class="col-8">
-                            <select name="BillingModel[carrier_id]" v-model="inputting.BillingModel.carrier_id" style="width: 30%;height: 30px">
-                                <option v-for="carrier in carriers" :value="carrier.id">@{{carrier.name}}</option>
-                            </select>
-
-                            <div class="col-sm-5">
-                                <p class="form-control-static text-danger small font-weight-bold">{{ $errors->first('BillingModel.carrier_id') }}</p>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label for="province_id"  class="col-2 col-form-label text-right">选择省份</label>
-                        <div class="col-8" >
-                            <select name="BillingModel[province_id]" v-model="inputting.BillingModel.province_id" @change="changeProvince($event)" style="width: 30%;height: 30px">
-                                <option v-for="province in provinces" :value="province.id">@{{province.name}}</option>
-                            </select>
-
-                            <div class="col-sm-5">
-                                <p class="form-control-static text-danger small font-weight-bold">{{ $errors->first('BillingModel.province_id') }}</p>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label for="city_id"  class="col-2 col-form-label text-right">选择城市</label>
-                        <div class="col-8" >
-                            <select name="BillingModel[city_id]" v-model="inputting.BillingModel.city_id" style="width: 30%;height: 30px">
-                                <option v-for="city in cities" :value="city.id">@{{city.name}}</option>
-                            </select>
-
-                            <div class="col-sm-5">
-                                <p class="form-control-static text-danger small font-weight-bold">{{ $errors->first('BillingModel.city_id') }}</p>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label for="unit_id"  class="col-2 col-form-label text-right">货物单位</label>
-                        <div class="col-8" >
-                            <select name="BillingModel[unit_id]" style="width: 30%;height: 30px">
-                                <option v-for="unit in units" :value="unit.id" v-model="inputting.BillingModel.unit_id">@{{unit.name}}</option>
-                            </select>
-
-                            <div class="col-sm-5">
-                                <p class="form-control-static text-danger small font-weight-bold">{{ $errors->first('BillingModel.unit_id') }}</p>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label for="range_min" class="col-2 col-form-label text-right">价格区间</label>
-                        <div class="col-8 form-inline">
-                            <input type="text" style="width: 20%" class="form-control @error('BillingModel.range_min') is-invalid @enderror"
-                                   name="BillingModel[range_min]" autocomplete="off" value="{{old('BillingModel')['range_min']?old('BillingModel')['range_min']:$billingModel->range_min}}" >---
-                            <input type="text"  style="width: 20%" class="form-control @error('BillingModel.range_max') is-invalid @enderror"
-                                   name="BillingModel[range_max]" autocomplete="off" value="{{old('BillingModel')['range_max']?old('BillingModel')['range_max']:$billingModel->range_max}}" >
-                            @error('BillingModel.range_min')
-                            <span class="invalid-feedback" role="alert">
-                                        <strong>{{ $message }}</strong>
-                                    </span>
-                            @enderror
-                            @error('BillingModel.range_max')
-                            <span class="invalid-feedback" role="alert">
-                                        <strong>{{ $message }}</strong>
-                                    </span>
-                            @enderror
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label for="unit_price" class="col-2 col-form-label text-right">单价</label>
-                        <div class="col-8">
-                            <input type="text"  class="form-control @error('BillingModel.unit_price') is-invalid @enderror"
-                                   name="BillingModel[unit_price]" autocomplete="off" value="{{old('BillingModel')['unit_price']?old('BillingModel')['unit_price']:$billingModel->unit_price}}" >
-                            @error('BillingModel.unit_price')
-                            <span class="invalid-feedback" role="alert">
-                                        <strong>{{ $message }}</strong>
-                                    </span>
-                            @enderror
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <label for="initial_weight" class="col-2 col-form-label text-right">始重</label>
-                        <div class="col-8">
-                            <input type="text" class="form-control @error('BillingModel.initial_weight') is-invalid @enderror"
-                                   name="BillingModel[initial_weight]" autocomplete="off" value="{{old('BillingModel')['initial_weight']?old('BillingModel')['initial_weight']:$billingModel->initial_weight}}" >
-                            @error('BillingModel.initial_weight')
-                            <span class="invalid-feedback" role="alert">
-                                        <strong>{{ $message }}</strong>
-                                    </span>
-                            @enderror
-                        </div>
-                    </div>
-                    <div class="form-group row">
-                        <div class="col-8 offset-2">
-                            <input type="submit" class="btn btn-outline-dark form-control">
-                        </div>
-                    </div>
-                </form>
-            </div>
-        </div>
-    </div>
-@endsection
-
-@section('lastScript')
-    <script>
-        let insertVue=new Vue({
-            el:'#list',
-            data:{
-                inputting:{
-                    BillingModel:{
-                        carrier_id:'{{old('BillingModel')['carrier_id']?old('BillingModel')['carrier_id']:$billingModel->carrier_id}}',
-                        province_id:'{{old('BillingModel')['province_id']?old('BillingModel')['province_id']:$billingModel->province_id}}',
-                        city_id:'{{old('BillingModel')['city_id']?old('BillingModel')['city_id']:$billingModel->city_id}}',
-                        unit_id:'{{old('BillingModel')['unit_id']?old('BillingModel')['unit_id']:$billingModel->unit_id}}',
-                    }
-                },
-                provinces:[
-                    @foreach($provinces as $province)
-                    {id:'{{$province->id}}',name:'{{$province->name}}',cities:{!! $province->cities !!} },
-                    @endforeach
-                ],
-                cities:[
-                ],
-                carriers:[
-                     @foreach($carriers as $carrier)
-                    {id:'{{$carrier->id}}',name:'{{$carrier->name}}'},
-                    @endforeach
-                ],
-                units:[
-                    @foreach($units as $unit)
-                    {id:'{{$unit->id}}',name:'{{$unit->name}}'},
-                    @endforeach
-                ],
-                billingModel:[
-                        {id:'{{$billingModel->id}}',created_at:'{{$billingModel->created_at}}',
-                        carrier_id:'{{$billingModel->carrier_id}}',province_id:'{{$billingModel->province_id}}',
-                        city_id:'{{$billingModel->city_id}}',unit_id:'{{$billingModel->unit_id}}',
-                        section:'{{$billingModel->section}}',unit_price:'{{$billingModel->unit_price}}',initial_weight:'{{$billingModel->initial_weight}}'},
-                ]
-            },
-            mounted:function(){
-                this.changeProvince();
-                this.inputting.BillingModel.city_id='{{$billingModel->city_id}}';
-            },
-            methods:{
-                changeProvince(){
-                    let _this=this;
-                    let province_id=this.inputting.BillingModel.province_id;
-                    this.provinces.forEach(function (province) {
-                        if(province.id+''===province_id+''){
-                            _this.cities=province.cities;
-                            return
-                        }
-                        return null
-                    })
-                }
-            },
-        });
-
-    </script>
-@endsection

+ 0 - 98
resources/views/waybill/billingModel/index.blade.php

@@ -1,98 +0,0 @@
-
-@extends('layouts.app')
-
-@section('content')
-    <span id="nav2">
-        @component('waybill.menu')@endcomponent
-        @component('waybill.billingModel.menu')@endcomponent
-    </span>
-    <div class="container-fluid mt-3">
-        <div class="card">
-            <div class="card-body">
-                @if(Session::has('successTip'))
-                    <div class="alert alert-success h1">{{Session::get('successTip')}}</div>
-                @endif
-                <table class="table table-striped table-sm" id="list">
-                    <tr>
-                        <th>代码</th>
-                        <th>承运商名称</th>
-                        <th>省份</th>
-                        <th>城市</th>
-                        <th>计重单位</th>
-                        <th>区间</th>
-                        <th>单价(元)</th>
-                        <th>始重</th>
-                        <th>录入时间</th>
-                    </tr>
-                    <tr v-for="billingModel in billingModels">
-                        <td class="text-muted">@{{billingModel.id}}</td>
-                        <td>@{{billingModel.carrier}}</td>
-                        <td>@{{billingModel.province}}</td>
-                        <td>@{{billingModel.city}}</td>
-                        <td>@{{billingModel.unit}}</td>
-                        <td>@{{billingModel.range_min}} -- @{{billingModel.range_max}}</td>
-                        <td>@{{billingModel.unit_price}}</td>
-                        <td>@{{billingModel.initial_weight}}</td>
-                        <td class="text-muted">@{{billingModel.created_at}}</td>
-                        <td>
-                            @can('计费模型-编辑')
-                                <button class="btn btn-sm btn-outline-primary" @click="edit(billingModel.id)">改</button> @endcan
-                            @can('计费模型-删除')
-                                <button class="btn btn-sm btn-outline-dark" @click="destroy(billingModel)">删</button> @endcan
-                        </td>
-                    </tr>
-                </table>
-                {{$billingModels->links()}}
-            </div>
-        </div>
-    </div>
-@endsection
-
-@section('lastScript')
-    <script>
-        new Vue({
-            el:"#list",
-            data:{
-                billingModels:[
-                    @foreach( $billingModels as $billingModel )
-                        {id:'{{$billingModel->id}}',carrier:'{{$billingModel->carrier->name}}',
-                        province:'{{$billingModel->province->name}}',city:'{{$billingModel->city->name}}',
-                        unit:'{{$billingModel->unit->name}}',range_min:'{{$billingModel->range_min}}',range_max:'{{$billingModel->range_max}}',
-                        unit_price:'{{$billingModel->unit_price}}',initial_weight:'{{$billingModel->initial_weight}}',
-                        created_at:'{{$billingModel->created_at}}'},
-                    @endforeach
-                ],
-            },
-            methods:{
-                edit:function(id){
-                    location.href = "{{url('billingModel')}}/"+id+"/edit";
-                },
-                destroy:function(billingModel){
-                    if(!confirm('确定要删除该计费模型吗?')){return};
-                    let data=this;
-                    let url = "{{url('billingModel')}}/"+billingModel.id;
-                    axios.delete(url,{id:billingModel.id})
-                        .then(function (response) {
-                            if(response.data.success){
-                                for (let i = 0; i < data.billingModels.length; i++) {
-                                    if (data.billingModels[i].id===billingModel.id){
-                                        data.billingModels.splice(i,1);
-                                        break;
-                                    }
-                                }
-                                tempTip.setDuration(1000);
-                                tempTip.showSuccess('删除计费模型成功!')
-                            }else{
-                                tempTip.setDuration(1000);
-                                tempTip.show('删除计费模型失败!')
-                            }
-                        })
-                        .catch(function (err) {
-                            tempTip.setDuration(3000);
-                            tempTip.show('删除计费模型失败!'+'网络错误:' + err);
-                        });
-                },
-            }
-        });
-    </script>
-@endsection

+ 0 - 16
resources/views/waybill/billingModel/menu.blade.php

@@ -1,16 +0,0 @@
-
-<div class="container-fluid mt-3" id="nav2">
-    <div class="card">
-        <ul class="nav nav-pills">
-            @can('计费模型-查询')
-            <li class="nav-item">
-                <a class="nav-link" href="{{url('billingModel')}}" :class="{active:isActive('',2)}">查询</a>
-            </li> @endcan
-            @can('计费模型-录入')
-            <li class="nav-item">
-                <a class="nav-link" href="{{url('billingModel/create')}}" :class="{active:isActive('create',2)}">录入</a>
-            </li> @endcan
-            {{$slot}}
-        </ul>
-    </div>
-</div>