|
|
@@ -53,12 +53,16 @@
|
|
|
<option v-for="owner in owners" :value="owner.id" class="font-weight-bold">@{{owner.name}}</option>
|
|
|
</select>
|
|
|
<div style="position: relative;">
|
|
|
- <button type="button" style=" max-width: 100px" class="btn btn-sm btn-outline-dark container pull-left">多货主查询</button>
|
|
|
- <span hidden class="border" style="position: absolute;left:0px;top:30px;width:80px;max-width:100px;background-color: white">
|
|
|
+ <button type="button" v-show="!isOwnersBtn" @click="isOwnersBtn=true;" style=" max-width: 100px" class="btn btn-sm btn-outline-dark container pull-left">多货主查询</button>
|
|
|
+ <button type="button" v-show="isOwnersBtn" @click="isOwnersBtn=false;" style=" max-width: 100px" class="btn btn-sm btn-outline-dark container pull-left">收起货主</button>
|
|
|
+ <span v-show="isOwnersBtn" class="border" style="position: absolute;left:0;top:30px;width:80px;max-height:100px;overflow:auto;background-color: white">
|
|
|
<ul style="list-style-type:none" class="pl-0">
|
|
|
- <li v-for="owner in owners" style="cursor: pointer;user-select:none" class="text-left">@{{owner.name}}<hr style="width: 100%"></li>
|
|
|
+ <li v-for="owner in owners" style="cursor: pointer;user-select:none;" :style="{'background-color':filterData.owners['_'+owner.id]?'#4aa0e6':''}"
|
|
|
+ @dblclick="selectedOwner(owner.id)" class="text-left">@{{owner.name}}<hr class="m-0" style="width: 100%"></li>
|
|
|
</ul>
|
|
|
+
|
|
|
</span>
|
|
|
+ <input hidden name="owners" :value="JSON.stringify(filterData.owners)">
|
|
|
</div>
|
|
|
</div>
|
|
|
</td>
|
|
|
@@ -211,7 +215,7 @@
|
|
|
<td :class="[waybill.status=='已审核'?'text-success':'']">@{{waybill.status}}</td>
|
|
|
<td class="td-bill text-muted">@{{waybill.id}}</td>
|
|
|
<td class="td-bill text-muted">@{{waybill.created_at}}</td>
|
|
|
- <td class="td-bill">@{{waybill.type}}</td>
|
|
|
+ <td class="td-bill">@{{waybill.type}} <span class="badge badge-sm bg-warning" v-if="waybill.collect_fee">到付</span></td>
|
|
|
<td class="td-bill">@{{waybill.owner}}</td>
|
|
|
<td class="td-bill">@{{waybill.source_bill}}</td>
|
|
|
<td class="td-bill">@{{waybill.wms_bill_number}}</td>
|
|
|
@@ -345,7 +349,7 @@
|
|
|
,carrier_bill:'',carrier_id:''
|
|
|
,owner_id:'',wms_bill_number:''
|
|
|
,created_at_start:'',created_at_end:''
|
|
|
- ,type:'',status:'',origination:'',destination:'',},
|
|
|
+ ,type:'',status:'',origination:'',destination:'',owners:{}},
|
|
|
wmsCommodities:[],
|
|
|
selectedStyle:[],
|
|
|
owners:[
|
|
|
@@ -353,6 +357,7 @@
|
|
|
{!! $owner !!},
|
|
|
@endforeach
|
|
|
],
|
|
|
+ isOwnersBtn:false,
|
|
|
},
|
|
|
computed:{
|
|
|
isBeingFilterConditions:function(){
|
|
|
@@ -360,12 +365,12 @@
|
|
|
for(let key in this.filterData){
|
|
|
if(this.filterData[key]){
|
|
|
if(key==='paginate')continue;
|
|
|
+ if (key==='owners' && Object.keys(this.filterData.owners).length<1)continue;
|
|
|
return true
|
|
|
}
|
|
|
}
|
|
|
return false;
|
|
|
},
|
|
|
-
|
|
|
},
|
|
|
watch:{
|
|
|
checkData:{
|
|
|
@@ -377,7 +382,7 @@
|
|
|
}
|
|
|
},
|
|
|
deep:true
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
mounted:function(){
|
|
|
this.initInputs();
|
|
|
@@ -396,6 +401,8 @@
|
|
|
$('input[name="'+key+'"]').val(val);
|
|
|
$('select[name="'+key+'"]').val(val);
|
|
|
decodeURI(data.filterData[key]=val);
|
|
|
+ if (key==='owners')
|
|
|
+ data.filterData['owners']=JSON.parse( unescape(val) );
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
@@ -586,13 +593,23 @@
|
|
|
},
|
|
|
elementCount:function(elementName){
|
|
|
return $(elementName).length;
|
|
|
+ },
|
|
|
+ //多货主查询
|
|
|
+ selectedOwner:function (id) {
|
|
|
+ if (this.filterData.owners['_'+id]){
|
|
|
+ this.$delete(this.filterData.owners,'_'+id);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$set(this.filterData.owners,'_'+id,id);
|
|
|
+ if (this.filterData.owners.length===1)this.filterData.owner_id=id;
|
|
|
+ else this.filterData.owner_id='';
|
|
|
}
|
|
|
},
|
|
|
filters:{
|
|
|
km:function(value){
|
|
|
if(!value)return '';
|
|
|
return value + ' km';
|
|
|
- }
|
|
|
+ },
|
|
|
}
|
|
|
});
|
|
|
</script>
|