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

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

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

    this.detailForm = fb.group({
      'school_ems_id': [null, Validators.compose([Validators.required, Validators.minLength(13), Validators.maxLength(13)])],
      'school_ems_code': [null, Validators.compose([Validators.required])],
      'school_ems_addr': [null, Validators.compose([Validators.required])]
    });
  }


  initDefautEntity() {
  }
  ngOnInit() {

  }
  saveEms() {
    MsgService.confirmAlert("确定要更改EMS信息吗？",() => {
      this.submitForm('score/ym/ems/update.htm');
    });
  }

}
