提交代理商订单页面

pull/1/head
袁野 2 years ago
parent 775e6c616f
commit 51a09f3aee
  1. 127
      src/app/admin/api-order/kfc-order/kfc-order.component.html
  2. 5
      src/app/admin/api-order/kfc-order/kfc-order.component.scss
  3. 25
      src/app/admin/api-order/kfc-order/kfc-order.component.spec.ts
  4. 91
      src/app/admin/api-order/kfc-order/kfc-order.component.ts
  5. 127
      src/app/admin/api-order/starbucks-order/list/list.component.html
  6. 5
      src/app/admin/api-order/starbucks-order/list/list.component.scss
  7. 92
      src/app/admin/api-order/starbucks-order/list/list.component.ts
  8. 127
      src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.html
  9. 5
      src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.scss
  10. 93
      src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.ts
  11. 21
      src/app/pipes/apiMerchant/callback-status.pipe.ts
  12. 26
      src/app/pipes/order/pay-coupon-status.pipe.ts

@ -0,0 +1,127 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<!--条件搜索-->
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)">
<div nz-row>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">平台订单号</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input placeholder="请输入平台订单号..." [formControlName]="'orderNo'"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">第三方订单号</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input placeholder="请输入第三方订单号..." [formControlName]="'sourceOrderNo'"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">订单状态</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="orderStatus" nzPlaceHolder="请选择订单状态">
<nz-option nzLabel="待支付" nzValue="1"></nz-option>
<nz-option nzLabel="已支付" nzValue="2"></nz-option>
<nz-option nzLabel="已完成" nzValue="3"></nz-option>
<nz-option nzLabel="已退款" nzValue="4"></nz-option>
<nz-option nzLabel="已取消" nzValue="5"></nz-option>
<nz-option nzLabel="退款中" nzValue="6"></nz-option>
<nz-option nzLabel="退款失败" nzValue="7"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">回调状态</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="callbackStatus" nzPlaceHolder="请选择回调状态">
<nz-option nzLabel="未回调" nzValue="100"></nz-option>
<nz-option nzLabel="已回调" nzValue="101"></nz-option>
<nz-option nzLabel="回调未响应" nzValue="102"></nz-option>
<nz-option nzLabel="预备回调" nzValue="103"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">支付时间</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-range-picker [nzShowTime]="{ nzFormat: 'HH:mm' }"
formControlName="payTime"></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">创建时间</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-range-picker [nzShowTime]="{ nzFormat: 'HH:mm' }"
formControlName="createTime"></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div nz-row>
<div nz-col nzSpan="24" class="search-button">
<button nz-button nzType="primary"><i nz-icon nzType="search" nzTheme="outline"></i>搜索</button>
<button nz-button nzType="default" (click)="resetForm()"><i nz-icon nzType="reload"
nzTheme="outline"></i>重置
</button>
</div>
</div>
</form>
</div>
<div class="inner-content">
<span>共计 {{total}} 条数据</span>
<nz-table
class="table"
#ajaxTable
nzBordered
nzShowSizeChanger
[nzFrontPagination]="false"
[nzData]="requestData"
[nzLoading]="loading"
[nzTotal]="total"
[(nzPageIndex)]="pageNum"
[(nzPageSize)]="pageSize"
[nzScroll]="{ x: '1200px' }"
(nzPageIndexChange)="getRequest(false , searchForm.value)"
(nzPageSizeChange)="getRequest(false , searchForm.value)">
<thead nzSingleSort>
<tr>
<th nzWidth="80px">编号</th>
<th nzWidth="160px">平台订单号</th>
<th nzWidth="160px">第三方订单号</th>
<th nzWidth="110px">订单金额</th>
<th nzWidth="110px">下单金额</th>
<th nzWidth="140px">生成时间</th>
<th nzWidth="140px">支付时间</th>
<th nzWidth="90px" nzRight>订单状态</th>
<th nzWidth="100px" nzRight>支付状态</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i + 1}}</td>
<td>{{data.orderNo}}</td>
<td>{{data.sourceOrderNo}}</td>
<td>¥{{data.orderPrice}}</td>
<td>¥{{data.payPrice}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight>{{data.callbackStatus | callbackStatus}}</td>
<td nzRight>{{data.orderStatus | payCouponStatus}}</td>
</tbody>
</nz-table>
</div>

@ -0,0 +1,5 @@
.table-td-operation {
a {
margin-left: 8px;
}
}

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { KfcOrderComponent } from './kfc-order.component';
describe('KfcOrderComponent', () => {
let component: KfcOrderComponent;
let fixture: ComponentFixture<KfcOrderComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ KfcOrderComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(KfcOrderComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,91 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms';
import {RechargeService} from '../../../services/recharge.service';
import {DiscountService} from '../../../services/discount.service';
import {ApiMerchantsService} from '../../../services/api-merchants.service';
import {NzMessageService, NzModalService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
import {CouponService} from '../../../services/coupon.service';
import {IconService} from '../../../services/icon.service';
@Component({
selector: 'app-kfc-order',
templateUrl: './kfc-order.component.html',
styleUrls: ['./kfc-order.component.scss']
})
export class KfcOrderComponent implements OnInit {
FILE_URL = environment.imageUrl;
WEB_SERVE_URL = environment.baseUrl;
searchForm: FormGroup; // 搜索框
validateForm: FormGroup; // 添加框
requestData = []; // 列表数据
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
isVisible = false;
constructor(
private form: FormBuilder,
private recharge: RechargeService,
private discount: DiscountService,
private apiMerchant: ApiMerchantsService,
private modal: NzModalService,
private coupon: CouponService,
private iconService: IconService,
private message: NzMessageService,
) {
}
ngOnInit(): void {
this.init();
}
public init(): void {
this.searchForm = this.form.group({
orderStatus: [null], // 订单状态
orderNo: [null], // 订单号
productType: [2], // 产品类型
sourceOrderNo: [null], // 第三方订单号
callbackStatus: [null], // 回调状态
payTime: [null], // 支付时间
createTime: [null], // 创建时间
});
this.getRequest(true, this.searchForm.value);
}
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) {
whereObject['payTimeS'] = whereObject['payTime'][0].getTime();
whereObject['payTimeE'] = whereObject['payTime'][1].getTime();
}
if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) {
whereObject['createTimeS'] = whereObject['createTime'][0].getTime();
whereObject['createTimeE'] = whereObject['createTime'][1].getTime();
}
this.loading = false;
if (reset) {
this.pageNum = 1;
}
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.apiMerchant.getApiThirdOrderByList(whereObject, data => {
if (data['return_code'] === '000000') {
this.requestData = data['return_data'].list;
this.total = data['return_data'].total;
} else {
this.message.error(data['return_msg']);
}
});
}
// 重置
public resetForm(): void {
this.searchForm.reset();
}
}

@ -0,0 +1,127 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<!--条件搜索-->
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)">
<div nz-row>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">平台订单号</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input placeholder="请输入平台订单号..." [formControlName]="'orderNo'"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">第三方订单号</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input placeholder="请输入第三方订单号..." [formControlName]="'sourceOrderNo'"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">订单状态</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="orderStatus" nzPlaceHolder="请选择订单状态">
<nz-option nzLabel="待支付" nzValue="1"></nz-option>
<nz-option nzLabel="已支付" nzValue="2"></nz-option>
<nz-option nzLabel="已完成" nzValue="3"></nz-option>
<nz-option nzLabel="已退款" nzValue="4"></nz-option>
<nz-option nzLabel="已取消" nzValue="5"></nz-option>
<nz-option nzLabel="退款中" nzValue="6"></nz-option>
<nz-option nzLabel="退款失败" nzValue="7"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">回调状态</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="callbackStatus" nzPlaceHolder="请选择回调状态">
<nz-option nzLabel="未回调" nzValue="100"></nz-option>
<nz-option nzLabel="已回调" nzValue="101"></nz-option>
<nz-option nzLabel="回调未响应" nzValue="102"></nz-option>
<nz-option nzLabel="预备回调" nzValue="103"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">支付时间</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-range-picker [nzShowTime]="{ nzFormat: 'HH:mm' }"
formControlName="payTime"></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">创建时间</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-range-picker [nzShowTime]="{ nzFormat: 'HH:mm' }"
formControlName="createTime"></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div nz-row>
<div nz-col nzSpan="24" class="search-button">
<button nz-button nzType="primary"><i nz-icon nzType="search" nzTheme="outline"></i>搜索</button>
<button nz-button nzType="default" (click)="resetForm()"><i nz-icon nzType="reload"
nzTheme="outline"></i>重置
</button>
</div>
</div>
</form>
</div>
<div class="inner-content">
<span>共计 {{total}} 条数据</span>
<nz-table
class="table"
#ajaxTable
nzBordered
nzShowSizeChanger
[nzFrontPagination]="false"
[nzData]="requestData"
[nzLoading]="loading"
[nzTotal]="total"
[(nzPageIndex)]="pageNum"
[(nzPageSize)]="pageSize"
[nzScroll]="{ x: '1200px' }"
(nzPageIndexChange)="getRequest(false , searchForm.value)"
(nzPageSizeChange)="getRequest(false , searchForm.value)">
<thead nzSingleSort>
<tr>
<th nzWidth="80px">编号</th>
<th nzWidth="160px">平台订单号</th>
<th nzWidth="160px">第三方订单号</th>
<th nzWidth="110px">订单金额</th>
<th nzWidth="110px">下单金额</th>
<th nzWidth="140px">生成时间</th>
<th nzWidth="140px">支付时间</th>
<th nzWidth="90px" nzRight>订单状态</th>
<th nzWidth="100px" nzRight>支付状态</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i + 1}}</td>
<td>{{data.orderNo}}</td>
<td>{{data.sourceOrderNo}}</td>
<td>¥{{data.orderPrice}}</td>
<td>¥{{data.payPrice}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight>{{data.callbackStatus | callbackStatus}}</td>
<td nzRight>{{data.orderStatus | payCouponStatus}}</td>
</tbody>
</nz-table>
</div>

@ -0,0 +1,5 @@
.table-td-operation {
a {
margin-left: 8px;
}
}

@ -0,0 +1,92 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../../environments/environment';
import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms';
import {RechargeService} from '../../../../services/recharge.service';
import {DiscountService} from '../../../../services/discount.service';
import {NzMessageService, NzModalService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
import {CouponService} from '../../../../services/coupon.service';
import {IconService} from '../../../../services/icon.service';
import {ApiMerchantsService} from '../../../../services/api-merchants.service';
@Component({
selector: 'app-list',
templateUrl: './list.component.html',
styleUrls: ['./list.component.scss']
})
export class ListComponent implements OnInit {
FILE_URL = environment.imageUrl;
WEB_SERVE_URL = environment.baseUrl;
searchForm: FormGroup; // 搜索框
validateForm: FormGroup; // 添加框
requestData = []; // 列表数据
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
isVisible = false;
constructor(
private form: FormBuilder,
private recharge: RechargeService,
private discount: DiscountService,
private apiMerchant: ApiMerchantsService,
private modal: NzModalService,
private coupon: CouponService,
private iconService: IconService,
private message: NzMessageService,
) {
}
ngOnInit(): void {
this.init();
}
public init(): void {
this.searchForm = this.form.group({
orderStatus: [null], // 订单状态
orderNo: [null], // 订单号
productType: [1], // 产品类型
sourceOrderNo: [null], // 第三方订单号
rechargeStatus: [null], // 充值状态
callbackStatus: [null], // 回调状态
payTime: [null], // 支付时间
createTime: [null], // 创建时间
});
this.getRequest(true, this.searchForm.value);
}
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) {
whereObject['payTimeS'] = whereObject['payTime'][0].getTime();
whereObject['payTimeE'] = whereObject['payTime'][1].getTime();
}
if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) {
whereObject['createTimeS'] = whereObject['createTime'][0].getTime();
whereObject['createTimeE'] = whereObject['createTime'][1].getTime();
}
this.loading = false;
if (reset) {
this.pageNum = 1;
}
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.apiMerchant.getApiThirdOrderByList(whereObject, data => {
if (data['return_code'] === '000000') {
this.requestData = data['return_data'].list;
this.total = data['return_data'].total;
} else {
this.message.error(data['return_msg']);
}
});
}
// 重置
public resetForm(): void {
this.searchForm.reset();
}
}

