Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wms
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
wms
Commits
0ece29b2
Commit
0ece29b2
authored
Jul 12, 2022
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asder
parent
dc8eebf1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
235 additions
and
10 deletions
+235
-10
detail.jsx
src/components/Details/detail.jsx
+12
-1
fields.js
src/pages/insertstore/Instore/fields.js
+212
-7
index.jsx
src/pages/insertstore/Instore/index.jsx
+11
-2
No files found.
src/components/Details/detail.jsx
View file @
0ece29b2
...
...
@@ -3,7 +3,7 @@ import {
Table
,
Divider
,
Card
,
Descriptions
,
Button
,
Typography
,
Spin
,
Row
,
...
...
@@ -11,9 +11,11 @@ import {
Tooltip
,
Rate
,
Image
,
message
,
}
from
"antd"
;
import
{
doFetch
,
postFetch
}
from
"@/utils/doFetch"
;
import
AutoTable
from
"@/components/Tableform"
;
import
{
useModel
}
from
'umi'
import
styles
from
"./index.less"
;
const
Details
=
(
props
)
=>
{
...
...
@@ -39,6 +41,8 @@ const Details = (props) => {
}
=
props
;
const
[
pageData
,
cp
]
=
useState
({});
const
{
initialState
,
setInitialState
}
=
useModel
(
"@@initialState"
);
useEffect
(()
=>
{
if
(
dataSource
)
{
cp
(
dataSource
);
...
...
@@ -171,6 +175,13 @@ const Details = (props) => {
bordered=
{
false
}
style=
{
{
marginBottom
:
16
}
}
bodyStyle=
{
{
padding
:
"16px 10px"
}
}
extra=
{
item
?.
extra
?
<
Button
type=
"primary"
onClick=
{
()
=>
{
doFetch
({
url
:
item
.
extrapath
,
params
:
initialState
[
item
.
extrakey
]
}).
then
(
res
=>
{
if
(
res
.
code
==
"0000"
)
{
message
.
success
(
"操作成功"
)
}
})
}
}
>
保存
</
Button
>
:
null
}
>
<
Row
gutter=
{
[
12
,
12
]
}
>
{
item
?.
itemData
?.
map
((
it
,
j
)
=>
{
...
...
src/pages/insertstore/Instore/fields.js
View file @
0ece29b2
import
{
factorySelect
,
shopSelectByFactory
}
from
"@/services/system"
;
import
{
doFetch
}
from
"@/utils/doFetch"
;
import
{
Table
}
from
"antd"
;
import
{
Button
,
Table
}
from
"antd"
;
import
{
EditableProTable
}
from
"@ant-design/pro-table"
;
import
{
useEffect
,
useState
}
from
'react'
import
{
useModel
}
from
'umi'
const
EditUpload
=
({
record
})
=>
{
const
[
value
,
setvalue
]
=
useState
({});
const
{
initialState
,
setInitialState
}
=
useModel
(
"@@initialState"
);
useEffect
(()
=>
{
if
(
!
value
)
{
return
}
setInitialState
(
s
=>
({
...
s
,
submit
:
{
id
:
record
.
id
,
materialList
:
Object
.
keys
(
value
)?.
map
?.(
it
=>
{
let
id
=
it
;
return
{
id
,
uploadList
:
value
[
id
]?.
map
(
its
=>
{
return
{
storeId
:
its
?.
storeId
,
instroeNum
:
its
?.
instroeNum
,
remark
:
its
?.
remark
}
})
}
})
}
}))
},
[
value
])
return
<
EditableProTable
maxLength
=
{
1000
}
style
=
{{
marginLeft
:
48
}}
columns
=
{[
{
title
:
"库位名称"
,
dataIndex
:
"storeName"
,
key
:
"storeId"
,
search
:
false
,
valueType
:
"select"
,
request
:
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-auth/sysStore/selectionBox"
,
params
:
{
factoryIdList
:
[]
}
});
return
res
?.
data
?.
dataList
},
editable
:
(
text
,
record
,
index
)
=>
{
return
!
record
.
materieOutstoreDetailId
}
},
{
title
:
"上架数量"
,
dataIndex
:
"instroeNum"
,
key
:
"instroeNum"
,
search
:
false
,
editable
:
(
text
,
record
,
index
)
=>
{
return
!
record
.
materieOutstoreDetailId
}
},
{
title
:
"备注"
,
dataIndex
:
"remark"
,
key
:
"remark"
,
search
:
false
,
editable
:
(
text
,
record
,
index
)
=>
{
return
!
record
.
materieOutstoreDetailId
}
},
{
title
:
"操作"
,
valueType
:
"option"
,
width
:
70
,
render
:
(
text
,
record
,
_
,
action
)
=>
[
<
a
key
=
"delete"
onClick
=
{()
=>
{
}}
>
删除
<
/a>
,
],
}
]}
value
=
{[...(
record
.
downloadList
??
[]),
...(
value
[
record
.
materieInstoreId
]
??
[])]}
recordCreatorProps
=
{{
newRecordType
:
"dataSource"
,
record
:
()
=>
({
id
:
Date
.
now
(),
}),
}}
editable
=
{{
type
:
"multiple"
,
actionRender
:
(
row
,
config
,
defaultDoms
)
=>
{
return
[
defaultDoms
.
delete
];
},
onValuesChange
:
async
(
records
,
recordList
)
=>
{
setvalue
(
s
=>
({
...
s
,
[
record
.
materieInstoreId
]:
recordList
}));
},
}}
pagination
=
{
false
}
/
>
}
const
one
=
{
"materieInstoreNo"
:
{
...
...
@@ -589,15 +690,27 @@ const one = {
col
:
{
span
:
24
},
columns
:
[
{
title
:
"物料名称"
,
title
:
"物料
编码 -
名称"
,
dataIndex
:
"materieName"
,
key
:
"materieName"
,
search
:
false
,
render
:
(
dom
,
row
)
=>
{
return
(
row
.
materieCode
??
''
)
+
" - "
+
(
row
.
materieName
??
''
)
}
},
{
title
:
"物料编码"
,
dataIndex
:
"materieCode"
,
key
:
"materieCode"
,
title
:
"供应商编号 - 名称"
,
dataIndex
:
"supplierNo"
,
key
:
"supplierNo"
,
search
:
false
,
render
:
(
dom
,
row
)
=>
{
return
(
row
.
supplierNo
??
''
)
+
" - "
+
(
row
.
supplierName
??
''
)
}
},
{
title
:
"批次号/SN号"
,
dataIndex
:
"materieControlNo"
,
key
:
"materieControlNo"
,
search
:
false
,
},
{
...
...
@@ -630,7 +743,7 @@ const one = {
search
:
false
,
}
]}
dataSource
=
{
record
.
up
loadList
}
dataSource
=
{
record
.
down
loadList
}
pagination
=
{
false
}
/>
,
}
...
...
@@ -638,6 +751,97 @@ const one = {
],
},
]
},
doinsert
=
{
totalCard
:
[
//物料详情
{
cardTitle
:
"基本信息"
,
itemData
:
[
{
title
:
"入库单号"
,
key
:
"materieInstoreNo"
,
},
{
title
:
"入库类型"
,
key
:
"instoreTypeName"
,
},
{
title
:
"入库仓库"
,
key
:
"storeName"
,
},
{
title
:
"相关单号"
,
key
:
"businessNo"
,
},
{
title
:
"备注"
,
key
:
"remark"
,
},
{
title
:
"创建人"
,
key
:
"createUserName"
,
},
{
title
:
"创建时间"
,
key
:
"createTime"
,
},
],
},
{
cardTitle
:
"物料信息列表"
,
extra
:
true
,
extrapath
:
"/ngic-workmanship/wmsMaterieInstore/upload"
,
extrakey
:
"submit"
,
//redux key
itemData
:
[
{
key
:
"materialList"
,
type
:
"table"
,
col
:
{
span
:
24
},
columns
:
[
{
title
:
"物料编码 - 名称"
,
dataIndex
:
"materieName"
,
key
:
"materieName"
,
search
:
false
,
render
:
(
dom
,
row
)
=>
{
return
(
row
.
materieCode
??
''
)
+
" - "
+
(
row
.
materieName
??
''
)
}
},
{
title
:
"供应商编号 - 名称"
,
dataIndex
:
"supplierNo"
,
key
:
"supplierNo"
,
search
:
false
,
render
:
(
dom
,
row
)
=>
{
return
(
row
.
supplierNo
??
''
)
+
" - "
+
(
row
.
supplierName
??
''
)
}
},
{
title
:
"批次号/SN号"
,
dataIndex
:
"materieControlNo"
,
key
:
"materieControlNo"
,
search
:
false
,
},
{
title
:
"入库数量"
,
dataIndex
:
"instroeNum"
,
key
:
"instroeNum"
,
search
:
false
,
},
{
title
:
"单位"
,
dataIndex
:
"productionUnitName"
,
key
:
"productionUnitName"
,
search
:
false
,
},
],
expandable
:
{
expandedRowRender
:
record
=>
<
EditUpload
record
=
{
record
}
/>
,
}
},
],
},
]
};
...
...
@@ -648,5 +852,6 @@ export default {
two
,
three
,
four
,
detail
detail
,
doinsert
};
src/pages/insertstore/Instore/index.jsx
View file @
0ece29b2
...
...
@@ -197,8 +197,17 @@ function Instore(props) {
"render"
:
(
text
,
record
,
_
,
action
)
=>
{
return
[
getPrem
(
"equipmentCustomer_save"
,
action
,
'上架采集'
,
async
()
=>
{
let
extra
=
defaultFields
.
doinsert
;
setdrawprops
(
s
=>
({
...
s
,
visible
:
true
,
//查看详情 props
val
:
"detail"
,
title
:
`上架采集`
,
...
extra
,
totalPath
:
"/ngic-workmanship/wmsMaterieInstore/getInStoreInfoById"
,
totalParams
:
{
id
:
record
.
id
}
}))
}),
getPrem
(
"equipmentCustomer_deleteById"
,
action
,
'关单'
,
null
,
{
...
...
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