refactor(wms): 移除调试代码和注释,优化规格分割逻辑
移除console.log调试语句和已注释的代码 为specification.split添加空值保护,防止undefined错误 简化标签类型判断逻辑
This commit is contained in:
@@ -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 == '热轧卷板') {
|
||||
|
||||
Reference in New Issue
Block a user