From c4b5689d6575f549241ad0bb4d4f66f7293323e6 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Tue, 1 Nov 2022 16:41:59 +0800 Subject: [PATCH] Merge branch 'order' of http://139.159.177.244:3000/yuanye/high-web into order MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 'order' of http://139.159.177.244:3000/yuanye/high-web: 提交代码 # Conflicts: # src/app/admin/order-manage/order-manage.module.ts --- .../cms-category/cms-category.component.html | 12 ++++++++-- .../kfc-order-list.component.html | 8 +++---- .../kfc-order-list.component.ts | 24 ++++++++++++++++++- .../order-manage-routing.module.ts | 10 +++++++- .../order/order-third-party.service.ts | 15 +++++++++++- 5 files changed, 60 insertions(+), 9 deletions(-) diff --git a/src/app/admin/cms/cms-category/cms-category.component.html b/src/app/admin/cms/cms-category/cms-category.component.html index f3e6b34..5bdad9c 100644 --- a/src/app/admin/cms/cms-category/cms-category.component.html +++ b/src/app/admin/cms/cms-category/cms-category.component.html @@ -163,6 +163,7 @@ + @@ -274,8 +275,15 @@ - - + + + + + + + + + diff --git a/src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.html b/src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.html index e8d1d64..f7d9b14 100644 --- a/src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.html +++ b/src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.html @@ -1,8 +1,7 @@ - - +
@@ -132,7 +131,7 @@
共计 {{total?total:0}} 条数据
- +
@@ -187,8 +186,9 @@
+ - diff --git a/src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.ts b/src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.ts index e5d6336..d96bc99 100644 --- a/src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.ts +++ b/src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.ts @@ -7,6 +7,7 @@ import {CommonsService} from '../../../../services/commons.service'; import {animate, state, style, transition, trigger} from '@angular/animations'; import {NzMessageService} from 'ng-zorro-antd'; import {OrderThirdPartyService} from '../../../../services/order/order-third-party.service'; +import {environment} from "../../../../../environments/environment"; @Component({ @@ -65,6 +66,13 @@ export class KfcOrderListComponent implements OnInit { orderDetailObject: any = { tradeOrder: {}, }; + // 数据加载中参数 + loadingObject = { + title: '加载中...', + status: false, + }; + // 请求地址参数 + FILE_URL = environment.imageUrl; constructor( private form: FormBuilder, private store: LocalStorageService, @@ -86,6 +94,7 @@ export class KfcOrderListComponent implements OnInit { companyId: [null], payType: [null], memCardNo: [null], + productType: [2], }); // 角色类型初始化 this.roleType = Number(this.store.get(ADMIN_INFO_OBJECT)['secRole'].roleType); @@ -110,7 +119,6 @@ export class KfcOrderListComponent implements OnInit { } whereObject['pageNum'] = this.pageNum; whereObject['pageSize'] = this.pageSize; - whereObject['productType'] = 2; this.thirdPartyOrder.getOrderList(whereObject, data => { this.loading = false; if (data['return_code'] === '000000') { @@ -138,6 +146,20 @@ export class KfcOrderListComponent implements OnInit { } + // 导出数据 + public excelOrder(whereObject) { + this.loadingObject.status = true; + this.loadingObject.title = '数据导出中...'; + this.thirdPartyOrder.exportThirdPartyOrderList(whereObject, data => { + if (data['return_code'] === '000000') { + window.location.href = this.FILE_URL + 'temporary/' + data['return_data']; + } else { + this.message.error(data['return_msg']); + } + this.loadingObject.status = false; + }); + } + } diff --git a/src/app/admin/order-manage/order-manage-routing.module.ts b/src/app/admin/order-manage/order-manage-routing.module.ts index c2d2ae1..f0c21ed 100644 --- a/src/app/admin/order-manage/order-manage-routing.module.ts +++ b/src/app/admin/order-manage/order-manage-routing.module.ts @@ -7,6 +7,10 @@ import {OrderRefundListComponent} from './order-refund-list/order-refund-list.co import {KfcOrderListComponent} from './kfc-order/kfc-order-list/kfc-order-list.component'; import {StarbucksOrderListComponent} from './starbucks-order/starbucks-order-list/starbucks-order-list.component'; import {MemberChargeOrderListComponent} from './member-charge-order/member-charge-order-list/member-charge-order-list.component'; +import {OrderHListComponent} from '../order/order-h-list/order-h-list.component'; +import {PreOrderComponent} from '../order/pre-order/pre-order.component'; +import {DiscountUseConditionListComponent} from '../order/discount-use-condition-list/discount-use-condition-list.component'; +import {DicountPackageOrderListComponent} from '../order/dicount-package-order-list/dicount-package-order-list.component'; const routes: Routes = [ @@ -16,7 +20,11 @@ const routes: Routes = [ { path: 'order-refund-list', component: OrderRefundListComponent }, { path: 'order-kfc-list', component: KfcOrderListComponent}, { path: 'order-starbucks--list', component: StarbucksOrderListComponent}, - { path: 'order-member-charge--list', component: MemberChargeOrderListComponent} + { path: 'order-member-charge--list', component: MemberChargeOrderListComponent}, + { path: 'order-h-list', component: OrderHListComponent }, + { path: 'pre-order', component: PreOrderComponent }, + { path: 'discount-use-condition-list', component: DiscountUseConditionListComponent }, + { path: 'discount-package-order-list', component: DicountPackageOrderListComponent}, ]; @NgModule({ diff --git a/src/app/services/order/order-third-party.service.ts b/src/app/services/order/order-third-party.service.ts index e629d8e..61a6e93 100644 --- a/src/app/services/order/order-third-party.service.ts +++ b/src/app/services/order/order-third-party.service.ts @@ -32,11 +32,24 @@ export class OrderThirdPartyService { * @methodName getOrderDetail * @Description // 根据订单号查询订单详情 * @Date 14:38 2022/10/28 - * @Param + * @Param orderNo: string, callBack */ public getOrderDetail(orderNo: string, callBack) { this.http.get(environment.orderUrl + 'thirdParty/getOrderDetail?orderNo=' + orderNo).subscribe(data => { callBack(data); }); } + + /** + * @Author Sum1Dream + * @methodName exportThirdPartyOrderList + * @Description // 导出第三方订单表格 + * @Date 10:07 2022/11/1 + * @Param param: object, callBack + */ + public exportThirdPartyOrderList(param: object, callBack) { + this.http.get(environment.orderUrl + 'thirdParty/exportThirdPartyOrderList?' + this.common.getWhereCondition(param)).subscribe(data => { + callBack(data); + }); + } }