Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
e77b9391
"...net/mingsoft/cms/git@ustchcs.com:gujinli1118/MCMS.git" did not exist on "c0542503f71f1b0680ef2749218e79d632761f70"
Commit
e77b9391
authored
Sep 05, 2021
by
季圣华
Browse files
表格高度自适应
parent
6e21f03b
Changes
2
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/mixins/JeecgListMixin.js
View file @
e77b9391
...
@@ -7,8 +7,10 @@ import { filterObj } from '@/utils/util';
...
@@ -7,8 +7,10 @@ import { filterObj } from '@/utils/util';
import
{
deleteAction
,
getAction
,
postAction
,
downFile
,
getFileAccessHttpUrl
}
from
'
@/api/manage
'
import
{
deleteAction
,
getAction
,
postAction
,
downFile
,
getFileAccessHttpUrl
}
from
'
@/api/manage
'
import
Vue
from
'
vue
'
import
Vue
from
'
vue
'
import
{
ACCESS_TOKEN
}
from
"
@/store/mutation-types
"
import
{
ACCESS_TOKEN
}
from
"
@/store/mutation-types
"
import
{
mixinDevice
}
from
'
@/utils/mixin.js
'
export
const
JeecgListMixin
=
{
export
const
JeecgListMixin
=
{
mixins
:
[
mixinDevice
],
data
(){
data
(){
return
{
return
{
//token header
//token header
...
@@ -30,9 +32,7 @@ export const JeecgListMixin = {
...
@@ -30,9 +32,7 @@ export const JeecgListMixin = {
total
:
0
total
:
0
},
},
/* 控制table高度 */
/* 控制table高度 */
scroll
:
{
scroll
:
{},
y
:
document
.
documentElement
.
clientHeight
-
330
},
/* 排序参数 */
/* 排序参数 */
isorter
:{
isorter
:{
column
:
'
createTime
'
,
column
:
'
createTime
'
,
...
@@ -61,16 +61,24 @@ export const JeecgListMixin = {
...
@@ -61,16 +61,24 @@ export const JeecgListMixin = {
}
}
},
},
created
()
{
created
()
{
if
(
!
this
.
disableMixinCreated
){
this
.
initScroll
()
//console.log(' -- mixin created -- ')
if
(
!
this
.
disableMixinCreated
){
this
.
loadData
();
//console.log(' -- mixin created -- ')
//初始化字典配置 在自己页面定义
this
.
loadData
();
this
.
initDictConfig
();
//初始化字典配置 在自己页面定义
//初始化按钮权限
this
.
initDictConfig
();
this
.
initActiveBtnStr
();
//初始化按钮权限
}
this
.
initActiveBtnStr
();
}
},
},
methods
:{
methods
:{
initScroll
()
{
if
(
this
.
isMobile
())
{
this
.
scroll
.
y
=
''
}
else
{
this
.
scroll
.
y
=
document
.
documentElement
.
clientHeight
-
330
}
},
loadData
(
arg
)
{
loadData
(
arg
)
{
if
(
!
this
.
url
.
list
){
if
(
!
this
.
url
.
list
){
this
.
$message
.
error
(
"
请设置url.list属性!
"
)
this
.
$message
.
error
(
"
请设置url.list属性!
"
)
...
...
jshERP-web/src/views/material/MaterialList.vue
View file @
e77b9391
...
@@ -80,10 +80,10 @@
...
@@ -80,10 +80,10 @@
size=
"middle"
size=
"middle"
bordered
bordered
rowKey=
"id"
rowKey=
"id"
:scroll=
"{ x: 1500, y: 500 }"
:columns=
"columns"
:columns=
"columns"
:dataSource=
"dataSource"
:dataSource=
"dataSource"
:pagination=
"ipagination"
:pagination=
"ipagination"
:scroll=
"scroll"
:loading=
"loading"
:loading=
"loading"
:rowSelection=
"{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
:rowSelection=
"{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@
change=
"handleTableChange"
>
@
change=
"handleTableChange"
>
...
@@ -153,43 +153,33 @@
...
@@ -153,43 +153,33 @@
},
},
// 表头
// 表头
columns
:
[
columns
:
[
{
{
title
:
'
条码
'
,
dataIndex
:
'
mBarCode
'
,
width
:
'
8%
'
},
title
:
'
#
'
,
{
title
:
'
名称
'
,
dataIndex
:
'
name
'
,
width
:
'
8%
'
},
dataIndex
:
''
,
{
title
:
'
规格
'
,
dataIndex
:
'
standard
'
,
width
:
'
5%
'
},
key
:
'
rowIndex
'
,
{
title
:
'
型号
'
,
dataIndex
:
'
model
'
,
width
:
'
5%
'
},
width
:
40
,
{
title
:
'
颜色
'
,
dataIndex
:
'
color
'
,
width
:
'
5%
'
},
align
:
"
center
"
,
{
title
:
'
类别
'
,
dataIndex
:
'
categoryName
'
,
width
:
'
5%
'
},
customRender
:
function
(
t
,
r
,
index
)
{
{
title
:
'
扩展信息
'
,
dataIndex
:
'
materialOther
'
,
width
:
'
6%
'
},
return
parseInt
(
index
)
+
1
;
{
title
:
'
单位
'
,
dataIndex
:
'
unit
'
,
width
:
'
6%
'
,
}
},
{
title
:
'
条码
'
,
dataIndex
:
'
mBarCode
'
,
width
:
120
},
{
title
:
'
名称
'
,
dataIndex
:
'
name
'
,
width
:
120
},
{
title
:
'
规格
'
,
dataIndex
:
'
standard
'
,
width
:
80
},
{
title
:
'
型号
'
,
dataIndex
:
'
model
'
,
width
:
80
},
{
title
:
'
颜色
'
,
dataIndex
:
'
color
'
,
width
:
60
},
{
title
:
'
类别
'
,
dataIndex
:
'
categoryName
'
,
width
:
80
},
{
title
:
'
扩展信息
'
,
dataIndex
:
'
materialOther
'
,
width
:
100
},
{
title
:
'
单位
'
,
dataIndex
:
'
unit
'
,
width
:
100
,
scopedSlots
:
{
customRender
:
'
customRenderUnit
'
}
scopedSlots
:
{
customRender
:
'
customRenderUnit
'
}
},
},
{
title
:
'
安全存量
'
,
dataIndex
:
'
safetyStock
'
,
width
:
80
},
{
title
:
'
安全存量
'
,
dataIndex
:
'
safetyStock
'
,
width
:
'
5%
'
},
{
title
:
'
库存
'
,
dataIndex
:
'
stock
'
,
width
:
70
},
{
title
:
'
库存
'
,
dataIndex
:
'
stock
'
,
width
:
'
5%
'
},
{
title
:
'
采购价
'
,
dataIndex
:
'
purchaseDecimal
'
,
width
:
70
},
{
title
:
'
采购价
'
,
dataIndex
:
'
purchaseDecimal
'
,
width
:
'
5%
'
},
{
title
:
'
零售价
'
,
dataIndex
:
'
commodityDecimal
'
,
width
:
70
},
{
title
:
'
零售价
'
,
dataIndex
:
'
commodityDecimal
'
,
width
:
'
5%
'
},
{
title
:
'
销售价
'
,
dataIndex
:
'
wholesaleDecimal
'
,
width
:
70
},
{
title
:
'
销售价
'
,
dataIndex
:
'
wholesaleDecimal
'
,
width
:
'
5%
'
},
{
title
:
'
最低售价
'
,
dataIndex
:
'
lowDecimal
'
,
width
:
80
},
{
title
:
'
最低售价
'
,
dataIndex
:
'
lowDecimal
'
,
width
:
'
5%
'
},
{
title
:
'
状态
'
,
dataIndex
:
'
enabled
'
,
width
:
55
,
align
:
"
center
"
,
{
title
:
'
状态
'
,
dataIndex
:
'
enabled
'
,
width
:
'
4%
'
,
align
:
"
center
"
,
scopedSlots
:
{
customRender
:
'
customRenderEnabled
'
}
scopedSlots
:
{
customRender
:
'
customRenderEnabled
'
}
},
},
{
title
:
'
序列号
'
,
dataIndex
:
'
enableSerialNumber
'
,
width
:
55
,
align
:
"
center
"
,
{
title
:
'
序列号
'
,
dataIndex
:
'
enableSerialNumber
'
,
width
:
'
4%
'
,
align
:
"
center
"
,
scopedSlots
:
{
customRender
:
'
customRenderEnableSerialNumber
'
}
scopedSlots
:
{
customRender
:
'
customRenderEnableSerialNumber
'
}
},
},
{
{
title
:
'
操作
'
,
title
:
'
操作
'
,
dataIndex
:
'
action
'
,
dataIndex
:
'
action
'
,
align
:
"
center
"
,
align
:
"
center
"
,
width
:
120
,
width
:
'
10%
'
,
scopedSlots
:
{
customRender
:
'
action
'
},
scopedSlots
:
{
customRender
:
'
action
'
},
}
}
],
],
...
@@ -213,6 +203,13 @@
...
@@ -213,6 +203,13 @@
}
}
},
},
methods
:
{
methods
:
{
initScroll
()
{
if
(
this
.
isMobile
())
{
this
.
scroll
.
y
=
''
}
else
{
this
.
scroll
.
y
=
document
.
documentElement
.
clientHeight
-
370
}
},
loadTreeData
(){
loadTreeData
(){
let
that
=
this
;
let
that
=
this
;
let
params
=
{};
let
params
=
{};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment