pull/1/head
袁野 3 years ago
commit 33743161b9
  1. 3
      src/app/admin/navigation/navigation.component.html
  2. 17
      src/app/admin/navigation/navigation.component.ts
  3. 26
      src/app/admin/recharge-order/order-list/order-list.component.ts
  4. 2
      src/app/admin/recharge-order/order-statistical/order-statistical.component.ts
  5. 6
      src/app/admin/recharge-order/price-list/price-list.component.ts
  6. 4
      src/app/admin/recharge-order/recharge-order.module.ts
  7. 6
      src/app/admin/recharge-order/user-edit/user-edit.component.ts
  8. 9
      src/app/admin/recharge-order/user-statistical/user-statistical.component.ts
  9. 6
      src/app/admin/recharge-order/user/user.component.ts
  10. 12
      src/app/services/commons.service.ts
  11. 2
      src/app/services/recharge.service.ts
  12. 2
      src/environments/environment.ts

@ -28,7 +28,8 @@
[nzType]="isCollapsed ? 'menu-unfold' : 'menu-fold'" [nzType]="isCollapsed ? 'menu-unfold' : 'menu-fold'"
></i> ></i>
</span> </span>
<button nz-button (click)="getBack()" nzType="primary">上一步</button> 系统开关:
<nz-switch [ngModel]="switchValue" (click)="clickSwitch()" nzCheckedChildren="开" nzUnCheckedChildren="关"></nz-switch>
<a style="float: right; margin-right:30px;" nz-dropdown [nzDropdownMenu]="menu"> <a style="float: right; margin-right:30px;" nz-dropdown [nzDropdownMenu]="menu">
{{userInfo.secUser.userName}} {{userInfo.secUser.userName}}
<i nz-icon nzType="down"></i> <i nz-icon nzType="down"></i>

@ -6,6 +6,7 @@ import {NzMessageService} from 'ng-zorro-antd';
import {Router} from '@angular/router'; import {Router} from '@angular/router';
import {IconService} from '../../services/icon.service'; import {IconService} from '../../services/icon.service';
import {RechargeService} from '../../services/recharge.service'; import {RechargeService} from '../../services/recharge.service';
import {CommonsService} from '../../services/commons.service';
@Component({ @Component({
selector: 'app-navigation', selector: 'app-navigation',
@ -18,10 +19,12 @@ export class NavigationComponent implements OnInit {
userInfo: any; userInfo: any;
menuList: any; menuList: any;
routeName: string; routeName: string;
switchValue = false;
constructor( constructor(
private storage: LocalStorageService, private storage: LocalStorageService,
private loginService: LoginService, private loginService: LoginService,
private message: NzMessageService, private message: NzMessageService,
private commonsService: CommonsService,
private iconService: IconService, private iconService: IconService,
private router: Router, private router: Router,
) { } ) { }
@ -29,6 +32,9 @@ export class NavigationComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.routeName = this.storage.get(ROUTENAME) == null ? 'index' : this.storage.get(ROUTENAME); this.routeName = this.storage.get(ROUTENAME) == null ? 'index' : this.storage.get(ROUTENAME);
this.userInfo = this.storage.getList(ADMIN_INFO_OBJECT); this.userInfo = this.storage.getList(ADMIN_INFO_OBJECT);
this.commonsService.mappingSysNameOl('RECHARGE', data => {
this.switchValue = data['return_data']['codeValue'] === '1';
});
this.menuList = this.storage.getList(ADMIN_INFO_OBJECT)['menuList']; // 定义菜单数据 this.menuList = this.storage.getList(ADMIN_INFO_OBJECT)['menuList']; // 定义菜单数据
} }
@ -62,4 +68,15 @@ export class NavigationComponent implements OnInit {
history.back(); history.back();
} }
clickSwitch(): void {
this.switchValue = !this.switchValue;
this.commonsService.updateDictionary('RECHARGE' , this.switchValue === true ? '1' : '0' , data => {
if (data['return_code'] === '000000') {
this.message.success(data['return_data']);
} else {
this.message.error(data['return_msg']);
}
});
}
} }

