feat(标签打印): 统一标签字体样式并增强镀锌分步加工功能

- 为所有标签组件添加统一的粗体黑体字体样式
- 修改getGalvanize1TypingPrefill方法参数以支持分页查询
- 在分步加工面板中增加镀锌二级数据展示功能
- 优化分步加工逻辑,支持根据actionType动态加载数据
This commit is contained in:
砂糖
2026-03-21 10:10:21 +08:00
parent 4478921d9b
commit 0c86b80fb2
11 changed files with 105 additions and 21 deletions

View File

@@ -8,10 +8,10 @@ export function getAcidTypingPrefill(currentCoilNo) {
})
}
export function getGalvanize1TypingPrefill(currentCoilNo) {
export function getGalvanize1TypingPrefill(params) {
return request({
url: '/pocket/galvanize1/crmPdoExcoil/list',
method: 'get',
params: { currentCoilNo }
params
})
}

View File

@@ -434,10 +434,14 @@ export default {
.nob {
width: 100%;
height: 100%;
font-weight: bold;
color: #000;
font-family: '黑体', serif;
border: none;
outline: none;
background: transparent;
text-align: center;
font-size: 1.2em;
}
/* 打印样式 - 强制单页适配180mm x 100mm纸张保持原有样式不变 */

View File

@@ -102,7 +102,7 @@
<!-- 第八行生产日期跨3列 -->
<div class="info-grid-item label-cell">生产日期</div>
<div class="info-grid-item value-cell">
<div>{{ parseTime(content.updateTime, '{y}-{m}-{d}') }}</div>
<div class="nob">{{ parseTime(content.updateTime, '{y}-{m}-{d}') }}</div>
<!-- <input type="text" class="nob" :value=" /> -->
</div>
</div>
@@ -437,8 +437,12 @@ export default {
height: 100%;
border: none;
outline: none;
font-weight: bold;
color: #000;
font-family: '黑体', serif;
background: transparent;
text-align: center;
font-size: 1.2em;
}
/* 打印样式 - 强制单页适配180mm x 100mm纸张保持原有样式不变 */

View File

@@ -333,6 +333,9 @@ export default {
.nob {
width: 100%;
height: 100%;
font-weight: bold;
color: #000;
font-family: '黑体', serif;
border: none;
outline: none;
background: transparent;

View File

@@ -392,7 +392,7 @@ export default {
.info-grid-item {
border: 1px solid #000;
padding: 0.1em;
font-size: 1.05em;
font-size: 1.2em;
height: 2em;
text-align: center;
vertical-align: middle;
@@ -443,8 +443,12 @@ export default {
height: 100%;
border: none;
outline: none;
font-weight: bold;
color: #000;
font-family: '黑体', serif;
background: transparent;
text-align: center;
font-size: 1.2em;
}
/* 打印样式 - 强制单页适配180mm x 100mm纸张保持原有样式不变 */

View File

@@ -253,6 +253,10 @@ export default {
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
color: #000;
font-family: '黑体', serif;
font-size: 1.2em;
}
/* 打印样式 */

View File

@@ -246,6 +246,10 @@ export default {
word-break: break-all;
overflow-wrap: break-word;
white-space: normal;
font-weight: bold;
color: #000;
font-family: '黑体', serif;
font-size: 1.2em;
}
/* 打印样式 - 强制单页适配100mm x 80mm纸张保持原有样式不变 */

View File

@@ -244,6 +244,7 @@ export default {
.nob {
width: 100%;
height: 100%;
font-size: 1.2em;
border: none;
outline: none;
background: transparent;
@@ -253,6 +254,10 @@ export default {
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
color: #000;
font-family: '黑体', serif;
font-size: 1.2em;
}
/* 打印样式 */

View File

@@ -454,7 +454,7 @@
<el-dialog title="分步加工" :visible.sync="stepSpilt.visible" width="1400px" append-to-body>
<step-split @print="handlePrintLabel" @complete="handleComposeSplit" :actionId="stepSpilt.actionId"
:coilId="stepSpilt.coilId" :actionStatus="stepSpilt.actionStatus" />
:coilId="stepSpilt.coilId" :actionStatus="stepSpilt.actionStatus" :actionType="stepSpilt.actionType" />
</el-dialog>
<label-render ref="labelRender" v-show="false" :content="labelRender.data" :labelType="labelRender.type" />
@@ -577,7 +577,8 @@ export default {
visible: false,
coilId: null,
actionId: null,
actionStatus: null
actionStatus: null,
actionType: null,
}
}
},
@@ -642,6 +643,10 @@ export default {
// 如果待操作列表为空,则加载数据
if (this.pendingActionList.length === 0) {
this.getPendingAction()
console.log(this.useSpecialSplit)
if (this.useSpecialSplit) {
this.getStepSplitList()
}
}
}
},
@@ -673,15 +678,16 @@ export default {
// 立即加载物料列表(不依赖字典)
// this.getMaterialCoil()
// 尝试加载待操作列表(如果字典已加载)
this.$nextTick(() => {
if (this.acidRollingActionType) {
this.actionQueryParams.actionType = this.acidRollingActionType
this.getPendingAction()
if (this.useSpecialSplit) {
this.getStepSplitList()
}
}
})
// this.$nextTick(() => {
// if (this.acidRollingActionType) {
// this.actionQueryParams.actionType = this.acidRollingActionType
// this.getPendingAction()
// console.log(this.useSpecialSplit)
// if (this.useSpecialSplit) {
// this.getStepSplitList()
// }
// }
// })
},
mounted() {
// 确保在mounted时也尝试加载字典数据可能此时才加载完成
@@ -689,6 +695,10 @@ export default {
if (this.acidRollingActionType && !this.actionQueryParams.actionType) {
this.actionQueryParams.actionType = this.acidRollingActionType
this.getPendingAction()
console.log(this.useSpecialSplit)
if (this.useSpecialSplit) {
this.getStepSplitList()
}
}
})
},
@@ -1008,6 +1018,7 @@ export default {
this.stepSpilt.coilId = row.coilId
this.stepSpilt.actionId = row.actionId
this.stepSpilt.actionStatus = row.actionStatus
this.stepSpilt.actionType = row.actionType
this.stepSpilt.visible = true
// this.buttonLoading = true
// this.getPendingAction()

View File

@@ -67,8 +67,13 @@
</el-table-column>
</el-table>
<!-- <el-descriptions :column="1" border title="二级数据" v-if="showSplitForm"></el-descriptions>
<el-table v-if="showSplitForm"></el-table> -->
<el-descriptions :column="1" border title="镀锌二级数据" v-if="actionType == 501 && showSplitForm"></el-descriptions>
<el-table v-if="actionType == 501 && showSplitForm" v-loading="zincLoading" :data="zincList" border stripe @row-click="handleZincItemClick">
<el-table-column prop="enterCoilNo" label="入场钢卷号" />
<el-table-column prop="createTime" label="生产开始时间" />
<el-table-column prop="endTime" label="生产结束时间" />
<el-table-column prop="shiftNo" label="班组" />
</el-table>
</div>
</el-col>
@@ -268,6 +273,7 @@
<script>
import { getMaterialCoil, listMaterialCoil, createSpecialChild, completeSpecialSplit, updateMaterialCoilSimple, checkCoilNo, delMaterialCoil } from '@/api/wms/coil'
import { completeAction, getPendingAction, updatePendingAction } from '@/api/wms/pendingAction'
import { getGalvanize1TypingPrefill } from '@/api/pocket/acidTyping';
import ProductSelect from "@/components/KLPService/ProductSelect";
import RawMaterialSelect from "@/components/KLPService/RawMaterialSelect";
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
@@ -280,7 +286,7 @@ export default {
name: 'StepSplit',
props: {
actionId: {
type: String,
type: [String, Number],
required: true,
},
coilId: {
@@ -291,6 +297,10 @@ export default {
type: Number,
default: 0,
},
actionType: {
type: Number,
required: true,
},
},
components: {
ProductSelect,
@@ -398,7 +408,10 @@ export default {
defectCode: null,
degree: null,
remark: null
}
},
zincList: [],
zincLoading: false,
}
},
computed: {
@@ -427,6 +440,16 @@ export default {
// 若actionId变化需要重新加载数据可在此补充逻辑
},
},
actionType: {
immediate: true,
handler(val) {
console.log('actionType', val)
if (val == 501) {
// 获取镀锌线二级系统数据
this.getZincList()
}
}
}
},
methods: {
// 查询待分条的钢卷信息
@@ -443,6 +466,16 @@ export default {
}
},
async getZincList() {
this.zincLoading = true
const res = await getGalvanize1TypingPrefill({
pageSize: 10,
pageNum: 1,
})
this.zincList = res.rows || []
this.zincLoading = false
},
async handlePrint(row) {
this.$emit('print', row)
},
@@ -557,6 +590,20 @@ export default {
this.showSplitForm = false
},
handleZincItemClick(row) {
this.splitForm = {
...this.splitForm,
team: row.shiftNo,
// enterCoilNo: row.enterCoilNo,
productionStartTime: row.createTime,
productionEndTime: row.endTime,
itemType: 'product',
materialType: '成品',
length: row.exitLength,
netWeight: row.exitNetWeight,
}
},
// 编辑分条项
async handleEditSplit(row) {
this.showSplitForm = true

View File

@@ -301,9 +301,7 @@ export default {
computedWidth: parseFloat(width),
}
})
// this.loading = false
this.getLossList()
// this.loading = false
})
},
async getLossList() {