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){