feat(钢卷): 重构标签打印逻辑并添加合卷操作功能

重构钢卷标签打印逻辑,提取公共方法到coilPrint.js
添加合卷操作区功能,支持200-299操作类型
为合卷表单添加验证规则
This commit is contained in:
砂糖
2026-03-16 13:15:54 +08:00
parent d613058104
commit b27f246fa0
7 changed files with 152 additions and 77 deletions

View File

@@ -157,6 +157,22 @@
</div>
</div>
<!-- 合卷操作区 -->
<div class="card-section" v-if="mergeTypes.length > 0">
<div class="section-title">合卷操作</div>
<div class="action-cards-row">
<div v-for="item in mergeTypes" :key="item.value" class="action-card"
:class="{ 'active': form.actionType == item.value }" @click="form.actionType = parseInt(item.value)">
<div class="card-icon">
<i :class="getActionIcon(item.value)"></i>
</div>
<div class="card-content">
<div class="card-title">{{ item.label }}</div>
<div class="card-desc">{{ item.remark || '钢卷操作' }}</div>
</div>
</div>
</div>
</div>
<!-- 其他操作区 -->
<div class="card-section" v-if="otherTypes.length > 0">
<div class="section-title">其他操作</div>
@@ -270,12 +286,20 @@ export default {
return value >= 100 && value <= 199;
});
},
// 合卷操作列表200-299
mergeTypes() {
if (!this.dict.type.action_type) return [];
return this.dict.type.action_type.filter(item => {
const value = parseInt(item.value);
return value >= 200 && value <= 299;
});
},
// 其他操作列表200-299等
otherTypes() {
if (!this.dict.type.action_type) return [];
return this.dict.type.action_type.filter(item => {
const value = parseInt(item.value);
return value < 100 || value > 199;
return value < 100 || value > 299;
});
}
},