Browse Source

2026-04-14

样式优化
master
fengyuan_yang 4 days ago
parent
commit
92394283a8
  1. 59
      src/views/modules/production-pick/productionPickingDetail.vue
  2. 4
      src/views/modules/production/production-return.vue
  3. 39
      src/views/modules/sys/menu-add-or-update.vue

59
src/views/modules/production-pick/productionPickingDetail.vue

@ -86,21 +86,23 @@
<div class="col-qty">标签数量</div>
</div>
<div
v-for="(label, index) in labelList"
:key="label.id"
class="list-item"
>
<div class="col-no">{{ labelList.length - index }}</div>
<div class="col-label">{{ label.labelCode }}</div>
<div class="col-part">{{ label.partNo }}</div>
<!-- <div class="col-unit">{{ label.unit || '个' }}</div>-->
<div class="col-qty">{{ label.quantity }}</div>
</div>
<div class="list-body">
<div
v-for="(label, index) in labelList"
:key="label.id"
class="list-item"
>
<div class="col-no">{{ labelList.length - index }}</div>
<div class="col-label">{{ label.labelCode }}</div>
<div class="col-part">{{ label.partNo }}</div>
<!-- <div class="col-unit">{{ label.unit || '个' }}</div>-->
<div class="col-qty">{{ label.quantity }}</div>
</div>
<!-- 空状态 -->
<div v-if="labelList.length === 0" class="empty-labels">
<p>暂无扫描标签</p>
<!-- 空状态 -->
<div v-if="labelList.length === 0" class="empty-labels">
<p>暂无扫描标签</p>
</div>
</div>
</div>
@ -951,6 +953,35 @@ export default {
margin: 0 16px 12px;
border-radius: 0 0 8px 8px;
overflow: hidden;
flex: 1;
display: flex;
flex-direction: column;
max-height: 300px; /* 限制最大高度 */
}
.label-list .list-body {
flex: 1;
overflow-y: auto; /* 允许垂直滚动 */
max-height: 250px; /* 内容区域最大高度 */
}
/* 滚动条样式优化 */
.label-list .list-body::-webkit-scrollbar {
width: 4px;
}
.label-list .list-body::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 2px;
}
.label-list .list-body::-webkit-scrollbar-thumb {
background: #17B3A3;
border-radius: 2px;
}
.label-list .list-body::-webkit-scrollbar-thumb:hover {
background: #0d8f7f;
}
.list-header {

4
src/views/modules/production/production-return.vue

@ -33,8 +33,8 @@ export default {
data() {
return {
buttons: [
{ icon: 'scan', label: '直接退仓', iconClass: 'purchase', to: 'productionQualifiedReturn', disabled: true },
{ icon: 'records', label: '申请单退仓', iconClass: 'qualified', to: 'productionQualifiedReturn', disabled: false },
{ icon: 'scan', label: '申请单退仓', iconClass: 'purchase', to: 'productionQualifiedReturn', disabled: true },
{ icon: 'records', label: '直接退仓', iconClass: 'qualified', to: 'productionQualifiedReturn', disabled: false },
]
}
},

39
src/views/modules/sys/menu-add-or-update.vue

@ -6,17 +6,6 @@
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form-item :label="buttons.type || '类型'" prop="type">
<el-radio-group v-model="dataForm.type">
<el-radio v-for="(type, index) in dataForm.typeList" :label="index" :key="index">{{ type }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="dataForm.typeList[dataForm.type] + buttons.code ||'编号'" prop="menuId">
<el-input :readonly="dataForm.id?true:false" style="width: 349px;" v-model="dataForm.menuId" ></el-input>
</el-form-item>
<el-form-item :label="dataForm.typeList[dataForm.type] + buttons.typeName ||'名称'" prop="name">
<el-input style="width: 349px;" v-model="dataForm.name" ></el-input>
</el-form-item>
<el-form-item :label="buttons.parentName ||'上级菜单'" prop="parentName">
<el-popover
ref="menuListPopover"
@ -37,6 +26,17 @@
</el-popover>
<el-input style="width: 349px;" v-model="dataForm.parentName" v-popover:menuListPopover :readonly="true" class="menu-list__input"></el-input>
</el-form-item>
<el-form-item :label="buttons.type || '类型'" prop="type">
<el-radio-group v-model="dataForm.type">
<el-radio v-for="(type, index) in dataForm.typeList" :label="index" :key="index">{{ type }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="dataForm.typeList[dataForm.type] + buttons.code ||'编号'" prop="menuId">
<el-input :readonly="dataForm.id?true:false" style="width: 349px;" v-model="dataForm.menuId" oninput="value=value.replace(/[^\d]/g, '')"></el-input>
</el-form-item>
<el-form-item :label="dataForm.typeList[dataForm.type] + buttons.typeName ||'名称'" prop="name">
<el-input style="width: 349px;" v-model="dataForm.name" ></el-input>
</el-form-item>
<el-form-item v-if="dataForm.type === 1" :label="buttons.route || '菜单路由'" prop="url">
<el-input style="width: 349px;" v-model="dataForm.url" placeholder="菜单路由"></el-input>
</el-form-item>
@ -119,6 +119,10 @@
typeName:'名称'
},
dataRule: {
menuId: [
{ required: true, message: '目录编号不能为空', trigger: 'blur' },
{ pattern: /^\d+$/, message: '目录编号必须是纯数字', trigger: 'blur' }
],
name: [
{ required: true, message: '菜单名称不能为空', trigger: 'blur' }
],
@ -154,6 +158,7 @@
code:'编号'
},
menuList: [],
flatMenuList: [],
menuListTreeProps: {
label: 'name',
children: 'children'
@ -172,6 +177,7 @@
method: 'get',
params: this.$http.adornParams()
}).then(({data}) => {
this.flatMenuList = data.menuList || []
this.menuList = treeDataTranslate(data.menuList, 'menuId')
console.log( this.menuList)
}).then(() => {
@ -225,6 +231,17 @@
this.dataForm.parentId = data.menuId
this.dataForm.parentName = data.name
this.treeVisible = false
// menuIdparentIdmenuId+1
if (!this.dataForm.id) {
let children = this.flatMenuList.filter(item => item.parentId === data.menuId)
if (children.length > 0) {
let maxId = Math.max(...children.map(item => Number(item.menuId)))
this.dataForm.menuId = String(maxId + 1)
} else {
this.dataForm.menuId = String(data.menuId) + '01'
}
}
},
//
menuListTreeSetCurrentNode () {

Loading…
Cancel
Save