| | |
| | | <up-divider></up-divider> |
| | | <view class="item-details"> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">入库单号</text> |
| | | <text class="detail-value">{{ p.inboundBatches || "-" }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">批次号</text> |
| | | <text class="detail-value">{{ p.batchNo || "-" }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">产品大类</text> |
| | | <text class="detail-value">{{ p.productCategory || "-" }}</text> |
| | | </view> |
| | |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">数量</text> |
| | | <text class="detail-value">{{ p.quantity ?? "-" }}</text> |
| | | <text class="detail-value">{{ p.stockInNum ?? p.quantity ?? "-" }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">可退货数量</text> |
| | | <text class="detail-value">{{ p.unQuantity ?? "-" }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">已退货数量</text> |
| | | <text class="detail-value">{{ calcAlreadyReturned(p) }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">退货数量</text> |
| | | <text class="detail-value highlight">{{ p.returnQuantity ?? "-" }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">税率(%)</text> |
| | | <text class="detail-value">{{ p.taxRate ?? "-" }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">含税单价(元)</text> |
| | | <text class="detail-value">{{ formatAmount(p.taxInclusiveUnitPrice) }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">含税总价(元)</text> |
| | | <text class="detail-value">{{ formatAmount(p.taxInclusiveTotalPrice) }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">是否质检</text> |
| | |
| | | return num.toFixed(2); |
| | | }; |
| | | |
| | | const calcAlreadyReturned = row => { |
| | | const total = Number(row?.stockInNum ?? row?.totalQuantity ?? row?.quantity ?? 0); |
| | | const un = Number(row?.unQuantity ?? 0); |
| | | if (!Number.isFinite(total) || !Number.isFinite(un)) return 0; |
| | | return Math.max(total - un, 0); |
| | | }; |
| | | |
| | | const loadDetail = () => { |
| | | if (!id.value) return; |
| | | uni.showLoading({ title: "加载中...", mask: true }); |