提交修改自建站

pull/1/head
袁野 3 years ago
parent ce9300e22e
commit f371b7d694
  1. 57
      src/app/admin/index/index/index.component.html
  2. 8
      src/app/admin/index/index/index.component.ts
  3. 5
      src/app/admin/merchant-store/store-list/store-list.component.ts
  4. 24
      src/app/admin/navigation/navigation.component.ts
  5. 2
      src/app/admin/order/order-routing.module.ts
  6. 3
      src/app/admin/order/order.module.ts
  7. 4
      src/app/pipes/recharge-status.pipe.ts
  8. 18
      src/app/services/order.service.ts
  9. 8
      src/environments/environment.ts

@ -8,13 +8,23 @@
<!--条件搜索--> <!--条件搜索-->
<div class="inner-content" *ngIf="roleType == 3"> <div class="inner-content" *ngIf="roleType == 3">
<div nz-row style="margin-top: 20px;" [nzGutter]="16"> <div nz-row style="margin-top: 20px;" [nzGutter]="16" (click)="isVisibleOil = true">
<div nz-col nzSpan="8">
<nz-card nzHoverable [nzLoading]="loading">
<h3>预充值账号余额</h3>
<p>余额:{{balanceData['amounts']}}</p>
</nz-card>
</div>
<div nz-col nzSpan="8"> <div nz-col nzSpan="8">
<nz-card nzHoverable [nzLoading]="loading"> <nz-card nzHoverable [nzLoading]="loading">
<h3>预充值账号</h3> <h3>预充值账号今日收入</h3>
<p>余额:{{(balanceData['amounts']).toFixed(2)}}</p>
<p>今日收入:{{todayBalanceData['incomePrice'] == null ? '0': todayBalanceData['incomePrice']}}</p> <p>今日收入:{{todayBalanceData['incomePrice'] == null ? '0': todayBalanceData['incomePrice']}}</p>
<p>今日收款笔数:{{todayBalanceData['incomeCount'] == null ? '0': todayBalanceData['incomeCount']}}</p> <p>今日收款笔数:{{todayBalanceData['incomeCount'] == null ? '0': todayBalanceData['incomeCount']}}</p>
</nz-card>
</div>
<div nz-col nzSpan="8">
<nz-card nzHoverable [nzLoading]="loading">
<h3>预充值账号今日退款</h3>
<p>今日退款金额:{{todayBalanceData['refundPrice'] == null ? '0': todayBalanceData['refundPrice']}}</p> <p>今日退款金额:{{todayBalanceData['refundPrice'] == null ? '0': todayBalanceData['refundPrice']}}</p>
<p>今日退款笔数:{{todayBalanceData['incomeCount'] == null ? '0': todayBalanceData['incomeCount']}}</p> <p>今日退款笔数:{{todayBalanceData['incomeCount'] == null ? '0': todayBalanceData['incomeCount']}}</p>
</nz-card> </nz-card>
@ -153,20 +163,27 @@
</div> </div>
</nz-modal> </nz-modal>
<div nz-col nzSpan="8"> <nz-modal [(nzVisible)]="isVisibleOil" nzWidth="900" nzTitle="预充值账户记录" (nzOnCancel)="isVisibleOil = false" (nzOnOk)="isVisibleOil = false">
<nz-card nzHoverable [nzLoading]="loading" (click)="edit(10)"> <nz-table #RecordList [nzData]="recordList" style="margin-top: 20px;" [nzScroll]="{ x: '900px' }">
<h3>中石化订单</h3> <thead>
<p>订单数量:{{orderData['count']}}</p> <tr>
<p>订单总额:{{orderData['orderPrice'] == null ? '0': orderData['orderPrice']}}</p> <th nzWidth="80px">编号</th>
<p>支付总额:{{orderData['payRealPrice'] == null ? '0': orderData['payRealPrice']}}</p> <th nzWidth="100px">类型</th>
</nz-card> <th nzWidth="120px">金额</th>
</div> <th nzWidth="140px">变更前金额</th>
<th nzWidth="140px">变更后金额</th>
<div nz-col nzSpan="8"> <th nzWidth="180px">内容</th>
<nz-card nzHoverable [nzLoading]="loading" (click)="edit(11)"> </tr>
<h3>中石化订单</h3> </thead>
<p>订单数量:{{orderData['count']}}</p> <tbody>
<p>订单总额:{{orderData['orderPrice'] == null ? '0': orderData['orderPrice']}}</p> <tr *ngFor="let data of RecordList.data; let i = index">
<p>支付总额:{{orderData['payRealPrice'] == null ? '0': orderData['payRealPrice']}}</p> <td>{{i+1}}</td>
</nz-card> <td>{{data.type == 1 ? '进账': '出账'}}</td>
</div> <td>{{data.amount}}</td>
<td>{{data.beforeAmount}}</td>
<td>{{data.afterAmount}}</td>
<td>{{data.sourceContent}}</td>
</tr>
</tbody>
</nz-table>
</nz-modal>

