|
|
@ -7,7 +7,7 @@ import {IconService} from '../../../services/icon.service'; |
|
|
|
|
|
|
|
|
|
|
|
import {CommonsService} from '../../../services/commons.service'; |
|
|
|
import {CommonsService} from '../../../services/commons.service'; |
|
|
|
import {RechargeService} from '../../../services/recharge.service'; |
|
|
|
import {RechargeService} from '../../../services/recharge.service'; |
|
|
|
import {NzMessageService, NzNotificationService} from 'ng-zorro-antd'; |
|
|
|
import {NzMessageService, NzModalService, NzNotificationService, NzUploadChangeParam} from 'ng-zorro-antd'; |
|
|
|
import {FormBuilder, FormGroup, Validators} from '@angular/forms'; |
|
|
|
import {FormBuilder, FormGroup, Validators} from '@angular/forms'; |
|
|
|
import {Router} from '@angular/router'; |
|
|
|
import {Router} from '@angular/router'; |
|
|
|
|
|
|
|
|
|
|
@ -18,10 +18,12 @@ import {Router} from '@angular/router'; |
|
|
|
}) |
|
|
|
}) |
|
|
|
export class OrderListComponent implements OnInit , OnDestroy { |
|
|
|
export class OrderListComponent implements OnInit , OnDestroy { |
|
|
|
FILE_URL = environment.imageUrl; |
|
|
|
FILE_URL = environment.imageUrl; |
|
|
|
|
|
|
|
WEB_SERVE_URL = environment.baseUrl; |
|
|
|
searchForm: FormGroup; // 搜索框
|
|
|
|
searchForm: FormGroup; // 搜索框
|
|
|
|
validateForm: FormGroup; // 添加框
|
|
|
|
validateForm: FormGroup; // 添加框
|
|
|
|
requestData = []; // 列表数据
|
|
|
|
requestData = []; // 列表数据
|
|
|
|
|
|
|
|
importErrorStudentArray = []; |
|
|
|
|
|
|
|
errorStudentVisible = false; |
|
|
|
total: number; // 页码
|
|
|
|
total: number; // 页码
|
|
|
|
pageNum = 1; // 页码
|
|
|
|
pageNum = 1; // 页码
|
|
|
|
pageSize = 10; // 条码
|
|
|
|
pageSize = 10; // 条码
|
|
|
@ -35,6 +37,7 @@ export class OrderListComponent implements OnInit , OnDestroy { |
|
|
|
private form: FormBuilder, |
|
|
|
private form: FormBuilder, |
|
|
|
private recharge: RechargeService, |
|
|
|
private recharge: RechargeService, |
|
|
|
private discount: DiscountService, |
|
|
|
private discount: DiscountService, |
|
|
|
|
|
|
|
private modal: NzModalService, |
|
|
|
private coupon: CouponService, |
|
|
|
private coupon: CouponService, |
|
|
|
private iconService: IconService, |
|
|
|
private iconService: IconService, |
|
|
|
private message: NzMessageService, |
|
|
|
private message: NzMessageService, |
|
|
@ -77,6 +80,7 @@ export class OrderListComponent implements OnInit , OnDestroy { |
|
|
|
idCard: [null], |
|
|
|
idCard: [null], |
|
|
|
rechargeContent: [null], |
|
|
|
rechargeContent: [null], |
|
|
|
userPhone: [null], |
|
|
|
userPhone: [null], |
|
|
|
|
|
|
|
rechargeType: [null], |
|
|
|
payTime: [null], |
|
|
|
payTime: [null], |
|
|
|
payType: [null], |
|
|
|
payType: [null], |
|
|
|
createTime: [null], |
|
|
|
createTime: [null], |
|
|
@ -214,5 +218,35 @@ export class OrderListComponent implements OnInit , OnDestroy { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handleChange(info: NzUploadChangeParam): void { |
|
|
|
|
|
|
|
if (info.file.status === 'done') { |
|
|
|
|
|
|
|
if (info.file.response.return_code === '000000') { |
|
|
|
|
|
|
|
this.loading = false; |
|
|
|
|
|
|
|
if (info.file.response.return_data == null || info.file.response.return_data.errorTotal === 0) { |
|
|
|
|
|
|
|
this.message.success('导入成功'); |
|
|
|
|
|
|
|
this.getRequest(true, this.searchForm.value); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.modal.warning({ |
|
|
|
|
|
|
|
nzTitle: '提示', |
|
|
|
|
|
|
|
nzOkText: '查看失败数据', |
|
|
|
|
|
|
|
nzContent: '只有部分数据导入成功', |
|
|
|
|
|
|
|
nzOnOk: () => this.showErrorStudentModal(info.file.response.return_data) |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.loading = false; |
|
|
|
|
|
|
|
this.message.error(info.file.response.return_msg); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (info.file.status === 'error') { |
|
|
|
|
|
|
|
this.message.error('上传错误'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 打开模态框
|
|
|
|
|
|
|
|
showErrorStudentModal(data: []) { |
|
|
|
|
|
|
|
this.getRequest(true, this.searchForm.value); |
|
|
|
|
|
|
|
this.importErrorStudentArray = data['errorData']; |
|
|
|
|
|
|
|
this.errorStudentVisible = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|