refactor(wms): 优化合卷逻辑和员工选择组件

- 移除合卷流程中的箭头图示和最小源卷数量限制
- 修改处理时间显示为完成时间并更新相关字段
- 优化员工选择组件的前端筛选和取消操作处理
This commit is contained in:
砂糖
2026-03-16 10:41:50 +08:00
parent 8972a45fcc
commit c8f576dea3
3 changed files with 63 additions and 90 deletions

View File

@@ -91,23 +91,6 @@
</div>
</div>
<!-- 中间流程箭头汇聚 -->
<div class="flow-middle">
<div class="merge-arrow-container">
<svg width="120" height="100%" viewBox="0 0 120 400" xmlns="http://www.w3.org/2000/svg">
<!-- 多条线汇聚到一点 -->
<line v-for="(item, index) in sourceCoils" :key="index" :x1="0" :y1="50 + index * 80" :x2="100" :y2="200"
stroke="#0066cc" stroke-width="2" stroke-dasharray="5,5" />
<!-- 箭头 -->
<polygon points="100,200 110,195 110,205" fill="#0066cc" />
</svg>
</div>
<div class="flow-label">
<i class="el-icon-d-arrow-right"></i>
<span>合并</span>
</div>
</div>
<!-- 右侧目标卷信息 -->
<div class="flow-right">
<div class="flow-section-title">目标卷信息</div>
@@ -117,7 +100,7 @@
<span>新钢卷</span>
</div>
<div class="target-coil-body">
<el-form size="small" label-width="80px">
<el-form size="small" label-width="80px" :model="targetCoil" :rules="rules">
<div class="form-row">
<el-form-item label="卷号" class="form-item-half">
<el-input v-model="targetCoil.currentCoilNo" placeholder="输入目标卷号" :disabled="readonly"></el-input>
@@ -287,6 +270,9 @@ export default {
coatingType: '',
actualLength: undefined,
actualWidth: undefined,
},
rules: {
},
buttonLoading: false,
loading: false,
@@ -587,20 +573,18 @@ export default {
// 删除源卷
removeSourceCoil(index) {
if (this.sourceCoils.length > 2) {
if (this.sourceCoils.length > 1) {
this.sourceCoils.splice(index, 1);
} else {
this.$message.warning('至少需要2个源卷才能合卷');
}
},
// 保存合卷
async handleSave() {
// 验证源卷数量
if (this.sourceCoils.length < 2) {
this.$message.error('至少需要2个源卷才能合卷');
return;
}
// if (this.sourceCoils.length < 2) {
// this.$message.error('至少需要2个源卷才能合卷');
// return;
// }
// 验证源卷信息
for (let i = 0; i < this.sourceCoils.length; i++) {
@@ -692,7 +676,7 @@ export default {
length: data.length || null,
bomItems: data.bomItemList || [],
nc: true,
actionId: pending.actionId // 保存待操作ID用于后续完成操作
actionId: coil?.actionId // 保存待操作ID用于后续完成操作
});
},
@@ -729,6 +713,7 @@ export default {
currentCoilNo: item.currentCoilNo || '',
priority: 0,
sourceType: 'manual',
completeTime: new Date()
})
});
await Promise.all(promises1.concat(promises2));

View File

@@ -380,8 +380,8 @@
<span class="info-value">{{ parseTime(item.scanTime, '{m}-{d} {h}:{i}') || '—' }}</span>
</div>
<div class="info-item">
<span class="info-label">处理时间</span>
<span class="info-value">{{ parseTime(item.processTime, '{m}-{d} {h}:{i}') || '—' }}</span>
<span class="info-label">完成时间</span>
<span class="info-value">{{ parseTime(item.completeTime, '{m}-{d} {h}:{i}') || '—' }}</span>
</div>
</div>
</div>