diff --git a/src/pages/boxes/apply-list.vue b/src/pages/boxes/apply-list.vue index be1056c..52eb4e2 100644 --- a/src/pages/boxes/apply-list.vue +++ b/src/pages/boxes/apply-list.vue @@ -46,11 +46,34 @@ const doCard = (v: any) => { router.jump('/pages/boxes/detail', { id: v.id }) } +const doCancelApply = async (v: any) => { + uni.showModal({ + title: '提示', + content: '是否确定取消预约', + confirmColor: '#0094ff', + success: async (res) => { + if (!res.confirm) return + try { + uni.showLoading({ title: '取消预约中...', mask: true }); + const _pa = { id: v.id } + const { data, code }: any = await boxesApi.cancel(_pa) + if (code != 0) throw new Error() + pageRef.value.reload(true) + uni.hideLoading() + uni.showToast({ title: '取消预约成功', icon: "none" }); + } catch (error) { + console.error(error); + uni.hideLoading() + } + } + }) +} + - - + + + + {{ v.boxesName }} + + 预约成功 + 预约失败 + 取消预约 + + + + 预约时间 + + {{ v.bookingDate }} {{ hooks.useTime(v.startTime, "{h}:{i}") }} ~ {{ + hooks.useTime(v.endTime, "{h}:{i}") + }} + + + + 提交时间 + + {{ hooks.useTime(v.createTime, "") }} + + + + + 取消预约 + diff --git a/src/pages/merchant/components/product-row.vue b/src/pages/merchant/components/product-row.vue index 23630a5..32eaef0 100644 --- a/src/pages/merchant/components/product-row.vue +++ b/src/pages/merchant/components/product-row.vue @@ -65,7 +65,8 @@ const remove = () => { - \ No newline at end of file + \ No newline at end of file diff --git a/src/pages/merchant/detail.vue b/src/pages/merchant/detail.vue index d5bbf3d..41e5422 100644 --- a/src/pages/merchant/detail.vue +++ b/src/pages/merchant/detail.vue @@ -148,7 +148,7 @@ const doVisibleCar = async () => { state.showCarDialog = true } -const doPay = async () => { +const submitPay = async () => { try { if (isEmpty(state.carList)) { uni.showToast({ title: '请至少购买一件商品', icon: "none" }) @@ -170,6 +170,18 @@ const doPay = async () => { } } +const doPay = async () => { + uni.showModal({ + title: '提示', + content: '是否确定购买', + confirmColor: '#0094ff', + success: async (res) => { + if (!res.confirm) return + submitPay() + } + }) +} + const getHeight = () => { const rpx = 480 return `calc(100vh - ${uni.upx2px(rpx)}px)` diff --git a/src/pages/tabbar/my.vue b/src/pages/tabbar/my.vue index d7b1b6a..2206265 100644 --- a/src/pages/tabbar/my.vue +++ b/src/pages/tabbar/my.vue @@ -9,6 +9,7 @@ import { merchantApi, userApi, walletApi } from "@@/api" const data = { serviceList: [ { text: '钱包管理', icon: '/static/icon/service_3.png', router: '/pages/wallet/list' }, + { text: '包厢预定', icon: '/static/icon/service_4.png', router: '/pages/boxes/apply-list' }, // { text: '车牌管理', icon: '/static/icon/service_2.png', router: '/pages/user/diff-price' }, { text: '外来人员就餐', icon: '/static/icon/service_1.png', router: '/pages/apply/foreign-list' }, { text: '跨单位就餐', icon: '/static/icon/service_1.png', router: '/pages/apply/stride-list' }, diff --git a/src/pages/tabbar/order.vue b/src/pages/tabbar/order.vue index aa25474..bdd91f1 100644 --- a/src/pages/tabbar/order.vue +++ b/src/pages/tabbar/order.vue @@ -70,7 +70,7 @@ const doRefund = (v: any) => { uni.hideLoading() } } - }); + }) } diff --git a/src/static/icon/service_4.png b/src/static/icon/service_4.png new file mode 100644 index 0000000..6c56e39 Binary files /dev/null and b/src/static/icon/service_4.png differ