Browse Source

OTA管理:价格配置,提价按钮点击控制

shipeng 4 days ago
parent
commit
c16ffcdd5f

+ 6 - 1
src/views/otaMr/ctrip/dialog/dataEdit.vue

@@ -142,7 +142,7 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="openPrice = false">返回</el-button>
-        <el-button @click="submitFormPrice('formPrice','calendarPrice')">提交</el-button>
+        <el-button :loading="isLoading" @click="submitFormPrice('formPrice','calendarPrice')">提交</el-button>
       </span>
     </el-dialog>
   </el-dialog>
@@ -193,6 +193,7 @@ export default {
       },
       seatTypeId: null,
       calendarId: null,
+      isLoading: false,
     };
   },
   methods: {
@@ -573,6 +574,7 @@ export default {
     /**  设置价格  */
     async calendarPrice(type){
       try {
+        this.isLoading = true
         if( this.timeValueObj.prev && this.timeValueObj.next ) {
           let minTime = moment(this.timeValueObj.prev).valueOf()
           let maxTime = moment(this.timeValueObj.next).valueOf()
@@ -629,12 +631,15 @@ export default {
           })
           if(res.code == 200) {
             this.openPrice = false
+            this.isLoading = false
             this.getCalendarPrice()
           }
         }else {
           this.$message.error("请选择时间区间!!!");
+          this.isLoading = false
         }
       } catch (error) {
+        this.isLoading = false
         
       }
       

+ 6 - 1
src/views/otaMr/maoyan/dialog/dataEdit.vue

@@ -171,7 +171,7 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="openPrice = false">返回</el-button>
-        <el-button @click="submitFormPrice('formPrice','calendarPrice')">提交</el-button>
+        <el-button :loading="isLoading" @click="submitFormPrice('formPrice','calendarPrice')">提交</el-button>
       </span>
     </el-dialog>
   </el-dialog>
@@ -228,6 +228,7 @@ export default {
 
       cityList: [],
       isFlag: false,
+      isLoading: false,
     };
   },
   created() {
@@ -606,6 +607,7 @@ export default {
     /**  设置价格  */
     async calendarPrice(type){
       try {
+        this.isLoading = true
         if( this.timeValueObj.prev && this.timeValueObj.next ) {
           let minTime = moment(this.timeValueObj.prev).valueOf()
           let maxTime = moment(this.timeValueObj.next).valueOf()
@@ -662,12 +664,15 @@ export default {
           })
           if(res.code == 200) {
             this.openPrice = false
+            this.isLoading = false
             this.getCalendarPrice()
           }
         }else {
+          this.isLoading = false
           this.$message.error("请选择时间区间!!!");
         }
       } catch (error) {
+        this.isLoading = false
         
       }
       

+ 6 - 1
src/views/otaMr/meituan/dialog/dataEdit.vue

@@ -165,7 +165,7 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="openPrice = false">返回</el-button>
-        <el-button @click="submitFormPrice('formPrice','calendarPrice')">提交</el-button>
+        <el-button :loading="isLoading" @click="submitFormPrice('formPrice','calendarPrice')">提交</el-button>
       </span>
     </el-dialog>
   </el-dialog>
@@ -217,6 +217,7 @@ export default {
       },
       seatTypeId: null,
       calendarId: null,
+      isLoading: false,
     };
   },
   methods: {
@@ -544,6 +545,7 @@ export default {
     /**  设置价格  */
     async calendarPrice(type){
       try {
+        this.isLoading = true
         if( this.timeValueObj.prev && this.timeValueObj.next ) {
           let minTime = moment(this.timeValueObj.prev).valueOf()
           let maxTime = moment(this.timeValueObj.next).valueOf()
@@ -600,12 +602,15 @@ export default {
           })
           if(res.code == 200) {
             this.openPrice = false
+            this.isLoading = false
             this.getCalendarPrice()
           }
         }else {
+          this.isLoading = false
           this.$message.error("请选择时间区间!!!");
         }
       } catch (error) {
+        this.isLoading = false
         
       }