可开票订单

This commit is contained in:
weiyu
2022-04-25 14:39:09 +08:00
parent e6a8558eb1
commit fcdc8fddd9
5 changed files with 298 additions and 3 deletions

View File

@ -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' },

View File

@ -0,0 +1,32 @@
<page-header-wrapper [title]="'可开票订单'">
</page-header-wrapper>
<nz-card class="search-box" nzBordered>
<div nz-row nzGutter="8">
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf #sf [schema]="searchSchema"
[ui]="{ '*': { spanLabelFixed: 100,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
[button]="'none'"></sf>
</div>
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand"
class="text-right">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button (click)="exportList()"> 导出</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</div>
</nz-card>
<nz-card class="content-box" nzBordered>
<st #st [data]="service.$api_get_invoice_logs_page" [columns]="columns" [req]="{ process: beforeReq }" [page]="{}"
[loading]="false" [scroll]="{ x:'1200px' }">
<ng-template st-row="call3No" let-item let-index="index" let-column="column">
{{item.driverName}}<br>{{item.driverCellphone}}
</ng-template>
</st>
</nz-card>

View File

@ -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 }
];
}
}

View File

@ -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({

View File

@ -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,