<style> * { margin: 0; padding: 0; } .TC-MainContent { min-height: 650px; background: url(../assets/img/bodyBg.png); padding-top: 10px; font: normal 13px 'Microsoft Yahei'; color: #555; height: auto !important; } .TC-MainContent .fixedMenu { position: fixed; left: 20px; top: 75px; margin: 0; padding-top: 10px; } .TC-MainContent .fixedMenu li { padding: 5px 15px; position: relative; border-right: 2px solid #e2e2e2; cursor: pointer; list-style: none; font-size: 13px; } .TC-MainContent .fixedMenu li:after { content: ''; display: block; width: 0; height: 0; border: 5px solid transparent; border-left-color: #e2e2e2; position: absolute; right: -12px; top: 11px; } .TC-MainContent .contractTit { position: fixed; left: 0; top: 0; width: 100%; z-index: 1000; padding: 15px 20px 12px; line-height: 30px; box-sizing: border-box; background: url(../assets/img/bodyBg.png); font-size: 18px; color: #555; } .TC-MainContent .contractTit span { font-size: 21px; font-weight: bold; } .TC-MainContent .block { border: 1px solid #cdcdcd; background: #f9f9f9; position: relative; margin-bottom: 20px; } .TC-MainContent .container-fluid { padding-right: 20px; padding-left: 20px; *zoom: 1; } .TC-MainContent .mtop15 { margin-top: 15px; } .TC-MainContent .blockTitle { border-bottom: 1px solid #cdcdcd; background-color: #efefef; } .TC-MainContent .blockTitle span.icon { border-right: 1px solid #CDCDCD; position: absolute; left: 10px; height: 40px; padding-right: 10px; padding-top: 8px; } .TC-MainContent .blockTitle h2 { font-size: 15px; min-height: 40px; margin: 0; font-family: 'Microsoft Yahei'; color: #5b5b5b; padding-right: 15px; padding-left: 48px; line-height: 40px; } .TC-MainContent .blockTitle h2 { font-size: 15px; min-height: 40px; margin: 0; font-family: 'Microsoft Yahei'; color: #5b5b5b; padding-right: 15px; padding-left: 48px; } .TC-MainContent .block em { font-style: normal; } .TC-MainContent .createTableTitle { padding: 10px 0; margin: 5px 30px 0; border-bottom: 1px dashed #ccc; font: normal 15px 'microsoft yahei'; } .TC-MainContent .createTable { background-color: #f9f9f9; width: 100%; } .TC-MainContent .el-form-item { margin-bottom: 10px; } .TC-MainContent .w300 { width: 300px !important; } .TC-MainContent .w150 { width: 150px !important; } .TC-MainContent .w600 { width: 600px !important; } .TC-MainContent .singeRowTable { width: 100%; border-collapse: collapse; } .TC-MainContent .singeRowTable tr th, .v-table-title-cell { background: #E6E6E6; height: 40px; font-size: 14px; color: #333; } .TC-MainContent .singeRowTable tr { background: #fff; text-align: center; height: 40px; } .TC-MainContent .singeRowTable tr:nth-child(2n+1) { background: #fafafa; } .TC-MainContent .singeRowTable tr:hover { background: #f2f2f2; } .TC-MainContent .singeRowTable tr td { font-size: 12px; border: 1px solid #E5E5E5; } .TC-MainContent .TC_NewAddBtn { background-color: #006dcc; width: 83px; height: 26px; color: #fff; border: none; margin-right: 5px; cursor: pointer; } .TC-MainContent .singeRowTable .el-button.is-circle { padding: 5px; } .TC-MainContent .TcNewTable td { padding: 5px; } .TC-MainContent .fixedMenu li.active { background: #90b7ec; color: #fff; border-right-color: #5882bb; } .TC-MainContent .fixedMenu li.active:after { border-left-color: #5882bb; } .TC-MainContent .pull-right { float: right; } .TC-MainContent .TC_disabled { color: #57a3f3; cursor: not-allowed !important; } .TC-MainContent .TCbtn-info { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #49afcd; background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); background-repeat: repeat-x; border-color: #2f96b4 #2f96b4 #1f6377; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); padding: 10px 19px; border: none; outline: none; cursor: pointer; } .TC-MainContent .btn-warning { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #faa732; *background-color: #f89406; background-image: -moz-linear-gradient(top, #fbb450, #f89406); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); background-image: -webkit-linear-gradient(top, #fbb450, #f89406); background-image: -o-linear-gradient(top, #fbb450, #f89406); background-image: linear-gradient(to bottom, #fbb450, #f89406); background-repeat: repeat-x; border-color: #f89406 #f89406 #ad6704; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); padding: 10px 19px; outline: none; border: none; cursor: pointer; } .TCbtn-info:hover, .btn-warning:hover { color: #ffffff; opacity: 0.8; } .TcTravel_Table { width: 100%; border: none; border-collapse: collapse; border-spacing: 0; } .TcTravel_Table td { border: 1px solid rgb(0, 0, 0); word-break: break-all; padding: 5px; line-height: 2; text-align: left; ; } .TC_LASTTD div { margin-bottom: 10px; } </style> <template> <div class="TC-MainContent"> <!-- 内容开始 --> <ul class="fixedMenu" id="fixedMenu"> <li v-for="(item,index) in menuArr" :class="{'active':index==ckedIndex}" @click="ckedIndex=index,goAnchor('#anchor-'+index)">{{item}}</li> </ul> <div class="contractTit"> <span> <!-- {{CtObj.company}}团队出境旅游合同 --> 赴日交流访问团合同 <span style="color:blue;font-size:14px;">{{CtObj.contractNum}}</span> </span> <div class="pull-right"> <input type="button" class="TCbtn-info" v-if="CtObj.companySignature=='' && CtObj.auditContract==2" @click="isShowFade=true,GetQrCode()" value="客户签字链接" /> <span v-if="CtObj.auditContract==1" style="font-size:12px;color:red;">等待行政审批通过后获取签字链接</span> <input type="button" v-if="CtObj.status==1&&CtObj.auditContract==0" class="TCbtn-info" @click="sendAudit()" value="提交审核" /> <font v-if="CtObj.status==1&&CtObj.auditContract==3&&CtObj.auditContractReason" style="color:red;"> 驳回原因:{{CtObj.auditContractReason}}</font> <input type="button" v-if="CtObj.status==1&&CtObj.auditContract==3" class="TCbtn-info" @click="sendAudit()" value="审核已被驳回,重新提交" /> <input type="button" class="TCbtn-info" v-if="CtObj.status==1" @click="goUrl()" value="预览"> <input type="button" class="TCbtn-info" v-if="CtObj.auditContract==2" @click="getinvalid()" value="作废"> <input type="button" class="TCbtn-info" @click="dialogVisible=true,getGuestList()" value="复制合同" /> <input type="button" v-if="CtObj.auditContract!=2" class="btn-warning" @click="submitForm('CtObj')" :value="$t('pub.saveBtn')" /> <template v-if="CurrentUserInfo.EmployeeId==615"> <input type="button" class="btn-warning" @click="submitForm('CtObj')" :value="$t('pub.saveBtn')" /> </template> </div> </div> <el-form label-width="180px" :model="CtObj" :rules="rules" ref="CtObj"> <div class="container-fluid" style="padding-top: 60px; padding-left: 220px;"> <div class="block mtop15" id="anchor-0" ref="anchor0"> <div class="blockTitle"> <span class="icon"> <i class="iconfont icon-dingdanguanli-"></i> </span> <h2> <em>合同基本信息</em> </h2> </div> <div class="createTableTitle">旅游者代表信息</div> <table class="createTable"> <tbody> <tr> <td> <el-form-item :label="$t('system.query_name')" prop="clientName"> <el-input type="text" v-model="CtObj.clientName" maxlength="100" class="w300"></el-input> </el-form-item> </td> </tr> <tr> <td> <el-form-item label="证件号码"> <el-input type="text" v-model="CtObj.clientIdcardnum" maxlength="100" class="w300"></el-input> </el-form-item> </td> </tr> <tr> <td> <el-form-item :label="$t('hotel.hotel_detailinfo')"> <el-input type="text" v-model="CtObj.clientAddress" class="w300"></el-input> </el-form-item> </td> </tr> <tr> <td> <el-form-item :label="$t('scen.sc_tel')" prop="clientCall"> <el-input type="text" v-model="CtObj.clientCall" maxlength="100" class="w300"></el-input> </el-form-item> </td> </tr> <tr> <td> <el-form-item label="传真"> <el-input type="text" v-model="CtObj.clientFax" maxlength="100" class="w300"></el-input> </el-form-item> </td> </tr> <tr> <td> <el-form-item label="邮编"> <el-input type="text" v-model="CtObj.clientPostCode" maxlength="100" class="w300"></el-input> </el-form-item> </td> </tr> <tr> <td> <el-form-item label="电子邮箱"> <el-input type="text" v-model="CtObj.clientEmail" maxlength="100" class="w300"></el-input> </el-form-item> </td> </tr> </tbody> </table> <div class="createTableTitle">出境社信息</div> <table class="createTable"> <tbody> <tr> <td> <el-form-item label="公司名称"> <el-select v-model="CtObj.SignType" :placeholder="$t('pub.pleaseSel')" @change="changeSignType" class="w300"> <el-option key="0" label="四川和平国际旅行社有限公司" :value="0"> </el-option> <el-option key="1" label="(株)ピースインターナショナル" :value="1"> </el-option> </el-select> </el-form-item> </td> </tr> <tr> <td> <el-form-item label="经营许可证号"> <el-input type="text" class="w300" v-model="CtObj.businessCertificate"></el-input> </el-form-item> </td> </tr> <tr> <td> <el-form-item label="经办人" prop="agentName"> <el-input type="text" class="w300" v-model="CtObj.agentName"></el-input> </el-form-item> </td> </tr> <tr> <td> <el-form-item label="营业地址"> <el-input type="text" class="w300" v-model="CtObj.companyAddress"></el-input> </el-form-item> </td> </tr> <tr> <td> <el-form-item :label="$t('scen.sc_tel')"> <el-input type="text" class="w300" v-model="CtObj.companyCall"></el-input> </el-form-item> </td> </tr> <tr> <td> <el-form-item label="传真"> <el-input type="text" class="w300" v-model="CtObj.companyFax"></el-input> </el-form-item> </td> </tr> <tr> <td> <el-form-item label="邮编"> <el-input type="text" class="w300" v-model="CtObj.companyPostCode"></el-input> </el-form-item> </td> </tr> <tr> <td> <el-form-item label="电子邮箱"> <el-input type="text" class="w300" v-model="CtObj.companyEmail"></el-input> </el-form-item> </td> </tr> <tr> <td> <el-form-item label="签约地点"> <el-input type="text" class="w300" v-model="CtObj.contractPlace"></el-input> </el-form-item> </td> </tr> </tbody> </table> </div> <div class="block mtop15" id="anchor-1" ref="anchor1"> <div class="blockTitle"> <span class="icon"> <i class="iconfont icon-renwuguanli"></i> </span> <h2> <em>单项委托/组合地接服务合同</em> </h2> </div> <table class="createTable"> <tbody> <tr> <td> <el-form-item label="旅游者同意选择下列第"> <el-select :placeholder="$t('pub.pleaseSel')" filterable class='w150' v-model="CtObj.carpoolOpinion"> <el-option label="A" :value='1'></el-option> <el-option label="B" :value='2'></el-option> <el-option label="C" :value='3'></el-option> </el-select> 种方式交付办理签证的材料及领取签证。 </el-form-item> <p style="margin-left:50px;">A、旅游者亲自现场领取。</p> <br /> <p style="margin-left:50px;"> B、旅游者委托第三人现场领取, 第三人应持旅游者本人签字的授权委托书原件。</p> <br /> <p style="margin-left:50px;">C、旅游者通过中国邮政EMS快递专递形式领取,费用由旅游者承担 。如旅游者采取该方式 领取的,旅行社将签证交 付邮政部门即完成代理义务 。因快递发生延误、丢失、毁损、灭失等风险,均由旅游者自行承担责任。</p> </td> </tr> </tbody> </table> <table class="createTable"> <tbody> <tr> <td> <el-form-item label="本合同一式" prop="totalNumber"> <el-select :placeholder="$t('pub.pleaseSel')" filterable v-model="CtObj.totalNumber" class='w210'> <el-option label="壹" :value='1'></el-option> <el-option label="贰" :value='2'></el-option> <el-option label="叁" :value='3'></el-option> <el-option label="肆" :value='4'></el-option> <el-option label="伍" :value='5'></el-option> <el-option label="陆" :value='6'></el-option> <el-option label="柒" :value='7'></el-option> <el-option label="捌" :value='8'></el-option> <el-option label="玖" :value='9'></el-option> <el-option label="拾" :value='10'></el-option> </el-select> 份 </el-form-item> </td> </tr> <tr> <td> <el-form-item label="双方各持" prop="eachNumber"> <el-select :placeholder="$t('pub.pleaseSel')" filterable v-model="CtObj.eachNumber" class='w210'> <el-option label="壹" :value='1'></el-option> <el-option label="贰" :value='2'></el-option> <el-option label="叁" :value='3'></el-option> <el-option label="肆" :value='4'></el-option> <el-option label="伍" :value='5'></el-option> <el-option label="陆" :value='6'></el-option> <el-option label="柒" :value='7'></el-option> <el-option label="捌" :value='8'></el-option> <el-option label="玖" :value='9'></el-option> <el-option label="拾" :value='10'></el-option> </el-select> 份,具有同等法律效力,自双方当事人签字或者盖章之日起生效。 </el-form-item> </td> </tr> </tbody> </table> <div class="blockTitle"> <span class="icon"> <i class="iconfont icon-renwuguanli"></i> </span> <h2> <em>一 、旅游者信息 (如有12岁以下儿童或2岁以下婴儿需要标注) :</em> </h2> </div> <table class="singeRowTable"> <thead> <tr> <th> 序号 </th> <th> 姓名 </th> <th> 性别 </th> <th> 证件类型 </th> <th> 证件号码 </th> <th> 联系方式 </th> <th> 身体状况 </th> </tr> </thead> <tbody> <tr v-for="(item,index) in guestList" :key="index+10000"> <td>{{index+1}}</td> <td>{{item.surName+''+item.name}} {{item.guestType}}</td> <td>{{item.sex==1?'男':'女'}}</td> <td>护照</td> <td>{{item.passportNo}}</td> <td>{{item.mobilePhone}}</td> <td>健康</td> </tr> </tbody> <tfoot> <tr> <td>紧急情况联系人姓名</td> <td colspan="3"> <el-input type="text" class="w300" v-model="CtObj.contactsName" placeholder="请填写紧急情况联系人姓名"></el-input> </td> <td>联系电话</td> <td colspan="2"> <el-input type="text" class="w300" v-model="CtObj.contactsMobile" placeholder="请填写联系电话"></el-input> </td> </tr> </tfoot> </table> <div class="blockTitle"> <span class="icon"> <i class="iconfont icon-renwuguanli"></i> </span> <h2> <em>二 、预定项目及要求:</em> </h2> </div> <div style="display: flex;justify-content: space-between;"> <div style="flex-grow: 1;"> <table class="singeRowTable" border="0" cellspacing="0" cellpadding="0"> <tr> <th colspan="7" style="background: #ffffff;text-align:left;"> 机票预定</th> </tr> <tr> <th>序号</th> <th>航班号</th> <th>日期</th> <th>起止城市</th> <th>起飞时间</th> <th>抵达时间</th> <th>操作 <a style="color:blue;cursor:pointer;" @click="AddTicket()">添加</a></th> </tr> <tr v-for="(item,index) in CtObj.ticketList" :key="index+20000"> <td>{{index+1}}.</td> <td> <el-input v-model="item.Flight_number" style="width:100px" placeholder="请填写航班号"></el-input> </td> <td> <el-input v-model="item.FlightDate" style="width:120px" placeholder="请填写航班日期"></el-input> </td> <td> <el-input v-model="item.dName" style="width:200px" placeholder="请填写出发城市"></el-input> — <el-input v-model="item.aName" style="width:200px" placeholder="请填写到达城市"></el-input> </td> <td> <el-input v-model="item.Departure_time" style="width:100px" placeholder="请填写出发时间"></el-input> </td> <td> <el-input v-model="item.Arrival_time" style="width:100px" placeholder="请填写到达时间"></el-input> </td> <td> <a style="color:blue;cursor:pointer;" @click="DeleteTicket(index)">删除</a> <a style="color:blue;cursor:pointer;" v-if="index!=0" @click="MoveTicket(index,1)">上移</a> <a style="color:blue;cursor:pointer;" v-if="index!=CtObj.ticketList.length-1" @click="MoveTicket(index,2)">下移</a> </td> </tr> <tr> <td colspan="7"> </td> </tr> <tr> <th colspan="7" style="background: #ffffff;text-align:left;"> 酒店预订</th> </tr> <tr> <th colspan="3">酒店名称</th> <th>类型</th> <th>房型</th> <th>数量</th> <th>操作 <a style="color:blue;cursor:pointer;" @click="AddHotel()">添加</a></th> </tr> <tr v-for="(item,index) in CtObj.hotelList" :key="index+30000"> <td colspan="3"> <el-input v-model="item.Name" style="width:300px" placeholder="请填写酒店名称"></el-input> </td> <td> <el-input v-model="item.HotelType" style="width:200px" placeholder="请填写酒店类型"></el-input> </td> <td> <el-input v-model="item.RoomType" style="width:200px" placeholder="请填写酒店房型"></el-input> </td> <td> <el-input v-model="item.RoomNum" style="width:200px" placeholder="请填写数量"></el-input> </td> <td> <a style="color:blue;cursor:pointer;" @click="DeleteHotel(index)">删除</a> </td> </tr> <tr> <td colspan="7"> </td> </tr> <tr> <th colspan="7" style="background: #ffffff;text-align:left;"> 代办签证</th> </tr> <tr> <td colspan="7"> <el-input v-model="CtObj.visaInfo" placeholder="日本个人商务签证、代办签证费用"> </el-input> </td> </tr> <tr> <td colspan="7"> </td> </tr> <tr> <th colspan="7" style="background: #ffffff;text-align:left;"> 其他单项服务事宜</th> </tr> <tr> <td colspan="7"> <div v-if="CtObj.travelContent!=''" v-html="CtObj.travelContent" ref="TcTravel_Table"> </div> <div v-else ref="TcTravel_Table"> <table class="TcTravel_Table"> <tbody> <tr v-for="(item,index) in tripDays" :key="index+1000000"> <td contenteditable="true"> <div v-for="(subItem,subIndex) in item.dayArray" :key="subIndex+2000000"> <span v-if="subItem.type==7"> {{subItem.childItem.title}} </span> </div> </td> </tr> </tbody> </table> </div> </td> </tr> <tr> <td colspan="7"> </td> </tr> <tr> <th colspan="7" style="background: #ffffff;text-align:left;"> 成团信息 (无机票的可以删除下面的文字)</th> </tr> <tr> <td colspan="7"> <el-input v-model="CtObj.rbInfo" placeholder="成团送往返国际机票、全程燃油税、机场税(因地接公司企划专案,如有机票自理者团费无减免,不便之处敬请见谅。"> </el-input> </td> </tr> </table> </div> </div> </div> <div class="block mtop15" id="anchor-2" ref="anchor2"> <div class="blockTitle"> <span class="icon"> <i class="iconfont icon-copy"></i> </span> <h2> <em>费用计算</em> </h2> </div> <el-form-item label="备注信息"> <el-input type="textarea" v-model="CtObj.notes" placeholder="用车:全程七天用车;用餐:全程含餐; 酒店:全程含入内;导游,教练全程随行;成都天府机场起止含全程国际段机票(赠送)"></el-input> </el-form-item> <el-form-item label="旅游者委托旅行社提供上述"> <el-select :placeholder="$t('pub.pleaseSel')" filterable v-model="CtObj.serviceNum" style="width:220px;"> <el-option label="壹" :value='1'></el-option> <el-option label="贰" :value='2'></el-option> <el-option label="叁" :value='3'></el-option> <el-option label="肆" :value='4'></el-option> <el-option label="伍" :value='5'></el-option> </el-select> 共计 <template v-if="CtObj.serviceNum=='1'"> <span style="font-weight:bold:color:red;">壹</span> </template> <template v-else-if="CtObj.serviceNum=='2'"> <span style="font-weight:bold:color:red;">贰</span> </template> <template v-else-if="CtObj.serviceNum=='3'"> <span style="font-weight:bold:color:red;">叁</span> </template> <template v-else-if="CtObj.serviceNum=='4'"> <span style="font-weight:bold:color:red;">肆</span> </template> <template v-else-if="CtObj.serviceNum=='5'"> <span style="font-weight:bold:color:red;">伍</span> </template> (大写)项服务。 </el-form-item> <el-form-item label="人数"> <el-input type="text" v-model="CtObj.clientNumber" maxlength="100" class="w300" @keyup.native="checkInteger(CtObj,'clientNumber')" placeholder="请填写人数"></el-input> </el-form-item> <el-form-item label="单价"> <el-input type="text" v-model="CtObj.adultPrice" maxlength="100" class="w300" @keyup.native="checkPrice(CtObj,'adultPrice')" placeholder="请填写单价"></el-input> </el-form-item> <el-form-item label="费用总额(小写)人民币"> <el-input type="text" v-model="CtObj.orderPrice" maxlength="100" class="w300" @keyup.native="checkPrice(CtObj,'orderPrice')" placeholder="费用总额(小写)人民币"></el-input> 元. </el-form-item> <el-form-item :label="(CtObj.clientNumber?CtObj.clientNumber:'')+'人合计'"> <el-input type="text" v-model="CtObj.totalMoneyInfo" maxlength="500" class="w300" placeholder="8人合计:8*22800元/人=182400元"></el-input> </el-form-item> </div> </div> </el-form> <el-dialog custom-class='w600' title='合同复制' :visible.sync="dialogVisible" center> <input type="button" v-if="backGuest&&backGuest.length>0" class="TCbtn-info" style="padding:8px 10px;float:right;margin-bottom:10px;" @click="copyContract()" value="批量复制合同" /> <table border="0" cellspacing="0" cellpadding="0" class="singeRowTable"> <tr> <th>旅客姓名</th> <th>{{$t('hotel.table_tel')}}</th> </tr> <tr v-for="(item,index) in backGuest"> <td>{{item.surName+''+item.name}}</td> <td>{{item.mobilePhone}}</td> </tr> <tr v-if="backGuest.length==0"> <td colspan="2">已经复制完成</td> </tr> </table> </el-dialog> <div class="fade" v-show="isShowFade"></div> <div class="qrCodeDiv" v-show="isShowFade"> <div style="margin-top:15px;">请扫码签字</div> <div id="qrcode" style="margin:25px;" ref="qrcode"> <img class="WeiXinShare" :src="'data:image/png;base64,'+QRCodeStr" /> </div> <i class="iconfont icon-cha Ec_cha" @click="isShowFade=false"></i> </div> </div> </template> <script> import moment from 'moment' export default { data() { let valiTotalNumber = (rule, value, callback) => { if (this.CtObj.totalNumber == 0 || this.CtObj.totalNumber == '') { return callback(new Error('请选择')); } else { callback(); } } let validateEach = (rule, value, callback) => { if (this.CtObj.eachNumber == 0 || this.CtObj.eachNumber == '') { return callback(new Error('请选择')); } else { callback(); } } let validatepayType = (rule, value, callback) => { if (this.CtObj.payType == 0 || this.CtObj.payType == '') { return callback(new Error('请选择')); } else { callback(); } } let validatesettleDisputeMode = (rule, value, callback) => { if (this.CtObj.settleDisputeMode == 0 || this.CtObj.settleDisputeMode == '') { return callback(new Error('请选择')); } else { callback(); } } return { isShowFade: false, QRCodeStr: "", //客户省份列表 ClientProvinceList: [], //客户城市列表 ClientCityList: [], //公司省份列表 companyProvinceList: [], //公司城市列表 companyCityList: [], //监管机构省 JianProvinceList: [], //监管机构市 JianCityList: [], //选中切换 cked: 1, //查询参数 msg: { TCID: 0, orderID: 0, guestId: 0 }, addMsg: { Country: 0, Province: 0, City: 0 }, dialogVisible: false, CurrentUserInfo: {}, //当前用户信息 //参数 CtObj: { //基本信息 clientName: '', clientIdcardnum: '', clientCall: '', clientFax: '', clientEmail: '', clientPostCode: '', clientCountryid: 0, clientProvinceid: 0, clientCityid: 0, clientAddress: '', company: '', businessCertificate: '', companyCall: '', companyFax: '', companyEmail: '', companyPostCode: '', companyCountryid: 0, companyProvinceid: 0, companyCityid: 0, companyAddress: '', agentName: '', agentCall: '', contractPlace: '', //合同条款 totalNumber: 2, eachNumber: 1, productName: '', startDate: '', returnDate: '', dayNum: '', nightNum: '', adultPrice: '', childPrice: '', servicePrice: '', orderPrice: '', payDate: '', payType: '', //客户同意 insuranceOpinion: '', insuranceCompany: '', insuranceProduct: '', insuranceAmount: '', minNumber: 0, insteadOpinion: '', insteadCompany: '', delayOpinion: '', changeOpinion: '', terminateOpinion: '', carpoolOpinion: '', carpoolCompany: '', settleDisputeMode: 2, arbitrationCommission: '', court: '', otherMatter: '', //投诉信息 companyComplainCall: '', regulatorName: '', regulatorComplainCall: '', regulatorWebsite: '', regulatorPostCode: '', regulatorCountryid: 0, regulatorProvinceid: 0, regulatorCityid: 0, regulatorAddress: '', //行程信息 travelContent: '', //旅客信息 togetherRemark: '', singleRemark: '', nobedRemark: '', aloneRemark: '', tcid: 0, orderId: 0, tCNum: '', payProtocol: '', shopProtocol: '', dmcName: '', ticketList: [], //机票信息 hotelList: [], //酒店信息 contactsName: "", //紧急联系人 contactsMobile: "", //紧急联系电话 templateType: 1, serviceNum: '', rbInfo: "", }, //旅客名单 guestList: [], tripList: [], rules: { clientName: [{ required: true, message: "请输入客户名称", trigger: "blur" }], clientCall: [{ required: true, message: this.$t('rule.EnterPNum'), trigger: "blur" }], agentName: [{ required: true, message: "请输入经办人", trigger: "blur" }], agentCall: [{ required: true, message: this.$t('rule.EnterPNum'), trigger: "blur" }], totalNumber: [{ validator: valiTotalNumber, trigger: 'change', required: true, }], eachNumber: [{ validator: validateEach, trigger: "change", required: true, }], productName: [{ required: true, message: this.$t('objFill.qingtianxcpmc'), trigger: "blur" }], startDate: [{ required: true, message: "请选择出发日期", trigger: "change" }], returnDate: [{ required: true, message: "请选择返回日期", trigger: "blur" }], dayNum: [{ required: true, message: "请选择天数", trigger: "change" }], nightNum: [{ required: true, message: "请选择晚数", trigger: "change" }], adultPrice: [{ required: true, message: "请填写成人价", trigger: "blur" }], orderPrice: [{ required: true, message: "请填写费用合计", trigger: "blur" }], payDate: [{ required: true, message: "请选择支付日期", trigger: "change" }], payType: [{ validator: validatepayType, trigger: "change", required: true, }], servicePrice: [{ required: true, message: "请输入导游服务费", trigger: "blur" }], insuranceProduct: [{ required: true, message: "请填写保险名称", trigger: 'blur' }], minNumber: [{ required: true, message: "请填写最低成团人数", trigger: "change" }], settleDisputeMode: [{ required: true, validator: validatesettleDisputeMode, trigger: "change" }], }, //自愿购物活动补充协议 VoluntaryArr: [], //自愿付费项目补充协议 WillingPayArr: [], menuArr: ['合同基本信息'], ckedIndex: 0, LineName: '', //交通 trifficList: [], //行程 tripDays: [], //旅客名单 backGuest: [], //短信旅客名单 msgGuest: [], ckedAll: false, content: '发送短信', //按钮显示内容 totalTime: 10, canClick: true //添加canClick }; }, methods: { //一排上移、下移 MoveTicket(index, type) { if (this.CtObj.ticketList && this.CtObj.ticketList.length > 0) { var tempData = this.CtObj.ticketList[index]; //上移 if (type == 1 && index > 0) { var upData = this.CtObj.ticketList[index - 1]; this.CtObj.ticketList[index] = upData; this.CtObj.ticketList[index - 1] = tempData; } else { //下移 var downData = this.CtObj.ticketList[index + 1]; this.CtObj.ticketList[index] = downData; this.CtObj.ticketList[index + 1] = tempData; } this.$forceUpdate(); } }, //添加航班 AddTicket() { var ticketObj = { Flight_number: "", //航班号 FlightDate: "", //航班日期 dName: "", //出发城市/机场 aName: "", //到达城市/机场 Departure_time: "", //出发时间 Arrival_time: "", //到达时间 } if (!this.CtObj.ticketList) { this.CtObj.ticketList = []; } this.CtObj.ticketList.push(ticketObj); }, //删除航班 DeleteTicket(index) { var that = this; if (this.CtObj.ticketList && this.CtObj.ticketList.length > 0) { that.Confirm("删除航班后将不能恢复?", function () { if (index > -1) { that.CtObj.ticketList.splice(index, 1); } }); } }, //添加酒店 AddHotel() { var htelObj = { Name: "", RoomType: "标准间", RoomNum: "1", HotelType: "酒店", } if (!this.CtObj.hotelList) { this.CtObj.hotelList = []; } this.CtObj.hotelList.push(htelObj); }, //删除酒店 DeleteHotel(index) { if (this.CtObj.hotelList && this.CtObj.hotelList.length > 0) { var that = this; that.Confirm("删除酒店后将不能恢复?", function () { if (index > -1) { that.CtObj.hotelList.splice(index, 1); } }); } }, changeSignType() { if (this.CtObj.SignType == 0) { this.CtObj.company = '四川和平国际旅行社有限公司' this.CtObj.companyAddress = "成都市锦江区青和里南段55号1栋2310、2311、2312号 "; this.CtObj.TravelAgency_LicenseNum = "L-SC-CJ00015"; } if (this.CtObj.SignType == 1) { this.CtObj.company = '(株)ピースインターナショナル' this.CtObj.companyAddress = ""; this.CtObj.TravelAgency_LicenseNum = ""; } }, goContract() { let routeData = this.$router.resolve({ name: "TravelContractDetailRB", query: { company: '赴日交流访问团合同', companyAddress: this.CtObj.companyAddress, TCID: this.$route.query.TCID, guestId: this.$route.query.guestId, orderID: this.$route.query.orderID, }, }); location.href = routeData.href }, GetQrCode: function () { let urlObj = this.domainManager(); let msg = { TCID: this.$route.query.TCID, orderID: this.$route.query.orderID, guestId: this.$route.query.guestId, Id: this.$route.query.ID, pUrl: "clientConfirmRB", }; this.$http({ headers: { 'Content-Type': 'application/json' }, method: 'post', url: urlObj.DomainUrl + '/api/file/GetQrCodeImage?', data: { "msg": msg } }).then(res => { if (res.data.resultCode === 1) { this.QRCodeStr = res.data.data; } else { } }).catch(err => {}) }, //跳转锚点 goAnchor(selector) { var anchor = this.$el.querySelector(selector) document.documentElement.scrollTop = anchor.offsetTop - 70 }, getList() { this.apipost("travelcontract_post_GetContractInfoService", this.msg, res => { if (res.data.resultCode === 1) { var tempObj = res.data.data; this.CtObj = tempObj; this.guestList = res.data.data.guestList; this.CtObj.tcid = this.$route.query.TCID; this.CtObj.orderId = this.$route.query.orderID; this.VoluntaryArr = this.CtObj.shopProtocolList; this.WillingPayArr = this.CtObj.payProtocolList; if (tempObj && tempObj.id <= 0) { this.CtObj.totalNumber = 2; this.CtObj.eachNumber = 1; //初始化行程 this.GetTrip(0, this.msg.TCID); } if (tempObj.company) { this.CtObj.SignType = tempObj.company == '四川和平国际旅行社有限公司' ? 0 : 1; this.CtObj.company = tempObj.company; } if (this.CtObj.auditContract == 2) { if (this.CurrentUserInfo.EmployeeId != 615) { this.goContract() } } } else { this.Error(res.data.message); } }, null); }, //提交数据 SaveMsg() { this.CtObj.status = 1; this.CtObj.contractStatus = 2; let VolArr = []; let WalArr = []; if (this.VoluntaryArr.length > 0) { this.VoluntaryArr.forEach(x => { if (x.IsShow == 0) { VolArr.push(x); } }) if (VolArr.length > 0) { this.CtObj.shopProtocol = JSON.stringify(VolArr); } else { this.CtObj.shopProtocol = '' } } if (this.WillingPayArr.length > 0) { this.WillingPayArr.forEach(x => { if (x.IsShow == 0) { WalArr.push(x); } }) if (WalArr.length > 0) { this.CtObj.payProtocol = JSON.stringify(WalArr); } else { this.CtObj.payProtocol = '' } } this.CtObj.travelContent = this.$refs.TcTravel_Table.innerHTML; this.CtObj.rbGroupId = this.CurrentUserInfo.RB_Group_id, this.CtObj.templateType = 1, this.apipost("travelcontract_post_SetContractService", this.CtObj, res => { if (res.data.resultCode === 1) { this.Success(res.data.message); this.dialogVisible = false; this.getList(); } else { this.Error(res.data.message); } }, null); }, //跳转至预览 goUrl() { this.$router.push({ name: 'TravelContractDetailRB', query: { company: '赴日交流访问团合同', companyAddress: this.CtObj.companyAddress, TCID: this.$route.query.TCID, guestId: this.CtObj.guestId, orderID: this.$route.query.orderID, blank: "y", } }); }, //作废 getinvalid() { this.$confirm('是否作废?', this.$t('tips.tips'), { confirmButtonText: this.$t('pub.sureBtn'), cancelButtonText: this.$t('pub.cancelBtn'), type: 'warning' }).then(() => { this.CtObj.status = 0; this.CtObj.auditContract = 0; this.apipost("travelcontract_post_UpdateStatusContractService", this.CtObj, res => { if (res.data.resultCode === 1) { this.Success(res.data.message); this.getList(); } else { this.Error(res.data.message); } }, null); }).catch(() => { this.$message({ type: 'info', message: this.$t('tips.cancleDelete') }); }); }, //提交 submitForm(addMsg) { //提交创建、修改表单 this.$refs[addMsg].validate(valid => { if (valid) { this.SaveMsg(); } else { this.Error('请完成必填项'); return false; } }); }, sendAudit() { this.apipost("travelcontract_get_UpdateAuditContractService", { "AuditContract": 1, "Id": this.CtObj.Id }, res => { if (res.data.resultCode === 1) { this.Success(res.data.message); this.getList(); } else { this.Error(res.data.message); } }, null); }, //滚动条滚动选中tab menu() { }, //点击合同获取旅客信息 getGuestList() { let msg = { orderId: this.msg.orderID } this.apipost("travelcontract_post_GetContractGuestByOrderId", msg, res => { if (res.data.resultCode === 1) { this.backGuest = res.data.data; } else { this.Error(res.data.message); } }, null); }, //获取旅客短信列表 getMsgList() { let msg = { orderId: this.msg.orderID } this.apiJavaPost("/api/contract/sendMsgList", msg, res => { if (res.data.resultCode === 1) { this.msgGuest = res.data.data; this.msgGuest.forEach(x => { x.checked = false; if (x.msgSendStatus == 3) { x.isCanck = true; } else { x.isCanck = false; } }) } else { this.Error(res.data.message); } }, null); }, //复制合同 copyContract() { let newArr = []; this.guestList.forEach(x => { newArr.push(x.id); }) this.CtObj.guestIds = newArr.join(','); this.submitForm('CtObj'); }, //点击全选 getCkAll() { var that = this; if (that.ckedAll) { this.msgGuest.forEach(x => { if (x.msgSendStatus == 3) { x.checked = false; } else { x.checked = true; } }) } else { this.msgGuest.forEach(x => { x.checked = false; }) } }, sendMsg11() { let newArr = []; this.msgGuest.forEach(x => { let obj = {}; if (x.checked) { newArr.push(x); } }) if (newArr.length == 0) { this.Error('请勾选要发送信息的旅客!'); return; } if (!this.canClick) return this.sendMsg(); //调用发送短信 this.canClick = false this.content = this.totalTime + 's后重新发送' let clock = window.setInterval(() => { this.totalTime-- this.content = this.totalTime + 's后重新发送' if (this.totalTime < 0) { window.clearInterval(clock) this.content = '重新发送验证码' this.totalTime = 10 this.canClick = true //这里重新开启 } }, 1000) }, //发送短信 sendMsg() { let msgObj = []; let dateTime = moment(this.CtObj.startDate).format("YYYY-MM-DD"); let lineTeam = this.CtObj.productName; let days = this.CtObj.dayNum; let nights = this.CtObj.nightNum; this.msgGuest.forEach(x => { let obj = {}; if (x.checked) { obj.mobiles = x.clientCall; obj.Url = `http://yx.oytour.com/#/clientConfirm?TCID=${this.msg.TCID}&orderID=${this.msg.orderID}&guestId=${x.guestId}`; msgObj.push(obj); } }) let msg = { msgObj: msgObj, dateTime: dateTime, lineTeam: lineTeam, days: days, nights: nights, orderID: this.msg.orderID } this.apiJavaPost("/api/contract/sendMassage", msg, res => { if (res.data.resultCode === 1) { this.getMsgList(); } else { this.Error(res.data.message); } }, null); }, GetTrip(id, TCID) { this.tripList = []; this.startDate = ''; var nTCID = 0; if (TCID) { nTCID = TCID; } var msg = { configId: 0, tcid: nTCID, isClick: 1 //不算统计 }; if (id !== undefined) { //根据ID 获取行程内容 this.apipost( "b2b_get_GetB2BTravelInfoNoDes", msg, res => { if (res.data.resultCode == 1) { if (res.data.data.priceList && res.data.data.priceList.length > 0) { this.startDate = res.data.data.priceList[0].startDate; } this.tripDays = res.data.data.dayList; this.trifficList = res.data.data.trafficList; this.tripList = res.data.data.dayList; this.LineName = res.data.data.lineName; this.init(); } }, err => {} ); } else { var dayList = []; this.subConfig.DayList.forEach((objItem, objIndex) => { var dayItem = this.$tripUtils.daysArrayObj(); dayItem.dayNum = objItem.dayNum; //每一天的数组 var dayArray = []; //子项遍历 objItem.dayArray.forEach(subItem => { switch (subItem.Type) { //交通 case "1": var subTraffiArray = []; subItem.childItem.SubTraffic.forEach(subTrafficItem => { subTraffiArray.push({ startCityName: subTrafficItem.StartCityName, arrivalType: subTrafficItem.ArrivalType, arrivalCityName: subTrafficItem.ArrivalCityName }); }); var trafficObj = { type: subItem.Type, childItem: { description: subItem.childItem.Description, subTraffic: subTraffiArray } }; dayArray.push(trafficObj); break; //景点 case "2": var imgArray = []; subItem.childItem.ImaArray.forEach(imgItem => { imgArray.push({ url: imgItem.Url, name: imgItem.Name }); }); var scenicObj = { type: subItem.Type, childItem: { couponsName: subItem.childItem.CouponsName, couponsTicketName: subItem.childItem.CouponsTicketName, playTimeHour: subItem.childItem.PlayTimeHour, playTimeMinutes: subItem.childItem.PlayTimeMinutes, description: subItem.childItem.Description, imaArray: imgArray } }; dayArray.push(scenicObj); break; //酒店 case "3": var imgArray = []; subItem.childItem.ImaArray.forEach(imgItem => { imgArray.push({ url: imgItem.Url, name: imgItem.Name }); }); var hotelObj = { type: subItem.Type, childItem: { hotelName: subItem.childItem.HotelName, hotelProductName: subItem.childItem.HotelProductName, useDinnerType: subItem.childItem.UseDinnerType, description: subItem.childItem.Description, imaArray: imgArray } }; dayArray.push(hotelObj); break; //餐厅 case "4": var imgArray = []; subItem.childItem.ImaArray.forEach(imgItem => { imgArray.push({ url: imgItem.Url, name: imgItem.Name }); }); var dinnerObj = { type: subItem.Type, childItem: { dinnerName: subItem.childItem.DinnerName, mealName: subItem.childItem.MinnerName, useDinnerType: subItem.childItem.UseDinnerType, useTimeHour: subItem.childItem.UseTimeHour, useTimeMinutes: subItem.childItem.UseTimeMinutes, description: subItem.childItem.Description, descriptionText: subItem.childItem.Description, imaArray: imgArray } }; dayArray.push(dinnerObj); break; //自由活动 case "5": var freedomObj = { type: subItem.Type, childItem: { description: subItem.Description, descriptionText: subItem.Description } }; dayArray.push(freedomObj); break; //温馨提示 case "6": var warmObj = { type: subItem.Type, childItem: { description: subItem.Description, descriptionText: subItem.Description } }; dayArray.push(warmObj); break; //行程大点 case "7": var titleObj = { type: subItem.Type, childItem: { title: subItem.childItem.Title, description: subItem.childItem.Description } }; dayArray.push(titleObj); break; } }); dayItem.dayArray = dayArray; dayList.push(dayItem); }); this.tripList = dayList; this.init(); } }, init() { this.tripList.forEach((x, j) => { let useDinnerTypeBy = ""; let jin = [], jiu = [], jiu2 = [], jiao = [], dadian = [], tips = [], activy = [], can = { breakfirst: "敬请自理", lanuch: "敬请自理", dinner: "敬请自理" }; x.dayArray.forEach((y, index) => { if (y.type == 7 && y.childItem.title != "") { let obj = { title: y.childItem.title, content: y.childItem.description, img: y.childItem.imaArray && y.childItem.imaArray.length > 0 ? y.childItem.imaArray[0].url : "", ticketName: "", playTimeHour: null, playTimeMinutes: null }; dadian.push(obj); } else if (y.type == 1 && y.childItem.subTraffic.length > 0) { let title = ""; y.childItem.subTraffic.forEach((z, i) => { title += z.startCityName; if (z.arrivalType == 1) { title += '-'; } else if (z.arrivalType == 2) { title += '-'; } else if (z.arrivalType == 3) { title += '-'; } else { title += '-'; } if (i + 1 == y.childItem.subTraffic.length) { title += z.arrivalCityName; } }); let obj = { title: title, content: y.childItem.description, img: "", ticketName: "", playTimeHour: null, playTimeMinutes: null }; jiao.push(obj); } else if ( y.type == 2 && y.childItem.couponsName != "" && y.childItem.imaArray.length > 0 ) { let obj = { title: y.childItem.couponsName, content: y.childItem.description, img: y.childItem.imaArray[0].url, ticketName: y.childItem.couponsTicketName, playTimeHour: y.childItem.playTimeHour, playTimeMinutes: y.childItem.playTimeHour }; jin.push(obj); } else if ( y.type == 3 && y.childItem.hotelName != "" && y.childItem.imaArray.length > 0 ) { let obj = { title: y.childItem.hotelName, content: y.childItem.description, img: y.childItem.imaArray[0].url, ticketName: "", playTimeHour: null, playTimeMinutes: null }; jiu.push(obj); } else if (y.type == 4) { if (y.childItem.useDinnerType == "1") { can.breakfirst = y.childItem.dinnerName; } else if (y.childItem.useDinnerType == "2") { can.lanuch = y.childItem.dinnerName; } else if (y.childItem.useDinnerType == "3") { can.dinner = y.childItem.dinnerName; } } else if (y.type == 5) { let obj = { title: "自由活动", content: y.childItem.description, img: "", ticketName: "", playTimeHour: null, playTimeMinutes: null }; activy.push(obj); } else if (y.type == 6) { let obj = { title: y.childItem.title, content: y.childItem.description, img: "", ticketName: "", playTimeHour: null, playTimeMinutes: null }; tips.push(obj); } if (y.type == 3) { jiu2.push(y.childItem.hotelName); useDinnerTypeBy = y.childItem.useDinnerType; } }); if ( can.breakfirst == "敬请自理" && useDinnerTypeBy.indexOf("1") != -1 ) { can.breakfirst = "酒店内享用早餐"; } if (can.lanuch == "敬请自理" && useDinnerTypeBy.indexOf("2") != -1) { can.lanuch = "酒店自助"; } if (can.dinner == "敬请自理" && useDinnerTypeBy.indexOf("3") != -1) { can.dinner = "酒店自助"; } x.can = can; let details = []; x.tips = tips; x.jiu2 = jiu2; if (jin.length > 0) { details = jin; } else if (jiu.length > 0) { details = jiu; } else if (dadian.length > 0) { details = dadian; } else if (jiao.length > 0) { if (j == this.tripList.length - 1) { let obj = { title: "温暖的家", content: "感谢您参加本次行程,期待下次与您相遇", img: "" }; details.push(obj); } else { details = jiao; } } else if (activy.length > 0) { details = activy; } x.title = dadian.length > 0 ? dadian[0].title : jiao.length > 0 ? jiao[0].title : "集合出发"; x.details = details; if (x.details.length == 0) { if (j == 0) { let obj = { title: "集合出发", content: "向着远方的目标出发起飞", img: "", ticketName: "", playTimeHour: null, playTimeMinutes: null }; details.push(obj); } else if (j == this.tripList.length - 1) { let obj = { title: "温暖的家", content: "感谢您参加本次行程,期待下次与您相遇", img: "", ticketName: "", playTimeHour: null, playTimeMinutes: null }; details.push(obj); } } else { if (x.title == "集合出发") { x.details.forEach(xc => { if (xc.title !== undefined) x.title = xc.title + "~"; }); if (x.title == "集合出发") { if (j > 0 && j < tripList.length - 1) x.title = "自由活动"; } else { x.title = x.title.substring(0, x.title.length - 1); } } } x.islast = j + 1 == this.tripList.length; this.$set(this.tripList, j, x); }); for (let i = this.tripList.length - 1; i >= 0; i--) { if (i == 0) this.tripList[i].can.breakfirst = "敬请自理"; else { this.tripList[i].can.breakfirst = this.tripList[i - 1].can.breakfirst; if ( this.tripList[i].lineId != 5 && this.tripList[i].can.breakfirst == "敬请自理" ) this.tripList[i].can.breakfirst = "酒店内享用早餐"; } } this.trifficList.forEach((x, index) => { if (x.airportPickUp == 1 || x.airportPickUp == 2) { if (x.isUseBus == 1) { this.tripDays[index].TrifficType = '飞机+大巴' } } if (x.airportPickUp == 0 && x.isUseBus == 1) { this.tripDays[index].TrifficType = '大巴' } if (x.airportPickUp == 1 || x.airportPickUp == 2) { if (x.isUseBus == 0) { this.tripDays[index].TrifficType = '飞机' } } if (x.airportPickUp == 0 || x.airportPickUp == 0) { if (x.isUseBus == 0) { this.tripDays[index].TrifficType = '无' } } }) }, }, mounted() { this.CurrentUserInfo = this.getLocalStorage(); this.msg.TCID = this.$route.query.TCID; this.msg.orderID = this.$route.query.orderID; this.msg.guestId = this.$route.query.guestId; this.getList(); this.$nextTick(function () { //滚动监听事件 window.addEventListener('scroll', this.menu) }); } }; </script>