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..3f494035 --- /dev/null +++ b/src/app/routes/ticket-management/components/billing-order/billing-order.component.html @@ -0,0 +1,37 @@ + + + + + + + + + + + 查询 + 重置 + 导出 + + {{ !_$expand ? '展开' : '收起' }} + + + + + + + + + + 待受理 + 处理中 + 已完成 + 已拒绝 + 已撤销 + 已作废 + + + \ 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..39a4ba95 --- /dev/null +++ b/src/app/routes/ticket-management/components/billing-order/billing-order.component.ts @@ -0,0 +1,277 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, 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, private ar: ActivatedRoute) { } + + ngOnInit(): void { } + + beforeReq = (requestOptions: STRequestOptions) => { + if (this.sf) { + Object.assign(requestOptions.body, { + ...this.sf.value, + }); + } + return requestOptions; + }; + + routeTo(item: any) { + // return; + this.router.navigateByUrl(`/order-management/vehicle/vehicle-detail/${item.billId}`); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this._$expand = false; + } + + /** + * 伸缩查询条件 + */ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/expand', this._$expand); + } + + export() { + this.service.exportStart({ ...this.sf.value, pageSize: -1 }, this.service.$api_export_InvoicedBillInfoPage); + } + + private initSF(): SFSchema { + return { + properties: { + expand: { + type: 'boolean', + ui: { + hidden: true + } + }, + billCode: { + type: 'string', + title: '订单号', + ui: { + placeholder: '请输入' + } + }, + serviceType: { + title: '服务类型', + type: 'string', + ui: { + widget: 'dict-select', + params: { dictKey: 'service:type' }, + containsAllLabel: true, + visibleIf: { + _$expand: (value: boolean) => value + } + } as SFSelectWidgetSchema + }, + shipperAppUserName: { + type: 'string', + title: '货主名称', + ui: { + placeholder: '请输入', + } + }, + vatappcode: { + type: 'string', + title: '申请编号', + ui: { + autocomplete: 'off', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + vatinvcode: { + type: 'string', + title: '分票编号', + ui: { + placeholder: '请输入', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + vatappdate: { + title: '申请时间', + type: 'string', + ui: { + widget: 'sl-from-to', + type: 'date', + format: 'yyyy-MM-dd HH:mm:ss', + visibleIf: { + expand: (value: boolean) => value + } + } as SFDateWidgetSchema + }, + sts: { + type: 'string', + title: '开票状态', + ui: { + widget: 'dict-select', + params: { dictKey: 'etc:invoicing:status' }, + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + invoiceno: { + type: 'string', + title: '发票号码', + ui: { + placeholder: '请输入', + autocomplete: 'off', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + invoicedate: { + title: '开票日期', + type: 'string', + ui: { + widget: 'sl-from-to', + type: 'date', + format: 'yyyy-MM-dd', + visibleIf: { + expand: (value: boolean) => value + } + } as SFDateWidgetSchema + }, + enterpriseInfoId: { + type: 'string', + title: '网络货运人', + ui: { + widget: 'select', + placeholder: '请选择', + allowClear: true, + visibleIf: { + expand: (value: boolean) => value + }, + asyncData: () => this.service.getNetworkFreightForwarder() + } + } + } + }; + } + + private initST(): STColumn[] { + return [ + { title: '订单号', index: 'billCode', type:'link', className: 'text-center', width: 180, click: _record => this.routeTo(_record) }, + { title: '运单号', index: 'wayBillCode', width: 180, className: 'text-center' }, + { title: '银行类型', index: 'bankTypeLabel', render: 'bankType', width: 100, className: 'text-center' }, + { title: '网络货运人', index: 'enterpriseInfoName', width: 220, className: 'text-center' }, + { + title: '开票金额', // TODO + index: 'vatmoney', + width: 120, + type: 'widget', + className: 'text-center', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vatmoney }) } + }, + { + title: '总费用', + index: 'totalAmount', + width: 120, + type: 'widget', + className: 'text-center', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.totalAmount }) } + }, + { + title: '运输费', + index: 'price', + width: 120, + type: 'widget', + className: 'text-center', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.price }) } + }, + { + title: '技术服务费', + index: 'insurancePremium', + width: 120, + type: 'widget', + className: 'text-center', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.insurancePremium }) } + }, + { + title: '附加费', + index: 'surcharge', + width: 120, + type: 'widget', + className: 'text-center', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.surcharge }) } + }, + { + title: '附加费率', + className: 'text-center', + index: 'paymentMethodRate', + width: 130, + format: record => `${record.paymentMethodRate}%` + }, + { title: '货主名称', index: 'shipperAppUserName', width: '180px', className: 'text-center' }, + { title: '所属项目', index: 'enterpriseProjectName', width: '180px', className: 'text-center', }, + { + title: '服务类型', + index: 'serviceTypeLabel', + width: '180px', + className: 'text-center' + }, + { title: '装货地', index: 'consignor', width: '180px', className: 'text-center' }, + { title: '卸货地', index: 'consignee', width: '180px', className: 'text-center' }, + { title: '货物信息', index: 'goodsName', className: 'text-center', width: '180px' }, + { title: '车牌号', index: 'carNo', className: 'text-center', width: '180px' }, + { + title: '承运司机', + index:'driverName', + className: 'text-center', + width: '180px', + }, + { + title: '车队长', + className: 'text-center', + width: '180px', + index: 'carCaptainName', + }, + { title: '业务员', width: '100px', index: 'salesmanName', className: 'text-center', }, + // { title: '录单时间', index: 'recordTime', type: 'date', className: 'text-center', width: '150px' }, //TODO + { title: '装货时间', index: 'loadTime', type: 'date', width: '150px', className: 'text-center', }, + { title: '卸货时间', index: 'unloadTime', type: 'date', width: '150px', className: 'text-center', }, + { title: '订单完成时间', index: 'orderReceivingTime', type: 'date', width: 150, className: 'text-center', }, + { title: '支付完成时间', index: 'overallPaymentTime', type: 'date', width: 150, className: 'text-center', }, + { title: '开票状态', index: 'sts', render: 'sts', className: 'text-center', width: 180 }, + { title: '申请开票时间', index: 'vatappdate', type: 'date', className: 'text-center', width: 180 }, + { title: '申请开票编号', index: 'vatappcode', className: 'text-center', width: 180 }, + { title: '分票编号', index: 'vatinvcode', width: '180px', className: 'text-center', }, + { title: '发票号码', index: 'invoiceno', width: 130, className: 'text-center', }, + { title: '发票代码', index: 'invoiceno2', width: 130, className: 'text-center' }, + { title: '开票日期', index: 'invoicedate', type: 'date', width: 150, className: 'text-center' }, + // { title: '作废日期', index: 'invalidTime', type: 'date', width: 150 }, // TODO + { + title: 'ETC开票金额', render: 'vatmoney', className: 'text-center', width: 200, type: 'widget', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.surcharge }) } + } + ]; + } +} diff --git a/src/app/routes/ticket-management/services/ticket.service.ts b/src/app/routes/ticket-management/services/ticket.service.ts index 2c1222e5..504c8d84 100644 --- a/src/app/routes/ticket-management/services/ticket.service.ts +++ b/src/app/routes/ticket-management/services/ticket.service.ts @@ -146,6 +146,11 @@ export class TicketService extends ShipperBaseService { // ETC白名单(车辆)导出接口 $api_get_ficoCarWhiteList_asyncExport = '/api/fcc/ficoEtcInvoiceL/asyncExportCarWhiteList'; + // 可开票订单list查询 + $api_invoicedBillInfo_page = '/api/fcc/invoicedBillInfo/getInvoicedBillInfoPage'; + // 可开票订单导出 + $api_export_InvoicedBillInfoPage = '/api/fcc/invoicedBillInfo/exportInvoicedBillInfoPage' + constructor(public injector: Injector) { super(injector); } 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,