| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>叁强鲜配 - 商品管理原型图</title>
- <link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css">
- <link rel="stylesheet" href="https://unpkg.com/@element-plus/icons-vue/dist/index.css">
- <style>
- * { margin: 0; padding: 0; box-sizing: border-box; }
- body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f7fa; color: #303133; }
- .topbar { height: 60px; background: linear-gradient(135deg, #1989fa 0%, #07c160 100%); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; color: white; }
- .topbar-logo h1 { font-size: 22px; font-weight: 600; }
- .topbar-logo span { font-size: 13px; opacity: 0.85; }
- .topbar-user { display: flex; align-items: center; gap: 16px; }
- .main-container { display: flex; min-height: calc(100vh - 60px); }
- .sidebar { width: 220px; background: #fff; border-right: 1px solid #e4e7ed; padding: 16px 0; }
- .menu-item { padding: 14px 24px; cursor: pointer; display: flex; align-items: center; gap: 12px; color: #606266; font-size: 14px; }
- .menu-item:hover { background: #f5f7fa; color: #1989fa; }
- .menu-item.active { background: #ecf5ff; color: #1989fa; border-right: 3px solid #1989fa; }
- .submenu { padding-left: 48px; }
- .content { flex: 1; padding: 24px; }
- .breadcrumb { font-size: 13px; color: #909399; margin-bottom: 8px; }
- .card { background: #fff; border-radius: 12px; padding: 24px; margin-bottom: 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
- .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #ebeef5; }
- .card-title { font-size: 16px; font-weight: 600; }
- .status-tag { padding: 4px 12px; border-radius: 4px; font-size: 12px; }
- .status-tag.primary { background: #ecf5ff; color: #1989fa; }
- .status-tag.success { background: #f0f9eb; color: #07c160; }
- .status-tag.warning { background: #fdf6ec; color: #ff976a; }
- .status-tag.danger { background: #fef0f0; color: #ee0a24; }
- .status-tag.info { background: #f4f4f5; color: #909399; }
- .form-section-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; padding-left: 12px; border-left: 4px solid #1989fa; }
- .form-row { display: flex; gap: 12px; flex-wrap: wrap; }
- .page-nav { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
- .nav-tabs { display: flex; gap: 4px; background: #f5f7fa; padding: 4px; border-radius: 8px; margin-bottom: 20px; }
- .nav-tab { padding: 10px 20px; cursor: pointer; border-radius: 6px; font-size: 14px; color: #606266; }
- .nav-tab.active { background: #fff; color: #1989fa; font-weight: 500; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
- .product-img { width: 60px; height: 60px; background: #f5f7fa; border-radius: 8px; }
- </style>
- </head>
- <body>
- <!-- 顶部导航 -->
- <div class="topbar">
- <div class="topbar-logo">
- <h1>叁强鲜配</h1>
- <span>运营管理后台</span>
- </div>
- <div class="topbar-user">
- <el-avatar :size="32" style="background:#fff;color:#1989fa;">管</el-avatar>
- <span>管理员</span>
- </div>
- </div>
- <div class="main-container">
- <!-- 左侧菜单 -->
- <div class="sidebar">
- <div class="menu-item"><el-icon><DataAnalysis /></el-icon><span>首页</span></div>
- <div class="menu-item"><el-icon><User /></el-icon><span>用户管理</span></div>
- <div class="menu-item"><el-icon><Location /></el-icon><span>区域管理</span></div>
- <div class="menu-item active"><el-icon><Goods /></el-icon><span>商品管理</span></div>
- <div class="submenu">
- <div class="menu-item active">商品分类</div>
- <div class="menu-item">商品单位</div>
- <div class="menu-item">商品列表</div>
- </div>
- <div class="menu-item"><el-icon><Search /></el-icon><span>询价管理</span></div>
- <div class="menu-item"><el-icon><Ticket /></el-icon><span>报价管理</span></div>
- <div class="menu-item"><el-icon><PriceTag /></el-icon><span>价格管理</span></div>
- <div class="menu-item"><el-icon><ShoppingCart /></el-icon><span>订单管理</span></div>
- <div class="menu-item"><el-icon><Van /></el-icon><span>配送管理</span></div>
- <div class="menu-item"><el-icon><Wallet /></el-icon><span>结算管理</span></div>
- </div>
- <!-- 内容区 -->
- <div class="content">
- <div class="breadcrumb">商品管理 / 商品分类</div>
- <!-- Tab切换 -->
- <div class="nav-tabs">
- <div class="nav-tab active">商品分类</div>
- <div class="nav-tab">商品单位</div>
- <div class="nav-tab">商品列表</div>
- </div>
- <!-- 商品分类管理 -->
- <div class="card">
- <div class="card-header">
- <span class="card-title">商品分类列表</span>
- <el-button type="success" size="small">+ 新增分类</el-button>
- </div>
- <el-table :data="categoryList" style="width:100%" row-key="id" default-expand-all>
- <el-table-column prop="name" label="分类名称" width="200" />
- <el-table-column prop="sortOrder" label="排序" width="100" align="center" />
- <el-table-column prop="productCount" label="商品数量" width="120" align="center" />
- <el-table-column prop="isActive" label="状态" width="100">
- <template #default="{row}">
- <span :class="'status-tag '+(row.isActive?'success':'info')">{{row.isActive?'启用':'禁用'}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="createTime" label="创建时间" width="180" />
- <el-table-column label="操作" width="180">
- <template #default>
- <el-button type="primary" link>编辑</el-button>
- <el-button type="warning" link>停用</el-button>
- <el-button type="danger" link>删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <!-- 商品单位管理 -->
- <div class="card">
- <div class="card-header">
- <span class="card-title">商品单位列表</span>
- <el-button type="success" size="small">+ 新增单位</el-button>
- </div>
- <el-table :data="unitList" style="width:100%">
- <el-table-column prop="name" label="单位名称" width="150" />
- <el-table-column prop="code" label="单位编码" width="150" />
- <el-table-column prop="isActive" label="状态" width="100">
- <template #default="{row}">
- <span :class="'status-tag '+(row.isActive?'success':'info')">{{row.isActive?'启用':'禁用'}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="createTime" label="创建时间" width="180" />
- <el-table-column label="操作" width="150">
- <template #default>
- <el-button type="primary" link>编辑</el-button>
- <el-button type="warning" link>停用</el-button>
- <el-button type="danger" link>删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <!-- 商品列表 -->
- <div class="card">
- <div class="form-section-title">筛选条件</div>
- <div class="form-row">
- <el-input placeholder="商品名称搜索" style="width:200px;" />
- <el-select placeholder="商品分类" style="width:150px;">
- <el-option label="全部分类" value="" />
- <el-option label="蔬菜" value="CAT_001" />
- <el-option label="水果" value="CAT_002" />
- <el-option label="肉类" value="CAT_003" />
- <el-option label="生活用品" value="CAT_004" />
- <el-option label="厨房用品" value="CAT_005" />
- </el-select>
- <el-select placeholder="状态" style="width:120px;">
- <el-option label="全部" value="" />
- <el-option label="启用" value="1" />
- <el-option label="禁用" value="0" />
- </el-select>
- <el-button type="primary">搜索</el-button>
- <el-button>重置</el-button>
- </div>
- </div>
- <div class="card">
- <div class="card-header">
- <span class="card-title">商品列表</span>
- <el-button type="success" size="small">+ 新增商品</el-button>
- </div>
- <el-table :data="productList" style="width:100%">
- <el-table-column label="商品图片" width="90">
- <template #default>
- <div class="product-img"></div>
- </template>
- </el-table-column>
- <el-table-column prop="name" label="商品名称" width="200" />
- <el-table-column prop="categoryName" label="分类" width="120" />
- <el-table-column prop="unitName" label="单位" width="100" />
- <el-table-column prop="description" label="描述" />
- <el-table-column prop="isActive" label="状态" width="80">
- <template #default="{row}">
- <span :class="'status-tag '+(row.isActive?'success':'info')">{{row.isActive?'启用':'禁用'}}</span>
- </template>
- </el-table-column>
- <el-table-column label="操作" width="150">
- <template #default>
- <el-button type="primary" link>编辑</el-button>
- <el-button type="danger" link>删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div class="page-nav">
- <el-pagination background layout="prev, pager, next" :total="100" />
- </div>
- </div>
- </div>
- </div>
- <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
- <script src="https://unpkg.com/element-plus"></script>
- <script src="https://unpkg.com/@element-plus/icons-vue"></script>
- <script>
- const { createApp, ref } = Vue;
- const app = createApp({
- setup() {
- const categoryList = ref([
- { id: 1, name: '蔬菜', sortOrder: 1, productCount: 25, isActive: true, createTime: '2026-01-01 10:00:00' },
- { id: 2, name: '水果', sortOrder: 2, productCount: 18, isActive: true, createTime: '2026-01-01 10:00:00' },
- { id: 3, name: '肉类', sortOrder: 3, productCount: 12, isActive: true, createTime: '2026-01-01 10:00:00' },
- { id: 4, name: '生活用品', sortOrder: 4, productCount: 30, isActive: true, createTime: '2026-01-01 10:00:00' },
- { id: 5, name: '厨房用品', sortOrder: 5, productCount: 15, isActive: true, createTime: '2026-01-01 10:00:00' },
- ]);
- const unitList = ref([
- { name: '斤', code: 'jin', isActive: true, createTime: '2026-01-01 10:00:00' },
- { name: '公斤', code: 'kg', isActive: true, createTime: '2026-01-01 10:00:00' },
- { name: '个', code: 'ge', isActive: true, createTime: '2026-01-01 10:00:00' },
- { name: '箱', code: 'xiang', isActive: true, createTime: '2026-01-01 10:00:00' },
- { name: '盒', code: 'he', isActive: true, createTime: '2026-01-01 10:00:00' },
- { name: '袋', code: 'dai', isActive: true, createTime: '2026-01-01 10:00:00' },
- ]);
- const productList = ref([
- { name: '新鲜猪肉', categoryName: '肉类', unitName: '斤', description: '优质新鲜猪肉', isActive: true },
- { name: '新鲜蔬菜', categoryName: '蔬菜', unitName: '斤', description: '新鲜时令蔬菜', isActive: true },
- { name: '新鲜水果', categoryName: '水果', unitName: '斤', description: '新鲜水果拼盘', isActive: true },
- { name: '鸡蛋', categoryName: '禽蛋', unitName: '个', description: '农家鸡蛋', isActive: true },
- { name: '大米', categoryName: '粮食', unitName: '斤', description: '东北大米', isActive: true },
- ]);
- return { categoryList, unitList, productList };
- }
- });
- app.use(ElementPlus);
- for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
- app.component(key, component);
- }
- app.mount('#app');
- </script>
- </body>
- </html>
|