提交代码

master
胡锐 4 months ago
parent 2f357bccfb
commit 470586b5f5
  1. 2
      src/app/pages/trade/order-oil-list/order-oil-list.component.html
  2. 4
      src/app/pages/trade/order-oil-list/order-oil-list.component.ts
  3. 18
      src/app/pipes/common/date-minutes-diff.pipe.ts

@ -228,7 +228,7 @@
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item (click)="showOrderDetail(data.orderNo)">交易详情</li>
<li *ngIf="data.status == 2 && GAS_REFUND_BTN" (click)="showRefund(data.orderNo, data.orderChildNo)" nz-menu-item>交易退款</li>
<li *ngIf="data.status == 2 && GAS_REFUND_BTN && (accountType == 2 || accountType == 3)?(data.payTime | dateMinutesDiff: data.payTime) <= 30:true" (click)="showRefund(data.orderNo, data.orderChildNo)" nz-menu-item>交易退款</li>
<li *ngIf="data.channelType == 1 && data.status == 2 && GAS_ORDER_PRINT_BTN" (click)="showOrderPrint(data.orderNo);" nz-menu-item>打印小票</li>
</ul>
</nz-dropdown-menu>

@ -38,6 +38,7 @@ import {NzBadgeComponent} from "ng-zorro-antd/badge";
import {ButtonPipe} from "../../../pipes/common/button.pipe";
import {NzTooltipDirective} from "ng-zorro-antd/tooltip";
import {symlinkSync} from "fs";
import {DateMinutesDiffPipe} from "../../../pipes/common/date-minutes-diff.pipe";
@Component({
selector: 'app-order-oil-list',
@ -86,6 +87,7 @@ import {symlinkSync} from "fs";
NzTimelineComponent,
NzBadgeComponent,
NzTooltipDirective,
DateMinutesDiffPipe
],
templateUrl: './order-oil-list.component.html',
styleUrl: './order-oil-list.component.less'
@ -397,5 +399,5 @@ export class OrderOilListComponent {
})
}
protected readonly Date = Date;
}

@ -0,0 +1,18 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'dateMinutesDiff',
standalone: true
})
/**
*
*/
export class DateMinutesDiffPipe implements PipeTransform {
transform(newTime: number | Date, olbTime: number | Date): number {
var diffTimeStamp = new Date().getTime() - new Date(olbTime).getTime();
return parseInt(String(diffTimeStamp / (1000 * 60)));
}
}
Loading…
Cancel
Save