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
8fed24cd
Commit
8fed24cd
authored
Jul 14, 2022
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asder
parent
c65efff5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
172 additions
and
38 deletions
+172
-38
proxy.js
config/proxy.js
+1
-1
index.jsx
src/components/EditTable/index.jsx
+5
-4
fields.js
src/pages/insertstore/Instore/fields.js
+19
-15
index.jsx
src/pages/insertstore/Instore/index.jsx
+1
-1
fields.js
src/pages/outsetstore/Outstore/fields.js
+128
-14
index.jsx
src/pages/outsetstore/Outstore/index.jsx
+18
-3
No files found.
config/proxy.js
View file @
8fed24cd
...
...
@@ -11,7 +11,7 @@ export default {
// localhost:8000/api/** -> https://preview.pro.ant.design/api/**
"/wms/"
:
{
// 要代理的地址
target
:
"http://192.168.40.1
02
:28040/"
,
//39:18040 23/wms/ //60 翔 //18
target
:
"http://192.168.40.1
14
:28040/"
,
//39:18040 23/wms/ //60 翔 //18
changeOrigin
:
true
,
pathRewrite
:
{
"^/wms"
:
""
,
...
...
src/components/EditTable/index.jsx
View file @
8fed24cd
...
...
@@ -68,12 +68,12 @@ const EditTable = ({
//参数获取
let
parames
=
{};
let
ifs
=
fals
e
;
let
ifs
=
tru
e
;
Object
.
keys
(
params
).
map
(
it
=>
{
if
(
params
[
it
]
==
"linked"
)
{
parames
[
it
]
=
record
[
it
]
if
(
record
[
it
]
=
=
curvaluerow
[
it
])
{
ifs
=
tru
e
;
if
(
record
[
it
]
!
=
curvaluerow
[
it
])
{
ifs
=
fals
e
;
}
}
else
{
parames
[
it
]
=
params
[
it
]
...
...
@@ -89,7 +89,8 @@ const EditTable = ({
newvalue
=
newvalue
.
map
((
it
,
i
)
=>
{
if
(
it
[
rowKey
]
==
record
[
rowKey
])
{
Object
.
keys
(
effectresult
).
map
(
items
=>
{
it
[
items
]
=
res
?.
data
?.
data
[
effectresult
[
items
]];
let
result
=
res
?.
data
?.
data
??
{}
it
[
items
]
=
result
[
effectresult
[
items
]];
})
}
editorFormRef
.
current
?.
setRowData
?.(
i
,
it
)
...
...
src/pages/insertstore/Instore/fields.js
View file @
8fed24cd
...
...
@@ -5,10 +5,14 @@ import { EditableProTable } from "@ant-design/pro-table";
import
{
useEffect
,
useState
}
from
'react'
import
{
useModel
}
from
'umi'
const
EditUpload
=
({
record
,
fid
})
=>
{
const
[
value
,
setvalue
]
=
useState
({});
const
EditUpload
=
({
record
,
fid
,
storeId
})
=>
{
const
[
value
,
setvalue
]
=
useState
({
[
record
.
id
]:
record
.
uploadList
});
const
{
initialState
,
setInitialState
}
=
useModel
(
"@@initialState"
);
console
.
log
(
'===================================='
);
console
.
log
(
storeId
);
console
.
log
(
'===================================='
);
useEffect
(()
=>
{
if
(
!
value
)
{
return
...
...
@@ -40,12 +44,12 @@ const EditUpload = ({ record, fid }) => {
columns
=
{[
{
title
:
"库位名称"
,
dataIndex
:
"storeName"
,
dataIndex
:
"store
Position
Name"
,
key
:
"storePositionId"
,
search
:
false
,
valueType
:
"select"
,
request
:
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-auth/sysStorePosition/queryByStoreId/selection"
,
params
:
{
storeId
:
record
.
storeId
}
});
let
res
=
await
doFetch
({
url
:
"/ngic-auth/sysStorePosition/queryByStoreId/selection"
,
params
:
{
storeId
:
storeId
}
});
return
res
?.
data
?.
dataList
},
editable
:
(
text
,
record
,
index
)
=>
{
...
...
@@ -81,7 +85,7 @@ const EditUpload = ({ record, fid }) => {
],
}
]}
value
=
{
[...(
record
.
downloadList
??
[]),
...(
value
[
record
.
id
]
??
[])
]}
value
=
{
value
[
record
.
id
]}
recordCreatorProps
=
{{
newRecordType
:
"dataSource"
,
record
:
()
=>
({
...
...
@@ -733,8 +737,8 @@ const one = {
columns
=
{[
{
title
:
"库位名称"
,
dataIndex
:
"storeName"
,
key
:
"storeName"
,
dataIndex
:
"store
Position
Name"
,
key
:
"store
Position
Name"
,
search
:
false
,
},
{
...
...
@@ -744,7 +748,7 @@ const one = {
search
:
false
,
}
]}
dataSource
=
{
record
.
down
loadList
}
dataSource
=
{
record
.
up
loadList
}
pagination
=
{
false
}
/>
,
},
...
...
@@ -767,7 +771,7 @@ const one = {
},
{
cardTitle
:
"上架明细"
,
noPrint
:
true
,
noPrint
:
true
,
itemData
:
[
{
key
:
"materialUploadList"
,
...
...
@@ -818,8 +822,8 @@ const one = {
columns
=
{[
{
title
:
"库位名称"
,
dataIndex
:
"storeName"
,
key
:
"storeName"
,
dataIndex
:
"store
Position
Name"
,
key
:
"store
Position
Name"
,
search
:
false
,
},
{
...
...
@@ -850,7 +854,7 @@ const one = {
search
:
false
,
}
]}
dataSource
=
{
record
.
down
loadList
}
dataSource
=
{
record
.
up
loadList
}
pagination
=
{
false
}
/>
,
},
...
...
@@ -859,7 +863,7 @@ const one = {
],
},
]
},
doinsert
=
(
fid
)
=>
({
},
doinsert
=
(
fid
,
storeId
)
=>
({
totalCard
:
[
//物料详情
{
...
...
@@ -944,7 +948,7 @@ const one = {
},
],
expandable
:
{
expandedRowRender
:
record
=>
<
EditUpload
record
=
{
record
}
fid
=
{
fid
}
/>
,
expandedRowRender
:
record
=>
<
EditUpload
record
=
{
record
}
fid
=
{
fid
}
storeId
=
{
storeId
}
/>
,
}
},
],
...
...
src/pages/insertstore/Instore/index.jsx
View file @
8fed24cd
...
...
@@ -211,7 +211,7 @@ function Instore(props) {
"render"
:
(
text
,
record
,
_
,
action
)
=>
{
return
[
getPrem
(
"equipmentCustomer_save"
,
action
,
'上架采集'
,
async
()
=>
{
let
extra
=
defaultFields
.
doinsert
(
record
.
id
);
let
extra
=
defaultFields
.
doinsert
(
record
.
id
,
record
.
storeId
);
setdrawprops
(
s
=>
({
...
s
,
visible
:
true
,
...
...
src/pages/outsetstore/Outstore/fields.js
View file @
8fed24cd
...
...
@@ -5,10 +5,14 @@ import EditTable from "@/components/EditTable";
import
{
useEffect
,
useState
}
from
'react'
import
{
useModel
}
from
'umi'
const
EditUpload
=
({
record
,
fid
})
=>
{
const
[
value
,
setvalue
]
=
useState
({});
const
EditUpload
=
({
record
,
fid
,
storeId
})
=>
{
const
[
value
,
setvalue
]
=
useState
({
[
record
.
id
]:
record
.
downloadList
});
const
{
initialState
,
setInitialState
}
=
useModel
(
"@@initialState"
);
console
.
log
(
'===================================='
);
console
.
log
(
storeId
);
console
.
log
(
'===================================='
);
useEffect
(()
=>
{
if
(
!
value
)
{
return
...
...
@@ -40,10 +44,11 @@ const EditUpload = ({ record, fid }) => {
linkconfig
=
{{
urlchangeval
:
{
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieStore/queryStoreOne"
,
params
}),
params
:
{
"
materieId
"
:
"linked"
},
params
:
{
"
storePositionId"
:
"linked"
,
"materieControlNo
"
:
"linked"
},
effectresult
:
{
"productionUnit"
:
"productionUnit"
,
"productionUnitName"
:
"productionUnitName"
"supplierNo"
:
"supplierNo"
,
"supplierName"
:
"supplierName"
,
"productionNum"
:
"productionNum"
,
}
}
}}
...
...
@@ -51,12 +56,12 @@ const EditUpload = ({ record, fid }) => {
columns
=
{[
{
title
:
"库位名称"
,
dataIndex
:
"storeName"
,
dataIndex
:
"store
Position
Name"
,
key
:
"storePositionId"
,
search
:
false
,
valueType
:
"select"
,
request
:
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-auth/sysStorePosition/queryByStoreId/selection"
,
params
:
{
storeId
:
record
.
storeId
}
});
let
res
=
await
doFetch
({
url
:
"/ngic-auth/sysStorePosition/queryByStoreId/selection"
,
params
:
{
storeId
:
storeId
}
});
return
res
?.
data
?.
dataList
},
editable
:
(
text
,
record
,
index
)
=>
{
...
...
@@ -86,7 +91,10 @@ const EditUpload = ({ record, fid }) => {
dataIndex
:
"supplierNo"
,
key
:
"supplierNo"
,
search
:
false
,
"readonly"
:
true
,
readonly
:
true
,
render
:
(
dom
,
row
)
=>
{
return
(
row
?.
supplierNo
??
''
)
+
" - "
+
(
row
?.
supplierName
??
''
)
}
},
{
title
:
"库存数量"
,
...
...
@@ -115,7 +123,7 @@ const EditUpload = ({ record, fid }) => {
],
}
]}
value
=
{
[...(
record
.
downloadList
??
[]),
...(
value
[
record
.
id
]
??
[])
]}
value
=
{
value
[
record
.
id
]}
onChange
=
{(
vals
)
=>
{
setvalue
(
s
=>
({
...
s
,
...
...
@@ -682,8 +690,8 @@ const one = {
columns
=
{[
{
title
:
"库位名称"
,
dataIndex
:
"storeName"
,
key
:
"storeName"
,
dataIndex
:
"store
Position
Name"
,
key
:
"store
Position
Name"
,
search
:
false
,
},
{
...
...
@@ -716,9 +724,115 @@ const one = {
},
],
},
{
cardTitle
:
"强制关闭信息"
,
itemData
:
[
{
title
:
"操作人"
,
key
:
"closeUserName"
,
},
{
title
:
"操作时间"
,
key
:
"closeTime"
,
}
],
},
{
cardTitle
:
"下架明细"
,
noPrint
:
true
,
itemData
:
[
{
key
:
"materialDownloadList"
,
type
:
"table"
,
col
:
{
span
:
24
},
columns
:
[
{
title
:
"物料编码 - 名称"
,
dataIndex
:
"materieName"
,
key
:
"materieName"
,
search
:
false
,
render
:
(
dom
,
row
)
=>
{
return
(
row
.
materieCode
??
''
)
+
" - "
+
(
row
.
materieName
??
''
)
}
},
{
title
:
"出库数量"
,
dataIndex
:
"outstroeNum"
,
key
:
"outstroeNum"
,
search
:
false
,
},
{
title
:
"单位"
,
dataIndex
:
"productionUnitName"
,
key
:
"productionUnitName"
,
search
:
false
,
},
],
expandable
:
{
defaultExpandAllRows
:
true
,
expandedRowRender
:
record
=>
<
Table
style
=
{{
marginLeft
:
48
}}
columns
=
{[
{
title
:
"库位名称"
,
dataIndex
:
"storePositionName"
,
key
:
"storePositionName"
,
search
:
false
,
},
{
title
:
"批次号/SN号"
,
dataIndex
:
"materieControlNo"
,
key
:
"materieControlNo"
,
search
:
false
,
},
{
title
:
"供应商编号 - 名称"
,
dataIndex
:
"supplierNo"
,
key
:
"supplierNo"
,
search
:
false
,
render
:
(
dom
,
row
)
=>
{
return
(
row
.
supplierNo
??
''
)
+
" - "
+
(
row
.
supplierName
??
''
)
}
},
{
title
:
"下架数量"
,
dataIndex
:
"outstroeNum"
,
key
:
"outstroeNum"
,
search
:
false
,
}
,
{
title
:
"备注"
,
dataIndex
:
"remark"
,
key
:
"remark"
,
search
:
false
,
}
,
{
title
:
"操作人"
,
dataIndex
:
"uploadUserName"
,
key
:
"uploadUserName"
,
search
:
false
,
}
,
{
title
:
"操作时间"
,
dataIndex
:
"uploadTime"
,
key
:
"uploadTime"
,
search
:
false
,
}
]}
dataSource
=
{
record
.
downloadList
}
pagination
=
{
false
}
/>
,
},
pagination
:
"false"
},
],
},
]
},
dooutside
=
(
fid
)
=>
({
dooutside
=
(
fid
,
storeId
)
=>
({
totalCard
:
[
//物料详情
{
...
...
@@ -788,7 +902,7 @@ const one = {
},
],
expandable
:
{
expandedRowRender
:
record
=>
<
EditUpload
record
=
{
record
}
fid
=
{
fid
}
/>
,
expandedRowRender
:
record
=>
<
EditUpload
record
=
{
record
}
fid
=
{
fid
}
storeId
=
{
storeId
}
/>
,
}
},
],
...
...
src/pages/outsetstore/Outstore/index.jsx
View file @
8fed24cd
...
...
@@ -10,6 +10,7 @@ import defaultFields from "./fields";
import
{
doFetch
}
from
"@/utils/doFetch"
;
import
DrawInitForm
from
"@/components/DrawInitForm"
;
import
getPrem
from
'@/utils/getPrem'
;
//权限判断fn
import
{
useReactToPrint
}
from
'react-to-print'
;
const
keytoval
=
{
...
...
@@ -67,7 +68,8 @@ function Instore(props) {
width
:
1200
}),
actionRef
=
useRef
(),
ChildRef
=
null
;
ChildRef
=
null
,
printRef
=
useRef
();
//操作完成后刷新
function
reload
()
{
...
...
@@ -80,6 +82,11 @@ function Instore(props) {
}))
}
const
handlePrint
=
useReactToPrint
({
content
:
()
=>
printRef
.
current
,
});
const
columns
=
useMemo
(()
=>
{
if
(
activeTabKey
==
"1"
)
{
return
[
...
...
@@ -98,7 +105,15 @@ function Instore(props) {
title
:
`查看详情`
,
...
defaultFields
?.
detail
,
totalPath
:
"/ngic-workmanship/wmsMaterieOutstore/getOutStoreInfoById"
,
totalParams
:
{
id
:
record
.
id
}
totalParams
:
{
id
:
record
.
id
},
printRef
:
printRef
,
extra
:
(<
Button
onClick=
{
async
()
=>
{
handlePrint
()
}
}
>
打印
</
Button
>)
}))
}
}
>
{
dom
}
</
a
>
...
...
@@ -198,7 +213,7 @@ function Instore(props) {
return
[
getPrem
(
"equipmentCustomer_save"
,
action
,
'下架采集'
,
async
()
=>
{
let
extra
=
defaultFields
.
dooutside
(
record
.
id
);
let
extra
=
defaultFields
.
dooutside
(
record
.
id
,
record
.
storeId
);
setdrawprops
(
s
=>
({
...
s
,
visible
:
true
,
...
...
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