|
|
|
|
@ -30,7 +30,12 @@ let projectIds = ref([]); // 项目id集合
|
|
|
|
|
let screenObj = ref({}); // 筛选条件
|
|
|
|
|
let combo_select = ref({}); // 套餐筛选条件
|
|
|
|
|
let comboIds = ref([]); // 套餐对比列表
|
|
|
|
|
let status = ref(false); // 筛选弹窗控制
|
|
|
|
|
let popupMultiple = ref(false); // 多选弹窗
|
|
|
|
|
let multipleList = ref([]); // 多选列表
|
|
|
|
|
let multipleIndex = ref(0); // 多选索引
|
|
|
|
|
let itemIds = ref([]); // 项目id集合
|
|
|
|
|
let itemId = ref(""); // 项目id
|
|
|
|
|
let comboId = ref(""); // 套餐id
|
|
|
|
|
|
|
|
|
|
const selectItemClick = async (index, key) => {
|
|
|
|
|
// 选择套餐条件
|
|
|
|
|
@ -266,13 +271,45 @@ onShow(() => {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const buyClick = async (item) => {
|
|
|
|
|
let query = "?comboId=" + item.combo_id;
|
|
|
|
|
comboId.value = item.combo_id;
|
|
|
|
|
if (item.duo_xuan_yi.length > 0) {
|
|
|
|
|
popupMultiple.value.open("center");
|
|
|
|
|
multipleIndex.value = 0;
|
|
|
|
|
itemIds.value = [];
|
|
|
|
|
itemId.value = "";
|
|
|
|
|
multipleList.value = item.duo_xuan_yi;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
toDetail();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const nextItemClick = () => {
|
|
|
|
|
if (!itemId.value) {
|
|
|
|
|
uni.$lu.toast("请选择项目");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
itemIds.value.push(itemId.value);
|
|
|
|
|
if (multipleIndex.value == multipleList.value.length - 1) {
|
|
|
|
|
toDetail();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
itemId.value = "";
|
|
|
|
|
multipleIndex.value = multipleIndex.value + 1;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const toDetail = () => {
|
|
|
|
|
// 跳转到套餐详情
|
|
|
|
|
let query = "?comboId=" + comboId.value;
|
|
|
|
|
if ($props.groupId) {
|
|
|
|
|
// 团检把团检ID加上
|
|
|
|
|
query += "&groupId=" + $props.groupId;
|
|
|
|
|
}
|
|
|
|
|
if (itemIds.value.length) {
|
|
|
|
|
query += "&itemIds=" + itemIds.value.join(",");
|
|
|
|
|
}
|
|
|
|
|
// 个检只要套餐ID
|
|
|
|
|
// 预约 跳转到个检/团检套餐详情
|
|
|
|
|
popupMultiple.value.close();
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: "/pages/main/tj/tjxq" + query,
|
|
|
|
|
});
|
|
|
|
|
@ -440,6 +477,54 @@ const toRouter = () => {
|
|
|
|
|
<view class="combo_line_wrapper"></view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<uni-popup ref="popupMultiple" class="w-full">
|
|
|
|
|
<view class="rounded-10rpx px-20rpx pb-55rpx box-border bg-#fff w-95vw">
|
|
|
|
|
<view
|
|
|
|
|
class="center relative pt-40rpx pb-30rpx text-36rpx rounded-t-15rpx box-border"
|
|
|
|
|
>
|
|
|
|
|
<text class="line-height-[1] text-32rpx">请选择</text>
|
|
|
|
|
<uni-icons
|
|
|
|
|
@click="popupMultiple.close()"
|
|
|
|
|
type="closeempty"
|
|
|
|
|
color="#A6A6A6"
|
|
|
|
|
size="26"
|
|
|
|
|
class="absolute right-40rpx"
|
|
|
|
|
></uni-icons>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="bg-#F8F8F8 px-20rpx box-border rounded-10rpx">
|
|
|
|
|
<view
|
|
|
|
|
v-for="(item, index) in multipleList[multipleIndex]"
|
|
|
|
|
:key="index"
|
|
|
|
|
class="px-20rpx box-border b-b-1 b-#EAEAEA b-solid bs between h-100rpx"
|
|
|
|
|
>
|
|
|
|
|
<text class="text-#000000 text-30rpx">{{ item.item_name }}</text>
|
|
|
|
|
<view class="center">
|
|
|
|
|
<text class="text-#EC3D15 text-20rpx">¥</text>
|
|
|
|
|
<text class="text-#EC3D15 text-32rpx mb-0">{{ item.price }}</text>
|
|
|
|
|
<uni-icons
|
|
|
|
|
@click="itemId = item.item_id"
|
|
|
|
|
class="ml-28rpx"
|
|
|
|
|
color="#239EA3"
|
|
|
|
|
:type="itemId == item.item_id ? 'checkbox-filled' : 'circle'"
|
|
|
|
|
size="30"
|
|
|
|
|
></uni-icons>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="text-#239EA3 text-28rpx my-45rpx text-center"
|
|
|
|
|
>当前套餐包含一个可自由{{
|
|
|
|
|
multipleList[multipleIndex].length
|
|
|
|
|
}}选1的体检项目,请<br />根据您的实际情况自行选择。</view
|
|
|
|
|
>
|
|
|
|
|
<view
|
|
|
|
|
class="w-270rpx h-80rpx bg-#239EA3 center text-#F8F8F8 text-30rpx rounded-10rpx mx-auto"
|
|
|
|
|
@click="nextItemClick()"
|
|
|
|
|
>{{
|
|
|
|
|
multipleIndex == multipleList.length - 1 ? "确定" : "下一项"
|
|
|
|
|
}}</view
|
|
|
|
|
>
|
|
|
|
|
</view>
|
|
|
|
|
</uni-popup>
|
|
|
|
|
<uni-popup ref="popup" mask-background-color="transparent">
|
|
|
|
|
<view class="pt-180rpx w-full h-100vh" @click="popup.close()">
|
|
|
|
|
<view class="bg-[rgba(0,0,0,0.3)] h-100%">
|
|
|
|
|
|