优化细节
This commit is contained in:
107
pages/mall/admin/distribution/division/agent.uvue
Normal file
107
pages/mall/admin/distribution/division/agent.uvue
Normal file
@@ -0,0 +1,107 @@
|
||||
<template>
|
||||
<view class="admin-page">
|
||||
<view class="filter-card">
|
||||
<view class="filter-row">
|
||||
<view class="filter-item">
|
||||
<text class="label">鎼滅储锛?/text>
|
||||
<input class="filter-input" placeholder="璇疯緭鍏ュ鍚嶃€乁ID" />
|
||||
</view>
|
||||
<view class="filter-btns">
|
||||
<button class="btn primary" @click="onSearch">鏌ヨ</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="content-card">
|
||||
<view class="action-bar">
|
||||
<button class="btn primary small" @click="onAdd">娣诲姞浠g悊鍟?/button>
|
||||
</view>
|
||||
|
||||
<view class="table-container">
|
||||
<view class="table-header">
|
||||
<view class="col col-uid"><text>鐢ㄦ埛UID</text></view>
|
||||
<view class="col col-avatar"><text>澶村儚</text></view>
|
||||
<view class="col col-name"><text>鍚嶇О</text></view>
|
||||
<view class="col col-ratio"><text>鍒嗛攢姣斾緥</text></view>
|
||||
<view class="col col-count"><text>鍛樺伐鏁伴噺</text></view>
|
||||
<view class="col col-time"><text>鎴鏃堕棿</text></view>
|
||||
<view class="col col-status"><text>鐘舵€?/text></view>
|
||||
<view class="col col-ops"><text>鎿嶄綔</text></view>
|
||||
</view>
|
||||
|
||||
<view class="table-body">
|
||||
<view v-for="item in agentList" :key="item.uid" class="table-row">
|
||||
<view class="col col-uid"><text>{{ item.uid }}</text></view>
|
||||
<view class="col col-avatar">
|
||||
<image class="avatar-img" src="/static/logo.png" mode="aspectFill" />
|
||||
</view>
|
||||
<view class="col col-name"><text>{{ item.name }}</text></view>
|
||||
<view class="col col-ratio"><text>{{ item.ratio }}%</text></view>
|
||||
<view class="col col-count"><text>{{ item.staffCount }}</text></view>
|
||||
<view class="col col-time"><text>{{ item.endTime }}</text></view>
|
||||
<view class="col col-status">
|
||||
<switch :checked="item.status" color="#1890ff" scale="0.8" />
|
||||
</view>
|
||||
<view class="col col-ops">
|
||||
<text class="op-link">娣诲姞鍛樺伐</text>
|
||||
<text class="op-divider">|</text>
|
||||
<text class="op-link">鏌ョ湅鍛樺伐</text>
|
||||
<text class="op-divider">|</text>
|
||||
<text class="op-link">缂栬緫</text>
|
||||
<text class="op-divider">|</text>
|
||||
<text class="op-link">鍒犻櫎</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
const agentList = ref([
|
||||
{ uid: '60569', name: 'cs2020', ratio: 50, staffCount: 1, endTime: '1970-01-01', status: true },
|
||||
{ uid: '60571', name: 'www', ratio: 19, staffCount: 1, endTime: '1970-01-01', status: true },
|
||||
{ uid: '60665', name: 'geyun', ratio: 15, staffCount: 1, endTime: '1970-01-01', status: true },
|
||||
{ uid: '60678', name: '鏍间簯', ratio: 0, staffCount: 0, endTime: '1970-01-01', status: true }
|
||||
])
|
||||
|
||||
function onSearch() {
|
||||
uni.showToast({ title: '鏌ヨ涓?..', icon: 'none' })
|
||||
}
|
||||
|
||||
function onAdd() {
|
||||
uni.showToast({ title: '娣诲姞浠g悊鍟?, icon: 'none' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.admin-page { /* padding removed */ }
|
||||
.filter-card { background: #fff; padding: 24px; margin-bottom: 16px; border-radius: 4px; }
|
||||
.filter-row { display: flex; flex-direction: row; align-items: center; gap: 24px; }
|
||||
.label { font-size: 14px; color: #333; }
|
||||
.filter-input { border: 1px solid #d9d9d9; height: 32px; width: 220px; padding: 0 12px; font-size: 14px; }
|
||||
.btn { height: 32px; padding: 0 16px; font-size: 14px; border: 1px solid #d9d9d9; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
|
||||
.btn.primary { background: #1890ff; border-color: #1890ff; color: #fff; }
|
||||
.content-card { background: #fff; border-radius: 4px; }
|
||||
.action-bar { padding: 16px 24px; }
|
||||
.table-container { padding: 0 24px 24px; }
|
||||
.table-header { display: flex; flex-direction: row; background: #f8faff; border-bottom: 1px solid #f0f0f0; padding: 12px 0; }
|
||||
.table-row { display: flex; flex-direction: row; border-bottom: 1px solid #f0f0f0; padding: 12px 0; align-items: center; &:hover { background: #fafafa; } }
|
||||
.col { padding: 0 8px; font-size: 14px; color: #333; display: flex; align-items: center; }
|
||||
.col-uid { width: 80px; }
|
||||
.col-avatar { width: 80px; justify-content: center; }
|
||||
.col-name { width: 120px; }
|
||||
.col-ratio { width: 100px; justify-content: center; }
|
||||
.col-count { width: 100px; justify-content: center; }
|
||||
.col-time { width: 120px; justify-content: center; }
|
||||
.col-status { width: 80px; justify-content: center; }
|
||||
.col-ops { flex: 1; justify-content: flex-end; }
|
||||
.avatar-img { width: 32px; height: 32px; border-radius: 2px; }
|
||||
.op-link { color: #1890ff; cursor: pointer; }
|
||||
.op-divider { color: #e8e8e8; margin: 0 8px; }
|
||||
</style>
|
||||
|
||||
|
||||
117
pages/mall/admin/distribution/division/apply.uvue
Normal file
117
pages/mall/admin/distribution/division/apply.uvue
Normal file
@@ -0,0 +1,117 @@
|
||||
<template>
|
||||
<view class="admin-page">
|
||||
<view class="filter-card">
|
||||
<view class="filter-row">
|
||||
<view class="filter-item">
|
||||
<text class="label">鎼滅储锛?/text>
|
||||
<input class="filter-input" placeholder="璇疯緭鍏ュ鍚嶃€乁ID" />
|
||||
</view>
|
||||
<view class="filter-btns">
|
||||
<button class="btn primary" @click="onSearch">鏌ヨ</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="content-card">
|
||||
<view class="tabs-row">
|
||||
<view
|
||||
v-for="(tab, index) in tabs"
|
||||
:key="index"
|
||||
class="tab-item"
|
||||
:class="{ active: activeTab === index }"
|
||||
@click="activeTab = index"
|
||||
>
|
||||
<text>{{ tab }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="table-container">
|
||||
<view class="table-header">
|
||||
<view class="col col-uid"><text>鐢ㄦ埛UID</text></view>
|
||||
<view class="col col-name"><text>浠g悊鍟嗗悕绉?/text></view>
|
||||
<view class="col col-phone"><text>浠g悊鍟嗙數璇?/text></view>
|
||||
<view class="col col-dept"><text>浜嬩笟閮ㄥ悕绉?/text></view>
|
||||
<view class="col col-img"><text>鐢宠鍥剧墖</text></view>
|
||||
<view class="col col-time"><text>鐢宠鏃堕棿</text></view>
|
||||
<view class="col col-status"><text>鐢宠鐘舵€?/text></view>
|
||||
<view class="col col-code"><text>閭€璇风爜</text></view>
|
||||
<view class="col col-ops"><text>鎿嶄綔</text></view>
|
||||
</view>
|
||||
|
||||
<view class="table-body">
|
||||
<view v-for="item in applyList" :key="item.uid" class="table-row">
|
||||
<view class="col col-uid"><text>{{ item.uid }}</text></view>
|
||||
<view class="col col-name"><text>{{ item.name }}</text></view>
|
||||
<view class="col col-phone"><text>{{ item.phone }}</text></view>
|
||||
<view class="col col-dept"><text>{{ item.deptName }}</text></view>
|
||||
<view class="col col-img">
|
||||
<image class="table-img" src="/static/logo.png" mode="aspectFill" />
|
||||
</view>
|
||||
<view class="col col-time"><text>{{ item.time }}</text></view>
|
||||
<view class="col col-status">
|
||||
<view class="status-tag"><text>{{ item.statusText }}</text></view>
|
||||
</view>
|
||||
<view class="col col-code"><view class="code-box"><text>{{ item.code }}</text></view></view>
|
||||
<view class="col col-ops">
|
||||
<text class="op-link">鍚屾剰</text>
|
||||
<text class="op-divider">|</text>
|
||||
<text class="op-link">鎷掔粷</text>
|
||||
<text class="op-divider">|</text>
|
||||
<text class="op-link">鍒犻櫎</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
const activeTab = ref(0)
|
||||
const tabs = ['鍏ㄩ儴', '鐢宠涓?, '宸插悓鎰?, '宸叉嫆缁?]
|
||||
|
||||
const applyList = ref([
|
||||
{ uid: '81806', name: '娴嬭瘯娴嬭瘯', phone: '19910205954', deptName: '26991', time: '2026-01-08 15:30:39', statusText: '鐢宠涓?, code: '70623142' },
|
||||
{ uid: '82072', name: 'testttt', phone: '18613860515', deptName: '鍑岃景绉戞妧', time: '2026-01-05 12:06:39', statusText: '鐢宠涓?, code: '80889444' },
|
||||
{ uid: '80586', name: '鐔?, phone: '13759402576', deptName: '鍑岃景绉戞妧', time: '2025-12-06 18:05:18', statusText: '鐢宠涓?, code: '80889444' }
|
||||
])
|
||||
|
||||
function onSearch() {
|
||||
uni.showToast({ title: '鏌ヨ涓?..', icon: 'none' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.admin-page { /* padding removed */ }
|
||||
.filter-card { background: #fff; padding: 24px; margin-bottom: 16px; border-radius: 4px; }
|
||||
.filter-row { display: flex; flex-direction: row; align-items: center; gap: 24px; }
|
||||
.label { font-size: 14px; color: #333; }
|
||||
.filter-input { border: 1px solid #d9d9d9; height: 32px; width: 220px; padding: 0 12px; font-size: 14px; }
|
||||
.btn { height: 32px; padding: 0 16px; font-size: 14px; border: 1px solid #d9d9d9; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
|
||||
.btn.primary { background: #1890ff; border-color: #1890ff; color: #fff; }
|
||||
.content-card { background: #fff; border-radius: 4px; }
|
||||
.tabs-row { display: flex; flex-direction: row; padding: 0 24px; border-bottom: 1px solid #f0f0f0; }
|
||||
.tab-item { padding: 16px 20px; cursor: pointer; position: relative; text { font-size: 15px; color: #666; } &.active { text { color: #1890ff; font-weight: 500; } &::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: #1890ff; } } }
|
||||
.table-container { padding: 24px; }
|
||||
.table-header { display: flex; flex-direction: row; background: #f8faff; border-bottom: 1px solid #f0f0f0; padding: 12px 0; }
|
||||
.table-row { display: flex; flex-direction: row; border-bottom: 1px solid #f0f0f0; padding: 12px 0; align-items: center; &:hover { background: #fafafa; } }
|
||||
.col { padding: 0 8px; font-size: 14px; color: #333; display: flex; align-items: center; }
|
||||
.col-uid { width: 80px; }
|
||||
.col-name { width: 120px; }
|
||||
.col-phone { width: 120px; }
|
||||
.col-dept { width: 120px; }
|
||||
.col-img { width: 80px; justify-content: center; }
|
||||
.col-time { width: 160px; justify-content: center; }
|
||||
.col-status { width: 100px; justify-content: center; }
|
||||
.col-code { width: 100px; justify-content: center; }
|
||||
.col-ops { flex: 1; justify-content: flex-end; }
|
||||
.table-img { width: 32px; height: 32px; border-radius: 2px; }
|
||||
.status-tag { border: 1px solid #1890ff; color: #1890ff; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
|
||||
.code-box { border: 1px solid #d9d9d9; padding: 2px 8px; border-radius: 4px; font-size: 12px; background: #fafafa; }
|
||||
.op-link { color: #1890ff; cursor: pointer; }
|
||||
.op-divider { color: #e8e8e8; margin: 0 8px; }
|
||||
</style>
|
||||
|
||||
|
||||
110
pages/mall/admin/distribution/division/list.uvue
Normal file
110
pages/mall/admin/distribution/division/list.uvue
Normal file
@@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<view class="admin-page">
|
||||
<view class="filter-card">
|
||||
<view class="filter-row">
|
||||
<view class="filter-item">
|
||||
<text class="label">鎼滅储锛?/text>
|
||||
<input class="filter-input" placeholder="璇疯緭鍏ュ鍚嶃€乁ID" />
|
||||
</view>
|
||||
<view class="filter-btns">
|
||||
<button class="btn primary" @click="onSearch">鏌ヨ</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="content-card">
|
||||
<view class="action-bar">
|
||||
<button class="btn primary small" @click="onAdd">娣诲姞浜嬩笟閮?/button>
|
||||
</view>
|
||||
|
||||
<view class="table-container">
|
||||
<view class="table-header">
|
||||
<view class="col col-uid"><text>鐢ㄦ埛UID</text></view>
|
||||
<view class="col col-avatar"><text>澶村儚</text></view>
|
||||
<view class="col col-name"><text>鍚嶇О</text></view>
|
||||
<view class="col col-code"><text>閭€璇风爜</text></view>
|
||||
<view class="col col-ratio"><text>鍒嗛攢姣斾緥</text></view>
|
||||
<view class="col col-count"><text>浠g悊鍟嗘暟閲?/text></view>
|
||||
<view class="col col-time"><text>鎴鏃堕棿</text></view>
|
||||
<view class="col col-status"><text>鐘舵€?/text></view>
|
||||
<view class="col col-ops"><text>鎿嶄綔</text></view>
|
||||
</view>
|
||||
|
||||
<view class="table-body">
|
||||
<view v-for="item in divisionList" :key="item.uid" class="table-row">
|
||||
<view class="col col-uid"><text>{{ item.uid }}</text></view>
|
||||
<view class="col col-avatar">
|
||||
<image class="avatar-img" src="/static/logo.png" mode="aspectFill" />
|
||||
</view>
|
||||
<view class="col col-name"><text>{{ item.name }}</text></view>
|
||||
<view class="col col-code"><text>{{ item.code }}</text></view>
|
||||
<view class="col col-ratio"><text>{{ item.ratio }}%</text></view>
|
||||
<view class="col col-count"><text>{{ item.agentCount }}</text></view>
|
||||
<view class="col col-time"><text>{{ item.endTime }}</text></view>
|
||||
<view class="col col-status">
|
||||
<switch :checked="item.status" color="#1890ff" scale="0.8" />
|
||||
</view>
|
||||
<view class="col col-ops">
|
||||
<text class="op-link">鏌ョ湅浠g悊鍟?/text>
|
||||
<text class="op-divider">|</text>
|
||||
<text class="op-link">缂栬緫</text>
|
||||
<text class="op-divider">|</text>
|
||||
<text class="op-link">鍒犻櫎</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
const divisionList = ref([
|
||||
{ uid: '26991', name: '26991', code: '70623142', ratio: 40, agentCount: 1, endTime: '2026-12-31', status: true },
|
||||
{ uid: '37221', name: '鍑岃景绉戞妧', code: '80889444', ratio: 10, agentCount: 5, endTime: '2029-09-30', status: true },
|
||||
{ uid: '38837', name: 'yuyuyuyu', code: '96970376', ratio: 50, agentCount: 0, endTime: '2024-09-05', status: true },
|
||||
{ uid: '46444', name: '瓒呯骇浜嬩笟閮?, code: '41026828', ratio: 30, agentCount: 1, endTime: '2026-09-03', status: true }
|
||||
])
|
||||
|
||||
function onSearch() {
|
||||
uni.showToast({ title: '鏌ヨ涓?..', icon: 'none' })
|
||||
}
|
||||
|
||||
function onAdd() {
|
||||
uni.showToast({ title: '娣诲姞浜嬩笟閮?, icon: 'none' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
/* Use similar styles as others */
|
||||
.admin-page { /* padding removed */ }
|
||||
.filter-card { background: #fff; padding: 24px; margin-bottom: 16px; border-radius: 4px; }
|
||||
.filter-row { display: flex; flex-direction: row; align-items: center; gap: 24px; }
|
||||
.label { font-size: 14px; color: #333; }
|
||||
.filter-input { border: 1px solid #d9d9d9; height: 32px; width: 220px; padding: 0 12px; font-size: 14px; }
|
||||
.btn { height: 32px; padding: 0 16px; font-size: 14px; border: 1px solid #d9d9d9; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
|
||||
.btn.primary { background: #1890ff; border-color: #1890ff; color: #fff; }
|
||||
.btn.small { height: 32px; }
|
||||
.content-card { background: #fff; border-radius: 4px; }
|
||||
.action-bar { padding: 16px 24px; }
|
||||
.table-container { padding: 0 24px 24px; }
|
||||
.table-header { display: flex; flex-direction: row; background: #f8faff; border-bottom: 1px solid #f0f0f0; padding: 12px 0; }
|
||||
.table-row { display: flex; flex-direction: row; border-bottom: 1px solid #f0f0f0; padding: 12px 0; align-items: center; &:hover { background: #fafafa; } }
|
||||
.col { padding: 0 8px; font-size: 14px; color: #333; display: flex; align-items: center; }
|
||||
.col-uid { width: 80px; }
|
||||
.col-avatar { width: 80px; justify-content: center; }
|
||||
.col-name { width: 120px; }
|
||||
.col-code { width: 100px; justify-content: center; }
|
||||
.col-ratio { width: 100px; justify-content: center; }
|
||||
.col-count { width: 100px; justify-content: center; }
|
||||
.col-time { width: 120px; justify-content: center; }
|
||||
.col-status { width: 80px; justify-content: center; }
|
||||
.col-ops { flex: 1; justify-content: flex-end; }
|
||||
.avatar-img { width: 32px; height: 32px; border-radius: 2px; }
|
||||
.op-link { color: #1890ff; cursor: pointer; }
|
||||
.op-divider { color: #e8e8e8; margin: 0 8px; }
|
||||
</style>
|
||||
|
||||
|
||||
258
pages/mall/admin/distribution/level/index.uvue
Normal file
258
pages/mall/admin/distribution/level/index.uvue
Normal file
@@ -0,0 +1,258 @@
|
||||
<template>
|
||||
<view class="admin-page">
|
||||
<view class="filter-card">
|
||||
<view class="filter-row">
|
||||
<view class="filter-item">
|
||||
<text class="label">鏄惁鏄剧ず锛?/text>
|
||||
<view class="select-mock">
|
||||
<text>鍏ㄩ儴</text>
|
||||
<text class="arrow">鈻?/text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter-item">
|
||||
<text class="label">绛夌骇鍚嶇О锛?/text>
|
||||
<input class="filter-input" placeholder="璇疯緭鍏ョ瓑绾у悕绉? />
|
||||
</view>
|
||||
<view class="filter-btns">
|
||||
<button class="btn primary" @click="onSearch">鏌ヨ</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="content-card">
|
||||
<view class="action-bar">
|
||||
<button class="btn primary small" @click="onAdd">娣诲姞绛夌骇</button>
|
||||
</view>
|
||||
|
||||
<view class="table-container">
|
||||
<view class="table-header">
|
||||
<view class="col col-id"><text>ID</text></view>
|
||||
<view class="col col-img"><text>鍟嗗搧鍥剧墖</text></view>
|
||||
<view class="col col-name"><text>鍚嶇О</text></view>
|
||||
<view class="col col-level"><text>绛夌骇</text></view>
|
||||
<view class="col col-percent"><text>涓€绾у垎浣f瘮渚?/text></view>
|
||||
<view class="col col-percent"><text>浜岀骇鍒嗕剑姣斾緥</text></view>
|
||||
<view class="col col-stat"><text>浠诲姟鎬绘暟</text></view>
|
||||
<view class="col col-stat"><text>闇€瀹屾垚鏁伴噺</text></view>
|
||||
<view class="col col-status"><text>鏄惁鏄剧ず</text></view>
|
||||
<view class="col col-ops"><text>鎿嶄綔</text></view>
|
||||
</view>
|
||||
|
||||
<view class="table-body">
|
||||
<view v-for="item in levelList" :key="item.id" class="table-row">
|
||||
<view class="col col-id"><text>{{ item.id }}</text></view>
|
||||
<view class="col col-img">
|
||||
<image class="table-img" src="/static/logo.png" mode="aspectFill" />
|
||||
</view>
|
||||
<view class="col col-name"><text>{{ item.name }}</text></view>
|
||||
<view class="col col-level"><text>{{ item.level }}</text></view>
|
||||
<view class="col col-percent"><text>{{ item.percent1 }}%</text></view>
|
||||
<view class="col col-percent"><text>{{ item.percent2 }}%</text></view>
|
||||
<view class="col col-stat"><text>{{ item.taskTotal }}</text></view>
|
||||
<view class="col col-stat"><text>{{ item.taskFinish }}</text></view>
|
||||
<view class="col col-status">
|
||||
<switch :checked="item.show" color="#1890ff" scale="0.8" />
|
||||
</view>
|
||||
<view class="col col-ops">
|
||||
<text class="op-link">绛夌骇浠诲姟</text>
|
||||
<text class="op-divider">|</text>
|
||||
<text class="op-link">缂栬緫</text>
|
||||
<text class="op-divider">|</text>
|
||||
<text class="op-link">鍒犻櫎</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="pagination">
|
||||
<text class="page-info">鍏?{{ levelList.length }} 鏉?/text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
const levelList = ref([
|
||||
{ id: '1', name: '涓€绾у垎閿€鍛?, level: 1, percent1: 0.00, percent2: 0.00, taskTotal: 0, taskFinish: 0, show: true },
|
||||
{ id: '2', name: '浜岀骇鍒嗛攢鍛?, level: 2, percent1: 0.00, percent2: 0.00, taskTotal: 0, taskFinish: 0, show: true },
|
||||
{ id: '3', name: '涓夌骇鍒嗛攢鍛?, level: 3, percent1: 0.00, percent2: 0.00, taskTotal: 0, taskFinish: 0, show: true },
|
||||
{ id: '4', name: '鍥涚骇鍒嗛攢鍛?, level: 4, percent1: 0.00, percent2: 0.00, taskTotal: 0, taskFinish: 0, show: true },
|
||||
{ id: '5', name: '浜旂骇鍒嗛攢鍛?, level: 5, percent1: 0.00, percent2: 0.00, taskTotal: 0, taskFinish: 0, show: true }
|
||||
])
|
||||
|
||||
function onSearch() {
|
||||
uni.showToast({ title: '鏌ヨ涓?..', icon: 'none' })
|
||||
}
|
||||
|
||||
function onAdd() {
|
||||
uni.showToast({ title: '寮€濮嬫坊鍔?, icon: 'none' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.admin-page {
|
||||
/* padding removed */
|
||||
|
||||
|
||||
}
|
||||
|
||||
.filter-card {
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
padding: 24px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.filter-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.filter-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.select-mock {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 2px;
|
||||
height: 32px;
|
||||
width: 160px;
|
||||
padding: 0 12px;
|
||||
background: #fff;
|
||||
text { font-size: 14px; color: #666; }
|
||||
.arrow { font-size: 10px; color: #bfbfbf; }
|
||||
}
|
||||
|
||||
.filter-input {
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 2px;
|
||||
height: 32px;
|
||||
width: 220px;
|
||||
padding: 0 12px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
height: 32px;
|
||||
padding: 0 16px;
|
||||
font-size: 14px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.btn.primary {
|
||||
background: #1890ff;
|
||||
border-color: #1890ff;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn.small {
|
||||
height: 32px;
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.content-card {
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.action-bar {
|
||||
padding: 16px 24px;
|
||||
}
|
||||
|
||||
.table-container {
|
||||
padding: 0 24px 24px;
|
||||
}
|
||||
|
||||
.table-header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
background: #f8faff;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
.table-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
padding: 12px 0;
|
||||
align-items: center;
|
||||
|
||||
&:hover {
|
||||
background: #fafafa;
|
||||
}
|
||||
}
|
||||
|
||||
.col {
|
||||
padding: 0 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.col-id { width: 50px; }
|
||||
.col-img { width: 80px; justify-content: center; }
|
||||
.col-name { width: 120px; }
|
||||
.col-level { width: 80px; justify-content: center; }
|
||||
.col-percent { width: 120px; justify-content: center; }
|
||||
.col-stat { width: 100px; justify-content: center; }
|
||||
.col-status { width: 100px; justify-content: center; }
|
||||
.col-ops {
|
||||
flex: 1;
|
||||
justify-content: flex-end;
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
.table-img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.op-link {
|
||||
color: #1890ff;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.op-divider {
|
||||
color: #e8e8e8;
|
||||
margin: 0 8px;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
padding: 16px 24px;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.page-info {
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
305
pages/mall/admin/distribution/promoter/index.uvue
Normal file
305
pages/mall/admin/distribution/promoter/index.uvue
Normal file
@@ -0,0 +1,305 @@
|
||||
<template>
|
||||
<view class="admin-page">
|
||||
<!-- 绛涢€夐潰鏉?-->
|
||||
<view class="filter-card">
|
||||
<view class="filter-row">
|
||||
<view class="filter-item">
|
||||
<text class="label">鏃堕棿閫夋嫨锛?/text>
|
||||
<view class="date-picker-mock">
|
||||
<text class="placeholder">寮€濮嬫棩鏈?- 缁撴潫鏃ユ湡</text>
|
||||
<text class="icon-calendar">馃搮</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="filter-item">
|
||||
<text class="label">鎼滅储锛?/text>
|
||||
<input class="filter-input" placeholder="璇疯緭鍏ュ鍚嶃€佺數璇濄€乁ID" />
|
||||
</view>
|
||||
|
||||
<view class="filter-btns">
|
||||
<button class="btn primary" @click="onSearch">鏌ヨ</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 鍐呭鍗$墖 -->
|
||||
<view class="content-card">
|
||||
<view class="action-bar">
|
||||
<button class="btn ghost small" @click="onExport">瀵煎嚭</button>
|
||||
</view>
|
||||
|
||||
<view class="table-container">
|
||||
<!-- 琛ㄥご -->
|
||||
<view class="table-header">
|
||||
<view class="col col-id"><text>ID</text></view>
|
||||
<view class="col col-img"><text>鍟嗗搧鍥剧墖</text></view>
|
||||
<view class="col col-info"><text>鐢ㄦ埛淇℃伅</text></view>
|
||||
<view class="col col-level"><text>鍒嗛攢绛夌骇</text></view>
|
||||
<view class="col col-stat"><text>鎺ㄥ箍鐢ㄦ埛鏁伴噺</text></view>
|
||||
<view class="col col-stat"><text>鎺ㄥ箍璁㈠崟鏁伴噺</text></view>
|
||||
<view class="col col-stat"><text>鎺ㄥ箍璁㈠崟閲戦</text></view>
|
||||
<view class="col col-stat"><text>浣i噾鎬婚噾棰?/text></view>
|
||||
<view class="col col-stat"><text>宸叉彁鐜伴噾棰?/text></view>
|
||||
<view class="col col-stat"><text>鎻愮幇娆℃暟</text></view>
|
||||
<view class="col col-stat"><text>鏈彁鐜伴噾棰?/text></view>
|
||||
<view class="col col-ops"><text>鎿嶄綔</text></view>
|
||||
</view>
|
||||
|
||||
<!-- 琛ㄦ牸鍐呭 -->
|
||||
<view class="table-body">
|
||||
<view v-for="item in promoterList" :key="item.id" class="table-row">
|
||||
<view class="col col-id"><text>{{ item.id }}</text></view>
|
||||
<view class="col col-img">
|
||||
<image class="table-img" src="/static/logo.png" mode="aspectFill" />
|
||||
</view>
|
||||
<view class="col col-info">
|
||||
<view class="user-info-box">
|
||||
<text class="info-text">鏄电О:{{ item.nickname }}</text>
|
||||
<text class="info-text">濮撳悕:{{ item.name }}</text>
|
||||
<text class="info-text">鐢佃瘽:{{ item.phone }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="col col-level"><text>{{ item.level }}</text></view>
|
||||
<view class="col col-stat"><text>{{ item.userCount }}</text></view>
|
||||
<view class="col col-stat"><text>{{ item.orderCount }}</text></view>
|
||||
<view class="col col-stat"><text>{{ item.orderAmount }}</text></view>
|
||||
<view class="col col-stat"><text>{{ item.commissionTotal }}</text></view>
|
||||
<view class="col col-stat"><text>{{ item.withdrawnAmount }}</text></view>
|
||||
<view class="col col-stat"><text>{{ item.withdrawCount }}</text></view>
|
||||
<view class="col col-stat"><text>{{ item.unwithdrawnAmount }}</text></view>
|
||||
<view class="col col-ops">
|
||||
<text class="op-link" @click="onPromoter(item)">鎺ㄥ箍浜?/text>
|
||||
<text class="op-divider">|</text>
|
||||
<text class="op-link" @click="onMore(item)">鏇村</text>
|
||||
<text class="arrow-down">鈻?/text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 鍒嗛〉 (妯℃嫙) -->
|
||||
<view class="pagination">
|
||||
<text class="page-info">鍏?{{ promoterList.length }} 鏉?/text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
const promoterList = ref([
|
||||
{ id: '82764', nickname: '183****5762', name: '-', phone: '183****5762', level: '--', userCount: 0, orderCount: 0, orderAmount: '0.00', commissionTotal: '0.00', withdrawnAmount: 0, withdrawCount: 0, unwithdrawnAmount: 0 },
|
||||
{ id: '82763', nickname: '1', name: '-', phone: '185****4518', level: '--', userCount: 0, orderCount: 0, orderAmount: '0.00', commissionTotal: '0.00', withdrawnAmount: 0, withdrawCount: 0, unwithdrawnAmount: 0 },
|
||||
{ id: '82762', nickname: 'Ronnie', name: '-', phone: '153****0391', level: '--', userCount: 0, orderCount: 0, orderAmount: '0.00', commissionTotal: '0.00', withdrawnAmount: 0, withdrawCount: 0, unwithdrawnAmount: 0 },
|
||||
{ id: '82761', nickname: 'Charon', name: '-', phone: '181****6248', level: '--', userCount: 0, orderCount: 0, orderAmount: '0.00', commissionTotal: '0.00', withdrawnAmount: 0, withdrawCount: 0, unwithdrawnAmount: 0 },
|
||||
{ id: '82760', nickname: '11', name: '-', phone: '177****0265', level: '--', userCount: 0, orderCount: 0, orderAmount: '0.00', commissionTotal: '0.00', withdrawnAmount: 0, withdrawCount: 0, unwithdrawnAmount: 0 }
|
||||
])
|
||||
|
||||
function onSearch() {
|
||||
uni.showToast({ title: '鏌ヨ涓?..', icon: 'none' })
|
||||
}
|
||||
|
||||
function onExport() {
|
||||
uni.showToast({ title: '寮€濮嬪鍑?, icon: 'none' })
|
||||
}
|
||||
|
||||
function onPromoter(item: any) {
|
||||
uni.showToast({ title: '鏌ョ湅鎺ㄥ箍浜? ' + item.id, icon: 'none' })
|
||||
}
|
||||
|
||||
function onMore(item: any) {
|
||||
uni.showToast({ title: '鏇村鎿嶄綔: ' + item.id, icon: 'none' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.admin-page {
|
||||
/* padding removed */
|
||||
|
||||
|
||||
}
|
||||
|
||||
.filter-card {
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
padding: 24px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.filter-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.filter-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.date-picker-mock {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 2px;
|
||||
height: 32px;
|
||||
width: 260px;
|
||||
padding: 0 12px;
|
||||
background: #fff;
|
||||
.placeholder { font-size: 14px; color: #bfbfbf; }
|
||||
.icon-calendar { font-size: 14px; color: #bfbfbf; }
|
||||
}
|
||||
|
||||
.filter-input {
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 2px;
|
||||
height: 32px;
|
||||
width: 220px;
|
||||
padding: 0 12px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.filter-btns {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.btn {
|
||||
height: 32px;
|
||||
padding: 0 16px;
|
||||
font-size: 14px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.btn.primary {
|
||||
background: #2f54eb;
|
||||
border-color: #2f54eb;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn.ghost {
|
||||
color: #666;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.btn.small {
|
||||
height: 28px;
|
||||
padding: 0 12px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.content-card {
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.action-bar {
|
||||
padding: 16px 24px;
|
||||
}
|
||||
|
||||
.table-container {
|
||||
padding: 0 24px 24px;
|
||||
}
|
||||
|
||||
.table-header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
background: #f8faff;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
.table-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
padding: 12px 0;
|
||||
align-items: center;
|
||||
|
||||
&:hover {
|
||||
background: #fafafa;
|
||||
}
|
||||
}
|
||||
|
||||
.col {
|
||||
padding: 0 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.col-id { width: 60px; }
|
||||
.col-img { width: 80px; justify-content: center; }
|
||||
.col-info { width: 180px; }
|
||||
.col-level { width: 100px; justify-content: center; }
|
||||
.col-stat { width: 110px; justify-content: center; }
|
||||
.col-ops {
|
||||
flex: 1;
|
||||
justify-content: flex-end;
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
.table-img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.user-info-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.info-text {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.op-link {
|
||||
color: #1890ff;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.op-divider {
|
||||
color: #e8e8e8;
|
||||
margin: 0 8px;
|
||||
}
|
||||
|
||||
.arrow-down {
|
||||
font-size: 10px;
|
||||
color: #1890ff;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
padding: 16px 24px;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.page-info {
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
508
pages/mall/admin/distribution/setting/index.uvue
Normal file
508
pages/mall/admin/distribution/setting/index.uvue
Normal file
@@ -0,0 +1,508 @@
|
||||
<template>
|
||||
<view class="admin-page">
|
||||
<view class="content-card">
|
||||
<view class="tabs-row">
|
||||
<view
|
||||
v-for="(tab, index) in tabs"
|
||||
:key="index"
|
||||
class="tab-item"
|
||||
:class="{ active: activeTab === index }"
|
||||
@click="activeTab = index"
|
||||
>
|
||||
<text>{{ tab }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-container">
|
||||
<!-- 分销模式 -->
|
||||
<view v-if="activeTab === 0" class="form-content">
|
||||
<view class="form-item">
|
||||
<text class="label">分销启用:</text>
|
||||
<radio-group class="radio-group" @change="(e: UniRadioGroupChangeEvent) => form.statue = e.detail.value">
|
||||
<label class="radio-label">
|
||||
<radio value="1" :checked="form.statue === '1'" color="#1890ff" /> 开启
|
||||
</label>
|
||||
<label class="radio-label">
|
||||
<radio value="0" :checked="form.statue === '0'" color="#1890ff" /> 关闭
|
||||
</label>
|
||||
</radio-group>
|
||||
<text class="hint">商城分销功能开启关闭</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">分销模式:</text>
|
||||
<radio-group class="radio-group" @change="(e: UniRadioGroupChangeEvent) => form.extract_type = e.detail.value">
|
||||
<label class="radio-label">
|
||||
<radio value="1" :checked="form.extract_type === '1'" color="#1890ff" /> 指定分销
|
||||
</label>
|
||||
<label class="radio-label">
|
||||
<radio value="2" :checked="form.extract_type === '2'" color="#1890ff" /> 人人分销
|
||||
</label>
|
||||
<label class="radio-label">
|
||||
<radio value="3" :checked="form.extract_type === '3'" color="#1890ff" /> 满额分销
|
||||
</label>
|
||||
</radio-group>
|
||||
<text class="hint">人人分销"默认每个人都可以分销,“指定分销”仅后台手动设置推广员,“满额分销”指用户购买商品满足消费金额后自动开启分销</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">分销关系绑定:</text>
|
||||
<radio-group class="radio-group" @change="(e: UniRadioGroupChangeEvent) => form.bind_type = e.detail.value">
|
||||
<label class="radio-label">
|
||||
<radio value="1" :checked="form.bind_type === '1'" color="#1890ff" /> 所有用户
|
||||
</label>
|
||||
<label class="radio-label">
|
||||
<radio value="2" :checked="form.bind_type === '2'" color="#1890ff" /> 新用户
|
||||
</label>
|
||||
</radio-group>
|
||||
<text class="hint">所有用户”指所有没有上级推广人的用户点击或扫码即绑定分销关系,“新用户”指新注册的用户或首次进入系统的用户才会绑定推广关系</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">绑定模式:</text>
|
||||
<radio-group class="radio-group" @change="(e: UniRadioGroupChangeEvent) => form.store_brokerage_binding_status = e.detail.value">
|
||||
<label class="radio-label">
|
||||
<radio value="1" :checked="form.store_brokerage_binding_status === '1'" color="#1890ff" /> 永久
|
||||
</label>
|
||||
<label class="radio-label">
|
||||
<radio value="2" :checked="form.store_brokerage_binding_status === '2'" color="#1890ff" /> 有效期
|
||||
</label>
|
||||
<label class="radio-label">
|
||||
<radio value="3" :checked="form.store_brokerage_binding_status === '3'" color="#1890ff" /> 临时
|
||||
</label>
|
||||
</radio-group>
|
||||
<text class="hint">永久”一次绑定永久有效,“有效期”绑定后一段时间内有效,“临时”临时有效</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">分销海报图:</text>
|
||||
<view class="poster-upload">
|
||||
<image class="poster-preview" v-if="form.brokerage_poster_status" :src="form.brokerage_poster_status" mode="aspectFill"></image>
|
||||
<view v-else class="upload-btn" @click="onUploadPoster">
|
||||
<text class="plus">+</text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="hint">个人中心分销海报图片,建议尺寸600x1000</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">分销层级:</text>
|
||||
<radio-group class="radio-group" @change="(e: UniRadioGroupChangeEvent) => form.brokerage_level = e.detail.value">
|
||||
<label class="radio-label">
|
||||
<radio value="1" :checked="form.brokerage_level === '1'" color="#1890ff" /> 一级分销
|
||||
</label>
|
||||
<label class="radio-label">
|
||||
<radio value="2" :checked="form.brokerage_level === '2'" color="#1890ff" /> 二级分销
|
||||
</label>
|
||||
</radio-group>
|
||||
<text class="hint">分销层级,一级是只返上一层的佣金,二级是返上级 and 上上级的佣金</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">事业部开关:</text>
|
||||
<radio-group class="radio-group" @change="(e: UniRadioGroupChangeEvent) => form.is_area_manager = e.detail.value">
|
||||
<label class="radio-label">
|
||||
<radio value="1" :checked="form.is_area_manager === '1'" color="#1890ff" /> 开启
|
||||
</label>
|
||||
<label class="radio-label">
|
||||
<radio value="0" :checked="form.is_area_manager === '0'" color="#1890ff" /> 关闭
|
||||
</label>
|
||||
</radio-group>
|
||||
<text class="hint">事业部开关,关闭后不计算事业部佣金</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">代理商申请开关:</text>
|
||||
<radio-group class="radio-group" @change="(e: UniRadioGroupChangeEvent) => form.is_agent_apply = e.detail.value">
|
||||
<label class="radio-label">
|
||||
<radio value="1" :checked="form.is_agent_apply === '1'" color="#1890ff" /> 开启
|
||||
</label>
|
||||
<label class="radio-label">
|
||||
<radio value="0" :checked="form.is_agent_apply === '0'" color="#1890ff" /> 关闭
|
||||
</label>
|
||||
</radio-group>
|
||||
<text class="hint">控制移动端我的推广页面的代理商申请按钮是否显示</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">佣金悬浮窗开关:</text>
|
||||
<radio-group class="radio-group" @change="(e: UniRadioGroupChangeEvent) => form.is_commission_window = e.detail.value">
|
||||
<label class="radio-label">
|
||||
<radio value="1" :checked="form.is_commission_window === '1'" color="#1890ff" /> 开启
|
||||
</label>
|
||||
<label class="radio-label">
|
||||
<radio value="0" :checked="form.is_commission_window === '0'" color="#1890ff" /> 关闭
|
||||
</label>
|
||||
</radio-group>
|
||||
<text class="hint">佣金悬浮窗开关,关闭之后,商品详情不显示佣金悬浮窗</text>
|
||||
</view>
|
||||
|
||||
<button class="submit-btn" @click="onSubmit">提交</button>
|
||||
</view>
|
||||
|
||||
<!-- 返佣设置 -->
|
||||
<view v-if="activeTab === 1" class="form-content">
|
||||
<view class="form-item">
|
||||
<text class="label">自购返佣:</text>
|
||||
<radio-group class="radio-group" @change="(e: UniRadioGroupChangeEvent) => form.is_self_brokerage = e.detail.value">
|
||||
<label class="radio-label">
|
||||
<radio value="1" :checked="form.is_self_brokerage === '1'" color="#1890ff" /> 开启
|
||||
</label>
|
||||
<label class="radio-label">
|
||||
<radio value="0" :checked="form.is_self_brokerage === '0'" color="#1890ff" /> 关闭
|
||||
</label>
|
||||
</radio-group>
|
||||
<text class="hint">是否开启自购返佣(开启:分销员自己购买商品,享受一级返佣,上级享受二级返佣;关闭:分销员自己购买商品没有返佣)</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">购买付费会员返佣:</text>
|
||||
<radio-group class="radio-group" @change="(e: UniRadioGroupChangeEvent) => form.is_member_brokerage = e.detail.value">
|
||||
<label class="radio-label">
|
||||
<radio value="1" :checked="form.is_member_brokerage === '1'" color="#1890ff" /> 开启
|
||||
</label>
|
||||
<label class="radio-label">
|
||||
<radio value="0" :checked="form.is_member_brokerage === '0'" color="#1890ff" /> 关闭
|
||||
</label>
|
||||
</radio-group>
|
||||
<text class="hint">购买付费会员是否按照设置的佣金比例进行返佣</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">返佣类型:</text>
|
||||
<radio-group class="radio-group" @change="(e: UniRadioGroupChangeEvent) => form.brokerage_type = e.detail.value">
|
||||
<label class="radio-label">
|
||||
<radio value="1" :checked="form.brokerage_type === '1'" color="#1890ff" /> 按照商品价格返佣
|
||||
</label>
|
||||
<label class="radio-label">
|
||||
<radio value="2" :checked="form.brokerage_type === '2'" color="#1890ff" /> 按照实际支付价格返佣
|
||||
</label>
|
||||
</radio-group>
|
||||
<text class="hint">选择返佣类型,按照商品价格返佣(按照商品售价计算返佣金额)以及按照实际支付价格返佣(按照商品的实际支付价格计算返佣)</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">推广用户返佣:</text>
|
||||
<radio-group class="radio-group" @change="(e: UniRadioGroupChangeEvent) => form.is_promoter_brokerage = e.detail.value">
|
||||
<label class="radio-label">
|
||||
<radio value="1" :checked="form.is_promoter_brokerage === '1'" color="#1890ff" /> 开启
|
||||
</label>
|
||||
<label class="radio-label">
|
||||
<radio value="0" :checked="form.is_promoter_brokerage === '0'" color="#1890ff" /> 关闭
|
||||
</label>
|
||||
</radio-group>
|
||||
<text class="hint">分销推广用户获取佣金</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">推广佣金单价:</text>
|
||||
<view class="input-with-unit">
|
||||
<input class="form-input" :value="form.promoter_brokerage_price" @input="(e: UniInputEvent) => form.promoter_brokerage_price = e.detail.value" />
|
||||
</view>
|
||||
<text class="hint">分销推广佣金单价(每推广一个用户)</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">每日推广佣金上限:</text>
|
||||
<view class="input-with-unit">
|
||||
<input class="form-input" :value="form.promoter_brokerage_day_max" @input="(e: UniInputEvent) => form.promoter_brokerage_day_max = e.detail.value" />
|
||||
</view>
|
||||
<text class="hint">每日推广佣金上限(0:不发佣金;-1:不限制;最好是推广佣金单价的整数倍)</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">一级返佣比例:</text>
|
||||
<view class="input-with-unit">
|
||||
<input class="form-input" :value="form.store_brokerage_ratio" @input="(e: UniInputEvent) => form.store_brokerage_ratio = e.detail.value" />
|
||||
</view>
|
||||
<text class="hint">订单交易成功后给上级返佣的比例0 - 100,例:5 = 反订单商品金额的5%</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">二级返佣比例:</text>
|
||||
<view class="input-with-unit">
|
||||
<input class="form-input" :value="form.store_brokerage_two_ratio" @input="(e: UniInputEvent) => form.store_brokerage_two_ratio = e.detail.value" />
|
||||
</view>
|
||||
<text class="hint">订单交易成功后给上上级返佣的比例0 - 100,例:5 = 反订单商品金额 of 5%</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">冻结时间:</text>
|
||||
<view class="input-with-unit">
|
||||
<input class="form-input" :value="form.extract_frozen_time" @input="(e: UniInputEvent) => form.extract_frozen_time = e.detail.value" />
|
||||
</view>
|
||||
<text class="hint">防止用户退款,佣金被提现了,所以需要设置佣金冻结时间(天)</text>
|
||||
</view>
|
||||
|
||||
<button class="submit-btn" @click="onSubmit">提交</button>
|
||||
</view>
|
||||
|
||||
<!-- 提现设置 -->
|
||||
<view v-if="activeTab === 2" class="form-content">
|
||||
<view class="form-item">
|
||||
<text class="label">提现最低金额:</text>
|
||||
<input class="form-input" :value="form.user_extract_min_price" @input="(e: UniInputEvent) => form.user_extract_min_price = e.detail.value" />
|
||||
<text class="hint">用户提现最低金额限制</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">提现银行卡:</text>
|
||||
<textarea class="form-textarea" :value="form.extract_bank_list" @input="(e: UniInputEvent) => form.extract_bank_list = e.detail.value" placeholder="配置提现银行卡类型,每个银行换行"></textarea>
|
||||
<text class="hint">配置提现银行卡类型,每个银行换行</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">提现方式:</text>
|
||||
<checkbox-group class="checkbox-group" @change="(e: UniCheckboxGroupChangeEvent) => form.extract_type_list = e.detail.value">
|
||||
<label class="checkbox-label"><checkbox value="bank" :checked="form.extract_type_list.includes('bank')" color="#1890ff" /> 银行卡</label>
|
||||
<label class="checkbox-label"><checkbox value="wechat" :checked="form.extract_type_list.includes('wechat')" color="#1890ff" /> 微信</label>
|
||||
<label class="checkbox-label"><checkbox value="alipay" :checked="form.extract_type_list.includes('alipay')" color="#1890ff" /> 支付宝</label>
|
||||
</checkbox-group>
|
||||
<text class="hint">开启后用户可以选择该提现方式</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">微信提现:</text>
|
||||
<radio-group class="radio-group" @change="(e: UniRadioGroupChangeEvent) => form.wechat_extract_type = e.detail.value">
|
||||
<label class="radio-label">
|
||||
<radio value="1" :checked="form.wechat_extract_type === '1'" color="#1890ff" /> 手动线下转账
|
||||
</label>
|
||||
<label class="radio-label">
|
||||
<radio value="2" :checked="form.wechat_extract_type === '2'" color="#1890ff" /> 自动转账到零钱
|
||||
</label>
|
||||
</radio-group>
|
||||
<text class="hint">微信提现方式:手动线下转账,自动转账到零钱(需开通商家转账到零钱)</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">支付宝提现:</text>
|
||||
<radio-group class="radio-group" @change="(e: UniRadioGroupChangeEvent) => form.alipay_extract_type = e.detail.value">
|
||||
<label class="radio-label">
|
||||
<radio value="1" :checked="form.alipay_extract_type === '1'" color="#1890ff" /> 手动线下转账
|
||||
</label>
|
||||
<label class="radio-label">
|
||||
<radio value="2" :checked="form.alipay_extract_type === '2'" color="#1890ff" /> 自动转账到余额
|
||||
</label>
|
||||
</radio-group>
|
||||
<text class="hint">支付宝提现方式:手动线下转账,自动转账到余额(需开通支付宝转账)</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">提现手续费:</text>
|
||||
<input class="form-input" :value="form.user_extract_fee" @input="(e: UniInputEvent) => form.user_extract_fee = e.detail.value" />
|
||||
<text class="hint">提现手续费百分比,范围0-100,0为无提现手续费,例:设置10,即收取10%手续费,提现100元,到账90元,10元手续费</text>
|
||||
</view>
|
||||
|
||||
<button class="submit-btn" @click="onSubmit">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
const activeTab = ref(0)
|
||||
const tabs = ['分销模式', '返佣设置', '提现设置']
|
||||
|
||||
const form = ref({
|
||||
// 分销模式
|
||||
statue: '1',
|
||||
extract_type: '2',
|
||||
bind_type: '2',
|
||||
store_brokerage_binding_status: '1',
|
||||
brokerage_poster_status: '',
|
||||
brokerage_level: '2',
|
||||
is_area_manager: '1',
|
||||
is_agent_apply: '1',
|
||||
is_commission_window: '1',
|
||||
|
||||
// 返佣设置
|
||||
is_self_brokerage: '1',
|
||||
is_member_brokerage: '0',
|
||||
brokerage_type: '1',
|
||||
is_promoter_brokerage: '1',
|
||||
promoter_brokerage_price: '2',
|
||||
promoter_brokerage_day_max: '-1',
|
||||
store_brokerage_ratio: '20',
|
||||
store_brokerage_two_ratio: '2',
|
||||
extract_frozen_time: '1',
|
||||
|
||||
// 提现设置
|
||||
user_extract_min_price: '1',
|
||||
extract_bank_list: '中国银行',
|
||||
extract_type_list: ['bank', 'wechat', 'alipay'],
|
||||
wechat_extract_type: '1',
|
||||
alipay_extract_type: '1',
|
||||
user_extract_fee: '0'
|
||||
})
|
||||
|
||||
function onUploadPoster() {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
success: (res) => {
|
||||
form.value.brokerage_poster_status = res.tempFilePaths[0]
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
uni.showToast({ title: '保存成功', icon: 'success' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.admin-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.content-card {
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.tabs-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding: 0 24px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
padding: 16px 20px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
text { font-size: 15px; color: #666; }
|
||||
|
||||
&.active {
|
||||
text { color: #1890ff; font-weight: 500; }
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 2px;
|
||||
background: #1890ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form-container {
|
||||
padding: 32px 24px;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
margin-bottom: 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
margin-bottom: 8px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.radio-group, .checkbox-group {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.radio-label, .checkbox-label {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.hint {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
margin-top: 8px;
|
||||
line-height: 1.5;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
.form-input {
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 4px;
|
||||
height: 36px;
|
||||
padding: 0 12px;
|
||||
font-size: 14px;
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.form-textarea {
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 4px;
|
||||
padding: 8px 12px;
|
||||
font-size: 14px;
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
height: 120px;
|
||||
}
|
||||
|
||||
.poster-upload {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
background-color: #fafafa;
|
||||
|
||||
&:hover {
|
||||
border-color: #1890ff;
|
||||
}
|
||||
}
|
||||
|
||||
.poster-preview {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.upload-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.plus {
|
||||
font-size: 24px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.input-with-unit {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
margin-top: 24px;
|
||||
width: 80px;
|
||||
height: 36px;
|
||||
background: #1890ff;
|
||||
color: #fff;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
|
||||
&:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user