From 775e6c616f3bb3dbe561939efaf8e5d53a9068f6 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Thu, 5 Jan 2023 14:38:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=90=86=E5=95=86?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api-order/api-order-routing.module.ts | 10 +- src/app/admin/api-order/api-order.module.ts | 5 +- .../phone-order/phone-order.component.html | 160 +++++++++++++++++- .../phone-order/phone-order.component.scss | 5 + .../phone-order/phone-order.component.spec.ts | 25 --- .../phone-order/phone-order.component.ts | 87 +++++++++- .../order-list/order-list.component.ts | 5 +- src/app/app-common.module.ts | 17 +- src/app/pipes/index.ts | 2 + src/app/services/api-merchants.service.ts | 12 ++ src/app/services/index.service.ts | 3 - src/app/services/recharge.service.ts | 12 ++ src/environments/environment.ts | 8 +- 13 files changed, 303 insertions(+), 48 deletions(-) delete mode 100644 src/app/admin/api-order/phone-order/phone-order.component.spec.ts diff --git a/src/app/admin/api-order/api-order-routing.module.ts b/src/app/admin/api-order/api-order-routing.module.ts index 4f5c778..379f183 100644 --- a/src/app/admin/api-order/api-order-routing.module.ts +++ b/src/app/admin/api-order/api-order-routing.module.ts @@ -1,11 +1,15 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; 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 = [ - { 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({ diff --git a/src/app/admin/api-order/api-order.module.ts b/src/app/admin/api-order/api-order.module.ts index 8b63015..176403a 100644 --- a/src/app/admin/api-order/api-order.module.ts +++ b/src/app/admin/api-order/api-order.module.ts @@ -13,11 +13,14 @@ import {IndexRoutingModule} from '../index/index-routing.module'; import {AppCommonModule} from '../../app-common.module'; import {NzSpaceModule} from '_ng-zorro-antd@9.3.0@ng-zorro-antd/space'; 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({ - declarations: [PhoneOrderComponent], + declarations: [PhoneOrderComponent, ListComponent, KfcOrderComponent, VipTopUpOrderComponent], imports: [ CommonModule, ApiOrderRoutingModule, diff --git a/src/app/admin/api-order/phone-order/phone-order.component.html b/src/app/admin/api-order/phone-order/phone-order.component.html index 43a7f6a..0637e86 100644 --- a/src/app/admin/api-order/phone-order/phone-order.component.html +++ b/src/app/admin/api-order/phone-order/phone-order.component.html @@ -1 +1,159 @@ -

phone-order works!

+ + + + + +
+
+
+
+ + 充值号码 + + + + +
+
+ + 平台订单号 + + + + +
+
+ + 第三方订单号 + + + + +
+
+ + 运营商 + + + + +
+
+ + 支付状态 + + + + + + + + + + +
+
+ + 充值状态 + + + + + + + + + +
+
+ + 回调状态 + + + + + + + + + +
+
+ + 支付时间 + + + + +
+
+ + 创建时间 + + + + +
+
+
+
+ + +
+
+
+
+ +
+ 共计 {{total}} 条数据 + + + + 编号 + 平台订单号 + 第三方订单号 + 运营商 + 充值号码 + 充值金额 + 下单金额 + 生成时间 + 支付时间 + 支付方式 + 充值状态 + 支付状态 + + + + + {{i + 1}} + {{data.orderNo}} + {{data.sourceOrderNo}} + {{data.operators}} + {{data.rechargeNumber}} + ¥{{data.rechargePrice}} + ¥{{data.payPrice}} + {{data.createTimed | date: 'yyyy-MM-dd HH:mm:ss'}} + {{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}} + {{data.callbackStatus | callbackStatus}} + {{data.rechargeStatus | rechargeStatus}} + {{data.payStatus | payStatus}} + + +
diff --git a/src/app/admin/api-order/phone-order/phone-order.component.scss b/src/app/admin/api-order/phone-order/phone-order.component.scss index e69de29..b68da73 100644 --- a/src/app/admin/api-order/phone-order/phone-order.component.scss +++ b/src/app/admin/api-order/phone-order/phone-order.component.scss @@ -0,0 +1,5 @@ +.table-td-operation { + a { + margin-left: 8px; + } +} diff --git a/src/app/admin/api-order/phone-order/phone-order.component.spec.ts b/src/app/admin/api-order/phone-order/phone-order.component.spec.ts deleted file mode 100644 index 493b5fd..0000000 --- a/src/app/admin/api-order/phone-order/phone-order.component.spec.ts +++ /dev/null @@ -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; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ PhoneOrderComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(PhoneOrderComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/admin/api-order/phone-order/phone-order.component.ts b/src/app/admin/api-order/phone-order/phone-order.component.ts index a959e3f..88249e3 100644 --- a/src/app/admin/api-order/phone-order/phone-order.component.ts +++ b/src/app/admin/api-order/phone-order/phone-order.component.ts @@ -1,4 +1,11 @@ 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({ selector: 'app-phone-order', @@ -7,9 +14,83 @@ import { Component, OnInit } from '@angular/core'; }) 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 { + 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(); + } + + - ngOnInit(): void { - } } diff --git a/src/app/admin/recharge-order/order-list/order-list.component.ts b/src/app/admin/recharge-order/order-list/order-list.component.ts index c0dbef2..5d098b5 100644 --- a/src/app/admin/recharge-order/order-list/order-list.component.ts +++ b/src/app/admin/recharge-order/order-list/order-list.component.ts @@ -5,14 +5,11 @@ import {DiscountService} from '../../../services/discount.service'; import {CouponService} from '../../../services/coupon.service'; import {IconService} from '../../../services/icon.service'; -import {CommonsService} from '../../../services/commons.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 {Router} from '@angular/router'; import {ADMIN_INFO_OBJECT} from "../../../services/local-storage.namespace"; import {CompanyService} from "../../../services/company.service"; -import {MerchantService} from "../../../services/merchant.service"; import {LocalStorageService} from "../../../services/local-storage.service"; @Component({ diff --git a/src/app/app-common.module.ts b/src/app/app-common.module.ts index cdfe23e..5fecb5a 100644 --- a/src/app/app-common.module.ts +++ b/src/app/app-common.module.ts @@ -46,9 +46,14 @@ import { RechargePlatformPipe, PriceStatusPipe, GasStaffStatusPipe, - PayStatusPipe, ChlidRechargeStatusPipe, - SourceTypePipe, GasClassGroupTaskStatusPipe, GasOrderStatusPipe, PlatformPipe, ProductConfigPipe, OilCardStatusPipe + SourceTypePipe, + GasClassGroupTaskStatusPipe, + GasOrderStatusPipe, + PlatformPipe, + ProductConfigPipe, + OilCardStatusPipe, + PayStatusPipe, CallbackStatusPipe, PayCouponStatusPipe } from './pipes'; import {OilTypePipe} from './pipes/store/oil-type.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 { MsgTypePipe } from './pipes/msg/msg-type.pipe'; + const PIPES = [ TimesPipe, TextareaPipe, @@ -101,7 +107,6 @@ const PIPES = [ OilPriceTaskStatusPipe, OilPriceTaskExecutionTypePipe, OilPriceTaskPriceTypePipe, - PayStatusPipe, ChlidRechargeStatusPipe, SourceTypePipe, GasClassGroupTaskStatusPipe, @@ -110,7 +115,10 @@ const PIPES = [ IntegralTypePipe, IntegralProductPipe, MsgTypePipe, - ProductConfigPipe + ProductConfigPipe, + CallbackStatusPipe, + PayStatusPipe, + PayCouponStatusPipe, ]; @@ -124,6 +132,7 @@ const PIPES = [ ], declarations: [ ...PIPES, + ], exports: [ diff --git a/src/app/pipes/index.ts b/src/app/pipes/index.ts index beea301..9b76f17 100644 --- a/src/app/pipes/index.ts +++ b/src/app/pipes/index.ts @@ -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 './recharge-pipe/platform.pipe'; export * from './index/product-config.pipe'; +export * from './apiMerchant/callback-status.pipe'; +export * from './order/pay-coupon-status.pipe'; diff --git a/src/app/services/api-merchants.service.ts b/src/app/services/api-merchants.service.ts index d276fa6..2cf456e 100644 --- a/src/app/services/api-merchants.service.ts +++ b/src/app/services/api-merchants.service.ts @@ -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); + }); + } } diff --git a/src/app/services/index.service.ts b/src/app/services/index.service.ts index 02b1817..f70d9a3 100644 --- a/src/app/services/index.service.ts +++ b/src/app/services/index.service.ts @@ -216,7 +216,4 @@ export class IndexService { callBack(data); }); } - - - } diff --git a/src/app/services/recharge.service.ts b/src/app/services/recharge.service.ts index b93adca..fd7cf05 100644 --- a/src/app/services/recharge.service.ts +++ b/src/app/services/recharge.service.ts @@ -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查询详情 diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 21ad46f..a2d6d6f 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -4,10 +4,10 @@ export const environment = { production: false, - // baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) - // imageUrl: 'http://localhost:9302/filesystem/', - baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) - imageUrl: 'https://hsgcs.dctpay.com/filesystem/', + baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) + imageUrl: 'http://localhost:9302/filesystem/', + // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) + // imageUrl: 'https://hsgcs.dctpay.com/filesystem/', key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=', inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=', };