chenrui hai 1 ano
pai
achega
cad9736887

+ 10 - 6
src/views/promotionRulesManagement/dealerPromotions/detailModal.vue

@@ -242,6 +242,10 @@ export default {
     itemSn: {
       type: String,
       default: ''
+    },
+    pageType:{
+      type: String,
+      default: 'promotionsPage'
     }
   },
   data () {
@@ -371,17 +375,17 @@ export default {
           const resultObj = res.data
           if (resultObj.gateFlag == '1') {
             this.chooseVal = 'a'
-            this.isShowPreview = this.judgeBtnShow(res.data.gateProductList)
+            this.isShowPreview =this.pageType==='salesPage'? false:this.judgeBtnShow(res.data.gateProductList)
           } else {
             if (resultObj.promotionRuleType == 'BUY_PROD_GIVE_PROD') {
               this.chooseVal = 'b'
-              this.isShowPreview = this.judgeBtnShow(res.data.regularProductList)
+              this.isShowPreview = this.pageType==='salesPage'? false:this.judgeBtnShow(res.data.regularProductList)
             } else if (resultObj.promotionRuleType == 'BUY_PROD_GIVE_MONEY') {
               this.chooseVal = 'b'
-              this.isShowPreview = this.judgeBtnShow(res.data.regularProductList)
+              this.isShowPreview = this.pageType==='salesPage'? false:this.judgeBtnShow(res.data.regularProductList)
             } else {
               this.chooseVal = 'd'
-              this.isShowPreview = this.judgeBtnShow(res.data.specialProductList)
+              this.isShowPreview = this.pageType==='salesPage'? false:this.judgeBtnShow(res.data.specialProductList)
             }
           }
           this.form = { ...this.form, ...resultObj }
@@ -450,12 +454,12 @@ export default {
     onChange (e) {
       const dataName = this.chooseVal === 'a' ? 'gate' : this.chooseVal === 'b' ? 'regular' : this.chooseVal === 'c' ? 'gift' : this.chooseVal === 'd' ? 'special' : 'giftGroup'
       if (dataName != 'giftGroup') {
-        this.isShowPreview = this.judgeBtnShow(this.form[dataName + 'ProductList'])
+        this.isShowPreview = this.pageType==='salesPage'? false:this.judgeBtnShow(this.form[dataName + 'ProductList'])
       } else {
         // 阶梯数据处理
         const pos = e.split('')[1]
         if (this.form.giftProductMap && Object.keys(this.form.giftProductMap).length > 0) {
-          this.isShowPreview = this.judgeBtnShow(this.form.giftProductMap['GIFT' + (pos * 1 + 1)])
+          this.isShowPreview = this.pageType==='salesPage'? false:this.judgeBtnShow(this.form.giftProductMap['GIFT' + (pos * 1 + 1)])
         }
       }
     }

+ 3 - 0
src/views/promotionRulesManagement/dealerPromotions/sendProductsModal.vue

@@ -710,6 +710,7 @@ export default {
     handlePreview () {
       const dataName = this.chooseVal === 'a' ? 'gate' : this.chooseVal === 'b' ? 'regular' : 'giftGroup'
       const titName = this.chooseVal === 'a' ? '门槛产品' : this.chooseVal === 'b' ? '正价产品' : '促销产品'
+      console.log('1111111111111111:', dataName)
       if (dataName != 'giftGroup') {
         if (!this.itemSn) {
           if (this.chooseVal === 'a') {
@@ -718,6 +719,7 @@ export default {
             this.form.regularProductList = this.$refs.normalPriceProduct.getResultVal()
           }
         }
+        console.log('33333333:', this.form)
         this.$nextTick(() => {
           const newPreviewList = this.getPreviewList(this.form[dataName + 'ProductList'])
           if (newPreviewList && newPreviewList.length > 0) {
@@ -738,6 +740,7 @@ export default {
         if (stepIndex > -1 && !this.itemSn) {
           this.form.giftProductMap['GIFT' + (stepIndex * 1 + 1)] = this.$refs['offerProduct' + stepIndex][0].getResultVal()
         }
+        console.log('222222:', this.form)
         this.$nextTick(() => {
           if (this.form.giftProductMap && Object.keys(this.form.giftProductMap).length > 0) {
             const stepPreviewList = this.getPreviewList(this.form.giftProductMap['GIFT' + (stepIndex * 1 + 1)])

+ 1 - 1
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -19,7 +19,7 @@
           />
         <div v-show="showEmpty" class="empty-data"><a-empty description="暂无产品" :image="simpleImage"/></div>
         <!-- 活动规则详情 -->
-        <detailModal :openModal="openDetailModal" :itemSn="detailSn" @close="closeDetailModal"></detailModal>
+        <detailModal :openModal="openDetailModal" pageType="salesPage" :itemSn="detailSn" @close="closeDetailModal"></detailModal>
     </a-spin>
   </template>