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 aef18902..5113c45c 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 @@ -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; } }, { diff --git a/src/app/routes/partner/account-management/components/account-detail/account-detail.component.html b/src/app/routes/partner/account-management/components/account-detail/account-detail.component.html index 7f949749..920a35e7 100644 --- a/src/app/routes/partner/account-management/components/account-detail/account-detail.component.html +++ b/src/app/routes/partner/account-management/components/account-detail/account-detail.component.html @@ -1,4 +1,4 @@ - + diff --git a/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.ts b/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.ts index 4efdf3a2..f773be63 100644 --- a/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.ts +++ b/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.ts @@ -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}`); } /** diff --git a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts index 6b7b86f4..6a428518 100644 --- a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts +++ b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts @@ -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 }) } ] } diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index 5fcfa3a2..79c6269f 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -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 } - ] - }, ] }, { diff --git a/src/app/routes/partner/recorded/components/detail/detail.component.html b/src/app/routes/partner/recorded/components/detail/detail.component.html index ed894907..f3d36121 100644 --- a/src/app/routes/partner/recorded/components/detail/detail.component.html +++ b/src/app/routes/partner/recorded/components/detail/detail.component.html @@ -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. --> - + + + + 待审批 + + {{formData?.refundStatusLabel === + '1'?'审核':'复审'}} + + + - + + + {{formData?.ltdName}} + {{formData?.ltdName}} + + {{formData?.refundApplyCode}} + {{formData?.bankType==='1'?'平安银行':'浦发银行'}} - - {{formData?.refundApplyCode}} - - - {{formData?.bankAccountName}} - - - {{formData?.createTime}} - {{formData?.virtualAccount}} - + + {{formData?.createTime}} + + + {{formData?.amount | currency}} + + + {{formData?.amount | currency}} + + + {{formData?.amount | currency}} + + {{formData?.refundStatusLabel}} - - {{formData?.amount | currency}} + + + + + {{formData?.bankCardNumber}} + + + {{formData?.bankSerialNumber}} - - {{formData?.bankCardNumber}} - - - {{formData?.refundStatus==='3'?'下载回单':'暂无回单'}} - - + + + + + + + + + + + diff --git a/src/app/routes/partner/recorded/components/detail/detail.component.ts b/src/app/routes/partner/recorded/components/detail/detail.component.ts index a4c4b5ba..e1dc2eba 100644 --- a/src/app/routes/partner/recorded/components/detail/detail.component.ts +++ b/src/app/routes/partner/recorded/components/detail/detail.component.ts @@ -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 = []; + 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); } diff --git a/src/app/routes/partner/recorded/components/record/record.component.ts b/src/app/routes/partner/recorded/components/record/record.component.ts index 49b6b08f..4b97ba2c 100644 --- a/src/app/routes/partner/recorded/components/record/record.component.ts +++ b/src/app/routes/partner/recorded/components/record/record.component.ts @@ -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 = []; 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 }) diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 6fce9bbf..1bc855f6 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -508,8 +508,7 @@ { "text": "合伙人管理", "icon": "anticon anticon-dashboard", - "children": [ - { + "children": [{ "text": "合伙人列表", "link": "/partner/partner-list" }, @@ -547,7 +546,7 @@ "group": true, "children": [{ "text": "账户管理", - "link": "/partner/account-management/am" + "link": "/partner/account-management/am/list" }, { "text": "账户明细",
待审批