src/views/salesManagement/receiptPaymentHistory/index.vue
@@ -10,24 +10,6 @@
          :prefix-icon="Search"
        />
      </el-form-item>
      <el-form-item label="客户合同号">
        <el-input
          v-model="searchForm.customerContractNo"
          placeholder="输入客户合同号"
          @change="handleQuery"
          clearable
          :prefix-icon="Search"
        />
      </el-form-item>
      <el-form-item label="项目名称">
        <el-input
          v-model="searchForm.projectName"
          placeholder="输入项目名称"
          @change="handleQuery"
          clearable
          :prefix-icon="Search"
        />
      </el-form-item>
      <el-form-item label="回款日期">
        <el-date-picker
          v-model="searchForm.receiptPaymentDate"
@@ -80,11 +62,6 @@
    width:240
  },
  {
    label: "客户合同号",
    prop: "customerContractNo",
    width:240
  },
  {
    label: "回款日期",
    prop: "receiptPaymentDate",
    width:100
@@ -93,11 +70,6 @@
    label: "客户名称",
    prop: "customerName",
    width:240
  },
  {
    label: "项目名称",
    prop: "projectName",
    width:200
  },
  {
    label: "回款金额(元)",
@@ -149,8 +121,6 @@
  receiptPaymentDate: [],
  receiptPaymentDateStart: undefined,
  receiptPaymentDateEnd: undefined,
  customerContractNo: undefined,
  projectName: undefined,
});
const { receipt_payment_type } = proxy.useDict("receipt_payment_type");
const isShowSummarySon = ref(true);
@@ -168,7 +138,11 @@
const getList = () => {
  tableLoading.value = true;
  const { receiptPaymentDate, ...rest } = searchForm;
  receiptPaymentHistoryListPage({ ...rest, ...page }).then((res) => {
  // 将范围日期字段传递给后端
  const params = { ...rest, ...page };
  // 移除回款日期的默认值设置,只保留范围日期字段
  delete params.receiptPaymentDate;
  receiptPaymentHistoryListPage(params).then((res) => {
    tableLoading.value = false;
    tableData.value = res.records;
      page.total = res.total;
@@ -212,6 +186,12 @@
};
onMounted(() => {
  // 设置回款日期范围默认值为当天
  const today = dayjs().format('YYYY-MM-DD');
  searchForm.receiptPaymentDate = [today, today];
  // 设置范围日期字段的起始和结束时间
  searchForm.receiptPaymentDateStart = dayjs(today).format('YYYY-MM-DD 00:00:00');
  searchForm.receiptPaymentDateEnd = dayjs(today).format('YYYY-MM-DD 23:59:59');
  getList();
});
</script>