Pārlūkot izejas kodu

Merge branch 'develop_yh41' of jianguan-web/jg-ocs-html into develop_yh42

李磊 1 gadu atpakaļ
vecāks
revīzija
beb98de7eb

+ 12 - 8
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 }
@@ -447,15 +451,15 @@ export default {
       this.previewList = []
       this.openProductModal = false
     },
-    onChange (e) {
+    onChange () {
       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]
+        const pos = this.chooseVal.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)])
         }
       }
     }

+ 1 - 1
src/views/promotionRulesManagement/dealerPromotions/productPreviewModal.vue

@@ -76,7 +76,7 @@ export default {
       const ajaxData = {
         promotionRuleSn: _this.resObj.promotionRuleSn,
         promotionProductType: _this.resObj.promotionProductType,
-        scopeLevel: _this.resObj.scopeLevel || undefined
+        scopeLevel: _this.resObj.scopeLevel || 1
       }
       hdExportExcel(excelProductExcel, ajaxData, '促销活动' + this.resObj.tit, function () {
         _this.exportLoading = false

+ 5 - 3
src/views/promotionRulesManagement/dealerPromotions/sendAmountModal.vue

@@ -554,6 +554,7 @@ export default {
     // 获取编辑详情
     getDetail () {
       const _this = this
+      _this.spinning = true
       getRuleDetail({ sn: this.itemSn }).then(res => {
         if (res.status == 200) {
           const resultObj = res.data
@@ -581,6 +582,7 @@ export default {
           _this.form = { ..._this.form, ...resultObj }
           _this.calculatePrice()
         }
+        _this.spinning = false
       })
     },
     newData (list) {
@@ -680,11 +682,11 @@ export default {
           this.form.gateProductList = this.$refs.cillProduct.getResultVal()
         } else if (this.chooseVal === 'b') {
           this.form.regularProductList = this.$refs.normalPriceProduct.getResultVal()
-        }else{
+        } else {
           this.form.giftProductList = this.$refs.offerProduct.getResultVal()
         }
       }
-      this.$nextTick(()=>{
+      this.$nextTick(() => {
         const newPreviewList = this.getPreviewList(this.form[dataName + 'ProductList'])
         if (newPreviewList && newPreviewList.length === 0) {
           this.$message.warning('暂时没有可预览的产品')
@@ -696,7 +698,7 @@ export default {
         }
         this.$refs.previewModal.pageInit(resuleObj)
         this.openProductModal = true
-      }) 
+      })
     },
     closeProductModal () {
       this.previewList = []

+ 31 - 38
src/views/promotionRulesManagement/dealerPromotions/sendProductsModal.vue

@@ -233,12 +233,7 @@ export default {
         labelCol: { span: 4 },
         wrapperCol: { span: 17 }
       },
-      fullGiftRuleList: [{
-        id: undefined,
-        scopeLevel: undefined,
-        regularValue: undefined,
-        promotionValue: undefined
-      }],
+      fullGiftRuleList: [],
       form: {
         giveRuleType: 'RATIO', // 满赠规则类型: SUM_MONEY[金额叠加] / RATIO[按比例]   满产品送产品写死为: 按比例
         promotionRuleType: 'BUY_PROD_GIVE_PROD', // 买产品送产品
@@ -546,7 +541,7 @@ export default {
       return flag
     },
     // 重置表格
-    async resetSearchForm () {
+    resetSearchForm () {
       this.form = {
         giveRuleType: 'RATIO', // 满赠规则类型: SUM_MONEY[金额叠加] / RATIO[按比例]   满产品送产品写死为: 按比例
         promotionRuleType: 'BUY_PROD_GIVE_PROD', // 买产品送产品
@@ -578,17 +573,13 @@ export default {
       this.fullGiftRuleList.forEach((val, i) => {
         this.$refs['offerProduct' + i][0].reSetTableData()
       })
-      const result = await getNewScopeSn({})
-      this.fullGiftRuleList = [{
-        id: result.data,
-        regularValue: undefined,
-        promotionValue: undefined
-      }]
+      this.fullGiftRuleList = []
       this.id = null
     },
     // 获取编辑详情
     getDetail () {
       const _this = this
+      _this.spinning = true
       getRuleDetail({ sn: _this.itemSn }).then(res => {
         if (res.status == 200) {
           const resultObj = res.data
@@ -619,6 +610,7 @@ export default {
           delete newDataObj.giftProductList
           _this.form = newDataObj
         }
+        _this.spinning = false
       })
     },
     newData (list) {
@@ -718,19 +710,19 @@ export default {
             this.form.regularProductList = this.$refs.normalPriceProduct.getResultVal()
           }
         }
-        this.$nextTick(() => {
-          const newPreviewList = this.getPreviewList(this.form[dataName + 'ProductList'])
-          if (newPreviewList && newPreviewList.length > 0) {
-            this.previewList = newPreviewList
-            const resuleObj = {
-              tit: titName
-            }
-            this.$refs.previewModal.pageInit(resuleObj)
-            this.openProductModal = true
-          } else {
-            this.$message.warning('暂时没有可预览的产品')
+        const newPreviewList = this.getPreviewList(this.form[dataName + 'ProductList'])
+        if (newPreviewList && newPreviewList.length > 0) {
+          this.previewList = newPreviewList
+          const resuleObj = {
+            tit: titName
           }
-        })
+          this.$nextTick(() => {
+            this.$refs.previewModal.pageInit(resuleObj)
+          })
+          this.openProductModal = true
+        } else {
+          this.$message.warning('暂时没有可预览的产品')
+        }
       } else {
         // 阶梯数据处理
         const idInfo = this.chooseVal.split('c')[1]
@@ -738,21 +730,21 @@ export default {
         if (stepIndex > -1 && !this.itemSn) {
           this.form.giftProductMap['GIFT' + (stepIndex * 1 + 1)] = this.$refs['offerProduct' + stepIndex][0].getResultVal()
         }
-        this.$nextTick(() => {
-          if (this.form.giftProductMap && Object.keys(this.form.giftProductMap).length > 0) {
-            const stepPreviewList = this.getPreviewList(this.form.giftProductMap['GIFT' + (stepIndex * 1 + 1)])
-            if (stepPreviewList && stepPreviewList.length > 0) {
-              this.previewList = stepPreviewList
-              const resuleObj = {
-                tit: '促销产品(阶梯' + (stepIndex * 1 + 1) + ')'
-              }
-              this.$refs.previewModal.pageInit(resuleObj)
-              this.openProductModal = true
-            } else {
-              this.$message.warning('暂时没有可预览的产品')
+        if (this.form.giftProductMap && Object.keys(this.form.giftProductMap).length > 0) {
+          const stepPreviewList = this.getPreviewList(this.form.giftProductMap['GIFT' + (stepIndex * 1 + 1)])
+          if (stepPreviewList && stepPreviewList.length > 0) {
+            this.previewList = stepPreviewList
+            const resuleObj = {
+              tit: '促销产品(阶梯' + (stepIndex * 1 + 1) + ')'
             }
+            this.$nextTick(() => {
+              this.$refs.previewModal.pageInit(resuleObj)
+            })
+            this.openProductModal = true
+          } else {
+            this.$message.warning('暂时没有可预览的产品')
           }
-        })
+        }
       }
     },
     closeProductModal () {
@@ -776,6 +768,7 @@ export default {
       } else {
         // 获取起订类型数据字典
         this.getUnitTypeList()
+        this.addFullGiftRule()
         if (this.itemSn) {
           this.getDetail()
         } else {

+ 2 - 0
src/views/promotionRulesManagement/dealerPromotions/specialOfferModal.vue

@@ -547,6 +547,7 @@ export default {
     // 获取编辑详情
     getDetail () {
       const _this = this
+      _this.spinning = true
       getRuleDetail({ sn: this.itemSn }).then(res => {
         if (res.status == 200) {
           this.chooseVal = res.data.gateFlag == '0' ? 'd' : 'a'
@@ -572,6 +573,7 @@ export default {
           }
           this.form = { ...this.form, ...resultObj }
         }
+        _this.spinning = false
       })
     },
     newData (list) {

+ 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>
   

+ 1 - 1
src/views/salesReturnManagement/billOfLading/detail.vue

@@ -121,7 +121,7 @@
               <a-form-model-item style="margin-bottom:10px" label="附件" :label-col="{span:2}" :wrapper-col="{span:22}">
                 <div style="line-height:26px;">
                   <div v-for="item in form.attachmentList" :key="item.id">
-                    <a :href="item.filePath" download="true">{{ item.fileName }}</a>
+                    <a :href="item.filePath.replace('http:','https:')" download="true">{{ item.fileName }}</a>
                   </div>
                 </div>
               </a-form-model-item>