src/views/salesManagement/receiptPaymentLedger/index.vue
@@ -11,6 +11,15 @@
          clearable
          prefix-icon="Search"
        />
        <span class="search_title" style="margin-left: 10px">订单号:</span>
        <el-input
          v-model="orderNoSearch"
          style="width: 240px"
          placeholder="输入订单号搜索"
          @change="filterReceiptRecord"
          clearable
          prefix-icon="Search"
        />
        <el-button type="primary" @click="handleQuery" style="margin-left: 10px"
          >搜索</el-button
        >
@@ -38,23 +47,27 @@
            label="客户名称"
            prop="customerName"
            show-overflow-tooltip
                  width="200"
          />
          <el-table-column
            label="开票金额(元)"
            label="合同金额(元)"
            prop="invoiceTotal"
            show-overflow-tooltip
            :formatter="formattedNumber"
                  width="200"
          />
          <el-table-column
            label="回款金额(元)"
            prop="receiptPaymentAmount"
            show-overflow-tooltip
            :formatter="formattedNumber"
                  width="200"
          />
          <el-table-column
            label="应收金额(元)"
            prop="unReceiptPaymentAmount"
            show-overflow-tooltip
                  width="200"
          >
            <template #default="{ row, column }">
              <el-text type="danger">
@@ -89,48 +102,50 @@
          />
          <el-table-column
            label="发生日期"
            prop="happenTime"
            prop="receiptPaymentDate"
            show-overflow-tooltip
                  width="110"
          />
          <el-table-column
            label="开票金额(元)"
            prop="invoiceAmount"
            label="订单号"
            prop="salesContractNo"
            show-overflow-tooltip
                  width="200"
          />
          <el-table-column
            label="合同金额(元)"
            prop="invoiceTotal"
            show-overflow-tooltip
            :formatter="formattedNumber"
                  width="200"
          />
          <el-table-column
            label="回款金额(元)"
            prop="receiptAmount"
            prop="receiptPaymentAmount"
            show-overflow-tooltip
            :formatter="formattedNumber"
                  width="200"
          />
          <el-table-column
            label="应收金额(元)"
            prop="unReceiptAmount"
            prop="unReceiptPaymentAmount"
            show-overflow-tooltip
                  width="200"
          >
            <template #default="{ row, column }">
              <el-text type="danger">
                {{ formattedNumber(row, column, row.unReceiptAmount) }}
                {{ formattedNumber(row, column, row.unReceiptPaymentAmount) }}
              </el-text>
            </template>
          </el-table-column>
        </el-table>
        <pagination
          v-show="recordTotal > 0"
          :total="recordTotal"
          layout="total, sizes, prev, pager, next, jumper"
          :page="recordPage.current"
          :limit="recordPage.size"
          @pagination="recordPaginationChange"
        />
      </div>
    </div>
  </div>
</template>
<script setup>
import { ref } from "vue";
import {onMounted, ref} from "vue";
import { invoiceLedgerSalesAccount } from "../../../api/salesManagement/invoiceLedger.js";
import { customerInteractions } from "../../../api/salesManagement/receiptPayment.js";
import Pagination from "../../../components/PIMTable/Pagination.vue";
@@ -154,6 +169,7 @@
    invoiceDate: "",
  },
});
const orderNoSearch = ref("");
const customerId = ref("");
const { searchForm } = toRefs(data);
const originReceiptRecord = ref([]);
@@ -164,7 +180,6 @@
  getList();
};
const paginationChange = (obj) => {
  console.log("paginationChange", current, limit);
  page.current = obj.page;
  page.size = obj.limit;
  getList();
@@ -226,8 +241,8 @@
  console.log("param", param);
  customerInteractions(param).then((res) => {
    originReceiptRecord.value = res.data;
    handlePagination({ page: 1, limit: recordPage.size });
    recordTotal.value = res.data.length;
    recordPage.current = 1;
    filterReceiptRecord();
  });
};
@@ -244,14 +259,23 @@
const handlePagination = ({ page, limit }) => {
  recordPage.current = page;
  recordPage.size = limit;
  const start = (page - 1) * limit;
  const end = start + limit;
  receiptRecord.value = originReceiptRecord.value.slice(start, end);
  filterReceiptRecord();
};
getList();
// 根据订单号过滤右边表格数据
const filterReceiptRecord = () => {
  let filteredData = originReceiptRecord.value;
  if (orderNoSearch.value) {
    filteredData = originReceiptRecord.value.filter(item =>
      item.salesContractNo && item.salesContractNo.includes(orderNoSearch.value)
    );
  }
  receiptRecord.value = filteredData;
};
onMounted(() => {
   getList();
});
</script>
<style scoped lang="scss">