feat(wms/coil): 酸轧自动填写冷卷号,自动填写最优项

This commit is contained in:
2026-06-26 09:29:59 +08:00
parent b3dbdaef58
commit c20965406f
2 changed files with 17 additions and 2 deletions

View File

@@ -88,7 +88,8 @@ const PLAN_FIELDS = [
export default {
name: 'L2MatchPanel',
props: {
hotCoilId: { type: String, default: '' }
hotCoilId: { type: String, default: '' },
autoFill: { type: Boolean, default: false }
},
data() {
return {
@@ -103,6 +104,11 @@ export default {
hotCoilId(val) {
if (val) this.loadBestMatch(val)
else this.bestMatch = null
},
bestMatch(val) {
if (val && this.autoFill) {
this.$emit('fill', val)
}
}
},
created() {

View File

@@ -25,7 +25,7 @@
<!-- 左侧快捷写入面板DR操作用双机架计划面板其他用L2匹配 -->
<div>
<dr-match-panel v-if="isDrAction" :action-id="actionId" @fill="applyDrFill" />
<l2-match-panel v-else :hot-coil-id="l2HotCoilId" @fill="applyL2Fill" />
<l2-match-panel v-else :hot-coil-id="l2HotCoilId" :auto-fill="isAcidRolling" @fill="applyL2Fill" />
</div>
<!-- 右侧更新表单 -->
<div>
@@ -573,6 +573,10 @@ export default {
isDrAction() {
return this.actionType === 504 || this.actionType === 524
},
/** 酸轧产线 */
isAcidRolling() {
return [11, 120, 200, 201, 520].includes(Number(this.actionType))
},
/** 镀锌/酸轧产线免验净重和厚度范围 */
isExemptFromValidation() {
return [11, 120, 200, 201, 520, 202, 501, 521].includes(Number(this.actionType))
@@ -694,6 +698,11 @@ export default {
if (data.end_date) {
this.$set(this.updateForm, 'productionEndTime', this.formatDateTime(data.end_date))
}
if (data.encoilid) {
this.$set(this.updateForm, 'chromePlateCoilNo', data.encoilid)
}
if (data.start_date || data.end_date) this.calculateProductionDuration()
const query = {