表格类型 表格内容必填校验
This commit is contained in:
parent
1ec4153809
commit
901c9e2026
@ -930,7 +930,11 @@ function showTableDialog(obj,value,id) {
|
||||
name: tableName,
|
||||
table: parent.operateList
|
||||
}
|
||||
saveDialogTableValue(value,id,obj)
|
||||
if(value.table.some(item => item.name == '') || value.table.some(item => item.desc == '')) { // 表格存在空值
|
||||
$.simpleAlert("表格内容不能存在空值",'warning')
|
||||
} else {
|
||||
saveDialogTableValue(value,id,obj)
|
||||
}
|
||||
parent.$("#attribute-table-window1").dialog("close");
|
||||
}
|
||||
}, {
|
||||
|
||||
@ -2117,8 +2117,12 @@ function openTableDialog(obj,value) {
|
||||
name: tableName,
|
||||
table: dialogTableList
|
||||
}
|
||||
updateAttributeById($(obj).attr("objid"), tableObj);
|
||||
$("#attribute-table-window").dialog('close');
|
||||
if(dialogTableList.some(item => item.name == '') || dialogTableList.some(item => item.desc == '')) {
|
||||
$.simpleAlert("表格内容不能存在空值",'warning')
|
||||
} else {
|
||||
updateAttributeById($(obj).attr("objid"), tableObj);
|
||||
$("#attribute-table-window").dialog('close');
|
||||
}
|
||||
}
|
||||
}, {
|
||||
text : '取消',
|
||||
@ -2129,17 +2133,6 @@ function openTableDialog(obj,value) {
|
||||
})
|
||||
}
|
||||
|
||||
// function tableInputHeight() {
|
||||
// var input = $("#attribute-table-content").find(".dialog_table_input_css");
|
||||
// input.each(function () {
|
||||
// $(this).on('input', function(){
|
||||
// if(this.scrollHeight > $(this).height()) {
|
||||
// var curRow = parseInt($(this).attr('rows'))
|
||||
// $(this).attr('rows',curRow + 1)
|
||||
// }
|
||||
// });
|
||||
// })
|
||||
// }
|
||||
|
||||
function addTableTr(obj) {
|
||||
let newTrId = Utils.newId()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user