修复转桌问题,餐位费问题,台桌增加显示更多信息,修复添加耗材第二单位
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<up-popup :show="show" mode="center">
|
<up-popup :show="show" mode="center" @close="close">
|
||||||
|
|
||||||
<view class="bg-fff u-p-30 box">
|
<view class="bg-fff u-p-30 box">
|
||||||
<scroll-view direction="vertical" scroll-y style="max-height: 80vh;">
|
<scroll-view direction="vertical" scroll-y style="max-height: 80vh;">
|
||||||
@@ -20,18 +20,20 @@
|
|||||||
<template v-if="form.type==1">
|
<template v-if="form.type==1">
|
||||||
<view class=" u-m-t-32 ">
|
<view class=" u-m-t-32 ">
|
||||||
<view class="u-m-b-24">购物车商品</view>
|
<view class="u-m-b-24">购物车商品</view>
|
||||||
<!-- <goodsTable :data="nowCartData" :columns="columnsCheck1" row-key="id"
|
<goodsTable :data="nowCartData" :columns="columnsCheck1" row-key="id"
|
||||||
@selection-change="handleSelectionChange($event,'now')"></goodsTable> -->
|
@selection-change="handleSelectionChange($event,'now')"></goodsTable>
|
||||||
<u-table2 :data="nowCartData" :columns="columnsCheck1" row-key="id"
|
<!-- <u-table2 :data="nowCartData" :columns="columnsCheck1" row-key="id"
|
||||||
@selection-change="handleSelectionChange($event,'now')" />
|
@selection-change="handleSelectionChange($event,'now')" /> -->
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class=" u-m-t-50 ">
|
<view class=" u-m-t-50 ">
|
||||||
<view class="u-m-b-24">历史订单商品</view>
|
<view class="u-m-b-24">历史订单商品</view>
|
||||||
<view v-for="(order,orderIndex) in goodsList" class="u-m-t-32" :key="index">
|
<view v-for="(order,orderIndex) in goodsList" class="u-m-t-32" :key="index">
|
||||||
<view>第{{ orderIndex }}次下单</view>
|
<view>第{{ orderIndex }}次下单</view>
|
||||||
<u-table2 :data="order" :columns="columnsCheck" row-key="id"
|
<goodsTable :data="order" :columns="columnsCheck" row-key="id"
|
||||||
@selection-change="handleSelectionChange($event,'old')" />
|
@selection-change="handleSelectionChange($event,'old')" />
|
||||||
|
<!-- <u-table2 :data="order" :columns="columnsCheck" row-key="id"
|
||||||
|
@selection-change="handleSelectionChange($event,'old')" /> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
@@ -84,6 +86,8 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
|
console.log('close');
|
||||||
|
form.mewTable = {id: ''}
|
||||||
show.value = false
|
show.value = false
|
||||||
}
|
}
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
@@ -131,6 +135,7 @@
|
|||||||
|
|
||||||
|
|
||||||
const handleSelectionChange = (selection, key) => {
|
const handleSelectionChange = (selection, key) => {
|
||||||
|
console.log('handleSelectionChange', selection);
|
||||||
if (key === 'old') {
|
if (key === 'old') {
|
||||||
form.old = selection
|
form.old = selection
|
||||||
}
|
}
|
||||||
@@ -171,12 +176,11 @@
|
|||||||
title: '转桌成功',
|
title: '转桌成功',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
close()
|
|
||||||
emits('update', 1)
|
emits('update', 1)
|
||||||
|
close()
|
||||||
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
close()
|
|
||||||
emits('confirm', {
|
emits('confirm', {
|
||||||
targetTableCode: form.mewTable.tableCode,
|
targetTableCode: form.mewTable.tableCode,
|
||||||
old: {
|
old: {
|
||||||
@@ -193,6 +197,7 @@
|
|||||||
cart_id: props.nowCartData.map(v => v.id)
|
cart_id: props.nowCartData.map(v => v.id)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
close()
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
@@ -215,12 +220,10 @@
|
|||||||
title: '转桌成功',
|
title: '转桌成功',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
close()
|
|
||||||
emits('update', allMerge)
|
emits('update', allMerge)
|
||||||
|
close()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
close()
|
|
||||||
emits('confirm', {
|
emits('confirm', {
|
||||||
targetTableCode: form.mewTable.tableCode,
|
targetTableCode: form.mewTable.tableCode,
|
||||||
old: {
|
old: {
|
||||||
@@ -234,6 +237,7 @@
|
|||||||
cart_id: form.now.map(v => v.id)
|
cart_id: form.now.map(v => v.id)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
close()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,6 +78,8 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
modelValue.value = list.value[selIndex.value]
|
modelValue.value = list.value[selIndex.value]
|
||||||
|
console.log('selIndex.value', selIndex.value );
|
||||||
|
console.log('modelValue.value ', modelValue.value );
|
||||||
close()
|
close()
|
||||||
}
|
}
|
||||||
const query = reactive({
|
const query = reactive({
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
<view class="u-flex u-row-between no-wrap title">
|
<view class="u-flex u-row-between no-wrap title">
|
||||||
<!-- 全选框 -->
|
<!-- 全选框 -->
|
||||||
<view class="table-th">
|
<view class="table-th">
|
||||||
<up-checkbox @change="handleSelectAll" usedAlone v-model:checked="internalAllChecked" shape="square" :size="20" />
|
<up-checkbox @change="handleSelectAll" usedAlone v-model:checked="internalAllChecked" shape="square"
|
||||||
|
:size="20" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 动态列标题 -->
|
<!-- 动态列标题 -->
|
||||||
@@ -13,25 +14,25 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 表格行 -->
|
<!-- 有数据 → 渲染列表 -->
|
||||||
|
<template v-if="internalData.length > 0">
|
||||||
<view @click="handleRowCheck(item)" class="u-m-t-12 u-flex u-p-24 u-row-between row"
|
<view @click="handleRowCheck(item)" class="u-m-t-12 u-flex u-p-24 u-row-between row"
|
||||||
v-for="(item, index) in internalData" :key="item.id || index" row-key="id">
|
v-for="(item, index) in internalData" :key="item.id || index" row-key="id">
|
||||||
<!-- 单选框 -->
|
|
||||||
<view class="table-td">
|
<view class="table-td">
|
||||||
<up-checkbox
|
<up-checkbox @change="handleRowCheck(item)" usedAlone v-model:checked="item._checked" shape="square" :size="20"></up-checkbox>
|
||||||
usedAlone
|
|
||||||
v-model:checked="item._checked" shape="square" :size="20" @change="handleRowCheck(item)"></up-checkbox>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 动态列内容 -->
|
|
||||||
<view class="table-td" v-for="col in columns" :key="col.key" :style="col.style || {}">
|
<view class="table-td" v-for="col in columns" :key="col.key" :style="col.style || {}">
|
||||||
<!-- 支持自定义渲染 / 直接取值 -->
|
|
||||||
<slot v-if="col.slot" :name="col.slot" :row="item" />
|
<slot v-if="col.slot" :name="col.slot" :row="item" />
|
||||||
<template v-else>
|
<template v-else>{{ item[col.key] }}</template>
|
||||||
{{ item[col.key] }}
|
|
||||||
</template>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- 无数据 → 显示暂无数据 -->
|
||||||
|
<view v-else class="empty-text u-p-t-40 u-p-b-40 u-text-center">
|
||||||
|
暂无数据
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -83,6 +84,7 @@
|
|||||||
|
|
||||||
// 全选切换
|
// 全选切换
|
||||||
function handleSelectAll() {
|
function handleSelectAll() {
|
||||||
|
internalAllChecked.value = !internalAllChecked.value
|
||||||
const checked = internalAllChecked.value;
|
const checked = internalAllChecked.value;
|
||||||
internalData.value = internalData.value.map(item => {
|
internalData.value = internalData.value.map(item => {
|
||||||
item._checked = checked;
|
item._checked = checked;
|
||||||
@@ -104,6 +106,7 @@
|
|||||||
emits('selection-change', selectedRows);
|
emits('selection-change', selectedRows);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 监听所有行选中状态,自动更新全选框
|
// 监听所有行选中状态,自动更新全选框
|
||||||
watch(
|
watch(
|
||||||
() => internalData.value,
|
() => internalData.value,
|
||||||
@@ -143,5 +146,11 @@
|
|||||||
.row:nth-of-type(2n + 1) {
|
.row:nth-of-type(2n + 1) {
|
||||||
background: #f0f0f0;
|
background: #f0f0f0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 空数据样式
|
||||||
|
.empty-text {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -87,7 +87,7 @@ let datas = reactive({
|
|||||||
consGroupId: null,
|
consGroupId: null,
|
||||||
conUnitTwo: '', // 第二单位
|
conUnitTwo: '', // 第二单位
|
||||||
conUnitTwoConvert: '', // 第二单位转换数量
|
conUnitTwoConvert: '', // 第二单位转换数量
|
||||||
defaultUnit: 2
|
defaultUnit: ''
|
||||||
},
|
},
|
||||||
consGroupName: '',
|
consGroupName: '',
|
||||||
typeList: []
|
typeList: []
|
||||||
|
|||||||
@@ -15,41 +15,48 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-flex-col u-row-center u-col-center bg-fff bottom">
|
<view class="u-flex u-flex-col u-row-center u-col-center bg-fff bottom">
|
||||||
<template v-if="data.status != 'using'">
|
<template v-if="data.status != 'unsettled'">
|
||||||
<view class="u-font-32" :style="{ color: returnStutasColor(data.status) }">{{ returnStutasText(data.status) }}~</view>
|
<view class="u-font-32" :style="{ color: returnStutasColor(data.status) }">
|
||||||
|
{{ returnStutasText(data.status) }}~</view>
|
||||||
</template>
|
</template>
|
||||||
<view class="w-full u-p-l-16 u-p-r-16 u-p-t-16 u-font-24">
|
<view class="w-full u-p-l-16 u-p-r-16 u-p-t-16 u-font-24">
|
||||||
<template v-if="data.status == 'using' && data.orderId">
|
<template v-if="data.status == 'unsettled' && data.orderId">
|
||||||
<view class="color-666 u-text-left u-p-b-20 border-bottom">
|
<view class="color-666 u-text-left u-p-b-20 border-bottom">
|
||||||
<view class="">
|
<view class="">
|
||||||
<text>已点</text>
|
<text>就餐人数</text>
|
||||||
<text class="u-m-l-20 color-333">{{ data.productNum || 0 }}件</text>
|
<text class="u-m-l-20 color-333">{{ data.personNum}}/{{data.maxCapacity}}人</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-m-t-10">
|
<view class="u-m-t-10">
|
||||||
<text>金额</text>
|
<text>金额</text>
|
||||||
<text class="u-m-l-20 color-333">{{ data.totalAmount || 0 }} 元</text>
|
<text class="u-m-l-20 color-333">{{ data.orderAmount || 0 }} 元</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-m-t-10">
|
<!-- <view class="u-m-t-10">
|
||||||
<text>待结</text>
|
<text>待结</text>
|
||||||
<text class="u-m-l-20 color-333">{{ data.totalAmount || 0 }} 元</text>
|
<text class="u-m-l-20 color-333">{{ data.totalAmount || 0 }} 元</text>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-row-between u-font-20 u-p-b-20 u-p-t-20">
|
<view class="u-flex u-row-between u-font-20 u-p-b-20 u-p-t-20">
|
||||||
<text class="color-333">开台时间</text>
|
<text class="color-333">开台时间</text>
|
||||||
<text class="color-666">{{ data.useTime }}</text>
|
<!-- <text class="color-666">{{ data.orderCreateTime }}</text> -->
|
||||||
|
<text class="color-666">{{ formatTime(data.orderCreateTime) }}</text>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<view class="u-flex u-row-center u-m-t-16">
|
<view class="u-flex u-row-center u-m-t-16">
|
||||||
<template v-if="data.id">
|
<template v-if="data.id">
|
||||||
<template v-if="data.status == 'unbind'">
|
<template v-if="data.status == 'unbind'">
|
||||||
<my-button color="#333" :width="200" :height="56" type="default" @click="bind">绑定码牌</my-button>
|
<my-button color="#333" :width="200" :height="56" type="default"
|
||||||
|
@click="bind">绑定码牌</my-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="data.status == 'idle' || (data.status == 'using' && !data.orderId)">
|
<template v-if="data.status == 'idle' || (data.status == 'unsettled' && !data.orderId)">
|
||||||
<my-button color="#333" :width="150" :height="56" type="default" @click="diancan">选择</my-button>
|
<my-button color="#333" :width="150" :height="56" type="default"
|
||||||
|
@click="diancan">选择</my-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="data.status == 'cleaning'">
|
<template v-if="data.status == 'cleaning'">
|
||||||
<my-button color="#333" :width="150" :height="56" type="default" @click="qingtai">清台</my-button>
|
<my-button color="#333" :width="150" :height="56" type="default"
|
||||||
|
@click="qingtai">清台</my-button>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<my-button v-else :width="150" :height="56" type="default" disabled>选择</my-button>
|
<my-button v-else :width="150" :height="56" type="default" disabled>选择</my-button>
|
||||||
@@ -61,11 +68,18 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, ref } from 'vue';
|
import {
|
||||||
|
computed,onUnmounted,
|
||||||
|
ref
|
||||||
|
} from 'vue';
|
||||||
import myButton from '@/components/my-components/my-button';
|
import myButton from '@/components/my-components/my-button';
|
||||||
import go from '@/commons/utils/go.js';
|
import go from '@/commons/utils/go.js';
|
||||||
import { hasPermission } from '@/commons/utils/hasPermission.js';
|
import {
|
||||||
import { shopTableClear } from '@/http/api/table.js';
|
hasPermission
|
||||||
|
} from '@/commons/utils/hasPermission.js';
|
||||||
|
import {
|
||||||
|
shopTableClear
|
||||||
|
} from '@/http/api/table.js';
|
||||||
|
|
||||||
const emits = defineEmits(['more', 'update', 'bind']);
|
const emits = defineEmits(['more', 'update', 'bind']);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -94,7 +108,41 @@ function returnStutasColor(key) {
|
|||||||
const item = uni.$dict.tableStatus[key];
|
const item = uni.$dict.tableStatus[key];
|
||||||
return item ? item.type : '';
|
return item ? item.type : '';
|
||||||
}
|
}
|
||||||
|
const nowTime = ref(new Date().getTime());
|
||||||
|
|
||||||
|
// 定时器 ID(用于销毁)
|
||||||
|
let timer = null;
|
||||||
|
|
||||||
|
// 启动实时更新时间(uniapp 全端稳定)
|
||||||
|
function updateTime() {
|
||||||
|
timer = setInterval(() => {
|
||||||
|
nowTime.value = new Date().getTime();
|
||||||
|
}, 1000); // 1秒刷新一次,足够用
|
||||||
|
}
|
||||||
|
updateTime();
|
||||||
|
|
||||||
|
// 页面销毁时清除定时器(必须加!)
|
||||||
|
onUnmounted(() => {
|
||||||
|
if (timer) {
|
||||||
|
clearInterval(timer);
|
||||||
|
timer = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 时间格式化工具(完全不变,逻辑一样)
|
||||||
|
function formatTime(str) {
|
||||||
|
if (!str) return "";
|
||||||
|
const targetTime = new Date(str).getTime();
|
||||||
|
const milliseconds = nowTime.value - targetTime;
|
||||||
|
|
||||||
|
if (milliseconds <= 0) return "已结束";
|
||||||
|
|
||||||
|
const days = Math.floor(milliseconds / (1000 * 60 * 60 * 24));
|
||||||
|
const hours = Math.floor((milliseconds % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
||||||
|
const minutes = Math.floor((milliseconds % (1000 * 60 * 60)) / (1000 * 60));
|
||||||
|
|
||||||
|
return `${days ? days + "天" : ""} ${hours ? hours + "时" : ""} ${minutes + "分"}`;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 更多
|
* 更多
|
||||||
*/
|
*/
|
||||||
@@ -122,7 +170,7 @@ async function diancan() {
|
|||||||
hasPermission('允许下单').then((res) => {
|
hasPermission('允许下单').then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res) {
|
if (res) {
|
||||||
const useType = props.status == 'using' ? props.data.useType : undefined;
|
const useType = props.status == 'unsettled' ? props.data.useType : undefined;
|
||||||
console.log(props.data);
|
console.log(props.data);
|
||||||
go.to('PAGES_CREATE_ORDER', props.data);
|
go.to('PAGES_CREATE_ORDER', props.data);
|
||||||
}
|
}
|
||||||
@@ -175,7 +223,7 @@ function qingtai() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.using {
|
&.unsettled {
|
||||||
.tag {
|
.tag {
|
||||||
color: rgb(250, 85, 85);
|
color: rgb(250, 85, 85);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ import { getShopTable, shopTableBind, shopTableClear } from '@/http/api/table.js
|
|||||||
import { getShopArea } from '@/http/api/area.js';
|
import { getShopArea } from '@/http/api/area.js';
|
||||||
import { printOrder } from '@/http/api/order.js';
|
import { printOrder } from '@/http/api/order.js';
|
||||||
import { getHistoryOrder } from '@/http/api/order.js';
|
import { getHistoryOrder } from '@/http/api/order.js';
|
||||||
|
import tableStatus from './tableStatus'
|
||||||
const pageData = reactive({
|
const pageData = reactive({
|
||||||
statusShow: false,
|
statusShow: false,
|
||||||
hasAjax: false,
|
hasAjax: false,
|
||||||
@@ -102,7 +102,8 @@ const pageData = reactive({
|
|||||||
key: '',
|
key: '',
|
||||||
label: '全部'
|
label: '全部'
|
||||||
},
|
},
|
||||||
...uni.$utils.objToArrary(uni.$dict.tableStatus)
|
// ...uni.$utils.objToArrary(uni.$dict.tableStatus)
|
||||||
|
...tableStatus
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
statusName: '全部',
|
statusName: '全部',
|
||||||
@@ -164,8 +165,9 @@ async function getArea() {
|
|||||||
* @param {Object} e
|
* @param {Object} e
|
||||||
*/
|
*/
|
||||||
function confirmStatus(e) {
|
function confirmStatus(e) {
|
||||||
|
console.log('---',e);
|
||||||
pageData.statusShow = false;
|
pageData.statusShow = false;
|
||||||
pageData.query.status = e.value[0].key;
|
pageData.query.status = e.value[0].type;
|
||||||
pageData.statusName = e.value[0].label;
|
pageData.statusName = e.value[0].label;
|
||||||
getTable();
|
getTable();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -422,6 +422,7 @@
|
|||||||
} from '@/http/api/order/order.js'
|
} from '@/http/api/order/order.js'
|
||||||
|
|
||||||
function changeTableConfirm(json) {
|
function changeTableConfirm(json) {
|
||||||
|
console.log('changeTableConfirm',json);
|
||||||
websocketUtil.send(
|
websocketUtil.send(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
type: "shopping",
|
type: "shopping",
|
||||||
|
|||||||
@@ -392,7 +392,6 @@ async function init() {
|
|||||||
}
|
}
|
||||||
Object.assign(order, orderRes);
|
Object.assign(order, orderRes);
|
||||||
pageData.goodsList = objToArrary(orderRes.detailMap);
|
pageData.goodsList = objToArrary(orderRes.detailMap);
|
||||||
|
|
||||||
// console.log("order===",order)
|
// console.log("order===",order)
|
||||||
// console.log("pageData.user===",pageData.user)
|
// console.log("pageData.user===",pageData.user)
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
@@ -412,6 +411,7 @@ async function init() {
|
|||||||
}
|
}
|
||||||
pageData.seatNum = order.seatNum;
|
pageData.seatNum = order.seatNum;
|
||||||
seatFeeConfig.personCount = order.seatNum;
|
seatFeeConfig.personCount = order.seatNum;
|
||||||
|
console.log('seatFeeConfig',seatFeeConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -464,7 +464,7 @@ const pointDeductionRule = reactive({
|
|||||||
const seatFeeConfig = reactive({
|
const seatFeeConfig = reactive({
|
||||||
pricePerPerson: pageData.shopInfo.tableFee || 0,
|
pricePerPerson: pageData.shopInfo.tableFee || 0,
|
||||||
personCount: 0, //就餐人数
|
personCount: 0, //就餐人数
|
||||||
isEnabled: !pageData.shopInfo.isTableFee
|
isEnabled: !pageData.shopInfo.isTableFee,
|
||||||
});
|
});
|
||||||
//使用积分数量
|
//使用积分数量
|
||||||
const userPoints = ref(0);
|
const userPoints = ref(0);
|
||||||
@@ -517,7 +517,7 @@ const orderExtraConfig = computed(() => {
|
|||||||
memberDiscountRate: 1,
|
memberDiscountRate: 1,
|
||||||
newUserDiscount: newUserDiscount.value,
|
newUserDiscount: newUserDiscount.value,
|
||||||
fullReductionActivities: fullReductionActivities.value,
|
fullReductionActivities: fullReductionActivities.value,
|
||||||
currentDinnerType: options.dinnerType,
|
currentDinnerType: options.dinnerType||order.dineMode,
|
||||||
isFreeDine: false, //霸王餐
|
isFreeDine: false, //霸王餐
|
||||||
freeDineConfig: freeDineConfig.value,
|
freeDineConfig: freeDineConfig.value,
|
||||||
limitTimeDiscount: order.limitRate,
|
limitTimeDiscount: order.limitRate,
|
||||||
@@ -528,7 +528,7 @@ const orderExtraConfig = computed(() => {
|
|||||||
const orderCostSummary = computed(() => {
|
const orderCostSummary = computed(() => {
|
||||||
const costSummary = yskUtils.OrderPriceCalculator.calculateOrderCostSummary(
|
const costSummary = yskUtils.OrderPriceCalculator.calculateOrderCostSummary(
|
||||||
pageData.goodsList,
|
pageData.goodsList,
|
||||||
options.dinnerType,
|
(options.dinnerType||order.dineMode),
|
||||||
selCoupon.value,
|
selCoupon.value,
|
||||||
activityList.value,
|
activityList.value,
|
||||||
orderExtraConfig.value,
|
orderExtraConfig.value,
|
||||||
@@ -633,6 +633,7 @@ watch(
|
|||||||
);
|
);
|
||||||
|
|
||||||
function getPayParam() {
|
function getPayParam() {
|
||||||
|
const dinnerType=options.dinnerType||order.dineMode
|
||||||
let params = {
|
let params = {
|
||||||
shopId: uni.getStorageSync('shopInfo').id || '',
|
shopId: uni.getStorageSync('shopInfo').id || '',
|
||||||
orderId: order.id,
|
orderId: order.id,
|
||||||
@@ -646,7 +647,7 @@ function getPayParam() {
|
|||||||
roundAmount: 0, //抹零金额 减免多少钱
|
roundAmount: 0, //抹零金额 减免多少钱
|
||||||
pointsDiscountAmount: orderCostSummary.value.pointDeductionAmount, //积分抵扣金额(tb_points_basic_setting表)
|
pointsDiscountAmount: orderCostSummary.value.pointDeductionAmount, //积分抵扣金额(tb_points_basic_setting表)
|
||||||
pointsNum: orderCostSummary.value.pointUsed, //(扣除各类折扣 enable_deduction后使用)
|
pointsNum: orderCostSummary.value.pointUsed, //(扣除各类折扣 enable_deduction后使用)
|
||||||
seatNum: options.dinnerType == 'dine-in' ? seatFeeConfig.personCount : 0, //用餐人数
|
seatNum: dinnerType == 'dine-in' ? seatFeeConfig.personCount : 0, //用餐人数
|
||||||
newCustomerDiscountAmount: orderCostSummary.value.newUserDiscount, //新客立减
|
newCustomerDiscountAmount: orderCostSummary.value.newUserDiscount, //新客立减
|
||||||
newCustomerDiscountId: orderCostSummary.value.newUserDiscount > 0 ? newUserDiscountRes.value.id : '',
|
newCustomerDiscountId: orderCostSummary.value.newUserDiscount > 0 ? newUserDiscountRes.value.id : '',
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user