1
huangxiaoqiang
2025-11-21 97a9ad53c6d1ac097f46f0b5d4d4d53547c9efe4
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/extend/printView.vue
@@ -1,12 +1,6 @@
<template>
  <div>
    <vol-box
      v-model="showDetialBox"
      :lazy="true"
      width="500px"
      :padding="15"
      title="打印"
    >
    <vol-box v-model="showDetialBox" :lazy="true" width="500px" :padding="15" title="打印">
      <!-- æ‰“印专用容器 -->
      <div id="printContainer" style="display:none">
        <div style="text-align:center;margin-bottom:15px">
@@ -29,9 +23,7 @@
      <template #footer>
        <el-button type="primary" size="small" @click="print">打印</el-button>
        <el-button type="danger" size="small" @click="showDetialBox = false"
          >关闭</el-button
        >
        <el-button type="danger" size="small" @click="showDetialBox = false">关闭</el-button>
      </template>
    </vol-box>
  </div>
@@ -59,7 +51,7 @@
    async print() {
      // åˆ›å»ºæ‰“印窗口
      const printWindow = window.open("", "打印", "width=1200,height=800");
      // æž„建打印内容
      const printContent = `
        <html>
@@ -77,15 +69,15 @@
        </body>
        </html>
      `;
      printWindow.document.write(printContent);
      printWindow.document.close();
      // å»¶è¿Ÿç¡®ä¿å†…容加载完成
      setTimeout(() => {
        printWindow.focus();
        printWindow.print();
        // æ‰“印完成后关闭窗口并更新状态
        printWindow.onafterprint = () => {
          this.updatePrintStatus();
@@ -100,7 +92,7 @@
          { printCode: this.palletCode },
          { loadingText: "数据处理中" }
        );
        if (response.status) {
          this.$message.success("操作成功");
          this.$parent.refresh();