From 5cd6c8e0d3b2b887a006268331b027cec79f0745 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期六, 16 五月 2026 10:41:19 +0800
Subject: [PATCH] 生产追溯字段调整
---
src/pages/productionManagement/productionTraceability/index.vue | 152 +++++++++++++++++++++++++++++++++++++++-----------
src/pages/productionManagement/productionOrder/pickingDetail.vue | 2
2 files changed, 118 insertions(+), 36 deletions(-)
diff --git a/src/pages/productionManagement/productionOrder/pickingDetail.vue b/src/pages/productionManagement/productionOrder/pickingDetail.vue
index 9ed5f61..7aad62d 100644
--- a/src/pages/productionManagement/productionOrder/pickingDetail.vue
+++ b/src/pages/productionManagement/productionOrder/pickingDetail.vue
@@ -1,6 +1,6 @@
<template>
<view class="picking-detail">
- <PageHeader :title="棰嗘枡璇︽儏"
+ <PageHeader title="棰嗘枡璇︽儏"
@back="goBack" />
<scroll-view scroll-y
class="detail-list"
diff --git a/src/pages/productionManagement/productionTraceability/index.vue b/src/pages/productionManagement/productionTraceability/index.vue
index b761cb6..bd72fb4 100644
--- a/src/pages/productionManagement/productionTraceability/index.vue
+++ b/src/pages/productionManagement/productionTraceability/index.vue
@@ -25,45 +25,45 @@
<!-- 鍩虹淇℃伅 -->
<view class="info-card">
<view class="card-title">鍩虹淇℃伅</view>
- <view class="info-grid">
- <view class="info-item">
- <text class="label">鐢熶骇璁㈠崟鍙�</text>
- <text class="value">{{ rowData.productionOrderDto.npsNo || '-' }}</text>
+ <view class="base-info">
+ <view class="info-row">
+ <text class="label">鐢熶骇璁㈠崟鍙凤細</text>
+ <text class="value">{{ rowData.productionOrderDto?.npsNo || '-' }}</text>
</view>
- <view class="info-item">
- <text class="label">浜у搧鍚嶇О</text>
- <text class="value">{{ rowData.productionOrderDto.productName || '-' }}</text>
+ <view class="info-row">
+ <text class="label">浜у搧鍚嶇О锛�</text>
+ <text class="value">{{ rowData.productionOrderDto?.productName || '-' }}</text>
</view>
- <view class="info-item">
- <text class="label">浜у搧瑙勬牸</text>
- <text class="value">{{ rowData.productionOrderDto.model || '-' }}</text>
+ <view class="info-row">
+ <text class="label">瑙勬牸鍨嬪彿锛�</text>
+ <text class="value">{{ rowData.productionOrderDto?.model || '-' }}</text>
</view>
- <view class="info-item">
- <text class="label">璁″垝鏁伴噺</text>
- <text class="value">{{ rowData.productionOrderDto.quantity || 0 }} {{ rowData.productionOrderDto.unit || '' }}</text>
+ <view class="info-row">
+ <text class="label">璁″垝鏁伴噺锛�</text>
+ <text class="value">{{ rowData.productionOrderDto?.quantity || 0 }} {{ rowData.productionOrderDto?.unit }}</text>
</view>
- <view class="info-item">
- <text class="label">褰撳墠鐘舵��</text>
- <up-tag :text="getStatusText(rowData.productionOrderDto.status)"
- style="width:100rpx"
- :type="getStatusType(rowData.productionOrderDto.status)"
- size="mini" />
+ <view class="info-row">
+ <text class="label">褰撳墠鐘舵�侊細</text>
+ <view class="value">
+ <up-tag :text="getStatusText(rowData.productionOrderDto?.status)"
+ :type="getStatusType(rowData.productionOrderDto?.status)"
+ size="mini" />
+ </view>
</view>
- <view class="info-item">
- <text class="label">瀹㈡埛鍚嶇О</text>
- <text class="value">{{ rowData.productionOrderDto.customerName || '-' }}</text>
+ <view class="info-row">
+ <text class="label">瀹㈡埛鍚嶇О锛�</text>
+ <text class="value">{{ rowData.productionOrderDto?.customerName || '-' }}</text>
</view>
- <view class="info-item">
- <text class="label">寮�濮嬫棩鏈�</text>
- <text class="value">{{ formatDate(rowData.productionOrderDto.startTime) }}</text>
+ <view class="info-row">
+ <text class="label">寮�濮嬫棩鏈燂細</text>
+ <text class="value">{{ formatDate(rowData.productionOrderDto?.startTime) }}</text>
</view>
- <view class="info-item full-width">
- <text class="label">瀹屾垚杩涘害</text>
- <view class="progress-container">
- <up-line-progress :percentage="formatProgress(rowData.productionOrderDto.completionStatus)"
- :activeColor="progressColor(rowData.productionOrderDto.completionStatus)"
- height="8"></up-line-progress>
- <text class="progress-text">{{ formatProgress(rowData.productionOrderDto.completionStatus) }}%</text>
+ <view class="info-row">
+ <text class="label">瀹屾垚杩涘害锛�</text>
+ <view class="value progress-box">
+ <up-line-progress :percentage="formatProgress(rowData.productionOrderDto?.completionStatus)"
+ :activeColor="progressColor(formatProgress(rowData.productionOrderDto?.completionStatus))"
+ :showText="true" />
</view>
</view>
</view>
@@ -86,8 +86,16 @@
<text class="value">{{ item.workOrder.productName }} / {{ item.workOrder.model }}</text>
</view>
<view class="content-row">
+ <text class="label">褰撳墠宸ュ簭锛�</text>
+ <text class="value">{{ item.workOrder.operationName || '-' }}</text>
+ </view>
+ <view class="content-row">
<text class="label">闇�姹�/瀹屾垚锛�</text>
<text class="value">{{ item.workOrder.planQuantity }} / {{ item.workOrder.completeQuantity }}</text>
+ </view>
+ <view class="content-row">
+ <text class="label">鎶ュ簾鏁伴噺锛�</text>
+ <text class="value error-text">{{ item.workOrder.scrapQty || 0 }}</text>
</view>
</view>
<view class="card-footer">
@@ -183,6 +191,9 @@
class="detail-item">
<view class="item-main">
<view class="item-row"><text class="label">鎶ュ伐鍗曞彿锛�</text><text class="value">{{ report.productNo }}</text></view>
+ <view class="item-row"><text class="label">浜у嚭鏁伴噺锛�</text><text class="value">{{ report.quantity || 0 }}</text></view>
+ <view class="item-row"><text class="label">鎶ュ簾鏁伴噺锛�</text><text class="value error-text">{{ report.scrapQty || 0 }}</text></view>
+ <view class="item-row"><text class="label">宸ユ椂(h)锛�</text><text class="value">{{ report.workHour || 0 }}</text></view>
<view class="item-row"><text class="label">鍒涘缓浜猴細</text><text class="value">{{ report.userName }}</text></view>
<view class="item-row"><text class="label">鍒涘缓鏃堕棿锛�</text><text class="value">{{ formatDate(report.createTime, '{y}-{m}-{d} {h}:{i}') }}</text></view>
</view>
@@ -216,10 +227,10 @@
<view v-for="(item, idx) in inputListData"
:key="idx"
class="input-item">
- <view class="input-row"><text class="label">鐗╂枡鍚嶇О锛�</text><text class="value">{{ item.materialName }}</text></view>
- <view class="input-row"><text class="label">瑙勬牸鍨嬪彿锛�</text><text class="value">{{ item.model }}</text></view>
+ <view class="input-row"><text class="label">鎶ュ伐鍗曞彿锛�</text><text class="value">{{ item.productNo }}</text></view>
+ <view class="input-row"><text class="label">鎶曞叆浜у搧鍚嶇О锛�</text><text class="value">{{ item.productName }}</text></view>
+ <view class="input-row"><text class="label">鎶曞叆浜у搧鍨嬪彿锛�</text><text class="value">{{ item.model }}</text></view>
<view class="input-row"><text class="label">鎶曞叆鏁伴噺锛�</text><text class="value">{{ item.quantity }} {{ item.unit }}</text></view>
- <view class="input-row"><text class="label">鎵规鍙凤細</text><text class="value">{{ item.batchNo }}</text></view>
</view>
<view v-if="!inputListData || inputListData.length === 0"
class="no-data-minor">{{ inputLoading ? '鍔犺浇涓�...' : '鏆傛棤鎶曞叆璁板綍' }}</view>
@@ -253,18 +264,26 @@
size="mini" /></view>
<view class="info-item"><text class="label">妫�楠屽憳</text><text class="value">{{ record.userName }}</text></view>
<view class="info-item"><text class="label">鏁伴噺</text><text class="value">{{ record.quantity }} {{ record.unit }}</text></view>
+ <view class="info-item"><text class="label">鎶ュ伐鍗曞彿</text><text class="value">{{ record.reportNo || '-' }}</text></view>
+ <view class="info-item"><text class="label">浜у搧鍚嶇О</text><text class="value">{{ record.productName || '-' }}</text></view>
+ <view class="info-item"><text class="label">瑙勬牸鍨嬪彿</text><text class="value">{{ record.model || '-' }}</text></view>
+ <view class="info-item"><text class="label">妫�娴嬪崟浣�</text><text class="value">{{ record.checkCompany || '-' }}</text></view>
</view>
<view class="params-table">
<view class="table-header">
<text class="col">鎸囨爣</text>
+ <text class="col">鍗曚綅</text>
<text class="col">鏍囧噯鍊�</text>
+ <text class="col">鍐呮帶鍊�</text>
<text class="col">瀹為檯鍊�</text>
</view>
<view v-for="(param, pIdx) in record.inspectParamList"
:key="pIdx"
class="table-row">
<text class="col">{{ param.parameterItem }}</text>
+ <text class="col">{{ param.unit || '-' }}</text>
<text class="col">{{ param.standardValue }}</text>
+ <text class="col">{{ param.controlValue || '-' }}</text>
<text class="col"
:class="{ 'error-text': param.testValue != param.standardValue }">{{ param.testValue }}</text>
</view>
@@ -440,6 +459,7 @@
workOrder: row.workOrder || {},
reports: (row.reportList || []).map(r => ({
...r.reportMain,
+ ...(r.reportOutputList ? r.reportOutputList[0] : {}),
id: r.reportMain.id,
productionOperationParamList: r.reportParamList || [],
})),
@@ -471,6 +491,8 @@
qualityRecords.value = inspects.map(i => ({
...i.inspect,
reportNo: i.reportNo,
+ productName: row.workOrder?.productName || "-",
+ model: row.workOrder?.model || "-",
userName: i.reportMain?.userName || "-",
inspectParamList: i.inspectParamList || [],
}));
@@ -708,6 +730,66 @@
}
}
+ .base-info {
+ background: #fff;
+ padding: 24rpx;
+ border-radius: 16rpx;
+ margin-bottom: 30rpx;
+
+ .info-row {
+ margin-bottom: 16rpx;
+ font-size: 28rpx;
+ display: flex;
+ align-items: center;
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+
+ .label {
+ color: #999;
+ min-width: 180rpx;
+ }
+ .value {
+ color: #333;
+ flex: 1;
+ font-weight: 500;
+
+ &.progress-box {
+ flex: 1;
+ }
+ }
+ }
+ }
+
+ .info-grid {
+ display: flex;
+ flex-wrap: wrap;
+ padding: 10rpx 0;
+
+ .info-item {
+ width: 50%;
+ margin-bottom: 20rpx;
+ display: flex;
+ flex-direction: column;
+
+ &.full-width {
+ width: 100%;
+ }
+
+ .label {
+ font-size: 24rpx;
+ color: #999;
+ margin-bottom: 4rpx;
+ }
+ .value {
+ font-size: 28rpx;
+ color: #333;
+ font-weight: 500;
+ }
+ }
+ }
+
.popup-content {
background: #fff;
padding: 30rpx;
--
Gitblit v1.9.3