From c60a7d7b29faba465969555e2a9c69acb8510f90 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期五, 25 二月 2022 09:11:41 +0800
Subject: [PATCH] 如果客户资料中有“*”的内容,生产文书时自动填上,质疑单位默认填写客户名称,可修改

---
 zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml |   25 ++++++++++++++++++++++---
 1 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml
index b8f850e..938c759 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;">
@@ -84,16 +84,23 @@
                             <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="Peichang" name="Peichang" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="text" value="@Model.Peichang" oninput="if(value.length>10)value=value.slice(0,10)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
+                                    <input class="form-control" id="Peichang" name="Peichang" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="text" value="@Model.Peichang" oninput="if(value.length>10)value=value.slice(0,10)" onkeyup="CheckNum(this);">
                                 </div>
                             </div>
                             <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>
+                            <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="Yufagongziheji" name="Yufagongziheji" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Model.Yufagongziheji" oninput="if(value.length>10)value=value.slice(0,10)" onkeyup="CheckNum(this);">
                                 </div>
                             </div>
 
+                            
                         </div>
                     </div>
                 </div>
@@ -226,6 +233,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