代码更新
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<view style="height: 200rpx;"></view>
|
||||
<view class="u-fixed bottom bg-fff ">
|
||||
<view class="u-flex u-abso">
|
||||
<template v-if="orderDetail.info.useType=='takeout'||!orderDetail.info.tableId||orderDetail.info.useType=='dine-in-before'">
|
||||
<template v-if="orderDetail.info.useType=='take-out'||!orderDetail.info.tableCode||orderDetail.info.useType=='dine-in-before'">
|
||||
<view class="u-flex-1" v-if="orderDetail.info.status=='unpaid'">
|
||||
<my-button @tap="toPay" borderRadius="100rpx" shape="circle"
|
||||
type="primary">结账</my-button>
|
||||
@@ -42,11 +42,6 @@
|
||||
|
||||
<script setup>
|
||||
import * as Api from '@/http/yskApi/Instead.js'
|
||||
import * as orderApi from '@/http/yskApi/order.js'
|
||||
import {queryAllShopUser} from '@/http/yskApi/shop-user.js'
|
||||
import {
|
||||
objToArrary
|
||||
} from '@/commons/utils/returrn-data.js'
|
||||
import userVue from './components/user.vue';
|
||||
import orderVue from './components/order.vue';
|
||||
import goodsList from './components/list.vue';
|
||||
@@ -62,7 +57,7 @@
|
||||
ref
|
||||
} from 'vue';
|
||||
import OrderDetail from './page.js'
|
||||
import { getHistoryOrder } from '@/api/order.js'
|
||||
import { getHistoryOrder, refundOrder,getOrderById } from '@/api/order.js'
|
||||
import { shopStaffDetail } from '@/api/staff.js'
|
||||
import { shopUserDetail } from '@/api/shopUser.js'
|
||||
|
||||
@@ -172,17 +167,14 @@
|
||||
tuicai.selGoods = goods
|
||||
}
|
||||
async function tuicaiConfirm(e) {
|
||||
const res = await Api.$returnCart({
|
||||
...e,
|
||||
cartId: tuicai.selGoods.hasOwnProperty('cartId') ? tuicai.selGoods.cartId : tuicai.selGoods.id,
|
||||
tableId: orderDetail.info.tableId,
|
||||
})
|
||||
console.log(e)
|
||||
const res = await refundOrder(e)
|
||||
tuicai.show = false
|
||||
console.log(res)
|
||||
if(res){
|
||||
go.back()
|
||||
}else{
|
||||
|
||||
init()
|
||||
getOrderDetail()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,7 +285,7 @@
|
||||
uni.$off('orderDetail:update')
|
||||
uni.$once('orderDetail:update', (newval) => {
|
||||
console.log(newval);
|
||||
init()
|
||||
getOrderDetail()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -309,7 +301,7 @@
|
||||
}
|
||||
Object.assign(submitPar, par)
|
||||
const res=await Api.$setUser(submitPar)
|
||||
init()
|
||||
getOrderDetail()
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user