|
|
@@ -57,17 +57,21 @@
|
|
|
<span class="text-danger">*</span>
|
|
|
货主</label>
|
|
|
<div class="form-inline col-8">
|
|
|
- <select class="form-control form-control-sm col-12" name="owner_id" id="owner_id"
|
|
|
+ <select class="form-control form-control-sm col-8" name="owner_id" id="owner_id"
|
|
|
:class="{'is-invalid':errors.owner_id}"
|
|
|
@change="getASNDetails"
|
|
|
@input="clearError('owner_id')"
|
|
|
v-model="receiving_task.owner_id">
|
|
|
- <option v-for="item in owners" :value="item.id" v-text="item.name"></option>
|
|
|
+ <option v-for="item in filterOwners" :value="item.id" v-text="item.name"></option>
|
|
|
</select>
|
|
|
<div id="validation-owner-id" class="invalid-feedback" v-show="errors.owner_id">
|
|
|
<span v-text="errors.owner_id"></span>
|
|
|
</div>
|
|
|
+ <div class="form-inline col-3">
|
|
|
+ <input type="text" name="owner_search" id="owner_search" v-model="owner_search" class="form-control form-control-sm">
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -419,6 +423,7 @@
|
|
|
@endforeach
|
|
|
],
|
|
|
driving_license_image: null,
|
|
|
+ owner_search:null,
|
|
|
page_size: 20,
|
|
|
pager_count: 0,
|
|
|
current_page: 0,
|
|
|
@@ -469,6 +474,21 @@
|
|
|
mounted() {
|
|
|
$("#list").removeClass('d-none');
|
|
|
},
|
|
|
+ computed:{
|
|
|
+ filterOwners(){
|
|
|
+ let owners = JSON.parse(JSON.stringify(this.owners));
|
|
|
+ let owner_name = this.owner_search ? this.owner_search.trim() : '';
|
|
|
+ if (owner_name === '') return owners;
|
|
|
+ owners = owners.filter(e=>{
|
|
|
+ return e.name.includes(owner_name);
|
|
|
+ });
|
|
|
+ setTimeout(()=>{
|
|
|
+ let owner = owners.find(e=>e);
|
|
|
+ owner ? this.$set(this.receiving_task,'owner_id',owner.id) : null;
|
|
|
+ },200);
|
|
|
+ return owners;
|
|
|
+ },
|
|
|
+ },
|
|
|
methods: {
|
|
|
waitingTempTip(message) {
|
|
|
window.tempTip.setIndex(2005);
|