条件查询,前端分页

This commit is contained in:
zgf committed 2023-12-22 13:22:47 +08:00
1 parent 75c580115c
commit 720cf26a59
10 files changed
+648 -81

No files matched your search

+29 -10
View File
@@ -192,7 +192,8 @@
</el-form-item>
</el-form>
<el-table :data="billTable" height="750" stripe border
<el-table :data="tableData.slice((currentPage-1)*pageSize,currentPage*pageSize)"
height="650" stripe border
style="width: 100%"
size="small"
@@cell-mouse-enter="handleCellEnter"
@@ -252,6 +253,16 @@
<el-table-column label="备注" align="center" prop="YITMDES4_0" show-overflow-tooltip></el-table-column>
</el-table>
<el-pagination align='center'
@@size-change="handleSizeChange"
@@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[1,5,10,20]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="tableData.length">
</el-pagination>
</el-row>
<script>
@@ -282,7 +293,10 @@
value: 'R',
label: 'R'
}],
billTable: [],
tableData: [],
currentPage: 1, // 当前页码
total: 20, // 总条数
pageSize: 20, // 每页的数据条数
// 需要编辑的属性
editProp: ['THISQTYUOM', 'THISQTYSTU', 'STA_0'],
multipleSelection: []
@@ -296,7 +310,7 @@
// data: {},
// url: "/xwms/XWMSPOH/Search",
// success: function (json) {
// app.billTable = json.Data;
// app.tableData = json.Data;
// },
// error: function (json) {
// alert("加载失败");
@@ -327,9 +341,15 @@
cell.querySelector('.item__txt').style.display = 'block'
}
},
// handleCellClick(row, column, cell, event) {
// console.log(row.STA_0);
// },
//每页条数改变时触发 选择一页显示多少行
handleSizeChange(val) {
this.currentPage = 1;
this.pageSize = val;
},
//当前页改变时触发 跳转其他页
handleCurrentChange(val) {
this.currentPage = val;
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
@@ -338,14 +358,15 @@
$.ajax({
type: "post",
dataType: "json",
data: { address: _this.form.address,
data: {
address: _this.form.address,
billno: _this.form.billno,
supply: _this.form.supply,
materialcode: _this.form.materialcode
},
url: "/xwms/XWMSPOH/Search",
success: function (json) {
app.billTable = json.Data;
app.tableData = json.Data;
},
error: function (json) {
alert("加载失败");
@@ -353,8 +374,6 @@
});
},
create() {
var _this = this;
console.log(_this.multipleSelection);
var _this = this;
$.ajax({
type: "post",