Browse Source

修改bug

chenrui 1 year ago
parent
commit
54b886c44c

+ 9 - 0
src/api/promotion.js

@@ -231,3 +231,12 @@ export const allDealerSnList = (params) => {
     method: 'post'
   })
 }
+
+// 获取所选经销商sn
+export const updateDealerSnList = (params) => {
+  return axios({
+    url: '/promotion/dealer/updateDealerSnList',
+    data: params,
+    method: 'post'
+  })
+}

+ 5 - 9
src/views/promotionRulesManagement/dealerPromotions/list.vue

@@ -249,7 +249,7 @@ import creatorList from '@/views/common/creatorList.vue'
 import editActiveEndTime from './editActiveEndTime.vue'
 import supplier from '@/views/common/supplier.js'
 import warehouse from '@/views/common/chooseWarehouse.js'
-import { dealerPromotionList, dealerPromotionDel, modifyEnabledFlag, promotionAudit, promotionIsOver, handleCopyData, midwaySubmit, dealerMidwayAudit, allDealerSnList } from '@/api/promotion'
+import { dealerPromotionList, dealerPromotionDel, modifyEnabledFlag, promotionAudit, promotionIsOver, handleCopyData, midwaySubmit, dealerMidwayAudit, updateDealerSnList } from '@/api/promotion'
 export default {
   name: 'PromotionManagementList',
   mixins: [commonMixin],
@@ -341,16 +341,12 @@ export default {
       } else {
         this.itemStatusType = 'isClose'
       }
-      if (row.dealerScope != 'ALL_DEALER') {
-        this.chooseDealerArr = row.dealerSnList
-      } else {
-        this.getAllDealerSnList()
-      }
-      this.openCustomerModal = true
+      this.getDealerSnList({ promotionSn: row.promotionSn })
     },
-    async getAllDealerSnList () {
-      const dealerSnArr = await allDealerSnList({})
+    async getDealerSnList (ajaxData) {
+      const dealerSnArr = await updateDealerSnList(ajaxData)
       this.chooseDealerArr = dealerSnArr.data
+      this.openCustomerModal = true
     },
     //  基本信息  保存
     handleOk () {