Kaynağa Gözat

经费开支申报 数量两位小数

应县
yxq 1 yıl önce
ebeveyn
işleme
5c076d463c
2 değiştirilmiş dosya ile 11 ekleme ve 1 silme
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Form.cshtml
  2. +10
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Form.js

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Form.cshtml Dosyayı Görüntüle

@@ -9,7 +9,7 @@
</div>
<div class="col-xs-12 lr-form-item" data-table="FundsApplyDetail">
<div class="lr-form-item-title">数量<font face="宋体">*</font></div>
<input id="Number" type="number" class="form-control calcul" isvalid="yes" checkexpession="PositiveInteger" />
<input id="Number" type="number" class="form-control calcul" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="FundsApplyDetail">
<div class="lr-form-item-title">单位<font face="宋体">*</font></div>


+ 10
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Form.js Dosyayı Görüntüle

@@ -31,6 +31,16 @@ var bootstrap = function ($, learun) {
return false;
}
}
if (!!num) {
let regNeg = /^(0|[1-9]\d*|(0|[1-9]\d*)\.\d*[1-9])$/;
if (regNeg.test(num)) {
$('#Number').val(parseFloat(num).toFixed(2));
} else {
$('#Number').val('');
learun.alert.warning("数量必须为整数或小数(不能为负数)!");
return false;
}
}
if (!!num && !!Price) {
$('#Amount').val((parseInt(num) * parseFloat(Price)).toFixed(2));
}


Yükleniyor…
İptal
Kaydet