–交接页面添加收集人,袋数去掉小数点

This commit is contained in:
2026-03-12 17:48:34 +08:00
parent 7c917becee
commit 21218a55cb
+36 -22
View File
@@ -33,6 +33,7 @@
<view class="table-cell table-cell-type">类型</view>
<view class="table-cell table-cell-count">袋数</view>
<view class="table-cell table-cell-weight">重量</view>
<view class="table-cell table-cell-type">收集人</view>
<view class="table-cell table-cell-hand">交接人</view>
<view class="table-cell table-cell-action">操作</view>
</view>
@@ -43,6 +44,7 @@
</view>
<view class="table-cell table-cell-count">{{item.totalCount}}</view>
<view class="table-cell table-cell-weight">{{item.totalWeight}}</view>
<view class="table-cell table-cell-type">{{item.reclName}}</view>
<view class="table-cell table-cell-hand" v-if="itemIndex === 0">{{item.handName}}</view>
<view class="table-cell table-cell-hand" v-else></view>
<view class="table-cell table-cell-action" v-if="itemIndex === 0">
@@ -81,13 +83,13 @@
groups[item.department].totalWeight += parseFloat(item.totalWeight) || 0;
groups[item.department].items.push({
...item,
totalCount: (parseFloat(item.totalCount) || 0).toFixed(2),
totalCount: Math.round(parseFloat(item.totalCount) || 0),
totalWeight: (parseFloat(item.totalWeight) || 0).toFixed(2)
});
});
return Object.values(groups).map(group => ({
...group,
totalCount: group.totalCount.toFixed(2),
totalCount: Math.round(group.totalCount),
totalWeight: group.totalWeight.toFixed(2)
}));
}
@@ -113,7 +115,7 @@
getHandDetailsInfo(){
let that = this;
uni.request({
url: "https://lekapi.opmonitor.com/?c=app_api&a=getHandDetailsInfo",
url: "https://mtx.mini.opmonitor.com/?c=app_api&a=getHandDetailsInfo",
data: {hospital: that.hospital, sortHospital: that.sortHospital, department: that.department, duty: that.duty},
header: {
'Content-type': 'application/json'
@@ -275,32 +277,36 @@
background: linear-gradient(90deg, #2980b9 0%, #1a5276 100%);
color: #fff;
font-weight: 700;
font-size: 28rpx;
font-size: 22rpx;
letter-spacing: 2rpx;
padding-top: 4rpx;
position: sticky;
top: 0;
z-index: 10;
}
/* 表格行 */
.table-row {
display: flex;
border-bottom: 1px dashed #d0dbe6;
background-color: #fff;
transition: all 0.3s ease;
min-height: 56rpx;
}
.table-row:last-child {
border-bottom: none;
}
.table-row:hover {
background-color: #eaf2f8;
transform: translateX(4rpx);
}
/* 表格单元格 */
.table-cell {
padding: 24rpx 16rpx;
font-size: 28rpx;
padding: 10rpx 8rpx;
font-size: 22rpx;
color: #2c3e50;
display: flex;
align-items: center;
@@ -308,35 +314,43 @@
text-align: center;
word-break: break-all;
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.table-cell-type {
flex: 2;
flex: 1.8;
justify-content: flex-start;
padding-left: 24rpx;
padding-left: 12rpx;
min-width: 120rpx;
}
.table-cell-count {
flex: 1;
flex: 0.7;
color: #2980b9;
font-weight: 600;
min-width: 60rpx;
}
.table-cell-weight {
flex: 1;
flex: 0.7;
color: #c0392b;
font-weight: 600;
min-width: 60rpx;
}
.table-cell-hand {
flex: 1.5;
flex: 1.2;
color: #666;
font-weight: 500;
font-size: 26rpx;
font-size: 20rpx;
min-width: 90rpx;
}
.table-cell-action {
flex: 1;
flex: 0.8;
min-width: 70rpx;
}
/* 类型图标 */