fix: bugs
This commit is contained in:
@@ -45,7 +45,15 @@ function onRefresh() {
|
||||
|
||||
/** 创建合同 */
|
||||
function handleCreate() {
|
||||
formModalApi.setData(null).open();
|
||||
formModalApi
|
||||
.setData(
|
||||
props.bizType === BizTypeEnum.CRM_CUSTOMER
|
||||
? {
|
||||
customerId: props.bizId,
|
||||
}
|
||||
: { businessId: props.bizId },
|
||||
)
|
||||
.open();
|
||||
}
|
||||
|
||||
/** 查看合同详情 */
|
||||
|
||||
@@ -90,6 +90,8 @@ const [Modal, modalApi] = useVbenModal({
|
||||
// 加载数据
|
||||
const data = modalApi.getData<CrmContractApi.Contract>();
|
||||
if (!data || !data.id) {
|
||||
// 设置到 values
|
||||
await formApi.setValues(data);
|
||||
return;
|
||||
}
|
||||
modalApi.lock();
|
||||
|
||||
Reference in New Issue
Block a user