diff --git a/src/app/admin/gas-class-group/gas-class-group-task/gas-class-group-task.component.html b/src/app/admin/gas-class-group/gas-class-group-task/gas-class-group-task.component.html index 4d6c9e9..57e2a48 100644 --- a/src/app/admin/gas-class-group/gas-class-group-task/gas-class-group-task.component.html +++ b/src/app/admin/gas-class-group/gas-class-group-task/gas-class-group-task.component.html @@ -48,7 +48,7 @@
- + diff --git a/src/app/admin/login/login/login.component.ts b/src/app/admin/login/login/login.component.ts index 576bd3f..d7c729c 100644 --- a/src/app/admin/login/login/login.component.ts +++ b/src/app/admin/login/login/login.component.ts @@ -2,7 +2,7 @@ import {Component, OnInit} from '@angular/core'; import {FormGroup, Validators, FormBuilder} from '@angular/forms'; import {LoginService} from '../../../services/login.service'; import {NzMessageService, NzModalService} from 'ng-zorro-antd'; -import {ADMIN_INFO_OBJECT, TOKEN, INIT_FLAG, LOGINTYPE} from '../../../services/local-storage.namespace'; +import {ADMIN_INFO_OBJECT, TOKEN, INIT_FLAG, LOGINTYPE, DATA} from '../../../services/local-storage.namespace'; import {LocalStorageService} from '../../../services/local-storage.service'; import {Router} from '@angular/router'; import {HttpClient} from '@angular/common/http'; diff --git a/src/app/admin/order/oil-station-order/oil-station-order.component.html b/src/app/admin/order/oil-station-order/oil-station-order.component.html index 1af50d8..adc1745 100644 --- a/src/app/admin/order/oil-station-order/oil-station-order.component.html +++ b/src/app/admin/order/oil-station-order/oil-station-order.component.html @@ -132,13 +132,13 @@ {{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} {{data.status | orderCouponStatus}} - 打印小票 - 已打印({{data.printNum+'次'}}) + 打印小票 + 已打印({{data.printNum+'次'}}) 操作列表 @@ -156,7 +156,7 @@ - + {{data['gasName']}} {{data['gasAddress']}} @@ -168,13 +168,13 @@ {{data['gasPricePreferences']}} {{data['gasOilLiters']}} {{data['totalPrice']}} - {{data['payRealPrice']}} {{data['deductionPrice']}} + {{data['payRealPrice']}} {{data['gasDiscount']}} {{data['gasOilSubsidy']}} {{data['gasLitersPreferences']}} {{data['createTime'] | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data['status'] | rechargeStatus}} + {{data['status'] | gasOrderStatus}} {{data['refundPrice']}} {{data['refundTime'] | date: 'yyyy-MM-dd HH:mm:ss'}} {{data['refundContent']}} diff --git a/src/app/admin/order/oil-station-order/oil-station-order.component.ts b/src/app/admin/order/oil-station-order/oil-station-order.component.ts index dcf131e..158e2ab 100644 --- a/src/app/admin/order/oil-station-order/oil-station-order.component.ts +++ b/src/app/admin/order/oil-station-order/oil-station-order.component.ts @@ -50,6 +50,9 @@ export class OilStationOrderComponent implements OnInit { userSession = {}; gasStaffArray = []; + BTN_GAS_ORDER_REFUND = false; + BTN_GAS_ORDER_PRINT = false; + constructor( private form: FormBuilder, private order: OrderService, @@ -69,6 +72,10 @@ export class OilStationOrderComponent implements OnInit { } ngOnInit(): void { + + this.BTN_GAS_ORDER_REFUND = this.common.isBtnCompetence("BTN_GAS_ORDER_REFUND"); + this.BTN_GAS_ORDER_PRINT = this.common.isBtnCompetence("BTN_GAS_ORDER_PRINT"); + this.userSession = this.store.get(ADMIN_INFO_OBJECT); this.secUser = this.store.get(ADMIN_INFO_OBJECT)['secUser']; if (this.secUser['objectType'] === 2) { diff --git a/src/app/app-common.module.ts b/src/app/app-common.module.ts index 9085c4a..e7e1ed4 100644 --- a/src/app/app-common.module.ts +++ b/src/app/app-common.module.ts @@ -48,7 +48,7 @@ import { GasStaffStatusPipe, PayStatusPipe, ChlidRechargeStatusPipe, - SourceTypePipe, GasClassGroupTaskStatusPipe + SourceTypePipe, GasClassGroupTaskStatusPipe, GasOrderStatusPipe } from './pipes'; import {OilCardStatusPipe} from './pipes'; import {OilTypePipe} from './pipes/store/oil-type.pipe'; @@ -103,6 +103,7 @@ const PIPES = [ ChlidRechargeStatusPipe, SourceTypePipe, GasClassGroupTaskStatusPipe, + GasOrderStatusPipe, ]; diff --git a/src/app/pipes/gas-order/gas-order-status.pipe.ts b/src/app/pipes/gas-order/gas-order-status.pipe.ts new file mode 100644 index 0000000..8af5e0d --- /dev/null +++ b/src/app/pipes/gas-order/gas-order-status.pipe.ts @@ -0,0 +1,27 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +@Pipe({ + name: 'gasOrderStatus' +}) +export class GasOrderStatusPipe implements PipeTransform { + + transform(value: number): string { + switch (value) { + case 1: + return '待支付'; + case 2: + return '已支付'; + case 3: + return '已完成'; + case 4: + return '已退款'; + case 5: + return '已取消'; + case 6: + return '退款中'; + case 7: + return '退款失败'; + } + } + +} diff --git a/src/app/pipes/index.ts b/src/app/pipes/index.ts index 7aac75a..73e1aab 100644 --- a/src/app/pipes/index.ts +++ b/src/app/pipes/index.ts @@ -39,3 +39,4 @@ export * from './pay-status.pipe'; export * from './chlid-recharge-status.pipe'; export * from './apiMerchant/source-type.pipe'; export * from './gas-class-group-task/gas-class-group-task-status.pipe'; +export * from './gas-order/gas-order-status.pipe'; diff --git a/src/app/services/commons.service.ts b/src/app/services/commons.service.ts index c05a870..e6b2348 100644 --- a/src/app/services/commons.service.ts +++ b/src/app/services/commons.service.ts @@ -1,6 +1,6 @@ import {Injectable} from '@angular/core'; import {LocalStorageService} from './local-storage.service'; -import {DATA} from './local-storage.namespace'; +import {ADMIN_INFO_OBJECT, DATA} from './local-storage.namespace'; import {NzModalService, NzNotificationService} from 'ng-zorro-antd'; import {environment} from '../../environments/environment'; import {HttpClient} from '@angular/common/http'; @@ -42,7 +42,7 @@ export class CommonsService { */ public isBtnCompetence(btnCode: string): boolean { let buttonList = []; - buttonList = this.storage.get(DATA).buttonList; + buttonList = this.storage.get(ADMIN_INFO_OBJECT).buttonList; if (buttonList != null && buttonList.length > 0) { if (buttonList.find(b => b.permissionCode === btnCode) != null) { return true;