zlwu vor 10 Monaten
Ursprung
Commit
8264044d25

+ 9 - 0
art-design-pro/src/assets/styles/el-ui.scss

@@ -44,6 +44,14 @@
   // border-top: 1px solid #F0F0F0;
 }
 
+// 新增/编辑弹窗内的表单标签加粗
+.el-dialog {
+  .el-form-item__label {
+    font-weight: 600;
+    color: #303133;
+  }
+}
+
 // ✅ el-message 样式优化
 .el-message {
   background-color: var(--art-main-bg-color) !important;
@@ -133,6 +141,7 @@
   line-height: 26px !important;
   border: 0 !important;
   border-radius: 6px !important;
+  font-size: 14px !important;
   font-weight: bold;
   transition: all 0s !important;
 }

+ 5 - 1
art-design-pro/src/components/Table/ArtTable.vue

@@ -11,6 +11,7 @@
       :max-height="maxHeight"
       :show-header="showHeader"
       :highlight-current-row="highlightCurrentRow"
+      :table-layout="tableLayout"
       @selection-change="handleSelectionChange"
       @row-click="handleRowClick"
     >
@@ -102,6 +103,8 @@
     paginationLayout?: string
     /** 是否显示表头背景色 */
     showHeaderBackground?: boolean
+    /** 表格布局,控制列宽表现(拖拽时常用 fixed) */
+    tableLayout?: 'fixed' | 'auto'
   }
 
   const props = withDefaults(defineProps<TableProps>(), {
@@ -124,7 +127,8 @@
     paginationAlign: 'center',
     paginationSize: 'default',
     paginationLayout: 'total, sizes, prev, pager, next, jumper',
-    showHeaderBackground: false
+    showHeaderBackground: false,
+    tableLayout: 'fixed'
   })
 
   const emit = defineEmits([

+ 1 - 1
art-design-pro/src/views/dashboard/analysis/widget/TopProducts.vue

@@ -4,7 +4,7 @@
       <span class="title">{{ t('analysis.topProducts.title') }}</span>
     </div>
     <div class="custom-card-body">
-      <art-table :data="products" style="width: 100%" :pagination="false">
+      <art-table :data="products" style="width: 100%" :pagination="false" :border="true" table-layout="fixed">
         <el-table-column prop="name" :label="t('analysis.topProducts.columns.name')" width="200" />
         <el-table-column prop="popularity" :label="t('analysis.topProducts.columns.popularity')">
           <template #default="scope">

+ 1 - 1
art-design-pro/src/views/dashboard/console/widget/NewUser.vue

@@ -11,7 +11,7 @@
         <el-radio-button value="今年" label="今年"></el-radio-button>
       </el-radio-group>
     </div>
-    <art-table :data="tableData" :pagination="false">
+  <art-table :data="tableData" :pagination="false" :border="true" table-layout="fixed">
       <template #default>
         <el-table-column label="头像" prop="avatar" width="150px">
           <template #default="scope">

+ 7 - 1
art-design-pro/src/views/dashboard/ecommerce/widget/HotProductsList.vue

@@ -6,7 +6,13 @@
     </div>
     <div class="table">
       <el-scrollbar style="height: 21.55rem">
-        <art-table :data="tableData" :pagination="false" style="margin-top: 0 !important">
+        <art-table
+          :data="tableData"
+          :pagination="false"
+          style="margin-top: 0 !important"
+          :border="true"
+          table-layout="fixed"
+        >
           <template #default>
             <el-table-column label="产品" prop="product" width="220px">
               <template #default="scope">

+ 6 - 3
art-design-pro/src/views/inventory/index.vue

@@ -66,6 +66,8 @@
         :pagination="true"
         :total="total"
         :index="true"
+        :border="true"
+        table-layout="fixed"
         v-model:current-page="currentPage"
         v-model:page-size="pageSize"
         @current-change="handlePageChange"
@@ -231,7 +233,7 @@
           <el-input v-model="formData.vehicleNo" placeholder="请输入车牌号" />
         </el-form-item>
         <el-form-item label="计划号" prop="planNo">
-          <el-input v-model="formData.planNo" placeholder="请输入计划号" />
+          <el-input v-model="formData.planNo" placeholder="请输入计划号" :readonly="isPlanNoReadonly" />
         </el-form-item>
         <el-form-item label="备注" prop="remarks">
           <el-input v-model="formData.remarks" type="textarea" :rows="3" />
@@ -311,7 +313,7 @@
 </template>
 
 <script setup lang="ts">
-  import { ref, reactive, onMounted } from 'vue'
+  import { ref, reactive, computed, onMounted } from 'vue'
   import { ElMessage, ElMessageBox } from 'element-plus'
   import { Plus, Document, Search, Edit, Delete, View } from '@element-plus/icons-vue'
   import { inventoryApi, type InventoryRecord, type InventoryCreate } from '@/api/inventoryApi'
@@ -357,6 +359,8 @@
     remarks: '',
     purchasePlanId: purchasePlanIdFromRoute
   })
