This commit is contained in:
parent
075db76d00
commit
fc9f0ea2a3
|
|
@ -97,3 +97,15 @@ export function storagePut(data) {
|
|||
data
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询存取酒记录
|
||||
* @returns
|
||||
*/
|
||||
export function recordList(params) {
|
||||
return request({
|
||||
url: "/api/storage/recordList",
|
||||
method: "get",
|
||||
params
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
<template>
|
||||
<el-dialog title="记录" width="500px" :visible.sync="dialogVisible">
|
||||
<el-steps :active="list.length" direction="vertical" :space="100">
|
||||
<el-step :title="item.content" :description="item.time" v-for="item in list" :key="item.id"></el-step>
|
||||
</el-steps>
|
||||
<el-empty description="暂无记录" v-if="!list.length"></el-empty>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { recordList } from '@/api/application'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
loading: false,
|
||||
list: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 查询存取酒记录
|
||||
async recordList(storageId) {
|
||||
try {
|
||||
this.loading = true
|
||||
const res = await recordList({ storageId: storageId })
|
||||
this.list = res.content
|
||||
this.loading = false
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
show(id) {
|
||||
this.dialogVisible = true
|
||||
this.recordList(id)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
<el-table-column label="操作" width="120">
|
||||
<template v-slot="scope">
|
||||
<div style="display: flex;gap: 10px;">
|
||||
<el-button type="text">查看记录</el-button>
|
||||
<el-button type="text" @click="$refs.HistoryModal.show(scope.row.id)">查看记录</el-button>
|
||||
<el-button type="text" @click="$refs.addModal.show(scope.row)"
|
||||
v-if="scope.row.status == 1">取酒</el-button>
|
||||
</div>
|
||||
|
|
@ -75,15 +75,18 @@
|
|||
@current-change="paginationChange" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||
</div>
|
||||
<addModal ref="addModal" @success="getTableData" />
|
||||
<HistoryModal ref="HistoryModal" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import addModal from './addModal'
|
||||
import HistoryModal from './historyModal'
|
||||
import { storageList } from '@/api/application'
|
||||
export default {
|
||||
components: {
|
||||
addModal
|
||||
addModal,
|
||||
HistoryModal
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in New Issue