Parcourir la source

与预约时间有冲突

gqx il y a 2 ans
Parent
commit
94cb5665b8
1 fichiers modifiés avec 26 ajouts et 1 suppressions
  1. 26 1
      src/views/room/modules/checkIn/BillRoomForm.vue

+ 26 - 1
src/views/room/modules/checkIn/BillRoomForm.vue

@@ -1506,7 +1506,32 @@ export default {
                 that.$message.success(res.message);
                 that.$emit("ok", res.result);
               } else {
-                that.$message.warning(res.message);
+                if (res.message.indexOf("与预约时间有冲突") >= 0) {
+                  that.$confirm({
+                    title: "提示",
+                    content: res.message + "是否确定入住?",
+                    onOk: function () {
+                      that.model.confirm = true;
+                      httpAction(httpurl, that.model, method)
+                        .then((res) => {
+                          if (res.success) {
+                            that.$message.success(res.message);
+                            that.$emit("ok", res.result);
+                          } else {
+                            if (res.message.indexOf("与预约时间有冲突") >= 0) {
+                            } else {
+                              that.$message.warning(res.message);
+                            }
+                          }
+                        })
+                        .finally(() => {
+                          that.confirmLoading = false;
+                        });
+                    },
+                  });
+                } else {
+                  that.$message.warning(res.message);
+                }
               }
             })
             .finally(() => {