gaoluyang
2 天以前 35b0b44824aaeb6be31595f1d0a17380c90c1b89
src/pages/sales/receiptPaymentHistory/index.vue
@@ -1,14 +1,7 @@
<template>
   <view class="receipt-payment-history">
      <!-- 页面头部 -->
      <van-nav-bar
         title="回款历史"
         left-text="返回"
         left-arrow
         @click-left="goBack"
         fixed
         placeholder
      />
      <!-- 使用通用页面头部组件 -->
      <PageHeader title="回款历史" @back="goBack" />
      
      <!-- 搜索区域 -->
      <view class="search-section">
@@ -85,6 +78,18 @@
                        <text class="detail-value">{{ item.createTime }}</text>
                     </view>
                  </view>
                  <!-- 操作按钮 -->
                  <view class="action-buttons">
                     <van-button
                        type="primary"
                        size="small"
                        class="action-btn"
                        :disabled="item.registrant !== userStore.nickName"
                        @click="openForm(item)"
                     >
                        编辑回款
                     </van-button>
                  </view>
               </view>
            </view>
         </view>
@@ -99,6 +104,8 @@
import { ref, computed } from 'vue';
import { onShow } from '@dcloudio/uni-app';
import { receiptPaymentHistoryListPage } from "@/api/salesManagement/receiptPayment.js";
import useUserStore from "@/store/modules/user";
const userStore = useUserStore()
// 搜索表单
const searchForm = ref({
@@ -167,6 +174,11 @@
const formatAmount = (amount) => {
   return amount ? parseFloat(amount).toFixed(2) : '0.00';
};
// 打开编辑表单
const openForm = (item) => {
   uni.setStorageSync('invoiceLedgerEditRow', JSON.stringify(item))
   uni.navigateTo({ url: '/pages/sales/receiptPayment/edit' })
}
onShow(() => {
   // 页面显示时刷新列表
   getList();
@@ -254,7 +266,19 @@
   align-items: center;
   gap: 8px;
}
.action-buttons {
   display: flex;
   gap: 12px;
   padding: 12px 0 0 0;
   justify-content: space-between;
}
.action-btn {
   flex: 1;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
}
.document-icon {
   width: 24px;
   height: 24px;
@@ -273,7 +297,7 @@
.item-tag {
   border-radius: 4px;
   padding: 2px 8px;
   padding:  2px 8px;
}
.tag-electric {
@@ -289,7 +313,7 @@
}
.tag-text {
   font-size: 11px;
   font-size: 14px;
   color: #ffffff;
   font-weight: 500;
}