提交抽奖内容

pull/1/head
袁野 2 years ago
parent def81dabc3
commit c42cdcfeec
  1. 4
      src/app/admin/activate/activate-edit/activate-edit.component.html
  2. 46
      src/app/admin/api-merchants/list/list.component.html
  3. 125
      src/app/admin/api-merchants/list/list.component.ts
  4. 15
      src/app/admin/api-order/api-order-routing.module.ts
  5. 37
      src/app/admin/api-order/api-order.module.ts
  6. 1
      src/app/admin/api-order/phone-order/phone-order.component.html
  7. 0
      src/app/admin/api-order/phone-order/phone-order.component.scss
  8. 25
      src/app/admin/api-order/phone-order/phone-order.component.spec.ts
  9. 15
      src/app/admin/api-order/phone-order/phone-order.component.ts
  10. 1
      src/app/admin/api-product/list/list.component.html
  11. 10
      src/app/admin/coupon/coupon-edit/coupon-edit.component.html
  12. 1
      src/app/admin/coupon/coupon-edit/coupon-edit.component.ts
  13. 4
      src/app/admin/discount/discount-edit/discount-edit.component.html
  14. 39
      src/app/admin/index/api-merchant/api-merchant.component.html
  15. 25
      src/app/admin/index/api-merchant/api-merchant.component.scss
  16. 34
      src/app/admin/index/api-merchant/api-merchant.component.ts
  17. 3
      src/app/admin/index/index.module.ts
  18. 12
      src/app/admin/index/index/index.component.html
  19. 15
      src/app/admin/index/order-statistics/order-statistics.component.html
  20. 0
      src/app/admin/index/order-statistics/order-statistics.component.scss
  21. 48
      src/app/admin/index/order-statistics/order-statistics.component.ts
  22. 27
      src/app/admin/order/order-list/order-list.component.html
  23. 32
      src/app/admin/order/order-list/order-list.component.ts
  24. 7
      src/app/app-common.module.ts
  25. 5
      src/app/app-routing.module.ts
  26. 1
      src/app/pipes/index.ts
  27. 23
      src/app/pipes/index/product-config.pipe.ts
  28. 11
      src/app/pipes/msg/msg-type.pipe.ts
  29. 59
      src/app/services/api-merchants.service.ts
  30. 8
      src/environments/environment.ts
  31. 9
      src/styles.scss

@ -69,7 +69,7 @@
</form> </form>
<div style="margin-top: 60px;" *ngIf="current === 1"> <div style="margin-top: 60px;" *ngIf="current === 1">
<span>共计 {{11}} 条数据</span> <span>共计 {{listOfData.length}} 条数据</span>
<div class="operating-button"> <div class="operating-button">
<button nz-button nzType="primary" class="right-btn" (click)="getAdd()" ><i nz-icon nzType="plus" nzTheme="outline"></i>添加</button> <button nz-button nzType="primary" class="right-btn" (click)="getAdd()" ><i nz-icon nzType="plus" nzTheme="outline"></i>添加</button>
</div> </div>
@ -120,7 +120,7 @@
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>奖励数量</nz-form-label> <nz-form-label [nzSpan]="6" nzRequired>奖励数量</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入奖励数量"> <nz-form-control [nzSpan]="16" nzErrorTip="请输入奖励数量">
<input nz-input type="number" formControlName="num" placeholder="请输入奖励名称" /> <input nz-input type="number" formControlName="num" placeholder="请输入奖励数量" />
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>

