You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
210 lines
6.5 KiB
210 lines
6.5 KiB
<template>
|
|
<div>
|
|
<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-button slot="append" icon="el-icon-search" @click="getShelves"></el-button>
|
|
</el-input>
|
|
</el-col>
|
|
<el-col :span="9">
|
|
<el-button type="success" @click="check" icon = "el-icon-success">审核</el-button>
|
|
<el-button type="danger" @click="cancelCheck" icon = "el-icon-error">撤销审核</el-button>
|
|
<el-button type="danger" @click="cancelShelves" icon = "el-icon-error">撤销上架</el-button>
|
|
</el-col>
|
|
</el-row>
|
|
<div class="main-content">
|
|
<el-table :data="onShelvesList.slice((queryInfo.pageNum-1)*queryInfo.pageSize,queryInfo.pageNum*queryInfo.pageSize)"
|
|
style="width: 100%"
|
|
stripe border fixed
|
|
@selection-change="handleSelectionChange">
|
|
<el-table-column
|
|
fixed="left"
|
|
type="selection"
|
|
width="55">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="shelvesId"
|
|
label="上架单号"
|
|
width="180">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="barCode"
|
|
label="商品编号"
|
|
width="180">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="productName"
|
|
label="商品名称"
|
|
width="180">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="locationId"
|
|
label="货位编号"
|
|
width="180">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="locationName"
|
|
label="货位名称"
|
|
width="180">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="fromLocationId"
|
|
label="源货位编号"
|
|
width="180">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="fromLocationName"
|
|
label="源货位名称"
|
|
width="180">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="count"
|
|
label="数量"
|
|
width="180">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="status"
|
|
label="状态"
|
|
width="180">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="createPerson"
|
|
label="创建人"
|
|
width="180">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="createTime"
|
|
label="创建时间"
|
|
width="180">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="checkPerson"
|
|
label="审核人"
|
|
width="180">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="checkTime"
|
|
label="审核时间"
|
|
width="180">
|
|
</el-table-column>
|
|
</el-table>
|
|
<div class="main-content">
|
|
<el-pagination
|
|
@size-change="handleSizeChange"
|
|
@current-change="handleCurrentChange"
|
|
:current-page="queryInfo.pageNum"
|
|
:page-sizes="[10, 20, 30, 40]"
|
|
:page-size="queryInfo.pageSize"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
:total="total">
|
|
</el-pagination>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data () {
|
|
return {
|
|
queryInfo: {
|
|
query: '',
|
|
pageNum: 1,
|
|
pageSize: 10
|
|
},
|
|
total: 0,
|
|
onShelvesList: [],
|
|
selectShelvesList: []
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
handleSizeChange (val) {
|
|
this.queryInfo.pageSize = val
|
|
this.getShelves()
|
|
},
|
|
|
|
handleCurrentChange (val) {
|
|
this.queryInfo.pageNum = val
|
|
this.getShelves()
|
|
},
|
|
|
|
handleSelectionChange (val) {
|
|
this.selectShelvesList = val
|
|
},
|
|
|
|
check () {
|
|
for (var i = 0; i < this.selectShelvesList.length; i++) {
|
|
if (this.selectShelvesList[i].status === '待审核') {
|
|
this.selectShelvesList[i].status = '已审核'
|
|
this.selectShelvesList[i].checkPerson = window.sessionStorage.getItem('token').substr(32)
|
|
this.updataShelves(this.selectShelvesList[i])
|
|
// this.$message.success("订单" + this.selectShelvesList[i].shelvesId + "审核成功")
|
|
} else if (this.selectShelvesList[i].status === '已审核') {
|
|
this.$message.error('订单' + this.selectShelvesList[i].shelvesId + '已审核')
|
|
} else {
|
|
this.$message.error('订单' + this.selectShelvesList[i].shelvesId + '进行中')
|
|
}
|
|
this.getShelves()
|
|
}
|
|
},
|
|
|
|
cancelCheck () {
|
|
for (var i = 0; i < this.selectShelvesList.length; i++) {
|
|
if (this.selectShelvesList[i].status === '已审核') {
|
|
this.selectShelvesList[i].status = '待审核'
|
|
this.selectShelvesList[i].checkPerson = ''
|
|
this.selectShelvesList[i].checkTime = ''
|
|
this.updataShelves(this.selectShelvesList[i])
|
|
// this.$message.success("订单" + this.selectShelvesList[i].shelvesId + "撤销审核成功")
|
|
} else if (this.selectShelvesList[i].status === '待审核') {
|
|
this.$message.error('订单' + this.selectShelvesList[i].shelvesId + '未审核')
|
|
} else {
|
|
this.$message.error('订单' + this.selectShelvesList[i].shelvesId + '进行中')
|
|
}
|
|
this.getShelves()
|
|
}
|
|
},
|
|
|
|
cancelShelves () {
|
|
for (var i = 0; i < this.selectShelvesList.length; i++) {
|
|
if (this.selectShelvesList[i].status === '待审核') {
|
|
this.deleteShelves(this.selectShelvesList[i].shelvesId)
|
|
this.$message.success('订单' + this.selectShelvesList[i].shelvesId + '撤销接货成功')
|
|
} else {
|
|
this.$message.error('订单' + this.selectShelvesList[i].shelvesId + '进行中')
|
|
}
|
|
}
|
|
},
|
|
|
|
async getShelves () {
|
|
const { data: result } = await this.$http.get('/shelves/getShelves', { params: this.queryInfo })
|
|
if (result.status === 201) return this.$message.error('获取列表失败')
|
|
this.total = result.data.total
|
|
this.onShelvesList = result.data.rows
|
|
},
|
|
|
|
async updataShelves (shelves) {
|
|
const { data: result } = await this.$http.put('/shelves/updataShelves', shelves)
|
|
if (result.status === 200) return this.$message.success('更新成功')
|
|
return this.$message.error('更新失败')
|
|
},
|
|
|
|
async deleteShelves (id) {
|
|
const { data: result } = await this.$http.delete(`/shelves/deleteShelves/${id}`)
|
|
if (result.status === 201) return this.$message.error('撤销失败')
|
|
this.getShelves()
|
|
}
|
|
|
|
},
|
|
mounted () {
|
|
this.getShelves()
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
</style>
|
|
|