Commit 597bb5a6 authored by 华国豪's avatar 华国豪 🙄

1

parents 9754cc83 e64c4054
<style>
@import url('../../assets/css/domestic/OrderToday.css');
@import url('../../assets/css/domestic/OrderToday.css');
</style>
<template>
<div class="flexOne page_OrderToday page_OrderDetails">
......@@ -13,12 +14,9 @@
<li>
<span>
<em>航空公司</em>
<el-select filterable @change="flight_post_GetAirportNameList(msg.AirlineId)" v-model='msg.AirlineId' >
<el-select filterable @change="flight_post_GetAirportNameList(msg.AirlineId)" v-model='msg.AirlineId'>
<el-option label='不限' value=''></el-option>
<el-option v-for='item in airlineList'
:label='item.AlName'
:value='item.AirLineId'
:key='item.AirLineId'>
<el-option v-for='item in airlineList' :label='item.AlName' :value='item.AirLineId' :key='item.AirLineId'>
</el-option>
</el-select>
</span>
......@@ -27,9 +25,7 @@
<span>
<em>航班号</em>
<el-select filterable v-model='msg.FlightNo'>
<el-option v-for='item in AirportNameList'
:label='item.Flight_number'
:value='item.Flight_number'
<el-option v-for='item in AirportNameList' :label='item.Flight_number' :value='item.Flight_number'
:key='item.Flight_number'>
</el-option>
</el-select>
......@@ -46,7 +42,7 @@
</span>
</li>
<li>
<input type="button" class="hollowFixedBtn" value="查询" @click="resetPageIndex(),getList(1)"/>
<input type="button" class="hollowFixedBtn" value="查询" @click="resetPageIndex(),getList(1)" />
</li>
</ul>
</div>
......@@ -62,22 +58,17 @@
<th>人数</th>
<th>应收金额</th>
<th>成本</th>
<!-- <th>实收</th> -->
<th>客户名称</th>
<th>行程时间</th>
<th>航空公司</th>
<th>航班</th>
<th>航段</th>
<th>操作人</th>
<!-- <th>操作</th> -->
</tr>
<tr v-for="(item,index) in DataList.list" :key="index">
<td>{{item.ID}}</td>
<td class="_hover">
<el-popover
placement="bottom"
width="220"
trigger="click">
<el-popover placement="bottom" width="220" trigger="click">
<table class="add_table singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0">
<tr>
<th width="70"></th>
......@@ -100,10 +91,7 @@
</el-popover>
</td>
<td class="_hover">
<el-popover
placement="bottom"
width="220"
trigger="click">
<el-popover placement="bottom" width="220" trigger="click">
<table class="add_table singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0">
<tr>
<th width="70"></th>
......@@ -126,10 +114,7 @@
</el-popover>
</td>
<td class="_hover">
<el-popover
placement="bottom"
width="220"
trigger="click">
<el-popover placement="bottom" width="220" trigger="click">
<table class="add_table singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0">
<tr>
<th width="70"></th>
......@@ -151,42 +136,10 @@
<span slot="reference">¥{{item.TotalCost}}</span>
</el-popover>
</td>
<!-- <td class="_hover" >
<el-popover
placement="bottom"
width="300"
trigger="click">
<table class="add_table singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0" v-loading="PayInfoLding">
<tr>
<th>单据号</th>
<th>金额</th>
<th>类型</th>
<th>状态</th>
</tr>
<template v-if="PayInfoS&&PayInfoS.length>0">
<tr v-for="(son,sIndex) in PayInfoS" :key="sIndex">
<td @click="goFinanceUrl(son.FrID)" class="cursorpointer">{{son.FrID}}</td>
<td>{{son.PayMoney}}</td>
<td>{{son.TypeName}}</td>
<td>{{son.StatusName}}</td>
</tr>
</template>
<template v-else>
<tr>
<td colspan="4" class="text_alcen">暂无数据</td>
</tr>
</template>
</table>
<span :class="item.IncomeMoney>0?'_color_red':''" slot="reference" @click="getInfo(item.ID)">{{item.IncomeMoney}}</span>
</el-popover>
</td> -->
<td>{{item.ClientName}}</td>
<td>{{item.TravelTime}}</td>
<td colspan="3" class="_hover">
<el-popover
placement="bottom"
width="450"
trigger="click">
<el-popover placement="bottom" width="450" trigger="click">
<table class="add_table singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0">
<tr>
<th>航空公司</th>
......@@ -199,28 +152,19 @@
<td>{{i.Leg}}</td>
</tr>
</table>
<span slot="reference">{{item.FlightList[0].AirlineName+' — '+item.FlightList[0].FlightNo+' — '+item.FlightList[0].Leg}}</span>
<span
slot="reference">{{item.FlightList[0].AirlineName+' — '+item.FlightList[0].FlightNo+' — '+item.FlightList[0].Leg}}</span>
</el-popover>
</td>
<td>{{item.EmName}}</td>
<!-- <td>
<el-tooltip class="item" effect="dark" content="收款" placement="top">
<el-button type="primary" class="_bth_bg_bl" @click="goUrl(item,1)" circle>收</el-button>
</el-tooltip>
</td> -->
</tr>
</table>
<div class="noData" v-show="noData">
{{$t('system.content_noData')}}
</div>
<div>
<el-pagination
background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
layout="total,prev, pager, next, jumper"
:page-size=msg.pageSize
:total=total>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size=msg.pageSize :total=total>
</el-pagination>
</div>
</div>
......@@ -228,56 +172,58 @@
</template>
<script>
export default {
data(){
return{
Term:'',
DataList:[],
airlineList:[],
msg:{
pageIndex:1,
pageSize:15,
OrderID:'',
AirlineId:'',
FlightNo:'',
ClientName:'',
//Term:'',
ParentId:1,
ParentId:0,
export default {
data() {
return {
Term: '',
DataList: [],
airlineList: [],
msg: {
pageIndex: 1,
pageSize: 15,
OrderID: '',
AirlineId: '',
FlightNo: '',
ClientName: '',
ParentId: 1,
ParentId: 0,
},
AirportNameList:[],
total:0,
currentPage:1,
loading:true,
noData:false,
PayInfoS:null,
PayInfoZ:null,
PayInfoLding:true,
RB_Branch_Id:''
AirportNameList: [],
total: 0,
currentPage: 1,
loading: true,
noData: false,
PayInfoS: null,
PayInfoZ: null,
PayInfoLding: true,
RB_Branch_Id: ''
}
},
created(){
created() {
this.Term = this.$route.query.Term;
this.msg.ParentId=this.$route.query.ID;
this.msg.ParentId = this.$route.query.ID;
},
mounted(){
mounted() {
this.getList(this.id);
this.getAirlineList();
let userInfo = this.getLocalStorage();
this.RB_Branch_Id = userInfo.RB_Branch_id;
},
methods:{
getInfo(id){
methods: {
getInfo(id) {
this.PayInfoLding = true;
this.apipost('Financial_post_GetOrderFinanceList',{OrderId:id,OrderResource:9},r=>{
if(r.data.resultCode==1){
this.apipost('Financial_post_GetOrderFinanceList', {
OrderId: id,
OrderResource: 9
}, r => {
if (r.data.resultCode == 1) {
let data = r.data.data;
let PayInfoS=[],
PayInfoZ=[];
let PayInfoS = [],
PayInfoZ = [];
data.forEach(x => {
if(x.Type==1){
if (x.Type == 1) {
PayInfoS.push(x)
}else{
} else {
PayInfoZ.push(x)
}
});
......@@ -285,105 +231,110 @@ export default {
this.PayInfoS = PayInfoS;
this.PayInfoLding = false;
}
},null);
}, null);
},
goUrl(obj,t){
goUrl(obj, t) {
let orderObj = {
OrderID:obj.ID,
OrderSource:9,
OrderID: obj.ID,
OrderSource: 9,
Obj: {},
SourceID:obj.ParentId,
SourceID: obj.ParentId,
TCIDList: []
}
this.$router.push(
{
this.$router.push({
name: 'ChoiceAddFinancialDocuments',
query:{
'Type':t,
'TCIDList':[],
'path':'TicketingModule',
'Cmd':'Domestic_Ticket_post_UpdateFrID',
'companyID':null,
'blank':'y',
'orderObj':JSON.stringify(orderObj)
}
query: {
'Type': t,
'TCIDList': [],
'path': 'TicketingModule',
'Cmd': 'Domestic_Ticket_post_UpdateFrID',
'companyID': null,
'blank': 'y',
'orderObj': JSON.stringify(orderObj)
}
);
});
},
goFinanceUrl(id){
this.$router.push({name: 'FinancialDocumentsDetail',query:{'id':id}});
goFinanceUrl(id) {
this.$router.push({
name: 'FinancialDocumentsDetail',
query: {
'id': id
}
});
},
getList(t){ //获取列表
if(this.msg.OrderID==''){
this.msg.OrderID=0;
getList(t) { //获取列表
if (this.msg.OrderID == '') {
this.msg.OrderID = 0;
}
if(this.msg.AirlineId==''){
this.msg.AirlineId=0;
if (this.msg.AirlineId == '') {
this.msg.AirlineId = 0;
}
this.loading = true
this.apipost('Domestic_Ticket_post_GetPageList',this.msg,res=>{
if(res.data.resultCode==1){
this.apipost('Domestic_Ticket_post_GetPageList', this.msg, res => {
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
let data = res.data.data.pageData;
if(this.total>0){
this.noData =false;
}else{
this.noData =true;
if (this.total > 0) {
this.noData = false;
} else {
this.noData = true;
}
this.DataList = data
this.loading = false;
if(!t){
this.msg.OrderID='';
this.msg.AirlineId='';
}else{
if(this.msg.OrderID==0){
this.msg.OrderID='';
if (!t) {
this.msg.OrderID = '';
this.msg.AirlineId = '';
} else {
if (this.msg.OrderID == 0) {
this.msg.OrderID = '';
}
if(this.msg.AirlineId==0){
this.msg.AirlineId='';
if (this.msg.AirlineId == 0) {
this.msg.AirlineId = '';
}
}
}else{
} else {
this.$message.error(res.data.message)
this.loading = false;
if(!t){
this.msg.OrderID='';
this.msg.AirlineId='';
}else{
if(this.msg.OrderID==0){
this.msg.OrderID='';
if (!t) {
this.msg.OrderID = '';
this.msg.AirlineId = '';
} else {
if (this.msg.OrderID == 0) {
this.msg.OrderID = '';
}
if(this.msg.AirlineId==0){
this.msg.AirlineId='';
if (this.msg.AirlineId == 0) {
this.msg.AirlineId = '';
}
}
}
},err=>{})
}, err => {})
},
flight_post_GetAirportNameList(id){
this.msg.FlightNo='';
this.AirportNameList=[]
if(!id) return
this.apipost('flight_post_GetAirportNameList',{airlineID:id},r=>{
if(r.data.resultCode==1){
this.msg.FlightNo='';
flight_post_GetAirportNameList(id) {
this.msg.FlightNo = '';
this.AirportNameList = []
if (!id) return
this.apipost('flight_post_GetAirportNameList', {
airlineID: id
}, r => {
if (r.data.resultCode == 1) {
this.msg.FlightNo = '';
this.AirportNameList = r.data.data;
}
},null)
}, null)
},
getAirlineList() {//获取航空公司*
this.apipost("airline_post_GetList",{},res => {
getAirlineList() { //获取航空公司*
this.apipost("airline_post_GetList", {}, res => {
this.airlineList = res.data.data;
},err => {});
}, err => {});
},
resetPageIndex() {//查询初始化页码
resetPageIndex() { //查询初始化页码
this.msg.pageIndex = 1;
this.currentPage = 1
},
handleCurrentChange(val) {//翻页功能按钮
handleCurrentChange(val) { //翻页功能按钮
this.msg.pageIndex = val;
this.getList();
},
}
}
}
</script>
\ No newline at end of file
......@@ -13,14 +13,8 @@
cursor: pointer;
text-decoration: underline;
}
._bg__ ._bg_red:hover{
color: rgb(230, 97, 97);
}
._bg__ ._bg_green:hover{
color:rgb(66, 182, 132);
}
._bg_red{color: #E95252;}
._bg_green{color: #2BB87C}
.Guid_bg_red{color: #E95252;}
.Guid_bg_green{color: #2BB87C}
._addChuNa_tit{color: gray;margin-bottom: 10px;}
._addChuNa_tit span{ color:#333333}
</style>
......@@ -95,7 +89,7 @@
</el-form-item>
</el-col>
<el-col :span="8" :gutter="35">
<!-- <el-col :span="8" :gutter="35">
<el-form-item :label="$t('fnc.a_hkfkriqi')">
<el-date-picker class="h34"
@change="timeAdd"
......@@ -105,16 +99,31 @@
:range-separator="$t('restaurant.res_To')">
</el-date-picker>
</el-form-item>
</el-col> -->
<el-col :span="6">
<el-form-item label="汇款/付款日期">
<el-date-picker
@change="timeAdd"
v-model="productionDate"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8" :gutter="35">
<el-col :span="6">
<el-form-item label="发团日期">
<el-date-picker class="h34"
<el-date-picker
@change="timeAddByTC"
v-model="productionDateByTC"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:range-separator="$t('restaurant.res_To')">
</el-date-picker>
></el-date-picker>
</el-form-item>
</el-col>
<!-- <el-col :span="4" :gutter="35">
......@@ -148,8 +157,8 @@
<th>{{$t('fnc.a_hkfkshijian')}}</th>
<th>{{$t('fnc.jylshuihao')}}</th>
<th>制单人</th>
<th>{{$t('fnc.skjine')}}</th>
<th>{{$t('fnc.fkjine')}}</th>
<th>待收金额</th>
<th>待付金额</th>
<th>总计</th>
</tr>
<!-- <tr>
......@@ -170,9 +179,9 @@
</td> -->
<td>{{item.TypeName}}</td>
<td>{{item.BName}}</td>
<!-- <td><span class="cursorpointer" :class="item.Type==1?'_bg_green':'_bg_red'" @click="goUrl('FinancialDocumentsDetail',item.FinanceId)">{{ item.FinanceId }}</span> </td> -->
<!-- <td><span class="cursorpointer" :class="item.Type==1?'Guid_bg_green':'Guid_bg_red'" @click="goUrl('FinancialDocumentsDetail',item.FinanceId)">{{ item.FinanceId }}</span> </td> -->
<td>
<span class="cursorpointer" :class=" item.Type === 1 ? '_bg_green' : '_bg_red'" @click="goUrlNew(item)">
<span class="cursorpointer" :class=" item.Type === 1 ? 'Guid_bg_green' : 'Guid_bg_red'" @click="goUrlNew(item)">
{{ item.FinanceId }}</span>
</td>
<td>
......
......@@ -510,12 +510,12 @@
findex: 0,
childIndex: 0,
//修改酒店价格,付款方式权限[0-不能修改,1-有权限修改]
IsEditHotel: 0,
IsEditHotel: 1,
//0-可以操作,1-已制单,不能操作
IsOperation: 1,
LeaderName: "", //领队名称
GuideName: "", //导游名称
IsEditHotelPeople: 0, //是否有修改人数权限[0-不能修改,1-可以修改]
IsEditHotelPeople: 1, //是否有修改人数权限[0-不能修改,1-可以修改]
IsCombine: false, //是否是合团,true-是合团,false-不是合团
allCurrencyList: [], //币种列表
}
......
......@@ -26,21 +26,21 @@
</th>
</tr>
<tr>
<th width="150">用餐时间</th>
<th width="250">餐厅名称</th>
<th width="160">修改餐厅</th>
<th width="100">用餐时间</th>
<th width="200">餐厅名称</th>
<th width="150">修改餐厅</th>
<th width="80">类别</th>
<th width="200" style="display:none;">餐饮类型</th>
<th width="80">总人数</th>
<th width="70">总人数</th>
<th width="70">用餐人<br />类型</th>
<th width="70">用餐<br />人数</th>
<th width="100">价格</th>
<th width="100">免人数</th>
<th width="90">价格</th>
<th width="90">免人数</th>
<th width="80">金额小计</th>
<th width="100">返佣</th>
<th width="120">总金额</th>
<th width="90">返佣</th>
<th width="100">总金额</th>
<th width="210">付款方式/订餐方式/订团号</th>
<th width="80">备注</th>
<th width="170">备注</th>
</tr>
<template v-for="(item,index) in list">
<template v-for="(subItem,subIndex) in item.DiningSummaryList">
......@@ -81,7 +81,6 @@
<el-option v-for='itemHotel in item.DinnerList' :label='itemHotel.RealName' :value='itemHotel.ID'
:key='itemHotel.ID'></el-option>
</el-select>
</td>
<td v-if="childIndex==0" :rowspan="3">
{{subItem.UseDinnerTypeStr}}
......@@ -102,8 +101,8 @@
<span class="spanlink" v-if='childItem.PeoplePrice==0'
@click="goUrl('RestaurantPackage',subItem,'套餐查询')">设置</span>
<template v-else>
<el-input class='w50 tcenter' @input='calculationPrice(subItem)'
v-model='childItem.PeoplePrice' @keyup.native="checkInteger(childItem,'PeoplePrice')"></el-input>
<el-input class='w50 tcenter' @input='calculationPrice(subItem)' v-model='childItem.PeoplePrice'
@keyup.native="checkInteger(childItem,'PeoplePrice')"></el-input>
</template>
</td>
<td>
......@@ -185,7 +184,22 @@
</table>
</td>
<td v-if="childIndex==0" :rowspan="3">
<el-input type='textarea' rows="4" class='w120' v-model='subItem.Remarks'></el-input>
<table class="dinnerTable">
<tr>
<td width="80" style="text-align:right;">备注:</td>
<td>
<el-input type='textarea' rows="2" class='w120' v-model='subItem.Remarks'></el-input>
</td>
</tr>
<tr>
<td width="80" style="text-align:right;">
餐配备注:
</td>
<td style="text-align:left;">
<el-input type='textarea' rows="2" class='w120' v-model='subItem.DinnerRemark'></el-input>
</td>
</tr>
</table>
</td>
</tr>
</template>
......@@ -194,7 +208,6 @@
</div>
</div>
</template>
<script>
export default {
data() {
......@@ -308,7 +321,8 @@
obj.DiningPriceList.forEach((item, index) => {
var tempPrice = 0;
var coefficient = 1;
totalPrice += item.PeoplePrice * (item.PeopleNum - item.Discount) * (coefficient - item.DiscountPrice / 100);
totalPrice += item.PeoplePrice * (item.PeopleNum - item.Discount) * (coefficient - item.DiscountPrice /
100);
totalPrice += tempPrice;
})
obj.TotalPrice = totalPrice.toFixed(2);
......@@ -321,24 +335,18 @@
else if (currentObj.ID == 3) {
obj.NewTotalPrice = "";
} else {
if(currentObj.CurrentRate>1)
{
obj.NewTotalPrice = currentObj.Name + ":" + ((totalPrice*jpaObj.PayRate)/currentObj.CurrentRate).toFixed(2);
}
else
{
obj.NewTotalPrice = currentObj.Name + ":" + ((totalPrice*jpaObj.PayRate)*currentObj.CurrentRate).toFixed(2);
if (currentObj.CurrentRate > 1) {
obj.NewTotalPrice = currentObj.Name + ":" + ((totalPrice * jpaObj.PayRate) / currentObj.CurrentRate)
.toFixed(2);
} else {
obj.NewTotalPrice = currentObj.Name + ":" + ((totalPrice * jpaObj.PayRate) * currentObj.CurrentRate)
.toFixed(2);
}
}
} else {
obj.NewTotalPrice = "";
}
this.$forceUpdate();
// let totalPrice = 0;
// obj.DiningPriceList.forEach(item => {
// totalPrice += item.PeoplePrice * (item.PeopleNum - item.Discount) * (1 - item.DiscountPrice / 100);
// })
// obj.TotalPrice = totalPrice.toFixed(2);
},
saveList(type) {
this.IsDisabled = true;
......
......@@ -119,7 +119,6 @@
<label :for="'H'+index+'_'+subIndex" style="cursor: pointer">{{subItem.Name}}</label>
<span class="cm_Inventory">{{subItem.Inventory}}</span>
<span class="cm_Inventory">剩余:{{subItem.RemainingInventory}}</span>
<span class="ck_goUrl" @click="goUrl(subItem.ID)">新增库存</span>
</div>
</div>
</el-tab-pane>
......@@ -128,15 +127,16 @@
<table v-loading="loading" >
<thead>
<tr>
<th>选择</th>
<th>酒店名称</th>
<th>价格</th>
<th style="width:70px">选择</th>
<th style="width:200px">酒店名称</th>
<th style="width:100px">价格</th>
</tr>
</thead>
<tbody>
<tr v-for="item in ThirdHotelList">
<tr v-for="(item,index) in ThirdHotelList">
<td width="50">
<input :id="item.hotelId" type="checkbox" />
<input :id="item.hotelId" type="checkbox" v-model="item.isChecked"
@click="getCheck(ThirdHotelList,index)" />
</td>
<td width="150">{{item.hotelName}}</td>
<td width="150">{{item.lowrateTotal}}</td>
......@@ -206,8 +206,7 @@
},
methods: {
getCheckHotel() {
this.loading = true;
this.IsShow = false;
this.dataList = [];
this.HotelList = [];
this.ThirdHotelList=[];
......@@ -222,6 +221,8 @@
},
//查询地接酒店
GetDMCHotelList() {
this.loading = true;
this.IsShow = false;
this.apipost('hotel_post_GetHasStockHotelList_V2', {
//1-只查询有库存的酒店
IsMoreThanZero: 0,
......@@ -229,7 +230,8 @@
IsAllHotel: 1,
Province: this.qMsg.ProvinceId,
Name: this.qMsg.Name,
sDate: this.qMsg.UseDate
sDate: this.qMsg.UseDate,
IsGetPic:true,//获取图片
}, res => {
this.loading = false;
this.IsShow = true;
......@@ -247,7 +249,10 @@
},
//查询第三方酒店
GetThirdHotelList() {
this.loading = true;
this.IsShow = false;
this.thirdHotelMsg.arrivalDate=this.qMsg.UseDate;
this.ThirdHotelList=[];
if (this.thirdHotelMsg.arrivalDate == "") {
this.Info("请选择入住时间!");
return;
......@@ -282,7 +287,14 @@
if (res.data.resultCode == 1) {
//总条数
this.thirdHotelMsg.numberOfResultMatched = Number(res.data.data.numberOfResultMatched);
this.ThirdHotelList = res.data.data.hotelSummary;
var newArray= res.data.data.hotelSummary;
if(newArray!=null && newArray.length>0)
{
newArray.forEach(item=>{
item.isChecked=false;
});
}
this.ThirdHotelList =newArray;
} else {
this.Error(res.data.message)
}
......@@ -308,17 +320,27 @@
sendCkedHotel() {
var ckHotelObj = {};
if (this.ckedHotel) {
ckHotelObj.ID = this.ckedHotel.ID;
ckHotelObj.Address = this.ckedHotel.Address;
ckHotelObj.Inventory = this.ckedHotel.Inventory;
ckHotelObj.Name = this.ckedHotel.Name;
ckHotelObj.PayStyle = this.ckedHotel.PayStyle;
ckHotelObj.Tel = this.ckedHotel.Tel;
ckHotelObj.RebateRatio = this.ckedHotel.RebateRatio;
ckHotelObj.RebateCount = this.ckedHotel.RebateCount;
ckHotelObj.CostPrice = this.ckedHotel.CostPrice;
//地接酒店
if(this.qHotelType==1)
{
ckHotelObj.HotelId = this.ckedHotel.ID;
ckHotelObj.HotelName = this.ckedHotel.Name;
ckHotelObj.Description=this.ckedHotel.Descriptions;
ckHotelObj.HotelProvideType=1;
ckHotelObj.imgList=this.ckedHotel.ImgList;
}
//第三方酒店
else if(this.qHotelType==2)
{
ckHotelObj.HotelId = this.ckedHotel.hotelId;
ckHotelObj.HotelName = this.ckedHotel.hotelName;
ckHotelObj.imgList=[];
ckHotelObj.imgList.push({Name:this.ckedHotel.hotelName,Url:this.ckedHotel.hotelImageUrl});
ckHotelObj.Description=this.ckedHotel.hotelDescription;
ckHotelObj.HotelProvideType=2;
}
}
this.$emit("childHotel", ckHotelObj);
this.$emit("childHotelChange", ckHotelObj);
},
//获取日本下面的市->下拉框用
getProvinceList() {
......@@ -335,22 +357,9 @@
err => {}
);
},
goUrl(ID) {
this.$router.push({
path: 'HotelProductManage2',
query: {
id: ID,
Country: 651,
IsSelfBook: 1,
blank: 'y',
tab: '报价详情'
}
});
}
},
mounted() {
this.getProvinceList();
}
};
</script>
\ No newline at end of file
......@@ -140,46 +140,46 @@
<tr>
<td>
人数:{{sendReceiptData.StartCityName}}出发
<el-input type="text" class="w100" v-model="sendReceiptData.StartCityNum"/>
<el-input type="text" class="w100" v-model="sendReceiptData.StartCityNum" @keyup.native="checkPrice(sendReceiptData,'StartCityNum')" />
</td>
<td width="250">
其他:凑票
<el-input type="text" class="w135" v-model="sendReceiptData.TogetherNum"/>
<el-input type="text" class="w135" v-model="sendReceiptData.TogetherNum" @keyup.native="checkPrice(sendReceiptData,'TogetherNum')" />
</td>
<td colspan="7">
外站JOIN
<el-input type="text" class="w100" v-model="sendReceiptData.OutsideNum"/>
<el-input type="text" class="w100" v-model="sendReceiptData.OutsideNum" @keyup.native="checkPrice(sendReceiptData,'OutsideNum')" />
</td>
</tr>
<tr>
<td>
小费:金额
<el-input type="text" class="w128" v-model="sendReceiptData.Trip"/>
<el-input type="text" class="w128" v-model="sendReceiptData.Trip" @keyup.native="checkPrice(sendReceiptData,'Trip')" />
元/位
</td>
<td>
人数:共
<el-input type="text" class="w150" v-model="sendReceiptData.TripNum"/>
<el-input type="text" class="w150" v-model="sendReceiptData.TripNum" @keyup.native="checkPrice(sendReceiptData,'TripNum')" />
</td>
<td colspan="7">
总计:
<el-input type="text" class="w120" v-model="sendReceiptData.TripTotal"/>
<el-input type="text" class="w120" v-model="sendReceiptData.TripTotal" @keyup.native="checkPrice(sendReceiptData,'TripTotal')" />
万日元
</td>
</tr>
<tr>
<td>
团款:
<el-input type="text" class="w160" v-model="sendReceiptData.TeamPrice"/>
<el-input type="text" class="w160" v-model="sendReceiptData.TeamPrice" @keyup.native="checkPrice(sendReceiptData,'TeamPrice')" />
人民币
</td>
<td colspan="8">
名单表费:
<el-input type="text" class="w135" v-model="sendReceiptData.TableFee"/>
<el-input type="text" class="w135" v-model="sendReceiptData.TableFee" @keyup.native="checkPrice(sendReceiptData,'TableFee')" />
</td>
</tr>
......
......@@ -899,7 +899,7 @@
</div>
<div style="text-align:center">
<p style="font-size:26px;color:#111111;margin:40px 0">第{{tsNumber}}期投诉案例分享已经发布</p>
<a @click="CloseTs" target="_blank" href="http://we.oytour.com:8110/?/article/13" style="font-size:18px;color:#E95252;cursor:pointer;text-decoration:underline">点击查看</a>
<a @click="CloseTs" target="_blank" href="http://we.oytour.com:8110/?/article/19" style="font-size:18px;color:#E95252;cursor:pointer;text-decoration:underline">点击查看</a>
</div>
</div>
</div>
......@@ -931,7 +931,7 @@ export default {
data() {
return {
tsState:false,
tsNumber:5,
tsNumber:6,
saleRnkShow: false,
dialogTitleNot: '',
outerVisibleNot: false,
......
......@@ -1270,7 +1270,7 @@ export default {
}, null)
},
goZhiDan: function(obj) {
let id = [59,63,78];
let id = [59,63];
let TCIDARR = [obj.TCIDS];
let orderObj = {
OrderID: 0,
......@@ -1438,7 +1438,7 @@ export default {
this.dataList.LeaderApply.Status = type;
let msg = this.dataList.LeaderApply;
this.apipost(
"dmcstatistics_post_AuditLeaderapply",
"dmcstatistics_post_AuditLeaderapply_V2",
msg,
res => {
if (res.data.resultCode == 1) {
......
......@@ -51,7 +51,7 @@
<TravelPrice3 ref="TravelPrice" id="fiveAnchor" @headCallBack="getPrice" :PostDaysTrip="PostDaysTrip"
v-if="TeamType==2" :priceList="PriceList" :PostConfig="PostConfig" :modifyTcid="modifyTcid"
:TeamType="TeamType"></TravelPrice3>
<div class="btnFixedDiv">
<div class="btnFixedDiv" v-if="IsShowBtn">
<div class="toTop" @click="backTop">
<i class="iconfont icon-huidaodingbu"></i>
</div>
......@@ -84,6 +84,7 @@
},
data() {
return {
IsShowBtn:false,//是否显示按钮
ConfigId: 0, //地址栏查询参数
NewConfigId: "", //configID加密后的字符串【预览使用】
TCNUM: '', //团控列表传过来的tcnum
......@@ -630,7 +631,6 @@
res => {
if (res.data.resultCode == 1) {
var tempData = res.data.data;
if (tempData.Feature != null) {
this.FeatureData.ID = tempData.Feature.ID;
this.FeatureData.ConfigId = tempData.Feature.ConfigId;
......@@ -753,6 +753,7 @@
this.Error(res.data.message);
}
this.loading = false;
this.IsShowBtn=true;
},
err => {}
);
......@@ -783,6 +784,7 @@
this.Error(res.data.message);
}
this.loading = false;
this.IsShowBtn=true;
},
err => {}
);
......
......@@ -109,8 +109,8 @@
<span v-if="IsDirect==1">
<hotelTrip v-bind:subItemObj="subItem" v-bind:DefaultList="hotelSameList" v-bind:subIndex="subIndex"
v-bind:DinnerList="DinnerList" v-bind:index="index" :isOpenGroup="isOpenGroup"
v-bind:subTotalIndex="item.dayArray.length" ></hotelTrip>
v-bind:subTotalIndex="item.dayArray.length"></hotelTrip>
<!---->
<hotelTripV2 v-bind:subItemObj="subItem" v-bind:DefaultList="hotelSameList" v-bind:subIndex="subIndex"
v-bind:DinnerList="DinnerList" v-bind:index="index" :isOpenGroup="isOpenGroup"
v-bind:subTotalIndex="item.dayArray.length" style="display:none;"></hotelTripV2>
......
......@@ -6,7 +6,7 @@
<span class="TDTripType">酒店</span>
</div>
<span class="datePickContent" style="display:none">
<el-form-item >
<el-form-item>
<el-select :disabled="isOpenGroup" class="w160" placeholder="请选择时间" v-model="subItemObj.childItem.TimeType">
<el-option v-for="item in TimeTypeList" :label='item.Name' :value='item.Id' :key='item.Id'>
</el-option>
......@@ -14,7 +14,7 @@
</el-form-item>
</span>
<div class="delSpan">
<el-tooltip class="item" effect="dark" content="查看" placement="top-start" >
<el-tooltip class="item" effect="dark" content="查看" placement="top-start">
<i class="iconfont icon-chakan" @click="isShowEdit=!isShowEdit"></i>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top-start" v-if="!isOpenGroup">
......@@ -23,63 +23,33 @@
<el-tooltip class="item" effect="dark" content="上移" placement="top-start" v-if="subIndex!=0 && !isOpenGroup">
<i class="iconfont icon-shangyi" @click="MoveItem(subItemObj.childItem.DayNum,subIndex,0)"></i>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="下移" placement="top-start" v-if="subIndex!=subTotalIndex-1 && !isOpenGroup">
<el-tooltip class="item" effect="dark" content="下移" placement="top-start"
v-if="subIndex!=subTotalIndex-1 && !isOpenGroup">
<i class="iconfont icon-xiayi1" @click="MoveItem(subItemObj.childItem.DayNum,subIndex,1)"></i>
</el-tooltip>
</div>
<div class="TDplanList clearfix">
<div class="TDLeftPlan">
<span>
<el-popover placement="right" width="540" trigger="click" >
<comCheckHotelV2 :ref="'comCheckHotelV2'+index+subIndex+''" >
<el-popover placement="right" width="540" trigger="click">
<comCheckHotelV2 :ref="'comCheckHotelV2'+index+subIndex+''" v-on:childHotelChange="changeHotelList">
</comCheckHotelV2>
<el-button size="small" type="danger" :data-index="'comCheckHotelV2'+index+subIndex+''"
slot="reference" style="cursor:pointer;"
>
<el-button size="small" type="danger" :data-index="'comCheckHotelV2'+index+subIndex+''" slot="reference"
style="cursor:pointer;">
酒店选择
</el-button>
<!--@click="getChildHotel(index,subIndex)"-->
</el-popover>
</span>
<span>
<el-form-item :prop="'DayList.'+index+'.dayArray.'+subIndex+'.childItem.HotelId'" :rules="hotelTripRules.HotelId">
<el-select :disabled="isOpenGroup" class='w160' :placeholder="$t('pub.pleaseSel')" filterable v-model="subItemObj.childItem.HotelId"
@visible-change="getHotelList($event)" @change="changeHotelList()">
<el-option :label="$t('pub.unlimitedSel')" :value='Diner.DefaultSelectValue'></el-option>
<el-option v-for="item in QHotelList" :label='getItemLabel(item)' :value='item.ID' :key='item.ID'>
</el-option>
</el-select>
</el-form-item>
</span>
<span class="HD_hotelru">
<el-checkbox :disabled="isOpenGroup" v-model="subItemObj.childItem.IsSameLevel" :checked="subItemObj.childItem.IsSameLevel===CheckedVaule"
:true-label="CheckedVaule" :false-label="UnCheckedVaule" border size="mini">同级酒店</el-checkbox>
</span>
<span class="comTravelLeft">房型选择</span>
<span>
<el-select :disabled="isOpenGroup" class='w160' :placeholder="$t('pub.pleaseSel')" filterable v-model="subItemObj.childItem.HotelProductId"
@visible-change="getHotelProductList($event)" @change="changeHotelProductList()">
<el-option :label="$t('pub.unlimitedSel')" :value='Diner.DefaultSelectValue'></el-option>
<el-option v-for="item in QHotelProductList" :label='item.Name' :value='item.ID' :key='item.ID'>
</el-option>
</el-select>
</span>
<span v-if="subItemObj.childItem.IsUseDinner==1">
<span class="TDhotelDiner">酒店含餐</span>
<span>
<el-checkbox-group v-model="Diner.UseDinerCked">
<el-checkbox v-for="item in Diner.UseDinnerArray" :disabled="isOpenGroup||!varCanChecked(item)" :label="item.Id"
:key='item.Id'>{{item.Name}}</el-checkbox>
</el-checkbox-group>
</span>
酒店名称: {{subItemObj.childItem.HotelName}}&nbsp;<template v-if="subItemObj.childItem.HotelProvideType==2"><span style="color:red;">第三方酒店</span></template>
</span>
</div>
</div>
</div>
<div class="TP_edit">
<my-edit v-if="isShowEdit" v-on:edit-value="subItemObj.childItem.Description = arguments[0]" v-bind:editValue="subItemObj.childItem.Description"
v-bind:toolbarShow="toolbar" v-bind:referenceList="DefaultList" v-bind:placeholder="placeholder"></my-edit>
<my-edit v-if="isShowEdit" v-on:edit-value="subItemObj.childItem.Description = arguments[0]"
v-bind:editValue="subItemObj.childItem.Description" v-bind:toolbarShow="toolbar"
v-bind:referenceList="DefaultList" v-bind:placeholder="placeholder"></my-edit>
</div>
<div class="SiencDiv clearfix">
<div class="ScLeftImg">
......@@ -88,16 +58,20 @@
<img v-else :src="item.Url" />
<div class="imgzhe" @click="getPic(subItemObj.childItem.ImaArray,index)">
<div class="clearfix" style="text-align:center;">
<div class="re-delte" @click.stop="delImg(index,subItemObj)"><i class="iconfont icon-xingzhuang"></i></div>
<div class="re-delte" @click.stop="toExchangeImg(subItemObj.childItem.DayNum,subIndex,index,0)" v-if="index!=0"><i class="iconfont icon-zuoyi"></i></div>
<div class="re-delte" @click.stop="toExchangeImg(subItemObj.childItem.DayNum,subIndex,index,1)" v-if="index!=subItemObj.childItem.ImaArray.length-1"><i class="iconfont icon-youyi"></i></div>
<div class="re-delte" @click.stop="delImg(index,subItemObj)"><i class="iconfont icon-xingzhuang"></i>
</div>
<div class="re-delte" @click.stop="toExchangeImg(subItemObj.childItem.DayNum,subIndex,index,0)"
v-if="index!=0"><i class="iconfont icon-zuoyi"></i></div>
<div class="re-delte" @click.stop="toExchangeImg(subItemObj.childItem.DayNum,subIndex,index,1)"
v-if="index!=subItemObj.childItem.ImaArray.length-1"><i class="iconfont icon-youyi"></i></div>
</div>
</div>
</div>
</div>
<div class="rightAddImg">
<el-upload :file-list="subItemObj.childItem.ImaArray" :http-request="uploadScenImg" :data="subItemObj.childItem"
:multiple="true" accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false" action="">
<el-upload :file-list="subItemObj.childItem.ImaArray" :http-request="uploadScenImg"
:data="subItemObj.childItem" :multiple="true" accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false" action="">
<i class="iconfont icon-img_haha"></i>
</el-upload>
</div>
......@@ -110,7 +84,7 @@
<span class="TDTripType">酒店</span>
</div>
<div class="delSpan">
<el-tooltip class="item" effect="dark" content="编辑" placement="top-start" >
<el-tooltip class="item" effect="dark" content="编辑" placement="top-start">
<i class="iconfont icon-bianji" @click="isShowEdit=!isShowEdit"></i>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top-start" v-if="!isOpenGroup">
......@@ -119,7 +93,8 @@
<el-tooltip class="item" effect="dark" content="上移" placement="top-start" v-if="subIndex!=0 && !isOpenGroup">
<i class="iconfont icon-shangyi" @click="MoveItem(subItemObj.childItem.DayNum,subIndex,0)"></i>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="下移" placement="top-start" v-if="subIndex!=subTotalIndex-1 && !isOpenGroup">
<el-tooltip class="item" effect="dark" content="下移" placement="top-start"
v-if="subIndex!=subTotalIndex-1 && !isOpenGroup">
<i class="iconfont icon-xiayi1" @click="MoveItem(subItemObj.childItem.DayNum,subIndex,1)"></i>
</el-tooltip>
</div>
......@@ -150,13 +125,13 @@
<div class="ScLeftImg">
<div class="TFimgList" v-for="(item,index) in subItemObj.childItem.ImaArray" :key="item.subCode">
<img v-if="!item.Url" src="../../../assets/img/bg_c3@3x.png" />
<img v-else :src="item.Url" @click="getPic(subItemObj.childItem.ImaArray,index)"/>
<img v-else :src="item.Url" @click="getPic(subItemObj.childItem.ImaArray,index)" />
</div>
</div>
</div>
</div>
<div v-if="dspNone" class="viewBigPicLayer myPiclayer" @click="colseLayer">
<i @click="colseLayer" class="el-icon-circle-close-outline clolseViewBigPicLayer" ></i>
<i @click="colseLayer" class="el-icon-circle-close-outline clolseViewBigPicLayer"></i>
<el-carousel height="600px" :initial-index='initialIndex' :interval="5000" trigger="click">
<el-carousel-item v-for="(item,index) in picObj" :key="index">
<img style="width:100%;" :src="item.Url" />
......@@ -166,9 +141,9 @@
</div>
</template>
<script>
import MyEdit from "../../EditTemplate.vue";
import comCheckHotelV2 from "../../commonPage/comCheckHotelV2.vue";
export default {
import MyEdit from "../../EditTemplate.vue";
import comCheckHotelV2 from "../../commonPage/comCheckHotelV2.vue";
export default {
props: [
"subItemObj",
"DefaultList",
......@@ -204,8 +179,8 @@ export default {
font: false, //字体
narrative: true //叙述,
},
dspNone:false,
initialIndex:0,
dspNone: false,
initialIndex: 0,
//选中同级酒店
CheckedVaule: 1,
//不选中
......@@ -218,8 +193,7 @@ export default {
Diner: {
DefaultSelectValue: 0,
UseDinerCked: [],
UseDinnerType: [
{
UseDinnerType: [{
Id: "1",
Name: "早"
},
......@@ -237,18 +211,14 @@ export default {
//酒店验证
hotelTripRules: {
//时间类型验证
TimeType: [
{
TimeType: [{
validator: TimeTypeValidate,
trigger: "change"
}
],
HotelId: [
{
}],
HotelId: [{
validator: HotelIdValidate,
trigger: "change"
}
]
}]
},
TheDayUserDinner: [] //当天餐厅用餐情况
};
......@@ -279,80 +249,25 @@ export default {
}
},
//酒店选择改变
changeHotelList() {
changeHotelList(childHotelObj) {
var that = this;
if (that.subItemObj.childItem.HotelId != 0) {
//获取当前选中的对象
let obj = {};
obj = that.QHotelList.find(item => {
return item.ID === that.subItemObj.childItem.HotelId; //筛选出匹配数据
});
if (obj != undefined) {
if(childHotelObj)
{
that.subItemObj.childItem.HotelProductId = 0;
that.subItemObj.childItem.HotelProductName = "";
that.QHotelProductList = [];
that.Diner.UseDinnerArray = [];
that.subItemObj.childItem.ImaArray = [];
that.subItemObj.childItem.Description = obj.Descriptions;
that.subItemObj.childItem.ImaArray = obj.imgList;
that.subItemObj.childItem.IsUseDinner = obj.IsUseDinner;
that.subItemObj.childItem.HotelName = obj.Name;
let useDinnerTypeStr = that.subItemObj.childItem.UseDinnerType;
if (that.subItemObj.childItem.ID > 0) {
if (obj.UseDinnerType == null || !(obj.UseDinnerType.length > 0)) {
that.Diner.UseDinerCked = [];
that.subItemObj.childItem.UseDinnerType = "";
} else {
let useDinnerTypeStr = that.subItemObj.childItem.UseDinnerType;
if (useDinnerTypeStr != null && useDinnerTypeStr.length > 0) {
let objUseDinnerTypeArr = obj.UseDinnerType.split(",");
let useDinnerTypeArr = useDinnerTypeStr.split(",");
let tmpDinnerTypeArr = [];
useDinnerTypeArr.forEach(x => {
let isRemove = true;
objUseDinnerTypeArr.forEach(y => {
if (x == y) {
isRemove = false;
}
});
if (!isRemove) {
tmpDinnerTypeArr.push(x);
}
});
that.subItemObj.childItem.UseDinnerType = tmpDinnerTypeArr.join(
","
);
that.Diner.UseDinerCked = tmpDinnerTypeArr;
}
}
} else {
if (obj.UseDinnerType != null && obj.UseDinnerType.length > 0) {
that.Diner.UseDinerCked = obj.UseDinnerType.split(",");
}
}
let useDinnerTypeArry = [];
if (obj.UseDinnerType != null && obj.UseDinnerType.length > 0) {
useDinnerTypeArry = obj.UseDinnerType.split(",");
}
useDinnerTypeArry.forEach(y => {
that.Diner.UseDinnerType.forEach(DinerTypeItem => {
if (y == DinerTypeItem.Id) {
that.Diner.UseDinnerArray.push(DinerTypeItem);
}
});
});
that.Diner.UseDinnerArray.sort(
this.$commonUtils.createComprisonFunction("Id")
);
}
that.subItemObj.childItem.Description = childHotelObj.Description;
that.subItemObj.childItem.ImaArray = childHotelObj.imgList;
that.subItemObj.childItem.HotelId=childHotelObj.HotelId;
that.subItemObj.childItem.HotelName = childHotelObj.HotelName;
that.subItemObj.childItem.HotelProvideType=childHotelObj.HotelProvideType;
}
},
//获取酒店房型列表
getHotelProductList(event) {
if (event) {
this.apipost(
"dict_post_HotelProduc_GetList",
{
"dict_post_HotelProduc_GetList", {
Hotel_ID: this.subItemObj.childItem.HotelId
},
res => {
......@@ -431,20 +346,20 @@ export default {
},
//左右移动
toExchangeImg(dayNum, subIndex, imgIndex, IsMove) {
this.$parent.$parent.ExchangeImg(dayNum, subIndex, imgIndex,IsMove);
this.$parent.$parent.ExchangeImg(dayNum, subIndex, imgIndex, IsMove);
},
colseLayer(){
this.dspNone=false;
colseLayer() {
this.dspNone = false;
},
getPic(obj,index){
this.picObj=obj
this.dspNone=true;
getPic(obj, index) {
this.picObj = obj
this.dspNone = true;
this.initialIndex = index;
},
getItemLabel(item){
getItemLabel(item) {
let returnName = item.Name;
if(item.Inventory>=0){
returnName = returnName+ " " +item.Inventory;
if (item.Inventory >= 0) {
returnName = returnName + " " + item.Inventory;
}
return returnName;
}
......@@ -472,7 +387,7 @@ export default {
watch: {
subItemObj: {
//深度监听,可监听到对象、数组的变化
handler: function(val, oldVal) {
handler: function (val, oldVal) {
this.subItemObj.childItem.HotelImg = JSON.stringify(
this.subItemObj.childItem.ImaArray
);
......@@ -480,24 +395,24 @@ export default {
deep: true
},
"Diner.UseDinerCked": {
handler: function(val, oldVal) {
handler: function (val, oldVal) {
this.subItemObj.childItem.UseDinnerType = this.Diner.UseDinerCked.join(
","
);
}
},
DinnerList: {
handler: function(val, oldVal) {
handler: function (val, oldVal) {
this.initTheDayUserDinner();
},
deep: true
},
"subItemObj.childItem.QCity": {
handler: function(val, oldVal) {
handler: function (val, oldVal) {
this.getHotelList();
},
deep: true
}
}
};
};
</script>
\ No newline at end of file
......@@ -12,7 +12,7 @@ export default {
install(Vue, options) {
Vue.prototype.MsgBus = MsgBus;
Vue.prototype.md5 = md5;
Vue.prototype.orderBy = function(source, orders, type) {
Vue.prototype.orderBy = function (source, orders, type) {
if (
source instanceof Array &&
orders instanceof Array &&
......@@ -22,9 +22,8 @@ export default {
var sorttype = type || "asc";
var results = [];
var totalSum = {};
function grouporder(source, orders, totalSum) {
source.sort(function(a, b) {
source.sort(function (a, b) {
var convertA = a[orders[0]];
var convertB = b[orders[0]];
if (typeof convertA == "string" && typeof convertB == "string") {
......@@ -41,7 +40,6 @@ export default {
}
}
});
var groupmap = new Map();
source.forEach(item => {
if (groupmap.has(item[orders[0]])) {
......@@ -51,9 +49,7 @@ export default {
groupmap.get(item[orders[0]]).push(item);
}
});
orders.shift();
for (let [key, val] of groupmap) {
totalSum[key] = {};
totalSum[key].name = key;
......@@ -67,9 +63,7 @@ export default {
}
}
}
grouporder(source, ordersc, totalSum);
return {
results: results,
totalSum: totalSum
......@@ -78,7 +72,8 @@ export default {
return source;
}
},
Vue.prototype.calcPageSize = function(itemHeight) {
Vue.prototype.calcPageSize = function (itemHeight) {
let yuHeight = itemHeight
try {
let obj = null
......@@ -100,7 +95,7 @@ export default {
}
return Math.floor(yuHeight / itemHeight)
}
Vue.prototype.random_string = function(len) {
Vue.prototype.random_string = function (len) {
len = len || 32;
var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
var maxPos = chars.length;
......@@ -111,17 +106,14 @@ export default {
return pwd;
},
//是否是线上环境【发布时修改为true】
Vue.prototype.isOnline = function() {
Vue.prototype.isOnline = function () {
return process.env.NODE_ENV !== 'development';
},
//域名管理对象
Vue.prototype.domainManager = function() {
Vue.prototype.domainManager = function () {
let domainUrl = '';
let locationName = window.location.hostname;
// domainUrl = "http://192.168.2.214:8082";
// domainUrl = "http://localhost:13491";
domainUrl = "http://192.168.2.65:8025";
// domainUrl = "http://192.168.2.16:8083";
domainUrl = "http://192.168.2.214:8082";
if (locationName.indexOf('oytour') !== -1) {
domainUrl = "http://reborn.oytour.com";
} else if (locationName.indexOf('viitto') !== -1) {
......@@ -136,6 +128,8 @@ export default {
UploadFileUrl: domainUrl + '/api/File/post',
//本站模板文件下载地址
LocalTemplateFileDownLoadUrl: domainUrl,
//酒店接口
HotelApi: "http://reborn.oytour.com/api/common/post",
//阿里服务器地址
AliUrl: "https://reborndev.oss-cn-hangzhou.aliyuncs.com",
//本站文件流下载地址
......@@ -156,14 +150,14 @@ export default {
};
return obj;
},
Vue.prototype.yinyanFn = function(url, successCall, faildCall) {
Vue.prototype.yinyanFn = function (url, successCall, faildCall) {
this.$http.jsonp(url, )
.then(res => {
successCall(res)
}, faildCall)
},
//消息成功提示
Vue.prototype.Success = function(msg) {
Vue.prototype.Success = function (msg) {
this.$message({
message: msg,
duration: 2000,
......@@ -171,7 +165,7 @@ export default {
});
},
//错误提示
Vue.prototype.Error = function(msg) {
Vue.prototype.Error = function (msg) {
this.$message({
message: msg,
duration: 2000,
......@@ -180,7 +174,7 @@ export default {
},
//一般提示
Vue.prototype.Info = function(msg) {
Vue.prototype.Info = function (msg) {
this.$message({
message: msg,
duration: 2000,
......@@ -188,7 +182,7 @@ export default {
});
},
//警告提示
Vue.prototype.Warning = function(msg) {
Vue.prototype.Warning = function (msg) {
this.$message({
message: msg,
duration: 2000,
......@@ -196,7 +190,7 @@ export default {
});
},
//Confirm
Vue.prototype.Confirm = function(msg, callback) {
Vue.prototype.Confirm = function (msg, callback) {
this.$confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
......@@ -211,9 +205,8 @@ export default {
this.Info("已取消操作");
});
},
//打开新窗口连接
Vue.prototype.OpenNewUrl = function(URL) {
Vue.prototype.OpenNewUrl = function (URL) {
if (URL != '') {
if (URL.indexOf("https") != -1) {
var str = 'http://' + URL.substring(8);
......@@ -227,24 +220,8 @@ export default {
}
}
Vue.prototype.uploadImg = function(tcID, msg, successCall, faildCall) {
var apiurl = this.domainManager().UploadUrl + '/Upload/UploadBase64Two?fileType=1&fileLimit=5&&filePath=Freature/' + tcID;
this.$http.post(apiurl, {
FileIndex: msg.FileIndex,
MyFile: msg.MyFile
}, {
headers: {
"Content-Type": "application/x-www-form-urlencoded;"
},
}).then(function(res) {
console.log(res)
})
}
//HTTP提交数据
Vue.prototype.apipost = function(cmd, msg, successCall, faildCall) {
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall, isOnline) {
if (this.$route.name.indexOf('login') === -1 && this.$route.name.indexOf('confirmationOrderDownLoad') === -1 && this.$route.name.indexOf('PrintPage') === -1) {
let previousPathInfo = {
path: this.$route.name,
......@@ -256,6 +233,10 @@ export default {
msg = {}
}
var apiurl = this.domainManager().PostUrl;
//酒店接口
if (isOnline) {
apiurl = this.domainManager().HotelApi;
}
var timestamp = (new Date()).valueOf();
this.apiurl = apiurl;
if (this.$route.path.toLowerCase() == "/signature") {
......@@ -303,8 +284,8 @@ export default {
}, faildCall)
},
Vue.prototype.ApiPost2 = function(cmd, msg, successCall, faildCall) {
//供应商版请求接口方法
Vue.prototype.ApiPost2 = function (cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
......@@ -318,7 +299,6 @@ export default {
path: '/SupplierLogin'
})
}
var token = "";
var key = "";
if (this.getLocalStorageSupplier() != null) {
......@@ -335,7 +315,6 @@ export default {
"sign": md5Str,
"uid": uid
}
this.$http.post(apiNewurl, postData, {
headers: {
'Content-Type': 'application/json',
......@@ -353,7 +332,8 @@ export default {
}, faildCall)
},
Vue.prototype.apiJavaPost = function(cmd, msg, successCall, faildCall) {
//请求Java接口
Vue.prototype.apiJavaPost = function (cmd, msg, successCall, faildCall) {
if (this.$route.name.indexOf('login') === -1 && this.$route.name.indexOf('confirmationOrderDownLoad') === -1 && this.$route.name.indexOf('PrintPage') === -1 && this.$route.name.indexOf('clientConfirm') === -1) {
let previousPathInfo = {
path: this.$route.name,
......@@ -411,8 +391,9 @@ export default {
}
}, faildCall)
},
//下载文件
Vue.prototype.GetLocalFile = function(cmd, msg, fileName, successCall) {
Vue.prototype.GetLocalFile = function (cmd, msg, fileName, successCall) {
var apiurl = this.domainManager().LocalFileStreamDownLoadUrl;
var timestamp = (new Date()).valueOf();
if (!localStorage.userInfo && localStorage.userInfo != "" && this.$route.path.toLowerCase() != "/login") {
......@@ -448,10 +429,10 @@ export default {
document.body.appendChild(link);
link.click();
successCall(res);
}).catch(function(res) {});
}).catch(function (res) {});
},
Vue.prototype.getLocalStorage = function() {
//ERP本地缓存
Vue.prototype.getLocalStorage = function () {
var localStorageData = window.localStorage["userInfo"];
if (localStorageData !== undefined && localStorageData != 'undefined') {
return JSON.parse(localStorageData);
......@@ -459,8 +440,8 @@ export default {
return null;
}
},
Vue.prototype.getLocalStorageSupplier = function() {
//供应商本地缓存
Vue.prototype.getLocalStorageSupplier = function () {
var localStorageData = window.localStorage["userInfo"];
if (localStorageData !== undefined && localStorageData != 'userInfo') {
return JSON.parse(localStorageData);
......@@ -470,11 +451,11 @@ export default {
},
//PDF预览
Vue.prototype.previewPDF = function(url) {
Vue.prototype.previewPDF = function (url) {
window.open(this.domainManager().PDFViewUrl + url);
},
Vue.prototype.downloadFile = function(objectKey) {
//文件下载
Vue.prototype.downloadFile = function (objectKey) {
var co = require('co');
var OSS = require('ali-oss');
var oss = new OSS({
......@@ -488,10 +469,9 @@ export default {
link.href = url;
document.body.appendChild(link);
link.click();
},
Vue.prototype.downloadFileRename = function(objectKey, filename, fileurl) {
//文件重命名下载
Vue.prototype.downloadFileRename = function (objectKey, filename, fileurl) {
var co = require('co');
var OSS = require('ali-oss');
var oss = new OSS({
......@@ -500,7 +480,6 @@ export default {
accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI',
bucket: 'reborndev'
})
let url = '';
if (fileurl)
url = fileurl
......@@ -532,9 +511,9 @@ export default {
window.URL.revokeObjectURL(link.href);
}
});
},
Vue.prototype.getFileBlob = function(objectKey, filename) {
//获取文件Blob
Vue.prototype.getFileBlob = function (objectKey, filename) {
var co = require('co');
var OSS = require('ali-oss');
var oss = new OSS({
......@@ -557,7 +536,22 @@ export default {
});
return getBlob
},
Vue.prototype.uploadSelfBlob = function(path, files, successCall) {
//文件上传
Vue.prototype.uploadImg = function (tcID, msg, successCall, faildCall) {
var apiurl = this.domainManager().UploadUrl + '/Upload/UploadBase64Two?fileType=1&fileLimit=5&&filePath=Freature/' + tcID;
this.$http.post(apiurl, {
FileIndex: msg.FileIndex,
MyFile: msg.MyFile
}, {
headers: {
"Content-Type": "application/x-www-form-urlencoded;"
},
}).then(function (res) {
})
},
//Blob文件上传
Vue.prototype.uploadSelfBlob = function (path, files, successCall) {
let that = this;
var uploadUrl = that.domainManager().UploadUrl + "/Upload/UploadBlob?fileType=1&fileLimit=5&&filePath=" + path;
var formData = new FormData();
......@@ -572,7 +566,7 @@ export default {
//path 请按照"/模块名称/用户ID/自定义文件夹/" /谁搞错一次5块红包
//files 文件数组
//p 进度回调函数
Vue.prototype.uploadFile = function(path, files, successCall) {
Vue.prototype.uploadFile = function (path, files, successCall) {
if (files && files.length > 0) {
let nameList = new Array()
for (let index = 0; index < files.length; index++) {
......@@ -585,31 +579,30 @@ export default {
bucket: 'reborndev'
})
let that = this
co(function*() {
co(function* () {
for (let index = 0; index < files.length; index++) {
let fileName = nameList[index]
fileName = "/New" + path + fileName + "." + files[index].name.split('.').pop()
var result = yield oss.multipartUpload(fileName, files[index], {
progress: function*(p) {},
progress: function* (p) {},
mime: 'application/octet-stream'
})
successCall(result);
}
}).catch(function(err) {
}).catch(function (err) {
console.log(err);
});
}
},
//上传文件到本地服务器
Vue.prototype.UploadSelfFileT = function(path, files, successCall, ocr) {
Vue.prototype.UploadSelfFileT = function (path, files, successCall, ocr) {
if (files && files.length > 0) {
let nameList = new Array()
for (let index = 0; index < files.length; index++) {
nameList.push(this.random_string());
}
let that = this;
co(function*() {
co(function* () {
for (let index = 0; index < files.length; index++) {
let fileName = nameList[index]
fileName = path + fileName + "." + files[index].name.split('.').pop()
......@@ -621,7 +614,7 @@ export default {
successCall(res);
})
}
}).catch(function(err) {
}).catch(function (err) {
console.log("上传文件出错" + err);
});
}
......@@ -631,7 +624,7 @@ export default {
//type : m_filt 填充 m_w 宽度固定 高度不固定 m_h 高度固定 宽度不固定
// w : 宽
// h : 高
Vue.prototype.compressImg = function(path, type, w, h) {
Vue.prototype.compressImg = function (path, type, w, h) {
let url = this.domainManager().UploadUrl;
let poise = 'm_filt';
w = w ? w : ''
......@@ -643,7 +636,7 @@ export default {
}
return url + '/image/index?filePath=' + path.replace('http://192.168.2.214:8130', '').replace('http://imgfile.oytour.com', '').split('?')[0] + '&process=resize,' + poise + ',w_' + w + ',h_' + h;
}
Vue.prototype.uploadSelfBlob = function(path, files, successCall) {
Vue.prototype.uploadSelfBlob = function (path, files, successCall) {
let that = this;
var uploadUrl = that.domainManager().UploadUrl + "/Upload/UploadBlob?fileType=1&fileLimit=5&&filePath=" + path;
var formData = new FormData();
......@@ -657,7 +650,7 @@ export default {
},
//验证只能输入2位小数【负数:isMinus传true】
Vue.prototype.checkPrice = function(item, filed, isMinus) {
Vue.prototype.checkPrice = function (item, filed, isMinus) {
var value = "" + item[filed]; //转字符串
var t = value.charAt(0);
value = value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
......@@ -675,7 +668,7 @@ export default {
item[filed] = value;
}
//验证输入6位小数汇率
Vue.prototype.checkRate = function(item, filed) {
Vue.prototype.checkRate = function (item, filed) {
var value = "" + item[filed]; //转字符串
var p1 = /[^\d\.]/g; // 过滤非数字及小数点 /g :所有范围中过滤
var p2 = /(\.\d{6})\d*$/g;
......@@ -690,7 +683,7 @@ export default {
}
//验证只能输入整数【负数:isMinus传true】
Vue.prototype.checkInteger = function(item, filed, isMinus) {
Vue.prototype.checkInteger = function (item, filed, isMinus) {
var value = "" + item[filed]; //转字符串
var t = value.charAt(0);
value = value.replace(this.$commonUtils.Regex.isInteger, "");
......@@ -700,7 +693,8 @@ export default {
}
item[filed] = value;
}
Vue.prototype.checkTime = function(item, filed) {
//时间验证
Vue.prototype.checkTime = function (item, filed) {
var date = item[filed];
if (date.length == 1) {
var v1 = date.substring(0, 1);
......@@ -745,7 +739,7 @@ export default {
}
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun
Vue.prototype.moneyFormat = function(value) {
Vue.prototype.moneyFormat = function (value) {
let nStr = Number(value).toFixed(2)
nStr += '';
let x = nStr.split('.');
......@@ -757,8 +751,8 @@ export default {
}
return x1 + x2;
},
Vue.prototype.loadFileICON = function(suffix) {
//文件图标
Vue.prototype.loadFileICON = function (suffix) {
let icons = [{
"name": "\u7f51\u76d8BT\u79bb\u7ebf\u4e0b\u8f7d",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment