diff --git a/src/app/admin/order/order-agent/order-agent.component.html b/src/app/admin/order/order-agent/order-agent.component.html index 25d765a..1b6612c 100644 --- a/src/app/admin/order/order-agent/order-agent.component.html +++ b/src/app/admin/order/order-agent/order-agent.component.html @@ -55,7 +55,7 @@ 支付模式 - + @@ -69,7 +69,7 @@ - + diff --git a/src/app/admin/order/order-h-list/order-h-list.component.html b/src/app/admin/order/order-h-list/order-h-list.component.html index 65aad4f..0ca73ee 100644 --- a/src/app/admin/order/order-h-list/order-h-list.component.html +++ b/src/app/admin/order/order-h-list/order-h-list.component.html @@ -6,107 +6,105 @@
- - - - - - - - - - - - - - - - - - - - +
- 订单号 + 订单状态 - + + + + + + +
+
- 订单流水号 + 充值类型 - + + + + +
- 支付模式 + 支付方式 - - - - + + + +
- 支付方式 + 充值号码 - - - - - +
- 状态 + 订单号 - - - - - - - - - +
+ + + + + + + + +
- 时间区间 + 支付时间
-
+ + + + + + + + +
- +
-
共计 {{total}} 条数据 - - - +
+ +
- 编号 - 商品名称 - 订单来源 + 编号 + 订单名称 + 订单类型 订单号 - 支付流水号 客户名称 - 客户电话 - 支付模式 - 支付方式 + 充值号码 + 充值金额 支付金额 生成时间 - 支付时间 - 取消时间 - 状态 - + 支付方式 + 状态 + 操作 {{i+1}} - {{data.goodsName}} - {{data.giveawayType}} + {{data.remarks}} + {{data.rechargeModel | rechargePrice}} {{data.orderNo}} - {{data.paySerialNo}} - {{data.memName == null ? '暂无': data.memName}} - {{data.memPhone == null ? '暂无': data.memPhone}} - {{data.payModel}} - {{data.payType}} + {{data.userName == null ? '暂无': data.userName}} + {{data.rechargeContent == null ? '暂无': data.rechargeContent}} + {{data.orderPrice}} {{data.payPrice}} - {{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.cancelTime | date: 'yyyy-MM-dd HH:mm:ss'}} - {{data.orderStatus}} - - - - + {{data.createTimed | date: 'yyyy-MM-dd HH:mm:ss'}} + {{data.payType | rechargePayType}} + {{data.status | rechargeStatus}} + + 详情 +
- - - - 退款理由 - - - - + + + {{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['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}} + +
+ +
diff --git a/src/app/admin/order/order-h-list/order-h-list.component.scss b/src/app/admin/order/order-h-list/order-h-list.component.scss index e69de29..b68da73 100644 --- a/src/app/admin/order/order-h-list/order-h-list.component.scss +++ b/src/app/admin/order/order-h-list/order-h-list.component.scss @@ -0,0 +1,5 @@ +.table-td-operation { + a { + margin-left: 8px; + } +} diff --git a/src/app/admin/order/order-h-list/order-h-list.component.ts b/src/app/admin/order/order-h-list/order-h-list.component.ts index 156d399..267a9df 100644 --- a/src/app/admin/order/order-h-list/order-h-list.component.ts +++ b/src/app/admin/order/order-h-list/order-h-list.component.ts @@ -1,13 +1,16 @@ import { Component, OnInit } from '@angular/core'; import {environment} from '../../../../environments/environment'; -import {FormBuilder, FormGroup} from '@angular/forms'; -import {OrderService} from '../../../services/order.service'; +import {FormBuilder, FormGroup, Validators} from '@angular/forms'; + import {IconService} from '../../../services/icon.service'; -import {NzMessageService} from 'ng-zorro-antd'; +import {NzMessageService, NzNotificationService} from 'ng-zorro-antd'; import {Router} from '@angular/router'; -import {CompanyService} from '../../../services/company.service'; -import {MerchantService} from '../../../services/merchant.service'; import {CommonsService} from '../../../services/commons.service'; +import {RechargeService} from '../../../services/recharge.service'; +import {DiscountService} from '../../../services/discount.service'; +import {CouponService} from '../../../services/coupon.service'; +import {ADMIN_INFO_OBJECT} from "../../../services/local-storage.namespace"; +import {LocalStorageService} from "../../../services/local-storage.service"; @Component({ selector: 'app-order-h-list', @@ -16,76 +19,78 @@ import {CommonsService} from '../../../services/commons.service'; }) export class OrderHListComponent implements OnInit { - WEB_SERVE_URL = environment.baseUrl; FILE_URL = environment.imageUrl; searchForm: FormGroup; // 搜索框 + validateForm: FormGroup; // 添加框 requestData = []; // 列表数据 - companyData = []; // 列表数据 - merchantData = []; // 列表数据 + total: number; // 页码 pageNum = 1; // 页码 pageSize = 10; // 条码 loading = true; - id: number; // 订单ID isVisible = false; - refundContent: string; + id: number; + edit = false; + data = {}; + private timer; // 定时器 constructor( private form: FormBuilder, - private order: OrderService, + private recharge: RechargeService, + private discount: DiscountService, + private coupon: CouponService, + private store: LocalStorageService, // 数据请求 private iconService: IconService, private message: NzMessageService, - private router: Router, - private company: CompanyService, - private merchant: MerchantService, - private common: CommonsService ) { } ngOnInit(): void { this.init(); - const whereObject = {}; - whereObject['pageNum'] = 1; - whereObject['pageSize'] = 10000; - this.company.selectCompanyList(whereObject, data => { - if (data['return_code'] === '000000') { - this.companyData = data['return_data'].list; - } else { - this.message.error(data['return_msg']); - } - }); - this.getMerchantListByCompany(this.searchForm.value.companyId); } + + public init(): void { this.searchForm = this.form.group({ - companyId: [null], - merchantId: [null], + status: [null], orderNo: [null], - paySerialNo: [null], - payModel: [null], + rechargeModel: [null], + rechargeContent: [null], + userPhone: [null], + payTime: [null], payType: [null], - orderStatus: [null], - payTime: [null] + createTime: [null], + }); + this.validateForm = this.form.group({ + type: [null, [Validators.required]], + price: [null, [Validators.required]], + realPrice: [null, [Validators.required]], }); + this.getRequest(true, this.searchForm.value); } // 查询列表 public getRequest(reset: boolean = false, whereObject: object) { - + if (this.store.get(ADMIN_INFO_OBJECT)['highAgent'] != null) { + whereObject['code'] = this.store.get(ADMIN_INFO_OBJECT)['highAgent'].id; + } 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; } whereObject['pageNum'] = this.pageNum; whereObject['pageSize'] = this.pageSize; - this.order.getMobileOrderList(whereObject, data => { + this.recharge.getOrderList(whereObject, data => { if (data['return_code'] === '000000') { this.requestData = data['return_data'].list; this.total = data['return_data'].total; @@ -95,43 +100,45 @@ export class OrderHListComponent implements OnInit { }); } - // 查询商户 - public getMerchantListByCompany(companyId: number): void { - this.merchant.getMerchantListByCompany(companyId, data => { + // 重置 + public resetForm(): void { + this.searchForm.reset(); + } + + // 详情 + public getDetail(id: number): void { + this.id = id; + this.recharge.getOrderById(id , data => { if (data['return_code'] === '000000') { - if (data['return_code'] === '000000') { - this.merchantData = data['return_data']; - } else { - this.message.error(data['return_msg']); - } + console.log(data); + this.data = data['return_data']; } else { this.message.error(data['return_msg']); } }); - } - // 重置 - public resetForm(): void { - this.searchForm.reset(); + this.isVisible = true; } - // 查看详情 - public getDetail(id: number): void { - this.router.navigate(['/admin/order/order-detail'], { - queryParams: { - merchantId: id - } - }).then(r => console.log(r)); + handleCancel(): void { + this.isVisible = false; } // 下载模板 downloadTemplate(whereObject) { + if (this.store.get(ADMIN_INFO_OBJECT)['highAgent'] != null) { + whereObject['code'] = this.store.get(ADMIN_INFO_OBJECT)['highAgent'].id; + } if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) { whereObject['payTimeS'] = whereObject['payTime'][0].getTime(); whereObject['payTimeE'] = whereObject['payTime'][1].getTime(); } - this.order.exportGoodsOrderList(whereObject, data => { + if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) { + whereObject['createTimeS'] = whereObject['createTimeS'][0].getTime(); + whereObject['createTimeE'] = whereObject['createTimeE'][1].getTime(); + } + this.recharge.exportOrderList(whereObject, data => { if (data['return_code'] === '000000') { window.location.href = this.FILE_URL + data['return_data']; } else { @@ -140,47 +147,5 @@ export class OrderHListComponent implements OnInit { }); } - provinceChange(e) { - console.log(e); - } - - // 退款 - public orderToRefund(id): void { - - } - - showModal(id): void { - console.log(id); - this.id = id; - this.isVisible = true; - } - - handleOk(): void { - if (this.refundContent == null || this.refundContent.length === 0) { - this.message.error('请输入退款原因'); - return; - } - this.common.showConfirm('确认订单是否退款', item => { - if (item) { - const params = { - orderId: this.id , - refundContent: this.refundContent - }; - this.order.refuelingOrderRefund(params, data => { - if (data['return_code'] === '000000') { - this.getRequest(false, this.searchForm.value); - this.isVisible = false; - this.message.success('申请退款中'); - } else { - this.message.error(data['return_msg']); - } - }); - } - }); - } - - handleCancel(): void { - this.isVisible = false; - } }