diff --git a/src/app/routes/financial-management/components/voucher-management/voucher-management.component.ts b/src/app/routes/financial-management/components/voucher-management/voucher-management.component.ts index cc042cbf..590507d5 100644 --- a/src/app/routes/financial-management/components/voucher-management/voucher-management.component.ts +++ b/src/app/routes/financial-management/components/voucher-management/voucher-management.component.ts @@ -290,13 +290,14 @@ export class VoucherManagementComponent implements OnInit { { title: '借方金额', index: 'hrto' }, { title: '贷方金额', index: 'createtime', type: 'date' }, { title: 'NC凭证', index: 'createbyname' }, - { title: '汇总凭证号', index: 'sts' }, + { title: '汇总凭证号', index: 'sts', width: 150 }, { title: '凭证状态', index: 'sts' }, { title: '创建时间', index: 'sts' }, { title: '创建人', index: 'sts' }, { title: '操作', - width: '90px', + width: '130px', + fixed: 'right', buttons: [ { text: '浏览' @@ -305,7 +306,7 @@ export class VoucherManagementComponent implements OnInit { text: '修改' }, { - text: '删除 ' + text: '删除' }, { text: '提交' diff --git a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.html b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.html index dbd00cf4..3e30e4e8 100644 --- a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.html +++ b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.html @@ -51,31 +51,19 @@ - + - {{ item.vatinvcode }}
+ {{ item.vatinvcode }}
- - 起运地: 广东省深圳市南山区
- 目的地: 湖北省武汉市青山区
- 货物名称: 钢材
- 车型车牌: 高栏车 粤B36889
-
diff --git a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts index 091a08a2..60ec3292 100644 --- a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts +++ b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts @@ -1,3 +1,4 @@ +import { CurrencyPipe } from '@angular/common'; import { Component, OnInit, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st'; @@ -10,7 +11,8 @@ import { PushInvoiceComponent } from './push-invoice/push-invoice.component'; @Component({ selector: 'app-cancellation-invoice', templateUrl: './cancellation-invoice.component.html', - styleUrls: ['./cancellation-invoice.component.less'] + styleUrls: ['./cancellation-invoice.component.less'], + providers: [CurrencyPipe] }) export class CancellationInvoiceComponent implements OnInit { @ViewChild('st', { static: true }) @@ -21,16 +23,21 @@ export class CancellationInvoiceComponent implements OnInit { requestedModal!: any; columns: STColumn[] = this.initST(); searchSchema: SFSchema = this.initSF(); - resourceStatus = '' + resourceStatus = ''; _$expand = false; selectedRows: any[] = []; totalCallNo = 0; - constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {} + constructor( + public service: TicketService, + private nzModalService: NzModalService, + private router: Router, + private currencyPipe: CurrencyPipe + ) {} ngOnInit(): void {} - get reqParams() { + get reqParams() { // if (this.sf) { // Object.assign(requestOptions.body, { // ...this.sf.value, @@ -41,17 +48,17 @@ export class CancellationInvoiceComponent implements OnInit { // } // }); // } - const a:any = {}; - if(this.resourceStatus) { - a.sts = this.resourceStatus + const a: any = {}; + if (this.resourceStatus) { + a.sts = this.resourceStatus; } return { ...a, - ...this.sf?.value, + ...this.sf?.value }; - }; + } selectChange(e: any) { - console.log(e) + console.log(e); this.resourceStatus = e; this.initST(); setTimeout(() => { @@ -126,13 +133,23 @@ export class CancellationInvoiceComponent implements OnInit { /** * 推送发票 - * @param item + * @param item */ pushInvoiceAction(item: any) { const modal = this.nzModalService.create({ nzTitle: '推送开票', nzContent: PushInvoiceComponent, + nzComponentParams: { id: item.id }, nzWidth: 1200, + nzOnOk: () => { + this.service.request(this.service.$api_apply_fico, { vatinvHid: item.id }).subscribe(res => { + if (res) { + this.service.msgSrv.success('开票成功'); + modal.destroy; + } + }); + return false; + } }); } @@ -197,11 +214,11 @@ export class CancellationInvoiceComponent implements OnInit { widget: 'dict-select', containsAllLable: true, params: { dictKey: 'vatinv:status' }, - containAllLable:true, + containAllLable: true, visibleIf: { - _$expand: (value: boolean) => value, - }, - } as SFSelectWidgetSchema, + _$expand: (value: boolean) => value + } + } as SFSelectWidgetSchema }, // or2derSn: { // type: 'string', @@ -231,17 +248,23 @@ export class CancellationInvoiceComponent implements OnInit { private initST(): STColumn[] { return [ - { title: '', index: 'key', type: 'checkbox' }, + { title: '', index: 'key', type: 'checkbox', fixed: 'left', width: 50, className: 'text-center' }, { title: '分票编号', render: 'vatinvcode', width: 150 }, { title: '申请编号', index: 'vatappHId', width: 120 }, { title: '申请时间', index: 'createTime', type: 'date', width: 150 }, { title: '网络货运人', index: 'ltdName', width: 120 }, { title: '购买人', index: 'artoName', width: 90 }, - { title: '订单数', index: 'ordlines', width: 90 }, - { title: '价税合计', index: 'vatmoney', width: 90 }, - { title: '金额', index: 'vatnotax', width: 100 }, - { title: '税率', index: 'billvatrate', width: 90 }, - { title: '税额', index: 'vattax', width: 90 }, + { title: '订单数', index: 'ordlines', width: 90, className: 'text-right' }, + { + title: '价税合计', + index: 'vatmoney', + width: 90, + type: 'currency', + format: item => `${this.currencyPipe.transform(item.vatmoney)}` + }, + { title: '金额', index: 'vatnotax', width: 100, type: 'currency', format: item => `${this.currencyPipe.transform(item.vatnotax)}` }, + { title: '税率', index: 'billvatrate', width: 90, className: 'text-right' }, + { title: '税额', index: 'vattax', width: 90, type: 'currency', format: item => `${this.currencyPipe.transform(item.vattax)}` }, { title: '服务名称', index: 'vatname', width: 100 }, { title: '销货清单', index: 'isdetail', width: 90 }, { title: '票面备注', render: 'vatremarks', width: 250 }, @@ -264,15 +287,15 @@ export class CancellationInvoiceComponent implements OnInit { click: item => this.pushInvoiceAction(item) }, { - text: '移除  ', + text: '移除', click: item => this.batchRemove(item) }, { - text: '确认  ' + text: '确认' // click: item => this.rejectAction(item) }, { - text: '撤回  ', + text: '撤回', click: item => this.batchWithdraw(item) } ] diff --git a/src/app/routes/ticket-management/components/cancellation-invoice/push-invoice/push-invoice.component.html b/src/app/routes/ticket-management/components/cancellation-invoice/push-invoice/push-invoice.component.html index 69991612..34b2be1b 100644 --- a/src/app/routes/ticket-management/components/cancellation-invoice/push-invoice/push-invoice.component.html +++ b/src/app/routes/ticket-management/components/cancellation-invoice/push-invoice/push-invoice.component.html @@ -1,55 +1,57 @@
- 茅台股份有限公司 + {{info?.artoName}} - 912301046656930913 + {{info?.artotaxno}} - 贵州省贵阳市 + {{info?.artoadd}} - 075588393198 + {{info?.artotel}} - 中国工商银行股份有限公司哈贵阳支行 + {{info?.artobank}} - 3500044119068126788 + {{info?.artoacc}} -

起运地:广东省深圳市南山区

-

目的地:湖北省武汉市青山区

-

货物名称:钢材

-

车型车牌:高栏车 粤B36889

+ {{info?.vatremarks}}
- 天津怡亚通物流科技有限公司 + {{info?.shipperId}} - VP12301046656 + {{info?.vatinvcode}} - 100笔 + {{info?.ordlines}}笔 - 300,000.00元 + {{info?.vatmoney}}元 - 运输服务费 + {{info?.vatname}} - 需要 + {{info?.isdetail}} - 单位按吨 + {{info?.otherremarks}}
- + \ No newline at end of file diff --git a/src/app/routes/ticket-management/components/cancellation-invoice/push-invoice/push-invoice.component.less b/src/app/routes/ticket-management/components/cancellation-invoice/push-invoice/push-invoice.component.less index aebf12ee..41a8c3bb 100644 --- a/src/app/routes/ticket-management/components/cancellation-invoice/push-invoice/push-invoice.component.less +++ b/src/app/routes/ticket-management/components/cancellation-invoice/push-invoice/push-invoice.component.less @@ -10,4 +10,7 @@ } } + .text-truncate { + white-space: normal; + } } \ No newline at end of file diff --git a/src/app/routes/ticket-management/components/cancellation-invoice/push-invoice/push-invoice.component.ts b/src/app/routes/ticket-management/components/cancellation-invoice/push-invoice/push-invoice.component.ts index 5cc79f49..fcb6b560 100644 --- a/src/app/routes/ticket-management/components/cancellation-invoice/push-invoice/push-invoice.component.ts +++ b/src/app/routes/ticket-management/components/cancellation-invoice/push-invoice/push-invoice.component.ts @@ -1,15 +1,16 @@ +import { CurrencyPipe } from '@angular/common'; import { Component, OnInit, ViewChild } from '@angular/core'; -import { STComponent, STColumn } from '@delon/abc/st'; +import { STComponent, STColumn, STRequestOptions } from '@delon/abc/st'; import { NzModalService } from 'ng-zorro-antd/modal'; import { TicketService } from '../../../services/ticket.service'; @Component({ selector: 'app-push-invoice', templateUrl: './push-invoice.component.html', - styleUrls: ['./push-invoice.component.less'] + styleUrls: ['./push-invoice.component.less'], + providers: [CurrencyPipe] }) export class PushInvoiceComponent implements OnInit { - @ViewChild('st', { static: false }) st!: STComponent; columns: STColumn[] = this.initST(); @@ -30,23 +31,39 @@ export class PushInvoiceComponent implements OnInit { } ]; - info = {}; + info: any = {}; + id!: number; - constructor(public service: TicketService, private nzModalService: NzModalService) {} + constructor(public service: TicketService, private nzModalService: NzModalService, private currencyPipe: CurrencyPipe) {} - ngOnInit(): void {} + ngOnInit(): void { + this.loadHeader(this.id); + } + beforeReq = (requestOptions: STRequestOptions) => { + Object.assign(requestOptions.body, { vatinvHId: this.id }); + return requestOptions; + }; + + loadHeader(id: number) { + this.service.request(this.service.$api_ficoVatinv_header, { id }).subscribe(res => { + console.log(res); + + if (res) { + this.info = res; + } + }); + } private initST(): STColumn[] { return [ - { title: '服务名称', index: 'no', width: 100 }, - { title: '规格型号', index: 'callNo', width: 100 }, - { title: '单位', index: 'callNo', width: 90 }, - { title: '数量', index: 'callNo', width: 90 }, - { title: '金额', index: 'callNo', width: 90 }, - { title: '税率', index: 'callNo', width: 90 }, - { title: '税额', index: 'callNo', width: 90 }, + { title: '服务名称', index: 'vatname', width: 100 }, + { title: '规格型号', index: 'vatmodel', width: 150 }, + { title: '单位', index: 'vatunit', width: 90, className: 'text-center' }, + { title: '数量', index: 'vatqty', width: 90, className: 'text-right' }, + { title: '金额', index: 'vatnotax', width: 90, type: 'currency', format: item => `${this.currencyPipe.transform(item.vatnotax)}` }, + { title: '税率', index: 'vatrate', width: 90, className: 'text-right' }, + { title: '税额', index: 'vattax', width: 90, type: 'currency', format: item => `${this.currencyPipe.transform(item.vattax)}` } ]; } - } diff --git a/src/app/routes/ticket-management/services/ticket.service.ts b/src/app/routes/ticket-management/services/ticket.service.ts index c0ac6ea9..95bc50cd 100644 --- a/src/app/routes/ticket-management/services/ticket.service.ts +++ b/src/app/routes/ticket-management/services/ticket.service.ts @@ -23,10 +23,16 @@ export class TicketService extends ShipperBaseService { $api_get_invoice_requested_order_detail = '/api/fcc/ficoVatappBill/getDetailByVatapp'; // 删除开票申请订单明细 $api_remove_bill = '/api/fcc/ficoVatappBill/deletebatch'; - // 删除开票申请订单明细 - $api_ficoVatinvHList = '/api/fcc/ficoVatinvH/ficoVatinvHList'; + // 运营端销票处理-订单明细页面 - $api_ficoVatinvDetailAll = '/api/fcc/ficoVatinvH/ficoVatinvDetailAll'; + $api_ficoVatinvHList = '/api/fcc/ficoVatinvH/ficoVatinvHList'; + // 获取销项发票抬头详情信息 + $api_ficoVatinv_header = '/api/fcc/ficoVatinvH/getDetail'; + // 获取分票发票明细 + $api_ficoVatinv_Detail = '/api/fcc/ficoVatinvL/getDetailByVatinvHId'; + // 运营端订单明细开票处理 + $api_apply_fico = '/api/fcc/ficoVatinvH/crmPushInvo'; + // 获取汇总下单路径 $api_get_order_summary_path = '/api/fcc/ficoExpressH/getSummaryOrderAddress'; // 新建快递单