新增原价显示
This commit is contained in:
@@ -57,9 +57,10 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="name" label="商品名称" min-width="150" />
|
<el-table-column prop="name" label="商品名称" min-width="150" />
|
||||||
<el-table-column prop="category" label="分类" width="120" />
|
<el-table-column prop="category" label="分类" width="120" />
|
||||||
|
<el-table-column prop="sale_price" label="销售价格" />
|
||||||
<el-table-column prop="points" label="积分价格" width="125">
|
<el-table-column prop="points" label="积分价格" width="125">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span class="points-text">{{ row.points_price }} 积分</span>
|
<span class="points-text">{{ row.points_price || 0 }} 积分</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="rongdou_price" label="融豆价格" width="100">
|
<el-table-column prop="rongdou_price" label="融豆价格" width="100">
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
class="income-table"
|
class="income-table"
|
||||||
header-row-class-name="table-header"
|
header-row-class-name="table-header"
|
||||||
>
|
>
|
||||||
<el-table-column prop="id" label="ID" />
|
|
||||||
<el-table-column prop="user_id" label="用户" />
|
<el-table-column prop="user_id" label="用户" />
|
||||||
<el-table-column prop="amount" label="金额">
|
<el-table-column prop="amount" label="金额">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
@@ -93,6 +92,7 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<div class="income">当前可提:¥{{ income }}</div>
|
||||||
|
|
||||||
<div class="dialog-actions">
|
<div class="dialog-actions">
|
||||||
<el-button @click="drawerVisible = false" size="large">
|
<el-button @click="drawerVisible = false" size="large">
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted, reactive } from 'vue'
|
import { ref, onMounted, reactive, computed } from 'vue'
|
||||||
import { useUserStore } from '@/stores/user'
|
import { useUserStore } from '@/stores/user'
|
||||||
import api from '@/utils/api'
|
import api from '@/utils/api'
|
||||||
import { ElForm, ElFormItem, ElInput, ElMessage } from 'element-plus'
|
import { ElForm, ElFormItem, ElInput, ElMessage } from 'element-plus'
|
||||||
@@ -127,12 +127,14 @@ const formRef = ref(null)
|
|||||||
const form = reactive({
|
const form = reactive({
|
||||||
amount: 0
|
amount: 0
|
||||||
})
|
})
|
||||||
const rules = reactive({
|
const income = ref(0)
|
||||||
|
const rules = computed(() => ({
|
||||||
amount: [
|
amount: [
|
||||||
{ required: true, message: '请输入金额', trigger: 'blur' },
|
{ required: true, message: '请输入金额', trigger: 'blur' },
|
||||||
{ type: 'number', min: 0.01, message: '金额必须大于0', trigger: 'blur' }
|
{ type: 'number', min: 0.01, message: '金额必须大于0', trigger: 'blur' },
|
||||||
|
{ type: 'number', max: income.value, message: '金额不能大于当前可提金额', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
})
|
}))
|
||||||
|
|
||||||
const pagination = reactive({
|
const pagination = reactive({
|
||||||
page: 1,
|
page: 1,
|
||||||
@@ -183,6 +185,7 @@ const loadWithdrawList = async () => {
|
|||||||
})
|
})
|
||||||
withdrawList.value = data.data.withdrawals || []
|
withdrawList.value = data.data.withdrawals || []
|
||||||
pagination.total = data.data.pagination.total || 0
|
pagination.total = data.data.pagination.total || 0
|
||||||
|
income.value = data.data.income || 0
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取提现列表失败:', error)
|
console.error('获取提现列表失败:', error)
|
||||||
ElMessage.error('获取提现列表失败')
|
ElMessage.error('获取提现列表失败')
|
||||||
@@ -369,6 +372,12 @@ onMounted(async () => {
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.income {
|
||||||
|
font-size: 3px;
|
||||||
|
color: #ff0000;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
.dialog-actions {
|
.dialog-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
|||||||
Reference in New Issue
Block a user