记得上下班打卡 | git大法好,push需谨慎

Commit 1b295c35 authored by sangchunxi's avatar sangchunxi

功能阻塞3

parent 5d037bcc
...@@ -394,9 +394,10 @@ ...@@ -394,9 +394,10 @@
for (let i = 0; i < list.length; i++) { for (let i = 0; i < list.length; i++) {
createListenerSearch(i + 1) createListenerSearch(i + 1)
$(`#listActiveType${i+1}`).change(function () { $(`#listActiveType${i+1}`).change(function () {
varObj[Object.keys(varObj)[i]].empty()
$('#listRemoteSearch' + (currentSelect) + ' input').attr('value', '') $('#listRemoteSearch' + (currentSelect) + ' input').attr('value', '')
$('#listRemoteSearch' + (currentSelect) + ' input').attr('data-id', '') $('#listRemoteSearch' + (currentSelect) + ' input').attr('data-id', '')
varObj[Object.keys(varObj)[currentSelect - 1]].empty()
console.log('init-listener', varObj[Object.keys(varObj)[currentSelect - 1]])
}) })
$('#listRemoteSearch' + (i + 1) + ' input').focus(function () { $('#listRemoteSearch' + (i + 1) + ' input').focus(function () {
...@@ -492,22 +493,26 @@ ...@@ -492,22 +493,26 @@
$(`#listActiveType${count}`).change(function () { $(`#listActiveType${count}`).change(function () {
$('#listRemoteSearch' + (currentSelect) + ' input').val('') $('#listRemoteSearch' + (currentSelect) + ' input').val('')
$('#listRemoteSearch' + (currentSelect) + ' input').attr('data-id', '') $('#listRemoteSearch' + (currentSelect) + ' input').attr('data-id', '')
varObj[Object.keys(varObj)[currentSelect - 1]].empty()
console.log('add-listener', varObj[Object.keys(varObj)[currentSelect - 1]])
}) })
$('#listRemoteSearch' + (count) + ' input').focus(function () { $('#listRemoteSearch' + (count) + ' input').focus(function () {
$(this).val('') $(this).val('')
$(this).attr('data-id', '') $(this).attr('data-id', '')
// varObj['listRemoteSearch'+currentSelect].empty()
}) })
}, 400) }, 400)
setTimeout(() => { // setTimeout(() => {
$('#listRemoteSearch' + (count) + ' input').focus(function () { // $('#listRemoteSearch' + (count) + ' input').focus(function () {
$(this).val('') // $(this).val('')
$(this).attr('data-id', '') // $(this).attr('data-id', '')
}) // varObj['listRemoteSearch'+currentSelect].empty()
// })
}, 600) //
// }, 600)
} else { } else {
layer.msg('不能添加') layer.msg('不能添加')
...@@ -581,8 +586,6 @@ ...@@ -581,8 +586,6 @@
console.log('当前的list下啦',val, index) console.log('当前的list下啦',val, index)
let _selectVal = $("#listActiveType" + index).find("option:selected").val() // 当前子select val let _selectVal = $("#listActiveType" + index).find("option:selected").val() // 当前子select val
if (_selectVal) { if (_selectVal) {
let _params = {} let _params = {}
if (_selectVal == 1) { if (_selectVal == 1) {
......
...@@ -424,6 +424,8 @@ ...@@ -424,6 +424,8 @@
$('#listRemoteSearch' + (currentSelect) + ' input').attr('value', '') // 重置功能 $('#listRemoteSearch' + (currentSelect) + ' input').attr('value', '') // 重置功能
$('#listRemoteSearch' + (currentSelect) + ' input').attr('data-id', '') $('#listRemoteSearch' + (currentSelect) + ' input').attr('data-id', '')
varObj[Object.keys(varObj)[currentSelect - 1]].empty()
console.log('init-listener', varObj[Object.keys(varObj)[currentSelect - 1]])
}) })
$('#listRemoteSearch' + (i + 1) + ' input').focus(function () { $('#listRemoteSearch' + (i + 1) + ' input').focus(function () {
...@@ -532,6 +534,8 @@ ...@@ -532,6 +534,8 @@
$('#listRemoteSearch' + (currentSelect) + ' input').val(''); // 重置功能 $('#listRemoteSearch' + (currentSelect) + ' input').val(''); // 重置功能
$('#listRemoteSearch' + (currentSelect) + ' input').attr('data-id', '') $('#listRemoteSearch' + (currentSelect) + ' input').attr('data-id', '')
varObj[Object.keys(varObj)[currentSelect - 1]].empty()
console.log('add-listener', varObj[Object.keys(varObj)[currentSelect - 1]])
}) })
}, 400) }, 400)
...@@ -540,6 +544,7 @@ ...@@ -540,6 +544,7 @@
$('#listRemoteSearch' + (count) + ' input').focus(function () { $('#listRemoteSearch' + (count) + ' input').focus(function () {
$(this).val('') $(this).val('')
$(this).attr('data-id', '') $(this).attr('data-id', '')
// varObj[Object.keys(varObj)[currentSelect - 1]].empty()
}) })
}, 600) }, 600)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment