提交代码

pull/1/head
胡锐 2 years ago
parent 0e43b243a6
commit ba414dc905
  1. 2
      src/app/admin/order-manage/dicount-package-order-list/dicount-package-order-list.component.ts
  2. 6
      src/app/admin/order-manage/hlt-charge-order/hlt-charge-order.component.ts
  3. 98
      src/app/admin/order-manage/order-coupon/order-coupon-list/order-coupon-list.component.html
  4. 87
      src/app/admin/order-manage/order-coupon/order-coupon-list/order-coupon-list.component.ts
  5. 2
      src/app/services/order/hlt-order.service.ts
  6. 2
      src/environments/environment.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',

@ -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',

@ -137,6 +137,19 @@
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">异常状态</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select nzAllowClear formControlName="exceptionStatus">
<nz-option nzValue="0" nzLabel="正常"></nz-option>
<nz-option nzValue="1" nzLabel="异常"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div nz-row>
@ -191,45 +204,70 @@
<th nzWidth="180px">创建时间</th>
<th nzWidth="180px">支付时间</th>
<th nzWidth="180px">完成时间</th>
<th nzWidth="100px">异常状态</th>
<th nzWidth="110px" nzRight="0px">操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data;let i = index">
<td *ngIf="roleType == 0 || roleType == 1">{{data.companyName}}</td>
<td>{{data.orderNo}}</td>
<td>{{data.memPhone}}</td>
<td>{{data.couponKey}}</td>
<td>{{data.couponName}}</td>
<td>¥{{data.couponPrice}}</td>
<td>{{data.couponSource}}</td>
<td>¥{{data.totalPrice}}</td>
<td>¥{{data.totalDeductionPrice}}</td>
<td>¥{{data.deductionCouponPrice}}</td>
<td>¥{{data.deductionProductPrice}}</td>
<td>¥{{data.payablePrice}}</td>
<td>¥{{data.payGold / 100}}</td>
<td>¥{{data.payPrice}}</td>
<td>{{data.payType}}</td>
<td>{{data.memCardNo}}</td>
<td>{{data.orderStatus}}</td>
<td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.payTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.finishTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight="0px" class="table-td-operation">
<a nz-dropdown [nzDropdownMenu]="menu"> 操作列表 <i nz-icon nzType="down"></i> </a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item (click)="showOrderDetail(data.orderNo)"><a>详情</a></li>
</ul>
</nz-dropdown-menu>
</td>
</tr>
<tr *ngFor="let data of basicTable.data;let i = index" [style]="{ color: data.color}">
<td *ngIf="roleType == 0 || roleType == 1">{{data.companyName}}</td>
<td>{{data.orderNo}}</td>
<td>{{data.memPhone}}</td>
<td>{{data.couponKey}}</td>
<td>{{data.couponName}}</td>
<td>¥{{data.couponPrice}}</td>
<td>{{data.couponSource}}</td>
<td>¥{{data.totalPrice}}</td>
<td>¥{{data.totalDeductionPrice}}</td>
<td>¥{{data.deductionCouponPrice}}</td>
<td>¥{{data.deductionProductPrice}}</td>
<td>¥{{data.payablePrice}}</td>
<td>¥{{data.payGold / 100}}</td>
<td>¥{{data.payPrice}}</td>
<td>{{data.payType}}</td>
<td>{{data.memCardNo}}</td>
<td>{{data.orderStatus}}</td>
<td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.payTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.finishTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.exceptionStatus}}</td>
<td nzRight="0px" class="table-td-operation">
<a nz-dropdown [nzDropdownMenu]="menu"> 操作列表 <i nz-icon nzType="down"></i> </a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item (click)="showOrderDetail(data.orderNo)"><a>交易详情</a></li>
<li *ngIf="data.exceptionStatus != '正常' && REFUND_COUPON_BTN == true" nz-menu-item (click)="showRefund(data.orderNo)"><a>交易退款</a></li>
</ul>
</nz-dropdown-menu>
</td>
</tr>
</tbody>
</nz-table>
</div>
</nz-spin>
<nz-modal [(nzVisible)]="refundModal" nzTitle="交易退款" (nzOnCancel)="closeRefund()" [nzFooter]="null" nzWidth="800px">
<nz-spin [nzSpinning]="loadingObject.spinning" [nzTip]="loadingObject.msg">
<form nz-form [formGroup]="refundForm">
<nz-form-item>
<nz-form-label>交易单号</nz-form-label>
<nz-form-control>
<input nz-input formControlName="orderNo" />
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label>退款备注</nz-form-label>
<nz-form-control>
<textarea rows="4" nz-input formControlName="remarks" maxlength="100"></textarea>
</nz-form-control>
</nz-form-item>
<div style="text-align: center;">
<button nz-button [nzType]="'primary'" (click)="submitRefundConfirm()">提交退款</button>
</div>
</form>
</nz-spin>
</nz-modal>
<nz-modal [(nzVisible)]="orderDetailModal" nzTitle="交易详情" (nzOnCancel)="closeOrderDetail()" [nzFooter]="null"
nzWidth="1000px" [nzBodyStyle]=" { padding: '5px 5px 30px 5px'}">

@ -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;
}
}

@ -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'

@ -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=',
};

Loading…
Cancel
Save