Commit 232d624c authored by 邓春圆's avatar 邓春圆

修改商品报错,bug修复2

parent 6d9de9f5
...@@ -221,7 +221,7 @@ ...@@ -221,7 +221,7 @@
<!-- <el-option v-for="item in preferentialList" :value="item.couponId" :label="item.titleZh" :key="item.couponId" :disabled="item.mandatory">{{item.titleZh}}</el-option>--> <!-- <el-option v-for="item in preferentialList" :value="item.couponId" :label="item.titleZh" :key="item.couponId" :disabled="item.mandatory">{{item.titleZh}}</el-option>-->
<!-- </el-select>--> <!-- </el-select>-->
<div style="width: 300px;height: 400px;border: 1px solid;overflow-y: auto"> <div style="width: 300px;height: 400px;border: 1px solid;overflow-y: auto">
<div @click="selectMoveAbout(item)" style="display: flex;justify-content: space-between; align-items: center;" :style="{'cursor':item.mandatory ? 'no-drop' : 'pointer' }" v-for="item in preferentialList"> <div @click="selectMoveAbout(item)" style="display: flex;justify-content: space-between; align-items: center;" :style="{'cursor':item.mandatory ? 'no-drop' : 'pointer' }" v-for="item in preferentialList" :key="item.couponId" >
<div> <div>
{{$l(item, 'title')}} {{$l(item, 'title')}}
</div> </div>
...@@ -609,7 +609,6 @@ export default { ...@@ -609,7 +609,6 @@ export default {
}); });
}, },
selectMoveAbout(val){ selectMoveAbout(val){
console.log(val,'val')
if(!val.mandatory){ if(!val.mandatory){
let index = this.form.couponIds.findIndex(i => val.couponId == i) let index = this.form.couponIds.findIndex(i => val.couponId == i)
if(index >= 0){ if(index >= 0){
...@@ -619,6 +618,7 @@ export default { ...@@ -619,6 +618,7 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.form.couponIds.splice(index,1) this.form.couponIds.splice(index,1)
this.$forceUpdate()
}).catch(() => { }).catch(() => {
}); });
...@@ -629,6 +629,7 @@ export default { ...@@ -629,6 +629,7 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.form.couponIds.push(val.couponId) this.form.couponIds.push(val.couponId)
this.$forceUpdate()
}).catch(() => { }).catch(() => {
}); });
......
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