测试优化
This commit is contained in:
@ -1,22 +1,36 @@
|
||||
<template>
|
||||
<div style="padding: 20px">
|
||||
<el-card class="mb-5">
|
||||
<el-button type="primary" v-hasPermi="['cailiaoshebei:physicalsupply:add']" icon="Plus" @click="handleAdd"
|
||||
class="transition-all duration-200 hover:shadow-md">
|
||||
<el-button
|
||||
type="primary"
|
||||
v-hasPermi="['cailiaoshebei:physicalsupply:add']"
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
class="transition-all duration-200 hover:shadow-md"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-hasPermi="['cailiaoshebei:physicalsupply:list']" icon="Refresh" @click="refreshData"
|
||||
class="transition-all duration-200 hover:shadow-md">
|
||||
<el-button
|
||||
v-hasPermi="['cailiaoshebei:physicalsupply:list']"
|
||||
icon="Refresh"
|
||||
@click="refreshData"
|
||||
class="transition-all duration-200 hover:shadow-md"
|
||||
>
|
||||
刷新
|
||||
</el-button>
|
||||
</el-card>
|
||||
|
||||
<!-- 数据表格 -->
|
||||
<div class="bg-white rounded-lg shadow-sm overflow-hidden transition-all duration-300 hover:shadow-md">
|
||||
<el-table v-loading="loading" :data="tableData" border stripe
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
stripe
|
||||
style="width: 100%; margin-bottom: 20px; height: calc(100vh - 305px)"
|
||||
:header-cell-style="{ 'background-color': '#f5f7fa', 'font-weight': 'bold' }"
|
||||
:row-class-name="tableRowClassName">
|
||||
:row-class-name="tableRowClassName"
|
||||
>
|
||||
<!-- <el-table-column prop="id" label="ID" width="180" align="center"></el-table-column> -->
|
||||
<el-table-column type="index" label="序号" align="center" width="60"></el-table-column>
|
||||
|
||||
@ -41,27 +55,53 @@
|
||||
{{ formatDate(scope.row.createTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="240" align="center" fixed="right">
|
||||
<el-table-column label="操作" width="300" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button v-hasPermi="['cailiaoshebei:physicalsupplySon:add']" size="small" icon="Plus"
|
||||
@click="handleAddSon(scope.row)" class="text-blue-600 hover:text-blue-800 transition-colors"></el-button>
|
||||
<el-button v-hasPermi="['cailiaoshebei:physicalsupply:edit']" size="small" icon="Edit"
|
||||
@click="handleEdit(scope.row)" class="text-blue-600 hover:text-blue-800 transition-colors"></el-button>
|
||||
<el-button v-hasPermi="['cailiaoshebei:physicalsupplySon:list']" size="small" icon="View"
|
||||
@click="jumpRouter(scope.row)" class="text-blue-600 hover:text-blue-800 transition-colors"></el-button>
|
||||
<el-button v-hasPermi="['cailiaoshebei:physicalsupply:remove']" size="small" icon="Delete"
|
||||
@click="handleDelete(scope.row)" class="text-red-600 hover:text-red-800 transition-colors"></el-button>
|
||||
<el-button
|
||||
v-hasPermi="['cailiaoshebei:physicalsupplySon:add']"
|
||||
size="small"
|
||||
icon="Plus"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleAddSon(scope.row)"
|
||||
>添加</el-button
|
||||
>
|
||||
<el-button type="primary" v-hasPermi="['cailiaoshebei:physicalsupply:edit']" size="small" icon="Edit" link @click="handleEdit(scope.row)"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-hasPermi="['cailiaoshebei:physicalsupplySon:list']"
|
||||
size="small"
|
||||
icon="View"
|
||||
link
|
||||
@click="jumpRouter(scope.row)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
v-hasPermi="['cailiaoshebei:physicalsupply:remove']"
|
||||
size="small"
|
||||
icon="Delete"
|
||||
link
|
||||
type="primary"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize" @pagination="fetchData" />
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="fetchData" />
|
||||
</div>
|
||||
<!-- 新增/编辑对话框 -->
|
||||
<el-dialog v-model="dialogVisible" :title="dialogType === 'add' ? '新增记录' : '编辑记录'" :width="dialogWidth"
|
||||
:fullscreen="isFullscreen" :before-close="handleDialogClose">
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
:title="dialogType === 'add' ? '新增记录' : '编辑记录'"
|
||||
:width="dialogWidth"
|
||||
:fullscreen="isFullscreen"
|
||||
:before-close="handleDialogClose"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="120px" class="space-y-4">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
@ -105,8 +145,12 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="合同签订时间" prop="contractSigning">
|
||||
<el-date-picker v-model="formData.contractSigning" type="datetime" placeholder="选择合同签订时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"></el-date-picker>
|
||||
<el-date-picker
|
||||
v-model="formData.contractSigning"
|
||||
type="datetime"
|
||||
placeholder="选择合同签订时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@ -119,8 +163,7 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="供货要求" prop="supplyRequirements">
|
||||
<el-input v-model="formData.supplyRequirements" placeholder="请输入供货要求" type="textarea"
|
||||
:rows="3"></el-input>
|
||||
<el-input v-model="formData.supplyRequirements" placeholder="请输入供货要求" type="textarea" :rows="3"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
Reference in New Issue
Block a user