优化订单结算不去结算购物车
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "vite-electron",
|
"name": "vite-electron",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2.0.20",
|
"version": "2.0.21",
|
||||||
"main": "dist-electron/main.js",
|
"main": "dist-electron/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "chcp 65001 && vite",
|
"dev": "chcp 65001 && vite",
|
||||||
|
|||||||
@@ -890,7 +890,7 @@ export const useGoods = defineStore("goods", {
|
|||||||
.map((item) => item.goods)
|
.map((item) => item.goods)
|
||||||
.flat()
|
.flat()
|
||||||
.map(this.comleteOrderInfo);
|
.map(this.comleteOrderInfo);
|
||||||
if (this.payType == 'table') {
|
if (this.payType == 'table' || this.payType == 'order') {
|
||||||
return [...giftGoods, ...oldOrderGoods];
|
return [...giftGoods, ...oldOrderGoods];
|
||||||
} else {
|
} else {
|
||||||
return [...currentGoods, ...giftGoods, ...oldOrderGoods];
|
return [...currentGoods, ...giftGoods, ...oldOrderGoods];
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ function show(t) {
|
|||||||
goodsStore.payType = props.type
|
goodsStore.payType = props.type
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
cartInfo.value = { ...goodsStore.cartInfo }
|
cartInfo.value = { ...goodsStore.cartInfo }
|
||||||
if (props.type === 'table') {
|
if (props.type === 'table' || props.type === 'order') {
|
||||||
orderList.value = goodsStore.orderList.map(item => item.goods).flat()
|
orderList.value = goodsStore.orderList.map(item => item.goods).flat()
|
||||||
} else {
|
} else {
|
||||||
orderList.value = [...goodsStore.cartList, ...goodsStore.orderList.map(item => item.goods).flat()]
|
orderList.value = [...goodsStore.cartList, ...goodsStore.orderList.map(item => item.goods).flat()]
|
||||||
|
|||||||
@@ -168,7 +168,7 @@
|
|||||||
<!-- 打印操作 -->
|
<!-- 打印操作 -->
|
||||||
<PrintDrawer ref="PrintDrawerRef" />
|
<PrintDrawer ref="PrintDrawerRef" />
|
||||||
<!-- 结算订单 -->
|
<!-- 结算订单 -->
|
||||||
<SettleAccount ref="SettleAccountRef" @success="orderListAjax" />
|
<SettleAccount ref="SettleAccountRef" type="order" @success="orderListAjax" />
|
||||||
<!-- 全部商品 -->
|
<!-- 全部商品 -->
|
||||||
<allGoodsDialog ref="allGoodsDialogRef" />
|
<allGoodsDialog ref="allGoodsDialogRef" />
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user