提交代码

pull/1/head
胡锐 3 years ago
parent 04073709db
commit 57a31e1a83
  1. 100
      src/app/admin/index/index/index.component.html
  2. 39
      src/app/admin/index/index/index.component.ts
  3. 46
      src/app/admin/order/oil-station-order/oil-station-order.component.html
  4. 22
      src/app/admin/order/oil-station-order/oil-station-order.component.ts
  5. 4
      src/app/services/index.service.ts
  6. 7
      src/app/services/order.service.ts
  7. 8
      src/environments/environment.ts

@ -7,29 +7,62 @@
<!-- end 面包屑 --> <!-- end 面包屑 -->
<!--条件搜索--> <!--条件搜索-->
<div class="inner-content" *ngIf="roleType == 3"> <div class="inner-content" *ngIf="gasCountData.history.length != 0">
<div nz-row style="margin-top: 20px;" [nzGutter]="16" (click)="isVisibleOil = true"> <div *ngIf="adminInfoObject['merchantStore']['prestoreType'] == 1" style="width: 100%;text-align: center;">
<div nz-col nzSpan="8"> <nz-row [nzGutter]="16">
<nz-card nzHoverable [nzLoading]="loading"> <nz-col [nzSpan]="24">
<h3>预充值账号余额</h3> <nz-statistic [nzValue]="'' + balanceData['amounts']" [nzTitle]="'预存账户余额'" [nzSuffix]="suffixTpl"></nz-statistic>
<p>余额:{{balanceData['amounts']}}</p> <ng-template #suffixTpl><a (click)="isVisibleOil = true" style="font-size: 13px;">记录</a></ng-template>
</nz-card> </nz-col>
</div> </nz-row>
<div nz-col nzSpan="8">
<nz-card nzHoverable [nzLoading]="loading">
<h3>预充值账号今日收入</h3>
<p>今日收入:{{todayBalanceData['incomePrice'] == null ? '0': todayBalanceData['incomePrice']}}</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['incomeCount'] == null ? '0': todayBalanceData['incomeCount']}}</p>
</nz-card>
</div>
</div> </div>
<br/><br/><br/>
<nz-card nzTitle="历史加油订单">
<nz-row [nzGutter]="16">
<nz-col [nzSpan]="4">
<nz-statistic [nzValue]="gasCountData.history.totalPrice ? gasCountData.history.totalPrice : 0" [nzTitle]="'加油总金额'"></nz-statistic>
</nz-col>
<nz-col [nzSpan]="4">
<nz-statistic [nzValue]="gasCountData.history.totalCount ? gasCountData.history.totalCount : 0" [nzTitle]="'加油总数量'"></nz-statistic>
</nz-col>
<nz-col [nzSpan]="4">
<nz-statistic [nzValue]="gasCountData.history.incomePrice ? gasCountData.history.incomePrice : 0" [nzTitle]="'加油金额'"></nz-statistic>
</nz-col>
<nz-col [nzSpan]="4">
<nz-statistic [nzValue]="gasCountData.history.incomeCount ? gasCountData.history.incomeCount : 0" [nzTitle]="'加油数量'"></nz-statistic>
</nz-col>
<nz-col [nzSpan]="4">
<nz-statistic [nzValue]="gasCountData.history.refundPrice ? gasCountData.history.refundPrice : 0" [nzTitle]="'退款金额'"></nz-statistic>
</nz-col>
<nz-col [nzSpan]="4">
<nz-statistic [nzValue]="gasCountData.history.refundCount ? gasCountData.history.refundCount : 0" [nzTitle]="'退款数量'"></nz-statistic>
</nz-col>
</nz-row>
</nz-card>
<br/><br/><br/>
<nz-card nzTitle="今日加油订单">
<nz-row [nzGutter]="16">
<nz-col [nzSpan]="4">
<nz-statistic [nzValue]="gasCountData.today.totalPrice ? gasCountData.today.totalPrice : 0" [nzTitle]="'加油总金额'"></nz-statistic>
</nz-col>
<nz-col [nzSpan]="4">
<nz-statistic [nzValue]="gasCountData.today.totalCount ? gasCountData.today.totalCount : 0" [nzTitle]="'加油总数量'"></nz-statistic>
</nz-col>
<nz-col [nzSpan]="4">
<nz-statistic [nzValue]="gasCountData.today.incomePrice ? gasCountData.today.incomePrice : 0" [nzTitle]="'加油金额'"></nz-statistic>
</nz-col>
<nz-col [nzSpan]="4">
<nz-statistic [nzValue]="gasCountData.today.incomeCount ? gasCountData.today.incomeCount : 0" [nzTitle]="'加油数量'"></nz-statistic>
</nz-col>
<nz-col [nzSpan]="4">
<nz-statistic [nzValue]="gasCountData.today.refundPrice ? gasCountData.today.refundPrice : 0" [nzTitle]="'退款金额'"></nz-statistic>
</nz-col>
<nz-col [nzSpan]="4">
<nz-statistic [nzValue]="gasCountData.today.refundCount ? gasCountData.today.refundCount : 0" [nzTitle]="'退款数量'"></nz-statistic>
</nz-col>
</nz-row>
</nz-card>
</div> </div>
<!--渠道公司--> <!--渠道公司-->
<div class="inner-content" *ngIf="roleType == 7"> <div class="inner-content" *ngIf="roleType == 7">
@ -149,7 +182,6 @@
</nz-table> </nz-table>
</nz-modal> </nz-modal>
<nz-modal [(nzVisible)]="isVisibleAdd" nzTitle="新增预充值余额" (nzOnCancel)="isVisibleAdd = false" (nzOnOk)="handleOk()"> <nz-modal [(nzVisible)]="isVisibleAdd" nzTitle="新增预充值余额" (nzOnCancel)="isVisibleAdd = false" (nzOnOk)="handleOk()">
<div nz-row> <div nz-row>
<div nz-col nzSpan="18"> <div nz-col nzSpan="18">
@ -163,25 +195,25 @@
</div> </div>
</nz-modal> </nz-modal>
<nz-modal [(nzVisible)]="isVisibleOil" nzWidth="900" nzTitle="预充值账户记录" (nzOnCancel)="isVisibleOil = false" (nzOnOk)="isVisibleOil = false"> <nz-modal [(nzVisible)]="isVisibleOil" nzWidth="900" nzTitle="预充值账户记录" [nzBodyStyle]="{ padding: '15px', height: '600px'}" (nzOnCancel)="isVisibleOil = false" [nzFooter]="null">
<nz-table #RecordList [nzData]="recordList" style="margin-top: 20px;" [nzScroll]="{ x: '900px' }"> <nz-table #RecordList [nzData]="recordList" [nzScroll]="{ y: '470px', x : '900px' }">
<thead> <thead>
<tr> <tr>
<th nzWidth="80px">编号</th> <th nzWidth="50px">编号</th>
<th nzWidth="100px">类型</th> <th nzWidth="50px">类型</th>
<th nzWidth="120px">金额</th> <th nzWidth="80px">交易金额</th>
<th nzWidth="140px">变更前金额</th> <th nzWidth="80px">变更前金额</th>
<th nzWidth="140px">变更后金额</th> <th nzWidth="80px">变更后金额</th>
<th nzWidth="180px">内容</th> <th nzWidth="300px">内容</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let data of RecordList.data; let i = index"> <tr *ngFor="let data of RecordList.data; let i = index">
<td>{{i+1}}</td> <td>{{i+1}}</td>
<td>{{data.type == 1 ? '进账': '出账'}}</td> <td>{{data.type == 1 ? '进账': '出账'}}</td>
<td>{{data.amount}}</td> <td>{{'¥' + data.amount}}</td>
<td>{{data.beforeAmount}}</td> <td>{{'¥' + data.beforeAmount}}</td>
<td>{{data.afterAmount}}</td> <td>{{'¥' + data.afterAmount}}</td>
<td>{{data.sourceContent}}</td> <td>{{data.sourceContent}}</td>
</tr> </tr>
</tbody> </tbody>

