资金上报对接

This commit is contained in:
潘晓云
2022-03-31 17:58:06 +08:00
parent 0772564f08
commit 2ad18a13c0
5 changed files with 98 additions and 26 deletions

View File

@ -1,5 +1,5 @@
<nz-spin [nzSpinning]="service.http.loading"></nz-spin>
<st #st [scroll]="{x:'1000px'}" [data]="service.$api_get_order_reporting_page" [columns]="columns"
<st #st [scroll]="{x:'1000px'}" [data]="service.$api_get_fund_valid_result" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [page]="{ show: false}" [loading]="false"
[bordered]="true">

View File

@ -19,7 +19,7 @@ export class DatatableReportingFundInfoComponent implements OnInit {
get reqParams() {
return {};
return { capitalCode: this?.record?.orderCode };
}
constructor(public service: ReportingService, private modalRef: NzModalRef, public router: Router) {
@ -35,13 +35,34 @@ export class DatatableReportingFundInfoComponent implements OnInit {
initST() {
this.columns = [
{ title: '序号', type: 'no', className: 'text-center', width: '60px', },
{ title: '监管平台字段', index: 'orderStatus', className: 'text-center', width: '120px', },
{ title: '系统字段', index: 'orderStatus', className: 'text-center', width: '100px', },
{ title: '监管平台字段', index: 'thirdPartyFieldName', className: 'text-center', width: '120px', },
{ title: '系统字段', index: 'checkFieldName', className: 'text-center', width: '100px', },
{ title: '归属模块', index: 'orderStatus', className: 'text-center', width: '120px', },
{ title: '是否必填', index: 'orderStatus', className: 'text-center', width: '100px', },
{ title: '上传值', index: 'orderStatus', className: 'text-center', width: '150px', },
{ title: '本地校验', index: 'orderStatus', className: 'text-center', width: '100px', },
{ title: '错误内容', index: 'orderStatus', className: 'text-center', width: '150px', },
{
title: '是否必填',
index: 'orderStatus',
className: 'text-center',
width: '100px',
type: 'enum',
enum: {
'0': '非必填',
'1': '必填',
},
},
{ title: '上传值', index: 'fieldValue', className: 'text-center', width: '150px', },
{
title: '本地校验',
index: 'checkStatus',
className: 'text-center',
type: 'enum',
enum: {
'0': '校验中',
'1': '通过',
'2': '不通过'
},
width: '100px',
},
{ title: '错误内容', index: 'remark', className: 'text-center', width: '150px', },
]
}
@ -71,4 +92,5 @@ export class DatatableReportingFundInfoComponent implements OnInit {
}
}

View File

@ -28,7 +28,8 @@
<st #st [scroll]="{x:'1200px'}" [data]="service.$api_get_fund_reporting_page" [columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10,20, 50, 100] }" [loading]="false">
[page]="{ show: true, showSize: true, pageSizes: [1,10,20, 50, 100] }" [loading]="false"
(change)="changeSt($event)">
<ng-template st-row="uploadStatus" let-item>
<span [ngClass]="{'text-red-dark':item?.uploadStatus === '4'}">{{item?.billStatusLabel}}</span>
</ng-template>
@ -48,10 +49,10 @@
<span *ngIf="item?.billStatus !== '2'">{{item?.billStatusLabel}}</span>
</ng-template>
<ng-template st-row="tolalAmount" let-item let-index="index">
<div class="text-right">{{item?.tolalAmount | currency :' '}}</div>
<div class="text-right">{{item?.tolalAmount | currency }}</div>
</ng-template>
<ng-template st-row="payAmount" let-item let-index="index">
<div class="text-right">{{item?.payAmount | currency :' '}}</div>
<div class="text-right">{{item?.payAmount | currency }}</div>
</ng-template>
</st>
</nz-card>

View File

@ -1,10 +1,11 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STColumn, STComponent, STData } from '@delon/abc/st';
import { STChange, STColumn, STComponent, STData } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
import { ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { ReportingService } from '../../services/reporting.service';
import { DatatableReportingFundInfoComponent } from '../fund-info/fund-info.component';
import { DatatableReportingUploadSettingComponent } from '../upload-setting/upload-setting.component';
import { DatatableReportingVerifyResultComponent } from '../verify-result/verify-result.component';
@ -30,6 +31,7 @@ export class DatatableFundReportingComponent implements OnInit {
];
selectedIndex = '1'; //选择的项目
serviceTel = '';
selectedRows: any[] = [];
constructor(
public service: ReportingService,
private router: Router,
@ -51,7 +53,7 @@ export class DatatableFundReportingComponent implements OnInit {
*/
get reqParams() {
const params = Object.assign({}, this.sf?.value || {}, {
uploadStatus: this.selectedIndex,
uploadStatus: this.selectedIndex
});
delete params._$expand;
return { ...params };
@ -60,9 +62,9 @@ export class DatatableFundReportingComponent implements OnInit {
/**
* 选中行
*/
get selectedRows() {
return this.st?.list.filter((item: any) => item.checked) || [];
}
// get selectedRows() {
// return this.st?.list.filter((item: any) => item.checked) || [];
// }
/**
* 伸缩查询条件
@ -217,12 +219,12 @@ export class DatatableFundReportingComponent implements OnInit {
{ title: '', type: 'checkbox', className: 'text-center', width: '60px', },
{ title: '上传状态', render: 'uploadStatus', className: 'text-center', width: '120px', },
{ title: '本地校验', render: 'verifyStatus', className: 'text-center', width: '120px', },
{ title: '流水单号', index: 'serialNumberCode', className: 'text-center', width: '150px', },
{ title: '流水单号', index: 'serialNumberCode', className: 'text-center', width: '190px', },
{
title: '订单号',
render: 'orderCode',
className: 'text-center',
width: '150px',
width: '180px',
},
{ title: '运单号', render: 'wayBillCode', className: 'text-center', width: '150px', },
{
@ -243,9 +245,9 @@ export class DatatableFundReportingComponent implements OnInit {
{ title: '收款银行', index: 'bankTypeLabel', className: 'text-center', width: '200px' },
{ title: '银行流水号', index: 'bankSerialNumber', className: 'text-center', width: '150px' },
{ title: '银行流水号', index: 'bankSerialNumber', className: 'text-center', width: '180px' },
{ title: '实际支付金额', render: 'payAmount', className: 'text-center', width: '150px' },
{ title: '交易时间', index: 'transactionTime', className: 'text-center', width: '150px' },
{ title: '交易时间', index: 'transactionTime', className: 'text-center', width: '180px' },
{ title: '上传次数', index: 'uploadFrequency', className: 'text-center', width: '120px' },
{ title: '上传时间', index: 'uploadTime', className: 'text-center', width: '180px' },
];
@ -268,9 +270,11 @@ export class DatatableFundReportingComponent implements OnInit {
nzOkText: '确定',
nzCancelText: '取消',
nzOnOk: () => {
this.service.request(this.service.$api_recall_reporting, { rows: this.selectedRows }).subscribe((res: any) => {
const ids = this.selectedRows.map(i => i?.id);
this.service.request(this.service.$api_fund_reporting_recall, ids).subscribe((res: any) => {
if (res) {
this.service.msgSrv.success('撤销成功');
this.search();
}
})
@ -326,7 +330,8 @@ export class DatatableFundReportingComponent implements OnInit {
this.openWainingModal('请选择需要上传的数据');
return;
}
this.service.request(this.service.$api_recall_reporting, { rows: this.selectedRows }).subscribe((res: any) => {
const ids = this.selectedRows.map(i => i?.id);
this.service.request(this.service.$api_fund_reporting_upload, ids).subscribe((res: any) => {
if (res) {
this.service.msgSrv.success('上传成功');
this.search();
@ -354,13 +359,13 @@ export class DatatableFundReportingComponent implements OnInit {
/**
* 查看校验结果
*/
viewResult(item: any) {
viewResult(record: any) {
const modalRef = this.modal.create({
nzTitle: '校验结果',
nzWidth: 1200,
nzContent: DatatableReportingVerifyResultComponent,
nzContent: DatatableReportingFundInfoComponent,
nzComponentParams: {
record: item
record
},
nzFooter: null
});
@ -380,6 +385,7 @@ export class DatatableFundReportingComponent implements OnInit {
search() {
this.selectedRows = [];
this.st.load(1);
}
@ -398,5 +404,45 @@ export class DatatableFundReportingComponent implements OnInit {
})
}
changeSt(e: STChange): void {
if (e.type === 'checkbox') {
const checkRows = (e.checkbox as STData[]) || [];
//判断当前页是否有选中的行
if (checkRows.length === 0) {
// 当前页没有存在已勾选的行,移除之前所记录的当前页的行
const stList = this.st.list;
stList.forEach(item => {
this.selectedRows = this.selectedRows.filter((e: any) => e.id !== item.id);
})
} else {
//添加新增的行
checkRows.forEach((item: any) => {
const newSelectedList = this.selectedRows.filter((r: any) => r.id === item.id);
if (newSelectedList.length === 0) {
this.selectedRows.push(item);
}
})
// 移除取消选中的行
const stList = this.st.list;
stList.forEach(item => {
if (!item.checked) {
const index = this.selectedRows.findIndex(_item => item.id === _item.id);
if (index !== -1) this.selectedRows.splice(index, 1);
}
})
}
} else if (e.type === 'loaded') {
// 页面加载时勾选
(e?.loaded || []).forEach((r: any) => {
this.selectedRows.forEach((x) => {
if (x.id === r.id) {
r.checked = true;
}
});
});
}
}
}

View File

@ -12,7 +12,10 @@ export class ReportingService extends BaseService {
$api_get_upload_setting = ``; // 修改上传设置
$api_upload_setting_save = ``; // 修改上传设置
$api_get_fund_reporting_page = `/api/fcc/fundUploadHead/list/page`;
$api_get_fund_reporting_page = `/api/fcc/fundUploadHead/list/page`; // 资金上报列表
$api_fund_reporting_upload = `/api/fcc/fundUploadHead/uploadFundNumber`; // 资金批量上传
$api_fund_reporting_recall = `/api/fcc/fundUploadHead/recallUploadFundNumber`; //资金批量撤回
$api_get_fund_valid_result = `/api/fcc/capitalFieldCheck/getCapitalFieldCheckList`; // 查询资金校验表
constructor(public injector: Injector) {
super(injector);
}