From 34fc9c4ee1728e44f7310f59428769ac5393060b Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Tue, 24 Sep 2024 17:56:03 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95?= =?UTF-8?q?=E4=BB=8E=E5=BC=B9=E7=AA=97=E4=BF=AE=E6=94=B9=E4=B8=BA=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=8F=B0=E6=A1=8C=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=BC=B9=E7=AA=97=E4=B8=BA=E8=B7=B3=E8=BD=AC=EF=BC=8C?= =?UTF-8?q?=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95=E5=AE=8C=E6=AF=95=E5=90=8E?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E8=87=B3=E5=8F=B0=E6=A1=8C=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/table.js | 34 + src/views/login.vue | 2 +- src/views/table/table_list.vue | 34 +- .../tool/Instead/components/cart-item.vue | 317 ++ .../components/choose-diners-number.vue | 270 ++ .../components/choose-table-master.vue | 287 ++ .../tool/Instead/components/choose-user.vue | 289 ++ .../tool/Instead/components/discount.vue | 206 + .../tool/Instead/components/keyboard copy.vue | 319 ++ .../tool/Instead/components/keyboard.vue | 319 ++ .../Instead/components/money-keyboard.vue | 339 ++ src/views/tool/Instead/components/note.vue | 109 + .../tool/Instead/components/order-btn.js | 62 + .../tool/Instead/components/pay-type.vue | 76 + .../Instead/components/return-cart copy.vue | 109 + .../tool/Instead/components/return-cart.vue | 109 + .../tool/Instead/components/scan-pay.vue | 178 + src/views/tool/Instead/index.vue | 4230 +++++++++++++++++ src/views/tool/Instead/util.js | 47 + 19 files changed, 7322 insertions(+), 14 deletions(-) create mode 100644 src/utils/table.js create mode 100644 src/views/tool/Instead/components/cart-item.vue create mode 100644 src/views/tool/Instead/components/choose-diners-number.vue create mode 100644 src/views/tool/Instead/components/choose-table-master.vue create mode 100644 src/views/tool/Instead/components/choose-user.vue create mode 100644 src/views/tool/Instead/components/discount.vue create mode 100644 src/views/tool/Instead/components/keyboard copy.vue create mode 100644 src/views/tool/Instead/components/keyboard.vue create mode 100644 src/views/tool/Instead/components/money-keyboard.vue create mode 100644 src/views/tool/Instead/components/note.vue create mode 100644 src/views/tool/Instead/components/order-btn.js create mode 100644 src/views/tool/Instead/components/pay-type.vue create mode 100644 src/views/tool/Instead/components/return-cart copy.vue create mode 100644 src/views/tool/Instead/components/return-cart.vue create mode 100644 src/views/tool/Instead/components/scan-pay.vue create mode 100644 src/views/tool/Instead/index.vue create mode 100644 src/views/tool/Instead/util.js 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/login.vue b/src/views/login.vue index 9372f5e..7556ea5 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -197,7 +197,7 @@ export default { } - \ 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 @@ + + + + + \ 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 @@ + + + + + + \ 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 @@ + + + + \ 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 @@ + + + + \ 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 @@ + + + + \ 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 @@ + + + + \ 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 @@ + + + + \ 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 @@ + + + + + \ 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 @@ + + + + \ 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 @@ + + + + \ 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 @@ + + + + \ 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..b3721ee --- /dev/null +++ b/src/views/tool/Instead/index.vue @@ -0,0 +1,4230 @@ + + + + + + + \ 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; +} From 2e1f6b133a597b5eec8490f760405909c2d82e84 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Tue, 24 Sep 2024 18:06:49 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95?= =?UTF-8?q?=E9=83=A8=E5=88=86=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/table/table_list.vue | 2 +- src/views/tool/Instead/index.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/table/table_list.vue b/src/views/table/table_list.vue index 104ae4f..f45f720 100644 --- a/src/views/table/table_list.vue +++ b/src/views/table/table_list.vue @@ -205,7 +205,7 @@ - + Date: Wed, 25 Sep 2024 08:57:41 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8D=E5=BF=85=E8=A6=81=E7=9A=84=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E4=BA=BA=E6=95=B0=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tool/Instead/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/tool/Instead/index.vue b/src/views/tool/Instead/index.vue index 038774e..3e389ee 100644 --- a/src/views/tool/Instead/index.vue +++ b/src/views/tool/Instead/index.vue @@ -2765,7 +2765,7 @@ export default { if (this.key == "isPayOrder") { this.toCreateOrder(true); } - if (!this.shopInfo.isTableFee && item&&this.perpole) { + if (!this.shopInfo.isTableFee && item&&this.perpole>0) { //不免餐位费 await $choseCount({ masterId: this.masterId,