积分值带小数点
This commit is contained in:
@@ -25,7 +25,8 @@
|
||||
<div class="item mar-b32">
|
||||
<div class="left"><span class="tips">*</span>积分值</div>
|
||||
<div class="right">
|
||||
<u-number-box v-model="form.applyIntegral" input-height="44" size="14" :min="1" :max="100"></u-number-box>
|
||||
<u-input type="number" placeholder="请输入" input-align="right" placeholder-style="color:#999;font-size:16px;" height="40" v-model="form.applyIntegral" maxlength="10" />
|
||||
<!-- <u-number-box v-model="form.applyIntegral" input-height="44" size="14" :min="1" :max="100"></u-number-box> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="items">
|
||||
@@ -125,6 +126,10 @@ export default {
|
||||
if (!this.form.applyItemId) {
|
||||
return this.$u.toast('请选择事件类型')
|
||||
}
|
||||
if (!/^([1-9]\d*|0)(\.\d{1,2})?$/g.test(this.form.applyIntegral)) {
|
||||
this.form.applyIntegral = Number(this.form.applyIntegral).toFixed(2)
|
||||
return this.$u.toast('积分值最多只保留两位小数点')
|
||||
}
|
||||
|
||||
if (!this.form.content) {
|
||||
return this.$u.toast('请输入详细描述')
|
||||
|
||||
Reference in New Issue
Block a user