From d0f75e034cd814554b7581071ea2cc4ff57b45d1 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Fri, 22 Jul 2022 15:22:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oil-station-order.component.html | 26 ++++++++++++++++++- .../oil-station-order.component.ts | 26 +++++++++++++++++++ src/app/services/order.service.ts | 12 +++++++++ src/environments/environment.ts | 8 +++--- 4 files changed, 67 insertions(+), 5 deletions(-) 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 adc1745..e74d9d4 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 @@ -34,6 +34,16 @@ +
+ + 油号 + + + + + + +
状态 @@ -61,6 +71,18 @@
+
+ + 支付时间 + + + + +
@@ -76,7 +98,7 @@
- 共计 {{total}} 条数据 + 总笔数:{{dataCount.refuelNum}} 笔,总加油金额:{{dataCount.refuelPrice}} 元,总升数:{{dataCount.refuelLiters}} 升
@@ -110,6 +132,7 @@ 支付金额 优惠金额 创建时间 + 支付时间 状态 操作 @@ -130,6 +153,7 @@ {{data.payRealPrice}} {{data.deductionPrice}} {{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} + {{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}} {{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 ebae251..edf91ff 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 @@ -50,9 +50,16 @@ export class OilStationOrderComponent implements OnInit { userSession = {}; gasStaffArray = []; + oilNoArray = []; + BTN_GAS_ORDER_REFUND = false; BTN_GAS_ORDER_PRINT = false; + dataCount = { + refuelNum: 0, + refuelPrice: 0, + refuelLiters: 0, + }; constructor( private form: FormBuilder, private order: OrderService, @@ -106,9 +113,18 @@ export class OilStationOrderComponent implements OnInit { staffId: [null], orderNo: [null], status: [null], + oilNo: [null], createTime: [null], + payTime: [null], }); this.getRequest(true, this.searchForm.value); + + // 查询油号 + this.common.getDictionary("GAS_OIL_TYPE", data => { + if (data['return_code'] == '000000') { + this.oilNoArray = data['return_data']; + } + }); } // 查询列表 @@ -132,6 +148,16 @@ export class OilStationOrderComponent implements OnInit { this.message.error(data['return_msg']); } }); + this.countGasOrder(); + } + + // 统计订单 + public countGasOrder() { + this.orderService.countGasOrder(this.searchForm.value, data => { + if (data['return_code'] == '000000') { + this.dataCount = data['return_data']; + } + }); } // 查询列表 diff --git a/src/app/services/order.service.ts b/src/app/services/order.service.ts index 4d8f58c..949ec41 100644 --- a/src/app/services/order.service.ts +++ b/src/app/services/order.service.ts @@ -52,6 +52,18 @@ export class OrderService { }); } + /** + * 统计油站订单 + * + * @param paramsObject 对象 + * @param callBack 回调 + */ + public countGasOrder(paramsObject: object, callBack) { + this.http.get(environment.baseUrl + 'highGas/countGasOrder?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { + callBack(data); + }); + } + /** * @Author Sum1Dream * @methodName getDiscountPackageList diff --git a/src/environments/environment.ts b/src/environments/environment.ts index ca22a39..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=', };