From f670b79094c95d791fc43c8fc8b5858ebf8426dc Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期四, 17 九月 2026 13:50:29 +0800
Subject: [PATCH] 一些向web对齐
---
src/pages/procurementManagement/paymentLedger/detail.vue | 75 +++++++++++++++++++++++--------------
1 files changed, 46 insertions(+), 29 deletions(-)
diff --git a/src/pages/procurementManagement/paymentLedger/detail.vue b/src/pages/procurementManagement/paymentLedger/detail.vue
index 26f5cf5..bd83734 100644
--- a/src/pages/procurementManagement/paymentLedger/detail.vue
+++ b/src/pages/procurementManagement/paymentLedger/detail.vue
@@ -11,16 +11,20 @@
<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(paymentTotal) }}</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">{{ formatAmount(returnTotal) }}</text>
+ </view>
+ <view class="summary-item">
+ <text class="summary-label">搴斾粯鎬婚噾棰�</text>
+ <text class="summary-value danger">{{ formatAmount(payableTotal) }}</text>
</view>
</view>
<!-- 鍥炴璁板綍鏄庣粏鍒楄〃 -->
@@ -38,32 +42,36 @@
</view>
<text class="item-index">{{ 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.invoiceAmount) }}</text>
+ <text class="detail-label">閲囪喘鍚堝悓鍙�</text>
+ <text class="detail-value">{{ item.purchaseContractNumber || '-' }}</text>
+ </view>
+ <view class="detail-row">
+ <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.currentPaymentAmount) }}</text>
+ <text class="detail-value highlight">{{ formatAmount(item.paymentAmount) }}</text>
+ </view>
+ <view class="detail-row">
+ <text class="detail-label">閫�璐ч噾棰�(鍏�)</text>
+ <text class="detail-value">{{ formatAmount(item.returnAmount) }}</text>
</view>
<view class="detail-row">
<text class="detail-label">搴斾粯閲戦(鍏�)</text>
<text class="detail-value danger">{{ formatAmount(item.payableAmount) }}</text>
- </view>
- <view class="detail-row">
- <text class="detail-label">鍙戠敓鏃ユ湡</text>
- <text class="detail-value">{{ item.paymentDate }}</text>
</view>
</view>
</view>
</view>
<view v-else
class="no-data">
- <text>鏆傛棤鍥炴璁板綍</text>
+ <text>鏆傛棤浠樻璁板綍</text>
</view>
</view>
</template>
@@ -71,32 +79,35 @@
<script setup>
import { ref, computed, onMounted } from "vue";
import { onShow } from "@dcloudio/uni-app";
- import {
- paymentLedgerList,
- paymentRecordList,
- } from "@/api/procurementManagement/paymentLedger";
+ import { paymentRecordList } from "@/api/procurementManagement/paymentLedger";
- // 瀹㈡埛淇℃伅
+ // 渚涘簲鍟嗕俊鎭�
const supplierId = ref("");
// 琛ㄦ牸鏁版嵁
const tableData = ref([]);
- const invoiceTotal = computed(() => {
+ const contractTotal = computed(() => {
return tableData.value.reduce((sum, item) => {
- return sum + (parseFloat(item.invoiceAmount) || 0);
+ return sum + (parseFloat(item.contractAmount) || 0);
}, 0);
});
- const receiptTotal = computed(() => {
+ const paymentTotal = computed(() => {
return tableData.value.reduce((sum, item) => {
- return sum + (parseFloat(item.receiptAmount) || 0);
+ return sum + (parseFloat(item.paymentAmount) || 0);
}, 0);
});
- const unReceiptTotal = computed(() => {
+ const returnTotal = computed(() => {
return tableData.value.reduce((sum, item) => {
- return sum + (parseFloat(item.unReceiptAmount) || 0);
+ return sum + (parseFloat(item.returnAmount) || 0);
+ }, 0);
+ });
+
+ const payableTotal = computed(() => {
+ return tableData.value.reduce((sum, item) => {
+ return sum + (parseFloat(item.payableAmount) || 0);
}, 0);
});
@@ -119,15 +130,21 @@
const getList = () => {
if (!supplierId.value) {
uni.showToast({
- title: "瀹㈡埛淇℃伅缂哄け",
+ title: "渚涘簲鍟嗕俊鎭己澶�",
icon: "error",
});
return;
}
showLoadingToast("鍔犺浇涓�...");
- paymentRecordList({ supplierId: supplierId.value })
+ paymentRecordList({
+ supplierId: supplierId.value,
+ current: -1,
+ size: -1,
+ })
.then(res => {
- tableData.value = res.data;
+ // 鏄庣粏鎺ュ彛鍙兘杩斿洖鏁扮粍鎴栧垎椤靛璞★紙涓� Web 澶勭悊涓�鑷达級
+ const data = res?.data;
+ tableData.value = Array.isArray(data) ? data : data?.records || [];
closeToast();
})
.catch(() => {
--
Gitblit v1.9.3