添加入账记录

This commit is contained in:
潘晓云
2022-03-11 16:16:15 +08:00
parent a31290acf8
commit 867a975a92
9 changed files with 191 additions and 120 deletions

View File

@ -27,9 +27,9 @@ export class WithdrawalsRecordComponent implements OnInit {
refundStatus: any = ''; refundStatus: any = '';
msg = ''; msg = '';
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {} constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) { }
ngOnInit(): void {} ngOnInit(): void { }
beforeReq = (requestOptions: STRequestOptions) => { beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) { if (this.sf) {
@ -42,6 +42,7 @@ export class WithdrawalsRecordComponent implements OnInit {
refundStatus: this.refundStatus || null refundStatus: this.refundStatus || null
}); });
} }
delete requestOptions?.body?.expand;
return requestOptions; return requestOptions;
}; };
@ -80,6 +81,10 @@ export class WithdrawalsRecordComponent implements OnInit {
label: '拒绝', label: '拒绝',
type: 'default', type: 'default',
onClick: () => { onClick: () => {
if (!this.msg || this.msg.trim().length === 0) {
this.service.msgSrv.warning('请填写拒绝原因 ');
return false;
}
this.service this.service
.request(this.service.$api_disagree_refund, { .request(this.service.$api_disagree_refund, {
refundApplicationId: params, refundApplicationId: params,
@ -92,6 +97,7 @@ export class WithdrawalsRecordComponent implements OnInit {
this.st.load(1); this.st.load(1);
} }
}); });
return false;
} }
}, },
{ {

View File

@ -1,4 +1,4 @@
<page-header-wrapper [title]="'账户详情'"></page-header-wrapper> <page-header-wrapper [title]="'合伙人账户明细'"></page-header-wrapper>
<nz-card> <nz-card>
<sv-container layout="vertical" [noColon]="true" col="4"> <sv-container layout="vertical" [noColon]="true" col="4">
<sv [label]="labelTpl"> <sv [label]="labelTpl">

View File

@ -1,7 +1,7 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { STColumn, STComponent } from '@delon/abc/st'; import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema, Widget } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme'; import { ModalHelper, _HttpClient } from '@delon/theme';
import { AccountManagemantService } from '../../services/account-managemant.service'; import { AccountManagemantService } from '../../services/account-managemant.service';
@ -129,7 +129,7 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
* @param record 当前行 * @param record 当前行
*/ */
viewBookedRecord(record: any) { viewBookedRecord(record: any) {
window.open(location.origin + `#/partner/recorded/record?ltdId=${record?.ltdId}&userId=${record?.userId}&userIdLabel=${record?.banktypeLabel}`);
} }
/** /**

View File

@ -325,7 +325,7 @@ export class PartnerAccountManagementWithdrawalsRecordComponent implements OnIni
}, },
{ {
text: '详情', text: '详情',
click: item => this.router.navigate(['./detail/' + item.id], { relativeTo: this.ar }) click: item => this.router.navigate(['./../detail/' + item.id], { relativeTo: this.ar })
} }
] ]
} }

View File

@ -78,11 +78,24 @@ const routes: Routes = [
{ {
path: 'account-management', path: 'account-management',
children: [ children: [
{ path: 'list', component: PartnerAccountManagementListComponent }, {
{ path: 'account-detail', component: PartnerAccountManagementAccountDetailComponent }, path: 'am',
{ path: 'recorded-detail/:id', component: PartnerAccountManagementRecordedDetailComponent }, children: [
{ path: 'withdraw-record', component: PartnerAccountManagementWithdrawalsRecordComponent }, { path: '', redirectTo: 'list' },
{ path: 'withdraw-record/:id', component: PartnerAccountManagementWithdralDetailComponent } { path: 'list', component: PartnerAccountManagementListComponent },
{ path: 'detail/:id', component: PartnerAccountManagementAccountDetailComponent },
{ path: 'recorded/detail/:id', component: PartnerAccountManagementRecordedDetailComponent },
]
},
{
path: 'withdraw-record',
children: [
{ path: '', redirectTo: 'list' },
{ path: 'list', component: PartnerAccountManagementWithdrawalsRecordComponent },
{ path: 'detail/:id', component: PartnerAccountManagementWithdralDetailComponent }
]
}
] ]
}, },
{ {
@ -92,22 +105,6 @@ const routes: Routes = [
{ path: 'detail/:id', component: PartnerDetailComponent }, { path: 'detail/:id', component: PartnerDetailComponent },
{ path: 'add-etp-partner', component: AddEtpPartnerComponent }, { path: 'add-etp-partner', component: AddEtpPartnerComponent },
{ path: 'add-personal-partner', component: AddPersonalPartnerComponent }, { path: 'add-personal-partner', component: AddPersonalPartnerComponent },
{
path: 'am',
children: [
{ path: '', redirectTo: 'list' },
{ path: '', component: PartnerAccountManagementListComponent },
{ path: 'detail/:id', component: PartnerAccountManagementAccountDetailComponent },
{ path: 'recorded/detail/:id', component: PartnerAccountManagementRecordedDetailComponent },
]
},
{
path: 'withdraw-record',
children: [
{ path: '', component: PartnerAccountManagementWithdrawalsRecordComponent },
{ path: 'detail/:id', component: PartnerAccountManagementWithdralDetailComponent }
]
},
] ]
}, },
{ {

View File

@ -8,57 +8,89 @@
* @FilePath : \\tms-obc-web\\src\\app\\routes\\financial-management\\components\\withdrawals-record\\withdrawals-detail\\withdrawals-detail.component.html * @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. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
<page-header-wrapper [title]="'入账详情'" [logo]="logo"> <page-header-wrapper [title]="'入账详情'" [logo]="logo" [action]="action">
<ng-template #logo> <ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()"> <button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i> <i nz-icon nzType="left" nzTheme="outline"></i>
</button> </button>
</ng-template> </ng-template>
<ng-template #action>
<div class="mr-xl">
<p class="text-lg mb-sm mt-xs">待审批</p>
<div>
<button nz-button [nzType]="'primary'"
(click)="auditAction(formData,formData?.refundStatus)">{{formData?.refundStatusLabel ===
'1'?'审核':'复审'}}</button>
</div>
</div>
</ng-template>
</page-header-wrapper> </page-header-wrapper>
<nz-card [nzLoading]="service.http.loading"> <nz-card [nzLoading]="service.http.loading">
<nz-alert nzType="info" nzMessage="提现信息" class="mb-md"></nz-alert> <nz-alert nzType="info" nzMessage="入账信息" class="mb-md"></nz-alert>
<div se-container [labelWidth]="130"> <div se-container [labelWidth]="130">
<se label="账户名称">
{{formData?.ltdName}}
</se>
<se label="网络货运人"> <se label="网络货运人">
{{formData?.ltdName}} {{formData?.ltdName}}
</se> </se>
<se label="入账单号">
{{formData?.refundApplyCode}}
</se>
<se label="银行类型"> <se label="银行类型">
{{formData?.bankType==='1'?'平安银行':'浦发银行'}} {{formData?.bankType==='1'?'平安银行':'浦发银行'}}
</se> </se>
<se label="提现单号">
{{formData?.refundApplyCode}}
</se>
<se label="账户名称">
{{formData?.bankAccountName}}
</se>
<se label="提现时间">
{{formData?.createTime}}
</se>
<se label="虚拟账户"> <se label="虚拟账户">
{{formData?.virtualAccount}} {{formData?.virtualAccount}}
</se> </se>
<se label="提现状态"> <se label="提交时间">
{{formData?.createTime}}
</se>
<se label="开票金额">
{{formData?.amount | currency}}
</se>
<se label="代缴个税">
{{formData?.amount | currency}}
</se>
<se label="入账金额">
{{formData?.amount | currency}}
</se>
<se label="入账状态">
{{formData?.refundStatusLabel}} {{formData?.refundStatusLabel}}
</se> </se>
<se label="提现金额"> <se label="发票图片">
{{formData?.amount | currency}} <img nz-image width="200px" height="200px"
nzSrc="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" alt="" />
</se>
<se label="快递单号">
{{formData?.bankCardNumber}}
</se>
<se label="纳税凭证">
<img nz-image width="200px" height="200px"
nzSrc="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" alt="" />
</se> </se>
<se label="银行流水号"> <se label="银行流水号">
{{formData?.bankSerialNumber}} {{formData?.bankSerialNumber}}
</se> </se>
<se label="提现至银行卡">
{{formData?.bankCardNumber}}
</se>
<se label="银行回单" col="1">
<a (click)="downBack()">{{formData?.refundStatus==='3'?'下载回单':'暂无回单'}}</a>
</se>
</div> </div>
<nz-alert nzType="info" nzMessage="提现进度" class="mb-md mt-md"></nz-alert> <nz-alert nzType="info" nzMessage="入账进度" class="mb-md mt-md"></nz-alert>
<div nz-row class="mt-xl"> <div nz-row class="mt-xl">
<div nz-col nzSpan="12" nzOffset="1"> <div nz-col nzSpan="12" nzOffset="1">
<app-logistics-time-line [data]="timeLineData"></app-logistics-time-line> <app-logistics-time-line [data]="timeLineData"></app-logistics-time-line>
</div> </div>
</div> </div>
</nz-card> </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

@ -1,5 +1,6 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { NzModalService } from 'ng-zorro-antd/modal';
import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service'; import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service';
@ -9,13 +10,15 @@ import { FreightAccountService } from 'src/app/routes/financial-management/servi
styleUrls: ['./detail.component.less'] styleUrls: ['./detail.component.less']
}) })
export class PartnerRecordedDetailComponent implements OnInit { export class PartnerRecordedDetailComponent implements OnInit {
@ViewChild('auditModal', { static: false }) auditModal!: any;
formData: any = {}; formData: any = {};
timeLineData: any = []; timeLineData: any = [];
msg = '';
id = '';
constructor(public service: FreightAccountService, private route: ActivatedRoute) { constructor(public service: FreightAccountService, private route: ActivatedRoute, private nzModalService: NzModalService) {
const id = route.snapshot.params.id; this.id = route.snapshot.params.id;
this.loadRefundDetail(id); this.loadRefundDetail(this.id);
} }
ngOnInit(): void { } ngOnInit(): void { }
@ -68,19 +71,61 @@ export class PartnerRecordedDetailComponent implements OnInit {
}); });
} }
downBack() { auditAction(item?: any, type: string = '1') {
if (this.formData?.refundStatus !== '3') { this.msg = '';
return; let params: Array<string> = [];
} params = [item.id];
this.service.getReceiptUrl(this.formData.receiptUrl, { const modal = this.nzModalService.create({
bankType: this.formData.bankType, nzTitle: type === '1' ? '审核' : '复审',
rmYll: this.formData.userId, nzContent: this.auditModal,
snglFlgCd: this.formData.coreSerNo, nzFooter: [
bussType: '06', {
ltdId: this.formData.ltdId label: '拒绝',
type: 'default',
onClick: () => {
if (!this.msg || this.msg.trim().length === 0) {
this.service.msgSrv.warning('请填写拒绝原因 ');
return false;
}
this.service
.request(this.service.$api_disagree_refund, {
refundApplicationId: params,
msg: this.msg
})
.subscribe(res => {
if (res) {
this.service.msgSrv.success('审核拒绝成功');
modal.destroy(true);
}
});
return false;
}
},
{
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(true);
}
});
}
}
]
});
modal.afterClose.subscribe((res: any) => {
if (res) {
this.loadRefundDetail(this.id);
}
}); });
} }
goBack() { goBack() {
history.go(-1); history.go(-1);
} }

View File

@ -17,8 +17,8 @@ export class PartnerRecordedRecordComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('auditModal', { static: false }) auditModal!: any; @ViewChild('auditModal', { static: false }) auditModal!: any;
@ViewChild('viewReasonModal', { static: false }) viewReasonModal!: any; @ViewChild('viewReasonModal', { static: false }) viewReasonModal!: any;
columns: STColumn[] = this.initST(); columns!: STColumn[];
searchSchema: SFSchema = this.initSF(); searchSchema!: SFSchema;
totalInfo: any = { totalInfo: any = {
partnerNum: 34, partnerNum: 34,
count: 98, count: 98,
@ -34,9 +34,22 @@ export class PartnerRecordedRecordComponent implements OnInit {
refundStatus: any = ''; refundStatus: any = '';
msg = ''; msg = '';
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router, public ar: ActivatedRoute) { }
ngOnInit(): void { } ltdId = ''; // 网络货运人
accountName = ''; // 账户名称
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router, public ar: ActivatedRoute) {
this.accountName = this.ar.snapshot.queryParams?.userIdLabel || '';
this.ltdId = this.ar.snapshot.queryParams?.ltdId || '';
}
ngOnInit(): void {
this.searchSchema = this.initSF();
this.columns = this.initST();
}
beforeReq = (requestOptions: STRequestOptions) => { beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) { if (this.sf) {
@ -49,6 +62,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
refundStatus: this.refundStatus || null refundStatus: this.refundStatus || null
}); });
} }
delete requestOptions?.body?.expand;
return requestOptions; return requestOptions;
}; };
@ -107,7 +121,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
this.st.load(1); this.st.load(1);
} }
auditAction(item?: any) { auditAction(item?: any, type: string = '1') {
this.msg = ''; this.msg = '';
let params: Array<string> = []; let params: Array<string> = [];
if (item) { if (item) {
@ -116,13 +130,17 @@ export class PartnerRecordedRecordComponent implements OnInit {
params = this.selectedRows.map(node => node.id); params = this.selectedRows.map(node => node.id);
} }
const modal = this.nzModalService.create({ const modal = this.nzModalService.create({
nzTitle: '审核', nzTitle: type === '1' ? '审核' : '复审',
nzContent: this.auditModal, nzContent: this.auditModal,
nzFooter: [ nzFooter: [
{ {
label: '备注', label: '拒绝',
type: 'default', type: 'default',
onClick: () => { onClick: () => {
if (!this.msg || this.msg.trim().length === 0) {
this.service.msgSrv.warning('请填写拒绝原因 ');
return false;
}
this.service this.service
.request(this.service.$api_disagree_refund, { .request(this.service.$api_disagree_refund, {
refundApplicationId: params, refundApplicationId: params,
@ -135,6 +153,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
this.st.load(1); this.st.load(1);
} }
}); });
return false;
} }
}, },
{ {
@ -203,79 +222,47 @@ export class PartnerRecordedRecordComponent implements OnInit {
hidden: true hidden: true
} }
}, },
refundApplyCode: { accountName: {
type: 'string', type: 'string',
title: '提现单号', title: '账户名称',
default: this.accountName,
ui: { ui: {
placeholder: '请输入' placeholder: '请输入'
} }
}, },
refundStatus: { refundStatus: {
type: 'string', type: 'string',
title: '提现状态', title: '入账状态',
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'refund:apply:status' }, params: { dictKey: 'refund:apply:status' },
placeholder: '请选择' 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: { ltdId: {
type: 'string', type: 'string',
title: '网络货运人', title: '网络货运人',
default: this.ltdId,
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
allowClear: true, allowClear: true,
asyncData: () => this.service.getNetworkFreightForwarder(), asyncData: () => this.service.getNetworkFreightForwarder(),
visibleIf: {
expand: (value: boolean) => value
}
} }
}, },
bankType: { createTime: {
title: '提交时间',
type: 'string', type: 'string',
title: '银行类型',
ui: { ui: {
widget: 'dict-select', widget: 'sl-from-to-search',
params: { dictKey: 'bankname:type' }, format: 'yyyy-MM-dd',
placeholder: '请输入', placeholder: '请选择',
nzShowTime: true,
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
} }
} } as SFDateWidgetSchema
} },
} }
}; };
} }
@ -285,7 +272,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
{ title: '', index: 'key', type: 'checkbox', className: 'text-center' }, { title: '', index: 'key', type: 'checkbox', className: 'text-center' },
{ title: '账户名称', index: 'createTime', width: 180, className: 'text-center' }, { title: '账户名称', index: 'createTime', width: 180, className: 'text-center' },
{ title: '虚拟账户', index: 'virtualAccount', width: 180, className: 'text-center' }, { title: '虚拟账户', index: 'virtualAccount', width: 180, className: 'text-center' },
{ title: '入账单号', index: 'refundApplyCode', width: 180, className: 'text-center' }, { title: '入账单号', index: 'refundApplyCode', width: 190, className: 'text-center' },
{ title: '网络货运人', index: 'ltdName', width: 220, className: 'text-center' }, { title: '网络货运人', index: 'ltdName', width: 220, className: 'text-center' },
{ {
title: '开票金额', title: '开票金额',
@ -324,6 +311,11 @@ export class PartnerRecordedRecordComponent implements OnInit {
iif: item => item.refundStatus === '1', iif: item => item.refundStatus === '1',
click: item => this.auditAction(item) click: item => this.auditAction(item)
}, },
{
text: '复审',
iif: item => item.refundStatus === '2',
click: item => this.router.navigate(['./detail/' + item.id], { relativeTo: this.ar })
},
{ {
text: '详情', text: '详情',
click: item => this.router.navigate(['./detail/' + item.id], { relativeTo: this.ar }) click: item => this.router.navigate(['./detail/' + item.id], { relativeTo: this.ar })

View File

@ -508,8 +508,7 @@
{ {
"text": "合伙人管理", "text": "合伙人管理",
"icon": "anticon anticon-dashboard", "icon": "anticon anticon-dashboard",
"children": [ "children": [{
{
"text": "合伙人列表", "text": "合伙人列表",
"link": "/partner/partner-list" "link": "/partner/partner-list"
}, },
@ -547,7 +546,7 @@
"group": true, "group": true,
"children": [{ "children": [{
"text": "账户管理", "text": "账户管理",
"link": "/partner/account-management/am" "link": "/partner/account-management/am/list"
}, },
{ {
"text": "账户明细", "text": "账户明细",