账户管理

This commit is contained in:
潘晓云
2022-03-21 17:24:05 +08:00
parent 3284eeea24
commit 957a3b1adb
13 changed files with 91 additions and 64 deletions

View File

@ -11,17 +11,17 @@
<b class="text-md ">{{headerTotalInfo?.ltdName}}</b> <b class="text-md ">{{headerTotalInfo?.ltdName}}</b>
</sv> </sv>
<sv label="可用余额"> <sv label="可用余额">
{{headerTotalInfo?.balance |currency}} {{headerTotalInfo?.allAmount |currency}}
</sv> </sv>
<sv label="收入金额"> <sv label="收入金额">
{{headerTotalInfo?.income |currency}} {{headerTotalInfo?.incomeAmount |currency}}
</sv> </sv>
<sv label="支出金额"> <sv label="支出金额">
{{headerTotalInfo?.spending |currency}} {{headerTotalInfo?.payAmount |currency}}
</sv> </sv>
</sv-container> </sv-container>
<ng-template #labelTpl> <ng-template #labelTpl>
<b class="text-md" style="color: black;">{{headerTotalInfo?.name}} {{headerTotalInfo?.phone}}</b> <b class="text-md" style="color: black;">{{headerTotalInfo?.name}} &nbsp;&nbsp;{{headerTotalInfo?.phone}}</b>
</ng-template> </ng-template>
</nz-card> </nz-card>
<nz-card> <nz-card>
@ -46,20 +46,20 @@
[page]="{ show: true, showSize: true, pageSizes: [5,10, 20, 50, 100, 200, 500] }" [page]="{ show: true, showSize: true, pageSizes: [5,10, 20, 50, 100, 200, 500] }"
[loading]="service.http.loading" [scroll]="{x:'1200px'}"> [loading]="service.http.loading" [scroll]="{x:'1200px'}">
<ng-template st-row="amount" let-item> <ng-template st-row="amount" let-item>
<div *ngIf="item.incomeType === '1'"> - {{item.amount | currency }}</div> <div *ngIf="item.incomeType === '1'" class="text-right"> - {{item.amount | currency:' ' }}</div>
<div *ngIf="item.incomeType === '2'"> + {{item.amount | currency }}</div> <div *ngIf="item.incomeType === '2'" class="text-right"> + {{item.amount | currency:' ' }}</div>
</ng-template> </ng-template>
<ng-template st-row="accountBalance" let-item> <ng-template st-row="accountBalance" let-item>
<div class="text-right">{{item?.accountBalance |currency}}</div> <div class="text-right">{{item?.accountBalance |currency:' '}}</div>
</ng-template> </ng-template>
</st> </st>
<div class="total-footer text-md" *ngIf="st?.list?.length !== 0 "> <div class="total-footer text-md" *ngIf="st?.list?.length !== 0 ">
合计 <label class="text-red-dark">{{ footerTotalInfo?.total }}</label> 项,收入 <label 合计 <label class="text-red-dark">{{ footerTotalInfo?.total }}</label> 项,收入 <label
class="text-red-dark font-weight-bold">{{ class="text-red-dark font-weight-bold">{{
footerTotalInfo?.income | currency footerTotalInfo?.incomeAmount | currency
}}</label>,支出 <label class="text-red-dark font-weight-bold">{{ }}</label>,支出 <label class="text-red-dark font-weight-bold">{{
footerTotalInfo?.spending | currency }}</label> footerTotalInfo?.payAmount | currency }}</label>
</div> </div>
</div> </div>
</nz-card> </nz-card>

View File

