fix:账单管理添加时间以及中英适配
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
import { ref, computed } from 'vue';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import type { FormInstance } from 'ant-design-vue';
|
||||
|
||||
import { useI18n } from 'vue-i18n';
|
||||
const { t } = useI18n();
|
||||
interface SearchModel {
|
||||
pageNum: number;
|
||||
pageSize: number;
|
||||
@@ -46,16 +47,16 @@ function handleSearch() {
|
||||
emit('search');
|
||||
}
|
||||
|
||||
const orderTypeOptions = [
|
||||
{ label: '套餐订单', value: 0 },
|
||||
{ label: '充值订单', value: 1 }
|
||||
];
|
||||
const orderTypeOptions =computed(()=> [
|
||||
{ label: t('page.bill.packagebill'), value: 0 },
|
||||
{ label: t('page.bill.rechargebill'), value: 1 }
|
||||
]);
|
||||
|
||||
const orderStatusOptions = [
|
||||
{ label: '待支付', value: 0 },
|
||||
{ label: '已支付', value: 1 },
|
||||
{ label: '已取消', value: 2 }
|
||||
];
|
||||
const orderStatusOptions =computed(()=> [
|
||||
{ label: t('page.bill.wait'), value: 0 },
|
||||
{ label: t('page.bill.done'), value: 1 },
|
||||
{ label: t('page.bill.close'), value: 2 }
|
||||
]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -66,26 +67,26 @@ const orderStatusOptions = [
|
||||
layout="inline"
|
||||
class="flex flex-wrap gap-16px items-center"
|
||||
>
|
||||
<AFormItem label="用户名">
|
||||
<AFormItem :label="t('page.bill.username')">
|
||||
<AInput
|
||||
v-model:value="formModel.userName"
|
||||
placeholder="请输入用户名"
|
||||
:placeholder="t('page.bill.pleusername')"
|
||||
allow-clear
|
||||
/>
|
||||
</AFormItem>
|
||||
<AFormItem label="订单类型">
|
||||
<AFormItem :label="t('page.bill.billtype')">
|
||||
<ASelect
|
||||
v-model:value="formModel.type"
|
||||
placeholder="请选择订单类型"
|
||||
:placeholder="t('page.bill.plebilltype')"
|
||||
:options="orderTypeOptions"
|
||||
allow-clear
|
||||
style="width: 200px"
|
||||
/>
|
||||
</AFormItem>
|
||||
<AFormItem label="订单状态">
|
||||
<AFormItem :label="t('page.bill.status')">
|
||||
<ASelect
|
||||
v-model:value="formModel.status"
|
||||
placeholder="请选择订单状态"
|
||||
:placeholder="t('page.bill.plestatus')"
|
||||
:options="orderStatusOptions"
|
||||
allow-clear
|
||||
style="width: 200px"
|
||||
@@ -93,8 +94,8 @@ const orderStatusOptions = [
|
||||
</AFormItem>
|
||||
<AFormItem class="flex-1 justify-end">
|
||||
<ASpace>
|
||||
<AButton @click="handleReset">重置</AButton>
|
||||
<AButton type="primary" @click="handleSearch">查询</AButton>
|
||||
<AButton @click="handleReset">{{ t('page.bill.reset') }}</AButton>
|
||||
<AButton type="primary" @click="handleSearch">{{ t('page.bill.search') }}</AButton>
|
||||
</ASpace>
|
||||
</AFormItem>
|
||||
</AForm>
|
||||
|
||||
Reference in New Issue
Block a user