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

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