This commit is contained in:
tt 2024-10-22 16:47:52 +08:00
parent 492b06e7be
commit d16d4f0a12
1 changed files with 74 additions and 43 deletions

View File

@ -1,19 +1,40 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="filter-container"> <div class="filter-container">
<el-input v-model="listQuery.sn" placeholder="订单号" style="width: 300px;" class="filter-item" /> <el-input
v-model="listQuery.sn"
placeholder="订单号"
style="width: 300px"
class="filter-item"
/>
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getList"> <el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="getList"
>
搜索 搜索
</el-button> </el-button>
</div> </div>
<el-table v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%"> <el-table
v-loading="listLoading"
:data="list"
border
fit
highlight-current-row
style="width: 100%"
>
<el-table-column align="center" label="操作"> <el-table-column align="center" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.status ==0 && scope.row.status == 0" type="primary" size="small" icon="el-icon-check" @click="onPass(scope.row)"> <el-button
v-if="scope.row.status == 0 && scope.row.status == 0"
type="primary"
size="small"
icon="el-icon-check"
@click="onPass(scope.row)"
>
确认 确认
</el-button> </el-button>
</template> </template>
@ -22,7 +43,12 @@
<el-table-column align="center" label="订单号" prop="orderInfo.sn" /> <el-table-column align="center" label="订单号" prop="orderInfo.sn" />
<el-table-column align="center" label="出游日期" prop="travel_date" /> <el-table-column align="center" label="出游日期" prop="travel_date" />
<el-table-column align="center" label="出游人数" prop="num" /> <el-table-column align="center" label="出游人数" prop="num" />
<el-table-column align="center" label="出行人名称" width="100" prop="name" /> <el-table-column
align="center"
label="出行人名称"
width="100"
prop="name"
/>
<el-table-column align="center" label="联系电话" prop="mobile" /> <el-table-column align="center" label="联系电话" prop="mobile" />
<el-table-column align="center" label="状态"> <el-table-column align="center" label="状态">
<template slot-scope="scope"> <template slot-scope="scope">
@ -50,19 +76,17 @@
:limit.sync="listQuery.limit" :limit.sync="listQuery.limit"
@pagination="getList" @pagination="getList"
/> />
</div> </div>
</template> </template>
<script> <script>
// import Pagination from '@/Wangeditor/Pagination' // import Pagination from '@/Wangeditor/Pagination'
import Pagination from '@/components/PaginationFixed' import Pagination from "@/components/PaginationFixed";
export default { export default {
name: 'Orderlist', name: "Orderlist",
components: { Pagination }, components: { Pagination },
filters: { filters: {},
},
data() { data() {
return { return {
list: [], list: [],
@ -70,45 +94,49 @@ export default {
listLoading: true, listLoading: true,
listQuery: { listQuery: {
page: 1, page: 1,
limit: 10 limit: 10,
}, },
oss: {}, oss: {},
item: {}, item: {},
dialogVisible: false dialogVisible: false,
} };
}, },
created() { created() {
this.getList() this.getList();
}, },
methods: { methods: {
getList() { getList() {
this.$axios.get('/admin/orderbooks/list', { params: this.listQuery }).then(response => { this.$axios
this.list = response.data.data .get("/admin/orderbooks/list", { params: this.listQuery })
this.total = response.data.total .then((response) => {
this.oss = response.ext this.list = response.data.data;
this.listLoading = false this.total = response.data.total;
}) this.oss = response.ext;
this.listLoading = false;
});
}, },
onBack() { onBack() {
this.$axios.post('/admin/order/back', this.item).then(res => { this.$axios
this.dialogVisible = false .post("/admin/order/back", this.item)
this.item = {} .then((res) => {
this.getList() this.dialogVisible = false;
}).catch(err => { this.item = {};
this.getList();
}) })
.catch((err) => {});
}, },
onPass(item) { onPass(item) {
this.$axios.post('/admin/orderbooks/updateStatus', { id: item.id }).then(res => { this.$axios
this.dialogVisible = false .post("/admin/orderbooks/updateStatus", { id: item.id })
this.item = {} .then((res) => {
this.getList() this.dialogVisible = false;
}).catch(err => { this.item = {};
this.getList();
}) })
} .catch((err) => {});
} },
} },
};
</script> </script>
<style scoped> <style scoped>
.app-container { .app-container {
@ -120,4 +148,7 @@ export default {
.el-table { .el-table {
padding-bottom: 52px; /* 分页条的高度,以避免内容重叠 */ padding-bottom: 52px; /* 分页条的高度,以避免内容重叠 */
} }
v::deep .el-image-viewer__close {
background-color: #fff;
}
</style> </style>