pull/1/head
袁野 4 years ago
parent efa298d06c
commit caf1e92d8e
  1. 1
      src/app/admin/order/order-detail/order-detail.component.html
  2. 0
      src/app/admin/order/order-detail/order-detail.component.scss
  3. 15
      src/app/admin/order/order-detail/order-detail.component.ts
  4. 18
      src/app/admin/order/order-list/order-list.component.html
  5. 6
      src/app/admin/order/order-list/order-list.component.ts
  6. 2
      src/app/admin/order/order-routing.module.ts
  7. 3
      src/app/admin/order/order.module.ts
  8. 6
      src/app/app-common.module.ts
  9. 2
      src/app/pipes/index.ts
  10. 18
      src/app/pipes/paymodel.pipe.ts
  11. 18
      src/app/pipes/paytype.pipe.ts
  12. 2
      src/app/services/order.service.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 {
}
}

@ -18,7 +18,7 @@
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="6">客户手机号</nz-form-label> <nz-form-label [nzSpan]="6">客户手机号</nz-form-label>
<nz-form-control [nzSpan]="16"> <nz-form-control [nzSpan]="16">
<input nz-input formControlName="phone"/> <input nz-input formControlName="memPhone"/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
@ -26,7 +26,7 @@
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="6">状态</nz-form-label> <nz-form-label [nzSpan]="6">状态</nz-form-label>
<nz-form-control [nzSpan]="16"> <nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear nzPlaceHolder="请选择订单状态" formControlName="status"> <nz-select nzShowSearch nzAllowClear nzPlaceHolder="请选择订单状态" formControlName="orderStatus">
<nz-option nzLabel="待支付" nzValue="1"></nz-option> <nz-option nzLabel="待支付" nzValue="1"></nz-option>
<nz-option nzLabel="已支付" nzValue="2"></nz-option> <nz-option nzLabel="已支付" nzValue="2"></nz-option>
<nz-option nzLabel="已完成" nzValue="3"></nz-option> <nz-option nzLabel="已完成" nzValue="3"></nz-option>
@ -70,13 +70,12 @@
<th nzWidth="180px">支付流水号</th> <th nzWidth="180px">支付流水号</th>
<th nzWidth="120px">客户名称</th> <th nzWidth="120px">客户名称</th>
<th nzWidth="130px">客户电话</th> <th nzWidth="130px">客户电话</th>
<th nzWidth="100px">支付模式</th> <th nzWidth="110px">支付模式</th>
<th nzWidth="100px">支付方式</th> <th nzWidth="100px">支付方式</th>
<th nzWidth="100px">支付金额</th> <th nzWidth="100px">支付金额</th>
<th nzWidth="140px">支付时间</th>
<th nzWidth="140px">取消时间</th>
<th nzWidth="140px">创建时间</th> <th nzWidth="140px">创建时间</th>
<th nzWidth="80px">状态</th> <th nzWidth="80px">状态</th>
<!-- <th nzWidth="150px" nzRight="0px">操作</th>-->
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -86,13 +85,14 @@
<td>{{data.paySerialNo == null ? '暂无': data.paySerialNo}}</td> <td>{{data.paySerialNo == null ? '暂无': data.paySerialNo}}</td>
<td>{{data.memName == null ? '暂无': data.memName}}</td> <td>{{data.memName == null ? '暂无': data.memName}}</td>
<td>{{data.memPhone == null ? '暂无': data.memPhone}}</td> <td>{{data.memPhone == null ? '暂无': data.memPhone}}</td>
<td>{{data.payModel == null ? '暂无': data.payModel}}</td> <td>{{data.payModel == null ? '暂无': data.payModel | paymodel}}</td>
<td>{{data.payType == null ? '暂无': data.payType}}</td> <td>{{data.payType == null ? '暂无': data.payType | paytype}}</td>
<td>{{data.payPrice == null ? '暂无': data.payPrice}}</td> <td>{{data.payPrice == null ? '暂无': data.payPrice}}</td>
<td>{{data.payTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.cancelTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td> <td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.orderStatus | orderCouponStatus}}</td> <td>{{data.orderStatus | orderCouponStatus}}</td>
<!-- <td nzRight="0px" class="table-td-operation">-->
<!-- <a *ngIf="data.status !== 101" (click)="getDetail(data.id)">订单详情</a>-->
<!-- </td>-->
</tbody> </tbody>
</nz-table> </nz-table>
</div> </div>

