问题修复
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
订单备注:
|
||||
</view>
|
||||
<view class="u-m-t-18 ">
|
||||
<up-textarea border="none" placeholder="请填写口味、偏好等要求" :type="'textarea'" v-model="listinfo.remark"
|
||||
<up-textarea border="none" placeholder="请填写口味、偏好等要求" type="textarea" v-model="orderRemarker"
|
||||
:clearable="true" />
|
||||
</view>
|
||||
</view>
|
||||
@@ -214,18 +214,37 @@
|
||||
rechargeId.value = e
|
||||
}
|
||||
|
||||
function updateChargeSel(e) {
|
||||
rechargeItem.value = e
|
||||
}
|
||||
watch(() => rechargeItem.value.id, (newval) => {
|
||||
function updateChargeSel(newval) {
|
||||
console.log('updateChargeSel', newval);
|
||||
rechargeItem.value = newval
|
||||
//充值并付款时只能微信支付
|
||||
if (newval) {
|
||||
if (newval && newval.id) {
|
||||
disablePayType.value = ['余额支付']
|
||||
paymentMethodref.value.groupChanges(2)
|
||||
} else {
|
||||
disablePayType.value = []
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
if (!shopUserInfo.value.amount) {
|
||||
disablePayType.value = ['余额支付']
|
||||
if (paymentMethodref.value) {
|
||||
paymentMethodref.value.groupChanges(2)
|
||||
}
|
||||
console.log('watch: cartStore.orderCostSummary.finalPayAmount', disablePayType.value);
|
||||
return
|
||||
}
|
||||
if (shopUserInfo.value.amount < newval) {
|
||||
disablePayType.value = ['余额支付']
|
||||
if (paymentMethodref.value) {
|
||||
paymentMethodref.value.groupChanges(2)
|
||||
}
|
||||
console.log('watch: cartStore.orderCostSummary.finalPayAmount', disablePayType.value);
|
||||
return
|
||||
}
|
||||
disablePayType.value = []
|
||||
console.log('watch: cartStore.orderCostSummary.finalPayAmount', disablePayType.value);
|
||||
}
|
||||
|
||||
async function onMessage(Message) {
|
||||
cartStore.onMessage(Message, cartsSocket)
|
||||
@@ -242,6 +261,7 @@
|
||||
})
|
||||
console.log('onMessage:APIgetOrderById', res);
|
||||
if (res) {
|
||||
orderRemarker.value=res.remark;
|
||||
// cartStore.carts=[];
|
||||
// cartStore.setOldOrder(res)
|
||||
}
|
||||
@@ -349,6 +369,8 @@
|
||||
|
||||
// 霸王餐
|
||||
const isBwc = ref(false)
|
||||
//订单备注
|
||||
const orderRemarker = ref('')
|
||||
// 订单详情
|
||||
const listinfo = reactive({
|
||||
combinedArray: [],
|
||||
@@ -383,6 +405,7 @@
|
||||
}) : await APIhistoryOrder({
|
||||
tableCode: options.tableCode
|
||||
})
|
||||
orderRemarker.value=res.remark;
|
||||
if (res && res.tableCode) {
|
||||
socketInitPar.table_code = res.tableCode
|
||||
let tableRes = await getTableInfo({
|
||||
@@ -652,7 +675,7 @@
|
||||
// packFee: packFee.value, //打包费
|
||||
packFee: packfee.value, //打包费
|
||||
originAmount: shifu.value, //订单原金额(包含打包费) 不含折扣价格 不含餐位费
|
||||
remark: '', //备注
|
||||
remark: orderRemarker.value, //备注
|
||||
placeNum: listinfo.id ? (listinfo.placeNum * 1 + 1) : 1, //当前订单下单次数
|
||||
waitCall: '', //是否等叫 0 否 1 等叫
|
||||
orderId: listinfo.id || '',
|
||||
@@ -725,6 +748,7 @@
|
||||
const res1 = await APIgetOrderById({
|
||||
orderId: res.id
|
||||
})
|
||||
orderRemarker.value=res1.remark;
|
||||
cartStore.setOldOrder(res1)
|
||||
}
|
||||
nextTick(goToPay)
|
||||
@@ -873,7 +897,7 @@
|
||||
newCustomerDiscountAmount: cartStore.orderCostSummary.newUserDiscount, //新客立减
|
||||
newCustomerDiscountId: cartStore.orderCostSummary.newUserDiscount > 0 ? cartStore
|
||||
.consumeDiscount.id : '',
|
||||
remark: listinfo.remark, //用户备注
|
||||
remark: orderRemarker.value, //用户备注
|
||||
}
|
||||
console.log('topay checkOrderPay', checkOrderPay);
|
||||
try {
|
||||
@@ -956,7 +980,7 @@
|
||||
newCustomerDiscountAmount: cartStore.orderCostSummary.newUserDiscount, //新客立减
|
||||
newCustomerDiscountId: cartStore.orderCostSummary.newUserDiscount > 0 ? cartStore.consumeDiscount
|
||||
.id : '',
|
||||
remark: listinfo.remark, //用户备注
|
||||
remark: orderRemarker.value, //用户备注
|
||||
}
|
||||
try {
|
||||
await storeMemberpay.balancePayOrder({
|
||||
@@ -967,6 +991,10 @@
|
||||
buyerRemark: '',
|
||||
returnUrl: ''
|
||||
})
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (error) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
@@ -1079,6 +1107,7 @@
|
||||
options.tableCode = res.tableCode
|
||||
cartStore.setSeatFeeConfig('personCount', res.seatNum)
|
||||
cartStore.setDinnerType(res.dineMode || 'dine-in')
|
||||
orderRemarker.value=res.remark;
|
||||
}
|
||||
}
|
||||
//获取店铺信息
|
||||
@@ -1102,8 +1131,10 @@
|
||||
}
|
||||
|
||||
}
|
||||
const shopUserInfo = ref({})
|
||||
onLoad((opt) => {
|
||||
init(opt)
|
||||
shopUserInfo.value = uni.cache.get('shopUserInfo')
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -1576,25 +1607,25 @@
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.orderInfo {
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx 34rpx;
|
||||
|
||||
.t {
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.info {
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
|
||||
.t {
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.info {
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user