@ -66,6 +66,7 @@
<nz-table <nz-table
class="table" class="table"
#ajaxTable #ajaxTable
nzBordered
nzShowSizeChanger nzShowSizeChanger
[nzFrontPagination]="false" [nzFrontPagination]="false"
[nzData]="requestData" [nzData]="requestData"
@ -78,16 +79,16 @@
(nzPageSizeChange)="getRequest(false , searchForm.value)"> (nzPageSizeChange)="getRequest(false , searchForm.value)">
<thead nzSingleSort> <thead nzSingleSort>
<tr> <tr>
<th nzWidth="60px">编号</th> <th nzWidth="80px">编号</th>
<th nzWidth="90px">商户名称</th> <th nzWidth="120px">商户名称</th>
<th nzWidth="80px">联系人</th> <th nzWidth="80px">联系人</th>
<th nzWidth="80px">电话</th> <th nzWidth="130px">电话</th>
<th nzWidth="90px">商户号</th> <th nzWidth="140px">商户号</th>
<th nzWidth="160px">商户KEY</th> <th nzWidth="200px">商户KEY</th>
<th nzWidth="80px">操作人员</th> <th nzWidth="100px">操作人员</th>
<th nzWidth="120px">创建时间</th> <th nzWidth="120px">创建时间</th>
<th nzRight nzWidth="100px">帐户余额</th> <th nzRight nzWidth="100px">帐户余额</th>
<th nzRight nzWidth="60px">状态</th> <th nzRight nzWidth="90px">状态</th>
<th nzRight nzWidth="200px">操作</th> <th nzRight nzWidth="200px">操作</th>
</tr> </tr>
</thead> </thead>
@ -100,7 +101,7 @@
<td>{{data.mchId }}</td> <td>{{data.mchId }}</td>
<td>{{data.apiKey }}</td> <td>{{data.apiKey }}</td>
<td>{{data.operatorName }}</td> <td>{{data.operatorName }}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td> <td>{{data.createTime | date: 'yyyy-MM-dd'}}</td>
<td nzRight="">¥{{data.amounts}}</td> <td nzRight="">¥{{data.amounts}}</td>
<td nzRight="">{{data.status== 100? '正常':'禁用'}}</td> <td nzRight="">{{data.status== 100? '正常':'禁用'}}</td>
<td nzRight class="table-td-operation"> <td nzRight class="table-td-operation">
@ -109,8 +110,10 @@
<a nz-dropdown [nzDropdownMenu]="menu">更多操作</a> <a nz-dropdown [nzDropdownMenu]="menu">更多操作</a>
<nz-dropdown-menu #menu="nzDropdownMenu"> <nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable> <ul nz-menu nzSelectable>
<li class="li-a" nz-menu-item><a (click)="configProduct(data.id)">配置产品</a></li> <li class="li-a" nz-menu-item><a (click)="configProduct(data.id)">配置话费产品</a></li>
<li class="li-a" nz-menu-item><a (click)="showConfigProduct(data.id)">产品详情</a></li> <li class="li-a" nz-menu-item><a (click)="showConfigProduct(data.id)">产品详情</a></li>
<li class="li-a" nz-menu-item><a (click)="configIp(data.mchId)">配置IP地址</a></li>
<li class="li-a" nz-menu-item><a (click)="configApiProduct(data.mchId)">配置可用接口</a></li>
<li class="li-a" nz-menu-item><a (click)="getMerchRechargeData(data.id)">金额记录</a></li> <li class="li-a" nz-menu-item><a (click)="getMerchRechargeData(data.id)">金额记录</a></li>
<li class="li-a" nz-menu-item><a (click)='getForbiddenUser(data.id , data.status)'>{{data.status === 101 ? '上线': '禁用'}}</a></li> <li class="li-a" nz-menu-item><a (click)='getForbiddenUser(data.id , data.status)'>{{data.status === 101 ? '上线': '禁用'}}</a></li>
</ul> </ul>
@ -137,7 +140,7 @@
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>商户电话</nz-form-label> <nz-form-label [nzSpan]="6" nzRequired>商户电话</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入商户电话!"> <nz-form-control [nzSpan]="16" nzErrorTip="请输入商户电话!">
<input nz-input formControlName="phone" /> <input nz-input formControlName="phone" disabled/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</form> </form>
@ -178,7 +181,7 @@
</nz-modal> </nz-modal>
<nz-modal [(nzVisible)]="visible" nzTitle="商户充值记录" (nzOnCancel)="visible = false" nzWidth="1000px" [nzFooter]="null"> <nz-modal [(nzVisible)]="visible" nzTitle="商户充值记录" (nzOnCancel)="visible = false" nzWidth="1000px" [nzFooter]="null">
<nz-table #errorStudentTable [nzScroll]="{ x: '1200px' }" [nzData]="merchRechargeData"> <nz-table #errorStudentTable nzBordered [nzScroll]="{ x: '1200px' }" [nzData]="merchRechargeData">
<thead> <thead>
<tr> <tr>
<th nzWidth="100px">类型</th> <th nzWidth="100px">类型</th>
@ -244,7 +247,7 @@
<nz-modal [(nzVisible)]="visibleConfigProduct" nzTitle="商户产品" (nzOnCancel)="visibleConfigProduct = false" nzWidth="1000px" [nzFooter]="null"> <nz-modal [(nzVisible)]="visibleConfigProduct" nzTitle="商户产品" (nzOnCancel)="visibleConfigProduct = false" nzWidth="1000px" [nzFooter]="null">
<nz-table #productConfigTable [nzScroll]="{ x: '1200px' }" [nzData]="productConfigArray"> <nz-table #productConfigTable nzBordered [nzScroll]="{ x: '1200px' }" [nzData]="productConfigArray">
<thead> <thead>
<tr> <tr>
<th nzWidth="60px">编号</th> <th nzWidth="60px">编号</th>
@ -293,3 +296,22 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</nz-modal> </nz-modal>
<nz-modal [(nzVisible)]="isVisibleIpAddress" nzTitle="编辑产品折扣" (nzOnCancel)="isVisibleIpAddress = false" (nzOnOk)="handleOkConfigIp()">
<nz-spin [nzSpinning]="isSpinning" nzTip="提交中...">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>IP地址</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入IP地址!">
<input nz-input [(ngModel)]="ipAddress" />
</nz-form-control>
</nz-form-item>
</nz-spin>
</nz-modal>
<nz-modal [(nzVisible)]="isVisibleConfig" nzTitle="编辑产品折扣" (nzOnCancel)="isVisibleConfig = false" (nzOnOk)="handleOkConfigProduct()">
<nz-spin [nzSpinning]="isSpinning" nzTip="配置中...">
<nz-checkbox-group [(ngModel)]="checkOptions"></nz-checkbox-group>
</nz-spin>
</nz-modal>

