edit
This commit is contained in:
@ -24,15 +24,34 @@
|
||||
<nz-card class="content-box" nzBordered>
|
||||
|
||||
<nz-tabset>
|
||||
<nz-tab nzTitle="全部"></nz-tab>
|
||||
<nz-tab nzTitle="支付中"></nz-tab>
|
||||
<nz-tab nzTitle="已支付"></nz-tab>
|
||||
<nz-tab nzTitle="支付失败"></nz-tab>
|
||||
<nz-tab nzTitle="全部" (nzClick)="changePaymentStatus()"></nz-tab>
|
||||
<nz-tab nzTitle="支付中" (nzClick)="changePaymentStatus('3')"></nz-tab>
|
||||
<nz-tab nzTitle="已支付" (nzClick)="changePaymentStatus('1')"></nz-tab>
|
||||
<nz-tab nzTitle="支付失败" (nzClick)="changePaymentStatus('4')"></nz-tab>
|
||||
</nz-tabset>
|
||||
|
||||
<st #st [data]="service.$mock_url" [columns]="columns"
|
||||
<st #st [data]="service.$api_get_order_payment_page" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '370px' }"></st>
|
||||
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '370px' }">
|
||||
<ng-template st-row="orderPaymentCode" let-item let-index="index" let-column="column">
|
||||
{{ item.orderPaymentCode }} <br> <a>{{ paymentStatusEm[item.paymentStatus] }}</a>
|
||||
</ng-template>
|
||||
<ng-template st-row="amountDetails" let-item let-index="index" let-column="column">
|
||||
预付:¥{{ item.price }}<br />附加费:¥ {{ item.surcharge }}
|
||||
</ng-template>
|
||||
<ng-template st-row="billCode" let-item let-index="index" let-column="column">
|
||||
{{ item.billCode }} <br> {{billStatus[item.billStatus] }}
|
||||
</ng-template>
|
||||
<ng-template st-row="wayBillCode" let-item let-index="index" let-column="column">
|
||||
{{ item.wayBillCode }} <br> {{wayBillStatus[item.wayBillStatus ] }}
|
||||
</ng-template>
|
||||
<ng-template st-row="driverId" let-item let-index="index" let-column="column">
|
||||
{{ item.driverName }} <br> {{ item.driverTelephone }} <br> {{ item.driverLicensePlate }}
|
||||
</ng-template>
|
||||
<ng-template st-row="captainName" let-item let-index="index" let-column="column">
|
||||
{{ item.captainName }} <br> {{ item.captainTelephone }}
|
||||
</ng-template>
|
||||
</st>
|
||||
</nz-card>
|
||||
@ -19,20 +19,61 @@ export class PaymentRecordComponent implements OnInit {
|
||||
columns: STColumn[] = this.initST();
|
||||
searchSchema: SFSchema = this.initSF();
|
||||
|
||||
|
||||
_$expand = false;
|
||||
|
||||
paymentStatus: any = '';
|
||||
|
||||
paymentStatusEm: any = {
|
||||
0: '待支付',
|
||||
1: '已支付',
|
||||
2: '已拒绝',
|
||||
3: '支付中',
|
||||
4: '支付失败'
|
||||
};
|
||||
billStatus: any = {
|
||||
1: '待接单',
|
||||
2: '待发车',
|
||||
3: '运输中',
|
||||
4: '待签收',
|
||||
5: '已完成',
|
||||
6: '已取消'
|
||||
};
|
||||
wayBillStatus: any = {
|
||||
1: '待接单',
|
||||
2: '待发车',
|
||||
3: '运输中',
|
||||
4: '待签收',
|
||||
5: '已完成',
|
||||
6: '已取消'
|
||||
};
|
||||
|
||||
constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, { ...this.sf.value });
|
||||
Object.assign(requestOptions.body, {
|
||||
...this.sf.value,
|
||||
applyDate: {
|
||||
start: this.sf.value.applyDate?.[0] || null,
|
||||
end: this.sf.value.applyDate?.[1] || null
|
||||
},
|
||||
handlerDate: {
|
||||
start: this.sf.value.handlerDate?.[0] || null,
|
||||
end: this.sf.value.handlerDate?.[1] || null
|
||||
},
|
||||
paymentStatus: this.paymentStatus || ''
|
||||
});
|
||||
}
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
changePaymentStatus(status?: string) {
|
||||
this.paymentStatus = status || null;
|
||||
this.st.load(1);
|
||||
}
|
||||
|
||||
refund(item: any) {
|
||||
this.nzModalService.warning({
|
||||
nzTitle: '确定要关闭所选支付记录?',
|
||||
@ -72,33 +113,34 @@ export class PaymentRecordComponent implements OnInit {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
order2Sn: {
|
||||
billCode: {
|
||||
type: 'string',
|
||||
title: '订单号',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
orderSn22: {
|
||||
resourceCode: {
|
||||
type: 'string',
|
||||
title: '货源编号',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
orderSn2: {
|
||||
serviceType: {
|
||||
type: 'string',
|
||||
title: '服务类型',
|
||||
enum: [{ label: '全部', value: '全部' }],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'service:type' },
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
orderSn221: {
|
||||
driver: {
|
||||
type: 'string',
|
||||
title: '承运司机',
|
||||
ui: {
|
||||
@ -108,7 +150,7 @@ export class PaymentRecordComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
orderS2n221: {
|
||||
driverLicensePlate: {
|
||||
type: 'string',
|
||||
title: '车牌号',
|
||||
ui: {
|
||||
@ -118,7 +160,7 @@ export class PaymentRecordComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
orderS2n2221: {
|
||||
captain: {
|
||||
type: 'string',
|
||||
title: '收款人',
|
||||
ui: {
|
||||
@ -128,73 +170,87 @@ export class PaymentRecordComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
orderSn221f: {
|
||||
isCaptain: {
|
||||
type: 'string',
|
||||
title: '车队长收款',
|
||||
enum: [{ label: '全部', value: '全部' }],
|
||||
enum: [
|
||||
{ label: '全部', value: '' },
|
||||
{ label: '否', value: 0 },
|
||||
{ label: '是', value: 1 }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
ord1erSn221f: {
|
||||
payType: {
|
||||
type: 'string',
|
||||
title: '支付类型',
|
||||
enum: [{ label: '全部', value: '全部' }],
|
||||
enum: [{ label: '全部', value: '' }],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
createTime: {
|
||||
applyDate: {
|
||||
title: '申请时间',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'date',
|
||||
mode: 'range',
|
||||
widget: 'sl-from-to-search',
|
||||
format: 'yyyy-MM-dd',
|
||||
placeholder: '请选择',
|
||||
nzShowTime: true,
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
} as SFDateWidgetSchema
|
||||
},
|
||||
create1Time: {
|
||||
handlerDate: {
|
||||
title: '处理时间',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'date',
|
||||
mode: 'range',
|
||||
widget: 'sl-from-to-search',
|
||||
format: 'yyyy-MM-dd',
|
||||
placeholder: '请选择',
|
||||
nzShowTime: true,
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
} as SFDateWidgetSchema
|
||||
},
|
||||
orderSn5221f: {
|
||||
bankType: {
|
||||
type: 'string',
|
||||
title: '银行类型',
|
||||
enum: [{ label: '全部', value: '全部' }],
|
||||
enum: [
|
||||
{ label: '全部', value: '' },
|
||||
{ label: '平安银行', value: '1' },
|
||||
{ label: '浦发银行', value: '2' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
orde1rSn5221f: {
|
||||
ltdid: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
enum: [{ label: '全部', value: '全部' }],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
asyncData: () => this.service.getNetworkFreightForwarder(),
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
@ -206,24 +262,49 @@ export class PaymentRecordComponent implements OnInit {
|
||||
|
||||
private initST(): STColumn[] {
|
||||
return [
|
||||
{ title: '支付编号', index: 'no', width: 150, format: item => `JS20210930000001</br><label class="text-orange">支付中</label>` },
|
||||
{ title: '支付金额', index: 'callNo', width: 100, format: item => `¥2000.00` },
|
||||
{ title: '运费明细', index: 'callNo', width: 150, format: item => `预付:¥ 4000.00</br>附加费:¥ 200.00` },
|
||||
{ title: '支付类型', index: 'callNo', width: 100 },
|
||||
{ title: '货主', index: 'callNo', width: 100 },
|
||||
{ title: '订单号', index: 'callNo', width: 100, format: item => `DZ210817466436972</br><label class="text-orange">待签收</label>` },
|
||||
{ title: '运单号', index: 'callNo', width: 100, format: item => `DZ210817466436972</br><label class="text-orange">待签收</label>` },
|
||||
{ title: '货源编号', index: 'callNo', width: 100 },
|
||||
{ title: '服务类型', index: 'callNo', type: 'date', width: 150 },
|
||||
{ title: '承运司机', index: 'callNo', width: 120, format: item => `特朗普</br>13789040523</br>粤GT8419` },
|
||||
{ title: '收款人', index: 'callNo', width: 120, format: item => `拜登</br>13789040523` },
|
||||
{ title: '银行类型', index: 'callNo', type: 'date', width: 150 },
|
||||
{ title: '网络货运人', index: 'callNo', width: 120 },
|
||||
{ title: '申请时间', index: 'callNo', width: 150 },
|
||||
{ title: '申请人', index: 'callNo', width: 90 },
|
||||
{ title: '处理时间', index: 'callNo', width: 150 },
|
||||
{ title: '处理人', index: 'callNo', width: 90 },
|
||||
{ title: '失败原因', index: 'callNo', width: 100 },
|
||||
{ title: '支付编号', render: 'orderPaymentCode', width: 150 },
|
||||
{ title: '支付金额', render: 'payAmount', width: 100, format: item => `¥${item.payAmount}` },
|
||||
{
|
||||
title: '运费明细',
|
||||
render: 'amountDetails',
|
||||
width: 150,
|
||||
format: item => {
|
||||
let surcharge = 0;
|
||||
(item.amountDetails as Array<any>).forEach(detail => {
|
||||
surcharge += detail.surcharge || 0;
|
||||
});
|
||||
item.surcharge = surcharge;
|
||||
item.price = item.amountDetails?.[0]?.price || 0;
|
||||
return '';
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '支付类型',
|
||||
index: 'payType',
|
||||
width: 130,
|
||||
type: 'enum',
|
||||
enum: { 1: '货主支付平台', 2: '平台支付司机', 3: '司机支付车队长' }
|
||||
},
|
||||
{ title: '货主', index: 'enterpriseInfoName', width: 100 },
|
||||
{ title: '订单号', render: 'billCode', width: 120 },
|
||||
{ title: '运单号', render: 'wayBillCode', width: 120 },
|
||||
{ title: '货源编号', index: 'resourceCode', width: 120 },
|
||||
{
|
||||
title: '服务类型',
|
||||
index: 'serviceType',
|
||||
width: 150,
|
||||
type: 'enum',
|
||||
enum: { '1': '抢单', '2': '指派', '3': '二维码', '4': '手工单' }
|
||||
},
|
||||
{ title: '承运司机', render: 'driverId', width: 120 },
|
||||
{ title: '收款人', render: 'captainName', width: 120 },
|
||||
{ title: '银行类型', index: 'bankType', width: 150, type: 'enum', enum: { 1: '平安银行', 2: '浦发银行' } },
|
||||
{ title: '网络货运人', index: 'ltdname', width: 120 },
|
||||
{ title: '申请时间', index: 'applyTime', width: 160 },
|
||||
{ title: '申请人', index: 'applyUsername', width: 90 },
|
||||
{ title: '处理时间', index: 'handleTime', width: 150 },
|
||||
{ title: '处理人', index: 'handlerUsername', width: 90 },
|
||||
{ title: '失败原因', index: 'failCause', width: 100 },
|
||||
{
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
@ -232,6 +313,7 @@ export class PaymentRecordComponent implements OnInit {
|
||||
buttons: [
|
||||
{
|
||||
text: '关闭',
|
||||
iif: item => item.paymentStatus === 4,
|
||||
click: item => this.refund(item)
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user