@ -136,15 +136,15 @@ export class PartnerAccountManagementAccountDetailComponent implements OnInit {
initST() { initST() {
this.columns = [ this.columns = [
{ title: '交易时间', index: 'createTime', className: 'text-center', width: 200 }, { title: '交易时间', index: 'createTime', className: 'text-center', width: 200 },
{ title: '流水号', index: 'transactionNumber', className: 'text-center', width: 150 }, { title: '流水号', index: 'transactionNumber', className: 'text-center', width: 180 },
{ title: '交易类型', index: 'tradeTypeLabel', className: 'text-center', width: 200 }, { title: '交易类型', index: 'tradeTypeLabel', className: 'text-center', width: 150 },
{ title: '交易单号', index: 'businessNumber', className: 'text-center', width: 120 }, { title: '交易单号', index: 'businessNumber', className: 'text-center', width: 180 },
{ title: '备注', index: 'tradeContent', className: 'text-center', width: 180 }, { title: '备注', index: 'tradeContent', className: 'text-center', width: 180 },
{ title: '收支类型', index: 'incomeTypeLabel', className: 'text-center', width: 180 }, { title: '收支类型', index: 'incomeTypeLabel', className: 'text-center', width: 180 },
{ title: '交易金额', render: 'amount', className: 'text-center', width: 180 }, { title: '交易金额', render: 'amount', className: 'text-center', width: 150 },
{ title: '账户余额', render: 'accountBalance', className: 'text-center', width: 180 }, { title: '账户余额', render: 'accountBalance', className: 'text-center', width: 150 },
{ title: '付款方', index: 'payName', className: 'text-center', width: 200 }, { title: '付款方', index: 'payName', className: 'text-center', width: 200 },
{ title: '收款方', index: 'payeeName', className: 'text-center', width: 120 }, { title: '收款方', index: 'payeeName', className: 'text-center', width: 200 },
]; ];
} }
resetSF() { resetSF() {

View File

@ -17,13 +17,13 @@
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[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"> [loading]="service.http.loading" multiSort>
<ng-template st-row="allBalance" let-item> <ng-template st-row="allBalance" let-item>
<div class="text-right">{{item.allBalance | currency:' '}}</div> <div class="text-right">{{item.allBalance | currency:' '}}</div>
</ng-template> </ng-template>
<ng-template st-row="unEntryAmount" let-item> <ng-template st-row="unEntryAmount" let-item>
<a class="text-right text-blue-dark" <a class="text-right text-blue-dark"
[routerLink]="'/partner/account-management/am/recorded/detail/'+item?.id">{{item.unEntryAmount | currency:' [routerLink]="'/partner/account-management/am/recorded/detail/'+item?.roleId">{{item.unEntryAmount | currency:'
'}}</a> '}}</a>
</ng-template> </ng-template>
<ng-template st-row="availableBalance" let-item> <ng-template st-row="availableBalance" let-item>

View File

@ -61,9 +61,15 @@ export class PartnerAccountManagementListComponent implements OnInit {
this.columns = [ this.columns = [
{ title: '合伙人名称', index: 'userName', className: 'text-center', width: 250 }, { title: '合伙人名称', index: 'userName', className: 'text-center', width: 250 },
{ title: '手机号', index: 'phone', className: 'text-center', width: 200 }, { title: '手机号', index: 'phone', className: 'text-center', width: 200 },
{ title: '账户总额(元)', render: 'allBalance', className: 'text-right', sort: true, width: 150 }, {
{ title: '待入账余额(元)', render: 'unEntryAmount', className: 'text-right', sort: true, width: 150 }, title: '账户总额(元)', index: 'allBalance', className: 'text-right', sort: true, width: 150, type: 'currency',
{ title: '可用余额(元)', render: 'availableBalance', className: 'text-right', sort: true, width: 150 }, },
{
title: '待入账余额(元)', render: 'unEntryAmount', className: 'text-right', width: 150,
},
{
title: '可用余额(元)', index: 'availableBalance', className: 'text-right', sort: true, width: 150, type: 'currency'
},
{ title: '虚拟账户', index: 'virtualAccount', className: 'text-center', width: 220 }, { title: '虚拟账户', index: 'virtualAccount', className: 'text-center', width: 220 },
{ {
title: '操作', title: '操作',
@ -90,7 +96,6 @@ export class PartnerAccountManagementListComponent implements OnInit {
* @param _record 当前行信息 * @param _record 当前行信息
*/ */
viewVirtual(_record: any) { viewVirtual(_record: any) {
console.log()
const modalRef = this.modal.create({ const modalRef = this.modal.create({
nzTitle: '虚拟账户明细', nzTitle: '虚拟账户明细',
nzContent: PartnerAccountManagementVirtualAccountDetailComponent, nzContent: PartnerAccountManagementVirtualAccountDetailComponent,
@ -100,8 +105,8 @@ export class PartnerAccountManagementListComponent implements OnInit {
nzWidth: '85%', nzWidth: '85%',
nzFooter: null nzFooter: null
}); });
modalRef.afterClose.subscribe(result => { // modalRef.afterClose.subscribe(result => {
}); // });
} }
/** /**

View File

@ -55,10 +55,16 @@
<span class="mr-xxl text-md font-weight-bold"><label>网络货运人:</label>{{accountInfo?.name}}</span> <span class="mr-xxl text-md font-weight-bold"><label>网络货运人:</label>{{accountInfo?.name}}</span>
<span class="text-md font-weight-bold"><label>返佣总额(元):</label>{{totalInfo?.spending |currency: ' '}}</span> <span class="text-md font-weight-bold"><label>返佣总额(元):</label>{{totalInfo?.spending |currency: ' '}}</span>
</div> </div>
<st #st [data]="service.$api_get_account_management_page " [columns]="billDetailColumns" <st #st [data]="billDetailList " [columns]="billDetailColumns" [res]="{ reName: { list: 'data' } }"
[res]="{ reName: { list: 'data' } }" [req]="{ method: 'POST', allInBody: true, params:{}}" [page]="{show:false}"> [req]="{ method: 'POST', allInBody: true, params:billDetailReqParams}" [page]="{show:false}">
<ng-template st-row="amount" let-item> <ng-template st-row="month" let-item>
<div *ngIf="item.paAccount">{{item?.amount |currency :' '}}</div> <div>
<span>{{item?.year }}年</span>
<span>{{item?.month }}月</span>
</div>
</ng-template>
<ng-template st-row="profitAmountSum" let-item>
<div>{{item?.profitAmountSum |currency :' '}}</div>
</ng-template> </ng-template>
</st> </st>

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { STColumn, STComponent } from '@delon/abc/st'; import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema, Widget } from '@delon/form'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema, Widget } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme'; import { ModalHelper, _HttpClient } from '@delon/theme';
@ -32,12 +32,16 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
columns: STColumn[] = []; columns: STColumn[] = [];
billDetailColumns: STColumn[] = []; billDetailColumns: STColumn[] = [];
showBillDetail = false; showBillDetail = false;
billDetailList = [];
roleId = '';
constructor(public service: AccountManagemantService, public router: Router) { } constructor(public service: AccountManagemantService, public router: Router, public ar: ActivatedRoute) {
this.roleId = this.ar.snapshot.params.id;
}
get reqParams() { get reqParams() {
return { ...this.sf?.value }; return { ...this.sf?.value, roleId: this.roleId };
} }
get billDetailReqParams() { get billDetailReqParams() {
@ -46,7 +50,6 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.initSF(); this.initSF();
this.initST(); this.initST();
this.initBillDetailST();
} }
initSF() { initSF() {
@ -96,8 +99,8 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
initBillDetailST() { initBillDetailST() {
this.billDetailColumns = [ this.billDetailColumns = [
{ title: '账单月份', index: 'carNo', className: 'text-center', width: '40%' }, { title: '账单月份', render: 'month', className: 'text-center', width: '40%' },
{ title: '返佣金额(元)', render: 'amount', className: 'text-center', width: '40%' }, { title: '返佣金额(元)', render: 'profitAmountSum', className: 'text-center', width: '40%' },
{ {
title: '操作', className: 'text-center', width: '20%', buttons: [ title: '操作', className: 'text-center', width: '20%', buttons: [
{ {
@ -122,6 +125,19 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
search() { search() {
this.st.load(1); this.st.load(1);
} }
/**
* 获取账单明细
*/
getBillDetail(ltdId: string) {
this.service.request(this.service.$api_get_bill_detail, { ltdId }).subscribe(res => {
if (res) {
this.billDetailList = res;
}
})
}
export() { } export() { }
/** /**
@ -137,10 +153,16 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
* @param record 当前行 * @param record 当前行
*/ */
viewAccountDetail(record: any) { viewAccountDetail(record: any) {
this.billDetailColumns = [];
this.showBillDetail = true; this.showBillDetail = true;
this.initBillDetailST();
this.getBillDetail(record?.ltdId);
} }
handleCancel() { handleCancel() {
this.showBillDetail = false; this.showBillDetail = false;
} }
goBack() { goBack() {
window.history.go(-1); window.history.go(-1);

View File

@ -167,20 +167,13 @@ export class PartnerAccountManagementVirtualAccountDetailComponent implements On
* @param _record 当前行信息 * @param _record 当前行信息
*/ */
viewDetail(_record: any) { viewDetail(_record: any) {
// record: { // this.router.navigate([`/partner/account-management/am/detail/${_record?.roleId}`], {
// queryParams: {
// channelSource: _record?.accountType, // channelSource: _record?.accountType,
// roleId: _record?.roleId,
// bankType: _record?.bankType, // bankType: _record?.bankType,
// ltdId: _record?.ltdId // 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}`); window.open(location.origin + `/#/partner/account-management/am/detail/${_record?.roleId}?ltdId=${_record?.ltdId}&channelSource=${_record?.accountType}&bankType=${_record?.bankType}`);
} }

View File

@ -12,6 +12,7 @@ export class AccountManagemantService extends BaseService {
$api_get_account_detail_page = `/api/bpc/accountBalancePartner/getAccountBalancePartnerByOperatorPage`;// 账户明细 $api_get_account_detail_page = `/api/bpc/accountBalancePartner/getAccountBalancePartnerByOperatorPage`;// 账户明细
$api_get_account_detail_footer_summary = `/api/bpc/accountBalancePartner/getAccountBalancePartnerIncomeDetailByOperator`;// 账户明细脚部汇总 $api_get_account_detail_footer_summary = `/api/bpc/accountBalancePartner/getAccountBalancePartnerIncomeDetailByOperator`;// 账户明细脚部汇总
$api_get_account_detail_header_summary = `/api/bpc/accountBalancePartner/getAccountBalancePartnerAmountByOperator`;// 账户明细头部汇总 $api_get_account_detail_header_summary = `/api/bpc/accountBalancePartner/getAccountBalancePartnerAmountByOperator`;// 账户明细头部汇总
$api_get_bill_detail = `/api/bpc/partnerIncomeDetail/findPartnerWaitIncomeByOperator`; // 查看账单明细
constructor(public injector: Injector) { constructor(public injector: Injector) {
super(injector) super(injector)

View File

@ -16,11 +16,11 @@
</ng-template> </ng-template>
<ng-template #action> <ng-template #action>
<div class="mr-xl"> <div class="mr-xl">
<p class="text-lg mb-sm mt-xs">待审批</p> <p class="text-lg mb-sm mt-xs">{{formData?.stsLabel}}</p>
<div> <div *ngIf="formData?.sts === '0' || formData?.sts ==='1'">
<button nz-button [nzType]="'primary'" (click)="auditAction(formData,formData?.refundStatus)">{{formData?.sts <button nz-button [nzType]="'primary'" (click)="auditAction(formData,formData?.refundStatus)">{{formData?.sts
=== ===
0 ?'审核':'复审'}}</button> '0' ?'审核':'复审'}}</button>
</div> </div>
</div> </div>
</ng-template> </ng-template>
@ -61,14 +61,14 @@
{{formData?.stsLabel}} {{formData?.stsLabel}}
</se> </se>
<se label="发票图片"> <se label="发票图片">
<img *ngIf="formData?.invoiceUrl" nz-image width="200px" height="200px" [nzSrc]="formData?.invoiceUrl" alt="" /> <img *ngIf="formData?.invoiceUrl" nz-image width="100px" height="100px" [nzSrc]="formData?.invoiceUrl" alt="" />
<span *ngIf="!formData?.invoiceUrl">-</span> <span *ngIf="!formData?.invoiceUrl">-</span>
</se> </se>
<se label="快递单号"> <se label="快递单号">
{{formData?.expressName}} {{formData?.expressName}}
</se> </se>
<se label="纳税凭证"> <se label="纳税凭证">
<img *ngIf="formData?.taxVoucherUrl" nz-image width="200px" height="200px" [nzSrc]="formData?.taxVoucherUrl" <img *ngIf="formData?.taxVoucherUrl" nz-image width="100px" height="100px" [nzSrc]="formData?.taxVoucherUrl"
alt="" /> alt="" />
<span *ngIf="!formData?.taxVoucherUrl">-</span> <span *ngIf="!formData?.taxVoucherUrl">-</span>
</se> </se>

View File

@ -88,7 +88,7 @@ export class PartnerRecordedDetailComponent implements OnInit {
this.service.msgSrv.warning('请填写拒绝原因 '); this.service.msgSrv.warning('请填写拒绝原因 ');
return; return;
} }
this.audit({ id: params, rejectReason: this.msg, sts: '3' }, () => { this.audit({ ids: params, rejectReason: this.msg, sts: '3' }, () => {
modal.destroy(true); modal.destroy(true);
}, '审核拒绝成功'); }, '审核拒绝成功');
} }
@ -97,7 +97,7 @@ export class PartnerRecordedDetailComponent implements OnInit {
label: '通过', label: '通过',
type: 'primary', type: 'primary',
onClick: () => { onClick: () => {
this.audit({ id: params, rejectReason: this.msg, sts: this.formData?.sts === '0' ? 1 : 2 }, () => { this.audit({ ids: params, rejectReason: this.msg, sts: this.formData?.sts === '0' ? 1 : 2 }, () => {
modal.destroy(true); modal.destroy(true);
}, `${this.formData?.sts === '1' ? '审核' : '复审'}通过成功`); }, `${this.formData?.sts === '1' ? '审核' : '复审'}通过成功`);
} }

View File

@ -44,7 +44,7 @@
<st #st [data]="service.$api_get_recorded_page" [columns]="columns" <st #st [data]="service.$api_get_recorded_page" [columns]="columns"
[req]="{ method: 'POST', allInBody: true,process: beforeReq}" [loading]="service.http.loading" [req]="{ method: 'POST', allInBody: true,process: beforeReq}" [loading]="service.http.loading"
[scroll]="{ x:'1200px' }" (change)="stChange($event)" [scroll]="{ x:'1200px' }" (change)="stChange($event)"
[res]="{ reName: { list: 'data', total: 'data.total' }, process: afterRes }" [res]="{ reName: { list: 'data.records', total: 'data.total' }, process: afterRes }"
[page]="{ show: true, pageSizes: [10, 20, 50, 100, 200, 500] }"> [page]="{ show: true, pageSizes: [10, 20, 50, 100, 200, 500] }">
<ng-template st-row="bankCardNumber" let-item let-index="index" let-column="column"> <ng-template st-row="bankCardNumber" let-item let-index="index" let-column="column">
{{ item.bankName }} <br> {{ item.bankCardNumber }} {{ item.bankName }} <br> {{ item.bankCardNumber }}

View File

@ -70,7 +70,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
}; };
afterRes = (data: any[], rawData?: any) => { afterRes = (data: any[], rawData?: any) => {
data = data.map(node => ({ ...node, disabled: node.sts !== '0' })); // data = data.map(node => ({ ...node, disabled: node.sts !== '0' }));
return data; return data;
}; };
@ -148,7 +148,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
this.service.msgSrv.warning('请填写拒绝原因 '); this.service.msgSrv.warning('请填写拒绝原因 ');
return; return;
} }
this.audit({ id: params, rejectReason: this.msg, sts: '3' }, () => { this.audit({ ids: params, rejectReason: this.msg, sts: '3' }, () => {
modal.destroy(); modal.destroy();
this.st.load(1); this.st.load(1);
}, '审核拒绝成功'); }, '审核拒绝成功');
@ -170,7 +170,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
label: '通过', label: '通过',
type: 'primary', type: 'primary',
onClick: () => { onClick: () => {
this.audit({ id: params, rejectReason: this.msg, sts: '1' }, () => { this.audit({ ids: params, rejectReason: this.msg, sts: '1' }, () => {
modal.destroy(); modal.destroy();
this.st.load(1); this.st.load(1);
}, '审核通过成功'); }, '审核通过成功');
@ -238,10 +238,10 @@ export class PartnerRecordedRecordComponent implements OnInit {
default: '', default: '',
enum: [ enum: [
{ label: '全部', value: '' }, { label: '全部', value: '' },
{ label: '待初审', value: 0 }, { label: '待初审', value: '0' },
{ label: '待复核', value: 1 }, { label: '待复核', value: '1' },
{ label: '已入账', value: 2 }, { label: '已入账', value: '2' },
{ label: '已拒绝', value: 3 }, { label: '已拒绝', value: '3' },
], ],
ui: { ui: {
widget: 'select', widget: 'select',
@ -309,7 +309,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
}, },
{ title: '提交时间', index: 'submitTime', width: 160, className: 'text-center' }, { title: '提交时间', index: 'submitTime', width: 160, className: 'text-center' },
{ title: '入账状态', index: 'stsLabel', width: 100, className: 'text-center' }, { title: '入账状态', index: 'stsLabel', width: 120, className: 'text-center' },
{ {
title: '操作', title: '操作',
fixed: 'right', fixed: 'right',