+  // 路由带入计划号时,在新增场景保持只读,避免误改
+  const isPlanNoReadonly = computed(() => !!route.query.planNo && !editingRecord.value)
 
   const formRules = {
     date: [{ required: true, message: '请选择日期', trigger: 'change' }],
@@ -695,7 +699,6 @@
 
   :deep(.el-table) {
     width: 100% !important;
-    table-layout: auto;
   }
 
   // 确保固定列正常工作

+ 1 - 1
art-design-pro/src/views/log/ChangeLog.vue

@@ -2,7 +2,7 @@
   <div class="page-content">
     <h3 class="table-title"><i class="iconfont-sys">&#xe74d;</i>更新日志</h3>
 
-    <art-table :data="upgradeLogList" :pagination="false">
+    <art-table :data="upgradeLogList" :pagination="false" :border="true" table-layout="fixed">
       <el-table-column label="版本号" prop="version" width="200" />
       <el-table-column label="内容" width="400">
         <template #default="scope">

+ 4 - 1
art-design-pro/src/views/master-data/index.vue

@@ -39,6 +39,8 @@
             :pagination="true"
             :total="companyTotal"
             :index="true"
+            :border="true"
+            table-layout="fixed"
             v-model:current-page="companyPage"
             v-model:page-size="companyPageSize"
             @current-change="handleCompanyPageChange"
@@ -92,6 +94,8 @@
             :pagination="true"
             :total="cargoTotal"
             :index="true"
+            :border="true"
+            table-layout="fixed"
             v-model:current-page="cargoPage"
             v-model:page-size="cargoPageSize"
             @current-change="handleCargoPageChange"
@@ -472,7 +476,6 @@
 
   :deep(.el-table) {
     width: 100% !important;
-    table-layout: auto;
   }
 </style>
 

+ 1 - 1
art-design-pro/src/views/menu/Menu.vue

@@ -4,7 +4,7 @@
       <el-button v-auth="'add'" @click="showModel('menu', null, true)" v-ripple>添加菜单</el-button>
     </el-row>
 
-    <art-table :data="tableData">
+    <art-table :data="tableData" :border="true" table-layout="fixed">
       <template #default>
         <el-table-column label="菜单名称">
           <template #default="scope">

+ 17 - 2
art-design-pro/src/views/plans/index.vue

@@ -79,6 +79,8 @@
         :pagination="true"
         :total="total"
         :index="true"
+        :border="true"
+        table-layout="fixed"
         v-model:current-page="currentPage"
         v-model:page-size="pageSize"
         @current-change="handlePageChange"
@@ -87,7 +89,10 @@
         <el-table-column prop="planNo" label="计划号" min-width="120" />
         <el-table-column prop="businessType" label="业务类型" min-width="100">
           <template #default="{ row }">
-            <el-tag :type="row.businessType === '入库' ? 'success' : 'warning'">
+            <el-tag
+              :type="row.businessType === '入库' ? 'success' : 'warning'"
+              class="biz-tag"
+            >
               {{ row.businessType }}
             </el-tag>
           </template>
@@ -144,6 +149,7 @@
         :model="formData"
         :rules="formRules"
         label-width="100px"
+        class="plan-form"
       >
         <el-row :gutter="16">
           <el-col :span="12">
@@ -762,13 +768,16 @@
     font-weight: 600;
   }
 
+  .biz-tag {
+    font-size: 16px;
+  }
+
   :deep(.art-table) {
     width: 100%;
   }
 
   :deep(.el-table) {
     width: 100% !important;
-    table-layout: auto;
   }
 
   // 确保固定列正常工作
@@ -807,5 +816,11 @@
   .dialog-content::-webkit-scrollbar-thumb:hover {
     background: #a8a8a8;
   }
+
+  // 计划新增/编辑弹窗:字段标题加粗
+  :deep(.plan-form .el-form-item__label) {
+    font-weight: 600;
+    color: #303133;
+  }
 </style>
 

+ 1 - 1
art-design-pro/src/views/system/Api.vue

@@ -9,7 +9,7 @@
       </el-col>
     </el-row>
 
-    <art-table :data="apiList">
+  <art-table :data="apiList" :border="true" table-layout="fixed">
       <el-table-column label="ID" prop="id" width="100" />
       <el-table-column label="路径" prop="endpoint" />
       <el-table-column label="分组" prop="group" />

+ 1 - 1
art-design-pro/src/views/system/Log.vue

