修复sub.editColumn();中,对于checkbox取值错误的问题。

This commit is contained in:
谁是大胖子 2021-10-19 07:50:46 +00:00 committed by Gitee
parent 51251331cf
commit 0d00e13db0
1 changed files with 10 additions and 1 deletions

View File

@ -436,7 +436,16 @@ var sub = {
var textareaValue = $(columns[i]).find('textarea');
var key = dataColumns[i].field;
if ($.common.isNotEmpty(inputValue.val())) {
obj[key] = inputValue.val();
var inputType = inputValue.attr("type");
if(inputType === 'checkbox'){
if(inputValue.is(':checked')) {
obj[key] = inputValue.val();
}else{
obj[key] = '';
}
}else{
obj[key] = inputValue.val();
}
} else if ($.common.isNotEmpty(selectValue.val())) {
obj[key] = selectValue.val();
} else if ($.common.isNotEmpty(textareaValue.val())) {