From 0b78a8e7557d020e98fe855d259a7a310fb96bb0 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期四, 19 八月 2021 09:07:16 +0800
Subject: [PATCH] 提交
---
zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml
index 197060d..9b5d903 100644
--- a/zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml
@@ -90,7 +90,7 @@
<div class="clearfix layer-area" style="padding-bottom:15px;">
<label class="text-right col-sm-3 col-md-3 control-label">绾犻敊</label>
<div class="col-sm-9 col-md-9">
- <input class="form-control" id="Jiucuo" name="Jiucuo" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Model.Jiucuo" oninput="if(value.length>10)value=value.slice(0,10)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
+ <input class="form-control" id="Jiucuo" name="Jiucuo" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Model.Jiucuo" oninput="if(value.length>10)value=value.slice(0,10)" onkeyup="CheckNum(this);">
</div>
</div>
@@ -226,6 +226,18 @@
parent.layer.close(index);
return false;
}
+
+ //鐢ㄦ埛鍙兘杈撳叆姝h礋鏁颁笌灏忔暟
+ function CheckNum(obj) {
+
+ if (isNaN(obj.value) && !/^-$/.test(obj.value)) {
+ obj.value = "";
+ }
+ if (!/^[+-]?\d*\.{0,1}\d{0,1}$/.test(obj.value)) {
+ obj.value = obj.value.replace(/\.\d{2,}$/, obj.value.substr(obj.value.indexOf('.'), 3));
+ }
+
+ }
</script>
</body>
</html>
\ No newline at end of file
--
Gitblit v1.9.1