
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STColumn } from '@delon/abc/st';
import { _HttpClient } from '@delon/theme';
import { NzCardComponent } from 'ng-zorro-antd/card';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
import format from 'date-fns/format';
import { ClaimAuditService } from '../../services/claim-audit.service';
import { ParterClaimAuditListPartnerRejectComponent } from '../partner-reject/partner-reject.component';
import {  ParterClaimAuditListPartnerApproveComponent } from '../partner-approve/partner-approve.component';

@Component({
  selector: 'app-parter-claim-audit-partner-detail',
  templateUrl: './partner-detail.component.html',
  styleUrls: ['./partner-detail.component.less']
})
export class ParterClaimAuditListPartnerDetailComponent implements OnInit {
  id = this.route.snapshot.queryParams.id;
  i: any;
  imges: any;
  isVisible = false;
  columns: STColumn[] = [
    { title: '操作时间', index: 'id', width: 120 },
    { title: '操作人', type: 'img', width: 120, },
    { title: '操作人手机号', index: 'email', width: 120 },
    { title: '操作页面', index: 'phone' },
    { title: '操作内容', index: 'registered' }
  ];

  data=[{id:11111}]

  constructor(
    private route: ActivatedRoute,
    private msgSrv: NzMessageService,
    private service: ClaimAuditService,
    private modalService: NzModalService,
    private router: Router
  ) {}

  ngOnInit(): void {
    this.initData();
  }

  initData() {
    // this.service.request(this.service.$api_getBulkBillDetail, { id: this.id }).subscribe(res => {
    //   if (res) {
    //     this.i = res;
    //   
    //   }
    // });
  }

  approve() {
    const modalRef = this.modalService.create({
      nzTitle: '同意',
      nzWidth: 700,
      nzContent: ParterClaimAuditListPartnerApproveComponent,
      nzComponentParams: {
        i: this.i
      },
      nzFooter: null
    });
  }
  reject() {
    const modalRef = this.modalService.create({
      nzTitle: '拒绝',
      nzWidth: 700,
      nzContent: ParterClaimAuditListPartnerRejectComponent,
      nzComponentParams: {
        i: this.i
      },
      nzFooter: null
    });
  }
  goBack() {
    window.history.go(-1);
  }


}
