From 929fda3253a4cd5d89101f193f15e1f1281d9b0d Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Wed, 29 Dec 2021 16:58:32 +0800 Subject: [PATCH] edit --- .../withdrawals-detail.component.html | 4 +-- .../withdrawals-detail.component.ts | 26 ++++++++++++++- .../withdrawals-record.component.html | 2 +- .../withdrawals-record.component.ts | 32 +++++++++++++++++-- .../services/freight-account.service.ts | 4 +++ .../logistics-time-line.component.html | 7 ++-- .../logistics-time-line.component.ts | 15 ++++++--- 7 files changed, 74 insertions(+), 16 deletions(-) diff --git a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.html b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.html index 7d0eb664..a1fa2b74 100644 --- a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.html +++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.html @@ -40,14 +40,14 @@ {{formData?.bankId}} - +
- +
\ No newline at end of file diff --git a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts index c26e4e79..a71aabad 100644 --- a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts +++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.ts @@ -10,6 +10,8 @@ import { FreightAccountService } from '../../../services/freight-account.service export class WithdrawalsDetailComponent implements OnInit { formData: any = {}; + timeLineData: any = []; + refundStatus: any = { '1': '待审核', '2': '提现中', @@ -27,9 +29,31 @@ export class WithdrawalsDetailComponent implements OnInit { loadRefundDetail(id: string) { this.service.request(this.service.$api_get_refund_detail, { id }).subscribe(res => { - console.log(res); if (res) { this.formData = res; + if (res.successTime) { + this.timeLineData.push({ time: res.successTime, value: `到账成功`, color: 'green' }); + } + if (res.agreeTime) { + this.timeLineData.push({ time: res.agreeTime, value: `银行处理中`, color: 'gray' }); + } + if (res.agreeTime) { + this.timeLineData.push({ + time: res.agreeTime, + value: `审核通过
操作人员:${res.bankAccountName}`, + color: 'gray' + }); + } + if (res.createTime) { + this.timeLineData.push({ + time: res.createTime, + value: `提交提现申请
提现${res.amount}元至${res.bankName}(${res.bankCardNumber})
操作人员:${res.bankAccountName}`, + color: 'gray' + }); + } + if (this.timeLineData?.length > 0) { + this.timeLineData[0].color = 'green'; + } } }); } diff --git a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.html b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.html index be659676..4cd6d4ca 100644 --- a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.html +++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.html @@ -80,7 +80,7 @@
-
diff --git a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts index 92a6c860..d82a0bd7 100644 --- a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts +++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts @@ -25,6 +25,8 @@ export class WithdrawalsRecordComponent implements OnInit { selectedRows: any[] = []; totalCallNo = 0; refundStatus: any = ''; + + msg = ''; constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {} ngOnInit(): void {} @@ -57,7 +59,11 @@ export class WithdrawalsRecordComponent implements OnInit { this.st.load(1); } - auditAction(item: any) { + auditAction(item?: any) { + this.msg = ''; + if(!item){ + + } const modal = this.nzModalService.create({ nzTitle: '审核', nzContent: this.auditModal, @@ -66,14 +72,34 @@ export class WithdrawalsRecordComponent implements OnInit { label: '拒绝', type: 'default', onClick: () => { - modal.destroy(); + this.service + .request(this.service.$api_disagree_refund, { + refundApplicationId: item.id, + msg: this.msg + }) + .subscribe(res => { + if (res) { + this.service.msgSrv.success('审核拒绝成功'); + modal.destroy(); + } + }); } }, { label: '通过', type: 'primary', onClick: () => { - modal.destroy(); + this.service + .request(this.service.$api_agree_refund, { + refundApplicationId: item.id, + msg: this.msg + }) + .subscribe(res => { + if (res) { + this.service.msgSrv.success('审核通过成功'); + modal.destroy(); + } + }); } } ] diff --git a/src/app/routes/financial-management/services/freight-account.service.ts b/src/app/routes/financial-management/services/freight-account.service.ts index 9c2604c5..47f4ea06 100644 --- a/src/app/routes/financial-management/services/freight-account.service.ts +++ b/src/app/routes/financial-management/services/freight-account.service.ts @@ -31,6 +31,10 @@ export class FreightAccountService extends ShipperBaseService { $api_get_refund_page = '/api/fcc/refundApplicationSMC/list/page'; // 获取提现申请表详情 $api_get_refund_detail = '/api/fcc/refundApplicationSMC/get'; + // 同意提现 + $api_agree_refund = '/api/fcc/refundApplicationSMC/agreeRefund'; + // 拒绝提现 + $api_disagree_refund = '/api/fcc/refundApplicationSMC/disagreeRefund'; // 查询充值信息表 $api_get_recharge_page = '/api/fcc/rechargeInfo/list/page'; diff --git a/src/app/shared/components/logistics-time-line/logistics-time-line.component.html b/src/app/shared/components/logistics-time-line/logistics-time-line.component.html index 34f96ff9..5ab3688a 100644 --- a/src/app/shared/components/logistics-time-line/logistics-time-line.component.html +++ b/src/app/shared/components/logistics-time-line/logistics-time-line.component.html @@ -1,6 +1,5 @@ - 快件已签收 - 正在派送中,请您准备签收(派件人:吴彦祖,联系电话:13811223133) - 快件已到【深圳市龙岗区配送中心】扫描员是【张三】 - 【顺丰快递】的收件员已揽件 + + + \ No newline at end of file diff --git a/src/app/shared/components/logistics-time-line/logistics-time-line.component.ts b/src/app/shared/components/logistics-time-line/logistics-time-line.component.ts index e57ad269..ed2607da 100644 --- a/src/app/shared/components/logistics-time-line/logistics-time-line.component.ts +++ b/src/app/shared/components/logistics-time-line/logistics-time-line.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; @Component({ selector: 'app-logistics-time-line', @@ -6,10 +6,15 @@ import { Component, OnInit } from '@angular/core'; styleUrls: ['./logistics-time-line.component.less'] }) export class LogisticsTimeLineComponent implements OnInit { + @Input() + data: any = [ + { time: '2020-07-29 11:02:00', value: '到账成功', color: 'green' }, + { time: '2020-07-29 11:02:00', value: '银行处理中', color: 'gray' }, + { time: '2020-07-29 11:02:00', value: '审核通过
操作人员:李四', color: 'gray' }, + { time: '2020-07-29 11:02:00', value: '提交提现申请
提现1000.00元至招商银行(8889)
操作人员:张三', color: 'gray' } + ]; - constructor() { } - - ngOnInit(): void { - } + constructor() {} + ngOnInit(): void {} }