瀏覽代碼

同城分销店拆分、分销店对应多个经销商

zhujindu 11 月之前
父節點
當前提交
c082b687bf
共有 2 個文件被更改,包括 12 次插入2 次删除
  1. 7 1
      src/views/storeManagement/storeAdd.vue
  2. 5 1
      src/views/storeManagement/storeEdit.vue

+ 7 - 1
src/views/storeManagement/storeAdd.vue

@@ -1640,6 +1640,10 @@ export default {
       this.fromValue.orgId = '';
       this.fromValue.ifJzStoreType = value.ifJzStoreType;
       this.getChainsByDeptCode(null, value.ifJzStoreType);
+      // 切换门店类型删除选定经销商
+      this.treeSelect = [];
+      this.sfaStoreChainsContactList = []; //选中确定的经销商
+      this.activatedTCFXList = []; //选中的经销商
       this.showPicker = false;
     },
     numberFn() {
@@ -1955,7 +1959,9 @@ export default {
       // 打开select,上次选中确认数据赋值给选中待确认,回显使用
       this.activatedTCFXList = JSON.parse(JSON.stringify(this.sfaStoreChainsContactList));
       if (!this.treeSelect.length) {
-        listChainsByCategory().then((res) => {
+        this.toastLoading(0, '加载中...', true);
+        listChainsByCategory({ orgId: this.fromValue.orgId }).then((res) => {
+          this.toastLoading().clear();
           // 初始化数据
           res.data.forEach((val) => {
             val.dot = false;

+ 5 - 1
src/views/storeManagement/storeEdit.vue

@@ -1640,6 +1640,10 @@ export default {
         this.fromValue.storeCategory = value.dictValue;
         this.fromValue.ifJzStoreType = value.ifJzStoreType;
         this.getChainsByDeptCode(null, value.ifJzStoreType);
+        // 切换门店类型删除选定经销商
+        this.treeSelect = [];
+        this.sfaStoreChainsContactList = []; //选中确定的经销商
+        this.activatedTCFXList = []; //选中的经销商
         this.showPicker = false;
       }
       if (value.dictValue == 'C912') {
@@ -1882,7 +1886,7 @@ export default {
       this.activatedTCFXList = JSON.parse(JSON.stringify(this.sfaStoreChainsContactList));
       if (!this.treeSelect.length) {
         this.toastLoading(0, '加载中...', true);
-        listChainsByCategory({ id: this.$route.query.id }).then((res) => {
+        listChainsByCategory({ orgId: this.fromValue.orgId }).then((res) => {
           this.toastLoading().clear();
           // 初始化数据
           res.data.forEach((val) => {