<textarea name="filter" style="display:none"><{$filter}></textarea>
<div class="division">
<div class="notice"><{t}>共需同步<{/t}><strong><{$editInfo|count}></strong><{t}>条数据。<{/t}><br>小提示:同步过程中请不要关闭窗口
</div>
<table border="0" cellpadding="0" cellspacing="0" >
序号
</th>

<th style="text-align:center">
注册时间
</th>

<th style="text-align:center">手机号
</th>

<th style="text-align:center">同步结果
</th>

</tr>
<{foreach from=$editInfo item=item key=key name="foo"}>

<{if $item.mobile!=""}>
<tr>

 


<td style="text-align:center"><{$smarty.foreach.foo.iteration}></td>
<td style="text-align:center"><{$item.regtime|cdate:FDATE_FTIME}></td>
<td style="text-align:center"><{input class="tongbumobile" member_ value=$item.mobile}><{$item.mobile}></td>

<td }>
</center>
<{/area}>

<script>
$('batch_edit_btn').addEvent('click',function(){
$('batch_edit_btn').set('html','正在同步中,请稍候....')

var allrows=$ES('#tongbumembers .tongbumobile');
var allrowslength=allrows.length;

var currentIndex=0;//退出递归的条件变量
function newRequest(){
if(currentIndex>=allrowslength){ //infos是存放主机名称的数组
MessageBox.success('同步结束');
// window.finderDialog.close();
$('batch_edit_btn').set('html','同步结束');
return;
}
var item = allrows[currentIndex];
new Request({
'url':'index.php?ctl=<{$env.get.ctl}>&act=saveTongBu&r='+Math.random(),
'data':{'member_id':item.get('member_id'),'mobile':item.value},
'method':'post',
onSuccess:function(r){
currentIndex++;
r=eval('('+r+')');
if(r.status=='exist'){
$('tongburesult_'+item.get('member_id')).set('html',
'<span style="color:#F00">×库里已存在</span>');
}
else if(r.status=='success'){
$('tongburesult_'+item.get('member_id')).set('html',
'<span style="color:#6db248">√同步成功');
}
else if(r.status=='failed'){
$('tongburesult_'+item.get('member_id')).set('html',
'<span style="color:#F00">×插入失败'+r.error_msg);
}

else{
$('tongburesult_'+item.get('member_id')).set('html',
'<span style="color:#F00">×手机号检测结果</span>'+r.status); 
}

newRequest();
}
}).send();
}
newRequest();


//window.finderDialog.close();
});
</script>

  

相关文章:

  • 2021-12-18
  • 2021-11-30
  • 2021-12-18
  • 2021-12-18
  • 2021-12-04
  • 2022-03-02
  • 2021-08-26
  • 2022-12-23
猜你喜欢
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案