chenhj
2 天以前 648f83f5d4480ae9c2794d5f4e114085943bdf6e
造粒报工
已添加1个文件
已修改3个文件
794 ■■■■■ 文件已修改
src/views/productionManagement/productionReporting/components/Detail.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/workOrder/components/GranulationForm.vue 757 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/workOrder/components/ProductionRecordForm.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/workOrder/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionReporting/components/Detail.vue
@@ -1,5 +1,5 @@
<script setup lang="ts">
import {computed, onMounted} from "vue";
import {computed, onMounted, ref} from "vue";
defineOptions({
  name: "ReportingDetail"
@@ -23,10 +23,19 @@
  set: (value: boolean) => emits("update:isShow", value),
});
const otherData = ref([])
const otherData = ref({})
const otherDataEntries = computed(() => {
  return Object.entries(otherData.value || {})
      .filter(([key]) => key !== "rows")
      .map(([key, value]) => ({key, value}));
});
const init = () => {
  if (props.row.otherData !== null && props.row.otherData !== '') {
    otherData.value = JSON.parse(props.row.otherData);
    try {
      otherData.value = JSON.parse(props.row.otherData);
    } catch {
      otherData.value = {};
    }
  }
};
@@ -52,7 +61,15 @@
      <el-descriptions-item label="单位">{{ row.scrapQty || '-' }}</el-descriptions-item>
      <el-descriptions-item label="创建时间">{{ row.createTime || '-' }}</el-descriptions-item>
      <el-descriptions-item
          v-for="item in otherData"
          v-for="item in otherDataEntries"
          :key="item.key"
          :label="item.key"
      >
        {{ item.value || '-' }}
      </el-descriptions-item>
      <el-descriptions-item
          v-for="item in (otherData.rows || [])"
          :key="item.parameterItem"
          :label="`${item.parameterItem}`"
      >
        {{ item.value || '-' }}
