|
|
|
@ -49,20 +49,20 @@ export class OrderListComponent implements OnInit , OnDestroy { |
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
this.init(); |
|
|
|
|
this.timer = setInterval(() => { // 设置定时刷新事件,每隔1分钟刷新
|
|
|
|
|
this.recharge.countOrder(data => { |
|
|
|
|
if (data['return_data'] > 0) { |
|
|
|
|
this.getRequest(true, this.searchForm.value); |
|
|
|
|
this.notification.info( |
|
|
|
|
'充值订单', |
|
|
|
|
'您有' + data['return_data'] + '条未充值的订单,请尽快充值,点击可查看未充值订单!' |
|
|
|
|
).onClick.subscribe(() => { |
|
|
|
|
this.searchForm.value.status = 2; |
|
|
|
|
this.getRequest(true, this.searchForm.value); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, 10000); |
|
|
|
|
// this.timer = setInterval(() => { // 设置定时刷新事件,每隔1分钟刷新
|
|
|
|
|
// this.recharge.countOrder(data => {
|
|
|
|
|
// if (data['return_data'] > 0) {
|
|
|
|
|
// this.getRequest(true, this.searchForm.value);
|
|
|
|
|
// this.notification.info(
|
|
|
|
|
// '充值订单',
|
|
|
|
|
// '您有' + data['return_data'] + '条未充值的订单,请尽快充值,点击可查看未充值订单!'
|
|
|
|
|
// ).onClick.subscribe(() => {
|
|
|
|
|
// this.searchForm.value.status = 2;
|
|
|
|
|
// this.getRequest(true, this.searchForm.value);
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// }, 10000);
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 销毁
|
|
|
|
@ -147,10 +147,10 @@ export class OrderListComponent implements OnInit , OnDestroy { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public finishOrder(id: number): void { |
|
|
|
|
this.common.showConfirm('确认订单是否完成充值', item => { |
|
|
|
|
public getMobileRechargeByOrderId(id: number): void { |
|
|
|
|
this.common.showConfirm('确认订单是否再次充值', item => { |
|
|
|
|
if (item) { |
|
|
|
|
this.recharge.finishOrder(id, data => { |
|
|
|
|
this.recharge.getMobileRechargeByOrderId(id, data => { |
|
|
|
|
if (data['return_code'] === '000000') { |
|
|
|
|
this.getRequest(false, this.searchForm.value); |
|
|
|
|
this.isVisible = false; |
|
|
|
|