<style>
    .page_VisaPersonalForm{margin: 0 auto;max-width: 793px;min-width: 793px;background-color: white;padding:50px 0;height: auto !important;margin-bottom: 20px}
    p{margin: 5px 0 }
    .page_VisaPersonalForm ._tit{text-align: center;font-size: 22px;letter-spacing:20px;}
    .page_VisaPersonalForm ._head{text-align:center;margin-top: 20px;display: flex;align-items: center;justify-content: space-between;}
    .page_VisaPersonalForm ._head>div{display: inline-block}
    .page_VisaPersonalForm ._head ._left{border: 1px solid #000;margin-top: 45px;margin-left: 280px;width: 190px;height: 72px;line-height: 72px;font-size: 12px}
    .page_VisaPersonalForm ._head ._right{height: 170px;width: 170px;border: 1px solid #333;margin-right: 50px;font-size: 12px;line-height: 40px}
    .page_VisaPersonalForm ._form{margin-top: 20px;font-size: 14px;}
    .page_VisaPersonalForm ._form input{border: none;border-bottom: 1px solid #000;padding: 0 20px;margin-left: 10px;outline: none;padding-right: 0px !important;}
    .page_VisaPersonalForm ._f_name{margin: 10px 0}
    .page_VisaPersonalForm ._f_name ._fn_left{width: 69%;display: inline-block}
    .page_VisaPersonalForm ._f_name ._fn_left input{width: 58.2%;}
    .page_VisaPersonalForm ._f_name ._fn_right{width: 30%;display: inline-block}
    .page_VisaPersonalForm ._tips{margin: 0}
    .page_VisaPersonalForm ._tips ._left{display: inline-block;font-size: 10px;padding-left: 140px;}
    .page_VisaPersonalForm ._tips ._right{display: inline-block;font-size: 10px;padding-left: 240px;}
    .page_VisaPersonalForm ._fx_left{display: inline-block;margin-right: 133px;margin-left: 0!important}
    .page_VisaPersonalForm ._mr10{margin-right: 10px}
    .page_VisaPersonalForm ._vp_box{margin:0 20px;overflow: hidden;}
    .page_VisaPersonalForm ._vp_box p{white-space: nowrap;}
    .page_VisaPersonalForm ._date{font-size: 10px;text-align: right;padding-right: 78px}
    .page_VisaPersonalForm ._mb0{margin-bottom: 0}
    .page_VisaPersonalForm ._sex,._fx_left,._MarriageType{display: inline-block;margin-left: 180px}
    .page_VisaPersonalForm ._sex i,._fx_left i,._MarriageType i{display: inline-block;width: 12px;height: 12px;border: 1px solid #000;margin: 0 5px;font-size: 10px;}
    .page_VisaPersonalForm ._MarriageType{margin-left: 0!important}
    .page_VisaPersonalForm ._sex._yes{float: right}
    .page_vpf .normalBtn {color: #fff;min-width: 90px!important;height: 30px;background: #E95252;border: 1px solid #E95252;cursor: pointer;border-radius: 15px;}
    .page_vpf .hollowFixedBtn {background: #fff;color: #E95252;width: 90px;height: 30px;border: 1px solid #E95252;cursor: pointer;border-radius: 15px;}
    .page_vpf .vpf_btn{text-align: center;margin: 10px 0 40px 0;}
    .page_vpf .dialog-footer .normalBtn{width: 90px}
    .page_vpf .dialog-footer{text-align: center}
    ._qr{max-width: 793px;min-width: 793px;position: absolute;top: 88px;    padding-left: 17px;}
    #canvas{position: absolute;top: 100px;}
    [v-cloak] {display: none;} 
    .page_VisaPersonalForm input:disabled{border: none;background-color: transparent;}
</style>
<template>
    <div class="page_vpf" style="width:100%;background-color: white;height:auto;" v-cloak v-loading="loading2" element-loading-text="下载中..." element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.1)">
        <div class="page_VisaPersonalForm">
            <canvas v-show="dialogVisible" id="canvas"></canvas>
            <div class="_qr">
                <label>开启二维码</label>
                <el-switch
                @change="creatQRCode(1)"
                v-model="infoData.PeopleModel.OpenQRCode"
                active-color="#13ce66"
                inactive-color="#E95252"
                active-value="1"
                inactive-value="2">
                </el-switch>
            </div>
            <div class="_vp_box" style="">
                <p class="_tit">赴日签证申请表</p>
                <div class="_head clearfix">
                    
                    <div class="_left">此处空白处仅供官方使用</div>
                    <div class="_right">贴</br>照</br>片</br>处</div>
                </div>
                <div class="_form">
                    <p class="_f_name">
                        <span class="_fn_left">姓(请按照护照填写)(英文)<input  type="text" v-model="infoData.PeopleModel.ESurName"></span>
                        <span class="_fn_right">(中文)<input  style="width:100%;" type="text" v-model="infoData.PeopleModel.SurName"></span>
                    </p>
                    <p class="_f_name">
                        <span class="_fn_left">名(请按照护照填写)(英文)<input  type="text" v-model="infoData.PeopleModel.EName"></span>
                        <span class="_fn_right">(中文)<input  style="width:100%;" type="text" v-model="infoData.PeopleModel.Name"></span>
                    </p>
                    <p class="_f_name">
                        <span class="_fn_left">曾用名(如有)(英文)<input  style="width: 66.3%;" type="text" v-model="infoData.PeopleModel.CEName"></span>
                        <span class="_fn_right">(中文)<input  style="width:100%;" type="text" v-model="infoData.PeopleModel.CName"></span>
                    </p>
                    <p style="margin-bottom:0">
                        <span>出生日期<input  type="text" v-model="infoData.PeopleModel.Birthday"></span>
                        <span>出生地点<input  style="width:100%;" type="text" v-model="infoData.PeopleModel.BirthdayAddress"></span>
                    </p>
                    <p class="_tips"><span v-if="infoData.IsWH==false" class="_left">(年)/(月)/(日)</span><span v-else class="_left">(日)/(月)/(年)</span><span class="_right">(省)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(市)</span></p>
                    <p class="_f_sex">
                        <span class="_fx_left">性别 <span> 男<i v-if="infoData.PeopleModel.Sex!='1'"></i><i v-else><span v-if="infoData.IsWH==true">X</span><span v-else>√</span></i></span><span>女<i v-if="infoData.PeopleModel.Sex!='2'"></i><i v-else><span v-if="infoData.IsWH==true">X</span><span v-else>√</span></i></span> 
                        </span>
                        <span class="_fn_right">婚姻状况
                            <span v-for="mar in MarriageType" class="_mr10 _MarriageType"><span>{{mar.Name}} <i v-if="infoData.PeopleModel.Marriage!=mar.Id"></i><i v-else><span v-if="infoData.IsWH==true">X</span><span v-else>√</span></i></span></span>
                        </span>
                    </p>
                    <p><span>国籍（或公民身份）<input disabled style="width: 100%;" type="text" v-model="infoData.PeopleModel.NationalityName"></span></p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>曾有的或另有的国籍（或公民身份）<input  style="width: 100%;" type="text" v-model="infoData.PeopleModel.CNationality"></span></p>
                    <p><span>身份证号码<input  style="width: 100%;" type="text" v-model="infoData.PeopleModel.IdCard"></span></p>
                    <p><span>护照类别</span>
                    <!-- PassportType -->
                        <span v-for="Pass in PassportTypeList" class="_mr10 _MarriageType"><span>{{Pass.Name}} <i v-if="Pass.Id==infoData.PeopleModel.PassportType"><span v-if="infoData.IsWH==true">X</span><span v-else>√</span></i><i v-else></i></span></span>
                    </p>
                    <p><span>护照号码<input  style="width:100%;" type="text" v-model="infoData.PeopleModel.PassportNo"></span></p>
                    <p class="_mb0">
                        <span>签发地点<input  style="width: 55.1%;" type="text" v-model="infoData.PeopleModel.PassportAddress"></span>
                        <span>签发日期<input  style="width: 100%;" type="text" v-model="infoData.PeopleModel.PassportIssued"></span>
                    </p>
                    <p class="_tips _date"><span v-if="infoData.IsWH==false">(年)/(月)/(日)</span><span v-else>(日)/(月)/(年)</span></p>
                    <p class="_mb0">
                        <span>签发机关<input   style="width: 55.1%;" type="text" v-model="infoData.PeopleModel.IssuingAuthority"></span>
                        <span>有效日期<input   style="width: 100%;" type="text" v-model="infoData.PeopleModel.PassportExpiry"></span>
                    </p>
                    <p class="_tips _date"><span v-if="infoData.IsWH==false">(年)/(月)/(日)</span><span v-else>(日)/(月)/(年)</span></p>
                    <p><span>赴日目的<input  style="width:100%;" type="text" v-model="infoData.PeopleModel.Purpose"></span></p>
                    <p><span>预定在日逗留日期<input disabled style="width:30%;" type="text" v-model="infoData.PlanModel.EnterCountryTime"></span>～<input disabled style="width:26%;" type="text" v-model="infoData.PlanModel.LeaveCountryTime"></p>
                    <p><span>预定在日逗留期间<input disabled style="width:30%;" type="text" v-model="infoData.PlanModel.TotalDay"></span> 天</p>
                    <p class="">
                        <span>入境口岸<input disabled  style="width: 34%;" type="text" v-model="infoData.PlanModel.ArriveAirName"></span>
                        <span>船舶或航空公司名称<input disabled  style="width: 100%;" type="text" v-model="infoData.PlanModel.DepartAlName+infoData.PlanModel.DepartAlCode"></span>
                    </p>
                    <p>申请人在日拟入住的酒店名称或友人姓名及住址</p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <span>酒店名称或友人姓名<input  style="width: 38%;" type="text" v-model="infoData.PeopleModel.HotelName"></span>
                        <span>电话<input  style="width: 100%;" type="text" v-model="infoData.PeopleModel.HotelTel"></span>
                    </p>
                    <br/>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <span>地址<input  style="width: 100%;" type="text" v-model="infoData.PeopleModel.HotelAddress"></span>                   
                    </p>
                    <p>
                        <span>上次赴日日期及停留时间
                        	<input  style="width: 35%;" type="text" v-model="infoData.PeopleModel.LastTime">
                        	~
                        	<input  style="width: 34%;" type="text" v-model="infoData.PeopleModel.DeadlineTime">
                        </span>                   
                    </p>
                    <p>家庭地址（如有多处居住地，请全都写上)</p>
                    <br/>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <span>地址<input  style="width: 100%;" type="text" v-model="infoData.PeopleModel.AddressDetail"></span>                   
                    </p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <span>电话<input  style="width: 13%;" type="text" v-model="infoData.PeopleModel.Tel"></span>
                        <span style="display: inline-block;margin-left: 130px;">手机<input  style="width: 45%;" type="text" v-model="infoData.PeopleModel.MobilePhone"></span>
                    </p>
                    <p v-if="infoData.IsWH==true">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <span>电邮<input  style="width: 100%;" type="text" value="没有"></span>                   
                    </p>
                    <p>工作单位名称及地址</p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <span>名称<input  style="width: 44%;" type="text" v-model="infoData.PeopleModel.UnitName"></span>
                        <span>电话<input  style="width: 100%;" type="text" v-model="infoData.PeopleModel.UnitPhone"></span>
                    </p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <span>地址<input  style="width: 100%;" type="text" v-model="infoData.PeopleModel.UnitAddress"></span>                   
                    </p>
                    <p>
                        <span>目前的职位<input  style="width: 100%;" type="text" v-model="infoData.PeopleModel.Duty"></span>                   
                    </p>
                </div>
            </div>
        </div>
        <div class="page_VisaPersonalForm">
            <div class="_vp_box" style="">
                <div class="_form">
                    <p>*配偶所从事的职业（如果申请人是未成年人，请填写父母的职业）</p>
                    <p><input  style="width: 100%;" type="text" v-model="infoData.PeopleModel.UnitPost"></p>
                    <p>在日担保人(请填写担保人的详细内容)</p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <span>姓名<input  style="width: 48%;" type="text" value='参照"身元保证书"'></span>
                        <span>电话<input  style="width: 100%;" type="text" ></span>
                    </p>
                    <p style="    margin-top: 20px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <span>地址<input  style="width: 100%;" type="text" ></span>                   
                    </p>
                    <p class="_mb0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <span>出生日期<input  style="width: 11%;" type="text" ></span>  
                        <span class="_sex">性别:<span> 男<i></i></span><span>女<i></i></span></span>              
                    </p>
                    <p class="_tips _date" style="text-align: left;padding-left: 120px;"><span v-if="infoData.IsWH==false">(年)/(月)/(日)</span><span v-else>(日)/(月)/(年)</span></p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <span>与申请人的关系<input  style="width: 100%;" type="text" ></span>                   
                    </p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <span>职业和职务<input  style="width: 100%;" type="text" ></span>                   
                    </p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <span>国籍(或公民身份)及签证种类<input  style="width: 100%;" type="text" ></span>                   
                    </p>
                    <p>在日邀请人(如保证人和邀请人是同一个人，请写“同上”)</p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <span>姓名<input  style="width: 48%;" type="text" value='同上'></span>
                        <span>电话<input  style="width: 100%;" type="text" ></span>
                    </p>
                    <p style="    margin-top: 20px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <span>地址<input  style="width: 100%;" type="text" ></span>                   
                    </p>
                    <p class="_mb0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <span>出生日期<input  style="width: 11%;" type="text" ></span>  
                        <span class="_sex">性别:<span> 男<i></i></span><span>女<i></i></span></span>              
                    </p>
                    <p class="_tips _date" style="text-align: left;padding-left: 120px;"><span v-if="infoData.IsWH==false">(年)/(月)/(日)</span><span v-else>(日)/(月)/(年)</span></p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <span>与申请人的关系<input  style="width: 100%;" type="text" ></span>                   
                    </p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <span>职业和职务<input  style="width: 100%;" type="text" ></span>                   
                    </p>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <span>国籍(或公民身份)及签证种类<input  style="width: 100%;" type="text" ></span>                   
                    </p>
                    <p>
                        <span>*备注/其他需特殊声明的事项（如有）<input  style="width: 100%;" type="text" ></span>                   
                    </p>
                    <p>是否:</p>
                    <p><span>● 在任何国家曾被判决有罪？</span> <span class="_sex _yes"><span> 是<i></i></span><span>否<i v-if="infoData.IsWH==true">X</i><i v-else>√</i></span></span>  </p>
                    <p><span>● 在任何国家曾被判处一年或一年以上徒刑？**</span> <span class="_sex _yes"><span> 是<i></i></span><span>否<i v-if="infoData.IsWH==true">X</i><i v-else>√</i></span></span>  </p>
                    <p><span>● 在任何国家曾因非法滞留或违反该国法律法规而被驱逐出境？</span> <span class="_sex _yes"><span> 是<i></i></span><span>否<i v-if="infoData.IsWH==true">X</i><i v-else>√</i></span></span>  </p>
                    <p><span>● 因违反任何国家关于取缔毒品、大麻、鸦片、兴奋剂或精神药物的法律法规被</span> </p>
                    <p><span>&nbsp;&nbsp;&nbsp;判刑？**</span><span class="_sex _yes"><span> 是<i></i></span><span>否<i v-if="infoData.IsWH==true">X</i><i v-else>√</i></span></span>  </p>
                    <p><span>● 从事卖淫活动或曾为卖淫中介、拉客，或曾为卖淫或其他与卖淫有直接联系的</span> </p>
                    <p><span>&nbsp;&nbsp;&nbsp;活动提供场所？</span><span class="_sex _yes"><span> 是<i></i></span><span>否<i v-if="infoData.IsWH==true">X</i><i v-else>√</i></span></span>  </p>
                    <p><span>● 有过贩卖人口的经历或教唆或协助他人从事贩卖人口的活动？</span> <span class="_sex _yes"><span> 是<i></i></span><span>否<i v-if="infoData.IsWH==true">X</i><i v-else>√</i></span></span>  </p>
                    <p style="font-size:10px">**若您曾被判刑，即使该刑罚为缓期执行，请选择“是”。</p>
                    <br/>
                    <p>若以上问题的回答中有“是”的，请说明具体情况。</p>
                    <p style="height:64px;border: 1px solid #000;width:97%">

                    </p>
                    <div>
                        <p>本人特此声明：上述填写内容真实且无误。本人了解入境身份及在日停留期限将在入境日本时由日本入国管理局决定。</p>
                        <p>本人知悉，签证并非授予持有者进入日本的权利，如果签证持有者在到达港口时被发现属于不允许入境的情况，亦无权</p>
                        <p>进入日本。</p>
                        <p>本人特此同意：我（通过指定的且有签证代办权的旅行社）向日本使馆/总领馆提交个人材料。以及当需要支付签证费</p>
                        <p>时，（委托代办机构）向日本使馆/总领馆支付签证费。</p>
                    </div>
                    <div style="margin-top:45px;margin-bottom:15px">
                        <p class="_mb0"><span>申请日期</span><input  style="width: 18%;"  type="text" v-model="infoData.PeopleModel.Date"><span style="display: inline-block;margin-left: 100px;">申请人签名</span><input  style="width: 18%;" type="text"></p>
                        <p style="margin:0"><span v-if="infoData.IsWH==false" style="padding-left: 110px; font-size: 10px;">(年)/(月)/(日)</span><span v-else style="padding-left: 110px; font-size: 10px;">(日)/(月)/(年)</span></p>
                    </div>
                    <p style="font-size:8px">* 可不填写</p>
                    <p>签证申请中提交的任何个人信息以及追加材料所涉及的个人信息（以下简称“保留的个人信息”）将依照行政机关保护</p>
                    <p>个人信息法（第58号法案，2003，以下简称“该法”），被恰当的处理。保留的个人信息仅会被用做处理签证申请的目</p>
                    <p>的以及该法中第八条款所认定的必要目的范围之内。</p>
                    <p style="text-align: right;font-size:10px">(H24.05改訂)</p>
                </div>
            </div>
        </div>
        <div class="vpf_btn" v-if="!ok">
            <button class="normalBtn"  type="button" @click="addForm()"> <i class="iconfont icon-bianji-smal"></i> 保存并下载</button>
            <button class="hollowFixedBtn" @click="goUrl(url)">返回</button>
            <!-- <button class="normalBtn" @click="creatQRCode()">生成电子签名</button> -->
        </div>
        
        
    </div>

</template>
<script>
import QRCode from 'qrcode'
import Vue from "vue"
Vue.use(QRCode)
export default {
    data(){
        return{
            ID:0,
            infoData:{
                "PeopleModel":{
                    "Address":"gsda",
                    "AddressDetail":"gsdafsa",
                    "Birthday":"2018/08/10",
                    "Duty":"员工",
                    "EconomicCapability":{
                    },
                    "EName":"GSAF",
                    "ESurName":"GSDSF",
                    "HistoryRecord":"良好",
                    "Id":119,
                    "IdentityType":"身份证",
                    "IsHightSchool":1,
                    "IsRecommend":2,
                    "Marriage":3,
                    "Name":"二狗",
                    "NationalityName":"中国",
                    "Nationality":2,
                    "PassportAddress":"北京",
                    "PassportExpiry":"2019/08/31",
                    "PassportNo":"P324234",
                    "Remarks":"gsa ",
                    "Sex":"1",
                    "SurName":"王",
                    "VisaPlanId":44,
                    "PassportType":2,
                    "Signature":null,
                    "OpenQRCode":"1",
                    "PassportIssued":"2018/08/17",
                    "IdCard":"123213213",
                    "Tel":"32423423",
                    "MobilePhone":"213123123",
                    "UnitName":"哥斯达",
                    "UnitPhone":"12312314",
                    "UnitPost":"公司",
                    "EmergencyAddress":"干撒发生的v",
                    "EmergencyContact":"vcxba",
                    "EmergencyRelation":"戈萨德",
                    "EmergencyTel":"234234",
                    "TravelCost":233333,
                    "TravelName":"搞的撒",
                    "MutualFriends":"公司打法倒萨个",
                    "IsDepartureRecord":1,
                    "LastTime":"2018/08",
                    "DeadlineTime":"2018/08",
                    "NCNationality":"公司",
                    "Date":"2018/08/17"
                    },
                    "PlanModel":{
                    "ArriveAirName":"东京机场",
                    "DepartAlCode":"IAC",
                    "DepartAlName":"测试航空公司",
                    "DepartFlight":"DDDDD123",
                    "EnterCountryTime":"2018/02/19",
                    "LeaveCountryTime":"2018/02/24",
                    "TotalDay":6
                    }
            },
            MarriageType:[],
            PassportTypeList:[],
            QRCode:false,
            dialogVisible:false,
            isOpen:false,
            QRpath:'',
            ok:false,
            loading2:false,
            url:''
        }
    },mounted(){
        this.ID =  this.$route.query.data
        this.ok =  this.$route.query.ok
        this.url = this.$route.query.url
        this.getInfo()
        this.getMarriageType()
        this.getPassportTypeList()
        this.getQR()
    },methods:{
        goUrl(path){
            this.$router.push({ name: path }) 
        },
        handleClose(done){
            done();
        },
        creatQRCode(type){
            if(type==1){
                this.apipost('dmc_post_SetOpenQRCode',{VisaPeopleId:this.ID},res=>{
                    if(res.data.resultCode==1){
                        this.$message.success(res.data.message)
                    }else{
                        this.$message.error(res.data.message)
                    }
                },err=>{})
            }
            if(this.infoData.PeopleModel.OpenQRCode=="1"){
                this.dialogVisible=true
                setTimeout(() => {
                    let path = this.QRpath
                    var canvas = document.getElementById('canvas')
                    QRCode.toCanvas(canvas, path, function (error) {
                    if (error) console.error(error)
                        console.log('success!');
                    })
                },1000); 
            }else{
                this.dialogVisible=false
            }
        },
        addForm(){
            let msg = {
                "AddressDetail":this.infoData.PeopleModel.AddressDetail==null?'':this.infoData.PeopleModel.AddressDetail,
                "Birthday":this.infoData.PeopleModel.Birthday==null?'':this.infoData.PeopleModel.Birthday,
                "BirthdayAddress":this.infoData.PeopleModel.BirthdayAddress==null?'':this.infoData.PeopleModel.BirthdayAddress,
                "Duty":this.infoData.PeopleModel.Duty==null?'':this.infoData.PeopleModel.Duty,
                "EName":this.infoData.PeopleModel.EName==null?'':this.infoData.PeopleModel.EName,
                "ESurName":this.infoData.PeopleModel.ESurName==null?'':this.infoData.PeopleModel.ESurName,
                "Id":this.ID,
                "Marriage":this.infoData.PeopleModel.Marriage==null?'':this.infoData.PeopleModel.Marriage,
                "Name":this.infoData.PeopleModel.Name==null?'':this.infoData.PeopleModel.Name,
                "PassportAddress":this.infoData.PeopleModel.PassportAddress==null?'':this.infoData.PeopleModel.PassportAddress,
                "PassportExpiry":this.infoData.PeopleModel.PassportExpiry==null?'':this.infoData.PeopleModel.PassportExpiry,
                "PassportNo":this.infoData.PeopleModel.PassportNo==null?'':this.infoData.PeopleModel.PassportNo,
                "Sex":this.infoData.PeopleModel.Sex==null?'':this.infoData.PeopleModel.Sex,
                "SurName":this.infoData.PeopleModel.SurName==null?'':this.infoData.PeopleModel.SurName,
                "PassportIssued":this.infoData.PeopleModel.PassportIssued==null?'':this.infoData.PeopleModel.PassportIssued,
                "IssuingAuthority":this.infoData.PeopleModel.IssuingAuthority==null?'':this.infoData.PeopleModel.IssuingAuthority,
                "IdCard":this.infoData.PeopleModel.IdCard==null?'':this.infoData.PeopleModel.IdCard,
                "CEName":this.infoData.PeopleModel.CEName==null?'':this.infoData.PeopleModel.CEName,
                "CName":this.infoData.PeopleModel.CName==null?'':this.infoData.PeopleModel.CName,
                "CNationality":this.infoData.PeopleModel.CNationality==null?'':this.infoData.PeopleModel.CNationality,
                "Tel":this.infoData.PeopleModel.Tel==null?'':this.infoData.PeopleModel.Tel,
                "MobilePhone":this.infoData.PeopleModel.MobilePhone==null?'':this.infoData.PeopleModel.MobilePhone,
                "UnitAddress":this.infoData.PeopleModel.UnitAddress==null?'':this.infoData.PeopleModel.UnitAddress,
                "UnitName":this.infoData.PeopleModel.UnitName==null?'':this.infoData.PeopleModel.UnitName,
                "UnitPhone":this.infoData.PeopleModel.UnitPhone==null?'':this.infoData.PeopleModel.UnitPhone,
                "UnitPost":this.infoData.PeopleModel.UnitPost==null?'':this.infoData.PeopleModel.UnitPost,
                "Purpose":this.infoData.PeopleModel.Purpose==null?'':this.infoData.PeopleModel.Purpose,
                "LastTime":this.infoData.PeopleModel.LastTime==null?'':this.infoData.PeopleModel.LastTime,
                "DeadlineTime":this.infoData.PeopleModel.DeadlineTime==null?'':this.infoData.PeopleModel.DeadlineTime,
                "HotelTel":this.infoData.PeopleModel.HotelTel==null?'':this.infoData.PeopleModel.HotelTel,
                "HotelAddress":this.infoData.PeopleModel.HotelAddress==null?'':this.infoData.PeopleModel.HotelAddress,
                "HotelName":this.infoData.PeopleModel.HotelName==null?'':this.infoData.PeopleModel.HotelName,
                "Date":this.infoData.PeopleModel.Date==null?'':this.infoData.PeopleModel.Date,                       
            }
            this.apipost('dmc_post_visa_SetVisaApplyForInfo',msg,res=>{
                if(res.data.resultCode==1){
                    this.downLoad()
                }else{
                    this.$message.error(res.data.message)
                }
            },err=>{})
        },
        downLoad(){ // 下载申请材料
            this.loading2= true
            this.apipost('dmc_get_DownLoadWordForApplyForSell',{VisaPeopleId:this.ID},res=>{
                if(res.data.resultCode==1){
                    const link = document.createElement('a');
                    let _loadUrl=this.domainManager().DomainUrl
                    let str = window.location.href
                    link.href = _loadUrl+res.data.data
                    document.body.appendChild(link);
                    link.click();
                    this.$message.success('导出成功！')
                this.loading2 = false
                }else{
                    this.loading2 = false
                    this.$message.error(res.data.message)
                }
            },err=>{})
        },
         getQR(){ // 获取二维码
            this.apipost('dmc_get_GetPeopleForeignInfo',{VisaPeopleId:this.ID},res=>{
                if(res.data.resultCode==1){
                    this.QRpath = res.data.data
                    console.log(this.QRpath)
                }else{
                    this.$message.error(res.data.message)
                }
            },err=>{})
        },
        getInfo(){ // 获取信息
            this.apipost('dmc_get_GetVisaApplyForGrouSignInfoForSell',{VisaPeopleId:this.ID},res=>{
                if(res.data.resultCode==1){
                	console.log(res.data.data)
                    this.infoData = res.data.data
                    this.infoData.PeopleModel.OpenQRCode = this.infoData.PeopleModel.OpenQRCode.toString()
                    if(this.infoData.PeopleModel.OpenQRCode=='1'){
                        this.dialogVisible=true
                        this.creatQRCode()
                    }
                    this.infoData.PeopleModel.Sex = this.infoData.PeopleModel.Sex.toString()
                    if(this.infoData.IsWH==true){
                        this.infoData.PeopleModel.NationalityName="CHINA";
                    }
                }else{
                    this.$message.error(res.data.message)
                }
            },err=>{})
        },
        getPassportTypeList(){ // 获取护照类别
            this.apipost('dmc_get_visa_GetPassportTypeList',{VisaPeopleId:this.ID},res=>{
                if(res.data.resultCode==1){
                    this.PassportTypeList = res.data.data
                }else{
                    this.$message.error(res.data.message)
                }
            },err=>{})
        },
        getMarriageType(){//获取婚姻
            let msg = {};
            this.apipost("dmc_get_visa_GetVisaMarriageTypeEnum",msg,res => {
                if(res.data.resultCode==1){
                    this.MarriageType = res.data.data;
                    this.MarriageType.forEach(x=>{
                        x.Id = parseInt(x.Id)
                    })
                }else{
                    this.$message.error(res.data.message)
                }
            },err => {});
        },
    }
}
</script>
