ElementPlus实现页面,上部分是表单,下部分是表格

效果

java 复制代码
<template>
  <el-dialog v-model="produceDialogFormVisible" draggable custom-class="dialog-title" :title="title" :close-on-click-modal="false">
    <el-form label-width="120px">
      <el-row :gutter="40">
        <el-col :span="12">
          <el-form-item label="需求单编号" >
            <el-input v-model="orderNo"/>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="预计交付时间">
            <el-date-picker
              v-model="estimatedCompletionTime"
              type="date"
              placeholder="Pick a day"
              style="width: 200px"
            />
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <el-table
      ref="table"
      v-loading="listLoading"
      :data="list"
      fit
      highlight-current-row
      header-cell-class-name="header-cell"
    >
      <el-table-column type="selection" width="55" />
      <el-table-column type="index" width="50" />
      <el-table-column label="仓库" min-width="80px">
        <template #default="{row}">
          <span>{{ row.warehouseName }}</span>
        </template>
      </el-table-column>
      <el-table-column label="产品名称" min-width="150px">
        <template #default="{row}">
          {{ getName(row.property) }}
        </template>
      </el-table-column>
      <el-table-column label="数量" min-width="200px">
        <template #default="{row}">
          <el-input-number v-model="row.number" :step="row.unitMinimum === '0' ? 0.01 : row.unitMinimum" step-strictly :min="0" :max="row.inventoryLimit" @change="handleChange"/>
          <span style="line-height: 32px;margin-left: 5px">{{ row.unitName? row.unitName:'' }}</span>
        </template>
      </el-table-column>
      <el-table-column label="单价" min-width="80px">
        <template #default="{row}">
          <span>{{ row.univalent }}</span>
        </template>
      </el-table-column>
      <el-table-column label="小计" min-width="80px">
        <template #default="{row}">
          <span>{{ row.total }}</span>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" min-width="230" class-name="small-padding fixed-width">
        <template #default="{row}">
          <el-button size="small" plain icon="Delete" @click="handleDelete(row)">
            删除
          </el-button>
        </template>
      </el-table-column>
    </el-table>
    <template #footer>
      <el-button @click="produceDialogFormVisible = false">
        取消
      </el-button>
      <el-button v-permission="['biz:warningconfiguration:WarningConfiguration:update']" type="primary" :loading="loading" @click="createData()">
        确定
      </el-button>
    </template>
    <product-range-select ref="productRangeSelect" v-model="temp.productText" :range-option="rangeOption" />
  </el-dialog>
</template>
相关推荐
Java知识库3 分钟前
2025秋招后端突围:JVM核心面试题与高频考点深度解析
java·jvm·程序员·java面试·后端开发
南枝异客11 分钟前
四数之和-力扣
java·算法·leetcode
英杰.王15 分钟前
深入 Java 泛型:基础应用与实战技巧
java·windows·python
Leaf吧18 分钟前
java BIO/NIO/AIO
java·开发语言·nio
IT_10241 小时前
springboot从零入门之接口测试!
java·开发语言·spring boot·后端·spring·lua
湖北二师的咸鱼1 小时前
c#和c++区别
java·c++·c#
weixin_418007602 小时前
软件工程的实践
java
lpfasd1232 小时前
备忘录模式(Memento Pattern)
java·设计模式·备忘录模式
迢迢星万里灬3 小时前
Java求职者面试指南:Spring、Spring Boot、Spring MVC与MyBatis技术点解析
java·spring boot·spring·mybatis·spring mvc·面试指南
代码丰3 小时前
使用Spring Cloud Stream 模拟生产者消费者group destination的介绍(整合rabbitMQ)
java·分布式·后端·rabbitmq