@@ -196,15 +229,18 @@
-
+
- 编号 |
- 类型 |
- 交易金额 |
- 变更前金额 |
- 变更后金额 |
+ 编号 |
+ 类型 |
+ 交易金额 |
+ 变更前金额 |
+ 变更后金额 |
+ 来源类型 |
内容 |
+ 操作时间 |
+ 操作人 |
@@ -214,7 +250,13 @@
{{'¥' + data.amount}} |
{{'¥' + data.beforeAmount}} |
{{'¥' + data.afterAmount}} |
+
+ 金额充值
+ 订单消费
+ 订单退款
| {{data.sourceContent}} |
+ {{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.opUserName}} |
diff --git a/src/app/admin/index/index/index.component.ts b/src/app/admin/index/index/index.component.ts
index 4f38c5c..9efaa93 100644
--- a/src/app/admin/index/index/index.component.ts
+++ b/src/app/admin/index/index/index.component.ts
@@ -34,6 +34,10 @@ export class IndexComponent implements OnInit {
history: {},
today: {},
};
+ merGasCount: any = {
+ amount: 0,
+ storeList: []
+ };
recordList = [];
tyBalance;
webSocket: WebSocket;
@@ -72,6 +76,10 @@ export class IndexComponent implements OnInit {
this.getGasAccount();
}
}
+
+ if (this.store.get(ADMIN_INFO_OBJECT)['secUser']['objectType'] === 2) {
+ this.getMerGasStatistical();
+ }
}
// 查询余额
@@ -272,6 +280,18 @@ export class IndexComponent implements OnInit {
});
}
+ // 查询加油站统计
+ public getMerGasStatistical(): void {
+ this.index.getMerGasStatistical(data => {
+ if (data['return_code'] === '000000') {
+ this.merGasCount = data['return_data'];
+ this.loading = false;
+ } else {
+ this.message.error(data['return_msg']);
+ }
+ });
+ }
+
// 查询预存账户油站记录
public getGasAccountRecord(): void {
const paramsObject = {
diff --git a/src/app/admin/login/login/login.component.ts b/src/app/admin/login/login/login.component.ts
index b1847ef..333777c 100644
--- a/src/app/admin/login/login/login.component.ts
+++ b/src/app/admin/login/login/login.component.ts
@@ -1,12 +1,13 @@
import {Component, OnInit} from '@angular/core';
import {FormGroup, Validators, FormBuilder} from '@angular/forms';
import {LoginService} from '../../../services/login.service';
-import {NzModalService} from 'ng-zorro-antd';
+import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {ADMIN_INFO_OBJECT, TOKEN, INIT_FLAG, LOGINTYPE} from '../../../services/local-storage.namespace';
import {LocalStorageService} from '../../../services/local-storage.service';
import {Router} from '@angular/router';
import {HttpClient} from '@angular/common/http';
+
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
@@ -21,6 +22,7 @@ export class LoginComponent implements OnInit {
private form: FormBuilder, // 表单校验
private http: HttpClient, // http请求
private loginService: LoginService,
+ private message: NzMessageService,
private modal: NzModalService) {
}
@@ -55,11 +57,9 @@ export class LoginComponent implements OnInit {
this.store.set(LOGINTYPE, data['return_data']['type']);
this.router.navigateByUrl('/admin/index').then();
} else {
- this.modal.warning({
- nzTitle: '提示',
- nzContent: data['return_msg']
- });
+ this.message.error(data['return_msg']);
}
});
+
}
}
diff --git a/src/app/admin/merchant/merchant-list/merchant-list.component.html b/src/app/admin/merchant/merchant-list/merchant-list.component.html
index dcecb3d..706d723 100644
--- a/src/app/admin/merchant/merchant-list/merchant-list.component.html
+++ b/src/app/admin/merchant/merchant-list/merchant-list.component.html
@@ -80,7 +80,7 @@
商户电话 |
创建时间 |
状态 |
- 操作 |
+ 操作 |
@@ -103,10 +103,27 @@
+
+
+
+
+
+
+
diff --git a/src/app/admin/merchant/merchant-list/merchant-list.component.ts b/src/app/admin/merchant/merchant-list/merchant-list.component.ts
index 53fd260..3737264 100644
--- a/src/app/admin/merchant/merchant-list/merchant-list.component.ts
+++ b/src/app/admin/merchant/merchant-list/merchant-list.component.ts
@@ -1,11 +1,12 @@
import { Component, OnInit } from '@angular/core';
-import {FormBuilder, FormGroup} from '@angular/forms';
+import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {IconService} from '../../../services/icon.service';
-import {NzMessageService} from 'ng-zorro-antd';
+import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {CommonsService} from '../../../services/commons.service';
import {MerchantService} from '../../../services/merchant.service';
import {Router} from '@angular/router';
import {environment} from '../../../../environments/environment';
+import {MerAmountService} from "../../../services/mer-amount.service";
@Component({
selector: 'app-merchant-list',
@@ -21,13 +22,18 @@ export class MerchantListComponent implements OnInit {
pageSize = 10; // 条码
loading = true;
+ rechargeModal = false;
+ rechargeForm: FormGroup; // 充值模态框
+
constructor(
private form: FormBuilder,
private merchant: MerchantService,
private iconService: IconService,
private message: NzMessageService,
+ private merAmountService: MerAmountService,
private router: Router,
- private common: CommonsService
+ private common: CommonsService,
+ private modal: NzModalService,
) {
}
@@ -42,6 +48,11 @@ export class MerchantListComponent implements OnInit {
telephone: [null],
status: [null],
});
+
+ this.rechargeForm = this.form.group({
+ merId: [null],
+ amount: [null, [Validators.required]],
+ });
this.getRequest(true, this.searchForm.value);
}
@@ -131,5 +142,45 @@ export class MerchantListComponent implements OnInit {
}
}).then(r => console.log(r));
}
+
+
+ showRechargeModal(merId: number) {
+ this.rechargeForm.patchValue({ merId: merId});
+ this.rechargeModal = true;
+ }
+
+ closeRechargeModal() {
+ this.rechargeModal = false;
+ }
+
+ submitRecharge() {
+ for (const i in this.rechargeForm.controls) {
+ this.rechargeForm.controls[i].markAsDirty();
+ this.rechargeForm.controls[i].updateValueAndValidity();
+ }
+ if (this.rechargeForm.status == null || this.rechargeForm.status !== 'VALID') {
+ this.modal.warning({
+ nzTitle: '提示',
+ nzContent: '请填写所有必填项',
+ });
+ return;
+ }
+
+ this.merAmountService.recharge(this.rechargeForm.value, data => {
+ if (data['return_code'] === '000000') {
+ this.modal.success({
+ nzTitle: '提示',
+ nzContent: '充值成功',
+ });
+ this.closeRechargeModal();
+ } else {
+ this.modal.error({
+ nzTitle: '提示',
+ nzContent: data['return_msg'],
+ });
+ }
+ });
+ }
+
}
diff --git a/src/app/admin/navigation/navigation.component.ts b/src/app/admin/navigation/navigation.component.ts
index 3c7a236..6aebddc 100644
--- a/src/app/admin/navigation/navigation.component.ts
+++ b/src/app/admin/navigation/navigation.component.ts
@@ -20,12 +20,11 @@ import {Md5} from 'ts-md5';
import {environment} from '../../../environments/environment';
import {HttpClient} from '@angular/common/http';
import {CompanyTwoPwdService} from '../../services/company-two-pwd.service';
-import {WebsocketService} from '../../services/websocket.service';
@Component({
selector: 'app-navigation',
templateUrl: './navigation.component.html',
- styleUrls: ['./navigation.component.less'],
+ styleUrls: ['./navigation.component.less']
})
export class NavigationComponent implements OnInit {
@@ -47,9 +46,8 @@ export class NavigationComponent implements OnInit {
private companyTwoPwdService: CompanyTwoPwdService,
private http: HttpClient, // http请求
private iconService: IconService,
- private webSocketService: WebsocketService,
- private store: LocalStorageService, // 数据请求
private modal: NzModalService,
+ private common: CommonsService,
private fb: FormBuilder, // 表单
private router: Router,
) {
@@ -69,11 +67,9 @@ export class NavigationComponent implements OnInit {
});
this.menuList = this.storage.getList(ADMIN_INFO_OBJECT)['menuList']; // 定义菜单数据
- // 连接websocket
- // this.webSocketService.connect(`wss://hsgcs.dctpay.com/msg/WebSocket/` + this.store.get(ADMIN_INFO_OBJECT)['merchantStore'].id);
-
}
+
public activeLi(routeName): void {
this.routeName = routeName;
this.storage.set(ROUTENAME, routeName);
diff --git a/src/app/admin/order/oil-station-order/oil-station-order.component.html b/src/app/admin/order/oil-station-order/oil-station-order.component.html
index b295686..7686ff5 100644
--- a/src/app/admin/order/oil-station-order/oil-station-order.component.html
+++ b/src/app/admin/order/oil-station-order/oil-station-order.component.html
@@ -111,8 +111,8 @@
{{data.status | orderCouponStatus}} |
详情
-
- 退款
+
+ 退款
|
diff --git a/src/app/admin/order/oil-station-order/oil-station-order.component.ts b/src/app/admin/order/oil-station-order/oil-station-order.component.ts
index cbd0e9b..4c78b49 100644
--- a/src/app/admin/order/oil-station-order/oil-station-order.component.ts
+++ b/src/app/admin/order/oil-station-order/oil-station-order.component.ts
@@ -10,6 +10,7 @@ import {MerchantService} from '../../../services/merchant.service';
import {LocalStorageService} from '../../../services/local-storage.service';
import {CommonsService} from '../../../services/commons.service';
import {WebsocketService} from '../../../services/websocket.service';
+import {ADMIN_INFO_OBJECT} from "../../../services/local-storage.namespace";
@Component({
selector: 'app-oil-station-order',
@@ -34,6 +35,7 @@ export class OilStationOrderComponent implements OnInit {
isVisibleDetail = false;
refundContent: string;
roleType: number;
+ secUser: object;
constructor(
private form: FormBuilder,
private order: OrderService,
@@ -49,6 +51,7 @@ export class OilStationOrderComponent implements OnInit {
}
ngOnInit(): void {
+ this.secUser = this.store.get(ADMIN_INFO_OBJECT)['secUser'];
this.init();
// 接收消息
this.webSocketService.messageSubject.subscribe(
diff --git a/src/app/admin/recharge-order/order-list/order-list.component.html b/src/app/admin/recharge-order/order-list/order-list.component.html
index 6d700a0..6f6d80f 100644
--- a/src/app/admin/recharge-order/order-list/order-list.component.html
+++ b/src/app/admin/recharge-order/order-list/order-list.component.html
@@ -64,7 +64,7 @@
充值号码
-
+