import { Component, OnInit } from '@angular/core';
import { FrameDetailComponent } from '../../../frame/core/detail/frame.detail';
import {DomSanitizer} from '@angular/platform-browser';
import {FormBuilder, Validators} from '@angular/forms';
import { BsModalRef } from 'ngx-bootstrap/modal';
import { MsgService } from '../../../../core/service/msg.service';
import { AjaxService } from '../../../../core/service/ajax.service';

@Component({
  selector: 'app-score-ym-detail',
  templateUrl: './score-ym-detail.component.html',
  styleUrls: ['./score-ym-detail.component.scss']
})
export class ScoreYmDetailComponent extends FrameDetailComponent implements OnInit {

  constructor(bsModalRef: BsModalRef, fb: FormBuilder, sanitizer: DomSanitizer) {
    super(bsModalRef);

    this.detailForm = fb.group({
      'std_score': [null, Validators.compose([Validators.required])],
      'qualified_status': [null, Validators.compose([Validators.required])]
    });
  }


  initDefautEntity() {
  }

  ngOnInit() {
  }

  saveScore() {
    MsgService.confirmAlert("确定要更改考生成绩吗？",() => {
      this.submitForm('score/ym/save.htm');
    });
  }


}
