Commit c6ebaab4 by 李伟康

commit 提交

1 parent a0a8c674
......@@ -109,7 +109,7 @@ const formObject_boutique = [{
key: "customerName",
type: "input",
inputType: "text",
maxlength: 50,
maxlength: 10,
placeholder: '请输入姓名',
required: true
},
......
......@@ -50,6 +50,7 @@
:defaultTabId="tabId"
:show="show"
@changePreView="changePreView"
ref="sku"
/>
</view>
<view
......@@ -140,7 +141,7 @@ export default {
immediate: true,
handler (newval) {
if (newval) {
if (newval) this.changePreView(this.currentItem)
if (newval && this.currentItem) this.changePreView(this.currentItem)
}
}
}
......@@ -233,6 +234,9 @@ export default {
value = this.receptionTrack[key]
value.stayDuration += Number(Date.now() - value.entryTime)
this.$store.dispatch("setReceptionTrack", { key, value })
},
clearSkuState () {
this.$refs.sku.requested = false
}
}
}
......
......@@ -131,15 +131,13 @@ export default {
handler (newval) {
if (newval && !this.requested) {
this.requested = true
let index = this.boutiqueMediaConfig[this.currentCar].findIndex(e => e.tabId == this.tabId)
this.changeTabId(this.tabId, index, false)
this.init(this.defaultTabId)
}
}
},
watchStatus: {
immediate: true,
handler (newval) {
this.requested = false
this.tabId = '1'
}
},
......@@ -158,6 +156,10 @@ export default {
mounted () {
},
methods: {
init (tabId) {
let index = this.boutiqueMediaConfig[this.currentCar].findIndex(e => e.tabId == tabId)
this.changeTabId(tabId, index, false)
},
changeTabId (tabId, index, filter = true) {
if (filter && tabId == this.tabId && index == this.blockIndex) return
this.tabId = tabId
......
......@@ -200,7 +200,9 @@ export default {
}, 1e3)
},
clearCustomerReceivedTimer () {
this.$refs.media1[0].clearCustomerReceivedTimer()
let [reception] = this.$refs.media1
reception?.clearCustomerReceivedTimer()
reception?.clearSkuState()
},
currentImgUrl (receptionRef) {
return receptionRef ? receptionRef[0].currentImgUrl : ''
......
......@@ -159,8 +159,8 @@ export default {
},
watch:{
show: {
handler() {
this.changeIndex(1,true)
handler(newValue) {
if(newValue) this.changeIndex(1,true)
},
immediate:true
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!