From 1c4f3bce3d88557b7ddb5f0a49b4be5e91b416f1 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期四, 14 十月 2021 13:42:33 +0800
Subject: [PATCH] 专家测试--题库管理

---
 zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml
index b8f850e..9b5d903 100644
--- a/zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml
@@ -60,7 +60,7 @@
                                 <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" labtype="txt" addvisible="true" readonly="readonly" type="text" value="@Model.UserName">
-                                    <input type="hidden" name="id" value="@Model.Id" />
+                                    <input type="hidden" name="Id" value="@Model.Id" />
                                 </div>
                             </div>
                             <div class="clearfix layer-area" style="padding-bottom:15px;">
@@ -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