zhangwencui
2026-07-16 f35825c1922149df154e3913d6dfebee57ee8cee
src/views/erp/purchase/order/data.ts
@@ -1,15 +1,17 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import { DICT_TYPE } from '..\..\..\..\packages\constants\src';
import { getDictOptions } from '..\..\..\..\packages\effects\hooks\src';
import { erpPriceInputFormatter } from '..\..\..\..\packages\utils\src';
import { markRaw } from 'vue';
import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { erpPriceInputFormatter } from '@vben/utils';
import { z } from '#/adapter/form';
import { getAccountSimpleList } from '#/api/erp/finance/account';
import { getProductSimpleList } from '#/api/erp/product/product';
import { getSupplierSimpleList } from '#/api/erp/purchase/supplier';
import { getSimpleUserList } from '#/api/system/user';
import { MdmItemSelect } from '#/views/basicData/mdm/components';
import { getRangePickerDefaultProps } from '#/utils';
/** 表单类型 */
@@ -59,6 +61,18 @@
        labelField: 'name',
        valueField: 'id',
      },
      rules: 'required',
    },
    {
      component: 'InputNumber',
      componentProps: {
        class: '!w-full',
        placeholder: '请输入支付订金',
        precision: 2,
        min: 0,
      },
      fieldName: 'depositPrice',
      label: '支付订金',
      rules: 'required',
    },
    {
@@ -151,18 +165,6 @@
        valueField: 'id',
      },
    },
    {
      component: 'InputNumber',
      componentProps: {
        class: '!w-full',
        placeholder: '请输入支付订金',
        precision: 2,
        min: 0,
      },
      fieldName: 'depositPrice',
      label: '支付订金',
      rules: z.number().min(0).optional(),
    },
  ];
}
@@ -198,6 +200,13 @@
      title: '备注',
      minWidth: 150,
      slots: { default: 'remark' },
    },
    {
      field: 'qcCheckFlag',
      title: '是否质检',
      minWidth: 80,
      fixed: 'right',
      slots: { default: 'qcCheckFlag' },
    },
    {
      field: 'count',
@@ -266,14 +275,9 @@
    {
      fieldName: 'productId',
      label: '产品',
      component: 'ApiSelect',
      component: markRaw(MdmItemSelect),
      componentProps: {
        placeholder: '请选择产品',
        allowClear: true,
        showSearch: true,
        api: getProductSimpleList,
        labelField: 'name',
        valueField: 'id',
      },
    },
    {