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

@@ -107,7 +107,8 @@
<el-table-column label="完成时间" align="center" prop="completeTime" width="220" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-date-picker @change="handleProcessTimeChange(scope.row)" value-format="yyyy-MM-dd HH:mm:ss" style="width: 200px" v-model="scope.row.completeTime" type="datetime" placeholder="选择完成时间" />
<el-date-picker @change="handleProcessTimeChange(scope.row)" value-format="yyyy-MM-dd HH:mm:ss"
style="width: 200px" v-model="scope.row.completeTime" type="datetime" placeholder="选择完成时间" />
</template>
</el-table-column>
@@ -129,8 +130,10 @@
</template> -->
<!-- 已完成或已取消状态显示删除按钮 -->
<template v-if="scope.row.actionStatus === 2 || scope.row.actionStatus === 3">
<el-button v-if="scope.row.delFlag == 0" size="mini" type="danger" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
<el-button v-if="scope.row.delFlag == 2" size="mini" type="success" icon="el-icon-refresh" @click="handleRestore(scope.row)">还原</el-button>
<el-button v-if="scope.row.delFlag == 0" size="mini" type="danger" icon="el-icon-delete"
@click="handleDelete(scope.row)">删除</el-button>
<el-button v-if="scope.row.delFlag == 2" size="mini" type="success" icon="el-icon-refresh"
@click="handleRestore(scope.row)">还原</el-button>
</template>
</template>
</el-table-column>
@@ -165,6 +168,23 @@
</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>
@@ -195,7 +215,8 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" :disabled="buttonLoading" v-loading="buttonLoading"> </el-button>
<el-button type="primary" @click="submitForm" :disabled="buttonLoading" v-loading="buttonLoading">
</el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
@@ -279,12 +300,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;
});
}
},
@@ -472,7 +501,7 @@ export default {
}
else if (actionType < 100) {
path = '/wms/typing';
}
}
// 其他操作类型
else {
this.$message.error('特殊操作请到专门的页面进行处理');
@@ -754,6 +783,3 @@ export default {
}
}
</style>