From 4039f4dce566ffddf444bed260906acdff0b164f Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期六, 16 五月 2026 15:58:08 +0800
Subject: [PATCH] Merge branch 'dev_NEW_pro' into dev_NEW_pro_鹤壁
---
src/pages/sales/salesQuotation/detail.vue | 54 ++++++++++++++++++++++--------------------------------
1 files changed, 22 insertions(+), 32 deletions(-)
diff --git a/src/pages/sales/salesQuotation/detail.vue b/src/pages/sales/salesQuotation/detail.vue
index a273974..45c3fd6 100644
--- a/src/pages/sales/salesQuotation/detail.vue
+++ b/src/pages/sales/salesQuotation/detail.vue
@@ -1,7 +1,7 @@
<template>
<view class="customer-detail-page">
- <PageHeader title="鎶ヤ环璇︽儏" @back="goBack" />
-
+ <PageHeader title="鎶ヤ环璇︽儏"
+ @back="goBack" />
<view class="detail-content">
<view class="section">
<view class="section-title">鍩虹淇℃伅</view>
@@ -44,24 +44,13 @@
</view>
</view>
</view>
-
- <view class="section">
- <view class="section-title">瀹℃壒鑺傜偣</view>
- <view v-if="approverNames.length" class="info-list">
- <view v-for="(name, index) in approverNames" :key="index" class="info-item">
- <text class="info-label">瀹℃壒鑺傜偣 {{ index + 1 }}</text>
- <text class="info-value">{{ name }}</text>
- </view>
- </view>
- <view v-else class="empty-box">
- <text>鏆傛棤瀹℃壒鑺傜偣</text>
- </view>
- </view>
-
<view class="section">
<view class="section-title">浜у搧鏄庣粏</view>
- <view v-if="detailData.products && detailData.products.length > 0" class="product-list">
- <view v-for="(item, index) in detailData.products" :key="index" class="product-card">
+ <view v-if="detailData.products && detailData.products.length > 0"
+ class="product-list">
+ <view v-for="(item, index) in detailData.products"
+ :key="index"
+ class="product-card">
<view class="product-head">浜у搧 {{ index + 1 }}</view>
<view class="info-item">
<text class="info-label">浜у搧鍚嶇О</text>
@@ -89,13 +78,16 @@
</view>
</view>
</view>
- <view v-else class="empty-box">
+ <view v-else
+ class="empty-box">
<text>鏆傛棤浜у搧鏄庣粏</text>
</view>
</view>
</view>
-
- <FooterButtons cancelText="杩斿洖" confirmText="缂栬緫" @cancel="goBack" @confirm="goEdit" />
+ <FooterButtons cancelText="杩斿洖"
+ confirmText="缂栬緫"
+ @cancel="goBack"
+ @confirm="goEdit" />
</view>
</template>
@@ -108,29 +100,27 @@
const quotationId = ref("");
const detailData = ref({});
- const approverNames = computed(() => {
- const approverText = detailData.value.approveUserNames || detailData.value.approverNames || detailData.value.approveUserIds || "";
- if (Array.isArray(approverText)) return approverText.filter(Boolean);
- return String(approverText)
- .split(",")
- .map(item => item.trim())
- .filter(Boolean);
- });
-
const goBack = () => {
uni.navigateBack();
};
const goEdit = () => {
if (!quotationId.value) return;
- uni.navigateTo({ url: `/pages/sales/salesQuotation/edit?id=${quotationId.value}` });
+ uni.navigateTo({
+ url: `/pages/sales/salesQuotation/edit?id=${quotationId.value}`,
+ });
};
const formatAmount = amount => `楼${Number(amount || 0).toFixed(2)}`;
const loadDetailFromStorage = () => {
const cachedData = uni.getStorageSync("salesQuotationDetail");
- detailData.value = cachedData || {};
+ if (cachedData && (cachedData.id === quotationId.value || cachedData.id === Number(quotationId.value))) {
+ detailData.value = cachedData;
+ } else {
+ detailData.value = cachedData || {};
+ console.warn("鏈壘鍒板搴旂殑鎶ヤ环鍗曠紦瀛樻暟鎹�");
+ }
};
onLoad(options => {
--
Gitblit v1.9.3