diff --git a/src/app/admin/order-manage/mobile-recharge-order-list/mobile-recharge-order-list.component.html b/src/app/admin/order-manage/mobile-recharge-order-list/mobile-recharge-order-list.component.html new file mode 100644 index 0000000..1d56505 --- /dev/null +++ b/src/app/admin/order-manage/mobile-recharge-order-list/mobile-recharge-order-list.component.html @@ -0,0 +1,268 @@ + + + + + +
+
+
+
+ +
+ + 交易单号 + + + + +
+ +
+ + 客户电话 + + + + +
+
+ + 交易状态 + + + + + + +
+
+ +
+
+ + 分公司 + + + + + + +
+ +
+ + 支付方式 + + + + + + + + + + + + +
+
+ + 支付卡号 + + + + +
+
+ + 支付时间 + + + + +
+ + + + +
+ + 创建时间 + + + + +
+ +
+ + 退款时间 + + + + +
+
+
+ +
+
+
+
+ + + +
+ 共计 {{total?total:0}} 条数据 +
+ +
+ + + + + + 交易单号 + 客户电话 + 订单名称 + 订单金额 + 支付金额 + 支付方式 + 订单状态 + 创建时间 + 操作 + + + + + {{data.orderNo}} + {{data.memPhone}} + {{data.title}} + ¥{{data.totalPrice}} + ¥{{data.payPrice}} + {{data.orderStatus == 1 || data.orderStatus == 5 ? '未支付' : data.payType | orderPayType}} + {{data.orderStatus | orderStatus}} + {{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} + + 操作列表 + + + + + + + +
+
+ + + + + + + {{orderDetailObject.tradeOrder.orderNo}} + {{orderDetailObject.tradeOrder.paySerialNo!=null?orderDetailObject.tradeOrder.paySerialNo:'无'}} + {{orderDetailObject.tradeOrder.memPhone}} + {{orderDetailObject.tradeOrder.orderStatus | orderStatus}} + {{orderDetailObject.tradeOrder.payType | orderPayType}} + + {{orderDetailObject.tradeOrder.memCardNo}} + + {{orderDetailObject.tradeOrder.memDiscountName?orderDetailObject.tradeOrder.memDiscountName:'无'}} + {{orderDetailObject.tradeOrder.whetherRebate?'是':'否'}} + {{orderDetailObject.tradeOrder.remarks}} + + + + + {{orderDetailObject.mobileOrder.operatorName}} + {{orderDetailObject.tradeOrder.title}} + {{orderDetailObject.mobileOrder.rechargeStatus | rechargeStatus}} + + + + + {{orderDetailObject.tradeOrder.totalPrice}} 元 + {{orderDetailObject.tradeOrder.totalDeductionPrice}} 元 + {{orderDetailObject.tradeOrder.deductionProductPrice}} 元 + {{orderDetailObject.tradeOrder.deductionCouponPrice}} 元 + {{orderDetailObject.tradeOrder.payablePrice}} 元 + {{orderDetailObject.tradeOrder.payGold / 100}} 元 + + {{orderDetailObject.tradeOrder.payRealPrice!=null?orderDetailObject.tradeOrder.payRealPrice+' 元':'未支付'}} + + + + + + + +

创建时间:{{orderDetailObject.tradeOrder.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}

+

备注:{{orderDetailObject.tradeOrder.remarks?orderDetailObject.tradeOrder.remarks:'无'}}

+
+ +

取消时间:{{orderDetailObject.tradeOrder.cancelTime | date : 'yyyy-MM-dd HH:mm:ss'}}

+

备注:{{orderDetailObject.tradeOrder.cancelRemarks?orderDetailObject.tradeOrder.cancelRemarks:'无'}}

+
+ 支付时间:{{orderDetailObject.tradeOrder.payTime | date : 'yyyy-MM-dd HH:mm:ss'}} + 完成时间:{{orderDetailObject.tradeOrder.finishTime | date : 'yyyy-MM-dd HH:mm:ss'}} + 退款时间:{{orderDetailObject.tradeOrder.refundTime | date : 'yyyy-MM-dd HH:mm:ss'}} +
+
+
+ + + + + + 请求订单号 + 充值平台 + 充值状态 + 创建时间 + + + + + {{data.orderNo}} + {{data.rechargePlatform | platform}} + {{data.status | chlidRechargeStatus}} + {{data['createTime'] | date: 'yyyy-MM-dd HH:mm'}} + + + + +
+
+
diff --git a/src/app/admin/order-manage/mobile-recharge-order-list/mobile-recharge-order-list.component.scss b/src/app/admin/order-manage/mobile-recharge-order-list/mobile-recharge-order-list.component.scss new file mode 100644 index 0000000..363c972 --- /dev/null +++ b/src/app/admin/order-manage/mobile-recharge-order-list/mobile-recharge-order-list.component.scss @@ -0,0 +1,3 @@ +img { + width: 60px; +} diff --git a/src/app/admin/order-manage/mobile-recharge-order-list/mobile-recharge-order-list.component.ts b/src/app/admin/order-manage/mobile-recharge-order-list/mobile-recharge-order-list.component.ts new file mode 100644 index 0000000..67fa370 --- /dev/null +++ b/src/app/admin/order-manage/mobile-recharge-order-list/mobile-recharge-order-list.component.ts @@ -0,0 +1,165 @@ +import { Component, OnInit } from '@angular/core'; +import {environment} from '../../../../environments/environment'; +import {FormBuilder, FormGroup } from '_@angular_forms@9.0.7@@angular/forms'; +import {NzMessageService } from '_ng-zorro-antd@9.3.0@ng-zorro-antd'; +import {CompanyService} from '../../../services/company.service'; +import {LocalStorageService} from '../../../services/local-storage.service'; +import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; +import {CommonsService} from '../../../services/commons.service'; +import {animate, state, style, transition, trigger} from '_@angular_animations@9.0.7@@angular/animations'; +import {OrderMobileRechargeService} from '../../../services/order/order-mobile-recharge.service'; + +@Component({ + selector: 'app-mobile-recharge-order-list', + animations: [ + trigger('openClose', [ + state('open', style({ + height: '260px', + opacity: 1, + backgroundColor: 'white' + })), + state('closed', style({ + opacity: 1, + backgroundColor: 'white' + })), + transition('open => closed', [ + animate('0.3s') + ]), + transition('closed => open', [ + animate('0.3s') + ]), + ]), + ], + templateUrl: './mobile-recharge-order-list.component.html', + styleUrls: ['./mobile-recharge-order-list.component.scss'] +}) +export class MobileRechargeOrderListComponent implements OnInit { + + // 搜索框 + searchForm: FormGroup; + // 搜索框折叠 + isCollapse = false; + // 订单状态数据 + orderStatusArray = []; + // 公司数据 + companyArray = []; + // 角色类型 + roleType: number; + // 列表相关参数 + // 总条数 + total: number; + // 页码 + pageNum = 1; + // 条码 + pageSize = 10; + // 列表数据 + requestData = []; + // 列表加载 + loading = true; + // 订单详情相关参数 + // 详情模态框 + orderDetailModal = false; + // 详情模态框数据等待 + orderDetailModalLoading = false; + // 订单详情数据 + orderDetailObject: any = { + tradeOrder: {}, + mobileOrder: {}, + }; + // 数据加载中参数 + loadingObject = { + title: '加载中...', + status: false, + }; + // 请求地址参数 + FILE_URL = environment.imageUrl; + constructor( + private form: FormBuilder, + private store: LocalStorageService, + private message: NzMessageService, + private orderMobileRechargeService: OrderMobileRechargeService, + private companyService: CompanyService, + private commonsService: CommonsService, + ) { } + + ngOnInit(): void { + // 搜索表单初始化 + this.searchForm = this.form.group({ + orderNo: [null], + memPhone: [null], + payTimeArray: [null], + orderStatus: [null], + createTimeArray: [null], + refundTimeArray: [null], + companyId: [null], + payType: [null], + memCardNo: [null], + productType: [2], + }); + // 角色类型初始化 + this.roleType = Number(this.store.get(ADMIN_INFO_OBJECT)['secRole'].roleType); + // 查询公司列表 + if (this.roleType === 0 || this.roleType === 1) { + this.companyService.selectCompanyList({ pageNum: 1, pageSize: 999 }, data => { + this.companyArray = data['return_data']['list']; + }); + } + // 查询订单状态数据 + this.commonsService.getDictionary('ORDER_OIL_STATUS', data => { + this.orderStatusArray = data['return_data']; + }); + this.getRequest(true, this.searchForm.value); + } + + // 查询列表 + public getRequest(reset: boolean = false, whereObject: object) { + this.loading = true; + if (reset) { + this.pageNum = 1; + } + whereObject['pageNum'] = this.pageNum; + whereObject['pageSize'] = this.pageSize; + this.orderMobileRechargeService.getOrderList(whereObject, data => { + this.loading = false; + if (data['return_code'] === '000000') { + console.log(data); + this.requestData = data['return_data'].list; + this.total = data['return_data'].total; + } else { + this.message.error(data['return_msg']); + } + }); + } + + // 展示订单详情 + public showOrderDetail(orderNo: string) { + this.orderDetailModal = true; + + this.orderMobileRechargeService.getOrderDetail(orderNo, data => { + if (data['return_code'] === '000000') { + this.orderDetailModalLoading = true; + this.orderDetailObject = data['return_data']; + } else { + this.message.error(data['return_msg']); + } + this.orderDetailModalLoading = false; + }); + + } + + // 导出数据 + public excelOrder(whereObject) { + this.loadingObject.status = true; + this.loadingObject.title = '数据导出中...'; + this.orderMobileRechargeService.exportMobilePartyOrderList(whereObject, data => { + if (data['return_code'] === '000000') { + window.location.href = this.FILE_URL + 'temporary/' + data['return_data']; + } else { + this.message.error(data['return_msg']); + } + this.loadingObject.status = false; + }); + } + +} + diff --git a/src/app/services/order/order-mobile-recharge.service.ts b/src/app/services/order/order-mobile-recharge.service.ts new file mode 100644 index 0000000..0b8644b --- /dev/null +++ b/src/app/services/order/order-mobile-recharge.service.ts @@ -0,0 +1,54 @@ +import { Injectable } from '@angular/core'; +import {CommonsService} from '../commons.service'; +import {environment} from '../../../environments/environment'; +import {HttpClient} from '@angular/common/http'; + +@Injectable({ + providedIn: 'root' +}) +export class OrderMobileRechargeService { + constructor( + private http: HttpClient, + private common: CommonsService + ) { } + + /** + * @Author Sum1Dream + * @methodName getOrderKfcList + * @Description // 查询肯德基订单 + * @Date 17:20 2022/10/27 + * @Param param + */ + public getOrderList(param: object, callBack) { + this.http.get(environment.orderUrl + 'mobileRecharge/getOrderList?' + this.common.getWhereCondition(param)).subscribe(data => { + callBack(data); + }); + } + + /** + * @Author Sum1Dream + * @methodName exportMobilePartyOrderList + * @Description // 导出话费订单表格 + * @Date 10:07 2022/11/1 + * @Param param: object, callBack + */ + public exportMobilePartyOrderList(param: object, callBack) { + this.http.get(environment.orderUrl + 'mobileRecharge/exportMobilePartyOrderList?' + this.common.getWhereCondition(param)).subscribe(data => { + callBack(data); + }); + } + + /** + * @Author Sum1Dream + * @methodName getMobileOrderDetail + * @Description // 查询话费订单详情 + * @Date 10:05 2023/1/18 + * @Param orderNo: string, callBack + */ + public getOrderDetail(orderNo: string, callBack) { + this.http.get(environment.orderUrl + 'mobileRecharge/getMobileOrderDetail?orderNo=' + orderNo).subscribe(data => { + callBack(data); + }); + } + +}