Przeglądaj źródła

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

zhujindu 11 miesięcy temu
rodzic
commit
d7b6c7fc76

+ 6 - 3
src/views/storeManagement/storeAdd.vue

@@ -1975,12 +1975,15 @@ export default {
           return item.categoryCode == this.treeSelect[x].code;
         });
         this.treeSelect[x].dot = activate ? true : false;
-        // 右侧选中返现
+        // 反显右侧选中
         let children = this.treeSelect[x].children;
-        if (children) {
+        if (children && this.treeSelect[x].dot) {
           for (let y = 0; y < children.length; y++) {
             let activate = this.activatedTCFXList.find((item) => {
-              return children[y].chainCode == item.chainCode;
+              return (
+                children[y].categoryCode == item.categoryCode &&
+                children[y].chainCode == item.chainCode
+              );
             });
             if (activate) {
               children[y].Check = true;

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

@@ -1910,10 +1910,13 @@ export default {
         this.treeSelect[x].dot = activate ? true : false;
         // 右侧选中返现
         let children = this.treeSelect[x].children;
-        if (children) {
+        if (children && this.treeSelect[x].dot) {
           for (let y = 0; y < children.length; y++) {
             let activate = this.activatedTCFXList.find((item) => {
-              return children[y].chainCode == item.chainCode;
+              return (
+                children[y].categoryCode == item.categoryCode &&
+                children[y].chainCode == item.chainCode
+              );
             });
             if (activate) {
               children[y].Check = true;