From 5cfe0ed512cfa6917e2b10c558a6cf6ed9099d20 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Thu, 24 Mar 2022 17:57:17 +0800 Subject: [PATCH 1/2] edit --- proxy.conf.js | 2 +- .../invoiced-list.component.html | 13 +++++ .../invoiced-list/invoiced-list.component.ts | 52 ++++++++++++++++++- .../services/ticket.service.ts | 3 ++ 4 files changed, 68 insertions(+), 2 deletions(-) diff --git a/proxy.conf.js b/proxy.conf.js index 67c15ee2..10071e14 100644 --- a/proxy.conf.js +++ b/proxy.conf.js @@ -20,7 +20,7 @@ module.exports = { // } '//api': { target: { - host: 'tms-api-test.eascs.com', + host: 'tms-api-dev.eascs.com', protocol: 'https:', port: 443 }, diff --git a/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.html b/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.html index 48255eee..5da0014c 100644 --- a/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.html +++ b/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.html @@ -59,4 +59,17 @@ 已签收

+ + + +
+
+ + + + + + +
+
\ No newline at end of file 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 ec52f839..5144df47 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 @@ -30,6 +30,10 @@ export class InvoicedListComponent implements OnInit { mailNo: '', routes: [] }; + + @ViewChild('requestedModal', { static: false }) + requestedModal!: any; + openInfo: any = { expresscompany: null, expressno: null }; constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {} ngOnInit(): void {} @@ -77,6 +81,42 @@ export class InvoicedListComponent implements OnInit { }); } + /** + * 填写物流/修改物流 + * @param item + */ + requestedAction(item: any) { + this.openInfo = { expresscompany: item.expresscompany || null, expressno: item.expressno || null }; + const modal = this.nzModalService.create({ + nzTitle: item.expresscompany ? '修改物流' : '填写物流', + nzContent: this.requestedModal, + nzOnOk: () => { + if (!this.openInfo?.expresscompany || !this.openInfo?.expressno) { + this.service.msgSrv.warning('请填快递信息'); + return false; + } + const params = { + expresscompany: this.openInfo.expresscompany, + expressno: this.openInfo.expressno + }; + this.service + .request(this.service.$api_update_Express, { + id: item.id, + ...params + }) + .subscribe(res => { + if (res) { + this.service.msgSrv.success(item.expresscompany ? '修改成功' : '填写成功'); + this.st.load(1); + modal.destroy(); + } + }); + + return false; + } + }); + } + invoiceHongChong() { if (this.selectedRows?.length <= 0) { this.service.msgSrv.warning('请选择发票'); @@ -266,7 +306,7 @@ export class InvoicedListComponent implements OnInit { className: 'text-center', width: 120, buttons: [ - {type:'divider'}, + { type: 'divider' }, { text: '查看明细
', click: item => @@ -283,6 +323,16 @@ export class InvoicedListComponent implements OnInit { text: '查看物流
', click: item => this.showlogosticsLogs(item), iif: item => item.expresscompany + }, + { + text: '填写物流
', + click: item => this.requestedAction(item), + iif: item => !item.expresscompany + }, + { + text: '修改物流
', + click: item => this.requestedAction(item), + iif: item => item.expresscompany } ] } diff --git a/src/app/routes/ticket-management/services/ticket.service.ts b/src/app/routes/ticket-management/services/ticket.service.ts index 68508f5a..a235412f 100644 --- a/src/app/routes/ticket-management/services/ticket.service.ts +++ b/src/app/routes/ticket-management/services/ticket.service.ts @@ -55,6 +55,9 @@ export class TicketService extends ShipperBaseService { // 已开发票查询 $api_get_invoice_page = '/api/fcc/ficoVatinvH/list/page'; + // 更新快递信息 + $api_update_Express= '/api/fcc/ficoVatinvH/updateExpress'; + // 发票作废 $api_cancel_invoice = '/api/fcc/ficoVatinvH/inpinvHCancel'; // 获取销项发票抬头 From cf8f3df99888083121a5fbd6deb5f68f5159aa0f Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Thu, 24 Mar 2022 17:57:34 +0800 Subject: [PATCH 2/2] edit --- proxy.conf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy.conf.js b/proxy.conf.js index 10071e14..67c15ee2 100644 --- a/proxy.conf.js +++ b/proxy.conf.js @@ -20,7 +20,7 @@ module.exports = { // } '//api': { target: { - host: 'tms-api-dev.eascs.com', + host: 'tms-api-test.eascs.com', protocol: 'https:', port: 443 },