|
|
@ -4,6 +4,7 @@ import {IconService} from '../../../services/icon.service'; |
|
|
|
import {NzMessageService} from 'ng-zorro-antd'; |
|
|
|
import {NzMessageService} from 'ng-zorro-antd'; |
|
|
|
import {ActivatedRoute, Router} from '@angular/router'; |
|
|
|
import {ActivatedRoute, Router} from '@angular/router'; |
|
|
|
import {AuditService} from '../../../services/audit.service'; |
|
|
|
import {AuditService} from '../../../services/audit.service'; |
|
|
|
|
|
|
|
import {CommonsService} from '../../../services/commons.service'; |
|
|
|
|
|
|
|
|
|
|
|
@Component({ |
|
|
|
@Component({ |
|
|
|
selector: 'app-audit-coupon', |
|
|
|
selector: 'app-audit-coupon', |
|
|
@ -18,14 +19,18 @@ export class AuditCouponComponent implements OnInit { |
|
|
|
pageNum = 1; // 页码
|
|
|
|
pageNum = 1; // 页码
|
|
|
|
pageSize = 10; // 条码
|
|
|
|
pageSize = 10; // 条码
|
|
|
|
loading = true; |
|
|
|
loading = true; |
|
|
|
|
|
|
|
isVisible = false; |
|
|
|
|
|
|
|
id: number; |
|
|
|
|
|
|
|
data = { |
|
|
|
|
|
|
|
approve: {}, |
|
|
|
|
|
|
|
object: {} |
|
|
|
|
|
|
|
}; |
|
|
|
constructor( |
|
|
|
constructor( |
|
|
|
private form: FormBuilder, |
|
|
|
private form: FormBuilder, |
|
|
|
private audit: AuditService, |
|
|
|
private audit: AuditService, |
|
|
|
private iconService: IconService, |
|
|
|
private iconService: IconService, |
|
|
|
private message: NzMessageService, |
|
|
|
private message: NzMessageService, |
|
|
|
private router: Router, |
|
|
|
private common: CommonsService, |
|
|
|
private activatedRoute: ActivatedRoute, |
|
|
|
|
|
|
|
) { |
|
|
|
) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -71,14 +76,41 @@ export class AuditCouponComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
// 查看详情
|
|
|
|
// 查看详情
|
|
|
|
public getDetail(id: number): void { |
|
|
|
public getDetail(id: number): void { |
|
|
|
|
|
|
|
this.id = id; |
|
|
|
this.audit.getApproveDetail(id, data => { |
|
|
|
this.audit.getApproveDetail(id, data => { |
|
|
|
console.log(data); |
|
|
|
if (data['return_code'] === '000000') { |
|
|
|
|
|
|
|
this.data = data['return_data']; |
|
|
|
|
|
|
|
this.isVisible = true; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.message.error(data['return_msg']); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handleCancel(): void { |
|
|
|
|
|
|
|
this.isVisible = false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public approveProcessed(statusD: number): void { |
|
|
|
|
|
|
|
const p = { |
|
|
|
|
|
|
|
approveId: this.id, |
|
|
|
|
|
|
|
status: statusD, |
|
|
|
|
|
|
|
remarks: '', |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
this.common.showConfirm('是否确定' , r => { |
|
|
|
|
|
|
|
if (r) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.audit.approveProcessed(p , data => { |
|
|
|
|
|
|
|
if (data['return_code'] === '000000') { |
|
|
|
|
|
|
|
this.isVisible = false; |
|
|
|
|
|
|
|
this.getRequest(true, this.searchForm.value); |
|
|
|
|
|
|
|
this.message.success('操作成功'); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.message.error(data['return_msg']); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
// this.router.navigate(['/admin/merchantStore/store-detail'], {
|
|
|
|
|
|
|
|
// queryParams: {
|
|
|
|
|
|
|
|
// storeId: id
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }).then(r => console.log(r));
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|