@ -1,14 +1,15 @@
import {Component, OnDestroy, OnInit} from '@angular/core'; import {Component, OnDestroy, OnInit} from '@angular/core';
import {environment} from '../../../../environments/environment'; import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup, Validators} from '_@angular_forms@9.0.7@@angular/forms';
import {DiscountService} from '../../../services/discount.service'; import {DiscountService} from '../../../services/discount.service';
import {CouponService} from '../../../services/coupon.service'; import {CouponService} from '../../../services/coupon.service';
import {IconService} from '../../../services/icon.service'; import {IconService} from '../../../services/icon.service';
import {NzMessageService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
import {Router} from '_@angular_router@9.0.7@@angular/router';
import {CommonsService} from '../../../services/commons.service'; import {CommonsService} from '../../../services/commons.service';
import {RechargeService} from '../../../services/recharge.service'; import {RechargeService} from '../../../services/recharge.service';
import {NzNotificationService} from 'ng-zorro-antd'; import {NzMessageService, NzNotificationService} from 'ng-zorro-antd';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {Router} from '@angular/router';
@Component({ @Component({
selector: 'app-order-list', selector: 'app-order-list',
@ -47,15 +48,18 @@ export class OrderListComponent implements OnInit , OnDestroy {
this.init(); this.init();
this.timer = setInterval(() => { // 设置定时刷新事件,每隔1分钟刷新 this.timer = setInterval(() => { // 设置定时刷新事件,每隔1分钟刷新
this.recharge.countOrder(data => { this.recharge.countOrder(data => {
this.notification.info( if (data['return_data'] > 0) {
'充值订单',
'您有' + data['return_data'] + '条未充值的订单,请尽快充值,点击可查看未充值订单!'
).onClick.subscribe(() => {
this.searchForm.value.status = 2;
this.getRequest(true, this.searchForm.value); this.getRequest(true, this.searchForm.value);
}); this.notification.info(
'充值订单',
'您有' + data['return_data'] + '条未充值的订单,请尽快充值,点击可查看未充值订单!'
).onClick.subscribe(() => {
this.searchForm.value.status = 2;
this.getRequest(true, this.searchForm.value);
});
}
}); });
}, 60000); }, 5000);
} }
// 销毁 // 销毁

@ -1,8 +1,8 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import {RechargeService} from '../../../services/recharge.service'; import {RechargeService} from '../../../services/recharge.service';
import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms';
import {NzMessageService} from 'ng-zorro-antd'; import {NzMessageService} from 'ng-zorro-antd';
import {environment} from '../../../../environments/environment'; import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup} from '@angular/forms';
@Component({ @Component({
selector: 'app-order-statistical', selector: 'app-order-statistical',

@ -1,13 +1,13 @@
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {environment} from '../../../../environments/environment'; import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup, Validators} from '_@angular_forms@9.0.7@@angular/forms'; import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {DiscountService} from '../../../services/discount.service'; import {DiscountService} from '../../../services/discount.service';
import {CouponService} from '../../../services/coupon.service'; import {CouponService} from '../../../services/coupon.service';
import {IconService} from '../../../services/icon.service'; import {IconService} from '../../../services/icon.service';
import {NzMessageService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd'; import {Router} from '@angular/router';
import {Router} from '_@angular_router@9.0.7@@angular/router';
import {CommonsService} from '../../../services/commons.service'; import {CommonsService} from '../../../services/commons.service';
import {RechargeService} from '../../../services/recharge.service'; import {RechargeService} from '../../../services/recharge.service';
import {NzMessageService} from 'ng-zorro-antd';
@Component({ @Component({
selector: 'app-price-list', selector: 'app-price-list',

@ -4,9 +4,9 @@ import { CommonModule } from '@angular/common';
import { RechargeOrderRoutingModule } from './recharge-order-routing.module'; import { RechargeOrderRoutingModule } from './recharge-order-routing.module';
import { OrderListComponent } from './order-list/order-list.component'; import { OrderListComponent } from './order-list/order-list.component';
import { PriceListComponent } from './price-list/price-list.component'; import { PriceListComponent } from './price-list/price-list.component';
import {NgZorroAntdModule} from '_ng-zorro-antd@9.3.0@ng-zorro-antd'; import {NgZorroAntdModule} from 'ng-zorro-antd';
import {SeparateModule} from '../../common/separate/separate.module'; import {SeparateModule} from '../../common/separate/separate.module';
import {FormsModule, ReactiveFormsModule} from '_@angular_forms@9.0.7@@angular/forms'; import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module'; import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module';
import {RegionSelectorModule} from '../../common/region-selector/region-selector.module'; import {RegionSelectorModule} from '../../common/region-selector/region-selector.module';
import {AppCommonModule} from '../../app-common.module'; import {AppCommonModule} from '../../app-common.module';

@ -1,10 +1,10 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import {FormBuilder, FormGroup, Validators} from '_@angular_forms@9.0.7@@angular/forms'; import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {environment} from '../../../../environments/environment'; import {environment} from '../../../../environments/environment';
import {AgentService} from '../../../services/agent.service'; import {AgentService} from '../../../services/agent.service';
import {NzMessageService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
import {ActivatedRoute} from '_@angular_router@9.0.7@@angular/router';
import {ValidatorsService} from '../../../services/validators.service'; import {ValidatorsService} from '../../../services/validators.service';
import {NzMessageService} from 'ng-zorro-antd';
import {ActivatedRoute} from '@angular/router';
@Component({ @Component({
selector: 'app-user-edit', selector: 'app-user-edit',

@ -1,8 +1,9 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import {FormBuilder, FormGroup} from "_@angular_forms@9.0.7@@angular/forms"; import {FormBuilder, FormGroup} from '@angular/forms';
import {environment} from "../../../../environments/environment"; import {NzMessageService} from 'ng-zorro-antd';
import {RechargeService} from "../../../services/recharge.service"; import {RechargeService} from '../../../services/recharge.service';
import {NzMessageService} from "_ng-zorro-antd@9.3.0@ng-zorro-antd"; import {environment} from '../../../../environments/environment';
@Component({ @Component({
selector: 'app-user-statistical', selector: 'app-user-statistical',

@ -1,13 +1,13 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment'; import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup, Validators} from '_@angular_forms@9.0.7@@angular/forms';
import {AgentService} from '../../../services/agent.service'; import {AgentService} from '../../../services/agent.service';
import {DiscountService} from '../../../services/discount.service'; import {DiscountService} from '../../../services/discount.service';
import {CouponService} from '../../../services/coupon.service'; import {CouponService} from '../../../services/coupon.service';
import {IconService} from '../../../services/icon.service'; import {IconService} from '../../../services/icon.service';
import {NzMessageService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
import {Router} from '_@angular_router@9.0.7@@angular/router';
import {CommonsService} from '../../../services/commons.service'; import {CommonsService} from '../../../services/commons.service';
import {NzMessageService} from 'ng-zorro-antd';
import {FormBuilder, FormGroup} from '@angular/forms';
import {Router} from '@angular/router';
@Component({ @Component({
selector: 'app-user', selector: 'app-user',

@ -167,6 +167,18 @@ export class CommonsService {
}); });
} }
public mappingSysNameOl(codeType: string , callback): any {
this.http.get(environment.baseUrl + '/common/getDictionaryByCodeTypeOl?codeType=' + codeType).subscribe( data => {
callback(data);
});
}
public updateDictionary(codeType: string , codeValue: string , callback): any {
this.http.get(environment.baseUrl + '/common/updateDictionary?codeType=' + codeType + '&codeValue=' + codeValue).subscribe( data => {
callback(data);
});
}
/** /**
* *
* *

@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import {HttpClient} from '_@angular_common@9.0.7@@angular/common/http'; import {HttpClient} from '@angular/common/http';
import {CommonsService} from './commons.service'; import {CommonsService} from './commons.service';
import {environment} from '../../environments/environment'; import {environment} from '../../environments/environment';

@ -6,7 +6,7 @@ export const environment = {
production: false, production: false,
baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'http://localhost:9302/filesystem/', imageUrl: 'http://localhost:9302/filesystem/',
// baseUrl: 'https://hsgcs.dctpay.com/brest/', // 正式环境服务器地址(请求数据地址) // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'https://hsgcs.dctpay.com/filesystem/', // imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
}; };

Loading…
Cancel
Save