From 12cb9736c8b1dec628a2e15b6dbbeb867bd7bb17 Mon Sep 17 00:00:00 2001 From: YUANYE <418471657@qq.com> Date: Sat, 18 Sep 2021 17:40:47 +0800 Subject: [PATCH] 1 --- .../order-c-list/order-c-list.component.html | 2 - .../order-h-list/order-h-list.component.html | 175 ++++++++++++++++ .../order-h-list/order-h-list.component.scss | 0 .../order-h-list/order-h-list.component.ts | 186 ++++++++++++++++++ .../order-k-list/order-k-list.component.html | 2 - src/app/admin/order/order-routing.module.ts | 2 + src/app/admin/order/order.module.ts | 3 +- .../user/user-gold/user-gold.component.html | 48 ++++- .../user/user-gold/user-gold.component.scss | 6 + .../user/user-gold/user-gold.component.ts | 1 + src/app/services/order.service.ts | 7 + 11 files changed, 421 insertions(+), 11 deletions(-) create mode 100644 src/app/admin/order/order-h-list/order-h-list.component.html create mode 100644 src/app/admin/order/order-h-list/order-h-list.component.scss create mode 100644 src/app/admin/order/order-h-list/order-h-list.component.ts diff --git a/src/app/admin/order/order-c-list/order-c-list.component.html b/src/app/admin/order/order-c-list/order-c-list.component.html index c0bb131..8db0354 100644 --- a/src/app/admin/order/order-c-list/order-c-list.component.html +++ b/src/app/admin/order/order-c-list/order-c-list.component.html @@ -125,7 +125,6 @@ 编号 商品名称 订单来源 - 订单类型 订单号 支付流水号 客户名称 @@ -145,7 +144,6 @@ {{i+1}} {{data.goodsName}} {{data.giveawayType}} - {{data.goodsType}} {{data.orderNo}} {{data.paySerialNo}} {{data.memName == null ? '暂无': data.memName}} 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 new file mode 100644 index 0000000..65aad4f --- /dev/null +++ b/src/app/admin/order/order-h-list/order-h-list.component.html @@ -0,0 +1,175 @@ + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + +
+ + 订单号 + + + + +
+
+ + 订单流水号 + + + + +
+
+ + 支付模式 + + + + + + + + +
+
+ + 支付方式 + + + + + + + + +
+
+ + 状态 + + + + + + + + + + + + +
+
+ + 时间区间 + + + + +
+
+ +
+
+ + +
+
+
+
+ + +
+ 共计 {{total}} 条数据 + + + + + + + 编号 + 商品名称 + 订单来源 + 订单号 + 支付流水号 + 客户名称 + 客户电话 + 支付模式 + 支付方式 + 支付金额 + 生成时间 + 支付时间 + 取消时间 + 状态 + + + + + + {{i+1}} + {{data.goodsName}} + {{data.giveawayType}} + {{data.orderNo}} + {{data.paySerialNo}} + {{data.memName == null ? '暂无': data.memName}} + {{data.memPhone == null ? '暂无': data.memPhone}} + {{data.payModel}} + {{data.payType}} + {{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}} + + + + + + +
+ + + + + 退款理由 + + + + + + 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 new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..156d399 --- /dev/null +++ b/src/app/admin/order/order-h-list/order-h-list.component.ts @@ -0,0 +1,186 @@ +import { Component, OnInit } from '@angular/core'; +import {environment} from '../../../../environments/environment'; +import {FormBuilder, FormGroup} from '@angular/forms'; +import {OrderService} from '../../../services/order.service'; +import {IconService} from '../../../services/icon.service'; +import {NzMessageService} 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'; + +@Component({ + selector: 'app-order-h-list', + templateUrl: './order-h-list.component.html', + styleUrls: ['./order-h-list.component.scss'] +}) +export class OrderHListComponent implements OnInit { + + WEB_SERVE_URL = environment.baseUrl; + FILE_URL = environment.imageUrl; + searchForm: FormGroup; // 搜索框 + requestData = []; // 列表数据 + companyData = []; // 列表数据 + merchantData = []; // 列表数据 + total: number; // 页码 + pageNum = 1; // 页码 + pageSize = 10; // 条码 + loading = true; + id: number; // 订单ID + isVisible = false; + refundContent: string; + constructor( + private form: FormBuilder, + private order: OrderService, + 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], + orderNo: [null], + paySerialNo: [null], + payModel: [null], + payType: [null], + orderStatus: [null], + payTime: [null] + }); + this.getRequest(true, this.searchForm.value); + } + + // 查询列表 + public getRequest(reset: boolean = false, whereObject: object) { + + if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) { + whereObject['payTimeS'] = whereObject['payTime'][0].getTime(); + whereObject['payTimeE'] = whereObject['payTime'][1].getTime(); + } + + + this.loading = false; + if (reset) { + this.pageNum = 1; + } + whereObject['pageNum'] = this.pageNum; + whereObject['pageSize'] = this.pageSize; + this.order.getMobileOrderList(whereObject, data => { + if (data['return_code'] === '000000') { + this.requestData = data['return_data'].list; + this.total = data['return_data'].total; + } else { + this.message.error(data['return_msg']); + } + }); + } + + // 查询商户 + public getMerchantListByCompany(companyId: number): void { + this.merchant.getMerchantListByCompany(companyId, data => { + if (data['return_code'] === '000000') { + if (data['return_code'] === '000000') { + this.merchantData = data['return_data']; + } else { + this.message.error(data['return_msg']); + } + } else { + this.message.error(data['return_msg']); + } + }); + } + + // 重置 + public resetForm(): void { + this.searchForm.reset(); + } + + + // 查看详情 + public getDetail(id: number): void { + this.router.navigate(['/admin/order/order-detail'], { + queryParams: { + merchantId: id + } + }).then(r => console.log(r)); + } + + // 下载模板 + downloadTemplate(whereObject) { + 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 (data['return_code'] === '000000') { + window.location.href = this.FILE_URL + data['return_data']; + } else { + this.message.error(data['return_msg']); + } + }); + } + + 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; + } + +} diff --git a/src/app/admin/order/order-k-list/order-k-list.component.html b/src/app/admin/order/order-k-list/order-k-list.component.html index 1f9d1b3..65aad4f 100644 --- a/src/app/admin/order/order-k-list/order-k-list.component.html +++ b/src/app/admin/order/order-k-list/order-k-list.component.html @@ -125,7 +125,6 @@ 编号 商品名称 订单来源 - 订单类型 订单号 支付流水号 客户名称 @@ -145,7 +144,6 @@ {{i+1}} {{data.goodsName}} {{data.giveawayType}} - {{data.goodsType}} {{data.orderNo}} {{data.paySerialNo}} {{data.memName == null ? '暂无': data.memName}} diff --git a/src/app/admin/order/order-routing.module.ts b/src/app/admin/order/order-routing.module.ts index ad3e432..b3d5c8e 100644 --- a/src/app/admin/order/order-routing.module.ts +++ b/src/app/admin/order/order-routing.module.ts @@ -7,6 +7,7 @@ import {OrderCouponComponent} from './order-coupon/order-coupon.component'; import {OrderTListComponent} from './order-Tlist/order-Tlist.component'; import {OrderCListComponent} from './order-c-list/order-c-list.component'; import {OrderKListComponent} from './order-k-list/order-k-list.component'; +import {OrderHListComponent} from './order-h-list/order-h-list.component'; const routes: Routes = [ @@ -17,6 +18,7 @@ const routes: Routes = [ { path: 'order-coupon', component: OrderCouponComponent }, { path: 'order-c-list', component: OrderCListComponent }, { path: 'order-k-list', component: OrderKListComponent }, + { path: 'order-h-list', component: OrderHListComponent }, ]; @NgModule({ diff --git a/src/app/admin/order/order.module.ts b/src/app/admin/order/order.module.ts index c8e15f0..3f91ee1 100644 --- a/src/app/admin/order/order.module.ts +++ b/src/app/admin/order/order.module.ts @@ -15,10 +15,11 @@ import { OrderCouponComponent } from './order-coupon/order-coupon.component'; import {OrderTListComponent} from './order-Tlist/order-Tlist.component'; import { OrderKListComponent } from './order-k-list/order-k-list.component'; import {OrderCListComponent} from './order-c-list/order-c-list.component'; +import { OrderHListComponent } from './order-h-list/order-h-list.component'; @NgModule({ - declarations: [OrderListComponent, OrderDetailComponent, OrderCouponsComponent, OrderCouponComponent , OrderTListComponent, OrderKListComponent , OrderCListComponent], + declarations: [OrderListComponent, OrderDetailComponent, OrderCouponsComponent, OrderCouponComponent , OrderTListComponent, OrderKListComponent , OrderCListComponent, OrderHListComponent], imports: [ CommonModule, OrderRoutingModule, diff --git a/src/app/admin/user/user-gold/user-gold.component.html b/src/app/admin/user/user-gold/user-gold.component.html index 7531a33..c3b4a32 100644 --- a/src/app/admin/user/user-gold/user-gold.component.html +++ b/src/app/admin/user/user-gold/user-gold.component.html @@ -2,6 +2,31 @@ +
+
+
+ + ¥ 300 + +
+
+ + ¥ 9000 + +
+
+ + ¥ 200 + +
+
+ + ¥ 2000 + +
+
+
+
@@ -17,6 +42,17 @@
+
+ + 来源类型 + + + + + + + +
@@ -49,21 +85,21 @@ 编号 用户名称 用户电话 - 金币类型 来源类型 - 金币数 产生时间 + 金币类型 + 金币数 {{i+1}} - {{data['highUser'].name}} - {{data['highUser'].phone}} - {{data.goldType === 1 ? '收入' : '支出'}} + {{data['highUser']?.name}} + {{data['highUser']?.phone}} {{data.resType === 1 ? '充值' : '订单'}} - {{data.gold}} {{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} + {{data.goldType === 1 ? '收入' : '支出'}} + {{data.gold}}
diff --git a/src/app/admin/user/user-gold/user-gold.component.scss b/src/app/admin/user/user-gold/user-gold.component.scss index ffa041c..962b0f5 100644 --- a/src/app/admin/user/user-gold/user-gold.component.scss +++ b/src/app/admin/user/user-gold/user-gold.component.scss @@ -2,3 +2,9 @@ height: 50px; width: 50px; } +.statistics { + span { + font-size: 26px; + font-weight: bold; + } +} diff --git a/src/app/admin/user/user-gold/user-gold.component.ts b/src/app/admin/user/user-gold/user-gold.component.ts index c40bf2f..85323ba 100644 --- a/src/app/admin/user/user-gold/user-gold.component.ts +++ b/src/app/admin/user/user-gold/user-gold.component.ts @@ -36,6 +36,7 @@ export class UserGoldComponent implements OnInit { public init(): void { this.searchForm = this.form.group({ goldType: [null], + resType: [null], }); this.getRequest(true, this.searchForm.value); } diff --git a/src/app/services/order.service.ts b/src/app/services/order.service.ts index b5d022d..77f3c67 100644 --- a/src/app/services/order.service.ts +++ b/src/app/services/order.service.ts @@ -61,6 +61,13 @@ export class OrderService { }); } + + public getMobileOrderList(paramsObject: object, callBack) { + this.http.get(environment.baseUrl + 'highOrder/getMobileOrderList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { + callBack(data); + }); + } + /** * 查询订单列表 *