gaoluyang
3 天以前 ee42bf1badae06026efa79dc17d2a541297ab49b
src/pages/sales/receiptPaymentLedger/detail.vue
@@ -89,17 +89,16 @@
// 返回上一页
const goBack = () => {
   uni.removeStorageSync('customerId')
   uni.navigateBack();
};
// 获取页面参数
const getPageParams = () => {
   const pages = getCurrentPages();
   const currentPage = pages[pages.length - 1];
   const options = currentPage.options;
   if (options.customerId) {
      customerId.value = options.customerId;
   // 从本地存储获取客户ID
   const storedCustomerId = uni.getStorageSync('customerId');
   if (storedCustomerId) {
      customerId.value = storedCustomerId;
   }
};
@@ -113,13 +112,18 @@
      return;
   }
   
   showLoadingToast('加载中...')
   const param = {
      customerId: customerId.value,
      current: -1,
      size: -1
   };
   
   customerInteractions(param).then((res) => {
      tableData.value = res.data;
      closeToast()
   }).catch(() => {
      closeToast()
      uni.showToast({
         title: '查询失败',
         icon: 'error'
@@ -132,6 +136,19 @@
   return amount ? parseFloat(amount).toFixed(2) : '0.00';
};
// 显示加载提示
const showLoadingToast = (message) => {
   uni.showLoading({
      title: message,
      mask: true
   });
};
// 关闭提示
const closeToast = () => {
   uni.hideLoading();
};
onShow(() => {
   // 页面显示时获取参数并刷新列表
   getPageParams();