|
@@ -163,17 +163,30 @@ function editScore(info){
|
|
|
function showModal(flag,code,i){
|
|
|
$("#delModal .modal-body").html("");
|
|
|
$("#delModal").show();
|
|
|
+ //事件解绑
|
|
|
$("#delModal .confirm").off("click");
|
|
|
- $("#qcScore").off("input");
|
|
|
+ $("#qcScore,#qcMsg").off("input");
|
|
|
const info = global_flawData[global_activeTab][i];
|
|
|
if(flag==='0'){ //修改
|
|
|
$("#delModal .title").text("修改评分");
|
|
|
$("#editTmpl").tmpl(info).appendTo("#delModal .modal-body");
|
|
|
+ //分数输入验证
|
|
|
$("#qcScore").on("input",function(){
|
|
|
const val=$(this).val();
|
|
|
if(/^[0-9]\d*$|^[0-9]\d*(.\d)?$/.test(val)){
|
|
|
$(".edit-box .warning").hide();
|
|
|
}else{
|
|
|
+ $(".edit-box .warning .red").text("支持≥0的数字输入,最多保留小数点后1位~");
|
|
|
+ $(".edit-box .warning").show();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ //提示信息输入验证
|
|
|
+ $("#qcMsg").on("input",function(){
|
|
|
+ const val=$(this).val();
|
|
|
+ if(val.trim()){
|
|
|
+ $(".edit-box .warning").hide();
|
|
|
+ }else{
|
|
|
+ $(".edit-box .warning .red").text("提示信息不能为空~");
|
|
|
$(".edit-box .warning").show();
|
|
|
}
|
|
|
});
|