zuozhengqing
2023-11-22 281bba56ec02dca2c5c56bc72edd0d6e66fbde0a
src/views/overview/AddOverviewDialog.vue
@@ -10,7 +10,7 @@
      <div slot="title" class="dialog-header">
        <span>{{ editCommonConfig.title === "查看" ? editCommonConfig.title : editCommonConfig.title + addName }}</span>
        <div class="header_btns">
          <span class="btn">
          <span class="btn" @click="btnPrint">
            <i class="el-icon-printer"></i>
            <span>打印</span>
          </span>
@@ -315,7 +315,8 @@
  stateCancel,
  deleteOperation,
  getListTransfer,
  getLogisticCompanyList
  getLogisticCompanyList,
  printReceipts
} from "@/api/overview/overview"
import { getCompanyList } from "@/api/common/other"
export default {
@@ -807,6 +808,19 @@
        })
      }).catch(() => {         
      });
    },
    //打印
    async btnPrint(){
      await printReceipts(this.editCommonConfig.infomation.id).then((res) => {
        console.log(res)
        if (res.code === 200) {
          this.$message.success("打印成功")
          const link = document.createElement('a');
          link.href = res.data;
          link.download = '出库单.xlsx';
          link.click();
        }
      })
    }
  }
}
@@ -823,6 +837,9 @@
    margin-left: auto;
    margin-right: 60px;
    .btn {
      cursor: pointer;
    }
    .btn:nth-of-type(2){
      cursor: no-drop;
    }
  }