var util = {
falls : function() {
var funs = arguments;
obj.setTimeout(function(){
if(funs[0] && (typeof funs[0] != "function") ){
funs = funs[0];
}
var lth = funs.length;
var f1 = funs[0];
var fend = funs[lth-1];
var i = 0;
var fnext = function(err) {
if(err) {
fend(err);
return;
}
i++;
i < lth ? funs[i](i==lth-1?null:fnext) : 0;
};
if(f1==fend){
return f1();
}
obj.setTimeout(function(){
f1(fnext);
},0);
},0)
},
}
util.falls(
function(next){
data.permission = rest.getPermissionShow(data.caseId);
if(!data.permission.show){
return next({code:-1,message:"无权限"});
}
next();
},
function(next){
rest.findCaseCxPayInfoTotalByCaseId({
caseId : data.caseId
}, function(res){
data.fmdata = util.copy(res.data||{})
next();
}, function(){}, function(res, berr){
berr?next({code:-1,message:res.message||""}):next();
});
},
function(err){
if(err){
data.loading_desc_0_more = err.message||"";
data.loading = 0;
}else{
data.loading = 2;
}
self.$update();
}
);
console