下单退款相关更新

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

@@ -6,17 +6,16 @@
{{data.productName}}
</view>
<view class="u-flex u-m-t-32" :class="{'gray':data.productId=='-999'}">
<up-number-box :min="0" :max="data.num" :buttonSize="44" v-model="number" integer
<up-number-box :min="0" :max="maxNum" :buttonSize="44" v-model="number" integer
:disabled="data.productId=='-999'">
<template #minus>
<view class="minus number-box-btn">
</view>
<view class="minus number-box-btn"></view>
</template>
<template #input>
<view class="u-flex-1 u-row-center u-text-center input">
<up-input :disabled="data.productId=='-999'" @change="parseIntNumber($event,false)"
@blur="parseIntNumber($event,true)" v-model="number" border="none"
type="number"></up-input>
type="digit"></up-input>
</view>
</template>
<template #plus>
@@ -83,6 +82,8 @@
let model = ref(null)
let modelShow = ref(props.show)
let number = ref(0)
let maxNum = ref(0)
const tags = ref([{
label: "点错",
checked: false
@@ -110,16 +111,12 @@
})
function parseIntNumber(val, isNow) {
console.log(val)
let newval = val * 1
if (newval > props.data.num) {
newval = props.data.num
}
// 判断是否是称重商品。如果是可以输入小数
if (props.data.isWeight != 1) {
if (newval < 1) {
newval = 1
}
if (newval > props.data.num - props.data.returnNum) {
newval = props.data.num - props.data.returnNum
}
if (isNow) {
number.value = newval * 1
return
@@ -149,9 +146,8 @@
function open() {
model.value.open()
if (props.data.productId == '-999') {
number.value = props.data.num
}
number.value = props.data.num - props.data.returnNum
maxNum.value = props.data.num - props.data.returnNum
}
function close() {