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 8b5f2b1b..bbf3d873 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 @@ -4,6 +4,7 @@ import { STComponent, STColumn, STChange } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema, SFTextWidgetSchema } from '@delon/form'; import { NzModalService } from 'ng-zorro-antd/modal'; import { TicketService } from '../../../services/ticket.service'; +import { RequestedDetailComponent } from '../requested-detail/requested-detail.component'; import { RequestedInvoiceModalComponent } from '../requested-invoice-modal/requested-invoice-modal.component'; @Component({ @@ -44,7 +45,7 @@ export class InvoiceRequestedDetailComponent implements OnInit { openRequestedModal() { const modal = this.nzModalService.create({ nzTitle: '开票', - nzContent: RequestedInvoiceModalComponent, + nzContent: RequestedDetailComponent, nzWidth: 800, nzFooter: [ { @@ -65,8 +66,13 @@ export class InvoiceRequestedDetailComponent implements OnInit { }); } + /** + * 移除订单 + * @returns + */ removeOrder() { if (this.selectedRows?.length <= 0) { + this.service.msgSrv.warning('请选择订单'); return; } this.nzModalService.warning({ @@ -199,7 +205,7 @@ export class InvoiceRequestedDetailComponent implements OnInit { { title: '装货地', index: 'callNo', width: 90 }, { title: '卸货地', index: 'callNo', width: 90 }, { title: '货物信息', index: 'callNo', width: 100 }, - { title: '承运司机', index: 'callNo', width: 100 }, + { title: '承运司机', index: 'callNo', width: 140, format: item => `特朗普
13789040523
粤GT8419` }, { title: '申请金额', index: 'callNo', width: 100 }, { title: '运输费', index: 'callNo', width: 90 }, { title: '附加费', index: 'callNo', width: 90 }, 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 e6e883a1..93ae349b 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 @@ -37,8 +37,8 @@ {{totalCallNo }} 清空 - - + + @@ -50,12 +50,11 @@ [loading]="service.http.loading" [scroll]="{ x:'1200px',y: '370px' }" (change)="stChange($event)"> - +
- - + +
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 50ac4f7a..40095399 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 @@ -19,4 +19,8 @@ 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 51df1225..4250101a 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 @@ -5,6 +5,7 @@ import { SFComponent, SFSchema, SFDateWidgetSchema, SFUISchema } from '@delon/fo import { NzMessageService } from 'ng-zorro-antd/message'; import { NzModalService } from 'ng-zorro-antd/modal'; import { TicketService } from '../../services/ticket.service'; +import { RequestedInvoiceModalComponent } from './requested-invoice-modal/requested-invoice-modal.component'; @Component({ selector: 'app-invoice-requested', @@ -17,8 +18,8 @@ export class InvoiceRequestedComponent implements OnInit { st!: STComponent; @ViewChild('sf', { static: false }) sf!: SFComponent; - @ViewChild('auditModal', { static: false }) - auditModal!: any; + @ViewChild('rejectModal', { static: false }) + rejectModal!: any; columns: STColumn[] = this.initST(); searchSchema: SFSchema = this.initSF(); @@ -52,14 +53,10 @@ export class InvoiceRequestedComponent implements OnInit { add(): void {} - routeTo(item: any) { - this.router.navigate(['/ticket/invoice-requested/detail/1']); - } - - auditAction(item: any) { + rejectAction(item: any[]) { const modal = this.nzModalService.create({ - nzTitle: '审核', - nzContent: this.auditModal, + nzTitle: '驳回', + nzContent: this.rejectModal, nzFooter: [ { label: '拒绝', @@ -98,6 +95,64 @@ export class InvoiceRequestedComponent implements OnInit { }); } + batchRequested() { + if (this.selectedRows?.length <= 0) { + this.service.msgSrv.warning('请选择订单'); + return; + } + const modal = this.nzModalService.create({ + nzTitle: '开票', + nzContent: '确认对所有申请单进行批量开票?', + nzFooter: [ + { + type: 'default', + label: '手工处理', + onClick: () => { + modal.destroy(); + } + }, + { + type: 'primary', + label: '自动开票', + onClick: () => { + modal.destroy(); + } + } + ] + }); + } + + requestedInvoiceAction(item: any) { + const modal = this.nzModalService.create({ + nzTitle: '开票', + nzContent: RequestedInvoiceModalComponent, + nzWidth: 1200, + nzFooter: [ + { + type: 'default', + label: '移除', + onClick: (com) => { + com?.removeOrder(com.data) + } + }, + { + type: 'default', + label: '手工处理', + onClick: () => { + modal.destroy(); + } + }, + { + type: 'primary', + label: '自动开票', + onClick: () => { + modal.destroy(); + } + } + ] + }); + } + /** * 重置表单 */ @@ -242,33 +297,35 @@ export class InvoiceRequestedComponent implements OnInit { private initST(): STColumn[] { return [ { title: '', index: 'key', type: 'checkbox' }, - { title: '申请编号', index: 'no' }, - { title: '网络货运人', index: 'callNo' }, - { title: '购买方', index: 'callNo' }, - { title: '订单数', index: 'callNo' }, - { title: '申请金额', index: 'callNo' }, - { title: '运输费', index: 'callNo' }, - { title: '附加费', index: 'callNo' }, - { title: '已开票金额', index: 'callNo' }, - { title: '开户行', index: 'callNo' }, - { title: '银行账户', index: 'callNo' }, - { title: '注册地址', index: 'callNo' }, - { title: '注册电话', index: 'callNo' }, - { title: '服务名称', index: 'callNo' }, - { title: '销货清单', index: 'callNo' }, - { title: '其他要求', index: 'callNo' }, - { title: '申请人', index: 'callNo' }, - { title: '申请时间', index: 'updatedAt', type: 'date' }, + { title: '申请编号', index: 'no', width: 150, format: item => `VP202110012313
` }, + { title: '网络货运人', index: 'callNo', width: 120 }, + { title: '购买方', index: 'callNo', width: 90 }, + { title: '订单数', index: 'callNo', width: 90 }, + { title: '申请金额', index: 'callNo', width: 100 }, + { title: '运输费', index: 'callNo', width: 90 }, + { title: '附加费', index: 'callNo', width: 90 }, + { title: '已开票金额', index: 'callNo', width: 120 }, + { title: '开户行', index: 'callNo', width: 90 }, + { title: '银行账户', index: 'callNo', width: 100 }, + { title: '注册地址', index: 'callNo', width: 100 }, + { title: '注册电话', index: 'callNo', width: 100 }, + { title: '服务名称', index: 'callNo', width: 100 }, + { title: '销货清单', index: 'callNo', width: 100 }, + { title: '其他要求', index: 'callNo', width: 100 }, + { title: '申请人', index: 'callNo', width: 90 }, + { title: '申请时间', index: 'updatedAt', type: 'date', width: 150 }, { title: '操作', + width: 150, + fixed: 'right', buttons: [ { text: '开票', - click: item => this.routeTo(item) + click: item => this.requestedInvoiceAction(item) }, { text: '驳回', - click: item => this.routeTo(item) + click: item => this.rejectAction([item]) }, { text: '查看原因', @@ -276,11 +333,11 @@ export class InvoiceRequestedComponent implements OnInit { }, { text: '订单明细', - click: item => this.routeTo(item) + click: item => this.router.navigate(['/ticket/invoice-requested/detail/1']) }, { - text: '下载对账单', - click: item => this.auditAction(item) + text: '下载对账单' + // click: item => this.rejectAction(item) } ] } diff --git a/src/app/routes/ticket-management/components/invoice-requested/requested-detail/requested-detail.component.html b/src/app/routes/ticket-management/components/invoice-requested/requested-detail/requested-detail.component.html new file mode 100644 index 00000000..f4b9c301 --- /dev/null +++ b/src/app/routes/ticket-management/components/invoice-requested/requested-detail/requested-detail.component.html @@ -0,0 +1,49 @@ +
+
+ + 茅台股份有限公司 + + + 912301046656930913 + + + 贵州省贵阳市 + + + 075588393198 + + + 中国工商银行股份有限公司哈贵阳支行 + + + 3500044119068126788 + + +

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

+

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

+

货物名称:钢材

+

车型车牌:高栏车 粤B36889

+
+
+
+ + 天津怡亚通物流科技有限公司 + + + 100笔 + + + 300,000.00元 + + + 运输服务费 + + + 需要 + + + 单位按吨 + + +
+
\ No newline at end of file diff --git a/src/app/routes/ticket-management/components/invoice-requested/requested-detail/requested-detail.component.less b/src/app/routes/ticket-management/components/invoice-requested/requested-detail/requested-detail.component.less new file mode 100644 index 00000000..aebf12ee --- /dev/null +++ b/src/app/routes/ticket-management/components/invoice-requested/requested-detail/requested-detail.component.less @@ -0,0 +1,13 @@ +:host::ng-deep { + + .statistics-box { + .ant-form-item { + margin-bottom: 0; + + .ant-form-item-control-input-content { + color: #f5222d; + } + } + } + +} \ No newline at end of file diff --git a/src/app/routes/ticket-management/components/invoice-requested/requested-detail/requested-detail.component.ts b/src/app/routes/ticket-management/components/invoice-requested/requested-detail/requested-detail.component.ts new file mode 100644 index 00000000..ef28f8f4 --- /dev/null +++ b/src/app/routes/ticket-management/components/invoice-requested/requested-detail/requested-detail.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-requested-detail', + templateUrl: './requested-detail.component.html', + styleUrls: ['./requested-detail.component.less'] +}) +export class RequestedDetailComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/routes/ticket-management/components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component.html b/src/app/routes/ticket-management/components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component.html index f4b9c301..d4ec97ad 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component.html +++ b/src/app/routes/ticket-management/components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component.html @@ -1,49 +1,3 @@ -
-
- - 茅台股份有限公司 - - - 912301046656930913 - - - 贵州省贵阳市 - - - 075588393198 - - - 中国工商银行股份有限公司哈贵阳支行 - - - 3500044119068126788 - - -

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

-

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

-

货物名称:钢材

-

车型车牌:高栏车 粤B36889

-
-
-
- - 天津怡亚通物流科技有限公司 - - - 100笔 - - - 300,000.00元 - - - 运输服务费 - - - 需要 - - - 单位按吨 - + -
-
\ No newline at end of file + \ No newline at end of file diff --git a/src/app/routes/ticket-management/components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component.ts b/src/app/routes/ticket-management/components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component.ts index 00494154..79166d43 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component.ts +++ b/src/app/routes/ticket-management/components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component.ts @@ -1,4 +1,7 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { TicketService } from '../../../services/ticket.service'; @Component({ selector: 'app-requested-invoice-modal', @@ -6,10 +9,75 @@ import { Component, OnInit } from '@angular/core'; styleUrls: ['./requested-invoice-modal.component.less'] }) export class RequestedInvoiceModalComponent implements OnInit { + @ViewChild('st', { static: false }) + st!: STComponent; + columns: STColumn[] = this.initST(); + data = [ + { + key: 0, + disabled: true, + href: 'https://ant.design', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png', + no: 'TradeCode 0' + }, + { + key: 1, + disabled: false, + href: 'https://ant.design', + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png', + no: 'TradeCode 1' + } + ]; - constructor() { } + info = {}; - ngOnInit(): void { + constructor(public service: TicketService, private nzModalService: NzModalService) {} + + ngOnInit(): void {} + + /** + * 移除订单 + * @returns + */ + removeOrder(item: any[]) { + if (this.data?.length <= 0) { + this.service.msgSrv.warning('无订单'); + return; + } + this.nzModalService.warning({ + nzTitle: '确定从当前批次中移除所有订单?', + nzContent: '移除后相关订单可以重新提交开票申请', + nzOnOk: () => { + console.log(this.data); + } + }); } + private initST(): STColumn[] { + return [ + { title: '订单号', index: 'no', width: 150 }, + { title: '订单完成日期', index: 'updatedAt', type: 'date', width: 150 }, + { title: '所属项目', index: 'callNo', width: 120 }, + { title: '订单类型', index: 'callNo', width: 90 }, + { title: '装货地', index: 'callNo', width: 90 }, + { title: '卸货地', index: 'callNo', width: 100 }, + { title: '货物信息', index: 'callNo', width: 90 }, + { title: '承运司机', index: 'callNo', width: 140, format: item => `特朗普
13789040523
粤GT8419` }, + { title: '总费用', index: 'callNo', width: 90 }, + { title: '运输费', index: 'callNo', width: 90 }, + { title: '附加费', index: 'callNo', width: 90 }, + { + title: '操作', + width: 80, + fixed: 'right', + className: 'text-center', + buttons: [ + { + text: '移除', + click: item => this.removeOrder([item]) + } + ] + } + ]; + } } diff --git a/src/app/routes/ticket-management/ticket-management.module.ts b/src/app/routes/ticket-management/ticket-management.module.ts index 221da7c1..22927d1a 100644 --- a/src/app/routes/ticket-management/ticket-management.module.ts +++ b/src/app/routes/ticket-management/ticket-management.module.ts @@ -12,6 +12,7 @@ import { InvoiceRequestedDetailComponent } from './components/invoice-requested/ import { InvoicedListDetailComponent } from './components/invoiced-list/invoiced-list-detail/invoiced-list-detail.component'; import { TransactionDetailsComponent } from './components/etc-invoiced-list/transaction-details/transaction-details.component'; import { RequestedInvoiceModalComponent } from './components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component'; +import { RequestedDetailComponent } from './components/invoice-requested/requested-detail/requested-detail.component'; const COMPONENTS: any = [ ETCInvoicedListComponent, @@ -23,7 +24,7 @@ const COMPONENTS: any = [ InvoiceRequestedDetailComponent, InvoicedListDetailComponent ]; -const NOTROUTECOMPONENTS: any = [TransactionDetailsComponent, RequestedInvoiceModalComponent]; +const NOTROUTECOMPONENTS: any = [TransactionDetailsComponent, RequestedInvoiceModalComponent, RequestedDetailComponent]; @NgModule({ declarations: [...COMPONENTS, ...NOTROUTECOMPONENTS], imports: [CommonModule, TicketManagementRoutingModule, SharedModule]