1.修复分页查询导致的关键字查询无数据的问题

fencang
x_z 3 years ago
parent 1613e6a0a2
commit eea34d6b73

@ -109,7 +109,7 @@ export default {
relIdFk: null, relIdFk: null,
batchNo: null, batchNo: null,
page: 1, page: 1,
limit: 20, limit: 10,
customerId: null, customerId: null,
supId: null, supId: null,
unitFk: null, unitFk: null,
@ -154,12 +154,13 @@ export default {
unitFk: null, unitFk: null,
supId: null, supId: null,
page: 1, page: 1,
limit: 20, limit: 10,
}; };
this.getList(); this.getList();
}, },
onSubmit() { onSubmit() {
this.loading = true; this.loading = true;
this.filterQuery.page = 1;
this.getList(); this.getList();
}, },
handleSizeChange(val) { handleSizeChange(val) {
@ -183,7 +184,6 @@ export default {
this.filterQuery.customerId = store.getters.customerId; this.filterQuery.customerId = store.getters.customerId;
filterProducts(this.filterQuery) filterProducts(this.filterQuery)
.then((response) => { .then((response) => {
console.log(response)
this.showSup = response.data.showSup; this.showSup = response.data.showSup;
this.loading = false; this.loading = false;
this.list = response.data.list || []; this.list = response.data.list || [];
@ -231,7 +231,6 @@ export default {
}); });
}, },
findMethod(query) { findMethod(query) {
console.log(query);
this.fromOptions = []; this.fromOptions = [];
let cQuery = { let cQuery = {
key: query, key: query,

@ -38,7 +38,7 @@
<el-form-item> <el-form-item>
<el-button-group> <el-button-group>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="getList"></el-button> <el-button type="primary" icon="search" @click="search"></el-button>
<el-button type="primary" icon="search" @click="combine"></el-button> <el-button type="primary" icon="search" @click="combine"></el-button>
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
@ -112,6 +112,7 @@
@current-change="handleErpPageChange" @current-change="handleErpPageChange"
layout="prev, pager, next" layout="prev, pager, next"
:total="pageTotal" :total="pageTotal"
:current-page="listQuery.page"
></el-pagination> ></el-pagination>
</div> </div>
</el-card> </el-card>
@ -241,7 +242,6 @@ export default {
this.getList(); this.getList();
}, },
handleChange(val) { handleChange(val) {
console.log(val);
this.currentRow = val; this.currentRow = val;
}, },
handleDetailClick(row) { handleDetailClick(row) {
@ -258,12 +258,15 @@ export default {
this.getList(); this.getList();
event.target.select(); event.target.select();
}, },
search() {
this.listQuery.page = 1;
this.getList();
},
getList() { getList() {
this.loading = true; this.loading = true;
this.listQuery.customerId = store.getters.customerId; this.listQuery.customerId = store.getters.customerId;
stockOrderDetailFilterProduct(this.listQuery) stockOrderDetailFilterProduct(this.listQuery)
.then((response) => { .then((response) => {
console.log(response)
this.loading = false; this.loading = false;
if (response.code === 20000) { if (response.code === 20000) {
this.dataList = response.data.list || []; this.dataList = response.data.list || [];
@ -292,7 +295,6 @@ export default {
let ids = []; let ids = [];
selection.forEach((obj, index) => { selection.forEach((obj, index) => {
console.log("obj:===" + obj + "==" + obj.relIdFk)
let data = { let data = {
relId: obj.rlId, relId: obj.rlId,
} }

Loading…
Cancel
Save