yyb
3 小时以前 1ef08126ca554a8cd4b9ba47d19dc3b790e2c018
src/views/productionManagement/productionReporting/index.vue
@@ -99,8 +99,7 @@
                                style="width: 100%" />
              </template>
            </el-table-column>
            <el-table-column label="操作"
                             >
            <el-table-column label="操作">
              <template #default="scope">
                <el-button link
                           type="primary"
@@ -124,11 +123,36 @@
    <input-modal v-if="isShowInput"
                 v-model:visible="isShowInput"
                 :production-product-main-id="isShowingId" />
    <!-- 参数详情弹窗 -->
    <el-dialog v-model="paramDetailVisible"
               title="参数详情"
               width="600px">
      <div v-if="currentParams && currentParams.length > 0"
           class="param-detail-list">
        <el-descriptions :column="1"
                         border>
          <el-descriptions-item v-for="param in currentParams"
                                :key="param.id"
                                :label="param.paramName">
            {{ param.inputValue }}
            <span v-if="param.unit && param.unit !== '/'"
                  class="unit-text">({{ param.unit }})</span>
          </el-descriptions-item>
        </el-descriptions>
      </div>
      <el-empty v-else
                description="暂无参数数据" />
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="paramDetailVisible = false">关闭</el-button>
        </span>
      </template>
    </el-dialog>
  </div>
</template>
<script setup>
  import { onMounted, ref } from "vue";
  import { onMounted, ref, reactive, toRefs, getCurrentInstance } from "vue";
  import FormDia from "@/views/productionManagement/productionReporting/components/formDia.vue";
  import { ElMessageBox } from "element-plus";
  import {
@@ -163,6 +187,16 @@
      width: 120,
    },
    {
      label: "工时(h)",
      width: 100,
      prop: "workHour",
    },
    {
      label: "工序",
      prop: "process",
      width: 120,
    },
    {
      label: "工单编号",
      prop: "workOrderNo",
      width: 120,
@@ -187,17 +221,17 @@
      prop: "quantity",
      width: 120,
    },
    // {
    //   label: "报废数量",
    //   prop: "scrapQuantity",
    //   width: 120,
    // },
    {
      label: "报废数量",
      prop: "scrapQty",
      width: 120,
    },
    {
      label: "单位",
      prop: "unit",
      width: 120,
    },
    {
      label: "创建时间",
      prop: "createTime",
@@ -208,12 +242,20 @@
      label: "操作",
      align: "center",
      fixed: "right",
      width: 250,
      operation: [
        {
          name: "查看投入",
          type: "text",
          clickFun: row => {
            showInput(row);
          },
        },
        {
          name: "参数详情",
          type: "text",
          clickFun: row => {
            showParamDetail(row);
          },
        },
        {
@@ -227,6 +269,13 @@
    },
  ]);
  const tableData = ref([]);
  const paramDetailVisible = ref(false);
  const currentParams = ref([]);
  const showParamDetail = row => {
    currentParams.value = row.productionOperationParamList || [];
    paramDetailVisible.value = true;
  };
  const selectedRows = ref([]);
  const tableLoading = ref(false);
  const childrenLoading = ref(false);
@@ -412,4 +461,16 @@
  });
</script>
<style scoped></style>
<style scoped>
  .unit-text {
    margin-left: 5px;
    color: #909399;
    font-size: 12px;
  }
  .param-detail-list {
    padding: 10px;
  }
  .table_list {
    margin-top: unset;
  }
</style>