|
|
|
|
@ -39,7 +39,7 @@ const mountedAction = async () => {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
onBeforeUnmount(() => {
|
|
|
|
|
if(!status.value){
|
|
|
|
|
if (!status.value) {
|
|
|
|
|
$store.setYytjInfo(uni.getStorageSync("yytjInfoS"));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
@ -87,10 +87,14 @@ const getToday = () => {
|
|
|
|
|
// 拼接日期字符串
|
|
|
|
|
return year + "-" + month + "-" + day;
|
|
|
|
|
};
|
|
|
|
|
const getTjTimeList = async (timeItem) => {
|
|
|
|
|
const getTjTimeList = async (val) => {
|
|
|
|
|
console.log($store.getCheckupTypeId());
|
|
|
|
|
console.log(val);
|
|
|
|
|
// 获取 体检号源
|
|
|
|
|
let obj = {
|
|
|
|
|
let obj = {};
|
|
|
|
|
let apiText = "";
|
|
|
|
|
if (val.item_id == -1) {
|
|
|
|
|
obj = {
|
|
|
|
|
hospital: buyInfo.value.hospital,
|
|
|
|
|
person_id: buyInfo.value.person_id,
|
|
|
|
|
date: currentDate.value, //currentDate.value
|
|
|
|
|
@ -100,7 +104,15 @@ const getTjTimeList = async (timeItem) => {
|
|
|
|
|
: $store.getCheckupTypeId().id,
|
|
|
|
|
amount: truePrice.value,
|
|
|
|
|
};
|
|
|
|
|
const response = await $api("GetDayPlanList", obj);
|
|
|
|
|
apiText = "GetDayPlanList";
|
|
|
|
|
} else {
|
|
|
|
|
obj = {
|
|
|
|
|
hospital_id: buyInfo.value.hospital,
|
|
|
|
|
date: currentDate.value,
|
|
|
|
|
};
|
|
|
|
|
apiText = "NMRGetDayPlanList";
|
|
|
|
|
}
|
|
|
|
|
const response = await $api(apiText, obj);
|
|
|
|
|
$response(response, () => {
|
|
|
|
|
console.log(response, "response");
|
|
|
|
|
// currentXmmcObj.value["sj"] = ""; //每次请求新的时间时间置空
|
|
|
|
|
@ -111,15 +123,18 @@ const getTjTimeList = async (timeItem) => {
|
|
|
|
|
time_list.value.forEach((item) => {
|
|
|
|
|
console.log(item.date);
|
|
|
|
|
item.newTime = item.time.slice(0, 5);
|
|
|
|
|
item.date = currentDate.value;
|
|
|
|
|
});
|
|
|
|
|
date_list.value.forEach((item) => {
|
|
|
|
|
console.log(item)
|
|
|
|
|
item.item_id = val.item_id;
|
|
|
|
|
const [year, month, day] = item.date.split("-");
|
|
|
|
|
item.newMonthDate = `${month}/${day}`; //月份日期
|
|
|
|
|
item.newWeek = item.xingqi.replace("星期", "周");
|
|
|
|
|
});
|
|
|
|
|
if (timeItem) {
|
|
|
|
|
if (val.time) {
|
|
|
|
|
timeIndex.value = time_list.value.findIndex(
|
|
|
|
|
(item) => item.newTime == timeItem.split(" ")[1]
|
|
|
|
|
(item) => item.newTime == val.time.split(" ")[1]
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
@ -136,14 +151,17 @@ const getCurrentClick = (item, i) => {
|
|
|
|
|
timeIndex.value = null;
|
|
|
|
|
yytjInfo.value.nmr_list[nmrIndex.value].time = "";
|
|
|
|
|
yytjInfo.value.nmr_list[nmrIndex.value].id = "";
|
|
|
|
|
console.log(yytjInfo.value.nmr_list[yytjInfo.value.nmr_list.length - 1].time, "xxsxsx");
|
|
|
|
|
if(!yytjInfo.value.nmr_list[yytjInfo.value.nmr_list.length - 1].time){
|
|
|
|
|
console.log(
|
|
|
|
|
yytjInfo.value.nmr_list[yytjInfo.value.nmr_list.length - 1].time,
|
|
|
|
|
"xxsxsx"
|
|
|
|
|
);
|
|
|
|
|
if (!yytjInfo.value.nmr_list[yytjInfo.value.nmr_list.length - 1].time) {
|
|
|
|
|
yytjInfo.value.doctor_name = "";
|
|
|
|
|
}
|
|
|
|
|
$store.setYytjInfo(yytjInfo.value);
|
|
|
|
|
status.value = 0;
|
|
|
|
|
currentDate.value = item.date;
|
|
|
|
|
getTjTimeList(); //带着选中的日期重新选择
|
|
|
|
|
getTjTimeList(item); //带着选中的日期重新选择
|
|
|
|
|
};
|
|
|
|
|
const getCurrentTime = (item, index) => {
|
|
|
|
|
// 选择时分
|
|
|
|
|
@ -159,14 +177,15 @@ const getCurrentTime = (item, index) => {
|
|
|
|
|
$store.setYytjInfo(yytjInfo.value);
|
|
|
|
|
};
|
|
|
|
|
const xmmcClick = (val, index) => {
|
|
|
|
|
// 选择日期
|
|
|
|
|
// 选择项目
|
|
|
|
|
nmrIndex.value = index;
|
|
|
|
|
time.value = "";
|
|
|
|
|
timeIndex.value = null;
|
|
|
|
|
if (val.time) {
|
|
|
|
|
currentDate.value = val.time.split(" ")[0];
|
|
|
|
|
}
|
|
|
|
|
getTjTimeList(val.time);
|
|
|
|
|
// 体检号源
|
|
|
|
|
getTjTimeList(val);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const clickDoctor = () => {
|
|
|
|
|
@ -181,8 +200,6 @@ const clickDoctor = () => {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const comfrimyy = () => {
|
|
|
|
|
status.value = 1;
|
|
|
|
|
uni.navigateBack({
|
|
|
|
|
|