优化
This commit is contained in:
@@ -97,3 +97,15 @@ export function storagePut(data) {
|
|||||||
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">
|
<el-table-column label="操作" width="120">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div style="display: flex;gap: 10px;">
|
<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)"
|
<el-button type="text" @click="$refs.addModal.show(scope.row)"
|
||||||
v-if="scope.row.status == 1">取酒</el-button>
|
v-if="scope.row.status == 1">取酒</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -75,15 +75,18 @@
|
|||||||
@current-change="paginationChange" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
@current-change="paginationChange" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
<addModal ref="addModal" @success="getTableData" />
|
<addModal ref="addModal" @success="getTableData" />
|
||||||
|
<HistoryModal ref="HistoryModal" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import addModal from './addModal'
|
import addModal from './addModal'
|
||||||
|
import HistoryModal from './historyModal'
|
||||||
import { storageList } from '@/api/application'
|
import { storageList } from '@/api/application'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
addModal
|
addModal,
|
||||||
|
HistoryModal
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user