@ -39,9 +39,9 @@ export class OrderListComponent implements OnInit {
public init(): void { public init(): void {
this.searchForm = this.form.group({ this.searchForm = this.form.group({
phone: [null], memPhone: [null],
orderNo: [null], orderNo: [null],
status: [null], orderStatus: [null],
}); });
this.getRequest(true, this.searchForm.value); this.getRequest(true, this.searchForm.value);
} }
@ -74,7 +74,7 @@ export class OrderListComponent implements OnInit {
// 查看详情 // 查看详情
public getDetail(id: number): void { public getDetail(id: number): void {
this.router.navigate(['/admin/merchant/merchant-detail'], { this.router.navigate(['/admin/order/order-detail'], {
queryParams: { queryParams: {
merchantId: id merchantId: id
} }

@ -1,10 +1,12 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router'; import { Routes, RouterModule } from '@angular/router';
import {OrderListComponent} from './order-list/order-list.component'; import {OrderListComponent} from './order-list/order-list.component';
import {OrderDetailComponent} from './order-detail/order-detail.component';
const routes: Routes = [ const routes: Routes = [
{ path: 'order-list', component: OrderListComponent }, { path: 'order-list', component: OrderListComponent },
{ path: 'order-detail', component: OrderDetailComponent },
]; ];
@NgModule({ @NgModule({

@ -9,10 +9,11 @@ import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module'; import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module';
import {RegionSelectorModule} from '../../common/region-selector/region-selector.module'; import {RegionSelectorModule} from '../../common/region-selector/region-selector.module';
import {AppCommonModule} from "../../app-common.module"; import {AppCommonModule} from "../../app-common.module";
import { OrderDetailComponent } from './order-detail/order-detail.component';
@NgModule({ @NgModule({
declarations: [OrderListComponent], declarations: [OrderListComponent, OrderDetailComponent],
imports: [ imports: [
CommonModule, CommonModule,
OrderRoutingModule, OrderRoutingModule,

@ -19,6 +19,8 @@ import {
AuditStatusPipe AuditStatusPipe
} from './pipes'; } from './pipes';
import { OrderCouponStatusPipe } from './pipes/order/order-coupon-status.pipe'; import { OrderCouponStatusPipe } from './pipes/order/order-coupon-status.pipe';
import { PaymodelPipe } from './pipes/paymodel.pipe';
import { PaytypePipe } from './pipes/paytype.pipe';
const PIPES = [ const PIPES = [
TimesPipe, TimesPipe,
@ -42,10 +44,14 @@ const PIPES = [
], ],
declarations: [ declarations: [
...PIPES, ...PIPES,
PaymodelPipe,
PaytypePipe,
], ],
exports: [ exports: [
...PIPES, ...PIPES,
PaymodelPipe,
PaytypePipe,
], ],
}) })

@ -6,3 +6,5 @@ export * from './coupon-code.pipe';
export * from './audit-status.pipe'; export * from './audit-status.pipe';
export * from './audit-type.pipe'; export * from './audit-type.pipe';
export * from './order/order-coupon-status.pipe'; export * from './order/order-coupon-status.pipe';
export * from './paymodel.pipe';
export * from './paytype.pipe';

@ -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 '混合支付';
}
}
}

@ -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 '金币';
}
}
}

@ -20,7 +20,7 @@ export class OrderService {
* @param callBack * @param callBack
*/ */
public getOrderCouponList(paramsObject: object, 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); callBack(data);
}); });
} }

Loading…
Cancel
Save