下单退款相关更新

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) {