zhangwencui
2026-05-16 5cd6c8e0d3b2b887a006268331b027cec79f0745
生产追溯字段调整
已修改2个文件
152 ■■■■ 文件已修改
src/pages/productionManagement/productionOrder/pickingDetail.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/productionManagement/productionTraceability/index.vue 150 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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"
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)"
          <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 class="info-item">
            <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">{{ rowData.productionOrderDto?.customerName || '-' }}</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>
            <text class="value">{{ formatDate(rowData.productionOrderDto?.startTime) }}</text>
          </view>
          <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;