Browse Source

配置导出,多选,新增汇率表和科目表的查询

zhang_qk 7 months ago
parent
commit
635e09f15c
21 changed files with 1684 additions and 815 deletions
  1. 2 0
      Procedure/frontend/projectb/config/config.ts
  2. 143 0
      Procedure/frontend/projectb/src/pages/rdpMng/Template/Coding/components/faGlBalanceSheet.tsx
  3. 152 105
      Procedure/frontend/projectb/src/pages/rdpMng/Template/Coding/components/fcCommitment.tsx
  4. 246 146
      Procedure/frontend/projectb/src/pages/rdpMng/Template/Coding/components/fcLoan.tsx
  5. 188 151
      Procedure/frontend/projectb/src/pages/rdpMng/Template/Coding/components/fcOffSheet.tsx
  6. 149 117
      Procedure/frontend/projectb/src/pages/rdpMng/Template/Coding/components/ffRepo.tsx
  7. 132 37
      Procedure/frontend/projectb/src/pages/rdpMng/Template/Coding/components/govFinancialAssetComp.tsx
  8. 128 0
      Procedure/frontend/projectb/src/pages/rdpMng/Template/Coding/components/itItfRate.tsx
  9. 162 61
      Procedure/frontend/projectb/src/pages/rdpMng/Template/Coding/components/policybank.tsx
  10. 169 142
      Procedure/frontend/projectb/src/pages/rdpMng/Template/Coding/components/sovereign.tsx
  11. 42 0
      Procedure/frontend/projectb/src/services/rwa/faGlBalanceSheet.ts
  12. 12 6
      Procedure/frontend/projectb/src/services/rwa/fcCommitment.ts
  13. 12 7
      Procedure/frontend/projectb/src/services/rwa/fcLoan.ts
  14. 9 5
      Procedure/frontend/projectb/src/services/rwa/fcOffSheet.ts
  15. 9 4
      Procedure/frontend/projectb/src/services/rwa/ffRepo.ts
  16. 25 6
      Procedure/frontend/projectb/src/services/rwa/govFinancialAssetComp.ts
  17. 32 0
      Procedure/frontend/projectb/src/services/rwa/itItfRate.ts
  18. 4 4
      Procedure/frontend/projectb/src/services/rwa/norepurchasePledgeInfo.ts
  19. 29 6
      Procedure/frontend/projectb/src/services/rwa/policybank.ts
  20. 4 4
      Procedure/frontend/projectb/src/services/rwa/repurchasePledgeInfo.ts
  21. 35 14
      Procedure/frontend/projectb/src/services/rwa/sovereign.ts

+ 2 - 0
Procedure/frontend/projectb/config/config.ts

