待入账明细
This commit is contained in:
@ -0,0 +1,54 @@
|
||||
<nz-card>
|
||||
<sv-container layout="vertical" [noColon]="true" col="4">
|
||||
<sv [label]="labelTpl">
|
||||
<b class="text-md ">{{accountInfo?.company}}</b>
|
||||
</sv>
|
||||
<sv label="可用余额">
|
||||
{{totalInfo?.balance |currency}}
|
||||
</sv>
|
||||
<sv label="收入金额">
|
||||
{{totalInfo?.income |currency}}
|
||||
</sv>
|
||||
<sv label="支出金额">
|
||||
{{totalInfo?.spending |currency}}
|
||||
</sv>
|
||||
</sv-container>
|
||||
<ng-template #labelTpl>
|
||||
<b class="text-md" style="color: black;">{{accountInfo?.name}} {{accountInfo?.phone}}</b>
|
||||
</ng-template>
|
||||
</nz-card>
|
||||
<nz-card>
|
||||
<div nz-row>
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 18">
|
||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 6" class="text-right">
|
||||
<button nz-button nzType="primary" [disabled]="!sf.valid" (click)="st?.load(1)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
<button nz-button (click)="export()" nzType="primary" nzGhost>导出</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-content">
|
||||
<st #st [data]="service.$api_get_account_management_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] }"
|
||||
[loading]="service.http.loading" [scroll]="{x:'1200px'}">
|
||||
<ng-template st-row="amount" let-item>
|
||||
<div *ngIf="item.incomeType === '1'"> - {{item.amount | currency }}</div>
|
||||
<div *ngIf="item.incomeType === '2'"> + {{item.amount | 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
|
||||
class="text-red-dark font-weight-bold">{{
|
||||
totalInfo?.income | currency
|
||||
}}</label>,支出 <label class="text-red-dark font-weight-bold">{{
|
||||
totalInfo?.spending | currency }}</label>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
@ -0,0 +1,21 @@
|
||||
:host {
|
||||
::ng-deep {
|
||||
.search-header {
|
||||
nz-range-picker {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.table-content {
|
||||
position: relative;
|
||||
|
||||
.total-footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
height: 32px;
|
||||
margin: 16px 0;
|
||||
line-height: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { PartnerAccountManagementAccountDetailComponent } from './account-detail.component';
|
||||
|
||||
describe('PartnerAccountManagementAccountDetailComponent', () => {
|
||||
let component: PartnerAccountManagementAccountDetailComponent;
|
||||
let fixture: ComponentFixture<PartnerAccountManagementAccountDetailComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [PartnerAccountManagementAccountDetailComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PartnerAccountManagementAccountDetailComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,153 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { AccountManagemantService } from '../../services/account-managemant.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-partner-account-detail',
|
||||
templateUrl: './account-detail.component.html',
|
||||
styleUrls: ['./account-detail.component.less']
|
||||
})
|
||||
export class PartnerAccountManagementAccountDetailComponent implements OnInit {
|
||||
totalInfo: any = {
|
||||
balance: 0,
|
||||
income: 1500,
|
||||
spending: 2400,
|
||||
total: 186
|
||||
};
|
||||
accountInfo = {
|
||||
name: '张三',
|
||||
phone: '13812345678',
|
||||
company: '天津怡亚通物流科技有限公司(平安)'
|
||||
}
|
||||
|
||||
url = `/user`;
|
||||
schema: SFSchema = {};
|
||||
ui!: SFUISchema;
|
||||
_$expand = false;
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('sf') private readonly sf!: SFComponent;
|
||||
|
||||
|
||||
columns: STColumn[] = [];
|
||||
|
||||
constructor(public service: AccountManagemantService) { }
|
||||
|
||||
|
||||
get reqParams() {
|
||||
return { ...this.sf?.value };
|
||||
}
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
this.initST();
|
||||
}
|
||||
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
_$expand: {
|
||||
type: 'boolean', ui: { hidden: true }
|
||||
},
|
||||
createTime: {
|
||||
type: 'string',
|
||||
title: '交易时间',
|
||||
ui: {
|
||||
widget: 'sl-from-to',
|
||||
type: 'date',
|
||||
autoComplete: 'off',
|
||||
format: 'yyyy-MM-dd',
|
||||
} as SFDateWidgetSchema,
|
||||
},
|
||||
abnormalCause: {
|
||||
title: '流水号',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
abnormalCause1: {
|
||||
title: '交易单号',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
bankType: {
|
||||
type: 'string',
|
||||
title: '交易类型',
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: {
|
||||
dictKey: 'trade:type'
|
||||
},
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
containsAllLabel: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
},
|
||||
},
|
||||
bankType1: {
|
||||
type: 'string',
|
||||
title: '收支类型',
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: {
|
||||
dictKey: 'income:type'
|
||||
},
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
containsAllLabel: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
this.ui = { '*': { spanLabelFixed: 100, grid: { span: 8, gutter: 4 } }, };
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化数据列表
|
||||
*/
|
||||
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 },
|
||||
];
|
||||
}
|
||||
resetSF() {
|
||||
this._$expand = false;
|
||||
this.sf.reset();
|
||||
setTimeout(() => {
|
||||
this.st.reset();
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
expandToggle() {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
}
|
||||
|
||||
search() {
|
||||
this.st.load(1);
|
||||
}
|
||||
export() { }
|
||||
}
|
||||
@ -20,14 +20,14 @@
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loading]="service.http.loading">
|
||||
<ng-template st-row="approvalStatus" let-item>
|
||||
<a [routerLink]="'/partner/business-statistics/partner/custom-detail/'+item?.id">{{item.yskmoney}}</a>
|
||||
<a [routerLink]="'/partner/account-management/recorded-detail/'+item?.id">{{item.yskmoney}}</a>
|
||||
</ng-template>
|
||||
<ng-template st-row="approvalStatus1" let-item>
|
||||
<div class="text-right">{{item.approvalStatus1 | currency:' '}}</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="approvalStatus2" let-item>
|
||||
<a class="text-right text-blue-dark"
|
||||
[routerLink]="'/partner/business-statistics/partner/order-detail/'+item?.id">{{item.yskmoney | currency:'
|
||||
[routerLink]="'/partner/account-management/recorded-detail/'+item?.id">{{item.yskmoney | currency:'
|
||||
'}}</a>
|
||||
</ng-template>
|
||||
|
||||
|
||||
@ -0,0 +1,59 @@
|
||||
<nz-card>
|
||||
<sv-container layout="vertical" [noColon]="true" col="4">
|
||||
<sv [label]="labelTpl">
|
||||
<b class="text-md ">{{accountInfo?.company}}</b>
|
||||
</sv>
|
||||
<sv label="可用余额">
|
||||
{{totalInfo?.balance |currency}}
|
||||
</sv>
|
||||
<sv label="收入金额">
|
||||
{{totalInfo?.income |currency}}
|
||||
</sv>
|
||||
<sv label="支出金额">
|
||||
{{totalInfo?.spending |currency}}
|
||||
</sv>
|
||||
</sv-container>
|
||||
<ng-template #labelTpl>
|
||||
<b class="text-md" style="color: black;">{{accountInfo?.name}} {{accountInfo?.phone}}</b>
|
||||
</ng-template>
|
||||
</nz-card>
|
||||
<nz-card>
|
||||
<div>
|
||||
<sf mode="search" #sf [schema]="schema" [ui]="ui" (formSubmit)="search()" (formReset)="resetSF()"></sf>
|
||||
</div>
|
||||
<div class="table-content">
|
||||
<st #st [data]="service.$api_get_account_management_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] }"
|
||||
[loading]="service.http.loading" [scroll]="{x:'1200px'}">
|
||||
<ng-template st-row="amount" let-item>
|
||||
<div *ngIf="item.incomeType === '1'"> - {{item.amount | currency }}</div>
|
||||
<div *ngIf="item.incomeType === '2'"> + {{item.amount | 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
|
||||
class="text-red-dark font-weight-bold">{{
|
||||
totalInfo?.income | currency
|
||||
}}</label>,支出 <label class="text-red-dark font-weight-bold">{{
|
||||
totalInfo?.spending | currency }}</label>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-modal [(nzVisible)]="showBillDetail" nzTitle="账户明细" [nzFooter]="null" (nzOnCancel)="handleCancel()" nzWidth="700px">
|
||||
<div *nzModalContent>
|
||||
<div class="mb-sm">
|
||||
<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>
|
||||
</div>
|
||||
<st #st [data]="service.$api_get_account_management_page " [columns]="billDetailColumns"
|
||||
[res]="{ reName: { list: 'data' } }" [req]="{ method: 'POST', allInBody: true, params:{}}" [page]="{show:false}">
|
||||
<ng-template st-row="amount" let-item>
|
||||
<div *ngIf="item.paAccount">{{item?.amount |currency :' '}}</div>
|
||||
</ng-template>
|
||||
|
||||
</st>
|
||||
</div>
|
||||
</nz-modal>
|
||||
@ -0,0 +1,24 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { PartnerAccountManagementRecordedDetailComponent } from './recorded-detail.component';
|
||||
|
||||
describe('PartnerAccountManagementRecordedDetailComponent', () => {
|
||||
let component: PartnerAccountManagementRecordedDetailComponent;
|
||||
let fixture: ComponentFixture<PartnerAccountManagementRecordedDetailComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [PartnerAccountManagementRecordedDetailComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PartnerAccountManagementRecordedDetailComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,146 @@
|
||||
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 { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { AccountManagemantService } from '../../services/account-managemant.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-partner-recorded-detail',
|
||||
templateUrl: './recorded-detail.component.html',
|
||||
})
|
||||
export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
|
||||
totalInfo: any = {
|
||||
balance: 0,
|
||||
income: 1500,
|
||||
spending: 2400,
|
||||
total: 186
|
||||
};
|
||||
accountInfo = {
|
||||
name: '张三',
|
||||
phone: '13812345678',
|
||||
company: '天津怡亚通物流科技有限公司(平安)'
|
||||
}
|
||||
|
||||
url = `/user`;
|
||||
schema: SFSchema = {};
|
||||
ui!: SFUISchema;
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('sf') private readonly sf!: SFComponent;
|
||||
|
||||
|
||||
columns: STColumn[] = [];
|
||||
billDetailColumns: STColumn[] = [];
|
||||
showBillDetail = false;
|
||||
|
||||
constructor(public service: AccountManagemantService, public router: Router) { }
|
||||
|
||||
|
||||
get reqParams() {
|
||||
return { ...this.sf?.value };
|
||||
}
|
||||
|
||||
get billDetailReqParams() {
|
||||
return {};
|
||||
}
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
this.initST();
|
||||
this.initBillDetailST();
|
||||
}
|
||||
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
|
||||
abnormalCause: {
|
||||
title: '网络货运人',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 4 } }, };
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化数据列表
|
||||
*/
|
||||
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: '操作', className: 'text-center', width: 300,
|
||||
buttons: [
|
||||
{
|
||||
text: '查看入账记录',
|
||||
click: (_record) => this.viewBookedRecord(_record)
|
||||
},
|
||||
{
|
||||
text: '查看账单明细',
|
||||
click: (_record) => this.viewAccountDetail(_record)
|
||||
},
|
||||
]
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
initBillDetailST() {
|
||||
this.billDetailColumns = [
|
||||
{ title: '账单月份', index: 'carNo', className: 'text-center', width: '40%' },
|
||||
{ title: '返佣金额(元)', render: 'amount', className: 'text-center', width: '40%' },
|
||||
{
|
||||
title: '操作', className: 'text-center', width: '20%', buttons: [
|
||||
{
|
||||
text: '订单明细',
|
||||
click: (_record) => this.router.navigate(['/'])
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
setTimeout(() => {
|
||||
this.st.reset();
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
search() {
|
||||
this.st.load(1);
|
||||
}
|
||||
export() { }
|
||||
|
||||
/**
|
||||
* 查看入账记录
|
||||
* @param record 当前行
|
||||
*/
|
||||
viewBookedRecord(record: any) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看账单明细
|
||||
* @param record 当前行
|
||||
*/
|
||||
viewAccountDetail(record: any) {
|
||||
this.showBillDetail = true;
|
||||
}
|
||||
handleCancel() {
|
||||
this.showBillDetail = false;
|
||||
}
|
||||
|
||||
}
|
||||
@ -164,7 +164,7 @@ export class PartnerAccountManagementVirtualAccountDetailComponent implements On
|
||||
* @param _record 当前行信息
|
||||
*/
|
||||
viewDetail(_record: any) {
|
||||
|
||||
window.open(location.origin + '/#/partner/account-management/account-detail');
|
||||
}
|
||||
|
||||
close() {
|
||||
|
||||
@ -23,6 +23,8 @@ import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/
|
||||
import { PartnerPartnerOrderDetailComponent } from './business-statistics/components/partner-order-detail/partner-order-detail.component';
|
||||
import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component';
|
||||
import { ParterRebateManageMentRecordComponent } from './rebate-management/components/rebate-record/rebate-record.component';
|
||||
import { PartnerAccountManagementAccountDetailComponent } from './account-management/components/account-detail/account-detail.component';
|
||||
import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
@ -64,6 +66,8 @@ const routes: Routes = [
|
||||
path: 'account-management',
|
||||
children: [
|
||||
{ path: 'list', component: PartnerAccountManagementListComponent },
|
||||
{ path: 'account-detail', component: PartnerAccountManagementAccountDetailComponent },
|
||||
{ path: 'recorded-detail/:id', component: PartnerAccountManagementRecordedDetailComponent }
|
||||
]
|
||||
},
|
||||
];
|
||||
|
||||
@ -28,6 +28,8 @@ import { PartnerPartnerOrderDetailComponent } from './business-statistics/compon
|
||||
import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component';
|
||||
import { PartnerAccountManagementVirtualAccountDetailComponent } from './account-management/components/virtual-account-detail/virtual-account-detail.component';
|
||||
import { ParterRebateManageMentRecordComponent } from './rebate-management/components/rebate-record/rebate-record.component';
|
||||
import { PartnerAccountManagementAccountDetailComponent } from './account-management/components/account-detail/account-detail.component';
|
||||
import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component';
|
||||
|
||||
const COMPONENTS: any[] = [
|
||||
PartnerBusinessStatisticsIndexComponent,
|
||||
@ -46,7 +48,9 @@ const COMPONENTS: any[] = [
|
||||
PartnerPartnerCustomOrderDetailComponent,
|
||||
PartnerPartnerOrderDetailComponent,
|
||||
PartnerAccountManagementListComponent,
|
||||
PartnerAccountManagementVirtualAccountDetailComponent];
|
||||
PartnerAccountManagementVirtualAccountDetailComponent,
|
||||
PartnerAccountManagementAccountDetailComponent,
|
||||
PartnerAccountManagementRecordedDetailComponent];
|
||||
|
||||
@NgModule({
|
||||
declarations: [...COMPONENTS],
|
||||
|
||||
Reference in New Issue
Block a user