686 lines
16 KiB
TypeScript
686 lines
16 KiB
TypeScript
import { FormProps, FormSchema } from '/@/components/Form';
|
|
import { BasicColumn } from '/@/components/Table';
|
|
|
|
export const formConfig = {
|
|
useCustomConfig: false,
|
|
};
|
|
|
|
export const searchFormSchema: FormSchema[] = [
|
|
{
|
|
field: 'datePlan',
|
|
label: '结算月',
|
|
component: 'RangePicker',
|
|
componentProps: {
|
|
format: 'YYYY-MM',
|
|
picker: 'month',
|
|
style: { width: '100%' },
|
|
getPopupContainer: () => document.body,
|
|
},
|
|
},
|
|
{
|
|
field: 'cpName',
|
|
label: '供应商名称',
|
|
component: 'Input',
|
|
},
|
|
];
|
|
|
|
export const columns: BasicColumn[] = [
|
|
{
|
|
dataIndex: 'settleMonth',
|
|
title: '结算月',
|
|
componentType: 'input',
|
|
align: 'left',
|
|
width: 100,
|
|
sorter: true,
|
|
},
|
|
|
|
{
|
|
dataIndex: 'dateFrom',
|
|
title: '结算月开始日期',
|
|
componentType: 'input',
|
|
align: 'left',
|
|
width: 140,
|
|
sorter: true,
|
|
},
|
|
|
|
{
|
|
dataIndex: 'dateTo',
|
|
title: '结算月结束日期',
|
|
componentType: 'input',
|
|
align: 'left',
|
|
width: 140,
|
|
sorter: true,
|
|
},
|
|
|
|
{
|
|
dataIndex: 'cpName',
|
|
title: '供应商简称',
|
|
componentType: 'input',
|
|
align: 'left',
|
|
|
|
sorter: true,
|
|
},
|
|
|
|
{
|
|
dataIndex: 'settleDesc',
|
|
title: '结算说明',
|
|
componentType: 'input',
|
|
align: 'left',
|
|
|
|
sorter: true,
|
|
},
|
|
|
|
{
|
|
dataIndex: 'qtySettleGj',
|
|
title: '结算总数量(吉焦)',
|
|
componentType: 'input',
|
|
align: 'left',
|
|
|
|
sorter: true,
|
|
},
|
|
|
|
{
|
|
dataIndex: 'qtySettleM3',
|
|
title: '结算总数量(方)',
|
|
componentType: 'input',
|
|
align: 'left',
|
|
|
|
sorter: true,
|
|
},
|
|
|
|
{
|
|
dataIndex: 'amount',
|
|
title: '结算总金额(元)',
|
|
componentType: 'input',
|
|
align: 'left',
|
|
|
|
sorter: true,
|
|
},
|
|
|
|
{
|
|
dataIndex: 'note',
|
|
title: '备注',
|
|
componentType: 'input',
|
|
align: 'left',
|
|
|
|
sorter: true,
|
|
},
|
|
|
|
{
|
|
dataIndex: 'approName',
|
|
title: '审批状态',
|
|
componentType: 'input',
|
|
align: 'left',
|
|
width: 100,
|
|
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: '467cd7195a684296b4b60a3c3b7158c6',
|
|
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: '91760a4f5c554515bb65828e62bc9d1e',
|
|
field: 'settleMonth',
|
|
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: '6bc3fa96e2cc40acbb2fdead9406c943',
|
|
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: 'a9e28be90c0d40a1985283a7a2d464b7',
|
|
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: 'a3e4b515881f460b87675fe09dafdadd',
|
|
field: 'cpCode',
|
|
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: '336fb3cf758347c8ae2d2c8047747f88',
|
|
field: 'settleDesc',
|
|
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: '5d6f2d25c9ac4215822eba9c17424dd4',
|
|
field: 'qtySettleGj',
|
|
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: '8c97393756524ff58e1d9ce3416d794e',
|
|
field: 'qtySettleM3',
|
|
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: '1913cff6de1048a8bf7c51f26c720663',
|
|
field: 'amount',
|
|
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: '7871e6d89d3847d3b0ca768a0465f7d4',
|
|
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: '628b2ea58b654aeaa2e0c6cdc286eccc',
|
|
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: '5b4e462f91dd4c58b1263647ea357ef1',
|
|
label: '表格组件',
|
|
field: 'lngPngSettlePurList',
|
|
type: 'form',
|
|
component: 'SubForm',
|
|
required: true,
|
|
colProps: { span: 24 },
|
|
componentProps: {
|
|
mainKey: 'lngPngSettlePurList',
|
|
columns: [
|
|
{
|
|
key: '5c88e8b2a3bf49c887a57b50b7c715ce',
|
|
title: 'id',
|
|
dataIndex: 'id',
|
|
componentType: 'Input',
|
|
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,
|
|
},
|
|
},
|
|
{ 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: 'd9100edc043c4894826b24631c97f667',
|
|
label: '表格组件',
|
|
field: 'lngPngSettlePurDtlList',
|
|
type: 'form',
|
|
component: 'SubForm',
|
|
required: true,
|
|
colProps: { span: 24 },
|
|
componentProps: {
|
|
mainKey: 'lngPngSettlePurDtlList',
|
|
columns: [
|
|
{
|
|
key: '7664c252f8c3459799062975824c2813',
|
|
title: 'id',
|
|
dataIndex: 'id',
|
|
componentType: 'Input',
|
|
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,
|
|
},
|
|
},
|
|
{ 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: [],
|
|
}; |