结算页面fix

master
jevononlie 6 months ago
parent b0cf79fb8b
commit eb791f6d27

@ -104,7 +104,7 @@ const handlePayment = async () => {
}
const arrFlag = siteProductList.value.map((q) => {
const childFlag = q.children.some(q => {
return q?.productActualWeight
return q?.productActualWeight && q?.actualRecoveryPrice
})
return childFlag
})
@ -160,7 +160,7 @@ const handlePayment = async () => {
uni.showToast({
icon: 'none',
duration: 3000,
title: '请输入商品的实际重量',
title: '请输入商品完整的实际重量或实际价格',
})
}
}

@ -2,7 +2,7 @@
* @Author: 王文杰
* @Date: 2024-01-25 10:55:51
* @LastEditors: jevononlie 728254585@qq.com
* @LastEditTime: 2024-05-09 16:10:52
* @LastEditTime: 2024-05-09 17:40:46
* @FilePath: /app-nx-recycle/src/payment/success/success.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@ -167,11 +167,13 @@ const sumVal = computed(() => {
const handlePayment = async () => {
const arrFlag = siteProductList.value.map((q) => {
const childFlag = q.children?.some(q => {
return q?.productActualWeight
return q?.productActualWeight && q?.actualRecoveryPrice
})
return childFlag
})
const flag = arrFlag.some((e) => e)
if (flag) {
uni.showModal({
title: '提示',
@ -209,7 +211,7 @@ const handlePayment = async () => {
uni.showToast({
icon: 'none',
duration: 3000,
title: '请输入商品的实际重量',
title: '请输入商品完整的实际重量或实际价格',
})
}
}
@ -299,17 +301,22 @@ const popupShow = (item) => {
}
popupWeight.value.open()
}
const popupClose = () => {
const flag = Number(categoryVal.value)
if (flag) {
siteProductList.value.forEach((q) => {
q.children?.forEach((e) => {
if (e.id == activeItem.value.id) {
e.productActualWeight = categoryVal.value
}
//
const handelPopChange = (e) => {
if (!e.show) {
const flag = Number(categoryVal.value)
if (flag) {
siteProductList.value.forEach((q) => {
q.children?.forEach((e) => {
if (e.id == activeItem.value.id) {
e.productActualWeight = categoryVal.value
}
})
})
})
}
}
}
const popupSave = () => {
popupWeight.value.close()
}
const popupAdd = () => {
@ -423,11 +430,11 @@ const popupDel = (idx) => {
</view>
<view class="pay-action" @click="handlePayment"> </view>
</uni-popup>
<uni-popup ref="popupWeight" :mask-click="false" type="right" background-color="#fff">
<uni-popup ref="popupWeight" type="right" background-color="#fff" @change="handelPopChange">
<view class="popup-root">
<view class="title">
<view class="text">多次称重(单位Kg)</view>
<view class="close" @click="popupClose"></view>
<view class="close" @click="popupSave"></view>
</view>
<view class="popup-cont">
<view class="weight-item" v-for="(item, index) in weightArr" :key="item.id">

@ -62,7 +62,7 @@ const isLoadingPay = ref(false)
const handlePayment = async () => {
const arrFlag = siteProductList.value.map((q) => {
const childFlag = q.children.some(q => {
return q?.productActualWeight
return q?.productActualWeight && q?.actualRecoveryPrice
})
return childFlag
})
@ -109,7 +109,7 @@ const handlePayment = async () => {
uni.showToast({
icon: 'none',
duration: 3000,
title: '请输入商品的实际重量',
title: '请输入商品完整的实际重量或实际价格',
})
}
}

Loading…
Cancel
Save