refactor(wms): 移除调试代码和注释,优化规格分割逻辑

移除console.log调试语句和已注释的代码
为specification.split添加空值保护,防止undefined错误
简化标签类型判断逻辑
This commit is contained in:
砂糖
2026-03-24 14:05:07 +08:00
parent ae68b40ee6
commit cbc4334db9
2 changed files with 4 additions and 15 deletions

View File

@@ -44,9 +44,6 @@
:paperWidthMm="180"
:paperHeightMm="100"
/>
<!-- <SampleTagPreview v-if="labelType === '4'" :content="content" />
<ForgeTagPreview v-if="labelType === '5'" :content="content" />
<SaltSprayTagPreview v-if="labelType === '6'" :content="content" /> -->
</div>
<div class="action-buttons" v-if="!hideActions">
<el-button type="primary" @click="downloadLabelAsImage">下载标签图片</el-button>
@@ -70,10 +67,6 @@ import DuGeTag from './DuGeTag.vue';
import TuoZhiTag from './TuoZhiTag.vue';
// import SampleTagPreview from './SampleTagPreview.vue';
// import ForgeTagPreview from './ForgeTagPreview.vue';
// import SaltSprayTagPreview from './SaltSprayTagPreview.vue';
export default {
name: 'LabelRender',
components: {
@@ -132,10 +125,6 @@ export default {
}
},
props: {
// labelType: {
// type: String,
// required: true,
// },
forceSpecialTag: {
type: String,
required: false,
@@ -162,6 +151,8 @@ export default {
this.labelType = '6';
} else if (itemType == 'raw_material') {
this.labelType = '2';
} else if (itemType == 'product') {
this.labelType = 'where';
} else if (itemType == 'product' && itemName == '冷硬卷') {
this.labelType = '3';
} else if (itemType == 'product' && itemName == '热轧卷板') {