edit
This commit is contained in:
@ -99,8 +99,7 @@ export class DownloadComponentsListComponent implements OnInit {
|
|||||||
width: '170px',
|
width: '170px',
|
||||||
className: 'text-center',
|
className: 'text-center',
|
||||||
buttons: [
|
buttons: [
|
||||||
{ text: '下载', click: (_record) => this.download(_record), iif: (item) => item.status === 1 },
|
{ text: '下载', click: (_record) => this.download(_record)},
|
||||||
{ text: '删除', click: (_record) => this.delOne(_record), iif: (item) => item.status !== 0 },
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@ -45,8 +45,12 @@ export class DriverAccountComponent implements OnInit {
|
|||||||
this.modal.create({
|
this.modal.create({
|
||||||
nzTitle: '账户明细',
|
nzTitle: '账户明细',
|
||||||
nzContent: AccountDetailComponent,
|
nzContent: AccountDetailComponent,
|
||||||
|
nzNoAnimation: true,
|
||||||
nzWidth: 600,
|
nzWidth: 600,
|
||||||
nzComponentParams: {},
|
nzComponentParams: {
|
||||||
|
params: { accountType: 2, roleId: item.roleId },
|
||||||
|
url: '/api/fcc/accountBalance/getDriverAccountBalanceDetailByOperator'
|
||||||
|
},
|
||||||
nzFooter: null
|
nzFooter: null
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,7 +52,10 @@ export class FreightAccountComponent implements OnInit {
|
|||||||
nzContent: AccountDetailComponent,
|
nzContent: AccountDetailComponent,
|
||||||
nzNoAnimation: true,
|
nzNoAnimation: true,
|
||||||
nzWidth: 600,
|
nzWidth: 600,
|
||||||
nzComponentParams: {},
|
nzComponentParams: {
|
||||||
|
params: { accountType: 1, roleId: item.roleId },
|
||||||
|
url: '/api/fcc/accountBalance/getShipperAccountBalanceDetailByOperator'
|
||||||
|
},
|
||||||
nzFooter: null
|
nzFooter: null
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -244,7 +244,7 @@ export class WithdrawalsRecordComponent implements OnInit {
|
|||||||
{ title: '提现单号', index: 'refundApplyCode', width: 120 },
|
{ title: '提现单号', index: 'refundApplyCode', width: 120 },
|
||||||
{ title: '网络货运人', index: 'ltdName', width: 120 },
|
{ title: '网络货运人', index: 'ltdName', width: 120 },
|
||||||
{ title: '银行类型', index: 'bankTypeLabel', width: 100 },
|
{ title: '银行类型', index: 'bankTypeLabel', width: 100 },
|
||||||
{ title: '账户类型', index: 'accountType', width: 100 },
|
{ title: '账户类型', index: 'bankTypeLabel', width: 100 },
|
||||||
{ title: '账户名称', index: 'bankAccountName', width: 100 },
|
{ title: '账户名称', index: 'bankAccountName', width: 100 },
|
||||||
{ title: '虚拟账户', index: 'virtualAccount', width: 100 },
|
{ title: '虚拟账户', index: 'virtualAccount', width: 100 },
|
||||||
{ title: '提现金额', index: 'amount', width: 100 },
|
{ title: '提现金额', index: 'amount', width: 100 },
|
||||||
|
|||||||
@ -102,12 +102,18 @@ export class UserCenterComponentsDriverComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
showAccountDetail(item: any) {
|
showAccountDetail(item: any) {
|
||||||
|
console.log(item);
|
||||||
|
|
||||||
this.modal.create({
|
this.modal.create({
|
||||||
nzTitle: '资金账户',
|
nzTitle: '资金账户',
|
||||||
nzContent: AccountDetailComponent,
|
nzContent: AccountDetailComponent,
|
||||||
nzNoAnimation: true,
|
nzNoAnimation: true,
|
||||||
nzWidth: 600,
|
nzWidth: 600,
|
||||||
nzComponentParams: { isCanCreate: true },
|
nzComponentParams: {
|
||||||
|
isCanCreate: true,
|
||||||
|
url: '/api/fcc/accountBalance/getDriverAccountDetailByOperator',
|
||||||
|
params: { accountType: 2, roleId: item.appUserId }
|
||||||
|
},
|
||||||
nzFooter: null
|
nzFooter: null
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,7 +74,11 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
nzContent: AccountDetailComponent,
|
nzContent: AccountDetailComponent,
|
||||||
nzNoAnimation: true,
|
nzNoAnimation: true,
|
||||||
nzWidth: 600,
|
nzWidth: 600,
|
||||||
nzComponentParams: { isCanCreate: true },
|
nzComponentParams: {
|
||||||
|
isCanCreate: true,
|
||||||
|
url: '/api/fcc/accountBalance/getShipperAccountBalanceDetailByOperator',
|
||||||
|
params: { accountType: 1, roleId: item.appUserId }
|
||||||
|
},
|
||||||
nzFooter: null
|
nzFooter: null
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
<st #st [data]="url" [columns]="columns" bordered size="small"
|
<st #st [data]="url" [columns]="columns" bordered size="small"
|
||||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
|
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
|
||||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
[res]="{ reName: { list: 'data'} }"
|
||||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||||
[loading]="service.http.loading" [scroll]="{ y: '370px' }">
|
[loading]="service.http.loading" [scroll]="{ y: '370px' }">
|
||||||
<ng-template st-row="ltdName" let-item let-index="index">
|
<ng-template st-row="ltdName" let-item let-index="index">
|
||||||
<ng-container *ngIf="isCanCreate; else elsePATemplate">
|
<ng-container *ngIf="isCanCreate; else elsePATemplate">
|
||||||
<a (click)="createPA(item)">{{ item.promotersTelephone || '添加' }}</a>
|
<a (click)="createAccount(item,'1')">{{ item.promotersTelephone || '添加' }}</a>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-template #elsePATemplate>
|
<ng-template #elsePATemplate>
|
||||||
{{ item.promotersTelephone }}
|
{{ item.promotersTelephone }}
|
||||||
@ -13,7 +13,7 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template st-row="bankTypeLabel" let-item let-index="index">
|
<ng-template st-row="bankTypeLabel" let-item let-index="index">
|
||||||
<ng-container *ngIf="isCanCreate; else elsePFTemplate">
|
<ng-container *ngIf="isCanCreate; else elsePFTemplate">
|
||||||
<a (click)="createPF(item)">{{ item.promotersTelephone || '添加' }}</a>
|
<a (click)="createAccount(item,'2')">{{ item.promotersTelephone || '添加' }}</a>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-template #elsePFTemplate>
|
<ng-template #elsePFTemplate>
|
||||||
{{ item.promotersTelephone }}
|
{{ item.promotersTelephone }}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { CurrencyPipe } from '@angular/common';
|
import { CurrencyPipe } from '@angular/common';
|
||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
import { STComponent, STColumn, STRequestOptions } from '@delon/abc/st';
|
import { STComponent, STColumn, STRequestOptions } from '@delon/abc/st';
|
||||||
|
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||||
import { BaseService } from '../../services';
|
import { BaseService } from '../../services';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -13,35 +14,74 @@ export class AccountDetailComponent implements OnInit {
|
|||||||
st!: STComponent;
|
st!: STComponent;
|
||||||
columns: STColumn[] = [];
|
columns: STColumn[] = [];
|
||||||
|
|
||||||
url = '';
|
url = '/api/fcc/accountBalance/getDriverAccountDetailByOperator';
|
||||||
|
|
||||||
isCanCreate = false;
|
isCanCreate = false;
|
||||||
constructor(public service: BaseService, private currencyPipe: CurrencyPipe) {
|
params: any = {};
|
||||||
|
constructor(public service: BaseService, private currencyPipe: CurrencyPipe, private modalHelp: NzModalRef) {
|
||||||
this.initST();
|
this.initST();
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {}
|
ngOnInit(): void {}
|
||||||
createPA(item: any) {}
|
createAccount(item: any, type: '1' | '2') {
|
||||||
createPF(item: any) {}
|
const params = {
|
||||||
|
ltdId: item.ltdId,
|
||||||
|
roleId: item.roleId,
|
||||||
|
projectId: item.projectId,
|
||||||
|
enterpriseId: item.enterpriseId,
|
||||||
|
ctfId: this.params.ctfId,
|
||||||
|
clientName: this.params.clientName
|
||||||
|
};
|
||||||
|
if (this.params.accountType === 1) {
|
||||||
|
this.service
|
||||||
|
.request('/api/fcc/accountBalance/saveByShipper', {
|
||||||
|
accountType: this.params.accountType,
|
||||||
|
bankType: type,
|
||||||
|
isProjectMain: 0,
|
||||||
|
...params
|
||||||
|
})
|
||||||
|
.subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
this.service.msgSrv.success('开户成功');
|
||||||
|
this.modalHelp.destroy();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (this.params.accountType === 2) {
|
||||||
|
this.service
|
||||||
|
.request('/api/fcc/accountBalance/saveByDriver', {
|
||||||
|
accountType: this.params.accountType,
|
||||||
|
bankType: type,
|
||||||
|
...params
|
||||||
|
})
|
||||||
|
.subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
this.service.msgSrv.success('开户成功');
|
||||||
|
this.modalHelp.destroy();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
beforeReq = (requestOptions: STRequestOptions) => {
|
beforeReq = (requestOptions: STRequestOptions) => {
|
||||||
|
Object.assign(requestOptions.body, this.params);
|
||||||
return requestOptions;
|
return requestOptions;
|
||||||
};
|
};
|
||||||
|
|
||||||
initST() {
|
initST() {
|
||||||
this.columns = [
|
this.columns = [
|
||||||
{ title: '网络货运人', index: 'phone', className: 'text-center' },
|
{ title: '网络货运人', index: 'ltdName', className: 'text-center' },
|
||||||
{
|
{
|
||||||
title: '平安账户余额',
|
title: '平安账户余额',
|
||||||
render: 'ltdName',
|
render: 'paBalance',
|
||||||
type: 'currency',
|
type: 'currency',
|
||||||
format: item => `${this.currencyPipe.transform(item.availableBalance)}`
|
format: item => `${this.currencyPipe.transform(item.paBalance)}`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '浦发账户余额',
|
title: '浦发账户余额',
|
||||||
render: 'bankTypeLabel',
|
render: 'pfBalance',
|
||||||
type: 'currency',
|
type: 'currency',
|
||||||
format: item => `${this.currencyPipe.transform(item.availableBalance)}`
|
format: item => `${this.currencyPipe.transform(item.pfBalance)}`
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user