Merge branch 'feature/partner' of https://gitlab.eascs.com/tms-ui/tms-obc-web into feature/partner

This commit is contained in:
heqinghang
2022-03-10 13:14:54 +08:00
50 changed files with 2959 additions and 1216 deletions

View File

@ -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>

View File

@ -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;
}
}
}

View File

@ -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();
});
});

View File

@ -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-management-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() { }
}

View File

@ -1,5 +1,11 @@
<nz-card>
<sf mode="search" [schema]="schema" [ui]="ui" [button]="'none'" (formSubmit)="st.load(1)" (formReset)="resetSF()" #sf>
<!-- <div nz-row>
<div [nzSpan]="" nz-col>
</div>
</div> -->
<sf [schema]="schema" [mode]="'search'" [ui]="ui" [button]="'none'" (formSubmit)="st.load(1)" (formReset)="resetSF()"
#sf>
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
(click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
@ -8,28 +14,26 @@
</nz-card>
<nz-card>
<st #st [data]="service.$api_get_partner_statistics_page" [columns]="columns" [scroll]="{ x: '1200px' }"
<st #st [data]="service. $api_get_account_management_page" [columns]="columns" [scroll]="{ x: '1200px' }"
[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, 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>
<ng-template st-row="approvalStatus3" let-item>
<div class="text-right">{{item.yskmoney | currency:' '}}</div>
</ng-template>
<ng-template st-row="approvalStatus4" let-item>
<div class="text-right">{{item.armoney | currency:' '}}</div>
</ng-template>
</st>
</nz-card>

View File

@ -2,10 +2,13 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { NzModalService } from 'ng-zorro-antd/modal';
import { BussinessStatisticsService } from '../../../business-statistics/services/bussiness-statistics.service';
import { AccountManagemantService } from '../../services/account-managemant.service';
import { PartnerAccountManagementVirtualAccountDetailComponent } from '../virtual-account-detail/virtual-account-detail.component';
@Component({
selector: 'app-partner-list',
selector: 'app-partner-account-management-list',
templateUrl: './list.component.html',
})
export class PartnerAccountManagementListComponent implements OnInit {
@ -16,7 +19,7 @@ export class PartnerAccountManagementListComponent implements OnInit {
@ViewChild('sf') private readonly sf!: SFComponent;
columns: STColumn[] = [];
constructor(public service: BussinessStatisticsService) { }
constructor(public service: AccountManagemantService, public modal: NzModalService) { }
/**
* 查询参数
*/
@ -41,45 +44,36 @@ export class PartnerAccountManagementListComponent implements OnInit {
},
},
abnormalCause1: {
title: '类型',
title: '手机号',
type: 'string',
default: '',
enum: [
{
label: '全部',
value: ''
},
{
label: '个人',
value: '1'
},
{
label: '企业',
value: '2'
}
],
ui: {
widget: 'select'
placeholder: '请输入',
},
},
}
}
this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 4 } } };
this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 12 } }, };
}
/**
* 初始化数据列表
*/
initST() {
this.columns = [
{ title: '合伙人名称', index: 'carNo', className: 'text-center', width: 150 },
{ title: '类型', render: 'carModelLabel', className: 'text-center', width: 150 },
{ title: '注册时间', index: 'carNo', className: 'text-center', width: 150 },
{ title: '本月新增客户', render: 'approvalStatus0', className: 'text-center', sort: true, width: 150 },
{ title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true, width: 150 },
{ title: '本月已结算金额(元)', render: 'approvalStatus1', className: 'text-right', sort: true, width: 180 },
{ title: '累计已结算金额(元)', render: 'approvalStatus2', className: 'text-right', sort: true, width: 180 },
{ title: '本月预估收益(元)', render: 'approvalStatus3', className: 'text-right', sort: true, width: 180 },
{ title: '累计收益(元)', render: 'approvalStatus4', className: 'text-right', sort: true, width: 180 },
{ title: '合伙人名称', index: 'carNo', className: 'text-center', width: 300 },
{ title: '手机号', render: 'carModelLabel', className: 'text-center', width: 200 },
{ title: '账户总额(元)', render: 'approvalStatus1', className: 'text-right', sort: true, width: 200 },
{ title: '待入账余额(元)', render: 'approvalStatus2', className: 'text-right', sort: true, width: 200 },
{ title: '可用余额(元)', render: 'approvalStatus3', className: 'text-right', sort: true, width: 250 },
{ title: '虚拟账户', index: 'approvalStatus4', className: 'text-center', width: 200 },
{
title: '操作',
buttons: [
{
text: '虚拟账户明细',
click: (_record) => this.viewVirtual(_record)
}
]
}
];
}
@ -90,6 +84,28 @@ export class PartnerAccountManagementListComponent implements OnInit {
})
}
/**
*
* @param _record 当前行信息
*/
viewVirtual(_record: any) {
const modalRef = this.modal.create({
nzTitle: '虚拟账户明细',
nzContent: PartnerAccountManagementVirtualAccountDetailComponent,
nzComponentParams: {
id: _record?.id
},
nzWidth: '85%',
nzFooter: null
});
modalRef.afterClose.subscribe(result => {
});
}
/**
*
*/
export() {
}

