diff --git a/packages/app-operation/src/components/BasicData/ProductionAdvanceList.tsx b/packages/app-operation/src/components/BasicData/ProductionAdvanceList.tsx new file mode 100644 index 0000000..e6bc02a --- /dev/null +++ b/packages/app-operation/src/components/BasicData/ProductionAdvanceList.tsx @@ -0,0 +1,193 @@ +import { BizContainer, BizValueType, ModeType } from '@/components'; +import { business } from '@/services'; +import { useIntl } from '@@/exports'; +import { + ProColumns, + ProFormMoney, + ProFormSwitch, + ProFormText, +} from '@ant-design/pro-components'; +import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions'; +import React from 'react'; + +interface IProductionAdvanceListProps { + ghost?: boolean; + itemId?: BusinessAPI.CostItemVO['itemId']; + search?: boolean; + onValueChange?: () => void; + mode?: ModeType; + trigger?: () => React.ReactNode; +} +export default function ProductionAdvanceList(props: IProductionAdvanceListProps) { + const { + ghost = false, + itemId, + search = true, + mode = 'drag', + trigger, + onValueChange, + } = props; + const intl = useIntl(); + const intlPrefix = 'productionAdvance'; + + const columns: ProColumns[] = [ + { + title: intl.formatMessage({ id: intlPrefix + '.column.name' }), + dataIndex: 'name', + key: 'name', + renderText: (text: string) => {text}, + }, + { + title: intl.formatMessage({ id: intlPrefix + '.column.unit' }), + dataIndex: 'unit', + key: 'unit', + search: false, + }, + { + title: intl.formatMessage({ id: intlPrefix + '.column.price' }), + dataIndex: 'price', + key: 'price', + valueType: 'money', + search: false, + }, + { + title: intl.formatMessage({ id: intlPrefix + '.column.requireQuantityAndPrice' }), + dataIndex: 'requireQuantityAndPrice', + key: 'requireQuantityAndPrice', + renderText: (text: boolean) => ( + {text ? '是' : '否'} + ), + search: false, + }, + ]; + + const formContext = [ +