chenrui 1 سال پیش
والد
کامیت
af8194f5ed

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

+ 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