下单退款相关更新

This commit is contained in:
GaoHao
2025-03-15 18:30:27 +08:00
parent c2135c6119
commit 994cf8bf2b
54 changed files with 682 additions and 2408 deletions

View File

@@ -70,17 +70,12 @@
</template>
<script setup>
import { computed, reactive, ref } from 'vue';
import go from '@/commons/utils/go.js';
import infoBox from '@/commons/utils/infoBox.js';
import {
formatPrice
} from '@/commons/utils/format.js';
import { formatPrice } from '@/commons/utils/format.js';
import {
computed,
reactive,
ref
} from 'vue';
const props = defineProps({
data: {
type: Array,
@@ -92,14 +87,6 @@
type: Boolean,
default: false
},
user: {
type: Object,
default: () => {
return {
id: ""
}
}
},
table: {
type: Object,
default: () => {
@@ -173,7 +160,8 @@
const allPrice = computed(() => {
console.log("购物车数据==",props.data)
return props.data.reduce((prve, cur) => {
return prve + cur.lowPrice * cur.number
let price = Math.floor((cur.lowPrice * cur.number)*100)/100
return prve + price
}, 0).toFixed(2)
})
@@ -182,8 +170,9 @@
result = props.data.reduce((prve, cur) => {
return prve + cur.number
}, 0)
// console.log(result)
return result >= 99 ? 99 : result
console.log(result)
result = result > 0 ? result.toFixed(2) : 0
return result >= 99 ? 99 : parseFloat(result)
})
function updateNumber(isAdd, index, goods) {

View File

@@ -81,6 +81,7 @@
// 将数据保存进对应的值
let arr = []
let arrlength = 0
datas.selectNumber = 0
datas.skus.map(ele => {
let group = {
...ele,

View File

@@ -4,9 +4,7 @@
<view class="boxoverlay" v-if="form&&form.goods">
<view class="rect" @tap.stop>
<view class="title">
<view>
标题
</view>
<view> 标题 </view>
<view class="" @click="overlayshow = false">
<up-icon name="close" color="#93969b" size="20"></up-icon>
</view>
@@ -31,11 +29,9 @@
<button @click="deleteLast"></button>
</view>
<view class="classmoney">
{{ (form.goods.lowPrice * currentInput).toFixed(2) }}
</view>
<view class="classconfirm" @click="clickconfirm">
确认
{{ (Math.floor((form.goods.lowPrice * currentInput)*100)/100).toFixed(2) }}
</view>
<view class="classconfirm" @click="clickconfirm"> 确认 </view>
</view>
</view>
</up-overlay>