@@ -94,6 +94,8 @@ export default defineConfig({
    { path: '/fcLoan' , component: './rdpMng/Template/Coding/components/fcLoan' },
    { path: '/fcOffSheet' , component: './rdpMng/Template/Coding/components/fcOffSheet' },
    { path: '/govFinancialAssetComp' , component: './rdpMng/Template/Coding/components/govFinancialAssetComp' },
+   { path: '/faGlBalanceSheet' , component: './rdpMng/Template/Coding/components/faGlBalanceSheet' },
+   { path: '/itItfRate' , component: './rdpMng/Template/Coding/components/itItfRate' },
    
    
   // 解析

+ 143 - 0
Procedure/frontend/projectb/src/pages/rdpMng/Template/Coding/components/faGlBalanceSheet.tsx

@@ -0,0 +1,143 @@
+import React, { useEffect, useRef, useState } from 'react';
+import { Button, Form, FormInstance, Input, Space, Tooltip } from 'antd';
+import { EditType, SDForm, SDFormDict, SDFormText, SDModal, SDModalForm, SDOperate, SDPage, SDSubmitButton, SDTable, baseFun, SDButton } from '@sundata/ui-frame';
+import { ActionType, ProColumns } from '@ant-design/pro-table';
+import { WomanOutlined } from '@ant-design/icons';
+import { deletedata } from '@/services/idataMng/impandauditp';
+import { FcLoanModel, getFcLoan } from '@/services/rwa/fcLoan';
+import { exportExcelModel, FaGlBalanceSheetModel, getFaGlBalanceSheet } from '@/services/rwa/faGlBalanceSheet';
+
+type aaa = {
+    
+}
+
+const faGlBalanceSheetModel: React.FC<aaa>= (prop : aaa) => {
+    const [editType, setEditType] = useState<EditType>('update');
+    const formRef = useRef<FormInstance<any>>();
+      /** 当前行对象,查看详情、修改时,作为详细信息表单的查询条件 */
+    const [currentRow, setCurrentRow] = useState<FaGlBalanceSheetModel>();
+    const [dataSource, setDataSource] = useState<any>() ;
+    const [detailVisible, setDetailVisible] = useState<boolean>(false);
+
+    const [visible,setVisible] = useState<boolean>(false);//弹窗是否显示
+
+    const actionRef = useRef<ActionType>();
+    const tableActionRef = useRef<ActionType>();
+
+    var formDataList =new Array<FaGlBalanceSheetModel>;
+    const columns: ProColumns<FcLoanModel>[] = [
+        
+        {
+            title : '计算实例号',
+           dataIndex : 'calcindex',
+           search:false,
+           hideInTable:true,
+           width : 150
+           },
+           {
+            title : '截止数据日期',
+           dataIndex : 'edate',
+           search:false,
+           hideInTable:true,
+           width : 150
+           },
+           {
+            title : '起始数据日期',
+           dataIndex : 'sdate',
+           search:false,
+           hideInTable:true,
+           width : 150
+           },
+
+           {
+            title : '年月',
+           dataIndex : 'term',
+           search:false,
+           hideInTable:true,
+           width : 150
+           },
+           {
+            title : '数据日期',
+           dataIndex : 'dataDate',
+           valueType:'date',
+           width : 150
+           },
+           {
+            title : '报表日期',
+           dataIndex : 'reportDate',
+           search:false,
+           width : 150
+           },
+           {
+            title : '账务机构编码',
+           dataIndex : 'finBranchNo',
+           search:false,
+           width : 150
+           },
+           {
+            title : '账务机构名称',
+           dataIndex : 'finBranchName',
+           search:false,
+           width : 150
+           },
+           {
+            title : '科目',
+           dataIndex : 'glCode',
+           width : 150
+           },
+           {
+            title : '科目描述',
+           dataIndex : 'subjectDesc',
+           width : 150
+           },
+           {
+            title : '当日借方余额',
+           dataIndex : 'deBalance',
+           search:false,
+           width : 150
+           },
+           {
+            title : '当日贷方余额',
+           dataIndex : 'crBalance',
+           search:false,
+           width : 150
+           },
+          
+    ]
+    return(
+<SDPage>
+<SDTable
+      title="查询表格"
+      rowKey="custName"
+      request={async(formData : FaGlBalanceSheetModel)=>{
+        const sd = await getFaGlBalanceSheet(formData);
+        formDataList =[...sd];
+        return {data :sd };
+      }}
+      columns={columns}
+     //  singleSelect={false}
+   //  operations={["create"]}
+      //displayColumn="custName"
+     actionRef={actionRef}
+     formRef={formRef}
+     //handleRemove={deletedata}
+     // setCurrentRow={setCurrentRow}
+      setEditType={setEditType}
+      setDetailVisible={setVisible}   
+      toolBarRender={(_, { selectedRows }) => [
+        <SDButton
+          key="export"
+        //  successMessage='导出成功'
+          onClick={async () => {
+            exportExcelModel("faGlBalanceSheet",formDataList);
+            //baseFun.info('处理完成');
+          }}
+        >
+          全部导出
+        </SDButton>,
+      ]}        
+       />
+        
+</SDPage>        
+    )
+};export default faGlBalanceSheetModel;

+ 152 - 105
Procedure/frontend/projectb/src/pages/rdpMng/Template/Coding/components/fcCommitment.tsx

@@ -1,10 +1,11 @@
 import React, { useEffect, useRef, useState } from 'react';
 import { Button, Form, FormInstance, Input, Space, Tooltip } from 'antd';
-import { EditType, SDForm, SDFormDict, SDFormText, SDModal, SDModalForm, SDOperate, SDPage, SDSubmitButton, SDTable, baseFun } from '@sundata/ui-frame';
+import { EditType, SDForm, SDFormDict, SDFormText, SDModal, SDModalForm, SDOperate, SDPage, SDSubmitButton, SDTable, baseFun, SDButton } from '@sundata/ui-frame';
 import { ActionType, ProColumns } from '@ant-design/pro-table';
 import { WomanOutlined } from '@ant-design/icons';
 import { deletedata } from '@/services/idataMng/impandauditp';
-import { FcCommitmentModel, getFcCommitment } from '@/services/rwa/fcCommitment';
+import { exportExcelModel, FcCommitmentModel, getFcCommitment } from '@/services/rwa/fcCommitment';
+import { useModel } from '@umijs/max';
 
 type aaa = {
     
@@ -22,198 +23,230 @@ const fcOffSheetts: React.FC<aaa>= (prop : aaa) => {
 
     const actionRef = useRef<ActionType>();
     const tableActionRef = useRef<ActionType>();
+
+    var formDataList = new Array<FcCommitmentModel>;
+    const { fetchDict } = useModel('dict');
     const columns: ProColumns<FcCommitmentModel>[] = [
-      {
-        title  : '本金科目号',
-        dataIndex : 'balAccount',
-        //  hideInTable: true,
+        {
+        title  : '计算实例号',
+        dataIndex : 'calcindex',
+          hideInTable: true,
         search: false,
+        ellipsis: true,
         width:150,  
       },
-        {
-        title  : '资产余额',
-        dataIndex : 'balance',
-        //  hideInTable: true,
+      {
+        title  : '合同金额',
+        dataIndex : 'ctrAmount',
+         hideInTable: true,
         search: false,
         width:150,  
-      },
-        {
-        title  : '账簿类型',
-        dataIndex : 'bookTypeCd',
-        //  hideInTable: true,
+      }, 
+      {
+        title  : '截止数据日期',
+        dataIndex : 'edate',
+        hideInTable: true,
         search: false,
         width:150,  
       },
         {
-        title  : '核心客户号',
-        dataIndex : 'bpCustNo',
-        //  hideInTable: true,
+        title  : '循环标识',
+        dataIndex : 'revolvingFlag',
+          hideInTable: true,
         search: false,
         width:150,  
       },
         {
-        title  : '所属条线',
-        dataIndex : 'busLine',
-        //  hideInTable: true,
+        title  : '起始数据日期',
+        dataIndex : 'sdate',
+          hideInTable: true,
         search: false,
         width:150,  
       },
         {
+        title  : '年月',
+        dataIndex : 'term',
+          hideInTable: true,
+       search: false,
+        width:150,  
+      },
+      {
         title  : '业务类型',
         dataIndex : 'busType',
-        //  hideInTable: true,
+        hideInTable: true,
         search: false,
         width:150,  
       },
-        {
-        title  : '计算实例号',
-        dataIndex : 'calcindex',
+      {
+        title  : '数据日期',
+        dataIndex : 'dataDate',
           hideInTable: true,
        // search: false,
-        ellipsis: true,
+       valueType:'date',
+	      order:-1,
         width:150,  
       },
-        {
-        title  : '币种代码',
-        dataIndex : 'ccyCd',
+	  {
+        title  : '债项编号',
+        dataIndex : 'loanReferenceNo',
         //  hideInTable: true,
-        search: false,
+       // search: false,
+       ellipsis: true,
+       order:-2,
         width:150,  
       },
-        {
-        title  : '承诺类型',
-        dataIndex : 'commType',
+	  {
+        title  : '币种代码',
+        dataIndex : 'ccyCd',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        {
-        title  : '合同金额',
-        dataIndex : 'ctrAmount',
+	   {
+        title  : '资产余额',
+        dataIndex : 'balance',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        {
-        title  : '客户名称',
-        dataIndex : 'custName',
+	  {
+        title  : '计提准备金',
+        dataIndex : 'reserve',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        {
-        title  : '客户编号',
-        dataIndex : 'custNo',
+	  {
+        title  : '本金科目号',
+        dataIndex : 'balAccount',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        {
-        title  : '数据日期',
-        dataIndex : 'dataDate',
-          hideInTable: true,
-       // search: false,
-        width:150,  
-      },
-        {
-        title  : '截止数据日期',
-        dataIndex : 'edate',
-        hideInTable: true,
-        //search: false,
-        width:150,  
-      },
-        {
-        title  : '财务机构编号',
-        dataIndex : 'finBranchNo',
+	  {
+        title  : '准备金科目号',
+        dataIndex : 'reserveAccount',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        {
-        title  : '债项编号',
-        dataIndex : 'loanReferenceNo',
+	  {
+        title  : '产品编号',
+        dataIndex : 'productNo',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        {
-        title  : '到期日',
-        dataIndex : 'matDt',
+	    {
+        title  : '产品名称',
+        dataIndex : 'productName',
         //  hideInTable: true,
-        search: false,
+       // search: false,
+        order:-6,
         width:150,  
       },
-        {
-        title  : '经营机构编号',
-        dataIndex : 'mgmtBranchNo',
+	  {
+        title  : '承诺类型',
+        dataIndex : 'commType',
         //  hideInTable: true,
-        search: false,
+       // search: false,
+        order:-9,
+        valueType:'treeSelect',
+        request:()=>fetchDict('COMMITMENT_TYPE'),
+        fieldProps:{
+          treeDefaultExpandAll:true,
+          treeCheckable:true,
+        },
         width:150,  
       },
-        {
+	   {
         title  : '表内外标识',
         dataIndex : 'onOffFlag',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        {
-        title  : '产品名称',
-        dataIndex : 'productName',
+	  {
+        title  : '账簿类型',
+        dataIndex : 'bookTypeCd',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        {
-        title  : '产品编号',
-        dataIndex : 'productNo',
+	   {
+        title  : '生效日',
+        dataIndex : 'startDt',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        {
-        title  : '计提准备金',
-        dataIndex : 'reserve',
+	  {
+        title  : '到期日',
+        dataIndex : 'matDt',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        {
-        title  : '准备金科目号',
-        dataIndex : 'reserveAccount',
+	   {
+        title  : '财务机构编号',
+        dataIndex : 'finBranchNo',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        {
-        title  : '循环标识',
-        dataIndex : 'revolvingFlag',
+	  {
+        title  : '经营机构',
+        dataIndex : 'mgmtBranchNo',
         //  hideInTable: true,
-        search: false,
+        //search: false,
+        valueType:'treeSelect',
+        request:()=>fetchDict('org'),
+        fieldProps: {
+          treeDefaultExpandAll: true,
+          treeCheckable: true,
+        },
+        order:-7,
         width:150,  
       },
-        {
-        title  : '起始数据日期',
-        dataIndex : 'sdate',
-          hideInTable: true,
-      //  search: false,
+	  {
+        title  : '核心客户号',
+        dataIndex : 'bpCustNo',
+        //  hideInTable: true,
+        //search: false,
+        order:-3,
         width:150,  
       },
-        {
-        title  : '生效日',
-        dataIndex : 'startDt',
+	  {
+        title  : '客户编号',
+        dataIndex : 'custNo',
         //  hideInTable: true,
-        search: false,
+        //search: false,
+        order:-4,
         width:150,  
       },
-        {
-        title  : '年月',
-        dataIndex : 'term',
-          hideInTable: true,
-       // search: false,
+	   {
+        title  : '客户名称',
+        dataIndex : 'custName',
+        //  hideInTable: true,
+        //search: false,
+        order:-5,
         width:150,  
       },
-
+	  {
+        title  : '所属条线',
+        dataIndex : 'busLine',
+        //  hideInTable: true,
+        //search: false,
+        order:-8,
+        valueType:'treeSelect',
+        request:()=>fetchDict('BUSINESSLINE'),
+        fieldProps: {
+          treeDefaultExpandAll: true,
+          treeCheckable: true,
+        },
+        width:150,  
+      },
+	  
     ]
     return(
         <SDPage >
@@ -222,6 +255,7 @@ const fcOffSheetts: React.FC<aaa>= (prop : aaa) => {
       rowKey="custName"
       request={async(formData : FcCommitmentModel)=>{
         const sd = await getFcCommitment(formData);
+        formDataList =[...sd];
         return {data :sd };
       }}
       columns={columns}
@@ -233,9 +267,22 @@ const fcOffSheetts: React.FC<aaa>= (prop : aaa) => {
      //handleRemove={deletedata}
       setCurrentRow={setCurrentRow}
       setEditType={setEditType}
-      setDetailVisible={setVisible}           
-       >
-        </SDTable>
+      setDetailVisible={setVisible} 
+
+        toolBarRender={(_, { selectedRows }) => [
+          <SDButton
+            key="export"
+          //  successMessage='导出成功'
+            onClick={async () => {
+              exportExcelModel("fcCommitment",formDataList);
+              //baseFun.info('处理完成');
+            }}
+          >
+            全部导出
+          </SDButton>,
+        ]}           
+      />
+       
         </SDPage>
     )
 

+ 246 - 146
Procedure/frontend/projectb/src/pages/rdpMng/Template/Coding/components/fcLoan.tsx

@@ -1,10 +1,11 @@
 import React, { useEffect, useRef, useState } from 'react';
 import { Button, Form, FormInstance, Input, Space, Tooltip } from 'antd';
-import { EditType, SDForm, SDFormDict, SDFormText, SDModal, SDModalForm, SDOperate, SDPage, SDSubmitButton, SDTable, baseFun } from '@sundata/ui-frame';
+import { EditType, SDForm, SDFormDict, SDFormText, SDModal, SDModalForm, SDOperate, SDPage, SDSubmitButton, SDTable, baseFun, SDButton } from '@sundata/ui-frame';
 import { ActionType, ProColumns } from '@ant-design/pro-table';
 import { WomanOutlined } from '@ant-design/icons';
 import { deletedata } from '@/services/idataMng/impandauditp';
-import { FcLoanModel, getFcLoan } from '@/services/rwa/fcLoan';
+import { exportExcelModel, FcLoanModel, getFcLoan } from '@/services/rwa/fcLoan';
+import { request, useModel } from '@umijs/max';
 
 type aaa = {
     
@@ -21,29 +22,53 @@ const fcOffSheetts: React.FC<aaa>= (prop : aaa) => {
     const [visible,setVisible] = useState<boolean>(false);//弹窗是否显示
 
     const actionRef = useRef<ActionType>();
+    const { fetchDict } = useModel('dict');
     const tableActionRef = useRef<ActionType>();
+    var formDataList = new Array<FcLoanModel>;
+    
+
     const columns: ProColumns<FcLoanModel>[] = [
       { 
-        title  : '应计利息',
-        dataIndex : 'accrInt',
+        title  : '数据日期',
+        dataIndex : 'dataDate',
         //  hideInTable: true,
-        search: false,
-        ellipsis: true,
+        //search: false,
+        valueType:'date',
         width:150,  
+         
       },
-        { 
-        title  : '应计利息科目号',
-        dataIndex : 'accrIntAccount',
+      { 
+        title  : '债项编号',
+        dataIndex : 'loanReferenceNo',
+        //  hideInTable: true,
+       // search: false,
+        width:150,  
+         order:-2
+      },
+      { 
+        title  : '借款合同编号',
+        dataIndex : 'contNo',
+        //  hideInTable: true,
+        search: false,
+        width:150,  
+         
+      }, { 
+        title  : '币种代码',
+        dataIndex : 'ccyCd',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
+      
+      
         { 
         title  : '发放金额',
         dataIndex : 'amount',
         //  hideInTable: true,
         search: false,
-        width:150,  
+        width:150, 
+          
       },
         { 
         title  : '资产余额',
@@ -51,299 +76,357 @@ const fcOffSheetts: React.FC<aaa>= (prop : aaa) => {
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
-        { 
-        title  : '账簿类型',
-        dataIndex : 'bookTypeCd',
+      { 
+        title  : '应收利息',
+        dataIndex : 'recInt',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
-        { 
-        title  : '核心客户号',
-        dataIndex : 'bpCustNo',
+      { 
+        title  : '应计利息',
+        dataIndex : 'accrInt',
         //  hideInTable: true,
         search: false,
+        ellipsis: true,
         width:150,  
+         
       },
-        { 
-        title  : '所属条线',
-        dataIndex : 'busLine',
+      { 
+        title  : '利息调整',
+        dataIndex : 'intAdj',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
-        { 
-        title  : '计算实例号',
-        dataIndex : 'calcindex',
-          hideInTable: true,
-        //search: false,
-        width:150,  
-      },
-        { 
-        title  : '币种代码',
-        dataIndex : 'ccyCd',
+      { 
+        title  : '公允价值变动',
+        dataIndex : 'fairValueChange',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
-        { 
-        title  : '借款合同编号',
-        dataIndex : 'contNo',
+      { 
+        title  : '计提准备金',
+        dataIndex : 'reserve',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
         { 
-        title  : '客户名称',
-        dataIndex : 'custName',
+        title  : '本金科目号',
+        dataIndex : 'glAccountId',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
-        { 
-        title  : '客户编号',
-        dataIndex : 'custNo',
+      { 
+        title  : '应收利息科目号',
+        dataIndex : 'recIntAccount',
         //  hideInTable: true,
         search: false,
-        width:150,  
+        width:150,
+           
       },
-        { 
-        title  : '客户类型',
-        dataIndex : 'custType',
+      { 
+        title  : '应计利息科目号',
+        dataIndex : 'accrIntAccount',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
-        { 
-        title  : '数据日期',
-        dataIndex : 'dataDate',
-          hideInTable: true,
-        //search: false,
+      { 
+        title  : '利息调整科目号',
+        dataIndex : 'intAdjAccount',
+        //  hideInTable: true,
+        search: false,
         width:150,  
+         
       },
-        { 
-        title  : '跨境货物贸易标志',
-        dataIndex : 'domDocFlag',
+      { 
+        title  : '公允价值变动科目号',
+        dataIndex : 'fairValAccount',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
-        { 
-        title  : '截止数据日期',
-        dataIndex : 'edate',
-          hideInTable: true,
-        //search: false,
+      { 
+        title  : '准备金科目号',
+        dataIndex : 'reserveAccount',
+        //  hideInTable: true,
+        search: false,
         width:150,  
+         
       },
-        { 
-        title  : '公允价值变动科目号',
-        dataIndex : 'fairValAccount',
+      { 
+        title  : '生效日',
+        dataIndex : 'startDt',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
-        { 
-        title  : '公允价值变动',
-        dataIndex : 'fairValueChange',
+      { 
+        title  : '到期日',
+        dataIndex : 'matDt',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
-        { 
-        title  : '账务机构编号',
-        dataIndex : 'finBranchNo',
+      { 
+        title  : '逾期天数',
+        dataIndex : 'overdueDays',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
-        { 
+      { 
         title  : '五级分类',
         dataIndex : 'fiveClassCd',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
-        { 
-        title  : '本金科目号',
-        dataIndex : 'glAccountId',
+      { 
+        title  : '产品编号',
+        dataIndex : 'productNo',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
-        { 
-        title  : '利息调整',
-        dataIndex : 'intAdj',
+      { 
+        title  : '产品名称',
+        dataIndex : 'productName',
+        //  hideInTable: true,
+        //search: false,
+        width:150,  
+        order:-8 
+      },
+      { 
+        title  : '表内外标识',
+        dataIndex : 'onOffFlag',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
         { 
-        title  : '利息调整科目号',
-        dataIndex : 'intAdjAccount',
+        title  : '账簿类型',
+        dataIndex : 'bookTypeCd',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
-        { 
+      { 
         title  : '行业投向门类',
         dataIndex : 'investIndustryCd',
         //  hideInTable: true,
-        search: false,
+        //search: false,
         width:150,  
+        valueType:'treeSelect',
+        request:()=>fetchDict ('interIndustry'),// 码值后续添加
+        fieldProps:{
+          treeDefaultExpandAll:true,
+          treeCheckable:true,
+        },
+        order:-10
       },
-        { 
+      { 
         title  : '行业投向大类',
         dataIndex : 'investIndustryCd1',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
-        { 
+      { 
         title  : '行业投向中类',
         dataIndex : 'investIndustryCd2',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
-        { 
+      { 
         title  : '行业投向子类',
         dataIndex : 'investIndustryCd3',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
-        { 
-        title  : '债项编号',
-        dataIndex : 'loanReferenceNo',
-        //  hideInTable: true,
-        search: false,
-        width:150,  
-      },
-        { 
-        title  : '到期日',
-        dataIndex : 'matDt',
+      { 
+        title  : '账务机构编号',
+        dataIndex : 'finBranchNo',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
-        { 
-        title  : '经营机构编号',
+      { 
+        title  : '经营机构',
         dataIndex : 'mgmtBranchNo',
         //  hideInTable: true,
-        search: false,
+       // search: false,
         width:150,  
+        valueType: 'treeSelect',
+        request: () => fetchDict('org'),// 码值后续添加
+        fieldProps:{
+          treeDefaultExpandAll:true,
+          treeCheckable:true,
+        },
+        order:-7 
       },
         { 
-        title  : '表内外标识',
-        dataIndex : 'onOffFlag',
+        title  : '核心客户号',
+        dataIndex : 'bpCustNo',
         //  hideInTable: true,
-        search: false,
+        //search: false,
         width:150,  
+        order:-3
+         
       },
-        { 
-        title  : '开证行名称',
-        dataIndex : 'openingBank',
+      { 
+        title  : '客户编号',
+        dataIndex : 'custNo',
         //  hideInTable: true,
-        search: false,
-        width:150,  
+       // search: false,
+        width:150, 
+        order:-4
       },
-        { 
-        title  : '开证行行号',
-        dataIndex : 'openingBankno',
+      { 
+        title  : '客户名称',
+        dataIndex : 'custName',
         //  hideInTable: true,
-        search: false,
+       // search: false,
         width:150,  
+        order:-5
       },
-        { 
-        title  : '逾期天数',
-        dataIndex : 'overdueDays',
+      { 
+        title  : '客户类型',
+        dataIndex : 'custType',
         //  hideInTable: true,
-        search: false,
+      //  search: false,
         width:150,  
+        valueType: 'treeSelect',
+        request: () => fetchDict('CUST_TYPE_LV01'),// 码值后续添加
+        fieldProps:{
+          treeDefaultExpandAll:true,
+          treeCheckable:true,
+        },
+        order:-6 
       },
-        { 
-        title  : '产品名称',
-        dataIndex : 'productName',
+      { 
+        title  : '房地产开发项目类型',
+        dataIndex : 'propDevelProjTypeCd',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
-        { 
-        title  : '产品编号',
-        dataIndex : 'productNo',
+      { 
+        title  : '是否满足审慎贷款审批标准标志',
+        dataIndex : 'qualifiedApprovalProcedure',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
         { 
-        title  : '房地产开发项目类型',
-        dataIndex : 'propDevelProjTypeCd',
+        title  : '所属条线',
+        dataIndex : 'busLine',
         //  hideInTable: true,
-        search: false,
+       // search: false,
         width:150,  
+        valueType:'treeSelect',
+        request: () => fetchDict('BUSINESSLINE'),//码值后续添加
+        fieldProps:{
+          treeDefaultExpandAll:true,
+          treeCheckable:true,
+        },
+         order:-9
       },
-        { 
-        title  : '是否满足审慎贷款审批标准标志',
-        dataIndex : 'qualifiedApprovalProcedure',
+      { 
+        title  : '开证行行号',
+        dataIndex : 'openingBankno',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
+       
         { 
-        title  : '应收利息',
-        dataIndex : 'recInt',
+        title  : '开证行名称',
+        dataIndex : 'openingBank',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
-        { 
-        title  : '应收利息科目号',
-        dataIndex : 'recIntAccount',
+      { 
+        title  : '跨境货物贸易标志',
+        dataIndex : 'domDocFlag',
         //  hideInTable: true,
         search: false,
         width:150,  
+         
       },
+
+
+
         { 
-        title  : '债务重组标识',
-        dataIndex : 'reconstructionFlag',
-        //  hideInTable: true,
+        title  : '计算实例号',
+        dataIndex : 'calcindex',
+          hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
-        title  : '计提准备金',
-        dataIndex : 'reserve',
-        //  hideInTable: true,
+      { 
+        title  : '截止数据日期',
+        dataIndex : 'edate',
+          hideInTable: true,
         search: false,
         width:150,  
+        order:-1
       },
+       
+
         { 
-        title  : '准备金科目号',
-        dataIndex : 'reserveAccount',
-        //  hideInTable: true,
+        title  : '债务重组标识',
+        dataIndex : 'reconstructionFlag',
+          hideInTable: true,
         search: false,
         width:150,  
       },
+       
+      
         { 
         title  : '起始数据日期',
         dataIndex : 'sdate',
           hideInTable: true,
-       // search: false,
-        width:150,  
-      },
-        { 
-        title  : '生效日',
-        dataIndex : 'startDt',
-        //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
+       
+      { 
         title  : '年月',
         dataIndex : 'term',
           hideInTable: true,
-       // search: false,
+        search: false,
         width:150,  
       },
 
@@ -355,6 +438,7 @@ const fcOffSheetts: React.FC<aaa>= (prop : aaa) => {
       rowKey="custName"
       request={async(formData : FcLoanModel)=>{
         const sd = await getFcLoan(formData);
+        formDataList =[...sd];
         return {data :sd };
       }}
       columns={columns}
@@ -366,11 +450,27 @@ const fcOffSheetts: React.FC<aaa>= (prop : aaa) => {
      //handleRemove={deletedata}
       setCurrentRow={setCurrentRow}
       setEditType={setEditType}
-      setDetailVisible={setVisible}           
-       >
-        </SDTable>
+      toolBarRender={(_, { selectedRows }) => [
+        <SDButton
+          key="export"
+        //  successMessage='导出成功'
+          onClick={async () => {
+            exportExcelModel("fcLoan",formDataList);
+            //baseFun.info('处理完成');
+          }}
+        >
+          全部导出
+        </SDButton>,
+      ]}    
+        
+      setDetailVisible={setVisible}   
+              
+       />
+        
+
         </SDPage>
     )
 
 
-  };export default fcOffSheetts;
+  };export default fcOffSheetts;
+

+ 188 - 151
Procedure/frontend/projectb/src/pages/rdpMng/Template/Coding/components/fcOffSheet.tsx

@@ -1,10 +1,11 @@
 import React, { useEffect, useRef, useState } from 'react';
 import { Button, Form, FormInstance, Input, Space, Tooltip } from 'antd';
-import { EditType, SDForm, SDFormDict, SDFormText, SDModal, SDModalForm, SDOperate, SDPage, SDSubmitButton, SDTable, baseFun } from '@sundata/ui-frame';
+import { EditType, SDForm, SDFormDict, SDFormText, SDModal, SDModalForm, SDOperate, SDPage, SDSubmitButton, SDTable, baseFun, SDButton } from '@sundata/ui-frame';
 import { ActionType, ProColumns } from '@ant-design/pro-table';
 import { WomanOutlined } from '@ant-design/icons';
 import { deletedata } from '@/services/idataMng/impandauditp';
-import { FcOffSheetModel, getFcOffSheet } from '@/services/rwa/fcOffSheet';
+import { exportExcelModel, FcOffSheetModel, getFcOffSheet } from '@/services/rwa/fcOffSheet';
+import { useModel } from '@umijs/max';
 
 type aaa = {
 
@@ -23,285 +24,308 @@ type aaa = {
     const tableActionRef = useRef<ActionType>();
 
     const actionRef = useRef<ActionType>();
+    var formDataList =new Array<FcOffSheetModel>;
+
+    const { fetchDict } = useModel('dict');
     const columns: ProColumns<FcOffSheetModel>[] = [
-      {
-        title  : '应计利息',
-        dataIndex : 'accrInt',
-         hideInTable: false,
-        // width: 'auto'
-        ellipsis: true,
-       width:150,  
-      },
-       {
-        title  : '应计利息科目号',
-        dataIndex : 'accrIntAccount',
-       //  hideInTable: true,
+ {
+        title  : '计算实例号',
+        dataIndex : 'calcindex',
+         hideInTable: true,
         search: false,
-       // width:'auto'
+       
        width:150,  
       },
        {
-        title  : '本金科目号',
-        dataIndex : 'balAccount',
-       //  hideInTable: true,
+        title  : '截止数据日期',
+        dataIndex : 'edate',
+         hideInTable: true,
         search: false,
        width:150,  
       },
        {
-        title  : '资产余额',
-        dataIndex : 'balance',
-       //  hideInTable: true,
+        title  : '起始数据日期',
+        dataIndex : 'sdate',
+         hideInTable: true,
         search: false,
        width:150,  
       },
        {
-        title  : '票号',
-        dataIndex : 'billNo',
-       //  hideInTable: true,
+        title  : '年月',
+        dataIndex : 'term',
+         hideInTable: true,
         search: false,
        width:150,  
       },
-       {
-        title  : '账簿类型',
-        dataIndex : 'bookType',
-       //  hideInTable: true,
-        search: false,
+      {
+        title  : '数据日期',
+        dataIndex : 'dataDate',
+     //    hideInTable: true,
+        //search: false,
+        valueType:'date',
+        order:-1,
        width:150,  
       },
-       {
-        title  : '核心客户号',
-        dataIndex : 'bpCustNo',
+	   {
+        title  : '债项编号',
+        dataIndex : 'loanReferenceNo',
        //  hideInTable: true,
-        search: false,
+       // search: false,
+       order:-2,
        width:150,  
       },
-       {
-        title  : '计算实例号',
-        dataIndex : 'calcindex',
-         hideInTable: true,
+	  {
+        title  : '合同编号',
+        dataIndex : 'contractNo',
+       //  hideInTable: true,
         search: false,
-       
        width:150,  
       },
-       {
+	  {
         title  : '币种代码',
         dataIndex : 'ccyCd',
        //  hideInTable: true,
         search: false,
        width:150,  
       },
-       {
-        title  : '合同编号',
-        dataIndex : 'contractNo',
+	  {
+        title  : '资产余额',
+        dataIndex : 'balance',
        //  hideInTable: true,
         search: false,
        width:150,  
       },
-       {
-        title  : '客户名称',
-        dataIndex : 'custName',
+	  {
+        title  : '应收利息',
+        dataIndex : 'recInt',
        //  hideInTable: true,
         search: false,
        width:150,  
       },
-       {
-        title  : '客户编号',
-        dataIndex : 'custNo',
-       //  hideInTable: true,
+	  {
+        title  : '应计利息',
+        dataIndex : 'accrInt',
+         hideInTable: false,
+        // width: 'auto'
+        ellipsis: true,
         search: false,
        width:150,  
       },
-       {
-        title  : '数据日期',
-        dataIndex : 'dataDate',
-         hideInTable: true,
+	  {
+        title  : '利息调整',
+        dataIndex : 'intAdj',
+       //  hideInTable: true,
         search: false,
        width:150,  
       },
-       {
-        title  : '跨境货物贸易标志',
-        dataIndex : 'domDocFlag',
+	  {
+        title  : '公允价值变动',
+        dataIndex : 'fairValueChange',
        //  hideInTable: true,
         search: false,
        width:150,  
       },
-       {
-        title  : '国内/国际证标签',
-        dataIndex : 'domInteFlag',
+	   {
+        title  : '计提准备金',
+        dataIndex : 'reserve',
        //  hideInTable: true,
         search: false,
        width:150,  
       },
-       {
-        title  : '截止数据日期',
-        dataIndex : 'edate',
-         hideInTable: true,
+	  {
+        title  : '本金科目号',
+        dataIndex : 'balAccount',
+       //  hideInTable: true,
         search: false,
        width:150,  
       },
-       {
-        title  : '公允价值变动科目号',
-        dataIndex : 'fairValAccount',
+	  {
+        title  : '应收利息科目号',
+        dataIndex : 'recIntAccount',
        //  hideInTable: true,
         search: false,
        width:150,  
       },
-       {
-        title  : '公允价值变动',
-        dataIndex : 'fairValueChange',
+	   {
+        title  : '应计利息科目号',
+        dataIndex : 'accrIntAccount',
        //  hideInTable: true,
         search: false,
+       // width:'auto'
        width:150,  
-      },
-       {
-        title  : '账务机构编号',
-        dataIndex : 'finBranchNo',
+      },{
+        title  : '利息调整科目号',
+        dataIndex : 'intAdjAccount',
        //  hideInTable: true,
         search: false,
        width:150,  
       },
-       {
-        title  : '五级分类代码',
-        dataIndex : 'fiveClassCd',
+	  {
+        title  : '公允价值变动科目号',
+        dataIndex : 'fairValAccount',
        //  hideInTable: true,
         search: false,
        width:150,  
       },
-       {
-        title  : '利息调整',
-        dataIndex : 'intAdj',
+	  {
+        title  : '准备金科目号',
+        dataIndex : 'reserveAccount',
        //  hideInTable: true,
         search: false,
        width:150,  
       },
-       {
-        title  : '利息调整科目号',
-        dataIndex : 'intAdjAccount',
+	   {
+        title  : '五级分类代码',
+        dataIndex : 'fiveClassCd',
        //  hideInTable: true,
         search: false,
        width:150,  
       },
-       {
-        title  : '信用证有效期',
-        dataIndex : 'lcExpiDt',
+	  {
+        title  : '产品编号',
+        dataIndex : 'productNo',
        //  hideInTable: true,
         search: false,
        width:150,  
       },
-       {
-        title  : '融资性/非融资性标签',
-        dataIndex : 'lgType',
+	  {
+        title  : '产品名称',
+        dataIndex : 'productName',
        //  hideInTable: true,
-        search: false,
+      //  search: false,
+      order:-6,
        width:150,  
       },
-       {
-        title  : '债项编号',
-        dataIndex : 'loanReferenceNo',
+	  {
+        title  : '生效日',
+        dataIndex : 'startDt',
        //  hideInTable: true,
         search: false,
        width:150,  
-      },
-       {
+      },{
         title  : '到期日',
         dataIndex : 'matDt',
        //  hideInTable: true,
         search: false,
        width:150,  
       },
-       {
-        title  : '经营机构编号',
-        dataIndex : 'mgmtBranchNo',
-       //  hideInTable: true,
-        search: false,
-       width:150,  
-      },
-       {
+	  {
         title  : '表内外标识',
         dataIndex : 'onOffFlag',
        //  hideInTable: true,
         search: false,
        width:150,  
-      },
-       {
-        title  : '开证日',
-        dataIndex : 'openingDt',
+      }, {
+        title  : '账簿类型',
+        dataIndex : 'bookType',
        //  hideInTable: true,
         search: false,
        width:150,  
-      },
-       {
-        title  : '产品名称',
-        dataIndex : 'productName',
+      }, {
+        title  : '融资性/非融资性标签',
+        dataIndex : 'lgType',
        //  hideInTable: true,
-        search: false,
+       // search: false,
+       valueType:'select',
+       request:()=>fetchDict('FINANCING_NULLOROTHER'),
+       order:-9,
        width:150,  
-      },
-       {
-        title  : '产品编号',
-        dataIndex : 'productNo',
+      },{
+        title  : '信用证有效期',
+        dataIndex : 'lcExpiDt',
        //  hideInTable: true,
         search: false,
        width:150,  
-      },
-       {
-        title  : '应收利息',
-        dataIndex : 'recInt',
+      }, {
+        title  : '跨境货物贸易标志',
+        dataIndex : 'domDocFlag',
        //  hideInTable: true,
         search: false,
        width:150,  
+      }, 
+	  {
+        title  : '国内/国际证标签',
+        dataIndex : 'domInteFlag',
+       //  hideInTable: true,
+       // search: false,
+       valueType:'select',
+       request:()=>fetchDict('DOF'),
+       order:-8,
+       width:150,  
       },
-       {
-        title  : '应收利息科目号',
-        dataIndex : 'recIntAccount',
+	  {
+        title  : '贸易类型代码',
+        dataIndex : 'tradeTypeCd',
+       //  hideInTable: true,
+      //  search: false,
+      valueType:'treeSelect',
+      request:()=>fetchDict('TRADE_TYPE'),
+       fieldProps: {
+            treeDefaultExpandAll: true,
+            treeCheckable: true,
+          },
+          order:-10,
+       width:150,  
+      }, 
+	  {
+        title  : '开证日',
+        dataIndex : 'openingDt',
        //  hideInTable: true,
         search: false,
        width:150,  
       },
-       {
-        title  : '计提准备金',
-        dataIndex : 'reserve',
+	  {
+        title  : '票号',
+        dataIndex : 'billNo',
        //  hideInTable: true,
         search: false,
        width:150,  
       },
-       {
-        title  : '准备金科目号',
-        dataIndex : 'reserveAccount',
+	   {
+        title  : '账务机构编号',
+        dataIndex : 'finBranchNo',
        //  hideInTable: true,
         search: false,
        width:150,  
       },
-       {
-        title  : '起始数据日期',
-        dataIndex : 'sdate',
+	  {
+        title  : '经营机构编号',
+        dataIndex : 'mgmtBranchNo',
        //  hideInTable: true,
-        search: false,
+      //  search: false,
+      valueType:'treeSelect',
+      request:()=>fetchDict('org'),
+      fieldProps:{
+        treeDefaultExpandAll:true,
+        treeCheckable:true,
+      },
+      order:-7,
        width:150,  
       },
-       {
-        title  : '生效日',
-        dataIndex : 'startDt',
+	   {
+        title  : '核心客户号',
+        dataIndex : 'bpCustNo',
        //  hideInTable: true,
-        search: false,
+       // search: false,
+       order:-3,
        width:150,  
       },
-       {
-        title  : '年月',
-        dataIndex : 'term',
-         hideInTable: true,
-        search: false,
+	  {
+        title  : '客户编号',
+        dataIndex : 'custNo',
+       //  hideInTable: true,
+        //search: false,
+        order:-4,
        width:150,  
       },
-       {
-        title  : '贸易类型代码',
-        dataIndex : 'tradeTypeCd',
+	  {
+        title  : '客户名称',
+        dataIndex : 'custName',
        //  hideInTable: true,
-        search: false,
+        //search: false,
+        order:-5,
        width:150,  
       },
-
-
     ]
     return(
         <SDPage >
@@ -310,6 +334,7 @@ type aaa = {
       rowKey="custName"
       request={async(formData : FcOffSheetModel)=>{
         const sd = await getFcOffSheet(formData);
+        formDataList =[...sd]
         return {data :sd };
       }}
       columns={columns}
@@ -321,12 +346,24 @@ type aaa = {
      //handleRemove={deletedata}
       setCurrentRow={setCurrentRow}
       setEditType={setEditType}
-      setDetailVisible={setVisible}           
-       >
-        </SDTable>
+      setDetailVisible={setVisible}  
+      toolBarRender={(_, { selectedRows }) => [
+        <SDButton
+          key="export"
+        //  successMessage='导出成功'
+          onClick={async () => {
+            exportExcelModel("fcOffSheet",formDataList);
+            //baseFun.info('处理完成');
+          }}
+        >
+          全部导出
+        </SDButton>,
+      ]}          
+       />
+       
         
         </SDPage>
     )
 
 
-  };export default fcOffSheetts;
+  };export default fcOffSheetts;

+ 149 - 117
Procedure/frontend/projectb/src/pages/rdpMng/Template/Coding/components/ffRepo.tsx

@@ -1,10 +1,11 @@
 import React, { useEffect, useRef, useState } from 'react';
 import { Button, Form, FormInstance, Input, Space, Tooltip } from 'antd';
-import { EditType, SDForm, SDFormDict, SDFormText, SDModal, SDModalForm, SDOperate, SDPage, SDSubmitButton, SDTable, baseFun } from '@sundata/ui-frame';
+import { EditType, SDForm, SDFormDict, SDFormText, SDModal, SDModalForm, SDOperate, SDPage, SDSubmitButton, SDTable, baseFun, SDButton } from '@sundata/ui-frame';
 import { ActionType, ProColumns } from '@ant-design/pro-table';
 import { WomanOutlined } from '@ant-design/icons';
 import { deletedata } from '@/services/idataMng/impandauditp';
-import { FfRepoModel, getFfRepo } from '@/services/rwa/ffRepo';
+import { exportExcelModel, FfRepoModel, getFfRepo } from '@/services/rwa/ffRepo';
+import { useModel } from '@umijs/max';
 
 
 type aaa = {
@@ -23,242 +24,260 @@ type aaa = {
 
     const actionRef = useRef<ActionType>();
     const tableActionRef = useRef<ActionType>();
+    const { fetchDict } = useModel('dict');
+    var formDataList =new Array<FfRepoModel>;
     const columns: ProColumns<FfRepoModel>[] = [
-      { 
-        title  : '应计利息',
-        dataIndex : 'accrInt',
-        //  hideInTable: true,
-        search: false,
-        width:150,  
-        ellipsis: true,
-      },
+
         { 
-        title  : '应计利息科目号',
-        dataIndex : 'accrIntAccount',
-        //  hideInTable: true,
+        title  : '计算实例号',
+        dataIndex : 'calcindex',
+        hideInTable: true,
         search: false,
         width:150,  
       },
         { 
-        title  : '资产余额',
-        dataIndex : 'balance',
-        //  hideInTable: true,
+        title  : '截止数据日期',
+        dataIndex : 'edate',
+        hideInTable: true,
         search: false,
         width:150,  
       },
         { 
-        title  : '债券代码',
-        dataIndex : 'billNo',
-        //  hideInTable: true,
+        title  : '起始数据日期',
+        dataIndex : 'sdate',
+        hideInTable: true,
         search: false,
         width:150,  
       },
         { 
-        title  : '账簿类型',
-        dataIndex : 'bookTypeCd',
-        //  hideInTable: true,
+        title  : '年月',
+        dataIndex : 'term',
+        hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
-        title  : '计算实例号',
-        dataIndex : 'calcindex',
-       hideInTable: true,
+      { 
+        title  : '数据日期',
+        dataIndex : 'dataDate',
+         hideInTable: true,
         //search: false,
+        valueType:'date',
+        order:-1,
         width:150,  
       },
-        { 
-        title  : '币种代码',
-        dataIndex : 'ccyCd',
+	   { 
+        title  : '债项编号',
+        dataIndex : 'loanReferenceNo',
         //  hideInTable: true,
-        search: false,
+       // search: false,
+        order:-2,
         width:150,  
       },
-        { 
-        title  : '核心市场参与者标识',
-        dataIndex : 'coreMarketPartFlag',
+	   { 
+        title  : '币种代码',
+        dataIndex : 'ccyCd',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
-        title  : '客户名称',
-        dataIndex : 'custName',
+	   { 
+        title  : '资产余额',
+        dataIndex : 'balance',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
-        title  : '客户编号',
-        dataIndex : 'custNo',
+	  { 
+        title  : '应收利息',
+        dataIndex : 'recInt',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
-        title  : '数据日期',
-        dataIndex : 'dataDate',
-         hideInTable: true,
-        //search: false,
-        width:150,  
-      },
-        { 
-        title  : '截止数据日期',
-        dataIndex : 'edate',
-          hideInTable: true,
+	   { 
+        title  : '应计利息',
+        dataIndex : 'accrInt',
+        //  hideInTable: true,
         search: false,
         width:150,  
+        ellipsis: true,
       },
-        { 
-        title  : '公允价值变动科目号',
-        dataIndex : 'fairValAccount',
+	   { 
+        title  : '利息调整',
+        dataIndex : 'intAdj',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
+	   { 
         title  : '公允价值变动',
         dataIndex : 'fairValueChange',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
-        title  : '账务机构编号',
-        dataIndex : 'finBranchNo',
+	   { 
+        title  : '计提准备金',
+        dataIndex : 'reserve',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
+	   { 
         title  : '本金科目号',
         dataIndex : 'glAccountId',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
-        title  : '利息调整',
-        dataIndex : 'intAdj',
+	   { 
+        title  : '应收利息科目号',
+        dataIndex : 'recIntAccount',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
-        title  : '利息调整科目号',
-        dataIndex : 'intAdjAccount',
+	   { 
+        title  : '应计利息科目号',
+        dataIndex : 'accrIntAccount',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
-        title  : '债项编号',
-        dataIndex : 'loanReferenceNo',
+	   { 
+        title  : '利息调整科目号',
+        dataIndex : 'intAdjAccount',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
-        title  : '到期日',
-        dataIndex : 'matDt',
+	   { 
+        title  : '公允价值变动科目号',
+        dataIndex : 'fairValAccount',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
-        title  : '经营机构编号',
-        dataIndex : 'mgmtBranchNo',
+	  { 
+        title  : '准备金科目号',
+        dataIndex : 'reserveAccount',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
-        title  : '表内外标识',
-        dataIndex : 'onOffFlag',
+	   { 
+        title  : '产品编号',
+        dataIndex : 'productNo',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
+	  { 
         title  : '产品名称',
         dataIndex : 'productName',
         //  hideInTable: true,
+       // search: false,
+        order:-6,
+        width:150,  
+      },
+	   { 
+        title  : '质押买断类型',
+        dataIndex : 'zhiyaMaiduanCd',
+        //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
-        title  : '产品编号',
-        dataIndex : 'productNo',
+	  { 
+        title  : '回购类型',
+        dataIndex : 'repoTypeCd',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
-        title  : '应收利息',
-        dataIndex : 'recInt',
+	  { 
+        title  : '表内外标识',
+        dataIndex : 'onOffFlag',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
-        title  : '应收利息科目号',
-        dataIndex : 'recIntAccount',
+	    { 
+        title  : '账簿类型',
+        dataIndex : 'bookTypeCd',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
-        title  : '回购期限',
-        dataIndex : 'repoDays',
+	  { 
+        title  : '生效日',
+        dataIndex : 'startDt',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
-        title  : '回购类型',
-        dataIndex : 'repoTypeCd',
+	   { 
+        title  : '到期日',
+        dataIndex : 'matDt',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
-        title  : '计提准备金',
-        dataIndex : 'reserve',
+	  { 
+        title  : '回购期限',
+        dataIndex : 'repoDays',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
-        title  : '准备金科目号',
-        dataIndex : 'reserveAccount',
+	  { 
+        title  : '债券代码',
+        dataIndex : 'billNo',
+        //  hideInTable: true,
+      //  search: false,
+        order:-5,
+        width:150,  
+      },
+	    { 
+        title  : '账务机构编号',
+        dataIndex : 'finBranchNo',
         //  hideInTable: true,
         search: false,
         width:150,  
       },
-        { 
-        title  : '起始数据日期',
-        dataIndex : 'sdate',
-         hideInTable: true,
+	   
+     { 
+        title  : '经营机构',
+        dataIndex : 'mgmtBranchNo',
+        //  hideInTable: true,
        // search: false,
+        order:-7,
+        valueType:'treeSelect',
+        request:()=>fetchDict('org'),
+        fieldProps:{
+          treeDefaultExpandAll:true,
+          treeCheckable:true,
+        },
         width:150,  
       },
-        { 
-        title  : '生效日',
-        dataIndex : 'startDt',
+	    { 
+        title  : '客户编号',
+        dataIndex : 'custNo',
         //  hideInTable: true,
-        search: false,
+    //    search: false,
+        order:-3,
         width:150,  
       },
-        { 
-        title  : '年月',
-        dataIndex : 'term',
-         hideInTable: true,
-        //search: false,
+	  { 
+        title  : '客户名称',
+        dataIndex : 'custName',
+        //  hideInTable: true,
+       // search: false,
+        order:-4,
         width:150,  
       },
-        { 
-        title  : '质押买断类型',
-        dataIndex : 'zhiyaMaiduanCd',
+	  { 
+        title  : '核心市场参与者标识',
+        dataIndex : 'coreMarketPartFlag',
         //  hideInTable: true,
         search: false,
         width:150,  
@@ -272,6 +291,7 @@ type aaa = {
       rowKey="custName"
       request={async(formData : FfRepoModel)=>{
         const sd = await getFfRepo(formData);
+        formDataList =[...sd];
         return {data :sd };
       }}
       columns={columns}
@@ -283,9 +303,21 @@ type aaa = {
      //handleRemove={deletedata}
       setCurrentRow={setCurrentRow}
       setEditType={setEditType}
-      setDetailVisible={setVisible}           
-       >
-        </SDTable>
+      setDetailVisible={setVisible}    
+      toolBarRender={(_, { selectedRows }) => [
+        <SDButton
+          key="export"
+        //  successMessage='导出成功'
+          onClick={async () => {
+            exportExcelModel("ffRepo",formDataList);
+            //baseFun.info('处理完成');
+          }}
+        >
+          全部导出
+        </SDButton>,
+      ]}         
+       />
+       
         </SDPage>
     )
 

+ 132 - 37
Procedure/frontend/projectb/src/pages/rdpMng/Template/Coding/components/govFinancialAssetComp.tsx

@@ -1,10 +1,10 @@
 import React, { useEffect, useRef, useState } from 'react';
-import { Button, Form, FormInstance, Input, Space, Table, Tooltip } from 'antd';
-import { EditType, SDForm, SDFormDict, SDFormText, SDModal, SDModalForm, SDOperate, SDPage, SDSubmitButton, SDTable, baseFun } from '@sundata/ui-frame';
+import { Button, Form, FormInstance, Input, Space, Table, Tooltip, Upload } from 'antd';
+import { EditType, SDForm, SDFormDict, SDFormText, SDModal, SDModalForm, SDOperate, SDPage, SDSubmitButton, SDTable, baseFun, SDButton, validateFun, SDFormItem } from '@sundata/ui-frame';
 import { ActionType, ProColumns } from '@ant-design/pro-table';
 import { WomanOutlined } from '@ant-design/icons';
 import { result } from 'lodash';
-import { deleteGovFinancialAssetComp, getGovFinancialAssetComp, GovFinancialAssetCompModel, inserteGovFinancialAssetComp, selectGovFinancialAssetComp } from '@/services/rwa/govFinancialAssetComp';
+import { deleteGovFinancialAssetComp, exportExcelModel, getGovFinancialAssetComp, GovFinancialAssetCompModel, inserteGovFinancialAssetComp, selectGovFinancialAssetComp, templateUpload, uploadAction } from '@/services/rwa/govFinancialAssetComp';
 
 type bbb ={
 
@@ -22,15 +22,21 @@ const govFinancialAssetCompts: React.FC<bbb>= (prop : bbb) => {
     const [visible,setVisible] = useState<boolean>(false);//弹窗是否显示
     const [deadline,setdeadline] = useState<boolean>(false);//弹窗是否显示
     const [secName,setSecName] = useState<boolean>(false);//弹窗是否显示
+    const [importVisible, setImportVisible] = useState<boolean>(false);
     const tableActionRef = useRef<ActionType>();
     const actionRef = useRef<ActionType>();
+          /**上传文件 */
+  const [fileData, setFileData] = useState<File>();
 
     const closeAndRefresh = ()=>{
         setVisible(false);
         actionRef.current?.reloadAndRest?.();
       }
+      var formDataList = new Array<GovFinancialAssetCompModel>;
+
       const selectdata = async (record:any)=>{
         const sd =await selectGovFinancialAssetComp(record.name);
+        
         // if (sd.deadline ==='' || sd.deadline ===null){
         //   setSecName(true);
         //   setdeadline(false);
@@ -54,10 +60,11 @@ const govFinancialAssetCompts: React.FC<bbb>= (prop : bbb) => {
       }
       
        const del = async(record:any)=>{
-        const delSovere =await deleteGovFinancialAssetComp(record.name)  
-        closeAndRefresh();
-        baseFun.info("删除成功");
-        console.log(delSovere);
+        baseFun.confirm("请确认是否继续操作。",async()=>{
+          await deleteGovFinancialAssetComp(record.name)  
+          closeAndRefresh();
+          baseFun.info("删除成功");
+        })
         }
         const disdata = async (record:any)=>{
             const sd =await selectGovFinancialAssetComp(record.name);
@@ -70,12 +77,15 @@ const govFinancialAssetCompts: React.FC<bbb>= (prop : bbb) => {
             title : '计算实例号',
            dataIndex : 'calcindex',
            width:150,
-           hideInTable:true,
+           search: false,
+           hideInTable: true,
             },
            
            {
             title : '缓释分类',
            dataIndex : 'crmClass',
+           search: false,
+           hideInTable: true,
            width:150
             },
            
@@ -83,26 +93,29 @@ const govFinancialAssetCompts: React.FC<bbb>= (prop : bbb) => {
             title : '数据日期',
            dataIndex : 'dataDate',
            width:150,
-           hideInTable:true,
+           search: false,
+           hideInTable: true,
             },
            
            {
             title : '截止数据日期',
            dataIndex : 'edate',
            width:150,
-           hideInTable:true,
+           search: false,
+           hideInTable: true,
             },
            
            {
-            title : '名称',
+            title : '交易对手名称',
            dataIndex : 'name',
            width:150
             },
            
            
            {
-            title : '合格信用风险缓释工具类型',
+            title : '缓释工具类型',
            dataIndex : 'qualfiedCreditToolTypeName',
+           search: false,
            width:150
             },
            
@@ -110,25 +123,31 @@ const govFinancialAssetCompts: React.FC<bbb>= (prop : bbb) => {
             title : '起始数据日期',
            dataIndex : 'sdate',
            width:150,
-           hideInTable:true,
+           search: false,
+           hideInTable: true,
             },
            
            {
             title : '年月',
            dataIndex : 'term',
            width:150,
-           hideInTable:true,
+           search: false,
+           hideInTable: true,
             },
            
            {
             title : '缓释权重',
            dataIndex : 'weight',
+           search: false,
+           hideInTable: true,
            width:150
             },    
             
            {
             title : '备注',
            dataIndex : 'notes',
+           search: false,
+           hideInTable: true,
            width:150
             },
             {
@@ -162,24 +181,40 @@ const govFinancialAssetCompts: React.FC<bbb>= (prop : bbb) => {
                 >
                   删除
                 </SDOperate>,
-                 <SDOperate
-                 key="roleCfg"
-                 icon={<WomanOutlined />}
-                 successMessage=""
-                 
-                 onClick={()=>{ 
-                  disdata(record);
-                  closeAndRefresh();
-                 setVisible(true);
-                 setEditType('display')
-                  } }
-               >
-                 查看
-               </SDOperate>,
                 ],
               },       
-
        ]
+                 /**上传提交 */
+  const uploadSubmit = async () => {
+    if (!fileData) {
+      baseFun.warning('未上传文件');
+      return;
+    }
+    const res = await uploadAction(fileData);
+    if ('导入成功'===res) {
+      baseFun.info("处理完成");
+    } else {
+      baseFun.error(res);
+    }
+    setEditType('update');
+    setDetailVisible(false);
+};
+
+
+   // 模板下载
+   const templateUploadAction = async() => {
+    await templateUpload("govFinancialAssetComp");
+   // baseFun.info("处理完成");
+  }
+    /**上传属性 */
+    const fileProps = {
+      onRemove: () => {
+      setFileData(undefined);
+     },
+      beforeUpload(info: any) {
+      setFileData(info);
+    },
+  };
 return(
 <SDPage>
     <SDTable
@@ -187,35 +222,93 @@ return(
     rowKey="secClassificationCd"
     request={async(formData : GovFinancialAssetCompModel)=>{
         const sd = await getGovFinancialAssetComp(formData);
+        formDataList =[...sd];
         return {data :sd };
       }}
       columns={columns}
       actionRef={actionRef}
       formRef={formRef}
-      operations={["create"]}
+   //   operations={["create"]}
       //handleRemove={deletedata}
        setCurrentRow={setCurrentRow}
        setEditType={setEditType}
-       setDetailVisible={setVisible}    
+       setDetailVisible={setVisible}  
+       toolBarRender={(_, { selectedRows }) => [
+        <SDButton
+          key="export"
+          successMessage=''
+          onClick={async () => {
+            exportExcelModel("govFinancialAssetComp",formDataList);
+            baseFun.info('处理完成');
+          }}
+        >
+          全部导出
+        </SDButton>,
+      <SDButton
+      key="import"
+      successMessage=''
+      onClick={() => {
+        baseFun.confirm("请注意本功能意在覆盖本表所有数据,请谨慎使用!",()=>{ setImportVisible(true);})
+      }}
+    >
+      覆盖导入
+    </SDButton>,
+     ]}    
     ></SDTable>
+
+
+{importVisible && (
+         <SDModalForm
+        title={'上传文件窗口'}
+        visible={importVisible}
+        editType={editType}
+        onVisibleChange={() => {setImportVisible(false)}}
+        tableRef={actionRef}
+        footer={[
+        <SDSubmitButton  editType={'update'}  formRef={formRef}  successMessage=""
+          doSubmit={async() => {await uploadSubmit()}} >提交</SDSubmitButton>,
+          <SDButton
+          key="template"
+          onClick={() => {
+            templateUploadAction();
+          }}
+        >
+          模板下载
+        </SDButton>
+        ]
+        }
+        >
+         <SDFormItem nestType="form">
+            <Upload maxCount={1} {...fileProps} name="rfile">
+              <div style={{ paddingLeft: '5.5vw' }}>
+                选择上传文件: &nbsp;&nbsp;<SDOperate>上传</SDOperate>
+              </div>
+            </Upload>
+        </SDFormItem>
+        </SDModalForm>
+      )}
 { visible &&( 
 <SDModalForm  
    visible={visible}
    //rowKey="cust_NAME" 
    editType={editType} 
-   request={selectdata}
+   //request={selectdata}
    //params={setDataSource}
    onVisibleChange={() => { setVisible(false) }}
-   footer={[<SDSubmitButton  editType={editType}   formRef={formRef} doSubmit={inst} >保存</SDSubmitButton>]}
+   initialValues={{crmClass :'保证'}}
+   footer={[<SDSubmitButton  editType={editType}   formRef={formRef} doSubmit={inst} >保存</SDSubmitButton>,
+  <SDButton successMessage="" onClick={()=>closeAndRefresh()}>关闭</SDButton>]}
    formRef={formRef}
  >
 
 <SDFormText name="crmClass"   label="缓释分类"  />
-<SDFormText name="name"   label="名称"  />
+<SDFormText name="name"   label="交易对手名称"  />
 <SDFormText name="qualfiedCreditToolTypeName"   label="合格信用风险缓释工具类型"  />
-<SDFormText name="weight"   label="缓释权重"  />
+<SDFormText name="weight"   label="缓释权重"   rules={ [{validator: validateFun.double,message:"请输入数字类型" }
+      ,{pattern :RegExp(`^\\d+\\.{${0},${1}}\\d{${0},${4}}$`),message:"小数位超位" }]}  
+      oldValue="%"  />
+<SDFormText name="notes"   label="备注" max={500}  />
 <div style={{display:"none"}}> 
-<SDFormText name="notes"   label="备注"  />
 <SDFormText name="calcindex"   label="计算实例号"  />
 <SDFormText name="dataDate"   label="数据日期"  />
 <SDFormText name="edate"   label="截止数据日期"  />
@@ -230,4 +323,6 @@ return(
 
 )
 
-};export default govFinancialAssetCompts
+};export default govFinancialAssetCompts
+
+

+ 128 - 0
Procedure/frontend/projectb/src/pages/rdpMng/Template/Coding/components/itItfRate.tsx

@@ -0,0 +1,128 @@
+import React, { useEffect, useRef, useState } from 'react';
+import { Button, Form, FormInstance, Input, Space, Tooltip } from 'antd';
+import { EditType, SDForm, SDFormDict, SDFormText, SDModal, SDModalForm, SDOperate, SDPage, SDSubmitButton, SDTable, baseFun, SDButton } from '@sundata/ui-frame';
+import { ActionType, ProColumns } from '@ant-design/pro-table';
+import { WomanOutlined } from '@ant-design/icons';
+import { deletedata } from '@/services/idataMng/impandauditp';
+import { FcLoanModel, getFcLoan } from '@/services/rwa/fcLoan';
+import { exportExcelModel, getItItfRate, ItItfRateModel } from '@/services/rwa/itItfRate';
+import { useModel } from '@umijs/max';
+
+type aaa = {
+    
+}
+
+const itItfRateModel: React.FC<aaa>= (prop : aaa) => {
+
+    const [editType, setEditType] = useState<EditType>('update');
+    const formRef = useRef<FormInstance<any>>();
+      /** 当前行对象,查看详情、修改时,作为详细信息表单的查询条件 */
+    const [currentRow, setCurrentRow] = useState<ItItfRateModel>();
+    const [dataSource, setDataSource] = useState<any>() ;
+    const [detailVisible, setDetailVisible] = useState<boolean>(false);
+
+    const [visible,setVisible] = useState<boolean>(false);//弹窗是否显示
+
+    const actionRef = useRef<ActionType>();
+    const tableActionRef = useRef<ActionType>();
+    const {fetchDict} = useModel('dict');
+    var formDataList = new Array<ItItfRateModel>;
+    const columns: ProColumns<FcLoanModel>[] = [
+        {
+            title : '计算实例号',
+           dataIndex : 'calcindex',
+           search:false,
+           hideInTable:true,
+           width : 150
+           },
+           {
+            title : '数据日期',
+           dataIndex : 'dataDate',
+           valueType:'date',
+           order:-1,
+           width : 150
+           },
+           {
+            title : '币种',
+           dataIndex : 'currcd',
+           valueType:'treeSelect',
+           request:()=>fetchDict ('currCd'),
+           fieldProps:{
+            treeDefualtExpandAll:true,
+            treeCheckable:true,
+           },
+           order:-2,
+           width : 150
+           },
+
+           {
+            title : '截止数据日期',
+           dataIndex : 'edate',
+           search:false,
+           hideInTable:true,
+           width : 150
+           },
+           
+           {
+            title : '人民币汇率',
+           dataIndex : 'rmbexchrate',
+           search:false,
+           width : 150
+           },
+           
+           {
+            title : '起始数据日期',
+           dataIndex : 'sdate',
+           search:false,
+           hideInTable:true,
+           width : 150
+           },
+           
+           {
+            title : '期次',
+           dataIndex : 'term',
+           search:false,
+           hideInTable:true,
+           width : 150
+           },
+           
+           
+    ]
+    return(
+<SDPage>
+<SDTable
+      title="查询表格"
+      rowKey="custName"
+      request={async(formData : ItItfRateModel)=>{
+        const sd = await getItItfRate(formData);
+        formDataList =[...sd];
+        return {data :sd };
+      }}
+      columns={columns}
+     //  singleSelect={false}
+   //  operations={["create"]}
+      //displayColumn="custName"
+     actionRef={actionRef}
+     formRef={formRef}
+     //handleRemove={deletedata}
+      setCurrentRow={setCurrentRow}
+      setEditType={setEditType}
+      setDetailVisible={setVisible}    
+      
+      toolBarRender={(_, { selectedRows }) => [
+        <SDButton
+          key="export"
+        //  successMessage='导出成功'
+          onClick={async () => {
+            exportExcelModel("itItfRate",formDataList);
+            //baseFun.info('处理完成');
+          }}
+        >
+          全部导出
+        </SDButton>,
+      ]}          
+       />
+        
+</SDPage>        
+    )
+};export default itItfRateModel;

+ 162 - 61
Procedure/frontend/projectb/src/pages/rdpMng/Template/Coding/components/policybank.tsx

@@ -1,10 +1,10 @@
 import React, { useEffect, useRef, useState } from 'react';
-import { Button, Form, FormInstance, Input, Space, Tooltip } from 'antd';
-import { EditType, SDForm, SDFormDict, SDFormText, SDModal, SDModalForm, SDOperate, SDPage, SDSubmitButton, SDTable, baseFun } from '@sundata/ui-frame';
+import { Button, Form, FormInstance, Input, Space, Tooltip, Upload } from 'antd';
+import { EditType, SDForm, SDFormDict, SDFormText, SDModal, SDModalForm, SDOperate, SDPage, SDSubmitButton, SDTable, baseFun, SDButton, SDFormItem, validateFun } from '@sundata/ui-frame';
 import { ActionType, ProColumns } from '@ant-design/pro-table';
 import { WomanOutlined } from '@ant-design/icons';
 import { deletedata } from '@/services/idataMng/impandauditp';
-import {  PolicyBankModel, deletePolicyBank, getPolicyBank, insertePolicyBank, selectPolicyBank } from '@/services/rwa/policybank';
+import {  PolicyBankModel, deletePolicyBank, getPolicyBank, insertePolicyBank, selectPolicyBank, uploadAction, templateUpload, exportExcelModel } from '@/services/rwa/policybank';
 import { result } from 'lodash';
 
 type aaa ={
@@ -25,19 +25,34 @@ const policybankts: React.FC<aaa>= (prop : aaa) => {
 
     const tableActionRef = useRef<ActionType>();
     const actionRef = useRef<ActionType>();
+    const [isflag,setIsFalg]=useState<boolean>(false);
+
 
     // const getPolicyBank =async(formRef : PolicyBankModel)=>{
     //     const sd = await 
     // }
+
+      /**上传文件 */
+  const [fileData, setFileData] = useState<File>();
+
+  // 导入窗口显示
+const [importVisible, setImportVisible] = useState<boolean>(false);
+
     const closeAndRefresh = ()=>{
       setVisible(false);
       actionRef.current?.reloadAndRest?.();
     }
-
+    const closeAndRefresh1 = ()=>{
+      setVisible(false);
+      actionRef.current?.reloadAndRest?.();
+    }
     const selectdata = async (record:any)=>{
       const sd =await selectPolicyBank(record.custName);
       console.log(sd);
       formRef.current?.setFieldsValue(sd);
+      if(sd.isSlowreleaseUse !="是"){
+        setIsFalg(false);
+      }else{ setIsFalg(true);}
    }
    const inst =  async(formData : PolicyBankModel) => {
     setEditType('create')
@@ -50,19 +65,19 @@ const policybankts: React.FC<aaa>= (prop : aaa) => {
   }
   
    const del = async(record:any)=>{
-    const delSovere =await deletePolicyBank(record.custName)  
+    baseFun.confirm("请确认是否继续操作。",
+    async()=>{await deletePolicyBank(record.custName)  
     closeAndRefresh();
     baseFun.info("删除成功");
-    console.log(delSovere);
+    })
     }
     const disdata = async (record:any)=>{
       const sd =await selectPolicyBank(record.custName);
       console.log(sd);
       formRef.current?.setFieldsValue(sd);
      // return {data :sd};
-     
-
    }
+   var formDataList = new Array<PolicyBankModel>;
 
     const columns: ProColumns<PolicyBankModel>[] = [
       { 
@@ -78,7 +93,7 @@ const policybankts: React.FC<aaa>= (prop : aaa) => {
          title: '起始数据日期',
          dataIndex: 'sdate', // 查询结果中的隐藏列
          valueType: 'date',
-       //  search: false,  //注调查询条件显示
+         search: false,  //注调查询条件显示
        //  hideInTable: true //注调字段列显示
        hideInTable:true,
          width:150, 
@@ -87,7 +102,7 @@ const policybankts: React.FC<aaa>= (prop : aaa) => {
        title: '截止数据日期',
        dataIndex: 'edate', // 查询结果中的隐藏列
        valueType: 'date',
-    //   search: false,
+       search: false,
        hideInTable: true,
          width:150, 
      },
@@ -107,40 +122,42 @@ const policybankts: React.FC<aaa>= (prop : aaa) => {
          width:150, 
      },
      { 
-        title: '保证人交易对手名称',
+        title: '交易对手名称',
         dataIndex: 'custName', // 查询结果中的隐藏列
        // search: true,
        // hideInTable: false
          width:150, 
      },
      { 
-        title: '缓释一级分类',
-        dataIndex: 'crmFirstLevel', // 查询结果中的隐藏列
-        search: false,
-       // hideInTable: true
-         width:150, 
+      title: '是否用于风险暴露划分',
+      dataIndex: 'isRiskclassUse', // 查询结果中的隐藏列
+      search: false,
+     // hideInTable: true
+      width:150, 
      },
      { 
-         title: '合格信用风险缓释工具类型',
-         dataIndex: 'qualfiedCreditToolTypeName', // 查询结果中的隐藏列
-         search: false,
-        // hideInTable: true
-         width:150, 
-     },
-     {
-         title: '基础缓释权重',
-         dataIndex: 'baseWeight', // 查询结果中的隐藏列
-         search: false,
-         //hideInTable: true
-         width:150, 
+      title: '是否用于合格缓释认定',
+      dataIndex: 'isSlowreleaseUse', // 查询结果中的隐藏列
+      search: false,
+     // hideInTable: true
+      width:150, 
      },
      { 
-         title: '豁免后缓释权重',
-         dataIndex: 'exemptionWeight', // 查询结果中的隐藏列
-         search: false,
-        // hideInTable: true
-         width:150, 
-     },
+      title: '缓释工具类型',
+      dataIndex: 'qualfiedCreditToolTypeName', // 查询结果中的隐藏列
+      search: false,
+    //  hideInTable: true,
+      width:150, 
+      
+  },
+  { 
+    title: '缓释权重',
+    dataIndex: 'exemptionWeight', // 查询结果中的隐藏列
+    search: false,
+    hideInTable: true,
+    width:150, 
+    
+},
         {
             title: '操作',
             dataIndex: 'operate',
@@ -172,23 +189,43 @@ const policybankts: React.FC<aaa>= (prop : aaa) => {
             >
               删除
             </SDOperate>,
-             <SDOperate
-             key="roleCfg"
-             icon={<WomanOutlined />}
-             successMessage=""
-             
-             onClick={()=>{ 
-              disdata(record);
-              closeAndRefresh();
-             setVisible(true);
-             setEditType('display')
-              } }
-           >
-             查看
-           </SDOperate>,
             ],
           },
           ]
+          const aa=()=>{
+            const displayFlsg = {display:"none"}
+          }
+            /**上传提交 */
+  const uploadSubmit = async () => {
+    if (!fileData) {
+      baseFun.warning('未上传文件');
+      return;
+    }
+    const res = await uploadAction(fileData);
+    if ('导入成功'===res) {
+      baseFun.info("处理完成");
+    } else {
+      baseFun.error(res);
+    }
+    setEditType('update');
+    setDetailVisible(false);
+};
+
+
+   // 模板下载
+   const templateUploadAction = async() => {
+    await templateUpload("policybank");
+   // baseFun.info("处理完成");
+  }
+    /**上传属性 */
+    const fileProps = {
+      onRemove: () => {
+      setFileData(undefined);
+     },
+      beforeUpload(info: any) {
+      setFileData(info);
+    },
+  };
 
     return(<SDPage >
         <SDTable 
@@ -196,36 +233,100 @@ const policybankts: React.FC<aaa>= (prop : aaa) => {
         rowKey="custName"
         request={async(formData : PolicyBankModel)=>{
             const sd = await getPolicyBank(formData);
+            formDataList =[...sd];
             return {data :sd };
           }}
           columns={columns}
           actionRef={actionRef}
           formRef={formRef}
-          operations={["create"]}
+         // operations={["create"]}
           //handleRemove={deletedata}
            setCurrentRow={setCurrentRow}
            setEditType={setEditType}
            setDetailVisible={setVisible}     
-      >
-
-
-        </SDTable>
+           toolBarRender={(_, { selectedRows }) => [
+            <SDButton
+              key="export"
+            //  successMessage='导出成功'
+              onClick={async () => {
+                exportExcelModel("policybank",formDataList);
+                //baseFun.info('处理完成');
+              }}
+            >
+              全部导出
+            </SDButton>,
+          <SDButton
+          key="import"
+          successMessage=''
+          onClick={() => {
+            baseFun.confirm("请注意本功能意在覆盖本表所有数据,请谨慎使用!",()=>{ setImportVisible(true);})
+          }}
+        >
+          覆盖导入
+        </SDButton>,
+         ]}  
+      />
+       
+        {importVisible && (
+         <SDModalForm
+        title={'上传文件窗口'}
+        visible={importVisible}
+        editType={editType}
+        onVisibleChange={() => {setImportVisible(false)}}
+        tableRef={actionRef}
+        footer={[
+        <SDSubmitButton  editType={'update'}  formRef={formRef} 
+          doSubmit={async() => {await uploadSubmit()}} >提交</SDSubmitButton>,
+          <SDButton
+          key="template"
+          onClick={() => {
+            templateUploadAction();
+          }}
+        >
+          模板下载
+        </SDButton>
+        ]
+        }
+        >
+         <SDFormItem nestType="form">
+            <Upload maxCount={1} {...fileProps} name="rfile">
+              <div style={{ paddingLeft: '5.5vw' }}>
+                选择上传文件: &nbsp;&nbsp;<SDOperate>上传</SDOperate>
+              </div>
+            </Upload>
+        </SDFormItem>
+        </SDModalForm>
+      )}
         { visible &&( 
   <SDModalForm  
    visible={visible}
    //rowKey="cust_NAME" 
    editType={editType} 
-   request={selectdata}
+   //request={selectdata}
    //params={setDataSource}
-   onVisibleChange={() => { setVisible(false) }}
-   footer={[<SDSubmitButton  editType={editType}   formRef={formRef} doSubmit={inst} >保存</SDSubmitButton>]}
+   onVisibleChange={() => { setVisible(false)  ; setIsFalg(false);}}
+   footer={[<SDSubmitButton  editType={editType}   formRef={formRef} doSubmit={inst} >保存</SDSubmitButton>,
+  <SDButton  successMessage="" onClick={()=>closeAndRefresh()}>关闭</SDButton>]}
    formRef={formRef}
+   onValuesChange={async (changedValues,Values) => {
+    if(Values.isSlowreleaseUse=="是" || Values.isSlowreleaseUse==1){      
+      setIsFalg(true);
+  }else{
+    setIsFalg(false);
+  }
+}
+}
  >
-  <SDFormText name="custName" label="保证人交易对手名称" readonlyCond='update' /> 
-<SDFormText name="crmFirstLevel" label="缓释一级分类"   />
-<SDFormText name="qualfiedCreditToolTypeName" label="合格信用风险缓释工具类型"   />
-<SDFormText name="baseWeight" label="基础缓释权重"   />
-<SDFormText name="exemptionWeight" label="豁免后缓释权重"   />
+  <SDFormText name="custName" label="交易对手名称"  required /> 
+<SDFormDict name="isRiskclassUse" label="是否用于风险暴露划分"  dictKey='YESORNO'  />
+<SDFormDict name="isSlowreleaseUse" label="是否用于合格缓释认定"  dictKey='YESORNO' />
+{isflag && (
+  <><SDFormText name="crmFirstLevel" label="缓释分类"  />
+<SDFormText name="qualfiedCreditToolTypeName" label="合格信用风险缓释工具类型"  required />
+<SDFormText name="exemptionWeight" label="缓释权重%" required  rules={ [{validator: validateFun.double,message:"请输入数字类型" }
+      ,{pattern :RegExp(`^\\d+\\.{${0},${1}}\\d{${0},${4}}$`),message:"小数位超位" }]}  
+      oldValue="%" /></>)}
+<SDFormText name="remark" label="备注"   max={(500)}/>
 </SDModalForm>
 )
 }   

+ 169 - 142
Procedure/frontend/projectb/src/pages/rdpMng/Template/Coding/components/sovereign.tsx

@@ -1,15 +1,17 @@
 import React, { useEffect, useRef, useState } from 'react';
-import { Button, Form, FormInstance, Input, Space, Tooltip } from 'antd';
-import { EditType, SDForm, SDFormDict, SDFormText, SDModal, SDModalForm, SDOperate, SDPage, SDSubmitButton, SDTable, baseFun, SDButton } from '@sundata/ui-frame';
-import { SovereignModel, deleteSovereign, getSovereign, inserteSovere, selectSovereign, exportExcelModel, selectSovereignCode } from '@/services/rwa/sovereign';
+import { Button, Form, FormInstance, Input, Space, Tooltip, Upload } from 'antd';
+import { EditType, SDForm, SDFormDict, SDFormText, SDModal, SDModalForm, SDOperate, SDPage, SDSubmitButton, SDTable, baseFun, SDButton, SDFormItem, validateFun } from '@sundata/ui-frame';
+import { SovereignModel, deleteSovereign, getSovereign, inserteSovere, selectSovereign, exportExcelModel, selectSovereignCode, updateSovereign, uploadAction, templateUpload } from '@/services/rwa/sovereign';
 import { ActionType, ProColumns } from '@ant-design/pro-table';
 import { ExportOutlined, WomanOutlined } from '@ant-design/icons';
 import { deletedata } from '@/services/idataMng/impandauditp';
 import { useModel } from '@umijs/max';
 import { ProFormInstance } from '@ant-design/pro-components';
+import { values } from 'lodash';
 
 type aaa = {
   custName ?:any;
+  sovereignCode ?:any;
   onCancel:  () => void;
   onChangeVisible(visible: boolean, type: string): unknown;
   onChangeVisdible:(visible:boolean,type ?: 'none' | 'raload' )=>void;
@@ -21,7 +23,6 @@ const sovereignts: React.FC<aaa>= (prop : aaa) => {
   const ref = prop.formRef;
     const [editType, setEditType] = useState<EditType>('update');
     const formRef = useRef<FormInstance<any>>();
-    const formRef1 = useRef<FormInstance<any>>();
       /** 当前行对象,查看详情、修改时,作为详细信息表单的查询条件  */
     const [currentRow, setCurrentRow] = useState<SovereignModel>();
     const [dataSource, setDataSource] = useState<any>() ;
@@ -29,11 +30,7 @@ const sovereignts: React.FC<aaa>= (prop : aaa) => {
 
     const [visible,setVisible] = useState<boolean>(false);//弹窗是否显示
 
-    const tableActionRef = useRef<ActionType>();
-
-    const SovereignModel = ( custName: string) => deleteSovereign(custName);
     const { fetchDict } = useModel('dict');
-
       /** 表格引用对象,刷新表格使用  */
   const actionRef = useRef<ActionType>();
     useEffect(() => {//初始化调用dealinitxmldomain
@@ -41,85 +38,61 @@ const sovereignts: React.FC<aaa>= (prop : aaa) => {
       }, []);
 
       var formDataList = new Array<SovereignModel>;
-
       
         const dealinit=async()=>{
-          console.log(1);
-          // const sd = await getSovereign(formData,"");
-          // return {data :sd};
-      //     if ( false){
-      //     const sd = await selectdata(prop);
-      //     formRef.current?.setFieldsValue(sd);
-
-      //     }else{
-      //   const sd =await getSovereign();
-      //   formRef.current?.setFieldsValue(sd);
-      //   return {data : sd};
-      // }
-      //  console.log(sd);
-       
-      //   //return getSovereign();
-        
       }
       const selectdata = async (record:any)=>{
         const sd =await selectSovereign(record.custName);
          formRef.current?.setFieldsValue(sd);
-      
     }
 
-   
-    const selectdata1=async()=>{
-      const sd = await selectSovereign;
-      
-      // console.log( sd);
-      //formRef.current?.setFieldValue('crmFirstLevel','保证');
-  }
-
       const closeAndRefresh = ()=>{
         setVisible(false);
         actionRef.current?.reloadAndRest?.();
       }
+      const closeAndRefresh1 = ()=>{
+        setImportVisible(false);
+        actionRef.current?.reloadAndRest?.();
+      }
 
       const disdata = async (record:any)=>{
         const sd =await selectSovereign(record.custName);
         console.log(sd);
         formRef.current?.setFieldsValue(sd);
-       // return {data :sd};
-       
-
      }
 
       const inst =  async(formData : SovereignModel) => {
         setEditType('create')
-        console.log(formData);
-        formRef.current?.getFieldValue(formData);
        const insSovere =await inserteSovere(formData)  
+       if("国家代码已重复,请重新选择"===insSovere){
+        baseFun.warning(insSovere);
+       }else{
+        baseFun.info(insSovere);
        closeAndRefresh();
-       console.log(insSovere);
+       }
       
       }
-
-      const del = async(record:any)=>{
-        const delSovere =await deleteSovereign(record.custName)  
-        closeAndRefresh();
-        baseFun.info("删除成功");
-        console.log(delSovere);
-        }
+        const state =async(record:any)=>{
+         baseFun.confirm("请确实是否继续操作" ,async()=>{
+          await updateSovereign(record.custName) 
+          closeAndRefresh();
+        })
+      }
 
       const columns: ProColumns<SovereignModel>[] = [
         { 
           title: '计算实例号',
           dataIndex: 'calcindex', // 查询结果中的隐藏列
-       //   search: false,
+          search: false,
           ellipsis: true,
-          hideInTable: true
-          ,width:150  
+          hideInTable: true,
+          width:150  
    },
        {
            title: '起始数据日期',
            dataIndex: 'sdate', // 查询结果中的隐藏列
            valueType: 'date',
-         //  search: false,  //注调查询条件显示
+           search: false,  //注调查询条件显示
            hideInTable: true ,//注调字段列显示
           width:150  
    },
@@ -127,7 +100,7 @@ const sovereignts: React.FC<aaa>= (prop : aaa) => {
          title: '截止数据日期',
          dataIndex: 'edate', // 查询结果中的隐藏列
          valueType: 'date',
-      //   search: false,
+         search: false,
          hideInTable: true,
           width:150  
    },
@@ -135,78 +108,80 @@ const sovereignts: React.FC<aaa>= (prop : aaa) => {
          title: '年月',
          dataIndex: 'term', // 查询结果中的隐藏列
          valueType:"dateMonth",
-       //  search: false,
-         hideInTable: true
-          ,width:150  
+         search: false,
+         hideInTable: true,
+          width:150  
    },
        { 
            title: '数据日期',
            dataIndex: 'dataDate', // 查询结果中的隐藏列
            valueType: 'date',
-       //    search: false,
+           search: false,
            hideInTable: true,
           width:150  
-   },
-       { 
-          title: '国家名称',
-          dataIndex: 'custName', // 查询结果中的隐藏列
-          search: false,
-         // hideInTable: false
-          width:150  ,
-        //  valueType: 'treeSelect',
-          // fieldProps: {
-          //   treeDefaultExpandAll: true,
-          //   treeCheckable: true,
-          // },
-          // request: () => fetchDict('region'),
    },
    {
     title: '国家代码',
     dataIndex: 'sovereignCode', // 查询结果中的隐藏列
-    search: false,
-   // hideInTable: true,
+   // search: false,
+    //hideInTable: true,
     width:150  
    },
        {
-          title: '主权评级(如有)',
+          title: '主权评级(标普)',
           dataIndex: 'sovereignRating', // 查询结果中的隐藏列
           search: false,
           //hideInTable: true
           width:150  
    },
        { 
-          title: '缓释一级分类',
+          title: '国家名称',
+          dataIndex: 'custName', // 查询结果中的隐藏列
+    //      search: false,
+          hideInTable: false,
+          width:150  ,
+   },
+       { 
+          title: '主权评级(标普)',
           dataIndex: 'crmFirstLevel', // 查询结果中的隐藏列
           search: false,
-         // hideInTable: true
+          hideInTable: true,
           width:150  
    },
        { 
            title: '合格信用风险缓释工具类型',
            dataIndex: 'qualfiedCreditToolTypeName', // 查询结果中的隐藏列
            search: false,
-          // hideInTable: true
+           hideInTable: true,
           width:180  
    },
        {
            title: '基础缓释权重',
            dataIndex: 'baseWeight', // 查询结果中的隐藏列
-           search: false,
-           //hideInTable: true
+           search: false,//查询条件隐藏
+           hideInTable: true,//放开字段隐藏
           width:150  
    },
        { 
            title: '豁免后缓释权重',
            dataIndex: 'exemptionWeight', // 查询结果中的隐藏列
            search: false,
-          // hideInTable: true
+           hideInTable: true,
           width:150  
    },
+   { 
+    title: '状态',
+    dataIndex: 'state', // 查询结果中的隐藏列
+    search: false,
+   // hideInTable: true
+   width:100  
+},
     {
         title: '操作',
         dataIndex: 'operate',
         valueType: 'option',
         render: (_, record) => [
+
           <SDOperate
             key="roleCfg"
             icon={<WomanOutlined />}
@@ -214,30 +189,17 @@ const sovereignts: React.FC<aaa>= (prop : aaa) => {
             
             onClick={()=>{ 
               selectdata(record);
-              
             setVisible(true);
             setEditType('update')
              } }
           >
             修改
           </SDOperate>,
-          <SDOperate
-          key="roleCfg"
-          icon={<WomanOutlined />}
-          successMessage=""
-          
-          onClick={()=>{ 
-            del(record);
-            
-           } }
-        >
-          删除
-        </SDOperate>,
+
          <SDOperate
          key="roleCfg"
          icon={<WomanOutlined />}
          successMessage=""
-         
          onClick={()=>{ 
           disdata(record);
           closeAndRefresh();
@@ -247,33 +209,60 @@ const sovereignts: React.FC<aaa>= (prop : aaa) => {
        >
          查看
        </SDOperate>,
+       <span style={record?.state==="作废" ? {display:'none'}: {}}>
+       <SDOperate
+       key="roleCfg"
+       icon={<WomanOutlined />}
+       successMessage=""
+       onClick={()=>{ 
+        state(record);
+        } }
+     >
+       作废
+     </SDOperate>,
+     </span>
         ],
       },
       ]
-     
-    //   const sd1 = async(formData:SovereignModel)=>{
-    //     console.log(2)
-    //   if(formData.custName ===undefined){
-    //     const sd = await getSovereign(formData,"");
-    //     formDataList=[...sd];
-    //     return {data :sd };
-    //   } else{
-    //     var value ="";
-    //     formData.custName.forEach(function(item){ value += item +","}); // 循环下拉树数组变成字符串
-    //     value= value.substring(0,value.length-1) // 去除最后一位,
-    //     let {custName,...Model1}=formData  // 重新解构对象 去除custName字段
-    //   const sd = await getSovereign(Model1,value);
-    //   return {data :sd };
-    //   }
-
-    // }
-
+  /**上传文件 */
+  const [fileData, setFileData] = useState<File>();
+      // 导入窗口显示
+   const [importVisible, setImportVisible] = useState<boolean>(false);
+   //初始化
     const sd1 = async(formData:SovereignModel)=>{
       const sd = await getSovereign(formData);
       formDataList =[...sd];
       return {data :sd };
     }
-
+    // 模板下载
+  const templateUploadAction = async() => {
+    await templateUpload("sovereign");
+   // baseFun.info("处理完成");
+  }
+    /**上传属性 */
+    const fileProps = {
+      onRemove: () => {
+      setFileData(undefined);
+     },
+      beforeUpload(info: any) {
+      setFileData(info);
+    },
+  };
+  /**上传提交 */
+  const uploadSubmit = async () => {
+    if (!fileData) {
+      baseFun.warning('未上传文件');
+      return;
+    }
+    const res = await uploadAction(fileData);
+    if ('导入成功'===res) {
+      baseFun.info("处理完成");
+    } else {
+      baseFun.error(res);
+    }
+    setEditType('update');
+    setDetailVisible(false);
+};
 
 return (
     <SDPage >
@@ -282,78 +271,116 @@ return (
       rowKey="custName"
       request={sd1}
       columns={columns}
-     //  singleSelect={false}
-    // operations={["create"]}
-      //displayColumn="custName"
      actionRef={actionRef}
      formRef={formRef}
-     //handleRemove={deletedata}
-      //setCurrentRow={setCurrentRow}
-     // setEditType={setEditType}
-     // setDetailVisible={setVisible}   
       toolBarRender={(_, { selectedRows }) => [
         <SDButton
           key="export"
-          successMessage='导出成功'
-          onClick={() => {
-            
-            // if (selectedRows === undefined || selectedRows.length < 1) {
-            //   baseFun.warning('请先选择要倒出的模板');
-            //   return;
-            // }
-            
-            exportExcelModel(formDataList);
+        //  successMessage='导出成功'
+          onClick={async () => {
+            exportExcelModel("sovereign",formDataList);
             //baseFun.info('处理完成');
           }}
         >
           全部导出
         </SDButton>,
+      <SDButton
+      key="import"
+      successMessage=''
+      onClick={() => {
+        baseFun.confirm("请注意本功能意在覆盖本表所有数据,请谨慎使用!",()=>{ setImportVisible(true);})
+       
+      }}
+    >
+      覆盖导入
+    </SDButton>,
         <SDButton
         key="create"
+        successMessage=''
         onClick={() => {
           setVisible(true);
           setEditType('create');
-          formRef.current?.setFieldValue('crmFirstLevel','保证');
         }}
         >
           新增
         </SDButton>
       ]}      
+       /> 
+        {importVisible && (
+         <SDModalForm
+        title={'上传文件窗口'}
+        visible={importVisible}
+        editType={editType}
+        onVisibleChange={() => {setImportVisible(false)}}
+        tableRef={actionRef}
+        footer={[
+        <SDSubmitButton  editType={'update'}  formRef={formRef}  successMessage=""
+          doSubmit={async() => { await uploadSubmit()}} >提交</SDSubmitButton>,
+          <SDButton
+          key="template"
+          onClick={() => {
+            templateUploadAction();
+          }}
+        >
+          模板下载
+        </SDButton>,
+         <SDButton
+         key="close"
+         onClick={() => {
+          closeAndRefresh1();
+         }}
        >
-        </SDTable>
-        
+         关闭
+       </SDButton>
+        ]
+        }
+        >
+         <SDFormItem nestType="form">
+            <Upload maxCount={1} {...fileProps} name="rfile">
+              <div style={{ paddingLeft: '5.5vw' }}>
+                选择上传文件: &nbsp;&nbsp;<SDOperate>上传</SDOperate>
+              </div>
+            </Upload>
+        </SDFormItem>
+        </SDModalForm>
+      )}
      { visible &&(
       <SDModalForm  
       visible={visible}
       //rowKey="custName" 
       editType={editType} 
-     // request={selectdata1}
+      //request={selectdata1}
       //params={setDataSource}
       onVisibleChange={() => { setVisible(false) }}
-      footer={[<SDSubmitButton  editType={editType}   formRef={formRef} doSubmit={inst} >保存</SDSubmitButton>]}
+      initialValues={{crmFirstLevel :'保证',sovereignCode:prop.sovereignCode,editType:setEditType}}
+      footer={[<SDSubmitButton  editType={editType}   formRef={formRef} successMessage="" doSubmit={inst} >保存</SDSubmitButton>,
+    <SDButton     successMessage="" onClick={()=>closeAndRefresh()} >关闭</SDButton>
+  ]}
       formRef={formRef}
       onValuesChange={async (changedValues,Values) => {
-        if(changedValues.custName!=undefined){      
-          const sd = await selectSovereignCode(changedValues.custName);
+        if(changedValues.sovereignCode!=undefined){      
+          const sd = await selectSovereignCode(changedValues.sovereignCode);
           console.log(sd);
-          formRef.current?.setFieldValue('sovereignCode',sd)}
-       // const jiaoyan=formRef.current?.getFieldsValue();
+          formRef.current?.setFieldValue('custName',sd)}
       }}
        >
-
-<SDFormDict name="custName" label="国家名称" readonlyCond='update' dictKey='@sovereignCode' /> 
-<SDFormText name="sovereignCode" label="国家代码"   readonlyCond='both'  />
+<SDFormDict name="sovereignCode" label="国家代码"   readonlyCond='update' dictKey='@sovereignCode' />
+<SDFormText name="custName" label="国家名称" readonlyCond='both'  /> 
       <SDFormDict name="sovereignRating" label="主权评级(标普)"   dictKey="sovereignRating"  />
       <SDFormText name="crmFirstLevel" label="缓释分类"   />
       <SDFormText name="qualfiedCreditToolTypeName" label="合格信用风险缓释工具类型"   />
-      <SDFormText name="baseWeight" label="缓释风险权重%"   />
+      <SDFormText name="exemptionWeight" label="缓释风险权重%"  rules={ [{validator: validateFun.double,message:"请输入数字类型" }
+      ,{pattern :RegExp(`^\\d+\\.{${0},${1}}\\d{${0},${4}}$`),message:"小数位超位" }]}  
+      oldValue="%"></SDFormText>   
+      <div style={{display:"none"}}><SDFormText name="editType" label="setEditType"   />
+      <SDFormText name="baseWeight"   label="基础缓释权重"  /> </div>
       </SDModalForm>
      )
      }   
-    
     </SDPage>
 );
 
-};export default sovereignts;
+}
+export default sovereignts;
 
 

+ 42 - 0
Procedure/frontend/projectb/src/services/rwa/faGlBalanceSheet.ts

@@ -0,0 +1,42 @@
+import { baseFun, DictTree, SDTable, SDTableProps,TableData } from "@sundata/ui-frame"
+
+export type FaGlBalanceSheetModel ={
+    //计算实例号
+calcindex : String;
+//起始数据日期
+sdate : String;
+//截止数据日期
+edate : String;
+//年月
+term : String;
+//数据日期
+dataDate : String;
+//报表日期
+reportDate : String;
+//账务机构编码
+finBranchNo : String;
+//账务机构名称
+finBranchName : String;
+//科目
+glCode : String;
+//科目描述
+subjectDesc : String;
+//当日借方余额
+deBalance : number;
+//当日贷方余额
+crBalance : number;
+
+}
+
+export async function getFaGlBalanceSheet(body:any){
+    return baseFun.request<FaGlBalanceSheetModel[]>('/api/product/rwa/parameter/FaGlBalanceSheetAction/getFaGlBalanceSheet',{
+        data:body
+    // dats:modelcode
+    })
+    ;
+}
+
+     /** 全部导出 */
+     export async function exportExcelModel(fileName:string,body:any) {
+        return baseFun.request('/api/product/rwa/parameter/FaGlBalanceSheetAction/exportExcelModel.do?fileName='+fileName,body);
+      }

+ 12 - 6
Procedure/frontend/projectb/src/services/rwa/fcCommitment.ts

@@ -16,7 +16,7 @@ loanReferenceNo : String ;
 //财务机构编号
 finBranchNo : String ; 
 //经营机构编号
-mgmtBranchNo : String ; 
+mgmtBranchNo : String[] ; 
 //业务类型
 busType : String ; 
 //客户编号
@@ -52,15 +52,21 @@ reserveAccount : String ;
 //核心客户号
 bpCustNo : String ; 
 //所属条线
-busLine : String ; 
+busLine : String[] ; 
 //承诺类型
-commType : String ; 
+commType : String[] ; 
 
 }
-export async function getFcCommitment(body:FcCommitmentModel){
-    return baseFun.request<TableData<FcCommitmentModel>>('/api/product/rwa/parameter/getFcCommitment',{
+export async function getFcCommitment(body:any){
+    return baseFun.request<FcCommitmentModel[]>('/api/product/rwa/parameter/FcCommitmentAction/getFcCommitment',{
         data:body
     // dats:modelcode
     })
     ;
-}
+    
+    
+}
+     /** 全部导出 */
+     export async function exportExcelModel(fileName:string,body:any) {
+        return baseFun.request('/api/product/rwa/parameter/FcCommitmentAction/exportExcelModel.do?fileName='+fileName,body);
+      }

+ 12 - 7
Procedure/frontend/projectb/src/services/rwa/fcLoan.ts

@@ -18,13 +18,13 @@ export type FcLoanModel ={
      //账务机构编号
      finBranchNo : String ; 
      //经营机构编号
-     mgmtBranchNo : String ; 
+     mgmtBranchNo : String[] ; 
      //客户编号
      custNo : String ; 
      //客户名称
      custName : String ; 
      //客户类型
-     custType : String ; 
+     custType : String[] ; 
      //产品编号
      productNo : String ; 
      //产品名称
@@ -62,7 +62,7 @@ export type FcLoanModel ={
      //准备金科目号
      reserveAccount : String ; 
      //行业投向门类
-     investIndustryCd : String ; 
+     investIndustryCd : String[] ; 
      //行业投向大类
      investIndustryCd1 : String ; 
      //行业投向中类
@@ -86,7 +86,7 @@ export type FcLoanModel ={
      //核心客户号
      bpCustNo : String ; 
      //所属条线
-     busLine : String ; 
+     busLine : String[] ; 
      //开证行名称
      openingBank : String ; 
      //开证行行号
@@ -95,10 +95,15 @@ export type FcLoanModel ={
      domDocFlag : String ; 
 
 }
-export async function getFcLoan(body:FcLoanModel){
-    return baseFun.request<TableData<FcLoanModel>>('/api/product/rwa/parameter/getFcLoan',{
+export async function getFcLoan(body:any){
+    return baseFun.request<FcLoanModel[]>('/api/product/rwa/parameter/FcLoanAction/getFcLoan',{
         data:body
     // dats:modelcode
     })
     ;
-}
+}
+
+     /** 全部导出 */
+     export async function exportExcelModel(fileName:string,body:any) {
+        return baseFun.request('/api/product/rwa/parameter/FcLoanAction/exportExcelModel.do?fileName='+fileName,body);
+      }

+ 9 - 5
Procedure/frontend/projectb/src/services/rwa/fcOffSheet.ts

@@ -18,7 +18,7 @@ contractNo : String ;
 //账务机构编号
 finBranchNo : String ; 
 //经营机构编号
-mgmtBranchNo : String ; 
+mgmtBranchNo : String[] ; 
 //客户编号
 custNo : String ; 
 //客户名称
@@ -70,7 +70,7 @@ domDocFlag : String ;
 //国内/国际证标签
 domInteFlag : String ; 
 //贸易类型代码
-tradeTypeCd : String ; 
+tradeTypeCd : String[] ; 
 //票号
 billNo : String ; 
 //核心客户号
@@ -81,10 +81,14 @@ lgType : String ;
 openingDt : String ; 
 
 }
-export async function getFcOffSheet(body:FcOffSheetModel){
-    return baseFun.request<TableData<FcOffSheetModel>>('/api/product/rwa/parameter/getFcOffSheet',{
+export async function getFcOffSheet(body:any){
+    return baseFun.request<FcOffSheetModel[]>('/api/product/rwa/parameter/FcOffSheetAction/getFcOffSheet',{
         data:body
     // dats:modelcode
     })
     ;
-}
+}
+ /** 全部导出 */
+ export async function exportExcelModel(fileName:string,body:any) {
+    baseFun.download('/api/product/rwa/parameter/FcOffSheetAction/exportExcelModel.do?fileName='+fileName,body);
+ }

+ 9 - 4
Procedure/frontend/projectb/src/services/rwa/ffRepo.ts

@@ -24,7 +24,7 @@ repoTypeCd : String ;
 //账务机构编号
 finBranchNo : String ; 
 //经营机构编号
-mgmtBranchNo : String ; 
+mgmtBranchNo : String[] ; 
 //客户编号
 custNo : String ; 
 //客户名称
@@ -72,10 +72,15 @@ coreMarketPartFlag : String ;
 
 }
 
-export async function getFfRepo(body:FfRepoModel){
-    return baseFun.request<TableData<FfRepoModel>>('/api/product/rwa/parameter/getFfRepo',{
+export async function getFfRepo(body:any){
+    return baseFun.request<FfRepoModel[]>('/api/product/rwa/parameter/FfRepoAction/getFfRepo',{
         data:body
     // dats:modelcode
     })
     ;
-}
+}
+
+ /** 全部导出 */
+ export async function exportExcelModel(fileName:string,body:any) {
+    baseFun.download('/api/product/rwa/parameter/FfRepoAction/exportExcelModel.do?fileName='+fileName,body);
+ }

+ 25 - 6
Procedure/frontend/projectb/src/services/rwa/govFinancialAssetComp.ts

@@ -25,8 +25,8 @@ notes : String;
 }& BasePageModel;
 
 
-export async function getGovFinancialAssetComp(body:GovFinancialAssetCompModel){
-    return baseFun.request<TableData<GovFinancialAssetCompModel>>('/api/product/rwa/parameter/getGovFinancialAssetComp',{
+export async function getGovFinancialAssetComp(body:any){
+    return baseFun.request<GovFinancialAssetCompModel[]>('/api/product/rwa/parameter/GovFinancialAssetCompAction/getGovFinancialAssetComp',{
         data:body
     // dats:modelcode
     })
@@ -34,7 +34,7 @@ export async function getGovFinancialAssetComp(body:GovFinancialAssetCompModel){
 }
 
 export async function deleteGovFinancialAssetComp(name :String){
-    return baseFun.request<GovFinancialAssetCompModel>('/api/product/rwa/parameter/deleteGovFinancialAssetComp',{
+    return baseFun.request<GovFinancialAssetCompModel>('/api/product/rwa/parameter/GovFinancialAssetCompAction/deleteGovFinancialAssetComp',{
         params:{name}
     // dats:modelcode
     })
@@ -42,7 +42,7 @@ export async function deleteGovFinancialAssetComp(name :String){
 }
 
 export async function selectGovFinancialAssetComp(name :String){
-    return baseFun.request<GovFinancialAssetCompModel>('/api/product/rwa/parameter/selectGovFinancialAssetComp',{
+    return baseFun.request<GovFinancialAssetCompModel>('/api/product/rwa/parameter/GovFinancialAssetCompAction/selectGovFinancialAssetComp',{
         params:{name}
     // dats:modelcode
     })
@@ -50,9 +50,28 @@ export async function selectGovFinancialAssetComp(name :String){
 }
 
 export async function inserteGovFinancialAssetComp(body :GovFinancialAssetCompModel){
-    return baseFun.request<TableData<GovFinancialAssetCompModel>>('/api/product/rwa/parameter/inserteGovFinancialAssetComp',{
+    return baseFun.request<TableData<GovFinancialAssetCompModel>>('/api/product/rwa/parameter/GovFinancialAssetCompAction/inserteGovFinancialAssetComp',{
         data:body
     // dats:modelcode
     })
     ;
-}
+}
+
+ /** 全部导出 */
+ export async function exportExcelModel(fileName:string,body:any) {
+    baseFun.download('/api/product/rwa/parameter/GovFinancialAssetCompAction/exportExcelModel.do?fileName='+fileName,body);
+ }
+
+     //上传
+export async function uploadAction(file?: File) {
+    const data = {rfile:file};
+    const url = "/api/product/rwa/parameter/GovFinancialAssetCompAction/importExcelModel.do";
+    const res = baseFun.upload(url,data,'rfile');
+    return res;
+  }
+
+    /** 模板下载 */
+    export async function templateUpload(fileName:string) {
+        const url = "/api/product/rwa/parameter/GovFinancialAssetCompAction/templateUploadModel.do?fileName="+fileName;
+        const res = baseFun.download(url,null);
+      }

+ 32 - 0
Procedure/frontend/projectb/src/services/rwa/itItfRate.ts

@@ -0,0 +1,32 @@
+import { baseFun, DictTree, SDTable, SDTableProps,TableData } from "@sundata/ui-frame"
+
+export type ItItfRateModel ={
+    //计算实例号
+calcindex : String;
+//起始数据日期
+sdate : String;
+//截止数据日期
+edate : String;
+//期次
+term : String;
+//数据日期
+dataDate : String;
+//币种
+currcd : String[];
+//人民币汇率
+rmbexchrate : number;
+
+}
+
+export async function getItItfRate(body:any){
+    return baseFun.request<ItItfRateModel[]>('/api/product/rwa/parameter/ItItfRateAction/getItItfRate',{
+        data:body
+    // dats:modelcode
+    })
+    ;
+}
+
+     /** 全部导出 */
+     export async function exportExcelModel(fileName:string,body:any) {
+        return baseFun.request('/api/product/rwa/parameter/ItItfRateAction/exportExcelModel.do?fileName='+fileName,body);
+      }

+ 4 - 4
Procedure/frontend/projectb/src/services/rwa/norepurchasePledgeInfo.ts

@@ -48,7 +48,7 @@ export type norepurchasePledgeInfoModel={
 
 
 export async function getNoRepurchasePledgeInfo(body:norepurchasePledgeInfoModel){
-    return baseFun.request<TableData<norepurchasePledgeInfoModel>>('/api/product/rwa/parameter/getNoRepurchasePledgeInfo',{
+    return baseFun.request<TableData<norepurchasePledgeInfoModel>>('/api/product/rwa/parameter/NoRepurchasePledgeInfoAction/getNoRepurchasePledgeInfo',{
         data:body
     // dats:modelcode
     })
@@ -57,7 +57,7 @@ export async function getNoRepurchasePledgeInfo(body:norepurchasePledgeInfoModel
 
 
 export async function deleteNoRepurchasePledgeInfo(crmTypeCd2 :String,crmTypeCd3 :String,crmTypeCd4:string,crmTypeCd5:string,crmName2 :String,crmName3 :String,crmName4:string,crmName5:string,qualfiedCreditToolType:String){
-    return baseFun.request<norepurchasePledgeInfoModel>('/api/product/rwa/parameter/deleteNoRepurchasePledgeInfo',{
+    return baseFun.request<norepurchasePledgeInfoModel>('/api/product/rwa/parameter/NoRepurchasePledgeInfoAction/deleteNoRepurchasePledgeInfo',{
         params:{crmTypeCd2,crmTypeCd3,crmTypeCd4,crmTypeCd5,crmName2,crmName3,crmName4,crmName5,qualfiedCreditToolType}
     // dats:modelcode
     })
@@ -65,7 +65,7 @@ export async function deleteNoRepurchasePledgeInfo(crmTypeCd2 :String,crmTypeCd3
 }
 
 export async function selectNoRepurchasePledgeInfo(crmTypeCd2 :String,crmTypeCd3 :String,crmTypeCd4:string,crmTypeCd5:string,crmName2 :String,crmName3 :String,crmName4:string,crmName5:string,qualfiedCreditToolType:String){
-    return baseFun.request<norepurchasePledgeInfoModel>('/api/product/rwa/parameter/selectNoRepurchasePledgeInfo',{
+    return baseFun.request<norepurchasePledgeInfoModel>('/api/product/rwa/parameter/NoRepurchasePledgeInfoAction/selectNoRepurchasePledgeInfo',{
         params:{crmTypeCd2,crmTypeCd3,crmTypeCd4,crmTypeCd5,crmName2,crmName3,crmName4,crmName5,qualfiedCreditToolType}
     // dats:modelcode
     })
@@ -73,7 +73,7 @@ export async function selectNoRepurchasePledgeInfo(crmTypeCd2 :String,crmTypeCd3
 }
 
 export async function inserteNoRepurchasePledgeInfo(body :norepurchasePledgeInfoModel){
-    return baseFun.request<TableData<norepurchasePledgeInfoModel>>('/api/product/rwa/parameter/inserteNoRepurchasePledgeInfo',{
+    return baseFun.request<TableData<norepurchasePledgeInfoModel>>('/api/product/rwa/parameter/NoRepurchasePledgeInfoAction/inserteNoRepurchasePledgeInfo',{
         data:body
     // dats:modelcode
     })

+ 29 - 6
Procedure/frontend/projectb/src/services/rwa/policybank.ts

@@ -21,11 +21,15 @@ export type PolicyBankModel ={
     baseWeight:String;
     //豁免后缓释权重
     exemptionWeight:String;
+    //是否用于风险暴露划分
+    isRiskclassUse:String;
+    //是否用于合格缓释认定
+    isSlowreleaseUse:String;
 }
 
 
-export async function getPolicyBank(body:PolicyBankModel){
-    return baseFun.request<TableData<PolicyBankModel>>('/api/product/rwa/parameter/getPolicyBank',{
+export async function getPolicyBank(body:any){
+    return baseFun.request<PolicyBankModel[]>('/api/product/rwa/parameter/PolicyBankAction/getPolicyBank',{
         data:body
     // dats:modelcode
     })
@@ -33,7 +37,7 @@ export async function getPolicyBank(body:PolicyBankModel){
 }
 
 export async function deletePolicyBank(custName :String){
-    return baseFun.request<PolicyBankModel>('/api/product/rwa/parameter/deletePolicyBank',{
+    return baseFun.request<PolicyBankModel>('/api/product/rwa/parameter/PolicyBankAction/deletePolicyBank',{
         params:{custName}
     // dats:modelcode
     })
@@ -41,7 +45,7 @@ export async function deletePolicyBank(custName :String){
 }
 
 export async function selectPolicyBank(custName :String){
-    return baseFun.request<PolicyBankModel>('/api/product/rwa/parameter/selectPolicyBank',{
+    return baseFun.request<PolicyBankModel>('/api/product/rwa/parameter/PolicyBankAction/selectPolicyBank',{
         params:{custName}
     // dats:modelcode
     })
@@ -49,9 +53,28 @@ export async function selectPolicyBank(custName :String){
 }
 
 export async function insertePolicyBank(body :PolicyBankModel){
-    return baseFun.request<TableData<PolicyBankModel>>('/api/product/rwa/parameter/insertePolicyBank',{
+    return baseFun.request<TableData<PolicyBankModel>>('/api/product/rwa/parameter/PolicyBankAction/insertePolicyBank',{
         data:body
     // dats:modelcode
     })
     ;
-}
+}
+
+  /** 全部导出 */
+  export async function exportExcelModel(fileName:string,body:any) {
+    baseFun.download('/api/product/rwa/parameter/PolicyBankAction/exportExcelModel.do?fileName='+fileName,body);
+ }
+
+     //上传
+export async function uploadAction(file?: File) {
+    const data = {rfile:file};
+    const url = "/api/product/rwa/parameter/PolicyBankAction/importExcelModel.do";
+    const res = baseFun.upload(url,data,'rfile');
+    return res;
+  }
+
+    /** 模板下载 */
+    export async function templateUpload(fileName:string) {
+        const url = "/api/product/rwa/parameter/PolicyBankAction/templateUploadModel.do?fileName="+fileName;
+        const res = baseFun.download(url,null);
+      }

+ 4 - 4
Procedure/frontend/projectb/src/services/rwa/repurchasePledgeInfo.ts

@@ -40,7 +40,7 @@ export type repurchasePledgeInfoModel={
 
 
 export async function getRepurchasePledgeInfo(body:repurchasePledgeInfoModel){
-    return baseFun.request<TableData<repurchasePledgeInfoModel>>('/api/product/rwa/parameter/getRepurchasePledgeInfo',{
+    return baseFun.request<TableData<repurchasePledgeInfoModel>>('/api/product/rwa/parameter/RepurchasePledgeInfoAction/getRepurchasePledgeInfo',{
         data:body
     // dats:modelcode
     })
@@ -49,7 +49,7 @@ export async function getRepurchasePledgeInfo(body:repurchasePledgeInfoModel){
 
 
 export async function deleteRepurchasePledgeInfo(qualfiedCreditToolType :String,secClassificationCd :String){
-    return baseFun.request<repurchasePledgeInfoModel>('/api/product/rwa/parameter/deleteRepurchasePledgeInfo',{
+    return baseFun.request<repurchasePledgeInfoModel>('/api/product/rwa/parameter/RepurchasePledgeInfoAction/deleteRepurchasePledgeInfo',{
         params:{qualfiedCreditToolType,secClassificationCd}
     // dats:modelcode
     })
@@ -57,7 +57,7 @@ export async function deleteRepurchasePledgeInfo(qualfiedCreditToolType :String,
 }
 
 export async function selectRepurchasePledgeInfo(qualfiedCreditToolType :String,secClassificationCd :String){
-    return baseFun.request<repurchasePledgeInfoModel>('/api/product/rwa/parameter/selectRepurchasePledgeInfo',{
+    return baseFun.request<repurchasePledgeInfoModel>('/api/product/rwa/parameter/RepurchasePledgeInfoAction/selectRepurchasePledgeInfo',{
         params:{qualfiedCreditToolType,secClassificationCd}
     // dats:modelcode
     })
@@ -65,7 +65,7 @@ export async function selectRepurchasePledgeInfo(qualfiedCreditToolType :String,
 }
 
 export async function inserteRepurchasePledgeInfo(body :repurchasePledgeInfoModel){
-    return baseFun.request<TableData<repurchasePledgeInfoModel>>('/api/product/rwa/parameter/inserteRepurchasePledgeInfo',{
+    return baseFun.request<TableData<repurchasePledgeInfoModel>>('/api/product/rwa/parameter/RepurchasePledgeInfoAction/inserteRepurchasePledgeInfo',{
         data:body
     // dats:modelcode
     })

+ 35 - 14
Procedure/frontend/projectb/src/services/rwa/sovereign.ts

@@ -26,6 +26,8 @@ export type SovereignModel={
     // 豁免后缓释权重
     exemptionWeight : number;
     roleStr?: string;//操作列
+    editType?: String;//新增,修改标志 
+    state ?: String;
 
 }& BasePageModel;
 
@@ -36,7 +38,7 @@ export type SovereignModelts ={
 
 export async function getSovereign(body:any){
 
-    return baseFun.request<SovereignModel[]>('/api/product/rwa/parameter/getSovereign',{
+    return baseFun.request<SovereignModel[]>('/api/product/rwa/parameter/SovereignAction/getSovereign',{
         data:body,
     // dats:modelcode
     })
@@ -45,7 +47,15 @@ export async function getSovereign(body:any){
 
 
 export async function deleteSovereign(custName :String){
-    return baseFun.request<SovereignModel>('/api/product/rwa/parameter/deleteSovereign',{
+    return baseFun.request<SovereignModel>('/api/product/rwa/parameter/SovereignAction/deleteSovereign',{
+        params:{custName}
+    // dats:modelcode
+    })
+    ;
+}
+
+export async function updateSovereign(custName :String){
+    return baseFun.request<SovereignModel>('/api/product/rwa/parameter/SovereignAction/updateSovereign',{
         params:{custName}
     // dats:modelcode
     })
@@ -53,7 +63,7 @@ export async function deleteSovereign(custName :String){
 }
 
 export async function selectSovereign(custName ?:any){
-    return baseFun.request<SovereignModel>('/api/product/rwa/parameter/selectSovereign',{
+    return baseFun.request<SovereignModel>('/api/product/rwa/parameter/SovereignAction/selectSovereign',{
         params:{custName}
     // dats:modelcode
     })
@@ -61,23 +71,34 @@ export async function selectSovereign(custName ?:any){
 }
 
 export async function inserteSovere(body :SovereignModel){
-    return baseFun.request<TableData<SovereignModel>>('/api/product/rwa/parameter/insertSovereign',{
+    return baseFun.request<any>('/api/product/rwa/parameter/SovereignAction/insertSovereign',{
         data:body
     // dats:modelcode
     });
-
 }
-
-
      /** 全部导出 */
-     export async function exportExcelModel(body: SovereignModel[]) {
-        return baseFun.request('/api/product/rwa/parameter/exportExcelModel.do', { data:body });
-      }
+     export async function exportExcelModel(fileName:string,body:any) {
+        baseFun.download('/api/product/rwa/parameter/SovereignAction/exportExcelModel.do?fileName='+fileName,body);
+     }
 
-      export async function selectSovereignCode(custName :any){
-        return baseFun.request<any>('/api/product/rwa/parameter/selectSovereignCode',{
-            params:{custName}
+      export async function selectSovereignCode(sovereignCode :any){
+        return baseFun.request<any>('/api/product/rwa/parameter/SovereignAction/selectSovereignCode',{
+            params:{sovereignCode}
         // dats:modelcode
         });
     
-    }
+    }
+    //上传
+export async function uploadAction(file?: File) {
+    //const rptJsonStr = JSON.stringify(rpt);
+    const data = {rfile:file};
+    const url = "/api/product/rwa/parameter/SovereignAction/importExcelModel.do";
+    const res = baseFun.upload(url,data,'rfile');
+    return res;
+  }
+  
+  /** 模板下载 */
+  export async function templateUpload(fileName:string) {
+    const url = "/api/product/rwa/parameter/SovereignAction/templateUploadModel.do?fileName="+fileName;
+    const res = baseFun.download(url,null);
+  }