【类 型】:feat

【原  因】:防止客户 填入过大的退款金额 前端过滤
【过  程】:申请退款金额的 cell 失焦 自动格式化(保留小鼠后两位) 超过订单总金额 自动设生成总金额
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
air 2025-01-14 20:06:50 +08:00
parent 814066dffc
commit fed1d496ed

View File

@ -61,7 +61,8 @@
<!-- form -->
<view class="ofa m-t-24 m-b-12 flex mub borderBDas" style="max-height: 60vh;">
<view class="fb fz32">¥</view>
<u-input placeholder="请输入金额" v-model="requestRefund_price" type="digit" border="false" />
<u-input placeholder="请输入金额" v-model="requestRefund_price" @blur="onRefundPriceBlur" type="digit"
border="false" />
</view>
<!-- 占位 -->
<view class="extra-space1"></view>
@ -153,24 +154,23 @@
closeRefund_remark() {
this.refund_remarkShow = false
},
// 退
onRefundPriceBlur() {
// 使 formatPrice
this.requestRefund_price = this.formatPrice(this.requestRefund_price)
//
if (Number(this.requestRefund_price) > Number(this.fullPrice)) {
this.requestRefund_price = Number(this.fullPrice)
}
},
},
filters: {
parseTime, //
formatPrice, //
truncate
},
watch: {
requestRefund_price: {
handler(val) {
let refund_price = this.formatPrice(Number(val))
if (refund_price > this.fullPrice) { //退
this.requestRefund_price = this.fullPrice
}else{
this.requestRefund_price = refund_price
}
}
}
},
watch: {},
computed: {
//
order() {