diff --git a/h5/pages/main/combo/combo.vue b/h5/pages/main/combo/combo.vue index 6d96fe6..12ba2c0 100644 --- a/h5/pages/main/combo/combo.vue +++ b/h5/pages/main/combo/combo.vue @@ -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 = () => { + + + + 请选择 + + + + + {{ item.item_name }} + + ¥ + {{ item.price }} + + + + + 当前套餐包含一个可自由{{ + multipleList[multipleIndex].length + }}选1的体检项目,请
根据您的实际情况自行选择。
+ {{ + multipleIndex == multipleList.length - 1 ? "确定" : "下一项" + }} +
+
diff --git a/h5/pages/main/tj/choose.vue b/h5/pages/main/tj/choose.vue index 52d2b06..803ebea 100644 --- a/h5/pages/main/tj/choose.vue +++ b/h5/pages/main/tj/choose.vue @@ -15,9 +15,9 @@ const person_list = ref([]); let popup = ref(null); let unitList = ref([]); // 单位列表 const getPersonList = async () => { - uni.showLoading() + uni.showLoading(); const response = await $api("GetPersonList"); - uni.hideLoading() + uni.hideLoading(); $response(response, () => { person_list.value = response.data.list; }); @@ -50,13 +50,13 @@ const choosePersonClick = async (info) => { }; const getGroupCombo = async (info) => { - uni.showLoading() + uni.showLoading(); // 获取团检套餐 const response = await $api("GetGroupCombo", { hospital_id: $store.save.hospital, group_id: info.group_id, }); - uni.hideLoading() + uni.hideLoading(); $response(response, () => { console.log(response); if (response.data.unit.length) { @@ -64,19 +64,17 @@ const getGroupCombo = async (info) => { data.sex = info.sex; data.phone = info.phone; data.phone = info.married; - $store.setGroupInfo(data); + $store.setGroupInfo(data); popup.value.close(); if (!data.items.length && data.tongshou_xiane > 0) { - // 跳转到选择类似上 + // 跳转到选择类似上 uni.navigateTo({ - url: "/pages/main/tj/selectType" + url: "/pages/main/tj/selectType", }); } else { // 跳转到团检自选 uni.navigateTo({ - url: - "/pages/main/tj/tjxq?groupId=" + - info.group_id + url: "/pages/main/tj/tjxq?groupId=" + info.group_id, }); } } diff --git a/h5/pages/main/yytjsj/yytjsj.vue b/h5/pages/main/yytjsj/yytjsj.vue index 6e46998..1e0f8b3 100755 --- a/h5/pages/main/yytjsj/yytjsj.vue +++ b/h5/pages/main/yytjsj/yytjsj.vue @@ -295,7 +295,10 @@ const getCurrentTime = (item, index) => { status.value = 0; $store.setYytjInfo(yytjInfo.value); }; -const xmmcClick = (val, index) => { +const xmmcClick = (val, index, status) => { + if (nmrIndex.value == index && status) { + return; + } // 选择项目 if ( yytjInfo.value.nmr_list.length > 1 && @@ -312,7 +315,8 @@ const xmmcClick = (val, index) => { currentDate.value = val.time.split(" ")[0]; } else { if ( - ((yytjInfo.value.nmr_list.length > 1 && index == 1) || + ((yytjInfo.value.nmr_list.length > 1 && + index == yytjInfo.value.nmr_list.length - 1) || (yytjInfo.value.nmr_list.length == 1 && index == 0)) && yytjInfo.value.doctor_date ) { @@ -624,7 +628,7 @@ onShow(() => {