feat(生产时间): 添加生产开始时间自动填充功能

在卷材操作的各个页面中,自动将待操作任务的创建时间设置为生产开始时间。同时在生产面板中新增生产时间相关字段的显示列
This commit is contained in:
砂糖
2026-03-18 10:24:28 +08:00
parent 3d6391bf32
commit 8e6f89ee55
5 changed files with 46 additions and 8 deletions

View File

@@ -216,14 +216,14 @@
</el-form-item>
</div>
<div class="form-row">
<!-- <div class="form-row"> -->
<el-form-item label="生产开始时间" prop="productionStartTime" class="form-item-half">
<TimeInput v-model="targetCoil.productionStartTime" @input="calculateProductionDuration" :disabled="readonly" />
</el-form-item>
<el-form-item label="生产结束时间" prop="productionEndTime" class="form-item-half">
<TimeInput v-model="targetCoil.productionEndTime" @input="calculateProductionDuration" :disabled="readonly" :show-now-button="true" />
</el-form-item>
</div>
<!-- </div> -->
<div class="form-row">
<el-form-item label="生产耗时" prop="productionDuration" class="form-item-half">
@@ -240,7 +240,7 @@
<script>
import { getMaterialCoil, mergeMaterialCoil } from '@/api/wms/coil';
import { listPendingAction, completeAction, addPendingAction } from '@/api/wms/pendingAction';
import { listPendingAction, completeAction, addPendingAction, getPendingAction } from '@/api/wms/pendingAction';
import CoilSelector from '@/components/CoilSelector';
import ActualWarehouseSelect from "@/components/KLPService/ActualWarehouseSelect";
import RawMaterialSelector from "@/components/KLPService/RawMaterialSelect";
@@ -329,7 +329,10 @@ export default {
readonly: false,
// 待合卷列表(其他待操作的合卷任务)
pendingMergeList: [],
pendingLoading: false
pendingLoading: false,
// 待操作ID
actionId: null,
currentAction: {}
};
},
computed: {
@@ -377,6 +380,13 @@ export default {
this.actionId = actionId;
}
// 获取待操作详情
getPendingAction(actionId).then(res => {
// 填写生产开始时间
this.currentAction = res.data
this.$set(this.targetCoil, 'productionStartTime', res.data.createTime)
})
// 保存当前页面的待操作类型
if (actionTypeCode) {
this.actionTypeCode = actionTypeCode;