Browse Source

入库接口的调整

master
djz8236 2 years ago
parent
commit
121bee9ec8
  1. 18
      warehousing-system/project_web/src/components/stockManagement/stockList.vue

18
warehousing-system/project_web/src/components/stockManagement/stockList.vue

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

Loading…
Cancel
Save