From fc129b9dc354e9db0c56c378d23a2bf378e5748b Mon Sep 17 00:00:00 2001
From: LegnaYet <1023868505@qq.com>
Date: Fri, 24 Apr 2020 19:21:22 +0800
Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E5=BA=97=E5=8F=B7=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/shop/IncreaseStoreManager.vue | 40 +++++++++++++++++--------
1 file changed, 28 insertions(+), 12 deletions(-)
diff --git a/src/pages/shop/IncreaseStoreManager.vue b/src/pages/shop/IncreaseStoreManager.vue
index 3f18468..091acb0 100644
--- a/src/pages/shop/IncreaseStoreManager.vue
+++ b/src/pages/shop/IncreaseStoreManager.vue
@@ -11,8 +11,7 @@
@@ -20,8 +19,7 @@
@@ -29,8 +27,7 @@
@@ -205,6 +202,7 @@
regionId: 0,
//零售公司list
companyList: [],
+ customerList: [],
companyId: 0,
errorList: [],
@@ -325,7 +323,7 @@
this.getSelectList();
// this.downBigRegionData();
// this.downRegionData();
- // this.downShopData();
+ this.downShopData();
},
methods: {
searchCustomerDataBtnClick: function () {
@@ -415,23 +413,41 @@
this.insertAllOption();
this.companyId = 0;
//加载店铺
-
+ this.downShopData();
},
//零售公司选择
- companySelect: function(){
+ companySelect: function(value){
//加载店铺
+ this.selectedRegion = value;
+ this.downShopData(value);
},
downCompanyChange: function (formValidate) {
this.downShopData(formValidate.departIds);
},
downShopData: function (selected) {
let that = this;
- let selectValue = selected;
+ let companyId = selected;
if (!selected){
- selectValue = that.selectedRegion
+ companyId = that.companyId;
+ }
+ let regionId = that.regionId;
+ let customerIds = [];
+ if(regionId === 0){
+
+ }else{
+ this.companyList = this.organizationalList.filter(item => item.parentId === regionId && item.level === 2);
+ let companyIds = this.companyList.map(item => item.id);
+ this.customerList = this.organizationalList.filter(item => companyIds.indexOf(item.parentId) !== -1 && item.level === 3);
}
+ if(companyId === 0){
+
+ }else{
+ this.customerList = this.organizationalList.filter(item => item.parentId === companyId && item.level === 3);
+ }
+ customerIds = this.customerList.map(item => item.id);
+
let request =
- {userId: that.userId,companyId: that.changeData(selectValue),bigRegionId: that.changeData(that.selectedBigRegion)};
+ {userId: that.userId,customerIds: customerIds};
staff.downShopData(request, function (data) {
data = data.data.results;
if(data){