huminmin
2026-05-16 7421c4030ee8df1fc1780b3c5e0b1fcffb981445
src/views/productionManagement/workOrder/components/CopperPrintingForm.vue
@@ -18,10 +18,6 @@
    type: Boolean,
    default: false
  },
  detailData: {
    type: Object,
    default: () => ({}),
  },
  row: {
    type: Object,
    default: () => ({}),
@@ -34,6 +30,21 @@
  get: () => props.isShow,
  set: (value: boolean) => emits("update:isShow", value),
});
/** 工序展示名:工单为 processName,报工列表为 process,缺省与旧版一致为「印铜」 */
const processTitlePrefix = computed(() => {
  const row = props.row as Record<string, unknown> | null | undefined;
  if (!row) return "印铜";
  const name = row.processName ?? row.process;
  if (name != null && String(name).trim() !== "") {
    return String(name).trim();
  }
  return "印铜";
});
const dialogTitle = computed(() =>
  props.isEdit ? `${processTitlePrefix.value}报工` : `${processTitlePrefix.value}详情`
);
const formData = reactive({
  productProcessRouteItemId: undefined,
@@ -150,8 +161,8 @@
const initData = () => {
  if (!props.isEdit) {
    formData.otherData = JSON.parse(props.detailData.otherData || '{}');
    formData.quantity = props.detailData.quantity;
    formData.otherData = JSON.parse(props.row.otherData || '{}');
    formData.quantity = props.row.quantity;
  } else {
    const row = props.row;
    formData.planQuantity = row.planQuantity
@@ -174,7 +185,7 @@
<template>
  <el-dialog v-model="visible"
             title="印铜报工"
             :title="dialogTitle"
             width="90%">
    <el-form :model="formData">
      <table class="report-table">