123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464 |
- import React, { useEffect, useRef, useState } from "react";
- import type { ProColumns, ActionType, ProFormInstance } from '@ant-design/pro-components';
- import type {FormInstance} from 'antd'
- import {Upload} from 'antd'
- import { SDPage,SDFormText,SDModalForm,SDTable,SDButton,EditType, SDOperate, baseFun, } from "@sundata/ui-frame";
- import {getDataList,selectDetailData,exportExcelModel, SysListModel} from '@/services/rwa/dataquality/DiscountTable';
- import { ProductProps } from "@/sundataImport";
- import { useModel } from '@umijs/max';
- type widowRush = {
- }& ProductProps;
- // 票据表
- const DiscountTable : React.FC<widowRush> = (prop:widowRush) => {
- /** 编辑方式,查看、修改、新增按钮时设置,详细信息表单中使用 */
- const [editType, setEditType] = useState<EditType>(prop.editType || 'display');
- /** 是否显示详细信息窗口 */
- const [detailVisible, setDetailVisible] = useState<boolean>(false);
- const [currentRow, setCurrentRow] = useState<SysListModel>();
- /** 表格引用对象,刷新表格使用 */
- const actionRef = useRef<ActionType>();
- const formRef = useRef<FormInstance<any>>();
- const { fetchDict } = useModel('dict');
- // 页面数据
- var formDataList = new Array<SysListModel>;
- /**上传文件 */
- const [fileData, setFileData] = useState<File>();
- // 导入窗口显示
- const [importVisible, setImportVisible] = useState<boolean>(false);
- useEffect(() => {
- }, []);
-
- // 页面展示元素
- const columns: ProColumns<SysListModel>[] = [
- {
- title: '计算实例号',
- dataIndex: 'calcIndex',
- search: false,
- hideInTable: true,
- width:150,
- ellipsis:true
- },
- {
- title: '起始数据日期',
- dataIndex: 'sDate',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '截止数据日期',
- dataIndex: 'eDate',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '年月',
- dataIndex: 'yearMonth',
- search: false,
- hideInTable: true,
- width:150,
- ellipsis:true
- },
- {
- title: '数据日期',
- dataIndex: 'dataDate',
- valueType: 'date',
- hideInTable: false,
- width:150,
- ellipsis:true,
- order:-1
- },
- {
- title: '债项编号',
- dataIndex: 'debtitemNo',
- hideInTable: false,
- width:150,
- ellipsis:true,
- order:-2
- },
- {
- title: '合同编号',
- dataIndex: 'contractNo',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '币种代码',
- dataIndex: 'ccy',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '币种',
- dataIndex: 'ccyDesc',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '资产余额',
- dataIndex: 'assetBal',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '应收利息',
- dataIndex: 'receivableInt',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '应计利息',
- dataIndex: 'accrInt',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '利息调整',
- dataIndex: 'intAdj',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '公允价值变动',
- dataIndex: 'fairValueChange',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '计提准备金',
- dataIndex: 'provisionReserve',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '本金科目号',
- dataIndex: 'prinAccountNo',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '应收利息科目号',
- dataIndex: 'receivableIntAccountNo',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '应计利息科目号',
- dataIndex: 'accrIntAccountNo',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '利息调整科目号',
- dataIndex: 'intAdjAccountNo',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '公允价值变动科目号',
- dataIndex: 'fairValueChangeAccountNo',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '准备金科目号',
- dataIndex: 'reserveAccountNo',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '生效日',
- dataIndex: 'effectDate',
- valueType:'date',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '到期日',
- dataIndex: 'expiryDate',
- valueType:'date',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '贴现类型代码',
- dataIndex: 'discountingType',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '贴现类型',
- dataIndex: 'discountingTypes',
- valueType:'treeSelect',
- request:()=>fetchDict('discountingType'),
- fieldProps: {
- treeDefaultExpandAll: true,
- treeCheckable:true,
- },
- hideInTable: true,
- width:150,
- ellipsis:true,
- order:-6
- },
- {
- title: '贴现类型',
- dataIndex: 'discountingTypeDesc',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true,
- },
- {
- title: '票据类型代码',
- dataIndex: 'billType',
- search: false,
- hideInTable: false,
- width:150,
- },
- {
- title: '票据类型',
- dataIndex: 'billType',
- search: false,
- hideInTable: false,
- valueType: 'treeSelect',
- request: () => fetchDict('BILL_TYPE'),
- fieldProps: {
- treeDefaultExpandAll: true,
- },
- width:150,
- },
- {
- title: '票号',
- dataIndex: 'billNo',
- search: false,
- hideInTable: false,
- width:150,
- },
- {
- title: '产品编号',
- dataIndex: 'productNo',
- search: false,
- hideInTable: false,
- width:150,
- },
- {
- title: '产品名称',
- dataIndex: 'productName',
- hideInTable: false,
- width:150,
- order:-8
- },
- {
- title: '表内外标识代码',
- dataIndex: 'onbalshOffbalshFlag',
- search: false,
- hideInTable: false,
- width:150,
- },
- {
- title: '表内外标识',
- dataIndex: 'onbalshOffbalshFlag',
- search: false,
- hideInTable: false,
- valueType: 'treeSelect',
- request: () => fetchDict('ONOROFF'),
- fieldProps: {
- treeDefaultExpandAll: true,
- },
- width:150,
- },
- {
- title: '账簿类型代码',
- dataIndex: 'accountBookType',
- search: false,
- hideInTable: false,
- width:150,
- },
- {
- title: '账簿类型',
- dataIndex: 'accountBookType',
- search: false,
- hideInTable: false,
- valueType: 'treeSelect',
- request: () => fetchDict('ACCOUNT_TYPE'),
- fieldProps: {
- treeDefaultExpandAll: true,
- },
- width:150,
- },
- {
- title: '是否我行承兑代码',
- dataIndex: 'ifSelfbankAcceptance',
- search: false,
- hideInTable: false,
- width:150,
- },
- {
- title: '是否我行承兑',
- dataIndex: 'ifSelfbankAcceptance',
- search: false,
- hideInTable: false,
- valueType: 'treeSelect',
- request: () => fetchDict(''),
- fieldProps: {
- treeDefaultExpandAll: true,
- },
- width:150,
- },
- {
- title: '承兑人客户编号',
- dataIndex: 'acceptorClientNo',
- search: false,
- hideInTable: false,
- width:150,
- },
- {
- title: '承兑人客户名',
- dataIndex: 'acceptorClientName',
- search: false,
- hideInTable: false,
- width:150,
- },
- {
- title: '账务机构编号',
- dataIndex: 'accountOrgnNo',
- search: false,
- hideInTable: false,
- width:150,
- },
- {
- title: '账务机构名称',
- dataIndex: 'accountOrgnName',
- search: false,
- hideInTable: false,
- width:150,
- },
- {
- title: '经营机构编号',
- dataIndex: 'manageOrgnNo',
- search: false,
- hideInTable: false,
- width:150,
- },
- {
- title: '经营机构',
- dataIndex: 'manageOrgnNos',
- valueType:'treeSelect',
- request:()=>fetchDict('org'),
- fieldProps: {
- treeDefaultExpandAll: true,
- treeCheckable:true,
- popupMatchSelectWidth:300
- },
- order:-7,
- hideInTable: true,
- },
- {
- title: '经营机构编名称',
- dataIndex: 'manageOrgnName',
- search: false,
- hideInTable: false,
- width:150,
- },
- {
- title: '核心客户号',
- dataIndex: 'coreClientNo',
- hideInTable: false,
- width:150,
- order:-3
- },
- {
- title: '客户编号',
- dataIndex: 'clientNo',
- hideInTable: false,
- width:150,
- order:-4
- },
- {
- title: '客户名称',
- dataIndex: 'clientName',
- hideInTable: false,
- order:-5,
- width:150,
- },
- ];
-
- return (
- <SDPage>
- <SDTable
- title="查询表格"
- rowKey="customerName"
- request={async (formdata:SysListModel) =>{
- const data = await getDataList(formdata)
- return {data: data}
- } }
- columns={columns}
- toolBarRender={(_, { selectedRows }) => [
- <SDButton
- key="export"
- successMessage=''
- onClick={() => {
- baseFun.confirm('确认导出数据?',async() => { exportExcelModel(formDataList,"DiscountTable")});
- }}
- >
- 全部导出
- </SDButton>,
- ]}
- actionRef={actionRef}
- formRef={formRef}
- setDetailVisible={() => {setDetailVisible(true)}}
- setEditType={setEditType}
- setCurrentRow={setCurrentRow}
- />
- </SDPage>
-
- );
- }
- export default DiscountTable;
|