Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ems3.3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wuhao
ems3.3
Commits
059d7fee
Commit
059d7fee
authored
Feb 15, 2023
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
ee682445
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
321 additions
and
145 deletions
+321
-145
proxy.js
config/proxy.js
+4
-2
index.jsx
src/components/DetailPro/index.jsx
+1
-1
index.jsx
src/components/InitForm/index.jsx
+12
-0
index.jsx
src/components/TagView/index.jsx
+3
-0
global.less
src/global.less
+6
-0
index.jsx
src/pages/device/account/index.jsx
+5
-4
columns.js
src/pages/spare/instore/columns.js
+59
-71
index.jsx
src/pages/spare/instore/index.jsx
+14
-10
columns.js
src/pages/spare/outstore/columns.js
+39
-0
index.jsx
src/pages/spare/outstore/index.jsx
+28
-24
columns.js
src/pages/spare/requisition/columns.js
+38
-2
index.jsx
src/pages/spare/requisition/index.jsx
+16
-12
columns.js
src/pages/spare/setting/columns.js
+18
-0
index.jsx
src/pages/spare/setting/index.jsx
+1
-1
columns.js
src/pages/spare/spareback/columns.js
+37
-1
index.jsx
src/pages/spare/spareback/index.jsx
+17
-12
index.jsx
src/pages/spare/stock/index.jsx
+1
-1
columns.js
src/pages/spare/supplier/columns.js
+19
-1
index.jsx
src/pages/spare/supplier/index.jsx
+3
-3
No files found.
config/proxy.js
View file @
059d7fee
...
...
@@ -13,9 +13,11 @@ export default {
dev
:
{
[
defaultSetting
.
proxypath
]:
{
// 要代理的地址
// target: 'http://192.168.40.64:28000', //jf哥
target
:
'http://192.168.40.64:28000'
,
//jf哥
// target: 'http://192.168.40.248:8080', //jf哥
// target: 'http://192.168.40.64:28000', //gc哥
target
:
'http://192.168.40.203:8000'
,
//dj哥
// target: 'http://192.168.40.203:8000', //dj哥
// target: 'http://192.168.40.35:8001', //测试
changeOrigin
:
true
,
},
'/token'
:
{
...
...
src/components/DetailPro/index.jsx
View file @
059d7fee
...
...
@@ -71,7 +71,7 @@ function DetailPro(props) {
<>
<
Col
span=
{
24
}
>
<
div
className=
{
styles
.
title
}
style=
{
{
borderWidth
:
i
==
0
?
0
:
1
}
}
>
{
it
.
title
}
{
it
?.
render
?
it
?.
render
?.(
curitem
[
it
.
dataIndex
],
curitem
)
:
it
.
title
}
</
div
>
</
Col
>
</>
...
...
src/components/InitForm/index.jsx
View file @
059d7fee
...
...
@@ -166,6 +166,17 @@ function InitForm(props) {
}
:
{};
const
supplierList
=
res
?.
data
?.
data
?.
supplierList
?
{
supplierList
:
res
?.
data
?.
data
?.
supplierList
?.
map
?.((
it
,
i
)
=>
{
return
{
...
it
,
id
:
it
?.
supplierId
,
};
}),
}
:
{};
let
result
=
res
?.
data
?.
data
;
if
(
result
?.
nrList
)
{
result
.
nrList
=
result
?.
nrList
?.
map
((
it
)
=>
{
...
...
@@ -178,6 +189,7 @@ function InitForm(props) {
...
defaultFormValue
,
...(
result
??
{}),
...
relationSupplierList
,
...
supplierList
,
};
}
else
{
// console.log(
{
...
...
src/components/TagView/index.jsx
View file @
059d7fee
...
...
@@ -28,6 +28,7 @@ const TagView = ({ children, home }) => {
// 初始化 visitedViews,设置首页
const
initTags
=
(
routeContext
)
=>
{
// console.log(routeContext);
const
{
menuData
}
=
routeContext
;
if
(
tagList
.
length
===
0
&&
menuData
)
{
const
allarr
=
[];
...
...
@@ -56,6 +57,7 @@ const TagView = ({ children, home }) => {
// 监听路由改变
const
handleOnChange
=
(
routeContext
)
=>
{
const
{
currentMenu
}
=
routeContext
;
// console.log(tagList);
// tags初始化
if
(
tagList
.
length
===
0
)
{
return
initTags
(
routeContext
);
...
...
@@ -69,6 +71,7 @@ const TagView = ({ children, home }) => {
//console.log(item);
hasOpen
=
true
;
// 刷新浏览器时,重新覆盖当前 path 的 children
// console.log(item);
return
{
...
item
,
active
:
true
,
children
:
item
.
children
};
}
else
{
return
{
...
item
,
active
:
false
};
...
...
src/global.less
View file @
059d7fee
...
...
@@ -530,3 +530,9 @@ ol {
z-index: 1001 !important;
}
}
.ant-descriptions-row {
.ant-table-small {
margin: 0 !important;
}
}
\ No newline at end of file
src/pages/device/account/index.jsx
View file @
059d7fee
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-10 09:39:56
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-02-
03 10:01:31
* @Last Modified time: 2023-02-
15 10:50:14
*/
import
*
as
React
from
'react'
;
...
...
@@ -37,6 +37,7 @@ function Model(props) {
// Can not select days before today and today
return
current
&&
current
>
dayjs
().
endOf
(
'day'
);
};
const
[
activeTab
,
setactiveTab
]
=
useState
(
1
);
let
actionRef
=
useRef
(),
formRef
=
useRef
(),
[
drawer
,
setDrawer
]
=
useState
({
...
...
@@ -615,7 +616,6 @@ function Model(props) {
//设备详情
const
Detail
=
()
=>
{
const
[
activeTab
,
setactiveTab
]
=
useState
(
1
);
// 基础信息
const
BaseInfo
=
()
=>
{
const
columns1
=
[
...
...
@@ -2368,8 +2368,9 @@ function Model(props) {
<
DrawerPro
placement=
"right"
onClose=
{
()
=>
{
setCurrDrawer
((
s
)
=>
({
onClose=
{
async
()
=>
{
await
setactiveTab
(
3
);
await
setCurrDrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
item
:
null
,
...
...
src/pages/spare/instore/columns.js
View file @
059d7fee
import
AutoTable
from
'@/components/AutoTable/mtable'
;
import
{
ProDescriptions
}
from
'@ant-design/pro-components'
;
import
{
Divider
}
from
'rc-menu'
;
function
getcolumns
(
setdrawer
)
{
const
columns
=
[
{
...
...
@@ -24,7 +25,7 @@ function getcolumns(setdrawer) {
path
:
'/sparepart/sparePart/queryAllSelect'
,
params
:
{},
},
render
:
(
text
,
row
)
=>
row
?.
sparePartNo
+
'/'
+
row
?.
sparePartName
,
render
:
(
text
,
row
)
=>
`
${
row
?.
sparePartNo
||
'--'
}
/${row
?
.sparePartName}`
,
},
{
title
:
'供应商编号/名称'
,
...
...
@@ -49,7 +50,7 @@ function getcolumns(setdrawer) {
params
:
{},
},
render
:
(
text
,
row
)
=>
{
return
row
?.
supplierNo
||
'--'
+
'/'
+
row
?.
supplierName
;
return
`
${
row
?.
supplierNo
||
'--'
}
/${row
?
.supplierName}`
;
},
},
{
...
...
@@ -107,6 +108,24 @@ function getcolumns(setdrawer) {
fieldProps
:
{
placeholder
:
'不填系统自动生成'
,
},
render
:
(
_
,
row
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
}}
>
{
row
?.
taskNo
}
<
/a
>
);
},
},
{
title
:
'入库类型'
,
...
...
@@ -290,6 +309,24 @@ function getcolumns(setdrawer) {
fieldProps
:
{
placeholder
:
'不填系统自动生成'
,
},
render
:
(
_
,
row
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
}}
>
{
row
?.
taskNo
}
<
/a
>
);
},
},
{
title
:
'入库类型'
,
...
...
@@ -449,7 +486,11 @@ function getcolumns(setdrawer) {
],
},
{
title
:
'备件信息'
,
title
:
(
<
div
>
<
span
style
=
{{
color
:
'red'
}}
>*
<
/span>备件信
息
<
/div
>
),
dataIndex
:
'details'
,
key
:
'details'
,
valueType
:
'split'
,
...
...
@@ -481,80 +522,33 @@ function getcolumns(setdrawer) {
{
dataIndex
:
'splias'
,
valueType
:
'split'
,
title
:
'入库信息'
,
hideInForm
:
true
,
title
:
'入库/关单信息'
,
key
:
'splisa'
,
hideInForm
:
true
,
render
:
(
_
,
row
)
=>
{
return
row
?.
status
==
2
?
'入库信息'
:
'关单信息'
;
},
},
{
title
:
'状态'
,
dataIndex
:
'statusName'
,
key
:
'status'
,
hideInForm
:
true
,
span
:
1
,
hideInTable
:
true
,
search
:
false
,
valueType
:
'select'
,
fieldProps
:
{
dropdownMatchSelectWidth
:
120
,
},
width
:
120
,
title
:
'状态'
,
span
:
1
,
key
:
'status'
,
options
:
[
{
label
:
'已入库'
,
value
:
2
},
{
label
:
'已关单'
,
value
:
3
},
],
render
:
(
_
,
row
)
=>
{
return
row
?.
status
==
2
?
'已入库'
:
'--'
;
},
},
{
title
:
'操作人'
,
dataIndex
:
'operateUserName'
,
key
:
'operateUserName'
,
hideInSearch
:
true
,
hideInTable
:
true
,
hideInForm
:
true
,
render
:
(
_
,
row
)
=>
{
return
row
?.
status
==
2
?
row
?.
operateUserName
:
'--'
;
},
label
:
'已出库'
,
value
:
2
,
},
{
title
:
'操作时间'
,
dataIndex
:
'operateTime'
,
key
:
'operateTime'
,
hideInSearch
:
true
,
hideInTable
:
true
,
hideInForm
:
true
,
render
:
(
_
,
row
)
=>
{
return
row
?.
status
==
2
?
row
?.
operateTime
:
'--'
;
},
},
{
dataIndex
:
'splias'
,
valueType
:
'split'
,
hideInForm
:
true
,
title
:
'关单信息'
,
key
:
'splisa'
,
},
{
title
:
'状态'
,
dataIndex
:
'statusName'
,
key
:
'status'
,
hideInForm
:
true
,
hideInTable
:
true
,
span
:
1
,
search
:
false
,
valueType
:
'select'
,
fieldProps
:
{
dropdownMatchSelectWidth
:
120
,
label
:
'已关单'
,
value
:
3
,
},
width
:
120
,
options
:
[
{
label
:
'已入库'
,
value
:
2
},
{
label
:
'已关单'
,
value
:
3
},
],
render
:
(
_
,
row
)
=>
{
return
row
?.
status
==
3
?
'已关单'
:
'--'
;
},
hideInForm
:
true
,
},
{
title
:
'操作人'
,
...
...
@@ -563,9 +557,6 @@ function getcolumns(setdrawer) {
hideInSearch
:
true
,
hideInTable
:
true
,
hideInForm
:
true
,
render
:
(
_
,
row
)
=>
{
return
row
?.
status
==
3
?
row
?.
operateUserName
:
'--'
;
},
},
{
title
:
'操作时间'
,
...
...
@@ -574,9 +565,6 @@ function getcolumns(setdrawer) {
hideInSearch
:
true
,
hideInTable
:
true
,
hideInForm
:
true
,
render
:
(
_
,
row
)
=>
{
return
row
?.
status
==
3
?
row
?.
operateTime
:
'--'
;
},
},
],
pathconfig
:
{
...
...
src/pages/spare/instore/index.jsx
View file @
059d7fee
...
...
@@ -95,16 +95,20 @@ function Instore(props) {
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
columns
;
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
if
(
activeTabKey
==
1
)
{
return
defcolumn
.
concat
({
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
defpath
?.
enabledetail
&&
detail
(
text
,
row
,
_
,
action
),
//
defpath?.enabledetail && detail(text, row, _, action),
defpath
?.
enableedit
&&
edit
(
text
,
row
,
_
,
action
),
defpath
?.
enabledelete
&&
remove
(
text
,
row
,
_
,
action
),
],
});
}
else
{
return
defcolumn
;
}
},
[
activeTabKey
]);
const
pathconfig
=
useMemo
(()
=>
{
...
...
src/pages/spare/outstore/columns.js
View file @
059d7fee
...
...
@@ -79,6 +79,24 @@ function getcolumns(setdrawer) {
fieldProps
:
{
placeholder
:
'不填系统自动生成'
,
},
render
:
(
_
,
row
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
}}
>
{
row
?.
taskNo
}
<
/a
>
);
},
},
{
title
:
'出库类型'
,
...
...
@@ -285,6 +303,24 @@ function getcolumns(setdrawer) {
fieldProps
:
{
placeholder
:
'不填系统自动生成'
,
},
render
:
(
_
,
row
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
}}
>
{
row
?.
taskNo
}
<
/a
>
);
},
},
{
title
:
'出库类型'
,
...
...
@@ -487,6 +523,9 @@ function getcolumns(setdrawer) {
title
:
'出库/关单信息'
,
key
:
'splisa'
,
hideInForm
:
true
,
render
:
(
_
,
row
)
=>
{
return
row
?.
status
==
2
?
'出库信息'
:
'关单信息'
;
},
},
{
dataIndex
:
'statusName'
,
...
...
src/pages/spare/outstore/index.jsx
View file @
059d7fee
...
...
@@ -63,19 +63,19 @@ function Outstore(props) {
size
:
'small'
,
onClick
:
()
=>
{
actionRef
.
current
.
reload
();
//
doFetch(
{
//
url: '/sparepart/outWarehouseTask/queryByBeforeOut',
//
params:
{
id
:
row
?.
id
},
//
}).
then
((
res
)
=>
{
//
setdrawer((s) => (
{
//
...s,
//
open: true,
//
item: row,
//
title: '出库',
//
val: 'only',
//
submitdata: res?.data?.data?.taskSpareList ?? [],
//
}));
//
});
doFetch
({
url
:
'/sparepart/outWarehouseTask/queryByBeforeOut'
,
params
:
{
id
:
row
?.
id
},
}).
then
((
res
)
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'出库'
,
val
:
'only'
,
submitdata
:
res
?.
data
?.
data
?.
taskSpareList
??
[],
}));
});
},
}
}
>
...
...
@@ -108,16 +108,20 @@ function Outstore(props) {
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
columns
;
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
if
(
activeTabKey
==
1
)
{
return
defcolumn
.
concat
({
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
defpath
?.
enabledetail
&&
detail
(
text
,
row
,
_
,
action
),
//
defpath?.enabledetail && detail(text, row, _, action),
defpath
?.
enableedit
&&
edit
(
text
,
row
,
_
,
action
),
defpath
?.
enabledelete
&&
remove
(
text
,
row
,
_
,
action
),
],
});
}
else
{
return
defcolumn
;
}
},
[
activeTabKey
]);
const
pathconfig
=
useMemo
(()
=>
{
...
...
@@ -230,7 +234,7 @@ function Outstore(props) {
expandable=
{
{
expandedRowRender
:
(
record
)
=>
{
return
(
<
div
style=
{
{
padding
:
'4px 4px 4px 36px'
,
backgroundColor
:
'#cccccc'
}
}
>
<
div
>
<
EditTable
resizeable=
{
false
}
alwaysShowAlert=
{
false
}
...
...
src/pages/spare/requisition/columns.js
View file @
059d7fee
import
AutoTable
from
'@/components/AutoTable/mtable'
;
function
getcolumns
(
type
,
fullName
)
{
function
getcolumns
(
setdrawer
,
type
,
fullName
)
{
const
columns
=
[
{
title
:
'备件料号'
,
...
...
@@ -58,6 +58,24 @@ function getcolumns(type, fullName) {
placeholder
:
'不填系统自动生成'
,
},
key
:
'taskNo'
,
render
:
(
_
,
row
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
}}
>
{
row
?.
taskNo
}
<
/a
>
);
},
},
{
title
:
'申请原因'
,
...
...
@@ -304,6 +322,24 @@ function getcolumns(type, fullName) {
placeholder
:
'不填系统自动生成'
,
},
key
:
'taskNo'
,
render
:
(
_
,
row
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
}}
>
{
row
?.
taskNo
}
<
/a
>
);
},
},
{
title
:
'申请原因'
,
...
...
@@ -481,7 +517,7 @@ function getcolumns(type, fullName) {
hideInForm
:
true
,
},
{
title
:
'备件'
,
//
title: '备件',
dataIndex
:
'detailsList'
,
key
:
'detailsList'
,
valueType
:
'formSelectList'
,
...
...
src/pages/spare/requisition/index.jsx
View file @
059d7fee
...
...
@@ -138,21 +138,25 @@ function Requisition(props) {
};
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
drawer
?.
type
,
currentUser
?.
fullName
).
filter
(
let
defcolumn
=
getcolumns
(
setdrawer
,
drawer
?.
type
,
currentUser
?.
fullName
).
filter
(
(
it
)
=>
it
.
key
==
activeTabKey
,
)[
0
]?.
columns
;
let
defpath
=
getcolumns
(
drawer
?.
type
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
getcolumns
(
setdrawer
,
drawer
?.
type
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
if
(
activeTabKey
==
1
)
{
return
defcolumn
.
concat
({
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
defpath
?.
enabledetail
&&
detail
(
text
,
row
,
_
,
action
),
//
defpath?.enabledetail && detail(text, row, _, action),
defpath
?.
enableedit
&&
edit
(
text
,
row
,
_
,
action
),
defpath
?.
enabledelete
&&
remove
(
text
,
row
,
_
,
action
),
],
});
}
else
{
return
defcolumn
;
}
},
[
activeTabKey
,
drawer
?.
type
]);
const
pathconfig
=
useMemo
(()
=>
{
...
...
src/pages/spare/setting/columns.js
View file @
059d7fee
...
...
@@ -46,6 +46,24 @@ function getcolumns(setdrawer) {
},
],
},
render
:
(
_
,
row
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
}}
>
{
row
?.
sparePartNo
}
<
/a
>
);
},
},
{
title
:
'备件名称'
,
...
...
src/pages/spare/setting/index.jsx
View file @
059d7fee
...
...
@@ -106,7 +106,7 @@ function Setting(props) {
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
pathconfig
?.
enabledetail
&&
detail
(
text
,
row
,
_
,
action
),
//
pathconfig?.enabledetail && detail(text, row, _, action),
pathconfig
?.
enableedit
&&
edit
(
text
,
row
,
_
,
action
),
pathconfig
?.
enabledelete
&&
remove
(
text
,
row
,
_
,
action
),
],
...
...
src/pages/spare/spareback/columns.js
View file @
059d7fee
import
AutoTable
from
'@/components/AutoTable/mtable'
;
function
getcolumns
(
type
,
fullName
)
{
function
getcolumns
(
setdrawer
,
type
,
fullName
)
{
const
columns
=
[
{
title
:
'备件料号'
,
...
...
@@ -70,6 +70,24 @@ function getcolumns(type, fullName) {
fieldProps
:
{
placeholder
:
'不填系统自动生成'
,
},
render
:
(
_
,
row
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
}}
>
{
row
?.
taskNo
}
<
/a
>
);
},
},
{
title
:
'申请原因'
,
...
...
@@ -307,6 +325,24 @@ function getcolumns(type, fullName) {
fieldProps
:
{
placeholder
:
'不填系统自动生成'
,
},
render
:
(
_
,
row
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
}}
>
{
row
?.
taskNo
}
<
/a
>
);
},
},
{
title
:
'申请原因'
,
...
...
src/pages/spare/spareback/index.jsx
View file @
059d7fee
...
...
@@ -136,21 +136,26 @@ function Spareback(props) {
};
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
drawer
?.
type
,
currentUser
?.
fullName
).
filter
(
let
defcolumn
=
getcolumns
(
setdrawer
,
drawer
?.
type
,
currentUser
?.
fullName
).
filter
(
(
it
)
=>
it
.
key
==
activeTabKey
,
)[
0
]?.
columns
;
let
defpath
=
getcolumns
(
drawer
?.
type
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
getcolumns
(
setdrawer
,
drawer
?.
type
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
if
(
activeTabKey
==
1
)
{
return
defcolumn
.
concat
({
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
defpath
?.
enabledetail
&&
detail
(
text
,
row
,
_
,
action
),
//
defpath?.enabledetail && detail(text, row, _, action),
defpath
?.
enableedit
&&
edit
(
text
,
row
,
_
,
action
),
defpath
?.
enabledelete
&&
remove
(
text
,
row
,
_
,
action
),
],
});
}
else
{
return
defcolumn
;
}
},
[
activeTabKey
,
drawer
?.
type
]);
const
pathconfig
=
useMemo
(()
=>
{
...
...
src/pages/spare/stock/index.jsx
View file @
059d7fee
...
...
@@ -10,7 +10,7 @@ import AutoTables from '@/components/AutoTable/mtable';
function
ExtraTable
({
spareStockId
})
{
return
(
<
div
style=
{
{
padding
:
'4px 4px 4px 36px'
,
backgroundColor
:
'#cccccc'
}
}
>
<
div
>
<
AutoTables
path=
{
'/sparepart/spareSupplierStock/queryBySpareStockId'
}
extraparams=
{
{
spareStockId
:
spareStockId
}
}
...
...
src/pages/spare/supplier/columns.js
View file @
059d7fee
import
{
Switch
}
from
'antd'
;
import
AutoTable
from
'@/components/AutoTable/mtable'
;
function
getcolumns
(
changeState
)
{
function
getcolumns
(
setdrawer
,
changeState
)
{
let
columns
=
[
{
title
:
'联系人名称'
,
...
...
@@ -50,6 +50,24 @@ function getcolumns(changeState) {
title
:
'供应商编号'
,
dataIndex
:
'supplierNo'
,
key
:
'supplierNo'
,
render
:
(
_
,
row
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
}}
>
{
row
?.
supplierNo
}
<
/a
>
);
},
},
{
title
:
'供应商名称'
,
...
...
src/pages/spare/supplier/index.jsx
View file @
059d7fee
...
...
@@ -24,7 +24,7 @@ function Supplier(props) {
]);
const
pathconfig
=
useMemo
(()
=>
{
let
pathconf
=
getcolumns
(
changeState
)?.
pathconfig
??
{};
let
pathconf
=
getcolumns
(
setdrawer
,
changeState
)?.
pathconfig
??
{};
return
pathconf
;
},
[]);
...
...
@@ -124,7 +124,7 @@ function Supplier(props) {
...
it
,
hideInSearch
:
true
,
}));
let
defcolumn
=
getcolumns
(
changeState
)?.
columns
??
[];
let
defcolumn
=
getcolumns
(
setdrawer
,
changeState
)?.
columns
??
[];
setcolumns
([
...
defcolumn
,
...
extracolumns
,
...
...
@@ -133,7 +133,7 @@ function Supplier(props) {
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
pathconfig
?.
enabledetail
&&
detail
(
text
,
row
,
_
,
action
),
//
pathconfig?.enabledetail && detail(text, row, _, action),
pathconfig
?.
enableedit
&&
edit
(
text
,
row
,
_
,
action
),
pathconfig
?.
enabledelete
&&
remove
(
text
,
row
,
_
,
action
),
],
...
...
Write
Preview
Markdown
is supported
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