gaoluyang
4 天以前 025e46e11cb2962fd7692adfa401333758cc779b
src/pages/sales/receiptPayment/index.vue
@@ -1,5 +1,5 @@
<template>
   <view class="receipt-payment">
   <view class="sales-account">
      <!-- 使用通用页面头部组件 -->
      <PageHeader title="回款登记" @back="goBack" />
@@ -15,14 +15,14 @@
               />
            </view>
            <view class="filter-button" @click="getList">
               <u-icon name="search" size="24" color="#999"></u-icon>
               <up-icon name="search" size="24" color="#999"></up-icon>
            </view>
         </view>
         
         <!-- 筛选开关 -->
         <view class="switch-row">
            <text class="switch-label">不显示待回款为0</text>
            <u-switch v-model="searchForm.status" @change="getList" size="18"/>
            <up-switch v-model="searchForm.status" @change="getList" size="18"/>
         </view>
      </view>
@@ -35,12 +35,12 @@
               <view class="item-header">
                  <view class="item-left">
                     <view class="document-icon">
                        <u-icon name="file-text" size="16" color="#ffffff"></u-icon>
                        <up-icon name="file-text" size="16" color="#ffffff"></up-icon>
                     </view>
                     <text class="item-id">{{ item.salesContractNo }}</text>
                  </view>
               </view>
               <u-divider></u-divider>
               <up-divider></up-divider>
               <view class="item-details">
                  <view class="detail-row">
                     <text class="detail-label">客户名称</text>
@@ -82,7 +82,7 @@
               
               <!-- 操作按钮 -->
               <view class="action-buttons">
                  <u-button
                  <up-button
                     type="primary"
                     size="small"
                     class="action-btn"
@@ -90,7 +90,7 @@
                     @click="openForm(item)"
                  >
                     新增回款
                  </u-button>
                  </up-button>
               </view>
            </view>
         </view>
@@ -98,7 +98,7 @@
      <!-- 无数据提示 -->
      <view class="no-data" v-else>
         <text>暂无数据</text>
         <text>暂无回款数据</text>
      </view>
   </view>
</template>
@@ -109,7 +109,28 @@
   bindInvoiceNoRegPage,
} from '@/api/salesManagement/receiptPayment'
import useUserStore from '@/store/modules/user'
import { showToast } from 'vant'
// 显示提示信息
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";
// 响应式数据
@@ -143,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()
      })
}
@@ -174,7 +197,7 @@
   margin: 0 !important;
}
.receipt-payment {
.sales-account {
   min-height: 100vh;
   background: #f8f9fa;
   position: relative;