|
|
@@ -1,168 +1,199 @@
|
|
|
|
|
|
@extends('layouts.app')
|
|
|
-@section('title')运输价格模型@endsection
|
|
|
+@section('title')仓储价格模型@endsection
|
|
|
|
|
|
@section('content')
|
|
|
- <span id="nav2">
|
|
|
- @component('maintenance.menu')@endcomponent
|
|
|
- @component('maintenance.waybillPriceModel.menu')@endcomponent
|
|
|
- </span>
|
|
|
<div id="list">
|
|
|
- <div class="container-fluid">
|
|
|
- <div class="card">
|
|
|
- <div>
|
|
|
- <form method="GET" action="{{url('maintenance/waybillPriceModel')}}" id="optionSubmit">
|
|
|
- <table class="table table-sm table-bordered table-hover text-nowrap ">
|
|
|
+ <span id="nav2">
|
|
|
+ @component('maintenance.menu')@endcomponent
|
|
|
+ @component('maintenance.priceModel.menu')@endcomponent
|
|
|
+ </span>
|
|
|
+ <span class="dropdown ml-3">
|
|
|
+ <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget mt-2"
|
|
|
+ data-toggle="dropdown" title="导出所有页将会以搜索条件得到的过滤结果,将其全部记录(每一页)导出">
|
|
|
+ 导出Excel
|
|
|
+ </button>
|
|
|
+ <div class="dropdown-menu">
|
|
|
+ <a class="dropdown-item">导出勾选内容</a>
|
|
|
+ <a class="dropdown-item">导出所有页</a>
|
|
|
+ </div>
|
|
|
+ </span>
|
|
|
+ <table class="table table-sm table-hover table-bordered table-striped text-nowrap m-2" >
|
|
|
+ <tr>
|
|
|
+ <th>
|
|
|
+ <label for="all">
|
|
|
+ <input id="all" type="checkbox" >全选
|
|
|
+ </label>
|
|
|
+ </th>
|
|
|
+ <th>序号</th>
|
|
|
+ <th>价格编号</th>
|
|
|
+ <th>客户(货主)</th>
|
|
|
+ <th>首重(kg)</th>
|
|
|
+ <th>续重(续重单位)</th>
|
|
|
+ <th>承运商</th>
|
|
|
+ <th>操作</th>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <input class="checkItem" type="checkbox" >
|
|
|
+ </td>
|
|
|
+ <td>1</td>
|
|
|
+ <td rowspan="2" style="vertical-align: middle">
|
|
|
+ <b data-toggle="modal" data-target="#staticBackdrop"
|
|
|
+ style="cursor: pointer;color: #4aa0e6;text-decoration: underline">SHKD20092201</b>
|
|
|
+ </td>
|
|
|
+ <td>项目1</td>
|
|
|
+ <td>3</td>
|
|
|
+ <td>1</td>
|
|
|
+ <td>圆通</td>
|
|
|
+ <td>
|
|
|
+ <button class="btn btn-sm btn-outline-info">改</button>
|
|
|
+ <button class="btn btn-sm btn-outline-danger">删</button>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <input class="checkItem" type="checkbox" >
|
|
|
+ </td>
|
|
|
+ <td>2</td>
|
|
|
+ <td>项目2</td>
|
|
|
+ <td>2</td>
|
|
|
+ <td>1.5</td>
|
|
|
+ <td>中通</td>
|
|
|
+ <td>
|
|
|
+ <button class="btn btn-sm btn-outline-info">改</button>
|
|
|
+ <button class="btn btn-sm btn-outline-danger">删</button>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+
|
|
|
+ <!-- Modal -->
|
|
|
+ <div class="modal fade" id="staticBackdrop" tabindex="-1" role="dialog" >
|
|
|
+ <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
|
|
+ <div class="modal-content" style="max-height: 500px;overflow-y:scroll; overflow-x:hidden;">
|
|
|
+ <div class="modal-header form-inline ">
|
|
|
+ <label class="text-center text-primary">SHKD20092201
|
|
|
+ <input placeholder="省" class="form-control form-control-sm ml-2" style="max-width: 100px;">
|
|
|
+ </label>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <table class="table table-sm m-2 table-striped table-hover">
|
|
|
+ <tr>
|
|
|
+ <th>省</th>
|
|
|
+ <th>首重单价</th>
|
|
|
+ <th>续重单价</th>
|
|
|
+ <th>操作</th>
|
|
|
+ </tr>
|
|
|
+ <tr class="text-success font-weight-bold" {{--使用MAP进行哈希对比--}}>
|
|
|
+ <td>上海</td>
|
|
|
+ <td>4</td>
|
|
|
+ <td>1</td>
|
|
|
+ <td>
|
|
|
+ <button class="btn btn-sm btn-outline-info">改</button>
|
|
|
+ <button class="btn btn-sm btn-outline-danger">删</button>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>浙江</td>
|
|
|
+ <td>4</td>
|
|
|
+ <td>1</td>
|
|
|
+ <td>
|
|
|
+ <button class="btn btn-sm btn-outline-info">改</button>
|
|
|
+ <button class="btn btn-sm btn-outline-danger">删</button>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>江苏</td>
|
|
|
+ <td>4</td>
|
|
|
+ <td>1</td>
|
|
|
+ <td>
|
|
|
+ <button class="btn btn-sm btn-outline-info">改</button>
|
|
|
+ <button class="btn btn-sm btn-outline-danger">删</button>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>安徽</td>
|
|
|
+ <td>4</td>
|
|
|
+ <td>1</td>
|
|
|
+ <td>
|
|
|
+ <button class="btn btn-sm btn-outline-info">改</button>
|
|
|
+ <button class="btn btn-sm btn-outline-danger">删</button>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>北京</td>
|
|
|
+ <td>4.5</td>
|
|
|
+ <td>3</td>
|
|
|
+ <td>
|
|
|
+ <button class="btn btn-sm btn-outline-info">改</button>
|
|
|
+ <button class="btn btn-sm btn-outline-danger">删</button>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>天津</td>
|
|
|
+ <td>4.5</td>
|
|
|
+ <td>3</td>
|
|
|
+ <td>
|
|
|
+ <button class="btn btn-sm btn-outline-info">改</button>
|
|
|
+ <button class="btn btn-sm btn-outline-danger">删</button>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>天津</td>
|
|
|
+ <td>4.5</td>
|
|
|
+ <td>3</td>
|
|
|
+ <td>
|
|
|
+ <button class="btn btn-sm btn-outline-info">改</button>
|
|
|
+ <button class="btn btn-sm btn-outline-danger">删</button>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>天津</td>
|
|
|
+ <td>4.5</td>
|
|
|
+ <td>3</td>
|
|
|
+ <td>
|
|
|
+ <button class="btn btn-sm btn-outline-info">改</button>
|
|
|
+ <button class="btn btn-sm btn-outline-danger">删</button>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>天津</td>
|
|
|
+ <td>4.5</td>
|
|
|
+ <td>3</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>天津</td>
|
|
|
+ <td>4.5</td>
|
|
|
+ <td>3</td>
|
|
|
+ </tr> <tr>
|
|
|
+ <td>天津</td>
|
|
|
+ <td>4.5</td>
|
|
|
+ <td>3</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>天津</td>
|
|
|
+ <td>4.5</td>
|
|
|
+ <td>3</td>
|
|
|
+ </tr>
|
|
|
<tr>
|
|
|
- <td > <label style="margin-left: 2%" class="form-inline">页显示条数:
|
|
|
- <select name="paginate" v-model="filterData.paginate" class="form-control" @change="setPaginate">
|
|
|
- <option value="50">50行</option>
|
|
|
- <option value="100">100行</option>
|
|
|
- <option value="200">200行</option>
|
|
|
- <option value="500">500行</option>
|
|
|
- <option value="1000">1000行</option>
|
|
|
- </select></label></td>
|
|
|
- <td > <label class="form-inline" style="margin-left: 2%">承运商:
|
|
|
- <select name="carrier_id" v-model="filterData.carrier_id" class="form-control" @change="setCarrier">
|
|
|
- <option > </option>
|
|
|
- @foreach($carriers as $carrier)
|
|
|
- <option value="{{$carrier->id}}">{{$carrier->name}}</option>
|
|
|
- @endforeach
|
|
|
- </select></label></td>
|
|
|
- <td><label class="form-inline" style="margin-left: 2%">省份:
|
|
|
- <select name="province_id" v-model="filterData.province_id" class="form-control" @change="setProvince">
|
|
|
- <option> </option>
|
|
|
- @foreach($provinces as $province)
|
|
|
- <option value="{{$province->id}}">{{$province->name}}</option>
|
|
|
- @endforeach
|
|
|
- </select><input hidden type="submit"></label></td>
|
|
|
+ <td>河北</td>
|
|
|
+ <td>4.5</td>
|
|
|
+ <td>3</td>
|
|
|
</tr>
|
|
|
+ <tr>
|
|
|
+ <td>河北</td>
|
|
|
+ <td>4.5</td>
|
|
|
+ <td>3</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>河北</td>
|
|
|
+ <td>4.5</td>
|
|
|
+ <td>3</td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
</table>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
- <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">
|
|
|
- <tr>
|
|
|
- <th>代码</th>
|
|
|
- <th>承运商名称</th>
|
|
|
- <th>省份</th>
|
|
|
- <th>城市</th>
|
|
|
- <th>计重单位</th>
|
|
|
- <th>区间</th>
|
|
|
- <th>单价(元)</th>
|
|
|
- <th>起步费(元)</th>
|
|
|
- <th>最低计数</th>
|
|
|
- <th>录入时间</th>
|
|
|
- <th>操作</th>
|
|
|
- </tr>
|
|
|
- <tr v-for="waybillPriceModel in waybillPriceModels">
|
|
|
- <td class="text-muted">@{{waybillPriceModel.id}}</td>
|
|
|
- <td>@{{waybillPriceModel.carrier}}</td>
|
|
|
- <td>@{{waybillPriceModel.province}}</td>
|
|
|
- <td>@{{waybillPriceModel.city}}</td>
|
|
|
- <td>@{{waybillPriceModel.unit}}</td>
|
|
|
- <td>@{{waybillPriceModel.range_min}}<a v-if="waybillPriceModel.range_min&&waybillPriceModel.range_max"> -- </a> @{{waybillPriceModel.range_max}}</td>
|
|
|
- <td>@{{waybillPriceModel.unit_price}}</td>
|
|
|
- <td>@{{waybillPriceModel.base_fee}}</td>
|
|
|
- <td>@{{waybillPriceModel.initial_weight}}</td>
|
|
|
- <td class="text-muted">@{{waybillPriceModel.created_at}}</td>
|
|
|
- <td>
|
|
|
- @can('计费模型-编辑')
|
|
|
- <button class="btn btn-sm btn-outline-primary" @click="edit(waybillPriceModel.id)">改</button> @endcan
|
|
|
- @can('计费模型-删除')
|
|
|
- <button class="btn btn-sm btn-outline-dark" @click="destroy(waybillPriceModel)">删</button> @endcan
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
- {{$waybillPriceModels->appends($filterData)->links()}}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
-@endsection
|
|
|
-
|
|
|
-@section('lastScript')
|
|
|
- <script>
|
|
|
- new Vue({
|
|
|
- el:"#list",
|
|
|
- data:{
|
|
|
- waybillPriceModels:[
|
|
|
- @foreach( $waybillPriceModels as $waybillPriceModel )
|
|
|
- {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}}',
|
|
|
- created_at:'{{$waybillPriceModel->created_at}}'},
|
|
|
- @endforeach
|
|
|
- ],
|
|
|
- filterData:
|
|
|
- {paginate:'50',carrier_id:'',province_id: ''},
|
|
|
- },
|
|
|
- mounted:function(){
|
|
|
- this.initInputs();
|
|
|
- },
|
|
|
- methods:{
|
|
|
- edit:function(id){
|
|
|
- location.href = "{{url('maintenance/waybillPriceModel')}}/"+id+"/edit";
|
|
|
- },
|
|
|
- destroy:function(waybillPriceModel){
|
|
|
- if(!confirm('确定要删除该计费模型吗?')){return};
|
|
|
- let data=this;
|
|
|
- let url = "{{url('maintenance/waybillPriceModel')}}/"+waybillPriceModel.id;
|
|
|
- axios.delete(url,{id:waybillPriceModel.id})
|
|
|
- .then(function (response) {
|
|
|
- if(response.data.success){
|
|
|
- for (let i = 0; i < data.waybillPriceModels.length; i++) {
|
|
|
- if (data.waybillPriceModels[i].id===waybillPriceModel.id){
|
|
|
- data.waybillPriceModels.splice(i,1);
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- tempTip.setDuration(1000);
|
|
|
- tempTip.showSuccess('删除计费模型成功!')
|
|
|
- }else{
|
|
|
- tempTip.setDuration(1000);
|
|
|
- tempTip.show('删除计费模型失败!')
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(function (err) {
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show('删除计费模型失败!'+'网络错误:' + err);
|
|
|
- });
|
|
|
- },
|
|
|
- initInputs:function(){
|
|
|
- let data=this;
|
|
|
- let uriParts =decodeURI(location.href).split("?");
|
|
|
- if(uriParts.length>1){
|
|
|
- let params = uriParts[1].split('&');
|
|
|
- params.forEach(function(paramPair){
|
|
|
- let pair=paramPair.split('=');
|
|
|
- let key = pair[0], val = pair[1];
|
|
|
- $('input[name="'+key+'"]').val(val);
|
|
|
- $('select[name="'+key+'"]').val(val);
|
|
|
- decodeURI(data.filterData[key]=val);
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- setPaginate:function(e){
|
|
|
- this.filterData.paginate=e.target.value;
|
|
|
- var form = document.getElementById("optionSubmit");
|
|
|
- form.submit();
|
|
|
- },
|
|
|
- setCarrier:function (e){
|
|
|
- this.filterData.carrier_id=e.target.value;
|
|
|
- var form = document.getElementById("optionSubmit");
|
|
|
- form.submit();
|
|
|
- },
|
|
|
- setProvince:function (e){
|
|
|
- this.filterData.province_id=e.target.value;
|
|
|
- var form = document.getElementById("optionSubmit");
|
|
|
- form.submit();
|
|
|
- },
|
|
|
- }
|
|
|
- });
|
|
|
- </script>
|
|
|
-@endsection
|
|
|
+@endsection
|