升级套餐标签

This commit is contained in:
xianyi
2025-12-11 15:03:50 +08:00
parent c8417db39c
commit aa330e8167
5 changed files with 40 additions and 11 deletions

View File

@@ -64,6 +64,7 @@ export interface OptionalItemListResponse {
// 已预约套餐信息
export interface PackagItemInfo {
patient_name: string;
is_upgrade_package: number; // 0-否 1-是
appointment_datetime: string;
package_code: string;
package_name: string;

BIN
src/assets/upgrade.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -23,9 +23,9 @@ const U1: React.FC = () => {
// 实时监听身份证读取
useEffect(() => {
// localStorage.setItem("lastIdCardNo", '421126199307103856');
// navigate("/u2");
// return;
localStorage.setItem("lastIdCardNo", '362331199210243023');
navigate("/UI6");
return;
window.electronAPI.startIdCardListen().catch((e: any) => {
console.error("start_idcard_listen failed", e);
window.electronAPI.log("error", `start_idcard_listen failed: ${e}`);
@@ -75,7 +75,7 @@ const U1: React.FC = () => {
.catch((e: any) => console.error(e));
}, 1000);
})
.catch(() => {});
.catch(() => { });
};
// 先验证档案信息,查询到才跳转
@@ -92,7 +92,7 @@ const U1: React.FC = () => {
.then((res) => {
if (res.Status === 200 && res.Data) {
// 查询成功,跳转到 u2
window.electronAPI.stopIdCardListen().catch(() => {});
window.electronAPI.stopIdCardListen().catch(() => { });
setReading(false);
isProcessingRef.current = false;
navigate("/u2");
@@ -119,7 +119,7 @@ const U1: React.FC = () => {
});
return () => {
window.electronAPI.stopIdCardListen().catch(() => {});
window.electronAPI.stopIdCardListen().catch(() => { });
window.electronAPI.removeIdCardListeners();
if (timerRef.current) clearTimeout(timerRef.current);
if (intervalRef.current) clearInterval(intervalRef.current);

View File

@@ -4,12 +4,31 @@
overflow-y: auto;
overflow-x: hidden;
/* 隐藏滚动条但保持滚动功能 */
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE 和 Edge */
scrollbar-width: none;
/* Firefox */
-ms-overflow-style: none;
/* IE 和 Edge */
}
.ui6-package-name {
position: relative;
display: inline-block;
padding-right: 72px;
}
.ui6-upgrade-badge {
position: absolute;
top: 50%;
right: -60px;
transform: translateY(-50%);
height: 100px;
width: auto;
}
.ui6-table-container::-webkit-scrollbar {
display: none; /* Chrome, Safari, Opera */
display: none;
/* Chrome, Safari, Opera */
}
.ui6-table {

View File

@@ -6,6 +6,7 @@ import BackButton from "../../components/BackButton";
import ConfirmButton from "../../components/ConfirmButton";
import DecorLine from "../../components/DecorLine";
import { getPackagItemDetail } from "../../api/hisApi";
import upgradeImg from "../../assets/upgrade.png";
const UI6: React.FC = () => {
const navigate = useNavigate();
@@ -114,13 +115,21 @@ const UI6: React.FC = () => {
<DecorLine />
<span className="basic-paragraph">
{localStorage.getItem("name")}{localStorage.getItem("gender") === "男" ? "先生" : "女士"} <strong>{PackageInfo.package_name}</strong>
{localStorage.getItem("name")}
{localStorage.getItem("gender") === "男" ? "先生" : "女士"}{" "}
<strong className="ui6-package-name">
{PackageInfo.package_name}
{PackageInfo.is_upgrade_package === 0 && (
<img src={upgradeImg} alt="已升级" className="ui6-upgrade-badge" />
)}
</strong>
<br />
<br />
{PackageInfo.appointment_datetime}
</span>
<div className="ui6-table-container">
<table className="ui6-table">
<thead>
<tr>