From 54565374c0ea269b05e7cc3b116d878bd419ed4e Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Wed, 19 Jan 2022 11:37:10 +0800 Subject: [PATCH] edit --- .../receipt-order.component.less | 0 .../receipt-order.component.spec.ts | 25 +++++ .../cancellation-invoice.component.html | 3 +- .../cancellation-invoice.component.ts | 12 ++- .../input-invoice/input-invoice.component.ts | 49 ++++++---- .../invoice-detail.component.less | 4 + .../invoice-detail.component.ts | 94 +++++++++++++++---- .../invoice-requested-detail.component.html | 2 +- .../invoice-requested-detail.component.less | 26 ----- .../invoice-requested-detail.component.ts | 72 ++++++++++---- .../invoice-requested.component.html | 12 +-- .../invoice-requested.component.less | 19 ---- .../invoice-requested.component.ts | 41 ++++---- .../invoiced-list/invoiced-list.component.ts | 19 +++- 14 files changed, 240 insertions(+), 138 deletions(-) create mode 100644 src/app/routes/financial-management/components/receipt-order/receipt-order.component.less create mode 100644 src/app/routes/financial-management/components/receipt-order/receipt-order.component.spec.ts diff --git a/src/app/routes/financial-management/components/receipt-order/receipt-order.component.less b/src/app/routes/financial-management/components/receipt-order/receipt-order.component.less new file mode 100644 index 00000000..e69de29b diff --git a/src/app/routes/financial-management/components/receipt-order/receipt-order.component.spec.ts b/src/app/routes/financial-management/components/receipt-order/receipt-order.component.spec.ts new file mode 100644 index 00000000..67886d32 --- /dev/null +++ b/src/app/routes/financial-management/components/receipt-order/receipt-order.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ReceiptOrderComponent } from './receipt-order.component'; + +describe('ReceiptOrderComponent', () => { + let component: ReceiptOrderComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ ReceiptOrderComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(ReceiptOrderComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); 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 02aab52b..42670a69 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,8 +51,7 @@ - this.router.navigate(['/ticket/invoice-requested/detail/' + item?.vatappHId]) + }, { title: '申请时间', index: 'createTime', type: 'date', width: 150 }, { title: '网络货运人', index: 'ltdName', width: 120 }, { title: '购买人', index: 'artoName', width: 90 }, @@ -304,7 +310,7 @@ export class CancellationInvoiceComponent implements OnInit { { title: '其他要求', index: 'otherremarks', width: 100 }, { title: '操作', - width: '90px', + width: '100px', fixed: 'right', buttons: [ { diff --git a/src/app/routes/ticket-management/components/input-invoice/input-invoice.component.ts b/src/app/routes/ticket-management/components/input-invoice/input-invoice.component.ts index c9814980..d8ff45cb 100644 --- a/src/app/routes/ticket-management/components/input-invoice/input-invoice.component.ts +++ b/src/app/routes/ticket-management/components/input-invoice/input-invoice.component.ts @@ -33,12 +33,12 @@ export class InputInvoiceComponent implements OnInit { Object.assign(requestOptions.body, { ...this.sf.value, createtime: { - start: this.sf.value.createtime?.[0] || null, - end: this.sf.value.createtime?.[1] || null + start: this.sf.value.createtime?.[0] || '', + end: this.sf.value.createtime?.[1] || '' }, invdate: { - start: this.sf.value.invdate?.[0] || null, - end: this.sf.value.invdate?.[1] || null + start: this.sf.value.invdate?.[0] || '', + end: this.sf.value.invdate?.[1] || '' } }); } @@ -210,20 +210,37 @@ export class InputInvoiceComponent implements OnInit { private initST(): STColumn[] { return [ - { title: '', index: 'key', type: 'checkbox' }, - { title: '收票单号', index: 'inpinvcode', type: 'link' }, - { title: '网络货运人', index: 'ltdName' }, - { title: '发票日期', index: 'invdate', type: 'date' }, - { title: '发票号', index: 'invoiceno' }, - { title: '发票金额', index: 'invmoney' }, - { title: '税额', index: 'invtax' }, - { title: '发票类型', index: 'invtype' }, - { title: '销售方', index: 'hrtoName' }, - { title: '创建时间', index: 'createtime', type: 'date' }, - { title: '创建人', index: 'createbyname' }, - { title: '收票状态', index: 'stsLabel' }, + { title: '', index: 'key', type: 'checkbox', width: 60, className: 'text-center', fixed: 'left' }, + { title: '收票单号', index: 'inpinvcode', type: 'link', width: 170 }, + { title: '网络货运人', index: 'ltdName', width: 150 }, + { title: '发票日期', index: 'invdate', type: 'date', width: 150, className: 'text-center' }, + { title: '发票号', index: 'invoiceno', width: 130 }, + { + title: '发票金额', + index: 'invmoney', + width: 100, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.invmoney }) } + }, + { + title: '税额', + index: 'invtax', + width: 100, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.invtax }) } + }, + { title: '发票类型', index: 'invtype', width: 150, className: 'text-center' }, + { title: '销售方', index: 'hrtoName', width: 150 }, + { title: '创建时间', index: 'createtime', type: 'date', width: 150, className: 'text-center' }, + { title: '创建人', index: 'createbyname', width: 120 }, + { title: '收票状态', index: 'stsLabel', width: 120, className: 'text-center' }, { title: '操作', + fixed: 'right', + className: 'text-center', + width: 120, buttons: [ { text: '浏览', diff --git a/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.less b/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.less index 29f02517..23fd589a 100644 --- a/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.less +++ b/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.less @@ -21,6 +21,10 @@ } } } + + .text-truncate { + white-space: normal; + } } .expend-options { 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 1071adbf..0df1b758 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 @@ -144,18 +144,46 @@ export class InvoiceDetailComponent implements OnInit { private initOrderST(): STColumn[] { return [ - { title: '订单号', index: 'billHId' }, - { title: '订单完成日期', index: 'billTime', type: 'date' }, - { title: '所属项目', index: 'projectId' }, - { title: '订单类型', index: 'billType' }, - { title: '装货地', index: 'loadingfrom' }, - { title: '卸货地', index: 'loadingto' }, - { title: '货物信息', index: 'goodsinfo' }, - { title: '承运司机', index: 'driverinfo' }, - { title: '申请金额', index: 'billkpnotax' }, - { title: '运输费', index: 'fjfmoney2' }, - { title: '附加费', index: 'fjfmoney' }, - { title: '开票金额', index: 'billkpmoney' } + { title: '订单号', index: 'billHId', width: 140 }, + { title: '订单完成日期', index: 'billTime', type: 'date', width: 150 }, + { title: '所属项目', index: 'projectId', width: 140 }, + { title: '订单类型', index: 'billType', width: 120 }, + { title: '装货地', index: 'loadingfrom', width: 200 }, + { title: '卸货地', index: 'loadingto', width: 200 }, + { title: '货物信息', index: 'goodsinfo', width: 140 }, + { title: '承运司机', index: 'driverinfo', width: 140 }, + { + title: '申请金额', + index: 'billkpnotax', + width: 120, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.billkpnotax }) } + }, + { + title: '运输费', + index: 'fjfmoney2', + width: 120, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.fjfmoney2 }) } + }, + { + title: '附加费', + index: 'fjfmoney', + width: 120, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.fjfmoney }) } + }, + { + title: '开票金额', + index: 'billkpmoney', + width: 120, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.billkpmoney }) } + } ]; } @@ -187,20 +215,46 @@ export class InvoiceDetailComponent implements OnInit { { title: '订单日期', index: 'createTime', type: 'date' }, { title: '计费日期', index: 'callNo', type: 'date' }, { title: '税率', index: 'vatrate' }, - { title: '申请金额', index: 'vatmoney' }, - { title: '开票金额', index: 'vatnotax' } + { + title: '申请金额', + index: 'vatmoney', + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vatmoney }) } + }, + { + title: '开票金额', + index: 'vatnotax', + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vatnotax }) } + } ]; } private initInvoiceST(): STColumn[] { return [ - { title: '服务名称', render: 'vatname' }, + { title: '服务名称', render: 'vatname', width: 350 }, { title: '规格型号', render: 'vatmodel' }, - { title: '单位', render: 'vatunit' }, - { title: '数量', render: 'vatqty' }, - { title: '金额', index: 'vatnotax' }, - { title: '税率', index: 'vatrate' }, - { title: '税额', index: 'vattax' } + { title: '单位', render: 'vatunit', width: 100 }, + { title: '数量', render: 'vatqty', width: 140, className: 'text-right' }, + { + title: '金额', + index: 'vatnotax', + width: 140, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vatnotax }) } + }, + { title: '税率', index: 'vatrate', width: 140, className: 'text-right' }, + { + title: '税额', + index: 'vattax', + width: 140, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vattax }) } + } ]; } } diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html index 0e457a64..80dffd22 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html @@ -87,7 +87,7 @@ -
+
diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.less b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.less index 0b8dcbda..aebf12ee 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.less +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.less @@ -1,15 +1,4 @@ :host::ng-deep { - .search-box { - .ant-card-body { - padding-bottom: 18px; - } - } - - .content-box { - .ant-card-body { - padding-top: 16px; - } - } .statistics-box { .ant-form-item { @@ -21,19 +10,4 @@ } } -} - -.expend-options { - margin-top: 0px; -} - - -@media (min-width: 1200px) { - .expend-options { - max-width: 400px; - position : absolute; - right : 0; - bottom : 25px; - } - } \ No newline at end of file diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts index dc5053bf..29647e89 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts @@ -10,7 +10,7 @@ import { RequestedInvoiceModalComponent } from '../requested-invoice-modal/reque @Component({ selector: 'app-invoice-requested-detail', templateUrl: './invoice-requested-detail.component.html', - styleUrls: ['./invoice-requested-detail.component.less'] + styleUrls: ['./invoice-requested-detail.component.less', '../../../../commom/less/expend-but.less', '../../../../commom/less/box.less'] }) export class InvoiceRequestedDetailComponent implements OnInit { @ViewChild('st', { static: true }) @@ -42,7 +42,6 @@ export class InvoiceRequestedDetailComponent implements OnInit { loadHeadInfo() { this.service.request(this.service.$api_get_invoice_requested_header_detail, { id: this.id }).subscribe(res => { - console.log(res); if (res) { this.headerInfo = res; } @@ -73,7 +72,6 @@ export class InvoiceRequestedDetailComponent implements OnInit { this.service.msgSrv.warning('请选择订单!'); return; } - console.log(this.selectedRows); const modal = this.nzModalService.create({ nzTitle: '开票', nzContent: RequestedDetailComponent, @@ -88,22 +86,36 @@ export class InvoiceRequestedDetailComponent implements OnInit { type: 'default', label: '手工处理', onClick: () => { - console.log('11111'); const params = { ficoVatappBillVOList: this.selectedRows, id: this.id }; this.service.request(this.service.$api_get_applyFicoVatinv, params).subscribe((res: any) => { console.log(res); + if (res) { + this.loadHeadInfo(); + this.st.load(1); + modal.destroy(); + } }); - modal.destroy(); } }, { type: 'primary', label: '自动开票', onClick: () => { - modal.destroy(); + const params = { + ficoVatappBillVOList: this.selectedRows, + id: this.id + }; + this.service.request(this.service.$api_get_applyFicoVatinv, params).subscribe((res: any) => { + console.log(res); + if (res) { + this.loadHeadInfo(); + this.st.load(1); + modal.destroy(); + } + }); } } ] @@ -141,9 +153,9 @@ export class InvoiceRequestedDetailComponent implements OnInit { routeToOrder(item: any) { if (item.billType === 1) { - this.router.navigate(['/order-management/vehicle-detail/' + item.billHCode]); + this.router.navigate(['/order-management/vehicle-detail/' + item.billHId]); } else { - this.router.navigate(['/order-management/bulk-detail/' + item.billHCode]); + this.router.navigate(['/order-management/bulk-detail/' + item.billHId]); } } @@ -259,19 +271,47 @@ export class InvoiceRequestedDetailComponent implements OnInit { private initST(): STColumn[] { return [ { title: '', index: 'key', type: 'checkbox' }, - { title: '订单号', render: 'billHCode', width: 150 }, + { title: '订单号', render: 'billHCode', width: 170 }, { title: '订单完成日期', index: 'billTime', type: 'date', width: 150 }, { title: '开票状态', index: 'vatappSts', width: 100 }, - { title: '所属项目', index: 'projectId', width: 100 }, + { title: '所属项目', index: 'projectId', width: 140 }, { title: '订单类型', index: 'billType', width: 100, type: 'enum', enum: { 1: '整车', 2: '大宗' } }, - { title: '装货地', index: 'loadingfrom', width: 90 }, - { title: '卸货地', index: 'loadingto', width: 90 }, + { title: '装货地', index: 'loadingfrom', width: 220 }, + { title: '卸货地', index: 'loadingto', width: 220 }, { title: '货物信息', index: 'goodsinfo', width: 100 }, { title: '承运司机', index: 'driverinfo', width: 140 }, - { title: '申请金额', index: 'billkpmoney', width: 100 }, - { title: '运输费', index: 'fjfmoney2', width: 90 }, - { title: '附加费', index: 'fjfmoney', width: 90 }, - { title: '开票金额', index: 'billkpmoney', width: 100 }, + { + title: '申请金额', + index: 'billkpmoney', + width: 100, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.billkpmoney }) } + }, + { + title: '运输费', + index: 'fjfmoney2', + width: 90, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.fjfmoney2 }) } + }, + { + title: '附加费', + index: 'fjfmoney', + width: 90, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.fjfmoney }) } + }, + { + title: '开票金额', + index: 'billkpmoney', + width: 100, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.billkpmoney }) } + }, { title: '税率', index: 'billvatrate', width: 90 }, { title: '发票号码', index: 'vatinvcode', width: 100 }, { title: '开票日期', index: 'vatinvtime', type: 'date', width: 150 } diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.html b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.html index 7130e1c8..e4e8d229 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.html +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.html @@ -30,12 +30,12 @@ - - - - - - + + + + + +
diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.less b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.less index 40095399..370d3cae 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.less +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.less @@ -1,26 +1,7 @@ :host::ng-deep { - .search-box { - .ant-card-body { - padding-bottom: 18px; - } - } - - .content-box { - .ant-card-body { - padding-top: 0; - } - } - - nz-range-picker { - width: 100%; - } .ant-tabs-tab-btn { padding-left : 16px; padding-right: 16px; } - - .text-truncate { - white-space: normal; - } } \ No newline at end of file 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 bbe592b4..13ccf85c 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 @@ -14,8 +14,7 @@ import { RequestedInvoiceModalComponent } from './requested-invoice-modal/reques @Component({ selector: 'app-invoice-requested', templateUrl: './invoice-requested.component.html', - styleUrls: ['./invoice-requested.component.less'], - providers: [CurrencyPipe] + styleUrls: ['./invoice-requested.component.less', '../../../commom/less/box.less'] }) export class InvoiceRequestedComponent implements OnInit { @ViewChild('st', { static: true }) @@ -32,12 +31,7 @@ export class InvoiceRequestedComponent implements OnInit { totalCallNo = 0; selectedRows: any[] = []; - constructor( - public service: TicketService, - private nzModalService: NzModalService, - private router: Router, - private currencyPipe: CurrencyPipe - ) {} + constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {} ngOnInit(): void {} @@ -406,27 +400,35 @@ export class InvoiceRequestedComponent implements OnInit { { title: '其他要求', index: 'otherremarks', width: 100 }, { title: '申请人', index: 'applyName', width: 90 }, { title: '申请时间', index: 'applyTime', type: 'date', width: 150 }, - { title: '快递是否下单成功', index: 'expressHSts', width: 150, type: 'enum', enum: { true: '是', false: '否' } }, + { + title: '快递是否下单成功', + index: 'expressHSts', + width: 150, + className: 'text-center', + type: 'enum', + enum: { true: '是', false: '否' } + }, { title: '操作', - width: 150, + width: 125, fixed: 'right', buttons: [ + { type: 'divider' }, { text: '开票', click: item => this.requestedInvoiceAction(item) }, { - text: '驳回', + text: '驳回
', click: item => this.rejectAction([item]) }, { - text: '查看原因', - click: item => this.showReason(item) + text: '订单明细
', + click: item => this.router.navigate(['/ticket/invoice-requested/detail/' + item?.id]) }, { - text: '订单明细', - click: item => this.orderDetail(item) + text: '查看原因
', + click: item => this.showReason(item) }, { text: '下载对账单' @@ -436,15 +438,6 @@ export class InvoiceRequestedComponent implements OnInit { } ]; } - orderDetail(item: any) { - console.log(item); - this.router.navigate([ - '/ticket/invoice-requested/detail/' + item?.id, - { - queryParams: { id: item?.id } - } - ]); - } selectChange(e: any) { this.resourceStatus = e; this.initST(); diff --git a/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.ts b/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.ts index 1292a138..94bdb9ac 100644 --- a/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.ts +++ b/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.ts @@ -179,12 +179,21 @@ export class InvoicedListComponent implements OnInit { return [ { title: '', index: 'key', type: 'checkbox' }, { title: '发票号码', index: 'invoiceno', width: 150 }, - { title: '申请编号', index: 'vatinvcode', width: 150 }, + { + title: '申请编号', + index: 'vatinvcode', + width: 170, + type: 'link', + click: item => + this.router.navigate(['/ticket/invoice-list/detail/' + item.id], { + queryParams: { type: 1, expressno: item.expressno } + }) + }, { title: '申请时间', index: 'createTime', type: 'date', width: 150 }, { title: '发票类型', index: 'invoicetype', width: 100 }, { title: '网络货运人', index: 'ltdId', width: 120 }, { title: '购买人', index: 'artoname', width: 90 }, - { title: '订单数', index: 'ordlines', width: 90 }, + { title: '订单数', index: 'ordlines', className: 'text-right', width: 90 }, { title: '价税合计', index: 'vatmoney', @@ -201,7 +210,7 @@ export class InvoicedListComponent implements OnInit { className: 'text-right', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vatnotax }) } }, - { title: '税率', index: 'vatrate', width: 90 }, + { title: '税率', index: 'vatrate', className: 'text-right', width: 90 }, { title: '税额', index: 'disvattax', @@ -214,14 +223,14 @@ export class InvoicedListComponent implements OnInit { { title: '快递信息', render: 'expresscompany', - width: 120 + width: 180 }, { title: '状态', index: 'sts', width: 90 }, { title: '操作', fixed: 'right', className: 'text-center', - width: 110, + width: 180, buttons: [ { text: '查看明细',