处理弹窗展示备注
This commit is contained in:
@@ -48,10 +48,21 @@ const _sfc_main = {
|
||||
"background-color": backgroundColor
|
||||
};
|
||||
};
|
||||
const visibleInfoPopup = common_vendor.ref(false);
|
||||
const onShowInfoPopup = (room) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:138", "----", room);
|
||||
Object.assign(tempRoom, room);
|
||||
visibleInfoPopup.value = true;
|
||||
};
|
||||
const onCloseInfoPopup = () => {
|
||||
Object.assign(tempRoom, {});
|
||||
visibleInfoPopup.value = false;
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:145", "关闭");
|
||||
};
|
||||
const visiblePopup = common_vendor.ref(false);
|
||||
const tempRoom = common_vendor.reactive({});
|
||||
const onBooking = (room) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:123", "----", room);
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:152", "----", room);
|
||||
Object.assign(tempRoom, room);
|
||||
form.room_id = room.id;
|
||||
visiblePopup.value = true;
|
||||
@@ -64,18 +75,18 @@ const _sfc_main = {
|
||||
remarks: ""
|
||||
});
|
||||
visiblePopup.value = false;
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:136", "关闭");
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:165", "关闭");
|
||||
};
|
||||
const getRooms = () => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:140", "房间");
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:171", "房间");
|
||||
api_index.fetchRooms().then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:142", res);
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:173", res);
|
||||
rooms.value = res;
|
||||
});
|
||||
};
|
||||
const onSubmit = () => {
|
||||
api_index.fetchBooking(form).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:150", res);
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:181", res);
|
||||
common_vendor.index.showToast({
|
||||
icon: "none",
|
||||
title: "预约成功"
|
||||
@@ -88,7 +99,7 @@ const _sfc_main = {
|
||||
api_index.fetchUnBooking({
|
||||
id: room.id
|
||||
}).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:164", res);
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:195", res);
|
||||
common_vendor.index.showToast({
|
||||
icon: "none",
|
||||
title: "取消预约成功"
|
||||
@@ -97,18 +108,18 @@ const _sfc_main = {
|
||||
});
|
||||
};
|
||||
const init = () => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:174", "init");
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:205", "init");
|
||||
getRooms();
|
||||
};
|
||||
common_vendor.onShow(() => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:179", "onshow---");
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:210", "onshow---");
|
||||
getRooms();
|
||||
});
|
||||
common_vendor.onMounted(() => {
|
||||
init();
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/index/goodsOrderAdd")),
|
||||
b: common_vendor.p({
|
||||
type: "primary",
|
||||
@@ -126,48 +137,49 @@ const _sfc_main = {
|
||||
}, room.remarks ? {
|
||||
e: common_vendor.t(room.remarks)
|
||||
} : {}, {
|
||||
f: room.status === 1
|
||||
f: common_vendor.o(($event) => onShowInfoPopup(room), index),
|
||||
g: room.status === 1
|
||||
}, room.status === 1 ? {
|
||||
g: common_vendor.o(($event) => onBooking(room), index),
|
||||
h: "1cf27b2a-1-" + i0,
|
||||
i: common_vendor.p({
|
||||
h: common_vendor.o(($event) => onBooking(room), index),
|
||||
i: "1cf27b2a-1-" + i0,
|
||||
j: common_vendor.p({
|
||||
size: "small",
|
||||
type: "primary",
|
||||
shape: "square"
|
||||
})
|
||||
} : room.status === 2 ? {
|
||||
k: common_vendor.o(($event) => onUnBooking(room), index),
|
||||
l: "1cf27b2a-2-" + i0,
|
||||
m: common_vendor.p({
|
||||
l: common_vendor.o(($event) => onUnBooking(room), index),
|
||||
m: "1cf27b2a-2-" + i0,
|
||||
n: common_vendor.p({
|
||||
size: "small",
|
||||
type: "warning",
|
||||
plain: true,
|
||||
shape: "square"
|
||||
})
|
||||
} : {}, {
|
||||
j: room.status === 2,
|
||||
n: room.status === 3
|
||||
k: room.status === 2,
|
||||
o: room.status === 3
|
||||
}, room.status === 3 ? {
|
||||
o: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)(`/pages/index/orderEdit?roomId=${room.id}`), index),
|
||||
p: "1cf27b2a-3-" + i0,
|
||||
q: common_vendor.p({
|
||||
p: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)(`/pages/index/orderEdit?roomId=${room.id}`), index),
|
||||
q: "1cf27b2a-3-" + i0,
|
||||
r: common_vendor.p({
|
||||
size: "small",
|
||||
type: "info",
|
||||
plain: true,
|
||||
shape: "square"
|
||||
})
|
||||
} : {
|
||||
r: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)(`/pages/index/orderAdd?roomId=${room.id}`), index),
|
||||
s: "1cf27b2a-4-" + i0,
|
||||
t: common_vendor.p({
|
||||
s: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)(`/pages/index/orderAdd?roomId=${room.id}`), index),
|
||||
t: "1cf27b2a-4-" + i0,
|
||||
v: common_vendor.p({
|
||||
size: "small",
|
||||
type: "success",
|
||||
plain: true,
|
||||
shape: "square"
|
||||
})
|
||||
}, {
|
||||
v: index,
|
||||
w: common_vendor.s(getRoomStyle(room.status))
|
||||
w: index,
|
||||
x: common_vendor.s(getRoomStyle(room.status))
|
||||
});
|
||||
}),
|
||||
e: common_vendor.t(tempRoom == null ? void 0 : tempRoom.room_name),
|
||||
@@ -203,8 +215,28 @@ const _sfc_main = {
|
||||
["safe-area-inset-bottom"]: true,
|
||||
["close-on-click-overlay"]: true,
|
||||
visible: visiblePopup.value
|
||||
}),
|
||||
q: common_vendor.t(tempRoom == null ? void 0 : tempRoom.room_name),
|
||||
r: tempRoom == null ? void 0 : tempRoom.tel
|
||||
}, (tempRoom == null ? void 0 : tempRoom.tel) ? {
|
||||
s: common_vendor.t(tempRoom.tel)
|
||||
} : {}, {
|
||||
t: tempRoom == null ? void 0 : tempRoom.remarks
|
||||
}, (tempRoom == null ? void 0 : tempRoom.remarks) ? {
|
||||
v: common_vendor.t(tempRoom.remarks)
|
||||
} : {}, {
|
||||
w: common_vendor.o(onCloseInfoPopup),
|
||||
x: common_vendor.o(($event) => visibleInfoPopup.value = $event),
|
||||
y: common_vendor.p({
|
||||
["custom-style"]: {
|
||||
height: "50%"
|
||||
},
|
||||
position: "bottom",
|
||||
["safe-area-inset-bottom"]: true,
|
||||
["close-on-click-overlay"]: true,
|
||||
visible: visibleInfoPopup.value
|
||||
})
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user