提交代码

pull/1/head
胡锐 2 years ago
parent e4fe6484dd
commit 31c8207638
  1. 2
      src/app/admin/gas-class-group/gas-class-group-task/gas-class-group-task.component.html
  2. 2
      src/app/admin/login/login/login.component.ts
  3. 12
      src/app/admin/order/oil-station-order/oil-station-order.component.html
  4. 7
      src/app/admin/order/oil-station-order/oil-station-order.component.ts
  5. 3
      src/app/app-common.module.ts
  6. 27
      src/app/pipes/gas-order/gas-order-status.pipe.ts
  7. 1
      src/app/pipes/index.ts
  8. 4
      src/app/services/commons.service.ts

@ -48,7 +48,7 @@
</nz-row>
<div class="gas-count-btn">
<button nz-button nzType="primary" *ngIf="currentClassGroupCountData.status == 0" (click)="showStartClassGroupModal()"><i nz-icon nzType="sync" nzTheme="outline"></i>开启班次</button>
<button nz-button nzType="primary" *ngIf="currentClassGroupCountData.status == 0" (click)="showStartClassGroupModal()"><i nz-icon nzType="plus" nzTheme="outline"></i>开启班次</button>
<button nz-button nzType="primary" *ngIf="currentClassGroupCountData.status == 1" (click)="getCurrentClassGroupCountData()"><i nz-icon nzType="sync" nzTheme="outline"></i>刷新数据</button>
<button nz-button nzType="primary" *ngIf="currentClassGroupCountData.status == 1" (click)="showSwapClassGroupModal()"><i nz-icon nzType="swap" nzTheme="outline"></i>交接班组</button>
<button nz-button nzType="primary" *ngIf="currentClassGroupCountData.status == 1" (click)="showEndClassGroupConfirm()"><i nz-icon nzType="poweroff" nzTheme="outline"></i>结束班次</button>

@ -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';

@ -132,13 +132,13 @@
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight>{{data.status | orderCouponStatus}}</td>
<td nzRight class="table-td-operation">
<a style="float: left;width: 100%;margin-bottom: 10px;" *ngIf="(secUser['objectType'] == 3 || secUser['objectType'] == 8) && data.printStatus == false" (click)="showPrintModal(data.orderId, data)">打印小票</a>
<a style="float: left;width: 100%;margin-bottom: 10px;" *ngIf="(secUser['objectType'] == 3 || secUser['objectType'] == 8) && data.printStatus == true" (click)="showPrintModal(data.orderId, data)">已打印({{data.printNum+'次'}})</a>
<a style="float: left;width: 100%;margin-bottom: 10px;" *ngIf="BTN_GAS_ORDER_PRINT && (secUser['objectType'] == 3 || secUser['objectType'] == 8) && data.printStatus == false" (click)="showPrintModal(data.orderId, data)">打印小票</a>
<a style="float: left;width: 100%;margin-bottom: 10px;" *ngIf="BTN_GAS_ORDER_PRINT && (secUser['objectType'] == 3 || secUser['objectType'] == 8) && data.printStatus == true" (click)="showPrintModal(data.orderId, data)">已打印({{data.printNum+'次'}})</a>
<a nz-dropdown [nzDropdownMenu]="menu">操作列表<i nz-icon nzType="down"></i></a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item><a (click)="getDetail(data.orderNo)">详情</a></li>
<li nz-menu-item *ngIf="(secUser['objectType'] == 3) && (data.status == 2 || data.status == 3)" ><a (click)="showModal(data.orderId)">退款</a></li>
<li nz-menu-item *ngIf="BTN_GAS_ORDER_REFUND && (secUser['objectType'] == 3) && (data.status == 2 || data.status == 3)" ><a (click)="showModal(data.orderId)">退款</a></li>
</ul>
</nz-dropdown-menu>
</td>
@ -156,7 +156,7 @@
</nz-form-item>
</nz-modal>
<nz-modal [(nzVisible)]="isVisibleDetail" nzTitle="订单详情" nzWidth="900" (nzOnCancel)="isVisibleDetail= false" (nzOnOk)="isVisibleDetail= false">
<nz-modal [(nzVisible)]="isVisibleDetail" nzTitle="订单详情" nzWidth="900" (nzOnCancel)="isVisibleDetail= false" (nzOnOk)="isVisibleDetail= false" [nzFooter]="null">
<nz-descriptions nzBordered [nzColumn]="{ xxl: 3, xl: 2, lg: 2, md: 2, sm: 2, xs: 1 }">
<nz-descriptions-item nzTitle="油站名称">{{data['gasName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="油站地址">{{data['gasAddress']}}</nz-descriptions-item>
@ -168,13 +168,13 @@
<nz-descriptions-item nzTitle="优惠价">{{data['gasPricePreferences']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="加油升数">{{data['gasOilLiters']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="加油金额">{{data['totalPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付金额">{{data['payRealPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="优惠金额">{{data['deductionPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付金额">{{data['payRealPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="加油折扣">{{data['gasDiscount']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="加油补贴">{{data['gasOilSubsidy']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="每升优惠">{{data['gasLitersPreferences']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="生成时间">{{data['createTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="状态">{{data['status'] | rechargeStatus}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="状态">{{data['status'] | gasOrderStatus}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="data['status'] == 4" nzTitle="退款金额">{{data['refundPrice']}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="data['status'] == 4" nzTitle="退款时间">{{data['refundTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="data['status'] == 4" nzTitle="退款原因">{{data['refundContent']}}</nz-descriptions-item>

@ -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) {

@ -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,
];

@ -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 '退款失败';
}
}
}

@ -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';

@ -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;

Loading…
Cancel
Save