From 727bdd191c32e4da902c140eeb611c8d704f58ee Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 11 Apr 2022 21:20:37 +0800 Subject: [PATCH] fix bug --- .../etc-invoiced-list.component.ts | 21 ++++----- .../transaction-details.component.html | 44 +++++++++++++------ .../transaction-details.component.ts | 39 +++++++++------- 3 files changed, 63 insertions(+), 41 deletions(-) diff --git a/src/app/routes/ticket-management/components/etc-invoiced-list/etc-invoiced-list.component.ts b/src/app/routes/ticket-management/components/etc-invoiced-list/etc-invoiced-list.component.ts index 6a71e343..bb3aae92 100644 --- a/src/app/routes/ticket-management/components/etc-invoiced-list/etc-invoiced-list.component.ts +++ b/src/app/routes/ticket-management/components/etc-invoiced-list/etc-invoiced-list.component.ts @@ -38,7 +38,7 @@ export class ETCInvoicedListComponent implements OnInit { nzTitle: '运单交易明细', nzContent: TransactionDetailsComponent, nzWidth: 900, - nzComponentParams: { data: [] }, + nzComponentParams: { data: item }, nzOnOk: com => { console.log(com.selectedData); }, @@ -147,8 +147,8 @@ export class ETCInvoicedListComponent implements OnInit { private initST(): STColumn[] { return [ - { title: '运单号', index: 'wayBillCode' }, - { title: '订单号', index: 'billCode' }, + { title: '运单号', index: 'wayBillCode',width: 200 }, + { title: '订单号', index: 'billCode',width: 200 }, { title: '开票状态', index: 'invoicingStatus', @@ -157,12 +157,12 @@ export class ETCInvoicedListComponent implements OnInit { width: 120 }, { title: '订单类型', index: 'billTypeLabel', width: 120 }, - { title: '装货地', index: 'loadingPlace' }, - { title: '卸货地', index: 'dischargePlace' }, - { title: '司机信息', render: 'call1No' }, - { title: '车辆信息', render: 'call12No' }, - { title: '托运人', index: 'shipperAppUserName' }, - { title: '网络货运人', index: 'enterpriseInfoName' }, + { title: '装货地', index: 'loadingPlace',width: 200 }, + { title: '卸货地', index: 'dischargePlace' ,width: 200}, + { title: '司机信息', render: 'call1No' ,width: 200}, + { title: '车辆信息', render: 'call12No',width: 200 }, + { title: '托运人', index: 'shipperAppUserName',width: 200 }, + { title: '网络货运人', index: 'enterpriseInfoName' ,width: 200}, { title: '开票金额', index: 'invoicingAmount', @@ -179,10 +179,11 @@ export class ETCInvoicedListComponent implements OnInit { className: 'text-right', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.invoicingNumber }) } }, - { title: '申请时间', index: 'orderReceivingTime', type: 'date' }, + { title: '申请时间', index: 'orderReceivingTime', type: 'date',width: 200 }, { title: '操作', className: 'text-center', + width: 120, buttons: [ { text: '交易明细', diff --git a/src/app/routes/ticket-management/components/etc-invoiced-list/transaction-details/transaction-details.component.html b/src/app/routes/ticket-management/components/etc-invoiced-list/transaction-details/transaction-details.component.html index 2dbe9ec4..c5ec8500 100644 --- a/src/app/routes/ticket-management/components/etc-invoiced-list/transaction-details/transaction-details.component.html +++ b/src/app/routes/ticket-management/components/etc-invoiced-list/transaction-details/transaction-details.component.html @@ -1,16 +1,32 @@ +
-
- -
-
- - -
+
+ +
+
+ + +
- -
\ No newline at end of file + + diff --git a/src/app/routes/ticket-management/components/etc-invoiced-list/transaction-details/transaction-details.component.ts b/src/app/routes/ticket-management/components/etc-invoiced-list/transaction-details/transaction-details.component.ts index 5678fc55..f1a60062 100644 --- a/src/app/routes/ticket-management/components/etc-invoiced-list/transaction-details/transaction-details.component.ts +++ b/src/app/routes/ticket-management/components/etc-invoiced-list/transaction-details/transaction-details.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-03-14 14:17:38 * @LastEditors : Shiming - * @LastEditTime : 2022-04-11 20:56:20 + * @LastEditTime : 2022-04-11 21:18:50 * @FilePath : \\tms-obc-web\\src\\app\\routes\\ticket-management\\components\\etc-invoiced-list\\transaction-details\\transaction-details.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -20,7 +20,7 @@ import { TicketService } from '../../../services/ticket.service'; templateUrl: './transaction-details.component.html' }) export class TransactionDetailsComponent implements OnInit { - data = []; + data :any= []; selectedData = []; url = `/api/fcc/ficoEtcInvoiceH/list/page`; @ViewChild('st', { static: true }) @@ -31,7 +31,7 @@ export class TransactionDetailsComponent implements OnInit { { title: '交易id', index: 'id' }, { title: '交易流水号', index: 'tradeFlowNo' }, { title: '交易金额', index: 'fee' }, - { title: '开票状态', index: 'state', type: 'enum', enum: { '0': '待开具', '1': '开具中', '2': '已开具', '3': '开票失败' } }, + { title: '开票状态', index: 'stateLabel' }, { title: '交易时间', index: 'exTime', type: 'date' } ]; searchSchema: SFSchema = { @@ -63,24 +63,29 @@ export class TransactionDetailsComponent implements OnInit { } }; - reqParams = {}; constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {} - ngOnInit(): void {} - - beforeReq = (requestOptions: STRequestOptions) => { - if (this.sf) { - Object.assign(requestOptions.body, { - ...this.sf.value, - exTime: { - start: this.sf.value.exTime?.[0] || '', - end: this.sf.value.exTime?.[1] || '' - } - }); + ngOnInit(): void { + console.log(this.data); + + } + get reqParams() { + const a: any = {}; + if (this.data?.id) { + a.id = this.data?.wayBillId; } - return requestOptions; - }; + const params: any = Object.assign({}, this.sf?.value || {}); + delete params._$expand; + return { + ...a, + ...params, + exTime: { + start: this.sf?.value?.exTime?.[0] || '', + end: this.sf?.value?.exTime?.[1] || '' + } + }; + } /** * 重置表单