From 281a1deed399e54cceeb8fe999b07f1f6a963a0f Mon Sep 17 00:00:00 2001 From: wyj2080 <1603068044@qq.com> Date: Wed, 22 Apr 2020 16:26:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=AE=A2=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/ZeroExtendDetail.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/pages/ZeroExtendDetail.vue b/src/pages/ZeroExtendDetail.vue index d7aba7f..0c75575 100644 --- a/src/pages/ZeroExtendDetail.vue +++ b/src/pages/ZeroExtendDetail.vue @@ -205,6 +205,8 @@ let entity = data[i]; that.originAllData.push(entity); } + //过滤客户 + that.filterCustomer("export"); require.ensure([], () => { const { export_json_to_excel } = require('../excel/Export2Excel'); const tHeader = ['序号', '店铺名称', '店铺编码', '大区', '零售公司', '客户', '推广数']; @@ -254,6 +256,8 @@ //null改-- that.checkParamBlank(entity); } + //过滤客户 + that.filterCustomer("main"); } if(data == null || data.length === 0){ that.totalSize = 0; @@ -282,6 +286,16 @@ 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) { this.pageNum = value;