Parcourir la source

新增酒店删除接口

wangh il y a 1 an
Parent
commit
faf752c4a7
1 fichiers modifiés avec 43 ajouts et 1 suppressions
  1. 43 1
      src/components/OP/HotelReservations.vue

+ 43 - 1
src/components/OP/HotelReservations.vue

@@ -1342,7 +1342,49 @@ export default {
             }).catch(function (error) {
                 that.$message.error("网络错误,请稍后重试");
             });
-        }
+        },
+        del(index, row) {
+            this.$confirm('此操作将删除该数据, 是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                var that = this
+                this.$axios({
+                    method: 'post',
+                    url: "/api/Groups/DelHotelPrice",
+                    headers: {
+                        Authorization: 'Bearer ' + this.token
+                    },
+                    data: {
+                        Id: row.id,
+                        DeleteUserId: this.userId
+                    }
+                }).then(function (res) {
+                    console.log(res)
+
+                    if (res.data.code == 200) {
+
+                        that.$message({
+                            message: '删除成功',
+                            type: 'success'
+                        });
+                        that.HotelReservationsByDiId()
+                    } else {
+                        that.$message.error('删除失败!');
+                    }
+                    that.loading = false
+                }).catch(function (error) {
+                    that.loading = false
+                    that.$message.error("网络错误,请稍后重试");
+                });
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '操作已取消!'
+                });
+            });
+        },
     },
 
     mounted() {