Files
geg-gas-web/src/views/contract/ContractSales/components/config.ts

881 lines
21 KiB
TypeScript
Raw Normal View History

2025-12-31 10:10:53 +08:00
import { FormProps, FormSchema } from '/@/components/Form';
import { BasicColumn } from '/@/components/Table';
export const formConfig = {
useCustomConfig: false,
};
export const searchFormSchema: FormSchema[] = [
{
field: 'kName',
2026-01-06 17:46:04 +08:00
label: '合同号/名称',
2025-12-31 10:10:53 +08:00
component: 'Input',
},
{
field: 'cpName',
label: '客户',
component: 'Input',
2026-02-02 10:43:46 +08:00
},
{
field: 'comId',
label: '合同主体',
component: 'Input',
},
{
field: 'pointUpName',
label: '交割点',
component: 'Input',
},
{
field: 'approCode',
label: '审批状态',
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '1990669393069129729' },
labelField: 'name',
valueField: 'value',
getPopupContainer: () => document.body,
},
},
2025-12-31 10:10:53 +08:00
];
export const columns: BasicColumn[] = [
{
dataIndex: 'kNo',
title: '合同号',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'kName',
title: '合同名称',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'cpName',
title: '客户',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'dateFrom',
title: '有效期开始',
componentType: 'input',
align: 'left',
2026-01-08 17:53:29 +08:00
width: 120,
2025-12-31 10:10:53 +08:00
sorter: true,
},
{
dataIndex: 'dateTo',
title: '有效期结束',
componentType: 'input',
align: 'left',
2026-01-08 17:53:29 +08:00
width: 120,
2025-12-31 10:10:53 +08:00
sorter: true,
},
{
2026-01-06 17:46:04 +08:00
dataIndex: 'approName',
2025-12-31 10:10:53 +08:00
title: '状态',
componentType: 'input',
align: 'left',
2026-01-08 17:53:29 +08:00
width: 100,
2025-12-31 10:10:53 +08:00
sorter: true,
},
{
2026-01-07 17:38:57 +08:00
dataIndex: 'pointUpName',
2025-12-31 10:10:53 +08:00
title: '交割点',
componentType: 'input',
align: 'left',
sorter: true,
},
{
2026-01-08 17:53:29 +08:00
dataIndex: 'transName',
2025-12-31 10:10:53 +08:00
title: '是否托运',
componentType: 'input',
align: 'left',
2026-02-02 17:52:11 +08:00
width: 100,
2025-12-31 10:10:53 +08:00
sorter: true,
},
{
2026-01-07 17:38:57 +08:00
dataIndex: 'comName',
2025-12-31 10:10:53 +08:00
title: '合同主体',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'note',
title: '备注',
componentType: 'input',
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: '2b76620f1fec4cba98e93085a2b2c2b3',
field: 'id',
label: 'id',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
labelWidthMode: 'fix',
labelFixWidth: 120,
responsive: false,
respNewRow: false,
placeholder: '请输入id',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
isSave: false,
isShow: true,
scan: false,
style: { width: '100%' },
},
},
{
key: 'f410996025d94347a8e8a883676758c9',
field: 'kNo',
label: '合同号',
type: 'input',
component: 'Input',
colProps: { span: 24 },
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,
style: { width: '100%' },
},
},
{
key: 'b8d3454317814d1ca8df730367547d3b',
field: 'kName',
label: '合同名称',
type: 'input',
component: 'Input',
colProps: { span: 24 },
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,
style: { width: '100%' },
},
},
{
key: '573defdd970647d28bc08f2739025842',
field: 'cpName',
label: '客户',
type: 'input',
component: 'Input',
colProps: { span: 24 },
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,
style: { width: '100%' },
},
},
{
key: '32905aa8724341cea6d71b639c39ce8b',
field: 'dateFrom',
label: '有效期开始',
type: 'input',
component: 'Input',
colProps: { span: 24 },
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,
style: { width: '100%' },
},
},
{
key: '365716a26e434eb496e660a4df6b17d3',
field: 'dateTo',
label: '有效期结束',
type: 'input',
component: 'Input',
colProps: { span: 24 },
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,
style: { width: '100%' },
},
},
{
key: 'a7931b9a47034370bb2209febf3975ca',
field: 'approCode',
label: '状态',
type: 'input',
component: 'Input',
colProps: { span: 24 },
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,
style: { width: '100%' },
},
},
{
key: '0409b53c8b414ed698342dcfb0c6aff1',
field: 'onlineSign',
label: '交割点',
type: 'input',
component: 'Input',
colProps: { span: 24 },
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,
style: { width: '100%' },
},
},
{
key: '4427e39df3914fa1b057f454f5217f2a',
field: 'cpTableName',
label: '是否托运',
type: 'input',
component: 'Input',
colProps: { span: 24 },
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,
style: { width: '100%' },
},
},
{
key: 'dbe16eaad51c40dfa9244f290e1c1aa4',
field: 'comId',
label: '合同主体',
type: 'input',
component: 'Input',
colProps: { span: 24 },
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,
style: { width: '100%' },
},
},
{
key: '484fb400dcc548da9021ce8c9b6d5a31',
field: 'note',
label: '备注',
type: 'input',
component: 'Input',
colProps: { span: 24 },
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,
style: { width: '100%' },
},
},
{
key: '719298d39a48403b9aa7374844885fb4',
label: '表格组件',
field: 'lngContractSalesPngList',
type: 'form',
component: 'SubForm',
required: true,
colProps: { span: 24 },
componentProps: {
mainKey: 'lngContractSalesPngList',
columns: [
{
key: 'b80c6a63d6164ebcabd8b28e692d3c84',
title: '单行文本',
dataIndex: 'id',
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: [],
},
},
{
key: '6ec150c9da454881bb25bd758f0977b3',
label: '表格组件',
field: 'lngContractSalesPngPointList',
type: 'form',
component: 'SubForm',
required: true,
colProps: { span: 24 },
componentProps: {
mainKey: 'lngContractSalesPngPointList',
columns: [
{
key: '821646ea2af94b7bb341468c79bffdc3',
title: '单行文本',
dataIndex: 'id',
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: [],
},
},
{
key: '8432ccfb64264393bbb95335d59c90cd',
label: '表格组件',
field: 'lngContractSalesPngQtyList',
type: 'form',
component: 'SubForm',
required: true,
colProps: { span: 24 },
componentProps: {
mainKey: 'lngContractSalesPngQtyList',
columns: [
{
key: '8d30556c209442a8b798c9f19cd09e9f',
title: '单行文本',
dataIndex: 'id',
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: [],
},
},
{
key: '5eda11b537e74327879f6414d410eac0',
label: '表格组件',
field: 'lngContractFactRelList',
type: 'form',
component: 'SubForm',
required: true,
colProps: { span: 24 },
componentProps: {
mainKey: 'lngContractFactRelList',
columns: [
{
key: 'dacee76aaa8b44bbb5e3fdaad55bb03d',
title: '单行文本',
dataIndex: 'id',
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: [],
},
},
{
key: '359f728fec1744b18cd93a7e09720f8a',
label: '表格组件',
field: 'lngContractApproRelList',
type: 'form',
component: 'SubForm',
required: true,
colProps: { span: 24 },
componentProps: {
mainKey: 'lngContractApproRelList',
columns: [
{
key: '64be7b84556c4e7980d5f83087b8e928',
title: '单行文本',
dataIndex: 'id',
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: [],
};