diff --git a/src/app/admin/index/index/index.component.html b/src/app/admin/index/index/index.component.html index 461bc4d..a8e6077 100644 --- a/src/app/admin/index/index/index.component.html +++ b/src/app/admin/index/index/index.component.html @@ -7,29 +7,62 @@ -
-
-
- -

预充值账号余额

-

余额:{{balanceData['amounts']}}

-
-
-
- -

预充值账号今日收入

-

今日收入:{{todayBalanceData['incomePrice'] == null ? '0': todayBalanceData['incomePrice']}}

-

今日收款笔数:{{todayBalanceData['incomeCount'] == null ? '0': todayBalanceData['incomeCount']}}

-
-
-
- -

预充值账号今日退款

-

今日退款金额:{{todayBalanceData['refundPrice'] == null ? '0': todayBalanceData['refundPrice']}}

-

今日退款笔数:{{todayBalanceData['incomeCount'] == null ? '0': todayBalanceData['incomeCount']}}

-
-
+
+
+ + + + 记录 + +
+


+ + + + + + + + + + + + + + + + + + + + + + +


+ + + + + + + + + + + + + + + + + + + + + + +
@@ -149,7 +182,6 @@ -
@@ -163,25 +195,25 @@
- - + + - 编号 - 类型 - 金额 - 变更前金额 - 变更后金额 - 内容 + 编号 + 类型 + 交易金额 + 变更前金额 + 变更后金额 + 内容 {{i+1}} {{data.type == 1 ? '进账': '出账'}} - {{data.amount}} - {{data.beforeAmount}} - {{data.afterAmount}} + {{'¥' + data.amount}} + {{'¥' + data.beforeAmount}} + {{'¥' + data.afterAmount}} {{data.sourceContent}} diff --git a/src/app/admin/index/index/index.component.ts b/src/app/admin/index/index/index.component.ts index 088f73a..4f38c5c 100644 --- a/src/app/admin/index/index/index.component.ts +++ b/src/app/admin/index/index/index.component.ts @@ -26,13 +26,18 @@ export class IndexComponent implements OnInit { countData: any = {}; data: any = {}; orderData = {}; - balanceData = {}; + balanceData = { + amounts: 0 + }; rechargeData = {}; - todayBalanceData = {}; + gasCountData: any = { + history: {}, + today: {}, + }; recordList = []; tyBalance; webSocket: WebSocket; - + adminInfoObject: {}; constructor( private store: LocalStorageService, // 数据缓存 private message: NzMessageService, // 信息提示 @@ -42,18 +47,13 @@ export class IndexComponent implements OnInit { } ngOnInit(): void { - + this.adminInfoObject = this.store.get(ADMIN_INFO_OBJECT); this.roleType = this.store.get(ADMIN_INFO_OBJECT)['secRole'].roleType; if (this.roleType === 1) { this.getIndexCount(); this.getLineCount(); this.queryCompanyAccountInfo2JD(); } - if (this.roleType === 3) { - this.getAccount(); - this.getAccountRecordList(); - } - if (this.store.get(ADMIN_INFO_OBJECT)['highAgent'] != null) { this.code = this.store.get(ADMIN_INFO_OBJECT)['highAgent'].id; } @@ -66,6 +66,12 @@ export class IndexComponent implements OnInit { 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 => { if (data['return_code'] === '000000') { this.balanceData = data['return_data']; @@ -253,12 +259,12 @@ export class IndexComponent implements OnInit { }); } - // 查询门店余额 + // 查询加油站统计 public getGasStatistical(): void { this.index.getGasStatistical(data => { if (data['return_code'] === '000000') { - console.log(data); - this.todayBalanceData = data['return_data']['today']; + this.gasCountData = data['return_data']; + this.getGasAccountRecord(); this.loading = false; } else { this.message.error(data['return_msg']); @@ -266,8 +272,8 @@ export class IndexComponent implements OnInit { }); } - // 查询门店账户流失记录 - public getAccountRecordList(): void { + // 查询预存账户油站记录 + public getGasAccountRecord(): void { const paramsObject = { pageNum: 1, pageSize: 10000 @@ -275,7 +281,6 @@ export class IndexComponent implements OnInit { this.index.getAccountRecordList(paramsObject, data => { if (data['return_code'] === '000000') { this.recordList = data['return_data'].list; - console.log(this.recordList); } else { this.message.error(data['return_msg']); } 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 d2b3f3b..6dc2eae 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 @@ -29,6 +29,18 @@
+
+ + 创建时间 + + + + +
@@ -45,6 +57,10 @@
共计 {{total}} 条数据 +
+ +
+ 编号 - 订单号 + 订单号 油站名称 油站地址 - 类型 - 油号 - 油枪号 - 油枪价 - 优惠价 - 加油升数 + 类型 + 油号 + 油枪号 + 油枪价 + 优惠价 + 加油升数 + 加油金额 + 支付金额 + 优惠金额 创建时间 - 加油金额 - 支付金额 - 优惠金额 状态 操作 @@ -85,15 +101,15 @@ {{data.gasName}} {{data.gasAddress}} {{data.gasOilType == 1 ? '汽油': '柴油'}} - {{data.gasOilNo}} - {{data.gasGunNo}} + {{data.gasOilNo + "#"}} + {{data.gasGunNo + "号"}} {{data.gasPriceGun}} {{data.gasPricePreferences}} {{data.gasOilLiters}} + {{data.totalPrice}} + {{data.payRealPrice}} + {{data.deductionPrice}} {{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.totalPrice}} - {{data.payRealPrice}} - {{data.deductionPrice}} {{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 16c010d..cbd0e9b 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 @@ -64,19 +64,18 @@ export class OilStationOrderComponent implements OnInit { this.searchForm = this.form.group({ orderNo: [null], status: [null], + createTime: [null], }); this.getRequest(true, this.searchForm.value); } // 查询列表 public getRequest(reset: boolean = false, whereObject: object) { - - if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) { - whereObject['payTimeS'] = whereObject['payTime'][0].getTime(); - whereObject['payTimeE'] = whereObject['payTime'][1].getTime(); + if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) { + whereObject['createTimeS'] = whereObject['createTime'][0].getTime(); + whereObject['createTimeE'] = whereObject['createTime'][1].getTime(); } - this.loading = false; if (reset) { 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']); + } + }); + } } diff --git a/src/app/services/index.service.ts b/src/app/services/index.service.ts index 439c5d3..9195faa 100644 --- a/src/app/services/index.service.ts +++ b/src/app/services/index.service.ts @@ -154,12 +154,12 @@ export class IndexService { /** * @Author Sum1Dream * @methodName getGasStatistical - * @Description // 查询门店账户 + * @Description // 查询加油站统计 * @Date 10:00 2022/5/18 * @Param */ public getGasStatistical(callBack) { - this.http.get(environment.baseUrl + 'highGas/getGasStatistical').subscribe(data => { + this.http.post(environment.baseUrl + 'highGas/getGasStatistical', null).subscribe(data => { callBack(data); }); } diff --git a/src/app/services/order.service.ts b/src/app/services/order.service.ts index 7a54d77..fe68ecf 100644 --- a/src/app/services/order.service.ts +++ b/src/app/services/order.service.ts @@ -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) { this.http.get(environment.baseUrl + 'highGas/getGasOrderDetail?orderNo=' + orderNo).subscribe( data => { callBack(data); }); } - } diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 21ad46f..0f97376 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -4,10 +4,10 @@ export const environment = { production: false, - // baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) - // imageUrl: 'http://localhost:9302/filesystem/', - baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) - imageUrl: 'https://hsgcs.dctpay.com/filesystem/', + baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) + imageUrl: 'http://localhost:9302/filesystem/', +/* baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) + imageUrl: 'https://hsgcs.dctpay.com/filesystem/',*/ key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=', inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=', };