Merge remote-tracking branch 'origin/0.8.X' into 0.8.X
This commit is contained in:
@@ -1,20 +1,16 @@
|
||||
<template>
|
||||
<el-descriptions
|
||||
:column="column"
|
||||
:border="border"
|
||||
size="small"
|
||||
:title="title"
|
||||
>
|
||||
<el-descriptions :column="column" :border="border" size="small" :title="title">
|
||||
<template slot="extra">
|
||||
<slot name="extra"></slot>
|
||||
</template>
|
||||
<el-descriptions-item
|
||||
v-for="(item, index) in filteredFields"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:span="item.span || 1"
|
||||
>
|
||||
<template>
|
||||
<el-descriptions-item v-for="(item, index) in filteredFields" :key="index" :label="item.label"
|
||||
:span="item.span || 1">
|
||||
<template v-if="item.children">
|
||||
<span v-for="(child, cIndex) in item.children" :key="cIndex" style="margin-right: 12px;">
|
||||
{{ child.label }}: {{ child.value || '-' }}
|
||||
</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ item.value || '-' }}
|
||||
</template>
|
||||
</el-descriptions-item>
|
||||
@@ -37,7 +33,7 @@ export default {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 只显示有值的字段
|
||||
// 只显示有值的字段
|
||||
showOnlyValue: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
@@ -66,9 +62,22 @@ export default {
|
||||
{ label: '切边要求', key: 'trimmingRequirement' },
|
||||
{ label: '原料材质', key: 'packingStatus' },
|
||||
{ label: '包装要求', key: 'packagingRequirement' },
|
||||
{ label: '实测厚度[mm]', key: 'actualThickness' },
|
||||
// 设置对照属性,两个数量显示在一个格子里
|
||||
{
|
||||
label: '长度[m]',
|
||||
children: [
|
||||
{ label: '实测', key: 'actualLength' },
|
||||
{ label: '理论', key: 'theoreticalLength' }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '厚度[mm]',
|
||||
children: [
|
||||
{ label: '实测', key: 'actualThickness' },
|
||||
{ label: '理论', key: 'theoreticalThickness' }
|
||||
]
|
||||
},
|
||||
{ label: '实测宽度[mm]', key: 'actualWidth' },
|
||||
{ label: '长度[m]', key: 'length' },
|
||||
{ label: '毛重[t]', key: 'grossWeight' },
|
||||
{ label: '净重[t]', key: 'netWeight' },
|
||||
{ label: '生产开始', key: 'productionStartTime' },
|
||||
@@ -80,13 +89,29 @@ export default {
|
||||
]
|
||||
},
|
||||
filteredFields() {
|
||||
let fields = this.fields.map(item => ({
|
||||
...item,
|
||||
value: this.coilInfo[item.key]
|
||||
}))
|
||||
let fields = this.fields.map(item => {
|
||||
if (item.children) {
|
||||
return {
|
||||
...item,
|
||||
children: item.children.map(child => ({
|
||||
...child,
|
||||
value: this.coilInfo[child.key]
|
||||
}))
|
||||
}
|
||||
}
|
||||
return {
|
||||
...item,
|
||||
value: this.coilInfo[item.key]
|
||||
}
|
||||
})
|
||||
|
||||
if (this.showOnlyValue) {
|
||||
fields = fields.filter(item => item.value !== undefined && item.value !== null && item.value !== '')
|
||||
fields = fields.filter(item => {
|
||||
if (item.children) {
|
||||
return item.children.some(child => child.value !== undefined && child.value !== null && child.value !== '')
|
||||
}
|
||||
return item.value !== undefined && item.value !== null && item.value !== ''
|
||||
})
|
||||
}
|
||||
|
||||
return fields
|
||||
|
||||
@@ -295,6 +295,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.label-container {
|
||||
padding: 1em;
|
||||
/* width: 680.315px; */
|
||||
@@ -318,7 +319,7 @@ export default {
|
||||
font-size: 12px;
|
||||
border: 1px solid #000;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Arial', sans-serif;
|
||||
font-family: var(--label-font);
|
||||
}
|
||||
|
||||
.company-header {
|
||||
@@ -434,9 +435,9 @@ export default {
|
||||
.nob {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-weight: bold;
|
||||
font-weight: 900;
|
||||
color: #000;
|
||||
font-family: '黑体', serif;
|
||||
font-family: var(--label-font);
|
||||
border: none;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
|
||||
@@ -58,13 +58,14 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.label-container {
|
||||
width: 50em; /* 容器宽度(可根据需求调整) */
|
||||
min-height: 30em; /* 容器最小高度 */
|
||||
border: 1px solid #000;
|
||||
padding: 2px;
|
||||
box-sizing: border-box;
|
||||
font-family: "SimSun", serif;
|
||||
font-family: var(--label-font);
|
||||
font-size: 8px;
|
||||
line-height: 1.2;
|
||||
display: flex;
|
||||
|
||||
@@ -296,6 +296,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.label-container {
|
||||
padding: 1em;
|
||||
/* width: 680.315px; */
|
||||
@@ -319,7 +320,7 @@ export default {
|
||||
font-size: 12px;
|
||||
border: 1px solid #000;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Arial', sans-serif;
|
||||
font-family: var(--label-font);
|
||||
}
|
||||
|
||||
.company-header {
|
||||
@@ -437,9 +438,9 @@ export default {
|
||||
height: 100%;
|
||||
border: none;
|
||||
outline: none;
|
||||
font-weight: bold;
|
||||
font-weight: 900;
|
||||
color: #000;
|
||||
font-family: '黑体', serif;
|
||||
font-family: var(--label-font);
|
||||
background: transparent;
|
||||
text-align: center;
|
||||
font-size: 1.2em;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
<div
|
||||
style="flex: 1; height: 100%; display: flex; align-items: center; justify-content: center; border: 1px solid #333; box-sizing: border-box; padding: 3px; word-break: break-all; overflow-wrap: break-word;"
|
||||
class="value-cell">
|
||||
class="value-cell enter-coil-no">
|
||||
{{ content.enterCoilNo || '' }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -279,6 +279,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.label-container {
|
||||
width: 25em;
|
||||
height: 20em;
|
||||
@@ -287,9 +288,8 @@ export default {
|
||||
/* 启用Flex布局 */
|
||||
flex-direction: column;
|
||||
/* 子元素垂直排列 */
|
||||
font-family: "SimSun", serif;
|
||||
font-family: var(--label-font);
|
||||
box-sizing: border-box;
|
||||
/* 确保内边距/边框不影响总尺寸 */
|
||||
}
|
||||
|
||||
.material-label-table {
|
||||
@@ -327,15 +327,21 @@ export default {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
font-family: '黑体', serif;
|
||||
font-family: var(--label-font);
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.enter-coil-no {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
|
||||
.nob {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-weight: bold;
|
||||
font-weight: 900;
|
||||
color: #000;
|
||||
font-family: '黑体', serif;
|
||||
font-family: var(--label-font);
|
||||
border: none;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
|
||||
@@ -302,6 +302,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.label-container {
|
||||
padding: 1em;
|
||||
/* width: 680.315px; */
|
||||
@@ -325,7 +326,7 @@ export default {
|
||||
font-size: 12px;
|
||||
border: 1px solid #000;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Arial', sans-serif;
|
||||
font-family: var(--label-font);
|
||||
}
|
||||
|
||||
.company-header {
|
||||
@@ -443,9 +444,9 @@ export default {
|
||||
height: 100%;
|
||||
border: none;
|
||||
outline: none;
|
||||
font-weight: bold;
|
||||
font-weight: 900;
|
||||
color: #000;
|
||||
font-family: '黑体', serif;
|
||||
font-family: var(--label-font);
|
||||
background: transparent;
|
||||
text-align: center;
|
||||
font-size: 1.2em;
|
||||
|
||||
@@ -50,13 +50,14 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.label-container {
|
||||
width: 50em; /* 容器宽度(可根据需求调整) */
|
||||
min-height: 30em; /* 容器最小高度 */
|
||||
border: 1px solid #000;
|
||||
padding: 2px;
|
||||
box-sizing: border-box;
|
||||
font-family: "SimSun", serif;
|
||||
font-family: var(--label-font);
|
||||
font-size: 8px;
|
||||
line-height: 1.2;
|
||||
display: flex;
|
||||
|
||||
@@ -60,13 +60,14 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.sample-label-container {
|
||||
width: 50em;
|
||||
height: 40em;
|
||||
border: 1px solid #000;
|
||||
padding: 2px;
|
||||
box-sizing: border-box;
|
||||
font-family: "SimSun", serif;
|
||||
font-family: var(--label-font);
|
||||
font-size: 10px;
|
||||
line-height: 1.5;
|
||||
display: flex;
|
||||
|
||||
@@ -166,11 +166,12 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.label-container {
|
||||
width: 25em;
|
||||
height: 20em;
|
||||
padding: 16px;
|
||||
font-family: "SimSun", serif;
|
||||
font-family: var(--label-font);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -199,7 +200,8 @@ export default {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #000;
|
||||
font-family: '黑体', serif;
|
||||
font-family: var(--label-font);
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
/* 公司名称单元格 */
|
||||
@@ -260,7 +262,7 @@ export default {
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
font-family: '黑体', serif;
|
||||
font-family: var(--label-font);
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
<!-- 第一行:冷卷号、热卷号 -->
|
||||
<div class="grid-cell label-cell">冷卷号</div>
|
||||
<div class="grid-cell value-cell">
|
||||
<div class="nob">{{ content.currentCoilNo || '' }}</div>
|
||||
<div class="nob current-coil-no">{{ content.currentCoilNo || '' }}</div>
|
||||
</div>
|
||||
<div class="grid-cell label-cell">热卷号</div>
|
||||
<div class="grid-cell value-cell">
|
||||
<div class="nob">{{ content.enterCoilNo || '' }}</div>
|
||||
<div class="nob enter-coil-no">{{ content.enterCoilNo || '' }}</div>
|
||||
</div>
|
||||
|
||||
<!-- 第二行:规格、钢种 -->
|
||||
@@ -170,11 +170,12 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.label-container {
|
||||
width: 45em;
|
||||
height: 25em;
|
||||
padding: 16px;
|
||||
font-family: "SimSun", serif;
|
||||
font-family: var(--label-font);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -253,12 +254,17 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
font-weight: 900;
|
||||
color: #000;
|
||||
font-family: '黑体', serif;
|
||||
font-family: var(--label-font);
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.current-coil-no, .enter-coil-no {
|
||||
font-size: 1.1em !important;
|
||||
}
|
||||
|
||||
|
||||
/* 打印样式 */
|
||||
@media print {
|
||||
@page {
|
||||
|
||||
@@ -184,6 +184,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.label-container {
|
||||
width: 25em;
|
||||
height: 20em;
|
||||
@@ -192,7 +193,7 @@ export default {
|
||||
/* 启用Flex布局 */
|
||||
flex-direction: column;
|
||||
/* 子元素垂直排列 */
|
||||
font-family: "SimSun", serif;
|
||||
font-family: var(--label-font);
|
||||
box-sizing: border-box;
|
||||
/* 确保内边距/边框不影响总尺寸 */
|
||||
}
|
||||
@@ -248,7 +249,7 @@ export default {
|
||||
white-space: normal;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
font-family: '黑体', serif;
|
||||
font-family: var(--label-font);
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
<!-- 第一行:冷卷号、热卷号 -->
|
||||
<div class="grid-cell label-cell">冷卷号</div>
|
||||
<div class="grid-cell value-cell">
|
||||
<div class="nob">{{ content.currentCoilNo || '' }}</div>
|
||||
<div class="nob current-coil-no">{{ content.currentCoilNo || '' }}</div>
|
||||
</div>
|
||||
<div class="grid-cell label-cell">热卷号</div>
|
||||
<div class="grid-cell value-cell">
|
||||
<div class="nob">{{ content.enterCoilNo || '' }}</div>
|
||||
<div class="nob enter-coil-no">{{ content.enterCoilNo || '' }}</div>
|
||||
</div>
|
||||
|
||||
<!-- 第二行:规格、钢种 -->
|
||||
@@ -170,11 +170,12 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import './label-common.css';
|
||||
.label-container {
|
||||
width: 45em;
|
||||
height: 25em;
|
||||
padding: 16px;
|
||||
font-family: "SimSun", serif;
|
||||
font-family: var(--label-font);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -254,12 +255,17 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
font-weight: 900;
|
||||
color: #000;
|
||||
font-family: '黑体', serif;
|
||||
font-family: var(--label-font);
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.current-coil-no, .enter-coil-no {
|
||||
font-size: 1.1em !important;
|
||||
}
|
||||
|
||||
|
||||
/* 打印样式 */
|
||||
@media print {
|
||||
@page {
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
:root {
|
||||
--label-font: '黑体', 'Courier New', 'SimSun', serif;
|
||||
}
|
||||
@@ -154,7 +154,11 @@ export default {
|
||||
{ label: '厂家', value: 'manufacturer' },
|
||||
{ label: '表面处理', value: 'surfaceTreatmentDesc' },
|
||||
{ label: '镀层质量', value: 'zincLayer' },
|
||||
{ label: '长度', value: 'length' },
|
||||
{ label: '实测长度', value: 'actualLength' },
|
||||
{ label: '理论长度', value: 'theoreticalLength' },
|
||||
{ label: '实测厚度', value: 'actualThickness' },
|
||||
{ label: '理论厚度', value: 'theoreticalThickness' },
|
||||
{ label: '实测宽度', value: 'actualWidth' },
|
||||
{ label: '毛重', value: 'grossWeight' },
|
||||
{ label: '净重', value: 'netWeight' },
|
||||
{ label: '创建时间', value: 'createTime' },
|
||||
|
||||
Reference in New Issue
Block a user