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

1

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