|
@@ -4,8 +4,8 @@
|
|
|
<div class="avue-searchs__title">账单追溯</div>
|
|
<div class="avue-searchs__title">账单追溯</div>
|
|
|
<div class="avue-searchs__content">
|
|
<div class="avue-searchs__content">
|
|
|
<div class="avue-searchs__form">
|
|
<div class="avue-searchs__form">
|
|
|
- <el-input :placeholder="$t('search')" v-model="value">
|
|
|
|
|
- <el-button slot="append" icon="el-icon-search"></el-button>
|
|
|
|
|
|
|
+ <el-input :placeholder="$t('search')" v-model="value" @input="searchBill">
|
|
|
|
|
+ <el-button slot="append" icon="el-icon-search" @click="searchBill"></el-button>
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="avue-searchs__list">
|
|
<div class="avue-searchs__list">
|
|
@@ -34,7 +34,7 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import InfiniteLoading from 'vue-infinite-loading';
|
|
import InfiniteLoading from 'vue-infinite-loading';
|
|
|
-import {getBills} from "@/api/ldt_bills/billtrace"
|
|
|
|
|
|
|
+import {getBills} from "../../api/ldt_bills/billtrace";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -52,17 +52,23 @@ export default {
|
|
|
billList: [],
|
|
billList: [],
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- watch: {
|
|
|
|
|
- value() {
|
|
|
|
|
- this.querySearch();
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // watch: {
|
|
|
|
|
+ // value() {
|
|
|
|
|
+ // this.querySearch();
|
|
|
|
|
+ // },
|
|
|
|
|
+ // },
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ searchBill() {
|
|
|
|
|
+ getBills(1, this.page.pageSize, {id: this.value}).then((res) => {
|
|
|
|
|
+ const data = res.data.data;
|
|
|
|
|
+ this.billList = data.records;
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
handleSelect(billId) {
|
|
handleSelect(billId) {
|
|
|
this.$router.push(`/work/process/billtrace/handle?billId=${billId}`)
|
|
this.$router.push(`/work/process/billtrace/handle?billId=${billId}`)
|
|
|
},
|
|
},
|
|
|
infiniteHandler($state) {
|
|
infiniteHandler($state) {
|
|
|
- getBills(this.page.currentPage, this.page.pageSize, this.value).then((res) => {
|
|
|
|
|
|
|
+ getBills(this.page.currentPage, this.page.pageSize, {id: this.value}).then((res) => {
|
|
|
const data = res.data.data;
|
|
const data = res.data.data;
|
|
|
if (data.records.length) {
|
|
if (data.records.length) {
|
|
|
this.bills = this.bills.concat(data.records);
|
|
this.bills = this.bills.concat(data.records);
|
|
@@ -77,18 +83,18 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- querySearch() {
|
|
|
|
|
- var restaurants = this.bills;
|
|
|
|
|
- var queryString = this.value
|
|
|
|
|
- this.billList = queryString ? this.bills.filter(this.createFilter(queryString)) : restaurants;
|
|
|
|
|
- },
|
|
|
|
|
- createFilter(queryString) {
|
|
|
|
|
- return restaurant => {
|
|
|
|
|
- return (
|
|
|
|
|
- restaurant.id.indexOf(queryString) !== -1
|
|
|
|
|
- );
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // querySearch() {
|
|
|
|
|
+ // var restaurants = this.bills;
|
|
|
|
|
+ // var queryString = this.value
|
|
|
|
|
+ // this.billList = queryString ? this.bills.filter(this.createFilter(queryString)) : restaurants;
|
|
|
|
|
+ // },
|
|
|
|
|
+ // createFilter(queryString) {
|
|
|
|
|
+ // return restaurant => {
|
|
|
|
|
+ // return (
|
|
|
|
|
+ // restaurant.id.indexOf(queryString) !== -1
|
|
|
|
|
+ // );
|
|
|
|
|
+ // };
|
|
|
|
|
+ // },
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|