From 23423a7d0f23033c27c78973ecf82e4cbca61f9a Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Mon, 13 Feb 2023 14:09:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/discount/discount-edit/discount-edit.component.html | 2 +- src/app/admin/discount/discount-edit/discount-edit.component.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/admin/discount/discount-edit/discount-edit.component.html b/src/app/admin/discount/discount-edit/discount-edit.component.html index 0f9b714..7b73af9 100644 --- a/src/app/admin/discount/discount-edit/discount-edit.component.html +++ b/src/app/admin/discount/discount-edit/discount-edit.component.html @@ -16,7 +16,7 @@ 平台 - + diff --git a/src/app/admin/discount/discount-edit/discount-edit.component.ts b/src/app/admin/discount/discount-edit/discount-edit.component.ts index 9827bc4..a5f516f 100644 --- a/src/app/admin/discount/discount-edit/discount-edit.component.ts +++ b/src/app/admin/discount/discount-edit/discount-edit.component.ts @@ -54,6 +54,7 @@ export class DiscountEditComponent implements OnInit { } }); this.validateForm = this.fb.group({ + platform: [null, [Validators.required]], discountName: [null, [Validators.required]], discountCondition: [null], discountType: [null, [Validators.required]], From ba414dc905d017cd146e4ec55dd22c4ff7b94f34 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 14 Feb 2023 17:10:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dicount-package-order-list.component.ts | 2 +- .../hlt-charge-order.component.ts | 6 +- .../order-coupon-list.component.html | 98 +++++++++++++------ .../order-coupon-list.component.ts | 87 +++++++++++++++- src/app/services/order/hlt-order.service.ts | 2 +- src/environments/environment.ts | 2 +- 6 files changed, 160 insertions(+), 37 deletions(-) diff --git a/src/app/admin/order-manage/dicount-package-order-list/dicount-package-order-list.component.ts b/src/app/admin/order-manage/dicount-package-order-list/dicount-package-order-list.component.ts index a09ac99..c848fd0 100644 --- a/src/app/admin/order-manage/dicount-package-order-list/dicount-package-order-list.component.ts +++ b/src/app/admin/order-manage/dicount-package-order-list/dicount-package-order-list.component.ts @@ -11,7 +11,7 @@ import {CompanyService} from '../../../services/company.service'; import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; import {LocalStorageService} from '../../../services/local-storage.service'; import {HltOrderService} from "../../../services/order/hlt-order.service"; -import {animate, state, style, transition, trigger} from "_@angular_animations@9.0.7@@angular/animations"; +import {animate, state, style, transition, trigger} from '@angular/animations'; @Component({ selector: 'app-dicount-package-order-list', 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 index b7c4bcc..17434a9 100644 --- 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 @@ -1,14 +1,14 @@ 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"; +import {animate, state, style, transition, trigger} from '@angular/animations'; +import {FormBuilder, FormGroup} from '@angular/forms'; +import {NzMessageService} from 'ng-zorro-antd'; @Component({ selector: 'app-hlt-charge-order', diff --git a/src/app/admin/order-manage/order-coupon/order-coupon-list/order-coupon-list.component.html b/src/app/admin/order-manage/order-coupon/order-coupon-list/order-coupon-list.component.html index d3ee5fd..ecbfa65 100644 --- a/src/app/admin/order-manage/order-coupon/order-coupon-list/order-coupon-list.component.html +++ b/src/app/admin/order-manage/order-coupon/order-coupon-list/order-coupon-list.component.html @@ -137,6 +137,19 @@ + + +
+ + 异常状态 + + + + + + + +
@@ -191,45 +204,70 @@ 创建时间 支付时间 完成时间 + 异常状态 操作 - - {{data.companyName}} - {{data.orderNo}} - {{data.memPhone}} - {{data.couponKey}} - {{data.couponName}} - ¥{{data.couponPrice}} - {{data.couponSource}} - ¥{{data.totalPrice}} - ¥{{data.totalDeductionPrice}} - ¥{{data.deductionCouponPrice}} - ¥{{data.deductionProductPrice}} - ¥{{data.payablePrice}} - ¥{{data.payGold / 100}} - ¥{{data.payPrice}} - {{data.payType}} - {{data.memCardNo}} - {{data.orderStatus}} - {{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} - {{data.payTime | date : 'yyyy-MM-dd HH:mm:ss'}} - {{data.finishTime | date : 'yyyy-MM-dd HH:mm:ss'}} - - 操作列表 - - - - - + + {{data.companyName}} + {{data.orderNo}} + {{data.memPhone}} + {{data.couponKey}} + {{data.couponName}} + ¥{{data.couponPrice}} + {{data.couponSource}} + ¥{{data.totalPrice}} + ¥{{data.totalDeductionPrice}} + ¥{{data.deductionCouponPrice}} + ¥{{data.deductionProductPrice}} + ¥{{data.payablePrice}} + ¥{{data.payGold / 100}} + ¥{{data.payPrice}} + {{data.payType}} + {{data.memCardNo}} + {{data.orderStatus}} + {{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} + {{data.payTime | date : 'yyyy-MM-dd HH:mm:ss'}} + {{data.finishTime | date : 'yyyy-MM-dd HH:mm:ss'}} + {{data.exceptionStatus}} + + 操作列表 + + + + +
+ + +
+ + 交易单号 + + + + + + + 退款备注 + + + + +
+ +
+
+
+
diff --git a/src/app/admin/order-manage/order-coupon/order-coupon-list/order-coupon-list.component.ts b/src/app/admin/order-manage/order-coupon/order-coupon-list/order-coupon-list.component.ts index 2c510cb..75f08f9 100644 --- a/src/app/admin/order-manage/order-coupon/order-coupon-list/order-coupon-list.component.ts +++ b/src/app/admin/order-manage/order-coupon/order-coupon-list/order-coupon-list.component.ts @@ -3,7 +3,7 @@ import {NzMessageService, NzModalService} from 'ng-zorro-antd'; import {LocalStorageService} from '../../../../services/local-storage.service'; import {CommonsService} from '../../../../services/commons.service'; import {Router} from '@angular/router'; -import {FormBuilder, FormGroup} from '@angular/forms'; +import {FormBuilder, FormGroup, Validators} from '@angular/forms'; import {ADMIN_INFO_OBJECT} from '../../../../services/local-storage.namespace'; import {environment} from '../../../../../environments/environment'; import {OrderManageService} from '../../../../services/order/order-manage.service'; @@ -40,9 +40,15 @@ export class OrderCouponListComponent implements OnInit { gasOrder: {}, }; + refundModal = false; + refundForm: FormGroup; + refundRecordModal = false; + couponSourceArray = []; companyArray = []; + REFUND_COUPON_BTN = false; + constructor(private modal: NzModalService, private message: NzMessageService, private store: LocalStorageService, @@ -82,6 +88,12 @@ export class OrderCouponListComponent implements OnInit { createTime: [[createTimeS,createTimeE]], payTime: [null], finishTime: [null], + exceptionStatus: [null], + }); + + this.refundForm = this.form.group({ + orderNo: [{ value: null, disabled: true}, [Validators.required]], + remarks: [null], }); this.companyService.selectCompanyList({pageNum: 1, pageSize: 100}, data => { @@ -91,6 +103,8 @@ export class OrderCouponListComponent implements OnInit { this.couponSourceArray = data['return_data']; }); + this.REFUND_COUPON_BTN = this.commonsService.isBtnCompetence("BTN_REFUND_COUPON_BTN"); + this.requestData(1); } @@ -104,6 +118,11 @@ export class OrderCouponListComponent implements OnInit { this.orderCouponService.getOrderList(this.whereObject, data => { if (data['return_code'] === '000000') { this.dataObject = data['return_data']; + for (let data of this.dataObject['list']) { + if (data['exceptionStatus'] !== '正常') { + data['color'] = 'red'; + } + } } else { this.modal.error(data['return_msg']); } @@ -207,4 +226,70 @@ export class OrderCouponListComponent implements OnInit { this.pageSize = pageSize; this.requestData(1) } + + /** + * 打开退款模态框 + * @param orderNo + */ + showRefund(orderNo: string) { + this.refundForm.patchValue({ orderNo: orderNo}) + this.refundModal = true; + } + + /** + * 提交退款确认框 + */ + submitRefundConfirm() { + for (const i in this.refundForm.controls) { + this.refundForm.controls[i].markAsDirty(); + this.refundForm.controls[i].updateValueAndValidity(); + } + if (this.refundForm.status == null || this.refundForm.status !== 'VALID') { + this.modal.warning({ + nzTitle: '提示', + nzContent: '请填写所有必填项', + }); + return; + } + this.modal.confirm({ + nzTitle: '提示', + nzContent: '确定对交易订号('+this.refundForm.controls.orderNo.value+')进行退款吗?', + nzOnOk: () => this.submitRefund() + }); + } + + /** + * 提交退款 + * @param orderNo + */ + submitRefund() { + this.loadingObject.spinning = true; + this.loadingObject.msg = '处理中...'; + this.orderManageService.refundOrder(this.refundForm.controls.orderNo.value,this.refundForm.controls.remarks.value, data => { + if (data['return_code'] === '000000') { + this.modal.success({ + nzTitle: '提示', + nzContent: '操作成功', + }); + this.requestData(this.whereObject.pageNum); + this.closeRefund(); + } else { + this.modal.error({ + nzTitle: '提示', + nzContent: data['return_msg'], + }); + } + this.loadingObject.spinning = false; + }); + this.refundModal = true; + } + + /** + * 关闭退款模态框 + * @param orderNo + */ + closeRefund() { + this.refundModal = false; + } + } diff --git a/src/app/services/order/hlt-order.service.ts b/src/app/services/order/hlt-order.service.ts index eaa97c9..55278dc 100644 --- a/src/app/services/order/hlt-order.service.ts +++ b/src/app/services/order/hlt-order.service.ts @@ -1,7 +1,7 @@ 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'; +import {HttpClient} from '@angular/common/http'; @Injectable({ providedIn: 'root' diff --git a/src/environments/environment.ts b/src/environments/environment.ts index a6fe2c1..b57e54a 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -8,7 +8,7 @@ export const environment = { // orderUrl: 'http://localhost:9304/order/', // 测试环境服务器地址(请求数据地址) imageUrl: 'https://hsgcs.dctpay.com/filesystem/', baseUrl: 'https://hsg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) - orderUrl: 'https://hsg.dctpay.com/order/', // 测试环境服务器地址(请求数据地址) + orderUrl: 'http://localhost:9304/order/', // 测试环境服务器地址(请求数据地址) key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=', inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=', };