View File

@ -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>

View File

@ -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();
});
});

View File

@ -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-account-management-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;
}
}

View File

@ -0,0 +1,27 @@
<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="mt-sm">
<st #st [data]="amService.$api_get_account_management_page" [columns]="columns" [columns]="columns"
[scroll]="{ x: '1200px' }"
[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, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="amService.http.loading"></st>
</div>
</nz-card>
<div class="modal-footer text-center">
<button nz-button type="button" nzType="primary" (click)="close()">确定</button>
</div>

View File

@ -0,0 +1,24 @@
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { PartnerAccountManagementVirtualAccountDetailComponent } from './virtual-account-detail.component';
describe('PartnerAccountManagementVirtualAccountDetailComponent', () => {
let component: PartnerAccountManagementVirtualAccountDetailComponent;
let fixture: ComponentFixture<PartnerAccountManagementVirtualAccountDetailComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [PartnerAccountManagementVirtualAccountDetailComponent]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PartnerAccountManagementVirtualAccountDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,174 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { ShipperBaseService } from 'src/app/shared/services/business/shipper-base.service';
import { AccountManagemantService } from '../../services/account-managemant.service';
@Component({
selector: 'app-partner-account-management-virtual-account-detail',
templateUrl: './virtual-account-detail.component.html',
})
export class PartnerAccountManagementVirtualAccountDetailComponent implements OnInit {
url = `/user`;
schema!: SFSchema;
ui!: SFUISchema;
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf') private readonly sf!: SFComponent;
columns: STColumn[] = [];
id = '';
_$expand = false;
constructor(public shipperservice: ShipperBaseService, public amService: AccountManagemantService, private modalRef: NzModalRef) { }
get reqParams() {
return { ...this.sf?.value };
}
ngOnInit(): void {
this.initSF();
this.initST();
}
initSF() {
this.schema = {
properties: {
_$expand: {
type: 'boolean', ui: { hidden: true }
},
abnormalCause: {
title: '合伙人名称',
type: 'string',
ui: {
placeholder: '请输入',
},
},
abnormalCause1: {
title: '手机号',
type: 'string',
ui: {
placeholder: '请输入',
},
},
abnormalCause2: {
title: '网络货运人',
type: 'string',
default: '',
ui: {
widget: 'select',
placeholder: '请选择',
allowClear: true,
asyncData: () => this.shipperservice.getNetworkFreightForwarder({}, true)
}
},
bankType: {
type: 'string',
title: '银行类型',
default: '',
ui: {
widget: 'dict-select',
params: {
dictKey: 'bankname:type'
},
placeholder: '请选择',
allowClear: true,
containsAllLabel: true,
visibleIf: {
_$expand: (value: boolean) => value,
},
},
},
abnormalCause3: {
title: '虚拟账户',
type: 'string',
ui: {
placeholder: '请输入',
visibleIf: {
_$expand: (value: boolean) => value
},
},
},
createTime: {
type: 'string',
title: '创建时间',
ui: {
widget: 'sl-from-to',
type: 'date',
autoComplete: 'off',
format: 'yyyy-MM-dd',
visibleIf: {
_$expand: (value: boolean) => value
},
} as SFDateWidgetSchema,
},
}
}
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: '虚拟账户', render: 'carModelLabel', className: 'text-center', width: 180 },
{ title: '可用余额', render: 'approvalStatus1', className: 'text-right', width: 180 },
{ title: '账户总余额', render: 'approvalStatus2', 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: '操作',
width: 120,
buttons: [
{
text: '查看明细',
click: (_record) => this.viewDetail(_record)
}
]
}
];
}
resetSF() {
this._$expand = false;
this.sf.reset();
setTimeout(() => {
this.st.reset();
})
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
add(): void {
// this.modal
// .createStatic(FormEditComponent, { i: { id: 0 } })
// .subscribe(() => this.st.reload());
}
search() {
this.st.load(1);
}
export() { }
/**
*
* @param _record 当前行信息
*/
viewDetail(_record: any) {
window.open(location.origin + '/#/partner/account-management/account-detail');
}
close() {
this.modalRef.destroy();
}
}

View File

@ -0,0 +1,63 @@
<!--
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-05 20:15:41
* @LastEditors : Shiming
* @LastEditTime : 2022-01-18 17:17:19
* @FilePath : \\tms-obc-web\\src\\app\\routes\\financial-management\\components\\withdrawals-record\\withdrawals-detail\\withdrawals-detail.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<page-header-wrapper [title]="'提现详情'" [logo]="logo">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>
</button>
</ng-template>
</page-header-wrapper>
<nz-card>
<nz-alert nzType="info" nzMessage="提现信息" class="mb-md"></nz-alert>
<div se-container [labelWidth]="100">
<se label="网络货运人">
{{formData?.ltdName}}
</se>
<se label="银行类型">
{{formData?.bankType==='1'?'平安银行':'浦发银行'}}
</se>
<se label="提现单号">
{{formData?.refundApplyCode}}
</se>
<se label="账户名称">
{{formData?.bankAccountName}}
</se>
<se label="提现时间">
{{formData?.createTime}}
</se>
<se label="虚拟账户">
{{formData?.virtualAccount}}
</se>
<se label="提现状态">
{{formData?.refundStatusLabel}}
</se>
<se label="提现金额">
{{formData?.amount}}
</se>
<se label="银行流水号">
{{formData?.bankSerialNumber}}
</se>
<se label="提现至银行卡">
{{formData?.bankId}}
</se>
<se label="银行回单" col="1">
<img [src]="formData?.bankCardNumber" alt="" style="width: 200px;height: 160px;">
</se>
</div>
<nz-alert nzType="info" nzMessage="提现进度" class="mb-md mt-md"></nz-alert>
<div nz-row class="mt-xl">
<div nz-col nzSpan="12" nzOffset="1">
<app-logistics-time-line [data]="timeLineData"></app-logistics-time-line>
</div>
</div>
</nz-card>

View File

@ -0,0 +1,17 @@
:host::ng-deep {
.ant-alert-info {
background-color: #f3f3f3;
border : 1px solid #dbdbdb;
.ant-alert-message {
color: rgba(0, 0, 0, 0.85);
font-weight: 600;
font-size: 16px;
}
}
.ant-form-item {
margin-bottom: 15px;
}
}

View File

@ -0,0 +1,73 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service';
@Component({
selector: 'app-partner-account-management-withdrawals-detail',
templateUrl: './withdrawals-detail.component.html',
styleUrls: ['./withdrawals-detail.component.less']
})
export class PartnerAccountManagementWithdrawalsDetailComponent implements OnInit {
formData: any = {};
timeLineData: any = [];
constructor(public service: FreightAccountService, private route: ActivatedRoute) {
const id = route.snapshot.params.id;
this.loadRefundDetail(id);
}
ngOnInit(): void { }
loadRefundDetail(id: string) {
this.service.request(this.service.$api_get_refund_detail, { id }).subscribe(res => {
if (res) {
this.formData = res;
// 处理流程节点数据
// 流程是否结束
let isEnd = false;
if (res.successTime) {
isEnd = true;
if (res.refundStatus === '3') {
this.timeLineData.push({ time: res.successTime, value: `到账成功`, color: 'green' });
} else {
this.timeLineData.push({ time: res.successTime, value: `提现失败`, color: 'red' });
}
}
if (res.agreeTime && res.refundStatus !== '4') {
this.timeLineData.push({ time: res.agreeTime, value: `银行处理中`, color: 'gray' });
}
if (res.agreeTime) {
if (res.refundStatus === '4') {
isEnd = true;
this.timeLineData.push({
time: res.agreeTime,
value: `拒绝提现<br/>操作人员:${res.handlerUserIdLabel}`,
color: 'red'
});
} else {
this.timeLineData.push({
time: res.agreeTime,
value: `审核通过<br/>操作人员:${res.handlerUserIdLabel}`,
color: 'gray'
});
}
}
if (res.createTime) {
this.timeLineData.push({
time: res.createTime,
value: `提交提现申请<br/>提现${res.amount}元至${res.bankName}(${res.bankCardNumber})<br/>操作人员:${res.userIdLabel}`,
color: 'gray'
});
}
if (this.timeLineData?.length > 0 && !isEnd) {
this.timeLineData[0].color = 'green';
}
}
});
}
goBack() {
history.go(-1);
}
}

View File

@ -0,0 +1,62 @@
<nz-card class="search-box" nzBordered>
<div nz-row nzGutter="8">
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf #sf [schema]="searchSchema"
[ui]="{ '*': { spanLabelFixed: 90,grid: { lg: 8, md: 12, sm: 12, xs: 24,gutter:15 } }}" [compact]="true"
[button]="'none'"></sf>
</div>
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand"
class="text-right">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button> 导出</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</div>
</nz-card>
<nz-card class="content-box" nzBordered>
<nz-tabset [nzTabBarExtraContent]="extraTemplate">
<nz-tab nzTitle="全部" (nzClick)="changeRefundStatus()"></nz-tab>
<nz-tab nzTitle="待审核" (nzClick)="changeRefundStatus('1')"></nz-tab>
<nz-tab nzTitle="处理中" (nzClick)="changeRefundStatus('2')"></nz-tab>
<nz-tab nzTitle="提现成功" (nzClick)="changeRefundStatus('3')"></nz-tab>
<nz-tab nzTitle="提现失败" (nzClick)="changeRefundStatus('5')"></nz-tab>
<nz-tab nzTitle="已拒绝" (nzClick)="changeRefundStatus('4')"></nz-tab>
</nz-tabset>
<ng-template #extraTemplate>
<div class="d-flex align-items-center ">
<div class="mr-md">
已选择
<strong class="text-red">{{ selectedRows.length }}</strong> 条数据&nbsp;&nbsp; 累计提现 <strong class="text-red">{{
totalCallNo }}</strong>
<!-- <a *ngIf="totalCallNo > 0" (click)="st.clearCheck()" class="ml-lg">清空</a> -->
</div>
<button nz-button (click)="this.auditAction(null)">审核</button>
</div>
</ng-template>
<st #st [data]="service.$api_get_refund_page" [columns]="columns" [req]="{ process: beforeReq }"
[loading]="service.http.loading" [scroll]="{ x:'1200px' }" (change)="stChange($event)"
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: afterRes }"
[page]="{ show: true, pageSizes: [10, 20, 50, 100, 200, 500] }" [loading]="service.http.loading">
<ng-template st-row="bankCardNumber" let-item let-index="index" let-column="column">
{{ item.bankName }} <br> {{ item.bankCardNumber }}
</ng-template>
</st>
</nz-card>
<ng-template #auditModal>
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="80">
<se [col]="1" label="备注">
<textarea nz-input rows="3" [(ngModel)]="msg" placeholder="同意可以不用填写原因 ,拒绝必须说明原因"
style="width: 325px;margin-left: 14px;"></textarea>
</se>
</div>
</div>
</ng-template>

View File

@ -0,0 +1,334 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STComponent, STColumn, STChange, STRequestOptions, STData } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal';
import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service';
import Big from 'src/app/shared/utils/deal-precision';
@Component({
selector: 'app-partner-account-management-withdrawals-record',
templateUrl: './withdrawals-record.component.html',
styleUrls: ['../../../../commom/less/box.less', '../../../../commom/less/expend-but.less']
})
export class PartnerAccountManagementWithdrawalsRecordComponent implements OnInit {
@ViewChild('st', { static: true }) st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('auditModal', { static: false }) auditModal!: any;
@ViewChild('viewReasonModal', { static: false }) viewReasonModal!: any;
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
_$expand = false;
selectedRows: any[] = [];
totalCallNo = 0;
refundStatus: any = '';
msg = '';
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) { }
ngOnInit(): void { }
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
Object.assign(requestOptions.body, {
...this.sf.value,
createTime: {
start: this.sf.value.createTime?.[0] || '',
end: this.sf.value.createTime?.[1] || ''
},
refundStatus: this.refundStatus || null
});
}
return requestOptions;
};
afterRes = (data: any[], rawData?: any) => {
data = data.map(node => ({ ...node, disabled: node.refundStatus !== '1' }));
return data;
};
stChange(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);
}
})
}
let totalCallNo = 0;
this.selectedRows.forEach((item => {
totalCallNo = new Big(this.totalCallNo).plus(item?.amount).parse();
}));
this.totalCallNo = totalCallNo;
} else if (e.type === 'loaded') {
// 页面加载时勾选
(e?.loaded || []).forEach((r) => {
this.selectedRows.forEach((x) => {
if (x.id === r.id) {
r.checked = true;
}
});
});
}
}
changeRefundStatus(status?: string) {
this.refundStatus = status || null;
this.st.load(1);
}
auditAction(item?: any) {
this.msg = '';
let params: Array<string> = [];
if (item) {
params = [item.id];
} else {
params = this.selectedRows.map(node => node.id);
}
const modal = this.nzModalService.create({
nzTitle: '审核',
nzContent: this.auditModal,
nzFooter: [
{
label: '拒绝',
type: 'default',
onClick: () => {
this.service
.request(this.service.$api_disagree_refund, {
refundApplicationId: params,
msg: this.msg
})
.subscribe(res => {
if (res) {
this.service.msgSrv.success('审核拒绝成功');
modal.destroy();
this.st.load(1);
}
});
}
},
{
label: '通过',
type: 'primary',
onClick: () => {
this.service
.request(this.service.$api_agree_refund, {
refundApplicationId: params,
msg: this.msg
})
.subscribe(res => {
if (res) {
this.service.msgSrv.success('审核通过成功');
modal.destroy();
this.st.load(1);
}
});
}
}
]
});
modal.afterClose.subscribe(res => {
this.st.load();
});
}
showReason(item: any) {
const modal = this.nzModalService.create({
nzTitle: '查看原因',
nzContent: item?.rejectionCause || item?.failCause,
nzFooter: [
{
label: '关闭',
type: 'primary',
onClick: () => {
modal.destroy();
}
}
]
});
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
private initSF(): SFSchema {
return {
properties: {
expand: {
type: 'boolean',
ui: {
hidden: true
}
},
refundApplyCode: {
type: 'string',
title: '提现单号',
ui: {
placeholder: '请输入'
}
},
refundStatus: {
type: 'string',
title: '提现状态',
ui: {
widget: 'dict-select',
params: { dictKey: 'refund:apply:status' },
placeholder: '请选择'
}
},
createTime: {
title: '提现时间',
type: 'string',
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
placeholder: '请选择',
nzShowTime: true
} as SFDateWidgetSchema
},
bankAccountName: {
type: 'string',
title: '账户名称',
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
}
},
accountType: {
type: 'string',
title: '账户类型',
ui: {
widget: 'dict-select',
params: { dictKey: 'bank:type' },
placeholder: '请选择',
visibleIf: {
expand: (value: boolean) => value
}
}
},
ltdId: {
type: 'string',
title: '网络货运人',
ui: {
widget: 'select',
placeholder: '请选择',
allowClear: true,
asyncData: () => this.service.getNetworkFreightForwarder(),
visibleIf: {
expand: (value: boolean) => value
}
}
},
bankType: {
type: 'string',
title: '银行类型',
ui: {
widget: 'dict-select',
params: { dictKey: 'bankname:type' },
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => value
}
}
}
}
};
}
private initST(): STColumn[] {
return [
{ title: '', index: 'key', type: 'checkbox', className: 'text-center' },
{ title: '提现时间', index: 'createTime', width: 180, className: 'text-center' },
{ title: '提现单号', index: 'refundApplyCode', width: 180, className: 'text-center' },
{ title: '网络货运人', index: 'ltdName', width: 220, className: 'text-center' },
{ title: '银行类型', index: 'bankTypeLabel', width: 100, className: 'text-center' },
{ title: '账户类型', index: 'bankTypeLabel', width: 100, className: 'text-center' },
{ title: '账户名称', index: 'bankAccountName', width: 220, className: 'text-center' },
{ title: '虚拟账户', index: 'virtualAccount', width: 180, className: 'text-center' },
{
title: '提现金额',
index: 'amount',
width: 150,
type: 'widget',
className: 'text-right',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.amount }) }
},
{ title: '提现银行账户', render: 'bankCardNumber', width: 200, className: 'text-center' },
{ title: '提现状态', index: 'refundStatusLabel', width: 100, className: 'text-center' },
{ title: '银行流水号', index: 'bankSerialNumber', width: 160, className: 'text-center' },
{ title: '核心交易流水', index: 'coreSerNo', width: 180, className: 'text-center' },
{ title: '失败原因', index: 'rejectionCause', width: 200, format: item => item.failCause, className: 'text-center' },
{
title: '操作',
fixed: 'right',
width: '110px',
buttons: [
{
text: '查看回单',
iif: item => item.refundStatus === '3',
click: item =>
this.service.getReceiptUrl(item.receiptUrl, {
bankType: item.bankType,
rmYll: item.userId,
snglFlgCd: item.coreSerNo,
bussType: '06',
ltdId: item.ltdId
})
},
{
text: '查看原因',
iif: item => item.refundStatus === '4',
click: item => this.showReason(item)
},
{
text: '审核',
iif: item => item.refundStatus === '1',
click: item => this.auditAction(item)
},
{
text: '详情',
click: item => this.router.navigate(['/financial-management/withdrawals-record/detail/' + item.id])
}
]
}
];
}
}

