gaoluyang
2 天以前 025e46e11cb2962fd7692adfa401333758cc779b
src/pages/sales/receiptPayment/index.vue
@@ -1,5 +1,5 @@
<template>
   <view class="receipt-payment">
   <view class="sales-account">
      <!-- 使用通用页面头部组件 -->
      <PageHeader title="回款登记" @back="goBack" />
@@ -22,7 +22,7 @@
         <!-- 筛选开关 -->
         <view class="switch-row">
            <text class="switch-label">不显示待回款为0</text>
            <van-switch v-model="searchForm.status" @change="getList" size="18"/>
            <up-switch v-model="searchForm.status" @change="getList" size="18"/>
         </view>
      </view>
@@ -82,7 +82,7 @@
               
               <!-- 操作按钮 -->
               <view class="action-buttons">
                  <van-button
                  <up-button
                     type="primary"
                     size="small"
                     class="action-btn"
@@ -90,7 +90,7 @@
                     @click="openForm(item)"
                  >
                     新增回款
                  </van-button>
                  </up-button>
               </view>
            </view>
         </view>
@@ -109,12 +109,28 @@
   bindInvoiceNoRegPage,
} from '@/api/salesManagement/receiptPayment'
import useUserStore from '@/store/modules/user'
// 显示提示信息
const showToast = (message) => {
   uni.showToast({
      title: message,
      icon: 'none'
   })
}
// 显示加载提示
const showLoadingToast = (message) => {
   uni.showLoading({
      title: message,
      mask: true
   });
};
// 关闭加载提示
const closeToast = () => {
   uni.hideLoading();
};
import {onShow} from "@dcloudio/uni-app";
// 响应式数据
@@ -148,14 +164,16 @@
// 获取列表数据
const getList = () => {
   tableLoading.value = true
   showLoadingToast('加载中...')
   bindInvoiceNoRegPage({ ...searchForm.value, ...page.value })
      .then((res) => {
         tableLoading.value = false
         tableData.value = res.data.records || []
      })
      .catch(() => {
         tableLoading.value = false
         showToast('获取数据失败')
      })
      .finally(() => {
         closeToast()
      })
}
@@ -179,7 +197,7 @@
   margin: 0 !important;
}
.receipt-payment {
.sales-account {
   min-height: 100vh;
   background: #f8f9fa;
   position: relative;