|
@@ -480,13 +480,13 @@ function showModal(flag,code,i){
|
|
|
$(".info-item .cont,.flaw-item .title,td").removeClass("active");
|
|
|
//事件解绑
|
|
|
$("#delModal .confirm").off("click");
|
|
|
- $("#qcScore,#qcMsg").off("input");
|
|
|
const flawsList = formatFlawKeys(global_flawData);
|
|
|
const info = flawsList[global_activeTab]&&flawsList[global_activeTab][i];
|
|
|
if(flag==='0'){ //修改
|
|
|
$("#delModal .title").text("修改");
|
|
|
$("#delModal .confirm").text("保存");
|
|
|
$("#editTmpl").tmpl(info).appendTo("#delModal .modal-body");
|
|
|
+ $("#qcScore,#qcMsg,#qcInfo").off("input");
|
|
|
//分数输入验证
|
|
|
$("#qcScore").on("input",function(){
|
|
|
const val=$(this).val();
|
|
@@ -507,6 +507,18 @@ function showModal(flag,code,i){
|
|
|
$(".edit-box .warning .red").text("提示信息不能为空~");
|
|
|
$(".edit-box .warning").show();
|
|
|
}
|
|
|
+ });
|
|
|
+ //提示信息输入验证
|
|
|
+ $("#qcInfo").on("input",function(){
|
|
|
+ const val=$(this).val();
|
|
|
+ $(this).attr("title",val)
|
|
|
+ if(val.length>125){
|
|
|
+ $(".edit-box .warning .red").text("备注不能超过125个字~");
|
|
|
+ $(".edit-box .warning").show();
|
|
|
+ }else{
|
|
|
+ $(".edit-box .warning").hide();
|
|
|
+ return;
|
|
|
+ }
|
|
|
});
|
|
|
if($("#qcInfo").val().length>125){
|
|
|
$(".edit-box .warning .red").text("备注不能超过125个字~");
|
|
@@ -526,6 +538,7 @@ function showModal(flag,code,i){
|
|
|
$("#delModal .confirm").text("保存");
|
|
|
$("#addFlawTmpl").tmpl().appendTo("#delModal .modal-body");
|
|
|
$("#flawDropTmpl").tmpl({info:code}).appendTo("#delModal .modal-body ul");
|
|
|
+ $("#addQcScore,#addQcMsg,#addQcInfo").off("input");
|
|
|
//分数输入验证
|
|
|
$("#addQcScore").on("input",function(){
|
|
|
const val=$(this).val();
|