src/views/productionManagement/workOrder/components/GranulationForm.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,757 @@
<script setup lang="ts">
import {computed, onMounted, reactive, ref} from "vue";
import {userListNoPageByTenantId} from "@/api/system/user.js";
import {ElMessage} from "element-plus";
import {addProductMain} from "@/api/productionManagement/workOrder.js";
defineOptions({
  name: "GranulationForm"
});
const props = defineProps({
  isShow: {
    type: Boolean,
    required: true
  },
  isEdit: {
    type: Boolean,
    default: false
  },
  row: {
    type: Object,
    default: () => ({}),
  }
});
const emits = defineEmits(["update:isShow", "refreshData"]);
const visible = computed({
  get: () => props.isShow,
  set: (value: boolean) => emits("update:isShow", value),
});
const formData = reactive({
  productProcessRouteItemId: undefined,
  workOrderId: undefined,
  planQuantity: undefined,
  reportWork: undefined,
  productMainId: undefined,
  quantity: undefined, // äº§å‡ºæ•°é‡
  userId: undefined, // ä½œä¸šå‘˜
  userName: undefined, // ä½œä¸šå‘˜
  otherData: {
    whiteMaterialNumber: undefined, // ç™½æ–™æ–™å·
    ingredientDateTime: undefined, // é…æ–™æ—¥æœŸæ—¶é—´
    weight: undefined, // é‡é‡
    stirredMillIncludesMixing: {
      oneBucketStartTime: undefined, // 1桶开始时间
      oneBucketEndTime: undefined, // 1桶结束时间
      twoBucketStartTime: undefined, // 2桶开始时间
      twoBucketEndTime: undefined, // 2桶结束时间
      fiveBucketStartTime: undefined, // 5桶开始时间
      fiveBucketEndTime: undefined, // 5桶结束时间
      powderWeight: undefined, // ç²‰æ–™é‡é‡
      waterWeight: undefined, // æ°´é‡é‡
      stirStartTime: undefined, //  æ…拌开始时间
      stirEndTime: undefined, //  æ…拌结束时间
      stirDispersantWeight: undefined, //  æ…拌分散剂重量
      userId: undefined,
      userName: undefined,
      confirmId: undefined,
      confirmName: undefined,
    },
    granulation: {
      output: undefined, // äº§å‡ºæ€»äº§é‡
      qualifiedMaterialWeight: undefined, // åˆæ ¼æ–™é‡é‡
      wallMaterial: undefined, // å£æ–™
      wasteMaterials: undefined, // å°¾æ–™
    },
    burningMaterial: {
      startTime: undefined, // å¼€å§‹æ—¶é—´
      endTime: undefined, // ç»“束时间
      furnaceNumber: undefined, // ç‚‰å·
      highestTemperatureZone: undefined, // æœ€é«˜æ¸©åŒº
      calcinationRate: undefined, // ç……烧速度
      calcinationWeight: undefined, // ç……烧重量
      userId: undefined,
      userName: undefined,
      confirmId: undefined,
      confirmName: undefined,
    },
    powder: {
      excess: undefined, // ç²‰ç¢Žæ–™æ”¾æ–™æ²¡è¶…过料斗限位线
    },
    burntBlockBatchNumber: undefined, // çƒ§å—料批次号
    burntBlockBatchNumberDate: undefined, // çƒ§å—料日期
    stirredMill: {
      threeBucketStartTime: undefined, // 3桶开始时间
      threeBucketEndTime: undefined, // 3桶结束时间
      threeBucketMixingPowderWeight: undefined, // 3桶加粉料重量
      fourBucketStartTime: undefined, // 4桶开始时间
      fourBucketEndTime: undefined, // 4桶结束时间
      fourBucketMixingPowderWeight: undefined, // 4桶加粉料重量
      sixBucketStartTime: undefined, // 6桶开始时间
      sixBucketEndTime: undefined, // 6桶结束时间
      sixBucketMixingPowderWeight: undefined, // 6桶加粉料重量
      userId: undefined,
      userName: undefined,
      confirmId: undefined,
      confirmName: undefined,
    },
    stir: {
      startTime: undefined,
      endTime: undefined,
      weightRatio: undefined, // é‡é‡æ¯”(水/料)
      pva: undefined, // PVAn粘合剂重量
      dispersantWeight: undefined, // åˆ†æ•£å‰‚重量
      releaseAgentWeight: undefined, // è„±æ¨¡å‰‚重量
    },
    granulationB: {
      startTime: undefined,
      endTime: undefined,
      atomizerRotationalSpeed: undefined, // é›¾åŒ–器转速
      importSpeed: undefined, // è¿›å£é€Ÿåº¦
      outSpeed: undefined, // å‡ºå£é€Ÿåº¦
      qualifiedWeight: undefined, // åˆæ ¼é‡é‡
      wallMaterial: undefined, // å£æ–™
      wasteMaterials: undefined, // å°¾æ–™
      userId: undefined,
      userName: undefined,
      confirmId: undefined,
      confirmName: undefined,
    },
    remark: undefined, // å¤‡æ³¨
  }
})
const userOptions = ref([]);
const getUserList = () => {
  userListNoPageByTenantId()
      .then(res => {
        if (res.code === 200) {
          userOptions.value = res.data || [];
        }
      })
      .catch(err => {
        console.error("获取用户列表失败", err);
      });
};
// ç”¨æˆ·é€‰æ‹©å˜åŒ–æ—¶æ›´æ–° userName
const handleUserChange = (userId: any, reportType: string) => {
  if (userId) {
    const selectedUser = userOptions.value.find(user => user.userId === userId);
    switch (reportType) {
      case 'stirredMillIncludesMixingUserId':
        formData.otherData.stirredMillIncludesMixing.userName = selectedUser.userName;
        break;
      case 'stirredMillIncludesMixingConfirmId':
        formData.otherData.stirredMillIncludesMixing.confirmName = selectedUser.userName;
        break;
      case 'burningMaterialUserId':
        formData.otherData.burningMaterial.userName = selectedUser.userName;
        break;
      case 'burningMaterialConfirmId':
        formData.otherData.stirredMillIncludesMixing.confirmName = selectedUser.userName;
        break;
      case 'stirredMillUserId':
        formData.otherData.stirredMill.userName = selectedUser.userName;
        break;
      case 'stirredMillConfirmId':
        formData.otherData.stirredMill.confirmName = selectedUser.userName;
        break;
    }
  } else {
    switch (reportType) {
      case 'stirredMillIncludesMixingUserId':
        formData.otherData.stirredMillIncludesMixing.userName = "";
        break;
      case 'stirredMillIncludesMixingConfirmId':
        formData.otherData.stirredMillIncludesMixing.confirmName = "";
        break;
      case 'burningMaterialUserId':
        formData.otherData.burningMaterial.userName = "";
        break;
      case 'burningMaterialConfirmId':
        formData.otherData.stirredMillIncludesMixing.confirmName = "";
        break;
      case 'stirredMillUserId':
        formData.otherData.stirredMill.userName = "";
        break;
      case 'stirredMillConfirmId':
        formData.otherData.stirredMill.confirmName = "";
        break;
    }
  }
};
// todo ä¿®æ”¹ä½œä¸šå‘˜ï¼Œåœ¨æ‰€æœ‰ä½œä¸šå‘˜ä¸­èŽ·å–å¡«å…¥çš„å€¼ï¼Œå¦‚æžœæ²¡æœ‰åˆ™æç¤ºä¸æäº¤
const handleReport = () => {
  if (!formData.otherData.userId && !formData.otherData.surfaceCopperPasteUserId && !formData.otherData.underlyingCopperPasteUserId) {
    ElMessage.error('请选择作业员')
    return;
  }
  if (!formData.quantity || formData.quantity <= 0) {
    ElMessage.error('请输入生产数量')
    return;
  }
  formData.userId = formData.otherData.surfaceCopperPasteUserId || formData.otherData.underlyingCopperPasteUserId;
  const otherData = JSON.stringify(formData.otherData);
  const submitData = {
    ...formData,
    otherData: otherData
  };
  addProductMain(submitData).then(res => {
    if (res.code === 200) {
      ElMessage({
        message: '报工成功',
        type: 'success',
      })
      emits("refreshData")
      visible.value = false;
    } else {
      ElMessage.error('报工失败')
    }
  });
};
const initData = () => {
  if (!props.isEdit) {
    formData.otherData = JSON.parse(props.row.otherData || '{}');
    formData.quantity = props.row.quantity;
  } else {
    const row = props.row;
    formData.planQuantity = row.planQuantity
    formData.productProcessRouteItemId = row.productProcessRouteItemId
    formData.workOrderId = row.id
    formData.reportWork = row.reportWork
    formData.productMainId = row.productMainId
  }
}
const displayValue = (value: any) => {
  return value === undefined || value === null || value === "" ? "-" : value;
};
onMounted(() => {
  getUserList();
  initData()
})
</script>
<template>
  <el-dialog v-model="visible"
             :title="isEdit? '造粒报工' : '详情'"
             width="90%">
    <el-form :model="formData">
      <table class="report-table">
        <tbody>
        <tr>
          <td class="label" colspan="2">白料料号:</td>
          <td colspan="3">
            <el-input v-if="props.isEdit" v-model="formData.otherData.whiteMaterialNumber" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.whiteMaterialNumber) }}</span>
          </td>
          <td class="label" colspan="2">配料日期:</td>
          <td colspan="5">
            <el-date-picker
                v-if="props.isEdit"
                v-model="formData.otherData.ingredientDateTime"
                type="datetime"
                value-format="YYYY-MM-DD HH:mm:ss"
                format="YYYY-MM-DD HH:mm:ss"
                placeholder="请选择"
                style="width: 100%"
            />
            <span v-else class="view-value">{{ displayValue(formData.otherData.ingredientDateTime) }}</span>
          </td>
          <td class="label" colspan="2">重量:</td>
          <td colspan="2">
            <el-input v-if="props.isEdit" v-model="formData.otherData.weight" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.weight) }}</span>
          </td>
        </tr>
        <tr>
          <td class="label" colspan="2" rowspan="5">搅拌磨(含搅拌):</td>
          <td class="label" colspan="7">搅拌磨</td>
          <td class="label" colspan="5" rowspan="2">搅拌桶搅拌</td>
          <td class="label"  colspan="2" rowspan="3">
            <span>作业员:</span>
            <el-select v-model="formData.otherData.stirredMillIncludesMixing.userId"
                       v-if="props.isEdit"
                       style="width: 100%"
                       placeholder="请选择作业员"
                       clearable
                       filterable
                       @change="handleUserChange($event, 'stirredMillIncludesMixingUserId')">
              <el-option v-for="user in userOptions"
                         :key="user.userId"
                         :label="user.userName"
                         :value="user.userId"/>
            </el-select>
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMillIncludesMixing.userName || formData.otherData.stirredMillIncludesMixing.userId) }}</span>
          </td>
        </tr>
        <tr>
          <td class="label" colspan="2"></td>
          <td class="label" colspan="1">1号桶:</td>
          <td class="label" colspan="2">2号桶:</td>
          <td class="label" colspan="2">5号桶:</td>
        </tr>
        <tr>
          <td class="label" colspan="2">开始时间:</td>
          <td colspan="1">
            <el-date-picker
                v-if="props.isEdit"
                v-model="formData.otherData.stirredMillIncludesMixing.oneBucketStartTime"
                type="datetime"
                value-format="YYYY-MM-DD HH:mm:ss"
                format="YYYY-MM-DD HH:mm:ss"
                placeholder="请选择"
                style="width: 100%"
            />
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMillIncludesMixing.oneBucketStartTime) }}</span>
          </td>
          <td colspan="2">
            <el-date-picker
                v-if="props.isEdit"
                v-model="formData.otherData.stirredMillIncludesMixing.twoBucketStartTime"
                type="datetime"
                value-format="YYYY-MM-DD HH:mm:ss"
                format="YYYY-MM-DD HH:mm:ss"
                placeholder="请选择"
                style="width: 100%"
            />
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMillIncludesMixing.twoBucketStartTime) }}</span>
          </td>
          <td colspan="2">
            <el-date-picker
                v-if="props.isEdit"
                v-model="formData.otherData.stirredMillIncludesMixing.fiveBucketStartTime"
                type="datetime"
                value-format="YYYY-MM-DD HH:mm:ss"
                format="YYYY-MM-DD HH:mm:ss"
                placeholder="请选择"
                style="width: 100%"
            />
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMillIncludesMixing.fiveBucketStartTime) }}</span>
          </td>
            <td class="label" colspan="5">
              <span>开始时间:</span>
              <el-date-picker
                  v-if="props.isEdit"
                  v-model="formData.otherData.stirredMillIncludesMixing.stirStartTime"
                  type="datetime"
                  value-format="YYYY-MM-DD HH:mm:ss"
                  format="YYYY-MM-DD HH:mm:ss"
                  placeholder="请选择"
                  style="width: 100%"
              />
              <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMillIncludesMixing.stirStartTime) }}</span>
            </td>
        </tr>
        <tr>
          <td class="label" colspan="2">结束时间:</td>
          <td colspan="1">
            <el-date-picker
                v-if="props.isEdit"
                v-model="formData.otherData.stirredMillIncludesMixing.oneBucketEndTime"
                type="datetime"
                value-format="YYYY-MM-DD HH:mm:ss"
                format="YYYY-MM-DD HH:mm:ss"
                placeholder="请选择"
                style="width: 100%"
            />
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMillIncludesMixing.oneBucketEndTime) }}</span>
          </td>
          <td colspan="2">
            <el-date-picker
                v-if="props.isEdit"
                v-model="formData.otherData.stirredMillIncludesMixing.twoBucketEndTime"
                type="datetime"
                value-format="YYYY-MM-DD HH:mm:ss"
                format="YYYY-MM-DD HH:mm:ss"
                placeholder="请选择"
                style="width: 100%"
            />
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMillIncludesMixing.twoBucketEndTime) }}</span>
          </td>
          <td colspan="2">
            <el-date-picker
                v-if="props.isEdit"
                v-model="formData.otherData.stirredMillIncludesMixing.fiveBucketEndTime"
                type="datetime"
                value-format="YYYY-MM-DD HH:mm:ss"
                format="YYYY-MM-DD HH:mm:ss"
                placeholder="请选择"
                style="width: 100%"
            />
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMillIncludesMixing.fiveBucketEndTime) }}</span>
          </td>
          <td colspan="5">
            <span>结束时间:</span>
            <el-date-picker
                v-if="props.isEdit"
                v-model="formData.otherData.stirredMillIncludesMixing.stirEndTime"
                type="datetime"
                value-format="YYYY-MM-DD HH:mm:ss"
                format="YYYY-MM-DD HH:mm:ss"
                placeholder="请选择"
                style="width: 100%"
            />
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMillIncludesMixing.stirEndTime) }}</span>
          </td>
          <td class="label"  colspan="2" rowspan="3">
            <span>确认人:</span>
            <el-select v-model="formData.otherData.stirredMillIncludesMixing.confirmId"
                       v-if="props.isEdit"
                       style="width: 100%"
                       placeholder="请选择确认人"
                       clearable
                       filterable
                       @change="handleUserChange($event, 'stirredMillIncludesMixingConfirmId')">
              <el-option v-for="user in userOptions"
                         :key="user.userId"
                         :label="user.userName"
                         :value="user.userId"/>
            </el-select>
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMillIncludesMixing.confirmName || formData.otherData.stirredMillIncludesMixing.confirmId) }}</span>
          </td>
        </tr>
        <tr>
          <td class="label" colspan="2">粉料重量:</td>
          <td colspan="1">
            <el-input v-if="props.isEdit" v-model="formData.otherData.stirredMillIncludesMixing.powderWeight" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMillIncludesMixing.powderWeight) }}</span>
            <span>KG</span>
          </td>
          <td class="label" colspan="2">水重量:</td>
          <td colspan="2">
            <el-input v-if="props.isEdit" v-model="formData.otherData.stirredMillIncludesMixing.waterWeight" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMillIncludesMixing.waterWeight) }}</span>
            <span>KG</span>
          </td>
          <td class="label" colspan="2">分散剂重量:</td>
          <td colspan="3">
            <el-input v-if="props.isEdit" v-model="formData.otherData.stirredMillIncludesMixing.stirDispersantWeight" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMillIncludesMixing.stirDispersantWeight) }}</span>
            <span>g</span>
          </td>
        </tr>
        <tr>
          <td class="label" colspan="2">造粒:</td>
          <td class="label" colspan="2">产出总重量:</td>
          <td colspan="1">
            <el-input v-if="props.isEdit" v-model="formData.otherData.granulation.output" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.granulation.output) }}</span>
            <span>KG</span>
          </td>
          <td class="label" colspan="2">合格料重量:</td>
          <td colspan="2">
            <el-input v-if="props.isEdit" v-model="formData.otherData.granulation.qualifiedMaterialWeight" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.granulation.qualifiedMaterialWeight) }}</span>
            <span>KG</span>
          </td>
          <td class="label" colspan="2">
            å£æ–™ï¼š
            <el-input v-if="props.isEdit" v-model="formData.otherData.granulation.wallMaterial" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.granulation.wallMaterial) }}</span>
          </td>
          <td colspan="3">
            å°¾æ–™ï¼š
            <el-input v-if="props.isEdit" v-model="formData.otherData.granulation.wasteMaterials" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.granulation.wasteMaterials) }}</span>
            <span>KG</span>
          </td>
        </tr>
        <tr>
          <td class="label" colspan="2" rowspan="3">烧料:</td>
          <td class="label"  colspan="7">
            <span>开始时间:</span>
            <el-date-picker
                v-if="props.isEdit"
                v-model="formData.otherData.burningMaterial.startTime"
                type="datetime"
                value-format="YYYY-MM-DD HH:mm:ss"
                format="YYYY-MM-DD HH:mm:ss"
                placeholder="请选择"
                style="width: 100%"
            />
            <span v-else class="view-value">{{ displayValue(formData.otherData.burningMaterial.startTime) }}</span>
          </td>
          <td class="label"  colspan="5">
            <span>结束时间:</span>
            <el-date-picker
                v-if="props.isEdit"
                v-model="formData.otherData.burningMaterial.endTime"
                type="datetime"
                value-format="YYYY-MM-DD HH:mm:ss"
                format="YYYY-MM-DD HH:mm:ss"
                placeholder="请选择"
                style="width: 100%"
            />
            <span v-else class="view-value">{{ displayValue(formData.otherData.burningMaterial.endTime) }}</span>
          </td>
          <td class="label"  colspan="2" rowspan="2">
            <span>作业员:</span>
            <el-select v-model="formData.otherData.burningMaterial.userId"
                       v-if="props.isEdit"
                       style="width: 100%"
                       placeholder="请选择作业员"
                       clearable
                       filterable
                       @change="handleUserChange($event, 'burningMaterialUserId')">
              <el-option v-for="user in userOptions"
                         :key="user.userId"
                         :label="user.userName"
                         :value="user.userId"/>
            </el-select>
            <span v-else class="view-value">{{ displayValue(formData.otherData.burningMaterial.userName || formData.otherData.burningMaterial.userId) }}</span>
          </td>
        </tr>
        <tr>
          <td class="label"  colspan="7">
            <span>炉号:</span>
            <el-input v-if="props.isEdit" v-model="formData.otherData.burningMaterial.furnaceNumber" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.burningMaterial.furnaceNumber) }}</span>
          </td>
          <td class="label"  colspan="5">
            <span>最高温度区:</span>
            <el-input v-if="props.isEdit" v-model="formData.otherData.burningMaterial.highestTemperatureZone" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.burningMaterial.highestTemperatureZone) }}</span>
          </td>
        </tr>
        <tr>
          <td class="label"  colspan="7">
            <span>煅烧速度:</span>
            <el-input v-if="props.isEdit" v-model="formData.otherData.burningMaterial.calcinationRate" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.burningMaterial.calcinationRate) }}</span>
            <span>min/板</span>
          </td>
          <td class="label"  colspan="5">
            <span>煅烧后重量:</span>
            <el-input v-if="props.isEdit" v-model="formData.otherData.burningMaterial.calcinationWeight" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.burningMaterial.calcinationWeight) }}</span>
            <span>KG</span>
          </td>
          <td class="label"  colspan="2" rowspan="3">
            <span>确认人:</span>
            <el-select v-model="formData.otherData.burningMaterial.confirmId"
                       v-if="props.isEdit"
                       style="width: 100%"
                       placeholder="请选择确认人"
                       clearable
                       filterable
                       @change="handleUserChange($event, 'burningMaterialConfirmId')">
              <el-option v-for="user in userOptions"
                         :key="user.userId"
                         :label="user.userName"
                         :value="user.userId"/>
            </el-select>
            <span v-else class="view-value">{{ displayValue(formData.otherData.burningMaterial.confirmName || formData.otherData.burningMaterial.confirmId) }}</span>
          </td>
        </tr>
        <tr>
          <td class="label"  colspan="2">粉料</td>
          <td class="label"  colspan="12">
            <span>粉碎料放料没超过料斗限位线:</span>
            <el-checkbox-group v-if="props.isEdit" v-model="formData.otherData.powder.excess">
              <el-checkbox label="是" value="是" />
              <el-checkbox label="否" value="否" />
            </el-checkbox-group>
            <span v-else class="view-value">{{ displayValue(formData.otherData.powder.excess) }}</span>
          </td>
        </tr>
        <tr>
          <td class="label"  colspan="9">
            <span>烧块料批号:</span>
            <el-input v-if="props.isEdit" v-model="formData.otherData.burntBlockBatchNumber" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.burntBlockBatchNumber) }}</span>
          </td>
          <td class="label"  colspan="2">日期:</td>
          <td class="label"  colspan="3">
            <el-input v-if="props.isEdit" v-model="formData.otherData.burntBlockBatchNumberDate" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.burntBlockBatchNumberDate) }}</span>
          </td>
          <td class="label"  colspan="2" rowspan="4">
            <span>作业员:</span>
            <el-select v-model="formData.otherData.stirredMill.userId"
                       v-if="props.isEdit"
                       style="width: 100%"
                       placeholder="请选择作业员"
                       clearable
                       filterable
                       @change="handleUserChange($event, 'stirredMillUserId')">
              <el-option v-for="user in userOptions"
                         :key="user.userId"
                         :label="user.userName"
                         :value="user.userId"/>
            </el-select>
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMill.userName || formData.otherData.stirredMill.userId) }}</span>
          </td>
        </tr>
        <tr>
          <td class="label"  colspan="2" rowspan="4">搅拌磨</td>
          <td class="label"  colspan="2"></td>
          <td class="label"  colspan="3">3号桶</td>
          <td class="label"  colspan="4">4号桶</td>
          <td class="label"  colspan="3">6号桶</td>
        </tr>
        <tr>
          <td class="label"  colspan="2">搅拌粉料重量:</td>
          <td class="label"  colspan="3">
            <el-input v-if="props.isEdit" v-model="formData.otherData.stirredMill.threeBucketMixingPowderWeight" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMill.threeBucketMixingPowderWeight) }}</span>
          </td>
          <td class="label"  colspan="4">
            <el-input v-if="props.isEdit" v-model="formData.otherData.stirredMill.fourBucketMixingPowderWeight" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMill.fourBucketMixingPowderWeight) }}</span>
          </td>
          <td class="label"  colspan="3">
            <el-input v-if="props.isEdit" v-model="formData.otherData.stirredMill.sixBucketMixingPowderWeight" placeholder="请输入"/>
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMill.sixBucketMixingPowderWeight) }}</span>
          </td>
        </tr>
        <tr>
          <td class="label"  colspan="2">开始时间:</td>
          <td class="label"  colspan="3">
            <el-date-picker
                v-if="props.isEdit"
                v-model="formData.otherData.stirredMill.threeBucketStartTime"
                type="datetime"
                value-format="YYYY-MM-DD HH:mm:ss"
                format="YYYY-MM-DD HH:mm:ss"
                placeholder="请选择"
                style="width: 100%"
            />
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMill.threeBucketStartTime) }}</span>
          </td>
          <td class="label"  colspan="4">
            <el-date-picker
                v-if="props.isEdit"
                v-model="formData.otherData.stirredMill.fourBucketStartTime"
                type="datetime"
                value-format="YYYY-MM-DD HH:mm:ss"
                format="YYYY-MM-DD HH:mm:ss"
                placeholder="请选择"
                style="width: 100%"
            />
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMill.fourBucketStartTime) }}</span>
          </td>
          <td class="label"  colspan="3">
            <el-date-picker
                v-if="props.isEdit"
                v-model="formData.otherData.stirredMill.sixBucketStartTime"
                type="datetime"
                value-format="YYYY-MM-DD HH:mm:ss"
                format="YYYY-MM-DD HH:mm:ss"
                placeholder="请选择"
                style="width: 100%"
            />
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMill.sixBucketStartTime) }}</span>
          </td>
        </tr>
        <tr>
          <td class="label"  colspan="2">结束时间:</td>
          <td class="label"  colspan="3">
            <el-date-picker
                v-if="props.isEdit"
                v-model="formData.otherData.stirredMill.threeBucketEndTime"
                type="datetime"
                value-format="YYYY-MM-DD HH:mm:ss"
                format="YYYY-MM-DD HH:mm:ss"
                placeholder="请选择"
                style="width: 100%"
            />
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMill.threeBucketEndTime) }}</span>
          </td>
          <td class="label"  colspan="4">
            <el-date-picker
                v-if="props.isEdit"
                v-model="formData.otherData.stirredMill.fourBucketEndTime"
                type="datetime"
                value-format="YYYY-MM-DD HH:mm:ss"
                format="YYYY-MM-DD HH:mm:ss"
                placeholder="请选择"
                style="width: 100%"
            />
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMill.fourBucketEndTime) }}</span>
          </td>
          <td class="label"  colspan="3">
            <el-date-picker
                v-if="props.isEdit"
                v-model="formData.otherData.stirredMill.sixBucketEndTime"
                type="datetime"
                value-format="YYYY-MM-DD HH:mm:ss"
                format="YYYY-MM-DD HH:mm:ss"
                placeholder="请选择"
                style="width: 100%"
            />
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMill.sixBucketEndTime) }}</span>
          </td>
          <td class="label"  colspan="2" rowspan="3">
            <span>确认人:</span>
            <el-select v-model="formData.otherData.stirredMill.confirmId"
                       v-if="props.isEdit"
                       style="width: 100%"
                       placeholder="请选择确认人"
                       clearable
                       filterable
                       @change="handleUserChange($event, 'stirredMillConfirmId')">
              <el-option v-for="user in userOptions"
                         :key="user.userId"
                         :label="user.userName"
                         :value="user.userId"/>
            </el-select>
            <span v-else class="view-value">{{ displayValue(formData.otherData.stirredMill.confirmName || formData.otherData.stirredMill.confirmId) }}</span>
          </td>
        </tr>
        <!-- todo搅拌行开始,确认人行留空,已在上面表格预留 -->
        </tbody>
      </table>
    </el-form>
    <template #footer>
        <span class="dialog-footer">
          <el-button v-if="props.isEdit" type="primary"
                     @click="handleReport">确定</el-button>
          <el-button @click="visible = false">{{ props.isEdit ? "取消" : "关闭" }}</el-button>
        </span>
    </template>
  </el-dialog>
