feat:【antd】【crm】客户公海分配 form 的优化

This commit is contained in:
YunaiV
2025-09-27 21:10:02 +08:00
parent 3ba046def7
commit 968552ec4b

View File

@@ -1,17 +1,15 @@
<script lang="ts" setup>
import { useVbenModal } from '@vben/common-ui';
import { useUserStore } from '@vben/stores';
import { message } from 'ant-design-vue';
import { useVbenForm } from '#/adapter/form';
import { distributeCustomer } from '#/api/crm/customer';
import { getSimpleUserList } from '#/api/system/user';
import { $t } from '#/locales';
const emit = defineEmits(['success']);
import { useDistributeFormSchema } from '../data';
const userStore = useUserStore();
const emit = defineEmits(['success']);
const [Form, formApi] = useVbenForm({
commonConfig: {
@@ -22,30 +20,7 @@ const [Form, formApi] = useVbenForm({
labelWidth: 120,
},
layout: 'horizontal',
schema: [
{
component: 'Input',
fieldName: 'id',
dependencies: {
triggerFields: [''],
show: () => false,
},
},
{
fieldName: 'ownerUserId',
label: '负责人',
component: 'ApiSelect',
componentProps: {
api: () => getSimpleUserList(),
fieldNames: {
label: 'nickname',
value: 'id',
},
},
defaultValue: userStore.userInfo?.id,
rules: 'required',
},
],
schema: useDistributeFormSchema(),
showDefaultActions: false,
});