feat(clinic): 更新患者模型并优化医生端界面- 修改患者模型字段,增加年龄、性别、身高、体重和过敏史等信息
- 移除支付相关及推荐人相关字段 - 在医生端患者列表中展示患者年龄和性别- 在医生端为患者添加开方按钮并调整详情按钮文案-重命名开方页面组件并移除聊天消息相关逻辑
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import type { PageParam } from '@/api/index';
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 患者
|
* 患者
|
||||||
@@ -12,30 +12,20 @@ export interface ClinicPatientUser {
|
|||||||
userId?: number;
|
userId?: number;
|
||||||
// 姓名
|
// 姓名
|
||||||
realName?: string;
|
realName?: string;
|
||||||
// 手机号
|
// 年龄
|
||||||
|
age?: string;
|
||||||
|
// 性别
|
||||||
|
sex?: string;
|
||||||
|
// 手机
|
||||||
phone?: string;
|
phone?: string;
|
||||||
// 支付密码
|
|
||||||
payPassword?: string;
|
|
||||||
// 当前可提现佣金
|
|
||||||
money?: string;
|
|
||||||
// 已冻结佣金
|
|
||||||
freezeMoney?: string;
|
|
||||||
// 累积提现佣金
|
|
||||||
totalMoney?: string;
|
|
||||||
// 收益基数
|
|
||||||
rate?: string;
|
|
||||||
// 单价
|
|
||||||
price?: string;
|
|
||||||
// 推荐人用户ID
|
|
||||||
refereeId?: number;
|
|
||||||
// 成员数量(一级)
|
|
||||||
firstNum?: number;
|
|
||||||
// 成员数量(二级)
|
|
||||||
secondNum?: number;
|
|
||||||
// 成员数量(三级)
|
|
||||||
thirdNum?: number;
|
|
||||||
// 专属二维码
|
// 专属二维码
|
||||||
qrcode?: string;
|
qrcode?: string;
|
||||||
|
// 身高
|
||||||
|
height?: string;
|
||||||
|
// 体重
|
||||||
|
weight?: string;
|
||||||
|
// 过敏史
|
||||||
|
allergyHistory?: string;
|
||||||
// 备注
|
// 备注
|
||||||
comments?: string;
|
comments?: string;
|
||||||
// 排序号
|
// 排序号
|
||||||
|
|||||||
@@ -189,10 +189,14 @@ const PatientIndex = () => {
|
|||||||
<View key={patient.id} className="bg-white rounded-lg p-4 mb-3 shadow-sm">
|
<View key={patient.id} className="bg-white rounded-lg p-4 mb-3 shadow-sm">
|
||||||
<View className="flex items-center mb-3">
|
<View className="flex items-center mb-3">
|
||||||
<View className="flex-1">
|
<View className="flex-1">
|
||||||
<View className="flex items-center justify-between mb-1">
|
<View className="flex items-center mb-1">
|
||||||
|
<Space>
|
||||||
<Text className="font-semibold text-gray-800 mr-2">
|
<Text className="font-semibold text-gray-800 mr-2">
|
||||||
{patient.realName || '未命名'}
|
{patient.realName || '未命名'}
|
||||||
</Text>
|
</Text>
|
||||||
|
<Text className={'text-gray-400 font-normal'}>{patient.age}岁</Text>
|
||||||
|
<Text className={'text-gray-400 font-normal'}>{patient.sex == '1' ? '男' : ''}{patient.sex == '2' ? '女' : ''}</Text>
|
||||||
|
</Space>
|
||||||
</View>
|
</View>
|
||||||
<View className="flex items-center mb-1">
|
<View className="flex items-center mb-1">
|
||||||
<Space direction="vertical">
|
<Space direction="vertical">
|
||||||
@@ -245,12 +249,19 @@ const PatientIndex = () => {
|
|||||||
|
|
||||||
{/* 操作按钮 */}
|
{/* 操作按钮 */}
|
||||||
<Space className="flex justify-end">
|
<Space className="flex justify-end">
|
||||||
|
<Button
|
||||||
|
size="small"
|
||||||
|
onClick={() => navTo(`/doctor/orders/add?id=${patient.userId}`, true)}
|
||||||
|
style={{marginRight: '8px', backgroundColor: '#ff4d4f', color: 'white'}}
|
||||||
|
>
|
||||||
|
开方
|
||||||
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
size="small"
|
size="small"
|
||||||
onClick={() => navTo(`/doctor/customer/add?id=${patient.id}`, true)}
|
onClick={() => navTo(`/doctor/customer/add?id=${patient.id}`, true)}
|
||||||
style={{marginRight: '8px', backgroundColor: '#1890ff', color: 'white'}}
|
style={{marginRight: '8px', backgroundColor: '#1890ff', color: 'white'}}
|
||||||
>
|
>
|
||||||
查看详情
|
详情
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
size="small"
|
size="small"
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import {ArrowRight} from '@nutui/icons-react-taro'
|
|||||||
import {View, Text} from '@tarojs/components'
|
import {View, Text} from '@tarojs/components'
|
||||||
import Taro from '@tarojs/taro'
|
import Taro from '@tarojs/taro'
|
||||||
import FixedButton from "@/components/FixedButton";
|
import FixedButton from "@/components/FixedButton";
|
||||||
import {addShopChatMessage} from "@/api/shop/shopChatMessage";
|
|
||||||
import navTo from "@/utils/common";
|
import navTo from "@/utils/common";
|
||||||
import {getUser} from "@/api/system/user";
|
import {getUser} from "@/api/system/user";
|
||||||
import {User} from "@/api/system/user/model";
|
import {User} from "@/api/system/user/model";
|
||||||
@@ -23,10 +22,10 @@ interface UploadedImageData {
|
|||||||
type?: string;
|
type?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AddOrder = () => {
|
const AddClinicOrder = () => {
|
||||||
const {params} = useRouter();
|
const {params} = useRouter();
|
||||||
const [toUser, setToUser] = useState<User>()
|
const [toUser, setToUser] = useState<User>()
|
||||||
const [loading, setLoading] = useState<boolean>(true)
|
const [loading, setLoading] = useState<boolean>(false)
|
||||||
const formRef = useRef<any>(null)
|
const formRef = useRef<any>(null)
|
||||||
const [disabled, setDisabled] = useState<boolean>(false)
|
const [disabled, setDisabled] = useState<boolean>(false)
|
||||||
const [fileList, setFileList] = useState<UploadedImageData[]>([]) // 图片文件列表
|
const [fileList, setFileList] = useState<UploadedImageData[]>([]) // 图片文件列表
|
||||||
@@ -252,12 +251,7 @@ const AddOrder = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 执行新增或更新操作
|
// 执行新增或更新操作
|
||||||
await addShopChatMessage({
|
// await addClinicOrder({});
|
||||||
toUserId: toUserId || (selectedPatient?.userId ?? 0),
|
|
||||||
formUserId: Taro.getStorageSync('UserId') || 0,
|
|
||||||
type: 'text',
|
|
||||||
content: content
|
|
||||||
});
|
|
||||||
|
|
||||||
Taro.showToast({
|
Taro.showToast({
|
||||||
title: `发送成功`,
|
title: `发送成功`,
|
||||||
@@ -563,4 +557,4 @@ const AddOrder = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default AddOrder;
|
export default AddClinicOrder;
|
||||||
|
|||||||
Reference in New Issue
Block a user