账户明细接口对接
This commit is contained in:
@ -1,27 +1,27 @@
|
||||
<page-header-wrapper [title]="'合伙人账户明细'" [logo]="logo">
|
||||
<ng-template #logo>
|
||||
<button nz-button (click)="goBack()">
|
||||
<!-- <button nz-button (click)="goBack()">
|
||||
<i nz-icon nzType="left" nzTheme="outline"></i>
|
||||
</button>
|
||||
</button> -->
|
||||
</ng-template>
|
||||
</page-header-wrapper>
|
||||
<nz-card>
|
||||
<sv-container layout="vertical" [noColon]="true" col="4">
|
||||
<sv [label]="labelTpl">
|
||||
<b class="text-md ">{{accountInfo?.company}}</b>
|
||||
<b class="text-md ">{{headerTotalInfo?.ltdName}}</b>
|
||||
</sv>
|
||||
<sv label="可用余额">
|
||||
{{totalInfo?.balance |currency}}
|
||||
{{headerTotalInfo?.balance |currency}}
|
||||
</sv>
|
||||
<sv label="收入金额">
|
||||
{{totalInfo?.income |currency}}
|
||||
{{headerTotalInfo?.income |currency}}
|
||||
</sv>
|
||||
<sv label="支出金额">
|
||||
{{totalInfo?.spending |currency}}
|
||||
{{headerTotalInfo?.spending |currency}}
|
||||
</sv>
|
||||
</sv-container>
|
||||
<ng-template #labelTpl>
|
||||
<b class="text-md" style="color: black;">{{accountInfo?.name}} {{accountInfo?.phone}}</b>
|
||||
<b class="text-md" style="color: black;">{{headerTotalInfo?.name}} {{headerTotalInfo?.phone}}</b>
|
||||
</ng-template>
|
||||
</nz-card>
|
||||
<nz-card>
|
||||
@ -40,7 +40,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-content">
|
||||
<st #st [data]="service.$api_get_account_management_page " [columns]="columns"
|
||||
<st #st [data]="service.$api_get_account_detail_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: [5,10, 20, 50, 100, 200, 500] }"
|
||||
@ -49,13 +49,17 @@
|
||||
<div *ngIf="item.incomeType === '1'"> - {{item.amount | currency }}</div>
|
||||
<div *ngIf="item.incomeType === '2'"> + {{item.amount | currency }}</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="accountBalance" let-item>
|
||||
<div class="text-right">{{item?.accountBalance |currency}}</div>
|
||||
</ng-template>
|
||||
|
||||
</st>
|
||||
<div class="total-footer text-md" *ngIf="st?.list?.length !== 0 ">
|
||||
合计 <label class="text-red-dark">{{ totalInfo?.total }}</label> 项,收入 <label
|
||||
合计 <label class="text-red-dark">{{ footerTotalInfo?.total }}</label> 项,收入 <label
|
||||
class="text-red-dark font-weight-bold">{{
|
||||
totalInfo?.income | currency
|
||||
footerTotalInfo?.income | currency
|
||||
}}</label>,支出 <label class="text-red-dark font-weight-bold">{{
|
||||
totalInfo?.spending | currency }}</label>
|
||||
footerTotalInfo?.spending | currency }}</label>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
@ -10,17 +11,20 @@ import { AccountManagemantService } from '../../services/account-managemant.serv
|
||||
styleUrls: ['./account-detail.component.less']
|
||||
})
|
||||
export class PartnerAccountManagementAccountDetailComponent implements OnInit {
|
||||
totalInfo: any = {
|
||||
balance: 0,
|
||||
income: 1500,
|
||||
spending: 2400,
|
||||
total: 186
|
||||
headerTotalInfo: any = {
|
||||
allAmount: 0,
|
||||
incomeAmount: 0,
|
||||
payAmount: 0,
|
||||
name: '',
|
||||
ltdName: '',
|
||||
phone: ''
|
||||
};
|
||||
accountInfo = {
|
||||
name: '张三',
|
||||
phone: '13812345678',
|
||||
company: '天津怡亚通物流科技有限公司(平安)'
|
||||
}
|
||||
footerTotalInfo: any = {
|
||||
incomeAmount: 0,
|
||||
payAmount: 0,
|
||||
total: 0
|
||||
};
|
||||
|
||||
|
||||
url = `/user`;
|
||||
schema: SFSchema = {};
|
||||
@ -31,14 +35,27 @@ export class PartnerAccountManagementAccountDetailComponent implements OnInit {
|
||||
|
||||
|
||||
columns: STColumn[] = [];
|
||||
roleId = '';
|
||||
bankType = '';
|
||||
channelSource = '';
|
||||
ltdId = '';
|
||||
constructor(public service: AccountManagemantService, public ar: ActivatedRoute) {
|
||||
|
||||
constructor(public service: AccountManagemantService) { }
|
||||
this.roleId = this.ar.snapshot.params.id;
|
||||
this.ar.queryParamMap.subscribe((res: any) => {
|
||||
this.ltdId = res?.params?.ltdId;
|
||||
this.channelSource = res?.params?.channelSource;
|
||||
this.bankType = res?.params?.bankType;
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
get reqParams() {
|
||||
return { ...this.sf?.value };
|
||||
return { ...this.sf?.value, roleId: this.roleId, ltdId: this.ltdId, channelSource: this.channelSource, bankType: this.bankType };
|
||||
}
|
||||
ngOnInit(): void {
|
||||
this.getHeaderSummary();
|
||||
this.getFooterSummary();
|
||||
this.initSF();
|
||||
this.initST();
|
||||
}
|
||||
@ -59,21 +76,21 @@ export class PartnerAccountManagementAccountDetailComponent implements OnInit {
|
||||
format: 'yyyy-MM-dd',
|
||||
} as SFDateWidgetSchema,
|
||||
},
|
||||
abnormalCause: {
|
||||
transactionNumber: {
|
||||
title: '流水号',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
abnormalCause1: {
|
||||
businessNumber: {
|
||||
title: '交易单号',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
bankType: {
|
||||
tradeType: {
|
||||
type: 'string',
|
||||
title: '交易类型',
|
||||
default: '',
|
||||
@ -90,7 +107,7 @@ export class PartnerAccountManagementAccountDetailComponent implements OnInit {
|
||||
},
|
||||
},
|
||||
},
|
||||
bankType1: {
|
||||
incomeType: {
|
||||
type: 'string',
|
||||
title: '收支类型',
|
||||
default: '',
|
||||
@ -118,16 +135,16 @@ export class PartnerAccountManagementAccountDetailComponent implements OnInit {
|
||||
*/
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ title: '交易时间', index: 'carNo', className: 'text-center', width: 200 },
|
||||
{ title: '流水号', render: 'carModelLabel', className: 'text-center', width: 150 },
|
||||
{ title: '交易类型', render: 'carModelLabel', className: 'text-center', width: 200 },
|
||||
{ title: '交易单号', render: 'carModelLabel', className: 'text-center', width: 120 },
|
||||
{ title: '备注', index: 'remark', className: 'text-center', width: 180 },
|
||||
{ title: '收支类型', render: 'approvalStatus1', className: 'text-center', width: 180 },
|
||||
{ title: '交易金额', render: 'amount', className: 'text-right', width: 180 },
|
||||
{ title: '账户余额', render: 'approvalStatus3', className: 'text-right', width: 180 },
|
||||
{ title: '付款方', index: 'approvalStatus4', className: 'text-center', width: 200 },
|
||||
{ title: '收款方', index: 'approvalStatus4', className: 'text-center', width: 120 },
|
||||
{ title: '交易时间', index: 'createTime', className: 'text-center', width: 200 },
|
||||
{ title: '流水号', index: 'transactionNumber', className: 'text-center', width: 150 },
|
||||
{ title: '交易类型', index: 'tradeTypeLabel', className: 'text-center', width: 200 },
|
||||
{ title: '交易单号', index: 'businessNumber', className: 'text-center', width: 120 },
|
||||
{ title: '备注', index: 'tradeContent', className: 'text-center', width: 180 },
|
||||
{ title: '收支类型', index: 'incomeTypeLabel', className: 'text-center', width: 180 },
|
||||
{ title: '交易金额', render: 'amount', className: 'text-center', width: 180 },
|
||||
{ title: '账户余额', render: 'accountBalance', className: 'text-center', width: 180 },
|
||||
{ title: '付款方', index: 'payName', className: 'text-center', width: 200 },
|
||||
{ title: '收款方', index: 'payeeName', className: 'text-center', width: 120 },
|
||||
];
|
||||
}
|
||||
resetSF() {
|
||||
@ -145,6 +162,34 @@ export class PartnerAccountManagementAccountDetailComponent implements OnInit {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
}
|
||||
/**
|
||||
* 头部汇总
|
||||
*/
|
||||
getHeaderSummary() {
|
||||
const params = {
|
||||
roleId: this.roleId,
|
||||
ltdId: this.ltdId,
|
||||
channelSource: this.channelSource,
|
||||
bankType: this.bankType
|
||||
};
|
||||
this.service.request(this.service.$api_get_account_detail_header_summary, { ...params }).subscribe(res => {
|
||||
if (res) {
|
||||
this.headerTotalInfo = res;
|
||||
console.log(res);
|
||||
}
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 脚部汇总
|
||||
*/
|
||||
getFooterSummary() {
|
||||
this.service.request(this.service.$api_get_account_detail_footer_summary, this.reqParams).subscribe(res => {
|
||||
if (res) {
|
||||
this.footerTotalInfo = res;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
search() {
|
||||
this.st.load(1);
|
||||
@ -154,4 +199,6 @@ export class PartnerAccountManagementAccountDetailComponent implements OnInit {
|
||||
goBack() {
|
||||
window.history.go(-1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -61,13 +61,13 @@ export class PartnerAccountManagementListComponent implements OnInit {
|
||||
this.columns = [
|
||||
{ title: '合伙人名称', index: 'userName', className: 'text-center', width: 250 },
|
||||
{ title: '手机号', index: 'phone', className: 'text-center', width: 200 },
|
||||
{ title: '账户总额(元)', render: 'allBalance', className: 'text-right', sort: true, width: 200 },
|
||||
{ title: '待入账余额(元)', render: 'unEntryAmount', className: 'text-right', sort: true, width: 200 },
|
||||
{ title: '可用余额(元)', render: 'availableBalance', className: 'text-right', sort: true, width: 250 },
|
||||
{ title: '账户总额(元)', render: 'allBalance', className: 'text-right', sort: true, width: 150 },
|
||||
{ title: '待入账余额(元)', render: 'unEntryAmount', className: 'text-right', sort: true, width: 150 },
|
||||
{ title: '可用余额(元)', render: 'availableBalance', className: 'text-right', sort: true, width: 150 },
|
||||
{ title: '虚拟账户', index: 'virtualAccount', className: 'text-center', width: 200 },
|
||||
{
|
||||
title: '操作',
|
||||
width: 100,
|
||||
width: 150,
|
||||
buttons: [
|
||||
{
|
||||
text: '虚拟账户明细',
|
||||
@ -90,12 +90,12 @@ export class PartnerAccountManagementListComponent implements OnInit {
|
||||
* @param _record 当前行信息
|
||||
*/
|
||||
viewVirtual(_record: any) {
|
||||
|
||||
console.log()
|
||||
const modalRef = this.modal.create({
|
||||
nzTitle: '虚拟账户明细',
|
||||
nzContent: PartnerAccountManagementVirtualAccountDetailComponent,
|
||||
nzComponentParams: {
|
||||
roleId: _record?.roleId
|
||||
roleId: _record?.roleId,
|
||||
},
|
||||
nzWidth: '85%',
|
||||
nzFooter: null
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
@ -19,9 +20,10 @@ export class PartnerAccountManagementVirtualAccountDetailComponent implements On
|
||||
columns: STColumn[] = [];
|
||||
roleId = '';
|
||||
_$expand = false;
|
||||
record = {};
|
||||
|
||||
constructor(public shipperservice: ShipperBaseService, public service: AccountManagemantService,
|
||||
private modalRef: NzModalRef) {
|
||||
private modalRef: NzModalRef, public router: Router) {
|
||||
}
|
||||
|
||||
get reqParams() {
|
||||
@ -52,7 +54,7 @@ export class PartnerAccountManagementVirtualAccountDetailComponent implements On
|
||||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
abnormalCause2: {
|
||||
ltdId: {
|
||||
title: '网络货运人',
|
||||
type: 'string',
|
||||
default: '',
|
||||
@ -81,7 +83,7 @@ export class PartnerAccountManagementVirtualAccountDetailComponent implements On
|
||||
},
|
||||
},
|
||||
},
|
||||
abnormalCause3: {
|
||||
virtualAccount: {
|
||||
title: '虚拟账户',
|
||||
type: 'string',
|
||||
ui: {
|
||||
@ -165,7 +167,21 @@ export class PartnerAccountManagementVirtualAccountDetailComponent implements On
|
||||
* @param _record 当前行信息
|
||||
*/
|
||||
viewDetail(_record: any) {
|
||||
window.open(location.origin + `/#/partner/account-management/am/detail/${_record?.id}`);
|
||||
// record: {
|
||||
// channelSource: _record?.accountType,
|
||||
// roleId: _record?.roleId,
|
||||
// bankType: _record?.bankType,
|
||||
// ltdId: _record?.ltdId
|
||||
// }
|
||||
this.router.navigate([`/partner/account-management/am/detail/${_record?.roleId}`], {
|
||||
queryParams: {
|
||||
channelSource: _record?.accountType,
|
||||
bankType: _record?.bankType,
|
||||
ltdId: _record?.ltdId
|
||||
}
|
||||
});
|
||||
return;
|
||||
window.open(location.origin + `/#/partner/account-management/am/detail/${_record?.roleId}?ltdId=${_record?.ltdId}&channelSource=${_record?.accountType}&bankType=${_record?.bankType}`);
|
||||
}
|
||||
|
||||
close() {
|
||||
|
||||
@ -9,6 +9,9 @@ export class AccountManagemantService extends BaseService {
|
||||
$api_get_account_management_page = `/api/bpc/accountBalancePartner/getPartnerAccountBalanceByOperator`; // 账户管理
|
||||
$api_get_virtual_detail_page = `/api/bpc/accountBalancePartner/getPartnerAccountBalanceInfoByOperator`;//虚拟账户明细
|
||||
$api_get_withdraw_record_page = `/api/fcc/refundApplicationOBC/list/partnerPage`;// 提现记录
|
||||
$api_get_account_detail_page = `/api/bpc/accountBalancePartner/getAccountBalancePartnerByOperatorPage`;// 账户明细
|
||||
$api_get_account_detail_footer_summary = `/api/bpc/accountBalancePartner/getAccountBalancePartnerIncomeDetailByOperator`;// 账户明细脚部汇总
|
||||
$api_get_account_detail_header_summary = `/api/bpc/accountBalancePartner/getAccountBalancePartnerAmountByOperator`;// 账户明细头部汇总
|
||||
|
||||
constructor(public injector: Injector) {
|
||||
super(injector)
|
||||
|
||||
@ -19,12 +19,12 @@ export class PartnerRecordedDetailComponent implements OnInit {
|
||||
|
||||
constructor(public service: RecordedService, private route: ActivatedRoute, private nzModalService: NzModalService) {
|
||||
this.id = route.snapshot.params.id;
|
||||
this.loadRefundDetail(this.id);
|
||||
this.getRecordedDetail(this.id);
|
||||
}
|
||||
|
||||
ngOnInit(): void { }
|
||||
|
||||
loadRefundDetail(id: string) {
|
||||
getRecordedDetail(id: string) {
|
||||
this.service.request(this.service.$api_get_recorded_record_detail, { id }).subscribe(res => {
|
||||
if (res) {
|
||||
this.formData = res;
|
||||
@ -106,7 +106,7 @@ export class PartnerRecordedDetailComponent implements OnInit {
|
||||
});
|
||||
modal.afterClose.subscribe((res: any) => {
|
||||
if (res) {
|
||||
this.loadRefundDetail(this.id);
|
||||
this.getRecordedDetail(this.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
<div class="d-flex align-items-center ">
|
||||
<div class="mr-md">
|
||||
已选择
|
||||
<strong class="text-red">{{ selectedRows.length }}</strong> 条数据 累计提现 <strong class="text-red">{{
|
||||
<strong class="text-red">{{ selectedRows.length }}</strong> 条数据,累计入账 <strong class="text-red">{{
|
||||
totalCallNo }}</strong>
|
||||
<!-- <a *ngIf="totalCallNo > 0" (click)="st.clearCheck()" class="ml-lg">清空</a> -->
|
||||
</div>
|
||||
@ -44,7 +44,7 @@
|
||||
<st #st [data]="service.$api_get_recorded_page" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true,process: beforeReq}" [loading]="service.http.loading"
|
||||
[scroll]="{ x:'1200px' }" (change)="stChange($event)"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: afterRes }"
|
||||
[res]="{ reName: { list: 'data', total: 'data.total' }, process: afterRes }"
|
||||
[page]="{ show: true, pageSizes: [10, 20, 50, 100, 200, 500] }">
|
||||
<ng-template st-row="bankCardNumber" let-item let-index="index" let-column="column">
|
||||
{{ item.bankName }} <br> {{ item.bankCardNumber }}
|
||||
|
||||
@ -70,7 +70,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
|
||||
};
|
||||
|
||||
afterRes = (data: any[], rawData?: any) => {
|
||||
data = data.map(node => ({ ...node, disabled: node.refundStatus !== '1' }));
|
||||
data = data.map(node => ({ ...node, disabled: node.sts !== '0' }));
|
||||
return data;
|
||||
};
|
||||
|
||||
@ -104,7 +104,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
|
||||
}
|
||||
let totalCallNo = 0;
|
||||
this.selectedRows.forEach((item => {
|
||||
totalCallNo = new Big(this.totalCallNo).plus(item?.amount).parse();
|
||||
totalCallNo = new Big(this.totalCallNo).plus(item?.entryAmount).parse();
|
||||
}));
|
||||
this.totalCallNo = totalCallNo;
|
||||
} else if (e.type === 'loaded') {
|
||||
@ -125,6 +125,10 @@ export class PartnerRecordedRecordComponent implements OnInit {
|
||||
}
|
||||
|
||||
auditAction(item?: any, type: string = '1') {
|
||||
if (!item && this.selectedRows.length === 0) {
|
||||
this.service.msgSrv.warning('请选择需要审核的记录');
|
||||
return;
|
||||
}
|
||||
this.msg = '';
|
||||
let params: Array<string> = [];
|
||||
if (item) {
|
||||
@ -252,7 +256,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
asyncData: () => this.shipperSrv.getNetworkFreightForwarder(),
|
||||
asyncData: () => this.shipperSrv.getNetworkFreightForwarder({}, true),
|
||||
}
|
||||
},
|
||||
submitTime: {
|
||||
@ -313,7 +317,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
|
||||
buttons: [
|
||||
{
|
||||
text: '审核',
|
||||
iif: item => item.refundStatus === '0',
|
||||
iif: item => item.sts === '0',
|
||||
click: item => this.auditAction(item)
|
||||
},
|
||||
{
|
||||
@ -335,7 +339,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
|
||||
*/
|
||||
audit(params: any, callback: Function, msg = '成功') {
|
||||
this.service
|
||||
.request(this.service.$api_audit_recored, ...params)
|
||||
.request(this.service.$api_audit_recored, { ...params })
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success(msg);
|
||||
|
||||
@ -6,8 +6,8 @@ import { BaseService } from '@shared';
|
||||
})
|
||||
export class RecordedService extends BaseService {
|
||||
|
||||
$api_get_recorded_page = `/api/bpc/partnerInvoice/getDetail`; // 查询合伙人发票入账主表
|
||||
$api_get_recorded_record_detail = `api/bpc/partnerInvoice/getDetailByOpration`; // 入账记录详情
|
||||
$api_get_recorded_page = `/api/bpc/partnerInvoiceEntry/queryInvoiceEntrylist`; // 查询合伙人发票入账主表
|
||||
$api_get_recorded_record_detail = `/api/bpc/partnerInvoice/getDetailByOpration`; // 入账记录详情
|
||||
$api_disagree_recorded = ``; // 拒绝审核
|
||||
$api_agree_recorded = ``; // 同意审核
|
||||
$api_audit_recored = `/api/bpc/partnerInvoiceEntry/oprationAudit`; // 审核单据
|
||||
|
||||
Reference in New Issue
Block a user