2023-11-06 18:01:40 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
<!-- 用户select选项 -->
|
2023-11-07 13:28:53 +08:00
|
|
|
<el-button-group class="m-b-15">
|
|
|
|
|
<SelectionOrderStatus class="m-r-20" />
|
|
|
|
|
<SelectionOrderBack />
|
2023-11-06 18:01:40 +08:00
|
|
|
</el-button-group>
|
2023-11-07 13:28:53 +08:00
|
|
|
<el-button-group class="m-r-20">
|
|
|
|
|
<SelectionShopId v-model="form.shop_id" :allSel="true" />
|
2023-11-06 18:01:40 +08:00
|
|
|
</el-button-group>
|
2023-11-07 13:28:53 +08:00
|
|
|
<!-- 订单列表 -->
|
2023-11-06 18:01:40 +08:00
|
|
|
<el-table class="m-t-20 w-100" ref="myTable"
|
2023-11-07 13:28:53 +08:00
|
|
|
:data="orderList.slice((currentPage - 1) * pageSize, currentPage * pageSize)" border tooltip-effect="dark">
|
2023-11-06 18:01:40 +08:00
|
|
|
<el-table-column align="center" type="selection" width="40">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" prop="id" label="id" width="50">
|
|
|
|
|
</el-table-column>
|
2023-11-07 13:28:53 +08:00
|
|
|
<el-table-column prop="order_sn" label="订单号" width="150" min-width="150">
|
2023-11-06 18:01:40 +08:00
|
|
|
</el-table-column>
|
2023-11-07 13:28:53 +08:00
|
|
|
<el-table-column prop="tel" label="客户电话" min-width="150">
|
2023-11-06 18:01:40 +08:00
|
|
|
</el-table-column>
|
2023-11-07 13:28:53 +08:00
|
|
|
<el-table-column label="下单时间" width="140" min-width="140">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.addtime | parseTime('{y}-{m}-{d} {h}:{i}') }}
|
2023-11-06 18:01:40 +08:00
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2023-11-07 13:28:53 +08:00
|
|
|
<el-table-column prop="controler" label="操作" width="200" min-width="200">
|
2023-11-06 18:01:40 +08:00
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button-group>
|
|
|
|
|
<el-button type="warning" icon="el-icon-edit"
|
2023-11-07 13:28:53 +08:00
|
|
|
@click="$router.replace(`/admin/edit/${scope.row.id}`)">编辑</el-button>
|
|
|
|
|
<el-button type="danger" icon="el-icon-delete" @click="deleteAdmin([scope.row.id])">删除</el-button>
|
2023-11-06 18:01:40 +08:00
|
|
|
</el-button-group>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<!-- 分页 -->
|
|
|
|
|
<el-pagination class="m-t-20" layout="prev, pager, next" :current-page.sync="currentPage" :page-size="pageSize"
|
2023-11-07 13:28:53 +08:00
|
|
|
:total="orderList.length">
|
2023-11-06 18:01:40 +08:00
|
|
|
</el-pagination>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2023-11-07 13:28:53 +08:00
|
|
|
|
|
|
|
|
import { countSelIdArr, parseTime } from '@/utils'
|
2023-11-06 18:01:40 +08:00
|
|
|
import SelectionShopId from '@/components/SelectionShopId'
|
2023-11-07 13:28:53 +08:00
|
|
|
import SelectionOrderStatus from '@/components/SelectionOrderStatus'
|
|
|
|
|
import SelectionOrderBack from '@/components/SelectionOrderBack'
|
2023-11-06 18:01:40 +08:00
|
|
|
|
|
|
|
|
export default {
|
2023-11-07 13:28:53 +08:00
|
|
|
name: 'Order',
|
2023-11-06 18:01:40 +08:00
|
|
|
data () {
|
|
|
|
|
return {
|
2023-11-07 13:28:53 +08:00
|
|
|
pageSize: 50, // 每页显示记录条数
|
2023-11-06 18:01:40 +08:00
|
|
|
currentPage: 1, // 当前页
|
|
|
|
|
form: {
|
2023-11-07 13:28:53 +08:00
|
|
|
shop_id: ''
|
|
|
|
|
}
|
2023-11-06 18:01:40 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
SelectionShopId,
|
2023-11-07 13:28:53 +08:00
|
|
|
SelectionOrderStatus,
|
|
|
|
|
SelectionOrderBack
|
2023-11-06 18:01:40 +08:00
|
|
|
},
|
|
|
|
|
computed: {
|
2023-11-07 13:28:53 +08:00
|
|
|
// 获取订单列表
|
|
|
|
|
orderList () {
|
|
|
|
|
return this.$store.state.orderList
|
2023-11-06 18:01:40 +08:00
|
|
|
}
|
2023-11-07 13:28:53 +08:00
|
|
|
|
2023-11-06 18:01:40 +08:00
|
|
|
},
|
|
|
|
|
methods: {
|
2023-11-07 13:28:53 +08:00
|
|
|
countSelIdArr
|
2023-11-06 18:01:40 +08:00
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
},
|
|
|
|
|
created () {
|
|
|
|
|
},
|
|
|
|
|
filters: {
|
2023-11-07 13:28:53 +08:00
|
|
|
countSelIdArr,
|
|
|
|
|
parseTime
|
2023-11-06 18:01:40 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
@import "@/styles/theme.scss";
|
|
|
|
|
|
|
|
|
|
i {
|
|
|
|
|
font-size: 18px !important;
|
|
|
|
|
margin-right: 12px;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
}
|
|
|
|
|
</style>
|