|
@@ -143,7 +143,7 @@ function editItem(item,activePage){
|
|
|
<div class="itemMsgInfoBox"><span class="itemMsgLab">单项否决:</span><span class="itemInfoRight itemReject">${item.isReject == '1' ? `<img class="switchImg" src=${switchIconOpen} />`:`<img class="switchImg" src=${switchIconClose} />`}</span></div>
|
|
|
<div class="itemMsgInfoBox"><span class="itemMsgLab">启用:</span><span class=" temInfoRight itemUsed">${item.isUsed == '1' ? `<img class="switchImg" src=${switchIconOpen} />`:`<img class="switchImg" src=${switchIconClose} />`}</span></div>
|
|
|
</div>
|
|
|
-
|
|
|
+ <div class="itemMsgInfoTips">分值小数点后最多保留一位!</div>
|
|
|
<div class="confirmEditBox"><span class="confirmEdit">保存</span></div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -158,7 +158,7 @@ function editItem(item,activePage){
|
|
|
itemCpoy.msg = val
|
|
|
})
|
|
|
$("#mainBox .itemMsgBox .itemScore", parent.document).on("keypress", function(e){
|
|
|
- return (/[[0-9]\.]/.test(String.fromCharCode(event.keyCode)))
|
|
|
+ return (/[0-9\.]/.test(String.fromCharCode(e.keyCode)))
|
|
|
})
|
|
|
$("#mainBox .itemMsgBox .itemScore", parent.document).on("input", function(e){
|
|
|
const val = $(this).val()
|
|
@@ -176,13 +176,18 @@ function editItem(item,activePage){
|
|
|
})
|
|
|
|
|
|
$("#mainBox .itemMsgBox .confirmEdit", parent.document).on("click", function(){
|
|
|
- var reg = new RegExp(/^\d{1,2}(\.\d)?$/);
|
|
|
+ var reg = new RegExp(/^\d+(\.\d)?$/);
|
|
|
if(reg.test(itemCpoy.score)){
|
|
|
- console.lohg('aaaaaaaaaaaaaa')
|
|
|
+ saveEdit(itemCpoy,activePage)
|
|
|
+ $("#mainBox .itemMsgBox .itemMsgInfoTips", parent.document).css("display","none")
|
|
|
+ $('#mainBox .itemMsgBox', parent.document).remove()
|
|
|
return
|
|
|
+ }else{
|
|
|
+ $("#mainBox .itemMsgBox .itemMsgInfoTips", parent.document).css("display","block")
|
|
|
+
|
|
|
+ return
|
|
|
}
|
|
|
- saveEdit(itemCpoy,activePage)
|
|
|
- $('#mainBox .itemMsgBox', parent.document).remove()
|
|
|
+
|
|
|
})
|
|
|
|
|
|
|