feat(flow): 添加工序定义和步骤明细功能模块
- 创建工序定义主服务接口及实现类 - 创建工序步骤明细服务接口及实现类 - 添加工序定义主控制器提供CRUD操作接口 - 添加工序步骤明细控制器提供CRUD操作接口 - 创建工序定义主和步骤明细的数据实体类 - 创建工序定义主和步骤明细的业务对象类 - 创建工序定义主和步骤明细的视图对象类 - 添加工序定义主和步骤明细的数据访问层 - 更新元数据配置文件将actionType字段名改为actionId - 更新前端调度界面使用新的actionId字段进行工序类型映射 - 在排程明细表中添加工序关联字段processId - 完善前后端数据交互和验证逻辑
This commit is contained in:
@@ -1,26 +1,26 @@
|
||||
// lockValue: 锁值,用于防止并发操作,不同的lockValue对应不同的锁
|
||||
// 1:分步加工 2. 退火 3. 酸轧 4. 酸轧分条 4. 合卷
|
||||
export const PROCESSES = [
|
||||
{ name: '酸连轧工序', actionType: 11, api: 'pendingAction', lockValue: 3 },
|
||||
{ name: '酸轧分条工序', actionType: 120, api: 'pendingAction', lockValue: 4 },
|
||||
{ name: '酸轧合卷', actionType: 201, api: 'pendingAction', lockValue: 5 },
|
||||
{ name: '镀锌合卷', actionType: 202, api: 'pendingAction', lockValue: 5 },
|
||||
{ name: '脱脂合卷', actionType: 203, api: 'pendingAction', lockValue: 5 },
|
||||
{ name: '拉矫平整合卷', actionType: 204, api: 'pendingAction', lockValue: 5 },
|
||||
{ name: '双机架合卷', actionType: 205, api: 'pendingAction', lockValue: 5 },
|
||||
{ name: '镀铬合卷', actionType: 206, api: 'pendingAction', lockValue: 5 },
|
||||
{ name: '镀锌工序', actionType: 501, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '脱脂工序', actionType: 502, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '拉矫平整工序', actionType: 503, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '双机架工序', actionType: 504, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '镀铬工序', actionType: 505, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '纵剪分条工序', actionType: 506, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '酸轧修复工序', actionType: 520, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '镀锌修复工序', actionType: 521, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '脱脂修复工序', actionType: 522, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '拉矫修复工序', actionType: 523, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '双机架修复工序', actionType: 524, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '镀铬修复工序', actionType: 525, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '酸连轧工序', actionId: 11, api: 'pendingAction', lockValue: 3 },
|
||||
{ name: '酸轧分条工序', actionId: 120, api: 'pendingAction', lockValue: 4 },
|
||||
{ name: '酸轧合卷', actionId: 201, api: 'pendingAction', lockValue: 5 },
|
||||
{ name: '镀锌合卷', actionId: 202, api: 'pendingAction', lockValue: 5 },
|
||||
{ name: '脱脂合卷', actionId: 203, api: 'pendingAction', lockValue: 5 },
|
||||
{ name: '拉矫平整合卷', actionId: 204, api: 'pendingAction', lockValue: 5 },
|
||||
{ name: '双机架合卷', actionId: 205, api: 'pendingAction', lockValue: 5 },
|
||||
{ name: '镀铬合卷', actionId: 206, api: 'pendingAction', lockValue: 5 },
|
||||
{ name: '镀锌工序', actionId: 501, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '脱脂工序', actionId: 502, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '拉矫平整工序', actionId: 503, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '双机架工序', actionId: 504, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '镀铬工序', actionId: 505, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '纵剪分条工序', actionId: 506, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '酸轧修复工序', actionId: 520, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '镀锌修复工序', actionId: 521, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '脱脂修复工序', actionId: 522, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '拉矫修复工序', actionId: 523, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '双机架修复工序', actionId: 524, api: 'specialSplit', lockValue: 1 },
|
||||
{ name: '镀铬修复工序', actionId: 525, api: 'specialSplit', lockValue: 1 },
|
||||
]
|
||||
|
||||
export const PRODUCTION_LINES = [
|
||||
|
||||
@@ -205,9 +205,9 @@
|
||||
<el-table-column type="selection" width="45" align="center" />
|
||||
<el-table-column label="排产单号" prop="scheduleNo" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column label="生产日期" prop="prodDate" width="110" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="工序类型" prop="actionType" width="100" align="center" show-overflow-tooltip>
|
||||
<el-table-column label="工序类型" prop="actionId" width="100" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ getActionTypeName(scope.row.actionType) }}
|
||||
{{ getActionIdName(scope.row.actionId) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="排产状态" prop="scheduleStatus" width="90" align="center">
|
||||
@@ -317,8 +317,8 @@
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工序类型">
|
||||
<el-select v-model="editForm.actionType" placeholder="请选择工序类型" clearable filterable style="width:100%">
|
||||
<el-option v-for="p in processOptions" :key="p.actionType" :label="p.name" :value="p.actionType" />
|
||||
<el-select v-model="editForm.actionId" placeholder="请选择工序类型" clearable filterable style="width:100%">
|
||||
<el-option v-for="p in processOptions" :key="p.actionId" :label="p.name" :value="p.actionId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -528,8 +528,8 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工序类型">
|
||||
<el-select v-model="mergeForm.actionType" placeholder="请选择工序类型" clearable filterable style="width:100%">
|
||||
<el-option v-for="p in processOptions" :key="p.actionType" :label="p.name" :value="p.actionType" />
|
||||
<el-select v-model="mergeForm.actionId" placeholder="请选择工序类型" clearable filterable style="width:100%">
|
||||
<el-option v-for="p in processOptions" :key="p.actionId" :label="p.name" :value="p.actionId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -687,7 +687,7 @@ export default {
|
||||
mergeTemplateIndex: 0,
|
||||
mergeSourceRows: [],
|
||||
mergeForm: {
|
||||
itemCount: 0, scheduleNo: '', actionType: '', customerName: '', spec: '', material: '',
|
||||
itemCount: 0, scheduleNo: '', actionId: '', customerName: '', spec: '', material: '',
|
||||
scheduleWeight: 0, productType: '', productItem: '', businessUser: '',
|
||||
businessPhone: '', deliveryCycle: undefined, usePurpose: '',
|
||||
thicknessTolerance: '', widthTolerance: '', surfaceQuality: '',
|
||||
@@ -730,7 +730,7 @@ export default {
|
||||
return {
|
||||
scheduleId: undefined,
|
||||
scheduleNo: '',
|
||||
actionType: '',
|
||||
actionId: '',
|
||||
prodDate: '',
|
||||
scheduleStatus: undefined,
|
||||
totalPlanWeight: undefined,
|
||||
@@ -891,9 +891,9 @@ export default {
|
||||
|
||||
handleEditScheduled(row) {
|
||||
this.editForm = { ...this.getEmptyEditForm(), ...row }
|
||||
// 确保 actionType 为数字类型以匹配下拉选项
|
||||
if (this.editForm.actionType != null && typeof this.editForm.actionType !== 'number') {
|
||||
this.editForm.actionType = Number(this.editForm.actionType)
|
||||
// 确保 actionId 为数字类型以匹配下拉选项
|
||||
if (this.editForm.actionId != null && typeof this.editForm.actionId !== 'number') {
|
||||
this.editForm.actionId = Number(this.editForm.actionId)
|
||||
}
|
||||
// 确保 scheduleStatus 为数字类型以匹配下拉选项
|
||||
if (this.editForm.scheduleStatus != null && typeof this.editForm.scheduleStatus !== 'number') {
|
||||
@@ -977,7 +977,7 @@ export default {
|
||||
this.mergeForm = {
|
||||
itemCount: this.mergeSourceRows.length,
|
||||
scheduleNo: row.scheduleNo || '',
|
||||
actionType: row.actionType != null ? Number(row.actionType) : '',
|
||||
actionId: row.actionId != null ? Number(row.actionId) : '',
|
||||
customerName: row.customerName || '',
|
||||
spec: row.spec || '',
|
||||
material: row.material || '',
|
||||
@@ -1033,9 +1033,9 @@ export default {
|
||||
return total.toFixed(3)
|
||||
},
|
||||
|
||||
getActionTypeName(actionType) {
|
||||
const p = this.processOptions.find(item => String(item.actionType) === String(actionType))
|
||||
return p ? p.name : (actionType || '')
|
||||
getActionIdName(actionId) {
|
||||
const p = this.processOptions.find(item => String(item.actionId) === String(actionId))
|
||||
return p ? p.name : (actionId || '')
|
||||
},
|
||||
|
||||
handleDetailClick(sch, detail) {
|
||||
|
||||
Reference in New Issue
Block a user