diff --git a/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.ts b/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.ts index 49955f8a..cb2c9e06 100644 --- a/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.ts +++ b/src/app/routes/tax-management/components/invoice-reporting/invoice-reporting.component.ts @@ -230,7 +230,7 @@ export class TaxManagementInvoiceReportingComponent implements OnInit { { title: '购买方企业名称', index: 'artoname', className: 'text-center', width: '200px', type: 'link', click: item => { - window.open(`/#/usercenter/freight/list/detail/${item.ltdId}`, '_blank', 'noopener') + window.open(`/#/usercenter/freight/list/detail/${item.arto}`, '_blank', 'noopener') } }, { title: '购买方统一社会信用代码', index: 'artotaxno', className: 'text-center', width: '200px' }, diff --git a/src/app/routes/ticket-management/components/billing-order/billing-order.component.html b/src/app/routes/ticket-management/components/billing-order/billing-order.component.html new file mode 100644 index 00000000..459c631c --- /dev/null +++ b/src/app/routes/ticket-management/components/billing-order/billing-order.component.html @@ -0,0 +1,32 @@ + + + + + + + + + + + 查询 + 重置 + 导出 + + {{ !_$expand ? '展开' : '收起' }} + + + + + + + + + + {{item.driverName}}{{item.driverCellphone}} + + + \ No newline at end of file diff --git a/src/app/routes/ticket-management/components/billing-order/billing-order.component.ts b/src/app/routes/ticket-management/components/billing-order/billing-order.component.ts new file mode 100644 index 00000000..5bd08959 --- /dev/null +++ b/src/app/routes/ticket-management/components/billing-order/billing-order.component.ts @@ -0,0 +1,259 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { Router } from '@angular/router'; +import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st'; +import { SFComponent, SFSchema, SFDateWidgetSchema, SFSelectWidgetSchema } from '@delon/form'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { TicketService } from '../../services/ticket.service'; + +@Component({ + selector: 'app-billing-order', + templateUrl: './billing-order.component.html', + styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less'] +}) +export class BillingOrderComponent implements OnInit { + @ViewChild('st', { static: true }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + columns: STColumn[] = this.initST(); + searchSchema: SFSchema = this.initSF(); + + _$expand = false; + + 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] || '' + }, + invoiceMakeTime: { + start: this.sf.value.invoiceMakeTime?.[0] || '', + end: this.sf.value.invoiceMakeTime?.[1] || '' + } + }); + } + return requestOptions; + }; + + routeTo(item: any) { + return; + this.router.navigate(['/ticket/invoice-requested-detail/1']); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this._$expand = false; + } + + /** + * 伸缩查询条件 + */ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/expand', this._$expand); + } + + exportList() { + const params = { listSource: 1, pageSize: -1 }; + if (this.sf) { + Object.assign(params, { + ...this.sf.value + }); + } + this.service.downloadFile(this.service.$api_export_invoice_logs_page, params); + } + + private initSF(): SFSchema { + return { + properties: { + expand: { + type: 'boolean', + ui: { + hidden: true + } + }, + billCode: { + type: 'string', + title: '订单号', + ui: { + placeholder: '请输入' + } + }, + serviceType: { + title: '服务类型', + type: 'string', + default: '', + ui: { + widget: 'dict-select', + params: { dictKey: 'service:type' }, + containsAllLabel: true, + visibleIf: { + _$expand: (value: boolean) => value + } + } as SFSelectWidgetSchema + }, + enterpriseName: { + type: 'string', + title: '货主名称', + ui: { + placeholder: '请输入', + } + }, + vatappHCode: { + type: 'string', + title: '申请编号', + ui: { + autocomplete: 'off', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + vatinvcode: { + type: 'string', + title: '分票编号', + ui: { + placeholder: '请输入', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + createTime: { + title: '申请时间', + type: 'string', + ui: { + widget: 'sl-from-to-search', + format: 'yyyy-MM-dd HH:mm:ss', + nzShowTime: true, + visibleIf: { + expand: (value: boolean) => value + } + } as SFDateWidgetSchema + }, + invoicingStatus: { + type: 'string', + title: '开票状态', + ui: { + widget: 'dict-select', + params: { dictKey: 'etc:invoicing:status' }, + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + }, + default: '' + }, + invoiceNum: { + type: 'string', + title: '发票号码', + ui: { + placeholder: '请输入', + autocomplete: 'off', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + approvalTime: { + title: '审核时间', + type: 'string', + ui: { + widget: 'sl-from-to-search', + format: 'yyyy-MM-dd HH:mm:ss', + nzShowTime: true, + visibleIf: { + expand: (value: boolean) => value + } + } as SFDateWidgetSchema + }, + invoiceMakeTime: { + title: '开票日期', + type: 'string', + ui: { + widget: 'sl-from-to-search', + format: 'yyyy-MM-dd', + visibleIf: { + expand: (value: boolean) => value + } + } as SFDateWidgetSchema + }, + ltdId: { + type: 'string', + title: '网络货运人', + ui: { + widget: 'select', + placeholder: '请选择', + allowClear: true, + visibleIf: { + expand: (value: boolean) => value + }, + asyncData: () => this.service.getNetworkFreightForwarder() + }, + default: '' + } + } + }; + } + + private initST(): STColumn[] { + return [ + { title: '发票号码', index: 'invoiceNum', width: 100, type: 'link', click: item => this.routeTo(item) }, + { title: '发票代码', index: 'invoiceCode', width: 130 }, + { title: '订单号', index: 'billCode', width: 180 }, + { title: '运单号', index: 'waybillCode', width: 180 }, + { title: '入站口', index: 'enStationName', width: 100 }, + { title: '出站口', index: 'exStationName', width: 100 }, + { title: '司机', render: 'call3No', width: 140 }, + { title: '车牌号', index: 'carNo', width: 100 }, + // { title: '里程(km)', index: 'mileage', width: 120 }, + { title: '交易id', index: 'tradeId', width: 200 }, + { + title: '交易金额(元)', + index: 'fee', + width: 150, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.fee }) } + }, + { title: '税率', index: 'taxRate', width: 90, format: item => `${item.taxRate ? ((item.taxRate as number) * 100).toFixed(2) : 0}%` }, + { + title: '金额(元)', + index: 'invoiceAmount', + width: 120, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.invoiceAmount }) } + }, + { + title: '税额(元)', + index: 'totalTaxAmount', + width: 150, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.totalTaxAmount }) } + }, + { + title: '价税合计(元)', + index: 'totalAmount', + width: 150, + type: 'widget', + className: 'text-right font-weight-bold', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.totalAmount }) } + }, + { title: '交易时间', index: 'exTime', type: 'date', width: 150 }, + { title: '开票日期', index: 'invoiceMakeTime', type: 'date', width: 150 }, + { title: '销售方', index: 'sellerName', width: 150 }, + { title: '网络货运人', index: 'enterpriseInfoName', width: 220 } + ]; + } +} diff --git a/src/app/routes/ticket-management/ticket-management-routing.module.ts b/src/app/routes/ticket-management/ticket-management-routing.module.ts index 5cbcd7d0..51369dec 100644 --- a/src/app/routes/ticket-management/ticket-management-routing.module.ts +++ b/src/app/routes/ticket-management/ticket-management-routing.module.ts @@ -1,5 +1,6 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; +import { BillingOrderComponent } from './components/billing-order/billing-order.component'; import { CancellationInvoiceComponent } from './components/cancellation-invoice/cancellation-invoice.component'; import { ETCBlacklistComponent } from './components/etc-blacklist/etc-blacklist.component'; import { ETCInvoicedListComponent } from './components/etc-invoiced-list/etc-invoiced-list.component'; @@ -28,7 +29,8 @@ const routes: Routes = [ { path: 'input-invoice', component: InputInvoiceComponent }, { path: 'input-invoice/detail/:id', component: InputInvoiceDetailComponent }, { path: 'input-invoice/edit/:id', component: EditCollectionInvoiceComponent }, - { path: 'express-info', component: ExpressInfoComponent } + { path: 'express-info', component: ExpressInfoComponent }, + { path: 'billing-order', component: BillingOrderComponent } ]; @NgModule({ diff --git a/src/app/routes/ticket-management/ticket-management.module.ts b/src/app/routes/ticket-management/ticket-management.module.ts index e0d47e51..dede5926 100644 --- a/src/app/routes/ticket-management/ticket-management.module.ts +++ b/src/app/routes/ticket-management/ticket-management.module.ts @@ -26,6 +26,7 @@ import { PrintOrderModalComponent } from './components/invoice-requested/print-o import { ExpressInfoComponent } from './components/express-info/express-info.component'; import { ExpressDetailModalComponent } from './components/express-info/express-detail-modal/express-detail-modal.component'; import { UpdateAddressModalComponent } from './components/invoice-requested/update-address-modal/update-address-modal.component'; +import { BillingOrderComponent } from './components/billing-order/billing-order.component'; const COMPONENTS: any = [ ETCInvoicedListComponent, @@ -41,7 +42,8 @@ const COMPONENTS: any = [ InputInvoiceComponent, InputInvoiceDetailComponent, EditCollectionInvoiceComponent, - ExpressInfoComponent + ExpressInfoComponent, + BillingOrderComponent ]; const NOTROUTECOMPONENTS: any = [ TransactionDetailsComponent,