Commit fe764905 authored by youjie's avatar youjie

修复bug

parent 4ec0f011
......@@ -773,13 +773,11 @@ export default {
}
},
methods: {
clearQuery() {
this.msg.CityCode = ''
this.msg.CityCode2 = ''
this.msg.CityName = ''
this.msg.KeyWords = ''
this.msg.KeyWords2 = ''
this.msg.hotelId = ''
clearQuery(msg) {
this.msg = {
...this.msg,
...msg
}
setTimeout(() => {
this.resetQuery()
}, 200);
......
......@@ -127,6 +127,7 @@
</div>
</template>
<script>
import { date } from 'quasar'
export default {
props: {
msg: {
......@@ -200,7 +201,9 @@ export default {
handler(newVal, oldVal) {
this.HotalMsg = {
...this.HotalMsg,
...JSON.parse(JSON.stringify(newVal))
...JSON.parse(JSON.stringify(newVal)),
StartDate: newVal.StartDate? newVal.StartDate:date.formatDate(date.addToDate(new Date(), { days: 8 }), "YYYY/MM/DD"),
EndDate: newVal.EndDate? newVal.EndDate:date.formatDate(date.addToDate(new Date(), { days: 9}), "YYYY/MM/DD"),
}
},
deep: true
......@@ -225,6 +228,8 @@ export default {
this.getHotalList(1)
},
changeType(y){
this.HotalMsg.StartDate = this.HotalMsg.StartDate? this.HotalMsg.StartDate:date.formatDate(date.addToDate(new Date(), { days: 8 }), "YYYY/MM/DD")
this.HotalMsg.EndDate = this.HotalMsg.EndDate? this.HotalMsg.EndDate:date.formatDate(date.addToDate(new Date(), { days: 9}), "YYYY/MM/DD")
if(y.Type==1){
this.HotalMsg.CityCode = y.Id
this.HotalMsg.CityCode2 = y.Id
......@@ -237,6 +242,7 @@ export default {
}else if(y.Type==2){
this.HotalMsg.KeyWords2 = y.Name
this.HotalMsg.hotelId = y.Id
this.$emit('change', this.HotalMsg,y)
this.showKeyWordsList = false
this.showSplitPannel = false
......@@ -320,7 +326,9 @@ export default {
this.HotalMsg.KeyWords = ''
this.HotalMsg.KeyWords2 = ''
this.HotalMsg.hotelId = ''
this.$emit('clear')
this.HotalMsg.StartDate = this.HotalMsg.StartDate?this.HotalMsg.StartDate:date.formatDate(date.addToDate(new Date(), { days: 8 }), "YYYY/MM/DD")
this.HotalMsg.EndDate = this.HotalMsg.EndDate?this.HotalMsg.EndDate:date.formatDate(date.addToDate(new Date(), { days: 9}), "YYYY/MM/DD")
this.$emit('clear',this.HotalMsg)
return
this.showSplitPannel = true
this.showKeyWordsList = false
......@@ -370,6 +378,8 @@ export default {
changeCity(y){
this.HotalMsg.CityName = y.CityName
this.HotalMsg.CityCode = y.CityCode
this.HotalMsg.StartDate = this.HotalMsg.StartDate?this.HotalMsg.StartDate:date.formatDate(date.addToDate(new Date(), { days: 8 }), "YYYY/MM/DD")
this.HotalMsg.EndDate = this.HotalMsg.EndDate?this.HotalMsg.EndDate:date.formatDate(date.addToDate(new Date(), { days: 9}), "YYYY/MM/DD")
if(this.Type>0) {
this.$emit('changeCity', y)
this.showSplitPannel = false
......
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