提交代码

dev
胡锐 1 year ago
parent ee60233488
commit e4928d5fc2
  1. 1
      src/app/admin/order-manage/order-coupon/order-coupon-list/order-coupon-list.component.html
  2. 39
      src/app/admin/order-manage/order-coupon/order-coupon-list/order-coupon-list.component.ts
  3. 12
      src/app/services/order/order-coupon.service.ts

@ -240,6 +240,7 @@
<nz-dropdown-menu #menu="nzDropdownMenu"> <nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable> <ul nz-menu nzSelectable>
<li nz-menu-item (click)="showOrderDetail(data.orderNo)"><a>交易详情</a></li> <li nz-menu-item (click)="showOrderDetail(data.orderNo)"><a>交易详情</a></li>
<li *ngIf="data.exceptionStatus != '正常' && REISSUE_COUPON_BTN == true" nz-menu-item (click)="reissue(data.orderNo)"><a>补发</a></li>
<li *ngIf="data.exceptionStatus != '正常' && REFUND_COUPON_BTN == true" nz-menu-item (click)="showRefund(data.orderNo)"><a>交易退款</a></li> <li *ngIf="data.exceptionStatus != '正常' && REFUND_COUPON_BTN == true" nz-menu-item (click)="showRefund(data.orderNo)"><a>交易退款</a></li>
</ul> </ul>
</nz-dropdown-menu> </nz-dropdown-menu>

@ -48,6 +48,7 @@ export class OrderCouponListComponent implements OnInit {
companyArray = []; companyArray = [];
REFUND_COUPON_BTN = false; REFUND_COUPON_BTN = false;
REISSUE_COUPON_BTN = false;
GZ_SINOPEC_STATUS = false; GZ_SINOPEC_STATUS = false;
constructor(private modal: NzModalService, constructor(private modal: NzModalService,
private message: NzMessageService, private message: NzMessageService,
@ -112,6 +113,7 @@ export class OrderCouponListComponent implements OnInit {
}); });
this.REFUND_COUPON_BTN = this.commonsService.isBtnCompetence("BTN_REFUND_COUPON_BTN"); this.REFUND_COUPON_BTN = this.commonsService.isBtnCompetence("BTN_REFUND_COUPON_BTN");
this.REISSUE_COUPON_BTN = this.commonsService.isBtnCompetence("BTN_REISSUE_COUPON_BTN");
this.requestData(1); this.requestData(1);
} }
@ -244,6 +246,43 @@ export class OrderCouponListComponent implements OnInit {
this.refundModal = true; this.refundModal = true;
} }
/**
* 退
* @param orderNo
*/
reissue(orderNo: string) {
this.modal.confirm({
nzTitle: '提示?',
nzContent: '<b style="color: red;">确定是否补发卡券?</b>',
nzOkText: '是',
nzOkType: 'danger',
nzOnOk: () => this.submitReissue(orderNo),
nzCancelText: '否',
});
}
submitReissue(orderNo: string) {
this.loadingObject.spinning = true;
this.loadingObject.msg = '处理中...';
this.orderCouponService.reissue(orderNo, data => {
this.loadingObject.spinning = false;
if (data['return_code'] === '000000') {
this.modal.success({
nzTitle: '提示',
nzContent: '操作成功',
});
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg'],
});
}
this.loadingObject.spinning = false;
});
}
/** /**
* 退 * 退
*/ */

@ -25,6 +25,18 @@ export class OrderCouponService {
}); });
} }
/**
*
*
* @param orderNo
* @param callBack
*/
public reissue(orderNo: string, callBack) {
this.http.get(environment.orderUrl + 'coupon/reissue?orderNo=' + orderNo).subscribe(data => {
callBack(data);
});
}
/** /**
* *
* *

Loading…
Cancel
Save