增加用户是否可以自行支付功能
This commit is contained in:
@@ -130,9 +130,19 @@
|
|||||||
</up-button>
|
</up-button>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
<view class="fixedview_tow" @tap="$u.debounce(istoricalorders, 1000)">
|
<template v-if="!loading">
|
||||||
{{ paymentmethod ? paymentmethod.name : "" }}
|
<template v-if="cartStore.shopInfo.isUserPay">
|
||||||
</view>
|
<view class="fixedview_tow" @tap="$u.debounce(istoricalorders, 1000)">
|
||||||
|
{{ paymentmethod ? paymentmethod.name : "" }}
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<view class="fixedview_tow disabled">
|
||||||
|
请前往吧台支付
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
|
||||||
<!-- <view class="fixedview_tows" @tap="$u.debounce(APIputuserorderclick,1000)">
|
<!-- <view class="fixedview_tows" @tap="$u.debounce(APIputuserorderclick,1000)">
|
||||||
取消订单
|
取消订单
|
||||||
</view> -->
|
</view> -->
|
||||||
@@ -326,8 +336,8 @@
|
|||||||
shop_id: uni.cache.get("shopId"),
|
shop_id: uni.cache.get("shopId"),
|
||||||
time_dis_info: null
|
time_dis_info: null
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function socketInit() {
|
function socketInit() {
|
||||||
cartsSocket = useWebSocket();
|
cartsSocket = useWebSocket();
|
||||||
@@ -1030,15 +1040,15 @@
|
|||||||
// 跳转到加菜页面
|
// 跳转到加菜页面
|
||||||
function toJiacai() {
|
function toJiacai() {
|
||||||
console.log("跳转到加菜页面");
|
console.log("跳转到加菜页面");
|
||||||
const arr= getCurrentPages()
|
const arr = getCurrentPages()
|
||||||
console.log(arr);
|
console.log(arr);
|
||||||
if(arr.length>=2&&arr[arr.length-2]&&arr[arr.length-2].route=='pages/product/index'){
|
if (arr.length >= 2 && arr[arr.length - 2] && arr[arr.length - 2].route == 'pages/product/index') {
|
||||||
back();
|
back();
|
||||||
}else{
|
} else {
|
||||||
uni.cache.set('tableCode',listinfo.tableCode)
|
uni.cache.set('tableCode', listinfo.tableCode)
|
||||||
uni.cache.set('shopId',listinfo.shopId)
|
uni.cache.set('shopId', listinfo.shopId)
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url:'/pages/product/index?noJump=1'
|
url: '/pages/product/index?noJump=1'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1111,11 +1121,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const limitTimeDiscountRes = ref(null)
|
const limitTimeDiscountRes = ref(null)
|
||||||
const rechargeConfig=ref(null)
|
const rechargeConfig = ref(null)
|
||||||
|
|
||||||
|
const loading=ref(true)
|
||||||
async function init(opt) {
|
async function init(opt) {
|
||||||
const res1= await storeuser.actionsproductqueryProduct();
|
const res1 = await storeuser.actionsproductqueryProduct();
|
||||||
orderVIP.value=res1
|
orderVIP.value = res1
|
||||||
console.log('orderVIP',orderVIP.value)
|
console.log('orderVIP', orderVIP.value)
|
||||||
cartStore.clearOrderConfig();
|
cartStore.clearOrderConfig();
|
||||||
Object.assign(options, opt);
|
Object.assign(options, opt);
|
||||||
listinfo.id = options.orderId;
|
listinfo.id = options.orderId;
|
||||||
@@ -1145,22 +1157,24 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取台桌信息
|
//获取台桌信息
|
||||||
let tableRes = await getTableInfo({
|
let tableRes = await getTableInfo({
|
||||||
tableCode: options.tableCode || "",
|
tableCode: options.tableCode || "",
|
||||||
});
|
});
|
||||||
console.log("tableRes", tableRes);
|
console.log("tableRes", tableRes);
|
||||||
listinfo.tableName = tableRes?tableRes.name:'';
|
listinfo.tableName = tableRes ? tableRes.name : '';
|
||||||
|
|
||||||
//获取店铺信息
|
//获取店铺信息
|
||||||
const shopInfoRes = await APIusershopInfodetail({
|
const shopInfoRes = await APIusershopInfodetail({
|
||||||
shopId: options.shopId,
|
shopId: options.shopId,
|
||||||
});
|
});
|
||||||
//智慧充值
|
//智慧充值
|
||||||
const rechargeConfigRes=await rechargeApi.config({shopId: options.shopId})
|
const rechargeConfigRes = await rechargeApi.config({
|
||||||
if(rechargeConfigRes&&typeof rechargeConfigRes ==='object'){
|
shopId: options.shopId
|
||||||
rechargeConfig.value=rechargeConfigRes
|
})
|
||||||
|
if (rechargeConfigRes && typeof rechargeConfigRes === 'object') {
|
||||||
|
rechargeConfig.value = rechargeConfigRes
|
||||||
}
|
}
|
||||||
//获取积分配置
|
//获取积分配置
|
||||||
pointsApi.pointsConfig().then(res => {
|
pointsApi.pointsConfig().then(res => {
|
||||||
@@ -1179,6 +1193,7 @@
|
|||||||
if (shopInfoRes) {
|
if (shopInfoRes) {
|
||||||
cartStore.shopInfo = shopInfoRes.shopInfo;
|
cartStore.shopInfo = shopInfoRes.shopInfo;
|
||||||
}
|
}
|
||||||
|
loading.value=false
|
||||||
await cartStore.goodsInit();
|
await cartStore.goodsInit();
|
||||||
// * 获取会员信息
|
// * 获取会员信息
|
||||||
await nextTick();
|
await nextTick();
|
||||||
@@ -1286,7 +1301,7 @@
|
|||||||
if (!isCanUseCharge.value) {
|
if (!isCanUseCharge.value) {
|
||||||
arr.add("余额支付");
|
arr.add("余额支付");
|
||||||
}
|
}
|
||||||
if(rechargeConfig.value&&!rechargeConfig.value.isEnable){
|
if (rechargeConfig.value && !rechargeConfig.value.isEnable) {
|
||||||
arr.add("余额支付");
|
arr.add("余额支付");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1296,12 +1311,12 @@
|
|||||||
watch(() => cartStore.limitTimeDiscount, (newval, oldval) => {
|
watch(() => cartStore.limitTimeDiscount, (newval, oldval) => {
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(()=>cartStore.limitTimeDiscount,(newval)=>{
|
watch(() => cartStore.limitTimeDiscount, (newval) => {
|
||||||
socketInitPar.time_dis_info=newval
|
socketInitPar.time_dis_info = newval
|
||||||
},{
|
}, {
|
||||||
deep:true,
|
deep: true,
|
||||||
immediate:true
|
immediate: true
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1813,7 +1828,16 @@
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
padding: 14rpx 44rpx;
|
padding: 0 44rpx;
|
||||||
|
min-height: 72rpx;
|
||||||
|
line-height: 72rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
&.disabled {
|
||||||
|
background-color: #eee;
|
||||||
|
color: #999;
|
||||||
|
font-size: 24rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixedview_tows {
|
.fixedview_tows {
|
||||||
|
|||||||
@@ -62,14 +62,13 @@
|
|||||||
<view class="shop-info">
|
<view class="shop-info">
|
||||||
<view class="shop-item">
|
<view class="shop-item">
|
||||||
<view class="cover" v-for="(item1,index1) in item.goods" :key="index1">
|
<view class="cover" v-for="(item1,index1) in item.goods" :key="index1">
|
||||||
|
|
||||||
<u-image width="56" height="56" radius="10" :src="item1.productImg"
|
<u-image width="56" height="56" radius="10" :src="item1.productImg"
|
||||||
v-if="!item1.isTemporary"></u-image>
|
v-if="!item1.isTemporary"></u-image>
|
||||||
|
|
||||||
<u-image width="56" height="56" radius="10"
|
<u-image width="56" height="56" radius="10"
|
||||||
v-else-if="item1.isTemporary &&item1.productName=='签子'"
|
v-else-if="item1.isTemporary &&item1.productName=='签子'"
|
||||||
src="https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/5/b97054debd83486ab7ad8e20ca6a360a.png"
|
src="https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/5/b97054debd83486ab7ad8e20ca6a360a.png"></u-image>
|
||||||
></u-image>
|
|
||||||
<u-image width="56" height="56" radius="10"
|
<u-image width="56" height="56" radius="10"
|
||||||
:src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/table.png'"
|
:src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/table.png'"
|
||||||
mode="heightFix" v-else></u-image>
|
mode="heightFix" v-else></u-image>
|
||||||
@@ -91,8 +90,27 @@
|
|||||||
<view class="footer-wrap">
|
<view class="footer-wrap">
|
||||||
<view class="btn" @click.stop="$u.debounce(isRemoveOrder(item,index),1000)"
|
<view class="btn" @click.stop="$u.debounce(isRemoveOrder(item,index),1000)"
|
||||||
v-if="item.status == 'done' || item.status == 'cancelled'"> 删除订单 </view>
|
v-if="item.status == 'done' || item.status == 'cancelled'"> 删除订单 </view>
|
||||||
<view class="btn s" @click.stop="$u.debounce(orderinfo(item),1000)"
|
<template v-if="shopInfo&&shopInfo.id">
|
||||||
v-if="item.status == 'unpaid' || item.status == 'paying'"> 去付款 </view>
|
<template v-if="shopInfo.id==item.shopId">
|
||||||
|
<template v-if="shopInfo.isUserPay">
|
||||||
|
<view class="btn s" @click.stop="$u.debounce(orderinfo(item),1000)"
|
||||||
|
v-if="item.status == 'unpaid' || item.status == 'paying'"> 去付款 </view>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<view class="btn s disabled" @click.stop="()=>{}"
|
||||||
|
v-if="item.status == 'unpaid' || item.status == 'paying'"> 请前往吧台支付 </view>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<view class="btn s" @click.stop="$u.debounce(orderinfo(item),1000)"
|
||||||
|
v-if="item.status == 'unpaid' || item.status == 'paying'"> 去付款 </view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<view class="btn s" @click.stop="$u.debounce(orderinfo(item),1000)"
|
||||||
|
v-if="item.status == 'unpaid' || item.status == 'paying'"> 去付款 </view>
|
||||||
|
</template>
|
||||||
|
|
||||||
<view class="btn s" @click.stop="agignOrder(item)" v-if="item.status != 'unpaid'"> 再来一单 </view>
|
<view class="btn s" @click.stop="agignOrder(item)" v-if="item.status != 'unpaid'"> 再来一单 </view>
|
||||||
</view>
|
</view>
|
||||||
@@ -151,7 +169,7 @@
|
|||||||
uni.cache.set("shopId", item.shopId);
|
uni.cache.set("shopId", item.shopId);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/product/index?type=beforehand&order_id=" + item.id +
|
url: "/pages/product/index?type=beforehand&order_id=" + item.id +
|
||||||
'&one_more_order=1&shopId='+item.shopId,
|
'&one_more_order=1&shopId=' + item.shopId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -167,6 +185,8 @@
|
|||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const shopInfo = uni.cache.get('shopInfo')
|
||||||
|
|
||||||
function isRemoveOrder(item) {
|
function isRemoveOrder(item) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -523,6 +543,12 @@
|
|||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
margin-left: 32rpx;
|
margin-left: 32rpx;
|
||||||
|
|
||||||
|
&.disabled {
|
||||||
|
background-color: #eee;
|
||||||
|
color: #999;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.s {
|
.s {
|
||||||
|
|||||||
Reference in New Issue
Block a user