{
    template:'${tmpl}',
    data:function(){
        return {
          id : "",
          contract : {},
          usereaccount: {},
          formLabelWidth:'120px',
          dialogFormVisible: false,
          form:{
            mail:""
          }
        };
    },
    mounted:function() {
      this.id = this.$router.currentRoute.query.id;
      this.getContract();
    },
    created:function(){
    },
    methods:{
      getContract : function() {
        var self = this;
        this.$root.postReq("/web/dksignCtl/contractInfo", {id : this.id}).then(function(d){
          if(d.status==0){
            var _d = d.data || {};
            self.contract = _d.contract || {};
            self.usereaccount = _d.usereaccount || {};
          }
        });
      },
      sendmail:function(){
        var self = this;
        var email = this.form.mail;
        var regex = /^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,5}$/;
        if(!regex.test(email)){
          this.$alert('邮箱格式有误，请您重新填写', '提示', {
             confirmButtonText: '确定',
             callback: action => {}
           });
           return;
        }

        this.$root.postReq("/web/dksignCtl/sendContractEmail", {id : this.id, email : email}).then(function(d){
          console.log(d);
        });
        self.dialogFormVisible = false;
        this.$alert('请30秒后到邮箱查看', '提示', {
           confirmButtonText: '确定',
           callback: action => {}
         });
      }
  },
    vname:"gsb-econtractinfo"
}
