src/views/salesManagement/invoiceLedger/index.vue
@@ -15,19 +15,23 @@
          <el-date-picker style="width: 100%" v-model="searchForm.createTimeStart" value-format="YYYY-MM-DD HH:mm:ss"
            format="YYYY-MM-DD" type="date" placeholder="请选择" clearable @change="handleQuery" />
        </el-form-item>
      <el-form-item label="发票金额">
        <el-input v-model="searchForm.invoiceAmountStart" style="width: 110px" placeholder="最小" clearable @change="handleQuery" />
        <span style="margin: 0 6px">-</span>
        <el-input v-model="searchForm.invoiceAmountEnd" style="width: 110px" placeholder="最大" clearable @change="handleQuery" />
      </el-form-item>
        <el-form-item label="不显示有发票行">
          <el-checkbox v-model="searchForm.status" @change="handleQuery" />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="handleQuery"> 搜索 </el-button>
          <el-button @click="resetForm"> 重置 </el-button>
          <el-button @click="handleOut" type="primary">导出</el-button>
        </el-form-item>
      </el-form>
    </div>
    <div class="table_list">
      <el-table :data="tableData" border v-loading="tableLoading" @selection-change="handleSelectionChange"
        :row-key="(row) => row.id" show-summary :summary-method="summarizeMainTable" height="calc(100vh - 18.5em)">
        :row-key="(row) => row.id" show-summary :summary-method="summarizeMainTable" height="calc(100vh - 18.5em)" stripe>
        <el-table-column align="center" type="selection" width="55" />
        <el-table-column align="center" label="序号" type="index" width="60" />
        <el-table-column label="销售合同号" prop="salesContractNo" show-overflow-tooltip width="180" />
@@ -192,6 +196,8 @@
    invoiceDateStart: dayjs().startOf("month").format("YYYY-MM-DD"),
    invoiceDateEnd: dayjs().endOf("month").format("YYYY-MM-DD"),
    createTimeStart: "", // 录入日期
    invoiceAmountStart: undefined,
    invoiceAmountEnd: undefined,
  },
  form: {
    salesLedgerId: "",
@@ -296,8 +302,8 @@
function handleBeforeUpload(file) {
  console.log("file", file);
  // 校检文件大小
  if (file.size > 1024 * 1024 * 10) {
    proxy.$modal.msgError("上传文件大小不能超过10MB!");
  if (file.size > 1024 * 1024 * 50) {
    proxy.$modal.msgError("上传文件大小不能超过50MB!");
    return false;
  }
  // 判断文件格式是否符合
@@ -351,21 +357,6 @@
  proxy.resetForm("formRef");
  dialogFormVisible.value = false;
};
// 导出
const handleOut = () => {
  ElMessageBox.confirm("选中的内容将被导出,是否确认导出?", "导出", {
    confirmButtonText: "确认",
    cancelButtonText: "取消",
    type: "warning",
  })
    .then(() => {
      proxy.download("/invoiceLedger/export", {}, "开票台账.xlsx");
    })
    .catch(() => {
      proxy.$modal.msg("已取消");
    });
};
// 打开附件上传弹窗
const handleDownload = (val) => {
  fileList.value = [];