faGlBalanceSheet.tsx 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. import React, { useEffect, useRef, useState } from 'react';
  2. import { Button, Form, FormInstance, Input, Space, Tooltip } from 'antd';
  3. import { EditType, SDForm, SDFormDict, SDFormText, SDModal, SDModalForm, SDOperate, SDPage, SDSubmitButton, SDTable, baseFun, SDButton } from '@sundata/ui-frame';
  4. import { ActionType, ProColumns } from '@ant-design/pro-table';
  5. import { WomanOutlined } from '@ant-design/icons';
  6. import { deletedata } from '@/services/idataMng/impandauditp';
  7. import { FcLoanModel, getFcLoan } from '@/services/rwa/fcLoan';
  8. import { exportExcelModel, FaGlBalanceSheetModel, getFaGlBalanceSheet } from '@/services/rwa/faGlBalanceSheet';
  9. type aaa = {
  10. }//总账科目余额表
  11. const faGlBalanceSheetModel: React.FC<aaa>= (prop : aaa) => {
  12. const [editType, setEditType] = useState<EditType>('update');
  13. const formRef = useRef<FormInstance<any>>();
  14. /** 当前行对象,查看详情、修改时,作为详细信息表单的查询条件 */
  15. const [currentRow, setCurrentRow] = useState<FaGlBalanceSheetModel>();
  16. const [dataSource, setDataSource] = useState<any>() ;
  17. const [detailVisible, setDetailVisible] = useState<boolean>(false);
  18. const [visible,setVisible] = useState<boolean>(false);//弹窗是否显示
  19. const actionRef = useRef<ActionType>();
  20. const tableActionRef = useRef<ActionType>();
  21. var formDataList =new Array<FaGlBalanceSheetModel>;
  22. const columns: ProColumns<FcLoanModel>[] = [
  23. {
  24. title : '计算实例号',
  25. dataIndex : 'calcindex',
  26. search:false,
  27. hideInTable:true,
  28. width : 150
  29. },
  30. {
  31. title : '截止数据日期',
  32. dataIndex : 'edate',
  33. search:false,
  34. hideInTable:true,
  35. width : 150
  36. },
  37. {
  38. title : '起始数据日期',
  39. dataIndex : 'sdate',
  40. search:false,
  41. hideInTable:true,
  42. width : 150
  43. },
  44. {
  45. title : '年月',
  46. dataIndex : 'term',
  47. search:false,
  48. hideInTable:true,
  49. width : 150
  50. },
  51. {
  52. title : '数据日期',
  53. dataIndex : 'dataDate',
  54. valueType:'date',
  55. width : 150
  56. },
  57. {
  58. title : '报表日期',
  59. dataIndex : 'reportDate',
  60. search:false,
  61. width : 150
  62. },
  63. {
  64. title : '账务机构编码',
  65. dataIndex : 'finBranchNo',
  66. search:false,
  67. width : 150
  68. },
  69. {
  70. title : '账务机构名称',
  71. dataIndex : 'finBranchName',
  72. search:false,
  73. width : 150
  74. },
  75. {
  76. title : '科目',
  77. dataIndex : 'glCode',
  78. width : 150
  79. },
  80. {
  81. title : '科目描述',
  82. dataIndex : 'subjectDesc',
  83. width : 150
  84. },
  85. {
  86. title : '当日借方余额',
  87. dataIndex : 'deBalance',
  88. search:false,
  89. width : 150
  90. },
  91. {
  92. title : '当日贷方余额',
  93. dataIndex : 'crBalance',
  94. search:false,
  95. width : 150
  96. },
  97. ]
  98. return(
  99. <SDPage>
  100. <SDTable
  101. title="查询表格"
  102. rowKey="custName"
  103. request={async(formData : FaGlBalanceSheetModel)=>{
  104. const sd = await getFaGlBalanceSheet(formData);
  105. formDataList =[...sd];
  106. return {data :sd };
  107. }}
  108. columns={columns}
  109. // singleSelect={false}
  110. // operations={["create"]}
  111. //displayColumn="custName"
  112. actionRef={actionRef}
  113. formRef={formRef}
  114. //handleRemove={deletedata}
  115. // setCurrentRow={setCurrentRow}
  116. setEditType={setEditType}
  117. setDetailVisible={setVisible}
  118. toolBarRender={(_, { selectedRows }) => [
  119. <SDButton
  120. key="export"
  121. // successMessage='导出成功'
  122. onClick={async () => {
  123. exportExcelModel("faGlBalanceSheet",formDataList);
  124. //baseFun.info('处理完成');
  125. }}
  126. >
  127. 全部导出
  128. </SDButton>,
  129. ]}
  130. />
  131. </SDPage>
  132. )
  133. };export default faGlBalanceSheetModel;