| | |
| | | import { z } from '#/adapter/form'; |
| | | import { getSimpleBusinessList } from '#/api/crm/business'; |
| | | import { getSimpleContactList } from '#/api/crm/contact'; |
| | | 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'; |
| | |
| | | fieldName: 'no', |
| | | label: '报价单号', |
| | | component: 'Input', |
| | | help: '留空由系统自动生成;填写则使用该编号,需全库唯一', |
| | | componentProps: { |
| | | placeholder: '保存时自动生成', |
| | | disabled: true, |
| | | placeholder: '报价单号自定义', |
| | | maxLength: 32, |
| | | }, |
| | | }, |
| | | { |
| | |
| | | fieldName: 'quotationTime', |
| | | label: '报价日期', |
| | | component: 'DatePicker', |
| | | rules: 'required', |
| | | componentProps: { |
| | | showTime: false, |
| | | format: 'YYYY-MM-DD', |
| | | valueFormat: 'x', |
| | | valueFormat: 'YYYY-MM-DD', |
| | | placeholder: '请选择报价日期', |
| | | }, |
| | | }, |
| | |
| | | componentProps: { |
| | | showTime: false, |
| | | format: 'YYYY-MM-DD', |
| | | valueFormat: 'x', |
| | | valueFormat: 'YYYY-MM-DD', |
| | | placeholder: '请选择有效期', |
| | | }, |
| | | }, |
| | |
| | | }, |
| | | { |
| | | fieldName: 'items', |
| | | label: '物料清单', |
| | | label: '产品清单', |
| | | component: 'Input', |
| | | formItemClass: 'col-span-3', |
| | | }, |
| | |
| | | field: 'quotationTime', |
| | | title: '报价日期', |
| | | minWidth: 120, |
| | | formatter: 'formatDateTime', |
| | | formatter: 'formatDate', |
| | | }, |
| | | { |
| | | field: 'validUntil', |
| | | title: '有效期至', |
| | | minWidth: 120, |
| | | formatter: 'formatDateTime', |
| | | formatter: 'formatDate', |
| | | }, |
| | | { |
| | | field: 'status', |
| | |
| | | field: 'createTime', |
| | | title: '创建时间', |
| | | minWidth: 180, |
| | | formatter: 'formatDateTime', |
| | | formatter: 'formatDate', |
| | | }, |
| | | { |
| | | title: '操作', |
| | |
| | | ]; |
| | | } |
| | | |
| | | /** 物料明细表格列 */ |
| | | /** 产品明细表格列 */ |
| | | 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, |
| | | }, |
| | | { |