feat(wms): 新增钢卷去向标签和异常信息查看功能
- 新增钢卷去向标签(WhereTag)及相关配置 - 在base.vue中添加钢卷去向选择功能 - 新增异常信息查看弹窗组件(abnormal.vue) - 新增多个仓库视图页面(mini.vue, scrap.vue等) - 在发货单组件中新增Excel导出功能 - 优化标签打印功能,支持多种标签类型 - 修复报表查询时间参数问题
This commit is contained in:
@@ -3,23 +3,29 @@
|
||||
<!-- 标签预览容器 -->
|
||||
<div class="preview-container" :id="hideActions ? undefined : 'label-preview-container'" ref="labelRef">
|
||||
<MaterialTag
|
||||
v-if="labelType === '2'"
|
||||
v-if="tagType === '2'"
|
||||
:content="content"
|
||||
:paperWidthMm="100"
|
||||
:paperHeightMm="80"
|
||||
/>
|
||||
<OuterTagPreview
|
||||
v-if="labelType === '3'"
|
||||
v-if="tagType === '3'"
|
||||
:content="content"
|
||||
:paperWidthMm="180"
|
||||
:paperHeightMm="100"
|
||||
/>
|
||||
<GalvanizedTag
|
||||
v-if="labelType === '4'"
|
||||
v-if="tagType === '4'"
|
||||
:content="content"
|
||||
:paperWidthMm="180"
|
||||
:paperHeightMm="100"
|
||||
/>
|
||||
<WhereTag
|
||||
v-if="tagType === 'where'"
|
||||
:content="content"
|
||||
:paperWidthMm="100"
|
||||
:paperHeightMm="80"
|
||||
/>
|
||||
<!-- <SampleTagPreview v-if="labelType === '4'" :content="content" />
|
||||
<ForgeTagPreview v-if="labelType === '5'" :content="content" />
|
||||
<SaltSprayTagPreview v-if="labelType === '6'" :content="content" /> -->
|
||||
@@ -40,6 +46,7 @@ import { PDFDocument } from 'pdf-lib';
|
||||
import MaterialTag from './MaterialTag.vue';
|
||||
import OuterTagPreview from './OuterTagPreview.vue';
|
||||
import GalvanizedTag from './GalvanizedTag.vue';
|
||||
import WhereTag from './WhereTag.vue';
|
||||
// import SampleTagPreview from './SampleTagPreview.vue';
|
||||
// import ForgeTagPreview from './ForgeTagPreview.vue';
|
||||
// import SaltSprayTagPreview from './SaltSprayTagPreview.vue';
|
||||
@@ -50,6 +57,7 @@ export default {
|
||||
MaterialTag,
|
||||
OuterTagPreview,
|
||||
GalvanizedTag,
|
||||
WhereTag,
|
||||
// SampleTagPreview,
|
||||
// ForgeTagPreview,
|
||||
// SaltSprayTagPreview,
|
||||
@@ -57,6 +65,32 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
labelType: '2',
|
||||
tagSizeMap: {
|
||||
'2': {
|
||||
width: 100,
|
||||
height: 80,
|
||||
},
|
||||
'3': {
|
||||
width: 180,
|
||||
height: 100,
|
||||
},
|
||||
'4': {
|
||||
width: 180,
|
||||
height: 100,
|
||||
},
|
||||
'where': {
|
||||
width: 100,
|
||||
height: 80,
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
tagType() {
|
||||
if (this.forceSpecialTag) {
|
||||
return this.forceSpecialTag;
|
||||
}
|
||||
return this.labelType;
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@@ -64,6 +98,10 @@ export default {
|
||||
// type: String,
|
||||
// required: true,
|
||||
// },
|
||||
forceSpecialTag: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
content: {
|
||||
type: Object,
|
||||
required: true,
|
||||
@@ -139,8 +177,8 @@ export default {
|
||||
// 2. 计算纸张尺寸(与批量导出保持一致)
|
||||
// 根据 labelType 判断:'2' 是材料标签(100x80,宽100高80),'3' 是外标(180x100)
|
||||
const isMaterial = this.labelType === '2';
|
||||
const paperWidthMm = isMaterial ? 100 : 180;
|
||||
const paperHeightMm = isMaterial ? 80 : 100;
|
||||
const paperWidthMm = this.tagSizeMap[this.tagType].width || 100;
|
||||
const paperHeightMm = this.tagSizeMap[this.tagType].height || 80;
|
||||
|
||||
// 使用合适的scale值生成高清Canvas(但不超过纸张尺寸)
|
||||
const canvasScale = 3; // 提高清晰度(单张打印)
|
||||
|
||||
Reference in New Issue
Block a user