@ -26,13 +26,18 @@ export class IndexComponent implements OnInit {
countData: any = {}; countData: any = {};
data: any = {}; data: any = {};
orderData = {}; orderData = {};
balanceData = {}; balanceData = {
amounts: 0
};
rechargeData = {}; rechargeData = {};
todayBalanceData = {}; gasCountData: any = {
history: {},
today: {},
};
recordList = []; recordList = [];
tyBalance; tyBalance;
webSocket: WebSocket; webSocket: WebSocket;
adminInfoObject: {};
constructor( constructor(
private store: LocalStorageService, // 数据缓存 private store: LocalStorageService, // 数据缓存
private message: NzMessageService, // 信息提示 private message: NzMessageService, // 信息提示
@ -42,18 +47,13 @@ export class IndexComponent implements OnInit {
} }
ngOnInit(): void { ngOnInit(): void {
this.adminInfoObject = this.store.get(ADMIN_INFO_OBJECT);
this.roleType = this.store.get(ADMIN_INFO_OBJECT)['secRole'].roleType; this.roleType = this.store.get(ADMIN_INFO_OBJECT)['secRole'].roleType;
if (this.roleType === 1) { if (this.roleType === 1) {
this.getIndexCount(); this.getIndexCount();
this.getLineCount(); this.getLineCount();
this.queryCompanyAccountInfo2JD(); this.queryCompanyAccountInfo2JD();
} }
if (this.roleType === 3) {
this.getAccount();
this.getAccountRecordList();
}
if (this.store.get(ADMIN_INFO_OBJECT)['highAgent'] != null) { if (this.store.get(ADMIN_INFO_OBJECT)['highAgent'] != null) {
this.code = this.store.get(ADMIN_INFO_OBJECT)['highAgent'].id; this.code = this.store.get(ADMIN_INFO_OBJECT)['highAgent'].id;
} }
@ -66,6 +66,12 @@ export class IndexComponent implements OnInit {
this.HLTOrderByList(); this.HLTOrderByList();
} }
if (this.store.get(ADMIN_INFO_OBJECT)['merchantStore'] != null) {
if (this.store.get(ADMIN_INFO_OBJECT)['merchantStore'].type === 1) {
this.getGasStatistical();
this.getGasAccount();
}
}
} }
// 查询余额 // 查询余额
@ -241,8 +247,8 @@ export class IndexComponent implements OnInit {
}); });
} }
// 查询门店余额 // 查询油站预存余额
public getAccount(): void { public getGasAccount(): void {
this.index.getAccount(data => { this.index.getAccount(data => {
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
this.balanceData = data['return_data']; this.balanceData = data['return_data'];
@ -253,12 +259,12 @@ export class IndexComponent implements OnInit {
}); });
} }
// 查询门店余额 // 查询加油站统计
public getGasStatistical(): void { public getGasStatistical(): void {
this.index.getGasStatistical(data => { this.index.getGasStatistical(data => {
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
console.log(data); this.gasCountData = data['return_data'];
this.todayBalanceData = data['return_data']['today']; this.getGasAccountRecord();
this.loading = false; this.loading = false;
} else { } else {
this.message.error(data['return_msg']); this.message.error(data['return_msg']);
@ -266,8 +272,8 @@ export class IndexComponent implements OnInit {
}); });
} }
// 查询门店账户流失记录 // 查询预存账户油站记录
public getAccountRecordList(): void { public getGasAccountRecord(): void {
const paramsObject = { const paramsObject = {
pageNum: 1, pageNum: 1,
pageSize: 10000 pageSize: 10000
@ -275,7 +281,6 @@ 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') {
this.recordList = data['return_data'].list; this.recordList = data['return_data'].list;
console.log(this.recordList);
} else { } else {
this.message.error(data['return_msg']); this.message.error(data['return_msg']);
} }

@ -29,6 +29,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 [nzSpan]="6">创建时间</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-range-picker
formControlName="createTime"
[nzShowTime]="{ nzHideDisabledOptions: true}"
nzFormat="yyyy-MM-dd HH:mm:ss"
></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
</div> </div>
<div nz-row> <div nz-row>
@ -45,6 +57,10 @@
<div class="inner-content"> <div class="inner-content">
<span>共计 {{total}} 条数据</span> <span>共计 {{total}} 条数据</span>
<div class="operating-button">
<button nz-button nzType="primary" class="right-btn" (click)="excelOrder()" ><i nz-icon nzType="import" nzTheme="outline"></i>导出订单</button>
</div>
<nz-table <nz-table
class="table" class="table"
#ajaxTable #ajaxTable
@ -61,19 +77,19 @@
<thead nzSingleSort> <thead nzSingleSort>
<tr> <tr>
<th nzWidth="50px">编号</th> <th nzWidth="50px">编号</th>
<th nzWidth="180px">订单号</th> <th nzWidth="200px">订单号</th>
<th nzWidth="180px">油站名称</th> <th nzWidth="180px">油站名称</th>
<th nzWidth="180px">油站地址</th> <th nzWidth="180px">油站地址</th>
<th nzWidth="80px">类型</th> <th nzWidth="90px">类型</th>
<th nzWidth="180px">油号</th> <th nzWidth="90px">油号</th>
<th nzWidth="180px">油枪号</th> <th nzWidth="90px">油枪号</th>
<th nzWidth="180px">油枪价</th> <th nzWidth="90px">油枪价</th>
<th nzWidth="180px">优惠价</th> <th nzWidth="90px">优惠价</th>
<th nzWidth="120px">加油升数</th> <th nzWidth="90px">加油升数</th>
<th nzWidth="90px">加油金额</th>
<th nzWidth="90px">支付金额</th>
<th nzWidth="90px">优惠金额</th>
<th nzWidth="120px">创建时间</th> <th nzWidth="120px">创建时间</th>
<th nzRight nzWidth="90px">加油金额</th>
<th nzRight nzWidth="90px">支付金额</th>
<th nzRight nzWidth="90px">优惠金额</th>
<th nzRight nzWidth="90px">状态</th> <th nzRight nzWidth="90px">状态</th>
<th nzWidth="120px" nzRight>操作</th> <th nzWidth="120px" nzRight>操作</th>
</tr> </tr>
@ -85,15 +101,15 @@
<td>{{data.gasName}}</td> <td>{{data.gasName}}</td>
<td>{{data.gasAddress}}</td> <td>{{data.gasAddress}}</td>
<td>{{data.gasOilType == 1 ? '汽油': '柴油'}}</td> <td>{{data.gasOilType == 1 ? '汽油': '柴油'}}</td>
<td>{{data.gasOilNo}}</td> <td>{{data.gasOilNo + "#"}}</td>
<td>{{data.gasGunNo}}</td> <td>{{data.gasGunNo + "号"}}</td>
<td>{{data.gasPriceGun}}</td> <td>{{data.gasPriceGun}}</td>
<td>{{data.gasPricePreferences}}</td> <td>{{data.gasPricePreferences}}</td>
<td>{{data.gasOilLiters}}</td> <td>{{data.gasOilLiters}}</td>
<td>{{data.totalPrice}}</td>
<td>{{data.payRealPrice}}</td>
<td>{{data.deductionPrice}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td> <td>{{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight>{{data.totalPrice}}</td>
<td nzRight>{{data.payRealPrice}}</td>
<td nzRight>{{data.deductionPrice}}</td>
<td nzRight>{{data.status | orderCouponStatus}}</td> <td nzRight>{{data.status | orderCouponStatus}}</td>
<td nzRight class="table-td-operation"> <td nzRight class="table-td-operation">
<a (click)="getDetail(data.orderNo)">详情</a> <a (click)="getDetail(data.orderNo)">详情</a>

@ -64,19 +64,18 @@ export class OilStationOrderComponent implements OnInit {
this.searchForm = this.form.group({ this.searchForm = this.form.group({
orderNo: [null], orderNo: [null],
status: [null], status: [null],
createTime: [null],
}); });
this.getRequest(true, this.searchForm.value); this.getRequest(true, this.searchForm.value);
} }
// 查询列表 // 查询列表
public getRequest(reset: boolean = false, whereObject: object) { public getRequest(reset: boolean = false, whereObject: object) {
if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) {
if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) { whereObject['createTimeS'] = whereObject['createTime'][0].getTime();
whereObject['payTimeS'] = whereObject['payTime'][0].getTime(); whereObject['createTimeE'] = whereObject['createTime'][1].getTime();
whereObject['payTimeE'] = whereObject['payTime'][1].getTime();
} }
this.loading = false; this.loading = false;
if (reset) { if (reset) {
this.pageNum = 1; this.pageNum = 1;
@ -137,4 +136,17 @@ export class OilStationOrderComponent implements OnInit {
} }
}); });
} }
/**
*
*/
excelOrder() {
this.order.exportGasOrder(this.searchForm.value, data => {
if (data['return_code'] === '000000') {
window.location.href = this.FILE_URL + 'temporary/' + data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
}
} }

@ -154,12 +154,12 @@ export class IndexService {
/** /**
* @Author Sum1Dream * @Author Sum1Dream
* @methodName getGasStatistical * @methodName getGasStatistical
* @Description // 查询门店账户 * @Description // 查询加油站统计
* @Date 10:00 2022/5/18 * @Date 10:00 2022/5/18
* @Param * @Param
*/ */
public getGasStatistical(callBack) { public getGasStatistical(callBack) {
this.http.get(environment.baseUrl + 'highGas/getGasStatistical').subscribe(data => { this.http.post(environment.baseUrl + 'highGas/getGasStatistical', null).subscribe(data => {
callBack(data); callBack(data);
}); });
} }

@ -245,10 +245,15 @@ export class OrderService {
}); });
} }
public exportGasOrder(params: object , callBack) {
this.http.get(environment.baseUrl + 'highGas/exportGasOrder?' + this.common.getWhereCondition(params)).subscribe( data => {
callBack(data);
});
}
public getGasOrderDetail(orderNo: string , callBack) { public getGasOrderDetail(orderNo: string , callBack) {
this.http.get(environment.baseUrl + 'highGas/getGasOrderDetail?orderNo=' + orderNo).subscribe( data => { this.http.get(environment.baseUrl + 'highGas/getGasOrderDetail?orderNo=' + orderNo).subscribe( data => {
callBack(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