EnterList.vue 3.24 KB
<template>
  <div>
    <a-card title="入驻申请" :bordered="false" class="list-table-card">
      <div class="soft-page-stack">
        <div class="soft-note-card">
          <strong>功能暂未开放</strong>
          <p>当前页面保留原有布局用于后续开放,暂不提供真实数据查询和审核操作。</p>
        </div>

        <div class="list-toolbar">
          <div class="list-toolbar-left">
            <a-select v-model:value="filterStatus" placeholder="状态" allowClear class="list-filter" @change="loadList">
              <a-select-option :value="0">未处理</a-select-option>
              <a-select-option :value="1">已通过</a-select-option>
              <a-select-option :value="-1">已拒绝</a-select-option>
            </a-select>
            <a-select v-model:value="filterType" placeholder="类型" allowClear class="list-filter" @change="loadList">
              <a-select-option :value="1">商家入驻</a-select-option>
              <a-select-option :value="2">骑手入驻</a-select-option>
              <a-select-option :value="3">商务合作</a-select-option>
            </a-select>
          </div>
        </div>

        <a-table :dataSource="list" :columns="columns" :loading="loading" rowKey="id" :pagination="false">
          <template #bodyCell="{ column, record }">
            <template v-if="column.key === 'type'">
              <a-tag>{{ typeMap[record.type] }}</a-tag>
            </template>
            <template v-if="column.key === 'status'">
              <a-tag :color="record.status === 1 ? 'green' : record.status === -1 ? 'red' : 'orange'">
                {{ statusMap[record.status] }}
              </a-tag>
            </template>
            <template v-if="column.key === 'action'">
              <a-space v-if="record.status === 0">
                <a-popconfirm title="确认通过?" @confirm="handle(record.id, 1)">
                  <a style="color:#bfbfbf">通过</a>
                </a-popconfirm>
                <a-popconfirm title="确认拒绝?" @confirm="handle(record.id, -1)">
                  <a style="color:#bfbfbf">拒绝</a>
                </a-popconfirm>
              </a-space>
              <span v-else>-</span>
            </template>
          </template>
        </a-table>
      </div>
    </a-card>
  </div>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { message } from 'ant-design-vue'

const loading = ref(false)
const list = ref<any[]>([])
const filterStatus = ref<number | undefined>()
const filterType = ref<number | undefined>()

const typeMap: Record<number, string> = { 1: '商家入驻', 2: '骑手入驻', 3: '商务合作' }
const statusMap: Record<number, string> = { 0: '未处理', 1: '已通过', [-1]: '已拒绝' }

const columns = [
  { title: 'ID', dataIndex: 'id', width: 80 },
  { title: '联系人', dataIndex: 'name' },
  { title: '手机', dataIndex: 'mobile' },
  { title: '店铺名', dataIndex: 'storeName' },
  { title: '类型', key: 'type' },
  { title: '状态', key: 'status' },
  { title: '操作', key: 'action' },
]

function loadList() {
  list.value = []
}

function handle(_id: number, _status: number) {
  message.warning('暂未开放')
}

onMounted(() => {
  message.warning('暂未开放')
  loadList()
})
</script>