Compare commits

...

3 Commits

Author SHA1 Message Date
sangchengzhi
c4a06501cb 修改住院详情样式,及页面效果 2026-01-14 17:13:03 +08:00
sangchengzhi
812acfc49b 修改驾驶舱权限,及住院的明细查询 2026-01-14 17:02:09 +08:00
sangchengzhi
7b65d52e21 修改预约体检流程感受 2026-01-13 16:51:25 +08:00
3 changed files with 102 additions and 22 deletions

View File

@@ -230,7 +230,7 @@ export default {
apiUserInfo().then((res) => { apiUserInfo().then((res) => {
console.log(res.data); console.log(res.data);
this.info = res.data; this.info = res.data;
if (res.data.role === 1) { if (res.data.role >= 1) {
this.hasDataCockpitPermission = true; this.hasDataCockpitPermission = true;
} }
}); });

View File

@@ -79,7 +79,7 @@
<div class="listbt">{{ startdate }}{{ enddate }}清单</div> <div class="listbt">{{ startdate }}{{ enddate }}清单</div>
<div class="listbody"> <div class="listbody">
<div class="scrollable-content"> <div class="scrollable-content">
<van-row> <van-row class="header-row">
<van-col span="9" class="colblack">项目名称</van-col> <van-col span="9" class="colblack">项目名称</van-col>
<van-col span="3" class="colblack">类型</van-col> <van-col span="3" class="colblack">类型</van-col>
<van-col span="3" class="colblack">单价</van-col> <van-col span="3" class="colblack">单价</van-col>
@@ -87,7 +87,17 @@
<van-col span="3" class="colblack">单位</van-col> <van-col span="3" class="colblack">单位</van-col>
<van-col span="3" class="colblack">总价</van-col> <van-col span="3" class="colblack">总价</van-col>
</van-row> </van-row>
<van-row v-for="item in List" :key="item">
<!-- 按日期分组显示 -->
<div v-for="group in groupedList" :key="group.date" class="date-group">
<!-- 日期标题栏 -->
<div class="date-header">
<span class="date-text">{{ group.date }}收费如下:</span>
<span class="daily-total">当日合计{{ group.total }}</span>
</div>
<!-- 当日费用明细 -->
<van-row v-for="item in group.items" :key="item" class="item-row">
<van-col span="9" class="colgray">{{ item.ITEMNAME }}</van-col> <van-col span="9" class="colgray">{{ item.ITEMNAME }}</van-col>
<van-col span="3" class="colgray">{{ item.ACCTYPE }}</van-col> <van-col span="3" class="colgray">{{ item.ACCTYPE }}</van-col>
<van-col span="3" class="colgray">{{ item.ITEMPRICE }}</van-col> <van-col span="3" class="colgray">{{ item.ITEMPRICE }}</van-col>
@@ -96,9 +106,10 @@
<van-col span="3" class="colgray">{{ item.ITEMAMOUNT }}</van-col> <van-col span="3" class="colgray">{{ item.ITEMAMOUNT }}</van-col>
</van-row> </van-row>
</div> </div>
</div>
<van-row class="fixed-total"> <van-row class="fixed-total">
<van-col offset="14" span="10" class="colblack">合计{{ money }} <van-col span="24" class="colblack text-right">{{ startdate }}{{ enddate }}合计{{ money }}
</van-col> </van-col>
</van-row> </van-row>
@@ -161,6 +172,7 @@ export default {
patientIds: [], patientIds: [],
patientId: "", patientId: "",
showPatientSelector: false, // 控制是否显示选择弹窗 showPatientSelector: false, // 控制是否显示选择弹窗
groupedList: [], // 按日期分组后的费用明细
}; };
}, },
created() { created() {
@@ -339,15 +351,38 @@ export default {
// 检查数据是否存在 // 检查数据是否存在
if (jsonObj2 && jsonObj2.response && jsonObj2.response.data && jsonObj2.response.data.data_row && jsonObj2.response.data.data_row.length > 0) { if (jsonObj2 && jsonObj2.response && jsonObj2.response.data && jsonObj2.response.data.data_row && jsonObj2.response.data.data_row.length > 0) {
that.List = jsonObj2.response.data.data_row; // 原始数据列表
that.money = 0; const originalList = jsonObj2.response.data.data_row;
for (let i = 0; i < jsonObj2.response.data.data_row.length; i++) {
that.money = (parseFloat(that.money) + parseFloat(jsonObj2.response.data.data_row[i].ITEMAMOUNT)).toFixed(2); // 按日期分组
const groupedData = {};
originalList.forEach(item => {
// 假设TRDATETIME格式为YYYY-MM-DD HH:MM:SS提取日期部分"2026-01-12 23:00:14"
const date = item.TRDATETIME ? item.TRDATETIME.split(' ')[0] : '未知日期';
if (!groupedData[date]) {
groupedData[date] = {
date: date,
items: [],
total: 0
};
} }
groupedData[date].items.push(item);
groupedData[date].total = (parseFloat(groupedData[date].total) + parseFloat(item.ITEMAMOUNT)).toFixed(2);
});
// 转换为数组格式
that.groupedList = Object.values(groupedData).sort((a, b) => new Date(a.date) - new Date(b.date));
// 计算总金额
that.money = 0;
that.groupedList.forEach(group => {
that.money = (parseFloat(that.money) + parseFloat(group.total)).toFixed(2);
});
that.resultshow = true; that.resultshow = true;
} else { } else {
// 数据为空的情况 // 数据为空的情况
that.List = []; that.groupedList = [];
that.money = 0; that.money = 0;
that.resultshow = true; that.resultshow = true;
Toast("暂无该时间段收费详情信息"); Toast("暂无该时间段收费详情信息");
@@ -512,7 +547,7 @@ export default {
font-family: PingFang SC; font-family: PingFang SC;
background-color: #fff; background-color: #fff;
border-radius: 15px; border-radius: 15px;
padding: 0 0 0 0.5rem;
.van-row { .van-row {
padding: 20px 0; padding: 20px 0;
} }
@@ -558,16 +593,58 @@ export default {
overflow-y: auto; overflow-y: auto;
flex: 1; flex: 1;
.van-row { .header-row {
padding: 15px 0;
border-bottom: 2px solid #ddd;
}
.date-group {
margin-bottom: 20px;
border: 1px solid #f0f0f0;
border-radius: 8px;
overflow: hidden;
}
.date-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px;
background-color: #f5f5f5;
font-weight: 600;
border-bottom: 1px solid #eee;
}
.date-text {
font-size: 28px;
color: #333;
}
.daily-total {
font-size: 26px;
color: #166bcc;
}
.item-row {
padding: 10px 0; padding: 10px 0;
border-bottom: 1px solid #f0f0f0;
&:last-child {
border-bottom: none;
}
} }
} }
.fixed-total { .fixed-total {
flex-shrink: 0; // 防止压缩 flex-shrink: 0; // 防止压缩
padding: 20px 0; //padding: 20px;
border-top: 1px solid #eee; border-top: 2px solid #ddd;
background-color: #fff; background-color: #fff;
font-size: 32px;
}
.text-right {
text-align: right;
} }
} }
</style> </style>

View File

@@ -271,8 +271,11 @@ yuyue() {
apiOpTjYy(formData) apiOpTjYy(formData)
.then(res => { .then(res => {
if (res.code === 200) { if (res.code === 200) {
Toast.success("预约成功"); Toast.success({ message: "预约成功", duration: 3000 });
// 延时3秒后跳转到预约页面
setTimeout(() => {
this.$router.push('Zstj_yy'); this.$router.push('Zstj_yy');
}, 4000);
} else { } else {
Toast.fail(res.message || "预约失败,请重试"); Toast.fail(res.message || "预约失败,请重试");
} }