Commit fe764905 authored by youjie's avatar youjie

修复bug

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