优化前端提醒

master
chenzhi 4 years ago
parent a0b04cf81e
commit 17e1f4b1fa

@ -146,13 +146,13 @@ class ExcelPaymentController extends BaseController
$v['create_time'] = time();
$v['statement_num'] = "JS_".date('Ymd').date('His').$v['company_id'].sp_random_string(5);
if(!isset($company_info['ali_user']) || !isset($company_info['ali_account']) || $company_info['ali_user'] == '' || $company_info['ali_account'] == ''){
M('ExcelStatementInfo',"tab_")->where("statement_num = '{$v['statement_num']}'")->delete();
$this->ajaxReturn(["status"=>0,"msg"=>"添加失败"]);
M('ExcelStatementInfo',"tab_")->where("batch_num = '{$v['batch_num']}'")->delete();
$this->ajaxReturn(["status"=>0,"msg"=>"支付宝真实姓名及登陆账号不允许为空"]);
}
$res = $ExcelStatementInfo->add($v);
if($res === false){
M('ExcelStatementInfo',"tab_")->where("statement_num = '{$v['statement_num']}'")->delete();
M('ExcelStatementInfo',"tab_")->where("batch_num = '{$v['batch_num']}'")->delete();
$this->ajaxReturn(["status"=>0,"msg"=>"添加失败"]);
}
}

@ -204,6 +204,19 @@
page++;
COMPARE.loopCheck(page,callback)
});
},
checkData:function(callback){
MSG.showmsg("数据校验中...");
var d = sendDefaultData.filedata;
for (const key in d) {
var c = d[key].company_info;
if(!c.hasOwnProperty('ali_user') || c.ali_user == '' || !c.hasOwnProperty('ali_account') || c.ali_account == ''){
MSG.hidemsg();
layer.msg('支付宝真实姓名及登陆账号不允许为空');
return false;
}
}
callback();
}
}
</script>
@ -259,12 +272,14 @@
sendDefaultData.check_page = Math.ceil(sendDefaultData.filedata_count/check_size);
sendDefaultData.begin_time = start;
sendDefaultData.end_time = end;
COMPARE.loopCheck(1,function(){
setTimeout(function(){
window.location.href="{:U('lists',['row'=>100,'page'=>1,'batch_num'=>$batch])}";
},1500);
})
COMPARE.checkData(function(){
COMPARE.loopCheck(1,function(){
setTimeout(function(){
window.location.href="{:U('lists',['row'=>100,'page'=>1,'batch_num'=>$batch])}";
},1500);
})
});
})
})
@ -297,7 +312,7 @@
reader.readAsBinaryString(f);
}
reader.onload = function (e) {
MSG.showmsg("文件读取完成,比较命令初始化。。。");
MSG.showmsg("文件读取完成,添加命令初始化。。。");
var data = e.target.result;
if (rABS) {
wb = XLSX.read(btoa(fixdata(data)), {

Loading…
Cancel
Save