Commit 22a79b5f authored by youjie's avatar youjie

直客订单

parent 6dcad870
......@@ -413,6 +413,8 @@ export default {
},
handleHotTagClick(item) {
this.setectHotTag = item.Id
let qsearchDate = this.searchDate
let qsearchEndDate = this.searchEndDate
let val = item.Name
if(val!='' && typeof val == 'string'){
this.searchKey=val
......@@ -429,6 +431,9 @@ export default {
if(urlType=='SearchDida'||urlType=='searchDida'){
qsearchDate = date.formatDate(date.addToDate(new Date(), { days: 8 }), "YYYY/MM/DD")
qsearchEndDate = date.formatDate(date.addToDate(new Date(), { days: 9 }), "YYYY/MM/DD")
}else{
qsearchDate = this.searchDate
qsearchEndDate = this.searchEndDate
}
}
......@@ -440,8 +445,8 @@ export default {
}else{
this.CommonJump(urlName, {
qsearchKey: this.searchKey,
qsearchDate: this.searchDate,
qsearchEndDate: this.searchEndDate,
qsearchDate,
qsearchEndDate,
areaId: item.Id,
areaName: item.Name
});
......@@ -523,7 +528,6 @@ export default {
let currentUrlArr = currentUrl.split('/')
let urlType = currentUrlArr[4].split('?')[0]
console.log(urlType,'-----')
if(urlType){
urlName = `/${urlType}`
if(urlType=='SearchDida'||urlType=='searchDida'){
......
......@@ -571,6 +571,48 @@ export default {
};
},
watch: {
// '$route':{
// handler(newVal, oldVal) {
// this.msg = JSON.parse(JSON.stringify(this.qMsg));
// this.msg.priceRange = {
// min: 1,
// max: 100000,
// };
// this.msg.StartPrice = 0;
// this.msg.EndPrice = 100000;
// this.dateRange = { from: this.msg.StartDate, to: this.msg.EndDate };
// if(newVal!=oldVal){
// this.resetQuery();
// }
// var qsearchKey = this.getUrlKey("qsearchKey", window.location.href);
// var qsearchDate = this.getUrlKey("qsearchDate", window.location.href);
// var qsearchEndDate = this.getUrlKey("qsearchEndDate", window.location.href);
// var areaId = this.getUrlKey("areaId", window.location.href);
// var areaName = this.getUrlKey("areaName", window.location.href);
// if (qsearchKey) {
// this.msg.KeyWords = qsearchKey;
// }else if (areaName) {
// this.msg.KeyWords = areaName;
// }else this.msg.KeyWords = ''
// if(this.msg.KeyWords) this.searchCity();
// if (qsearchDate) {
// this.msg.StartDate = qsearchDate;
// }else {
// this.msg.StartDate = date.formatDate(date.addToDate(new Date(), { days: 8 }), "YYYY/MM/DD")
// }
// if (qsearchEndDate) {
// this.msg.EndDate = qsearchEndDate;
// }else {
// this.msg.EndDate = date.formatDate(date.addToDate(new Date(), { days: 9 }), "YYYY/MM/DD")
// }
// this.resetQuery();
// },
// deep: true,
// immediate: true,
// },
qMsg: {
handler(newVal, oldVal) {
this.msg = JSON.parse(JSON.stringify(this.qMsg));
......@@ -588,9 +630,12 @@ export default {
this.msg.EndDate = date.formatDate(new Date(this.qMsg.EndDate), "YYYY/MM/DD")
}
this.dateRange = { from: this.msg.StartDate, to: this.msg.EndDate };
if(newVal!=oldVal){
this.resetQuery();
if(this.msg.KeyWords!=''){
this.handleCitiesTicked = []
this.handleRegionTicked = []
}
this.resetQuery();
console.log('-----222')
},
deep: true,
immediate: true,
......@@ -598,13 +643,12 @@ export default {
},
created() {
this.getCity()
this.initAreaList();
this.initGoods();
this.getSorts()
},
mounted() {
this.areaTicked = this.msg.Country ? [this.msg.Country] : (this.msg.Countrys ? this.msg.Countrys : []);
// this.CitiesTicked = this.msg.Country ? [this.msg.Country] : (this.msg.Countrys ? this.msg.Countrys : []);
var CategoryName = this.getUrlKey("CategoryName", window.location.href);
if (CategoryName) {
let list = this.goodsType.find(
......@@ -698,7 +742,8 @@ export default {
},
// 关键字搜索城市
searchCity() {
if(this.CitiesList.length||this.regionList.length||this.searchAdd.name=='') return this.showCity = false
console.log(this.msg.KeyWords)
if(this.CitiesList.length||this.regionList.length||this.msg.KeyWords=='') return this.showCity = false
this.msg.KeyWords = this.searchAdd.name
this.apipost('dmc_post_B2BAndB2CGetDestination', {
KeyWords: this.msg.KeyWords
......@@ -740,10 +785,10 @@ export default {
this.CitiesListAll.push(y)
})
})
this.msg.CityCode = data[0].CityList[0].CityCode
this.msg.CityName = data[0].CityList[0].CityName_CN
this.msg.CityCode2 = data[0].CityList[0].CityCode
this.CitiesTicked = [data[0].CityList[0].CityCode]
this.msg.CityCode = this.msg.KeyWords?'':data[0].CityList[0].CityCode
this.msg.CityName = this.msg.KeyWords?'':data[0].CityList[0].CityName_CN
this.msg.CityCode2 = this.msg.KeyWords?'':data[0].CityList[0].CityCode
this.CitiesTicked = this.msg.KeyWords?[]:[data[0].CityList[0].CityCode]
this.CitiesList = data;
this.CitiesJSON = JSON.parse(JSON.stringify(this.CitiesList));
this.getRegion()
......@@ -826,37 +871,6 @@ export default {
this.resetQuery();
},
initAreaList() {
this.apipost(
"dmc_post_GetDiDaCountryList", {},
res => {
let data = res.data.data;
let arrList = function(list){
list.forEach(x => {
x.Id = x.ISOCountryCode;
x.Name = x.CountryName_CN;
x.checked = false;
x.explsed = false;
x.isShow = true;
})
}
arrList(data);
for (let i = 0; i < data.length; i++) {
if (data[i].Id == this.msg.Country) {
this.areaTicked.push(data[i].Id);
}
}
this.areaList = [
{
Id: 0,
Name: '國家',
children: data
}
]
this.areaListJSON = JSON.parse(JSON.stringify(this.areaList));
},
);
},
changeExplesdHandler(x) {
x.explsed = !x.explsed;
if (x.SubList) {
......@@ -1055,7 +1069,6 @@ export default {
this.DataList = [];
this.PageCount = 0;
this.TotalCount = 0;
this.apipost(
"dmc_post_B2BAndB2CGetDidaHotelPage",
this.msg,
......
......@@ -839,6 +839,7 @@ export default {
PlatformTax: 0,//平台税金默认0
Income: 0,//已收默认0
Refund: 0,//退款金额默认0
DOrderType: 1,//1直客订单
},
(r) => {
if (r.data.resultCode == 1) {
......
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