spring
2026-07-03 f10cf167372f2d8c4c0e14f42f361d7ab96d8347
src/views/erp/sale/order/data.ts
@@ -1,14 +1,12 @@
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 { z } from '#/adapter/form';
import { getAccountSimpleList } from '#/api/erp/finance/account';
import { getProductSimpleList } from '#/api/erp/product/product';
import { getCustomerSimpleList } from '#/api/erp/sale/customer';
import { getItemPage } from '#/api/mdm/item';
import { getCustomerSimpleList as getCrmCustomerSimpleList } from '#/api/crm/customer';
import { getSimpleUserList } from '#/api/system/user';
import { getRangePickerDefaultProps } from '#/utils';
@@ -55,7 +53,7 @@
        placeholder: '请选择客户',
        allowClear: true,
        showSearch: true,
        api: getCustomerSimpleList,
        api: getCrmCustomerSimpleList,
        labelField: 'name',
        valueField: 'id',
      },
@@ -192,6 +190,11 @@
      slots: { default: 'productId' },
    },
    {
      field: 'productSpecification',
      title: '规格型号',
      minWidth: 120,
    },
    {
      field: 'stockCount',
      title: '库存',
      minWidth: 80,
@@ -205,6 +208,16 @@
    {
      field: 'productUnitName',
      title: '单位',
      minWidth: 80,
    },
    {
      field: 'productUnitName2',
      title: '辅单位1',
      minWidth: 80,
    },
    {
      field: 'productUnitName3',
      title: '辅单位2',
      minWidth: 80,
    },
    {
@@ -285,7 +298,10 @@
        placeholder: '请选择产品',
        allowClear: true,
        showSearch: true,
        api: getProductSimpleList,
        api: async () => {
          const res = await getItemPage({ pageNo: 1, pageSize: 100, status: 0 });
          return res.list || [];
        },
        labelField: 'name',
        valueField: 'id',
      },
@@ -307,7 +323,7 @@
        placeholder: '请选择客户',
        allowClear: true,
        showSearch: true,
        api: getCustomerSimpleList,
        api: getCrmCustomerSimpleList,
        labelField: 'name',
        valueField: 'id',
      },
@@ -330,7 +346,11 @@
      label: '状态',
      component: 'Select',
      componentProps: {
        options: getDictOptions(DICT_TYPE.ERP_AUDIT_STATUS, 'number'),
        options: [
          { label: '未审核', value: 10 },
          { label: '已审核', value: 20 },
          { label: '已作废', value: 30 },
        ],
        placeholder: '请选择状态',
        allowClear: true,
      },
@@ -388,6 +408,7 @@
      title: '订单单号',
      width: 200,
      fixed: 'left',
      slots: { default: 'no' },
    },
    {
      field: 'productNames',
@@ -399,6 +420,12 @@
      field: 'customerName',
      title: '客户',
      minWidth: 120,
    },
    {
      field: 'contractNo',
      title: '关联合同',
      minWidth: 150,
      slots: { default: 'contractNo' },
    },
    {
      field: 'orderTime',
@@ -450,11 +477,9 @@
    {
      field: 'status',
      title: '状态',
      minWidth: 120,
      cellRender: {
        name: 'CellDict',
        props: { type: DICT_TYPE.ERP_AUDIT_STATUS },
      },
      minWidth: 100,
      fixed: 'right',
      slots: { default: 'status' },
    },
    {
      title: '操作',