feat: 优化发票和用户列表按钮渲染逻辑,并调整用户限额设置弹窗的初始化字段。

This commit is contained in:
Wei_佳 2025-11-27 18:21:08 +08:00
parent d40e8c2e0d
commit f2068c7b16
2 changed files with 45 additions and 55 deletions

View File

@ -1,5 +1,5 @@
<script setup>
import { h, onMounted, ref, resolveDirective, withDirectives } from 'vue'
import { h, onMounted, ref } from 'vue'
import dayjs from 'dayjs'
import { NButton, NInput, NTag, NSelect, NDatePicker, useMessage, useDialog } from 'naive-ui'
@ -15,7 +15,6 @@ defineOptions({ name: '开票记录' })
const $table = ref(null)
const queryItems = ref({})
const vPermission = resolveDirective('permission')
const $message = useMessage()
const dialog = useDialog()
@ -201,7 +200,6 @@ const columns = [
if (row.status === 'pending') {
// """退"
buttons.push(
withDirectives(
h(
NButton,
{
@ -212,9 +210,7 @@ const columns = [
{ default: () => '开票' }
),
)
)
buttons.push(
withDirectives(
h(
NButton,
{
@ -226,7 +222,6 @@ const columns = [
{ default: () => '退款' }
),
)
)
} else if (row.status === 'invoiced') {
// ""
buttons.push(

View File

@ -1,5 +1,5 @@
<script setup>
import { h, onMounted, ref, resolveDirective, withDirectives } from 'vue'
import { h, onMounted, ref } from 'vue'
import dayjs from 'dayjs'
import { NButton, NForm, NFormItem, NInput, NDatePicker } from 'naive-ui'
@ -20,7 +20,6 @@ defineOptions({ name: '用户管理' })
const $table = ref(null)
const queryItems = ref({})
const createdDateRange = ref(null)
const vPermission = resolveDirective('permission')
//
const limitModalVisible = ref(false)
@ -135,7 +134,6 @@ const columns = [
fixed: 'right',
render(row) {
return [
withDirectives(
h(
NButton,
{
@ -149,8 +147,6 @@ const columns = [
icon: renderIcon('material-symbols:info', { size: 16 }),
}
),
),
withDirectives(
h(
NButton,
{
@ -164,7 +160,6 @@ const columns = [
icon: renderIcon('material-symbols:settings', { size: 16 }),
}
),
),
]
},
},