zhangwencui
5 天以前 49963c5e1329d67284de77b7930f0da96214f228
src/views/productionManagement/productionProcess/index.vue
@@ -44,7 +44,7 @@
            <div class="card-body">
              <!-- <div class="process-name">{{ process.name }}</div> -->
              <div class="process-desc">{{ process.remark || '暂无描述' }}</div>
              <div class="process-device">关联设备: {{ deviceOptions.find(item => item.id === Number(process.deviceLedgerId))?.deviceName|| '未关联' }}</div>
              <div class="process-device">关联设备: {{ (deviceOptions.find(item => item.id === Number(process.deviceLedgerId))?.deviceName) || '未关联' }}</div>
            </div>
            <div class="card-footer">
              <div class="status-tag">
@@ -570,7 +570,10 @@
    processForm.isQuality = !!process.isQuality;
    processForm.isProduction = !!process.isProduction;
    processForm.remark = process.remark || "";
    processForm.deviceLedgerId = Number(process.deviceLedgerId);
    // 如果设备 ID 为 0 或者在设备列表中找不到,则回显为空(null)
    const deviceId = Number(process.deviceLedgerId);
    const hasDevice = deviceOptions.value.some(item => item.id === deviceId);
    processForm.deviceLedgerId = deviceId && hasDevice ? deviceId : null;
    processForm.type = process.type;
    processDialogVisible.value = true;
  };