diff --git a/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.html b/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.html index 32ca65f4..408d94d9 100644 --- a/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.html +++ b/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.html @@ -114,8 +114,9 @@ - + {{ item.vatname }} diff --git a/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.ts b/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.ts index 116357d8..ca1c11da 100644 --- a/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.ts +++ b/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.ts @@ -42,6 +42,8 @@ export class InvoiceDetailComponent implements OnInit { type: any = 1; selectedIndex = 0; + + services: any[] = []; constructor(public service: TicketService, private route: ActivatedRoute) { this.isCanEdit = route.snapshot.queryParams.type === '1'; const expressno = route.snapshot.queryParams.expressno; @@ -54,7 +56,9 @@ export class InvoiceDetailComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { + this.getDictByKey(); + } beforeReq = (requestOptions: STRequestOptions) => { Object.assign(requestOptions.body, { vatinvHId: this.id }); @@ -67,6 +71,12 @@ export class InvoiceDetailComponent implements OnInit { return requestOptions; }; + getDictByKey() { + this.service.request('/api/mdc/pbc/dictItems/getDictValue', { dictKey: 'invoice:service:type' }).subscribe(res => { + this.services = res; + }); + } + loadInvoiceHeader(id: string) { this.service.request(this.service.$api_get_invoice_header_detail, { id }).subscribe(res => { if (res) { @@ -87,7 +97,23 @@ export class InvoiceDetailComponent implements OnInit { } saveInvoices() { - this.isEdit = false; + const list = this.invoiceST._data.map(item => { + const rs = { ...item }; + delete rs._values; + return rs; + }); + this.service + .request(this.service.$api_update_evatinh, { + id: this.id, + updatEvatinvDetailDTO: list + }) + .subscribe(res => { + if (res) { + this.service.msgSrv.success('修改成功'); + this.invoiceST.load(1); + this.isEdit = false; + } + }); } /** diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts index 1978a0f9..bc45e80e 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts @@ -420,7 +420,7 @@ export class InvoiceRequestedComponent { return [ { title: '', index: 'key', type: 'checkbox' }, { title: '申请编号', render: 'vatappcode', width: 190 }, - { title: '发票类型', index: 'vatapptypeLable', width: 140 }, + { title: '发票类型', index: 'vatapptypeLabel', width: 140 }, { title: '网络货运人', index: 'ltdName', width: 170 }, { title: '货主名称', index: 'artoName', width: 170 }, { title: '订单数', index: 'ordlines', width: 90 }, @@ -459,7 +459,7 @@ export class InvoiceRequestedComponent { params: ({ record }) => ({ value: record.invoicedMoney }) } }, - { title: '已开票张数', index: 'invoicedNum', width: 160 }, + { title: '已开票张数', className: 'text-right', index: 'invoicedNum', width: 160 }, { title: '开户行', index: 'bankName', width: 160 }, { title: '银行账户', index: 'bankAccount', width: 140 }, { title: '注册地址', index: 'registerAddr', width: 140 }, diff --git a/src/app/routes/ticket-management/services/ticket.service.ts b/src/app/routes/ticket-management/services/ticket.service.ts index 33bea9ba..c2ce7244 100644 --- a/src/app/routes/ticket-management/services/ticket.service.ts +++ b/src/app/routes/ticket-management/services/ticket.service.ts @@ -87,6 +87,8 @@ export class TicketService extends ShipperBaseService { $api_delete_deletebatch = '/api/fcc/ficoVatinvH/deletebatch'; // 保存开票申请费用明细 $api_ficoVatappFee_save = '/api/fcc/ficoVatappFee/save'; + // 更新销项发票信息 + $api_update_evatinh = '/api/fcc/ficoVatinvH/updatEvatinvH'; // 查询ETC白名单(货主) $api_get_etc_shipper_list = '/api/fcc/ficoShipperWhiteList/list/page';