feat:【antd】【crm】客户公海分配 form 的优化
This commit is contained in:
@@ -1,17 +1,15 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useVbenModal } from '@vben/common-ui';
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
import { useUserStore } from '@vben/stores';
|
|
||||||
|
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenForm } from '#/adapter/form';
|
import { useVbenForm } from '#/adapter/form';
|
||||||
import { distributeCustomer } from '#/api/crm/customer';
|
import { distributeCustomer } from '#/api/crm/customer';
|
||||||
import { getSimpleUserList } from '#/api/system/user';
|
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
|
|
||||||
const emit = defineEmits(['success']);
|
import { useDistributeFormSchema } from '../data';
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const emit = defineEmits(['success']);
|
||||||
|
|
||||||
const [Form, formApi] = useVbenForm({
|
const [Form, formApi] = useVbenForm({
|
||||||
commonConfig: {
|
commonConfig: {
|
||||||
@@ -22,30 +20,7 @@ const [Form, formApi] = useVbenForm({
|
|||||||
labelWidth: 120,
|
labelWidth: 120,
|
||||||
},
|
},
|
||||||
layout: 'horizontal',
|
layout: 'horizontal',
|
||||||
schema: [
|
schema: useDistributeFormSchema(),
|
||||||
{
|
|
||||||
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',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
showDefaultActions: false,
|
showDefaultActions: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
Reference in New Issue
Block a user