zhangwencui
9 小时以前 b5be6d85c9927a378abca172ea6bef2933657f8e
src/pages/sales/receiptPaymentLedger/index.vue
@@ -9,7 +9,7 @@
        <view class="search-input">
          <up-input class="search-text"
                    placeholder="请输入客户名称"
                    v-model="searchForm.searchText"
                    v-model="searchForm.customerName"
                    @change="searchChange"
                    clearable />
        </view>
@@ -47,16 +47,16 @@
          <up-divider></up-divider>
          <view class="item-details">
            <view class="detail-row">
              <text class="detail-label">开票金额(元)</text>
              <text class="detail-value">{{ formattedNumber(item.invoiceTotal) }}</text>
              <text class="detail-label">合同金额(元)</text>
              <text class="detail-value">{{ formattedNumber(item.contractAmounts) }}</text>
            </view>
            <view class="detail-row">
              <text class="detail-label">回款金额(元)</text>
              <text class="detail-value">{{ formattedNumber(item.receiptPaymentAmount) }}</text>
              <text class="detail-label">已出库金额(元)</text>
              <text class="detail-value">{{ formattedNumber(item.shippedAmount) }}</text>
            </view>
            <view class="detail-row">
              <text class="detail-label">应收金额(元)</text>
              <text class="detail-value highlight danger">{{ formattedNumber(item.unReceiptPaymentAmount) }}</text>
              <text class="detail-label">未出库金额(元)</text>
              <text class="detail-value highlight danger">{{ formattedNumber(item.unshippedAmount) }}</text>
            </view>
          </view>
        </view>
@@ -72,19 +72,18 @@
<script setup>
  import { onMounted, ref, reactive, toRefs } from "vue";
  import { onShow } from "@dcloudio/uni-app";
  import { invoiceLedgerSalesAccount } from "@/api/salesManagement/invoiceLedger";
  import { customewTransactions } from "@/api/salesManagement/receiptPayment.js";
  const tableData = ref([]);
  const page = reactive({
    current: -1,
    size: -1,
    current: 1,
    size: 100,
  });
  const data = reactive({
    searchForm: {
      searchText: "",
      invoiceDate: "",
      customerName: "",
    },
  });
@@ -96,7 +95,7 @@
  };
  // 搜索框变化时触发
  const searchChange = val => {
    searchForm.value.searchText = val;
    searchForm.value.customerName = val;
    getList();
  };
  // 查询列表
@@ -106,9 +105,9 @@
  const getList = () => {
    showLoadingToast("加载中...");
    invoiceLedgerSalesAccount({ ...searchForm.value, ...page })
    customewTransactions({ ...searchForm.value, ...page })
      .then(res => {
        tableData.value = res.data.records;
        tableData.value = res?.data?.records || res?.data || res?.records || [];
        closeToast();
      })
      .catch(() => {
@@ -139,7 +138,7 @@
  const rowClickMethod = row => {
    // 使用 uni.setStorageSync 存储客户信息
    uni.setStorageSync("customerId", row.id);
    uni.setStorageSync("customerId", row.customerId);
    // 跳转到回款记录明细页面
    uni.navigateTo({
      url: "/pages/sales/receiptPaymentLedger/detail",
@@ -164,4 +163,4 @@
    color: #ff4757; // 与公共样式中的 #ee0a24 不同
    font-weight: 500;
  }
</style>
</style>