三级前后端页面修改

This commit is contained in:
2025-11-07 14:33:28 +08:00
parent 8117421531
commit e26a80dd3d
3 changed files with 34 additions and 1 deletions

View File

@@ -144,6 +144,16 @@
<p class="coil-detail" v-if="coil.warehouse && coil.warehouse.warehouseName">
库区{{ coil.warehouse.warehouseName }}
</p>
<!-- 显示母卷/子卷关系 -->
<p class="coil-detail" v-if="coil.parentCoilNos && coil.hasMergeSplit === 1">
<el-tag type="warning" size="mini">来自母卷{{ coil.parentCoilNos }}</el-tag>
</p>
<p class="coil-detail" v-if="coil.parentCoilNos && coil.hasMergeSplit === 0 && coil.dataType === 0">
<el-tag type="info" size="mini">分为子卷{{ coil.parentCoilNos }}</el-tag>
</p>
<p class="coil-detail" v-if="coil.parentCoilNos && coil.hasMergeSplit === 2">
<el-tag type="success" size="mini">合并自{{ coil.parentCoilNos }}</el-tag>
</p>
<p class="coil-detail">{{ coil.createTime }}</p>
</div>
</el-card>

View File

@@ -115,6 +115,20 @@
<el-table-column label="班组" align="center" prop="team" />
<el-table-column label="毛重" align="center" prop="grossWeight" />
<el-table-column label="净重" align="center" prop="netWeight" />
<el-table-column label="关联信息" align="center" prop="parentCoilNos" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.parentCoilNos && scope.row.hasMergeSplit === 1">
<el-tag type="warning" size="mini">来自母卷{{ scope.row.parentCoilNos }}</el-tag>
</span>
<span v-else-if="scope.row.parentCoilNos && scope.row.dataType === 0">
<el-tag type="info" size="mini">分为子卷{{ scope.row.parentCoilNos }}</el-tag>
</span>
<span v-else-if="scope.row.parentCoilNos && scope.row.hasMergeSplit === 2">
<el-tag type="success" size="mini">合并自{{ scope.row.parentCoilNos }}</el-tag>
</span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">

View File

@@ -541,7 +541,13 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
generateRecordService.updateByBo(oldQrBo);
}
// 2. 将原始钢卷标记为历史数据(已在上面完成)
// 2. 将原始钢卷标记为历史数据,并记录所有子卷号
// 在母卷的 parent_coil_nos 字段中记录所有子卷号(用逗号分隔)
String childCoilNos = String.join(",", allNewCoilNos);
LambdaUpdateWrapper<WmsMaterialCoil> motherUpdateWrapper = new LambdaUpdateWrapper<>();
motherUpdateWrapper.eq(WmsMaterialCoil::getCoilId, oldCoil.getCoilId())
.set(WmsMaterialCoil::getParentCoilNos, childCoilNos); // 记录子卷号
baseMapper.update(null, motherUpdateWrapper);
// 3. 为每个分卷后的子钢卷生成独立的二维码并插入数据库
for (WmsMaterialCoilBo newCoilBo : bo.getNewCoils()) {
@@ -562,6 +568,9 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
newCoil.setWarehouseId(oldCoil.getWarehouseId());
newCoil.setActualWarehouseId(oldCoil.getActualWarehouseId());
}
// 在子卷的 parent_coil_nos 字段中记录母卷号
newCoil.setParentCoilNos(oldCoil.getCurrentCoilNo());
// 为每个子钢卷生成独立二维码
Long newQrcodeId = generateQrcodeForSplit(oldCoil, newCoilBo, allNewCoilNos);