From e449a5408265e4bd1f6c66f5be28a42efac444ee Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期日, 20 九月 2026 15:22:46 +0800
Subject: [PATCH] 天津豹鸣app 1.需求修改

---
 src/pages/sales/salesAccount/view.vue |  146 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 144 insertions(+), 2 deletions(-)

diff --git a/src/pages/sales/salesAccount/view.vue b/src/pages/sales/salesAccount/view.vue
index 53ffab5..0e26ccc 100644
--- a/src/pages/sales/salesAccount/view.vue
+++ b/src/pages/sales/salesAccount/view.vue
@@ -28,8 +28,46 @@
           <text class="info-value">{{ form.executionDate }}</text>
         </view>
         <view class="info-item">
+          <text class="info-label">骞翠唤</text>
+          <text class="info-value">{{ form.year || "-" }}</text>
+        </view>
+        <view class="info-item">
           <text class="info-label">浠樻鏂瑰紡</text>
-          <text class="info-value">{{ form.paymentMethod }}</text>
+          <text class="info-value">{{ dictLabel(form.paymentMethod) }}</text>
+        </view>
+        <view class="info-item">
+          <text class="info-label">浜よ揣鏃ユ湡</text>
+          <text class="info-value">{{ form.deliveryDate || "-" }}</text>
+        </view>
+        <view class="info-item">
+          <text class="info-label">绛惧崟鍗曚綅</text>
+          <text class="info-value">{{ deptName(form.signingUnitId) }}</text>
+        </view>
+        <view class="info-item">
+          <text class="info-label">鍔炰簨澶�</text>
+          <text class="info-value">{{ deptName(form.officeId) }}</text>
+        </view>
+        <view class="info-item">
+          <text class="info-label">缁勮礋璐d汉</text>
+          <text class="info-value">{{ userName(form.groupLeaderId) }}</text>
+        </view>
+        <view class="info-item">
+          <text class="info-label">鏄惁寮�鍙戠エ</text>
+          <text class="info-value">{{ form.isInvoice === 1 ? "鏄�" : "鍚�" }}</text>
+        </view>
+        <view class="info-item">
+          <text class="info-label">鏄惁涓爣</text>
+          <text class="info-value">{{ form.isBid === 1 ? "鏄�" : "鍚�" }}</text>
+        </view>
+        <view class="info-item">
+          <text class="info-label">{{ form.isBid === 1 ? "涓爣浠�" : "鏈腑鏍囧師鍥�" }}</text>
+          <text class="info-value">
+            {{ form.isBid === 1 ? form.bidPrice ?? "-" : form.unbidReason || "-" }}
+          </text>
+        </view>
+        <view class="info-item">
+          <text class="info-label">鍚堝悓鍘熶欢绾﹀畾鍥炰紶鏃ユ湡</text>
+          <text class="info-value">{{ form.contractOriginalReturnDate || "-" }}</text>
         </view>
         <view class="info-item">
           <text class="info-label">褰曞叆浜�</text>
@@ -38,6 +76,11 @@
         <view class="info-item">
           <text class="info-label">褰曞叆鏃ユ湡</text>
           <text class="info-value">{{ form.entryDate }}</text>
+        </view>
+        <view v-if="form.remarks"
+              class="info-item remarks-item">
+          <text class="info-label">澶囨敞</text>
+          <text class="info-value">{{ form.remarks }}</text>
         </view>
       </view>
     </view>
@@ -107,13 +150,30 @@
           class="no-product">
       <text>鏆傛棤浜у搧淇℃伅</text>
     </view>
+    <!-- 闇�姹備簲.4锛氱绾﹂噾棰� = 鍚◣鍗曚环 脳 鏁伴噺锛屾寜浜у搧琛屾眹鎬伙紙瀵归綈绠$悊绔� summarizeMainTable锛� -->
+    <view v-if="productData.length > 0"
+          class="product-summary">
+      <view class="summary-row">
+        <text class="summary-label">绛剧害閲戦鍚堣(鍏�)</text>
+        <text class="summary-value highlight">{{ productTotals.taxInclusive }}</text>
+      </view>
+      <view class="summary-row">
+        <text class="summary-label">涓嶅惈绋庢�讳环鍚堣(鍏�)</text>
+        <text class="summary-value">{{ productTotals.taxExclusive }}</text>
+      </view>
+    </view>
   </view>
 </template>
 
 <script setup>
