diff --git a/src/api/table.js b/src/api/table.js index 8eb43e1..529b42e 100644 --- a/src/api/table.js +++ b/src/api/table.js @@ -1,10 +1,10 @@ // 桌台管理 -import request from "@/utils/request"; -//就餐形式,默认堂食后付费 -const useType='dine-in-after' -function getUseType(){ - const type=localStorage.getItem("useType") - return type?type:useType +import request from '@/utils/request' +// 就餐形式,默认堂食后付费 +const useType = 'dine-in-after' +function getUseType() { + const type = localStorage.getItem('useType') + return type || useType } /** * 台桌列表 @@ -13,12 +13,51 @@ function getUseType(){ export function tbShopTableGet(params) { return request({ url: `/api/tbShopTable`, - method: "get", - params:{ - shopId: localStorage.getItem("shopId"), + method: 'get', + params: { + shopId: localStorage.getItem('shopId'), ...params } - }); + }) +} + +/** + * 获取预约台桌列表 + * @returns + */ +export function getShopTableList(params) { + return request({ + url: `/api/booking/shop-table/list`, + method: 'get', + params: { + shopId: localStorage.getItem('shopId'), + ...params + } + }) +} + +/** + * 预约 + * @returns + */ +export function makeShopTable(data) { + return request({ + url: `/api/booking/shop-table`, + method: 'post', + data + }) +} + +/** + * 标记预约状态 + * @returns + */ +export function markStatus(data) { + return request({ + url: `/api/booking/shop-table/mark-status`, + method: 'post', + data + }) } /** @@ -28,7 +67,7 @@ export function tbShopTableGet(params) { export function tbShopAreaGet(params) { return request({ url: `/api/tbShopArea`, - method: "get", + method: 'get', params }); } diff --git a/src/views/table/components/subscribe.vue b/src/views/table/components/subscribe.vue index 20caa03..d28d178 100644 --- a/src/views/table/components/subscribe.vue +++ b/src/views/table/components/subscribe.vue @@ -2,8 +2,7 @@ - - + + + + +
{{ item.label }} / {{ item.date.substring(8,10) }}
+
{{ item.day }}
+
+
- - + + + 午餐 + 晚餐 + - - + + - - + + + + + + + + + + + + 先生 + 女士 + + + +
@@ -39,46 +88,73 @@ + diff --git a/src/views/table/status.js b/src/views/table/status.js index a8d2007..ecaf8c8 100644 --- a/src/views/table/status.js +++ b/src/views/table/status.js @@ -1,38 +1,10 @@ export default { - 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", - }, - unbind: { - label: "未绑定", - type: "rgb(221,221,221)", - } -} \ No newline at end of file + pending: { label: '挂单中', type: '#E6A23C' }, + cleaning: { label: '待清台', type: '#FAAD14' }, + using: { label: '开台中', type: '#FF4D4F' }, + idle: { label: '空闲', type: '#3F9EFF' }, + paying: { label: '结算中', type: '#E6A23C' }, + closed: { label: '关台', type: '#DDDDDD' }, + subscribe: { label: '预约', type: '#52C41A ' }, + unbind: { label: '未绑定', type: 'rgb(221,221,221)' } +} diff --git a/src/views/table/table_list.vue b/src/views/table/table_list.vue index 8d79d82..a064764 100644 --- a/src/views/table/table_list.vue +++ b/src/views/table/table_list.vue @@ -22,6 +22,27 @@
+ + +
{{ item.label }} + +
+ +
+
+ + + 午餐 + 晚餐 + 下载店铺码 + 预约
@@ -89,33 +115,51 @@
+ + + + +
+
+ {{ item.bookingInfo.createUserName }}订{{ item.bookingInfo.bookingPerson }}「{{ item.bookingInfo.gender==1?'先生':'女士' }}」 +
+ + + {{ item.bookingInfo.bookingTime.substring(11,19) }} +
+
+
+ {{ item.bookingInfo.phoneNumber }} +
-
--> - - - -
+
¥{{ item.totalAmount || 0 }}「{{ item.productNum }}件」 - | +
-
- +
-