fix: crm bugs

This commit is contained in:
xingyu4j
2025-06-26 15:46:07 +08:00
parent 69ae45ee6d
commit dcd5f463a6
5 changed files with 43 additions and 9 deletions

View File

@@ -5,7 +5,10 @@ import { useUserStore } from '@vben/stores';
import { getContractSimpleList } from '#/api/crm/contract';
import { getCustomerSimpleList } from '#/api/crm/customer';
import { getReceivablePlanSimpleList } from '#/api/crm/receivable/plan';
import {
getReceivablePlan,
getReceivablePlanSimpleList,
} from '#/api/crm/receivable/plan';
import { getSimpleUserList } from '#/api/system/user';
import { DICT_TYPE, getDictOptions } from '#/utils';
@@ -25,7 +28,6 @@ export function useFormSchema(): VbenFormSchema[] {
fieldName: 'no',
label: '回款编号',
component: 'Input',
rules: 'required',
componentProps: {
placeholder: '保存时自动生成',
disabled: true,
@@ -105,6 +107,12 @@ export function useFormSchema(): VbenFormSchema[] {
value: item.id,
})),
placeholder: '请选择回款期数',
onChange: async (value: any) => {
const plan = await getReceivablePlan(value);
values.returnTime = plan?.returnTime;
values.price = plan?.price;
values.returnType = plan?.returnType;
},
} as any;
}
},