1.套餐中项目多选

2.优化体检时间选择
main
刘佳宇 1 year ago
parent b6212774ef
commit e7f19230ca

@ -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%">

@ -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,
});
}
}

@ -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(() => {
<view
v-for="(item, index) in yytjInfo.nmr_list"
:key="index"
@click="xmmcClick(item, index)"
@click="xmmcClick(item, index, 1)"
:class="nmrIndex == index ? 'acitvetc' : ''"
class="flex flex-justify-around p-20rpx pl-10rpx pr-10rpx rounded-15rpx"
>

Loading…
Cancel
Save