From 5245db0b39e100e1fa30f53bec001eefca376d8f Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 31 Dec 2021 13:53:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E8=BE=86=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../services/freight-account.service.ts | 16 +++- .../invoice-requested.component.ts | 27 +----- .../requested-detail.component.ts | 27 ++++-- .../requested-invoice-modal.component.html | 28 +++++- .../requested-invoice-modal.component.ts | 87 +++++++++++++------ 5 files changed, 121 insertions(+), 64 deletions(-) diff --git a/src/app/routes/financial-management/services/freight-account.service.ts b/src/app/routes/financial-management/services/freight-account.service.ts index 300228ef..a3478e5c 100644 --- a/src/app/routes/financial-management/services/freight-account.service.ts +++ b/src/app/routes/financial-management/services/freight-account.service.ts @@ -1,3 +1,11 @@ +/* + * @Author: your name + * @Date: 2021-12-30 19:36:30 + * @LastEditTime: 2021-12-31 13:50:41 + * @LastEditors: your name + * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @FilePath: \tms-obc-web\src\app\routes\financial-management\services\freight-account.service.ts + */ import { Injectable, Injector } from '@angular/core'; import { BaseService, ShipperBaseService } from '@shared'; @@ -28,13 +36,13 @@ export class FreightAccountService extends ShipperBaseService { $api_get_order_payment_page = '/api/fcc/billPaymentApplicationOBC/list/page'; // 查询提现申请表 - $api_get_refund_page = '/api/fcc/refundApplicationSMC/list/page'; + $api_get_refund_page = '/api/fcc/refundApplicationOBC/list/page'; // 获取提现申请表详情 - $api_get_refund_detail = '/api/fcc/refundApplicationSMC/get'; + $api_get_refund_detail = '/api/fcc/refundApplicationOBC/get'; // 同意提现 - $api_agree_refund = '/api/fcc/refundApplicationSMC/agreeRefund'; + $api_agree_refund = '/api/fcc/refundApplicationOBC/agreeRefund'; // 拒绝提现 - $api_disagree_refund = '/api/fcc/refundApplicationSMC/disagreeRefund'; + $api_disagree_refund = '/api/fcc/refundApplicationOBC/disagreeRefund'; // 查询充值信息表 $api_get_recharge_page = '/api/fcc/rechargeInfo/list/getPageByOperator'; 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 e8f57fed..6dee6695 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 @@ -162,29 +162,10 @@ export class InvoiceRequestedComponent implements OnInit { 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(); - } - } - ] + nzComponentParams: { + id: item.id + }, + nzFooter: null }); } 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 index ddf14138..8fa4924e 100644 --- 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 @@ -1,7 +1,8 @@ +import { Input } from '@angular/core'; /* * @Author: your name * @Date: 2021-12-23 16:50:17 - * @LastEditTime: 2021-12-30 15:07:42 + * @LastEditTime: 2021-12-31 13:15:13 * @LastEditors: Please set LastEditors * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath: \tms-obc-web\src\app\routes\ticket-management\components\invoice-requested\requested-detail\requested-detail.component.ts @@ -19,6 +20,7 @@ export class RequestedDetailComponent implements OnInit { i: any; status: any; Id: any; + @Input() id: any; headerInfo: any; constructor( public service: TicketService, @@ -28,12 +30,23 @@ export class RequestedDetailComponent implements OnInit { this.initData(); } initData() { - this.service.request(this.service.$api_get_invoice_requested_header_detail, { id: this.Id }).subscribe(res => { - console.log(res); - if (res) { - this.headerInfo = res; - } - }); + if(this.id) { + this.service.request(this.service.$api_get_invoice_requested_header_detail, { id: this.id }).subscribe(res => { + console.log(res); + if (res) { + this.headerInfo = res; + } + }); + } + if(this.Id) { + this.service.request(this.service.$api_get_invoice_requested_header_detail, { id: this.Id }).subscribe(res => { + console.log(res); + if (res) { + this.headerInfo = res; + } + }); + } + } } 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 d4ec97ad..32bb832f 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,3 +1,27 @@ - + + + + + + {{ item.billHCode }} + + + - \ 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 79166d43..03b89885 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,6 +1,14 @@ +/* + * @Author: your name + * @Date: 2021-12-23 16:50:17 + * @LastEditTime: 2021-12-31 13:35:22 + * @LastEditors: Please set LastEditors + * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @FilePath: \tms-obc-web\src\app\routes\ticket-management\components\invoice-requested\requested-invoice-modal\requested-invoice-modal.component.ts + */ import { Component, OnInit, ViewChild } from '@angular/core'; -import { STColumn, STComponent } from '@delon/abc/st'; -import { NzModalService } from 'ng-zorro-antd/modal'; +import { STChange, STColumn, STComponent } from '@delon/abc/st'; +import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; import { TicketService } from '../../../services/ticket.service'; @Component({ @@ -12,49 +20,60 @@ 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' - } - ]; - + headerInfo: any; + id: any; info = {}; + selectedRows: any[] = []; + totalCallNo = 0; + constructor(public service: TicketService, private nzModalService: NzModalService,private modal: NzModalRef,) {} - constructor(public service: TicketService, private nzModalService: NzModalService) {} - - ngOnInit(): void {} + ngOnInit(): void { + this.initData() + } + initData() { + this.service.request(this.service.$api_get_invoice_requested_header_detail, { id: this.id }).subscribe(res => { + console.log(res); + if (res) { + this.headerInfo = res; + } + }); + } /** * 移除订单 * @returns */ removeOrder(item: any[]) { - if (this.data?.length <= 0) { - this.service.msgSrv.warning('无订单'); - return; - } + console.log(item) this.nzModalService.warning({ nzTitle: '确定从当前批次中移除所有订单?', nzContent: '移除后相关订单可以重新提交开票申请', nzOnOk: () => { - console.log(this.data); + // const ids = this.selectedRows.map(order => order.billHId); + // this.service.request(this.service.$api_remove_bill, ids).subscribe(res => { + // if (res) { + // this.service.msgSrv.success('移除成功'); + // this.loadHeadInfo(); + // this.st.reload(); + // } + // }); } }); } - + stChange(e: STChange): void { + switch (e.type) { + case 'checkbox': + this.selectedRows = e.checkbox!; + this.totalCallNo = this.selectedRows.reduce((total, cv) => total + cv.callNo, 0); + break; + case 'filter': + this.st.load(); + break; + } + } private initST(): STColumn[] { return [ + { title: '', index: 'key', type: 'checkbox' }, { title: '订单号', index: 'no', width: 150 }, { title: '订单完成日期', index: 'updatedAt', type: 'date', width: 150 }, { title: '所属项目', index: 'callNo', width: 120 }, @@ -80,4 +99,16 @@ export class RequestedInvoiceModalComponent implements OnInit { } ]; } + saveManage() { + console.log(this.selectedRows) + 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) + }) + this.modal.destroy(); + } }