@ -8,7 +8,8 @@ import {ApiProductService} from '../../../services/api-product.service';
import {FormBuilder, FormGroup, Validators} from '@angular/forms'; import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {NzMessageService} from 'ng-zorro-antd'; import {NzMessageService} from 'ng-zorro-antd';
import {Router} from '@angular/router'; import {Router} from '@angular/router';
import {HttpClient} from '@angular/common/http';
import { map, filter, scan , take } from 'rxjs/operators';
@Component({ @Component({
selector: 'app-list', selector: 'app-list',
@ -36,9 +37,9 @@ export class ListComponent implements OnInit {
id: number; id: number;
edit = false; edit = false;
payPrice; payPrice;
isVisibleGoods = false; isVisibleIpAddress = false;
realPrice = 0; realPrice = 0;
mchId: string;
rechargeModal = false; rechargeModal = false;
rechargeForm: FormGroup; rechargeForm: FormGroup;
configValidateForm: FormGroup; configValidateForm: FormGroup;
@ -55,6 +56,10 @@ export class ListComponent implements OnInit {
productArray = []; productArray = [];
productConfigArray = []; productConfigArray = [];
discount; discount;
ipAddress: string;
isSpinning = false;
isVisibleConfig = false;
checkOptions = [];
formatterPercent = (value: number): string => `${value == null ? 0 : value} %`; formatterPercent = (value: number): string => `${value == null ? 0 : value} %`;
parserPercent = (value: string): string => value.replace(' %', ''); parserPercent = (value: string): string => value.replace(' %', '');
@ -65,6 +70,7 @@ export class ListComponent implements OnInit {
private coupon: CouponService, private coupon: CouponService,
private iconService: IconService, private iconService: IconService,
private message: NzMessageService, private message: NzMessageService,
private http: HttpClient,
private router: Router, private router: Router,
private common: CommonsService private common: CommonsService
) { ) {
@ -85,6 +91,14 @@ export class ListComponent implements OnInit {
this.common.getDictionary('RECHARGE_PLATFORM ', data => { this.common.getDictionary('RECHARGE_PLATFORM ', data => {
this.platformArray = data['return_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 { public init(): void {
@ -99,32 +113,41 @@ export class ListComponent implements OnInit {
phone: [null], phone: [null],
status: [null], status: [null],
}); });
this.validateForm = this.form.group({ this.initApiMerchantsPostFrom(false);
merchantName: [null, [Validators.required]],
userName: [null, [Validators.required]],
phone: [null, [Validators.required]],
});
this.configValidateForm = this.form.group({ this.configValidateForm = this.form.group({
productIds: [null, [Validators.required]], productIds: [null, [Validators.required]],
discount: [null, [Validators.required]], discount: [null, [Validators.required]],
}); });
this.getRequest(true, this.searchForm.value); this.getRequest(true, this.searchForm.value);
this.apiMerchants.getListApiMerchantByAll(data => { this.apiProduct.getAvailableApiProductByList(data => {
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
this.merchantArray = data['return_data']; this.productArray = data['return_data'];
} else { } else {
this.message.error(data['return_msg']); this.message.error(data['return_msg']);
} }
}); });
this.apiProduct.getAvailableApiProductByList(data => {
}
// 出现可用商户列表
public getListApiMerchantByAll(): void {
this.apiMerchants.getListApiMerchantByAll(data => {
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
this.productArray = data['return_data']; this.merchantArray = data['return_data'];
} else { } else {
this.message.error(data['return_msg']); 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) { if (id != null) {
this.id = id; this.id = id;
this.edit = true; this.edit = true;
this.initApiMerchantsPostFrom(true);
this.apiMerchants.findById(id, data => { this.apiMerchants.findById(id, data => {
this.validateForm.patchValue(data['return_data']); this.validateForm.patchValue(data['return_data']);
this.isVisible = true; this.isVisible = true;
}); });
} else { } else {
this.initApiMerchantsPostFrom(false);
this.validateForm.reset(); this.validateForm.reset();
this.isVisible = true; this.isVisible = true;
this.edit = false; this.edit = false;
@ -284,6 +309,7 @@ export class ListComponent implements OnInit {
* *
*/ */
showRechargeModal() { showRechargeModal() {
this.getListApiMerchantByAll();
this.rechargeModal = true; this.rechargeModal = true;
} }
@ -468,4 +494,79 @@ export class ListComponent implements OnInit {
this.configValidateForm.reset(); 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']);
}
});
}
} }

@ -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 { }

@ -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 { }

@ -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<PhoneOrderComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PhoneOrderComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PhoneOrderComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -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 {
}
}

@ -75,6 +75,7 @@
class="table" class="table"
#ajaxTable #ajaxTable
nzShowSizeChanger nzShowSizeChanger
nzBordered
[nzFrontPagination]="false" [nzFrontPagination]="false"
[nzData]="requestData" [nzData]="requestData"
[nzLoading]="loading" [nzLoading]="loading"

@ -155,10 +155,18 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'wherePost'" nzRequired>是否邮递实物</nz-form-label>
<nz-form-control nzErrorTip="请选择!">
<nz-switch [formControlName]="'wherePost'" ></nz-switch>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8"> <div nz-col [nzSpan]="8">
<nz-form-item> <nz-form-item>
<nz-form-label [nzFor]="'isPresent'" nzRequired>是否预约产品</nz-form-label> <nz-form-label [nzFor]="'reserveStatus'" nzRequired>是否预约产品</nz-form-label>
<nz-form-control nzErrorTip="请选择是否预约产品!"> <nz-form-control nzErrorTip="请选择是否预约产品!">
<nz-switch [formControlName]="'reserveStatus'" ></nz-switch> <nz-switch [formControlName]="'reserveStatus'" ></nz-switch>
</nz-form-control> </nz-form-control>

@ -87,6 +87,7 @@ export class CouponEditComponent implements OnInit {
isPresent: [false], isPresent: [false],
reserveStatus: [false], reserveStatus: [false],
buyPoints: [false], buyPoints: [false],
wherePost: [false],
payType: [null, [Validators.required]], payType: [null, [Validators.required]],
displayArea: [null], displayArea: [null],
couponSource: [null], couponSource: [null],

@ -45,8 +45,8 @@
<div nz-col [nzSpan]="8"> <div nz-col [nzSpan]="8">
<nz-form-item> <nz-form-item>
<nz-form-label [nzFor]="'usingRange'" >优惠券使用归属</nz-form-label> <nz-form-label [nzFor]="'usingRange'" >优惠券使用归属</nz-form-label>
<nz-form-control nzErrorTip="请选择优惠券使用范围!"> <nz-form-control nzErrorTip="请选择优惠券使用归属!">
<nz-select formControlName="usingRange" nzAllowClear nzPlaceHolder="请选择优惠券使用范围"> <nz-select formControlName="usingRange" nzAllowClear nzPlaceHolder="请选择优惠券使用归属">
<nz-option *ngFor="let item of usingRange" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option> <nz-option *ngFor="let item of usingRange" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>

@ -0,0 +1,39 @@
<div class="content">
<div class="top-title">
<h3>账户信息</h3>
</div>
<div nz-row class="content-data">
<div nz-col nzSpan="8">
<nz-statistic [nzValue]="(apiMerchants['amounts'] | number)" [nzTitle]="'账户余额'"></nz-statistic>
</div>
<div nz-col nzSpan="8">
<nz-statistic [nzValue]="apiMerchants['phone']" [nzTitle]="'用户名'"></nz-statistic>
</div>
<div nz-col nzSpan="8">
<nz-statistic [nzValue]="apiMerchants['merchantName']" [nzTitle]="'商户名称'"></nz-statistic>
</div>
</div>
</div>
<div class="content">
<div class="top-title">
<h3>接口信息</h3>
</div>
<div nz-row class="content-data">
<div nz-col nzSpan="24">
<p>商户号(mchId):{{apiMerchants['mchId']}}</p>
<p>密钥(apiKey):{{apiMerchants['apiKey']}}</p>
<p>IP白名单:{{apiMerchants['ext1']}}</p>
</div>
</div>
</div>
<div class="content">
<div class="top-title">
<h3>已开通产品</h3>
</div>
<div nz-row class="content-data">
<div nz-col nzSpan="6" *ngFor="let item of productConfig; let i = index">
<div class="product cp ml mt">{{item['codeType'] | productConfig}}</div>
</div>
</div>
</div>

@ -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;
}

@ -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'];
}
});
}
}

@ -14,11 +14,12 @@ import {RegionSelectorModule} from '../../common/region-selector/region-selector
import {AppCommonModule} from '../../app-common.module'; import {AppCommonModule} from '../../app-common.module';
import { TestComponent } from './test/test.component'; import { TestComponent } from './test/test.component';
import {NzSpaceModule} from 'ng-zorro-antd/space'; import {NzSpaceModule} from 'ng-zorro-antd/space';
import { ApiMerchantComponent } from './api-merchant/api-merchant.component';
@NgModule({ @NgModule({
declarations: [IndexComponent, TestComponent], declarations: [IndexComponent, TestComponent, ApiMerchantComponent],
imports: [ imports: [
CommonModule, CommonModule,
SystemRoutingModule, SystemRoutingModule,

@ -1,9 +1,9 @@
<!-- start 面包屑 --> <!-- start 面包屑 -->
<nz-breadcrumb> <!--<nz-breadcrumb>-->
<nz-breadcrumb-item> <!-- <nz-breadcrumb-item>-->
首页 <!-- 首页-->
</nz-breadcrumb-item> <!-- </nz-breadcrumb-item>-->
</nz-breadcrumb> <!--</nz-breadcrumb>-->
<!-- end 面包屑 --> <!-- end 面包屑 -->
<!--条件搜索--> <!--条件搜索-->
@ -166,6 +166,8 @@
</div> </div>
<div style="margin-top: 20px" echarts [options]="data"></div> <div style="margin-top: 20px" echarts [options]="data"></div>
</div> </div>
<!--API商户角色-->
<app-api-merchant *ngIf="roleType == 21"></app-api-merchant>
<nz-modal [(nzVisible)]="isVisible" nzWidth="1200" nzTitle="订单列表" (nzOnCancel)="isVisible = false" (nzOnOk)="isVisible = false"> <nz-modal [(nzVisible)]="isVisible" nzWidth="1200" nzTitle="订单列表" (nzOnCancel)="isVisible = false" (nzOnOk)="isVisible = false">

@ -0,0 +1,15 @@
<!-- start 面包屑 -->
<nz-breadcrumb>
<nz-breadcrumb-item>
订单统计汇总
</nz-breadcrumb-item>
</nz-breadcrumb>
<!-- end 面包屑 -->
<div class="inner-content">
<div class="orderStatisticsByYMDData">
<div echarts [options]="orderStatisticsByYMDData"></div>
</div>
</div>

@ -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)'
}
}
]
};
}
}

@ -147,7 +147,7 @@
<th nzWidth="140px">支付时间</th> <th nzWidth="140px">支付时间</th>
<th nzWidth="140px">取消时间</th> <th nzWidth="140px">取消时间</th>
<th nzRight nzWidth="100px">状态</th> <th nzRight nzWidth="100px">状态</th>
<!-- <th nzWidth="80px" nzRight>操作</th>--> <th nzWidth="120px" nzRight>操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -167,10 +167,10 @@
<td>{{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td> <td>{{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.cancelTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td> <td>{{data.cancelTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight>{{data.orderStatus}}</td> <td nzRight>{{data.orderStatus}}</td>
<!-- <td nzRight class="table-td-operation">--> <td nzRight class="table-td-operation">
<!--&lt;!&ndash; <a *ngIf="data.status !== 101" (click)="getDetail(data.id)">订单详情</a>&ndash;&gt;--> <a *ngIf="data.status !== 101" (click)="getDetail(data.orderId)">订单详情</a>
<!--&lt;!&ndash; <a *ngIf="data.orderStatusId == 2 && data.goodsTypeId == 3" (click)="showModal(data.id)">退款</a>&ndash;&gt;--> <!-- <a *ngIf="data.orderStatusId == 2 && data.goodsTypeId == 3" (click)="showModal(data.id)">退款</a>-->
<!-- </td>--> </td>
</tbody> </tbody>
</nz-table> </nz-table>
</div> </div>
@ -185,3 +185,20 @@
</nz-form-item> </nz-form-item>
</nz-modal> </nz-modal>
<nz-modal [(nzVisible)]="isVisibleDetail" nzTitle="订单详情" nzWidth="1200" (nzOnCancel)="isVisibleDetail = false" (nzOnOk)="isVisibleDetail = false">
<nz-descriptions nzTitle="支付订单详情" nzBordered [nzColumn]="{ xxl: 4, xl: 3, lg: 3, md: 3, sm: 2, xs: 1 }">
<nz-descriptions-item nzTitle="商品名称">{{orderDetail['highChildOrderList'][0]['goodsName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付类型">{{orderDetail['payType'] | paytype}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付金额">{{orderDetail['payPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="客户名称">{{orderDetail['memName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="客户电话">{{orderDetail['memPhone']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="订单号">{{orderDetail['orderNo']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="创建时间">{{orderDetail['createTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付时间">{{orderDetail['payTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="订单状态">{{orderDetail['orderStatus'] | orderCouponStatus}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="orderDetail['remarks'] != null" nzTitle="收货地址">{{postData['address']}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="orderDetail['remarks'] != null" nzTitle="收货人">{{postData['user']}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="orderDetail['remarks'] != null" nzTitle="联系电话">{{postData['phone']}}</nz-descriptions-item>
</nz-descriptions>
</nz-modal>

@ -8,8 +8,8 @@ import {Router} from '@angular/router';
import {CommonsService} from '../../../services/commons.service'; import {CommonsService} from '../../../services/commons.service';
import {OrderService} from '../../../services/order.service'; import {OrderService} from '../../../services/order.service';
import {CompanyService} from '../../../services/company.service'; import {CompanyService} from '../../../services/company.service';
import {ADMIN_INFO_OBJECT} from "../../../services/local-storage.namespace"; import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {LocalStorageService} from "../../../services/local-storage.service"; import {LocalStorageService} from '../../../services/local-storage.service';
@Component({ @Component({
selector: 'app-order-list', selector: 'app-order-list',
@ -31,7 +31,16 @@ export class OrderListComponent implements OnInit {
id: number; // 订单ID id: number; // 订单ID
isVisible = false; isVisible = false;
refundContent: string; refundContent: string;
isVisibleDetail = false;
roleType: number; roleType: number;
orderDetail: any = {
highChildOrderList: [{
goodsName: ''
}]
};
postData: any = {
address: '',
};
constructor( constructor(
private form: FormBuilder, private form: FormBuilder,
private order: OrderService, private order: OrderService,
@ -130,11 +139,20 @@ export class OrderListComponent implements OnInit {
// 查看详情 // 查看详情
public getDetail(id: number): void { public getDetail(id: number): void {
this.router.navigate(['/admin/order/order-detail'], { this.isVisibleDetail = true;
queryParams: { this.order.getOrderById(id , data => {
merchantId: id if (data['return_code'] === '000000') {
} console.log(data);
}).then(r => console.log(r)); 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']);
}
});
} }
// 下载模板 // 下载模板

@ -48,14 +48,12 @@ import {
GasStaffStatusPipe, GasStaffStatusPipe,
PayStatusPipe, PayStatusPipe,
ChlidRechargeStatusPipe, ChlidRechargeStatusPipe,
SourceTypePipe, GasClassGroupTaskStatusPipe, GasOrderStatusPipe SourceTypePipe, GasClassGroupTaskStatusPipe, GasOrderStatusPipe, PlatformPipe, ProductConfigPipe, OilCardStatusPipe
} from './pipes'; } from './pipes';
import {OilCardStatusPipe} 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';
import {OilPriceTaskExecutionTypePipe} from './pipes/gas-oil-price/oil-price-task-execution-type.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 {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 { 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';
@ -112,6 +110,7 @@ const PIPES = [
IntegralTypePipe, IntegralTypePipe,
IntegralProductPipe, IntegralProductPipe,
MsgTypePipe, MsgTypePipe,
ProductConfigPipe
]; ];
@ -124,7 +123,7 @@ const PIPES = [
NgxNeditorModule NgxNeditorModule
], ],
declarations: [ declarations: [
...PIPES ...PIPES,
], ],
exports: [ exports: [

@ -157,6 +157,11 @@ const routes: Routes = [
loadChildren: () => import('./admin/promotion/promotion.module').then(m => m.PromotionModule), loadChildren: () => import('./admin/promotion/promotion.module').then(m => m.PromotionModule),
canActivate: [InitGuardService] canActivate: [InitGuardService]
}, },
{
path: 'api-order',
loadChildren: () => import('./admin/api-order/api-order.module').then(m => m.ApiOrderModule),
canActivate: [InitGuardService]
},
], ],
}, },
]; ];

@ -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-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';

@ -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 '星巴克接口';
}
}
}

@ -15,16 +15,5 @@ export class MsgTypePipe implements PipeTransform {
return this.array[product][type - 1]; 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;
// }
} }

@ -1,7 +1,9 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import {CommonsService} from './commons.service'; import {CommonsService} from './commons.service';
import {environment} from "../../environments/environment"; import {environment} from '../../environments/environment';
import {HttpClient} from '@angular/common/http'; import {HttpClient} from '@angular/common/http';
import {take} from "rxjs/operators";
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
@ -122,7 +124,7 @@ export class ApiMerchantsService {
* @methodName configApiProduct * @methodName configApiProduct
* @Description // 提交配置产品 * @Description // 提交配置产品
* @Date 18:00 2022/6/8 * @Date 18:00 2022/6/8
* @Param * @Param configApiProduct
*/ */
public configApiProduct(params: object, callBack) { public configApiProduct(params: object, callBack) {
this.http.post(environment.baseUrl + 'apiProduct/configApiProduct', params).subscribe(data => { this.http.post(environment.baseUrl + 'apiProduct/configApiProduct', params).subscribe(data => {
@ -167,4 +169,57 @@ export class ApiMerchantsService {
callBack(data); 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);
});
}
} }

@ -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://hsg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'https://hsg.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=',
}; };

@ -13,12 +13,21 @@
.fr { .fr {
float: right; float: right;
} }
.ml {
margin-left: 20px;
}
.box-shadow:hover {
box-shadow: #e8e8e8 0 0 4px 2px;
}
.cp { .cp {
cursor: pointer; cursor: pointer;
} }
.br { .br {
border-right: solid 1px #e8e8ed; border-right: solid 1px #e8e8ed;
} }
.mt {
margin-top: 8px;
}
.inner-content { .inner-content {
padding: 24px; padding: 24px;
background: #fff; background: #fff;

Loading…
Cancel
Save