|
|
@@ -623,7 +623,7 @@
|
|
|
|
|
|
if (this.workOrderId) {
|
|
|
// 并发获取工序任务列表和物料数据
|
|
|
- let [routingTaskObj, pickAndFeedList, inStoreageRecordList] =
|
|
|
+ let [routingTaskReslut, pickAndFeedList, inStoreageRecordList] =
|
|
|
await Promise.all([
|
|
|
listProduceTaskAndFormNum({ workOrderId: this.workOrderId }),
|
|
|
getPickAndFeed({
|
|
|
@@ -635,8 +635,44 @@
|
|
|
})
|
|
|
]);
|
|
|
pickAndFeed = pickAndFeedList || [];
|
|
|
- routingTaskList = routingTaskObj?.list || [];
|
|
|
+ routingTaskList = routingTaskReslut || [];
|
|
|
console.log('inStoreageRecordList', inStoreageRecordList);
|
|
|
+ if (inStoreageRecordList && inStoreageRecordList.length > 0) {
|
|
|
+ // 成品入库一行的记录
|
|
|
+ const rows = this.rulesDetailList
|
|
|
+ .filter((i) => i.statisticsType == 1)
|
|
|
+ .map((i) => {
|
|
|
+ return {
|
|
|
+ title: i.paramValue,
|
|
|
+ value: i.defaultValue,
|
|
|
+ formula: i.formula,
|
|
|
+ unit: i.unitName || this.unit,
|
|
|
+ paramType: i.paramType
|
|
|
+ };
|
|
|
+ });
|
|
|
+
|
|
|
+ const list = inStoreageRecordList.map((record) => {
|
|
|
+ const rowsCopy = JSON.parse(JSON.stringify(rows));
|
|
|
+ rowsCopy.forEach((item) => {
|
|
|
+ if (item.title.includes('成品入库数')) {
|
|
|
+ item.value = record.totalCount;
|
|
|
+ } else if (
|
|
|
+ item.title === '成品入库时间' ||
|
|
|
+ item.title === '入库时间'
|
|
|
+ ) {
|
|
|
+ item.value = record.executorTime;
|
|
|
+ }
|
|
|
+ item.unit = record.measuringUnit || this.unit;
|
|
|
+ });
|
|
|
+ return rowsCopy;
|
|
|
+ });
|
|
|
+ // 赋值
|
|
|
+ this.localDetails[0].statisticsValue = list;
|
|
|
+ console.log(
|
|
|
+ 'this.localDetails[0].statisticsValue 重新',
|
|
|
+ this.localDetails[0].statisticsValue
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
console.log('routingTaskList 工序数据', routingTaskList);
|
|
|
@@ -724,7 +760,7 @@
|
|
|
|
|
|
data.unshift({
|
|
|
title: '工序名称',
|
|
|
- value: task.name || task.taskInstanceName,
|
|
|
+ value: task.name || task.produceTaskName,
|
|
|
formula: '',
|
|
|
unit: '',
|
|
|
// 仅展示不计算和输入
|