Merge remote-tracking branch 'gitee/0.8.X' into 0.8.X
This commit is contained in:
@@ -196,14 +196,11 @@
|
||||
<span class="info-value">{{ item.netWeight || '—' }}t</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <el-button style="position: absolute; bottom: 10px; right: 10px;" type="success" icon="el-icon-scissors"
|
||||
size="mini" @click="handleStartSplit(item)" :loading="buttonLoading" class="action-btn">分条</el-button> -->
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<el-button v-if="useSpecialSplit" type="success" icon="el-icon-scissors" size="mini"
|
||||
@click="handleStartSplit(item)" :loading="buttonLoading" class="action-btn">分条</el-button>
|
||||
@click="handleStartSplit(item)" :loading="buttonLoading" class="action-btn">加工</el-button>
|
||||
<el-button v-else type="primary" icon="el-icon-check" size="mini" @click="handlePickMaterial(item)"
|
||||
:loading="buttonLoading" class="action-btn">领料</el-button>
|
||||
<el-button type="danger" icon="el-icon-alarm-clock" :plain="item.abnormalCount == 0" size="mini"
|
||||
@@ -223,21 +220,77 @@
|
||||
|
||||
<!-- 右侧:待操作列表 -->
|
||||
<el-col :span="12">
|
||||
<div v-if="useSpecialSplit" style="margin-bottom: 20px;" v-loading="stepSpilt.loading">
|
||||
<div class="section-header">
|
||||
<div class="section-card action-section" v-if="useSpecialSplit" style="margin-bottom: 20px;"
|
||||
v-loading="stepSpilt.loading">
|
||||
<div class="section-header ">
|
||||
<h3 class="section-title">进行中的镀锌工序</h3>
|
||||
<el-button size="mini" icon="el-icon-refresh" @click="getStepSplitList">刷新</el-button>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; gap: 10px; flex-wrap: wrap;">
|
||||
<div v-for="item in stepSpilt.list" :key="item.coilId || index"
|
||||
style="text-align: center; padding: 10px; border: 2px solid #e4e7ed; border-radius: 4px;">
|
||||
<div class="step-item" style="font-size: 24px; font-weight: bold; ">
|
||||
<span class="step-value">{{ item.currentCoilNo }}</span>
|
||||
<div v-if="stepSpilt.list.length > 0" style="display: flex; align-items: center; gap: 10px; flex-wrap: wrap;">
|
||||
<div v-for="(item, index) in stepSpilt.list" :key="item.coilId || index" class="coil-card"
|
||||
style="border: 1px solid #e4e7ed; border-radius: 8px; padding: 16px; margin-bottom: 12px; background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%); box-shadow: 0 2px 8px rgba(0,0,0,0.05);">
|
||||
|
||||
<!-- 主标题区域 - 突出显示currentCoilNo -->
|
||||
<div class="card-header" style="margin-bottom: 16px; text-align: center;">
|
||||
<div style="display: inline-block; position: relative;">
|
||||
<!-- <div style="font-size: 12px; color: #909399; margin-bottom: 4px;">卷号</div> -->
|
||||
<div class="coil-no" style="font-size: 28px; font-weight: 800; color: #409eff; letter-spacing: 1px;
|
||||
padding: 4px 16px; background: linear-gradient(135deg, #ecf5ff 0%, #d9ecff 100%);
|
||||
border-radius: 6px; display: inline-block; border: 2px solid #a0cfff;">
|
||||
{{ item.currentCoilNo || 'N/A' }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 详细信息区域 -->
|
||||
<!-- <div class="card-content" style="margin-bottom: 16px;">
|
||||
|
||||
<div class="info-row" style="display: flex; justify-content: space-between; margin-bottom: 10px;">
|
||||
<div class="info-item" style="flex: 1; text-align: center;">
|
||||
<div style="font-size: 11px; color: #909399; margin-bottom: 2px;">仓库</div>
|
||||
<div style="font-size: 14px; font-weight: 600; color: #303133;">
|
||||
{{ item.warehouseName || '-' }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="width: 1px; background: #e4e7ed; margin: 0 8px;"></div>
|
||||
|
||||
<div class="info-item" style="flex: 1; text-align: center;">
|
||||
<div style="font-size: 11px; color: #909399; margin-bottom: 2px;">实际仓库</div>
|
||||
<div style="font-size: 14px; font-weight: 600; color: #303133;">
|
||||
{{ item.actualWarehouseName || '-' }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="weight-info" style="background: linear-gradient(135deg, #f0f9eb 0%, #e1f3d8 100%);
|
||||
border-radius: 6px; padding: 8px; margin-top: 8px; text-align: center;">
|
||||
<div style="display: inline-block;">
|
||||
<div style="font-size: 12px; color: #67c23a; margin-bottom: 2px;">净重</div>
|
||||
<div style="font-size: 18px; font-weight: 700; color: #67c23a;">
|
||||
{{ item.netWeight ? `${item.netWeight} kg` : '-' }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- 操作按钮区域 -->
|
||||
<div class="card-actions" style="text-align: center; border-top: 1px solid #ebeef5; padding-top: 12px;">
|
||||
<el-button type="primary" size="mini" @click="handleContinueSplit(item)"
|
||||
style="min-width: 80px; padding: 5px 15px;">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button size="mini" @click="handleCancelSplit(item)"
|
||||
style="min-width: 80px; padding: 5px 15px; margin-left: 12px; border-color: #f56c6c; color: #f56c6c;"
|
||||
:plain="true">
|
||||
取消
|
||||
</el-button>
|
||||
</div>
|
||||
<el-button type="primary" size="mini" @click="handleContinueSplit(item)">查看</el-button>
|
||||
<el-button size="mini" @click="handleCancelSplit(item)">取消操作</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-empty description="暂无进行中的镀锌工序" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section-card action-section">
|
||||
@@ -267,7 +320,7 @@
|
||||
</el-form>
|
||||
|
||||
<!-- 待操作卡片列表 -->
|
||||
<div v-loading="actionLoading" class="card-grid-container">
|
||||
<div v-if="!useSpecialSplit" v-loading="actionLoading" class="card-grid-container">
|
||||
<div v-if="pendingActionList.length === 0" class="empty-state">
|
||||
<i class="el-icon-document"></i>
|
||||
<p>暂无待操作任务</p>
|
||||
@@ -290,11 +343,6 @@
|
||||
|
||||
<div class="card-body">
|
||||
<div class="info-list">
|
||||
<div class="info-item">
|
||||
<span class="info-label">类型:</span>
|
||||
<dict-tag :options="dict.type.action_type" :value="item.actionType"
|
||||
class="action-type-tag"></dict-tag>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">来源:</span>
|
||||
<span class="info-value">
|
||||
@@ -342,14 +390,29 @@
|
||||
@click="handleDeleteAction(item)" class="action-btn">删除</el-button>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div class="card-footer" v-else="!useSpecialSplit">
|
||||
<el-button :loading="buttonLoading" type="primary" icon="el-icon-edit" size="mini"
|
||||
@click="handleProcess(item)" class="action-btn">查看</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-table v-else :data="pendingActionList">
|
||||
<el-table-column label="钢卷号" prop="currentCoilNo"></el-table-column>
|
||||
<el-table-column label="操作状态" prop="actionStatus">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.actionStatus === 0" type="info" size="mini">待处理</el-tag>
|
||||
<el-tag v-else-if="scope.row.actionStatus === 1" type="warning" size="mini">处理中</el-tag>
|
||||
<el-tag v-else-if="scope.row.actionStatus === 2" type="success" size="mini">已完成</el-tag>
|
||||
<el-tag v-else-if="scope.row.actionStatus === 3" type="danger" size="mini">已取消</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建人" prop="createBy"></el-table-column>
|
||||
<el-table-column label="操作人" prop="operatorName"></el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.actionStatus === 2" :loading="buttonLoading" icon="el-icon-delete"
|
||||
size="mini" @click="handleDeleteAction(scope.row)" class="action-btn">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination v-show="actionTotal > 0" :total="actionTotal" :page.sync="actionQueryParams.pageNum"
|
||||
:limit.sync="actionQueryParams.pageSize" @pagination="getPendingAction" />
|
||||
@@ -396,8 +459,8 @@
|
||||
<label-render :content="labelRender.data" :labelType="labelRender.type" />
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="分步分条" :visible.sync="stepSpilt.visible" width="1400px" append-to-body>
|
||||
<step-split @print="handlePrintLabel" @complete="stepSpilt.visible = false" :actionId="stepSpilt.actionId"
|
||||
<el-dialog title="分步加工" :visible.sync="stepSpilt.visible" width="1400px" append-to-body>
|
||||
<step-split @print="handlePrintLabel" @complete="handleComposeSplit" :actionId="stepSpilt.actionId"
|
||||
:coilId="stepSpilt.coilId" :actionStatus="stepSpilt.actionStatus" />
|
||||
</el-dialog>
|
||||
|
||||
@@ -833,24 +896,25 @@ export default {
|
||||
async handleStartSplit(row) {
|
||||
this.buttonLoading = true
|
||||
try {
|
||||
await this.$modal.confirm('是否确认领料开始分条操作?')
|
||||
await this.$modal.confirm('是否确认领料开始分步加工操作?')
|
||||
this.stepSpilt.loading = true
|
||||
await startSpecialSplit(row.coilId);
|
||||
await addPendingAction({
|
||||
coilId: row.coilId,
|
||||
currentCoilNo: row.currentCoilNo,
|
||||
actionType: 501,
|
||||
actionStatus: 0,
|
||||
sourceType: 'manual',
|
||||
priority: 0,
|
||||
})
|
||||
this.$message.success('分条操作已创建')
|
||||
this.stepSpilt.loading = false
|
||||
// await addPendingAction({
|
||||
// coilId: row.coilId,
|
||||
// currentCoilNo: row.currentCoilNo,
|
||||
// actionType: 501,
|
||||
// actionStatus: 0,
|
||||
// sourceType: 'manual',
|
||||
// priority: 0,
|
||||
// })
|
||||
this.$message.success('加工操作已创建')
|
||||
|
||||
this.getPendingAction()
|
||||
// this.getMaterialCoil()
|
||||
this.getStepSplitList()
|
||||
} finally {
|
||||
this.buttonLoading = false
|
||||
this.stepSpilt.loading = false
|
||||
}
|
||||
},
|
||||
handleContinueSplit(row) {
|
||||
|
||||
@@ -3263,7 +3263,7 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
|
||||
// 3. 检查是否已被锁定或已有相同类型的待处理操作
|
||||
if (coil.getExclusiveStatus() != null && coil.getExclusiveStatus() != 0) {
|
||||
throw new RuntimeException("钢卷正在进行其他操作,无法开始单步分卷");
|
||||
throw new RuntimeException("钢卷正在进行操作");
|
||||
}
|
||||
|
||||
// // 3.1 检查是否已经有相同类型的待处理操作(防止重复领料)
|
||||
@@ -3293,7 +3293,7 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
|
||||
Boolean insertResult = coilPendingActionService.insertByBo(pendingActionBo);
|
||||
if (!insertResult) {
|
||||
throw new RuntimeException("创建待操作记录失败");
|
||||
throw new RuntimeException("创建待操作失败");
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -3308,12 +3308,12 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
// 1. 查询母卷信息
|
||||
WmsMaterialCoil parentCoil = baseMapper.selectById(parentCoilId);
|
||||
if (parentCoil == null) {
|
||||
throw new RuntimeException("母卷不存在");
|
||||
throw new RuntimeException("钢卷不存在");
|
||||
}
|
||||
|
||||
// 2. 验证独占状态
|
||||
if (parentCoil.getExclusiveStatus() == null || parentCoil.getExclusiveStatus() != 1) {
|
||||
throw new RuntimeException("母卷未处于单步分卷状态");
|
||||
throw new RuntimeException("钢卷未处于分卷状态");
|
||||
}
|
||||
|
||||
// 3. 查询待操作记录
|
||||
@@ -3418,7 +3418,7 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
Long parentCoilId = pendingAction.getCoilId();
|
||||
WmsMaterialCoil parentCoil = baseMapper.selectById(parentCoilId);
|
||||
if (parentCoil == null) {
|
||||
throw new RuntimeException("母卷不存在");
|
||||
throw new RuntimeException("钢卷不存在");
|
||||
}
|
||||
|
||||
// 3. 获取所有子卷ID
|
||||
@@ -3519,16 +3519,16 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
// 3. 查询母卷
|
||||
WmsMaterialCoil parentCoil = baseMapper.selectById(pendingAction.getCoilId());
|
||||
if (parentCoil == null) {
|
||||
throw new RuntimeException("母卷不存在");
|
||||
throw new RuntimeException("钢卷不存在");
|
||||
}
|
||||
|
||||
if (parentCoil.getDataType() == 0) {
|
||||
throw new RuntimeException("母卷已成为历史数据,无法取消分卷");
|
||||
throw new RuntimeException("该钢卷已成为历史数据,无法取消分卷");
|
||||
}
|
||||
|
||||
// 4. 校验母卷是否处于“单步分卷中”
|
||||
if (Objects.equals(parentCoil.getExclusiveStatus(), 0)) {
|
||||
throw new RuntimeException("母卷未处于单步分卷状态,无法取消");
|
||||
throw new RuntimeException("钢卷未处于分卷状态,无法取消");
|
||||
}
|
||||
|
||||
// 释放母卷独占锁
|
||||
@@ -3540,7 +3540,7 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
}
|
||||
|
||||
result.put("success", true);
|
||||
result.put("message", "取消单步分卷成功");
|
||||
result.put("message", "取消分卷成功");
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user