edit
This commit is contained in:
@ -0,0 +1,50 @@
|
||||
<page-header-wrapper [title]="'退款记录'">
|
||||
</page-header-wrapper>
|
||||
|
||||
<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>
|
||||
<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-tabset>
|
||||
|
||||
<st #st [data]="service.$api_get_refund_record_page" [columns]="columns" [req]="{ process: beforeReq }"
|
||||
[loading]="service.http.loading" [scroll]="{ x:'1200px' }">
|
||||
<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>
|
||||
@ -0,0 +1,292 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { FreightAccountService } from '../../services/freight-account.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-refund-record',
|
||||
templateUrl: './refund-record.component.html',
|
||||
styleUrls: ['../../../commom/less/box.less']
|
||||
})
|
||||
export class RefundRecordComponent implements OnInit {
|
||||
@ViewChild('st', { static: true })
|
||||
st!: STComponent;
|
||||
@ViewChild('sf', { static: false })
|
||||
sf!: SFComponent;
|
||||
@ViewChild('auditModal', { static: false })
|
||||
auditModal!: any;
|
||||
columns: STColumn[] = this.initST();
|
||||
searchSchema: SFSchema = this.initSF();
|
||||
|
||||
_$expand = false;
|
||||
refundStatus: any = '';
|
||||
|
||||
msg = '';
|
||||
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
Object.assign(requestOptions.body, { refundStatus: this.refundStatus || null });
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
...this.sf.value,
|
||||
createTime: {
|
||||
start: this.sf.value.createTime?.[0] || '',
|
||||
end: this.sf.value.createTime?.[1] || ''
|
||||
}
|
||||
});
|
||||
}
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
changeRefundStatus(status?: string) {
|
||||
this.refundStatus = status || null;
|
||||
this.st.load(1);
|
||||
}
|
||||
|
||||
auditAction(item?: any) {
|
||||
this.msg = '';
|
||||
const modal = this.nzModalService.create({
|
||||
nzTitle: '审核',
|
||||
nzContent: this.auditModal,
|
||||
nzFooter: [
|
||||
{
|
||||
label: '拒绝',
|
||||
type: 'default',
|
||||
onClick: () => {
|
||||
this.service
|
||||
.request(this.service.$api_disagree_refund_record, {
|
||||
applicationId: item.id,
|
||||
remark: this.msg
|
||||
})
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('审核拒绝成功');
|
||||
modal.destroy(true);
|
||||
this.st.load(1);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '通过',
|
||||
type: 'primary',
|
||||
onClick: () => {
|
||||
this.service
|
||||
.request(this.service.$api_agree_refund_record, {
|
||||
applicationId: item.id,
|
||||
remark: this.msg
|
||||
})
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('审核通过成功');
|
||||
modal.destroy(true);
|
||||
this.st.load(1);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
reApply(item: any) {
|
||||
const modal = this.nzModalService.warning({
|
||||
nzTitle: '确定要重新发起退款?',
|
||||
nzOnOk: () => {
|
||||
this.service
|
||||
.request(this.service.$api_rebulid_refund_record, {
|
||||
applicationId: item.id
|
||||
})
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('发起成功');
|
||||
modal.destroy(true);
|
||||
this.st.load(1);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
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
|
||||
}
|
||||
},
|
||||
orderRefundCode: {
|
||||
type: 'string',
|
||||
title: '退款单号',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
refundType: {
|
||||
type: 'string',
|
||||
title: '退款类型',
|
||||
enum: [
|
||||
{ value: '1', label: '平台退款货主' },
|
||||
{ value: '2', label: '司机退款平' },
|
||||
{ value: '3', label: '车队长退款司机' },
|
||||
{ value: '4', label: '车队长退款平台' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择'
|
||||
}
|
||||
},
|
||||
shipperId: {
|
||||
type: 'string',
|
||||
title: '货主',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
billCode: {
|
||||
type: 'string',
|
||||
title: '订单号',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
},
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
enterpriseProjectId: {
|
||||
type: 'string',
|
||||
title: '所属项目',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
asyncData: () => this.service.getEnterpriseProject(),
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
resourceId: {
|
||||
type: 'string',
|
||||
title: '货源号',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
},
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
refundExecuteTime: {
|
||||
title: '退款时间',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'sl-from-to-search',
|
||||
format: 'yyyy-MM-dd',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
},
|
||||
nzShowTime: true
|
||||
} as SFDateWidgetSchema
|
||||
},
|
||||
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: 'orderRefundCode', width: 180 },
|
||||
{ title: '退款类型', index: 'refundType', width: 120 },
|
||||
{
|
||||
title: '退款金额',
|
||||
render: 'refundAmount',
|
||||
width: 120,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.refundAmount }) }
|
||||
},
|
||||
{ title: '退款时间', index: 'applyTime', width: 100 },
|
||||
{ title: '货主', index: 'shipperId', width: 100 },
|
||||
{ title: '所属项目', index: 'enterpriseProjectName', width: 140 },
|
||||
{ title: '支付单', index: 'billRefundPaymentVOS.paymentApplicationCode', width: 100 },
|
||||
{ title: '订单号', index: 'billCode', width: 100 },
|
||||
{ title: '货源号', index: 'resourceCode', width: 100 },
|
||||
{ title: '司机', render: ' driver', width: 100 },
|
||||
{ title: '收款人', render: 'captain', width: 100 },
|
||||
{ title: '网络货运人', render: 'ltdName', width: 180 },
|
||||
{ title: '银行类型', index: 'bankTypeLabel', width: 100 },
|
||||
{ title: '退款原因', index: 'rejectionCause', width: 150 },
|
||||
{ title: '失败原因', index: 'failCause', width: 150 },
|
||||
{
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
width: '110px',
|
||||
buttons: [
|
||||
{
|
||||
text: '审核',
|
||||
iif: item => item.refundStatus === '1',
|
||||
click: item => this.auditAction(item)
|
||||
},
|
||||
{
|
||||
text: '重新发起',
|
||||
click: item => this.reApply(item)
|
||||
}
|
||||
// {
|
||||
// text: '关闭',
|
||||
// click: item => this.router.navigate(['/financial-management/withdrawals-record/detail/' + item.id])
|
||||
// }
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -1,41 +0,0 @@
|
||||
:host::ng-deep {
|
||||
.search-box {
|
||||
.ant-card-body {
|
||||
padding-bottom: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
.content-box {
|
||||
.ant-card-body {
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
nz-range-picker {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ant-tabs-tab-btn {
|
||||
padding-right: 16px;
|
||||
padding-left : 16px;
|
||||
}
|
||||
|
||||
.text-truncate {
|
||||
white-space: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.expend-options {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.expend-options {
|
||||
position : absolute;
|
||||
right : 0;
|
||||
bottom : 25px;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
}
|
||||
@ -8,7 +8,7 @@ import { FreightAccountService } from '../../services/freight-account.service';
|
||||
@Component({
|
||||
selector: 'app-withdrawals-record',
|
||||
templateUrl: './withdrawals-record.component.html',
|
||||
styleUrls: ['./withdrawals-record.component.less']
|
||||
styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less']
|
||||
})
|
||||
export class WithdrawalsRecordComponent implements OnInit {
|
||||
@ViewChild('st', { static: true })
|
||||
|
||||
@ -31,6 +31,7 @@ import { PlatformAccountComponent } from './components/platform-account/platform
|
||||
import { PlatformAccountDetailComponent } from './components/platform-account/platform-account-detail/platform-account-detail.component';
|
||||
import { AdvanceCollectionComponent } from './components/advance-collection/advance-collection.component';
|
||||
import { AdvanceCollectionDetailComponent } from './components/advance-collection/advance-collection-detail/advance-collection-detail.component';
|
||||
import { RefundRecordComponent } from './components/refund-record/refund-record.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: 'freight-account', component: FreightAccountComponent, data: { guard: { ability: ['FINANCIAL-FREIGHT-ACOUNT-list'] } } },
|
||||
@ -42,6 +43,7 @@ const routes: Routes = [
|
||||
{ path: 'recharge-record', component: RechargeRecordComponent },
|
||||
{ path: 'withdrawals-record', component: WithdrawalsRecordComponent },
|
||||
{ path: 'withdrawals-record/detail/:id', component: WithdrawalsDetailComponent },
|
||||
{ path: 'refund-record', component: RefundRecordComponent },
|
||||
{ path: 'voucher-management', component: VoucherManagementComponent },
|
||||
{ path: 'voucher-management/detail/:id', component: VoucherDetailComponent },
|
||||
{ path: 'voucher-summary', component: VoucherSummaryComponent },
|
||||
|
||||
@ -34,6 +34,7 @@ import { PlatformAccountComponent } from './components/platform-account/platform
|
||||
import { PlatformAccountDetailComponent } from './components/platform-account/platform-account-detail/platform-account-detail.component';
|
||||
import { AdvanceCollectionComponent } from './components/advance-collection/advance-collection.component';
|
||||
import { AdvanceCollectionDetailComponent } from './components/advance-collection/advance-collection-detail/advance-collection-detail.component';
|
||||
import { RefundRecordComponent } from './components/refund-record/refund-record.component';
|
||||
|
||||
const ROUTESCOMPONENTS = [
|
||||
FreightAccountComponent,
|
||||
@ -64,7 +65,8 @@ const ROUTESCOMPONENTS = [
|
||||
VoucherListComponent,
|
||||
ReceiptOrderDetailComponent,
|
||||
AdvanceCollectionComponent,
|
||||
AdvanceCollectionDetailComponent
|
||||
AdvanceCollectionDetailComponent,
|
||||
RefundRecordComponent
|
||||
];
|
||||
|
||||
const NOTROUTECOMPONENTS = [DriverAccountDetailComponent, FreightAccountDetailComponent, ClearingModalComponent];
|
||||
|
||||
@ -53,6 +53,15 @@ export class FreightAccountService extends ShipperBaseService {
|
||||
// 拒绝提现
|
||||
$api_disagree_refund = '/api/fcc/refundApplicationOBC/disagreeRefund';
|
||||
|
||||
// 查询订单退款申请表
|
||||
$api_get_refund_record_page = '/api/fcc/billRefundApplication/list/page';
|
||||
// 同意退款
|
||||
$api_agree_refund_record= '/api/fcc/billRefundApplication/agreeRefund';
|
||||
// 不同意退款
|
||||
$api_disagree_refund_record = '/api/fcc/billRefundApplication/disagreeRefund';
|
||||
// 重新发起
|
||||
$api_rebulid_refund_record = '/api/fcc/billRefundApplication/rebulid';
|
||||
|
||||
// 查询充值信息表
|
||||
$api_get_recharge_page = '/api/fcc/rechargeInfo/list/getPageByOperator';
|
||||
// 查询异常入金
|
||||
|
||||
Reference in New Issue
Block a user