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
0da2f8a1
Commit
0da2f8a1
authored
Feb 03, 2023
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asd
parent
029f1993
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
191 additions
and
78 deletions
+191
-78
mtable.jsx
src/components/AutoTable/mtable.jsx
+2
-2
index.jsx
src/components/DetailPro/index.jsx
+27
-25
FormItems.jsx
src/components/InitForm/FormItems.jsx
+46
-46
index.jsx
src/components/InitForm/index.jsx
+10
-0
columns.js
src/pages/spare/instore/columns.js
+14
-0
columns.js
src/pages/spare/outstore/columns.js
+14
-0
columns.js
src/pages/spare/requisition/columns.js
+33
-1
index.jsx
src/pages/spare/requisition/index.jsx
+7
-1
columns.js
src/pages/spare/spareback/columns.js
+31
-1
index.jsx
src/pages/spare/spareback/index.jsx
+7
-2
No files found.
src/components/AutoTable/mtable.jsx
View file @
0da2f8a1
...
...
@@ -392,8 +392,8 @@ const Mtable = (props) => {
}
}
columns=
{
resizeable
?
columnes
?.
filter
?.((
it
)
=>
it
.
valueType
!=
'split'
)
??
[]
:
columncs
?.
filter
?.((
it
)
=>
it
.
valueType
!=
'split'
)
??
[]
?
columnes
?.
filter
?.((
it
)
=>
[
'split'
,
'nosubmit'
].
indexOf
(
it
.
valueType
)
==
-
1
)
??
[]
:
columncs
?.
filter
?.((
it
)
=>
[
'split'
,
'nosubmit'
].
indexOf
(
it
.
valueType
)
==
-
1
)
??
[]
}
style=
{
style
||
{}
}
actionRef=
{
actionRefs
}
...
...
src/components/DetailPro/index.jsx
View file @
0da2f8a1
...
...
@@ -59,7 +59,9 @@ function DetailPro(props) {
return
(
<
ProDescriptions
column=
{
3
}
{
...
dataProps
}
title=
{
props
.
title
}
>
{
fields
?.
filter
(
it
=>
!
it
.
hideInDescriptions
&&
it
?.
valueType
!=
"option"
)?.
map
((
it
,
i
)
=>
{
{
fields
?.
filter
((
it
)
=>
!
it
.
hideInDescriptions
&&
it
?.
valueType
!=
'option'
)
?.
map
((
it
,
i
)
=>
{
const
dataIndexs
=
!
it
?.
render
||
it
?.
valueType
==
'option'
?
{
dataIndex
:
it
.
dataIndex
,
valueType
:
it
.
valueType
}
...
...
src/components/InitForm/FormItems.jsx
View file @
0da2f8a1
This diff is collapsed.
Click to expand it.
src/components/InitForm/index.jsx
View file @
0da2f8a1
...
...
@@ -13,6 +13,7 @@ import { doFetch } from '@/utils/doFetch';
import
styles
from
'./index.less'
;
import
FormItems
from
'./FormItems'
;
import
ExtendField
from
'@/components/ExtendField'
;
import
{
Input
,
Col
}
from
'antd'
;
function
upperCase
(
str
)
{
const
newStr
=
str
.
slice
(
0
,
1
).
toUpperCase
()
+
str
.
slice
(
1
);
...
...
@@ -35,6 +36,15 @@ let FormRender = memo(({ fields = [], colProps, proformRef }) => {
</
div
>
);
}
if
(
item
?.
valueType
==
'nosubmit'
)
{
return
(
<
Col
{
...
(
item
.
colProps
??
{
span
:
12
})}
style=
{
{
marginBottom
:
24
}
}
>
<
label
style=
{
{
marginBottom
:
8
,
display
:
'block'
}
}
>
{
item
?.
title
}
</
label
>
<
Input
disabled
value=
{
item
?.
initialValue
}
/>
</
Col
>
);
}
if
(
hideInForm
&&
Object
.
keys
(
hideInForm
))
{
return
(
<
ProFormDependency
name=
{
Object
.
keys
(
hideInForm
)
}
>
...
...
src/pages/spare/instore/columns.js
View file @
0da2f8a1
...
...
@@ -158,6 +158,13 @@ function getcolumns(setdrawer) {
key
:
'inWarehouseName'
,
hideInForm
:
true
,
},
{
title
:
'入库仓库'
,
dataIndex
:
'nosubmits'
,
initialValue
:
'备件仓库'
,
valueType
:
'nosubmit'
,
hideInDescriptions
:
true
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'outWarehouseName'
,
...
...
@@ -322,6 +329,13 @@ function getcolumns(setdrawer) {
key
:
'inWarehouseName'
,
hideInForm
:
true
,
},
{
title
:
'入库仓库'
,
dataIndex
:
'nosubmits'
,
initialValue
:
'备件仓库'
,
valueType
:
'nosubmit'
,
hideInDescriptions
:
true
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'outWarehouseName'
,
...
...
src/pages/spare/outstore/columns.js
View file @
0da2f8a1
...
...
@@ -139,6 +139,13 @@ function getcolumns(setdrawer) {
],
},
},
{
title
:
'出库仓库'
,
dataIndex
:
'nosubmits'
,
initialValue
:
'备件仓库'
,
valueType
:
'nosubmit'
,
hideInDescriptions
:
true
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'outWarehouseName'
,
...
...
@@ -317,6 +324,13 @@ function getcolumns(setdrawer) {
],
},
},
{
title
:
'出库仓库'
,
dataIndex
:
'nosubmits'
,
initialValue
:
'备件仓库'
,
valueType
:
'nosubmit'
,
hideInDescriptions
:
true
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'outWarehouseName'
,
...
...
src/pages/spare/requisition/columns.js
View file @
0da2f8a1
import
AutoTable
from
'@/components/AutoTable/mtable'
;
function
getcolumns
(
type
)
{
function
getcolumns
(
type
,
fullName
)
{
const
columns
=
[
{
title
:
'备件料号'
,
...
...
@@ -82,6 +82,14 @@ function getcolumns(type) {
},
],
},
{
title
:
'入库仓库(个人)'
,
dataIndex
:
'nosubmit'
,
initialValue
:
fullName
,
valueType
:
'nosubmit'
,
hideInForm
:
type
!==
1
,
hideInDescriptions
:
true
,
},
{
title
:
'入库仓库'
,
dataIndex
:
'inWarehouseName'
,
...
...
@@ -95,6 +103,13 @@ function getcolumns(type) {
},
hideInForm
:
type
==
1
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'nosubmits'
,
initialValue
:
'备件仓库'
,
valueType
:
'nosubmit'
,
hideInDescriptions
:
true
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'outWarehouseName'
,
...
...
@@ -147,6 +162,7 @@ function getcolumns(type) {
key
:
'status'
,
hideInForm
:
true
,
valueType
:
'select'
,
span
:
3
,
options
:
[
{
label
:
'待审批'
,
...
...
@@ -279,6 +295,14 @@ function getcolumns(type) {
},
],
},
{
title
:
'入库仓库(个人)'
,
dataIndex
:
'nosubmit'
,
initialValue
:
fullName
,
valueType
:
'nosubmit'
,
hideInForm
:
type
!==
1
,
hideInDescriptions
:
true
,
},
{
title
:
'入库仓库'
,
dataIndex
:
'inWarehouseName'
,
...
...
@@ -292,6 +316,13 @@ function getcolumns(type) {
},
hideInForm
:
type
==
1
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'nosubmits'
,
initialValue
:
'备件仓库'
,
valueType
:
'nosubmit'
,
hideInDescriptions
:
true
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'outWarehouseName'
,
...
...
@@ -355,6 +386,7 @@ function getcolumns(type) {
key
:
'status'
,
hideInForm
:
true
,
valueType
:
'select'
,
span
:
3
,
options
:
[
{
label
:
'已驳回'
,
...
...
src/pages/spare/requisition/index.jsx
View file @
0da2f8a1
...
...
@@ -9,6 +9,7 @@ import { useRequest } from 'ahooks';
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
InitForm
from
'@/components/InitForm'
;
import
{
message
,
Divider
}
from
'antd'
;
import
{
useModel
}
from
'@umijs/max'
;
function
Requisition
(
props
)
{
const
actionRef
=
useRef
(),
...
...
@@ -17,6 +18,9 @@ function Requisition(props) {
open
:
false
,
}),
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
'1'
);
const
{
initialState
:
{
currentUser
},
}
=
useModel
(
'@@initialState'
);
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
...
...
@@ -134,7 +138,9 @@ function Requisition(props) {
};
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
drawer
?.
type
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
columns
;
let
defcolumn
=
getcolumns
(
drawer
?.
type
,
currentUser
?.
fullName
).
filter
(
(
it
)
=>
it
.
key
==
activeTabKey
,
)[
0
]?.
columns
;
let
defpath
=
getcolumns
(
drawer
?.
type
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
return
defcolumn
.
concat
({
...
...
src/pages/spare/spareback/columns.js
View file @
0da2f8a1
import
AutoTable
from
'@/components/AutoTable/mtable'
;
function
getcolumns
(
type
)
{
function
getcolumns
(
type
,
fullName
)
{
const
columns
=
[
{
title
:
'备件料号'
,
...
...
@@ -96,6 +96,21 @@ function getcolumns(type) {
key
:
'inWarehouseName'
,
hideInForm
:
true
,
},
{
title
:
'入库仓库'
,
dataIndex
:
'nosubmits'
,
initialValue
:
'备件仓库'
,
valueType
:
'nosubmit'
,
hideInDescriptions
:
true
,
},
{
title
:
'出库仓库(个人)'
,
dataIndex
:
'nosubmit'
,
initialValue
:
fullName
,
valueType
:
'nosubmit'
,
hideInForm
:
type
!==
1
,
hideInDescriptions
:
true
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'outWarehouseName'
,
...
...
@@ -308,6 +323,21 @@ function getcolumns(type) {
key
:
'inWarehouseName'
,
hideInForm
:
true
,
},
{
title
:
'入库仓库'
,
dataIndex
:
'nosubmits'
,
initialValue
:
'备件仓库'
,
valueType
:
'nosubmit'
,
hideInDescriptions
:
true
,
},
{
title
:
'出库仓库(个人)'
,
dataIndex
:
'nosubmit'
,
initialValue
:
fullName
,
valueType
:
'nosubmit'
,
hideInForm
:
type
!==
1
,
hideInDescriptions
:
true
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'outWarehouseName'
,
...
...
src/pages/spare/spareback/index.jsx
View file @
0da2f8a1
...
...
@@ -8,6 +8,7 @@ import { useRequest } from 'ahooks';
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
InitForm
from
'@/components/InitForm'
;
import
{
message
,
Divider
}
from
'antd'
;
import
{
useModel
}
from
'@umijs/max'
;
function
Spareback
(
props
)
{
const
actionRef
=
useRef
(),
...
...
@@ -16,7 +17,9 @@ function Spareback(props) {
open
:
false
,
}),
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
'1'
);
const
{
initialState
:
{
currentUser
},
}
=
useModel
(
'@@initialState'
);
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
onSuccess
:
(
res
,
params
)
=>
{
...
...
@@ -133,7 +136,9 @@ function Spareback(props) {
};
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
drawer
?.
type
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
columns
;
let
defcolumn
=
getcolumns
(
drawer
?.
type
,
currentUser
?.
fullName
).
filter
(
(
it
)
=>
it
.
key
==
activeTabKey
,
)[
0
]?.
columns
;
let
defpath
=
getcolumns
(
drawer
?.
type
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
return
defcolumn
.
concat
({
...
...
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