123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463 |
- 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,SDFormItem,SDButton,SDForm,SDSubmitButton,EditType, SDAreaTtile, SDLayout, SDOperate, baseFun, } from "@sundata/ui-frame";
- import {getDataList,selectDetailData,exportExcelModel, SysListModel} from '@/services/rwa/dataquality/OffCreditCard';
- import { ProductProps } from "@/sundataImport";
- import { useModel } from '@umijs/max';
- type widowRush = {
- onCancel: () => void;
- onChangeVisible(visible: boolean, type: string): unknown;
- onChangeVisdible:(visible:boolean,type ?: 'none' | 'raload' )=>void;
- subjectNumber ?:any;
- search ?:any;
- term ?:any;
- }& ProductProps;
- // 信用卡未使用额度表
- const OffCreditCard : 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');
- const [list,setList] = useState<any>();
- // 页面数据
- var formDataList = new Array<SysListModel>;
- /**上传文件 */
- const [fileData, setFileData] = useState<File>();
- // 导入窗口显示
- const [importVisible, setImportVisible] = useState<boolean>(false);
- useEffect(() => {
- if(prop.search ==='0'){
- setList(false)
- }else(
- setList(true)
- )
- }, []);
-
-
- // 页面展示元素
- const columns: ProColumns<SysListModel>[] = [
- {
- title: '计算实例号',
- dataIndex: 'calcindex',
- search: false,
- hideInTable: true,
- width:150,
- ellipsis:true
- },
- {
- title: '起始数据日期',
- dataIndex: 'startDate',
- search: false,
- hideInTable: true,
- width:150,
- ellipsis:true
- },
- {
- title: '截止数据日期',
- dataIndex: 'endDate',
- search: false,
- hideInTable: true,
- width:150,
- ellipsis:true
- },
- {
- title: '年月',
- dataIndex: 'yearMonth',
- search: false,
- hideInTable: true,
- width:150,
- ellipsis:true
- },
- {
- title: '数据日期',
- dataIndex: 'dataDate',
- hideInTable: false,
- width:150,
- ellipsis:true,
- valueType:'date',
- order:-1
- },
- {
- title: '核心客户号',
- dataIndex: 'coreClientNo',
- hideInTable: false,
- width:150,
- ellipsis:true,
- order:-2
- },
- {
- title: '客户编号',
- dataIndex: 'clientNo',
- hideInTable: false,
- width:150,
- ellipsis:true,
- order:-3
-
- },
- {
- title: '客户名称',
- dataIndex: 'clientName',
- hideInTable: false,
- width:150,
- ellipsis:true,
- order:-4
- },
- {
- 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: 'charge',
- 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: 'chargeAccountNo',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '准备金科目号',
- dataIndex: 'reserveAccountNo',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '产品编号',
- dataIndex: 'productNo',
- hideInTable: false,
- search: false,
- width:150,
- ellipsis:true
- },
- {
- title: '产品名称',
- dataIndex: 'productName',
- hideInTable: false,
- width:150,
- ellipsis:true,
- order:-6
- },
- {
- title: '表内外标识代码',
- dataIndex: 'onbalshOffbalshFlag',
- search: false,
- width:150,
- hideInTable: false,
- },
- {
- title: '表内外标识',
- dataIndex: 'onbalshOffbalshFlag',
- search: false,
- hideInTable: false,
- valueType: 'treeSelect',
- width:150,
- request: () => fetchDict('ONOROFF'),
- fieldProps: {
- treeDefaultExpandAll: true,
- },
- },
- {
- title: '账簿类型代码',
- dataIndex: 'accountBookType',
- search: false,
- hideInTable: false,
- width:150,
- },
- {
- title: '账簿类型',
- dataIndex: 'accountBookType',
- search: false,
- width:150,
- hideInTable: false,
- valueType: 'treeSelect',
- request: () => fetchDict('ACCOUNT_TYPE'),
- fieldProps: {
- treeDefaultExpandAll: true,
- },
- },
- {
- title: '生效日',
- dataIndex: 'effectDate',
- valueType:'date',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '到期日',
- dataIndex: 'expiryDate',
- search: false,
- valueType:'date',
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '五级分类代码',
- dataIndex: 'fiveClass',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '五级分类',
- dataIndex: 'fiveClassDesc',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true,
- valueType: 'treeSelect',
- request: () => fetchDict('FIVECLASS'),
- fieldProps: {
- treeDefaultExpandAll: true,
- },
- },
- {
- 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: 'manageOrgnName',
- search: false,
- hideInTable: false,
- width:150,
- },
- {
- title: '经营机构编',
- dataIndex: 'manageOrgnNos',
- hideInTable: true,
- valueType: 'treeSelect',
- request: () => fetchDict('org'),
- fieldProps: {
- treeDefaultExpandAll: true,
- treeCheckable:true,
- },
- order:-5
- },
- {
- title: '符合标准未使用额度标签代码',
- dataIndex: 'accordStandardUnuseLimitLabel',
- search: false,
- hideInTable: false,
- width:200,
- ellipsis:true,
- },
- {
- title: '符合标准未使用额度标签',
- dataIndex: 'accordStandardUnuseLimitLabel',
- hideInTable: true,
- width:150,
- ellipsis:true,
- valueType: 'treeSelect',
- request: () => fetchDict('TORF'),
- fieldProps: {
- treeDefaultExpandAll: true,
- },
- order:-8
- },
- {
- title: '合格交易者标志代码',
- dataIndex: 'qualifiedTradersFlag',
- search: false,
- hideInTable: false,
- width:150,
- ellipsis:true
- },
- {
- title: '合格交易者标志',
- dataIndex: 'qualifiedTradersFlag',
- hideInTable: false,
- width:150,
- ellipsis:true,
- valueType: 'treeSelect',
- request: () => fetchDict('TORF'),
- fieldProps: {
- treeDefaultExpandAll: true,
- },
- order:-7
- },
- ];
-
- return (
- <SDPage>
- <SDTable
- title="查询表格"
- rowKey="customerName"
- request={async (formdata:SysListModel) =>{
- if(prop.search=='0'){
- setList(false)
- }else{
- setList(true)
- }
- const formDatas = await getDataList(formdata);
- // 解构数组(导出用)
- formDataList=[...formDatas];
- return {data: formDatas}
- } }
- columns={columns}
- toolBarRender={(_, { selectedRows }) => [
- <SDButton
- key="export"
- successMessage=''
- onClick={() => {
- baseFun.confirm('确认导出数据?',async() => { exportExcelModel(formDataList,"OffCreditCard")});;
- }}
- >
- 全部导出
- </SDButton>,
- ]}
- actionRef={actionRef}
- formRef={formRef}
- initLoad={false}
- setDetailVisible={() => {setDetailVisible(true)}}
- search={list}
- setEditType={setEditType}
- setCurrentRow={setCurrentRow}
- />
- </SDPage>
-
- );
- }
- export default OffCreditCard;
|