gaoluyang
2025-12-11 c4e7a4be56f5fa865843574b6f0ad91f1861f1b9
src/views/salesManagement/invoiceLedger/index.vue
@@ -33,7 +33,7 @@
        <el-table-column label="销售合同号" prop="salesContractNo" show-overflow-tooltip width="180" />
        <el-table-column label="客户合同号" prop="customerContractNo" show-overflow-tooltip width="180" />
        <el-table-column label="客户名称" prop="customerName" show-overflow-tooltip width="240" />
        <el-table-column label="项目" prop="projectName" width="320" />
        <!-- <el-table-column label="项目" prop="projectName" width="320" /> -->
        <el-table-column label="产品大类" prop="productCategory" width="200" />
        <el-table-column label="规格型号" prop="specificationModel" width="160" show-overflow-tooltip />
        <el-table-column label="发票号" prop="invoiceNo" width="200" show-overflow-tooltip />
@@ -245,7 +245,11 @@
const getList = () => {
  tableLoading.value = true;
  const { invoiceDate, ...rest } = searchForm;
  registrationProductPage({ ...rest, ...page }).then((res) => {
  // 将范围日期字段传递给后端
  const params = { ...rest, ...page };
  // 移除开票日期的默认值设置,只保留范围日期字段
  delete params.invoiceDate;
  registrationProductPage(params).then((res) => {
    tableLoading.value = false;
    tableData.value = res.data.records;
    total.value = res.data.total;
@@ -274,11 +278,9 @@
    fileList.value = res.data.fileList;
    if (!form.value.invoicePerson) {
      form.value.invoicePerson = userStore.nickName;
      form.value.entryDate = getCurrentDate();
      // 移除录入日期默认值设置,只处理范围日期字段
    }
    if (!form.value.invoiceDate) {
      form.value.invoiceDate = getCurrentDate();
    }
    // 移除开票日期默认值设置,只处理范围日期字段
  });
  dialogFormVisible.value = true;
};
@@ -434,6 +436,12 @@
};
onMounted(() => {
  // 设置开票日期范围默认值为当天
  const today = dayjs().format('YYYY-MM-DD');
  searchForm.invoiceDate = [today, today];
  // 设置范围日期字段的起始和结束时间
  searchForm.invoiceDateStart = today;
  searchForm.invoiceDateEnd = today;
  getList();
});
</script>