| | |
| | | import { z } from '#/adapter/form'; |
| | | import { getSimpleBusinessList } from '#/api/crm/business'; |
| | | import { getSimpleContactList } from '#/api/crm/contact'; |
| | | import { getCustomerSimpleList } from '#/api/crm/customer'; |
| | | import { getItemPage } from '#/api/mdm/item'; |
| | | import { getSimpleUserList } from '#/api/system/user'; |
| | | import { useUserStore } from '#/packages/stores/src'; |
| | | import CrmCustomerSelect from '#/components/crm-customer-select.vue'; |
| | | |
| | | import { markRaw } from 'vue'; |
| | | |
| | | /** 报价单状态 */ |
| | | export const QUOTATION_STATUS = { |
| | |
| | | { |
| | | fieldName: 'customerId', |
| | | label: '客户名称', |
| | | component: 'ApiSelect', |
| | | component: markRaw(CrmCustomerSelect), |
| | | rules: 'required', |
| | | componentProps: { |
| | | api: getCustomerSimpleList, |
| | | labelField: 'name', |
| | | valueField: 'id', |
| | | placeholder: '请选择客户', |
| | | }, |
| | | }, |
| | |
| | | fieldName: 'quotationTime', |
| | | label: '报价日期', |
| | | component: 'DatePicker', |
| | | rules: 'required', |
| | | componentProps: { |
| | | showTime: false, |
| | | format: 'YYYY-MM-DD', |
| | |
| | | }, |
| | | { |
| | | fieldName: 'items', |
| | | label: '物料清单', |
| | | label: '产品清单', |
| | | component: 'Input', |
| | | formItemClass: 'col-span-3', |
| | | }, |
| | |
| | | { |
| | | fieldName: 'customerId', |
| | | label: '客户', |
| | | component: 'ApiSelect', |
| | | component: markRaw(CrmCustomerSelect), |
| | | componentProps: { |
| | | api: getCustomerSimpleList, |
| | | labelField: 'name', |
| | | valueField: 'id', |
| | | placeholder: '请选择客户', |
| | | allowClear: true, |
| | | }, |
| | |
| | | ]; |
| | | } |
| | | |
| | | /** 物料明细表格列 */ |
| | | /** 产品明细表格列 */ |
| | | export function useItemColumns(): VxeTableGridOptions['columns'] { |
| | | return [ |
| | | { type: 'seq', title: '序号', minWidth: 50, fixed: 'left' }, |
| | | { |
| | | field: 'itemId', |
| | | title: '物料名称', |
| | | title: '产品名称', |
| | | minWidth: 200, |
| | | slots: { default: 'itemId' }, |
| | | }, |
| | | { |
| | | field: 'itemSpecification', |
| | | title: '规格型号', |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | field: 'itemBarCode', |
| | | title: '条码', |
| | | minWidth: 120, |
| | | }, |
| | | { |