diff --git a/src/app/admin/order-manage/hlt-charge-order/hlt-charge-order.component.html b/src/app/admin/order-manage/hlt-charge-order/hlt-charge-order.component.html new file mode 100644 index 0000000..4b54738 --- /dev/null +++ b/src/app/admin/order-manage/hlt-charge-order/hlt-charge-order.component.html @@ -0,0 +1,236 @@ + + + + + + +
+
+
+
+ +
+ + 交易单号 + + + + +
+ +
+ + 客户电话 + + + + +
+
+ + 交易状态 + + + + + + +
+
+ +
+
+ + 分公司 + + + + + + +
+ +
+ + 支付方式 + + + + + + + + + + + + +
+
+ + 支付卡号 + + + + +
+
+ + 支付时间 + + + + +
+ +
+ + 创建时间 + + + + +
+ +
+ + 退款时间 + + + + +
+
+
+ +
+
+
+
+ + + +
+ 共计 {{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.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'}} +
+
+
+
+
+
diff --git a/src/app/admin/order-manage/hlt-charge-order/hlt-charge-order.component.scss b/src/app/admin/order-manage/hlt-charge-order/hlt-charge-order.component.scss new file mode 100644 index 0000000..363c972 --- /dev/null +++ b/src/app/admin/order-manage/hlt-charge-order/hlt-charge-order.component.scss @@ -0,0 +1,3 @@ +img { + width: 60px; +} diff --git a/src/app/admin/order-manage/hlt-charge-order/hlt-charge-order.component.ts b/src/app/admin/order-manage/hlt-charge-order/hlt-charge-order.component.ts new file mode 100644 index 0000000..b7c4bcc --- /dev/null +++ b/src/app/admin/order-manage/hlt-charge-order/hlt-charge-order.component.ts @@ -0,0 +1,151 @@ +import { Component, OnInit } from '@angular/core'; +import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms'; +import {environment} from '../../../../environments/environment'; +import {LocalStorageService} from '../../../services/local-storage.service'; +import {NzMessageService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd'; +import {OrderThirdPartyService} from '../../../services/order/order-third-party.service'; +import {CompanyService} from '../../../services/company.service'; +import {CommonsService} from '../../../services/commons.service'; +import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; +import {animate, state, style, transition, trigger} from '_@angular_animations@9.0.7@@angular/animations'; +import {HltOrderService} from "../../../services/order/hlt-order.service"; + +@Component({ + selector: 'app-hlt-charge-order', + 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: './hlt-charge-order.component.html', + styleUrls: ['./hlt-charge-order.component.scss'] +}) +export class HltChargeOrderComponent 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: {}, + }; + // 数据加载中参数 + loadingObject = { + title: '加载中...', + status: false, + }; + // 请求地址参数 + FILE_URL = environment.imageUrl; + constructor( + private form: FormBuilder, + private store: LocalStorageService, + private message: NzMessageService, + private hltOrderService: HltOrderService, + 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: [8], + }); + // 角色类型初始化 + 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.hltOrderService.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.orderDetailModalLoading = true; + this.hltOrderService.getOrderDetail(orderNo, data => { + if (data['return_code'] === '000000') { + this.orderDetailObject = data['return_data']; + } else { + this.message.error(data['return_msg']); + } + this.orderDetailModalLoading = false; + }); + + } + +} diff --git a/src/app/services/order/hlt-order.service.ts b/src/app/services/order/hlt-order.service.ts new file mode 100644 index 0000000..eaa97c9 --- /dev/null +++ b/src/app/services/order/hlt-order.service.ts @@ -0,0 +1,43 @@ +import { Injectable } from '@angular/core'; +import {HttpClient} from '_@angular_common@9.0.7@@angular/common/http'; +import {CommonsService} from '../commons.service'; +import {environment} from '../../../environments/environment'; + +@Injectable({ + providedIn: 'root' +}) +export class HltOrderService { + + 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 + 'hltRecharge/getOrderList?' + this.common.getWhereCondition(param)).subscribe(data => { + callBack(data); + }); + } + + /** + * @Author Sum1Dream + * @methodName getOrderDetail + * @Description // 根据订单号查询订单详情 + * @Date 14:38 2022/10/28 + * @Param orderNo: string, callBack + */ + public getOrderDetail(orderNo: string, callBack) { + this.http.get(environment.orderUrl + 'hltRecharge/getOrderDetail?orderNo=' + orderNo).subscribe(data => { + callBack(data); + }); + } + + +}