| | |
| | | <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> |
| | |
| | | </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> |
| | |
| | | </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> |
| | | |
| | |
| | | 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 => { |