添加入账记录

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 = '';
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) => {
if (this.sf) {
@ -42,6 +42,7 @@ export class WithdrawalsRecordComponent implements OnInit {
refundStatus: this.refundStatus || null
});
}
delete requestOptions?.body?.expand;
return requestOptions;
};
@ -80,6 +81,10 @@ export class WithdrawalsRecordComponent implements OnInit {
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,
@ -92,6 +97,7 @@ export class WithdrawalsRecordComponent implements OnInit {
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>
<sv-container layout="vertical" [noColon]="true" col="4">
<sv [label]="labelTpl">

View File

@ -1,7 +1,7 @@
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 { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema, Widget } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { AccountManagemantService } from '../../services/account-managemant.service';
@ -129,7 +129,7 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
* @param record 当前行
*/
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: '详情',
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',
children: [
{ path: 'list', component: PartnerAccountManagementListComponent },
{ path: 'account-detail', component: PartnerAccountManagementAccountDetailComponent },
{ path: 'recorded-detail/:id', component: PartnerAccountManagementRecordedDetailComponent },
{ path: 'withdraw-record', component: PartnerAccountManagementWithdrawalsRecordComponent },
{ path: 'withdraw-record/:id', component: PartnerAccountManagementWithdralDetailComponent }
{
path: 'am',
children: [
{ path: '', redirectTo: 'list' },
{ 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: 'add-etp-partner', component: AddEtpPartnerComponent },
{ 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
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<page-header-wrapper [title]="'入账详情'" [logo]="logo">
<page-header-wrapper [title]="'入账详情'" [logo]="logo" [action]="action">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>
</button>
</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>
<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">
<se label="账户名称">
{{formData?.ltdName}}
</se>
<se label="网络货运人">
{{formData?.ltdName}}
</se>
<se label="入账单号">
{{formData?.refundApplyCode}}
</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="提现状态">
<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}}
</se>
<se label="提现金额">
{{formData?.amount | currency}}
<se label="发票图片">
<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 label="银行流水号">
{{formData?.bankSerialNumber}}
</se>
<se label="提现至银行卡">
{{formData?.bankCardNumber}}
</se>
<se label="银行回单" col="1">
<a (click)="downBack()">{{formData?.refundStatus==='3'?'下载回单':'暂无回单'}}</a>
</se>
</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-col nzSpan="12" nzOffset="1">
<app-logistics-time-line [data]="timeLineData"></app-logistics-time-line>
</div>
</div>
</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 { NzModalService } from 'ng-zorro-antd/modal';
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']
})
export class PartnerRecordedDetailComponent implements OnInit {
@ViewChild('auditModal', { static: false }) auditModal!: any;
formData: any = {};
timeLineData: any = [];
msg = '';
id = '';
constructor(public service: FreightAccountService, private route: ActivatedRoute) {
const id = route.snapshot.params.id;
this.loadRefundDetail(id);
constructor(public service: FreightAccountService, private route: ActivatedRoute, private nzModalService: NzModalService) {
this.id = route.snapshot.params.id;
this.loadRefundDetail(this.id);
}
ngOnInit(): void { }
@ -68,19 +71,61 @@ export class PartnerRecordedDetailComponent implements OnInit {
});
}
downBack() {
if (this.formData?.refundStatus !== '3') {
return;
}
this.service.getReceiptUrl(this.formData.receiptUrl, {
bankType: this.formData.bankType,
rmYll: this.formData.userId,
snglFlgCd: this.formData.coreSerNo,
bussType: '06',
ltdId: this.formData.ltdId
auditAction(item?: any, type: string = '1') {
this.msg = '';
let params: Array<string> = [];
params = [item.id];
const modal = this.nzModalService.create({
nzTitle: type === '1' ? '审核' : '复审',
nzContent: this.auditModal,
nzFooter: [
{
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() {
history.go(-1);
}

View File

@ -17,8 +17,8 @@ export class PartnerRecordedRecordComponent implements OnInit {
@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();
columns!: STColumn[];
searchSchema!: SFSchema;
totalInfo: any = {
partnerNum: 34,
count: 98,
@ -34,9 +34,22 @@ export class PartnerRecordedRecordComponent implements OnInit {
refundStatus: any = '';
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) => {
if (this.sf) {
@ -49,6 +62,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
refundStatus: this.refundStatus || null
});
}
delete requestOptions?.body?.expand;
return requestOptions;
};
@ -107,7 +121,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
this.st.load(1);
}
auditAction(item?: any) {
auditAction(item?: any, type: string = '1') {
this.msg = '';
let params: Array<string> = [];
if (item) {
@ -116,13 +130,17 @@ export class PartnerRecordedRecordComponent implements OnInit {
params = this.selectedRows.map(node => node.id);
}
const modal = this.nzModalService.create({
nzTitle: '审核',
nzTitle: type === '1' ? '审核' : '复审',
nzContent: this.auditModal,
nzFooter: [
{
label: '备注',
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,
@ -135,6 +153,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
this.st.load(1);
}
});
return false;
}
},
{
@ -203,79 +222,47 @@ export class PartnerRecordedRecordComponent implements OnInit {
hidden: true
}
},
refundApplyCode: {
accountName: {
type: 'string',
title: '提现单号',
title: '账户名称',
default: this.accountName,
ui: {
placeholder: '请输入'
}
},
refundStatus: {
type: 'string',
title: '提现状态',
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: '网络货运人',
default: this.ltdId,
ui: {
widget: 'select',
placeholder: '请选择',
allowClear: true,
asyncData: () => this.service.getNetworkFreightForwarder(),
visibleIf: {
expand: (value: boolean) => value
}
}
},
bankType: {
createTime: {
title: '提交时间',
type: 'string',
title: '银行类型',
ui: {
widget: 'dict-select',
params: { dictKey: 'bankname:type' },
placeholder: '请输入',
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
placeholder: '请选择',
nzShowTime: true,
visibleIf: {
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: 'createTime', 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: '开票金额',
@ -324,6 +311,11 @@ export class PartnerRecordedRecordComponent implements OnInit {
iif: item => item.refundStatus === '1',
click: item => this.auditAction(item)
},
{
text: '复审',
iif: item => item.refundStatus === '2',
click: item => this.router.navigate(['./detail/' + item.id], { relativeTo: this.ar })
},
{
text: '详情',
click: item => this.router.navigate(['./detail/' + item.id], { relativeTo: this.ar })