diff --git a/src/utils/table.js b/src/utils/table.js new file mode 100644 index 0000000..110d764 --- /dev/null +++ b/src/utils/table.js @@ -0,0 +1,34 @@ +export const $status= { + pending: { + label: "挂单中", + type: "#E6A23C", + }, + using: { + label: "开台中", + type: "#fa5555", + }, + paying: { + label: "结算中", + type: "#E6A23C", + }, + idle: { + label: "空闲", + type: "#3F9EFF", + }, + subscribe: { + label: "预定", + type: "rgb(34, 191, 100)", + }, + closed: { + label: "关台", + type: "rgb(221,221,221)", + }, + // opening: { + // label: "开台中", + // type: "#67C23A", + // }, + cleaning: { + label: "待清台", + type: "#FAAD14", + } +} \ No newline at end of file diff --git a/src/views/table/table_list.vue b/src/views/table/table_list.vue index d4fc486..f45f720 100644 --- a/src/views/table/table_list.vue +++ b/src/views/table/table_list.vue @@ -205,7 +205,7 @@ - + + + 包 + 退 + + + + + {{ item.name }} + + + + + + {{ item.name }} + 赠 + + + {{ item.specSnap }} + + + + + + X{{ item.totalNumber }} + X{{ item.number }} + + + + + + + + + + + + + ¥0 + + ¥{{ item.totalAmount }} + ¥{{ item.salePrice }} + + + + + + + + \ No newline at end of file diff --git a/src/views/tool/Instead/components/choose-diners-number.vue b/src/views/tool/Instead/components/choose-diners-number.vue new file mode 100644 index 0000000..b4e74c6 --- /dev/null +++ b/src/views/tool/Instead/components/choose-diners-number.vue @@ -0,0 +1,270 @@ + + + + + + 清空 + + + 位 + + + + + 取消 + 确定 + + + + + + + + + \ No newline at end of file diff --git a/src/views/tool/Instead/components/choose-table-master.vue b/src/views/tool/Instead/components/choose-table-master.vue new file mode 100644 index 0000000..81b10f5 --- /dev/null +++ b/src/views/tool/Instead/components/choose-table-master.vue @@ -0,0 +1,287 @@ + + + + + + + 桌台号 + + + 自定义取餐号 + + + + + + + {{ item.name }} + + {{ status[item.status] ? status[item.status].label : "" }} + + + + + + + + + + + + 取消 + 确定 + + + + + + + + + \ No newline at end of file diff --git a/src/views/tool/Instead/components/choose-user.vue b/src/views/tool/Instead/components/choose-user.vue new file mode 100644 index 0000000..f834fca --- /dev/null +++ b/src/views/tool/Instead/components/choose-user.vue @@ -0,0 +1,289 @@ + + + + + + + + + + + + 搜索 + + 不选择用户 + + + + + + + + + + + + + + + + + + + {{ scope.row.nickName }} + + + + + + + + 会员等级{{ scope.row.isVip }} + 否 + + + + + + + + 选择 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/tool/Instead/components/discount.vue b/src/views/tool/Instead/components/discount.vue new file mode 100644 index 0000000..6f21835 --- /dev/null +++ b/src/views/tool/Instead/components/discount.vue @@ -0,0 +1,206 @@ + + + + + + + ¥{{ form.money }} + + + + + 元 + + + + + % + + + + + 元 + + + + 取消 + 确定 + + + + + + + + + \ No newline at end of file diff --git a/src/views/tool/Instead/components/keyboard copy.vue b/src/views/tool/Instead/components/keyboard copy.vue new file mode 100644 index 0000000..8436f1f --- /dev/null +++ b/src/views/tool/Instead/components/keyboard copy.vue @@ -0,0 +1,319 @@ + + + + + + {{ number }} + + + + + + + + 1 + 2 + 3 + + + 4 + 5 + 6 + + + 7 + 8 + 9 + + + + + + 0 + + + + + + + + + + + + 确认 + + + + + + + \ No newline at end of file diff --git a/src/views/tool/Instead/components/keyboard.vue b/src/views/tool/Instead/components/keyboard.vue new file mode 100644 index 0000000..8436f1f --- /dev/null +++ b/src/views/tool/Instead/components/keyboard.vue @@ -0,0 +1,319 @@ + + + + + + {{ number }} + + + + + + + + 1 + 2 + 3 + + + 4 + 5 + 6 + + + 7 + 8 + 9 + + + + + + 0 + + + + + + + + + + + + 确认 + + + + + + + \ No newline at end of file diff --git a/src/views/tool/Instead/components/money-keyboard.vue b/src/views/tool/Instead/components/money-keyboard.vue new file mode 100644 index 0000000..11e1909 --- /dev/null +++ b/src/views/tool/Instead/components/money-keyboard.vue @@ -0,0 +1,339 @@ + + + + + + + ¥ + + + + + + + + + + 1 + 2 + 3 + + + + + + + + 4 + 5 + 6 + 清空 + + + 7 + 8 + 9 + + + + . + 0 + 00 + + + 确认 + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/tool/Instead/components/note.vue b/src/views/tool/Instead/components/note.vue new file mode 100644 index 0000000..86797ee --- /dev/null +++ b/src/views/tool/Instead/components/note.vue @@ -0,0 +1,109 @@ + + + + + + {{ tag }} + + + + + 取消 + + 确定 + + + + + + \ No newline at end of file diff --git a/src/views/tool/Instead/components/order-btn.js b/src/views/tool/Instead/components/order-btn.js new file mode 100644 index 0000000..33c7922 --- /dev/null +++ b/src/views/tool/Instead/components/order-btn.js @@ -0,0 +1,62 @@ +export const orderBtns=[ + { + text: "删除", + disabled: false, + }, + { + text: "规格", + disabled: true, + }, + { + text: "菜品打折", + disabled: false, + }, + { + text: "赠菜", + disabled: false, + }, + { + text: "赠菜", + disabled: false, + }, + { + text: "打包", + disabled: false, + }, + { + text: "等叫", + disabled: false, + }, + { + text: "整单等叫", + disabled: false, + }, + { + text: "单品备注", + disabled: false, + }, + { + text: "退菜", + disabled: false, + }, + { + text: "附加费", + disabled: false, + }, + { + text: "存单", + disabled: false, + }, + { + text: "取单", + disabled: false, + }, + { + text: "修改价格", + disabled: false, + }, + { + text: "撤单", + disabled: false, + } +] \ No newline at end of file diff --git a/src/views/tool/Instead/components/pay-type.vue b/src/views/tool/Instead/components/pay-type.vue new file mode 100644 index 0000000..692dd8c --- /dev/null +++ b/src/views/tool/Instead/components/pay-type.vue @@ -0,0 +1,76 @@ + + + 选择支付方式 + + + + + {{ item.payName }} + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/tool/Instead/components/return-cart copy.vue b/src/views/tool/Instead/components/return-cart copy.vue new file mode 100644 index 0000000..d160c95 --- /dev/null +++ b/src/views/tool/Instead/components/return-cart copy.vue @@ -0,0 +1,109 @@ + + + + 撤单原因 * + + + + + {{ tag }} + + + + + + + 打印退菜单 + + + 取消 + 确定 + + + + + + \ No newline at end of file diff --git a/src/views/tool/Instead/components/return-cart.vue b/src/views/tool/Instead/components/return-cart.vue new file mode 100644 index 0000000..61678f2 --- /dev/null +++ b/src/views/tool/Instead/components/return-cart.vue @@ -0,0 +1,109 @@ + + + + 退菜原因 * + + + + + {{ tag.label }} + + + + + + + 打印退菜单 + + + 取消 + 确定 + + + + + + \ No newline at end of file diff --git a/src/views/tool/Instead/components/scan-pay.vue b/src/views/tool/Instead/components/scan-pay.vue new file mode 100644 index 0000000..255d3cd --- /dev/null +++ b/src/views/tool/Instead/components/scan-pay.vue @@ -0,0 +1,178 @@ + + + + + {{ item.text }} + + + + + + + + + + + + + + + + 取消 + 确定 + + + + + + + + + 32.00元 + + + 等待用户支付 + + + + + + + + + + \ No newline at end of file diff --git a/src/views/tool/Instead/index.vue b/src/views/tool/Instead/index.vue new file mode 100644 index 0000000..3e389ee --- /dev/null +++ b/src/views/tool/Instead/index.vue @@ -0,0 +1,4230 @@ + + + + + + + + {{ title }} + + + + + {{ postPay ? "后付费" : "先付费" }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ postPay ? "后付费" : "先付费" }} + + + + 先付费 + 后付费 + + + + + + + + + + + + + + + + + + + + + + + + + + 选择用户 + + + + + + + + {{ vipUser.nickName }} + + 余额:{{ vipUser.amount }} + + + + + + + + {{ item.name }} + + + + + + + + {{ item.name }} + + {{ + status[item.status] ? status[item.status].label : "" + }} + + + + {{ table ? "桌台号:" + table.name : "桌台号/取餐号" }} + + + + + + + + 就餐人数:{{ perpole }}位 + + + + + + 就餐人数:-位 + + + + + 清空 + + + + + + + + + + + + 以下是优惠菜品 + + + + + + + + + + + + 第{{ orderItem.placeNum }}次下单 + + + + + + + 餐位费 + + + + 订单备注: {{ note.content }} + + + + + + + 已优惠¥{{ allGiftMoney | to2 }} + + + + + 打印制作单 + + + 共{{ allNumber }}件 + ¥{{ allPrice }} + + + + + + + 加菜/返回 + + + + 立即支付 + + + + + + + 仅下单 + + + + + + + 去结账 + + + + + + + + + + + - + + + + + + + + + + + + 规格 + + + {{ returnGiftText }} + + + {{ returnPackText }} + + + 删除 + + + + 存单 + + + 取单 + {{ + prveOrder.list.length + }} + + + + + 整单备注 + + 退菜 + + + + + + + + + + + + + 展开 + + + + + {{ item.name }} + {{ + item.name + }} + + + + + 未找到相关商品 + + + + + + + + + + + + + + + + + + + + {{ item | returntypeName }} + + + {{ item.name }} + + + + + + + + + + + + + ¥{{ item.lowPrice }} + + + 售罄 + + + + + + + + + + + + + + + + + + {{ + vipUser.id ? vipUser.nickName : "服务员下单" + }} + + + 余额:{{ vipUser.amount | to2 }} + 积分:{{ vipUser.totalScore }} + + + + + + + + + 整单打折/减免 + + + + + + + + + 立即支付 + + + + + + + 账单明细 + + + + 会员优惠 + -¥0.00 + + + 门店优惠 + -¥0.00 + + + 满减优惠 + -¥0.00 + + + 优惠券 + -¥0.00 + + + 整单改价 + + -¥{{ + ((1 - createOrder.discount) * createOrder.data.amount) + | to2 + }} + + + + 打包费 + + ¥{{ createOrder.data.packFee || "0.00" }} + + + + 餐位费/附加费 + + ¥{{ order.seatFee.totalAmount | to2 }} + + + + 总价 + + ¥{{ createOrder.data.amount | to2 }} + + + + 抹零 + -¥0.00 + + + 应付金额 + + ¥{{ + (createOrder.data.amount * createOrder.discount) | to2 + }} + + + + + + + + + + + + + + + + + + {{ item.name }} + ({{ item.values.length }}选1) + + + + + {{ val.name }} + + + + + + + + + + ¥{{ skuGoods.data.salePrice | to2 }} + + {{ skuText }} + 库存:{{ skuGoods.data.stockNumber || 0 }} + + + + + + + + + + + + + + 已下架 + + + + 库存不足 + + + 确定 + + + + + + + + + + + + 数量 + + + {{ keyborad.number }} + + + + + + 1 + 2 + 3 + + + 4 + 5 + 6 + + + 7 + 8 + 9 + + + + 0 + + + + + + + + + + + + 确认 + + + + + + + + + + + {{ index + 1 }} + ¥{{ item.totalAmount }} + + {{ item.created_at || "" }} + ({{ item.totalNumber }}件) + + + + + + + + + + + {{ item.name }} + x{{ item.number }} + ¥{{ item.totalAmount || 0 }} + + + + {{ item.specSnap | formatSpecSnap }} + + + + + + + + + + 确认此单 + + 删除此单 + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/tool/Instead/util.js b/src/views/tool/Instead/util.js new file mode 100644 index 0000000..2ec3413 --- /dev/null +++ b/src/views/tool/Instead/util.js @@ -0,0 +1,47 @@ +//判断商品是否可以下单 +export function isCanBuy(goods,isStock) { + return goods.isGrounding && goods.isPauseSale == 0 && (isStock?goods.stockNumber > 0:true) ; +} + +// 一个数组是否包含另外一个数组全部元素 +export function arrayContainsAll(arr1, arr2) { + for (let i = 0; i < arr2.length; i++) { + if (!arr1.includes(arr2[i])) { + return false; + } + } + return true; +} + +//n项 n-1项组合,生成全部结果 +export function generateCombinations(arr, k) { + let result = []; + + function helper(index, current) { + if (current.length === k) { + result.push(current.slice()); // 使用slice()来避免直接修改原始数组 + } else { + for (let i = index; i < arr.length; i++) { + current.push(arr[i]); // 将当前元素添加到组合中 + helper(i + 1, current); // 递归调用,索引增加以避免重复选择相同的元素 + current.pop(); // 回溯,移除当前元素以便尝试其他组合 + } + } + } + + helper(0, []); // 从索引0开始,初始空数组作为起点 + return result; +} + +export function returnReverseVal(val, isReturnString = true) { + const isBol = typeof val === "boolean"; + const isString = typeof val === "string"; + let reverseNewval = ""; + if (isBol) { + reverseNewval = !val; + } + if (isString) { + reverseNewval = val === "true" ? "false" : "true"; + } + return reverseNewval; +}