|
|
|
|
@ -8,7 +8,7 @@
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="zhouli">
|
|
|
|
|
<WeeklyCalendar v-if="weekList" :dataInfo="weekList" :selectedTime="selectedTime" :NmrDTime="nmr_date+' '+nmr_time" :TjDTime="tj_date+' '+tj_time" :TjType="itemSelected"
|
|
|
|
|
<WeeklyCalendar v-if="weekList" :dataInfo="weekList" :selectedTime="selectedTime" :YuYueInfo="YuYueInfo" :TjDTime="tj_date+' '+tj_time" :ItemSelected="itemSelected"
|
|
|
|
|
@selectDate="selectDateFunc" @selectTime="selectTimeFunc" @openMonth="openMonthFunc" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="dateitem" v-if="orderInfo">
|
|
|
|
|
@ -17,15 +17,17 @@
|
|
|
|
|
<view>{{orderInfo.name}}</view>
|
|
|
|
|
<view
|
|
|
|
|
style="background-color: #f1f1f1;padding: 20rpx 10rpx; margin-top: 10rpx;border-radius: 14rpx;font-size: 28rpx;color: #666;">
|
|
|
|
|
<view @click="itemClick('nmr')"
|
|
|
|
|
v-if=" orderInfo.buy_info.nmr_list && orderInfo.buy_info.nmr_list.length>0"
|
|
|
|
|
style="padding: 20rpx;" :class="itemSelected=='nmr'?'itemSelected':''">
|
|
|
|
|
<view v-for="(item1,index1) in orderInfo.buy_info.nmr_list">
|
|
|
|
|
{{item1.name}} <span v-if="nmr_date && nmr_time">{{nmr_date}} {{nmr_time}}</span>
|
|
|
|
|
<view v-if="YuYueInfo.NmrInfo.length>0">
|
|
|
|
|
<view @click="itemClick('nmr',item_nmr,index_nmr)" v-for="(item_nmr,index_nmr) in YuYueInfo.NmrInfo" :key="index_nmr"
|
|
|
|
|
style="padding: 20rpx;" :class="(itemSelected.type=='nmr' && itemSelected.index==index_nmr)?'itemSelected':''">
|
|
|
|
|
|
|
|
|
|
{{item_nmr.name}} <span v-if="item_nmr.date && item_nmr.time">{{item_nmr.date}} {{item_nmr.time}}</span>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view @click="itemClick('tj')" style="margin-top: 10rpx;padding: 20rpx;color: #666;"
|
|
|
|
|
:class="itemSelected=='tj'?'itemSelected':''">体检日期 <span v-if="tj_date && tj_time">{{tj_date}}
|
|
|
|
|
|
|
|
|
|
<view @click="itemClick('tj','',0)" style="margin-top: 10rpx;padding: 20rpx;color: #666;"
|
|
|
|
|
:class="itemSelected.type=='tj'?'itemSelected':''">体检日期 <span v-if="tj_date && tj_time">{{tj_date}}
|
|
|
|
|
{{tj_time}}</span></view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
@ -108,6 +110,10 @@
|
|
|
|
|
};
|
|
|
|
|
let selectedTime = ref(null);
|
|
|
|
|
let orderInfo = ref(null)
|
|
|
|
|
let YuYueInfo=ref({
|
|
|
|
|
TjInfo:{},
|
|
|
|
|
NmrInfo:{}
|
|
|
|
|
})
|
|
|
|
|
const GetOrderInfo = async () => {
|
|
|
|
|
uni.showLoading();
|
|
|
|
|
const response = await $api("GetOrderDetail", {
|
|
|
|
|
@ -119,18 +125,19 @@
|
|
|
|
|
doctor_name.value = orderInfo.value.doctor
|
|
|
|
|
//如果有核磁项目
|
|
|
|
|
if (orderInfo.value.buy_info.nmr_list && orderInfo.value.buy_info.nmr_list.length > 0) {
|
|
|
|
|
itemSelected.value = 'nmr'
|
|
|
|
|
itemSelected.value.type = 'nmr'
|
|
|
|
|
if(orderInfo.value.erxian_appointment_info.length>0){
|
|
|
|
|
selectedTime.value = orderInfo.value.erxian_appointment_info[0].time //应该是核磁时间
|
|
|
|
|
selectedDate.value = orderInfo.value.erxian_appointment_info[0].date //应该是核磁日期
|
|
|
|
|
nmr_date.value = orderInfo.value.erxian_appointment_info[0].date
|
|
|
|
|
nmr_time.value = orderInfo.value.erxian_appointment_info[0].time
|
|
|
|
|
// nmr_date.value = orderInfo.value.erxian_appointment_info[0].date
|
|
|
|
|
// nmr_time.value = orderInfo.value.erxian_appointment_info[0].time
|
|
|
|
|
YuYueInfo.value.NmrInfo= orderInfo.value.erxian_appointment_info
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NMRGetDayPlanListFunc()
|
|
|
|
|
} else {
|
|
|
|
|
itemSelected.value = 'tj'
|
|
|
|
|
itemSelected.value.type = 'tj'
|
|
|
|
|
selectedTime.value = orderInfo.value.appointment_time
|
|
|
|
|
selectedDate.value = orderInfo.value.appointment_date
|
|
|
|
|
|
|
|
|
|
@ -147,16 +154,18 @@
|
|
|
|
|
const selectDateFunc = (date) => {
|
|
|
|
|
selectedDate.value = date
|
|
|
|
|
selectedTime.value = null
|
|
|
|
|
if (itemSelected.value == 'nmr') {
|
|
|
|
|
nmr_time.value = null
|
|
|
|
|
nmr_date.value = date
|
|
|
|
|
if (itemSelected.value.type == 'nmr') {
|
|
|
|
|
// nmr_time.value = null
|
|
|
|
|
//nmr_date.value = date
|
|
|
|
|
YuYueInfo.value.NmrInfo[itemSelected.value.index].date=date
|
|
|
|
|
YuYueInfo.value.NmrInfo[itemSelected.value.index].time=null
|
|
|
|
|
|
|
|
|
|
tj_time.value = null //如果切换核磁日期则清空体检选择的日期时间
|
|
|
|
|
tj_date.value = null
|
|
|
|
|
doctor_name.value = null //清空体检医生
|
|
|
|
|
NMRGetDayPlanListFunc()
|
|
|
|
|
}
|
|
|
|
|
if (itemSelected.value == 'tj') {
|
|
|
|
|
if (itemSelected.value.type == 'tj') {
|
|
|
|
|
tj_time.value = null
|
|
|
|
|
tj_date.value = date
|
|
|
|
|
doctor_name.value = null //清空体检医生
|
|
|
|
|
@ -169,45 +178,53 @@
|
|
|
|
|
const selectTimeFunc = (timeinfo) => {
|
|
|
|
|
selectedTime.value = timeinfo.time
|
|
|
|
|
SelectedPlanId.value = timeinfo.id
|
|
|
|
|
if (itemSelected.value == 'nmr') {
|
|
|
|
|
nmr_time.value = timeinfo.time
|
|
|
|
|
if (itemSelected.value.type == 'nmr') {
|
|
|
|
|
YuYueInfo.value.NmrInfo[itemSelected.value.index].time = timeinfo.time
|
|
|
|
|
nmr_plan_id.value = timeinfo.id
|
|
|
|
|
}
|
|
|
|
|
if (itemSelected.value == 'tj') {
|
|
|
|
|
if (itemSelected.value.type == 'tj') {
|
|
|
|
|
tj_time.value = timeinfo.time
|
|
|
|
|
tj_plan_id.value = timeinfo.id
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let itemSelected = ref(null);
|
|
|
|
|
const itemClick = (type) => {
|
|
|
|
|
let itemSelected = ref({
|
|
|
|
|
type:null,
|
|
|
|
|
item:{},
|
|
|
|
|
index:0
|
|
|
|
|
});
|
|
|
|
|
const itemClick = (type,item,index) => {
|
|
|
|
|
//weekList.value=null
|
|
|
|
|
|
|
|
|
|
if (type == 'nmr') {
|
|
|
|
|
selectedTime.value = nmr_time.value
|
|
|
|
|
selectedDate.value = nmr_date.value
|
|
|
|
|
//selectedTime.value = nmr_time.value
|
|
|
|
|
//selectedDate.value = nmr_date.value
|
|
|
|
|
selectedTime.value = YuYueInfo.value.NmrInfo[index].time
|
|
|
|
|
selectedDate.value = YuYueInfo.value.NmrInfo[index].date
|
|
|
|
|
NMRGetDayPlanListFunc()
|
|
|
|
|
}
|
|
|
|
|
if (type == 'tj') {
|
|
|
|
|
if (orderInfo.value.buy_info.nmr_list && orderInfo.value.buy_info.nmr_list.length > 0) {
|
|
|
|
|
if (nmr_time.value == null || nmr_date.value == null) {
|
|
|
|
|
if (YuYueInfo.value.NmrInfo[itemSelected.value.index].date == null || YuYueInfo.value.NmrInfo[itemSelected.value.index].time == null) {
|
|
|
|
|
uni.$lu.toast("请先预约为影像科项目选择时间");
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (tj_date.value == null) {
|
|
|
|
|
tj_date.value = nmr_date.value
|
|
|
|
|
tj_date.value =YuYueInfo.value.NmrInfo[itemSelected.value.index].date
|
|
|
|
|
}
|
|
|
|
|
selectedTime.value = tj_time.value
|
|
|
|
|
selectedDate.value = tj_date.value
|
|
|
|
|
GetDayPlanListFunc()
|
|
|
|
|
}
|
|
|
|
|
itemSelected.value = type
|
|
|
|
|
itemSelected.value.type = type
|
|
|
|
|
itemSelected.value.item=item
|
|
|
|
|
itemSelected.value.index=index
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let DoctorMonthCalendar = ref(null)
|
|
|
|
|
const selectDoctor = () => {
|
|
|
|
|
if (orderInfo.value.buy_info.nmr_list && orderInfo.value.buy_info.nmr_list.length > 0) {
|
|
|
|
|
if (nmr_time.value == null || nmr_date.value == null) {
|
|
|
|
|
if (YuYueInfo.value.NmrInfo[itemSelected.value.index].date == null || YuYueInfo.value.NmrInfo[itemSelected.value.index].time == null) {
|
|
|
|
|
uni.$lu.toast("请先预约为影像科项目选择时间");
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
@ -233,10 +250,10 @@
|
|
|
|
|
let currentDate = ref(null); //月历当前日期
|
|
|
|
|
const monthSwitch = (e) => { //月历切换月份
|
|
|
|
|
let ym=e.year+""+"-"+e.month+""
|
|
|
|
|
if (itemSelected.value == 'nmr') {
|
|
|
|
|
if (itemSelected.value.type == 'nmr') {
|
|
|
|
|
NMRGetMonthPlanListFunc(ym)
|
|
|
|
|
}
|
|
|
|
|
if (itemSelected.value == 'tj') {
|
|
|
|
|
if (itemSelected.value.type == 'tj') {
|
|
|
|
|
GetMonthPlanListFunc(ym)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -244,16 +261,16 @@
|
|
|
|
|
console.log(e.fulldate)
|
|
|
|
|
selectedDate.value=e.fulldate
|
|
|
|
|
selectedTime.value = null
|
|
|
|
|
if (itemSelected.value == 'nmr') {
|
|
|
|
|
nmr_time.value = null
|
|
|
|
|
nmr_date.value = e.fulldate
|
|
|
|
|
if (itemSelected.value.type == 'nmr') {
|
|
|
|
|
YuYueInfo.value.NmrInfo[itemSelected.value.index].time = null
|
|
|
|
|
YuYueInfo.value.NmrInfo[itemSelected.value.index].date = e.fulldate
|
|
|
|
|
|
|
|
|
|
tj_time.value = null //如果切换核磁日期则清空体检选择的日期时间
|
|
|
|
|
tj_date.value = null
|
|
|
|
|
doctor_name.value = null //清空体检医生
|
|
|
|
|
NMRGetDayPlanListFunc()
|
|
|
|
|
}
|
|
|
|
|
if (itemSelected.value == 'tj') {
|
|
|
|
|
if (itemSelected.value.type == 'tj') {
|
|
|
|
|
tj_time.value = null
|
|
|
|
|
tj_date.value = e.fulldate
|
|
|
|
|
doctor_name.value = null //清空体检医生
|
|
|
|
|
@ -291,7 +308,7 @@
|
|
|
|
|
uni.showLoading();
|
|
|
|
|
let data = {
|
|
|
|
|
hospital: orderInfo.value.hospital_id,
|
|
|
|
|
month: ym?ym:nmr_date.value.substring(0, 7),
|
|
|
|
|
month: ym?ym:YuYueInfo.value.NmrInfo[itemSelected.value.index].date.substring(0, 7),
|
|
|
|
|
}
|
|
|
|
|
const response = await $api("NMRGetMonthPlanCount", data);
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
@ -310,10 +327,10 @@
|
|
|
|
|
};
|
|
|
|
|
//打开月历
|
|
|
|
|
const openMonthFunc = async() => {
|
|
|
|
|
if (itemSelected.value == 'nmr') {
|
|
|
|
|
if (itemSelected.value.type == 'nmr') {
|
|
|
|
|
await NMRGetMonthPlanListFunc()
|
|
|
|
|
}
|
|
|
|
|
if (itemSelected.value == 'tj') {
|
|
|
|
|
if (itemSelected.value.type == 'tj') {
|
|
|
|
|
await GetMonthPlanListFunc()
|
|
|
|
|
}
|
|
|
|
|
MonthCalendar.value.open()
|
|
|
|
|
@ -329,9 +346,11 @@
|
|
|
|
|
let data = {
|
|
|
|
|
orderid: orderInfo.value.id,
|
|
|
|
|
planid: tj_plan_id.value,
|
|
|
|
|
nmrPlanid:nmr_plan_id.value,
|
|
|
|
|
nmr_info:YuYueInfo.value.NmrInfo,
|
|
|
|
|
doctor: doctor_name.value
|
|
|
|
|
}
|
|
|
|
|
console.log(data);
|
|
|
|
|
return false
|
|
|
|
|
const response = await $api("ChangeAppointment", data);
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
$response(response, () => {
|
|
|
|
|
|