|
@@ -0,0 +1,588 @@
|
|
|
+import React, { useEffect, useRef, useState } from "react";
|
|
|
+import { type ProColumns, type ActionType, type ProFormInstance, ProTable, EditableProTable } from '@ant-design/pro-components';
|
|
|
+import type {FormInstance} from 'antd'
|
|
|
+import {Table, Upload} from 'antd'
|
|
|
+import { SDPage,SDFormText,SDModalForm,SDTable,SDFormItem,SDButton,SDSubmitButton,EditType, SDAreaTtile, SDOperate, baseFun,SDModal, validateFun, SDEditableTable, SDFormDict, SDLayout, SDFormAttach, } from "@sundata/ui-frame";
|
|
|
+import type { ReportDefinitionModel,ReportCalculationModel } from "@/services/rwa/product/report_form_config_reportcreater/reportfillingconfig";
|
|
|
+import {getDataList,createReportData,updateReportData,deleteReportData,selectReportData,updateCalcReportData,
|
|
|
+ analyseReportFile,createCalcReportData,selectCalcReportData} from "@/services/rwa/product/report_form_config_reportcreater/reportfillingconfig";
|
|
|
+import { PlusSquareTwoTone, WomanOutlined } from "@ant-design/icons";
|
|
|
+import { ProductProps } from "@/sundataImport";
|
|
|
+import { useModel } from '@umijs/max';
|
|
|
+import { toNumber } from "lodash";
|
|
|
+
|
|
|
+type widowRush = {
|
|
|
+ onCancel: () => void;
|
|
|
+ onChangeVisible(visible: boolean, type: string): unknown;
|
|
|
+ onChangeVisdible:(visible:boolean,type ?: 'none' | 'raload' )=>void;
|
|
|
+}& ProductProps;
|
|
|
+const reportfillingconfig : React.FC<widowRush> = (prop:widowRush) => {
|
|
|
+
|
|
|
+ /** 编辑方式,查看、修改、新增按钮时设置,详细信息表单中使用 */
|
|
|
+ const [editType, setEditType] = useState<EditType>(prop.editType || 'display');
|
|
|
+ /** 是否显示详细信息窗口 */
|
|
|
+ const [detailVisible, setDetailVisible] = useState<boolean>(false);
|
|
|
+
|
|
|
+ const [currentRow, setCurrentRow] = useState<ReportDefinitionModel>();
|
|
|
+ /** 表格引用对象,刷新表格使用 */
|
|
|
+ const actionRef = useRef<ActionType>();
|
|
|
+ const fillInActionRef = useRef<ActionType>();
|
|
|
+ const calculateActionRef = useRef<ActionType>();
|
|
|
+ const formRef = useRef<FormInstance<any>>();
|
|
|
+ const templateRef = useRef<FormInstance<any>>();
|
|
|
+ const { fetchDict } = useModel('dict');
|
|
|
+ const [fillInFormData,setFillInFormData] = useState<ReportCalculationModel[]>([]);
|
|
|
+ const [calculateFormData,setCalculateFormData] = useState<ReportCalculationModel[]>([]);
|
|
|
+
|
|
|
+ const [oldRowKeys, setOldRowKeys] = useState<React.Key[]>();
|
|
|
+
|
|
|
+ const [fillInFormDataBk,setFillInFormDataBk] = useState<ReportCalculationModel[]>([]);
|
|
|
+ const [calculateFormDataBk,setCalculateFormDataBk] = useState<ReportCalculationModel[]>([]);
|
|
|
+
|
|
|
+ const [selectRowData,setSelectRowData] = useState<any>();
|
|
|
+
|
|
|
+ /** 附件上传组件主键 */
|
|
|
+ const [busiPk, setBusiPk] = useState<string>('');
|
|
|
+
|
|
|
+ /** 需要被覆盖数据的序号 */
|
|
|
+ const [coverId, setCoverId] = useState<string>('');
|
|
|
+
|
|
|
+ /** 序号值 */
|
|
|
+ var reptId = 0;
|
|
|
+
|
|
|
+ // 页面数据
|
|
|
+ var formDataList = new Array<ReportDefinitionModel>;
|
|
|
+ /**上传文件 */
|
|
|
+ const [fileData, setFileData] = useState<File>();
|
|
|
+ // 导入窗口显示
|
|
|
+ const [importVisible, setImportVisible] = useState<boolean>(false);
|
|
|
+
|
|
|
+ useEffect(() => {
|
|
|
+ }, []);
|
|
|
+
|
|
|
+ // 修改查询查询
|
|
|
+ const selectData = async (formdata : ReportDefinitionModel) => {
|
|
|
+ const data = await selectReportData(formdata);
|
|
|
+ formRef.current?.setFieldsValue(data);
|
|
|
+ if (formdata && formdata.reportNo) {
|
|
|
+ const listData = await selectCalcReportData(formdata.reportNo);
|
|
|
+ if (listData) {
|
|
|
+ setFillInFormData(listData.FillIn);
|
|
|
+ setFillInFormDataBk(listData.FillIn);
|
|
|
+ setCalculateFormData(listData.Calc);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ // 删除
|
|
|
+ const delRows =async(record:any)=>{
|
|
|
+ baseFun.confirm('确认删除?',async() =>{
|
|
|
+ await deleteReportData(record);
|
|
|
+ baseFun.info("删除成功");
|
|
|
+ closeAndRefresh();
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ //关闭窗口刷新父页面
|
|
|
+ const closeAndRefresh = ()=>{
|
|
|
+ actionRef.current?.reloadAndRest?.();
|
|
|
+ }
|
|
|
+
|
|
|
+ // 插入或者更新数据
|
|
|
+ const handleSave = async(data: ReportDefinitionModel) => {
|
|
|
+
|
|
|
+ if (editType == 'update' ) {
|
|
|
+ let keys ='';
|
|
|
+ await updateReportData(data);
|
|
|
+ fillInFormDataBk.forEach((items)=>{
|
|
|
+ keys = keys+items.id+","
|
|
|
+ });
|
|
|
+ await updateCalcReportData(fillInFormData,keys);
|
|
|
+ closeAndRefresh();
|
|
|
+ } else if (editType == 'create' ) {
|
|
|
+ fillInFormData.push(...calculateFormData);
|
|
|
+ await createReportData(data);
|
|
|
+ await createCalcReportData(fillInFormData);
|
|
|
+ closeAndRefresh();
|
|
|
+ }
|
|
|
+ setDetailVisible(false);
|
|
|
+ }
|
|
|
+
|
|
|
+// 显示解析文件
|
|
|
+const analyseFile = async (data: ReportDefinitionModel) => {
|
|
|
+ if (data.reportNo) {
|
|
|
+ setBusiPk(data.reportNo);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+ // 报表定义页面展示元素
|
|
|
+ const reportDefineColumns: ProColumns<ReportDefinitionModel>[] = [
|
|
|
+ {
|
|
|
+ title: '计算实例号',
|
|
|
+ dataIndex: 'calcindex',
|
|
|
+ search: false,
|
|
|
+ hideInTable: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '起始数据日期',
|
|
|
+ dataIndex: 'startDate',
|
|
|
+ search: false,
|
|
|
+ hideInTable: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '截止数据日期',
|
|
|
+ dataIndex: 'endDate',
|
|
|
+ search: false,
|
|
|
+ hideInTable: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '报表编号',
|
|
|
+ dataIndex: 'reportNo',
|
|
|
+ hideInTable: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '报表名称',
|
|
|
+ dataIndex: 'reportName',
|
|
|
+ hideInTable: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '报表类型',
|
|
|
+ dataIndex: 'reportType',
|
|
|
+ hideInTable: false,
|
|
|
+ valueType: 'treeSelect',
|
|
|
+ request: () => fetchDict('customerTypeCd'),
|
|
|
+ fieldProps: {
|
|
|
+ treeDefaultExpandAll: true,
|
|
|
+ treeCheckable:true,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '所属机构',
|
|
|
+ dataIndex: 'reportOrgcode',
|
|
|
+ hideInTable: false,
|
|
|
+ valueType: 'treeSelect',
|
|
|
+ request: () => fetchDict('customerTypeCd'),
|
|
|
+ fieldProps: {
|
|
|
+ treeDefaultExpandAll: true,
|
|
|
+ treeCheckable:true,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '报表版本号',
|
|
|
+ dataIndex: 'reportVersion',
|
|
|
+ search: false,
|
|
|
+ hideInTable: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'operate',
|
|
|
+ valueType: 'option',
|
|
|
+ render: (_, record) => [
|
|
|
+ <SDOperate
|
|
|
+ key="roleCfg"
|
|
|
+ icon={<WomanOutlined />}
|
|
|
+ successMessage=""
|
|
|
+ onClick={
|
|
|
+ ()=>{
|
|
|
+ selectData(record);
|
|
|
+ setDetailVisible(true);
|
|
|
+ setEditType('update')
|
|
|
+ } }
|
|
|
+ >
|
|
|
+ 修改
|
|
|
+ </SDOperate>,
|
|
|
+ <SDOperate
|
|
|
+ key="roleCfg"
|
|
|
+ icon={<WomanOutlined />}
|
|
|
+ successMessage=""
|
|
|
+ onClick={()=>{delRows(record) } }
|
|
|
+ >
|
|
|
+ 删除
|
|
|
+ </SDOperate>,
|
|
|
+
|
|
|
+ <SDOperate
|
|
|
+ key="roleCfg"
|
|
|
+ icon={<WomanOutlined />}
|
|
|
+ successMessage=""
|
|
|
+ onClick={()=>{
|
|
|
+ selectData(record);
|
|
|
+ setEditType('display');
|
|
|
+ setDetailVisible(true); } }
|
|
|
+ >
|
|
|
+ 查看
|
|
|
+ </SDOperate>,
|
|
|
+
|
|
|
+ ],
|
|
|
+ },
|
|
|
+
|
|
|
+ ];
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ // 需填报的单元详情页面展示元素
|
|
|
+ const reportCalculateColumns: ProColumns<ReportCalculationModel>[] = [
|
|
|
+ {
|
|
|
+ title: '计算实例号',
|
|
|
+ dataIndex: 'calcindex',
|
|
|
+ search: false,
|
|
|
+ hideInTable: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '起始数据日期',
|
|
|
+ dataIndex: 'startDate',
|
|
|
+ search: false,
|
|
|
+ hideInTable: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '截止数据日期',
|
|
|
+ dataIndex: 'endDate',
|
|
|
+ search: false,
|
|
|
+ hideInTable: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '序号',
|
|
|
+ dataIndex: 'id',
|
|
|
+ search: false,
|
|
|
+ hideInTable: false,
|
|
|
+ editable:false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '所在sheet页位置',
|
|
|
+ dataIndex: 'reportUnitSheet',
|
|
|
+ hideInTable: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '所在行位置',
|
|
|
+ dataIndex: 'reportUnitRow',
|
|
|
+ search: false,
|
|
|
+ hideInTable: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '所在列位置',
|
|
|
+ dataIndex: 'reportUnitCell',
|
|
|
+ search: false,
|
|
|
+ hideInTable: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '单元格样式类型',
|
|
|
+ dataIndex: 'unitStyleType',
|
|
|
+ search: false,
|
|
|
+ hideInTable: false,
|
|
|
+ valueType: 'treeSelect',
|
|
|
+ request: () => fetchDict('customerTypeCd'),
|
|
|
+ fieldProps: {
|
|
|
+ treeDefaultExpandAll: true,
|
|
|
+ treeCheckable:true,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '单元格数据类型',
|
|
|
+ dataIndex: 'unitDataType',
|
|
|
+ search: false,
|
|
|
+ hideInTable: false,
|
|
|
+ valueType: 'treeSelect',
|
|
|
+ request: () => fetchDict('customerTypeCd'),
|
|
|
+ fieldProps: {
|
|
|
+ treeDefaultExpandAll: true,
|
|
|
+ treeCheckable:true,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '计算过程类型',
|
|
|
+ dataIndex: 'unitCalcType',
|
|
|
+ search: false,
|
|
|
+ hideInTable: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '计算对象名称',
|
|
|
+ dataIndex: 'unitCalcObjectName',
|
|
|
+ search: false,
|
|
|
+ hideInTable: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '计算对象配置',
|
|
|
+ dataIndex: 'unitCalcInfo',
|
|
|
+ search: false,
|
|
|
+ hideInTable: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '是否包含下钻功能',
|
|
|
+ dataIndex: 'isHasurl',
|
|
|
+ search: false,
|
|
|
+ hideInTable: false,
|
|
|
+ valueType: 'treeSelect',
|
|
|
+ request: () => fetchDict('YESORNO'),
|
|
|
+ fieldProps: {
|
|
|
+ treeDefaultExpandAll: true,
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'operate',
|
|
|
+ valueType: 'option',
|
|
|
+ render: (_, record) => [
|
|
|
+ <SDOperate
|
|
|
+ key="roleCfg"
|
|
|
+ icon={<WomanOutlined />}
|
|
|
+ successMessage=""
|
|
|
+ onClick={
|
|
|
+ ()=>{
|
|
|
+ fillInActionRef.current?.startEditable(record.id);
|
|
|
+ } }
|
|
|
+ >
|
|
|
+ 编辑
|
|
|
+ </SDOperate>,
|
|
|
+ ],
|
|
|
+ },
|
|
|
+
|
|
|
+ ];
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ // 需计算的单元详情页面展示元素
|
|
|
+ const reportCalculateOtherColumns: ProColumns<ReportCalculationModel>[] = [
|
|
|
+ {
|
|
|
+ title: '序号',
|
|
|
+ dataIndex: 'id',
|
|
|
+ search: false,
|
|
|
+ hideInTable: false,
|
|
|
+ editable:false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '所在sheet页位置',
|
|
|
+ dataIndex: 'reportUnitSheet',
|
|
|
+ hideInTable: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '所在行位置',
|
|
|
+ dataIndex: 'reportUnitRow',
|
|
|
+ search: false,
|
|
|
+ hideInTable: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '所在列位置',
|
|
|
+ dataIndex: 'reportUnitCell',
|
|
|
+ search: false,
|
|
|
+ hideInTable: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '单元格样式类型',
|
|
|
+ dataIndex: 'unitStyleType',
|
|
|
+ search: false,
|
|
|
+ hideInTable: false,
|
|
|
+ valueType: 'treeSelect',
|
|
|
+ request: () => fetchDict('YESORNO'),
|
|
|
+ fieldProps: {
|
|
|
+ treeDefaultExpandAll: true,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'Excel公式',
|
|
|
+ dataIndex: 'excelFormula',
|
|
|
+ search: false,
|
|
|
+ hideInTable: false,
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'operate',
|
|
|
+ valueType: 'option',
|
|
|
+ render: (_, record) => [
|
|
|
+ <SDOperate
|
|
|
+ key="roleCfg"
|
|
|
+ icon={<WomanOutlined />}
|
|
|
+ successMessage=""
|
|
|
+ onClick={
|
|
|
+ ()=>{
|
|
|
+ calculateActionRef.current?.startEditable(record.id);
|
|
|
+ } }
|
|
|
+ >
|
|
|
+ 编辑
|
|
|
+ </SDOperate>,
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ];
|
|
|
+
|
|
|
+
|
|
|
+ function setIntoRestId() {
|
|
|
+
|
|
|
+
|
|
|
+ let fillId ='0';
|
|
|
+ let calcId ='0';
|
|
|
+
|
|
|
+ if (fillInFormData.length>=1) {
|
|
|
+ fillId = fillInFormData[fillInFormData.length-1].id;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (calculateFormData.length >=1) {
|
|
|
+ calcId = calculateFormData[calculateFormData.length-1].id;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (toNumber(fillId) > toNumber(calcId)) {
|
|
|
+ reptId=toNumber(fillId);
|
|
|
+ } else {
|
|
|
+ reptId=toNumber(calcId);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ const handanalyseReportFile = async (record:any,) => {
|
|
|
+ const data = await analyseReportFile(record,"reportuploadconfig");
|
|
|
+ setFillInFormData(data.FillIn);
|
|
|
+ setCalculateFormData(data.Calc);
|
|
|
+ setFillInFormDataBk(data.FillIn);
|
|
|
+ setCalculateFormDataBk(data.Calc);
|
|
|
+ setIntoRestId();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ return (
|
|
|
+ <SDPage>
|
|
|
+ <SDTable
|
|
|
+ title="查询表格"
|
|
|
+ rowKey="customerName"
|
|
|
+ request={async (formdata:ReportDefinitionModel) =>{
|
|
|
+ const formDatas = await getDataList(formdata);
|
|
|
+ // 解构数组(导出用)
|
|
|
+ formDataList=[...formDatas];
|
|
|
+ return {data: formDatas}
|
|
|
+ } }
|
|
|
+ columns={reportDefineColumns}
|
|
|
+ toolBarRender={(_, { selectedRows }) => [
|
|
|
+ <SDButton
|
|
|
+ key="create"
|
|
|
+ successMessage=''
|
|
|
+ onClick={() => {
|
|
|
+ setEditType('create');
|
|
|
+ setDetailVisible(true);
|
|
|
+ setFillInFormData([]);
|
|
|
+ setCalculateFormData([]);
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 新增
|
|
|
+ </SDButton>,
|
|
|
+ ]}
|
|
|
+ actionRef={actionRef}
|
|
|
+ formRef={formRef}
|
|
|
+ setDetailVisible={() => {setDetailVisible(true)}}
|
|
|
+ setEditType={setEditType}
|
|
|
+ setCurrentRow={setCurrentRow}
|
|
|
+ />
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ {detailVisible && (
|
|
|
+ <SDModalForm
|
|
|
+ title={'详细信息'}
|
|
|
+ editType={editType}
|
|
|
+ params={currentRow}
|
|
|
+ visible={detailVisible}
|
|
|
+ onVisibleChange={() => {setDetailVisible(false)}}
|
|
|
+ footer={[
|
|
|
+ <SDSubmitButton editType={editType} formRef={formRef} doSubmit={handleSave} >保存</SDSubmitButton>,
|
|
|
+ <SDButton
|
|
|
+ key="closeUpdate"
|
|
|
+ successMessage=''
|
|
|
+ onClick={() => {
|
|
|
+ setDetailVisible(false);
|
|
|
+ }}>关闭</SDButton>
|
|
|
+ ]}
|
|
|
+ tableRef={actionRef}
|
|
|
+ formRef={formRef}
|
|
|
+ onValuesChange={(changeValues)=>{
|
|
|
+ if (changeValues.reportNo == '') {
|
|
|
+ setBusiPk('');
|
|
|
+ setFillInFormData([]);
|
|
|
+ setCalculateFormData([]);
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ initialValues={
|
|
|
+ {
|
|
|
+ reportNo:busiPk
|
|
|
+ }
|
|
|
+ }
|
|
|
+ >
|
|
|
+ <SDAreaTtile title='报表信息'/>
|
|
|
+ <SDFormText name="reportNo" readonlyCond="update" required={true} label="报表编号"/>
|
|
|
+ <SDFormText name="reportName" label="报表名称"/>
|
|
|
+ <SDFormDict dictKey='' name="reportType" label="报表类型" />
|
|
|
+ <SDFormDict dictKey='' name="reportOrgcode" label="所属机构"/>
|
|
|
+ {busiPk && editType !== 'update' && (<SDFormAttach name={"reportFile"} label="模板文件" funcType={"reportuploadconfig"} filetype="" maxFileNum={1} busiPkId={busiPk}/>)}
|
|
|
+ {editType == 'update' && (<SDFormText name="reportFile" label="模板文件"/>)}
|
|
|
+ <SDFormText name="reportVersion" label="报表版本号"/>
|
|
|
+ <SDLayout footer={
|
|
|
+ [ !busiPk && (<SDSubmitButton editType={editType} formRef={formRef} doSubmit={analyseFile} >显示模板文件</SDSubmitButton>),
|
|
|
+ busiPk && (<SDSubmitButton editType={editType} formRef={formRef} doSubmit={
|
|
|
+ handanalyseReportFile
|
|
|
+ } >解析模板文件</SDSubmitButton>)
|
|
|
+ ]
|
|
|
+ }/>
|
|
|
+ <SDAreaTtile title='需填报的单元详情'/>
|
|
|
+ <EditableProTable
|
|
|
+ rowKey="id"
|
|
|
+ columns={reportCalculateColumns}
|
|
|
+ recordCreatorProps={false}
|
|
|
+ actionRef={fillInActionRef}
|
|
|
+ value={fillInFormData}
|
|
|
+ rowSelection={{
|
|
|
+ type:'radio',
|
|
|
+ selectedRowKeys:oldRowKeys,
|
|
|
+ onSelect:(selectedRowKeys, selectedRows) => {
|
|
|
+ setSelectRowData(selectedRowKeys);
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ toolBarRender={(_, { selectedRowKeys }) => editType == 'create' || editType == 'update' ? [
|
|
|
+ <SDButton
|
|
|
+ key="export"
|
|
|
+ successMessage=''
|
|
|
+ onClick={() => {
|
|
|
+ setIntoRestId();
|
|
|
+ fillInActionRef.current?.addEditRecord?.({
|
|
|
+ id: reptId+1,
|
|
|
+ title: '新的一行',
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 新增
|
|
|
+ </SDButton>,
|
|
|
+ <SDButton
|
|
|
+ key="import"
|
|
|
+ successMessage=''
|
|
|
+ onClick={() => {
|
|
|
+ if (selectRowData.id) {
|
|
|
+ setFillInFormData(...[fillInFormData.filter((item)=>{return item.id !== selectRowData.id})]);
|
|
|
+ fillInActionRef.current?.reload();
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 删除
|
|
|
+ </SDButton>,
|
|
|
+ ]:[]}
|
|
|
+ onChange={ (value: readonly ReportCalculationModel[]) => {
|
|
|
+ setFillInFormData([...value]);
|
|
|
+ } }
|
|
|
+ />
|
|
|
+
|
|
|
+ <SDAreaTtile title='需计算的单元详情'/>
|
|
|
+ <EditableProTable
|
|
|
+ rowKey="id"
|
|
|
+ columns={reportCalculateOtherColumns}
|
|
|
+ recordCreatorProps={false}
|
|
|
+ actionRef={calculateActionRef}
|
|
|
+ value={calculateFormData}
|
|
|
+ />
|
|
|
+ </SDModalForm>
|
|
|
+ )}
|
|
|
+
|
|
|
+
|
|
|
+ </SDPage>
|
|
|
+
|
|
|
+ );
|
|
|
+}
|
|
|
+export default reportfillingconfig;
|