Merge branch 'test'
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-09-06 21:39:30 +08:00
8 changed files with 4847 additions and 1743 deletions

6339
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -68,7 +68,7 @@ const tabs = [
const count = ref(tabs.map((item) => item.messages).flat().length)
watch(activeTab, (v) => {
if (count === 0) return
if (count.value === 0) return
const tabIndex = tabs.findIndex((item) => item.name === v)
count.value -= tabs[tabIndex].messages.length
if (count.value < 0) count.value = 0

View File

@@ -32,12 +32,12 @@
<!-- ]"-->
<!-- />-->
<!-- </n-form-item-gi>-->
<n-form-item-gi :span="12" label="现金价格:" path="number">
<n-form-item-gi :span="12" label="商品价格:" path="number">
<n-input-number v-model:value="model.number" :min="0" placeholder="输入现金价格" />
</n-form-item-gi>
<n-form-item-gi :span="12" label="积分价格:" path="exchange">
<n-input-number v-model:value="model.exchange" :min="0" placeholder="输入积分价格" />
</n-form-item-gi>
<!-- <n-form-item-gi :span="12" label="积分价格:" path="exchange">-->
<!-- <n-input-number v-model:value="model.exchange" :min="0" placeholder="输入积分价格" />-->
<!-- </n-form-item-gi>-->
<n-form-item-gi :span="12" label="商品库存:" path="stock">
<n-input-number v-model:value="model.stock" :min="0" placeholder="输入商品库存" />
</n-form-item-gi>
@@ -118,12 +118,12 @@ const rules = {
message: '请输入商品价格',
trigger: 'blur',
},
exchange: {
required: true,
type: 'number',
message: '请输入市场价格',
trigger: 'blur',
},
// exchange: {
// required: true,
// type: 'number',
// message: '请输入市场价格',
// trigger: 'blur',
// },
stock: {
required: true,
type: 'number',
@@ -150,7 +150,7 @@ const getClassList = async () => {
classList.value = res.data.data.filter((item) => item.status !== 2)
if (row && type.value === 'edit') {
console.log(row)
// console.log(row)
type.value = 'edit'
model.value = {
...row,

View File

@@ -236,16 +236,26 @@ const columns = ref([
key: 'count',
},
{
title: '订单总价',
title: '订单金额',
align: 'center',
slot: 'number',
render: (row) => h('span', row.pay_type === 1 ? `${row.price}元` : `${row.exchange}积分`),
render: (row) => h('span', `${row.price}元`),
},
{
title: '抵扣后价格(元)',
key: 'discount_price',
align: 'center',
},
{
title: '积分抵扣',
key: 'exchange',
align: 'center',
},
{
title: '支付方式',
align: 'center',
slot: 'pay_type',
render: (row) => h('span', row.pay_type === 1 ? '微信' : '积分'),
render: (row) => h('span', row.pay_type === 1 ? '微信' : '平台抵扣'),
},
{
title: '订单状态',

View File

@@ -4,12 +4,12 @@
<n-col :span="24">
<div flex>
<n-card w-500>
<n-statistic label="订单流水(积分" tabular-nums>
<n-statistic label="订单流水(" tabular-nums>
<n-number-animation :from="0" :to="cardData.total" />
</n-statistic>
</n-card>
<n-card ml-10 w-500>
<n-statistic label="订单服务费(积分" tabular-nums>
<n-statistic label="订单服务费(" tabular-nums>
<n-number-animation :from="0" :to="cardData.service" />
</n-statistic>
</n-card>
@@ -139,13 +139,13 @@ const getList = async () => {
key: 'oid',
align: 'center',
},
// {
// title: '用户名称',
// key: 'user_name',
// align: 'center',
// },
{
title: '用户名称',
key: 'user_name',
align: 'center',
},
{
title: '上次留存积分',
title: '上次留存余额',
key: 'balance',
align: 'center',
},
@@ -155,13 +155,13 @@ const getList = async () => {
align: 'center',
},
{
title: '获取积分',
title: '获取余额',
key: 'number',
align: 'center',
},
{
title: '时间',
key: 'record_time',
key: 'add_time',
align: 'center',
},
]
@@ -174,18 +174,18 @@ const getList = async () => {
align: 'center',
},
{
title: '上次留存积分',
title: '上次留存余额',
key: 'balance',
align: 'center',
},
{
title: '扣除积分',
title: '扣除余额',
key: 'record_number',
align: 'center',
},
{
title: '时间',
key: 'record_time',
key: 'add_time',
align: 'center',
},
]
@@ -198,18 +198,18 @@ const getList = async () => {
align: 'center',
},
{
title: '上次留存积分',
title: '上次留存余额',
key: 'balance',
align: 'center',
},
{
title: '获取积分',
title: '获取余额',
key: 'record_number',
align: 'center',
},
{
title: '时间',
key: 'record_time',
key: 'add_time',
align: 'center',
},
]

View File

@@ -1,12 +1,12 @@
const Layout = () => import('@/layout/index.vue')
export default {
name: '积分管理',
name: '余额管理',
path: '/settlement',
component: Layout,
redirect: 'jf_list',
meta: {
title: '积分管理',
title: '余额管理',
icon: 'mdi:account-multiple',
order: 10,
},
@@ -16,7 +16,7 @@ export default {
path: 'jf_list',
component: () => import('./jf_list/index.vue'),
meta: {
title: '积分明细',
title: '余额明细',
icon: 'mdi:account-multiple',
order: 10,
},
@@ -26,7 +26,7 @@ export default {
path: 'tx_list',
component: () => import('./tx_list/index.vue'),
meta: {
title: '积分提现',
title: '余额提现',
icon: 'mdi:account-multiple',
order: 10,
},

View File

@@ -1,9 +1,26 @@
<template>
<!-- <div> -->
<CommonPage show-footer :title="$route.title">
<div w-1200 flex items-center justify-between>
<div w-1200 flex items-center>
<!-- <n-card class="w-300">-->
<!-- <n-statistic label="可提现积分">-->
<!-- <n-number-animation-->
<!-- ref="numberAnimationInstRef"-->
<!-- :precision="2"-->
<!-- :from="0"-->
<!-- :to="userInfo.integral"-->
<!-- />-->
<!-- </n-statistic>-->
<!-- </n-card>-->
<!-- <div w-100 text-center text-25>/</div>-->
<!-- <n-card class="w-300">-->
<!-- <n-statistic label="兑换比例">-->
<!-- <n-number-animation ref="numberAnimationInstRef" :precision="2" :from="0" :to="100" />-->
<!-- </n-statistic>-->
<!-- </n-card>-->
<!-- <div w-100 text-center text-25>=</div>-->
<n-card class="w-300">
<n-statistic label="可提现积分">
<n-statistic label="CNY">
<n-number-animation
ref="numberAnimationInstRef"
:precision="2"
@@ -12,25 +29,13 @@
/>
</n-statistic>
</n-card>
<div w-100 text-center text-25>/</div>
<n-card class="w-300">
<n-statistic label="兑换比例">
<n-number-animation ref="numberAnimationInstRef" :precision="2" :from="0" :to="100" />
</n-statistic>
</n-card>
<div w-100 text-center text-25>=</div>
<n-card class="w-300">
<n-statistic label="CNY">
<n-number-animation
ref="numberAnimationInstRef"
:precision="2"
:from="0"
:to="userInfo.integral / 100"
/>
</n-statistic>
</n-card>
<div ml-10 w-300 flex flex-col items-center justify-center>
<n-input-number v-model:value="formData.integral" clearable placeholder="请输入提现积分" />
<n-input-number
v-model:value="formData.integral"
clearable
w-full
placeholder="请输入提现余额"
/>
<n-button mt-10 w-full type="primary" @click="ok">立即提现</n-button>
</div>
</div>
@@ -66,7 +71,7 @@ const columns = ref([
align: 'center',
},
{
title: '上次留存积分',
title: '上次留存余额',
key: 'balance',
align: 'center',
},

View File

@@ -9,12 +9,12 @@
</n-statistic>
</n-card> -->
<n-card ml-10 w-200 rounded-5>
<n-statistic label="总豆子" tabular-nums>
<n-statistic label="用户豆子(留存)" tabular-nums>
<n-number-animation :from="0" :to="cardData.pulse" />
</n-statistic>
</n-card>
<n-card ml-10 w-200 rounded-5>
<n-statistic label="用户赢(积分)" tabular-nums>
<n-statistic label="用户积分(留存)" tabular-nums>
<n-number-animation :from="0" :to="cardData.win" />
</n-statistic>
</n-card>
@@ -162,12 +162,8 @@
<script setup>
import api from './api'
import {
// NDropdown,
NButton,
NEllipsis,
} from 'naive-ui'
// import TheIcon from '@/components/icon/TheIcon.vue'
import { NDropdown, NButton, NEllipsis } from 'naive-ui'
import TheIcon from '@/components/icon/TheIcon.vue'
const loading = ref(false)
@@ -252,65 +248,65 @@ const columns = ref([
sorter: true,
sortOrder: false,
},
{
title: '赢积分',
align: 'center',
key: 'win',
sorter: true,
sortOrder: false,
},
{
title: '用户豆子',
align: 'center',
key: 'pulse',
sorter: true,
sortOrder: false,
},
// {
// title: '操作',
// title: '赢积分',
// align: 'center',
// slot: 'action',
// render(row) {
// return [
// h(
// NDropdown,
// {
// trigger: 'click',
// options: [
// {
// label: '用户详情',
// key: 1,
// },
// ],
// onSelect: (key) => {
// switch (key) {
// case 1:
// openDrawer(row)
// break
// }
// },
// },
// {
// default: () =>
// h(
// NButton,
// {
// text: true,
// iconPlacement: 'right',
// },
// {
// default: () => '更多',
// icon: () =>
// h(TheIcon, {
// icon: 'ant-design:down-outlined',
// }),
// }
// ),
// }
// ),
// ]
// },
// key: 'win',
// sorter: true,
// sortOrder: false,
// },
// {
// title: '用户豆子',
// align: 'center',
// key: 'pulse',
// sorter: true,
// sortOrder: false,
// },
{
title: '操作',
align: 'center',
slot: 'action',
render(row) {
return [
h(
NDropdown,
{
trigger: 'click',
options: [
{
label: '用户详情',
key: 1,
},
],
onSelect: (key) => {
switch (key) {
case 1:
openDrawer(row)
break
}
},
},
{
default: () =>
h(
NButton,
{
text: true,
iconPlacement: 'right',
},
{
default: () => '更多',
icon: () =>
h(TheIcon, {
icon: 'ant-design:down-outlined',
}),
}
),
}
),
]
},
},
])
const data = ref([])