fix: 🧩 财务管理显示问题

This commit is contained in:
Bunny 2024-11-16 19:10:08 +08:00
parent 2a8aca1642
commit 49c2eb264f
5 changed files with 24 additions and 6 deletions

View File

@ -72,7 +72,10 @@ defineExpose({ formRef });
<!-- 类别id -->
<el-form-item :label="$t('category')" prop="categoryId">
<el-select v-model="form.categoryId" :placeholder="$t('select') + $t('category')" clearable filterable>
<el-option v-for="item in categoryUserStore.allCategoryList" :key="item.id" :label="item.categoryName" :navigationBar="false" :value="item.id" />
<el-option v-for="item in categoryUserStore.allCategoryList" :key="item.id" :label="item.categoryName" :navigationBar="false" :value="item.id">
<el-text v-if="item.isBuiltin" effect="plain" size="large" type="info">{{ item.categoryName }}</el-text>
<el-text v-else effect="plain" size="large" type="success">{{ item.categoryName }}</el-text>
</el-option>
</el-select>
</el-form-item>

View File

@ -36,7 +36,19 @@ export const columns: TableColumnList = [
// 描述
{ label: $t('description'), prop: 'description' },
// 交易日期
{ label: $t('transactionDate'), prop: 'transactionDate', width: 160 },
{
label: $t('transactionDate'),
prop: 'transactionDate',
width: 190,
sortable: true,
formatter({ transactionDate }) {
return (
<ElText type={'success'} style={{ fontWeight: 800 }}>
{transactionDate}
</ElText>
);
},
},
{ label: $t('table.updateTime'), prop: 'updateTime', sortable: true, width: 160 },
{ label: $t('table.createTime'), prop: 'createTime', sortable: true, width: 160 },
{ label: $t('table.operation'), fixed: 'right', width: 160, slot: 'operation' },

View File

@ -27,7 +27,7 @@ export function onAdd() {
width: '30%',
props: {
formInline: {
type: 1,
type: -1,
amount: undefined,
description: undefined,
transactionDate: dayjs(Date.now()).format('YYYY-MM-DD HH:mm:ss'),

View File

@ -22,7 +22,7 @@ export async function onSearch() {
/** 添加分类信息 */
export function onAdd() {
addDialog({
title: `${$t('addNew')}${$t('category-user')}`,
title: `${$t('addNew')}${$t('categoryUser')}`,
width: '30%',
props: {
formInline: {
@ -50,7 +50,7 @@ export function onAdd() {
/** 更新分类信息 */
export function onUpdate(row: any) {
addDialog({
title: `${$t('modify')}${$t('category-user')}`,
title: `${$t('modify')}${$t('categoryUser')}`,
width: '30%',
props: {
formInline: {

View File

@ -112,7 +112,10 @@ defineExpose({ formRef });
<!-- 类别id -->
<el-form-item :label="$t('category')" prop="categoryId">
<el-select v-model="form.categoryId" :placeholder="$t('select') + $t('category')" clearable filterable>
<el-option v-for="item in categoryUserStore.allCategoryList" :key="item.id" :label="item.categoryName" :navigationBar="false" :value="item.id" />
<el-option v-for="item in categoryUserStore.allCategoryList" :key="item.id" :label="item.categoryName" :navigationBar="false" :value="item.id">
<el-text v-if="item.isBuiltin" effect="plain" size="large" type="info">{{ item.categoryName }}</el-text>
<el-text v-else effect="plain" size="large" type="success">{{ item.categoryName }}</el-text>
</el-option>
</el-select>
</el-form-item>