Authored by weiqingting

批量导出

... ... @@ -487,32 +487,39 @@ $("#basedaochu").click(function(){
selectedArr = g.selected,
len = selectedArr.length,
data = g.options.parms();
data.isAuditing=200;
var filter=$(".wqt_all").prop("checked");
$.each(data, function(key, value) {
if (value && value != '' && key != 'size' && key != 'tab') {
count++;
}
});
$.each(data, function(key, value) {
if (value && value != '' && key != 'size' && key != 'tab') {
count++;
}
});
if ((count > 0&&filter) || len > 0) {
var productSknList=[];
if (len > 0) {
data.productSknList = [];
$.each(selectedArr, function(i, value) {
data.productSknList.push(value['productSkn']);
productSknList.push(value['productSkn']);
});
}
data.isAuditing=200;
var result={};
for(var name in data){
if(data.hasOwnProperty(name)&&data[name]){
result[name]=data[name];
var getResult=function(){
if(filter){
var result={};
for(var name in data){
if(data.hasOwnProperty(name)&&data[name]){
result[name]=data[name];
}
}
return result
}else{
return{productSknList:productSknList,isAuditing:200};
}
}
window.open("/ajax/down?queryConf=" + JSON.stringify(result) + "&type=baseProduce");
window.open("/ajax/down?queryConf=" + JSON.stringify(getResult()) + "&type=baseProduce");
}else{
common.util.__tip('请选择导出商品的条件', 'warning');
return;
... ...