completepage: 🍻 债务还款计划完成和修复部分缺陷
This commit is contained in:
parent
fe5a9c10e1
commit
42662ccb26
|
@ -0,0 +1,24 @@
|
|||
import { http } from '@/api/service/request';
|
||||
import type { BaseResult, ResultTable } from '@/api/service/types';
|
||||
|
||||
/** 债务还款计划表---获取债务还款计划表列表 */
|
||||
export const fetchGetUserDebtRepaymentPlanList = (data: any) => {
|
||||
return http.request<BaseResult<ResultTable>>('get', `debtRepaymentPlan/noManage/getUserDebtRepaymentPlanList/${data.currentPage}/${data.pageSize}`, {
|
||||
params: data,
|
||||
});
|
||||
};
|
||||
|
||||
/** 债务还款计划表---添加债务还款计划表 */
|
||||
export const fetchAddUserDebtRepaymentPlan = (data: any) => {
|
||||
return http.request<BaseResult<object>>('post', 'debtRepaymentPlan/noManage/addUserDebtRepaymentPlan', { data });
|
||||
};
|
||||
|
||||
/** 债务还款计划表---更新债务还款计划表 */
|
||||
export const fetchUpdateUserDebtRepaymentPlan = (data: any) => {
|
||||
return http.request<BaseResult<object>>('put', 'debtRepaymentPlan/noManage/updateUserDebtRepaymentPlan', { data });
|
||||
};
|
||||
|
||||
/** 债务还款计划表---删除债务还款计划表 */
|
||||
export const fetchDeleteUserDebtRepaymentPlan = (data: any) => {
|
||||
return http.request<BaseResult<object>>('delete', 'debtRepaymentPlan/noManage/deleteUserDebtRepaymentPlan', { data });
|
||||
};
|
|
@ -0,0 +1,82 @@
|
|||
import { defineStore } from 'pinia';
|
||||
import { pageSizes } from '@/enums/baseConstant';
|
||||
import { storeMessage } from '@/utils/message';
|
||||
import { storePagination } from '@/store/useStorePagination';
|
||||
import {
|
||||
fetchAddUserDebtRepaymentPlan,
|
||||
fetchDeleteUserDebtRepaymentPlan,
|
||||
fetchGetUserDebtRepaymentPlanList,
|
||||
fetchUpdateUserDebtRepaymentPlan,
|
||||
} from '@/api/v1/financialUser/debtRepaymentPlanUser';
|
||||
|
||||
/**
|
||||
* 债务还款计划表 Store
|
||||
*/
|
||||
export const useDebtRepaymentPlanUserStore = defineStore('debtRepaymentPlanUserStore', {
|
||||
state() {
|
||||
return {
|
||||
// 债务还款计划表列表
|
||||
datalist: [],
|
||||
// 查询表单
|
||||
form: {
|
||||
// 债务ID
|
||||
debtId: undefined,
|
||||
// 债务金额
|
||||
installmentNumber: undefined,
|
||||
// 每期应还金额
|
||||
installmentAmount: undefined,
|
||||
// 还款截止日期
|
||||
dueDate: undefined,
|
||||
// 已还金额
|
||||
paidAmount: undefined,
|
||||
// 还款状态
|
||||
paymentStatus: undefined,
|
||||
},
|
||||
// 分页查询结果
|
||||
pagination: {
|
||||
currentPage: 1,
|
||||
pageSize: 30,
|
||||
total: 1,
|
||||
pageSizes,
|
||||
},
|
||||
// 加载
|
||||
loading: false,
|
||||
};
|
||||
},
|
||||
getters: {},
|
||||
actions: {
|
||||
/** 获取债务还款计划表 */
|
||||
async getDebtRepaymentPlanList() {
|
||||
// 整理请求参数
|
||||
const data = { ...this.pagination, ...this.form };
|
||||
delete data.pageSizes;
|
||||
delete data.total;
|
||||
delete data.background;
|
||||
|
||||
// 获取债务还款计划表列表
|
||||
const result = await fetchGetUserDebtRepaymentPlanList(data);
|
||||
|
||||
// 公共页面函数hook
|
||||
const pagination = storePagination.bind(this);
|
||||
return pagination(result);
|
||||
},
|
||||
|
||||
/** 添加债务还款计划表 */
|
||||
async addDebtRepaymentPlan(data: any) {
|
||||
const result = await fetchAddUserDebtRepaymentPlan(data);
|
||||
return storeMessage(result);
|
||||
},
|
||||
|
||||
/** 修改债务还款计划表 */
|
||||
async updateDebtRepaymentPlan(data: any) {
|
||||
const result = await fetchUpdateUserDebtRepaymentPlan(data);
|
||||
return storeMessage(result);
|
||||
},
|
||||
|
||||
/** 删除债务还款计划表 */
|
||||
async deleteDebtRepaymentPlan(data: any) {
|
||||
const result = await fetchDeleteUserDebtRepaymentPlan(data);
|
||||
return storeMessage(result);
|
||||
},
|
||||
},
|
||||
});
|
|
@ -1,10 +1,9 @@
|
|||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { FormInstance } from 'element-plus';
|
||||
import { rules } from '@/views/financial/debt/debt-repayment-plan/utils/columns';
|
||||
import { FormProps } from '@/views/financial/debt/debt-repayment-plan/utils/types';
|
||||
import { rules } from '@/views/financial-user/debt/debt-repayment-plan/utils/columns';
|
||||
import { FormProps } from '@/views/financial-user/debt/debt-repayment-plan/utils/types';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import LoadingSvg from '@/assets/svg/loading.svg';
|
||||
import { debtTracking } from '@/enums/bill/debtTracking';
|
||||
import { useAdminUserStore } from '@/store/system/adminUser';
|
||||
|
||||
|
@ -31,39 +30,11 @@ const userDataList = ref();
|
|||
const loading = ref(false);
|
||||
const adminUserStore = useAdminUserStore();
|
||||
|
||||
/** 搜索 */
|
||||
const onSearchUserinfo = async (keyword: string) => {
|
||||
loading.value = true;
|
||||
userDataList.value = await adminUserStore.queryUser({ keyword });
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
defineExpose({ formRef });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="auto">
|
||||
<!-- 绑定的用户id -->
|
||||
<el-form-item :label="$t('user')" prop="userId">
|
||||
<el-select
|
||||
v-model="form.userId"
|
||||
:loading="loading"
|
||||
:placeholder="$t('user')"
|
||||
:remote-method="onSearchUserinfo"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
remote-show-suffix
|
||||
>
|
||||
<el-option v-for="item in userDataList" :key="item.id" :label="item.username" :value="item.id" />
|
||||
<template #loading>
|
||||
<el-icon class="is-loading">
|
||||
<LoadingSvg />
|
||||
</el-icon>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 债务金额 -->
|
||||
<el-form-item :label="$t('installmentNumber')" prop="installmentNumber">
|
||||
<el-input v-model="form.installmentNumber" :min="0.01" :placeholder="$t('input') + $t('installmentNumber')" :step="0.01" autocomplete="off" type="number" />
|
||||
|
|
|
@ -1,21 +1,20 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { columns } from '@/views/financial/debt/debt-repayment-plan/utils/columns';
|
||||
import { columns } from '@/views/financial-user/debt/debt-repayment-plan/utils/columns';
|
||||
import PureTableBar from '@/components/TableBar/src/bar';
|
||||
import AddFill from '@iconify-icons/ri/add-circle-line';
|
||||
import PureTable from '@pureadmin/table';
|
||||
import { deleteIds, onAdd, onDelete, onDeleteBatch, onSearch, onUpdate } from '@/views/financial/debt/debt-repayment-plan/utils/hooks';
|
||||
import { deleteIds, onAdd, onDelete, onDeleteBatch, onSearch, onUpdate } from '@/views/financial-user/debt/debt-repayment-plan/utils/hooks';
|
||||
import Delete from '@iconify-icons/ep/delete';
|
||||
import EditPen from '@iconify-icons/ep/edit-pen';
|
||||
import Refresh from '@iconify-icons/ep/refresh';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import { useDebtRepaymentPlanStore } from '@/store/financial/debtRepaymentPlan';
|
||||
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 } from '@/enums/bill/debtTracking';
|
||||
import { useDebtRepaymentPlanUserStore } from '@/store/financialUser/debtRepaymentPlanUser';
|
||||
|
||||
const tableRef = ref();
|
||||
const formRef = ref();
|
||||
|
@ -24,17 +23,17 @@ const userDataList = ref();
|
|||
// 搜索用户加载
|
||||
const loading = ref(false);
|
||||
const adminUserStore = useAdminUserStore();
|
||||
const debtRepaymentPlanStore = useDebtRepaymentPlanStore();
|
||||
const debtRepaymentPlanUserStore = useDebtRepaymentPlanUserStore();
|
||||
|
||||
/** 当前页改变时 */
|
||||
const onCurrentPageChange = async (value: number) => {
|
||||
debtRepaymentPlanStore.pagination.currentPage = value;
|
||||
debtRepaymentPlanUserStore.pagination.currentPage = value;
|
||||
await onSearch();
|
||||
};
|
||||
|
||||
/** 当分页发生变化 */
|
||||
const onPageSizeChange = async (value: number) => {
|
||||
debtRepaymentPlanStore.pagination.pageSize = value;
|
||||
debtRepaymentPlanUserStore.pagination.pageSize = value;
|
||||
await onSearch();
|
||||
};
|
||||
|
||||
|
@ -50,13 +49,6 @@ 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();
|
||||
});
|
||||
|
@ -64,61 +56,36 @@ onMounted(() => {
|
|||
|
||||
<template>
|
||||
<div class="main">
|
||||
<el-form ref="formRef" :inline="true" :model="debtRepaymentPlanStore.form" class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] overflow-auto">
|
||||
<!-- 绑定的用户 -->
|
||||
<el-form-item :label="$t('user')" prop="userId">
|
||||
<el-select
|
||||
v-model="debtRepaymentPlanStore.form.userId"
|
||||
:loading="loading"
|
||||
:placeholder="$t('user')"
|
||||
:remote-method="onSearchUserinfo"
|
||||
class="!w-[180px]"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
remote-show-suffix
|
||||
>
|
||||
<el-option v-for="item in userDataList" :key="item.id" :label="item.username" :value="item.id" />
|
||||
<template #loading>
|
||||
<el-icon class="is-loading">
|
||||
<LoadingSvg />
|
||||
</el-icon>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form ref="formRef" :inline="true" :model="debtRepaymentPlanUserStore.form" class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] overflow-auto">
|
||||
<!-- 债务金额 -->
|
||||
<el-form-item :label="$t('installmentNumber')" prop="installmentNumber">
|
||||
<el-input v-model="debtRepaymentPlanStore.form.installmentNumber" :placeholder="`${$t('input')}${$t('installmentNumber')}`" class="!w-[180px]" clearable />
|
||||
<el-input
|
||||
v-model="debtRepaymentPlanUserStore.form.installmentNumber"
|
||||
:placeholder="`${$t('input')}${$t('installmentNumber')}`"
|
||||
class="!w-[180px]"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 每期应还金额 -->
|
||||
<el-form-item :label="$t('installmentAmount')" prop="installmentAmount">
|
||||
<el-input v-model="debtRepaymentPlanStore.form.installmentAmount" :placeholder="`${$t('input')}${$t('installmentAmount')}`" class="!w-[180px]" clearable />
|
||||
</el-form-item>
|
||||
|
||||
<!-- 还款截止日期 -->
|
||||
<el-form-item :label="$t('dueDate')" prop="dueDate">
|
||||
<el-date-picker
|
||||
v-model="debtRepaymentPlanStore.form.dueDate"
|
||||
:end-placeholder="$t('endTime')"
|
||||
:start-placeholder="$t('startTime')"
|
||||
class="!w-[210px]"
|
||||
time-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
value-format="YYYY-MM-DD"
|
||||
<el-input
|
||||
v-model="debtRepaymentPlanUserStore.form.installmentAmount"
|
||||
:placeholder="`${$t('input')}${$t('installmentAmount')}`"
|
||||
class="!w-[180px]"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 已还金额 -->
|
||||
<el-form-item :label="$t('paidAmount')" prop="paidAmount">
|
||||
<el-input v-model="debtRepaymentPlanStore.form.paidAmount" :placeholder="`${$t('input')}${$t('paidAmount')}`" class="!w-[180px]" clearable />
|
||||
<el-input v-model="debtRepaymentPlanUserStore.form.paidAmount" :placeholder="`${$t('input')}${$t('paidAmount')}`" class="!w-[180px]" clearable />
|
||||
</el-form-item>
|
||||
|
||||
<!-- 还款状态 -->
|
||||
<el-form-item :label="$t('paymentStatus')" prop="paymentStatus">
|
||||
<el-select
|
||||
v-model="debtRepaymentPlanStore.form.paymentStatus"
|
||||
v-model="debtRepaymentPlanUserStore.form.paymentStatus"
|
||||
:placeholder="$t('paymentStatus')"
|
||||
class="!w-[180px]"
|
||||
clearable
|
||||
|
@ -130,9 +97,23 @@ onMounted(() => {
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 还款截止日期 -->
|
||||
<el-form-item :label="$t('dueDate')" prop="dueDate">
|
||||
<el-date-picker
|
||||
v-model="debtRepaymentPlanUserStore.form.dueDate"
|
||||
:end-placeholder="$t('endTime')"
|
||||
:placeholder="$t('dueDate')"
|
||||
:start-placeholder="$t('startTime')"
|
||||
class="!w-[210px]"
|
||||
time-format="YYYY-MM-DD"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 搜索和重置 -->
|
||||
<el-form-item>
|
||||
<el-button :icon="useRenderIcon('ri:search-line')" :loading="debtRepaymentPlanStore.loading" type="primary" @click="onSearch">
|
||||
<el-button :icon="useRenderIcon('ri:search-line')" :loading="debtRepaymentPlanUserStore.loading" type="primary" @click="onSearch">
|
||||
{{ $t('search') }}
|
||||
</el-button>
|
||||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
|
||||
|
@ -154,10 +135,10 @@ onMounted(() => {
|
|||
ref="tableRef"
|
||||
:adaptiveConfig="{ offsetBottom: 96 }"
|
||||
:columns="dynamicColumns"
|
||||
:data="debtRepaymentPlanStore.datalist"
|
||||
:data="debtRepaymentPlanUserStore.datalist"
|
||||
:header-cell-style="{ background: 'var(--el-fill-color-light)', color: 'var(--el-text-color-primary)' }"
|
||||
:loading="debtRepaymentPlanStore.loading"
|
||||
:pagination="debtRepaymentPlanStore.pagination"
|
||||
:loading="debtRepaymentPlanUserStore.loading"
|
||||
:pagination="debtRepaymentPlanUserStore.pagination"
|
||||
:size="size"
|
||||
adaptive
|
||||
align-whole="center"
|
||||
|
@ -194,7 +175,6 @@ onMounted(() => {
|
|||
|
||||
<template #operation="{ row }">
|
||||
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
||||
<el-button :icon="useRenderIcon(AddFill)" :size="size" class="reset-margin" link type="primary" @click="onAdd"> {{ $t('addNew') }} </el-button>
|
||||
<el-popconfirm :title="`${$t('delete')}?`" @confirm="onDelete(row)">
|
||||
<template #reference>
|
||||
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
||||
|
|
|
@ -60,17 +60,11 @@ export const columns: TableColumnList = [
|
|||
},
|
||||
{ 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' },
|
||||
{ label: $t('table.operation'), fixed: 'right', width: 160, slot: 'operation' },
|
||||
];
|
||||
|
||||
// 添加规则
|
||||
export const rules = reactive<FormRules>({
|
||||
// 绑定的用户
|
||||
userId: [{ required: true, message: `${$t('input')}${$t('userId')}`, trigger: 'blur' }],
|
||||
// 债务金额
|
||||
installmentNumber: [{ required: true, message: `${$t('input')}${$t('installmentNumber')}`, trigger: 'blur' }],
|
||||
// 每期应还金额
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
import { addDialog } from '@/components/BaseDialog/index';
|
||||
import DebtRepaymentPlanDialog from '@/views/financial/debt/debt-repayment-plan/debt-repayment-plan-dialog.vue';
|
||||
import { useDebtRepaymentPlanStore } from '@/store/financial/debtRepaymentPlan';
|
||||
import DebtRepaymentPlanDialog from '@/views/financial-user/debt/debt-repayment-plan/debt-repayment-plan-dialog.vue';
|
||||
import { h, ref } from 'vue';
|
||||
import { message, messageBox } from '@/utils/message';
|
||||
import type { FormItemProps } from '@/views/financial/debt/debt-repayment-plan/utils/types';
|
||||
import type { FormItemProps } from '@/views/financial-user/debt/debt-repayment-plan/utils/types';
|
||||
import { $t } from '@/plugins/i18n';
|
||||
import DeleteBatchDialog from '@/components/Table/DeleteBatchDialog.vue';
|
||||
import { useDebtRepaymentPlanUserStore } from '@/store/financialUser/debtRepaymentPlanUser';
|
||||
|
||||
export const formRef = ref();
|
||||
// 删除ids
|
||||
export const deleteIds = ref([]);
|
||||
const debtRepaymentPlanStore = useDebtRepaymentPlanStore();
|
||||
const debtRepaymentPlanUserStore = useDebtRepaymentPlanUserStore();
|
||||
|
||||
/** 搜索初始化债务还款计划表 */
|
||||
export async function onSearch() {
|
||||
debtRepaymentPlanStore.loading = true;
|
||||
await debtRepaymentPlanStore.getDebtRepaymentPlanList();
|
||||
debtRepaymentPlanStore.loading = false;
|
||||
debtRepaymentPlanUserStore.loading = true;
|
||||
await debtRepaymentPlanUserStore.getDebtRepaymentPlanList();
|
||||
debtRepaymentPlanUserStore.loading = false;
|
||||
}
|
||||
|
||||
/** 添加债务还款计划表 */
|
||||
|
@ -42,7 +42,7 @@ export function onAdd() {
|
|||
formRef.value.formRef.validate(async (valid: any) => {
|
||||
if (!valid) return;
|
||||
|
||||
const result = await debtRepaymentPlanStore.addDebtRepaymentPlan(form);
|
||||
const result = await debtRepaymentPlanUserStore.addDebtRepaymentPlan(form);
|
||||
if (!result) return;
|
||||
done();
|
||||
await onSearch();
|
||||
|
@ -74,7 +74,7 @@ export function onUpdate(row: any) {
|
|||
formRef.value.formRef.validate(async (valid: any) => {
|
||||
if (!valid) return;
|
||||
|
||||
const result = await debtRepaymentPlanStore.updateDebtRepaymentPlan({ ...form, id: row.id });
|
||||
const result = await debtRepaymentPlanUserStore.updateDebtRepaymentPlan({ ...form, id: row.id });
|
||||
if (!result) return;
|
||||
done();
|
||||
await onSearch();
|
||||
|
@ -97,7 +97,7 @@ export const onDelete = async (row: any) => {
|
|||
if (!result) return;
|
||||
|
||||
// 删除数据
|
||||
await debtRepaymentPlanStore.deleteDebtRepaymentPlan([id]);
|
||||
await debtRepaymentPlanUserStore.deleteDebtRepaymentPlan([id]);
|
||||
await onSearch();
|
||||
};
|
||||
|
||||
|
@ -121,7 +121,7 @@ export const onDeleteBatch = async () => {
|
|||
const text = options.props.formInline.confirmText.toLowerCase();
|
||||
if (text === 'yes' || text === 'y') {
|
||||
// 删除数据
|
||||
await debtRepaymentPlanStore.deleteDebtRepaymentPlan(ids);
|
||||
await debtRepaymentPlanUserStore.deleteDebtRepaymentPlan(ids);
|
||||
await onSearch();
|
||||
|
||||
done();
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// 添加或者修改表单元素
|
||||
export interface FormItemProps {
|
||||
// 绑定的用户id
|
||||
userId: string;
|
||||
// 债务金额
|
||||
installmentNumber: any;
|
||||
// 每期应还金额
|
||||
|
|
|
@ -171,7 +171,6 @@ onMounted(() => {
|
|||
|
||||
<template #operation="{ row }">
|
||||
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
||||
<el-button :icon="useRenderIcon(AddFill)" :size="size" class="reset-margin" link type="primary" @click="onAdd"> {{ $t('addNew') }} </el-button>
|
||||
<el-popconfirm :title="`${$t('delete')}?`" @confirm="onDelete(row)">
|
||||
<template #reference>
|
||||
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
||||
|
|
|
@ -41,7 +41,7 @@ export const columns: TableColumnList = [
|
|||
},
|
||||
{ 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: 210, slot: 'operation' },
|
||||
{ label: $t('table.operation'), fixed: 'right', width: 160, slot: 'operation' },
|
||||
];
|
||||
|
||||
// 添加规则
|
||||
|
|
|
@ -55,7 +55,7 @@ export const columns: TableColumnList = [
|
|||
{ 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' },
|
||||
{ label: $t('table.operation'), fixed: 'right', width: 160, slot: 'operation' },
|
||||
];
|
||||
|
||||
// 添加规则
|
||||
|
|
|
@ -97,19 +97,6 @@ onMounted(() => {
|
|||
<el-input v-model="debtRepaymentPlanStore.form.installmentAmount" :placeholder="`${$t('input')}${$t('installmentAmount')}`" class="!w-[180px]" clearable />
|
||||
</el-form-item>
|
||||
|
||||
<!-- 还款截止日期 -->
|
||||
<el-form-item :label="$t('dueDate')" prop="dueDate">
|
||||
<el-date-picker
|
||||
v-model="debtRepaymentPlanStore.form.dueDate"
|
||||
:end-placeholder="$t('endTime')"
|
||||
:start-placeholder="$t('startTime')"
|
||||
class="!w-[210px]"
|
||||
time-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 已还金额 -->
|
||||
<el-form-item :label="$t('paidAmount')" prop="paidAmount">
|
||||
<el-input v-model="debtRepaymentPlanStore.form.paidAmount" :placeholder="`${$t('input')}${$t('paidAmount')}`" class="!w-[180px]" clearable />
|
||||
|
@ -130,6 +117,20 @@ onMounted(() => {
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 还款截止日期 -->
|
||||
<el-form-item :label="$t('dueDate')" prop="dueDate">
|
||||
<el-date-picker
|
||||
v-model="debtRepaymentPlanStore.form.dueDate"
|
||||
:end-placeholder="$t('endTime')"
|
||||
:placeholder="$t('dueDate')"
|
||||
:start-placeholder="$t('startTime')"
|
||||
class="!w-[210px]"
|
||||
time-format="YYYY-MM-DD"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 搜索和重置 -->
|
||||
<el-form-item>
|
||||
<el-button :icon="useRenderIcon('ri:search-line')" :loading="debtRepaymentPlanStore.loading" type="primary" @click="onSearch">
|
||||
|
@ -194,7 +195,6 @@ onMounted(() => {
|
|||
|
||||
<template #operation="{ row }">
|
||||
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
||||
<el-button :icon="useRenderIcon(AddFill)" :size="size" class="reset-margin" link type="primary" @click="onAdd"> {{ $t('addNew') }} </el-button>
|
||||
<el-popconfirm :title="`${$t('delete')}?`" @confirm="onDelete(row)">
|
||||
<template #reference>
|
||||
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
||||
|
|
|
@ -64,7 +64,7 @@ export const columns: TableColumnList = [
|
|||
{ 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' },
|
||||
{ label: $t('table.operation'), fixed: 'right', width: 160, slot: 'operation' },
|
||||
];
|
||||
|
||||
// 添加规则
|
||||
|
|
|
@ -191,7 +191,6 @@ onMounted(() => {
|
|||
|
||||
<template #operation="{ row }">
|
||||
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
||||
<el-button :icon="useRenderIcon(AddFill)" :size="size" class="reset-margin" link type="primary" @click="onAdd"> {{ $t('addNew') }} </el-button>
|
||||
<el-popconfirm :title="`${$t('delete')}?`" @confirm="onDelete(row)">
|
||||
<template #reference>
|
||||
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
||||
|
|
|
@ -45,7 +45,7 @@ export const columns: TableColumnList = [
|
|||
{ 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' },
|
||||
{ label: $t('table.operation'), fixed: 'right', width: 160, slot: 'operation' },
|
||||
];
|
||||
|
||||
// 添加规则
|
||||
|
|
Loading…
Reference in New Issue