Commit c6ebaab4 by 李伟康

commit 提交

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