huminmin
2026-04-22 579f45bde022582eaf57c0afb13951124db77fa7
导出销售台账送货单
已修改1个文件
39 ■■■■ 文件已修改
src/views/salesManagement/salesLedger/index.vue 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/salesLedger/index.vue
@@ -34,6 +34,7 @@
                    <el-button @click="handleOut">导出</el-button>
                    <el-button type="danger" plain @click="handleDelete">删除</el-button>
                    <el-button type="primary" plain @click="handlePrint">打印</el-button>
                    <el-button type="primary" plain @click="handleExport">导出送货单</el-button>
                </div>
            </div>
            <el-table :data="tableData" border v-loading="tableLoading" @selection-change="handleSelectionChange"
@@ -658,15 +659,15 @@
import FormDialog from '@/components/Dialog/FormDialog.vue';
import { getQuotationList } from "@/api/salesManagement/salesQuotation.js";
import {
    ledgerListPage,
    productList,
    customerList,
    addOrUpdateSalesLedger,
    getSalesLedgerWithProducts,
    delLedger,
    addOrUpdateSalesLedgerProduct,
    delProduct,
    delLedgerFile, getProductInventory,
  ledgerListPage,
  productList,
  customerList,
  addOrUpdateSalesLedger,
  getSalesLedgerWithProducts,
  delLedger,
  addOrUpdateSalesLedgerProduct,
  delProduct,
  delLedgerFile, getProductInventory,
} from "@/api/salesManagement/salesLedger.js";
import { modelList, productTreeList } from "@/api/basicData/product.js";
import useFormData from "@/hooks/useFormData.js";
@@ -1471,6 +1472,26 @@
        });
};
const handleExport = () => {
  if (selectedRows.value.length === 0) {
    proxy.$modal.msgWarning("请选择要导出送货单的数据");
    return;
  }
  ElMessageBox.confirm("选中的内容将被导出,是否确认导出?", "导出", {
    confirmButtonText: "确认",
    cancelButtonText: "取消",
    type: "warning",
  })
      .then(() => {
        console.log(selectedRows.value.map((item) => item.id))
        proxy.download("/sales/ledger/exportShippingNote", {ids: selectedRows.value.map((item) => item.id).join(",")}, "送货单.zip");
      })
      .catch(() => {
        proxy.$modal.msg("已取消");
      });
}
// 打印功能
const handlePrint = async () => {
    if (selectedRows.value.length === 0) {