增加单品改价
This commit is contained in:
@@ -639,21 +639,12 @@
|
||||
>
|
||||
退菜
|
||||
</div>
|
||||
<!-- <div
|
||||
class="btn"
|
||||
>
|
||||
单品改价
|
||||
</div>
|
||||
<div
|
||||
class="btn"
|
||||
>
|
||||
等叫
|
||||
</div>
|
||||
<div
|
||||
class="btn no-wrap u-font-12"
|
||||
>
|
||||
取消全部等叫
|
||||
</div> -->
|
||||
<div @click="refPopChangePriceShow"
|
||||
:class="{ disabled: order.selIndex < 0 }"
|
||||
|
||||
class="btn">单品改价</div>
|
||||
<div class="btn">等叫</div>
|
||||
<div class="btn no-wrap u-font-12">取消全部等叫</div>
|
||||
|
||||
<!-- <div
|
||||
class="btn"
|
||||
@@ -1414,6 +1405,12 @@
|
||||
|
||||
<!-- 临时菜 -->
|
||||
<cai-add ref="refPopAddCai" @updateCart="getCart"></cai-add>
|
||||
<!-- 单品改价 -->
|
||||
<cart-change-price
|
||||
ref="refPopChangePrice"
|
||||
:vipUser="vipUser"
|
||||
@updateCart="updateCartItem"
|
||||
></cart-change-price>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1431,6 +1428,7 @@ import chooseDinersNumber from "./components/choose-diners-number.vue";
|
||||
import returnCart from "./components/return-cart.vue";
|
||||
import moneyKeyboard from "./components/money-keyboard.vue";
|
||||
import caiAdd from "./components/popup-linshiCai.vue";
|
||||
import cartChangePrice from "./components/popup-cart-changePrice.vue";
|
||||
import dayjs from "dayjs";
|
||||
import { tbShopInfo } from "@/api/user";
|
||||
import { hasPermission } from "@/utils/limits.js";
|
||||
@@ -1485,6 +1483,7 @@ import { $status } from "@/utils/table.js";
|
||||
let $originTableList = [];
|
||||
export default {
|
||||
components: {
|
||||
cartChangePrice,
|
||||
caiAdd,
|
||||
quansPop,
|
||||
returnCart,
|
||||
@@ -2195,6 +2194,17 @@ export default {
|
||||
this.open(this.$route.query);
|
||||
},
|
||||
methods: {
|
||||
//更新单品改价数据
|
||||
updateCartItem(res){
|
||||
if(res){
|
||||
this.order.list[this.order.selIndex]=res
|
||||
}
|
||||
},
|
||||
// 单品改价
|
||||
refPopChangePriceShow() {
|
||||
const orderGoods = this.order.list[this.order.selIndex];
|
||||
this.$refs.refPopChangePrice.open(orderGoods);
|
||||
},
|
||||
returnProDiscount(row) {
|
||||
console.log(row);
|
||||
//相同商品抵扣券数组
|
||||
@@ -2218,9 +2228,9 @@ export default {
|
||||
},
|
||||
lingshicaiShow() {
|
||||
this.$refs.refPopAddCai.open({
|
||||
masterId:this.masterId,
|
||||
tableId:this.table.tableId,
|
||||
vipUserId:this.vipUser.id,
|
||||
masterId: this.masterId,
|
||||
tableId: this.table.tableId,
|
||||
vipUserId: this.vipUser.id,
|
||||
});
|
||||
},
|
||||
delQuan(row) {
|
||||
@@ -2228,13 +2238,13 @@ export default {
|
||||
console.log(index);
|
||||
if (index != -1) {
|
||||
this.quansSelArr.splice(index, 1);
|
||||
this.quansSelArr
|
||||
.map((v, index) => {
|
||||
return {
|
||||
...v,
|
||||
discountAmount:v.type==2?this.returnProDiscount(v):v.discountAmount,
|
||||
};
|
||||
});
|
||||
this.quansSelArr.map((v, index) => {
|
||||
return {
|
||||
...v,
|
||||
discountAmount:
|
||||
v.type == 2 ? this.returnProDiscount(v) : v.discountAmount,
|
||||
};
|
||||
});
|
||||
}
|
||||
},
|
||||
async getCalcUsablePoints() {
|
||||
@@ -2254,8 +2264,8 @@ export default {
|
||||
this.vipUser.accountPoints,
|
||||
this.points.res.maxUsablePoints || 0
|
||||
);
|
||||
if(!pointsRes.usable){
|
||||
this.points.selected=false
|
||||
if (!pointsRes.usable) {
|
||||
this.points.selected = false;
|
||||
}
|
||||
}
|
||||
return pointsRes;
|
||||
@@ -2301,11 +2311,12 @@ export default {
|
||||
this.createOrder.discount = 1;
|
||||
this.points.selected = "";
|
||||
e.map((v, index) => {
|
||||
return {
|
||||
...v,
|
||||
discountAmount:v.type==2? this.returnProDiscount(v):v.discountAmount,
|
||||
};
|
||||
});
|
||||
return {
|
||||
...v,
|
||||
discountAmount:
|
||||
v.type == 2 ? this.returnProDiscount(v) : v.discountAmount,
|
||||
};
|
||||
});
|
||||
this.quansSelArr = [...e];
|
||||
$goodsPayPriceMap = goodsPayPriceMap;
|
||||
},
|
||||
@@ -4119,9 +4130,7 @@ input[type="number"]::-webkit-outer-spin-button {
|
||||
background-color: #fff;
|
||||
height: 100%;
|
||||
}
|
||||
::v-deep .el-button--text {
|
||||
// color: #000;
|
||||
}
|
||||
|
||||
::v-deep .meal_box .el-button-group {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@@ -4640,13 +4649,6 @@ input[type="number"]::-webkit-outer-spin-button {
|
||||
background-color: #fff;
|
||||
border: 1px solid #dcdfe6;
|
||||
}
|
||||
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
|
||||
// background-color: #22bf64;
|
||||
// border-color: #22bf64;
|
||||
}
|
||||
::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
|
||||
// color: #22bf64;
|
||||
}
|
||||
|
||||
::v-deep .tag-group .el-tag--dark {
|
||||
background: rgba(34, 191, 100, 0.1);
|
||||
|
||||
Reference in New Issue
Block a user