From cc3001ab9e0ab8ce673b812a22ebea1edd332f2a Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期六, 14 三月 2026 15:38:33 +0800
Subject: [PATCH] fix: 完成仓储物流的功能开发

---
 src/pages/inventoryManagement/stockReport/view.vue |  173 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 173 insertions(+), 0 deletions(-)

diff --git a/src/pages/inventoryManagement/stockReport/view.vue b/src/pages/inventoryManagement/stockReport/view.vue
new file mode 100644
index 0000000..e2d3870
--- /dev/null
+++ b/src/pages/inventoryManagement/stockReport/view.vue
@@ -0,0 +1,173 @@
+<template>
+  <view class="detail-page">
+    <PageHeader title="搴撳瓨鎶ヨ〃璇︽儏" @back="goBack" />
+    <view v-if="detail" class="detail-wrap">
+      <!-- 鍩虹淇℃伅 -->
+      <view class="section-card">
+        <view class="section-head">
+          <view class="section-dot"></view>
+          <text class="section-title">鍩虹淇℃伅</text>
+        </view>
+        <view class="section-body">
+          <view class="detail-row">
+            <text class="label">搴忓彿</text>
+            <text class="value">{{ detail.index ?? '-' }}</text>
+          </view>
+          <view class="detail-row">
+            <text class="label">浜у搧澶х被</text>
+            <text class="value value-strong">{{ detail.productName || '-' }}</text>
+          </view>
+          <view class="detail-row">
+            <text class="label">瑙勬牸鍨嬪彿</text>
+            <text class="value">{{ detail.model || '-' }}</text>
+          </view>
+          <view class="detail-row">
+            <text class="label">鍗曚綅</text>
+            <text class="value">{{ detail.unit || '-' }}</text>
+          </view>
+        </view>
+      </view>
+
+      <!-- 鎶ヨ〃淇℃伅 -->
+      <view class="section-card">
+        <view class="section-head">
+          <view class="section-dot"></view>
+          <text class="section-title">鎶ヨ〃淇℃伅</text>
+        </view>
+        <view class="section-body">
+          <view class="detail-row" v-if="type !== 'inout'">
+            <text class="label">鍏ュ簱鏃堕棿</text>
+            <text class="value">{{ detail.createTime || '-' }}</text>
+          </view>
+          <view class="detail-row" v-if="type !== 'inout'">
+            <text class="label">鍏ュ簱鎵规</text>
+            <text class="value">{{ detail.inboundBatches || '-' }}</text>
+          </view>
+          <view class="detail-row">
+            <text class="label">鍏ュ簱鏁伴噺</text>
+            <text class="value">{{ detail.totalStockIn ?? detail.stockInNum ?? '-' }}</text>
+          </view>
+          <view class="detail-row" v-if="type === 'inout'">
+            <text class="label">鍑哄簱鏁伴噺</text>
+            <text class="value">{{ detail.totalStockOut ?? '-' }}</text>
+          </view>
+          <view class="detail-row detail-row-highlight">
+            <text class="label">鐜板湪搴撳瓨</text>
+            <text class="value value-num">{{ detail.currentStock ?? '-' }}</text>
+          </view>
+          <view class="detail-row" v-if="detail.createBy">
+            <text class="label">鍏ュ簱浜�</text>
+            <text class="value">{{ detail.createBy }}</text>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view v-else class="empty">
+      <text class="empty-text">鏆傛棤璇︽儏鏁版嵁</text>
+    </view>
+  </view>
+</template>
+
+<script setup>
+import { ref } from 'vue'
+import { onLoad } from '@dcloudio/uni-app'
+import PageHeader from '@/components/PageHeader.vue'
+
+const detail = ref(null)
+const type = ref('daily')
+
+onLoad(() => {
+  const cached = uni.getStorageSync('stockReportDetail')
+  if (cached) {
+    try {
+      const payload = typeof cached === 'string' ? JSON.parse(cached) : cached
+      type.value = payload?.type || 'daily'
+      detail.value = payload?.item || null
+      uni.removeStorageSync('stockReportDetail')
+    } catch (e) {
+      uni.removeStorageSync('stockReportDetail')
+    }
+  }
+})
+
+const goBack = () => uni.navigateBack()
+</script>
+
+<style lang="scss" scoped>
+.detail-page {
+  min-height: 100vh;
+  background: #f5f5f5;
+  padding-bottom: 40rpx;
+}
+.detail-wrap {
+  padding: 24rpx;
+}
+.empty {
+  padding: 120rpx 48rpx;
+  text-align: center;
+}
+.empty-text {
+  color: #8c9aa8;
+  font-size: 28rpx;
+}
+.section-card {
+  background: #fff;
+  border-radius: 16rpx;
+  margin-bottom: 20rpx;
+  box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
+  overflow: hidden;
+}
+.section-head {
+  display: flex;
+  align-items: center;
+  padding: 20rpx 24rpx;
+  border-bottom: 1rpx solid #eee;
+}
+.section-dot {
+  width: 8rpx;
+  height: 8rpx;
+  border-radius: 50%;
+  background: #2979ff;
+  margin-right: 12rpx;
+}
+.section-title {
+  font-size: 30rpx;
+  font-weight: 500;
+  color: #333;
+}
+.section-body {
+  padding: 12rpx 24rpx 20rpx;
+}
+.detail-row {
+  display: flex;
+  align-items: center;
+  min-height: 80rpx;
+  font-size: 28rpx;
+}
+.detail-row .label {
+  width: 200rpx;
+  flex-shrink: 0;
+  color: #6b7c93;
+  font-size: 26rpx;
+}
+.detail-row .value {
+  flex: 1;
+  color: #2c3e50;
+  text-align: right;
+  word-break: break-all;
+  font-size: 28rpx;
+}
+.detail-row .value-strong {
+  color: #1e3a5f;
+  font-weight: 500;
+}
+.detail-row .value-num {
+  color: #2979ff;
+  font-weight: 600;
+  font-size: 32rpx;
+}
+.detail-row-highlight {
+  margin-top: 8rpx;
+}
+</style>
+

--
Gitblit v1.9.3