<style> @import "../../../assets/css/newTravelManager.css"; .CostNewPrice .el-form-item__content, .CostNewPrice .el-form-item__label { line-height: 30px; } .CostNewPrice .CP_halfWi { width: 45%; } .CostNewPrice .QuotationFirstDiv1 { padding-top: 30px; } .CostNewPrice .CP_ComTitle2 { color: #106BAF; font-weight: bold; background-color: #D1EEEE; white-space: nowrap; } .CostNewTable { border-collapse: collapse; } .CostNewTable td { height: 40px; border: 1px solid #106BAF !important; border-collapse: collapse; padding: 0 3px; } .CostNewTable .el-input .el-input__inner { height: 25px !important; border: none; border-bottom: 1px solid #606266; padding-left: 5px !important; } .CP_ComTitle { color: #106BAF; } .w70 { width: 70px !important; } .CostcomCenter { text-align: center; } .txtRightCost { text-align: right; padding-right: 10px; } .CostNewPrice .el-form-item { margin-bottom: 0 !important; } </style> <template> <div> <div class="CostNewPrice clearfix CP_Div"> <el-form> <table class="CostNewTable" style="width:1600px;"> <thead> <tr> <td colspan="13" class="CP_ComTitle2 CostcomCenter">{{$t('objFill.baojiaxinxi')}}</td> </tr> <tr> <td class="CP_ComTitle2 CostcomCenter" style="width:120px">{{$t('hotel.hotel_Currency')}}</td> <td v-for='(item,index) in CostCurrencyList' :key="`cc_`+index"> {{item.CurrencyName}} <span> <i class="iconfont icon-quxiao" style="display:inline-block;" @click="DeleteCurrency(index)"></i> </span> </td> <td :colspan="13-2-CostCurrencyList.length+1"> <el-form-item class="w100"> <el-select v-model='currencyType' @change="getRate(currencyType),addCurrency()"> <el-option v-for="item in AllCurrencyList" :label='item.Name' :value='item.ID' :key='item.ID'> </el-option> </el-select> </el-form-item> </td> </tr> <tr> <td class="CP_ComTitle2 CostcomCenter">{{$t('hotel.hotel_CurrentRate')}}</td> <td v-for='(item,index) in CostCurrencyList' :key="`cc2_`+index"> <el-input class="w100" v-model='item.ExchangeRate' @keyup.native="checkRate(item,'ExchangeRate'),getchange()"> </el-input> </td> <td :colspan="13-2-CostCurrencyList.length+1"> <el-input class="w100" v-model='queryMsg.RateInput' @keyup.native="checkRate(queryMsg,'RateInput'),getchange()"> </el-input> </td> </tr> <tr> <td class="CP_ComTitle2 CostcomCenter">{{$t('admin.admin_personNumber')}}</td> <td v-for="(item,index) in CostNumberList" :key='item.subCode'> <el-input class="w100" v-model='item.PeopleNumber' @keyup.native="checkInteger(item,'PeopleNumber')"> </el-input> <span> <i class="iconfont icon-quxiao" @click="DeletePNumber(index),getchange()"></i> </span> </td> <td :colspan="13-2-CostNumberList.length+1"> <el-form-item> <el-input :placeholder="$t('objFill.qingtxrs')" v-model='priceObj.priceNum' style="width:140px;" @keyup.native="checkInteger(priceObj,'priceNum'),getchange()"> <el-button slot="append" class="iconfont icon-img_haha" @click="addPeoNunber"></el-button> </el-input> </el-form-item> <div colspan="13" style="color: #f12121;font-weigth: bold;">{{$t('objFill.v101.tianrrshqindj')}}"+" </div> </td> </tr> </thead> <tr> <td rowspan="2" style="width:100px" class="CP_ComTitle2 CostcomCenter">Day</td> <td rowspan="2" style="width:120px" class="CP_ComTitle2 CostcomCenter">{{$t('hotel.hotel_Currency')}}</td> <td rowspan="2" style="width:180px" class="CP_ComTitle2 CostcomCenter">{{$t('Airticket.Air_Trip')}}</td> <td colspan="2" style="width:220px;" class="CP_ComTitle2 CostcomCenter">{{$t('hotel.hotel')}}</td> <td colspan="2" style="width:120px" class="CP_ComTitle2 CostcomCenter">{{$t('objFill.v101.chetian')}}</td> <td colspan="2" style="width:200px" class="CP_ComTitle2 CostcomCenter">{{$t('objFill.can')}}</td> <td colspan="2" style="width:150px" class="CP_ComTitle2 CostcomCenter">{{$t('scen.sc_piao')}}</td> <td colspan="2" style="width:100px" class="CP_ComTitle2 CostcomCenter"> {{$t('objFill.qitafy')}}<br />({{$t('objFill.baoxiansdzfd')}})</td> </tr> <tr> <td style="width:150px" class="CP_ComTitle2 CostcomCenter">{{$t('hotel.table_hotelname')}}</td> <td style="width:50px" class="CP_ComTitle2 CostcomCenter">{{$t('objFill.v101.jiageren')}}</td> <td style="width:50px" class="CP_ComTitle2 CostcomCenter">{{$t('objFill.chezi')}}/{{$t('hotel.hotel_day')}} </td> <td style="width:50px" class="CP_ComTitle2 CostcomCenter"> {{$t('objFill.guolufei')}}<br />{{$t('objFill.v101.tingcheft')}}</td> <td style="width:110px" class="CP_ComTitle2 CostcomCenter">{{$t('restaurant.res_resName')}}<br /><span style="color:red;">{{$t('objFill.v101.tianxctmccyjg')}}</span></td> <td style="width:90px" class="CP_ComTitle2 CostcomCenter">{{$t('objFill.v101.jiagecan')}}</td> <td style="width:150px" class="CP_ComTitle2 CostcomCenter">{{$t('visaT.jdname')}}<br /> <span style="color:red;">{{$t('objFill.v101.tianxjqcaiyjg')}}</span> </td> <td style="width:50px" class="CP_ComTitle2 CostcomCenter">{{$t('objFill.v101.jiageren')}}</td> <td style="width:50px" class="CP_ComTitle2 CostcomCenter">{{$t('system.query_airName')}}</td> <td style="width:50px" class="CP_ComTitle2 CostcomCenter">{{$t('Operation.Op_price')}}</td> </tr> <template v-for="(subItem,subIndex) in dayCostPriceList"> <tr :key="subIndex"> <td align="center"> {{$t('tips.di')}}{{subItem.DayNum}}{{$t('hotel.hotel_day')}} <br /> {{GetDayStr(subItem.DayNum-1)}} </td> <td> <el-form-item> <el-select v-model='subItem.CurrencyId' class="w100"> <el-option :label="$t('pub.unlimitedSel')" :value='defaultSelect'></el-option> <el-option v-for="items in CostCurrencyList" :label='items.CurrencyName' :value='items.CurrencyId' :key='items.CurrencyId'> </el-option> </el-select> </el-form-item> </td> <td> <el-input type="textarea" resize="none" style="width:180px;" v-model="subItem.Title"></el-input> </td> <td> <el-select filterable remote :remote-method="(query) => remoteSearchAdGroup(query, subItem)" v-model='subItem.HotelId' :placeholder="$t('objFill.qingshurujdmc')" :loading="loading" @change="getHotel(subItem,subItem.HotelId)" style="width:135px;"> <el-option v-for="(x) in subItem.HotelList" :key="x.ID" :label="x.Name" :value='x.ID'> </el-option> </el-select> <el-form-item :label="$t('objFill.v101.hancan')"> <el-select v-model='subItem.ContainDinnerType' style="width:100px;" :placeholder="$t('objFill.v101.hancanlxin')" @change="DinnerTypeChange(subItem)"> <el-option :label="$t('objFill.v101.hancanlxin')" :value='0'></el-option> <el-option :label="$t('objFill.hanzaocan')" :value='1'></el-option> <el-option :label="$t('objFill.hanwancan')" :value='2'></el-option> <el-option :label="$t('objFill.v101.hanzaowanc')" :value='3'></el-option> </el-select> </el-form-item> </td> <td> <el-input type='text' v-model="subItem.HotelCostPrice" class="w70" @keyup.native="checkPrice(subItem,'HotelCostPrice'),getchange(1)" :placeholder="$t('objFill.v101.jiudianjge')"></el-input> <template v-if="subItem.IsHotelChange"> <font style="color:red;"> <template v-if="subItem.HotelChangeValue>0"> + </template> {{subItem.HotelChangeValue}} <br /> ({{subItem.HotelChangeRemark}})</font> </template> </td> <td> <el-input type='text' v-model="subItem.BusCostPrice" class="w70" @keyup.native="checkPrice(subItem,'BusCostPrice'),getchange(1)" :placeholder="$t('objFill.chezi')"> </el-input> <template v-if="subItem.IsBusChange"> <font style="color:red;"> <template v-if="subItem.BusChangeValue>0"> + </template> {{subItem.BusChangeValue}} <br /> ({{subItem.BusChangeRemark}})</font> </template> </td> <td> <el-input type='text' v-model="subItem.PassFee" class="w70" @keyup.native="checkPrice(subItem,'PassFee'),getchange(1)" :placeholder="$t('objFill.v101.guolfqcfei')"> </el-input> </td> <td> <template v-if="postConfig.LineId==14||postConfig.LineId==118"> <el-form-item :label="$t('objFill.v101.zaocanmc')" label-width="16px"> <el-input :placeholder="$t('objFill.v101.myOrdersAllType.qingshurctmc')" v-model="subItem.BreakfastName" style="width:160px"> <i slot="suffix" class="el-input__icon el-icon-search" style="cursor:pointer;" @click="showDiningDig(subItem,1)"></i> </el-input> </el-form-item> <el-form-item :label="$t('objFill.v101.wucanmc')" label-width="16px"> <el-input :placeholder="$t('objFill.v101.myOrdersAllType.qingshurctmc')" v-model="subItem.LunchName" style="width:160px"> <i slot="suffix" class="el-input__icon el-icon-search" style="cursor:pointer;" @click="showDiningDig(subItem,2)"></i> </el-input> </el-form-item> <el-form-item :label="$t('objFill.v101.wancaimc')" label-width="16px"> <el-input :placeholder="$t('objFill.v101.myOrdersAllType.qingshurctmc')" v-model="subItem.DinnerName" style="width:160px;"> <i slot="suffix" class="el-input__icon el-icon-search" style="cursor:pointer;" @click="showDiningDig(subItem,3)"></i> </el-input> </el-form-item> </template> <template v-else> {{$t('objFill.v101.zaocanmc')}}:<el-input type="text" :disabled="(subItem.ContainDinnerType==1||subItem.ContainDinnerType==3)?true:false" v-model='subItem.BreakfastName' class="w120" :placeholder="$t('objFill.v101.zaocanmc')"> </el-input> <br /> {{$t('objFill.v101.wucanmc')}}:<el-input type="text" v-model='subItem.LunchName' class="w120" :placeholder="$t('objFill.v101.wucanmc')"></el-input> <br /> {{$t('objFill.v101.wancaimc')}}:<el-input type="text" :disabled="(subItem.ContainDinnerType==2||subItem.ContainDinnerType==3)?true:false" v-model='subItem.DinnerName' class="w120" :placeholder="$t('objFill.v101.wancaimc')"></el-input> </template> </td> <td> <template v-if="postConfig.LineId==14||postConfig.LineId==118"> {{$t('objFill.v101.zaocanmc')}}:<el-input type="text" :disabled="true" v-model='subItem.BreakfastCostPrice' class="w70" @keyup.native="checkPrice(subItem,'BreakfastCostPrice'),getchange(1)"></el-input> <br /> {{$t('objFill.v101.wucanmc')}}:<el-input type="text" v-model='subItem.LunchCostPrice' class="w70" @keyup.native="checkPrice(subItem,'LunchCostPrice'),getchange(1)" :disabled="true"></el-input> <br /> {{$t('objFill.v101.wancaimc')}}:<el-input type="text" :disabled="true" v-model='subItem.DinnerCostPrice' class="w70" @keyup.native="checkPrice(subItem,'DinnerCostPrice'),getchange(1)"></el-input> </template> <template v-else> {{$t('objFill.v101.zaocanmc')}}:<el-input type="text" :disabled="(subItem.ContainDinnerType==1||subItem.ContainDinnerType==3)?true:false" v-model='subItem.BreakfastCostPrice' class="w70" @keyup.native="checkPrice(subItem,'BreakfastCostPrice'),getchange(1)"></el-input> <br /> {{$t('objFill.v101.wucanmc')}}:<el-input type="text" v-model='subItem.LunchCostPrice' class="w70" @keyup.native="checkPrice(subItem,'LunchCostPrice'),getchange(1)"></el-input> <br /> {{$t('objFill.v101.wancaimc')}}:<el-input type="text" :disabled="(subItem.ContainDinnerType==2||subItem.ContainDinnerType==3)?true:false" v-model='subItem.DinnerCostPrice' class="w70" @keyup.native="checkPrice(subItem,'DinnerCostPrice'),getchange(1)"></el-input> </template> </td> <td> <template v-for="(scenicItem,scenicIndex) in subItem.ScenicList"> <template v-if="scenicIndex==0"> <el-select :key="`d_`+subIndex+`_sn_`+scenicIndex" filterable remote :remote-method="(query) => remoteSearchTicket(query, scenicItem)" :loading="loading" @change="changeTicket(scenicItem)" v-model="scenicItem.TicketId" value-key="TicketId"> <el-option :label="$t('pub.unlimitedSel')" :value='defaultSelect'></el-option> <el-option v-for="(x) in scenicItem.TicketSourceList" :key="x.TicketId" :label="x.TicketName" :value='x.TicketId'> </el-option> </el-select> </template> <template v-else-if="scenicIndex!=0 && subItem.ScenicList[scenicIndex-1].TicketId>0"> <el-select :key="`d_`+subIndex+`_sn_`+scenicIndex" filterable remote :remote-method="(query) => remoteSearchTicket(query, scenicItem)" :loading="loading" @change="changeTicket(scenicItem)" v-model="scenicItem.TicketId" value-key="TicketId"> <el-option :label="$t('pub.unlimitedSel')" :value='defaultSelect'></el-option> <el-option v-for="(x) in scenicItem.TicketSourceList" :key="x.TicketId" :label="x.TicketName" :value='x.TicketId'> </el-option> </el-select> </template> </template> </td> <td> <template v-for="(scenicItem,scenicIndex) in subItem.ScenicList"> <template v-if="scenicIndex==0"> <el-input :key="`d_`+subIndex+`_sc_`+scenicIndex" type='text' v-model="scenicItem.TicketCostPrice" class="w70" @keyup.native="checkPrice(scenicItem,'TicketCostPrice'),getchange(1)" :placeholder="$t('objFill.v101.jindianjiag')"> </el-input> </template> <template v-else-if="scenicIndex!=0 && subItem.ScenicList[scenicIndex-1].TicketId>0"> <el-input :key="`d_`+subIndex+`_sc_`+scenicIndex" type='text' v-model="scenicItem.TicketCostPrice" class="w70" @keyup.native="checkPrice(scenicItem,'TicketCostPrice'),getchange(1)" :placeholder="$t('objFill.v101.jindianjiag')"> </el-input> </template> </template> </td> <td> <el-input type="text" v-model='subItem.OtherName' class="w70" :placeholder="$t('objFill.v101.zazhiminc')"></el-input> </td> <td> <el-input type="text" v-model='subItem.OtherPrice' class="w70" @keyup.native="checkPrice(subItem,'OtherPrice'),getchange(1)"></el-input> </td> </tr> </template> <tr> <td colspan="3" class="CP_ComTitle2 CostcomCenter"> {{$t('objFill.waibixj')}} </td> <!--酒店小计--> <td colspan="2"> {{$t('objFill.jiudianxj')}}: {{getDayXiaoJi(1,1)}} </td> <!--车资小计--> <td colspan="2"> {{$t('objFill.chezhixj')}}: {{getDayXiaoJi(2,1)}} </td> <!--餐小计--> <td colspan="2"> {{$t('objFill.canxj')}}: {{getDayXiaoJi(4,1)}} </td> <!--门票小计--> <td colspan="2"> {{$t('objFill.menpiaoxj')}}: {{getDayXiaoJi(3,1)}} </td> <!--其它费用小计--> <td colspan="2"> {{$t('objFill.zazhixj')}}: {{getDayXiaoJi(9,1)}} </td> </tr> <tr> <td colspan="3" class="CP_ComTitle2 CostcomCenter"> {{$t('objFill.renmingbxj')}} </td> <!--酒店小计--> <td colspan="2"> {{$t('objFill.jiudianxj')}}: {{getDayXiaoJi(1,2)}} </td> <!--车资小计--> <td colspan="2"> {{$t('objFill.chezhixj')}}:{{getDayXiaoJi(2,2)}} </td> <!--餐小计--> <td colspan="2"> {{$t('objFill.canxj')}}: {{getDayXiaoJi(4,2)}} </td> <!--门票小计--> <td colspan="2"> {{$t('objFill.menpiaoxj')}}: {{getDayXiaoJi(3,2)}} </td> <!--其它费用小计--> <td colspan="2"> {{$t('objFill.zazhixj')}}: {{getDayXiaoJi(9,2)}} </td> </tr> <tr> <td colspan="13">{{$t('objFill.qitacbrmb')}}</td> </tr> <tr> <td colspan="2"> <el-form-item :label="$t('active.cl_jipiao')" label-position="right"> <el-input type="text" v-model='otherPrice.AirTicketMoeny' class="w100" @keyup.native="checkPrice(otherPrice,'AirTicketMoeny'),getchange()"></el-input> </el-form-item> </td> <td> <el-form-item :label="$t('objFill.zhongduanjp')"> <el-input type="text" v-model='otherPrice.InlandAirTicketMoney' class="w100" @keyup.native="checkPrice(otherPrice,'InlandAirTicketMoney'),getchange()"></el-input> </el-form-item> </td> <td colspan="2"> <el-form-item :label="$t('objFill.v101.dmc.meildhvpmr')"> <el-input type="text" v-model='otherPrice.InlandTrainTicketMoney' class="w100" @keyup.native="checkPrice(otherPrice,'InlandTrainTicketMoney'),getchange()"></el-input> </el-form-item> </td> <td colspan="2"> <el-form-item :label="$t('objFill.shuijin')"> <el-input type="text" v-model='teamPrice.TaxPrice' class="w100" @keyup.native="checkPrice(teamPrice,'TaxPrice'),getchange()"></el-input> </el-form-item> </td> <td colspan="2"> <el-form-item :label="$t('salesModule.Union')"> <el-input type="text" v-model='teamPrice.UnionPrice' class="w100" @keyup.native="checkPrice(teamPrice,'UnionPrice'),getchange()"></el-input> </el-form-item> </td> <td colspan="4" rowspan="2"> {{$t('objFill.xiaojijpzdsjly')}}: <br /> {{getCostTotalMoney()}} </td> </tr> <tr> <td colspan="2"> <el-form-item :label="$t('objFill.lingduidyft')"> <el-input type='text' class="w100" v-model="otherPrice.AirTicketShareMoney" @keyup.native="checkPrice(otherPrice,'AirTicketShareMoney'),getchange()"></el-input> </el-form-item> </td> <td> <el-form-item :label="$t('objFill.guoye')"> <el-input type="text" v-model='teamPrice.NightPrice' class="w100" @keyup.native="checkPrice(teamPrice,'NightPrice'),getchange()"></el-input> </el-form-item> </td> <td colspan="2"> <el-form-item :label="$t('active.cl_qianzheng')"> <el-input type="text" v-model='teamPrice.VisaPrice' class="w100" @keyup.native="checkPrice(teamPrice,'VisaPrice'),getchange()"></el-input> </el-form-item> </td> <td colspan="2"> <el-form-item :label="$t('Operation.Op_insurance')"> <el-input type='text' class="w100" v-model="otherPrice.SafeMoney" @keyup.native="checkPrice(otherPrice,'SafeMoney'),getchange()"></el-input> </el-form-item> </td> <td colspan="2"> <el-form-item :label="`KB`+$t('objFill.rentoufei')"> <el-input type="text" v-model='otherPrice.KBMoney' class="w100" @keyup.native="checkPrice(otherPrice,'KBMoney',true),getchange()"></el-input> </el-form-item> </td> </tr> <tr> <td colspan="13"></td> </tr> <tr> <td colspan="2"> <el-form-item :label="$t('Operation.Op_baby')"> <el-input v-model="teamPrice.BabyPrice" @keyup.native="checkInteger(teamPrice,'BabyPrice')" class="w70"> </el-input> </el-form-item> </td> <td> <el-form-item :label="$t('objFill.dandijcb')"> <el-input v-model="teamPrice.SingleDMCPrice" @keyup.native="checkInteger(teamPrice,'SingleDMCPrice')" @blur="getchange()" class="w70"> </el-input> </el-form-item> </td> <td colspan="2"> <el-form-item :label="$t('Operation.Op_childNobed')"> <el-input placeholder="" v-model="teamPrice.ChildNoNeedPrice" @keyup.native="checkInteger(teamPrice,'ChildNoNeedPrice')" class="w70"> </el-input> </el-form-item> </td> <td colspan="2"> <el-form-item :label="$t('Operation.Op_childBed')"> <el-input placeholder="" v-model="teamPrice.ChildNeedPrice" @keyup.native="checkInteger(teamPrice,'ChildNeedPrice')" class="w70"> </el-input> </el-form-item> </td> <td colspan="2"> <el-form-item :label="$t('Operation.Op_singleRoomcha')"> <el-input placeholder="" v-model="teamPrice.SingleRoomPrice" @keyup.native="checkPrice(teamPrice,'SingleRoomPrice')" class="w70"> </el-input> </el-form-item> </td> <td colspan="4"> <el-form-item :label="$t('objFill.dandijjg')"> <el-input placeholder="" v-model="teamPrice.SingleDMCTCPrice" @keyup.native="checkPrice(teamPrice,'SingleDMCTCPrice')" class="w70"> </el-input> </el-form-item> </td> </tr> <tr> <td colspan="2"> <el-form-item :label="$t('Operation.Op_zhu')+`OP`"> <el-select class="w100" v-model="postConfig.OPId" :placeholder="$t('pub.pleaseSel')" filterable> <el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option> <el-option v-for="(item,index) in EmployeeList" :label="item.EmName" :value="item.EmployeeId" :key="index"> </el-option> </el-select> </el-form-item> <span style="color:red">{{$t('objFill.v101.guanltcqzqtx')}}</span> </td> <td colspan="3"> <el-form-item :label="$t('objFill.zhuli')+`OP`"> <el-select class="w250" v-model="postConfig.AssistantList" :placeholder="$t('pub.pleaseSel')" filterable multiple> <el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option> <el-option v-for="(item,index) in EmployeeList" :label="item.EmName" :value="item.EmployeeId" :key="index"></el-option> </el-select> </el-form-item> <span style="color:red">{{$t('objFill.v101.meigydddpeiz')}}</span> </td> <td colspan="2"> <el-form-item :label="$t('fnc.fkfangshi')"> <el-select class="w70" v-model="postConfig.SaleOfferPayType" :placeholder="$t('pub.pleaseSel')" filterable> <el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option> <el-option v-for="item in payTypeList" :label='item.label' :value='item.value' :key='item.value'> </el-option> </el-select> </el-form-item> </td> <td colspan="6"> {{$t('objFill.fj')}}: <el-upload v-if="!teamPrice.ContractArray || !teamPrice.ContractArray.length" class="upload-demo" style="display:inline-block;position:relative;top:-1px;left:3px;" :http-request="UploadAttachment" :show-file-list="false" action=""> <el-button size="small" type="primary">{{$t('objFill.bjdfj')}}</el-button> </el-upload> <template v-if="teamPrice.ContractArray&& teamPrice.ContractArray.length>0"> <template v-for="(subItem,subIndex) in teamPrice.ContractArray"> <a style="margin-left:20px;color:blue;cursor:pointer;" target="_blank" :key="subIndex" @click="downloadFile(subItem.Url,subItem.Name)">{{subItem.Name}}</a> <a :key="subIndex+1000" style="margin-left:20px;color:blue;cursor:pointer;" @click="DeleteFile(subIndex)">{{$t('system.table_delete')}}</a> </template> </template> </td> </tr> <tr> <td colspan="13"></td> </tr> <tfoot> <tr> <td> </td> <td> {{$t('admin.admin_personNumber')}} </td> <td colspan="2"> {{$t('objFill.v101.jiudccmzji')}} </td> <td> {{$t('objFill.dijiechengben')}}<br />({{$t('fnc.waibi')}}) </td> <td> {{$t('objFill.dijiechengben')}}<br />({{$t('fnc.a_rminbi')}}) </td> <td colspan="2"> {{$t('hotel.hotel_cost')}}<br /> [{{$t('objFill.v101.dandjqtcbrmbxj')}}] </td> <td> {{$t('objFill.tongyexsjg')}} <br /> <!--台湾印象和日本印象--> <template v-if="postConfig.OutBranchId==1218||postConfig.OutBranchId==1220"> ({{$t('objFill.ribi')}}) </template> <!--印尼印象--> <template v-else-if="postConfig.OutBranchId==1252"> ({{$t('fnc.a_ynd')}}) </template> <template v-else>({{$t('fnc.a_rminbi')}}) </template> </td> <td> {{$t('objFill.zhikexsjg')}} <br /> <!--台湾印象和日本印象--> <template v-if="postConfig.OutBranchId==1218||postConfig.OutBranchId==1220"> ({{$t('objFill.ribi')}}) </template> <!--印尼印象--> <template v-else-if="postConfig.OutBranchId==1252"> ({{$t('fnc.a_ynd')}}) </template> <template v-else>({{$t('fnc.a_rminbi')}}) </template> </td> <td> <!--台湾印象和日本印象--> <template v-if="postConfig.OutBranchId==1218||postConfig.OutBranchId==1220"> <template v-if="postConfig.LineId==14||postConfig.LineId==118"> {{$t('Airticket.Air_salesPrice')}} <br />({{$t('objFill.ribi')}}) </template> </template> </td> <td colspan="2"> {{$t('fnc.beizhu')}} </td> </tr> <!--已填写人数--> <template v-if="CostNumberList&&CostNumberList.length>0"> <template v-for="(subItem,subIndex) in CostNumberList"> <tr :key="subIndex"> <td v-if="subIndex==0" :rowspan="CostNumberList.length"> {{$t('fnc.a_heji')}} </td> <td> {{subItem.PeopleNumber}} </td> <td colspan="2"> {{getDayXiaoJi(1,1)}}({{$t('objFill.jiu')}})+ {{(getDayXiaoJi(2,1)/subItem.PeopleNumber).toFixed(2)}}({{$t('objFill.v101.chezczcyrs')}})+{{getDayXiaoJi(4,1)}}({{$t('objFill.can')}})+{{getDayXiaoJi(3,1)}}({{$t('scen.sc_piao')}}) +{{(getDayXiaoJi(9,1)/subItem.PeopleNumber).toFixed(2)}}({{$t('objFill.v101.zazhizzzcyrsK')}}) </td> <td> {{getLocalJpyTotalMoney(subItem.PeopleNumber)}} </td> <td> <template v-if="teamPrice&&teamPrice.SingleDMCPrice&&teamPrice.SingleDMCPrice>0"> {{teamPrice.SingleDMCPrice}} </template> <template v-else-if="postConfig.LineId==14||postConfig.LineId==118"> {{getLocalTotalMoney(subItem.PeopleNumber)}} </template> <template v-else-if="postConfig.LineId==168"> {{getLocalTotalMoney(subItem.PeopleNumber)}} </template> <template v-else> {{subItem.SubtotalMoney}} </template> </td> <td colspan="2"> {{subItem.TotalMoney}} </td> <td> <el-input type='text' class="w120" v-model="subItem.SalePrice" @keyup.native="checkPrice(subItem,'SalePrice')" maxlength="8"></el-input> </td> <td> <el-input type='text' class="w120" v-model="subItem.B2CSalePrice" @keyup.native="checkPrice(subItem,'B2CSalePrice')" maxlength="8"></el-input> </td> <td> <!--台湾印象和日本印象--> <template v-if="postConfig.OutBranchId==1218||postConfig.OutBranchId==1220"> <el-input v-if="postConfig.LineId==14||postConfig.LineId==118" type='text' class="w70" v-model="subItem.JPYSalePrice" @keyup.native="checkPrice(subItem,'JPYSalePrice')" maxlength="8"> </el-input> </template> </td> <td colspan="2"> <el-input type="textarea" v-model="subItem.CostRemark"></el-input> </td> </tr> </template> </template> </tfoot> </table> <div class="Cost_Line"> </div> </el-form> </div> <el-dialog custom-class='w750' :title="dialogDiningTitle" :visible.sync="isShowDiningDig" center> <travelDinner v-if="isShowDiningDig" :qMsg="qMsg" @chooseDinner="chooseDinner" @closeDinner="closeDialog" :otherDinner="otherDinner" :breakFirstList="breakFirstList"></travelDinner> </el-dialog> </div> </template> <script> import travelDinner from '@/components/commonPage/travelDinner' export default { props: ["postConfig", "AllCurrencyList"], watch: { }, data() { return { dayCostPriceList: this.postConfig.OfferArray[0].dayCostPriceList, otherPrice: this.postConfig.OfferArray[0].otherPrice, teamPrice: this.postConfig.OfferArray[0].teamPrice, CostNumberList: this.postConfig.OfferArray[0].CostNumberList, CurrencyNumberListExt: this.postConfig.OfferArray[0].CurrencyNumberListExt, CostCurrencyList: this.postConfig.OfferArray[0].CostCurrencyList, //下拉框默认值 defaultSelect: 0, //币种下拉 currencyType: "", queryMsg: { canEdit: true, IsDefault: false, //汇率输入 RateInput: "", //人数 PeopleNumber: "" }, priceObj: { priceNum: "", //人数 }, payTypeList: [{ value: 1, label: '现金' }, { value: 2, label: '汇款' }, { value: 3, label: '外站自理' }], loading: false, EmployeeList: [], //员工列表 dialogDiningTitle: this.$t('objFill.v101.myOrdersAllType.xuanzhect'), qMsg: { Country: 651, DinnerType: 0, //1-早餐,2-午餐,3-晚餐 }, clickDinner: {}, isShowDiningDig: false, //是否显示选择餐弹窗 breakFirstList: [], //午餐、晚餐默认类型 otherDinner: [], //早餐默认类型 } }, components: { travelDinner: travelDinner, }, methods: { changeTicket(subItem) { if (subItem.TicketSourceList && subItem.TicketSourceList.length > 0) { var changeObj = subItem.TicketSourceList.find(qitem => qitem.TicketId == subItem.TicketId); if (changeObj) { subItem.TicketName = changeObj.TicketName; } } }, getHotelInit() { setTimeout(() => { if (this.dayCostPriceList && this.dayCostPriceList.length > 0) { let arrList = function (list) { list.forEach(x => { x.HotelList = []; x.LunchList = []; x.DinnerList = []; x.TicketSourceList = []; }) } arrList(this.dayCostPriceList) for (let i = 0; i < this.dayCostPriceList.length; i++) { if (this.dayCostPriceList[i].HotelName != '') { this.initHotel(this.dayCostPriceList[i].HotelName, this.dayCostPriceList[i], i) } } } }, 100); }, refreshPage(rType) { //刷新页面 this.isShowDiningDig = false; this.clickDinner = {}; this.qMsg.DinnerType = 0; this.changMsg.isShowChangeOffer = false; this.changMsg.EditType = 0; this.changMsg.DayNum = 0; if (rType && rType == 1) { this.$emit("success"); } }, //关闭弹窗 closeDialog() { this.isShowDiningDig = false; this.clickDinner = {}; this.qMsg.DinnerType = 0; this.changMsg.isShowChangeOffer = false; this.changMsg.EditType = 0; this.changMsg.DayNum = 0; }, chooseDinner(obj) { if (this.qMsg.DinnerType == 1) { this.clickDinner.BreakfastName = obj.DiningName; } else if (this.qMsg.DinnerType == 2) { this.clickDinner.LunchName = obj.DiningName; this.clickDinner.LunchCostPrice = obj.UnitPrice; this.clickDinner.LunchIds = obj.DiningId; } else if (this.qMsg.DinnerType == 3) { this.clickDinner.DinnerName = obj.DiningName; this.clickDinner.DinnerCostPrice = obj.UnitPrice; this.clickDinner.DinnerIds = obj.DiningId; } this.isShowDiningDig = false; this.clickDinner = {}; this.qMsg.DinnerType = 0; }, showDiningDig(item, dinnerType) { this.qMsg.DinnerType = dinnerType; this.clickDinner = item; this.isShowDiningDig = true; }, GetDayStr(dayNum) { var str = ""; if (this.postConfig.OutDateTime && this.postConfig.OutDateTime != '') { var dateFormat = new Date(this.postConfig.OutDateTime); dateFormat = dateFormat.setDate(dateFormat.getDate() + dayNum); dateFormat = new Date(dateFormat); let y = dateFormat.getFullYear() let m = (dateFormat.getMonth() + 1).toString().padStart(2, '0') let d = dateFormat.getDate().toString().padStart(2, '0') str = `${y}-${m}-${d}`; } return str; }, // 获取酒店名称 getHotel(subItem, HotelId) { subItem.HotelList.forEach(x => { if (x.ID == HotelId) { subItem.HotelName = x.Name } }) this.$forceUpdate() }, remoteSearchAdGroup(query, subItem) { if (query !== '') { this.loading = true; this.initHotel(query, subItem) } else { subItem.HotelList = [] } }, //景点搜索 remoteSearchTicket(query, subItem) { if (query !== '') { this.loading = true; this.getTicketQuery(query, subItem) } else { subItem.TicketSourceList = []; } }, //获取景点列表 getTicketQuery(keyWords, subItem) { this.apipost( "ticketcoupons_post_GetOfferTicketCouponsList", { Name: keyWords }, res => { this.loading = false if (res.data.resultCode == 1) { subItem.TicketSourceList = res.data.data this.$forceUpdate() } }, null ); }, // 获取餐厅名称 getDinner(subItem, dinnerType, dinnerIds) { if (dinnerType == 2) { subItem.LunchList.forEach(x => { if (x.ID == dinnerIds) { subItem.LunchName = x.Name; subItem.LunchCostPrice = x.UnitPrice; } }) } else if (dinnerType == 3) { subItem.DinnerList.forEach(x => { if (x.ID == dinnerIds) { subItem.DinnerName = x.Name; subItem.DinnerCostPrice = x.UnitPrice; } }) } this.$forceUpdate() }, //初始化酒店列表 initHotel(query, subItem, day) { this.apipost( "hotel_post_GetList", { Name: query }, res => { this.loading = false if (res.data.resultCode == 1) { if (day == null) { for (let i = 0; i < this.dayCostPriceList.length; i++) { if (!this.dayCostPriceList[i].HotelList || this.dayCostPriceList[i].HotelList.length == 0) { this.dayCostPriceList[i].HotelList = res.data.data } } if (subItem && (subItem.HotelList || subItem.HotelList.length > 0)) { subItem.HotelList = res.data.data } } else if (day != null) { this.dayCostPriceList[day].HotelList = res.data.data } this.$forceUpdate() } }, null ); }, //删除文件 DeleteFile(subIndex) { this.teamPrice.ContractArray.splice(subIndex, 1); }, //下载文件 downloadFile(fileUrl, fileName) { const link = document.createElement('a'); link.href = fileUrl; link.download = fileName; document.body.appendChild(link); link.click(); }, UploadAttachment(file) { //上传 let newArr = []; newArr.push(file.file) let path = "/Upload/Temporary/" this.$message.info(this.$t('tips.shangchuanzhong')) this.UploadSelfFileT(path, newArr, x => { var newUrl = this.domainManager().ViittoFileUrl + x.data.FilePath; this.teamPrice.ContractArray.push({ Name: x.data.SourceFileName, Url: newUrl }); this.teamPrice.ContractUrl = newUrl; this.Success(this.$t('tips.scchenggong')) }); }, //含餐类型切换 DinnerTypeChange(subItem) { switch (subItem.ContainDinnerType) { //含早餐 case 1: subItem.BreakfastCostPrice = 0; break; //含晚餐 case 2: subItem.DinnerCostPrice = 0; break; case 3: subItem.BreakfastCostPrice = 0; subItem.DinnerCostPrice = 0; break; } }, //每天小计 getDayXiaoJi(type, currencyType) { var xiaoJi = 0; if (this.dayCostPriceList && this.dayCostPriceList.length > 0) { this.dayCostPriceList.forEach(item => { var currencyRate = 1; if (currencyType == 2) { currencyRate = this.getCurrencyMoney(item.CurrencyId); } //酒店 if (type == 1) { xiaoJi += Number(item.HotelCostPrice) * Number(currencyRate); } //车 if (type == 2) { xiaoJi += Number(item.BusCostPrice) * Number(currencyRate); //过路费 xiaoJi += Number(item.PassFee) * Number(currencyRate); } //景点 if (type == 3) { if (item.ScenicList && item.ScenicList.length > 0) { item.ScenicList.forEach(sItem => { if (sItem.TicketName != '' || sItem.TicketId > 0) { xiaoJi += Number(sItem.TicketCostPrice) * Number(currencyRate); } }) } //xiaoJi += Number(item.ScenicCostPrice) * Number(currencyRate); } //餐合计 if (type == 4) { xiaoJi += Number(item.BreakfastCostPrice) * Number(currencyRate); xiaoJi += Number(item.DinnerCostPrice) * Number(currencyRate); xiaoJi += Number(item.LunchCostPrice) * Number(currencyRate); } //回佣 if (type == 8) { xiaoJi += Number(item.RebatePrice) * Number(currencyRate); } //杂费 if (type == 9) { xiaoJi += Number(item.OtherPrice) * Number(currencyRate); } }); } return xiaoJi.toFixed(0); }, //获取汇率 getCurrencyMoney(currencyId) { let currency = 1; if (this.CostCurrencyList && this.CostCurrencyList.length > 0) { this.CostCurrencyList.forEach(x => { if (x.CurrencyId == currencyId) { currency = x.ExchangeRate; } }); } return currency; }, //获取币种名称 getCurrencyName(currencyId) { let CurrencyName = ""; if (this.CostCurrencyList && this.CostCurrencyList.length > 1) { this.CostCurrencyList.forEach(x => { if (x.CurrencyId == currencyId) { CurrencyName = x.CurrencyName; } }); } return CurrencyName; }, //判断币种是否相等 checkExists(CurrencyId) { var flag = false; if (this.CurrencyNumberListExt && this.CurrencyNumberListExt.length > 0) { this.CurrencyNumberListExt.forEach(item => { if (!flag && item.Key == CurrencyId) { flag = true; } }); } return flag; }, //其它成本价格 getCostTotalMoney() { //机票+中段机票+火车票+税金+领队导游分摊+联运+过夜+保险 let totalMoney = this.getConvertMoney(this.otherPrice.AirTicketMoeny) + this.getConvertMoney(this.otherPrice.InlandAirTicketMoney) + this.getConvertMoney(this.teamPrice.TaxPrice) + this.getConvertMoney(this.teamPrice.UnionPrice) + this.getConvertMoney(this.otherPrice.AirTicketShareMoney) + this.getConvertMoney(this.teamPrice.NightPrice) + this.getConvertMoney(this.teamPrice.VisaPrice) + this.getConvertMoney(this.otherPrice.InlandTrainTicketMoney) + this.getConvertMoney(this.otherPrice.SafeMoney) - this.getConvertMoney(this.otherPrice.KBMoney) return totalMoney; }, //获取币种对应 的人数报价 getCurrencyNumberList(CurrencyId) { let currencyNumberList = []; let flag = false; if (this.CurrencyNumberListExt && this.CurrencyNumberListExt.length > 0) { this.CurrencyNumberListExt.forEach(item => { if (!flag && item.Key == CurrencyId) { flag = true; currencyNumberList = item.currencyNumberList; } }); } return currencyNumberList; }, //添加币种 addCurrency() { var currencyId = this.currencyType; var ckedName; var ckedRate = this.queryMsg.RateInput; if (currencyId == "") { this.Info(this.$t('rule.qxzbzhong')); return; } if (ckedRate == "") { this.Info(this.$t('rule.qsrhuilv')); return; } this.AllCurrencyList.forEach(x => { if (currencyId == x.ID) { ckedName = x.Name; } }); if ( this.$tripUtils.isInObjArr( this.CostCurrencyList, "CurrencyId", currencyId ) ) { this.Info(this.$t('objFill.v101.dmc.bizyjcz')); return; } var CurObj = this.$tripUtils.CostCurrency(); CurObj.CurrencyName = ckedName; CurObj.ExchangeRate = ckedRate; CurObj.CurrencyId = currencyId; this.CostCurrencyList.push(CurObj); this.currencyType = ""; this.queryMsg.RateInput = ""; let currencyNumberItem = { Key: currencyId, currencyNumberList: [] }; if (this.CurrencyNumberListExt.length > 0) { if ( this.CurrencyNumberListExt[0].currencyNumberList .length > 0 ) { this.CurrencyNumberListExt[0].currencyNumberList.forEach( x => { let tempData = JSON.parse(JSON.stringify(x)); tempData.CurrencyId = currencyId; tempData.Money = 0.0; currencyNumberItem.currencyNumberList.push(tempData); } ); } } this.CurrencyNumberListExt.push(currencyNumberItem); //默认添加币种第一个币种 if (this.dayCostPriceList && this.dayCostPriceList.length > 0) { this.dayCostPriceList.forEach(subItem => { subItem.CurrencyId = currencyId; }) } }, //添加人数费用 addPeoNunber() { var PeopleNumber = this.priceObj.priceNum; if (PeopleNumber == "") { this.Info(this.$t('objFill.v101.SalesModule.col2.t4')); return; } if ( this.$tripUtils.isInObjArr( this.CostNumberList, "PeopleNumber", PeopleNumber ) ) { this.Info(this.$t('objFill.v101.dmc.renshuyjcz')); return; } var CostNumberObj = this.$tripUtils.CostNumber(); CostNumberObj.PeopleNumber = PeopleNumber; this.CostNumberList.push(CostNumberObj); this.CurrencyNumberListExt.forEach(x => { var CurrencyNumberObj = this.$tripUtils.CurrencyNumber(); CurrencyNumberObj.CurrencyId = x.Key; CurrencyNumberObj.PeopleNumber = PeopleNumber; x.currencyNumberList.push(CurrencyNumberObj); }); this.priceObj.priceNum = ""; this.queryMsg.PeopleNumber = ""; this.queryMsg.Money = ""; this.shortPeopleNumber(); }, //删除币种 DeleteCurrency(index) { this.CostCurrencyList.splice(index, 1); }, //删除人数 DeletePNumber(index) { this.CostNumberList.splice(index, 1); }, //人数排序 shortPeopleNumber() { this.CurrencyNumberListExt.forEach(x => { x.currencyNumberList.sort( this.$commonUtils.createComprisonFunction("PeopleNumber") ); }); this.CostNumberList.sort( this.$commonUtils.createComprisonFunction("PeopleNumber") ); }, //币种下拉获取汇率 getRate(ID) { this.AllCurrencyList.forEach(x => { if (x.ID == ID) { this.queryMsg.RateInput = x.CurrentRate; } }); }, //计算总价 getSubtotalMoney() { let that = this; if (this.CostNumberList && this.CostNumberList.length > 0) { this.CostNumberList.forEach(x => { //房餐车景点价格 var trip = Number(that.getLocalTotalMoney(x.PeopleNumber)); var jpyTrip = Number(that.getLocalJpyTotalMoney(x.PeopleNumber)); //其他价格 var otherPrice = Number(that.getCostTotalMoney()); var jpyotherPrice = 0; var SingleDMCPrice = 0; if (that.teamPrice && that.teamPrice.SingleDMCPrice) { SingleDMCPrice = Number(that.teamPrice.SingleDMCPrice); } x.TotalMoney = (otherPrice + SingleDMCPrice).toFixed(0); x.JPYTotalMoney = (jpyTrip + jpyotherPrice).toFixed(2); }); } }, //价格转换器 getConvertMoney(value) { if (value === "" || value === undefined || value === null) { value = 0.0; } return parseFloat(value); }, //获取地接项目(人民币) getLocalTotalMoney(PeopleNumber) { let totalMoney = 0.0; if (PeopleNumber <= 0) { PeopleNumber = 1; } var hotelPrice = Number(this.getDayXiaoJi(1, 2)); //酒店费用 var sencePrice = Number(this.getDayXiaoJi(3, 2)); //景点费用 var canPrice = Number(this.getDayXiaoJi(4, 2)); //餐 var otherPrice = Number(this.getDayXiaoJi(9, 2)) / PeopleNumber; //其它费用 var busFee = Number(this.getDayXiaoJi(2, 2)) / PeopleNumber; //车费 totalMoney = busFee + hotelPrice + sencePrice + canPrice + otherPrice; totalMoney = totalMoney.toFixed(2); return totalMoney; }, //获取地接项目报价(日元) getLocalJpyTotalMoney(PeopleNumber) { if (PeopleNumber <= 0) { PeopleNumber = 1; } let totalMoney = 0.0; var busFee = Number(this.getDayXiaoJi(2, 1)) / PeopleNumber; var hotelPrice = Number(this.getDayXiaoJi(1, 1)); //酒店费用 var sencePrice = Number(this.getDayXiaoJi(3, 1)); //景点费用 var canPrice = Number(this.getDayXiaoJi(4, 1)); //早餐 var otherPrice = Number(this.getDayXiaoJi(9, 1)) / PeopleNumber; //其它费用 totalMoney = busFee + hotelPrice + sencePrice + canPrice + otherPrice; return totalMoney.toFixed(2); }, getchange(type) { this.getSubtotalMoney(); var that = this; var tempPrice = 0; if (this.CostNumberList && this.CostNumberList.length > 0) { this.CostNumberList.forEach(x => { //房餐车景点价格 tempPrice = Number(that.getLocalTotalMoney(x.PeopleNumber)); }); } if (this.teamPrice.SingleDMCPrice <= 0 || (type && type == 1)) { this.teamPrice.SingleDMCPrice = tempPrice.toFixed(0); } }, //员工列表 getEmployeeList() { let userInfo = this.getLocalStorage(); let msg = { GroupId: userInfo.RB_Group_id, BranchId: "-1", DepartmentId: "-1", PostId: "-1", IsLeave: "0" }; this.apipost( "admin_get_EmployeeGetList", msg, res => { if (res.data.resultCode == 1) { this.EmployeeList = res.data.data; } } ); }, //获取配置餐厅信息 getConfigDinnerList() { this.apipost( "travel_get_GetConfigDinnerList", {}, res => { if (res.data.resultCode == 1) { this.breakFirstList = res.data.data.breakFirstList; this.otherDinner = res.data.data.otherDinner; } }, err => {} ); } }, mounted() { this.getHotelInit(); this.getSubtotalMoney(); }, created() { this.getEmployeeList(); this.getConfigDinnerList(); } }; </script>