View File

@ -6,6 +6,7 @@ import { BaseService } from '@shared';
})
export class AccountManagemantService extends BaseService {
$api_get_account_management_page = `/api/fcc/ficoBrmH/list/page`;
constructor(public injector: Injector) {
super(injector)
}

View File

@ -17,7 +17,7 @@ import { ParterChannelSalesEditComponent } from './channel-sales/components/edit
import { ParterChannelSalesListComponent } from './channel-sales/components/list/list.component';
import { ParterLevelConfigEditComponent } from './level-config/components/edit/edit.component';
import { ParterLevelConfigListComponent } from './level-config/components/list/list.component';
import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/list/particulars.component';
import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/particulars/particulars.component';
import { PartnerSalePartnerDetailComponent } from './business-statistics/components/sale-partner-detail/sale-partner-detail.component';
import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component';
import { PartnerPartnerOrderDetailComponent } from './business-statistics/components/partner-order-detail/partner-order-detail.component';
@ -25,6 +25,11 @@ import { PartnerAccountManagementListComponent } from './account-management/comp
import { ParterClaimAuditListComponent } from './claim-audit/components/list/list.component';
import { ParterClaimAuditListChannelDetailComponent } from './claim-audit/components/channel-detail/channel-detail.component';
import { ParterClaimAuditListPartnerDetailComponent } from './claim-audit/components/partner-detail/partner-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';
import { PartnerAccountManagementWithdrawalsRecordComponent } from './account-management/components/withdrawals-record/withdrawals-record.component';
import { PartnerAccountManagementWithdrawalsDetailComponent } from './account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component';
const routes: Routes = [
{
@ -59,14 +64,17 @@ const routes: Routes = [
path: 'rebate',
children: [
{ path: 'particulars', component: ParterRebateManageMentParticularsComponent },
{ path: 'record', component: ParterRebateManageMentRecordComponent },
]
},
{
path: 'account-management',
children: [
{ path: 'list', component: PartnerAccountManagementListComponent },
{ path: 'channel-detail', component: ParterClaimAuditListChannelDetailComponent },
{ path: 'partner-detail', component: ParterClaimAuditListPartnerDetailComponent },
{ path: 'account-detail', component: PartnerAccountManagementAccountDetailComponent },
{ path: 'recorded-detail/:id', component: PartnerAccountManagementRecordedDetailComponent },
{ path: 'withdraw-record', component: PartnerAccountManagementWithdrawalsRecordComponent },
{ path: 'withdraw-record/:id', component: PartnerAccountManagementWithdrawalsDetailComponent },
]
},
{

View File

@ -1,3 +1,13 @@
/*
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-03-09 14:34:55
* @LastEditors : Shiming
* @LastEditTime : 2022-03-09 14:56:46
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\partner.module.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SharedModule } from '@shared';
@ -11,7 +21,7 @@ import { PartnerPartnerStatisticsComponent } from './business-statistics/compone
import { PartnerSaleStatisticsComponent } from './business-statistics/components/sale-statistics/sale-statistics.component';
import { PartnerSaleCustomDetailComponent } from './business-statistics/components/sale-custom-detail/sale-custom-detail.component';
import { PartnerPartnerCustomDetailComponent } from './business-statistics/components/partner-custom-detail/partner-custom-detail.component';
import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/list/particulars.component';
import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/particulars/particulars.component';
import { PartnerSalePartnerDetailComponent } from './business-statistics/components/sale-partner-detail/sale-partner-detail.component';
import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component';
import { PartnerPartnerOrderDetailComponent } from './business-statistics/components/partner-order-detail/partner-order-detail.component';
@ -23,6 +33,14 @@ import { ParterClaimAuditListChannelApproveComponent } from './claim-audit/compo
import { ParterClaimAuditListPartnerApproveComponent } from './claim-audit/components/partner-approve/partner-approve.component';
import { ParterClaimAuditListPartnerRejectComponent } from './claim-audit/components/partner-reject/partner-reject.component';
import { ParterClaimAuditListChannelRejectComponent } from './claim-audit/components/channel-reject/channel-reject.component';
import { PartnerAccountManagementVirtualAccountDetailComponent } from './account-management/components/virtual-account-detail/virtual-account-detail.component';
import { PartnerAccountManagementAccountDetailComponent } from './account-management/components/account-detail/account-detail.component';
import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component';
import { PartnerAccountManagementWithdrawalsRecordComponent } from './account-management/components/withdrawals-record/withdrawals-record.component';
import { PartnerAccountManagementWithdrawalsDetailComponent } from './account-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component';
import { ParterRebateManageMentRecordComponent } from './rebate-management/components/rebate-record/rebate-record.component';
const COMPONENTS: any[] = [
PartnerBusinessStatisticsIndexComponent,
ParterChannelSalesListComponent,
@ -35,6 +53,7 @@ const COMPONENTS: any[] = [
PartnerPartnerCustomDetailComponent,
PartnerSaleCustomDetailComponent,
ParterRebateManageMentParticularsComponent,
ParterRebateManageMentRecordComponent,
PartnerSalePartnerDetailComponent,
PartnerPartnerCustomOrderDetailComponent,
PartnerPartnerOrderDetailComponent,
@ -45,10 +64,14 @@ const COMPONENTS: any[] = [
ParterClaimAuditListPartnerApproveComponent,
ParterClaimAuditListPartnerRejectComponent,
ParterClaimAuditListChannelApproveComponent,
ParterClaimAuditListChannelRejectComponent
ParterClaimAuditListChannelRejectComponent,
PartnerAccountManagementVirtualAccountDetailComponent,
PartnerAccountManagementAccountDetailComponent,
PartnerAccountManagementRecordedDetailComponent,
PartnerAccountManagementWithdrawalsRecordComponent,
PartnerAccountManagementWithdrawalsDetailComponent
];
@NgModule({
declarations: [...COMPONENTS],
imports: [CommonModule, PartnerRoutingModule, SharedModule]

View File

@ -4,15 +4,14 @@
* @Author : Shiming
* @Date : 2022-02-24 20:09:49
* @LastEditors : Shiming
* @LastEditTime : 2022-02-24 20:14:21
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\list\\particulars.component.html
* @LastEditTime : 2022-03-09 15:04:50
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-record\\rebate-record.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<page-header-wrapper [title]="''"> </page-header-wrapper>
<nz-card>
<div nz-row nzGutter="8">
<!-- 查询字段小于或等于3个时不显示伸缩按钮 -->
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
<sf
#sf
[schema]="schema"
@ -20,26 +19,13 @@
[mode]="'search'"
[disabled]="!sf?.valid"
[loading]="service.http.loading"
(formSubmit)="st?.load(1)"
(formReset)="resetSF()"
[button]="'none'"
></sf>
</div>
<!-- 查询字段大于3个时根据展开状态调整布局 -->
<ng-container *ngIf="queryFieldCount > 4">
<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" [nzLoading]="service.http.loading" (click)="st?.load(1);">查询</button>
<button nz-button nzType="primary" [disabled]="service.http.loading" >导出</button>
<button nz-button [disabled]="service.http.loading" (click)="resetSF()">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</ng-container>
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1);">查询</button>
<button nz-button nzType="primary" [disabled]="service.http.loading" >导出</button>
<button nz-button [disabled]="service.http.loading" (click)="resetSF()">重置</button>
</div>
</div>
</nz-card>
@ -47,7 +33,6 @@
<!-- 数据列表 -->
<st
#st
[bordered]="true"
[data]="data"
[columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"

View File

@ -1,3 +1,4 @@
import { ModalHelper } from '@delon/theme';
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st';
@ -5,12 +6,13 @@ import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/fo
import { processSingleSort, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { RebateManagementService } from '../../services/rebate-management.service';
import { ParterRebateManageMenRecordDetailComponent } from '../../model/record-detail/record-detail.component';
@Component({
selector: 'app-parter-channel-rebate-management-particulars',
templateUrl: './particulars.component.html'
selector: 'app-parter-channel-rebate-management-record',
templateUrl: './rebate-record.component.html'
})
export class ParterRebateManageMentParticularsComponent implements OnInit {
export class ParterRebateManageMentRecordComponent implements OnInit {
schema: SFSchema = {};
columns!: STColumn[];
ui!: SFUISchema;
@ -26,7 +28,8 @@ export class ParterRebateManageMentParticularsComponent implements OnInit {
public ar: ActivatedRoute,
public service: RebateManagementService,
private modalService: NzModalService,
public shipperservice: ShipperBaseService
public shipperservice: ShipperBaseService,
private modal: ModalHelper
) {}
/**
* 查询字段个数
@ -64,53 +67,15 @@ export class ParterRebateManageMentParticularsComponent implements OnInit {
this.schema = {
properties: {
_$expand: { type: 'boolean', ui: { hidden: true } },
name: {
month: {
type: 'string',
title: '订单号'
title: '时间月份',
format: 'month',
},
phone: {
type: 'string',
title: '付款单号'
title: '合伙人名称'
},
phone2: {
type: 'string',
title: '下单客户'
},
enterpriseInfoId: {
type: 'string',
title: '网络货运人',
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value
},
allowClear: true,
asyncData: () => this.shipperservice.getNetworkFreightForwarder()
}
},
phone3: {
type: 'string',
title: '合伙人名称',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
},
}
},
deadlineTime: {
title: '时间范围',
type: 'string',
ui: {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd',
visibleIf: {
_$expand: (value: boolean) => value
},
allowClear: true
} as SFDateWidgetSchema
}
}
};
this.ui = {
@ -124,35 +89,11 @@ export class ParterRebateManageMentParticularsComponent implements OnInit {
initST() {
this.columns = [
{
title: '订单号',
title: '月份',
index: 'name1'
},
{
title: '订单金额(元)',
index: 'name1'
},
{
title: '付款金额(元)',
index: 'name1'
},
{
title: '预估返佣金额(元)',
index: 'name1'
},
{
title: '附加费率',
index: 'name1'
},
{
title: '下单客户',
index: 'name1'
},
{
title: '网络货运人',
index: 'name1'
},
{
title: '销售渠道',
title: '返佣金额(元)',
index: 'name1'
},
{
@ -160,7 +101,7 @@ export class ParterRebateManageMentParticularsComponent implements OnInit {
index: 'name1'
},
{
title: '合伙人等级',
title: '实际等级',
index: 'name1'
},
{
@ -168,16 +109,38 @@ export class ParterRebateManageMentParticularsComponent implements OnInit {
index: 'name1'
},
{
title: '固定结算费率',
title: '返佣时间',
index: 'name1'
},
{
title: '返佣时间',
title: '异常反馈',
index: 'name1'
},
{
title: '操作',
fixed: 'right',
width: '90px',
className: 'text-left',
buttons: [
{
text: '明细',
click: _record => this.viewEvaluate(_record),
}
]
}
];
}
/**
*查看详情
*/
viewEvaluate(item: any) {
// this.modalService
this.modal.createStatic(ParterRebateManageMenRecordDetailComponent, {i:item}).subscribe((res: boolean)=> {
if(res) {
}
})
}
/**
* 重置表单
*/

View File

@ -0,0 +1,34 @@
<!--
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-02-24 20:09:49
* @LastEditors : Shiming
* @LastEditTime : 2022-03-09 15:14:50
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\model\\record-detail\\record-detail.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<div nz-row nzGutter="8">
<sf
#sf
[schema]="schema"
[ui]="ui"
[mode]="'search'"
[disabled]="!sf?.valid"
[loading]="service.http.loading"
[button]="'none'"
></sf>
</div>
<!-- 数据列表 -->
<st
#st
[bordered]="true"
[data]="data"
[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, 30, 50, 100, 200, 300, 500, 1000] }"
[loadingDelay]="500"
[loading]="service.http.loading"
>
</st>

View File

@ -0,0 +1,189 @@
import { ModalHelper } from '@delon/theme';
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
import { processSingleSort, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { RebateManagementService } from '../../services/rebate-management.service';
@Component({
selector: 'app-parter-channel-rebate-management-record-detail',
templateUrl: './record-detail.component.html'
})
export class ParterRebateManageMenRecordDetailComponent implements OnInit {
schema: SFSchema = {};
columns!: STColumn[];
ui!: SFUISchema;
@ViewChild('st', { static: false })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
spuStatus = '1';
_$expand = false;
data = [{ name1: 1111 }];
constructor(
public router: Router,
public ar: ActivatedRoute,
public service: RebateManagementService,
private modalService: NzModalService,
public shipperservice: ShipperBaseService,
) {}
/**
* 查询字段个数
*/
get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length;
}
/**
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
/**
* 查询参数
*/
get reqParams() {
const params: any = Object.assign({}, this.sf?.value || {});
delete params._$expand;
return {
...params,
deadlineTime: {
start: this.sf?.value?.deadlineTime?.[0] || '',
end: this.sf?.value?.deadlineTime?.[1] || '',
},
};
}
ngOnInit() {
this.initSF();
this.initST();
}
initSF() {
this.schema = {
properties: {
_$expand: { type: 'boolean', ui: { hidden: true } },
name: {
type: 'string',
title: '订单号'
},
phone: {
type: 'string',
title: '付款单号'
},
phone2: {
type: 'string',
title: '下单客户'
},
enterpriseInfoId: {
type: 'string',
title: '网络货运人',
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value
},
allowClear: true,
asyncData: () => this.shipperservice.getNetworkFreightForwarder()
}
},
phone3: {
type: 'string',
title: '合伙人名称',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
},
}
},
deadlineTime: {
title: '时间范围',
type: 'string',
ui: {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd',
visibleIf: {
_$expand: (value: boolean) => value
},
allowClear: true
} as SFDateWidgetSchema
}
}
};
this.ui = {
'*': {
spanLabelFixed: 140,
grid: { span: 8, gutter: 4 }
}
};
}
initST() {
this.columns = [
{
title: '订单号',
index: 'name1'
},
{
title: '订单金额(元)',
index: 'name1'
},
{
title: '付款金额(元)',
index: 'name1'
},
{
title: '预估返佣金额(元)',
index: 'name1'
},
{
title: '附加费率',
index: 'name1'
},
{
title: '下单客户',
index: 'name1'
},
{
title: '网络货运人',
index: 'name1'
},
{
title: '销售渠道',
index: 'name1'
},
{
title: '合伙人名称',
index: 'name1'
},
{
title: '合伙人等级',
index: 'name1'
},
{
title: '管理费比例',
index: 'name1'
},
{
title: '固定结算费率',
index: 'name1'
},
{
title: '返佣时间',
index: 'name1'
}
];
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this.st.load(1);
}
}