gaoluyang
5 天以前 c5db127ed8bd5e9960afe8e2df0b5cd361b2dfc1
src/views/crm/receivable/data.ts
@@ -6,12 +6,14 @@
import { useUserStore } from '@vben/stores';
import { getContractSimpleList } from '#/api/crm/contract';
import { getCustomerSimpleList } from '#/api/crm/customer';
import {
  getReceivablePlan,
  getReceivablePlanSimpleList,
} from '#/api/crm/receivable/plan';
import { getSimpleUserList } from '#/api/system/user';
import CrmCustomerSelect from '#/components/crm-customer-select.vue';
import { markRaw } from 'vue';
/** 新增/修改的表单 */
export function useFormSchema(): VbenFormSchema[] {
@@ -55,12 +57,9 @@
    {
      fieldName: 'customerId',
      label: '客户名称',
      component: 'ApiSelect',
      component: markRaw(CrmCustomerSelect),
      rules: 'required',
      componentProps: (_values, form) => ({
        api: getCustomerSimpleList,
        labelField: 'name',
        valueField: 'id',
        placeholder: '请选择客户',
        onChange: () => {
          form.setFieldValue('contractId', undefined);
@@ -216,11 +215,8 @@
    {
      fieldName: 'customerId',
      label: '客户',
      component: 'ApiSelect',
      component: markRaw(CrmCustomerSelect),
      componentProps: {
        api: getCustomerSimpleList,
        labelField: 'name',
        valueField: 'id',
        placeholder: '请选择客户',
        allowClear: true,
      },