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 @@ + + + + + \ 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..3e389ee --- /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; +}