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 4a7e384..bb5db86 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 @@ 充值号码 - + @@ -72,7 +72,7 @@ 订单号 - + @@ -80,36 +80,19 @@ 工会卡卡号 - + - - - - - - - - -
支付时间 - +
- - - - - - - - -
@@ -125,16 +108,10 @@
共计 {{total}} 条数据
- - - - - - - - - - +
编号 - 订单名称 - 订单类型 - 充值类型 - 工会卡号 - 订单号 - 客户名称 - 充值号码 + 充值类型 + 运营商 + 充值内容 充值金额 - 支付金额 + 充值订单号 + 客户名称 生成时间 支付方式 充值状态 - 订单状态 - 操作 + 支付状态 + 操作 - {{i+1}} - {{data.remarks}} - {{data.rechargeModel | rechargePrice}} - {{data.rechargeType== 1? '快充':'慢充'}} - {{data.idCard}} + {{i + 1}} + {{data.type == 1 ? '话费充值' : ''}} + {{data.operatorName}} + {{data.rechargeContent}} | {{data.rechargeType == 1 ? '快充' : '慢充'}} + ¥{{data.rechargePrice}} {{data.orderNo}} - {{data.userName == null ? '暂无': data.userName}} - {{data.rechargeContent == null ? '暂无': data.rechargeContent}} - {{data.orderPrice}} - {{data.payPrice}} + {{data.userName == null ? '暂无' : data.userName}} {{data.createTimed | date: 'yyyy-MM-dd HH:mm:ss'}} {{data.payType | rechargePayType}} - - {{data.rechargeStatus == 1 ? '充值异常' : '正常'}} - ({{data.abnormalMsg}}) - - {{data.status | rechargeStatus}} + {{data.rechargeStatus | rechargeStatus}} + {{data.payStatus | payStatus}} - 详情 - - + 详情 + + 查看子订单
- + - {{data['remarks']}} - {{data['rechargeModel'] | rechargePrice}} {{data['orderNo']}} - {{data['userName'] == null ? '暂无': data['userName']}} - {{data['rechargeContent'] == null ? '暂无': data['rechargeContent']}} - {{data['idCard']}} - {{data['rechargeName']}} - {{data['orderPrice']}} - {{data['payPrice']}} - {{data['refundFee']}} + {{data['type'] == 1 ? '话费充值' : ''}} + {{data['operatorName']}} + {{data['rechargeContent']}} | {{data['rechargeType'] == 1 ? '快充' : '慢充'}} + ¥{{data['rechargePrice']}} + ¥{{data['payPrice']}} + ¥{{data['integralDeductionPrice'] == null ? '0' : data['integralDeductionPrice']}} + ¥{{data['discountDeductionPrice'] == null ? '0' : data['discountDeductionPrice']}} + ¥{{data['payRealPrice']}} + ¥{{data['refundFee']}} + {{data['memDiscountName']}} + {{data['paySerialNo']}} {{data['createTimed'] | date: 'yyyy-MM-dd HH:mm:ss'}} {{data['cancelTime'] | date: 'yyyy-MM-dd HH:mm:ss'}} {{data['finishTime'] | date: 'yyyy-MM-dd HH:mm:ss'}} {{data['payTime'] | date: 'yyyy-MM-dd HH:mm:ss'}} {{data['refundTime'] | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data['status'] | rechargeStatus}} + {{data['payType'] | rechargePayType}} + {{data['rechargeStatus'] | rechargeStatus}} + {{data['payStatus'] | payStatus}} - - + + + - 序号 - 订单号 - 用户昵称 - 用户联系方式 - 充值类型 - 充值内容 - 支付方式 - 卡号 - 订单金额 - 应付金额 - 订单状态 - 支付时间 - 原因 + 订单号 + 充值平台 + 充值状态 + 创建时间 - - {{ i + 1}} + {{data.orderNo}} - {{data.userName}} - {{data.userPhone}} - {{data.rechargeModelName}} - {{data.rechargeContent}} - {{data.payTypeName}} - {{data.cardNo}} - {{data.orderPrice}} - {{data.payRealPrice}} - {{data.statusName}} - {{data.payTime}} - {{data.errorMessage}} + {{data.rechargePlatform}} + {{data.status | chlidRechargeStatus}} + {{data['createTime'] | date: 'yyyy-MM-dd HH:mm'}} diff --git a/src/app/admin/recharge-order/order-list/order-list.component.ts b/src/app/admin/recharge-order/order-list/order-list.component.ts index db5b170..3e8b8e6 100644 --- a/src/app/admin/recharge-order/order-list/order-list.component.ts +++ b/src/app/admin/recharge-order/order-list/order-list.component.ts @@ -22,8 +22,10 @@ export class OrderListComponent implements OnInit , OnDestroy { searchForm: FormGroup; // 搜索框 validateForm: FormGroup; // 添加框 requestData = []; // 列表数据 + childData = []; // 列表数据 importErrorStudentArray = []; errorStudentVisible = false; + isVisibleChild = false; total: number; // 页码 pageNum = 1; // 页码 pageSize = 10; // 条码 @@ -249,4 +251,16 @@ export class OrderListComponent implements OnInit , OnDestroy { this.errorStudentVisible = true; } + // 查询子订单 + public getChildOrder(id: number): void { + this.isVisibleChild = true; + this.recharge.getChildOrder(id , data => { + if (data['return_code'] === '000000') { + this.childData = data['return_data']; + } else { + this.message.error(data['return_msg']); + } + }); + } + } diff --git a/src/app/admin/recharge-order/price-list/price-list.component.html b/src/app/admin/recharge-order/price-list/price-list.component.html index b2bf4e8..d03eac8 100644 --- a/src/app/admin/recharge-order/price-list/price-list.component.html +++ b/src/app/admin/recharge-order/price-list/price-list.component.html @@ -68,7 +68,7 @@ 价格状态 - + diff --git a/src/app/app-common.module.ts b/src/app/app-common.module.ts index 7180d9a..4e53997 100644 --- a/src/app/app-common.module.ts +++ b/src/app/app-common.module.ts @@ -41,10 +41,16 @@ import { CompanyAmountRecordTypePipe, CompanyAmountRecordSourceTypePipe, OilCardBindStatusPipe, - OilCardRecordTypePipe, OilCardRecordSourceTypePipe, RechargePlatformPipe, PriceStatusPipe, GasStaffStatusPipe + OilCardRecordTypePipe, + OilCardRecordSourceTypePipe, + RechargePlatformPipe, + PriceStatusPipe, + GasStaffStatusPipe, + PayStatusPipe, + ChlidRechargeStatusPipe } from './pipes'; import {OilCardStatusPipe} from './pipes'; -import { OilTypePipe } from './pipes/store/oil-type.pipe'; +import {OilTypePipe} from './pipes/store/oil-type.pipe'; import {OilPriceTaskStatusPipe} from './pipes/gas-oil-price/oil-price-task-status.pipe'; import {OilPriceTaskExecutionTypePipe} from './pipes/gas-oil-price/oil-price-task-execution-type.pipe'; import {OilPriceTaskPriceTypePipe} from './pipes/gas-oil-price/oil-price-task-price-type.pipe'; @@ -92,6 +98,8 @@ const PIPES = [ OilPriceTaskStatusPipe, OilPriceTaskExecutionTypePipe, OilPriceTaskPriceTypePipe, + PayStatusPipe, + ChlidRechargeStatusPipe, ]; diff --git a/src/app/pipes/index.ts b/src/app/pipes/index.ts index 30281f4..78e6433 100644 --- a/src/app/pipes/index.ts +++ b/src/app/pipes/index.ts @@ -35,3 +35,5 @@ export * from './oil-card/oil-card-record-source-type.pipe'; export * from './gas-staff/gas-staff-status.pipe'; export * from './recharge-price/recharge-platform.pipe'; export * from './recharge-price/price-status.pipe'; +export * from './pay-status.pipe'; +export * from './chlid-recharge-status.pipe'; diff --git a/src/app/pipes/recharge-pay-type.pipe.ts b/src/app/pipes/recharge-pay-type.pipe.ts index 730a0b2..4adb344 100644 --- a/src/app/pipes/recharge-pay-type.pipe.ts +++ b/src/app/pipes/recharge-pay-type.pipe.ts @@ -1,21 +1,26 @@ -import { Pipe, PipeTransform } from '@angular/core'; +import {Pipe, PipeTransform} from '@angular/core'; @Pipe({ - name: 'rechargePayType' + name: 'rechargePayType' }) export class RechargePayTypePipe implements PipeTransform { - transform(value: number): string { - switch (value) { - case 1: - return '微信'; - case 2: - return '工会卡'; - case 3: - return '积分'; - case 4: - return '银联'; + transform(value: number): string { + switch (value) { + case 1: + return '支付宝'; + case 2: + return '微信'; + case 3: + return '汇联通工会卡'; + case 4: + return '银联'; + case 5: + return '银联分期'; + case null: + return '积分抵扣'; + } } - } } + diff --git a/src/app/pipes/recharge-status.pipe.ts b/src/app/pipes/recharge-status.pipe.ts index 9a832e2..fd8e946 100644 --- a/src/app/pipes/recharge-status.pipe.ts +++ b/src/app/pipes/recharge-status.pipe.ts @@ -7,18 +7,14 @@ export class RechargeStatusPipe implements PipeTransform { transform(value: number): string { switch (value) { - case 1: - return '待支付'; - case 2: - return '已支付'; - case 3: - return '已完成'; - case 4: - return '已取消'; - case 5: - return '已退款'; - case 6: - return '退款中'; + case 201: + return '充值中'; + case 202: + return '充值成功'; + case 203: + return '充值失败'; + case 204: + return '充值中'; } } diff --git a/src/app/services/recharge.service.ts b/src/app/services/recharge.service.ts index 9e5c3ad..4f22dc7 100644 --- a/src/app/services/recharge.service.ts +++ b/src/app/services/recharge.service.ts @@ -1,251 +1,263 @@ -import { Injectable } from '@angular/core'; +import {Injectable} from '@angular/core'; import {HttpClient} from '@angular/common/http'; import {CommonsService} from './commons.service'; import {environment} from '../../environments/environment'; @Injectable({ - providedIn: 'root' + providedIn: 'root' }) export class RechargeService { - constructor( - private http: HttpClient, - private common: CommonsService - ) { - } - - /** - * 查询列表 - * - * @param paramsObject 对象 - * @param callBack 回调 - */ - public getListOutRechargePrice(paramsObject: object, callBack) { - this.http.get(environment.baseUrl + 'outRechargePrice/getListOutRechargePrice?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { - callBack(data); - }); - } - - /** - * @Author Sum1Dream - * @methodName editPriceStatus - * @Description // 修改价格状态 - * @Date 15:03 2021/8/12 - * @Param mod - **/ - public editPriceStatus(params: object, callBack) { - this.http.post(environment.baseUrl + 'outRechargePrice/editPriceStatus' , params ).subscribe(data => { - callBack(data); - }); - } - - /** - * 新增 - * - * @param params 上传对象 - * @param callBack 回调 - * @return data 返回结果 - */ - public insertPrice(params: object, callBack) { - this.http.post(environment.baseUrl + 'outRechargePrice/insertPrice', params).subscribe(data => { - callBack(data); - }); - } - - /** - * 修改卡券 - * - * @param params 上传对象 - * @param callBack 回调 - * @return data 返回结果 - */ - public updatePrice(params: object, callBack) { - this.http.post(environment.baseUrl + 'outRechargePrice/updatePrice', params).subscribe(data => { - callBack(data); - }); - } - - /** - * 根据id查询详情 - * - * @param id id - * @param callBack 回调 - */ - public findById(id: number, callBack) { - this.http.get(environment.baseUrl + 'outRechargePrice/findById?id=' + id).subscribe(data => { - callBack(data); - }); - } - - /** - * 根据id查询详情 - * - * @param id id - * @param callBack 回调 - */ - public deletePrice(id: number, callBack) { - this.http.get(environment.baseUrl + 'outRechargePrice/deletePrice?id=' + id).subscribe(data => { - callBack(data); - }); - } - - /** - * 查询订单列表 - * - * @param paramsObject 对象 - * @param callBack 回调 - */ - public getOrderList(paramsObject: object, callBack) { - this.http.get(environment.baseUrl + 'outRechargeOrder/getOrderList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { - callBack(data); - }); - } - - - /** - * 根据id查询详情 - * - * @param id id - * @param callBack 回调 - */ - public getOrderById(id: number, callBack) { - this.http.get(environment.baseUrl + 'outRechargeOrder/getOrderById?orderId=' + id).subscribe(data => { - callBack(data); - }); - } - - /** - * 根据id完成订单 - * - * @param id id - * @param callBack 回调 - */ - public getMobileRechargeByOrderId(id: number, callBack) { - this.http.get(environment.baseUrl + 'outRechargeOrder/getMobileRechargeByOrderId?orderId=' + id).subscribe(data => { - callBack(data); - }); - } - - /** - * 根据id完成退款 - * - * @param id id - * @param callBack 回调 - */ - public orderToRefund(id: number, callBack) { - this.http.get(environment.baseUrl + 'outRechargeOrder/orderToRefund?orderId=' + id).subscribe(data => { - callBack(data); - }); - } - - /** - * @Author Sum1Dream - * @methodName orderToRefundPre - * @Description // 预约订单退款 - * @Date 11:17 上午 2021/11/23 - * @Param [id: number, callBack] - */ - public orderToRefundPre(id: number, callBack) { - this.http.get(environment.baseUrl + 'highOrderPre/orderToRefund?orderId=' + id).subscribe(data => { - callBack(data); - }); - } - - /** - * 申请退款 - * - * @param id id - * @param callBack 回调 - */ - public postRefund(params: object, callBack) { - this.http.post(environment.baseUrl + 'highRefundAudit/insertRefundAudit', params).subscribe(data => { - callBack(data); - }); - } - - /** - * 查询充值订单数量 - * - * @param id id - * @param callBack 回调 - */ - public countOrder(callBack) { - this.http.get(environment.baseUrl + 'outRechargeOrder/countOrder').subscribe(data => { - callBack(data); - }); - } - - /** - * 查询订单列表 - * - * @param paramsObject 对象 - * @param callBack 回调 - */ - public getOrderCountList(paramsObject: object, callBack) { - this.http.get(environment.baseUrl + 'outRechargeOrder/getOrderCountList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { - callBack(data); - }); - } - - /** - * 到处订单统计 - * - * @param paramsObject 对象 - * @param callBack 回调 - */ - public exportOrderListCount(paramsObject: object, callBack) { - this.http.get(environment.baseUrl + 'outRechargeOrder/exportOrderListCount?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { - callBack(data); - }); - } - - /** - * 到处订单统计 - * - * @param paramsObject 对象 - * @param callBack 回调 - */ - public exportOrderList(paramsObject: object, callBack) { - this.http.get(environment.baseUrl + 'outRechargeOrder/exportOrderList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { - callBack(data); - }); - } - - /** - * 查询订单列表 - * - * @param paramsObject 对象 - * @param callBack 回调 - */ - public getUserCountList(paramsObject: object, callBack) { - this.http.get(environment.baseUrl + 'outRechargeOrder/getUserCountList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { - callBack(data); - }); - } - - - /** - * 到处订单统计 - * - * @param paramsObject 对象 - * @param callBack 回调 - */ - public exportUserOrderListCount(paramsObject: object, callBack) { - this.http.get(environment.baseUrl + 'outRechargeOrder/exportUserOrderListCount?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { - callBack(data); - }); - } - - /** - * 获取渠道商获取关联商品 - * - * @param callBack 回调 - */ - public getMemberGoods(callBack) { - this.http.get(environment.baseUrl + 'telApi/getMemberGoods').subscribe(data => { - callBack(data); - }); - } + constructor( + private http: HttpClient, + private common: CommonsService + ) { + } + /** + * 查询列表 + * + * @param paramsObject 对象 + * @param callBack 回调 + */ + public getListOutRechargePrice(paramsObject: object, callBack) { + this.http.get(environment.baseUrl + 'outRechargePrice/getListOutRechargePrice?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { + callBack(data); + }); + } + + /** + * @Author Sum1Dream + * @methodName editPriceStatus + * @Description // 修改价格状态 + * @Date 15:03 2021/8/12 + * @Param mod + **/ + public editPriceStatus(params: object, callBack) { + this.http.post(environment.baseUrl + 'outRechargePrice/editPriceStatus', params).subscribe(data => { + callBack(data); + }); + } + + /** + * 新增 + * + * @param params 上传对象 + * @param callBack 回调 + * @return data 返回结果 + */ + public insertPrice(params: object, callBack) { + this.http.post(environment.baseUrl + 'outRechargePrice/insertPrice', params).subscribe(data => { + callBack(data); + }); + } + + /** + * 修改卡券 + * + * @param params 上传对象 + * @param callBack 回调 + * @return data 返回结果 + */ + public updatePrice(params: object, callBack) { + this.http.post(environment.baseUrl + 'outRechargePrice/updatePrice', params).subscribe(data => { + callBack(data); + }); + } + + /** + * 根据id查询详情 + * + * @param id id + * @param callBack 回调 + */ + public findById(id: number, callBack) { + this.http.get(environment.baseUrl + 'outRechargePrice/findById?id=' + id).subscribe(data => { + callBack(data); + }); + } + + /** + * 根据id查询详情 + * + * @param id id + * @param callBack 回调 + */ + public deletePrice(id: number, callBack) { + this.http.get(environment.baseUrl + 'outRechargePrice/deletePrice?id=' + id).subscribe(data => { + callBack(data); + }); + } + + /** + * 查询订单列表 + * + * @param paramsObject 对象 + * @param callBack 回调 + */ + public getOrderList(paramsObject: object, callBack) { + this.http.get(environment.baseUrl + 'outRechargeOrder/getOrderList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { + callBack(data); + }); + } + + + /** + * 根据id查询详情 + * + * @param id id + * @param callBack 回调 + */ + public getOrderById(id: number, callBack) { + this.http.get(environment.baseUrl + 'outRechargeOrder/getOrderById?orderId=' + id).subscribe(data => { + callBack(data); + }); + } + + /** + * 根据id完成订单 + * + * @param id id + * @param callBack 回调 + */ + public getMobileRechargeByOrderId(id: number, callBack) { + this.http.get(environment.baseUrl + 'outRechargeOrder/getMobileRechargeByOrderId?orderId=' + id).subscribe(data => { + callBack(data); + }); + } + + /** + * 根据id完成退款 + * + * @param id id + * @param callBack 回调 + */ + public orderToRefund(id: number, callBack) { + this.http.get(environment.baseUrl + 'outRechargeOrder/orderToRefund?orderId=' + id).subscribe(data => { + callBack(data); + }); + } + + /** + * @Author Sum1Dream + * @methodName orderToRefundPre + * @Description // 预约订单退款 + * @Date 11:17 上午 2021/11/23 + * @Param [id: number, callBack] + */ + public orderToRefundPre(id: number, callBack) { + this.http.get(environment.baseUrl + 'highOrderPre/orderToRefund?orderId=' + id).subscribe(data => { + callBack(data); + }); + } + + /** + * 申请退款 + * + * @param id id + * @param callBack 回调 + */ + public postRefund(params: object, callBack) { + this.http.post(environment.baseUrl + 'highRefundAudit/insertRefundAudit', params).subscribe(data => { + callBack(data); + }); + } + + /** + * 查询充值订单数量 + * + * @param id id + * @param callBack 回调 + */ + public countOrder(callBack) { + this.http.get(environment.baseUrl + 'outRechargeOrder/countOrder').subscribe(data => { + callBack(data); + }); + } + + /** + * 查询订单列表 + * + * @param paramsObject 对象 + * @param callBack 回调 + */ + public getOrderCountList(paramsObject: object, callBack) { + this.http.get(environment.baseUrl + 'outRechargeOrder/getOrderCountList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { + callBack(data); + }); + } + + /** + * 到处订单统计 + * + * @param paramsObject 对象 + * @param callBack 回调 + */ + public exportOrderListCount(paramsObject: object, callBack) { + this.http.get(environment.baseUrl + 'outRechargeOrder/exportOrderListCount?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { + callBack(data); + }); + } + + /** + * 到处订单统计 + * + * @param paramsObject 对象 + * @param callBack 回调 + */ + public exportOrderList(paramsObject: object, callBack) { + this.http.get(environment.baseUrl + 'outRechargeOrder/exportOrderList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { + callBack(data); + }); + } + + /** + * 查询订单列表 + * + * @param paramsObject 对象 + * @param callBack 回调 + */ + public getUserCountList(paramsObject: object, callBack) { + this.http.get(environment.baseUrl + 'outRechargeOrder/getUserCountList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { + callBack(data); + }); + } + + + /** + * 到处订单统计 + * + * @param paramsObject 对象 + * @param callBack 回调 + */ + public exportUserOrderListCount(paramsObject: object, callBack) { + this.http.get(environment.baseUrl + 'outRechargeOrder/exportUserOrderListCount?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { + callBack(data); + }); + } + + /** + * 获取渠道商获取关联商品 + * + * @param callBack 回调 + */ + public getMemberGoods(callBack) { + this.http.get(environment.baseUrl + 'telApi/getMemberGoods').subscribe(data => { + callBack(data); + }); + } + + /** + * @Author Sum1Dream + * @methodName orderToRefundPre + * @Description // 预约订单退款 + * @Date 11:17 上午 2021/11/23 + * @Param [id: number, callBack] + */ + public getChildOrder(id: number, callBack) { + this.http.get(environment.baseUrl + 'outRechargeOrder/getChildOrder?orderId=' + id).subscribe(data => { + callBack(data); + }); + } }