| | |
| | | <text class="summary-value">{{ tableData.length }}</text> |
| | | </view> |
| | | <view class="summary-item"> |
| | | <text class="summary-label">开票总金额</text> |
| | | <text class="summary-value">{{ formatAmount(invoiceTotal) }}</text> |
| | | <text class="summary-label">合同总金额</text> |
| | | <text class="summary-value">{{ formatAmount(contractTotal) }}</text> |
| | | </view> |
| | | <view class="summary-item"> |
| | | <text class="summary-label">回款总金额</text> |
| | | <text class="summary-value highlight">{{ formatAmount(receiptTotal) }}</text> |
| | | <text class="summary-label">已出库总金额</text> |
| | | <text class="summary-value highlight">{{ formatAmount(shippedTotal) }}</text> |
| | | </view> |
| | | <view class="summary-item"> |
| | | <text class="summary-label">应收总金额</text> |
| | | <text class="summary-value danger">{{ formatAmount(unReceiptTotal) }}</text> |
| | | <text class="summary-label">未出库总金额</text> |
| | | <text class="summary-value danger">{{ formatAmount(unshippedTotal) }}</text> |
| | | </view> |
| | | </view> |
| | | <!-- 回款记录明细列表 --> |
| | |
| | | size="16" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="item-index">{{ index + 1 }}</text> |
| | | <text class="item-index">{{ item.salesContractNo || index + 1 }}</text> |
| | | </view> |
| | | <view class="item-date">{{ item.happenTime }}</view> |
| | | <view class="item-date">{{ item.executionDate || '-' }}</view> |
| | | </view> |
| | | <up-divider></up-divider> |
| | | <view class="item-details"> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">开票金额(元)</text> |
| | | <text class="detail-value">{{ formatAmount(item.invoiceTotal) }}</text> |
| | | <text class="detail-label">合同金额(元)</text> |
| | | <text class="detail-value">{{ formatAmount(item.contractAmount) }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">回款金额(元)</text> |
| | | <text class="detail-value highlight">{{ formatAmount(item.receiptPaymentAmount) }}</text> |
| | | <text class="detail-label">已出库金额(元)</text> |
| | | <text class="detail-value highlight">{{ formatAmount(item.shippedAmount) }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">应收金额(元)</text> |
| | | <text class="detail-value danger">{{ formatAmount(item.unReceiptPaymentAmount) }}</text> |
| | | <text class="detail-label">未出库金额(元)</text> |
| | | <text class="detail-value danger">{{ formatAmount(item.unshippedAmount) }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">发生日期</text> |
| | | <text class="detail-value">{{ item.receiptPaymentDate }}</text> |
| | | <text class="detail-label">销售合同号</text> |
| | | <text class="detail-value">{{ item.salesContractNo || '-' }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <script setup> |
| | | import { ref, computed, onMounted } from "vue"; |
| | | import { onShow } from "@dcloudio/uni-app"; |
| | | import { customerInteractions } from "@/api/salesManagement/receiptPayment.js"; |
| | | import { customewTransactionsDetails } from "@/api/salesManagement/receiptPayment.js"; |
| | | |
| | | // 客户信息 |
| | | const customerId = ref(""); |
| | |
| | | // 表格数据 |
| | | const tableData = ref([]); |
| | | |
| | | const invoiceTotal = computed(() => { |
| | | const contractTotal = computed(() => { |
| | | return tableData.value.reduce((sum, item) => { |
| | | return sum + (parseFloat(item.invoiceTotal) || 0); |
| | | return sum + (parseFloat(item.contractAmount) || 0); |
| | | }, 0); |
| | | }); |
| | | |
| | | const receiptTotal = computed(() => { |
| | | const shippedTotal = computed(() => { |
| | | return tableData.value.reduce((sum, item) => { |
| | | return sum + (parseFloat(item.receiptPaymentAmount) || 0); |
| | | return sum + (parseFloat(item.shippedAmount) || 0); |
| | | }, 0); |
| | | }); |
| | | |
| | | const unReceiptTotal = computed(() => { |
| | | const unshippedTotal = computed(() => { |
| | | return tableData.value.reduce((sum, item) => { |
| | | return sum + (parseFloat(item.unReceiptPaymentAmount) || 0); |
| | | return sum + (parseFloat(item.unshippedAmount) || 0); |
| | | }, 0); |
| | | }); |
| | | |
| | |
| | | showLoadingToast("加载中..."); |
| | | const param = { |
| | | customerId: customerId.value, |
| | | current: -1, |
| | | size: -1, |
| | | current: 1, |
| | | size: 100, |
| | | }; |
| | | |
| | | customerInteractions(param) |
| | | customewTransactionsDetails(param) |
| | | .then(res => { |
| | | tableData.value = res.data; |
| | | const data = res?.data; |
| | | if (Array.isArray(data)) { |
| | | tableData.value = data; |
| | | } else { |
| | | tableData.value = data?.records || res?.records || []; |
| | | } |
| | | closeToast(); |
| | | }) |
| | | .catch(() => { |