Commit 22a79b5f authored by youjie's avatar youjie

直客订单

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