提交代碼

pull/1/head
胡锐 3 years ago
parent ce0cb0f91b
commit d7fb86ad15
  1. 16
      src/app/admin/order/oil-station-order/oil-station-order.component.html
  2. 20
      src/app/admin/order/oil-station-order/oil-station-order.component.ts

@ -6,6 +6,16 @@
<div class="inner-content"> <div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)"> <form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)">
<div nz-row> <div nz-row>
<div nz-col nzSpan="8" *ngIf="secUser['objectType'] == 2">
<nz-form-item>
<nz-form-label [nzSpan]="6">油站</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear nzPlaceHolder="请选择油站" formControlName="storeId">
<nz-option *ngFor="let item of gasArray" nzLabel="{{item.storeName}}" nzValue="{{item.id}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8"> <div nz-col nzSpan="8">
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="6">订单号</nz-form-label> <nz-form-label [nzSpan]="6">订单号</nz-form-label>
@ -110,13 +120,13 @@
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td> <td>{{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight>{{data.status | orderCouponStatus}}</td> <td nzRight>{{data.status | orderCouponStatus}}</td>
<td nzRight class="table-td-operation"> <td nzRight class="table-td-operation">
<a style="float: left;width: 100%;margin-bottom: 10px;" *ngIf="data.printStatus == false" (click)="showPrintDiv(data.orderId, data)">打印小票</a> <a style="float: left;width: 100%;margin-bottom: 10px;" *ngIf="(secUser['objectType'] == 3 || secUser['objectType'] == 8) && data.printStatus == false" (click)="showPrintDiv(data.orderId, data)">打印小票</a>
<a style="float: left;width: 100%;margin-bottom: 10px;" *ngIf="data.printStatus == true" (click)="showPrintDiv(data.orderId, data)">已打印({{data.printNum+'次'}})</a> <a style="float: left;width: 100%;margin-bottom: 10px;" *ngIf="(secUser['objectType'] == 3 || secUser['objectType'] == 8) && data.printStatus == true" (click)="showPrintDiv(data.orderId, data)">已打印({{data.printNum+'次'}})</a>
<a nz-dropdown [nzDropdownMenu]="menu">操作列表<i nz-icon nzType="down"></i></a> <a nz-dropdown [nzDropdownMenu]="menu">操作列表<i nz-icon nzType="down"></i></a>
<nz-dropdown-menu #menu="nzDropdownMenu"> <nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable> <ul nz-menu nzSelectable>
<li nz-menu-item><a (click)="getDetail(data.orderNo)">详情</a></li> <li nz-menu-item><a (click)="getDetail(data.orderNo)">详情</a></li>
<li nz-menu-item *ngIf="(secUser['objectType'] != 8) && (data.status == 2 || data.status == 3)" ><a (click)="showModal(data.orderId)">退款</a></li> <li nz-menu-item *ngIf="(secUser['objectType'] == 3) && (data.status == 2 || data.status == 3)" ><a (click)="showModal(data.orderId)">退款</a></li>
</ul> </ul>
</nz-dropdown-menu> </nz-dropdown-menu>
</td> </td>

@ -11,6 +11,7 @@ import {LocalStorageService} from '../../../services/local-storage.service';
import {CommonsService} from '../../../services/commons.service'; import {CommonsService} from '../../../services/commons.service';
import {WebsocketService} from '../../../services/websocket.service'; import {WebsocketService} from '../../../services/websocket.service';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {MerchantStoreService} from "../../../services/merchant-store.service";
@Component({ @Component({
selector: 'app-oil-station-order', selector: 'app-oil-station-order',
@ -37,15 +38,7 @@ export class OilStationOrderComponent implements OnInit {
roleType: number; roleType: number;
secUser: object; secUser: object;
printDataObject: PrintData = { gasArray = [];
gasName: '',
orderNo: '',
createTime: '',
gasOilNo: '',
gasGunNo: '',
gasOilLiters: 0,
oilPrice: 0
};
constructor( constructor(
private form: FormBuilder, private form: FormBuilder,
@ -56,6 +49,7 @@ export class OilStationOrderComponent implements OnInit {
private router: Router, private router: Router,
private company: CompanyService, private company: CompanyService,
private merchant: MerchantService, private merchant: MerchantService,
private merchantStoreService: MerchantStoreService,
private orderService: OrderService, private orderService: OrderService,
private store: LocalStorageService, // 数据请求 private store: LocalStorageService, // 数据请求
private common: CommonsService private common: CommonsService
@ -64,6 +58,13 @@ export class OilStationOrderComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.secUser = this.store.get(ADMIN_INFO_OBJECT)['secUser']; this.secUser = this.store.get(ADMIN_INFO_OBJECT)['secUser'];
if (this.secUser['objectType'] === 2) {
this.merchantStoreService.getStoreListByMerchant({ pageNum: 1, pageSize: 100}, data => {
if (data['return_code'] === '000000') {
this.gasArray = data['return_data']['list'];
}
});
}
this.init(); this.init();
// 接收消息 // 接收消息
this.webSocketService.messageSubject.subscribe( this.webSocketService.messageSubject.subscribe(
@ -77,6 +78,7 @@ export class OilStationOrderComponent implements OnInit {
public init(): void { public init(): void {
this.searchForm = this.form.group({ this.searchForm = this.form.group({
storeId: [null],
orderNo: [null], orderNo: [null],
status: [null], status: [null],
createTime: [null], createTime: [null],

Loading…
Cancel
Save