-  import { onMounted, ref } from "vue";
+  import { computed, onMounted, ref } from "vue";
   import { getSalesLedgerWithProducts } from "@/api/salesManagement/salesLedger";
+  import { getDept } from "@/api/collaborativeApproval/approvalProcess";
+  import { userListNoPageByTenantId } from "@/api/system/user";
+  import { useDict } from "@/utils/dict";
   import PageHeader from "@/components/PageHeader.vue";
+
+  const { checkout_payment } = useDict("checkout_payment");
 
   // 鑾峰彇椤甸潰鍙傛暟
   const editData = ref(null);
@@ -134,6 +194,35 @@
 
   // 浜у搧鏁版嵁
   const productData = ref([]);
+  const deptOptions = ref([]);
+  const userOptions = ref([]);
+
+  const dictLabel = value => {
+    if (value === undefined || value === null || value === "") return "-";
+    const matched = (checkout_payment.value || []).find(
+      item => String(item.value) === String(value)
+    );
+    return matched ? matched.label : String(value);
+  };
+
+  // 鍚庣鍙瓨 id锛屽彧璇婚〉闇�瑕佽嚜宸卞弽鏌ラ儴闂� / 鍛樺伐鍚嶇О
+  const deptName = id =>
+    deptOptions.value.find(item => String(item.value) === String(id))?.name ||
+    "-";
+  const userName = id =>
+    userOptions.value.find(item => String(item.value) === String(id))?.name ||
+    "-";
+
+  const productTotals = computed(() => {
+    const sumBy = key =>
+      (productData.value || [])
+        .reduce((sum, row) => sum + (Number(row?.[key]) || 0), 0)
+        .toFixed(2);
+    return {
+      taxInclusive: sumBy("taxInclusiveTotalPrice"),
+      taxExclusive: sumBy("taxExclusiveTotalPrice"),
+    };
+  });
 
   // 杩斿洖涓婁竴椤�
   const goBack = () => {
@@ -153,7 +242,24 @@
     });
   };
 
+  const loadOrgOptions = async () => {
+    const [depts, users] = await Promise.all([
+      getDept().catch(() => ({})),
+      userListNoPageByTenantId().catch(() => ({})),
+    ]);
+    deptOptions.value = (depts?.data || []).map(item => ({
+      name: item.deptName,
+      value: item.deptId,
+    }));
+    const rows = users?.data || [];
+    userOptions.value = (Array.isArray(rows) ? rows : []).map(item => ({
+      name: item.nickName || item.userName || `鐢ㄦ埛${item.userId}`,
+      value: item.userId,
+    }));
+  };
+
   onMounted(() => {
+    loadOrgOptions();
     // 鑾峰彇缂栬緫鏁版嵁骞跺~鍏呰〃鍗�
     const editDataStr = uni.getStorageSync("editData");
     if (editDataStr) {
@@ -290,4 +396,40 @@
     color: #999;
     font-size: 0.875rem;
   }
+
+  .remarks-item {
+    grid-column: 1 / -1;
+  }
+
+  .product-summary {
+    background: #fff;
+    margin: 1rem;
+    padding: 1rem;
+    border-radius: 0.5rem;
+    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.04);
+    display: flex;
+    flex-direction: column;
+    gap: 0.75rem;
+  }
+
+  .summary-row {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+  }
+
+  .summary-label {
+    font-size: 0.8125rem;
+    color: #666;
+  }
+
+  .summary-value {
+    font-size: 0.875rem;
+    font-weight: 600;
+    color: #333;
+  }
+
+  .summary-value.highlight {
+    color: #2979ff;
+  }
 </style>

--
Gitblit v1.9.3