lilei 1 year ago
parent
commit
22475d68c5

+ 2 - 0
src/views/salesManagement/salesQueryNew/comps/activeQueryPart.vue

@@ -282,6 +282,8 @@ export default {
       this.tabList = tabList
       this.promoProductClz = tabList[0].val
       this.tableHeight = window.innerHeight - 350
+
+      this.resetSearchForm()
     },
     // 刷新当前页面
     resetCurForm () {

+ 0 - 4
src/views/salesManagement/salesQueryNew/comps/chooseProduct.vue

@@ -84,10 +84,6 @@ export default {
       if (!newValue) {
         this.cptype = 3
         this.$emit('close')
-      } else {
-        if(this.$refs.partQuery){
-          this.$refs.partQuery.resetSearchForm() 
-        }
       }
     }
   }

+ 1 - 0
src/views/salesManagement/salesQueryNew/comps/queryPart.vue

@@ -234,6 +234,7 @@ export default {
     pageInit (data, promo) {
       this.buyerSn = data.buyerSn
       this.tableHeight = window.innerHeight - 310
+      this.resetSearchForm()
     },
     // 刷新当前页面
     resetCurForm () {

+ 9 - 7
src/views/salesManagement/salesQueryNew/edit.vue

@@ -237,13 +237,6 @@ export default {
     },
     // 获取销售单参与的活动列表
     async getActiveList(){
-      const hasNewActive = await salesQueryUnPartPromo({ salesBillSn: this.$route.params.sn }).then(res => res.data)
-      // 有新活动
-      if(hasNewActive.length){
-        this.newActiveList = hasNewActive
-        this.showNewActiveModal=true
-      }
-
       // 已参与活动列表
       this.activeList = await salesPromoQueryList({ salesBillSn: this.$route.params.sn }).then(res => res.data || [])
       this.activeList.map(item => {
@@ -253,6 +246,14 @@ export default {
         this.activeDesKey['search-'+item.promoRuleSn] = false
       })
     },
+    // 获取是否有新活动
+    async getNewActive(){
+      const hasNewActive = await salesQueryUnPartPromo({ salesBillSn: this.$route.params.sn }).then(res => res.data)
+      if(hasNewActive.length){
+        this.newActiveList = hasNewActive
+        this.showNewActiveModal=true
+      }
+    },
     showNewActiveOk(){
       this.showNewActiveModal = false
       this.pageInit()
@@ -486,6 +487,7 @@ export default {
       this.salesBillSn = this.$route.params.sn
       this.warehouseSn = this.$route.params.sn ? this.$route.params.wSn : ''
       this.getOrderDetail(true)
+      this.getNewActive()
     }
   },
   mounted () {