@@ -9,7 +9,7 @@
       </el-col>
     </el-row>
 
-    <art-table :data="logList">
+  <art-table :data="logList" :border="true" table-layout="fixed">
       <el-table-column label="用户名" prop="username" />
       <el-table-column label="ip地址" prop="ip" />
       <el-table-column label="浏览器" prop="browser" />

+ 9 - 1
art-design-pro/src/views/user/Account.vue

@@ -32,7 +32,15 @@
       </template>
     </table-bar>
 
-    <art-table :data="tableData" selection :currentPage="1" :pageSize="10" :total="50">
+    <art-table
+      :data="tableData"
+      selection
+      :currentPage="1"
+      :pageSize="10"
+      :total="50"
+      :border="true"
+      table-layout="fixed"
+    >
       <template #default>
         <el-table-column
           label="用户名"

+ 1 - 1
art-design-pro/src/views/user/Department.vue

@@ -10,7 +10,7 @@
       </el-col>
     </el-row>
 
-    <art-table :data="tableData">
+  <art-table :data="tableData" :border="true" table-layout="fixed">
       <template #default>
         <el-table-column prop="name" label="名称" />
         <el-table-column prop="sort" label="排序" sortable />

+ 1 - 1
art-design-pro/src/views/user/Role.vue

@@ -11,7 +11,7 @@
       </el-col>
     </el-row>
 
-    <art-table :data="tableData">
+  <art-table :data="tableData" :border="true" table-layout="fixed">
       <template #default>
         <el-table-column label="角色名称" prop="name" />
         <el-table-column label="描述" prop="des" />

+ 2 - 1
art-design-pro/src/views/user/UserManagement.vue

@@ -19,6 +19,8 @@
         :loading="loading"
         :pagination="true"
         :total="total"
+        :border="true"
+        table-layout="fixed"
         v-model:current-page="currentPage"
         v-model:page-size="pageSize"
         @current-change="handlePageChange"
@@ -267,7 +269,6 @@
 
   :deep(.el-table) {
     width: 100% !important;
-    table-layout: auto;
   }
 </style>
 

+ 2 - 1
art-design-pro/src/views/weighing/index.vue

@@ -63,6 +63,8 @@
         :pagination="true"
         :total="total"
         :index="true"
+        :border="true"
+        table-layout="fixed"
         v-model:current-page="currentPage"
         v-model:page-size="pageSize"
         @current-change="handlePageChange"
@@ -914,7 +916,6 @@
 
   :deep(.el-table) {
     width: 100% !important;
-    table-layout: auto;
   }
 
   // 确保固定列正常工作

+ 2 - 2
art-design-pro/src/views/widgets/Drag.vue

@@ -37,7 +37,7 @@
       </template>
       <template #default>
         <VueDraggable target="tbody" v-model="userList" :animation="150">
-          <art-table :data="userList" :pagination="false">
+          <art-table :data="userList" :pagination="false" :border="true" table-layout="fixed">
             <el-table-column label="姓名" prop="name" />
             <el-table-column label="角色" prop="role" />
           </art-table>
@@ -51,7 +51,7 @@
       </template>
       <template #default>
         <VueDraggable target="tbody" handle=".handle" v-model="userList" :animation="150">
-          <art-table :data="userList" :pagination="false">
+          <art-table :data="userList" :pagination="false" :border="true" table-layout="fixed">
             <el-table-column label="姓名" prop="name" />
             <el-table-column label="角色" prop="role" />
             <el-table-column label="操作" width="100">

+ 1 - 1
art-design-pro/src/views/widgets/Excel.vue

@@ -19,7 +19,7 @@
 
     <el-button type="danger" @click="handleClear" v-ripple>清除数据</el-button>
 
-    <art-table :data="tableData" style="margin-top: 10px">
+    <art-table :data="tableData" style="margin-top: 10px" :border="true" table-layout="fixed">
       <el-table-column
         v-for="key in Object.keys(headers)"
         :key="key"

+ 3 - 0
mobile-h5/src/views/inventory/detail.vue

@@ -93,6 +93,7 @@
               v-else
               v-model="formData.planNo"
               placeholder="请输入计划号"
+              :readonly="isPlanNoReadonly"
             />
           </div>
 
@@ -165,6 +166,8 @@ const route = useRoute()
 
 const isView = computed(() => route.query.mode === 'view')
 const isEdit = computed(() => route.query.mode === 'edit' || route.params.id)
+// 计划带入新增时计划号锁定,避免误改
+const isPlanNoReadonly = computed(() => !!route.query.planNo && !isEdit.value)
 // const isAdd = computed(() => !isView.value && !isEdit.value) // 未使用
 
 const saving = ref(false)