Files
geg-gas-web/src/views/sales/CustomerGroup/components/config.ts
‘huanghaiixia’ 3ce161bcbe 查询条件添加
2026-02-02 10:43:46 +08:00

430 lines
10 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { FormProps, FormSchema } from '/@/components/Form';
import { BasicColumn } from '/@/components/Table';
export const formConfig = {
useCustomConfig: false,
};
export const searchFormSchema: FormSchema[] = [
{
field: 'dateFrom',
label: '日期',
component: 'RangePicker',
componentProps: {
format: 'YYYY-MM-DD',
style: { width: '100%' },
allowClear: true,
getPopupContainer: () => document.body,
},
},
{
field: 'grpName',
label: '客户组说明',
component: 'Input',
},
{
field: 'typeCode',
label: '类型',
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '1990241330091048961' },
labelField: 'name',
valueField: 'value',
getPopupContainer: () => document.body,
},
},
];
export const columns: BasicColumn[] = [
{
dataIndex: 'grpCode',
title: '客户组编码',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'typeName',
title: '类型',
componentType: 'select',
align: 'left',
sorter: true,
},
{
dataIndex: 'dateFrom',
title: '起始日期',
componentType: 'date',
align: 'left',
sorter: true,
},
{
dataIndex: 'dateTo',
title: '结束日期',
componentType: 'date',
align: 'left',
sorter: true,
},
{
dataIndex: 'grpName',
title: '客户组说明',
componentType: 'textarea',
align: 'left',
sorter: true,
},
{
dataIndex: 'note',
title: '备注',
componentType: 'textarea',
align: 'left',
sorter: true,
},
];
//表单事件
export const formEventConfigs = {
0: [
{
type: 'circle',
color: '#2774ff',
text: '开始节点',
icon: '#icon-kaishi',
bgcColor: '#D8E5FF',
isUserDefined: false,
},
{
color: '#F6AB01',
icon: '#icon-chushihua',
text: '初始化表单',
bgcColor: '#f9f5ea',
isUserDefined: false,
nodeInfo: { processEvent: [] },
},
],
1: [
{
color: '#B36EDB',
icon: '#icon-shujufenxi',
text: '获取表单数据',
detail: '(新增无此操作)',
bgcColor: '#F8F2FC',
isUserDefined: false,
nodeInfo: { processEvent: [] },
},
],
2: [
{
color: '#F8625C',
icon: '#icon-jiazai',
text: '加载表单',
bgcColor: '#FFF1F1',
isUserDefined: false,
nodeInfo: { processEvent: [] },
},
],
3: [
{
color: '#6C6AE0',
icon: '#icon-jsontijiao',
text: '提交表单',
bgcColor: '#F5F4FF',
isUserDefined: false,
nodeInfo: { processEvent: [] },
},
],
4: [
{
type: 'circle',
color: '#F8625C',
text: '结束节点',
icon: '#icon-jieshuzhiliao',
bgcColor: '#FFD6D6',
isLast: true,
isUserDefined: false,
},
],
};
export const formProps: FormProps = {
labelCol: { span: 3, offset: 0 },
labelAlign: 'right',
layout: 'horizontal',
size: 'default',
schemas: [
{
key: 'd788c25634344c4d9e76e6c20cfbf949',
field: 'grpCode',
label: '客户组编码',
type: 'input',
component: 'Input',
colProps: { span: 12 },
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
placeholder: '请输入客户组编码',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: true,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
isSave: false,
isShow: true,
scan: false,
style: { width: '100%' },
},
},
{
key: 'b272dd41b20040808c1ea3ddac99a47f',
field: 'typeCode',
label: '类型',
type: 'select',
component: 'XjrSelect',
colProps: { span: 12 },
componentProps: {
width: '100%',
span: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
placeholder: '请选择下拉选择',
sepTextField: '',
showLabel: true,
showSearch: false,
clearable: false,
disabled: false,
staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'dic',
params: { itemId: '1990241330091048961' },
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: true,
rules: [],
events: {},
isShow: true,
itemId: '1990241330091048961',
style: { width: '100%' },
},
},
{
key: '3fc7c48352794ec5901605f3cffad0dc',
field: 'dateFrom',
label: '超始日期',
// type: 'date',
type: 'slot',
slotName: 'dateFrom',
component: 'DatePicker',
colProps: { span: 12 },
defaultValue: '',
componentProps: {
span: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
defaultValue: '',
width: '100%',
placeholder: '请选择超始日期',
format: 'YYYY-MM-DD HH:mm:ss',
showLabel: true,
allowClear: true,
disabled: false,
required: false,
isShow: true,
rules: [],
events: {},
style: { width: '100%' },
},
},
{
key: 'db833a66db2c45dab55ef34b47e4c95a',
field: 'dateTo',
label: '结束日期',
// type: 'date',
type: 'slot',
slotName: 'dateTo',
component: 'DatePicker',
colProps: { span: 12 },
defaultValue: '',
componentProps: {
span: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
defaultValue: '',
width: '100%',
placeholder: '请选择结束日期',
format: 'YYYY-MM-DD HH:mm:ss',
showLabel: true,
allowClear: true,
disabled: false,
required: false,
isShow: true,
rules: [],
events: {},
style: { width: '100%' },
},
},
{
key: 'c95c753263bd4f20ade0bf3edce4061f',
field: 'grpName',
label: '客户组说明',
type: 'textarea',
component: 'InputTextArea',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: true,
placeholder: '请输入客户组说明最多200字',
maxlength: 200,
rows: 2,
autoSize: false,
showCount: false,
disabled: false,
showLabel: true,
allowClear: false,
required: true,
isShow: true,
rules: [],
events: {},
style: { width: '100%' },
},
},
{
key: 'c4697d84099e4b5392062f4d7bd775ab',
field: 'note',
label: '备注',
type: 'textarea',
component: 'InputTextArea',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: true,
placeholder: '请输入备注最多200字',
maxlength: 200,
rows: 2,
autoSize: false,
showCount: false,
disabled: false,
showLabel: true,
allowClear: false,
required: false,
isShow: true,
rules: [],
events: {},
style: { width: '100%' },
},
},
// {
// key: '0459b560bc024780b529f9d346a1e5b1',
// label: '表格组件',
// field: 'lngCustomerGroupCustomerList',
// type: 'form',
// component: 'SubForm',
// required: true,
// colProps: { span: 24 },
// componentProps: {
// mainKey: 'lngCustomerGroupCustomerList',
// columns: [
// {
// key: 'fe7ce464a2294fc8b9ccc4c3764f12b7',
// title: '单行文本',
// dataIndex: 'grpCode',
// componentType: 'Input',
// defaultValue: '',
// componentProps: {
// width: '100%',
// span: '',
// defaultValue: '',
// labelWidthMode: 'fix',
// labelFixWidth: 120,
// responsive: false,
// respNewRow: false,
// placeholder: '请输入单行文本',
// maxlength: null,
// prefix: '',
// suffix: '',
// addonBefore: '',
// addonAfter: '',
// disabled: false,
// allowClear: false,
// showLabel: true,
// required: false,
// rules: [],
// events: {},
// isSave: false,
// isShow: true,
// scan: false,
// },
// },
// { title: '操作', key: 'action', fixed: 'right', width: '50px' },
// ],
// span: '24',
// preloadType: 'api',
// apiConfig: {},
// itemId: '',
// dicOptions: [],
// useSelectButton: false,
// buttonName: '选择数据',
// showLabel: true,
// showComponentBorder: true,
// showFormBorder: true,
// showIndex: false,
// isShow: true,
// multipleHeads: [],
// },
// },
],
showActionButtonGroup: false,
buttonLocation: 'center',
actionColOptions: { span: 24 },
showResetButton: false,
showSubmitButton: false,
hiddenComponent: [],
};