补充页面

This commit is contained in:
2026-02-11 20:16:51 +08:00
parent 53820a4654
commit db9c4da279
12 changed files with 1326 additions and 248 deletions

View File

@@ -1,23 +1,177 @@
<template>
<view class="admin-page-container">
<view class="page-card">
<view class="page-header">
<text class="page-title">管理员列表</text>
<!-- 搜索栏 -->
<view class="search-wrap">
<view class="search-item">
<text class="label">状态:</text>
<picker mode="selector" :range="statusRange" @change="onStatusChange">
<view class="picker-input">{{ statusText }}</view>
</picker>
</view>
<view class="search-item">
<text class="label">搜索:</text>
<input class="input" placeholder="请输入姓名或者账号" v-model="searchKey" />
</view>
<button class="btn btn-primary" @click="onSearch">查询</button>
</view>
<view class="page-content">
<text class="placeholder-text">管理员列表 页面开发中...</text>
<view class="action-wrap">
<button class="btn btn-primary" @click="onAdd">添加管理员</button>
</view>
<!-- 表格区域 -->
<view class="table-wrap">
<view class="table-header">
<view class="th" style="flex: 2;">姓名</view>
<view class="th" style="flex: 2;">账号</view>
<view class="th" style="flex: 2;">身份</view>
<view class="th" style="flex: 3;">最后一次登录时间</view>
<view class="th" style="flex: 3;">最后一次登录ip</view>
<view class="th" style="flex: 1;">开启</view>
<view class="th" style="flex: 2;">操作</view>
</view>
<view class="table-body">
<view class="no-data">
<text class="no-data-text">暂无数据</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="uts">
import { ref } from 'vue'
const searchKey = ref('')
const statusRange = ['所有', '启用', '禁用']
const statusIndex = ref(0)
const statusText = ref('请选择')
function onStatusChange(e: any) {
statusIndex.value = parseInt(e.detail.value.toString())
statusText.value = statusRange[statusIndex.value]
}
function onSearch() {
console.log('Search:', searchKey.value, statusText.value)
}
function onAdd() {
console.log('Add admin')
}
</script>
<style scoped>
.admin-page-container { padding: 20px; background-color: #f5f7f9; min-height: 100vh; }
.page-card { background-color: #fff; border-radius: 4px; padding: 20px; box-shadow: 0 1px 4px rgba(0,21,41,0.08); }
.page-header { margin-bottom: 20px; border-bottom: 1px solid #f0f0f0; padding-bottom: 15px; }
.page-title { font-size: 16px; font-weight: bold; color: #303133; }
.placeholder-text { font-size: 14px; color: #909399; }
.admin-page-container {
padding: 15px;
background-color: #f5f7f9;
min-height: 100vh;
}
.page-card {
background-color: #fff;
border-radius: 4px;
padding: 20px;
}
.search-wrap {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
padding-bottom: 20px;
border-bottom: 1px solid #f0f0f0;
margin-bottom: 20px;
}
.search-item {
display: flex;
flex-direction: row;
align-items: center;
margin-right: 20px;
margin-bottom: 10px;
}
.label {
font-size: 14px;
color: #606266;
margin-right: 8px;
}
.picker-input {
width: 150px;
height: 32px;
line-height: 32px;
padding: 0 10px;
border: 1px solid #dcdfe6;
border-radius: 4px;
font-size: 14px;
color: #606266;
background-color: #fff;
}
.input {
width: 220px;
height: 32px;
padding: 0 10px;
border: 1px solid #dcdfe6;
border-radius: 4px;
font-size: 14px;
color: #606266;
}
.btn {
height: 32px;
line-height: 30px;
padding: 0 15px;
font-size: 14px;
border-radius: 4px;
border: none;
margin-bottom: 10px;
}
.btn-primary {
background-color: #1890ff;
color: #fff;
}
.action-wrap {
margin-bottom: 20px;
}
.table-wrap {
width: 100%;
border: 1px solid #f0f0f0;
}
.table-header {
display: flex;
flex-direction: row;
background-color: #f8f8f9;
}
.th {
padding: 12px 10px;
font-size: 14px;
font-weight: bold;
color: #515a6e;
border-bottom: 1px solid #f0f0f0;
text-align: center;
}
.table-body {
min-height: 100px;
}
.no-data {
padding: 40px 0;
text-align: center;
}
.no-data-text {
font-size: 14px;
color: #c5c8ce;
}
</style>

View File

@@ -1,23 +1,188 @@
<template>
<view class="admin-page-container">
<view class="page-card">
<view class="page-header">
<text class="page-title">权限设置</text>
<!-- 搜索栏 -->
<view class="search-wrap">
<view class="search-item">
<text class="label">按钮名称:</text>
<input class="input" placeholder="请输入按钮名称" v-model="searchKey" />
</view>
<button class="btn btn-primary" @click="onSearch">查询</button>
</view>
<view class="page-content">
<text class="placeholder-text">权限设置 页面开发中...</text>
<!-- 表格区域 -->
<view class="table-wrap">
<view class="table-header">
<view class="th" style="flex: 4; text-align: left; padding-left: 20px;">按钮名称</view>
<view class="th" style="flex: 3;">类型</view>
<view class="th" style="flex: 2;">排序</view>
<view class="th" style="flex: 2;">是否显示</view>
<view class="th" style="flex: 2;">操作</view>
</view>
<view class="table-body">
<view v-for="item in permissionList" :key="item.id" class="tr">
<view class="td" style="flex: 4; text-align: left; padding-left: 20px;">
<text v-if="item.hasChildren" class="expand-icon">▶</text>
<text class="menu-name">{{ item.name }}</text>
</view>
<view class="td" style="flex: 3;">{{ item.type }}</view>
<view class="td" style="flex: 2;">{{ item.sort }}</view>
<view class="td" style="flex: 2;">
<switch :checked="item.isshow" color="#1890ff" @change="onToggleShow(item)" />
</view>
<view class="td" style="flex: 2;">
<text class="action-btn" @click="onEdit(item)">编辑</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="uts">
import { ref, reactive } from 'vue'
const searchKey = ref('')
type PermissionItem = {
id: number
name: string
type: string
sort: number
isshow: boolean
hasChildren: boolean
}
const permissionList = reactive<PermissionItem[]>([
{ id: 1, name: '主页', type: '菜单:/admin/index', sort: 127, isshow: true, hasChildren: false },
{ id: 2, name: '用户', type: '菜单:/admin/user', sort: 125, isshow: true, hasChildren: true },
{ id: 3, name: '订单', type: '菜单:/admin/order', sort: 120, isshow: true, hasChildren: true },
{ id: 4, name: '商品', type: '菜单:/admin/product', sort: 115, isshow: true, hasChildren: true },
{ id: 5, name: '营销', type: '菜单:/admin/marketing', sort: 110, isshow: true, hasChildren: true }
])
function onSearch() {
console.log('Search:', searchKey.value)
}
function onToggleShow(item: PermissionItem) {
item.isshow = !item.isshow
}
function onEdit(item: PermissionItem) {
console.log('Edit:', item.name)
}
</script>
<style scoped>
.admin-page-container { padding: 20px; background-color: #f5f7f9; min-height: 100vh; }
.page-card { background-color: #fff; border-radius: 4px; padding: 20px; box-shadow: 0 1px 4px rgba(0,21,41,0.08); }
.page-header { margin-bottom: 20px; border-bottom: 1px solid #f0f0f0; padding-bottom: 15px; }
.page-title { font-size: 16px; font-weight: bold; color: #303133; }
.placeholder-text { font-size: 14px; color: #909399; }
.admin-page-container {
padding: 15px;
background-color: #f5f7f9;
min-height: 100vh;
}
.page-card {
background-color: #fff;
border-radius: 4px;
padding: 20px;
}
.search-wrap {
display: flex;
flex-direction: row;
align-items: center;
padding-bottom: 20px;
border-bottom: 1px solid #f0f0f0;
margin-bottom: 20px;
}
.search-item {
display: flex;
flex-direction: row;
align-items: center;
margin-right: 20px;
}
.label {
font-size: 14px;
color: #606266;
margin-right: 8px;
}
.input {
width: 200px;
height: 32px;
padding: 0 10px;
border: 1px solid #dcdfe6;
border-radius: 4px;
font-size: 14px;
color: #606266;
}
.btn {
height: 32px;
line-height: 30px;
padding: 0 15px;
font-size: 14px;
border-radius: 4px;
border: none;
}
.btn-primary {
background-color: #1890ff;
color: #fff;
}
.table-wrap {
width: 100%;
border: 1px solid #f0f0f0;
}
.table-header {
display: flex;
flex-direction: row;
background-color: #f8f8f9;
}
.th {
padding: 12px 10px;
font-size: 14px;
font-weight: bold;
color: #515a6e;
border-bottom: 1px solid #f0f0f0;
text-align: center;
}
.tr {
display: flex;
flex-direction: row;
border-bottom: 1px solid #f0f0f0;
}
.td {
padding: 12px 10px;
font-size: 14px;
color: #515a6e;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.expand-icon {
font-size: 12px;
color: #999;
margin-right: 5px;
}
.menu-name {
font-size: 14px;
}
.action-btn {
color: #1890ff;
font-size: 13px;
cursor: pointer;
}
</style>

View File

@@ -1,23 +1,174 @@
<template>
<view class="admin-page-container">
<view class="page-card">
<view class="page-header">
<text class="page-title">角色管理</text>
<!-- 搜索栏 -->
<view class="search-wrap">
<view class="search-item">
<text class="label">状态:</text>
<picker mode="selector" :range="statusRange" @change="onStatusChange">
<view class="picker-input">{{ statusText }}</view>
</picker>
</view>
<view class="search-item">
<text class="label">身份昵称:</text>
<input class="input" placeholder="请输入身份昵称" v-model="searchKey" />
</view>
<button class="btn btn-primary" @click="onSearch">查询</button>
</view>
<view class="page-content">
<text class="placeholder-text">角色管理 页面开发中...</text>
<view class="action-wrap">
<button class="btn btn-primary" @click="onAdd">添加身份</button>
</view>
<!-- 表格区域 -->
<view class="table-wrap">
<view class="table-header">
<view class="th" style="flex: 1;">ID</view>
<view class="th" style="flex: 3;">身份昵称</view>
<view class="th" style="flex: 2;">状态</view>
<view class="th" style="flex: 2;">操作</view>
</view>
<view class="table-body">
<view class="no-data">
<text class="no-data-text">暂无数据</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="uts">
import { ref } from 'vue'
const searchKey = ref('')
const statusRange = ['所有', '启用', '禁用']
const statusIndex = ref(0)
const statusText = ref('请选择')
function onStatusChange(e: any) {
statusIndex.value = parseInt(e.detail.value.toString())
statusText.value = statusRange[statusIndex.value]
}
function onSearch() {
console.log('Search:', searchKey.value, statusText.value)
}
function onAdd() {
console.log('Add role')
}
</script>
<style scoped>
.admin-page-container { padding: 20px; background-color: #f5f7f9; min-height: 100vh; }
.page-card { background-color: #fff; border-radius: 4px; padding: 20px; box-shadow: 0 1px 4px rgba(0,21,41,0.08); }
.page-header { margin-bottom: 20px; border-bottom: 1px solid #f0f0f0; padding-bottom: 15px; }
.page-title { font-size: 16px; font-weight: bold; color: #303133; }
.placeholder-text { font-size: 14px; color: #909399; }
.admin-page-container {
padding: 15px;
background-color: #f5f7f9;
min-height: 100vh;
}
.page-card {
background-color: #fff;
border-radius: 4px;
padding: 20px;
}
.search-wrap {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
padding-bottom: 20px;
border-bottom: 1px solid #f0f0f0;
margin-bottom: 20px;
}
.search-item {
display: flex;
flex-direction: row;
align-items: center;
margin-right: 20px;
margin-bottom: 10px;
}
.label {
font-size: 14px;
color: #606266;
margin-right: 8px;
}
.picker-input {
width: 150px;
height: 32px;
line-height: 32px;
padding: 0 10px;
border: 1px solid #dcdfe6;
border-radius: 4px;
font-size: 14px;
color: #606266;
background-color: #fff;
}
.input {
width: 180px;
height: 32px;
padding: 0 10px;
border: 1px solid #dcdfe6;
border-radius: 4px;
font-size: 14px;
color: #606266;
}
.btn {
height: 32px;
line-height: 30px;
padding: 0 15px;
font-size: 14px;
border-radius: 4px;
border: none;
margin-bottom: 10px;
}
.btn-primary {
background-color: #1890ff;
color: #fff;
}
.action-wrap {
margin-bottom: 20px;
}
.table-wrap {
width: 100%;
border: 1px solid #f0f0f0;
}
.table-header {
display: flex;
flex-direction: row;
background-color: #f8f8f9;
}
.th {
padding: 12px 10px;
font-size: 14px;
font-weight: bold;
color: #515a6e;
border-bottom: 1px solid #f0f0f0;
text-align: center;
}
.table-body {
min-height: 100px;
}
.no-data {
padding: 40px 0;
text-align: center;
}
.no-data-text {
font-size: 14px;
color: #c5c8ce;
}
</style>

View File

@@ -1,23 +1,162 @@
<template>
<view class="admin-page-container">
<view class="page-card">
<view class="page-header">
<text class="page-title">配送员管理</text>
<view class="action-wrap">
<button class="btn btn-primary" @click="onAdd">添加配送员</button>
</view>
<view class="page-content">
<text class="placeholder-text">配送员管理 页面开发中...</text>
<!-- 表格区域 -->
<view class="table-wrap">
<view class="table-header">
<view class="th" style="flex: 1;">ID</view>
<view class="th" style="flex: 1.5;">头像</view>
<view class="th" style="flex: 2;">名称</view>
<view class="th" style="flex: 2.5;">手机号码</view>
<view class="th" style="flex: 1.5;">是否显示</view>
<view class="th" style="flex: 3;">添加时间</view>
<view class="th" style="flex: 2;">操作</view>
</view>
<view class="table-body">
<view v-for="item in courierList" :key="item.id" class="tr">
<view class="td" style="flex: 1;">{{ item.id }}</view>
<view class="td" style="flex: 1.5;">
<image class="avatar" :src="item.avatar" mode="aspectFill" />
</view>
<view class="td" style="flex: 2;">{{ item.name }}</view>
<view class="td" style="flex: 2.5;">{{ item.phone }}</view>
<view class="td" style="flex: 1.5;">
<switch :checked="item.isshow" color="#1890ff" @change="onToggleShow(item)" />
</view>
<view class="td" style="flex: 3;">{{ item.addTime }}</view>
<view class="td" style="flex: 2;">
<text class="action-btn" @click="onEdit(item)">编辑</text>
<text class="action-btn-del" @click="onDel(item)">删除</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="uts">
import { ref, reactive } from 'vue'
type CourierItem = {
id: number
avatar: string
name: string
phone: string
isshow: boolean
addTime: string
}
const courierList = reactive<CourierItem[]>([
{ id: 106, avatar: '/static/logo.png', name: 'cheshi', phone: '18943652356', isshow: true, addTime: '2025-06-29 21:45:19' },
{ id: 105, avatar: '/static/logo.png', name: 'dl', phone: '15648569914', isshow: true, addTime: '2025-06-28 18:40:26' },
{ id: 102, avatar: '/static/logo.png', name: '小牛马', phone: '13548652258', isshow: true, addTime: '2025-06-26 15:14:40' }
])
function onAdd() {
console.log('Add courier')
}
function onToggleShow(item: CourierItem) {
item.isshow = !item.isshow
}
function onEdit(item: CourierItem) {
console.log('Edit:', item.name)
}
function onDel(item: CourierItem) {
console.log('Delete:', item.id)
}
</script>
<style scoped>
.admin-page-container { padding: 20px; background-color: #f5f7f9; min-height: 100vh; }
.page-card { background-color: #fff; border-radius: 4px; padding: 20px; box-shadow: 0 1px 4px rgba(0,21,41,0.08); }
.page-header { margin-bottom: 20px; border-bottom: 1px solid #f0f0f0; padding-bottom: 15px; }
.page-title { font-size: 16px; font-weight: bold; color: #303133; }
.placeholder-text { font-size: 14px; color: #909399; }
.admin-page-container {
padding: 15px;
background-color: #f5f7f9;
min-height: 100vh;
}
.page-card {
background-color: #fff;
border-radius: 4px;
padding: 20px;
}
.action-wrap {
margin-bottom: 20px;
}
.btn {
height: 32px;
line-height: 30px;
padding: 0 15px;
font-size: 14px;
border-radius: 4px;
border: none;
}
.btn-primary {
background-color: #1890ff;
color: #fff;
}
.table-wrap {
width: 100%;
border: 1px solid #f0f0f0;
}
.table-header {
display: flex;
flex-direction: row;
background-color: #f8f8f9;
}
.th {
padding: 12px 10px;
font-size: 14px;
font-weight: bold;
color: #515a6e;
border-bottom: 1px solid #f0f0f0;
text-align: center;
}
.tr {
display: flex;
flex-direction: row;
border-bottom: 1px solid #f0f0f0;
}
.td {
padding: 12px 10px;
font-size: 14px;
color: #515a6e;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.avatar {
width: 40px;
height: 40px;
border-radius: 4px;
}
.action-btn {
color: #1890ff;
font-size: 13px;
margin-right: 10px;
cursor: pointer;
}
.action-btn-del {
color: #ed4014;
font-size: 13px;
cursor: pointer;
}
</style>

View File

@@ -1,23 +1,230 @@
<template>
<view class="admin-page-container">
<view class="page-card">
<view class="page-header">
<text class="page-title">提货点设置</text>
<!-- 搜索栏 -->
<view class="search-wrap">
<view class="search-item">
<text class="label">提货点搜索:</text>
<input class="input" placeholder="请输入提货点名称,电话" v-model="searchKey" />
</view>
<button class="btn btn-primary" @click="onSearch">查询</button>
</view>
<view class="page-content">
<text class="placeholder-text">提货点设置 页面开发中...</text>
<!-- 状态 Tabs -->
<view class="tabs-wrap">
<view class="tab-item active"><text class="tab-text">显示中的提货点(2)</text></view>
<view class="tab-item"><text class="tab-text">隐藏中的提货点(0)</text></view>
<view class="tab-item"><text class="tab-text">回收站中的提货点(9)</text></view>
</view>
<view class="action-wrap">
<button class="btn btn-primary" @click="onAdd">添加提货点</button>
</view>
<!-- 表格区域 -->
<view class="table-wrap">
<view class="table-header">
<view class="th" style="flex: 1;">ID</view>
<view class="th" style="flex: 2;">提货点图片</view>
<view class="th" style="flex: 2;">提货点名称</view>
<view class="th" style="flex: 2;">提货点电话</view>
<view class="th" style="flex: 3;">地址</view>
<view class="th" style="flex: 3;">营业时间</view>
<view class="th" style="flex: 1.5;">是否显示</view>
<view class="th" style="flex: 2;">操作</view>
</view>
<view class="table-body">
<view v-for="item in stationList" :key="item.id" class="tr">
<view class="td" style="flex: 1;">{{ item.id }}</view>
<view class="td" style="flex: 2;">
<image class="station-img" :src="item.image" mode="aspectFill" />
</view>
<view class="td" style="flex: 2;">{{ item.name }}</view>
<view class="td" style="flex: 2;">{{ item.phone }}</view>
<view class="td" style="flex: 3;">{{ item.address }}</view>
<view class="td" style="flex: 3;">{{ item.hours }}</view>
<view class="td" style="flex: 1.5;">
<switch :checked="item.isshow" color="#1890ff" />
</view>
<view class="td" style="flex: 2;">
<text class="action-btn" @click="onEdit(item)">编辑</text>
<text class="action-btn-del" @click="onDel(item)">删除</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="uts">
import { ref, reactive } from 'vue'
const searchKey = ref('')
type StationItem = {
id: number
image: string
name: string
phone: string
address: string
hours: string
isshow: boolean
}
const stationList = reactive<StationItem[]>([
{ id: 46, image: '/static/logo.png', name: '提货点222', phone: '13769102384', address: '能看见你的困难', hours: '00:00:00 - 23:00:00', isshow: true },
{ id: 44, image: '/static/logo.png', name: '美东科技', phone: '15912341234', address: '襄阳火车站', hours: '08:00:00 - 22:00:00', isshow: true }
])
function onSearch() {
console.log('Search:', searchKey.value)
}
function onAdd() {
console.log('Add station')
}
function onEdit(item: StationItem) {
console.log('Edit:', item.name)
}
function onDel(item: StationItem) {
console.log('Delete:', item.id)
}
</script>
<style scoped>
.admin-page-container { padding: 20px; background-color: #f5f7f9; min-height: 100vh; }
.page-card { background-color: #fff; border-radius: 4px; padding: 20px; box-shadow: 0 1px 4px rgba(0,21,41,0.08); }
.page-header { margin-bottom: 20px; border-bottom: 1px solid #f0f0f0; padding-bottom: 15px; }
.page-title { font-size: 16px; font-weight: bold; color: #303133; }
.placeholder-text { font-size: 14px; color: #909399; }
.admin-page-container {
padding: 15px;
background-color: #f5f7f9;
min-height: 100vh;
}
.page-card {
background-color: #fff;
border-radius: 4px;
padding: 20px;
}
.search-wrap {
display: flex;
flex-direction: row;
align-items: center;
padding-bottom: 20px;
border-bottom: 1px solid #f0f0f0;
margin-bottom: 20px;
}
.label {
font-size: 14px;
color: #606266;
}
.input {
width: 250px;
height: 32px;
padding: 0 10px;
border: 1px solid #dcdfe6;
border-radius: 4px;
font-size: 14px;
color: #606266;
margin-right: 15px;
}
.tabs-wrap {
display: flex;
flex-direction: row;
margin-bottom: 20px;
border-bottom: 1px solid #f0f2f5;
}
.tab-item {
padding: 10px 15px;
cursor: pointer;
}
.tab-item.active {
border-bottom: 2px solid #1890ff;
}
.tab-item.active .tab-text {
color: #1890ff;
}
.tab-text {
font-size: 14px;
color: #515a6e;
}
.action-wrap {
margin-bottom: 20px;
}
.btn {
height: 32px;
line-height: 30px;
padding: 0 15px;
font-size: 14px;
border-radius: 4px;
border: none;
}
.btn-primary {
background-color: #1890ff;
color: #fff;
}
.table-wrap {
width: 100%;
border: 1px solid #f0f0f0;
}
.table-header {
display: flex;
flex-direction: row;
background-color: #f8f8f9;
}
.th {
padding: 12px 10px;
font-size: 14px;
font-weight: bold;
color: #515a6e;
border-bottom: 1px solid #f0f0f0;
text-align: center;
}
.tr {
display: flex;
flex-direction: row;
border-bottom: 1px solid #f0f0f0;
}
.td {
padding: 12px 10px;
font-size: 14px;
color: #515a6e;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.station-img {
width: 40px;
height: 40px;
border-radius: 4px;
}
.action-btn {
color: #1890ff;
font-size: 13px;
margin-right: 10px;
}
.action-btn-del {
color: #ed4014;
font-size: 13px;
}
</style>

View File

@@ -1,23 +1,187 @@
<template>
<view class="admin-page-container">
<view class="page-card">
<view class="page-header">
<text class="page-title">运费模板</text>
<!-- 搜索栏 -->
<view class="search-wrap">
<view class="search-item">
<text class="label">搜索:</text>
<input class="input" placeholder="请输入模板名称" v-model="searchKey" />
</view>
<button class="btn btn-primary" @click="onSearch">查询</button>
</view>
<view class="page-content">
<text class="placeholder-text">运费模板 页面开发中...</text>
<view class="action-wrap">
<button class="btn btn-primary" @click="onAdd">添加运费模板</button>
</view>
<!-- 表格区域 -->
<view class="table-wrap">
<view class="table-header">
<view class="th" style="flex: 1;">ID</view>
<view class="th" style="flex: 2;">模板名称</view>
<view class="th" style="flex: 2;">计费方式</view>
<view class="th" style="flex: 2;">指定包邮</view>
<view class="th" style="flex: 1;">排序</view>
<view class="th" style="flex: 3;">添加时间</view>
<view class="th" style="flex: 2;">操作</view>
</view>
<view class="table-body">
<view v-for="item in freightList" :key="item.id" class="tr">
<view class="td" style="flex: 1;">{{ item.id }}</view>
<view class="td" style="flex: 2;">{{ item.name }}</view>
<view class="td" style="flex: 2;">{{ item.method }}</view>
<view class="td" style="flex: 2;">{{ item.freeShipping ? '开启' : '关闭' }}</view>
<view class="td" style="flex: 1;">{{ item.sort }}</view>
<view class="td" style="flex: 3;">{{ item.addTime }}</view>
<view class="td" style="flex: 2;">
<text class="action-btn" @click="onEdit(item)">修改</text>
<text class="action-btn-del" @click="onDel(item)">删除</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="uts">
import { ref, reactive } from 'vue'
const searchKey = ref('')
type FreightItem = {
id: number
name: string
method: string
freeShipping: boolean
sort: number
addTime: string
}
const freightList = reactive<FreightItem[]>([
{ id: 5, name: '测试', method: '按件数', freeShipping: false, sort: 0, addTime: '2025-05-18 09:44:14' },
{ id: 4, name: '模板3', method: '按体积', freeShipping: false, sort: 0, addTime: '2023-12-20 09:53:23' },
{ id: 3, name: '运费2', method: '按重量', freeShipping: false, sort: 0, addTime: '2023-12-20 09:53:02' },
{ id: 2, name: '模板1', method: '按件数', freeShipping: true, sort: 0, addTime: '2023-12-20 09:29:05' }
])
function onSearch() {
console.log('Search:', searchKey.value)
}
function onAdd() {
console.log('Add freight template')
}
function onEdit(item: FreightItem) {
console.log('Edit:', item.name)
}
function onDel(item: FreightItem) {
console.log('Delete:', item.id)
}
</script>
<style scoped>
.admin-page-container { padding: 20px; background-color: #f5f7f9; min-height: 100vh; }
.page-card { background-color: #fff; border-radius: 4px; padding: 20px; box-shadow: 0 1px 4px rgba(0,21,41,0.08); }
.page-header { margin-bottom: 20px; border-bottom: 1px solid #f0f0f0; padding-bottom: 15px; }
.page-title { font-size: 16px; font-weight: bold; color: #303133; }
.placeholder-text { font-size: 14px; color: #909399; }
.admin-page-container {
padding: 15px;
background-color: #f5f7f9;
min-height: 100vh;
}
.page-card {
background-color: #fff;
border-radius: 4px;
padding: 20px;
}
.search-wrap {
display: flex;
flex-direction: row;
align-items: center;
padding-bottom: 20px;
border-bottom: 1px solid #f0f0f0;
margin-bottom: 20px;
}
.label {
font-size: 14px;
color: #606266;
}
.input {
width: 200px;
height: 32px;
padding: 0 10px;
border: 1px solid #dcdfe6;
border-radius: 4px;
font-size: 14px;
color: #606266;
margin-right: 15px;
}
.action-wrap {
margin-bottom: 20px;
}
.btn {
height: 32px;
line-height: 30px;
padding: 0 15px;
font-size: 14px;
border-radius: 4px;
border: none;
}
.btn-primary {
background-color: #1890ff;
color: #fff;
}
.table-wrap {
width: 100%;
border: 1px solid #f0f0f0;
}
.table-header {
display: flex;
flex-direction: row;
background-color: #f8f8f9;
}
.th {
padding: 12px 10px;
font-size: 14px;
font-weight: bold;
color: #515a6e;
border-bottom: 1px solid #f0f0f0;
text-align: center;
}
.tr {
display: flex;
flex-direction: row;
border-bottom: 1px solid #f0f0f0;
}
.td {
padding: 12px 10px;
font-size: 14px;
color: #515a6e;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.action-btn {
color: #1890ff;
font-size: 13px;
margin-right: 10px;
}
.action-btn-del {
color: #ed4014;
font-size: 13px;
}
</style>

View File

@@ -0,0 +1,207 @@
<template>
<view class="admin-page-container">
<view class="page-card">
<!-- 搜索栏 -->
<view class="search-wrap">
<view class="search-item">
<text class="label">提货点名称:</text>
<picker mode="selector" :range="stationRange" @change="onStationChange">
<view class="picker-input">{{ stationText }}</view>
</picker>
</view>
<button class="btn btn-primary" @click="onSearch">查询</button>
</view>
<view class="action-wrap">
<button class="btn btn-primary" @click="onAdd">添加核销员</button>
</view>
<!-- 表格区域 -->
<view class="table-wrap">
<view class="table-header">
<view class="th" style="flex: 1;">ID</view>
<view class="th" style="flex: 1.5;">头像</view>
<view class="th" style="flex: 2;">微信名称</view>
<view class="th" style="flex: 2;">核销员名称</view>
<view class="th" style="flex: 2;">所属提货点</view>
<view class="th" style="flex: 3;">添加时间</view>
<view class="th" style="flex: 1.5;">状态</view>
<view class="th" style="flex: 2;">操作</view>
</view>
<view class="table-body">
<view v-for="item in verifierList" :key="item.id" class="tr">
<view class="td" style="flex: 1;">{{ item.id }}</view>
<view class="td" style="flex: 1.5;">
<image class="avatar" :src="item.avatar" mode="aspectFill" />
</view>
<view class="td" style="flex: 2;">{{ item.wechatName }}</view>
<view class="td" style="flex: 2;">{{ item.name }}</view>
<view class="td" style="flex: 2;">{{ item.station }}</view>
<view class="td" style="flex: 3;">{{ item.addTime }}</view>
<view class="td" style="flex: 1.5;">
<switch :checked="item.status" color="#1890ff" />
</view>
<view class="td" style="flex: 2;">
<text class="action-btn" @click="onEdit(item)">编辑</text>
<text class="action-btn-del" @click="onDel(item)">删除</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="uts">
import { ref, reactive } from 'vue'
const stationRange = ['所有', '提货点222', '美东科技']
const stationText = ref('请选择')
type VerifierItem = {
id: number
avatar: string
wechatName: string
name: string
station: string
addTime: string
status: boolean
}
const verifierList = reactive<VerifierItem[]>([
{ id: 94, avatar: '/static/logo.png', wechatName: '地球人', name: '15920014197', station: '美东科技', addTime: '2025-10-22 10:33:07', status: true }
])
function onStationChange(e: any) {
const index = parseInt(e.detail.value.toString())
stationText.value = stationRange[index]
}
function onSearch() {
console.log('Search:', stationText.value)
}
function onAdd() {
console.log('Add verifier')
}
function onEdit(item: VerifierItem) {
console.log('Edit:', item.name)
}
function onDel(item: VerifierItem) {
console.log('Delete:', item.id)
}
</script>
<style scoped>
.admin-page-container {
padding: 15px;
background-color: #f5f7f9;
min-height: 100vh;
}
.page-card {
background-color: #fff;
border-radius: 4px;
padding: 20px;
}
.search-wrap {
display: flex;
flex-direction: row;
align-items: center;
padding-bottom: 20px;
border-bottom: 1px solid #f0f0f0;
margin-bottom: 20px;
}
.label {
font-size: 14px;
color: #606266;
}
.picker-input {
width: 200px;
height: 32px;
line-height: 32px;
padding: 0 10px;
border: 1px solid #dcdfe6;
border-radius: 4px;
font-size: 14px;
color: #606266;
background-color: #fff;
margin-right: 15px;
}
.action-wrap {
margin-bottom: 20px;
}
.btn {
height: 32px;
line-height: 30px;
padding: 0 15px;
font-size: 14px;
border-radius: 4px;
border: none;
}
.btn-primary {
background-color: #1890ff;
color: #fff;
}
.table-wrap {
width: 100%;
border: 1px solid #f0f0f0;
}
.table-header {
display: flex;
flex-direction: row;
background-color: #f8f8f9;
}
.th {
padding: 12px 10px;
font-size: 14px;
font-weight: bold;
color: #515a6e;
border-bottom: 1px solid #f0f0f0;
text-align: center;
}
.tr {
display: flex;
flex-direction: row;
border-bottom: 1px solid #f0f0f0;
}
.td {
padding: 12px 10px;
font-size: 14px;
color: #515a6e;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.avatar {
width: 36px;
height: 36px;
border-radius: 4px;
}
.action-btn {
color: #1890ff;
font-size: 13px;
margin-right: 10px;
}
.action-btn-del {
color: #ed4014;
font-size: 13px;
}
</style>