fix: 商品锁定
This commit is contained in:
@@ -244,9 +244,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
var target = options.value.find(x => x.option_config.binding_goods_id == param.data.surveyWare.id);
|
var target = options.value.find(x => x.option_config.binding_goods_id == param.data.surveyWare.id);
|
||||||
if(!target) return;
|
if(!target) return;
|
||||||
|
|
||||||
var arr = [...new Set([...Object.keys(props.answer || {}), target.option_key])];
|
var arr = [...new Set([...Object.keys(props.answer || {}), target.option_key])];
|
||||||
debugger
|
|
||||||
changeValue(arr);
|
changeValue(arr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
@onPageCompletion="onPageCompletion"
|
@onPageCompletion="onPageCompletion"
|
||||||
:elCart="elCart"
|
:elCart="elCart"
|
||||||
:surveyId="surveyId"
|
:surveyId="surveyId"
|
||||||
|
:lockedWare="lockedWare"
|
||||||
@onBehaviorFlush="onBehaviorFlush"
|
@onBehaviorFlush="onBehaviorFlush"
|
||||||
/>
|
/>
|
||||||
<div class="page pageNext" @click="next">
|
<div class="page pageNext" @click="next">
|
||||||
@@ -130,7 +131,11 @@ export default defineComponent({
|
|||||||
options() {
|
options() {
|
||||||
if(!this.question.list[0]) return [];
|
if(!this.question.list[0]) return [];
|
||||||
return this.question.list[0].options;
|
return this.question.list[0].options;
|
||||||
}
|
},
|
||||||
|
lockedWare() {
|
||||||
|
if(!this.config.is_initialize) return null;
|
||||||
|
return this.ware;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
:page="page"
|
:page="page"
|
||||||
:sceneAction="sceneAction"
|
:sceneAction="sceneAction"
|
||||||
:surveyId="surveyId"
|
:surveyId="surveyId"
|
||||||
|
:lockedWare="lockedWare"
|
||||||
@onLoadingCompletion="onLoadingCompletion"
|
@onLoadingCompletion="onLoadingCompletion"
|
||||||
@onFromSceneHoldToShelf="onFromSceneHoldToShelf"
|
@onFromSceneHoldToShelf="onFromSceneHoldToShelf"
|
||||||
@onBehaviorFlush="onBehaviorFlush"
|
@onBehaviorFlush="onBehaviorFlush"
|
||||||
@@ -95,6 +96,10 @@ export default defineComponent({
|
|||||||
(x) => x.planetid == this.config.ware
|
(x) => x.planetid == this.config.ware
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
lockedWare() {
|
||||||
|
if(!this.config.is_initialize) return null;
|
||||||
|
return this.ware;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import { SurveyViewer } from "./shelves.module";
|
import { SurveyViewer } from "./shelves.module";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: ["surveyId", "shopData", "page", "sceneAction", "elCart"],
|
props: ["surveyId", "shopData", "page", "sceneAction", "elCart", "lockedWare"],
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => this.tryInitView());
|
this.$nextTick(() => this.tryInitView());
|
||||||
@@ -51,6 +51,14 @@ export default {
|
|||||||
if (this.viewer_) {
|
if (this.viewer_) {
|
||||||
this.viewer_.arrange(newVal).then(() => {
|
this.viewer_.arrange(newVal).then(() => {
|
||||||
this.$emit("onPageCompletion");
|
this.$emit("onPageCompletion");
|
||||||
|
|
||||||
|
if(!this.lockedWare) return;
|
||||||
|
|
||||||
|
// #20221018
|
||||||
|
this.viewer_.hold({
|
||||||
|
wareId: this.lockedWare?.planetid,
|
||||||
|
keepHold: true,
|
||||||
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user