订单逻辑修改
This commit is contained in:
@@ -227,7 +227,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="placedOrderTip" @click="placedOrder" v-if="tableCode&&shopInfo.shopTableInfo.orderId&&shopInfo.storeInfo.registerType == 'restaurant'"><u-avatar :src="src" shape="circle"></u-avatar><view style="margin-left: 8rpx;">已下单菜品</view></view>
|
<view class="placedOrderTip" @click="placedOrder" v-if="tableCode&&shopInfo.shopTableInfo&&shopInfo.shopTableInfo.orderId&&shopInfo.storeInfo.registerType == 'restaurant'"><u-avatar :src="src" shape="circle"></u-avatar><view style="margin-left: 8rpx;">已下单菜品</view></view>
|
||||||
|
|
||||||
<!-- 购物车 -->
|
<!-- 购物车 -->
|
||||||
<u-popup :show="showCart" :round="20" :safeAreaInsetBottom="false" :zIndex="98" :overlayStyle="{ zIndex: 98 }"
|
<u-popup :show="showCart" :round="20" :safeAreaInsetBottom="false" :zIndex="98" :overlayStyle="{ zIndex: 98 }"
|
||||||
@@ -275,7 +275,7 @@
|
|||||||
<u--input
|
<u--input
|
||||||
placeholder="商品备注(选填)"
|
placeholder="商品备注(选填)"
|
||||||
border="none"
|
border="none"
|
||||||
v-model="item.remark"
|
v-model="item.note"
|
||||||
></u--input>
|
></u--input>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -593,14 +593,15 @@
|
|||||||
* 通过桌码获取店铺信息
|
* 通过桌码获取店铺信息
|
||||||
*/
|
*/
|
||||||
async productqueryShop() {
|
async productqueryShop() {
|
||||||
let res = await this.api.productqueryShop({
|
let params = {
|
||||||
code: this.tableCode,
|
|
||||||
shopId: this.shopId,
|
|
||||||
lng: uni.cache.get('getLocationstorage').lng ? uni.cache.get('getLocationstorage').lng :
|
lng: uni.cache.get('getLocationstorage').lng ? uni.cache.get('getLocationstorage').lng :
|
||||||
'',
|
'',
|
||||||
lat: uni.cache.get('getLocationstorage').lat ? uni.cache.get('getLocationstorage').lat :
|
lat: uni.cache.get('getLocationstorage').lat ? uni.cache.get('getLocationstorage').lat :
|
||||||
'',
|
'',
|
||||||
})
|
}
|
||||||
|
if (this.tableCode) {params.code = this.tableCode}
|
||||||
|
if (this.shopId) {params.shopId = this.shopId}
|
||||||
|
let res = await this.api.productqueryShop(params)
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
let expireTime = uni.utils.timestamp() + 30 * 60; // 有效期
|
let expireTime = uni.utils.timestamp() + 30 * 60; // 有效期
|
||||||
uni.cache.set('shopId', res.data.storeInfo.id, expireTime)
|
uni.cache.set('shopId', res.data.storeInfo.id, expireTime)
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="status">未付款</view>
|
<view class="status" v-if="listinfo.status == 'unpaid' || listinfo.status == 'paying'">未付款</view>
|
||||||
<view class="totalAmount">
|
<view class="totalAmount">
|
||||||
<view class="label">小计¥</view>
|
<view class="label">小计¥</view>
|
||||||
<view class="price"> {{item.totalAmount}} </view>
|
<view class="price"> {{item.totalAmount}} </view>
|
||||||
@@ -43,6 +43,14 @@
|
|||||||
<view class="semicircle_right_icon"></view>
|
<view class="semicircle_right_icon"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="cell-item" v-if="listinfo.orderInfo.seatCount > 0">
|
||||||
|
<view class="label">餐位费</view>
|
||||||
|
<view class="val">
|
||||||
|
<view>X{{listinfo.orderInfo.seatCount}}</view>
|
||||||
|
<view style="font-size: 28rpx;">¥</view>
|
||||||
|
<view>{{listinfo.orderInfo.seatAmount}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="total-wrap">
|
<view class="total-wrap">
|
||||||
<view>总计¥</view>
|
<view>总计¥</view>
|
||||||
<view class="price"> {{listinfo.payAmount}} </view>
|
<view class="price"> {{listinfo.payAmount}} </view>
|
||||||
@@ -126,7 +134,7 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
box-shadow: 0rpx 4rpx 12rpx 2rpx rgba(87,86,86,0.35);
|
// box-shadow: 0rpx 4rpx 12rpx 2rpx rgba(87,86,86,0.35);
|
||||||
border-radius: 18rpx;
|
border-radius: 18rpx;
|
||||||
padding-bottom: 32rpx;
|
padding-bottom: 32rpx;
|
||||||
.card_head_box{
|
.card_head_box{
|
||||||
@@ -141,7 +149,7 @@
|
|||||||
height: 45rpx;
|
height: 45rpx;
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
box-shadow: inset 0rpx -13rpx 18rpx -16rpx rgba(87, 86, 86, 0.35);
|
// box-shadow: inset 0rpx -13rpx 18rpx -16rpx rgba(87, 86, 86, 0.35);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -155,10 +163,11 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
padding: 0 34rpx;
|
||||||
.head {
|
.head {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 50rpx 34rpx 32rpx 34rpx;
|
padding: 32rpx 0;
|
||||||
.head_left{
|
.head_left{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -180,7 +189,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.shop-info {
|
.shop-info {
|
||||||
padding: 0 34rpx;
|
|
||||||
border-bottom: 2rpx dashed #e5e5e5;
|
border-bottom: 2rpx dashed #e5e5e5;
|
||||||
.item:nth-child(1) {
|
.item:nth-child(1) {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
@@ -250,15 +258,14 @@
|
|||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
margin-top: 32rpx;
|
margin-top: 32rpx;
|
||||||
margin-right: 32rpx;
|
|
||||||
}
|
}
|
||||||
.totalAmount {
|
.totalAmount {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
padding: 0 34rpx;
|
padding: 32rpx 0;
|
||||||
margin-top: 32rpx;
|
border-bottom: 2rpx dashed #e5e5e5;
|
||||||
.label{
|
.label{
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
@@ -283,7 +290,7 @@
|
|||||||
margin-left: -22.5rpx;
|
margin-left: -22.5rpx;
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
box-shadow: inset -20rpx 0rpx 22rpx -20rpx rgba(87, 86, 86, 0.35);
|
// box-shadow: inset -20rpx 0rpx 22rpx -20rpx rgba(87, 86, 86, 0.35);
|
||||||
|
|
||||||
}
|
}
|
||||||
.semicircle_right_icon{
|
.semicircle_right_icon{
|
||||||
@@ -292,11 +299,41 @@
|
|||||||
margin-right: -22.5rpx;
|
margin-right: -22.5rpx;
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
box-shadow: inset 13rpx 0rpx 16rpx -9rpx rgba(87, 86, 86, 0.35);
|
// box-shadow: inset 13rpx 0rpx 16rpx -9rpx rgba(87, 86, 86, 0.35);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.cell-item{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 32rpx 34rpx 0 34rpx;
|
||||||
|
.label{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.val{
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
|
padding-bottom: 32rpx;
|
||||||
|
border-bottom: 2rpx dashed #e5e5e5;
|
||||||
|
view:nth-child(1){
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999999;
|
||||||
|
margin-right: 42rpx;
|
||||||
|
}
|
||||||
|
view:nth-child(2){
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.total-wrap {
|
.total-wrap {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -334,7 +371,7 @@
|
|||||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||||
margin-top: 32rpx;
|
margin-top: 32rpx;
|
||||||
padding: 32rpx 34rpx;
|
padding: 32rpx 34rpx;
|
||||||
box-shadow: 0rpx 4rpx 12rpx 2rpx rgba(87,86,86,0.35);
|
// box-shadow: 0rpx 4rpx 12rpx 2rpx rgba(87,86,86,0.35);
|
||||||
.row {
|
.row {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|||||||
@@ -158,7 +158,7 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
box-shadow: 0rpx 4rpx 12rpx 2rpx rgba(87,86,86,0.35);
|
// box-shadow: 0rpx 4rpx 12rpx 2rpx rgba(87,86,86,0.35);
|
||||||
border-radius: 18rpx;
|
border-radius: 18rpx;
|
||||||
.card_head_box{
|
.card_head_box{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
height: 45rpx;
|
height: 45rpx;
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
box-shadow: inset 0rpx -13rpx 18rpx -16rpx rgba(87, 86, 86, 0.35);
|
// box-shadow: inset 0rpx -13rpx 18rpx -16rpx rgba(87, 86, 86, 0.35);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -362,7 +362,7 @@
|
|||||||
margin-left: -22.5rpx;
|
margin-left: -22.5rpx;
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
box-shadow: inset -20rpx 0rpx 22rpx -20rpx rgba(87, 86, 86, 0.35);
|
// box-shadow: inset -20rpx 0rpx 22rpx -20rpx rgba(87, 86, 86, 0.35);
|
||||||
|
|
||||||
}
|
}
|
||||||
.order_footer_right_icon{
|
.order_footer_right_icon{
|
||||||
@@ -371,7 +371,7 @@
|
|||||||
margin-right: -22.5rpx;
|
margin-right: -22.5rpx;
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
box-shadow: inset 13rpx 0rpx 16rpx -9rpx rgba(87, 86, 86, 0.35);
|
// box-shadow: inset 13rpx 0rpx 16rpx -9rpx rgba(87, 86, 86, 0.35);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log(this.amountVIP)
|
console.log(this.amountVIP)
|
||||||
// this.getAount();
|
// this.getAount();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -86,7 +86,6 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
border-radius: 18rpx;
|
border-radius: 18rpx;
|
||||||
box-shadow: 0rpx 4rpx 12rpx 2rpx rgba(87,86,86,0.35);
|
|
||||||
.paymentMethod_content{
|
.paymentMethod_content{
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 22rpx;
|
border-radius: 22rpx;
|
||||||
|
|||||||
@@ -299,14 +299,15 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
async getProductqueryShop (tableCode) {
|
async getProductqueryShop (tableCode) {
|
||||||
let res = await this.api.productqueryShop({
|
let params = {
|
||||||
code: this.tableCode,
|
|
||||||
shopId: this.shopId,
|
|
||||||
lng: uni.cache.get('getLocationstorage').lng ? uni.cache.get('getLocationstorage').lng :
|
lng: uni.cache.get('getLocationstorage').lng ? uni.cache.get('getLocationstorage').lng :
|
||||||
'',
|
'',
|
||||||
lat: uni.cache.get('getLocationstorage').lat ? uni.cache.get('getLocationstorage').lat :
|
lat: uni.cache.get('getLocationstorage').lat ? uni.cache.get('getLocationstorage').lat :
|
||||||
'',
|
'',
|
||||||
})
|
}
|
||||||
|
if (this.tableCode) {params.code = this.tableCode}
|
||||||
|
if (this.shopId) {params.shopId = this.shopId}
|
||||||
|
let res = await this.api.productqueryShop(params)
|
||||||
this.shopTableInfo = res.data.shopTableInfo;
|
this.shopTableInfo = res.data.shopTableInfo;
|
||||||
console.log(res)
|
console.log(res)
|
||||||
},
|
},
|
||||||
@@ -504,6 +505,10 @@
|
|||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
let noteList = [];
|
||||||
|
this.listinfo.details.map((item)=>{
|
||||||
|
console.log(item)
|
||||||
|
})
|
||||||
let data = {
|
let data = {
|
||||||
"skuId": '',
|
"skuId": '',
|
||||||
"num": '', //数量
|
"num": '', //数量
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<orderInfoBefore ref="orderInfoBefore" :listinfo="listinfo" v-else></orderInfoBefore>
|
<orderInfoBefore ref="orderInfoBefore" :listinfo="listinfo" v-else></orderInfoBefore>
|
||||||
|
|
||||||
|
|
||||||
<paymentMethod ref="paymentMethod" :amountVIP="amountVIP" @groupChange="groupChange"></paymentMethod>
|
<paymentMethod ref="paymentMethod" v-if="amountVIP&&listinfo.status == 'unpaid' || listinfo.status == 'paying'" :amountVIP="amountVIP" @groupChange="groupChange"></paymentMethod>
|
||||||
|
|
||||||
<view class="fixedview">
|
<view class="fixedview">
|
||||||
<view class="flex-between" v-if="listinfo.status == 'unpaid' || listinfo.status == 'paying'">
|
<view class="flex-between" v-if="listinfo.status == 'unpaid' || listinfo.status == 'paying'">
|
||||||
@@ -39,11 +39,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import payPasswordtwo from '@/components/payPasswordtwo.vue'
|
||||||
import orderInfoAfter from '../components/orderInfoAfter.vue'
|
import orderInfoAfter from '../components/orderInfoAfter.vue'
|
||||||
import orderInfoBefore from '../components/orderInfoBefore.vue'
|
import orderInfoBefore from '../components/orderInfoBefore.vue'
|
||||||
import paymentMethod from '../components/paymentMethod.vue'
|
import paymentMethod from '../components/paymentMethod.vue'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
payPasswordtwo,
|
||||||
orderInfoAfter,
|
orderInfoAfter,
|
||||||
orderInfoBefore,
|
orderInfoBefore,
|
||||||
paymentMethod,
|
paymentMethod,
|
||||||
@@ -56,8 +58,9 @@
|
|||||||
paymentBtnText: "余额支付",
|
paymentBtnText: "余额支付",
|
||||||
orderId: '',
|
orderId: '',
|
||||||
listinfo: {},
|
listinfo: {},
|
||||||
|
listinfoid: null,
|
||||||
status: [],
|
status: [],
|
||||||
amountVIP: {},
|
amountVIP: null,
|
||||||
srcimge: 'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/wx.jpg'
|
srcimge: 'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/wx.jpg'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -67,6 +70,7 @@
|
|||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.orderorderInfo()
|
this.orderorderInfo()
|
||||||
|
this.getAount();
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
this.ispws = false
|
this.ispws = false
|
||||||
@@ -104,6 +108,7 @@
|
|||||||
})
|
})
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.listinfo = res.data;
|
this.listinfo = res.data;
|
||||||
|
this.listinfoid = res.data.orderId;
|
||||||
uni.cache.set('shopId',res.data.shopId)
|
uni.cache.set('shopId',res.data.shopId)
|
||||||
if (this.listinfo.useType == " ") {
|
if (this.listinfo.useType == " ") {
|
||||||
//堂食先付费
|
//堂食先付费
|
||||||
@@ -184,8 +189,7 @@
|
|||||||
tmplIds:["z0fUG7-jhSfYCrw6poOvSRzh4_hgnPkm_5C7E5s5bCQ","AV-KybUHaK3KtFVLqpy6PHccHBS7XeX__mOM4RbufnQ"],
|
tmplIds:["z0fUG7-jhSfYCrw6poOvSRzh4_hgnPkm_5C7E5s5bCQ","AV-KybUHaK3KtFVLqpy6PHccHBS7XeX__mOM4RbufnQ"],
|
||||||
complete() {
|
complete() {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pagesOrder/order_detail/index?orderId=' + _this
|
url: '/pagesOrder/order_detail/index?orderId=' + _this.listinfoid
|
||||||
.listinfoid
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -591,7 +595,72 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pay-info-wrap{
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.info-wrap{
|
||||||
|
padding: 64rpx 30rpx 30rpx 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.title{
|
||||||
|
align-self: center;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-content{
|
||||||
|
.pay-title {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
|
justify-content: center;
|
||||||
|
font-weight: bold;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 48rpx;
|
||||||
|
color: #333;
|
||||||
|
margin-top: 48rpx;
|
||||||
|
text {
|
||||||
|
font-size: 60rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.pay-password {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 64rpx;
|
||||||
|
|
||||||
|
.list {
|
||||||
|
width: 88rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border: 2rpx solid #999;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
text {
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.hint {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
|
||||||
|
text {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
.fixedview {
|
.fixedview {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|||||||
Reference in New Issue
Block a user