</template>
<style scoped>
.report-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}
.report-table td {
  border: 1px solid #dcdfe6;
  padding: 6px;
  vertical-align: middle;
}
.report-table .label {
  width: 90px;
  background: #f5f7fa;
  text-align: center;
  font-weight: 500;
}
.report-table .tip {
  text-align: center;
  font-weight: 500;
  line-height: 1.4;
  background: #fafafa;
}
.view-value {
  display: inline-block;
  min-height: 32px;
  line-height: 32px;
}
</style>
src/views/productionManagement/workOrder/components/ProductionRecordForm.vue
@@ -12,6 +12,10 @@
    default() {
      return [];
    }
  },
  labelWidth: {
    type: Number,
    default: 120
  }
});
@@ -79,7 +83,7 @@
</script>
<template>
  <el-form ref="formRef" :model="formData" :rules="rules" label-width="120px">
  <el-form ref="formRef" :model="formData" :rules="rules" :label-width="`${labelWidth}px`">
    <el-form-item
        v-for="(item, index) in formData.list"
        :key="item.id"
src/views/productionManagement/workOrder/index.vue
@@ -406,7 +406,9 @@
  productProcessRouteItemId: "",
  userId: "",
  productMainId: null,
  otherData: {}
  otherData: {
    rows: [],
  }
});
const productionRecordFormRef = ref();
@@ -695,7 +697,7 @@
const handleReport = async () => {
  const data = await productionRecordFormRef.value.submitData()
  reportForm.otherData = JSON.stringify(data || {});
  reportForm.otherData.rows = JSON.stringify(data || {});
  reportFormRef.value?.validate((valid) => {
    if (!valid) {
      return false;