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
db72058c
Commit
db72058c
authored
Jul 22, 2022
by
左玲玲
😬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
入库
parent
4bb54179
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
146 additions
and
111 deletions
+146
-111
proxy.js
config/proxy.js
+1
-1
fields.js
src/pages/insertstore/Instore/fields.js
+35
-28
index.jsx
src/pages/insertstore/Instore/index.jsx
+8
-0
fields.js
src/pages/outsetstore/Outstore/fields.js
+59
-30
index.jsx
src/pages/outsetstore/Outstore/index.jsx
+23
-16
index.jsx
src/pages/platform/Provide/index.jsx
+4
-4
Formpage.jsx
src/pages/platform/Sendset/Formpage.jsx
+11
-19
fields.js
src/pages/platform/Sendset/fields.js
+5
-13
No files found.
config/proxy.js
View file @
db72058c
...
...
@@ -11,7 +11,7 @@ export default {
// localhost:8000/api/** -> https://preview.pro.ant.design/api/**
"/wms/"
:
{
// 要代理的地址
target
:
"http://192.168.40.18
:18040/"
,
//39:18040 23/wms/ //60 翔 //18
target
:
"http://192.168.40.18
/wms/"
,
//39:28040 18/wms/
changeOrigin
:
true
,
pathRewrite
:
{
"^/wms"
:
""
,
...
...
src/pages/insertstore/Instore/fields.js
View file @
db72058c
...
...
@@ -14,26 +14,29 @@ const EditUpload = ({ record, fid, storeId }) => {
if
(
!
value
)
{
return
}
setInitialState
(
s
=>
({
...
s
,
submit
:
{
id
:
fid
,
materialList
:
Object
.
keys
(
value
)?.
map
?.(
it
=>
{
let
id
=
it
;
let
newArr
=
value
[
id
]?.
filter
(
it
=>
it
.
id
)
??
[];
let
newlist
=
Object
.
keys
(
value
)?.
map
?.(
it
=>
{
let
id
=
it
;
let
newArr
=
value
[
id
]?.
filter
(
it
=>
typeof
(
it
.
id
)
==
"number"
)
??
[];
return
{
id
,
uploadList
:
newArr
.
map
(
its
=>
{
return
{
id
,
uploadList
:
newArr
.
map
(
its
=>
{
return
{
storePositionId
:
its
?.
storePositionId
,
instroeNum
:
its
?.
instroeNum
,
remark
:
its
?.
remark
}
})
storePositionId
:
its
?.
storePositionId
,
instroeNum
:
its
?.
instroeNum
,
remark
:
its
?.
remark
}
})
}
}))
})
??
[];
setInitialState
(
s
=>
{
return
({
...
s
,
submit
:
{
id
:
fid
,
materialList
:
(
s
.
submit
&&
s
?.
submit
?.
materialList
)
?
s
?.
submit
?.
materialList
?.
filter
(
it
=>
newlist
.
map
(
item
=>
item
.
id
).
indexOf
(
it
.
id
)
==-
1
)?.
concat
(
newlist
)?.
filter
(
it
=>
it
.
uploadList
?.
length
>
0
)
:
[]
}
})
})
},
[
value
])
return
<
EditableProTable
...
...
@@ -63,7 +66,7 @@ const EditUpload = ({ record, fid, storeId }) => {
editable
:
(
text
,
record
,
index
)
=>
{
return
!
record
.
materieOutstoreDetailId
},
valueType
:
"digit"
valueType
:
"digit"
},
{
title
:
"备注"
,
...
...
@@ -79,7 +82,7 @@ const EditUpload = ({ record, fid, storeId }) => {
valueType
:
"option"
,
width
:
70
,
render
:
(
text
,
record
,
_
,
action
)
=>
[
<
a
key
=
"delete"
onClick
=
{()
=>
{
}}
>
typeof
(
record
.
id
)
==
"number"
&&
<
a
key
=
"delete"
onClick
=
{()
=>
{
}}
>
删除
<
/a>
,
],
...
...
@@ -98,10 +101,12 @@ const EditUpload = ({ record, fid, storeId }) => {
return
[
defaultDoms
.
delete
];
},
onValuesChange
:
async
(
records
,
recordList
)
=>
{
setvalue
(
s
=>
({
...
s
,
[
record
.
id
]:
recordList
}));
setvalue
(
s
=>
{
return
({
...
s
,
[
record
.
id
]:
recordList
})
});
},
}}
pagination
=
{
false
}
...
...
@@ -215,7 +220,7 @@ const one = {
"title"
:
<
span
>
入库数量
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"instroeNum"
,
"key"
:
"instroeNum"
,
valueType
:
"digit"
,
valueType
:
"digit"
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
...
...
@@ -358,7 +363,7 @@ const one = {
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
valueType
:
"digit"
valueType
:
"digit"
},
{
"title"
:
"单位"
,
...
...
@@ -501,7 +506,7 @@ const one = {
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
valueType
:
"digit"
valueType
:
"digit"
},
{
"title"
:
"单位"
,
...
...
@@ -644,7 +649,7 @@ const one = {
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
valueType
:
"digit"
valueType
:
"digit"
},
{
"title"
:
"单位"
,
...
...
@@ -700,14 +705,16 @@ const one = {
{
title
:
"创建时间"
,
key
:
"createTime"
,
},{
},
{
title
:
"状态"
,
key
:
"statusName"
,
},
{
title
:
"工单二维码"
,
key
:
"qrCodeUrl"
,
type
:
"img"
type
:
"img"
,
width
:
100
,
height
:
100
},
],
},
...
...
src/pages/insertstore/Instore/index.jsx
View file @
db72058c
...
...
@@ -12,6 +12,7 @@ import DrawInitForm from "@/components/DrawInitForm";
import
getPrem
from
'@/utils/getPrem'
;
//权限判断fn
import
{
useReactToPrint
}
from
'react-to-print'
;
import
{
useCallback
}
from
"react"
;
import
{
useModel
}
from
'umi'
;
const
keytoval
=
{
"one"
:
1
,
"two"
:
2
,
...
...
@@ -53,6 +54,7 @@ const keytoval = {
]
function
Instore
(
props
)
{
const
{
initialState
,
setInitialState
}
=
useModel
(
"@@initialState"
);
const
[
activeTabKey
,
onTabChange
]
=
useState
(
"1"
);
let
[
drawprops
,
setdrawprops
]
=
useState
({
title
:
""
,
...
...
@@ -212,6 +214,12 @@ function Instore(props) {
totalParams
:
{
id
:
record
.
id
},
extra
:
null
}))
setInitialState
(
s
=>
{
return
({
...
s
,
submit
:
{}
})
})
}),
getPrem
(
"equipmentCustomer_deleteById"
,
action
,
'关单'
,
null
,
{
title
:
"确认关单?"
,
...
...
src/pages/outsetstore/Outstore/fields.js
View file @
db72058c
...
...
@@ -10,41 +10,47 @@ const EditUpload = ({ record, fid, storeId }) => {
[
record
.
id
]:
record
.
downloadList
});
const
{
initialState
,
setInitialState
}
=
useModel
(
"@@initialState"
);
console
.
log
(
'===================================='
);
console
.
log
(
storeId
);
console
.
log
(
'===================================='
);
useEffect
(()
=>
{
if
(
!
value
)
{
return
}
setInitialState
(
s
=>
({
...
s
,
submits
:
{
id
:
fid
,
materialList
:
Object
.
keys
(
value
)?.
map
?.(
it
=>
{
let
id
=
it
;
console
.
log
(
value
);
let
newlist
=
Object
.
keys
(
value
)?.
map
?.(
it
=>
{
let
id
=
it
;
let
newArr
=
value
[
id
]?.
filter
(
it
=>
typeof
(
it
.
id
)
==
"number"
)
??
[];
return
{
id
,
downloadList
:
newArr
.
map
(
its
=>
{
return
{
id
,
downloadList
:
value
[
id
]?.
map
(
its
=>
{
return
{
storePositionId
:
its
?.
storePositionId
,
outstroeNum
:
its
?.
outstroeNum
,
remark
:
its
?.
remark
,
materieControlNo
:
its
?.
materieControlNo
}
})
storeId
:
its
?.
storeId
,
outstroeNum
:
its
?.
outstroeNum
,
remark
:
its
?.
remark
,
materieControlNo
:
its
?.
materieControlNo
}
})
}
}))
})
??
[];
setInitialState
(
s
=>
{
console
.
log
(
newlist
);
return
({
...
s
,
submits
:
{
id
:
fid
,
materialList
:
(
s
.
submits
&&
s
?.
submits
?.
materialList
)
?
s
?.
submits
?.
materialList
?.
filter
(
it
=>
newlist
.
map
(
item
=>
item
.
id
).
indexOf
(
it
.
id
)
==
-
1
)?.
concat
(
newlist
)?.
filter
(
it
=>
it
.
downloadList
?.
length
>
0
)
:
[]
}
})
})
},
[
value
])
return
<
EditTable
rowKey
=
"id"
maxLength
=
{
1000
}
linkconfig
=
{{
urlchangeval
:
{
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieSto
re/queryStoreOne
"
,
params
}),
params
:
{
"store
PositionId"
:
"linked"
,
"materieControlNo"
:
"linked"
},
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieSto
ckStore/queryByMaterieAndStoreId
"
,
params
}),
params
:
{
"store
Id"
:
"linked"
,
materieId
:
record
.
materieId
},
effectresult
:
{
"supplierNo"
:
"supplierNo"
,
"supplierName"
:
"supplierName"
,
...
...
@@ -57,7 +63,7 @@ const EditUpload = ({ record, fid, storeId }) => {
{
title
:
"库位名称"
,
dataIndex
:
"storePositionName"
,
key
:
"store
Position
Id"
,
key
:
"storeId"
,
search
:
false
,
valueType
:
"select"
,
request
:
async
()
=>
{
...
...
@@ -142,7 +148,8 @@ const one = {
"name"
:
[
"materieOutstoreNo"
],
"required"
:
false
"required"
:
false
,
placeholder
:
"不填写系统自动生成"
},
"storeId"
:
{
"value"
:
null
,
...
...
@@ -192,7 +199,8 @@ const one = {
effectresult
:
{
"productionUnit"
:
"productionUnit"
,
//key 为列表更新值 value为response 返回值
"productionUnitName"
:
"productionUnitName"
,
"usableNum"
:
"usableNum"
"usableNum"
:
"usableNum"
,
"outstroeNum"
:
"outstroeNum"
}
}
},
...
...
@@ -263,7 +271,8 @@ const one = {
"name"
:
[
"materieOutstoreNo"
],
"required"
:
false
"required"
:
false
,
placeholder
:
"不填写系统自动生成"
},
"storeId"
:
{
"value"
:
null
,
...
...
@@ -313,7 +322,8 @@ const one = {
effectresult
:
{
"productionUnit"
:
"productionUnit"
,
//key 为列表更新值 value为response 返回值
"productionUnitName"
:
"productionUnitName"
,
"usableNum"
:
"usableNum"
"usableNum"
:
"usableNum"
,
"outstroeNum"
:
"outstroeNum"
}
}
},
...
...
@@ -384,7 +394,8 @@ const one = {
"name"
:
[
"materieOutstoreNo"
],
"required"
:
false
"required"
:
false
,
placeholder
:
"不填写系统自动生成"
},
"storeId"
:
{
"value"
:
null
,
...
...
@@ -434,7 +445,8 @@ const one = {
effectresult
:
{
"productionUnit"
:
"productionUnit"
,
//key 为列表更新值 value为response 返回值
"productionUnitName"
:
"productionUnitName"
,
"usableNum"
:
"usableNum"
"usableNum"
:
"usableNum"
,
"outstroeNum"
:
"outstroeNum"
}
}
},
...
...
@@ -505,7 +517,8 @@ const one = {
"name"
:
[
"materieOutstoreNo"
],
"required"
:
false
"required"
:
false
,
placeholder
:
"不填写系统自动生成"
},
"storeId"
:
{
"value"
:
null
,
...
...
@@ -555,7 +568,8 @@ const one = {
effectresult
:
{
"productionUnit"
:
"productionUnit"
,
//key 为列表更新值 value为response 返回值
"productionUnitName"
:
"productionUnitName"
,
"usableNum"
:
"usableNum"
"usableNum"
:
"usableNum"
,
"outstroeNum"
:
"outstroeNum"
}
}
},
...
...
@@ -652,6 +666,17 @@ const one = {
title
:
"创建时间"
,
key
:
"createTime"
,
},
{
title
:
"状态"
,
key
:
"statusName"
,
},
{
title
:
"工单二维码"
,
key
:
"qrCodeUrl"
,
type
:
"img"
,
width
:
100
,
height
:
100
},
],
},
{
...
...
@@ -866,6 +891,10 @@ const one = {
title
:
"创建时间"
,
key
:
"createTime"
,
},
{
title
:
"状态"
,
key
:
"statusName"
}
],
},
{
...
...
src/pages/outsetstore/Outstore/index.jsx
View file @
db72058c
...
...
@@ -11,7 +11,7 @@ import { doFetch } from "@/utils/doFetch";
import
DrawInitForm
from
"@/components/DrawInitForm"
;
import
getPrem
from
'@/utils/getPrem'
;
//权限判断fn
import
{
useReactToPrint
}
from
'react-to-print'
;
import
{
useModel
}
from
'umi'
;
const
keytoval
=
{
"one"
:
1
,
...
...
@@ -20,7 +20,7 @@ const keytoval = {
"four"
:
4
},
items
=
[
{
key
:
'one'
,
key
:
'one'
,
label
:
(
<
a
>
生产领料出库
...
...
@@ -53,7 +53,8 @@ const keytoval = {
},
]
function
Instore
(
props
)
{
function
Outstore
(
props
)
{
const
{
initialState
,
setInitialState
}
=
useModel
(
"@@initialState"
);
const
[
activeTabKey
,
onTabChange
]
=
useState
(
"1"
);
let
[
drawprops
,
setdrawprops
]
=
useState
({
title
:
""
,
...
...
@@ -65,7 +66,7 @@ function Instore(props) {
}))
},
fields
:
{},
width
:
1200
width
:
1200
}),
actionRef
=
useRef
(),
ChildRef
=
null
,
...
...
@@ -174,8 +175,8 @@ function Instore(props) {
"dataIndex"
:
"createTime"
,
"key"
:
"createTime"
,
"valueType"
:
"dateRange"
,
formItemProps
:{
name
:
"createTimeList"
formItemProps
:
{
name
:
"createTimeList"
}
},
{
...
...
@@ -201,7 +202,7 @@ function Instore(props) {
"render"
:
(
text
,
record
,
_
,
action
)
=>
{
return
[
getPrem
(
"equipmentCustomer_save"
,
action
,
'下架采集'
,
async
()
=>
{
let
extra
=
defaultFields
.
dooutside
(
record
.
id
,
record
.
storeId
);
let
extra
=
defaultFields
.
dooutside
(
record
.
id
,
record
.
storeId
);
setdrawprops
(
s
=>
({
...
s
,
visible
:
true
,
...
...
@@ -211,9 +212,14 @@ function Instore(props) {
...
extra
,
totalPath
:
"/ngic-workmanship/wmsMaterieOutstore/getOutStoreInfoById"
,
totalParams
:
{
id
:
record
.
id
},
extra
:
null
extra
:
null
}))
setInitialState
(
s
=>
{
return
({
...
s
,
submits
:
{}
})
})
}),
getPrem
(
"equipmentCustomer_deleteById"
,
action
,
'关单'
,
null
,
{
title
:
"确认关单?"
,
...
...
@@ -317,8 +323,8 @@ function Instore(props) {
"dataIndex"
:
"createTime"
,
"key"
:
"createTime"
,
"valueType"
:
"dateRange"
,
formItemProps
:{
name
:
"createTimeList"
formItemProps
:
{
name
:
"createTimeList"
}
},
{
...
...
@@ -326,8 +332,8 @@ function Instore(props) {
"dataIndex"
:
"closeTime"
,
"key"
:
"closeTime"
,
"valueType"
:
"dateRange"
,
formItemProps
:{
name
:
"closeTimeList"
formItemProps
:
{
name
:
"closeTimeList"
}
},
{
...
...
@@ -361,7 +367,7 @@ function Instore(props) {
fields
:
defaultFields
[
e
.
key
],
outstoreType
:
keytoval
[
e
.
key
],
val
:
"add"
,
//类型
extra
:
null
extra
:
null
}))
}
}
items=
{
items
}
...
...
@@ -397,8 +403,9 @@ function Instore(props) {
{
...
drawprops
}
submitData=
{
async
(
value
)
=>
{
if
(
drawprops
.
val
==
"add"
)
{
value
.
materialList
=
value
.
materialList
?.
map
(
it
=>
{
value
.
materialList
=
value
.
materialList
?.
map
(
it
=>
{
delete
it
.
usableNum
;
delete
it
.
id
;
return
it
})
//usableNum
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieOutstore/saveOutStore"
,
params
:
{
...
value
,
outstoreType
:
drawprops
.
outstoreType
}
})
...
...
@@ -412,4 +419,4 @@ function Instore(props) {
);
}
export
default
Instore
;
\ No newline at end of file
export
default
Outstore
;
\ No newline at end of file
src/pages/platform/Provide/index.jsx
View file @
db72058c
...
...
@@ -182,7 +182,7 @@ const Deviceprovide = (props) => {
}
}
okText=
"确定"
cancelText=
"取消"
disabled=
{
!
getPrem
(
"equipmentSupplier_updatestatus"
,
"ifs"
)
||
row
.
sourceType
==
1
}
disabled=
{
!
getPrem
(
"equipmentSupplier_updatestatus"
,
"ifs"
)
||
row
.
sourceType
==
1
}
>
<
Switch
checked=
{
row
.
status
==
1
?
true
:
false
}
checkedChildren=
"开启"
unCheckedChildren=
"关闭"
defaultChecked=
{
false
}
/>
</
Popconfirm
>
...
...
@@ -217,7 +217,7 @@ const Deviceprovide = (props) => {
key
:
"edit"
});
}),
getPrem
(
"equipmentSupplier_deleteById"
,
action
,
'删除'
,
null
,
{
record
.
sourceType
!=
1
&&
getPrem
(
"equipmentSupplier_deleteById"
,
action
,
'删除'
,
null
,
{
title
:
"确认删除该供应商?"
,
onConfirm
:
()
=>
{
run
({
url
:
"/ngic-auth/sysSupplier/deleteById"
,
params
:
{
id
:
record
.
id
}
})
...
...
@@ -277,9 +277,9 @@ const Deviceprovide = (props) => {
let
data
=
res
?.
data
?.
data
||
{};
for
(
let
i
in
defaultFields
)
{
defaultFields
[
i
].
value
=
data
[
i
];
if
(
i
==
"status"
&&
curitem
.
sourceType
==
1
)
{
if
(
i
==
"status"
&&
curitem
.
sourceType
==
1
)
{
defaultFields
[
i
].
disabled
=
true
;
}
else
{
}
else
{
defaultFields
[
i
].
disabled
=
false
;
}
}
...
...
src/pages/platform/Sendset/Formpage.jsx
View file @
db72058c
...
...
@@ -25,32 +25,24 @@ const initState = {
},
sendToArr
=
[
{
"label"
:
"
指定
人员"
,
"label"
:
"
可操作
人员"
,
"value"
:
1
},
{
"label"
:
"可指定人员"
,
"value"
:
2
},
{
"label"
:
"创建人"
,
"value"
:
3
},
{
"label"
:
"(指定人员)上级领导"
,
"value"
:
4
"value"
:
2
},
{
"label"
:
"(上个通知人员)上级领导"
,
"value"
:
5
"value"
:
3
},
{
"label"
:
"选择角色"
,
"value"
:
6
"value"
:
4
},
{
"label"
:
"选择人员"
,
"value"
:
7
"value"
:
5
}
],
unitArr
=
[
...
...
@@ -359,7 +351,7 @@ const Formpage = (props) => {
for
(
let
j
in
tableField
)
{
tableField
[
j
].
value
=
record
[
j
];
if
(
j
==
"targetIdList"
)
{
if
(
record
.
sendTo
!=
6
&&
record
.
sendTo
!=
7
)
{
if
(
record
.
sendTo
!=
4
&&
record
.
sendTo
!=
5
)
{
tableField
[
j
].
hides
=
true
}
else
{
let
database
=
getformdatabase
(
record
.
sendTo
)
...
...
@@ -392,12 +384,12 @@ const Formpage = (props) => {
const
{
sendTo
,
targetIdList
,
sendProcess
,
initialUnit
,
initialTime
,
intervalTime
,
intervalUnit
,
sendNum
}
=
values
;
let
targetNames
=
[];
let
all
=
async
()
=>
{
if
(
sendTo
==
6
)
{
if
(
sendTo
==
4
)
{
let
data
=
await
roleList
({});
return
{
newArr
:
data
?.
data
?.
dataList
||
[]
}
}
else
if
(
sendTo
==
7
)
{
}
else
if
(
sendTo
==
5
)
{
let
data
=
await
currentUserList
({});
return
{
newArr
:
data
?.
data
?.
dataList
||
[]
...
...
@@ -528,10 +520,10 @@ const Formpage = (props) => {
function
getformdatabase
(
val
)
{
let
database
;
switch
(
val
)
{
case
6
:
case
4
:
database
=
roleList
break
;
case
7
:
case
5
:
database
=
currentUserList
break
;
...
...
@@ -649,7 +641,7 @@ const Formpage = (props) => {
if
(
j
==
"targetIdList"
)
{
tableFormRef
.
setFieldsValue
({
"targetIdList"
:
[]
});
tableField
[
j
].
value
=
[];
if
(
changedValues
[
i
]
!=
6
&&
changedValues
[
i
]
!=
7
)
{
if
(
changedValues
[
i
]
!=
4
&&
changedValues
[
i
]
!=
5
)
{
tableField
[
j
].
hides
=
true
}
else
{
let
database
=
getformdatabase
(
changedValues
[
i
]);
...
...
src/pages/platform/Sendset/fields.js
View file @
db72058c
...
...
@@ -127,32 +127,24 @@ tableField={
"required"
:
true
,
"options"
:
[
{
"label"
:
"
指定
人员"
,
"label"
:
"
可操作
人员"
,
"value"
:
1
},
{
"label"
:
"可指定人员"
,
"value"
:
2
},
{
"label"
:
"创建人"
,
"value"
:
3
},
{
"label"
:
"(指定人员)上级领导"
,
"value"
:
4
"value"
:
2
},
{
"label"
:
"(上个通知人员)上级领导"
,
"value"
:
5
"value"
:
3
},
{
"label"
:
"选择角色"
,
"value"
:
6
"value"
:
4
},
{
"label"
:
"选择人员"
,
"value"
:
7
"value"
:
5
}
]
},
...
...
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