diff --git a/src/views/tool/Instead/components/cart-item.vue b/src/views/tool/Instead/components/cart-item.vue
index d275783..b472feb 100644
--- a/src/views/tool/Instead/components/cart-item.vue
+++ b/src/views/tool/Instead/components/cart-item.vue
@@ -18,6 +18,12 @@
>
{{ item.name }}
+
diff --git a/src/views/tool/Instead/index.vue b/src/views/tool/Instead/index.vue
index 59c1e8b..f19c65a 100644
--- a/src/views/tool/Instead/index.vue
+++ b/src/views/tool/Instead/index.vue
@@ -1069,7 +1069,9 @@
:disabledPayType="disabledPayType"
>
-
挂账
+
挂账
立即支付
@@ -2105,7 +2107,7 @@ export default {
watch: {
yinFuJinE: function (newval) {
if (newval <= 0) {
- this.disabledPayType = ["scanCode", "deposit"];
+ this.disabledPayType = ["scanCode", "deposit","creditBuyer"];
} else {
this.disabledPayType = [];
}
@@ -3882,7 +3884,8 @@ export default {
//设置购物车数据
setCart(res) {
console.log(res);
- const { seatFee } = res;
+ try {
+ const { seatFee } = res;
this.order.seatFee = seatFee
? {
...seatFee,
@@ -3901,6 +3904,32 @@ export default {
this.order.old.list = oldCart ? oldCart : [];
// this.order.gift.list = returnGiftArr(res.records);
console.log(this.order.old.list);
+ } catch (error) {
+ //当购物车数据发生错误时会导致页面报错购物车商品不展示
+ this.$confirm('购物车数据结构错误,是否清空购物车商品?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ $clearCart({
+ masterId: this.masterId,
+ tableId: this.table.tableId,
+ }).then((res) => {
+ this.order.list = [];
+ this.changeOrderSel(-1);
+ this.$message({
+ type: "success",
+ message: "清除成功!",
+ });
+ });
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '已取消'
+ });
+ });
+ }
+
},
//获取购物车数据
async getCart() {