@ -0,0 +1,127 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<!--条件搜索-->
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)">
<div nz-row>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">平台订单号</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input placeholder="请输入平台订单号..." [formControlName]="'orderNo'"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">第三方订单号</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input placeholder="请输入第三方订单号..." [formControlName]="'sourceOrderNo'"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">订单状态</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="orderStatus" nzPlaceHolder="请选择订单状态">
<nz-option nzLabel="待支付" nzValue="1"></nz-option>
<nz-option nzLabel="已支付" nzValue="2"></nz-option>
<nz-option nzLabel="已完成" nzValue="3"></nz-option>
<nz-option nzLabel="已退款" nzValue="4"></nz-option>
<nz-option nzLabel="已取消" nzValue="5"></nz-option>
<nz-option nzLabel="退款中" nzValue="6"></nz-option>
<nz-option nzLabel="退款失败" nzValue="7"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">回调状态</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="callbackStatus" nzPlaceHolder="请选择回调状态">
<nz-option nzLabel="未回调" nzValue="100"></nz-option>
<nz-option nzLabel="已回调" nzValue="101"></nz-option>
<nz-option nzLabel="回调未响应" nzValue="102"></nz-option>
<nz-option nzLabel="预备回调" nzValue="103"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">支付时间</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-range-picker [nzShowTime]="{ nzFormat: 'HH:mm' }"
formControlName="payTime"></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">创建时间</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-range-picker [nzShowTime]="{ nzFormat: 'HH:mm' }"
formControlName="createTime"></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div nz-row>
<div nz-col nzSpan="24" class="search-button">
<button nz-button nzType="primary"><i nz-icon nzType="search" nzTheme="outline"></i>搜索</button>
<button nz-button nzType="default" (click)="resetForm()"><i nz-icon nzType="reload"
nzTheme="outline"></i>重置
</button>
</div>
</div>
</form>
</div>
<div class="inner-content">
<span>共计 {{total}} 条数据</span>
<nz-table
class="table"
#ajaxTable
nzBordered
nzShowSizeChanger
[nzFrontPagination]="false"
[nzData]="requestData"
[nzLoading]="loading"
[nzTotal]="total"
[(nzPageIndex)]="pageNum"
[(nzPageSize)]="pageSize"
[nzScroll]="{ x: '1200px' }"
(nzPageIndexChange)="getRequest(false , searchForm.value)"
(nzPageSizeChange)="getRequest(false , searchForm.value)">
<thead nzSingleSort>
<tr>
<th nzWidth="80px">编号</th>
<th nzWidth="160px">平台订单号</th>
<th nzWidth="160px">第三方订单号</th>
<th nzWidth="110px">订单金额</th>
<th nzWidth="110px">下单金额</th>
<th nzWidth="140px">生成时间</th>
<th nzWidth="140px">支付时间</th>
<th nzWidth="90px" nzRight>订单状态</th>
<th nzWidth="100px" nzRight>支付状态</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i + 1}}</td>
<td>{{data.orderNo}}</td>
<td>{{data.sourceOrderNo}}</td>
<td>¥{{data.orderPrice}}</td>
<td>¥{{data.payPrice}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight>{{data.callbackStatus | callbackStatus}}</td>
<td nzRight>{{data.orderStatus | payCouponStatus}}</td>
</tbody>
</nz-table>
</div>

@ -0,0 +1,5 @@
.table-td-operation {
a {
margin-left: 8px;
}
}

@ -0,0 +1,93 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms';
import {RechargeService} from '../../../services/recharge.service';
import {DiscountService} from '../../../services/discount.service';
import {ApiMerchantsService} from '../../../services/api-merchants.service';
import {NzMessageService, NzModalService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
import {CouponService} from '../../../services/coupon.service';
import {IconService} from '../../../services/icon.service';
@Component({
selector: 'app-vip-top-up-order',
templateUrl: './vip-top-up-order.component.html',
styleUrls: ['./vip-top-up-order.component.scss']
})
export class VipTopUpOrderComponent implements OnInit {
FILE_URL = environment.imageUrl;
WEB_SERVE_URL = environment.baseUrl;
searchForm: FormGroup; // 搜索框
validateForm: FormGroup; // 添加框
requestData = []; // 列表数据
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
isVisible = false;
constructor(
private form: FormBuilder,
private recharge: RechargeService,
private discount: DiscountService,
private apiMerchant: ApiMerchantsService,
private modal: NzModalService,
private coupon: CouponService,
private iconService: IconService,
private message: NzMessageService,
) {
}
ngOnInit(): void {
this.init();
}
public init(): void {
this.searchForm = this.form.group({
orderStatus: [null], // 订单状态
orderNo: [null], // 订单号
productType: [3], // 产品类型
sourceOrderNo: [null], // 第三方订单号
rechargeStatus: [null], // 充值状态
callbackStatus: [null], // 回调状态
payTime: [null], // 支付时间
createTime: [null], // 创建时间
});
this.getRequest(true, this.searchForm.value);
}
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) {
whereObject['payTimeS'] = whereObject['payTime'][0].getTime();
whereObject['payTimeE'] = whereObject['payTime'][1].getTime();
}
if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) {
whereObject['createTimeS'] = whereObject['createTime'][0].getTime();
whereObject['createTimeE'] = whereObject['createTime'][1].getTime();
}
this.loading = false;
if (reset) {
this.pageNum = 1;
}
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.apiMerchant.getApiThirdOrderByList(whereObject, data => {
if (data['return_code'] === '000000') {
this.requestData = data['return_data'].list;
this.total = data['return_data'].total;
} else {
this.message.error(data['return_msg']);
}
});
}
// 重置
public resetForm(): void {
this.searchForm.reset();
}
}

@ -0,0 +1,21 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'callbackStatus'
})
export class CallbackStatusPipe implements PipeTransform {
transform(value: number): string {
switch (value) {
case 100:
return '未回调';
case 101:
return '已回调';
case 102:
return '回调未响应';
case 103:
return '预备回调';
}
}
}

@ -0,0 +1,26 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'payCouponStatus'
})
export class PayCouponStatusPipe 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 '拒绝退款';
}
}
}
Loading…
Cancel
Save