| | |
| | | import { z } from '#/adapter/form'; |
| | | import { getAccountSimpleList } from '#/api/erp/finance/account'; |
| | | import { getItemPage } from '#/api/mdm/item'; |
| | | import { getCustomerSimpleList as getCrmCustomerSimpleList } from '#/api/crm/customer'; |
| | | import { getSimpleUserList } from '#/api/system/user'; |
| | | import { getRangePickerDefaultProps } from '#/utils'; |
| | | import CrmCustomerSelect from '#/components/crm-customer-select.vue'; |
| | | |
| | | import { markRaw } from 'vue'; |
| | | |
| | | /** 表单类型 */ |
| | | export type FormType = 'create' | 'detail' | 'edit'; |
| | |
| | | { |
| | | label: '客户', |
| | | fieldName: 'customerId', |
| | | component: 'ApiSelect', |
| | | component: markRaw(CrmCustomerSelect), |
| | | componentProps: { |
| | | placeholder: '请选择客户', |
| | | allowClear: true, |
| | | showSearch: true, |
| | | api: getCrmCustomerSimpleList, |
| | | labelField: 'name', |
| | | valueField: 'id', |
| | | }, |
| | | rules: 'required', |
| | | }, |
| | |
| | | minWidth: 80, |
| | | }, |
| | | { |
| | | field: 'needProduction', |
| | | title: '需要生产', |
| | | minWidth: 100, |
| | | slots: { default: 'needProduction' }, |
| | | }, |
| | | { |
| | | field: 'remark', |
| | | title: '备注', |
| | | minWidth: 150, |
| | |
| | | { |
| | | fieldName: 'supplierId', |
| | | label: '客户', |
| | | component: 'ApiSelect', |
| | | component: markRaw(CrmCustomerSelect), |
| | | componentProps: { |
| | | placeholder: '请选择客户', |
| | | allowClear: true, |
| | | showSearch: true, |
| | | api: getCrmCustomerSimpleList, |
| | | labelField: 'name', |
| | | valueField: 'id', |
| | | }, |
| | | }, |
| | | { |
| | |
| | | slots: { default: 'status' }, |
| | | }, |
| | | { |
| | | field: 'needProduction', |
| | | title: '需要生产', |
| | | minWidth: 100, |
| | | fixed: 'right', |
| | | slots: { default: 'needProduction' }, |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 260, |
| | | fixed: 'right', |