Przeglądaj źródła

Merge branch 'develop_yh31' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh31

lilei 1 rok temu
rodzic
commit
2543be3a0c

+ 6 - 2
src/views/promotionRulesManagement/dealerPromotions/addModal.vue

@@ -126,7 +126,7 @@
       </a-form-model>
       <div class="btn-cont">
         <a-button id="promotionList-basicInfo-modal-back" @click="isShow = false">取消</a-button>
-        <a-button style="margin-left: 15px;" type="primary" id="promotionList-modal-save" @click="handleSave">确定</a-button>
+        <a-button style="margin-left: 15px;" type="primary" id="promotionList-modal-save" :loading="loadingSave" @click="handleSave">确定</a-button>
       </div>
     </a-spin>
     <!-- 选择参与客户 -->
@@ -208,7 +208,8 @@ export default {
         content: [{ required: true, message: '请输入促销描述', trigger: 'blur' }]
       },
       attachAction: process.env.VUE_APP_API_BASE_URL + '/uploadGetFileInfo',
-      openGuideModal: false
+      openGuideModal: false,
+      loadingSave: false
     }
   },
   methods: {
@@ -298,6 +299,7 @@ export default {
           form.attachmentList = _this.attachList
           delete form.activeDate
           _this.spinning = true
+          _this.loadingSave = true
           const ajaxName = _this.itemSn ? dealerPromotionEdit : dealerPromotionSave
           ajaxName(form).then(res => {
             if (res.status == 200) {
@@ -306,9 +308,11 @@ export default {
                 _this.isShow = false
                 _this.$emit('ok', res.data)
                 _this.spinning = false
+                _this.loadingSave = false
               }, 1000)
             } else {
               _this.spinning = false
+              _this.loadingSave = false
             }
           })
         } else {

+ 13 - 13
src/views/promotionRulesManagement/dealerPromotions/detailModal.vue

@@ -87,7 +87,7 @@
             促销产品
           </a-radio-button>
           <a-radio-button :value="'c'+i" v-for="(item,i) in form.giveRuleList" :key="i" v-show="(form.regularPromotionSameFlag==='0'||form.scopeFlag==='0')&&form.promotionRuleType=='BUY_PROD_GIVE_PROD'&&form.giveRuleList">
-            {{ '促销产品'+'(阶梯'+(i*1+1) +')' }}
+            {{ form.giveRuleList.length>1? '促销产品'+'(阶梯'+(i*1+1) +')' :'促销产品' }}
           </a-radio-button>
           <a-radio-button value="d" v-show="form.promotionRuleType=='PROMO_PROD'">
             特价产品
@@ -301,9 +301,9 @@ export default {
       }
       return arr
     },
-    specialColumns(){
-       const _this = this
-       let arr =  [
+    specialColumns () {
+      const _this = this
+      const arr = [
         { title: '产品分类', width: '11%', scopedSlots: { customRender: 'productType' }, align: 'center' },
         { title: '品牌', width: '11%', scopedSlots: { customRender: 'productBrand' }, align: 'center' },
         { title: '产品', scopedSlots: { customRender: 'product' }, width: '11%', align: 'center' },
@@ -318,16 +318,16 @@ export default {
         // { title: '特约折扣', dataIndex: 'specialDiscountRate', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? (text + '%') : '--') } },
         { title: '设置起订量', width: '7%', scopedSlots: { customRender: 'setNum' }, align: 'center' }
       ]
-      if(_this.form.discountType =='0' || _this.form.discountType =='1'){
-        arr.splice(5, 0,{ title: '省级折扣', dataIndex: 'provinceDiscountRate', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? (text + '%') : '--') } })
-        arr.splice(8, 0,{ title: '市级折扣', dataIndex: 'cityDiscountRate', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? (text + '%') : '--') } })
-        arr.splice(11, 0,{ title: '特约折扣', dataIndex: 'specialDiscountRate', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? (text + '%') : '--') } })
-      }else{
-        arr.splice(5, 0,{ title: '省价直降金额', dataIndex: 'provinceSubtract', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? ('-'+text ) : '--') } })
-        arr.splice(8, 0,{ title: '市价直降金额', dataIndex: 'citySubtract', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? ('-'+text) : '--') } })
-        arr.splice(11, 0,{ title: '特约直降金额', dataIndex: 'specialSubtract', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? ('-'+text) : '--') } })
+      if (_this.form.discountType == '0' || _this.form.discountType == '1') {
+        arr.splice(5, 0, { title: '省级折扣', dataIndex: 'provinceDiscountRate', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? (text + '%') : '--') } })
+        arr.splice(8, 0, { title: '市级折扣', dataIndex: 'cityDiscountRate', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? (text + '%') : '--') } })
+        arr.splice(11, 0, { title: '特约折扣', dataIndex: 'specialDiscountRate', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? (text + '%') : '--') } })
+      } else {
+        arr.splice(5, 0, { title: '省价直降金额', dataIndex: 'provinceSubtract', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? ('-' + text) : '--') } })
+        arr.splice(8, 0, { title: '市价直降金额', dataIndex: 'citySubtract', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? ('-' + text) : '--') } })
+        arr.splice(11, 0, { title: '特约直降金额', dataIndex: 'specialSubtract', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? ('-' + text) : '--') } })
       }
-       return arr
+      return arr
     }
   },
   methods: {

+ 7 - 2
src/views/promotionRulesManagement/dealerPromotions/sendProductsModal.vue

@@ -186,7 +186,7 @@
       </a-card>
       <div class="btn-cont">
         <a-button id="promotionList-basicInfo-modal-back" @click="isShow = false">取消</a-button>
-        <a-button style="margin-left: 15px;" type="primary" id="promotionList-modal-save" @click="handleSave">确定</a-button>
+        <a-button style="margin-left: 15px;" type="primary" id="promotionList-modal-save" :loading="loadingSave" @click="handleSave">确定</a-button>
       </div>
     </a-spin>
     <!-- 导入产品 -->
@@ -265,7 +265,8 @@ export default {
       openGuideModal: false, // 导入弹窗
       id: null,
       code: 'SCOPE_UNIT_TYPE', // 起订类型数据字典
-      unitTypeDataList: []
+      unitTypeDataList: [],
+      loadingSave:false
     }
   },
   methods: {
@@ -494,6 +495,7 @@ export default {
           newInfo += form.restrictFlag == '1' ? `<div>限制正价产品${form.restrictCategory}款</div>` : ''
           form.ruleInfo = newInfo
           _this.spinning = true
+          _this.loadingSave = true
           promotionSave(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
@@ -501,10 +503,13 @@ export default {
                 _this.isShow = false
                 _this.$emit('ok')
                 _this.spinning = false
+                _this.loadingSave = false
               }, 1000)
             } else {
               _this.spinning = false
+              _this.loadingSave = false
             }
+            
           })
         } else {
           return false