-->
-
![]()
+
+
+
+ 未找到相关商品
+
@@ -1166,7 +1178,7 @@
@@ -1317,7 +1329,7 @@ export default {
productId: "",
categoryId: "",
page: 1,
- size: 300,
+ size: 20,
},
loading: false,
total: 0,
@@ -1581,6 +1593,11 @@ export default {
},
},
watch: {
+ "goods.query.categoryId": function (newval) {
+ this.goods.query.page = 1;
+ this.goods.list = [];
+ this.getGoods();
+ },
"useTypes.sel": function (newval, oldval) {
console.log(newval);
this.setPostPay();
@@ -1740,15 +1757,20 @@ export default {
this.open(this.$route.query.tableId ? this.$route.query : "");
},
methods: {
+ loadMoreGoods() {
+ if (this.goods.query.page * this.goods.query.size < this.goods.total) {
+ this.goods.query.page = this.goods.query.page + 1;
+ this.getGoods();
+ }
+ },
async shoukuanClick() {
this.canShoukuan = await hasPermission("允许收款");
- return this.canShoukuan;
+ return this.canShoukuan;
},
// 打开页面
async xiadanClick() {
this.canXiadan = await hasPermission("允许下单");
- return this.canXiadan;
-
+ return this.canXiadan;
},
changeOrderExtraSel(index, canChangeNumber, placeNum) {
// console.log(index,canChangeNumber,placeNum)
@@ -1856,7 +1878,7 @@ export default {
return;
}
await this.returnCreateOrderData();
- console.log( this.createOrder.data )
+ console.log(this.createOrder.data);
this.order.payType = "scanCode";
this.payTypeItemClick({ payType: "scanCode" });
this.payBeforeClear();
@@ -2048,7 +2070,7 @@ export default {
}
if (item.payType == "scanCode") {
//扫码支付
- return this.refToggle("refWxScanCode", true,this.createOrder.data);
+ return this.refToggle("refWxScanCode", true, this.createOrder.data);
}
},
ChangeDiscount(discount) {
@@ -2182,7 +2204,7 @@ export default {
return this.refChooseUserOpen();
}
if (this.order.payType == "scanCode") {
- return this.refToggle("refWxScanCode", true,this.createOrder.data);
+ return this.refToggle("refWxScanCode", true, this.createOrder.data);
}
if (this.order.payType == "deposit") {
return this.refToggle("refScanCode", true);
@@ -2250,7 +2272,7 @@ export default {
if (!canXiadan) {
return;
}
- }else{
+ } else {
//去结算
const canJiesuan = await this.shoukuanClick();
if (!canJiesuan) {
@@ -2273,14 +2295,15 @@ export default {
console.log(this.order.orderId);
let res = "";
try {
- const seatFee = await $choseCount({
- masterId: this.masterId,
- tableId: this.table.tableId,
- num: this.perpole,
- });
- this.order.seatFee = seatFee;
-
- this.order.seatFee = res;
+ if (!this.shopInfo.isTableFee) {
+ const seatFee = await $choseCount({
+ masterId: this.masterId,
+ tableId: this.table.tableId,
+ num: this.perpole,
+ });
+ this.order.seatFee = seatFee;
+ this.order.seatFee = res;
+ }
res = await $createOrder({
masterId: this.order.masterId || this.masterId,
vipUserId: this.vipUser.id,
@@ -2316,23 +2339,15 @@ export default {
},
// 获取取餐号
- getMasterId() {
- // if(!this.table.tableId){
- // return this.$message.error("请选择桌台");
- // }
- if (this.table.tableId) {
- return $getMasterId({
+ async getMasterId() {
+ const res=await $getMasterId({
tableId: this.table.tableId,
orderId: this.table.orderId,
vipUserId: this.vipUser.id,
- useType: this.useTypes.sel == "takeout" ? "takeout" : "",
- });
- } else {
- // return $getMasterId({
- // useType:'takeout',
- // vipUserId: this.vipUser.id,
- // });
- }
+ useType: this.useTypes.sel == "takeout" ? "takeout" : ""
+ })
+ this.masterId=res.masterId;
+ return res
},
onSelGoodsSkuClose() {
this.selGoods.isEdit = false;
@@ -3057,9 +3072,9 @@ export default {
},
//根据右侧商品单规格多规格做不同处理
async goodsClick(item) {
- if (!this.table) {
- return this.$message.error("暂不支持无桌台下单,请先选择桌台");
- }
+ // if (!this.table) {
+ // return this.$message.error("暂不支持无桌台下单,请先选择桌台");
+ // }
if (item.typeEnum === "sku") {
this.selGoods.data = item;
this.selGoods.skuMap = {};
@@ -3125,8 +3140,9 @@ export default {
});
return isShow;
});
- console.log($goodsMap);
- this.goods.list = goods;
+ for (let i in goods) {
+ this.goods.list.push(goods[i]);
+ }
this.goods.total = res.total;
this.$goodsData = goods;
},
@@ -3976,11 +3992,12 @@ input[type="number"]::-webkit-outer-spin-button {
.goods-list {
display: flex;
flex-wrap: wrap;
-
+ min-height: 10px;
.goods-item {
position: relative;
cursor: pointer;
- min-width: 98px;
+ // min-width: 98px;
+ min-width: 100px;
max-width: 100px;
height: 100px;
// flex: 1;
@@ -4448,6 +4465,11 @@ input[type="number"]::-webkit-outer-spin-button {
::v-deep .cashier_left .el-form-item__label {
text-align: left;
}
+::v-deep .goods .el-image {
+ display: flex;
+ width: 100%;
+ justify-content: center;
+}
.cashier_left .detail_box .usercard .info .nickname .vip_level {
font-size: 12px;
padding: 0 5px;