({
+ // 绑定的用户
+ userId: [{ required: true, message: `${$t('input')}${$t('userId')}`, trigger: 'blur' }],
// 债务金额
installmentNumber: [{ required: true, message: `${$t('input')}${$t('installmentNumber')}`, trigger: 'blur' }],
// 每期应还金额
diff --git a/src/views/financial/debt-repayment-plan/utils/hooks.ts b/src/views/financial/debt-repayment-plan/utils/hooks.ts
index ac83d27..14b943a 100644
--- a/src/views/financial/debt-repayment-plan/utils/hooks.ts
+++ b/src/views/financial/debt-repayment-plan/utils/hooks.ts
@@ -22,7 +22,7 @@ export async function onSearch() {
/** 添加债务还款计划表 */
export function onAdd() {
addDialog({
- title: `${$t('addNew')}${$t('debt-repayment-plan')}`,
+ title: `${$t('addNew')}${$t('debtRepaymentPlan')}`,
width: '30%',
props: {
formInline: {
diff --git a/src/views/financial/debt-repayment-plan/utils/types.ts b/src/views/financial/debt-repayment-plan/utils/types.ts
index 16ae64f..5c64d27 100644
--- a/src/views/financial/debt-repayment-plan/utils/types.ts
+++ b/src/views/financial/debt-repayment-plan/utils/types.ts
@@ -1,7 +1,7 @@
// 添加或者修改表单元素
export interface FormItemProps {
// 绑定的用户id
- userId: number;
+ userId: string;
// 债务金额
installmentNumber: any;
// 每期应还金额
diff --git a/src/views/financial/debt-tracking/debt-tracking-dialog.vue b/src/views/financial/debt-tracking/debt-tracking-dialog.vue
index e8d3e13..40c7886 100644
--- a/src/views/financial/debt-tracking/debt-tracking-dialog.vue
+++ b/src/views/financial/debt-tracking/debt-tracking-dialog.vue
@@ -1,9 +1,12 @@
@@ -31,8 +50,24 @@ defineExpose({ formRef });
-
-
+
+
+
+
+
+
+
+
+
@@ -42,22 +77,34 @@ defineExpose({ formRef });
-
+
-
+
+
+
-
+
+
+
-
+
diff --git a/src/views/financial/debt-tracking/index.vue b/src/views/financial/debt-tracking/index.vue
index 181b45b..b33c20a 100644
--- a/src/views/financial/debt-tracking/index.vue
+++ b/src/views/financial/debt-tracking/index.vue
@@ -13,9 +13,17 @@ import { useDebtTrackingStore } from '@/store/financial/debtTracking';
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
import { FormInstance } from 'element-plus';
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
+import LoadingSvg from '@/assets/svg/loading.svg';
+import { useAdminUserStore } from '@/store/system/adminUser';
+import { debtTracking, debtType } from '@/enums/bill/debtTracking';
const tableRef = ref();
const formRef = ref();
+// 用户信息列表
+const userDataList = ref();
+// 搜索用户加载
+const loading = ref(false);
+const adminUserStore = useAdminUserStore();
const debtTrackingStore = useDebtTrackingStore();
/** 当前页改变时 */
@@ -42,6 +50,13 @@ const resetForm = async (formEl: FormInstance | undefined) => {
await onSearch();
};
+/** 搜索 */
+const onSearchUserinfo = async (keyword: string) => {
+ loading.value = true;
+ userDataList.value = await adminUserStore.queryUser({ keyword });
+ loading.value = false;
+};
+
onMounted(() => {
onSearch();
});
@@ -51,8 +66,25 @@ onMounted(() => {
-
-
+
+
+
+
+
+
+
+
+
@@ -67,18 +99,32 @@ onMounted(() => {
-
+
+
+
-
+
+
+
-
+
+
+
{{ $t('search') }}
{{ $t('buttons.reset') }}
@@ -116,12 +162,26 @@ onMounted(() => {
@selection-change="onSelectionChange"
@page-current-change="onCurrentPageChange"
>
+
+
+
+
+
+
+
+
{{ row.createUsername }}
+
+
+ {{ row.username }}
+
+
+
{{ row.updateUsername }}
diff --git a/src/views/financial/debt-tracking/utils/columns.ts b/src/views/financial/debt-tracking/utils/columns.tsx
similarity index 68%
rename from src/views/financial/debt-tracking/utils/columns.ts
rename to src/views/financial/debt-tracking/utils/columns.tsx
index c5c6500..01bee03 100644
--- a/src/views/financial/debt-tracking/utils/columns.ts
+++ b/src/views/financial/debt-tracking/utils/columns.tsx
@@ -1,25 +1,48 @@
import { reactive } from 'vue';
import { $t } from '@/plugins/i18n';
-import type { FormRules } from 'element-plus';
+import { ElText, type FormRules } from 'element-plus';
// 表格列
export const columns: TableColumnList = [
{ type: 'selection', align: 'left' },
{ type: 'index', index: (index: number) => index + 1, label: '序号', width: 60 },
- // 绑定的用户
- { label: $t('userId'), prop: 'userId' },
// 债务人姓名
{ label: $t('debtorName'), prop: 'debtorName' },
// 债务金额
- { label: $t('debtAmount'), prop: 'debtAmount' },
+ {
+ label: $t('debtAmount'),
+ prop: 'debtAmount',
+ formatter({ debtAmount }) {
+ return (
+
+ {debtAmount}¥
+
+ );
+ },
+ width: 150,
+ },
// 债务类型
- { label: $t('debtType'), prop: 'debtType' },
+ { label: $t('debtType'), prop: 'debtType', slot: 'debtType', width: 130 },
// 债务状态
- { label: $t('debtStatus'), prop: 'debtStatus' },
+ { label: $t('debtStatus'), prop: 'debtStatus', slot: 'debtStatus', width: 130 },
// 还款截止日期
- { label: $t('dueDate'), prop: 'dueDate' },
+ {
+ label: $t('dueDate'),
+ prop: 'dueDate',
+ formatter({ dueDate }) {
+ return (
+
+ {dueDate}
+
+ );
+ },
+ width: 190,
+ sortable: true,
+ },
{ label: $t('table.updateTime'), prop: 'updateTime', sortable: true, width: 160 },
{ label: $t('table.createTime'), prop: 'createTime', sortable: true, width: 160 },
+ // 绑定的用户
+ { label: $t('username'), prop: 'username', slot: 'username', width: 130 },
{ label: $t('table.createUser'), prop: 'createUser', slot: 'createUser', width: 130 },
{ label: $t('table.updateUser'), prop: 'updateUser', slot: 'updateUser', width: 130 },
{ label: $t('table.operation'), fixed: 'right', width: 210, slot: 'operation' },
diff --git a/src/views/financial/debt-tracking/utils/hooks.ts b/src/views/financial/debt-tracking/utils/hooks.ts
index 7a60a27..a7416a1 100644
--- a/src/views/financial/debt-tracking/utils/hooks.ts
+++ b/src/views/financial/debt-tracking/utils/hooks.ts
@@ -55,7 +55,7 @@ export function onAdd() {
/** 更新债务追踪 */
export function onUpdate(row: any) {
addDialog({
- title: `${$t('modify')}${$t('debt-tracking')}`,
+ title: `${$t('modify')}${$t('debtTracking')}`,
width: '30%',
props: {
formInline: {
diff --git a/src/views/financial/saving-goal/index.vue b/src/views/financial/saving-goal/index.vue
index d5b4a64..f8f5cc1 100644
--- a/src/views/financial/saving-goal/index.vue
+++ b/src/views/financial/saving-goal/index.vue
@@ -114,10 +114,10 @@ onMounted(() => {
v-model="savingGoalStore.form.duration"
:end-placeholder="$t('endTime')"
:start-placeholder="$t('startTime')"
- class="!w-[180px]"
- time-format="YYYY-MM-DD HH:mm:ss"
+ class="!w-[210px]"
+ time-format="YYYY-MM-DD"
type="datetimerange"
- value-format="YYYY-MM-DD HH:mm:ss"
+ value-format="YYYY-MM-DD"
/>
diff --git a/src/views/financial/saving-goal/saving-goal-dialog.vue b/src/views/financial/saving-goal/saving-goal-dialog.vue
index 5321291..273e7d3 100644
--- a/src/views/financial/saving-goal/saving-goal-dialog.vue
+++ b/src/views/financial/saving-goal/saving-goal-dialog.vue
@@ -82,7 +82,7 @@ defineExpose({ formRef });
-
+