过滤客户

master
wyj2080 6 years ago
parent 2230fac9f6
commit 281a1deed3

@ -205,6 +205,8 @@
let entity = data[i]; let entity = data[i];
that.originAllData.push(entity); that.originAllData.push(entity);
} }
//
that.filterCustomer("export");
require.ensure([], () => { require.ensure([], () => {
const { export_json_to_excel } = require('../excel/Export2Excel'); const { export_json_to_excel } = require('../excel/Export2Excel');
const tHeader = ['序号', '店铺名称', '店铺编码', '大区', '零售公司', '客户', '推广数']; const tHeader = ['序号', '店铺名称', '店铺编码', '大区', '零售公司', '客户', '推广数'];
@ -254,6 +256,8 @@
//null-- //null--
that.checkParamBlank(entity); that.checkParamBlank(entity);
} }
//
that.filterCustomer("main");
} }
if(data == null || data.length === 0){ if(data == null || data.length === 0){
that.totalSize = 0; that.totalSize = 0;
@ -282,6 +286,16 @@
that.insertAllOption(); that.insertAllOption();
}); });
}, },
//
filterCustomer: function(name){
if(this.customerId){
switch (name) {
case "main":this.data1 = this.data1.filter(shop => shop.customerId === this.customerId);break;
case "export": this.originAllData = this.originAllData.filter(shop => shop.customerId === this.customerId);break;
}
}
},
// //
handlePage: function (value) { handlePage: function (value) {
this.pageNum = value; this.pageNum = value;

Loading…
Cancel
Save