From d30a31e7c2a9acd08da8983e42e6fdf014707a04 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 26 九月 2025 15:39:47 +0800
Subject: [PATCH] 打包修改
---
src/pages/procurementManagement/paymentLedger/detail.vue | 36 ++++++++++++++++++++++++------------
1 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/src/pages/procurementManagement/paymentLedger/detail.vue b/src/pages/procurementManagement/paymentLedger/detail.vue
index 13fd49e..915ee5d 100644
--- a/src/pages/procurementManagement/paymentLedger/detail.vue
+++ b/src/pages/procurementManagement/paymentLedger/detail.vue
@@ -1,7 +1,7 @@
<template>
<view class="receipt-payment-detail">
<!-- 浣跨敤閫氱敤椤甸潰澶撮儴缁勪欢 -->
- <PageHeader title="瀹㈡埛寰�鏉ヨ鎯�" @back="goBack" />
+ <PageHeader title="渚涘簲鍟嗗線鏉ヨ鎯�" @back="goBack" />
<!-- 缁熻淇℃伅 -->
<view class="summary-info" v-if="tableData.length > 0">
@@ -61,7 +61,7 @@
<script setup>
import { ref, computed, onMounted } from 'vue';
import { onShow } from '@dcloudio/uni-app';
-import {paymentLedgerList} from "@/api/procurementManagement/paymentLedger";
+import {paymentLedgerList, paymentRecordList} from "@/api/procurementManagement/paymentLedger";
// 瀹㈡埛淇℃伅
const supplierId = ref('');
@@ -89,17 +89,16 @@
// 杩斿洖涓婁竴椤�
const goBack = () => {
+ uni.removeStorageSync('supplierId')
uni.navigateBack();
};
// 鑾峰彇椤甸潰鍙傛暟
const getPageParams = () => {
- const pages = getCurrentPages();
- const currentPage = pages[pages.length - 1];
- const options = currentPage.options;
-
- if (options.supplierId) {
- supplierId.value = options.supplierId;
+ // 浠庢湰鍦板瓨鍌ㄨ幏鍙栦緵搴斿晢ID
+ const storedSupplierId = uni.getStorageSync('supplierId');
+ if (storedSupplierId) {
+ supplierId.value = storedSupplierId;
}
};
@@ -112,12 +111,12 @@
});
return;
}
- const param = {
- supplierId: supplierId.value,
- };
- paymentLedgerList(param).then((res) => {
+ showLoadingToast('鍔犺浇涓�...')
+ paymentRecordList(supplierId.value).then((res) => {
tableData.value = res.data;
+ closeToast()
}).catch(() => {
+ closeToast()
uni.showToast({
title: '鏌ヨ澶辫触',
icon: 'error'
@@ -130,6 +129,19 @@
return amount ? parseFloat(amount).toFixed(2) : '0.00';
};
+// 鏄剧ず鍔犺浇鎻愮ず
+const showLoadingToast = (message) => {
+ uni.showLoading({
+ title: message,
+ mask: true
+ });
+};
+
+// 鍏抽棴鎻愮ず
+const closeToast = () => {
+ uni.hideLoading();
+};
+
onMounted(() => {
// 椤甸潰鍔犺浇鏃惰幏鍙栧弬鏁板苟鍒锋柊鍒楄〃
getPageParams();
--
Gitblit v1.9.3