- 编号 |
- 商户名称 |
+ 编号 |
+ 商户名称 |
联系人 |
- 电话 |
- 商户号 |
- 商户KEY |
- 操作人员 |
+ 电话 |
+ 商户号 |
+ 商户KEY |
+ 操作人员 |
创建时间 |
帐户余额 |
- 状态 |
+ 状态 |
操作 |
@@ -100,7 +101,7 @@
{{data.mchId }} |
{{data.apiKey }} |
{{data.operatorName }} |
- {{data.createTime | date: 'yyyy-MM-dd HH:mm'}} |
+ {{data.createTime | date: 'yyyy-MM-dd'}} |
¥{{data.amounts}} |
{{data.status== 100? '正常':'禁用'}} |
@@ -109,8 +110,10 @@
更多操作
@@ -137,7 +140,7 @@
商户电话
-
+
@@ -178,7 +181,7 @@
-
+
类型 |
@@ -244,7 +247,7 @@
-
+
编号 |
@@ -293,3 +296,22 @@
+
+
+
+
+ IP地址
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/admin/api-merchants/list/list.component.ts b/src/app/admin/api-merchants/list/list.component.ts
index c484ffb..d758b2b 100644
--- a/src/app/admin/api-merchants/list/list.component.ts
+++ b/src/app/admin/api-merchants/list/list.component.ts
@@ -8,7 +8,8 @@ import {ApiProductService} from '../../../services/api-product.service';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {NzMessageService} from 'ng-zorro-antd';
import {Router} from '@angular/router';
-
+import {HttpClient} from '@angular/common/http';
+import { map, filter, scan , take } from 'rxjs/operators';
@Component({
selector: 'app-list',
@@ -36,9 +37,9 @@ export class ListComponent implements OnInit {
id: number;
edit = false;
payPrice;
- isVisibleGoods = false;
+ isVisibleIpAddress = false;
realPrice = 0;
-
+ mchId: string;
rechargeModal = false;
rechargeForm: FormGroup;
configValidateForm: FormGroup;
@@ -55,6 +56,10 @@ export class ListComponent implements OnInit {
productArray = [];
productConfigArray = [];
discount;
+ ipAddress: string;
+ isSpinning = false;
+ isVisibleConfig = false;
+ checkOptions = [];
formatterPercent = (value: number): string => `${value == null ? 0 : value} %`;
parserPercent = (value: string): string => value.replace(' %', '');
@@ -65,6 +70,7 @@ export class ListComponent implements OnInit {
private coupon: CouponService,
private iconService: IconService,
private message: NzMessageService,
+ private http: HttpClient,
private router: Router,
private common: CommonsService
) {
@@ -85,6 +91,14 @@ export class ListComponent implements OnInit {
this.common.getDictionary('RECHARGE_PLATFORM ', data => {
this.platformArray = data['return_data'];
});
+ // 获取可用接口数据
+ this.common.getDictionary('API_PRODUCT_CONFIG ', data => {
+ for (const i of data['return_data']) {
+ this.checkOptions.push({
+ label: i['codeName'], value: i['codeValue']
+ });
+ }
+ });
}
public init(): void {
@@ -99,32 +113,41 @@ export class ListComponent implements OnInit {
phone: [null],
status: [null],
});
- this.validateForm = this.form.group({
- merchantName: [null, [Validators.required]],
- userName: [null, [Validators.required]],
- phone: [null, [Validators.required]],
- });
+ this.initApiMerchantsPostFrom(false);
this.configValidateForm = this.form.group({
productIds: [null, [Validators.required]],
discount: [null, [Validators.required]],
});
this.getRequest(true, this.searchForm.value);
- this.apiMerchants.getListApiMerchantByAll(data => {
+ this.apiProduct.getAvailableApiProductByList(data => {
if (data['return_code'] === '000000') {
- this.merchantArray = data['return_data'];
+ this.productArray = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
- this.apiProduct.getAvailableApiProductByList(data => {
+
+ }
+
+ // 出现可用商户列表
+ public getListApiMerchantByAll(): void {
+ this.apiMerchants.getListApiMerchantByAll(data => {
if (data['return_code'] === '000000') {
- this.productArray = data['return_data'];
+ this.merchantArray = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
+ }
+ // 初始化商户提交报表
+ public initApiMerchantsPostFrom(edit: boolean): void {
+ this.validateForm = this.form.group({
+ merchantName: [null, [Validators.required]],
+ userName: [null, [Validators.required]],
+ phone: [{ value: null , disabled: edit}, [Validators.required]],
+ });
}
// 查询列表
@@ -156,11 +179,13 @@ export class ListComponent implements OnInit {
if (id != null) {
this.id = id;
this.edit = true;
+ this.initApiMerchantsPostFrom(true);
this.apiMerchants.findById(id, data => {
this.validateForm.patchValue(data['return_data']);
this.isVisible = true;
});
} else {
+ this.initApiMerchantsPostFrom(false);
this.validateForm.reset();
this.isVisible = true;
this.edit = false;
@@ -284,6 +309,7 @@ export class ListComponent implements OnInit {
* 展示充值模态框
*/
showRechargeModal() {
+ this.getListApiMerchantByAll();
this.rechargeModal = true;
}
@@ -468,4 +494,79 @@ export class ListComponent implements OnInit {
this.configValidateForm.reset();
}
+
+ // 打开配置ip地址
+ public configIp(mchId: string): void {
+ this.mchId = mchId;
+ this.apiMerchants.findByMchId( mchId , data => {
+ if (data['return_code'] === '000000') {
+ this.ipAddress = data['return_data']['ipAddress'];
+ }
+ });
+ this.isVisibleIpAddress = true;
+ }
+
+ // 提交配置
+ public handleOkConfigIp(): void {
+ this.isSpinning = true;
+ this.apiMerchants.editApiIpAddress({
+ mchId: this.mchId,
+ ipAddress: this.ipAddress
+ } , data => {
+ if (data['return_code'] === '000000') {
+ this.isSpinning = false;
+ this.message.success('配置成功');
+ this.isVisibleIpAddress = false;
+ } else {
+ this.message.error(data['return_msg']);
+ }
+ });
+ }
+
+ // 打开配置产品弹框
+ public configApiProduct(mchId: string): void {
+ this.mchId = mchId;
+ this.apiMerchants.getSecConfigList(mchId , data => {
+ console.log(data);
+ const returnData = data['return_data'];
+ if (data['return_data'].length > 0) {
+ for (const i of this.checkOptions) {
+ if (returnData.filter(item => item['codeType'] === i['value']).length > 0) {
+ i['checked'] = true;
+ } else {
+ i['checked'] = false;
+ }
+ }
+ }
+ this.isVisibleConfig = true;
+ });
+
+
+ }
+
+ // 配置产品
+ public handleOkConfigProduct(): void {
+ const data = [];
+ for (const i of this.checkOptions) {
+ if (i['checked']) {
+ data.push(i['value']);
+ }
+ }
+ console.log(data);
+ const postData = {
+ mchId: this.mchId,
+ configProduct: data.join(',')
+ };
+ this.isSpinning = true;
+ this.apiMerchants.configMerchant(postData , res => {
+ if (res['return_code'] === '000000') {
+ this.isSpinning = false;
+ this.message.success('配置成功');
+ this.isVisibleConfig = false;
+ } else {
+ this.message.error(res['return_msg']);
+ }
+ });
+ }
+
}
diff --git a/src/app/admin/api-order/api-order-routing.module.ts b/src/app/admin/api-order/api-order-routing.module.ts
new file mode 100644
index 0000000..4f5c778
--- /dev/null
+++ b/src/app/admin/api-order/api-order-routing.module.ts
@@ -0,0 +1,15 @@
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import {PhoneOrderComponent} from './phone-order/phone-order.component';
+
+
+
+const routes: Routes = [
+ { path: 'phone-order', component: PhoneOrderComponent }
+];
+
+@NgModule({
+ imports: [RouterModule.forChild(routes)],
+ exports: [RouterModule]
+})
+export class ApiOrderRoutingModule { }
diff --git a/src/app/admin/api-order/api-order.module.ts b/src/app/admin/api-order/api-order.module.ts
new file mode 100644
index 0000000..8b63015
--- /dev/null
+++ b/src/app/admin/api-order/api-order.module.ts
@@ -0,0 +1,37 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { PhoneOrderComponent } from './phone-order/phone-order.component';
+import {SystemRoutingModule} from '../system/system-routing.module';
+import {NgZorroAntdModule} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
+import {FormsModule, ReactiveFormsModule} from '_@angular_forms@9.0.7@@angular/forms';
+import {NgxNeditorModule} from '_@notadd_ngx-neditor@1.0.2@@notadd/ngx-neditor';
+import {RichtextModule} from '../../common/richtext/richtext.module';
+import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module';
+import {RegionSelectorModule} from '../../common/region-selector/region-selector.module';
+import {NgxEchartsModule} from '_ngx-echarts@4.2.2@ngx-echarts';
+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';
+
+
+
+@NgModule({
+ declarations: [PhoneOrderComponent],
+ imports: [
+ CommonModule,
+ ApiOrderRoutingModule,
+ NgZorroAntdModule,
+ FormsModule,
+ ReactiveFormsModule,
+ NgxNeditorModule,
+ RichtextModule,
+ BreadcrumbModule,
+ RegionSelectorModule,
+ NgxEchartsModule,
+ IndexRoutingModule,
+ AppCommonModule,
+ NzSpaceModule
+ ]
+})
+export class ApiOrderModule { }
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
new file mode 100644
index 0000000..43a7f6a
--- /dev/null
+++ b/src/app/admin/api-order/phone-order/phone-order.component.html
@@ -0,0 +1 @@
+phone-order works!
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
new file mode 100644
index 0000000..e69de29
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
new file mode 100644
index 0000000..493b5fd
--- /dev/null
+++ b/src/app/admin/api-order/phone-order/phone-order.component.spec.ts
@@ -0,0 +1,25 @@
+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
new file mode 100644
index 0000000..a959e3f
--- /dev/null
+++ b/src/app/admin/api-order/phone-order/phone-order.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-phone-order',
+ templateUrl: './phone-order.component.html',
+ styleUrls: ['./phone-order.component.scss']
+})
+export class PhoneOrderComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+
+}
diff --git a/src/app/admin/api-product/list/list.component.html b/src/app/admin/api-product/list/list.component.html
index 7baf522..1664d23 100644
--- a/src/app/admin/api-product/list/list.component.html
+++ b/src/app/admin/api-product/list/list.component.html
@@ -75,6 +75,7 @@
class="table"
#ajaxTable
nzShowSizeChanger
+ nzBordered
[nzFrontPagination]="false"
[nzData]="requestData"
[nzLoading]="loading"
diff --git a/src/app/admin/coupon/coupon-edit/coupon-edit.component.html b/src/app/admin/coupon/coupon-edit/coupon-edit.component.html
index d373000..00ab5e0 100644
--- a/src/app/admin/coupon/coupon-edit/coupon-edit.component.html
+++ b/src/app/admin/coupon/coupon-edit/coupon-edit.component.html
@@ -155,10 +155,18 @@
+
+
+ 是否邮递实物
+
+
+
+
+
- 是否预约产品
+ 是否预约产品
diff --git a/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts b/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts
index 89ca8f4..42612e2 100644
--- a/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts
+++ b/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts
@@ -87,6 +87,7 @@ export class CouponEditComponent implements OnInit {
isPresent: [false],
reserveStatus: [false],
buyPoints: [false],
+ wherePost: [false],
payType: [null, [Validators.required]],
displayArea: [null],
couponSource: [null],
diff --git a/src/app/admin/discount/discount-edit/discount-edit.component.html b/src/app/admin/discount/discount-edit/discount-edit.component.html
index 46dd779..6fec6ac 100644
--- a/src/app/admin/discount/discount-edit/discount-edit.component.html
+++ b/src/app/admin/discount/discount-edit/discount-edit.component.html
@@ -45,8 +45,8 @@
优惠券使用归属
-
-
+
+
diff --git a/src/app/admin/index/api-merchant/api-merchant.component.html b/src/app/admin/index/api-merchant/api-merchant.component.html
new file mode 100644
index 0000000..13b1859
--- /dev/null
+++ b/src/app/admin/index/api-merchant/api-merchant.component.html
@@ -0,0 +1,39 @@
+
+
+
+
+ 接口信息
+
+
+
+ 商户号(mchId):{{apiMerchants['mchId']}}
+ 密钥(apiKey):{{apiMerchants['apiKey']}}
+ IP白名单:{{apiMerchants['ext1']}}
+
+
+
+
+
+ 已开通产品
+
+
+
+ {{item['codeType'] | productConfig}}
+
+
+
diff --git a/src/app/admin/index/api-merchant/api-merchant.component.scss b/src/app/admin/index/api-merchant/api-merchant.component.scss
new file mode 100644
index 0000000..2b3e6a6
--- /dev/null
+++ b/src/app/admin/index/api-merchant/api-merchant.component.scss
@@ -0,0 +1,25 @@
+.content {
+ background: #fff;
+ margin-bottom: 20px;
+ margin-top: 20px;
+}
+.top-title {
+ padding: 16px;
+ border-bottom: 1px solid #e8e8e8
+}
+.content-data {
+ padding: 24px;
+ .title {
+ color: rgba(0, 0, 0, 0.45);
+ font-size: 14px;
+ }
+}
+.product {
+ text-align: center;
+ font-size: 18px;
+ padding: 20px;
+ border: 1px solid #e8e8e8;
+}
+.product:hover {
+ box-shadow: #e8e8e8 0 0 4px 2px;
+}
diff --git a/src/app/admin/index/api-merchant/api-merchant.component.ts b/src/app/admin/index/api-merchant/api-merchant.component.ts
new file mode 100644
index 0000000..bcdc9bc
--- /dev/null
+++ b/src/app/admin/index/api-merchant/api-merchant.component.ts
@@ -0,0 +1,34 @@
+import { Component, OnInit } from '@angular/core';
+import {LocalStorageService} from '../../../services/local-storage.service';
+import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
+import {CommonsService} from "../../../services/commons.service";
+import {ApiMerchantsService} from "../../../services/api-merchants.service";
+
+@Component({
+ selector: 'app-api-merchant',
+ templateUrl: './api-merchant.component.html',
+ styleUrls: ['./api-merchant.component.scss']
+})
+export class ApiMerchantComponent implements OnInit {
+
+ // API商户信息
+ apiMerchants;
+ productConfig;
+
+ constructor(
+ private store: LocalStorageService, // 数据缓存
+ private apiMerchantService: ApiMerchantsService,
+ private common: CommonsService
+ ) { }
+
+ ngOnInit(): void {
+ this.apiMerchants = this.store.get(ADMIN_INFO_OBJECT)['apiMerchants'];
+
+ this.apiMerchantService.getSecConfigList(this.apiMerchants['mchId'] , data => {
+ if (data['return_code'] === '000000') {
+ this.productConfig = data['return_data'];
+ }
+ });
+ }
+
+}
diff --git a/src/app/admin/index/index.module.ts b/src/app/admin/index/index.module.ts
index dcb69aa..0111e0a 100644
--- a/src/app/admin/index/index.module.ts
+++ b/src/app/admin/index/index.module.ts
@@ -14,11 +14,12 @@ import {RegionSelectorModule} from '../../common/region-selector/region-selector
import {AppCommonModule} from '../../app-common.module';
import { TestComponent } from './test/test.component';
import {NzSpaceModule} from 'ng-zorro-antd/space';
+import { ApiMerchantComponent } from './api-merchant/api-merchant.component';
@NgModule({
- declarations: [IndexComponent, TestComponent],
+ declarations: [IndexComponent, TestComponent, ApiMerchantComponent],
imports: [
CommonModule,
SystemRoutingModule,
diff --git a/src/app/admin/index/index/index.component.html b/src/app/admin/index/index/index.component.html
index 5d24a5d..b52c1c9 100644
--- a/src/app/admin/index/index/index.component.html
+++ b/src/app/admin/index/index/index.component.html
@@ -1,9 +1,9 @@
-
-
- 首页
-
-
+
+
+
+
+
@@ -166,6 +166,8 @@
+
+
diff --git a/src/app/admin/index/order-statistics/order-statistics.component.html b/src/app/admin/index/order-statistics/order-statistics.component.html
new file mode 100644
index 0000000..2d36490
--- /dev/null
+++ b/src/app/admin/index/order-statistics/order-statistics.component.html
@@ -0,0 +1,15 @@
+
+
+
+ 订单统计汇总
+
+
+
+
+
+
diff --git a/src/app/admin/index/order-statistics/order-statistics.component.scss b/src/app/admin/index/order-statistics/order-statistics.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/admin/index/order-statistics/order-statistics.component.ts b/src/app/admin/index/order-statistics/order-statistics.component.ts
new file mode 100644
index 0000000..f8ed86d
--- /dev/null
+++ b/src/app/admin/index/order-statistics/order-statistics.component.ts
@@ -0,0 +1,48 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-order-statistics',
+ templateUrl: './order-statistics.component.html',
+ styleUrls: ['./order-statistics.component.scss']
+})
+export class OrderStatisticsComponent implements OnInit {
+
+ // 根据年月日查询总交易金额
+ orderStatisticsByYMDData: any;
+
+ constructor() { }
+
+ ngOnInit(): void {
+ this.orderStatisticsByYMD(3);
+ }
+
+ public orderStatisticsByYMD(dateType: number): void {
+ this.orderStatisticsByYMDData = {
+ xAxis: {
+ type: 'category',
+
+ data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
+ },
+ yAxis: {
+ type: 'value'
+ },
+ series: [
+ {
+ data: [120, 200, 150, 80, 70, 110, 130],
+ label: {
+ show: true,
+ color: 'black',
+ position: 'top'
+ },
+ type: 'bar',
+ showBackground: true,
+ color: '#1890ff',
+ backgroundStyle: {
+ color: 'rgba(180, 180, 180, 0.2)'
+ }
+ }
+ ]
+ };
+ }
+
+}
diff --git a/src/app/admin/order/order-list/order-list.component.html b/src/app/admin/order/order-list/order-list.component.html
index dbdee41..dd79c40 100644
--- a/src/app/admin/order/order-list/order-list.component.html
+++ b/src/app/admin/order/order-list/order-list.component.html
@@ -147,7 +147,7 @@
支付时间 |
取消时间 |
状态 |
-
+ 操作 |
@@ -167,10 +167,10 @@
{{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
{{data.cancelTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
{{data.orderStatus}} |
-
-
-
-
+
+ 订单详情
+
+ |
@@ -185,3 +185,20 @@
+
+
+ {{orderDetail['highChildOrderList'][0]['goodsName']}}
+ {{orderDetail['payType'] | paytype}}
+ {{orderDetail['payPrice']}}
+ {{orderDetail['memName']}}
+ {{orderDetail['memPhone']}}
+ {{orderDetail['orderNo']}}
+ {{orderDetail['createTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}
+ {{orderDetail['payTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}
+ {{orderDetail['orderStatus'] | orderCouponStatus}}
+ {{postData['address']}}
+ {{postData['user']}}
+ {{postData['phone']}}
+
+
+
diff --git a/src/app/admin/order/order-list/order-list.component.ts b/src/app/admin/order/order-list/order-list.component.ts
index f118787..1938d9e 100644
--- a/src/app/admin/order/order-list/order-list.component.ts
+++ b/src/app/admin/order/order-list/order-list.component.ts
@@ -8,8 +8,8 @@ import {Router} from '@angular/router';
import {CommonsService} from '../../../services/commons.service';
import {OrderService} from '../../../services/order.service';
import {CompanyService} from '../../../services/company.service';
-import {ADMIN_INFO_OBJECT} from "../../../services/local-storage.namespace";
-import {LocalStorageService} from "../../../services/local-storage.service";
+import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
+import {LocalStorageService} from '../../../services/local-storage.service';
@Component({
selector: 'app-order-list',
@@ -31,7 +31,16 @@ export class OrderListComponent implements OnInit {
id: number; // 订单ID
isVisible = false;
refundContent: string;
+ isVisibleDetail = false;
roleType: number;
+ orderDetail: any = {
+ highChildOrderList: [{
+ goodsName: ''
+ }]
+ };
+ postData: any = {
+ address: '',
+ };
constructor(
private form: FormBuilder,
private order: OrderService,
@@ -130,11 +139,20 @@ export class OrderListComponent implements OnInit {
// 查看详情
public getDetail(id: number): void {
- this.router.navigate(['/admin/order/order-detail'], {
- queryParams: {
- merchantId: id
- }
- }).then(r => console.log(r));
+ this.isVisibleDetail = true;
+ this.order.getOrderById(id , data => {
+ if (data['return_code'] === '000000') {
+ console.log(data);
+ this.orderDetail = data['return_data'];
+ if (this.orderDetail['remarks'] != null) {
+ this.postData = JSON.parse(this.orderDetail['remarks']);
+ console.log(this.postData['address']);
+
+ }
+ } else {
+ this.message.error(data['return_msg']);
+ }
+ });
}
// 下载模板
diff --git a/src/app/app-common.module.ts b/src/app/app-common.module.ts
index b1b7043..cdfe23e 100644
--- a/src/app/app-common.module.ts
+++ b/src/app/app-common.module.ts
@@ -48,14 +48,12 @@ import {
GasStaffStatusPipe,
PayStatusPipe,
ChlidRechargeStatusPipe,
- SourceTypePipe, GasClassGroupTaskStatusPipe, GasOrderStatusPipe
+ SourceTypePipe, GasClassGroupTaskStatusPipe, GasOrderStatusPipe, PlatformPipe, ProductConfigPipe, OilCardStatusPipe
} from './pipes';
-import {OilCardStatusPipe} from './pipes';
import {OilTypePipe} from './pipes/store/oil-type.pipe';
import {OilPriceTaskStatusPipe} from './pipes/gas-oil-price/oil-price-task-status.pipe';
import {OilPriceTaskExecutionTypePipe} from './pipes/gas-oil-price/oil-price-task-execution-type.pipe';
import {OilPriceTaskPriceTypePipe} from './pipes/gas-oil-price/oil-price-task-price-type.pipe';
-import { PlatformPipe } from './pipes/recharge-pipe/platform.pipe';
import { IntegralTypePipe } from './pipes/integral/integral-type.pipe';
import { IntegralProductPipe } from './pipes/integral/integral-product.pipe';
import { MsgTypePipe } from './pipes/msg/msg-type.pipe';
@@ -112,6 +110,7 @@ const PIPES = [
IntegralTypePipe,
IntegralProductPipe,
MsgTypePipe,
+ ProductConfigPipe
];
@@ -124,7 +123,7 @@ const PIPES = [
NgxNeditorModule
],
declarations: [
- ...PIPES
+ ...PIPES,
],
exports: [
diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index 3877c1f..e725a6f 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -157,6 +157,11 @@ const routes: Routes = [
loadChildren: () => import('./admin/promotion/promotion.module').then(m => m.PromotionModule),
canActivate: [InitGuardService]
},
+ {
+ path: 'api-order',
+ loadChildren: () => import('./admin/api-order/api-order.module').then(m => m.ApiOrderModule),
+ canActivate: [InitGuardService]
+ },
],
},
];
diff --git a/src/app/pipes/index.ts b/src/app/pipes/index.ts
index 5956d41..beea301 100644
--- a/src/app/pipes/index.ts
+++ b/src/app/pipes/index.ts
@@ -41,3 +41,4 @@ export * from './apiMerchant/source-type.pipe';
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';
diff --git a/src/app/pipes/index/product-config.pipe.ts b/src/app/pipes/index/product-config.pipe.ts
new file mode 100644
index 0000000..51d4f7a
--- /dev/null
+++ b/src/app/pipes/index/product-config.pipe.ts
@@ -0,0 +1,23 @@
+import { Pipe, PipeTransform } from '@angular/core';
+
+@Pipe({
+ name: 'productConfig'
+})
+export class ProductConfigPipe implements PipeTransform {
+
+ transform(value: string): string {
+ switch (value) {
+ case 'CQ_SHELL':
+ return '重庆壳牌接口';
+ case 'KFC_CONFIG':
+ return '肯德基接口';
+ case 'MEMBER_RECHARGE_CONFIG':
+ return '会员充值接口';
+ case 'PHONE_CONFIG':
+ return '话费接口';
+ case 'STARBUCKS_CONFIG':
+ return '星巴克接口';
+ }
+ }
+
+}
diff --git a/src/app/pipes/msg/msg-type.pipe.ts b/src/app/pipes/msg/msg-type.pipe.ts
index 60156f9..a1e7b92 100644
--- a/src/app/pipes/msg/msg-type.pipe.ts
+++ b/src/app/pipes/msg/msg-type.pipe.ts
@@ -15,16 +15,5 @@ export class MsgTypePipe implements PipeTransform {
return this.array[product][type - 1];
}
- // transform(object: string , objectName: string): string {
- //
- // console.log(object);
- //
- // const o = JSON.parse(object);
- // if (typeof o == 'object') {
- // return o[objectName];
- // }
- // return null;
- // }
-
}
diff --git a/src/app/services/api-merchants.service.ts b/src/app/services/api-merchants.service.ts
index 90058db..d276fa6 100644
--- a/src/app/services/api-merchants.service.ts
+++ b/src/app/services/api-merchants.service.ts
@@ -1,7 +1,9 @@
import { Injectable } from '@angular/core';
import {CommonsService} from './commons.service';
-import {environment} from "../../environments/environment";
+import {environment} from '../../environments/environment';
import {HttpClient} from '@angular/common/http';
+import {take} from "rxjs/operators";
+
@Injectable({
providedIn: 'root'
@@ -122,7 +124,7 @@ export class ApiMerchantsService {
* @methodName configApiProduct
* @Description // 提交配置产品
* @Date 18:00 2022/6/8
- * @Param
+ * @Param configApiProduct
*/
public configApiProduct(params: object, callBack) {
this.http.post(environment.baseUrl + 'apiProduct/configApiProduct', params).subscribe(data => {
@@ -167,4 +169,57 @@ export class ApiMerchantsService {
callBack(data);
});
}
+
+ /**
+ * @Author Sum1Dream
+ * @methodName editApiIpAddress
+ * @Description //编辑ip地址
+ * @Date 09:25 2022/12/7
+ * @Param params: object, callBack
+ */
+ public editApiIpAddress(params: object, callBack) {
+ this.http.post(environment.baseUrl + 'apiIpAddress/editApiIpAddress', params).subscribe(data => {
+ callBack(data);
+ });
+ }
+
+ /**
+ * @Author Sum1Dream
+ * @methodName findByMchId
+ * @Description // 根据商户号查询详情
+ * @Date 11:18 2022/12/7
+ * @Param mchId: number, callBack
+ */
+ public findByMchId(mchId: string, callBack) {
+ this.http.get(environment.baseUrl + 'apiIpAddress/findByMchId?mchId=' + mchId).subscribe(data => {
+ callBack(data);
+ });
+ }
+
+ /**
+ * @Author Sum1Dream
+ * @methodName getSecConfigList
+ * @Description // 查询配置内容
+ * @Date 16:43 2022/12/7
+ * @Param mchId: string, callBack
+ */
+ public getSecConfigList(mchId: string, callBack) {
+ this.http.get(environment.baseUrl + 'apiIpAddress/getSecConfigList?mchId=' + mchId).subscribe(data => {
+ callBack(data);
+ });
+ }
+
+ /**
+ * @Author Sum1Dream
+ * @methodName configMerchant
+ * @Description // 配置商户可用接口
+ * @Date 16:44 2022/12/7
+ * @Param params: object, callBack
+ */
+ public configMerchant(params: object, callBack) {
+ this.http.post(environment.baseUrl + 'apiIpAddress/configMerchant', params).subscribe(data => {
+ callBack(data);
+ });
+ }
+
}
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index cc5edd5..21ad46f 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://hsg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
- // imageUrl: 'https://hsg.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=',
};
diff --git a/src/styles.scss b/src/styles.scss
index b45d7aa..d64eb98 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -13,12 +13,21 @@
.fr {
float: right;
}
+.ml {
+ margin-left: 20px;
+}
+.box-shadow:hover {
+ box-shadow: #e8e8e8 0 0 4px 2px;
+}
.cp {
cursor: pointer;
}
.br {
border-right: solid 1px #e8e8ed;
}
+.mt {
+ margin-top: 8px;
+}
.inner-content {
padding: 24px;
background: #fff;
From 50b7e4a97ed992ce731d2acfcd841bcbf0f8d048 Mon Sep 17 00:00:00 2001
From: Sum1Dream <418471657@qq.com>
Date: Tue, 3 Jan 2023 09:41:57 +0800
Subject: [PATCH 4/6] 1
---
.../admin/merchant-store/store-edit/store-edit.component.html | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/app/admin/merchant-store/store-edit/store-edit.component.html b/src/app/admin/merchant-store/store-edit/store-edit.component.html
index ca9b096..a12b00e 100644
--- a/src/app/admin/merchant-store/store-edit/store-edit.component.html
+++ b/src/app/admin/merchant-store/store-edit/store-edit.component.html
@@ -52,7 +52,6 @@
-
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 5/6] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=90=86?=
=?UTF-8?q?=E5=95=86=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=',
};
From 51a09f3aee01f441c7ae1cf2fccd63aba771fb2d Mon Sep 17 00:00:00 2001
From: Sum1Dream <418471657@qq.com>
Date: Thu, 5 Jan 2023 14:39:20 +0800
Subject: [PATCH 6/6] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=90=86?=
=?UTF-8?q?=E5=95=86=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
---
.../kfc-order/kfc-order.component.html | 127 ++++++++++++++++++
.../kfc-order/kfc-order.component.scss | 5 +
.../kfc-order/kfc-order.component.spec.ts | 25 ++++
.../kfc-order/kfc-order.component.ts | 91 +++++++++++++
.../starbucks-order/list/list.component.html | 127 ++++++++++++++++++
.../starbucks-order/list/list.component.scss | 5 +
.../starbucks-order/list/list.component.ts | 92 +++++++++++++
.../vip-top-up-order.component.html | 127 ++++++++++++++++++
.../vip-top-up-order.component.scss | 5 +
.../vip-top-up-order.component.ts | 93 +++++++++++++
.../pipes/apiMerchant/callback-status.pipe.ts | 21 +++
src/app/pipes/order/pay-coupon-status.pipe.ts | 26 ++++
12 files changed, 744 insertions(+)
create mode 100644 src/app/admin/api-order/kfc-order/kfc-order.component.html
create mode 100644 src/app/admin/api-order/kfc-order/kfc-order.component.scss
create mode 100644 src/app/admin/api-order/kfc-order/kfc-order.component.spec.ts
create mode 100644 src/app/admin/api-order/kfc-order/kfc-order.component.ts
create mode 100644 src/app/admin/api-order/starbucks-order/list/list.component.html
create mode 100644 src/app/admin/api-order/starbucks-order/list/list.component.scss
create mode 100644 src/app/admin/api-order/starbucks-order/list/list.component.ts
create mode 100644 src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.html
create mode 100644 src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.scss
create mode 100644 src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.ts
create mode 100644 src/app/pipes/apiMerchant/callback-status.pipe.ts
create mode 100644 src/app/pipes/order/pay-coupon-status.pipe.ts
diff --git a/src/app/admin/api-order/kfc-order/kfc-order.component.html b/src/app/admin/api-order/kfc-order/kfc-order.component.html
new file mode 100644
index 0000000..beee660
--- /dev/null
+++ b/src/app/admin/api-order/kfc-order/kfc-order.component.html
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+ 共计 {{total}} 条数据
+
+
+
+ 编号 |
+ 平台订单号 |
+ 第三方订单号 |
+ 订单金额 |
+ 下单金额 |
+ 生成时间 |
+ 支付时间 |
+ 订单状态 |
+ 支付状态 |
+
+
+
+
+ {{i + 1}} |
+ {{data.orderNo}} |
+ {{data.sourceOrderNo}} |
+ ¥{{data.orderPrice}} |
+ ¥{{data.payPrice}} |
+ {{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.callbackStatus | callbackStatus}} |
+ {{data.orderStatus | payCouponStatus}} |
+
+
+
diff --git a/src/app/admin/api-order/kfc-order/kfc-order.component.scss b/src/app/admin/api-order/kfc-order/kfc-order.component.scss
new file mode 100644
index 0000000..b68da73
--- /dev/null
+++ b/src/app/admin/api-order/kfc-order/kfc-order.component.scss
@@ -0,0 +1,5 @@
+.table-td-operation {
+ a {
+ margin-left: 8px;
+ }
+}
diff --git a/src/app/admin/api-order/kfc-order/kfc-order.component.spec.ts b/src/app/admin/api-order/kfc-order/kfc-order.component.spec.ts
new file mode 100644
index 0000000..0c474b2
--- /dev/null
+++ b/src/app/admin/api-order/kfc-order/kfc-order.component.spec.ts
@@ -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;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ KfcOrderComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(KfcOrderComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/admin/api-order/kfc-order/kfc-order.component.ts b/src/app/admin/api-order/kfc-order/kfc-order.component.ts
new file mode 100644
index 0000000..4866982
--- /dev/null
+++ b/src/app/admin/api-order/kfc-order/kfc-order.component.ts
@@ -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();
+ }
+
+}
diff --git a/src/app/admin/api-order/starbucks-order/list/list.component.html b/src/app/admin/api-order/starbucks-order/list/list.component.html
new file mode 100644
index 0000000..beee660
--- /dev/null
+++ b/src/app/admin/api-order/starbucks-order/list/list.component.html
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+ 共计 {{total}} 条数据
+
+
+
+ 编号 |
+ 平台订单号 |
+ 第三方订单号 |
+ 订单金额 |
+ 下单金额 |
+ 生成时间 |
+ 支付时间 |
+ 订单状态 |
+ 支付状态 |
+
+
+
+
+ {{i + 1}} |
+ {{data.orderNo}} |
+ {{data.sourceOrderNo}} |
+ ¥{{data.orderPrice}} |
+ ¥{{data.payPrice}} |
+ {{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.callbackStatus | callbackStatus}} |
+ {{data.orderStatus | payCouponStatus}} |
+
+
+
diff --git a/src/app/admin/api-order/starbucks-order/list/list.component.scss b/src/app/admin/api-order/starbucks-order/list/list.component.scss
new file mode 100644
index 0000000..b68da73
--- /dev/null
+++ b/src/app/admin/api-order/starbucks-order/list/list.component.scss
@@ -0,0 +1,5 @@
+.table-td-operation {
+ a {
+ margin-left: 8px;
+ }
+}
diff --git a/src/app/admin/api-order/starbucks-order/list/list.component.ts b/src/app/admin/api-order/starbucks-order/list/list.component.ts
new file mode 100644
index 0000000..a6e363c
--- /dev/null
+++ b/src/app/admin/api-order/starbucks-order/list/list.component.ts
@@ -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();
+ }
+
+}
diff --git a/src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.html b/src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.html
new file mode 100644
index 0000000..beee660
--- /dev/null
+++ b/src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.html
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+ 共计 {{total}} 条数据
+
+
+
+ 编号 |
+ 平台订单号 |
+ 第三方订单号 |
+ 订单金额 |
+ 下单金额 |
+ 生成时间 |
+ 支付时间 |
+ 订单状态 |
+ 支付状态 |
+
+
+
+
+ {{i + 1}} |
+ {{data.orderNo}} |
+ {{data.sourceOrderNo}} |
+ ¥{{data.orderPrice}} |
+ ¥{{data.payPrice}} |
+ {{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.callbackStatus | callbackStatus}} |
+ {{data.orderStatus | payCouponStatus}} |
+
+
+
diff --git a/src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.scss b/src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.scss
new file mode 100644
index 0000000..b68da73
--- /dev/null
+++ b/src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.scss
@@ -0,0 +1,5 @@
+.table-td-operation {
+ a {
+ margin-left: 8px;
+ }
+}
diff --git a/src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.ts b/src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.ts
new file mode 100644
index 0000000..50fbdad
--- /dev/null
+++ b/src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.ts
@@ -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();
+ }
+
+
+}
diff --git a/src/app/pipes/apiMerchant/callback-status.pipe.ts b/src/app/pipes/apiMerchant/callback-status.pipe.ts
new file mode 100644
index 0000000..9374a35
--- /dev/null
+++ b/src/app/pipes/apiMerchant/callback-status.pipe.ts
@@ -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 '预备回调';
+ }
+ }
+
+}
diff --git a/src/app/pipes/order/pay-coupon-status.pipe.ts b/src/app/pipes/order/pay-coupon-status.pipe.ts
new file mode 100644
index 0000000..31a3a5c
--- /dev/null
+++ b/src/app/pipes/order/pay-coupon-status.pipe.ts
@@ -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 '拒绝退款';
+ }
+ }
+}
|