diff --git a/src/app/admin/order/order-detail/order-detail.component.html b/src/app/admin/order/order-detail/order-detail.component.html new file mode 100644 index 0000000..d128785 --- /dev/null +++ b/src/app/admin/order/order-detail/order-detail.component.html @@ -0,0 +1 @@ +

order-detail works!

diff --git a/src/app/admin/order/order-detail/order-detail.component.scss b/src/app/admin/order/order-detail/order-detail.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/admin/order/order-detail/order-detail.component.ts b/src/app/admin/order/order-detail/order-detail.component.ts new file mode 100644 index 0000000..66e9666 --- /dev/null +++ b/src/app/admin/order/order-detail/order-detail.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-order-detail', + templateUrl: './order-detail.component.html', + styleUrls: ['./order-detail.component.scss'] +}) +export class OrderDetailComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/admin/order/order-list/order-list.component.html b/src/app/admin/order/order-list/order-list.component.html index e311aa6..860875a 100644 --- a/src/app/admin/order/order-list/order-list.component.html +++ b/src/app/admin/order/order-list/order-list.component.html @@ -18,7 +18,7 @@ 客户手机号 - + @@ -26,7 +26,7 @@ 状态 - + @@ -70,13 +70,12 @@ 支付流水号 客户名称 客户电话 - 支付模式 + 支付模式 支付方式 支付金额 - 支付时间 - 取消时间 创建时间 状态 + @@ -86,13 +85,14 @@ {{data.paySerialNo == null ? '暂无': data.paySerialNo}} {{data.memName == null ? '暂无': data.memName}} {{data.memPhone == null ? '暂无': data.memPhone}} - {{data.payModel == null ? '暂无': data.payModel}} - {{data.payType == null ? '暂无': data.payType}} + {{data.payModel == null ? '暂无': data.payModel | paymodel}} + {{data.payType == null ? '暂无': data.payType | paytype}} {{data.payPrice == null ? '暂无': data.payPrice}} - {{data.payTime | date: 'yyyy-MM-dd HH:mm'}} - {{data.cancelTime | date: 'yyyy-MM-dd HH:mm'}} {{data.createTime | date: 'yyyy-MM-dd HH:mm'}} {{data.orderStatus | orderCouponStatus}} + + + diff --git a/src/app/admin/order/order-list/order-list.component.ts b/src/app/admin/order/order-list/order-list.component.ts index 87ba687..1937b2b 100644 --- a/src/app/admin/order/order-list/order-list.component.ts +++ b/src/app/admin/order/order-list/order-list.component.ts @@ -39,9 +39,9 @@ export class OrderListComponent implements OnInit { public init(): void { this.searchForm = this.form.group({ - phone: [null], + memPhone: [null], orderNo: [null], - status: [null], + orderStatus: [null], }); this.getRequest(true, this.searchForm.value); } @@ -74,7 +74,7 @@ export class OrderListComponent implements OnInit { // 查看详情 public getDetail(id: number): void { - this.router.navigate(['/admin/merchant/merchant-detail'], { + this.router.navigate(['/admin/order/order-detail'], { queryParams: { merchantId: id } diff --git a/src/app/admin/order/order-routing.module.ts b/src/app/admin/order/order-routing.module.ts index 67bba9b..4d2bf72 100644 --- a/src/app/admin/order/order-routing.module.ts +++ b/src/app/admin/order/order-routing.module.ts @@ -1,10 +1,12 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import {OrderListComponent} from './order-list/order-list.component'; +import {OrderDetailComponent} from './order-detail/order-detail.component'; const routes: Routes = [ { path: 'order-list', component: OrderListComponent }, + { path: 'order-detail', component: OrderDetailComponent }, ]; @NgModule({ diff --git a/src/app/admin/order/order.module.ts b/src/app/admin/order/order.module.ts index 6f9c393..a75b6ac 100644 --- a/src/app/admin/order/order.module.ts +++ b/src/app/admin/order/order.module.ts @@ -9,10 +9,11 @@ import {FormsModule, ReactiveFormsModule} from '@angular/forms'; import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module'; import {RegionSelectorModule} from '../../common/region-selector/region-selector.module'; import {AppCommonModule} from "../../app-common.module"; +import { OrderDetailComponent } from './order-detail/order-detail.component'; @NgModule({ - declarations: [OrderListComponent], + declarations: [OrderListComponent, OrderDetailComponent], imports: [ CommonModule, OrderRoutingModule, diff --git a/src/app/app-common.module.ts b/src/app/app-common.module.ts index dfb3e53..876a79e 100644 --- a/src/app/app-common.module.ts +++ b/src/app/app-common.module.ts @@ -19,6 +19,8 @@ import { AuditStatusPipe } from './pipes'; import { OrderCouponStatusPipe } from './pipes/order/order-coupon-status.pipe'; +import { PaymodelPipe } from './pipes/paymodel.pipe'; +import { PaytypePipe } from './pipes/paytype.pipe'; const PIPES = [ TimesPipe, @@ -42,10 +44,14 @@ const PIPES = [ ], declarations: [ ...PIPES, + PaymodelPipe, + PaytypePipe, ], exports: [ ...PIPES, + PaymodelPipe, + PaytypePipe, ], }) diff --git a/src/app/pipes/index.ts b/src/app/pipes/index.ts index ddadb9b..7c734a5 100644 --- a/src/app/pipes/index.ts +++ b/src/app/pipes/index.ts @@ -6,3 +6,5 @@ export * from './coupon-code.pipe'; export * from './audit-status.pipe'; export * from './audit-type.pipe'; export * from './order/order-coupon-status.pipe'; +export * from './paymodel.pipe'; +export * from './paytype.pipe'; diff --git a/src/app/pipes/paymodel.pipe.ts b/src/app/pipes/paymodel.pipe.ts new file mode 100644 index 0000000..14e6c20 --- /dev/null +++ b/src/app/pipes/paymodel.pipe.ts @@ -0,0 +1,18 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +@Pipe({ + name: 'paymodel' +}) +export class PaymodelPipe implements PipeTransform { + + transform(value: number): string { + switch (value) { + case 1: + return '金币支付'; + case 2: + return '第三方支付'; + case 3: + return '混合支付'; + } + } +} diff --git a/src/app/pipes/paytype.pipe.ts b/src/app/pipes/paytype.pipe.ts new file mode 100644 index 0000000..e47fd25 --- /dev/null +++ b/src/app/pipes/paytype.pipe.ts @@ -0,0 +1,18 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +@Pipe({ + name: 'paytype' +}) +export class PaytypePipe implements PipeTransform { + + transform(value: number): string { + switch (value) { + case 1: + return '支付宝'; + case 2: + return '微信'; + case 3: + return '金币'; + } + } +} diff --git a/src/app/services/order.service.ts b/src/app/services/order.service.ts index 49898c2..f42ed2f 100644 --- a/src/app/services/order.service.ts +++ b/src/app/services/order.service.ts @@ -20,7 +20,7 @@ export class OrderService { * @param callBack 回调 */ public getOrderCouponList(paramsObject: object, callBack) { - this.http.get(environment.baseUrl + 'highOrder/getOrderList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { + this.http.get(environment.baseUrl + 'highOrder/getOrderBList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { callBack(data); }); }