From 1bca4735454a79c6cc562162f54910dc6fe87d99 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Mon, 26 Aug 2024 11:15:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../order-after-sales.component.html | 70 ++++++++++--------- .../order-after-sales.component.ts | 14 +++- 2 files changed, 48 insertions(+), 36 deletions(-) diff --git a/src/app/pages/trade/order-after-sales/order-after-sales.component.html b/src/app/pages/trade/order-after-sales/order-after-sales.component.html index d5c3768..2cde752 100644 --- a/src/app/pages/trade/order-after-sales/order-after-sales.component.html +++ b/src/app/pages/trade/order-after-sales/order-after-sales.component.html @@ -213,39 +213,41 @@ -
- - 申请单号 - - - - - - 申请类型 - - - - - - - - 审核 - - - - - - - - - 备注 - - - - -
-
- -
+ +
+ + 申请单号 + + + + + + 申请类型 + + + + + + + + 审核 + + + + + + + + + 备注 + + + + +
+
+ +
+
diff --git a/src/app/pages/trade/order-after-sales/order-after-sales.component.ts b/src/app/pages/trade/order-after-sales/order-after-sales.component.ts index 80a6183..79cdb45 100644 --- a/src/app/pages/trade/order-after-sales/order-after-sales.component.ts +++ b/src/app/pages/trade/order-after-sales/order-after-sales.component.ts @@ -34,6 +34,8 @@ import {NzTimelineModule} from "ng-zorro-antd/timeline"; import {NzImageDirective, NzImageModule} from "ng-zorro-antd/image"; import {NzTypographyComponent} from "ng-zorro-antd/typography"; import {environment} from "../../../../environments/environment"; +import {NzSpinComponent} from "ng-zorro-antd/spin"; +import {NzAlertComponent} from "ng-zorro-antd/alert"; @Component({ selector: 'app-order-after-sales', @@ -89,13 +91,16 @@ import {environment} from "../../../../environments/environment"; NzTimelineModule, NzImageDirective, NzImageModule, - NzTypographyComponent + NzTypographyComponent, + NzSpinComponent, + NzAlertComponent ], templateUrl: './order-after-sales.component.html', styleUrl: './order-after-sales.component.less' }) export class OrderAfterSalesComponent { imageUrl = environment.imageUrl; + isSpinning = false; // 表单页数 tablePageNum = 1; // 表单数据 @@ -241,15 +246,16 @@ export class OrderAfterSalesComponent { this.applyAuditVisible = true; } + /** * 提交审核 */ submitAuditForm() { + this.isSpinning = true; if (this.applyAuditForm.valid) { this.applyAuditForm.controls['applyNo'].enable(); this.orderAfterSalesService.audit(this.applyAuditForm.value, (data: any) => { if (data['return_code'] == '000000') { - this.message.create('success', '操作成功'); // 清空表单 this.closeAudit(); @@ -258,6 +264,7 @@ export class OrderAfterSalesComponent { } else { this.message.create('error', data['return_msg']); } + this.isSpinning = false; }); } else { this.applyAuditForm.controls['applyNo'].disable(); @@ -267,6 +274,7 @@ export class OrderAfterSalesComponent { control.updateValueAndValidity({ onlySelf: true }); } }); + this.isSpinning = false; } } @@ -290,6 +298,7 @@ export class OrderAfterSalesComponent { }); } submitFinish(applyNo: string): void { + this.isSpinning = true; const param = { applyNo: applyNo } @@ -300,6 +309,7 @@ export class OrderAfterSalesComponent { } else { this.message.create('error', data['return_msg']); } + this.isSpinning = false; }); }