提交代理商订单页面

pull/1/head
袁野 2 years ago
parent 50b7e4a97e
commit 775e6c616f
  1. 10
      src/app/admin/api-order/api-order-routing.module.ts
  2. 5
      src/app/admin/api-order/api-order.module.ts
  3. 160
      src/app/admin/api-order/phone-order/phone-order.component.html
  4. 5
      src/app/admin/api-order/phone-order/phone-order.component.scss
  5. 25
      src/app/admin/api-order/phone-order/phone-order.component.spec.ts
  6. 83
      src/app/admin/api-order/phone-order/phone-order.component.ts
  7. 5
      src/app/admin/recharge-order/order-list/order-list.component.ts
  8. 17
      src/app/app-common.module.ts
  9. 2
      src/app/pipes/index.ts
  10. 12
      src/app/services/api-merchants.service.ts
  11. 3
      src/app/services/index.service.ts
  12. 12
      src/app/services/recharge.service.ts
  13. 8
      src/environments/environment.ts

@ -1,11 +1,15 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router'; import { Routes, RouterModule } from '@angular/router';
import {PhoneOrderComponent} from './phone-order/phone-order.component'; import {PhoneOrderComponent} from './phone-order/phone-order.component';
import {VipTopUpOrderComponent} from './vip-top-up-order/vip-top-up-order.component';
import {KfcOrderComponent} from './kfc-order/kfc-order.component';
import {ListComponent} from './starbucks-order/list/list.component';
const routes: Routes = [ const routes: Routes = [
{ path: 'phone-order', component: PhoneOrderComponent } { path: 'phone-order', component: PhoneOrderComponent },
{ path: 'vip-top-up-order', component: VipTopUpOrderComponent },
{ path: 'kfc-order', component: KfcOrderComponent },
{ path: 'starbuck-order', component: ListComponent }
]; ];
@NgModule({ @NgModule({

@ -13,11 +13,14 @@ import {IndexRoutingModule} from '../index/index-routing.module';
import {AppCommonModule} from '../../app-common.module'; import {AppCommonModule} from '../../app-common.module';
import {NzSpaceModule} from '_ng-zorro-antd@9.3.0@ng-zorro-antd/space'; import {NzSpaceModule} from '_ng-zorro-antd@9.3.0@ng-zorro-antd/space';
import {ApiOrderRoutingModule} from './api-order-routing.module'; import {ApiOrderRoutingModule} from './api-order-routing.module';
import { ListComponent } from './starbucks-order/list/list.component';
import { KfcOrderComponent } from './kfc-order/kfc-order.component';
import { VipTopUpOrderComponent } from './vip-top-up-order/vip-top-up-order.component';
@NgModule({ @NgModule({
declarations: [PhoneOrderComponent], declarations: [PhoneOrderComponent, ListComponent, KfcOrderComponent, VipTopUpOrderComponent],
imports: [ imports: [
CommonModule, CommonModule,
ApiOrderRoutingModule, ApiOrderRoutingModule,

@ -1 +1,159 @@
<p>phone-order works!</p> <!-- 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]="'rechargeNumber'"/>
</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]="'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">
<input nz-input placeholder="请输入运营商..." [formControlName]="'operators'"/>
</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="payStatus" nzPlaceHolder="请选择订单状态">
<nz-option nzLabel="待支付" nzValue="101"></nz-option>
<nz-option nzLabel="已支付" nzValue="102"></nz-option>
<nz-option nzLabel="已完成" nzValue="100"></nz-option>
<nz-option nzLabel="已取消" nzValue="104"></nz-option>
<nz-option nzLabel="已退款" nzValue="105"></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="rechargeStatus" nzPlaceHolder="请选择充值状态">
<nz-option nzLabel="充值中" nzValue="201"></nz-option>
<nz-option nzLabel="充值成功" nzValue="202"></nz-option>
<nz-option nzLabel="充值失败" nzValue="203"></nz-option>
<nz-option nzLabel="未充值" nzValue="204"></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="100px">运营商</th>
<th nzWidth="140px">充值号码</th>
<th nzWidth="110px">充值金额</th>
<th nzWidth="110px">下单金额</th>
<th nzWidth="140px">生成时间</th>
<th nzWidth="140px">支付时间</th>
<th nzWidth="100px" nzRight>支付方式</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.operators}}</td>
<td>{{data.rechargeNumber}}</td>
<td>¥{{data.rechargePrice}}</td>
<td>¥{{data.payPrice}}</td>
<td>{{data.createTimed | 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.rechargeStatus | rechargeStatus}}</td>
<td nzRight>{{data.payStatus | payStatus}}</td>
</tbody>
</nz-table>
</div>

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

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

@ -1,4 +1,11 @@
import { Component, OnInit } from '@angular/core'; 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';
@Component({ @Component({
selector: 'app-phone-order', selector: 'app-phone-order',
@ -7,9 +14,83 @@ import { Component, OnInit } from '@angular/core';
}) })
export class PhoneOrderComponent implements OnInit { export class PhoneOrderComponent implements OnInit {
constructor() { } 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 modal: NzModalService,
private coupon: CouponService,
private iconService: IconService,
private message: NzMessageService,
) {
}
ngOnInit(): void { ngOnInit(): void {
this.init();
}
public init(): void {
this.searchForm = this.form.group({
rechargeNumber: [null], // 充值号码
orderNo: [null], // 订单号
sourceOrderNo: [null], // 第三方订单号
operators: [null], // 运营商
payStatus: [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.recharge.getApiRechargePhoneByList(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();
}
} }

@ -5,14 +5,11 @@ import {DiscountService} from '../../../services/discount.service';
import {CouponService} from '../../../services/coupon.service'; import {CouponService} from '../../../services/coupon.service';
import {IconService} from '../../../services/icon.service'; import {IconService} from '../../../services/icon.service';
import {CommonsService} from '../../../services/commons.service';
import {RechargeService} from '../../../services/recharge.service'; import {RechargeService} from '../../../services/recharge.service';
import {NzMessageService, NzModalService, NzNotificationService, NzUploadChangeParam} from 'ng-zorro-antd'; import {NzMessageService, NzModalService, NzUploadChangeParam} from 'ng-zorro-antd';
import {FormBuilder, FormGroup, Validators} from '@angular/forms'; import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {Router} from '@angular/router';
import {ADMIN_INFO_OBJECT} from "../../../services/local-storage.namespace"; import {ADMIN_INFO_OBJECT} from "../../../services/local-storage.namespace";
import {CompanyService} from "../../../services/company.service"; import {CompanyService} from "../../../services/company.service";
import {MerchantService} from "../../../services/merchant.service";
import {LocalStorageService} from "../../../services/local-storage.service"; import {LocalStorageService} from "../../../services/local-storage.service";
@Component({ @Component({

@ -46,9 +46,14 @@ import {
RechargePlatformPipe, RechargePlatformPipe,
PriceStatusPipe, PriceStatusPipe,
GasStaffStatusPipe, GasStaffStatusPipe,
PayStatusPipe,
ChlidRechargeStatusPipe, ChlidRechargeStatusPipe,
SourceTypePipe, GasClassGroupTaskStatusPipe, GasOrderStatusPipe, PlatformPipe, ProductConfigPipe, OilCardStatusPipe SourceTypePipe,
GasClassGroupTaskStatusPipe,
GasOrderStatusPipe,
PlatformPipe,
ProductConfigPipe,
OilCardStatusPipe,
PayStatusPipe, CallbackStatusPipe, PayCouponStatusPipe
} from './pipes'; } from './pipes';
import {OilTypePipe} from './pipes/store/oil-type.pipe'; import {OilTypePipe} from './pipes/store/oil-type.pipe';
import {OilPriceTaskStatusPipe} from './pipes/gas-oil-price/oil-price-task-status.pipe'; import {OilPriceTaskStatusPipe} from './pipes/gas-oil-price/oil-price-task-status.pipe';
@ -58,6 +63,7 @@ import { IntegralTypePipe } from './pipes/integral/integral-type.pipe';
import { IntegralProductPipe } from './pipes/integral/integral-product.pipe'; import { IntegralProductPipe } from './pipes/integral/integral-product.pipe';
import { MsgTypePipe } from './pipes/msg/msg-type.pipe'; import { MsgTypePipe } from './pipes/msg/msg-type.pipe';
const PIPES = [ const PIPES = [
TimesPipe, TimesPipe,
TextareaPipe, TextareaPipe,
@ -101,7 +107,6 @@ const PIPES = [
OilPriceTaskStatusPipe, OilPriceTaskStatusPipe,
OilPriceTaskExecutionTypePipe, OilPriceTaskExecutionTypePipe,
OilPriceTaskPriceTypePipe, OilPriceTaskPriceTypePipe,
PayStatusPipe,
ChlidRechargeStatusPipe, ChlidRechargeStatusPipe,
SourceTypePipe, SourceTypePipe,
GasClassGroupTaskStatusPipe, GasClassGroupTaskStatusPipe,
@ -110,7 +115,10 @@ const PIPES = [
IntegralTypePipe, IntegralTypePipe,
IntegralProductPipe, IntegralProductPipe,
MsgTypePipe, MsgTypePipe,
ProductConfigPipe ProductConfigPipe,
CallbackStatusPipe,
PayStatusPipe,
PayCouponStatusPipe,
]; ];
@ -124,6 +132,7 @@ const PIPES = [
], ],
declarations: [ declarations: [
...PIPES, ...PIPES,
], ],
exports: [ exports: [

@ -42,3 +42,5 @@ export * from './gas-class-group-task/gas-class-group-task-status.pipe';
export * from './gas-order/gas-order-status.pipe'; export * from './gas-order/gas-order-status.pipe';
export * from './recharge-pipe/platform.pipe'; export * from './recharge-pipe/platform.pipe';
export * from './index/product-config.pipe'; export * from './index/product-config.pipe';
export * from './apiMerchant/callback-status.pipe';
export * from './order/pay-coupon-status.pipe';

@ -222,4 +222,16 @@ export class ApiMerchantsService {
}); });
} }
/**
* @Author Sum1Dream
* @methodName getApiThirdOrderByList
* @Description // 查询API第三方订单列表
* @Date 09:59 2023/1/5
* @Param params: object, callBack
*/
public getApiThirdOrderByList(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'apiMerchants/getApiThirdOrderByList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
} }

@ -216,7 +216,4 @@ export class IndexService {
callBack(data); callBack(data);
}); });
} }
} }

@ -101,6 +101,18 @@ export class RechargeService {
}); });
} }
/**
* API充值话费订单
*
* @param paramsObject
* @param callBack
*/
public getApiRechargePhoneByList(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'apiMerchants/getApiRechargePhoneByList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/** /**
* id查询详情 * id查询详情

@ -4,10 +4,10 @@
export const environment = { export const environment = {
production: false, production: false,
// baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'http://localhost:9302/filesystem/', imageUrl: 'http://localhost:9302/filesystem/',
baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'https://hsgcs.dctpay.com/filesystem/', // imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=', key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=',
inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=', inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=',
}; };

Loading…
Cancel
Save