|
|
@ -3,7 +3,7 @@ |
|
|
|
<el-card class="box-card"> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="9"> |
|
|
|
<el-input clearable v-model="queryInfo.query" placeholder="请输入商品名" prefix-icon="el-icon-search"> |
|
|
|
<el-input clearable v-model="queryInfo.params.proName" placeholder="请输入商品名" prefix-icon="el-icon-search"> |
|
|
|
<el-button slot="append" icon="el-icon-search" @click="getStockList"></el-button> |
|
|
|
</el-input> |
|
|
|
</el-col> |
|
|
@ -83,9 +83,9 @@ |
|
|
|
<el-pagination |
|
|
|
@size-change="handleSizeChange" |
|
|
|
@current-change="handleCurrentChange" |
|
|
|
:current-page="queryInfo.pageNum" |
|
|
|
:current-page="queryInfo.current" |
|
|
|
:page-sizes="[10, 20, 30, 40]" |
|
|
|
:page-size="queryInfo.pageSize" |
|
|
|
:page-size="queryInfo.size" |
|
|
|
layout="total, sizes, prev, pager, next, jumper" |
|
|
|
:total="total"> |
|
|
|
</el-pagination> |
|
|
@ -101,9 +101,9 @@ export default { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
queryInfo: { |
|
|
|
query: '', |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 5 |
|
|
|
params: {}, |
|
|
|
current: 1, |
|
|
|
size: 10 |
|
|
|
}, |
|
|
|
total: 0, |
|
|
|
stockList: [] |
|
|
@ -111,12 +111,12 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleSizeChange (val) { |
|
|
|
this.queryInfo.pageSize = val |
|
|
|
this.queryInfo.size = val |
|
|
|
this.getStockList() |
|
|
|
}, |
|
|
|
|
|
|
|
handleCurrentChange (val) { |
|
|
|
this.queryInfo.pageNum = val |
|
|
|
this.queryInfo.current = val |
|
|
|
this.getStockList() |
|
|
|
}, |
|
|
|
// 序号 |
|
|
@ -126,7 +126,7 @@ export default { |
|
|
|
return pageindex |
|
|
|
}, |
|
|
|
async getStockList () { |
|
|
|
const { data: result } = await this.$http.post('/stock/listPage', { params: this.queryInfo }) |
|
|
|
const { data: result } = await this.$http.post('/stock/listPage', this.queryInfo ) |
|
|
|
if (result.code !== "200") return this.$message.error('获取列表失败') |
|
|
|
this.total = result.data.total |
|
|
|
this.stockList = result.data.records |
|
|
|