调整部分前端布局和后端增删改逻辑

This commit is contained in:
焦龙言
2026-09-20 10:38:10 +08:00
parent acddc8a237
commit 3edba99d2d
227 changed files with 122871 additions and 839 deletions
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
<el-form ref="queryRef" :model="queryParams" :inline="true">
<div class="app-container master-page">
<el-form ref="queryRef" class="master-query page-filter" :model="queryParams" :inline="true">
<el-form-item label="客户编码" prop="customerCode">
<el-input v-model="queryParams.customerCode" placeholder="请输入客户编码" clearable maxlength="64" @keyup.enter="handleQuery" />
</el-form-item>
@@ -18,7 +18,7 @@
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-row :gutter="10" class="mb8 master-toolbar">
<el-col :span="1.5"><el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['master:customer:add']">新增</el-button></el-col>
<el-col :span="1.5">
<el-button
@@ -31,7 +31,7 @@
</el-row>
<el-alert v-if="loadError" :title="loadError" type="error" :closable="false" show-icon class="mb8" />
<el-table v-loading="loading" empty-text="暂无数据" :data="customerList" @selection-change="handleSelectionChange">
<el-table class="master-table data-table" v-loading="loading" empty-text="暂无数据" :data="customerList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="客户ID" prop="customerId" align="center" />
<el-table-column label="客户编码" prop="customerCode" align="center" :show-overflow-tooltip="true" />
@@ -99,6 +99,19 @@
</div>
</template>
<style scoped>
.master-query { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:0 14px; padding:16px 18px 4px; margin-bottom:14px; background:var(--el-bg-color); border:1px solid var(--el-border-color-lighter); border-radius:8px; }
.master-query :deep(.el-form-item) { margin-right:0; width:100%; }
.master-query :deep(.el-input), .master-query :deep(.el-select) { width:100% !important; }
.master-query :deep(.el-form-item:last-child) { align-self:end; }
.master-toolbar { display:flex; flex-wrap:wrap; gap:8px; }
.master-toolbar :deep(.el-col) { width:auto; }
.master-table :deep(.el-table__header th) { background:var(--el-fill-color-light); font-weight:600; }
.master-table :deep(.el-table__cell) { padding:10px 0; }
.master-table :deep(.fixed-width) { position:sticky; right:0; z-index:2; background:var(--el-bg-color); box-shadow:-4px 0 8px rgba(0,0,0,.04); }
@media (max-width:768px) { .master-query { grid-template-columns:1fr; padding:14px 14px 2px; } .master-query :deep(.el-form-item:last-child) { margin-bottom:12px; } .master-toolbar :deep(.el-button) { margin-left:0; } }
</style>
<script setup name="Customer">
import { addCustomer, delCustomer, getCustomer, listCustomer, updateCustomer } from "@/api/master/customer";