Browse Source

回显优化

xuzhiheng 1 năm trước cách đây
mục cha
commit
f6a7c4b365

+ 4 - 2
src/views/order/components/bigOrder.vue

@@ -1993,8 +1993,10 @@ export default {
                 //业绩部门
                 this.saleDepClick()
                 setTimeout(() => {
-                    this.$refs.saleRef.setDefaultPerson = this.$store.getters.getAdminUser.username
-                    this.$refs.saleRef.personData()
+                    if (this.$refs.saleRef) {
+                        this.$refs.saleRef.setDefaultPerson = this.$store.getters.getAdminUser.username
+                        this.$refs.saleRef.personData()
+                    }
                 }, 1000)
             }
         },

+ 4 - 2
src/views/order/components/otherOrder.vue

@@ -991,8 +991,10 @@ export default {
         //业绩部门
         this.saleDepClick()
         setTimeout(() => {
-          this.$refs.saleRef.setDefaultPerson = this.$store.getters.getAdminUser.username
-          this.$refs.saleRef.personData()
+          if (this.$refs.saleRef) {
+              this.$refs.saleRef.setDefaultPerson = this.$store.getters.getAdminUser.username
+              this.$refs.saleRef.personData()
+          }
         }, 1000)
       }
     }

+ 7 - 0
src/views/order/components/salesSelect.vue

@@ -33,6 +33,13 @@ export default {
       salesList: []
     }
   },
+  watch: {
+    setDefaultPerson (n) {
+      if (this.saleType || this.setDefaultPerson) {
+        this.personData()
+      }
+    }
+  },
   created() {
     if (this.saleType || this.setDefaultPerson) {
       this.personData()