diff --git a/klp-ui/src/api/wms/coil.js b/klp-ui/src/api/wms/coil.js index 0b80eeff..0afc1959 100644 --- a/klp-ui/src/api/wms/coil.js +++ b/klp-ui/src/api/wms/coil.js @@ -163,4 +163,15 @@ export function listCoilOperation({coilIds, planId}) { pageSize: 1000 } }) +} + +// 钢卷导出 +export function exportCoilData(coilIds) { + return request({ + url: '/wms/materialCoil/export', + method: 'post', + data: { + coilIds + } + }) } \ No newline at end of file diff --git a/klp-ui/src/views/wms/coil/panels/LabelRender/ProductionTagPreview.vue b/klp-ui/src/views/wms/coil/panels/LabelRender/ProductionTagPreview.vue index 2cd4e0bb..162f61fb 100644 --- a/klp-ui/src/views/wms/coil/panels/LabelRender/ProductionTagPreview.vue +++ b/klp-ui/src/views/wms/coil/panels/LabelRender/ProductionTagPreview.vue @@ -4,13 +4,13 @@ -
@@ -137,11 +137,11 @@ export default { // 使用 matchMedia 监听打印状态(更可靠) this.printMediaQuery = window.matchMedia('print'); this.printMediaQuery.addListener(this.handlePrintMediaChange); - + // 监听打印事件作为备用 window.addEventListener('beforeprint', this.handleBeforePrint); window.addEventListener('afterprint', this.handleAfterPrint); - + // 计算初始缩放比例 this.$nextTick(() => { this.calculatePrintScale(); @@ -177,41 +177,41 @@ export default { this.$nextTick(() => { const container = this.$el; if (!container) return; - + // 纸张尺寸:180mm x 100mm const dpi = 96; // 标准 DPI const mmToPx = dpi / 25.4; // 1mm = 3.779527559px - + const paperWidthMm = this.paperWidthMm || 100; const paperHeightMm = this.paperHeightMm || 80; const marginMm = 2; - + const paperWidthPx = paperWidthMm * mmToPx; const paperHeightPx = paperHeightMm * mmToPx; const marginPx = marginMm * mmToPx; - + // 获取内容实际尺寸 const rect = container.getBoundingClientRect(); let contentWidth = rect.width; let contentHeight = rect.height; - + // 如果尺寸为0或无效,尝试使用 scrollWidth/scrollHeight if (contentWidth === 0 || contentHeight === 0) { contentWidth = container.scrollWidth || contentWidth; contentHeight = container.scrollHeight || contentHeight; } - + // 计算可用空间(减去边距) const availableWidth = paperWidthPx - marginPx * 2; const availableHeight = paperHeightPx - marginPx * 2; - + // 计算缩放比例 const scaleX = contentWidth > 0 ? availableWidth / contentWidth : 1; const scaleY = contentHeight > 0 ? availableHeight / contentHeight : 1; - + // 取较小的缩放比例,确保内容完全适配(不超过1,不放大) this.printScale = Math.min(scaleX, scaleY, 1); - + // 设置CSS变量和内联样式 container.style.setProperty('--print-scale', this.printScale); container.style.setProperty('--paper-width', `${paperWidthMm}mm`); @@ -320,15 +320,15 @@ export default { break-before: avoid !important; orphans: 999 !important; widows: 999 !important; - + /* 应用动态缩放,保持原有样式 */ transform: scale(var(--print-scale, 1)) !important; transform-origin: top left !important; - + /* 确保缩放后不超出纸张 */ max-width: var(--paper-width, 100mm) !important; max-height: var(--paper-height, 80mm) !important; overflow: hidden !important; } } - \ No newline at end of file + diff --git a/klp-ui/src/views/wms/coil/panels/base.vue b/klp-ui/src/views/wms/coil/panels/base.vue index e34a3455..6f68832a 100644 --- a/klp-ui/src/views/wms/coil/panels/base.vue +++ b/klp-ui/src/views/wms/coil/panels/base.vue @@ -278,8 +278,6 @@ import MutiSelect from "@/components/MutiSelect"; import html2canvas from 'html2canvas'; import { PDFDocument } from 'pdf-lib'; - - export default { name: "MaterialCoil", components: { diff --git a/klp-ui/src/views/wms/coil/split.vue b/klp-ui/src/views/wms/coil/split.vue index 997ee41b..d1bf06d7 100644 --- a/klp-ui/src/views/wms/coil/split.vue +++ b/klp-ui/src/views/wms/coil/split.vue @@ -199,6 +199,9 @@ + + +
diff --git a/klp-ui/src/views/wms/report/delivery.vue b/klp-ui/src/views/wms/report/delivery.vue new file mode 100644 index 00000000..0131fca0 --- /dev/null +++ b/klp-ui/src/views/wms/report/delivery.vue @@ -0,0 +1,114 @@ + + + + + diff --git a/klp-ui/src/views/wms/report/receive.vue b/klp-ui/src/views/wms/report/receive.vue new file mode 100644 index 00000000..28bb1daa --- /dev/null +++ b/klp-ui/src/views/wms/report/receive.vue @@ -0,0 +1,136 @@ + + + + + diff --git a/klp-ui/src/views/wms/report/zha.vue b/klp-ui/src/views/wms/report/zha.vue new file mode 100644 index 00000000..26218005 --- /dev/null +++ b/klp-ui/src/views/wms/report/zha.vue @@ -0,0 +1,171 @@ + + + + +