入账记录
This commit is contained in:
@ -18,9 +18,9 @@
|
||||
<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>
|
||||
<button nz-button [nzType]="'primary'" (click)="auditAction(formData,formData?.refundStatus)">{{formData?.sts
|
||||
===
|
||||
0 ?'审核':'复审'}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
@ -31,48 +31,49 @@
|
||||
<nz-alert nzType="info" nzMessage="入账信息" class="mb-md"></nz-alert>
|
||||
<div se-container [labelWidth]="130">
|
||||
<se label="账户名称">
|
||||
{{formData?.ltdName}}
|
||||
{{formData?.accountName}}
|
||||
</se>
|
||||
<se label="网络货运人">
|
||||
{{formData?.ltdName}}
|
||||
</se>
|
||||
<se label="入账单号">
|
||||
{{formData?.refundApplyCode}}
|
||||
{{formData?.entryNumber}}
|
||||
</se>
|
||||
<se label="银行类型">
|
||||
{{formData?.bankType==='1'?'平安银行':'浦发银行'}}
|
||||
{{formData?.bankName}}
|
||||
</se>
|
||||
<se label="虚拟账户">
|
||||
{{formData?.virtualAccount}}
|
||||
{{formData?.fictitiousAccount}}
|
||||
</se>
|
||||
<se label="提交时间">
|
||||
{{formData?.createTime}}
|
||||
{{formData?.submitTime}}
|
||||
</se>
|
||||
<se label="开票金额">
|
||||
{{formData?.amount | currency}}
|
||||
{{formData?.invoiceAmount | currency}}
|
||||
</se>
|
||||
<se label="代缴个税">
|
||||
{{formData?.amount | currency}}
|
||||
{{formData?.taxPersonal | currency}}
|
||||
</se>
|
||||
<se label="入账金额">
|
||||
{{formData?.amount | currency}}
|
||||
{{formData?.recordedAmount | currency}}
|
||||
</se>
|
||||
<se label="入账状态">
|
||||
{{formData?.refundStatusLabel}}
|
||||
{{formData?.stsLabel}}
|
||||
</se>
|
||||
<se label="发票图片">
|
||||
<img nz-image width="200px" height="200px"
|
||||
nzSrc="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" alt="" />
|
||||
<img *ngIf="formData?.invoiceUrl" nz-image width="200px" height="200px" [nzSrc]="formData?.invoiceUrl" alt="" />
|
||||
<span *ngIf="!formData?.invoiceUrl">-</span>
|
||||
</se>
|
||||
<se label="快递单号">
|
||||
{{formData?.bankCardNumber}}
|
||||
{{formData?.expressName}}
|
||||
</se>
|
||||
<se label="纳税凭证">
|
||||
<img nz-image width="200px" height="200px"
|
||||
nzSrc="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" alt="" />
|
||||
<img *ngIf="formData?.taxVoucherUrl" nz-image width="200px" height="200px" [nzSrc]="formData?.taxVoucherUrl"
|
||||
alt="" />
|
||||
<span *ngIf="!formData?.taxVoucherUrl">-</span>
|
||||
</se>
|
||||
<se label="银行流水号">
|
||||
{{formData?.bankSerialNumber}}
|
||||
{{formData?.bankFlow}}
|
||||
</se>
|
||||
</div>
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ 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';
|
||||
import { RecordedService } from '../../services/recorded.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@ -16,7 +17,7 @@ export class PartnerRecordedDetailComponent implements OnInit {
|
||||
msg = '';
|
||||
id = '';
|
||||
|
||||
constructor(public service: FreightAccountService, private route: ActivatedRoute, private nzModalService: NzModalService) {
|
||||
constructor(public service: RecordedService, private route: ActivatedRoute, private nzModalService: NzModalService) {
|
||||
this.id = route.snapshot.params.id;
|
||||
this.loadRefundDetail(this.id);
|
||||
}
|
||||
@ -24,49 +25,49 @@ export class PartnerRecordedDetailComponent implements OnInit {
|
||||
ngOnInit(): void { }
|
||||
|
||||
loadRefundDetail(id: string) {
|
||||
this.service.request(this.service.$api_get_refund_detail, { id }).subscribe(res => {
|
||||
this.service.request(this.service.$api_get_recorded_record_detail, { id }).subscribe(res => {
|
||||
if (res) {
|
||||
this.formData = res;
|
||||
// 处理流程节点数据
|
||||
// 流程是否结束
|
||||
let isEnd = false;
|
||||
if (res.successTime) {
|
||||
isEnd = true;
|
||||
if (res.refundStatus === '3') {
|
||||
this.timeLineData.push({ time: res.successTime, value: `到账成功`, color: 'green' });
|
||||
} else {
|
||||
this.timeLineData.push({ time: res.successTime, value: `提现失败`, color: 'red' });
|
||||
}
|
||||
}
|
||||
if (res.agreeTime && res.refundStatus !== '4') {
|
||||
this.timeLineData.push({ time: res.agreeTime, value: `银行处理中`, color: 'gray' });
|
||||
}
|
||||
if (res.agreeTime) {
|
||||
if (res.refundStatus === '4') {
|
||||
isEnd = true;
|
||||
this.timeLineData.push({
|
||||
time: res.agreeTime,
|
||||
value: `拒绝提现<br/>操作人员:${res.handlerUserIdLabel}`,
|
||||
color: 'red'
|
||||
});
|
||||
} else {
|
||||
this.timeLineData.push({
|
||||
time: res.agreeTime,
|
||||
value: `审核通过<br/>操作人员:${res.handlerUserIdLabel}`,
|
||||
color: 'gray'
|
||||
});
|
||||
}
|
||||
}
|
||||
if (res.createTime) {
|
||||
this.timeLineData.push({
|
||||
time: res.createTime,
|
||||
value: `提交提现申请<br/>提现${res.amount}元至${res.bankName}(${res.bankCardNumber})<br/>操作人员:${res.userIdLabel}`,
|
||||
color: 'gray'
|
||||
});
|
||||
}
|
||||
if (this.timeLineData?.length > 0 && !isEnd) {
|
||||
this.timeLineData[0].color = 'green';
|
||||
}
|
||||
// let isEnd = false;
|
||||
// if (res.successTime) {
|
||||
// isEnd = true;
|
||||
// if (res.refundStatus === '3') {
|
||||
// this.timeLineData.push({ time: res.successTime, value: `到账成功`, color: 'green' });
|
||||
// } else {
|
||||
// this.timeLineData.push({ time: res.successTime, value: `提现失败`, color: 'red' });
|
||||
// }
|
||||
// }
|
||||
// if (res.agreeTime && res.refundStatus !== '4') {
|
||||
// this.timeLineData.push({ time: res.agreeTime, value: `银行处理中`, color: 'gray' });
|
||||
// }
|
||||
// if (res.agreeTime) {
|
||||
// if (res.refundStatus === '4') {
|
||||
// isEnd = true;
|
||||
// this.timeLineData.push({
|
||||
// time: res.agreeTime,
|
||||
// value: `拒绝提现<br/>操作人员:${res.handlerUserIdLabel}`,
|
||||
// color: 'red'
|
||||
// });
|
||||
// } else {
|
||||
// this.timeLineData.push({
|
||||
// time: res.agreeTime,
|
||||
// value: `审核通过<br/>操作人员:${res.handlerUserIdLabel}`,
|
||||
// color: 'gray'
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// if (res.createTime) {
|
||||
// this.timeLineData.push({
|
||||
// time: res.createTime,
|
||||
// value: `提交提现申请<br/>提现${res.amount}元至${res.bankName}(${res.bankCardNumber})<br/>操作人员:${res.userIdLabel}`,
|
||||
// color: 'gray'
|
||||
// });
|
||||
// }
|
||||
// if (this.timeLineData?.length > 0 && !isEnd) {
|
||||
// this.timeLineData[0].color = 'green';
|
||||
// }
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -85,37 +86,20 @@ export class PartnerRecordedDetailComponent implements OnInit {
|
||||
onClick: () => {
|
||||
if (!this.msg || this.msg.trim().length === 0) {
|
||||
this.service.msgSrv.warning('请填写拒绝原因 ');
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
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;
|
||||
this.audit({ id: params, rejectReason: this.msg, sts: '3' }, () => {
|
||||
modal.destroy(true);
|
||||
}, '审核拒绝成功');
|
||||
}
|
||||
},
|
||||
{
|
||||
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);
|
||||
}
|
||||
});
|
||||
this.audit({ id: params, rejectReason: this.msg, sts: this.formData?.sts === '0' ? 1 : 2 }, () => {
|
||||
modal.destroy(true);
|
||||
}, `${this.formData?.sts === '1' ? '审核' : '复审'}通过成功`);
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -129,4 +113,18 @@ export class PartnerRecordedDetailComponent implements OnInit {
|
||||
goBack() {
|
||||
history.go(-1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核
|
||||
*/
|
||||
audit(params: any, callback: Function, msg = '成功') {
|
||||
this.service
|
||||
.request(this.service.$api_audit_recored, ...params)
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success(msg);
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -41,8 +41,9 @@
|
||||
</ng-template>
|
||||
|
||||
<div class="table-content">
|
||||
<st #st [data]="service.$api_get_refund_page" [columns]="columns" [req]="{ process: beforeReq }"
|
||||
[loading]="service.http.loading" [scroll]="{ x:'1200px' }" (change)="stChange($event)"
|
||||
<st #st [data]="service.$api_get_recorded_page" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true,process: beforeReq}" [loading]="service.http.loading"
|
||||
[scroll]="{ x:'1200px' }" (change)="stChange($event)"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: afterRes }"
|
||||
[page]="{ show: true, pageSizes: [10, 20, 50, 100, 200, 500] }">
|
||||
<ng-template st-row="bankCardNumber" let-item let-index="index" let-column="column">
|
||||
|
||||
@ -2,9 +2,11 @@ import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STComponent, STColumn, STChange, STRequestOptions, STData } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service';
|
||||
import Big from 'src/app/shared/utils/deal-precision';
|
||||
import { RecordedService } from '../../services/recorded.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@ -39,7 +41,8 @@ export class PartnerRecordedRecordComponent implements OnInit {
|
||||
accountName = ''; // 账户名称
|
||||
|
||||
|
||||
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router, public ar: ActivatedRoute) {
|
||||
constructor(public service: RecordedService, private nzModalService: NzModalService,
|
||||
private router: Router, public ar: ActivatedRoute, public shipperSrv: ShipperBaseService) {
|
||||
|
||||
this.accountName = this.ar.snapshot.queryParams?.userIdLabel || '';
|
||||
this.ltdId = this.ar.snapshot.queryParams?.ltdId || '';
|
||||
@ -139,39 +142,34 @@ export class PartnerRecordedRecordComponent implements OnInit {
|
||||
onClick: () => {
|
||||
if (!this.msg || this.msg.trim().length === 0) {
|
||||
this.service.msgSrv.warning('请填写拒绝原因 ');
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
this.service
|
||||
.request(this.service.$api_disagree_refund, {
|
||||
refundApplicationId: params,
|
||||
msg: this.msg
|
||||
})
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('审核拒绝成功');
|
||||
modal.destroy();
|
||||
this.st.load(1);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
this.audit({ id: params, rejectReason: this.msg, sts: '3' }, () => {
|
||||
modal.destroy();
|
||||
this.st.load(1);
|
||||
}, '审核拒绝成功');
|
||||
// this.service
|
||||
// .request(this.service.$api_disagree_recorded, {
|
||||
// id: params,
|
||||
// rejectReason: this.msg
|
||||
// })
|
||||
// .subscribe(res => {
|
||||
// if (res) {
|
||||
// this.service.msgSrv.success('审核拒绝成功');
|
||||
// modal.destroy();
|
||||
// this.st.load(1);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
},
|
||||
{
|
||||
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();
|
||||
this.st.load(1);
|
||||
}
|
||||
});
|
||||
this.audit({ id: params, rejectReason: this.msg, sts: '1' }, () => {
|
||||
modal.destroy();
|
||||
this.st.load(1);
|
||||
}, '审核通过成功');
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -230,12 +228,19 @@ export class PartnerRecordedRecordComponent implements OnInit {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
refundStatus: {
|
||||
sts: {
|
||||
type: 'string',
|
||||
title: '入账状态',
|
||||
default: '',
|
||||
enum: [
|
||||
{ label: '全部', value: '' },
|
||||
{ label: '待初审', value: 0 },
|
||||
{ label: '待复核', value: 1 },
|
||||
{ label: '已入账', value: 2 },
|
||||
{ label: '已拒绝', value: 3 },
|
||||
],
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'refund:apply:status' },
|
||||
widget: 'select',
|
||||
placeholder: '请选择'
|
||||
}
|
||||
},
|
||||
@ -247,10 +252,10 @@ export class PartnerRecordedRecordComponent implements OnInit {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
asyncData: () => this.service.getNetworkFreightForwarder(),
|
||||
asyncData: () => this.shipperSrv.getNetworkFreightForwarder(),
|
||||
}
|
||||
},
|
||||
createTime: {
|
||||
submitTime: {
|
||||
title: '提交时间',
|
||||
type: 'string',
|
||||
ui: {
|
||||
@ -270,9 +275,9 @@ export class PartnerRecordedRecordComponent implements OnInit {
|
||||
private initST(): STColumn[] {
|
||||
return [
|
||||
{ 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: 190, className: 'text-center' },
|
||||
{ title: '账户名称', index: 'accountName', width: 180, className: 'text-center' },
|
||||
{ title: '虚拟账户', index: 'fictitiousAccount', width: 180, className: 'text-center' },
|
||||
{ title: '入账单号', index: 'entryNumber', width: 190, className: 'text-center' },
|
||||
{ title: '网络货运人', index: 'ltdName', width: 220, className: 'text-center' },
|
||||
{
|
||||
title: '开票金额',
|
||||
@ -284,7 +289,7 @@ export class PartnerRecordedRecordComponent implements OnInit {
|
||||
},
|
||||
{
|
||||
title: '代缴个税',
|
||||
index: 'amount',
|
||||
index: 'taxPersonal',
|
||||
width: 150,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
@ -292,15 +297,15 @@ export class PartnerRecordedRecordComponent implements OnInit {
|
||||
},
|
||||
{
|
||||
title: '入账金额',
|
||||
index: 'amount',
|
||||
index: 'entryAmount',
|
||||
width: 150,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.amount }) }
|
||||
},
|
||||
|
||||
{ title: '提交时间', index: 'bankSerialNumber', width: 160, className: 'text-center' },
|
||||
{ title: '入账状态', index: 'refundStatusLabel', width: 100, className: 'text-center' },
|
||||
{ title: '提交时间', index: 'submitTime', width: 160, className: 'text-center' },
|
||||
{ title: '入账状态', index: 'stsLabel', width: 100, className: 'text-center' },
|
||||
{
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
@ -308,12 +313,12 @@ export class PartnerRecordedRecordComponent implements OnInit {
|
||||
buttons: [
|
||||
{
|
||||
text: '审核',
|
||||
iif: item => item.refundStatus === '1',
|
||||
iif: item => item.refundStatus === '0',
|
||||
click: item => this.auditAction(item)
|
||||
},
|
||||
{
|
||||
text: '复审',
|
||||
iif: item => item.refundStatus === '2',
|
||||
iif: item => item.sts === '1',
|
||||
click: item => this.router.navigate(['./detail/' + item.id], { relativeTo: this.ar })
|
||||
},
|
||||
{
|
||||
@ -324,4 +329,18 @@ export class PartnerRecordedRecordComponent implements OnInit {
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核
|
||||
*/
|
||||
audit(params: any, callback: Function, msg = '成功') {
|
||||
this.service
|
||||
.request(this.service.$api_audit_recored, ...params)
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success(msg);
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
17
src/app/routes/partner/recorded/services/recorded.service.ts
Normal file
17
src/app/routes/partner/recorded/services/recorded.service.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { BaseService } from '@shared';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class RecordedService extends BaseService {
|
||||
|
||||
$api_get_recorded_page = `/api/bpc/partnerInvoice/getDetail`; // 查询合伙人发票入账主表
|
||||
$api_get_recorded_record_detail = `api/bpc/partnerInvoice/getDetailByOpration`; // 入账记录详情
|
||||
$api_disagree_recorded = ``; // 拒绝审核
|
||||
$api_agree_recorded = ``; // 同意审核
|
||||
$api_audit_recored = `/api/bpc/partnerInvoiceEntry/oprationAudit`; // 审核单据
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user