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
a5f936be
Commit
a5f936be
authored
Jul 11, 2022
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asder
parent
5722a4a5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1359 additions
and
18 deletions
+1359
-18
routes.js
config/routes.js
+15
-0
fields.js
src/pages/insertstore/Instore/fields.js
+319
-16
index.jsx
src/pages/insertstore/Instore/index.jsx
+2
-2
fields.js
src/pages/outsetstore/Outstore/fields.js
+595
-0
index.jsx
src/pages/outsetstore/Outstore/index.jsx
+418
-0
index.less
src/pages/outsetstore/Outstore/index.less
+10
-0
No files found.
config/routes.js
View file @
a5f936be
...
@@ -63,6 +63,21 @@ export default [
...
@@ -63,6 +63,21 @@ export default [
},
},
],
],
},
},
{
path
:
"/outsetstore"
,
name
:
"出库管理"
,
icon
:
"search"
,
routes
:
[
{
path
:
"/outsetstore/outstore"
,
name
:
"出库管理"
,
component
:
"./outsetstore/Outstore"
,
},
{
component
:
"./404"
,
},
],
},
{
{
path
:
"/system"
,
path
:
"/system"
,
name
:
"系统基础管理"
,
name
:
"系统基础管理"
,
...
...
src/pages/insertstore/Instore/fields.js
View file @
a5f936be
...
@@ -75,7 +75,6 @@ const one = {
...
@@ -75,7 +75,6 @@ const one = {
"productionUnit"
:
"productionUnit"
,
//key 为列表更新值 value为response 返回值
"productionUnit"
:
"productionUnit"
,
//key 为列表更新值 value为response 返回值
"productionUnitName"
:
"productionUnitName"
"productionUnitName"
:
"productionUnitName"
}
}
}
}
},
},
columns
:
[
columns
:
[
...
@@ -159,15 +158,274 @@ const one = {
...
@@ -159,15 +158,274 @@ const one = {
},
},
},
},
"supplierId"
:
{
"supplierId"
:
{
"value"
:
null
,
"value"
:
"2022070124566476657"
,
"type"
:
"select"
,
"type"
:
"select"
,
"title"
:
"供应商"
,
"title"
:
"供应商"
,
"name"
:
[
"name"
:
[
"supplierId"
"supplierId"
],
],
"required"
:
true
,
"required"
:
true
,
"disabled"
:
true
,
"options"
:
[
{
value
:
"2022070124566476657"
,
label
:
"南高(默认)"
}
],
},
"businessNo"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"相关单号"
,
"name"
:
[
"businessNo"
],
"required"
:
false
},
"remark"
:
{
"value"
:
null
,
"type"
:
"textarea"
,
"title"
:
"备注"
,
"name"
:
[
"remark"
],
"required"
:
false
,
"col"
:
{
"span"
:
24
}
},
"materialList"
:
{
value
:
[],
title
:
"物料信息"
,
type
:
"table"
,
col
:
{
span
:
24
},
name
:
[
"materialList"
],
required
:
true
,
linkconfig
:
{
urlchangeval
:
{
//根据url接口 改变某个value
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/pmMaterie/queryUnitByMaterieId"
,
params
}),
params
:
{
"materieId"
:
"linked"
},
effectresult
:
{
"productionUnit"
:
"productionUnit"
,
//key 为列表更新值 value为response 返回值
"productionUnitName"
:
"productionUnitName"
}
}
},
columns
:
[
{
"title"
:
<
span
>
物料编码
-
名称
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"materieId"
,
"key"
:
"materieId"
,
"valueType"
:
"select"
,
"width"
:
300
,
"request"
:
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/pmMaterie/query/selectbox"
,
params
:
{}
})
return
res
?.
data
?.
dataList
},
"fieldProps"
:
{
allowClear
:
false
,
showSearch
:
true
},
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
},
{
"title"
:
"批次号/SN号"
,
"dataIndex"
:
"materieControlNo"
,
"key"
:
"materieControlNo"
},
{
"title"
:
<
span
>
入库数量
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"instroeNum"
,
"key"
:
"instroeNum"
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
},
{
"title"
:
"单位"
,
"dataIndex"
:
"productionUnitName"
,
"key"
:
"productionUnitName"
,
"readonly"
:
'productionUnitName'
,
"width"
:
60
},
{
title
:
"操作"
,
valueType
:
"option"
,
width
:
70
,
render
:
(
text
,
record
,
_
,
action
)
=>
[
<
a
key
=
"delete"
onClick
=
{()
=>
{
}}
>
删除
<
/a>
,
],
},
],
rowKey
:
"id"
,
}
},
three
=
{
"materieInstoreNo"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"入库单号"
,
"name"
:
[
"materieInstoreNo"
],
"required"
:
false
},
"storeId"
:
{
"value"
:
null
,
"type"
:
"select"
,
"title"
:
"仓库"
,
"name"
:
[
"storeId"
],
"required"
:
true
,
"options"
:
{
database
:
()
=>
doFetch
({
url
:
"/ngic-auth/sysStore/selectionBox"
,
params
:
{
factoryIdList
:
[]
}
}),
params
:
{}
},
},
"businessNo"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"相关单号"
,
"name"
:
[
"businessNo"
],
"required"
:
false
},
"remark"
:
{
"value"
:
null
,
"type"
:
"textarea"
,
"title"
:
"备注"
,
"name"
:
[
"remark"
],
"required"
:
false
,
"col"
:
{
"span"
:
24
}
},
"materialList"
:
{
value
:
[],
title
:
"物料信息"
,
type
:
"table"
,
col
:
{
span
:
24
},
name
:
[
"materialList"
],
required
:
true
,
linkconfig
:
{
urlchangeval
:
{
//根据url接口 改变某个value
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/pmMaterie/queryUnitByMaterieId"
,
params
}),
params
:
{
"materieId"
:
"linked"
},
effectresult
:
{
"productionUnit"
:
"productionUnit"
,
//key 为列表更新值 value为response 返回值
"productionUnitName"
:
"productionUnitName"
}
}
},
columns
:
[
{
"title"
:
<
span
>
物料编码
-
名称
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"materieId"
,
"key"
:
"materieId"
,
"valueType"
:
"select"
,
"width"
:
300
,
"request"
:
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/pmMaterie/query/selectbox"
,
params
:
{}
})
return
res
?.
data
?.
dataList
},
"fieldProps"
:
{
allowClear
:
false
,
showSearch
:
true
},
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
},
{
"title"
:
<
span
>
供应商编号
-
名称
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"supplierId"
,
"key"
:
"supplierId"
,
"valueType"
:
"select"
,
"width"
:
300
,
"request"
:
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-auth/sysSupplier/query/selection/withNo"
,
params
:
{}
})
return
res
?.
data
?.
dataList
},
"fieldProps"
:
{
allowClear
:
false
,
showSearch
:
true
},
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
},
{
"title"
:
"批次号/SN号"
,
"dataIndex"
:
"materieControlNo"
,
"key"
:
"materieControlNo"
},
{
"title"
:
<
span
>
入库数量
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"instroeNum"
,
"key"
:
"instroeNum"
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
},
{
"title"
:
"单位"
,
"dataIndex"
:
"productionUnitName"
,
"key"
:
"productionUnitName"
,
"readonly"
:
'productionUnitName'
,
"width"
:
60
},
{
title
:
"操作"
,
valueType
:
"option"
,
width
:
70
,
render
:
(
text
,
record
,
_
,
action
)
=>
[
<
a
key
=
"delete"
onClick
=
{()
=>
{
}}
>
删除
<
/a>
,
],
},
],
rowKey
:
"id"
,
}
},
four
=
{
"materieInstoreNo"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"入库单号"
,
"name"
:
[
"materieInstoreNo"
],
"required"
:
false
},
"storeId"
:
{
"value"
:
null
,
"type"
:
"select"
,
"title"
:
"仓库"
,
"name"
:
[
"storeId"
],
"required"
:
true
,
"options"
:
{
"options"
:
{
database
:
()
=>
doFetch
({
url
:
"/ngic-auth/sysS
upplier/query/selection
"
,
params
:
{
factoryIdList
:
[]
}
}),
database
:
()
=>
doFetch
({
url
:
"/ngic-auth/sysS
tore/selectionBox
"
,
params
:
{
factoryIdList
:
[]
}
}),
params
:
{}
params
:
{}
},
},
},
},
...
@@ -199,16 +457,56 @@ const one = {
...
@@ -199,16 +457,56 @@ const one = {
col
:
{
span
:
24
},
col
:
{
span
:
24
},
name
:
[
"materialList"
],
name
:
[
"materialList"
],
required
:
true
,
required
:
true
,
linkconfig
:
{
urlchangeval
:
{
//根据url接口 改变某个value
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/pmMaterie/queryUnitByMaterieId"
,
params
}),
params
:
{
"materieId"
:
"linked"
},
effectresult
:
{
"productionUnit"
:
"productionUnit"
,
//key 为列表更新值 value为response 返回值
"productionUnitName"
:
"productionUnitName"
}
}
},
columns
:
[
columns
:
[
{
{
"title"
:
"物料名称"
,
"title"
:
<
span
>
物料编码
-
名称
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"materieName"
,
"dataIndex"
:
"materieId"
,
"key"
:
"materieName"
"key"
:
"materieId"
,
"valueType"
:
"select"
,
"width"
:
300
,
"request"
:
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/pmMaterie/query/selectbox"
,
params
:
{}
})
return
res
?.
data
?.
dataList
},
"fieldProps"
:
{
allowClear
:
false
,
showSearch
:
true
},
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
},
},
{
{
"title"
:
"物料编码"
,
"title"
:
<
span
>
供应商编号
-
名称
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"materieCode"
,
"dataIndex"
:
"supplierId"
,
"key"
:
"materieCode"
"key"
:
"supplierId"
,
"valueType"
:
"select"
,
"width"
:
300
,
"request"
:
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-auth/sysSupplier/query/selection/withNo"
,
params
:
{}
})
return
res
?.
data
?.
dataList
},
"fieldProps"
:
{
allowClear
:
false
,
showSearch
:
true
},
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
},
},
{
{
"title"
:
"批次号/SN号"
,
"title"
:
"批次号/SN号"
,
...
@@ -216,14 +514,21 @@ const one = {
...
@@ -216,14 +514,21 @@ const one = {
"key"
:
"materieControlNo"
"key"
:
"materieControlNo"
},
},
{
{
"title"
:
"入库数量"
,
"title"
:
<
span
>
入库数量
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"instroeNum"
,
"dataIndex"
:
"instroeNum"
,
"key"
:
"instroeNum"
"key"
:
"instroeNum"
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
},
},
{
{
"title"
:
"单位"
,
"title"
:
"单位"
,
"dataIndex"
:
"productionUnit"
,
"dataIndex"
:
"productionUnitName"
,
"key"
:
"productionUnit"
"key"
:
"productionUnitName"
,
"readonly"
:
'productionUnitName'
,
"width"
:
60
},
},
{
{
title
:
"操作"
,
title
:
"操作"
,
...
@@ -239,8 +544,6 @@ const one = {
...
@@ -239,8 +544,6 @@ const one = {
rowKey
:
"id"
,
rowKey
:
"id"
,
}
}
},
},
three
=
{},
four
=
{},
detail
=
{
detail
=
{
totalCard
:
[
totalCard
:
[
//物料详情
//物料详情
...
@@ -312,7 +615,7 @@ const one = {
...
@@ -312,7 +615,7 @@ const one = {
],
],
expandable
:
{
expandable
:
{
expandedRowRender
:
record
=>
<
Table
expandedRowRender
:
record
=>
<
Table
style
=
{{
marginLeft
:
48
}}
style
=
{{
marginLeft
:
48
}}
columns
=
{[
columns
=
{[
{
{
title
:
"库位名称"
,
title
:
"库位名称"
,
...
...
src/pages/insertstore/Instore/index.jsx
View file @
a5f936be
...
@@ -63,7 +63,8 @@ function Instore(props) {
...
@@ -63,7 +63,8 @@ function Instore(props) {
visible
:
false
,
visible
:
false
,
}))
}))
},
},
fields
:
{}
fields
:
{},
width
:
1200
}),
}),
actionRef
=
useRef
(),
actionRef
=
useRef
(),
ChildRef
=
null
;
ChildRef
=
null
;
...
@@ -365,7 +366,6 @@ function Instore(props) {
...
@@ -365,7 +366,6 @@ function Instore(props) {
...
s
,
...
s
,
visible
:
true
,
visible
:
true
,
title
:
"新增"
,
title
:
"新增"
,
width
:
800
,
fields
:
defaultFields
[
e
.
key
],
fields
:
defaultFields
[
e
.
key
],
instoreType
:
keytoval
[
e
.
key
],
instoreType
:
keytoval
[
e
.
key
],
val
:
"add"
//类型
val
:
"add"
//类型
...
...
src/pages/outsetstore/Outstore/fields.js
0 → 100644
View file @
a5f936be
import
{
factorySelect
,
shopSelectByFactory
}
from
"@/services/system"
;
import
{
doFetch
}
from
"@/utils/doFetch"
;
import
{
Table
}
from
"antd"
;
const
one
=
{
"materieOutstoreNo"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"出库单号"
,
"name"
:
[
"materieOutstoreNo"
],
"required"
:
false
},
"storeId"
:
{
"value"
:
null
,
"type"
:
"select"
,
"title"
:
"仓库"
,
"name"
:
[
"storeId"
],
"required"
:
true
,
"options"
:
{
database
:
()
=>
doFetch
({
url
:
"/ngic-auth/sysStore/selectionBox"
,
params
:
{
factoryIdList
:
[]
}
}),
params
:
{}
},
},
"businessNo"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"相关单号"
,
"name"
:
[
"businessNo"
],
"required"
:
false
},
"remark"
:
{
"value"
:
null
,
"type"
:
"textarea"
,
"title"
:
"备注"
,
"name"
:
[
"remark"
],
"required"
:
false
,
"col"
:
{
"span"
:
24
}
},
"materialList"
:
{
value
:
[],
title
:
"物料信息"
,
type
:
"table"
,
col
:
{
span
:
24
},
name
:
[
"materialList"
],
required
:
true
,
linkconfig
:
{
urlchangeval
:
{
//根据url接口 改变某个value
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/pmMaterie/queryUnitByMaterieId"
,
params
}),
params
:
{
"materieId"
:
"linked"
},
effectresult
:
{
"productionUnit"
:
"productionUnit"
,
//key 为列表更新值 value为response 返回值
"productionUnitName"
:
"productionUnitName"
,
"usableNum"
:
"usableNum"
}
}
},
columns
:
[
{
"title"
:
<
span
>
物料编码
-
名称
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"materieId"
,
"key"
:
"materieId"
,
"valueType"
:
"select"
,
"width"
:
300
,
"request"
:
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/pmMaterie/query/selectbox"
,
params
:
{}
})
return
res
?.
data
?.
dataList
},
"fieldProps"
:
{
allowClear
:
false
,
showSearch
:
true
},
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
},
{
"title"
:
<
span
>
出库数量
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"outstroeNum"
,
"key"
:
"outstroeNum"
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
},
{
"title"
:
"可用库存"
,
"dataIndex"
:
"usableNum"
,
"key"
:
"usableNum"
,
"readonly"
:
'usableNum'
,
"width"
:
88
},
{
"title"
:
"单位"
,
"dataIndex"
:
"productionUnitName"
,
"key"
:
"productionUnitName"
,
"readonly"
:
'productionUnitName'
,
"width"
:
60
},
{
title
:
"操作"
,
valueType
:
"option"
,
width
:
70
,
render
:
(
text
,
record
,
_
,
action
)
=>
[
<
a
key
=
"delete"
onClick
=
{()
=>
{
}}
>
删除
<
/a>
,
],
},
],
rowKey
:
"id"
,
}
},
two
=
{
"materieOutstoreNo"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"出库单号"
,
"name"
:
[
"materieOutstoreNo"
],
"required"
:
false
},
"storeId"
:
{
"value"
:
null
,
"type"
:
"select"
,
"title"
:
"仓库"
,
"name"
:
[
"storeId"
],
"required"
:
true
,
"options"
:
{
database
:
()
=>
doFetch
({
url
:
"/ngic-auth/sysStore/selectionBox"
,
params
:
{
factoryIdList
:
[]
}
}),
params
:
{}
},
},
"businessNo"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"相关单号"
,
"name"
:
[
"businessNo"
],
"required"
:
false
},
"remark"
:
{
"value"
:
null
,
"type"
:
"textarea"
,
"title"
:
"备注"
,
"name"
:
[
"remark"
],
"required"
:
false
,
"col"
:
{
"span"
:
24
}
},
"materialList"
:
{
value
:
[],
title
:
"物料信息"
,
type
:
"table"
,
col
:
{
span
:
24
},
name
:
[
"materialList"
],
required
:
true
,
linkconfig
:
{
urlchangeval
:
{
//根据url接口 改变某个value
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/pmMaterie/queryUnitByMaterieId"
,
params
}),
params
:
{
"materieId"
:
"linked"
},
effectresult
:
{
"productionUnit"
:
"productionUnit"
,
//key 为列表更新值 value为response 返回值
"productionUnitName"
:
"productionUnitName"
,
"usableNum"
:
"usableNum"
}
}
},
columns
:
[
{
"title"
:
<
span
>
物料编码
-
名称
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"materieId"
,
"key"
:
"materieId"
,
"valueType"
:
"select"
,
"width"
:
300
,
"request"
:
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/pmMaterie/query/selectbox"
,
params
:
{}
})
return
res
?.
data
?.
dataList
},
"fieldProps"
:
{
allowClear
:
false
,
showSearch
:
true
},
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
},
{
"title"
:
<
span
>
出库数量
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"outstroeNum"
,
"key"
:
"outstroeNum"
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
},
{
"title"
:
"可用库存"
,
"dataIndex"
:
"usableNum"
,
"key"
:
"usableNum"
,
"readonly"
:
'usableNum'
,
"width"
:
88
},
{
"title"
:
"单位"
,
"dataIndex"
:
"productionUnitName"
,
"key"
:
"productionUnitName"
,
"readonly"
:
'productionUnitName'
,
"width"
:
60
},
{
title
:
"操作"
,
valueType
:
"option"
,
width
:
70
,
render
:
(
text
,
record
,
_
,
action
)
=>
[
<
a
key
=
"delete"
onClick
=
{()
=>
{
}}
>
删除
<
/a>
,
],
},
],
rowKey
:
"id"
,
}
},
three
=
{
"materieOutstoreNo"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"出库单号"
,
"name"
:
[
"materieOutstoreNo"
],
"required"
:
false
},
"storeId"
:
{
"value"
:
null
,
"type"
:
"select"
,
"title"
:
"仓库"
,
"name"
:
[
"storeId"
],
"required"
:
true
,
"options"
:
{
database
:
()
=>
doFetch
({
url
:
"/ngic-auth/sysStore/selectionBox"
,
params
:
{
factoryIdList
:
[]
}
}),
params
:
{}
},
},
"businessNo"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"相关单号"
,
"name"
:
[
"businessNo"
],
"required"
:
false
},
"remark"
:
{
"value"
:
null
,
"type"
:
"textarea"
,
"title"
:
"备注"
,
"name"
:
[
"remark"
],
"required"
:
false
,
"col"
:
{
"span"
:
24
}
},
"materialList"
:
{
value
:
[],
title
:
"物料信息"
,
type
:
"table"
,
col
:
{
span
:
24
},
name
:
[
"materialList"
],
required
:
true
,
linkconfig
:
{
urlchangeval
:
{
//根据url接口 改变某个value
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/pmMaterie/queryUnitByMaterieId"
,
params
}),
params
:
{
"materieId"
:
"linked"
},
effectresult
:
{
"productionUnit"
:
"productionUnit"
,
//key 为列表更新值 value为response 返回值
"productionUnitName"
:
"productionUnitName"
,
"usableNum"
:
"usableNum"
}
}
},
columns
:
[
{
"title"
:
<
span
>
物料编码
-
名称
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"materieId"
,
"key"
:
"materieId"
,
"valueType"
:
"select"
,
"width"
:
300
,
"request"
:
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/pmMaterie/query/selectbox"
,
params
:
{}
})
return
res
?.
data
?.
dataList
},
"fieldProps"
:
{
allowClear
:
false
,
showSearch
:
true
},
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
},
{
"title"
:
<
span
>
出库数量
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"outstroeNum"
,
"key"
:
"outstroeNum"
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
},
{
"title"
:
"可用库存"
,
"dataIndex"
:
"usableNum"
,
"key"
:
"usableNum"
,
"readonly"
:
'usableNum'
,
"width"
:
88
},
{
"title"
:
"单位"
,
"dataIndex"
:
"productionUnitName"
,
"key"
:
"productionUnitName"
,
"readonly"
:
'productionUnitName'
,
"width"
:
60
},
{
title
:
"操作"
,
valueType
:
"option"
,
width
:
70
,
render
:
(
text
,
record
,
_
,
action
)
=>
[
<
a
key
=
"delete"
onClick
=
{()
=>
{
}}
>
删除
<
/a>
,
],
},
],
rowKey
:
"id"
,
}
},
four
=
{
"materieOutstoreNo"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"出库单号"
,
"name"
:
[
"materieOutstoreNo"
],
"required"
:
false
},
"storeId"
:
{
"value"
:
null
,
"type"
:
"select"
,
"title"
:
"仓库"
,
"name"
:
[
"storeId"
],
"required"
:
true
,
"options"
:
{
database
:
()
=>
doFetch
({
url
:
"/ngic-auth/sysStore/selectionBox"
,
params
:
{
factoryIdList
:
[]
}
}),
params
:
{}
},
},
"businessNo"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"相关单号"
,
"name"
:
[
"businessNo"
],
"required"
:
false
},
"remark"
:
{
"value"
:
null
,
"type"
:
"textarea"
,
"title"
:
"备注"
,
"name"
:
[
"remark"
],
"required"
:
false
,
"col"
:
{
"span"
:
24
}
},
"materialList"
:
{
value
:
[],
title
:
"物料信息"
,
type
:
"table"
,
col
:
{
span
:
24
},
name
:
[
"materialList"
],
required
:
true
,
linkconfig
:
{
urlchangeval
:
{
//根据url接口 改变某个value
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/pmMaterie/queryUnitByMaterieId"
,
params
}),
params
:
{
"materieId"
:
"linked"
},
effectresult
:
{
"productionUnit"
:
"productionUnit"
,
//key 为列表更新值 value为response 返回值
"productionUnitName"
:
"productionUnitName"
,
"usableNum"
:
"usableNum"
}
}
},
columns
:
[
{
"title"
:
<
span
>
物料编码
-
名称
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"materieId"
,
"key"
:
"materieId"
,
"valueType"
:
"select"
,
"width"
:
300
,
"request"
:
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/pmMaterie/query/selectbox"
,
params
:
{}
})
return
res
?.
data
?.
dataList
},
"fieldProps"
:
{
allowClear
:
false
,
showSearch
:
true
},
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
},
{
"title"
:
<
span
>
出库数量
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"outstroeNum"
,
"key"
:
"outstroeNum"
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
},
{
"title"
:
"可用库存"
,
"dataIndex"
:
"usableNum"
,
"key"
:
"usableNum"
,
"readonly"
:
'usableNum'
,
"width"
:
88
},
{
"title"
:
"单位"
,
"dataIndex"
:
"productionUnitName"
,
"key"
:
"productionUnitName"
,
"readonly"
:
'productionUnitName'
,
"width"
:
60
},
{
title
:
"操作"
,
valueType
:
"option"
,
width
:
70
,
render
:
(
text
,
record
,
_
,
action
)
=>
[
<
a
key
=
"delete"
onClick
=
{()
=>
{
}}
>
删除
<
/a>
,
],
},
],
rowKey
:
"id"
,
}
},
detail
=
{
totalCard
:
[
//物料详情
{
cardTitle
:
"基本信息"
,
itemData
:
[
{
title
:
"出库单号"
,
key
:
"materieOutstoreNo"
,
},
{
title
:
"出库类型"
,
key
:
"outstoreTypeName"
,
},
{
title
:
"出库仓库"
,
key
:
"storeName"
,
},
{
title
:
"相关单号"
,
key
:
"businessNo"
,
},
{
title
:
"备注"
,
key
:
"remark"
,
},
{
title
:
"创建人"
,
key
:
"createUserName"
,
},
{
title
:
"创建时间"
,
key
:
"createTime"
,
},
],
},
{
cardTitle
:
"物料信息列表"
,
itemData
:
[
{
key
:
"materialList"
,
type
:
"table"
,
col
:
{
span
:
24
},
columns
:
[
{
title
:
"物料名称"
,
dataIndex
:
"materieName"
,
key
:
"materieName"
,
search
:
false
,
},
{
title
:
"物料编码"
,
dataIndex
:
"materieCode"
,
key
:
"materieCode"
,
search
:
false
,
},
{
title
:
"出库数量"
,
dataIndex
:
"instroeNum"
,
key
:
"instroeNum"
,
search
:
false
,
},
{
title
:
"单位"
,
dataIndex
:
"productionUnitName"
,
key
:
"productionUnitName"
,
search
:
false
,
},
],
expandable
:
{
expandedRowRender
:
record
=>
<
Table
style
=
{{
marginLeft
:
48
}}
columns
=
{[
{
title
:
"库位名称"
,
dataIndex
:
"storeName"
,
key
:
"storeName"
,
search
:
false
,
},
{
title
:
"上架数量"
,
dataIndex
:
"instroeNum"
,
key
:
"instroeNum"
,
search
:
false
,
}
]}
dataSource
=
{
record
.
uploadList
}
pagination
=
{
false
}
/>
,
}
},
],
},
]
};
export
default
{
one
,
two
,
three
,
four
,
detail
};
src/pages/outsetstore/Outstore/index.jsx
0 → 100644
View file @
a5f936be
import
React
,
{
useEffect
,
useMemo
,
useRef
,
useState
}
from
"react"
;
import
{
Dropdown
,
Menu
,
Button
,
message
,
}
from
"antd"
;
import
AutoTable
from
"@/components/AutoTable"
;
import
defaultFields
from
"./fields"
;
import
{
doFetch
}
from
"@/utils/doFetch"
;
import
DrawInitForm
from
"@/components/DrawInitForm"
;
import
getPrem
from
'@/utils/getPrem'
;
//权限判断fn
const
keytoval
=
{
"one"
:
1
,
"two"
:
2
,
"three"
:
3
,
"four"
:
4
},
items
=
[
{
key
:
'one'
,
label
:
(
<
a
>
采购出库
</
a
>
),
},
{
key
:
'two'
,
label
:
(
<
a
>
生产出库
</
a
>
),
},
{
key
:
'three'
,
label
:
(
<
a
>
退料出库
</
a
>
),
},
{
key
:
'four'
,
label
:
(
<
a
>
其他出库
</
a
>
),
},
]
function
Instore
(
props
)
{
const
[
activeTabKey
,
onTabChange
]
=
useState
(
"1"
);
let
[
drawprops
,
setdrawprops
]
=
useState
({
title
:
""
,
visible
:
false
,
onClose
:
()
=>
{
setdrawprops
(
s
=>
({
...
s
,
visible
:
false
,
}))
},
fields
:
{},
width
:
1200
}),
actionRef
=
useRef
(),
ChildRef
=
null
;
//操作完成后刷新
function
reload
()
{
actionRef
.
current
.
reload
();
ChildRef
?.
onRefresh
();
message
.
success
(
"操作成功"
);
setdrawprops
(
s
=>
({
...
s
,
visible
:
false
}))
}
const
columns
=
useMemo
(()
=>
{
if
(
activeTabKey
==
"1"
)
{
return
[
{
"title"
:
"出库单号"
,
"dataIndex"
:
"materieOutstoreNo"
,
"key"
:
"materieOutstoreNo"
,
"render"
:
(
dom
,
record
)
=>
{
return
<
a
onClick=
{
()
=>
{
setdrawprops
(
s
=>
({
...
s
,
visible
:
true
,
//查看详情 props
val
:
"detail"
,
title
:
`查看详情`
,
...
defaultFields
?.
detail
,
totalPath
:
"/ngic-workmanship/wmsmaterieOutstore/getInStoreInfoById"
,
totalParams
:
{
id
:
record
.
id
}
}))
}
}
>
{
dom
}
</
a
>
}
},
{
"title"
:
"出库类型"
,
"dataIndex"
:
"outstoreTypeName"
,
"key"
:
"outstoreType"
,
"valueType"
:
"select"
,
"options"
:
[
{
"label"
:
"采购出库"
,
"value"
:
"1"
},
{
"label"
:
"生产出库"
,
"value"
:
"2"
},
{
"label"
:
"退料出库"
,
"value"
:
"3"
},
{
"label"
:
"其他出库"
,
"value"
:
"4"
}
]
},
{
"title"
:
"出库仓库"
,
"dataIndex"
:
"storeName"
,
"key"
:
"storeId"
,
options
:
{
database
:
()
=>
doFetch
({
url
:
"/ngic-auth/sysStore/selectionBox"
,
params
:
{
factoryIdList
:
[]
}
}),
params
:
{}
},
valueType
:
"select"
,
},
{
"title"
:
"相关单号"
,
"dataIndex"
:
"businessNo"
,
"key"
:
"businessNo"
},
{
"title"
:
"备注"
,
"dataIndex"
:
"remark"
,
"key"
:
"remark"
,
"search"
:
false
},
{
"title"
:
"创建人"
,
"dataIndex"
:
"createUserName"
,
"key"
:
"createUserName"
},
{
"title"
:
"创建时间"
,
"dataIndex"
:
"createTime"
,
"key"
:
"createTime"
,
"search"
:
false
},
{
"title"
:
"创建时间开始时间"
,
"dataIndex"
:
"createTimeStart"
,
"key"
:
"createTimeStart"
,
"valueType"
:
"date"
,
"hideInTable"
:
true
},
{
"title"
:
"创建时间结束时间"
,
"dataIndex"
:
"createTimeEnd"
,
"key"
:
"createTimeEnd"
,
"valueType"
:
"date"
,
"hideInTable"
:
true
},
{
"title"
:
"状态"
,
"dataIndex"
:
"statusName"
,
"key"
:
"status"
,
"valueType"
:
"select"
,
"options"
:
[
{
"label"
:
"待上架"
,
"value"
:
"0"
},
{
"label"
:
"上架中"
,
"value"
:
"1"
}
]
},
{
"title"
:
"操作"
,
"valueType"
:
"option"
,
"width"
:
240
,
"render"
:
(
text
,
record
,
_
,
action
)
=>
{
return
[
getPrem
(
"equipmentCustomer_save"
,
action
,
'上架采集'
,
async
()
=>
{
}),
getPrem
(
"equipmentCustomer_deleteById"
,
action
,
'关单'
,
null
,
{
title
:
"确认关单?"
,
onConfirm
:
()
=>
{
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieOutstore/close"
,
params
:
{
id
:
record
.
id
}
}).
then
(
res
=>
{
if
(
res
.
code
==
"0000"
)
{
reload
()
}
})
}
}),
getPrem
(
"equipmentCustomer_deleteById"
,
action
,
'删除'
,
null
,
{
title
:
"确认删除?"
,
onConfirm
:
()
=>
{
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieOutstore/deleteById"
,
params
:
{
id
:
record
.
id
}
}).
then
(
res
=>
{
if
(
res
.
code
==
"0000"
)
{
reload
()
}
})
}
})
];
}
}
]
}
else
{
return
[
{
"title"
:
"出库单号"
,
"dataIndex"
:
"materieOutstoreNo"
,
"key"
:
"materieOutstoreNo"
,
"render"
:
(
dom
,
record
)
=>
{
return
<
a
onClick=
{
()
=>
{
setdrawprops
(
s
=>
({
...
s
,
visible
:
true
,
//查看详情 props
val
:
"detail"
,
title
:
`查看详情`
,
...
defaultFields
?.
detail
,
totalPath
:
"/ngic-workmanship/wmsmaterieOutstoreHis/getInStoreInfoById"
,
totalParams
:
{
id
:
record
.
id
}
}))
}
}
>
{
dom
}
</
a
>
}
},
{
"title"
:
"出库类型"
,
"dataIndex"
:
"outstoreTypeName"
,
"key"
:
"outstoreType"
,
"valueType"
:
"select"
,
"options"
:
[
{
"label"
:
"采购出库"
,
"value"
:
"1"
},
{
"label"
:
"生产出库"
,
"value"
:
"2"
},
{
"label"
:
"退料出库"
,
"value"
:
"3"
},
{
"label"
:
"其他出库"
,
"value"
:
"4"
}
]
},
{
"title"
:
"出库仓库"
,
"dataIndex"
:
"storeName"
,
"key"
:
"storeId"
,
options
:
{
database
:
()
=>
doFetch
({
url
:
"/ngic-auth/sysStore/selectionBox"
,
params
:
{
factoryIdList
:
[]
}
}),
params
:
{}
},
valueType
:
"select"
,
},
{
"title"
:
"相关单号"
,
"dataIndex"
:
"businessNo"
,
"key"
:
"businessNo"
},
{
"title"
:
"备注"
,
"dataIndex"
:
"remark"
,
"key"
:
"remark"
,
"search"
:
false
},
{
"title"
:
"创建人"
,
"dataIndex"
:
"createUserName"
,
"key"
:
"createUserName"
},
{
"title"
:
"创建时间"
,
"dataIndex"
:
"createTime"
,
"key"
:
"createTime"
,
"search"
:
false
},
{
"title"
:
"创建时间开始时间"
,
"dataIndex"
:
"createTimeStart"
,
"key"
:
"createTimeStart"
,
"valueType"
:
"date"
,
"hideInTable"
:
true
},
{
"title"
:
"创建时间结束时间"
,
"dataIndex"
:
"createTimeEnd"
,
"key"
:
"createTimeEnd"
,
"valueType"
:
"date"
,
"hideInTable"
:
true
},
{
"title"
:
"关单时间"
,
"dataIndex"
:
"closeTime"
,
"key"
:
"closeTime"
,
"search"
:
false
},
{
"title"
:
"关单时间开始时间"
,
"dataIndex"
:
"closeTimeStart"
,
"key"
:
"closeTimeStart"
,
"valueType"
:
"date"
,
"hideInTable"
:
true
},
{
"title"
:
"关单时间结束时间"
,
"dataIndex"
:
"closeTimeEnd"
,
"key"
:
"closeTimeEnd"
,
"valueType"
:
"date"
,
"hideInTable"
:
true
},
{
"title"
:
"状态"
,
"dataIndex"
:
"statusName"
,
"key"
:
"status"
,
"valueType"
:
"select"
,
"options"
:
[
{
"label"
:
"已上架"
,
"value"
:
"2"
},
{
"label"
:
"已关单"
,
"value"
:
"4"
}
]
}
]
}
},
[
activeTabKey
])
const
tableprops
=
{
...
props
,
pageextra
:
activeTabKey
==
"1"
?
<
Dropdown
placement=
"bottomRight"
overlay=
{
<
Menu
onClick=
{
(
e
)
=>
{
setdrawprops
(
s
=>
({
...
s
,
visible
:
true
,
title
:
"新增"
,
fields
:
defaultFields
[
e
.
key
],
outstoreType
:
keytoval
[
e
.
key
],
val
:
"add"
//类型
}))
}
}
items=
{
items
}
/>
}
>
<
Button
type=
"primary"
>
新增
</
Button
>
</
Dropdown
>
:
"none"
,
tabList
:
[
{
tab
:
"未完成"
,
key
:
"1"
},
{
tab
:
"已完成"
,
key
:
"2"
}
],
activeTabKey
,
onTabChange
,
columns
,
path
:
activeTabKey
==
"1"
?
"/ngic-workmanship/wmsMaterieOutstore/queryList"
:
"/ngic-workmanship/wmsMaterieOutstoreHis/queryList"
}
return
(
<
div
>
<
AutoTable
{
...
tableprops
}
actionRef=
{
actionRef
}
onRef=
{
(
node
)
=>
(
ChildRef
=
node
)
}
></
AutoTable
>
<
DrawInitForm
{
...
drawprops
}
submitData=
{
async
(
value
)
=>
{
if
(
drawprops
.
val
==
"add"
)
{
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieOutstore/saveOutStore"
,
params
:
{
...
value
,
outstoreType
:
drawprops
.
outstoreType
}
})
if
(
res
.
code
==
"0000"
)
{
reload
();
}
}
}
}
/>
</
div
>
);
}
export
default
Instore
;
\ No newline at end of file
src/pages/outsetstore/Outstore/index.less
0 → 100644
View file @
a5f936be
.sitelayout {
min-height: calc(100vh - 98px) !important;
.sitelayoutbackground {
background: #fff;
}
}
.title{
margin: 0px;
}
\ No newline at end of file
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