From 2a27e33512d2814703d0289766571927bf7bea8a Mon Sep 17 00:00:00 2001 From: yanzai Date: Mon, 17 Feb 2025 20:30:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- h5/pages/main/yytjsj/yytjsj_new.vue | 262 +++++++++++++++------------- 1 file changed, 136 insertions(+), 126 deletions(-) diff --git a/h5/pages/main/yytjsj/yytjsj_new.vue b/h5/pages/main/yytjsj/yytjsj_new.vue index ce24bb4..adefa8c 100644 --- a/h5/pages/main/yytjsj/yytjsj_new.vue +++ b/h5/pages/main/yytjsj/yytjsj_new.vue @@ -97,8 +97,8 @@ let use_type = ref(0) let checkup_type_id = ref(0) let amount = ref(0) - let person_name=ref('') - let combo_name=ref('') + let person_name = ref('') + let combo_name = ref('') //查询体检号源 const GetDayPlanListFunc = async () => { uni.showLoading(); @@ -106,7 +106,7 @@ hospital: hospital_id.value, person_id: person_id.value, date: selectedDate.value, - use_type:use_type.value, + use_type: use_type.value, checkup_type_id: checkup_type_id.value, amount: amount.value, } @@ -151,21 +151,21 @@ selectedTime.value = orderInfo.value.appointment_time selectedDate.value = orderInfo.value.appointment_date - + tj_date.value = response.data.today tj_time.value = orderInfo.value.appointment_time tj_plan_id.value = orderInfo.value.plan_id - - hospital_id.value=orderInfo.value.hospital_id - person_id.value=orderInfo.value.person_id - use_type.value=orderInfo.value.type - checkup_type_id.value=orderInfo.value.checkup_type_id - amount.value=orderInfo.value.true_price - person_name.value=orderInfo.value.name - combo_name.value=orderInfo.value.title - + + hospital_id.value = orderInfo.value.hospital_id + person_id.value = orderInfo.value.person_id + use_type.value = orderInfo.value.type + checkup_type_id.value = orderInfo.value.checkup_type_id + amount.value = orderInfo.value.true_price + person_name.value = orderInfo.value.name + combo_name.value = orderInfo.value.title + GetDayPlanListFunc() }); } @@ -291,7 +291,7 @@ hospital: hospital_id.value, person_id: person_id.value, month: ym ? ym : tj_date.value.substring(0, 7), - use_type:use_type.value, + use_type: use_type.value, checkup_type_id: checkup_type_id.value, amount: amount.value, } @@ -304,7 +304,9 @@ date: item.date, info: "余号" + item.count, }; - rlArr.push(o); + if( item.count>0){ + rlArr.push(o); + } }); MonthList.value = rlArr; //MonthCalendar.value.open() @@ -334,7 +336,7 @@ }; //打开月历 const openMonthFunc = async () => { - + if (itemSelected.value.type == 'nmr') { await NMRGetMonthPlanListFunc() } @@ -344,11 +346,11 @@ MonthCalendar.value.open() } //点击提交 - const StartYuYue = () => { - if(buyInfo.value.group_id){ + const StartYuYue = () => { + if (buyInfo.value.group_id) { //如果是团检则创建订单 comfrimyy() - }else{ + } else { //先前已经创建订单,单纯进行预约 OnlyYuYue() } @@ -356,63 +358,63 @@ //创建订单 const comfrimyy = async () => { yytjInfo.value = $store.getYytjInfo(); - let plan_id = ""; - let plan_nmr_id = ""; - uni.showLoading(); - console.log(yytjInfo.value?.nmr_list); - // for (let i = 0; i < yytjInfo.value?.nmr_list?.length; i++) { - // if (!yytjInfo.value?.nmr_list[i].id) { - // uni.$lu.toast("请完善预约时间"); - // uni.hideLoading(); - // return; - // } - // } - - - if (yytjInfo.value?.nmr_list?.length > 1) { - plan_nmr_id = yytjInfo.value?.nmr_list[0]?.id; - } - if (yytjInfo.value?.nmr_list?.length > 0) { - plan_id = yytjInfo.value?.nmr_list[yytjInfo.value?.nmr_list.length - 1]?.id; - } - - - - let obj = { - person_id: buyInfo.value.person_id, - type: buyInfo.value.group_id ? 2 : 1, - hospital: buyInfo.value.hospital, - group_id: buyInfo.value.group_id, - combo_id:buyInfo.value.group_id?"":buyInfo.value?.combo_id, - item_ids: buyInfo.value.item_ids, - plan_id: tj_plan_id.value, - plan_nmr_info:yytjInfo.value?.nmr_list || null, - doctor: yytjInfo.value?.doctor_name || "", - duo_xuan_yi: $store.getDuoXuanYi(), - jifen: Math.ceil(yytjInfo.value.pointsPrice?yytjInfo.value.pointsPrice:0), - yucunkuan: yytjInfo.value.prepaidPrice?yytjInfo.value.prepaidPrice:0, - coupon_id:yytjInfo.value?.couponId || null, - wj: buyInfo.value.wj, - erxian_info:yytjInfo.value.erxianInfo, - peiou_info:$store.getPeiOuUser()//配偶信息 - }; - console.log(obj); - const response = await $api("OrderCreate", obj); - $response(response, () => { - if (response.status) { - if (response.data.action == "pay") { - StartPay(response.data.orderid); - } else { - uni.navigateTo({ - url: "/pages/buy/done/yuyue_done?id=" + response.data.orderid, - }); - } - } - uni.hideLoading(); - }); + let plan_id = ""; + let plan_nmr_id = ""; + uni.showLoading(); + console.log(yytjInfo.value?.nmr_list); + // for (let i = 0; i < yytjInfo.value?.nmr_list?.length; i++) { + // if (!yytjInfo.value?.nmr_list[i].id) { + // uni.$lu.toast("请完善预约时间"); + // uni.hideLoading(); + // return; + // } + // } + + + if (yytjInfo.value?.nmr_list?.length > 1) { + plan_nmr_id = yytjInfo.value?.nmr_list[0]?.id; + } + if (yytjInfo.value?.nmr_list?.length > 0) { + plan_id = yytjInfo.value?.nmr_list[yytjInfo.value?.nmr_list.length - 1]?.id; + } + + + + let obj = { + person_id: buyInfo.value.person_id, + type: buyInfo.value.group_id ? 2 : 1, + hospital: buyInfo.value.hospital, + group_id: buyInfo.value.group_id, + combo_id: buyInfo.value.group_id ? "" : buyInfo.value?.combo_id, + item_ids: buyInfo.value.item_ids, + plan_id: tj_plan_id.value, + plan_nmr_info: yytjInfo.value?.nmr_list || null, + doctor: yytjInfo.value?.doctor_name || "", + duo_xuan_yi: $store.getDuoXuanYi(), + jifen: Math.ceil(yytjInfo.value.pointsPrice ? yytjInfo.value.pointsPrice : 0), + yucunkuan: yytjInfo.value.prepaidPrice ? yytjInfo.value.prepaidPrice : 0, + coupon_id: yytjInfo.value?.couponId || null, + wj: buyInfo.value.wj, + erxian_info: yytjInfo.value.erxianInfo, + peiou_info: $store.getPeiOuUser() //配偶信息 + }; + console.log(obj); + const response = await $api("OrderCreate", obj); + $response(response, () => { + if (response.status) { + if (response.data.action == "pay") { + StartPay(response.data.orderid); + } else { + uni.navigateTo({ + url: "/pages/buy/done/yuyue_done?id=" + response.data.orderid, + }); + } + } + uni.hideLoading(); + }); }; //先前已经创建订单,单纯进行预约 - const OnlyYuYue=async()=>{ + const OnlyYuYue = async () => { if (tj_time.value == null) { uni.$lu.toast("请选择体检日期"); return false @@ -430,57 +432,56 @@ uni.hideLoading(); $response(response, () => { if (response.status) { - + setTimeout(() => { uni.redirectTo({ url: "/pages/buy/done/yuyue_done?id=" + orderInfo.value.id, }) }, 1000) - + } }); } //跳转支付 const StartPay = async (id) => { - //继续支付 - uni.showLoading(); - const response = await $api("StartPay", { - openid: localStorage.getItem("OPENID"), - id: id, - }); - uni.hideLoading(); - $response(response, () => { - if (response.status) { - let info = response.data.info; - let p = - "&appid=" + - info.appid + - "&sub_org_code=" + - info.sub_org_code + - "&ghzid=" + - info.ghzid + - "&orderid=" + - info.orderid + - "&order_desc=" + - info.order_desc + - "&amount=" + - info.amount + - "¬ify_url=" + - info.notify_url + - "×tamp=" + - info.timestamp + - "&nonce=" + - info.nonce + - "&signature=" + - info.signature; - console.log(p); - wx.miniProgram.navigateTo({ - url: - "/pages/other/entry/index?path=/pages/physical-examination/payment/index" + - p, - }); - } - }); + //继续支付 + uni.showLoading(); + const response = await $api("StartPay", { + openid: localStorage.getItem("OPENID"), + id: id, + }); + uni.hideLoading(); + $response(response, () => { + if (response.status) { + let info = response.data.info; + let p = + "&appid=" + + info.appid + + "&sub_org_code=" + + info.sub_org_code + + "&ghzid=" + + info.ghzid + + "&orderid=" + + info.orderid + + "&order_desc=" + + info.order_desc + + "&amount=" + + info.amount + + "¬ify_url=" + + info.notify_url + + "×tamp=" + + info.timestamp + + "&nonce=" + + info.nonce + + "&signature=" + + info.signature; + console.log(p); + wx.miniProgram.navigateTo({ + url: "/pages/other/entry/index?path=/pages/physical-examination/payment/index" + + p, + }); + } + }); }; //改变日期 const DateChange = (date) => { @@ -505,25 +506,25 @@ let temp = null onMounted(() => { - itemSelected.value.type='tj' + itemSelected.value.type = 'tj' buyInfo.value = $store.getBuyInfo(); //清空一下缓存的医生,防止出问题 temp = $store.getYytjInfo() temp.doctor_name = "" $store.setYytjInfo(temp) selectedDate.value = GetToday() - tj_date.value=GetToday() + tj_date.value = GetToday() if (OrderId.value) { GetOrderInfo() } else { - checkup_type_id.value= buyInfo.value.group_id ? + checkup_type_id.value = buyInfo.value.group_id ? $store.getGroupInfo()?.checkup_type_id : $store.getCheckupTypeId()?.id, - hospital_id.value= buyInfo.value.hospital, - person_id.value= buyInfo.value.person_id, - use_type.value= buyInfo.value.group_id ? 2 : 1, - person_name.value=buyInfo.value.group_id ?$store.getGroupInfo()?.name : '', - combo_name.value=buyInfo.value.group_id ?$store.getGroupInfo()?.group_name : '', - GetDayPlanListFunc() + hospital_id.value = buyInfo.value.hospital, + person_id.value = buyInfo.value.person_id, + use_type.value = buyInfo.value.group_id ? 2 : 1, + person_name.value = buyInfo.value.group_id ? $store.getGroupInfo()?.name : '', + combo_name.value = buyInfo.value.group_id ? $store.getGroupInfo()?.group_name : '', + GetDayPlanListFunc() } }); @@ -564,7 +565,7 @@ .zhouli { padding: 40rpx; background-color: #fff; - height:calc(100vh - 460rpx) ; + height: calc(100vh - 460rpx); overflow-y: scroll; } @@ -627,6 +628,15 @@ .uni-calendar-item__weeks-box-text { font-size: 26rpx; + color:#ccc; + } + + .uni-calendar-item__weeks-box-text:has(+ .uni-calendar-item--extra) { + color: #666; + } + + .uni-calendar-item__weeks-box-text:has(+ .uni-calendar-item--disable) { + color: #ccc !important; } .uni-calendar-item__weeks-lunar-text { @@ -668,7 +678,7 @@ font-size: 29rpx; color: #F6FDFD; text-align: center; - + } \ No newline at end of file