@ -4,7 +4,7 @@ import {LocalStorageService} from '../../../services/local-storage.service';
import {IndexService} from '../../../services/index.service'; import {IndexService} from '../../../services/index.service';
import {NzMessageService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd'; import {NzMessageService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
import {environment} from '../../../../environments/environment'; import {environment} from '../../../../environments/environment';
import {Router} from "_@angular_router@9.0.7@@angular/router"; import {Router} from '_@angular_router@9.0.7@@angular/router';
@Component({ @Component({
@ -18,6 +18,7 @@ export class IndexComponent implements OnInit {
loading = true; loading = true;
isVisible = false; isVisible = false;
isVisibleAdd = false; isVisibleAdd = false;
isVisibleOil = false;
balance: number; balance: number;
price: number; price: number;
code = 60; code = 60;
@ -28,6 +29,7 @@ export class IndexComponent implements OnInit {
balanceData = {}; balanceData = {};
rechargeData = {}; rechargeData = {};
todayBalanceData = {}; todayBalanceData = {};
recordList = [];
tyBalance; tyBalance;
webSocket: WebSocket; webSocket: WebSocket;
@ -243,7 +245,6 @@ export class IndexComponent implements OnInit {
public getAccount(): void { public getAccount(): void {
this.index.getAccount(data => { this.index.getAccount(data => {
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
console.log(data);
this.balanceData = data['return_data']; this.balanceData = data['return_data'];
this.loading = false; this.loading = false;
} else { } else {
@ -273,7 +274,8 @@ export class IndexComponent implements OnInit {
}; };
this.index.getAccountRecordList(paramsObject, data => { this.index.getAccountRecordList(paramsObject, data => {
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
console.log(data); this.recordList = data['return_data'].list;
console.log(this.recordList);
} else { } else {
this.message.error(data['return_msg']); this.message.error(data['return_msg']);
} }

@ -22,6 +22,7 @@ export class StoreListComponent implements OnInit {
pageSize = 10; // 条码 pageSize = 10; // 条码
loading = true; loading = true;
id = null; id = null;
storeId = null;
name: string; name: string;
price: string; price: string;
WEB_SERVE_URL = environment.baseUrl; WEB_SERVE_URL = environment.baseUrl;
@ -179,7 +180,7 @@ export class StoreListComponent implements OnInit {
// 增加余额 // 增加余额
public getRecharge(id): void { public getRecharge(id): void {
this.id = id; this.storeId = id;
this.isVisibleAdd = true; this.isVisibleAdd = true;
} }
@ -190,7 +191,7 @@ export class StoreListComponent implements OnInit {
return; return;
} }
const paramsObject = { const paramsObject = {
storeId: this.id, storeId: this.storeId,
amount: this.price amount: this.price
}; };
this.index.recharge(paramsObject, data => { this.index.recharge(paramsObject, data => {

@ -1,6 +1,14 @@
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {LocalStorageService} from '../../services/local-storage.service'; import {LocalStorageService} from '../../services/local-storage.service';
import {DATA, ROUTENAME, MENUNAME, CHILDMENUNAME, INIT_FLAG, ADMIN_INFO_OBJECT, TOKEN} from '../../services/local-storage.namespace'; import {
DATA,
ROUTENAME,
MENUNAME,
CHILDMENUNAME,
INIT_FLAG,
ADMIN_INFO_OBJECT,
TOKEN
} from '../../services/local-storage.namespace';
import {LoginService} from '../../services/login.service'; import {LoginService} from '../../services/login.service';
import {NzMessageService, NzModalService} from 'ng-zorro-antd'; import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {Router} from '@angular/router'; import {Router} from '@angular/router';
@ -12,11 +20,12 @@ import {Md5} from 'ts-md5';
import {environment} from '../../../environments/environment'; import {environment} from '../../../environments/environment';
import {HttpClient} from '@angular/common/http'; import {HttpClient} from '@angular/common/http';
import {CompanyTwoPwdService} from '../../services/company-two-pwd.service'; import {CompanyTwoPwdService} from '../../services/company-two-pwd.service';
import {WebsocketService} from '../../services/websocket.service';
@Component({ @Component({
selector: 'app-navigation', selector: 'app-navigation',
templateUrl: './navigation.component.html', templateUrl: './navigation.component.html',
styleUrls: ['./navigation.component.less'] styleUrls: ['./navigation.component.less'],
}) })
export class NavigationComponent implements OnInit { export class NavigationComponent implements OnInit {
@ -29,6 +38,7 @@ export class NavigationComponent implements OnInit {
menuList: any; menuList: any;
routeName: string; routeName: string;
switchValue = false; switchValue = false;
constructor( constructor(
private storage: LocalStorageService, private storage: LocalStorageService,
private loginService: LoginService, private loginService: LoginService,
@ -37,10 +47,13 @@ export class NavigationComponent implements OnInit {
private companyTwoPwdService: CompanyTwoPwdService, private companyTwoPwdService: CompanyTwoPwdService,
private http: HttpClient, // http请求 private http: HttpClient, // http请求
private iconService: IconService, private iconService: IconService,
private webSocketService: WebsocketService,
private store: LocalStorageService, // 数据请求
private modal: NzModalService, private modal: NzModalService,
private fb: FormBuilder, // 表单 private fb: FormBuilder, // 表单
private router: Router, private router: Router,
) { } ) {
}
ngOnInit(): void { ngOnInit(): void {
this.validateForm = this.fb.group({ this.validateForm = this.fb.group({
@ -55,6 +68,10 @@ export class NavigationComponent implements OnInit {
this.switchValue = data['return_data']['codeValue'] === '1'; 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']; // 定义菜单数据
// 连接websocket
// this.webSocketService.connect(`wss://hsgcs.dctpay.com/msg/WebSocket/` + this.store.get(ADMIN_INFO_OBJECT)['merchantStore'].id);
} }
public activeLi(routeName): void { public activeLi(routeName): void {
@ -171,5 +188,4 @@ export class NavigationComponent implements OnInit {
} }
} }

@ -13,6 +13,7 @@ import {PreOrderComponent} from './pre-order/pre-order.component';
import {PackageRecordListComponent} from './package-record-list/package-record-list.component'; import {PackageRecordListComponent} from './package-record-list/package-record-list.component';
import {DiscountUseConditionListComponent} from './discount-use-condition-list/discount-use-condition-list.component'; import {DiscountUseConditionListComponent} from './discount-use-condition-list/discount-use-condition-list.component';
import {DicountPackageOrderListComponent} from './dicount-package-order-list/dicount-package-order-list.component'; import {DicountPackageOrderListComponent} from './dicount-package-order-list/dicount-package-order-list.component';
import {OilStationOrderComponent} from './oil-station-order/oil-station-order.component';
const routes: Routes = [ const routes: Routes = [
@ -29,6 +30,7 @@ const routes: Routes = [
{ path: 'package-record-list', component: PackageRecordListComponent }, { path: 'package-record-list', component: PackageRecordListComponent },
{ path: 'discount-use-condition-list', component: DiscountUseConditionListComponent }, { path: 'discount-use-condition-list', component: DiscountUseConditionListComponent },
{ path: 'discount-package-order-list', component: DicountPackageOrderListComponent}, { path: 'discount-package-order-list', component: DicountPackageOrderListComponent},
{ path: 'oil_station_order', component: OilStationOrderComponent},
]; ];
@NgModule({ @NgModule({

@ -22,9 +22,10 @@ import { PackageRecordListComponent } from './package-record-list/package-record
import { DiscountUseConditionListComponent } from './discount-use-condition-list/discount-use-condition-list.component'; import { DiscountUseConditionListComponent } from './discount-use-condition-list/discount-use-condition-list.component';
import {DicountPackageOrderListComponent} from "./dicount-package-order-list/dicount-package-order-list.component"; import {DicountPackageOrderListComponent} from "./dicount-package-order-list/dicount-package-order-list.component";
import {NzSpaceModule} from "_ng-zorro-antd@9.3.0@ng-zorro-antd/space"; import {NzSpaceModule} from "_ng-zorro-antd@9.3.0@ng-zorro-antd/space";
import { OilStationOrderComponent } from './oil-station-order/oil-station-order.component';
@NgModule({ @NgModule({
declarations: [OrderListComponent, OrderDetailComponent, OrderCouponsComponent, OrderCouponComponent , OrderTListComponent, OrderKListComponent , OrderCListComponent, OrderHListComponent, OrderAgentComponent, PreOrderComponent, PackageRecordListComponent, DiscountUseConditionListComponent, DicountPackageOrderListComponent], declarations: [OrderListComponent, OrderDetailComponent, OrderCouponsComponent, OrderCouponComponent , OrderTListComponent, OrderKListComponent , OrderCListComponent, OrderHListComponent, OrderAgentComponent, PreOrderComponent, PackageRecordListComponent, DiscountUseConditionListComponent, DicountPackageOrderListComponent, OilStationOrderComponent],
imports: [ imports: [
CommonModule, CommonModule,
OrderRoutingModule, OrderRoutingModule,

@ -14,9 +14,9 @@ export class RechargeStatusPipe implements PipeTransform {
case 3: case 3:
return '已完成'; return '已完成';
case 4: case 4:
return '已取消';
case 5:
return '已退款'; return '已退款';
case 5:
return '已取消';
case 6: case 6:
return '退款中'; return '退款中';
} }

@ -26,6 +26,18 @@ export class OrderService {
}); });
} }
/**
*
*
* @param paramsObject
* @param callBack
*/
public getGasOrderListByOil(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'highGas/getGasOrderList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/** /**
* @Author Sum1Dream * @Author Sum1Dream
* @methodName getDiscountPackageList * @methodName getDiscountPackageList
@ -233,4 +245,10 @@ export class OrderService {
}); });
} }
public getGasOrderDetail(orderNo: string , callBack) {
this.http.get(environment.baseUrl + 'highGas/getGasOrderDetail?orderNo=' + orderNo).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://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'https://hsgcs.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=',
}; };

Loading…
Cancel
Save