|
|
@@ -7,13 +7,18 @@
|
|
|
@component('weigh.package.menu')@endcomponent
|
|
|
</span>
|
|
|
<div id="list">
|
|
|
- {{--<div class="container mt-3">
|
|
|
+ <div class="container mt-3">
|
|
|
<div class="card">
|
|
|
<div>
|
|
|
- <form method="GET" action="{{url('waybill/waybillPriceModel')}}" style="margin-top: 1%" id="optionSubmit">
|
|
|
+ <form method="GET" action="{{url('weigh/package')}}" style="margin-top: 1%" id="optionSubmit">
|
|
|
<table class="table table-sm table-bordered table-hover text-nowrap ">
|
|
|
<tr>
|
|
|
- <td > <label style="margin-left: 2%" class="form-inline">页显示条数:
|
|
|
+ <td colspan="4"><div class="col" v-if="isBeingFilterConditions" style="padding:0">
|
|
|
+ <a href="{{url('weigh/package')}}"><span class="btn btn-warning text-dark">清除过滤条件</span></a>
|
|
|
+ </div></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td style="width:200px;"> <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>
|
|
|
@@ -21,28 +26,36 @@
|
|
|
<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">
|
|
|
+ <td style="width:300px;"> <label class="form-inline" style="margin-left: 2%">快递单号:
|
|
|
+ <input type="text" name="logistic_number" class="form-control " v-model="filterData.logistic_number" style="vertical-align: middle"></label></td>
|
|
|
+ <td style="width:200px;"> <label class="form-inline" style="margin-left: 2%">波次类型:
|
|
|
+ <select name="type" v-model="filterData.type" class="form-control" @change="setType">
|
|
|
<option > </option>
|
|
|
- @foreach($carriers as $carrier)
|
|
|
- <option value="{{$carrier->id}}">{{$carrier->name}}</option>
|
|
|
- @endforeach
|
|
|
+ <option value="普通波次">普通波次</option>
|
|
|
+ <option value="活动波次">活动波次</option>
|
|
|
+
|
|
|
+ </select></label></td>
|
|
|
+ <td style="width:200px;"><label class="form-inline" style="margin-left: 2%">状态:
|
|
|
+ <select name="status" v-model="filterData.status" class="form-control" @change="setStatus">
|
|
|
+ <option> </option>
|
|
|
+ <option value="无">无</option>
|
|
|
+ <option value="未上传">未上传</option>
|
|
|
+ <option value="已上传">已上传</option>
|
|
|
+ <option value="异常">异常</option>
|
|
|
</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" value="kk"></label></td>
|
|
|
+ <td style="width:200px;"> <label class="form-inline" style="margin-left: 2%">货主:
|
|
|
+ <select name="owner_id" v-model="filterData.owner_id" class="form-control" @change="setOwner">
|
|
|
+ <option > </option>
|
|
|
+ @foreach($owners as $owner)
|
|
|
+ <option value="{{$owner->id}}">{{$owner->name}}</option>
|
|
|
+ @endforeach
|
|
|
+ </select></label><input hidden type="submit" value="kk"></td>
|
|
|
+ <td></td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
</form>
|
|
|
- </div>--}}
|
|
|
+ </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>ID</th>
|
|
|
@@ -97,41 +110,25 @@
|
|
|
@endforeach
|
|
|
],
|
|
|
filterData:
|
|
|
- {paginate:'50',carrier_id:'',province_id: ''},
|
|
|
+ {paginate:'50',logistic_number:'',type: '',status: '',owner_id: ''},
|
|
|
},
|
|
|
mounted:function(){
|
|
|
this.initInputs();
|
|
|
},
|
|
|
- methods:{
|
|
|
- edit:function(id){
|
|
|
- location.href = "{{url('waybill/waybillPriceModel')}}/"+id+"/edit";
|
|
|
- },
|
|
|
- destroy:function(waybillPriceModel){
|
|
|
- if(!confirm('确定要删除该计费模型吗?')){return};
|
|
|
- let data=this;
|
|
|
- let url = "{{url('waybill/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);
|
|
|
- console.log(err);
|
|
|
- });
|
|
|
+ computed:{
|
|
|
+ isBeingFilterConditions:function(){
|
|
|
+
|
|
|
+ for(let key in this.filterData){
|
|
|
+ if(this.filterData[key]){
|
|
|
+ if(key==='paginate')continue;
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
},
|
|
|
+
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
initInputs:function(){
|
|
|
let data=this;
|
|
|
let uriParts =decodeURI(location.href).split("?");
|
|
|
@@ -151,13 +148,18 @@
|
|
|
var form = document.getElementById("optionSubmit");
|
|
|
form.submit();
|
|
|
},
|
|
|
- setCarrier:function (e){
|
|
|
- this.filterData.carrier_id=e.target.value;
|
|
|
+ setType:function (e){
|
|
|
+ this.filterData.type=e.target.value;
|
|
|
+ var form = document.getElementById("optionSubmit");
|
|
|
+ form.submit();
|
|
|
+ },
|
|
|
+ setStatus:function (e){
|
|
|
+ this.filterData.status=e.target.value;
|
|
|
var form = document.getElementById("optionSubmit");
|
|
|
form.submit();
|
|
|
},
|
|
|
- setProvince:function (e){
|
|
|
- this.filterData.province_id=e.target.value;
|
|
|
+ setOwner:function (e){
|
|
|
+ this.filterData.owner_id=e.target.value;
|
|
|
var form = document.getElementById("optionSubmit");
|
|
|
form.submit();
|
|
|
},
|