修复退菜数量不对问题
This commit is contained in:
@@ -23,7 +23,7 @@ import { formatPrice } from "@/utils/format";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
modelValue: {
|
||||
value: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
@@ -37,6 +37,9 @@ export default {
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
value(val){
|
||||
this.number = val;
|
||||
},
|
||||
min(val) {
|
||||
this.number = val;
|
||||
},
|
||||
@@ -85,7 +88,7 @@ export default {
|
||||
},
|
||||
},
|
||||
mounted(){
|
||||
this.number = this.modelValue;
|
||||
this.number = this.value;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
<div class="flex u-row-between u-p-b-20 border-bottom">
|
||||
<span>退菜数量</span>
|
||||
<div class="u-flex">
|
||||
<number-box v-model="number" :min="1" :max="2"></number-box>
|
||||
<number-box v-model="number" :min="1" :max="max"></number-box>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-m-t-10 u-font-12 color-999">
|
||||
菜品已点数量 2 份
|
||||
菜品已点数量 {{max}} 份
|
||||
</div>
|
||||
<div class="u-m-t-26">
|
||||
<div><span>退菜原因</span> <span class="color-red">*</span></div>
|
||||
@@ -50,6 +50,10 @@ export default {
|
||||
default:()=>{
|
||||
return{}
|
||||
}
|
||||
},
|
||||
max:{
|
||||
type:Number,
|
||||
default:1
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -73,6 +77,8 @@ export default {
|
||||
},
|
||||
reset() {
|
||||
this.note = "";
|
||||
this.number=1;
|
||||
console.log(this.number)
|
||||
},
|
||||
delTag(index) {
|
||||
this.tags.splice(index, 1);
|
||||
@@ -85,9 +91,11 @@ export default {
|
||||
},
|
||||
open(note) {
|
||||
this.show = true;
|
||||
this.number=1;
|
||||
},
|
||||
close() {
|
||||
this.show = false;
|
||||
this.number=1;
|
||||
},
|
||||
confirm() {
|
||||
const selTag=this.tags.filter(item=>item.checked).map(item=>item.label).join(",")
|
||||
|
||||
@@ -1166,6 +1166,7 @@
|
||||
|
||||
<return-cart
|
||||
ref="refReturnCart"
|
||||
:max="order.selGoods.number"
|
||||
@confirm="refReturnCartConfirm"
|
||||
></return-cart>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user