|
|
@@ -1,15 +1,154 @@
|
|
|
<template>
|
|
|
- <div class="agent_page">
|
|
|
- <h3>订单管理</h3>
|
|
|
+ <div class="agent_page adffc">
|
|
|
+ <div class="ap_title">{{ title }}</div>
|
|
|
+ <el-form :model="queryParams" ref="queryRef" label-width="98px" style="margin-top: 20px;">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6" style="padding-right: 20px;">
|
|
|
+ <el-form-item label="订单类型">
|
|
|
+ <el-select style="width: 100%" v-model="queryParams.xxx" placeholder="请选择订单类型" filterable clearable>
|
|
|
+ <el-option label="基础版" :value="1"/>
|
|
|
+ <el-option label="专业版" :value="2"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" style="padding-right: 20px;">
|
|
|
+ <el-form-item label="订单状态">
|
|
|
+ <el-select style="width: 100%" v-model="queryParams.yyy" placeholder="请选择订单状态" filterable clearable>
|
|
|
+ <el-option label="全部" value=""/>
|
|
|
+ <el-option label="已完成" :value="2"/>
|
|
|
+ <el-option label="待支付" :value="1"/>
|
|
|
+ <el-option label="已取消" :value="-2"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item style="display: flex;">
|
|
|
+ <el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
|
+ <el-button type="primary" @click="getList">查询</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <div class="ap_line"></div>
|
|
|
+ <div class="ap_title" style="margin-top: 20px;">订单列表</div>
|
|
|
+ <el-table :data="dataList" border cell-class-name="vertical-top-cell" v-loading="loading" empty-text="暂无订单" max-height="578px" style="margin-top: 16px;">
|
|
|
+ <el-table-column label="序号" width="50">
|
|
|
+ <template #default="scope">
|
|
|
+ {{ scope.$index + 1 }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="交易时间" prop="xx"></el-table-column>
|
|
|
+ <el-table-column label="订单编号" prop="xx"></el-table-column>
|
|
|
+ <el-table-column label="购买类型" prop="xx">
|
|
|
+ <template #default="{ row }"></template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="购买次数" prop="xx">
|
|
|
+ <template #default="{ row }"></template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="实付金额(元)" prop="xx"></el-table-column>
|
|
|
+ <el-table-column label="有效期至" prop="xx">
|
|
|
+ <template #default="{ row }"></template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="手机号" prop="xx"></el-table-column>
|
|
|
+ <el-table-column label="用户名" prop="xx"></el-table-column>
|
|
|
+ <el-table-column label="订单状态" prop="xx">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div class="ostatus" :class="ostatusColor[row.ostatus]">{{ostatusText[row.status]}}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-row style="display: flex;justify-content: center;">
|
|
|
+ <el-pagination
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="queryParams.page"
|
|
|
+ :page-sizes="[5, 10, 20, 50]"
|
|
|
+ :page-size="10"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="total"
|
|
|
+ v-show="total > 0">
|
|
|
+ </el-pagination>
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup name="">
|
|
|
- import { ref, getCurrentInstance } from 'vue'
|
|
|
+ import { ref, getCurrentInstance, onMounted } from 'vue'
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
-
|
|
|
+ const title = proxy.$route.meta.title;
|
|
|
+ const queryParams = ref({
|
|
|
+ xxx: '',
|
|
|
+ yyy: ''
|
|
|
+ })
|
|
|
+ const queryRef = ref(null)
|
|
|
+ const dataList = ref([])
|
|
|
+ const total = ref(0)
|
|
|
+ const loading = ref(false)
|
|
|
+ const ostatusColor = ref({
|
|
|
+ '-2': 'grey',
|
|
|
+ '1': 'red',
|
|
|
+ '2': 'green'
|
|
|
+ })
|
|
|
+ const ostatusText = ref({
|
|
|
+ '-2': '已取消',
|
|
|
+ '1': '待支付',
|
|
|
+ '2': '已完成'
|
|
|
+ })
|
|
|
+
|
|
|
+ const resetQuery = () => {
|
|
|
+ proxy.$refs.queryRef.resetFields();
|
|
|
+ queryParams.value = {
|
|
|
+ xxx: '',
|
|
|
+ yyy: ''
|
|
|
+ }
|
|
|
+ getList();
|
|
|
+ }
|
|
|
+
|
|
|
+ const getList = async () => {
|
|
|
+ let query = {...queryParams.value};
|
|
|
+ loading.value = true;
|
|
|
+ // const res = await getCoachList(query);
|
|
|
+ // dataList.value = res.data.list;
|
|
|
+ // total.value = res.data.total;
|
|
|
+ loading.value = false;
|
|
|
+ }
|
|
|
+ const handleSizeChange = (e)=>{
|
|
|
+ queryParams.value.limit = e;
|
|
|
+ getList();
|
|
|
+ }
|
|
|
+ const handleCurrentChange = (e)=>{
|
|
|
+ queryParams.value.page = e;
|
|
|
+ getList();
|
|
|
+ }
|
|
|
+
|
|
|
+ onMounted(()=>{
|
|
|
+ getList();
|
|
|
+ })
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
-
|
|
|
+ .agent_page{
|
|
|
+ padding: 24px 16px;
|
|
|
+
|
|
|
+ .ostatus{
|
|
|
+ padding: 5px 7px;
|
|
|
+ border-radius: 6px;
|
|
|
+ font-family: PingFangSC, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 16px;
|
|
|
+ &.green{
|
|
|
+ background: #EAF6F6;
|
|
|
+ color: #199C9C;
|
|
|
+ }
|
|
|
+ &.grey{
|
|
|
+ background: #F5F8FA;
|
|
|
+ color: #95A5B1;
|
|
|
+ }
|
|
|
+ &.red{
|
|
|
+ background: #FFF1F1;
|
|
|
+ color: #FD4F66;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|