| | |
| | | >- {{ getPrintStatusText() }}</text |
| | | > |
| | | </view> |
| | | |
| | | <!-- 核磅重量总和展示 --> |
| | | <view class="total-weight-indicator"> |
| | | <text class="total-weight-label">核磅重量总和:</text> |
| | | <text class="total-weight-value">{{ totalVerificationWeight.toFixed(2) }}</text> |
| | | </view> |
| | | |
| | | <scroll-view |
| | | class="finishProductIn-locno-scroll-list" |
| | | scroll-y="true" |
| | |
| | | // 5:透明纸 |
| | | printMode: 2, // 默认打印模式 |
| | | // 1:热敏 |
| | | // 2:热转印 |
| | | // 2:热转印 |
| | | connectedDevice: null, |
| | | connectionStatus: "disconnected", |
| | | printStatus: "idle", // 打印状态: idle, printing, error |
| | |
| | | verificationNo: "", |
| | | failedPrintJobs: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | | // 计算核磅重量总和 |
| | | totalVerificationWeight() { |
| | | return this.list.reduce((sum, item) => { |
| | | const weight = parseFloat(item.verificationWeight) || 0; |
| | | return sum + weight; |
| | | }, 0); |
| | | }, |
| | | }, |
| | | onLoad(options) { |
| | | this.verificationNo = JSON.parse( |
| | |
| | | font-size: 22rpx; |
| | | } |
| | | } |
| | | |
| | | /* 核磅重量总和展示 */ |
| | | .total-weight-indicator { |
| | | padding: 12rpx 20rpx; |
| | | font-size: 26rpx; |
| | | text-align: center; |
| | | background-color: #e8f3ff; |
| | | border-bottom: 1rpx solid #d1e5ff; |
| | | margin-bottom: 16rpx; |
| | | |
| | | .total-weight-label { |
| | | font-weight: 500; |
| | | color: #333; |
| | | margin-right: 8rpx; |
| | | } |
| | | |
| | | .total-weight-value { |
| | | font-weight: bold; |
| | | color: #07c160; |
| | | font-size: 28rpx; |
| | | } |
| | | } |
| | | </style> |