|
@@ -253,7 +253,7 @@
|
|
|
} else {
|
|
} else {
|
|
|
let canChecked = false
|
|
let canChecked = false
|
|
|
$(obj).parent().parent().siblings().each(function(index,item){
|
|
$(obj).parent().parent().siblings().each(function(index,item){
|
|
|
- if($(this).children('.td_material').children('.consultation').attr(value!='')) {
|
|
|
|
|
|
|
+ if($(this).children('.td_material').children('.consultation')[0].attr(value!='')) {
|
|
|
canChecked = true
|
|
canChecked = true
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -263,8 +263,10 @@
|
|
|
}
|
|
}
|
|
|
$(document).ready(function(){
|
|
$(document).ready(function(){
|
|
|
$('input[name^="consultationList"]').blur(function(){
|
|
$('input[name^="consultationList"]').blur(function(){
|
|
|
|
|
+ console.log('blur事件触发')
|
|
|
$('input[name^="consultationList"]').each(function(index,item){
|
|
$('input[name^="consultationList"]').each(function(index,item){
|
|
|
if (item.value) {
|
|
if (item.value) {
|
|
|
|
|
+ console.log('输入框内有值')
|
|
|
$(this).parent().parent().parent().parent().parent().siblings('.cl').children('.formControls').children('input')[0].checked = true
|
|
$(this).parent().parent().parent().parent().parent().siblings('.cl').children('.formControls').children('input')[0].checked = true
|
|
|
// let defaultIndex = 'defaultList[' + item.name.split('.')[0].split('')[item.name.split('.')[0].split('').length-2] + ']'
|
|
// let defaultIndex = 'defaultList[' + item.name.split('.')[0].split('')[item.name.split('.')[0].split('').length-2] + ']'
|
|
|
// $('input[name^="defaultList"]').each(function(vindex,vitem){
|
|
// $('input[name^="defaultList"]').each(function(vindex,vitem){
|
|
@@ -274,11 +276,13 @@
|
|
|
// })
|
|
// })
|
|
|
} else {
|
|
} else {
|
|
|
if ($(this).parent().parent().siblings().length < 1) {
|
|
if ($(this).parent().parent().siblings().length < 1) {
|
|
|
|
|
+ console.log('同级元素少于一个')
|
|
|
$(this).parent().parent().parent().parent().parent().siblings('.cl').children('.formControls').children('input')[0].checked = false
|
|
$(this).parent().parent().parent().parent().parent().siblings('.cl').children('.formControls').children('input')[0].checked = false
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ console.log('同级元素大于一个要判断是否为空')
|
|
|
let canChecked = false
|
|
let canChecked = false
|
|
|
$(this).parent().parent().siblings().each(function(index,item){
|
|
$(this).parent().parent().siblings().each(function(index,item){
|
|
|
- if($(this).children('.td_material').children('.consultation').attr(value!='')) {
|
|
|
|
|
|
|
+ if($(this).children('.td_material').children('.consultation')[0].attr(value!='')) {
|
|
|
canChecked = true
|
|
canChecked = true
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|