更新使用1201接口
This commit is contained in:
@@ -64,7 +64,7 @@ export interface OptionalItemListResponse {
|
|||||||
export interface PackagItemInfo {
|
export interface PackagItemInfo {
|
||||||
patient_name: string;
|
patient_name: string;
|
||||||
appointment_datetime: string;
|
appointment_datetime: string;
|
||||||
package_code: number;
|
package_code: string;
|
||||||
package_name: string;
|
package_name: string;
|
||||||
registration_time: string;
|
registration_time: string;
|
||||||
}
|
}
|
||||||
@@ -343,13 +343,11 @@ export function parsePdfUrlResponse(
|
|||||||
*/
|
*/
|
||||||
export async function signIn(
|
export async function signIn(
|
||||||
physical_exam_id: number,
|
physical_exam_id: number,
|
||||||
package_code: number
|
|
||||||
): Promise<ApiResponse<SignInResponse>> {
|
): Promise<ApiResponse<SignInResponse>> {
|
||||||
const response = await axiosInstance.post<ApiResponse<SignInResponse>>(
|
const response = await axiosInstance.post<ApiResponse<SignInResponse>>(
|
||||||
"sign-in",
|
"sign-in",
|
||||||
{
|
{
|
||||||
physical_exam_id,
|
physical_exam_id,
|
||||||
package_code,
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
return response.data;
|
return response.data;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const UI6: React.FC = () => {
|
|||||||
}
|
}
|
||||||
const res = await getPackagItemDetail(id_no as string);
|
const res = await getPackagItemDetail(id_no as string);
|
||||||
if (res.Status === 200) {
|
if (res.Status === 200) {
|
||||||
localStorage.setItem("package_code", res.Data.packagItemInfo.package_code.toString() || "");
|
localStorage.setItem("package_code", res.Data.packagItemInfo.package_code || "");
|
||||||
// 处理数据:将 project_id 和 project_name 字符串分离为数组
|
// 处理数据:将 project_id 和 project_name 字符串分离为数组
|
||||||
const processedData = res.Data.listPackDetail.map((item: any) => {
|
const processedData = res.Data.listPackDetail.map((item: any) => {
|
||||||
// 将 project_id 字符串按中文顿号分割为数组
|
// 将 project_id 字符串按中文顿号分割为数组
|
||||||
|
|||||||
@@ -503,12 +503,11 @@ const UI7: React.FC = () => {
|
|||||||
|
|
||||||
const sign = async () => {
|
const sign = async () => {
|
||||||
const physical_exam_id = localStorage.getItem("selectedExamId");
|
const physical_exam_id = localStorage.getItem("selectedExamId");
|
||||||
const package_code = localStorage.getItem("package_code");
|
if (!physical_exam_id) {
|
||||||
if (!physical_exam_id || !package_code) {
|
alert("体检ID不存在");
|
||||||
alert("体检ID或套餐代码不存在");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const res = await signIn(Number(physical_exam_id), Number(package_code));
|
const res = await signIn(Number(physical_exam_id));
|
||||||
if (res.Status === 200) {
|
if (res.Status === 200) {
|
||||||
if (res.Data.is_success === 0) {
|
if (res.Data.is_success === 0) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1,26 +1,18 @@
|
|||||||
import React, { useEffect, useState } from "react";
|
import React from "react";
|
||||||
import "./UI81.css";
|
import "./UI81.css";
|
||||||
import "../../assets/css/basic.css";
|
import "../../assets/css/basic.css";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import ConfirmButton from "../../components/ConfirmButton";
|
import ConfirmButton from "../../components/ConfirmButton";
|
||||||
import DecorLine from "../../components/DecorLine";
|
import DecorLine from "../../components/DecorLine";
|
||||||
import { getPackagItemDetail, signIn } from "../../api/hisApi";
|
|
||||||
import errorIcon from "../../assets/error.png";
|
import errorIcon from "../../assets/error.png";
|
||||||
|
|
||||||
const UI81: React.FC = () => {
|
const UI81: React.FC = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const handleBack = () => {
|
|
||||||
navigate(-1);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleConfirm = () => {
|
const handleConfirm = () => {
|
||||||
navigate("/UI9");
|
navigate("/UI9");
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="basic-root">
|
<div className="basic-root">
|
||||||
<div className="basic-white-block">
|
<div className="basic-white-block">
|
||||||
|
|||||||
Reference in New Issue
Block a user