修复退菜数量不对问题

This commit is contained in:
YeMingfei666 2024-10-22 08:58:27 +08:00
parent bc3929a32e
commit 9593d8f906
4 changed files with 29 additions and 4 deletions

View File

@ -130,6 +130,12 @@
{{ scope.row.priceAmount }}
</template>
</el-table-column>
<!-- <el-table-column label="操作">
<template v-slot="scope">
<el-button v-if="detail.status=='closed'" type="text" size="mini" @click="tuikuan(scope.row)"><span >退款</span></el-button>
<el-button v-if="detail.status=='unpaid'" type="text" size="mini" @click="tuiCai(scope.row)"><span >退菜</span></el-button>
</template>
</el-table-column> -->
</el-table>
</div>
<!-- </el-tab-pane> -->
@ -200,6 +206,7 @@
import orderEnum from "../orderEnum";
import dayjs from "dayjs";
import { tbOrderInfoDetail, tbOrderInfoData } from "@/api/order";
export default {
data() {
return {
@ -242,6 +249,12 @@ export default {
}
},
methods: {
tuikuan(item){
},
tuiCaidan(item){
},
//
getTableData() {
if (this.type == "3") {

View File

@ -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>

View File

@ -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(",")

View File

@ -1166,6 +1166,7 @@
<return-cart
ref="refReturnCart"
:max="order.selGoods.number"
@confirm="refReturnCartConfirm"
></return-cart>
</div>