湖州项目前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

474 lines
10 KiB

import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Form';
export const PlaninfoColumn: BasicColumn[] = [
{
title: '任务名称',
dataIndex: 'taskName',
align:'left'
},
{
title: '计划开始时间',
dataIndex: 'scheduledStartTime',
},
{
title: '计划结束时间',
dataIndex: 'scheduledEndTime',
},
{
title: '所需文件',
dataIndex: 'taskFile',
},
{
title: '是否已完成',
dataIndex: 'isfinish',
customRender: ({ record }) => {
if (record.isfinish == 1) {
return "审批中"
}else if(record.isfinish == 2) {
return "已完成"
}
else {
return "未完成"
}
},
}
];
export const PlaninfoFiletableColumns: BasicColumn[] = [
{
title: '文件名称',
dataIndex: 'documentName',
},
{
title: '文件大小',
dataIndex: 'size',
width: 100,
customRender: ({ record }) => {
let kbNum: number = record.size / 1024
if (kbNum < 1024) {
return kbNum.toFixed(2).toString() + "KB"
} else {
let mbNum: number = kbNum / 1024
return mbNum.toFixed(2).toString() + "MB"
}
},
},
{
title: '上传时间',
dataIndex: 'createDate',
},
{
title: '修改次数',
dataIndex: 'modifyNum',
},
{
title: '处理人',
dataIndex: 'createUser',
},
{
title: '文件状态',
dataIndex: 'status',
customRender: ({ record }) => {
if (record.status == 1) {
return "有效"
}
else {
return "历史文件" //0
}
},
}
]
export const searchFormSchema: FormSchema[] = [
{
label: '项目名称',
field: 'projectName',
component: 'Input',
labelWidth: 'auto'
//colProps: { span: 6 },
},
{
label: '行政区划',
field: 'adminDivision',
component: 'Input',
labelWidth: 'auto'
//colProps: { span: 6 },
},
{
//标题名称
label: '责任单位',
//字段
field: 'dutyWorkplace',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
labelWidth: 'auto'
},
{
//标题名称
label: '单位属性',
//字段
field: 'workplaceProperties',
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'Input',
labelWidth: 'auto'
},
{
field: 'reformName',
label: '改革所属项目',
component: 'DictSelect',
componentProps: {
dictType: 'reformTasks',
},
itemProps: { validateTrigger: 'blur' },
labelWidth: 'auto'
},
{
field: 'superLeader',
label: '上级指导处室',
component: 'DictSelect',
componentProps: {
dictType: 'superLeader',
},
labelWidth: 'auto'
},
// {
// field: 'stage',
// label: '项目状态',
// component: 'Select',
// componentProps: {
// options: [
// { label: '项目入库完成', value: '2' },
// { label: '项目计划审批中', value: '4' },
// { label: '项目计划执行中', value: '5' },
// { label: '项目计划完成 ', value: '6' },
// ]
// },
// labelWidth: 'auto'
// },
];
export const unitedTechnicalRevieColumns: BasicColumn[] = [
{
title: '项目编号',
width: 150,
dataIndex: 'id',
ifShow: false,
},
{
title: '项目名称',
dataIndex: 'projectName',
width: 300,
resizable: true,
align: 'left',
slots: { customRender: 'projectName' },
ifShow:false
},
{
title: '所处阶段',
dataIndex: 'currentPointName',
resizable: true
},
{
title: '行政区划',
dataIndex: 'adminDivision',
resizable: true
},
{
title: '责任单位',
dataIndex: 'dutyWorkplace',
resizable: true
},
{
title: '单位属性',
dataIndex: 'workplaceProperties',
resizable: true
},
{
title: '改革所属项目',
dataIndex: 'reformName',
format: 'dict|reformTasks',
resizable: true
},
{
title: '上级指导处室',
dataIndex: 'superLeader',
format: 'dict|superLeader',
resizable: true
},
{
title: '是否完成',
dataIndex: 'utrIsfinish',
filters: [
{ text: '未完成', value: '0' },
{ text: '审批中', value: '1' },
{ text: '已完成', value: '2' },
],
customRender: ({ record }) => {
if (record.utrIsfinish == 1) {
return "审批中"
} else if (record.utrIsfinish == 2) {
return "已完成"
} else {
return "未完成"
}
},
},
];
export const EstimateAmountFormSchemas: FormSchema[] = [
{
//标题名称
label: '项目申报金额(元)',
//字段
field: 'totalMoney',
labelWidth: 'auto',
component: 'Input',
componentProps:{
precision:2,
},
colProps: { span: 6 },
dynamicDisabled:true,
defaultValue:2000
},
{
//标题名称
label: '联合审查估算金额(元)',
//字段
field: 'urtEstimatedAmount',
labelWidth: 'auto',
component: "InputNumber",
required: true,
componentProps: ({ formModel, formActionType }) => {
return {
//
style: { width: '100%' },
min:0,
precision:2,
max:formModel.totalMoney,
onChange: async (value, option) => {
let hejian = formModel.totalMoney-value
// formModel.manageContactor = undefined; // reset city value
const { updateSchema, setFieldsValue } = formActionType;
if (value >= 0) {
updateSchema({
field: 'hejian',
suffix: String(((hejian/formModel.totalMoney)*100).toFixed(2))+'%',
});
setFieldsValue({ hejian: hejian })
}
},
};
},
colProps: { span: 8 },
},
{
//标题名称
label: '核减金额(元)',
//字段
field: 'hejian',
component: 'Input',
dynamicDisabled:true,
componentProps:{
precision:2,
},
colProps: { span: 6 },
},
]
export const ApprovalMoneyFormSchemas: FormSchema[] = [
{
//标题名称
label: '立项总金额(元)',
//字段
field: 'approvalTotalMoney',
labelWidth: 'auto',
component: 'InputNumber',
componentProps:{
precision:2,
style: { width: '100%' },
},
colProps: { span: 8 },
dynamicDisabled:true,
defaultValue:2000
},
{
//标题名称
label: '中央资金(元)',
//字段
field: 'approvalCentralMoney',
labelWidth: 'auto',
componentProps:{
precision:2,
min:0,
style: { width: '100%' },
},
required: true,
component: 'InputNumber',
colProps: { span: 8},
},
{
//标题名称
label: '省级资金(元)',
//字段
field: 'approvalProvincialMoney',
labelWidth: 'auto',
required: true,
componentProps:{
precision:2,
min:0,
style: { width: '100%' },
},
component: 'InputNumber',
colProps: { span: 8},
},
{
//标题名称
label: '市级资金(元)',
//字段
field: 'approvalCityMoney',
labelWidth: 'auto',
required: true,
componentProps:{
precision:2,
min:0,
style: { width: '100%' },
},
component: 'InputNumber',
colProps: { span: 8 },
},
{
//标题名称
label: '区县级资金(元)',
//字段
field: 'approvalCountyMoney',
labelWidth: 'auto',
required: true,
componentProps:{
precision:2,
min:0,
style: { width: '100%' },
},
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'InputNumber',
colProps: { span: 8 },
},
{
//标题名称
label: '自筹资金(元)',
//字段
field: 'approvalSelfMoney',
labelWidth: 'auto',
required: true,
componentProps:{
precision:2,
min:0,
style: { width: '100%' },
},
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'InputNumber',
colProps: { span: 8 },
},
]
export const ContractMoneyFormSchemas: FormSchema[] = [
{
//标题名称
label: '合同总金额(元)',
//字段
field: 'contractTotalMoney',
labelWidth: 'auto',
component: 'InputNumber',
componentProps:{
precision:2,
min:0,
style: { width: '100%' },
},
colProps: { span: 8 },
required:true,
defaultValue:0
},
{
//标题名称
label: '中央资金(元)',
//字段
field: 'contractCentralMoney',
labelWidth: 'auto',
componentProps:{
precision:2,
min:0,
style: { width: '100%' },
},
required: true,
component: 'InputNumber',
colProps: { span: 8 },
},
{
//标题名称
label: '省级资金(元)',
//字段
field: 'contractProvincialMoney',
labelWidth: 'auto',
required: true,
componentProps:{
precision:2,
min:0,
style: { width: '100%' },
},
component: 'InputNumber',
colProps: { span: 8 },
},
{
//标题名称
label: '市级资金(元)',
//字段
field: 'contractCityMoney',
labelWidth: 'auto',
required: true,
componentProps:{
precision:2,
min:0,
style: { width: '100%' },
},
component: 'InputNumber',
colProps: { span: 8 },
},
{
//标题名称
label: '区县级资金(元)',
//字段
field: 'contractCountyMoney',
labelWidth: 'auto',
required: true,
componentProps:{
precision:2,
min:0,
style: { width: '100%' },
},
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'InputNumber',
colProps: { span: 8 },
},
{
//标题名称
label: '自筹资金(元)',
//字段
field: 'contractSelfMoney',
labelWidth: 'auto',
required: true,
componentProps:{
precision:2,
min:0,
style: { width: '100%' },
},
//组件 支持组件详见 components/Form/src/types/index.ts 中的 ComponentType
component: 'InputNumber',
colProps: { span: 8 },
},
]