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
673a770f
Commit
673a770f
authored
1 year ago
by
krysent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
出入库
parent
f9f7027d
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
2908 additions
and
589 deletions
+2908
-589
routes.js
config/routes.js
+6
-1
LodopFuncs.js
public/LodopFuncs.js
+3
-12
index.jsx
src/components/Footer/index.jsx
+6
-5
fields.js
src/pages/Printer/fields.js
+1
-1
index.jsx
src/pages/Task/index.jsx
+28
-41
fields.js
src/pages/insertstore/Instore/fields.js
+231
-292
index.jsx
src/pages/insertstore/Instore/index.jsx
+196
-156
printdom.jsx
src/pages/insertstore/Instore/printdom.jsx
+13
-24
fields.js
src/pages/insertstore/Otherinstore/fields.js
+1061
-0
index.jsx
src/pages/insertstore/Otherinstore/index.jsx
+1042
-0
index.less
src/pages/insertstore/Otherinstore/index.less
+10
-0
printdom.jsx
src/pages/insertstore/Otherinstore/printdom.jsx
+220
-0
index.jsx
src/pages/outsetstore/Otheroutstore/index.jsx
+76
-54
index.jsx
src/pages/user/Login/index.jsx
+15
-3
No files found.
config/routes.js
View file @
673a770f
...
...
@@ -38,9 +38,14 @@ export default [
name
:
"入库管理"
,
component
:
"./insertstore/Instore"
,
},
{
path
:
"/wms/otherInstore"
,
name
:
"其他入库管理"
,
component
:
"./insertstore/Otherinstore"
,
},
{
path
:
"/wms/otherOutstore"
,
name
:
"其他出库
单
"
,
name
:
"其他出库
管理
"
,
component
:
"./outsetstore/Otheroutstore"
,
},
{
...
...
This diff is collapsed.
Click to expand it.
public/LodopFuncs.js
View file @
673a770f
...
...
@@ -78,17 +78,8 @@ function getLodop(oOBJECT, oEMBED) {
return
LODOP
;
}
catch
(
err
)
{
alert
(
"getLodop出错:"
+
err
);
// alert(
// `getLodop出错,<a href="http://192.168.40.2/staticfile/group1/M00/00/00/CLodop_Setup_for_Win32NT.exe">点击此处下载打印插件</a>`
// );
}
}
/*
* 佛曰:
* 写字楼里写字间,写字间里程序员;
* 程序人员写程序,又拿程序换酒钱
* 酒醒只在网上坐,酒醉还来网下眠
* 酒醉酒醒日复日,网上网下年复年
* 但愿老死电脑间,不愿鞠躬老板前
* 奔驰宝马贵者趣,公交自行程序员
* 别人笑我忒疯癫,我笑自己命太贱;
* 不见满街漂亮妹,哪个归得程序员?
*/
This diff is collapsed.
Click to expand it.
src/components/Footer/index.jsx
View file @
673a770f
...
...
@@ -9,11 +9,12 @@ const Footer = () => {
<
DefaultFooter
copyright=
{
`${currentYear} 江苏南高智能装备创新中心出品`
}
links=
{
[
//
{
// key: "Ant Design Pro",
// title: "JiangSuNanGao",
// blankTarget: true,
//
},
{
key
:
"download"
,
title
:
"插件下载"
,
blankTarget
:
true
,
href
:
'http://192.168.40.2/staticfile/group1/M00/00/00/CLodop_Setup_for_Win32NT.exe'
,
},
//
{
// key: "github",
// title: <GithubOutlined />,
...
...
This diff is collapsed.
Click to expand it.
src/pages/Printer/fields.js
View file @
673a770f
...
...
@@ -16,7 +16,7 @@ export function getColumns(setDrawer, formRef) {
if
(
value
)
{
doFetch
({
url
:
"/ngic-workmanship/pmMaterie/queryById"
,
params
:
{
i
d
:
value
},
params
:
{
materieI
d
:
value
},
}).
then
((
res
)
=>
{
console
.
log
(
res
);
const
data
=
res
?.
data
?.
data
;
...
...
This diff is collapsed.
Click to expand it.
src/pages/Task/index.jsx
View file @
673a770f
...
...
@@ -118,26 +118,6 @@ function Outstore(props) {
title
:
"物料名称"
,
dataIndex
:
"materieName"
,
key
:
"materieName"
,
valueType
:
"select"
,
options
:
[
{
label
:
"生产领料出库"
,
value
:
"1"
,
},
{
label
:
"销售出库"
,
value
:
"2"
,
},
{
label
:
"报废出库"
,
value
:
"3"
,
},
{
label
:
"其他出库"
,
value
:
"4"
,
},
],
},
{
title
:
"规格型号"
,
...
...
@@ -179,7 +159,26 @@ function Outstore(props) {
{
title
:
"任务类型"
,
dataIndex
:
"taskTypeName"
,
key
:
"taskTypeName"
,
key
:
"taskType"
,
valueType
:
"select"
,
options
:
[
{
label
:
"生产叫料单"
,
value
:
"1"
,
},
{
label
:
"来料入库单"
,
value
:
"2"
,
},
{
label
:
"生产退料单"
,
value
:
"3"
,
},
{
label
:
"移库"
,
value
:
"4"
,
},
],
},
{
title
:
"单据状态"
,
...
...
@@ -241,6 +240,7 @@ function Outstore(props) {
title
:
"任务单号"
,
dataIndex
:
"taskNo"
,
key
:
"taskNo"
,
search
:
false
,
// render: (dom, record) => {
// return (
// <a
...
...
@@ -280,30 +280,13 @@ function Outstore(props) {
title
:
"物料名称"
,
dataIndex
:
"materieName"
,
key
:
"materieName"
,
valueType
:
"select"
,
options
:
[
{
label
:
"生产领料出库"
,
value
:
"1"
,
},
{
label
:
"销售出库"
,
value
:
"2"
,
},
{
label
:
"报废出库"
,
value
:
"3"
,
},
{
label
:
"其他出库"
,
value
:
"4"
,
},
],
search
:
false
,
},
{
title
:
"规格型号"
,
dataIndex
:
"specificationModel"
,
key
:
"specificationModel"
,
search
:
false
,
fieldProps
:
{
allowClear
:
true
,
showSearch
:
true
,
...
...
@@ -322,27 +305,30 @@ function Outstore(props) {
title
:
"批次号"
,
dataIndex
:
"materieControlNo"
,
key
:
"materieControlNo"
,
search
:
false
,
},
{
title
:
"来源库位"
,
dataIndex
:
"sourceStorePositionName"
,
key
:
"sourceStorePositionName"
,
search
:
false
,
},
{
title
:
"目标库位"
,
dataIndex
:
"targetStorePositionName"
,
key
:
"targetStorePositionName"
,
search
:
false
,
},
{
title
:
"任务类型"
,
dataIndex
:
"taskTypeName"
,
key
:
"taskTypeName"
,
search
:
false
,
},
{
title
:
"单据状态"
,
dataIndex
:
"statusName"
,
key
:
"statusName"
,
search
:
false
,
valueType
:
"select"
,
options
:
[
{
...
...
@@ -367,6 +353,7 @@ function Outstore(props) {
title
:
"下发时间"
,
dataIndex
:
"distributeTime"
,
key
:
"distributeTime"
,
search
:
false
,
},
];
}
...
...
This diff is collapsed.
Click to expand it.
src/pages/insertstore/Instore/fields.js
View file @
673a770f
import
{
factorySelect
,
shopSelectByFactory
}
from
"@/services/system"
;
import
{
doFetch
}
from
"@/utils/doFetch"
;
import
{
Button
,
Table
}
from
"antd"
;
import
{
EditableProTable
}
from
"@ant-design/pro-t
able"
;
import
EditTable
from
"@/components/EditT
able"
;
import
{
useEffect
,
useState
}
from
'react'
import
{
useModel
}
from
'umi'
const
EditUpload
=
({
record
,
fid
,
storeId
})
=>
{
const
[
value
,
setvalue
]
=
useState
({
[
record
.
id
]:
record
.
up
loadList
[
record
.
id
]:
record
.
down
loadList
});
const
{
initialState
,
setInitialState
}
=
useModel
(
"@@initialState"
);
useEffect
(()
=>
{
...
...
@@ -19,11 +19,13 @@ const EditUpload = ({ record, fid, storeId }) => {
let
newArr
=
value
[
id
]?.
filter
(
it
=>
typeof
(
it
.
id
)
==
"number"
)
??
[];
return
{
id
,
up
loadList
:
newArr
.
map
(
its
=>
{
down
loadList
:
newArr
.
map
(
its
=>
{
return
{
storePositionId
:
its
?.
storePositionId
,
instroeNum
:
its
?.
instroeNum
,
remark
:
its
?.
remark
outstroeNum
:
its
?.
outstroeNum
,
stockNum
:
its
?.
stockNum
,
remark
:
its
?.
remark
,
materieControlNo
:
its
?.
materieControlNo
}
})
}
...
...
@@ -31,20 +33,33 @@ const EditUpload = ({ record, fid, storeId }) => {
setInitialState
(
s
=>
{
return
({
...
s
,
submit
:
{
submit
s
:
{
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
.
up
loadList
?.
length
>
0
)
:
[]
materialList
:
(
s
.
submit
s
&&
s
?.
submits
?.
materialList
)
?
s
?.
submits
?.
materialList
?.
filter
(
it
=>
newlist
.
map
(
item
=>
item
.
id
).
indexOf
(
it
.
id
)
==
-
1
)?.
concat
(
newlist
)?.
filter
(
it
=>
it
.
down
loadList
?.
length
>
0
)
:
[]
}
})
})
},
[
value
]);
return
<
EditableProTable
rowKey
=
{
"id"
}
},
[
value
])
return
<
EditTable
rowKey
=
"id"
maxLength
=
{
1000
}
linkconfig
=
{{
urlchangeval
:
{
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieStore/queryStoreOne"
,
params
}),
params
:
{
"storePositionId"
:
"linked"
,
materieControlNo
:
"linked"
},
effectresult
:
{
"supplierNo"
:
"supplierNo"
,
"supplierName"
:
"supplierName"
,
"stockNum"
:
"stroeNum"
,
"materieControlNo"
:
"materieControlNo"
}
}
}}
style
=
{{
marginLeft
:
48
}}
columns
=
{[
{
title
:
<
span
>
库位名称
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
title
:
"库位名称"
,
dataIndex
:
"storePositionName"
,
key
:
"storePositionId"
,
search
:
false
,
...
...
@@ -64,19 +79,53 @@ const EditUpload = ({ record, fid, storeId }) => {
},
},
{
title
:
<
span
>
上架数量
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
dataIndex
:
"
instroeNum
"
,
key
:
"
instroeNum
"
,
title
:
"批次号/SN号"
,
dataIndex
:
"
materieControlNo
"
,
key
:
"
materieControlNo
"
,
search
:
false
,
valueType
:
"select"
,
request
:
async
(
params
)
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieStore/queryPCList"
,
params
:
{
materieId
:
params
.
materieId
,
storePositionId
:
params
.
storePositionId
}
});
return
res
?.
data
?.
dataList
},
editable
:
(
text
,
record
,
index
)
=>
{
return
!
record
.
materieOutstoreDetailId
},
valueType
:
"digit"
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
params
:
(
row
)
=>
{
return
{
materieId
:
record
.
materieId
,
storePositionId
:
row
.
storePositionId
}
},
width
:
200
},
{
title
:
"下架数量"
,
dataIndex
:
"outstroeNum"
,
key
:
"outstroeNum"
,
search
:
false
,
editable
:
(
text
,
record
,
index
)
=>
{
return
!
record
.
materieOutstoreDetailId
},
valueType
:
"digit"
},
{
title
:
"供应商编号"
,
dataIndex
:
"supplierNo"
,
key
:
"supplierNo"
,
search
:
false
,
readonly
:
true
},
{
title
:
"供应商名称"
,
dataIndex
:
"supplierName"
,
key
:
"supplierName"
,
search
:
false
,
readonly
:
true
},
{
title
:
"库存数量"
,
dataIndex
:
"stockNum"
,
key
:
"stockNum"
,
search
:
false
,
"readonly"
:
true
,
},
{
title
:
"备注"
,
...
...
@@ -92,52 +141,38 @@ const EditUpload = ({ record, fid, storeId }) => {
valueType
:
"option"
,
width
:
70
,
render
:
(
text
,
record
,
_
,
action
)
=>
[
typeof
(
record
.
id
)
==
"number"
&&
<
a
key
=
"delete"
onClick
=
{()
=>
{
}}
>
<
a
key
=
"delete"
onClick
=
{()
=>
{
}}
>
删除
<
/a>
,
],
}
]}
value
=
{
value
[
record
.
id
]}
recordCreatorProps
=
{{
newRecordType
:
"dataSource"
,
record
:
()
=>
({
id
:
Date
.
now
(),
}),
}}
editable
=
{{
type
:
"multiple"
,
actionRender
:
(
row
,
config
,
defaultDoms
)
=>
{
return
[
defaultDoms
.
delete
];
},
onValuesChange
:
async
(
records
,
recordList
)
=>
{
setvalue
(
s
=>
{
return
({
...
s
,
[
record
.
id
]:
recordList
})
});
},
onChange
=
{(
vals
)
=>
{
setvalue
(
s
=>
({
...
s
,
[
record
.
id
]:
vals
}));
}}
pagination
=
{
false
}
/
>
}
const
one
=
{
"materie
In
storeNo"
:
{
"materie
Out
storeNo"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"
入
库单号"
,
"title"
:
"
出
库单号"
,
"name"
:
[
"materie
In
storeNo"
"materie
Out
storeNo"
],
"required"
:
false
,
placeholder
:
"不填写系统自动生成"
"placeholder"
:
"不填写系统自动生成"
},
"storeId"
:
{
"value"
:
null
,
"type"
:
"select"
,
"title"
:
"
入
库仓库"
,
"title"
:
"
出
库仓库"
,
"name"
:
[
"storeId"
],
...
...
@@ -146,19 +181,7 @@ const one = {
database
:
()
=>
doFetch
({
url
:
"/ngic-auth/sysStore/selectionBox"
,
params
:
{
factoryIdList
:
[]
}
}),
params
:
{}
},
},
"supplierId"
:
{
"value"
:
null
,
"type"
:
"select"
,
"title"
:
"供应商"
,
"name"
:
[
"supplierId"
],
"required"
:
true
,
"options"
:
{
database
:
()
=>
doFetch
({
url
:
"/ngic-auth/sysSupplier/query/selection"
,
params
:
{}
}),
params
:
{}
},
"linked"
:
true
},
"businessNo"
:
{
"value"
:
null
,
...
...
@@ -190,13 +213,13 @@ const one = {
required
:
true
,
linkconfig
:
{
urlchangeval
:
{
//根据url接口 改变某个value
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/
pmMaterie/queryUnitByMaterieId
"
,
params
}),
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/
wmsMaterieStockStore/queryStoreOne
"
,
params
}),
params
:
{
"materieId"
:
"linked"
},
effectresult
:
{
"productionUnit"
:
"productionUnit"
,
//key 为列表更新值 value为response 返回值
"productionUnitName"
:
"productionUnitName"
,
"
materieControlNo"
:
"materialCode
"
,
"
instroeNum"
:
"in
stroeNum"
"
usableNum"
:
"usableNum
"
,
"
outstroeNum"
:
"out
stroeNum"
}
}
},
...
...
@@ -206,7 +229,6 @@ const one = {
"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
...
...
@@ -220,29 +242,31 @@ const one = {
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
editable
:
true
},
{
"title"
:
"批次号/SN号"
,
"dataIndex"
:
"materieControlNo"
,
"key"
:
"materieControlNo"
},
{
"title"
:
<
span
>
入库数量
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"instroeNum"
,
"key"
:
"instroeNum"
,
valueType
:
"digit"
,
"title"
:
<
span
>
出库数量
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"outstroeNum"
,
"key"
:
"outstroeNum"
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
}
},
valueType
:
"digit"
,
editable
:
true
},
{
"title"
:
"可用库存"
,
"dataIndex"
:
"usableNum"
,
"key"
:
"usableNum"
,
"readonly"
:
'usableNum'
},
{
"title"
:
"库存单位"
,
"dataIndex"
:
"productionUnitName"
,
"key"
:
"productionUnitName"
,
"readonly"
:
'productionUnitName'
,
"width"
:
88
"readonly"
:
'productionUnitName'
},
{
title
:
"操作"
,
...
...
@@ -259,12 +283,12 @@ const one = {
}
},
two
=
{
"materie
In
storeNo"
:
{
"materie
Out
storeNo"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"
入
库单号"
,
"title"
:
"
出
库单号"
,
"name"
:
[
"materie
In
storeNo"
"materie
Out
storeNo"
],
"required"
:
false
,
placeholder
:
"不填写系统自动生成"
...
...
@@ -272,7 +296,7 @@ const one = {
"storeId"
:
{
"value"
:
null
,
"type"
:
"select"
,
"title"
:
"
入
库仓库"
,
"title"
:
"
出
库仓库"
,
"name"
:
[
"storeId"
],
...
...
@@ -282,22 +306,6 @@ const one = {
params
:
{}
},
},
"supplierId"
:
{
"value"
:
"2022070124566476657"
,
"type"
:
"select"
,
"title"
:
"供应商"
,
"name"
:
[
"supplierId"
],
"required"
:
true
,
"disabled"
:
true
,
"options"
:
[
{
value
:
"2022070124566476657"
,
label
:
"南高(默认)"
}
],
},
"businessNo"
:
{
"value"
:
null
,
"type"
:
"input"
,
...
...
@@ -328,13 +336,13 @@ const one = {
required
:
true
,
linkconfig
:
{
urlchangeval
:
{
//根据url接口 改变某个value
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/
pmMaterie/queryUnitByMaterieId
"
,
params
}),
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/
wmsMaterieStockStore/queryStoreOne
"
,
params
}),
params
:
{
"materieId"
:
"linked"
},
effectresult
:
{
"productionUnit"
:
"productionUnit"
,
//key 为列表更新值 value为response 返回值
"productionUnitName"
:
"productionUnitName"
,
"
materieControlNo"
:
"materialCode
"
,
"
instroeNum"
:
"in
stroeNum"
"
usableNum"
:
"usableNum
"
,
"
outstroeNum"
:
"out
stroeNum"
}
}
},
...
...
@@ -344,7 +352,6 @@ const one = {
"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
...
...
@@ -360,14 +367,9 @@ const one = {
},
},
{
"title"
:
"批次号/SN号"
,
"dataIndex"
:
"materieControlNo"
,
"key"
:
"materieControlNo"
},
{
"title"
:
<
span
>
入库数量
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"instroeNum"
,
"key"
:
"instroeNum"
,
"title"
:
<
span
>
出库数量
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"outstroeNum"
,
"key"
:
"outstroeNum"
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
...
...
@@ -375,12 +377,17 @@ const one = {
},
valueType
:
"digit"
},
{
"title"
:
"可用库存"
,
"dataIndex"
:
"usableNum"
,
"key"
:
"usableNum"
,
"readonly"
:
'usableNum'
},
{
"title"
:
"库存单位"
,
"dataIndex"
:
"productionUnitName"
,
"key"
:
"productionUnitName"
,
"readonly"
:
'productionUnitName'
,
"width"
:
88
"readonly"
:
'productionUnitName'
},
{
title
:
"操作"
,
...
...
@@ -397,12 +404,12 @@ const one = {
}
},
three
=
{
"materie
In
storeNo"
:
{
"materie
Out
storeNo"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"
入
库单号"
,
"title"
:
"
出
库单号"
,
"name"
:
[
"materie
In
storeNo"
"materie
Out
storeNo"
],
"required"
:
false
,
placeholder
:
"不填写系统自动生成"
...
...
@@ -410,7 +417,7 @@ const one = {
"storeId"
:
{
"value"
:
null
,
"type"
:
"select"
,
"title"
:
"
入
库仓库"
,
"title"
:
"
出
库仓库"
,
"name"
:
[
"storeId"
],
...
...
@@ -450,14 +457,13 @@ const one = {
required
:
true
,
linkconfig
:
{
urlchangeval
:
{
//根据url接口 改变某个value
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/
pmMaterie/queryUnitByMaterieId
"
,
params
}),
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/
wmsMaterieStockStore/queryStoreOne
"
,
params
}),
params
:
{
"materieId"
:
"linked"
},
effectresult
:
{
"productionUnit"
:
"productionUnit"
,
//key 为列表更新值 value为response 返回值
"productionUnitName"
:
"productionUnitName"
,
"materieControlNo"
:
"materialCode"
,
"instroeNum"
:
"instroeNum"
,
"supplierId"
:
"supplierId"
"usableNum"
:
"usableNum"
,
"outstroeNum"
:
"outstroeNum"
}
}
},
...
...
@@ -467,7 +473,6 @@ const one = {
"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
...
...
@@ -483,47 +488,27 @@ const one = {
},
},
{
"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
:
true
,
showSearch
:
true
},
"title"
:
<
span
>
出库数量
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"outstroeNum"
,
"key"
:
"outstroeNum"
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
valueType
:
"digit"
},
{
"title"
:
"批次号/SN号"
,
"dataIndex"
:
"materieControlNo"
,
"key"
:
"materieControlNo"
},
{
"title"
:
<
span
>
入库数量
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"instroeNum"
,
"key"
:
"instroeNum"
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
valueType
:
"digit"
"title"
:
"可用库存"
,
"dataIndex"
:
"usableNum"
,
"key"
:
"usableNum"
,
"readonly"
:
'usableNum'
},
{
"title"
:
"库存单位"
,
"dataIndex"
:
"productionUnitName"
,
"key"
:
"productionUnitName"
,
"readonly"
:
'productionUnitName'
,
"width"
:
88
"readonly"
:
'productionUnitName'
},
{
title
:
"操作"
,
...
...
@@ -540,12 +525,12 @@ const one = {
}
},
four
=
{
"materie
In
storeNo"
:
{
"materie
Out
storeNo"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"
入
库单号"
,
"title"
:
"
出
库单号"
,
"name"
:
[
"materie
In
storeNo"
"materie
Out
storeNo"
],
"required"
:
false
,
placeholder
:
"不填写系统自动生成"
...
...
@@ -553,7 +538,7 @@ const one = {
"storeId"
:
{
"value"
:
null
,
"type"
:
"select"
,
"title"
:
"
入
库仓库"
,
"title"
:
"
出
库仓库"
,
"name"
:
[
"storeId"
],
...
...
@@ -593,14 +578,13 @@ const one = {
required
:
true
,
linkconfig
:
{
urlchangeval
:
{
//根据url接口 改变某个value
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/
pmMaterie/queryUnitByMaterieId
"
,
params
}),
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/
wmsMaterieStockStore/queryStoreOne
"
,
params
}),
params
:
{
"materieId"
:
"linked"
},
effectresult
:
{
"productionUnit"
:
"productionUnit"
,
//key 为列表更新值 value为response 返回值
"productionUnitName"
:
"productionUnitName"
,
"materieControlNo"
:
"materialCode"
,
"instroeNum"
:
"instroeNum"
,
"supplierId"
:
"supplierId"
"usableNum"
:
"usableNum"
,
"outstroeNum"
:
"outstroeNum"
}
}
},
...
...
@@ -610,7 +594,6 @@ const one = {
"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
...
...
@@ -626,47 +609,27 @@ const one = {
},
},
{
"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
:
true
,
showSearch
:
true
},
"title"
:
<
span
>
出库数量
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"outstroeNum"
,
"key"
:
"outstroeNum"
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
valueType
:
"digit"
},
{
"title"
:
"批次号/SN号"
,
"dataIndex"
:
"materieControlNo"
,
"key"
:
"materieControlNo"
},
{
"title"
:
<
span
>
入库数量
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
"dataIndex"
:
"instroeNum"
,
"key"
:
"instroeNum"
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
valueType
:
"digit"
"title"
:
"可用库存"
,
"dataIndex"
:
"usableNum"
,
"key"
:
"usableNum"
,
"readonly"
:
'usableNum'
},
{
"title"
:
"库存单位"
,
"dataIndex"
:
"productionUnitName"
,
"key"
:
"productionUnitName"
,
"readonly"
:
'productionUnitName'
,
"width"
:
88
"readonly"
:
'productionUnitName'
},
{
title
:
"操作"
,
...
...
@@ -689,15 +652,15 @@ const one = {
cardTitle
:
"基本信息"
,
itemData
:
[
{
title
:
"
入
库单号"
,
key
:
"materie
In
storeNo"
,
title
:
"
出
库单号"
,
key
:
"materie
Out
storeNo"
,
},
{
title
:
"
入
库类型"
,
key
:
"
in
storeTypeName"
,
title
:
"
出
库类型"
,
key
:
"
out
storeTypeName"
,
},
{
title
:
"
入
库仓库"
,
title
:
"
出
库仓库"
,
key
:
"storeName"
,
},
{
...
...
@@ -711,7 +674,8 @@ const one = {
{
title
:
"创建时间"
,
key
:
"createTime"
,
},
{
},
{
title
:
"状态"
,
key
:
"statusName"
,
},
...
...
@@ -726,9 +690,9 @@ const one = {
},
{
title
:
"工单条形码"
,
noshow
:
true
,
key
:
"qrCodeUrl"
,
type
:
"img"
,
noshow
:
true
,
width
:
100
,
},
],
...
...
@@ -752,41 +716,27 @@ const one = {
}
},
{
title
:
"供应商编号 - 名称"
,
dataIndex
:
"supplierNo"
,
key
:
"supplierNo"
,
search
:
false
,
render
:
(
dom
,
row
)
=>
{
return
(
row
.
supplierNo
??
''
)
+
" - "
+
(
row
.
supplierName
??
''
)
}
},
{
title
:
"批次号/SN号"
,
dataIndex
:
"materieControlNo"
,
key
:
"materieControlNo"
,
title
:
"出库数量"
,
dataIndex
:
"outstroeNum"
,
key
:
"outstroeNum"
,
search
:
false
,
},
{
title
:
"
入库数量
"
,
dataIndex
:
"
instroeNum
"
,
key
:
"
instroeNum
"
,
title
:
"
库存单位
"
,
dataIndex
:
"
productionUnitName
"
,
key
:
"
productionUnitName
"
,
search
:
false
,
},
{
title
:
"未
上
架数量"
,
title
:
"未
下
架数量"
,
dataIndex
:
"remainderNums"
,
key
:
"remainderNums"
,
search
:
false
,
},
{
title
:
"库存单位"
,
dataIndex
:
"productionUnitName"
,
key
:
"productionUnitName"
,
search
:
false
,
},
],
pagination
:
"false"
,
rowKey
:
"id"
,
expandable
:
{
defaultExpandAllRows
:
true
,
expandedRowRender
:
record
=>
<
Table
style
=
{{
marginLeft
:
48
}}
columns
=
{[
...
...
@@ -802,23 +752,32 @@ const one = {
},
},
{
title
:
"上架数量"
,
dataIndex
:
"instroeNum"
,
key
:
"instroeNum"
,
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
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
}
]}
dataSource
=
{
record
.
up
loadList
}
dataSource
=
{
record
.
down
loadList
}
pagination
=
{
false
}
/>
,
},
pagination
:
"false"
,
rowKey
:
"id"
,
rowSelection
:
{
onChange
:
(
selectedRowKeys
,
selectedRows
)
=>
{
setselected
(
selectedRows
)
...
...
@@ -841,11 +800,11 @@ const one = {
],
},
{
cardTitle
:
"
上
架明细"
,
cardTitle
:
"
下
架明细"
,
noPrint
:
true
,
itemData
:
[
{
key
:
"material
Up
loadList"
,
key
:
"material
Down
loadList"
,
type
:
"table"
,
col
:
{
span
:
24
},
columns
:
[
...
...
@@ -859,24 +818,9 @@ const one = {
}
},
{
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"
,
title
:
"出库数量"
,
dataIndex
:
"outstroeNum"
,
key
:
"outstroeNum"
,
search
:
false
,
},
{
...
...
@@ -903,15 +847,25 @@ const one = {
},
},
{
title
:
"上架数量"
,
dataIndex
:
"instroeNum"
,
key
:
"instroeNum"
,
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
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
}
,
{
...
...
@@ -923,19 +877,19 @@ const one = {
,
{
title
:
"操作人"
,
dataIndex
:
"
up
loadUserName"
,
key
:
"
up
loadUserName"
,
dataIndex
:
"
down
loadUserName"
,
key
:
"
down
loadUserName"
,
search
:
false
,
}
,
{
title
:
"操作时间"
,
dataIndex
:
"
up
loadTime"
,
key
:
"
up
loadTime"
,
dataIndex
:
"
down
loadTime"
,
key
:
"
down
loadTime"
,
search
:
false
,
}
]}
dataSource
=
{
record
.
up
loadList
}
dataSource
=
{
record
.
down
loadList
}
pagination
=
{
false
}
/>
,
},
...
...
@@ -944,22 +898,23 @@ const one = {
],
},
]
}),
doinsert
=
(
fid
,
storeId
)
=>
({
}),
dooutside
=
(
fid
,
storeId
)
=>
({
totalCard
:
[
//物料详情
{
cardTitle
:
"基本信息"
,
itemData
:
[
{
title
:
"
入
库单号"
,
key
:
"materie
In
storeNo"
,
title
:
"
出
库单号"
,
key
:
"materie
Out
storeNo"
,
},
{
title
:
"
入
库类型"
,
key
:
"
in
storeTypeName"
,
title
:
"
出
库类型"
,
key
:
"
out
storeTypeName"
,
},
{
title
:
"
入
库仓库"
,
title
:
"
出
库仓库"
,
key
:
"storeName"
,
},
{
...
...
@@ -980,15 +935,15 @@ const one = {
},
{
title
:
"状态"
,
key
:
"statusName"
,
key
:
"statusName"
}
],
},
{
cardTitle
:
"物料信息列表"
,
extra
:
true
,
extrapath
:
"/ngic-workmanship/wmsMaterie
Instore/up
load"
,
extrakey
:
"submit"
,
//redux key
extrapath
:
"/ngic-workmanship/wmsMaterie
Outstore/down
load"
,
extrakey
:
"submit
s
"
,
//redux key
itemData
:
[
{
key
:
"materialList"
,
...
...
@@ -1005,43 +960,27 @@ const one = {
}
},
{
title
:
"
供应商编号 - 名称
"
,
dataIndex
:
"
supplierNo
"
,
key
:
"
supplierNo
"
,
title
:
"
出库数量
"
,
dataIndex
:
"
outstroeNum
"
,
key
:
"
outstroeNum
"
,
search
:
false
,
render
:
(
dom
,
row
)
=>
{
return
(
row
.
supplierNo
??
''
)
+
" - "
+
(
row
.
supplierName
??
''
)
}
},
{
title
:
"
批次号/SN号
"
,
dataIndex
:
"
materieControlNo
"
,
key
:
"
materieControlNo
"
,
title
:
"
库存单位
"
,
dataIndex
:
"
productionUnitName
"
,
key
:
"
productionUnitName
"
,
search
:
false
,
},
{
title
:
"入库数量"
,
dataIndex
:
"instroeNum"
,
key
:
"instroeNum"
,
search
:
false
},
{
title
:
"未上架数量"
,
title
:
"未下架数量"
,
dataIndex
:
"remainderNums"
,
key
:
"remainderNums"
,
search
:
false
,
},
{
title
:
"库存单位"
,
dataIndex
:
"productionUnitName"
,
key
:
"productionUnitName"
,
search
:
false
,
},
}
],
expandable
:
{
expandedRowRender
:
record
=>
<
EditUpload
record
=
{
record
}
fid
=
{
fid
}
storeId
=
{
storeId
}
/>
,
},
rowKey
:
"id"
}
},
],
},
...
...
@@ -1057,5 +996,5 @@ export default {
three
,
four
,
detail
,
do
insert
do
outside
};
This diff is collapsed.
Click to expand it.
src/pages/insertstore/Instore/index.jsx
View file @
673a770f
...
...
@@ -19,29 +19,31 @@ const keytoval = {
items
=
[
{
key
:
"one"
,
label
:
<
a
>
采购入
库
</
a
>,
label
:
<
a
>
生产领料出
库
</
a
>,
},
{
key
:
"two"
,
label
:
<
a
>
生产入
库
</
a
>,
label
:
<
a
>
销售出
库
</
a
>,
},
{
key
:
"three"
,
label
:
<
a
>
退料入
库
</
a
>,
label
:
<
a
>
报废出
库
</
a
>,
},
{
key
:
"four"
,
label
:
<
a
>
其他
入
库
</
a
>,
label
:
<
a
>
其他
出
库
</
a
>,
},
],
itemz
=
{
one
:
"
采购入
库"
,
two
:
"
生产入
库"
,
three
:
"
退料入
库"
,
four
:
"其他
入
库"
,
one
:
"
生产领料出
库"
,
two
:
"
销售出
库"
,
three
:
"
报废出
库"
,
four
:
"其他
出
库"
,
};
function
Instore
(
props
)
{
function
Outstore
(
props
)
{
const
{
initialState
,
setInitialState
}
=
useModel
(
"@@initialState"
);
const
[
activeTabKey
,
onTabChange
]
=
useState
(
"1"
);
const
[
selectKeys
,
setSelectKeys
]
=
useState
([]);
...
...
@@ -83,7 +85,6 @@ function Instore(props) {
const
mutiPrint
=
useReactToPrint
({
content
:
()
=>
mutiPrintRef
.
current
.
dom
.
current
,
});
const
PrintButton
=
(
<
Button
disabled=
{
!
selectKeys
.
length
}
...
...
@@ -113,7 +114,7 @@ function Instore(props) {
render
:
(
dom
,
record
)
=>
{
return
(
<
a
onClick=
{
async
()
=>
{
onClick=
{
()
=>
{
const
detail
=
defaultFields
.
detail
(
setSelectKeys
,
PrintButton
...
...
@@ -126,7 +127,7 @@ function Instore(props) {
title
:
`查看详情`
,
...
detail
,
totalPath
:
"/ngic-workmanship/wmsMaterie
Instore/getIn
StoreInfoById"
,
"/ngic-workmanship/wmsMaterie
Outstore/getOut
StoreInfoById"
,
totalParams
:
{
id
:
record
.
id
},
extra
:
(
<
Button
...
...
@@ -152,11 +153,7 @@ function Instore(props) {
valueType
:
"select"
,
options
:
[
{
label
:
"采购入库"
,
value
:
"1"
,
},
{
label
:
"生产入库"
,
label
:
"来料入库"
,
value
:
"2"
,
},
{
...
...
@@ -172,29 +169,17 @@ function Instore(props) {
{
title
:
"入库仓库"
,
dataIndex
:
"storeName"
,
search
:
false
,
key
:
"storeId"
,
fieldProps
:
{
allowClear
:
true
,
showSearch
:
true
,
},
options
:
{
database
:
()
=>
doFetch
({
url
:
"/ngic-auth/sysStore/selectionBox"
,
params
:
{
factoryIdList
:
[]
},
}),
params
:
{},
},
valueType
:
"select"
,
},
{
title
:
"相关单号"
,
dataIndex
:
"businessNo"
,
key
:
"businessNo"
,
},
{
title
:
"备注"
,
dataIndex
:
"remark"
,
search
:
false
,
key
:
"remark"
,
search
:
false
,
},
...
...
@@ -202,11 +187,12 @@ function Instore(props) {
title
:
"创建人"
,
dataIndex
:
"createUserName"
,
key
:
"createUserName"
,
search
:
false
,
},
{
title
:
"创建时间"
,
dataIndex
:
"createTime"
,
key
:
"createTime"
,
key
:
"createTime
List
"
,
valueType
:
"dateRange"
,
formItemProps
:
{
name
:
"createTimeList"
,
...
...
@@ -219,77 +205,23 @@ function Instore(props) {
valueType
:
"select"
,
options
:
[
{
label
:
"待
上
架"
,
label
:
"待
下
架"
,
value
:
"0"
,
},
{
label
:
"上架中"
,
value
:
"1"
,
label
:
"下架中"
,
value
:
"2"
,
},
{
label
:
"待分配"
,
value
:
"5"
,
},
{
label
:
"待执行"
,
value
:
"6"
,
},
],
},
{
title
:
"操作"
,
valueType
:
"option"
,
width
:
240
,
render
:
(
text
,
record
,
_
,
action
)
=>
{
return
[
getPrem
(
"equipmentCustomer_save"
,
action
,
"上架采集"
,
async
()
=>
{
let
extra
=
defaultFields
.
doinsert
(
record
.
id
,
record
.
storeId
);
setdrawprops
((
s
)
=>
({
...
s
,
visible
:
true
,
//查看详情 props
val
:
"detail"
,
title
:
`上架采集`
,
totalPath
:
"/ngic-workmanship/wmsMaterieInstore/getInStoreInfoById"
,
totalParams
:
{
id
:
record
.
id
},
extra
:
null
,
...
extra
,
}));
setInitialState
((
s
)
=>
{
return
{
...
s
,
submit
:
{},
};
});
}
),
getPrem
(
"equipmentCustomer_deleteById"
,
action
,
"关单"
,
null
,
{
title
:
"确认关单?"
,
onConfirm
:
()
=>
{
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieInstore/close"
,
params
:
{
id
:
record
.
id
},
}).
then
((
res
)
=>
{
if
(
res
.
code
==
"0000"
)
{
reload
();
}
});
},
}),
record
.
status
==
0
&&
getPrem
(
"equipmentCustomer_deleteById"
,
action
,
"删除"
,
null
,
{
title
:
"确认删除?"
,
onConfirm
:
()
=>
{
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieInstore/deleteById"
,
params
:
{
id
:
record
.
id
},
}).
then
((
res
)
=>
{
if
(
res
.
code
==
"0000"
)
{
reload
();
}
});
},
}),
];
},
},
];
}
else
{
return
[
...
...
@@ -301,17 +233,29 @@ function Instore(props) {
return
(
<
a
onClick=
{
()
=>
{
const
detail
=
defaultFields
.
detail
(
setSelectKeys
,
PrintButton
);
setdrawprops
((
s
)
=>
({
...
s
,
visible
:
true
,
//查看详情 props
val
:
"detail"
,
title
:
`查看详情`
,
...
de
faultFields
?.
de
tail
,
...
detail
,
totalPath
:
"/ngic-workmanship/wmsMaterie
InstoreHis/getIn
StoreInfoById"
,
"/ngic-workmanship/wmsMaterie
Outstore/getOut
StoreInfoById"
,
totalParams
:
{
id
:
record
.
id
},
extra
:
null
,
extra
:
(
<
Button
onClick=
{
async
()
=>
{
handlePrint
();
}
}
>
打印
</
Button
>
),
}));
}
}
>
...
...
@@ -327,11 +271,7 @@ function Instore(props) {
valueType
:
"select"
,
options
:
[
{
label
:
"采购入库"
,
value
:
"1"
,
},
{
label
:
"生产入库"
,
label
:
"来料入库"
,
value
:
"2"
,
},
{
...
...
@@ -347,29 +287,17 @@ function Instore(props) {
{
title
:
"入库仓库"
,
dataIndex
:
"storeName"
,
search
:
false
,
key
:
"storeId"
,
fieldProps
:
{
allowClear
:
true
,
showSearch
:
true
,
},
options
:
{
database
:
()
=>
doFetch
({
url
:
"/ngic-auth/sysStore/selectionBox"
,
params
:
{
factoryIdList
:
[]
},
}),
params
:
{},
},
valueType
:
"select"
,
},
{
title
:
"相关单号"
,
dataIndex
:
"businessNo"
,
key
:
"businessNo"
,
},
{
title
:
"备注"
,
dataIndex
:
"remark"
,
search
:
false
,
key
:
"remark"
,
search
:
false
,
},
...
...
@@ -377,11 +305,12 @@ function Instore(props) {
title
:
"创建人"
,
dataIndex
:
"createUserName"
,
key
:
"createUserName"
,
search
:
false
,
},
{
title
:
"创建时间"
,
dataIndex
:
"createTime"
,
key
:
"createTime"
,
key
:
"createTime
List
"
,
valueType
:
"dateRange"
,
formItemProps
:
{
name
:
"createTimeList"
,
...
...
@@ -390,6 +319,7 @@ function Instore(props) {
{
title
:
"完成时间"
,
dataIndex
:
"finishTime"
,
search
:
false
,
key
:
"finishTime"
,
valueType
:
"dateRange"
,
formItemProps
:
{
...
...
@@ -402,14 +332,14 @@ function Instore(props) {
key
:
"status"
,
valueType
:
"select"
,
options
:
[
{
label
:
"已上架"
,
value
:
"2"
,
},
{
label
:
"已关单"
,
value
:
"4"
,
},
{
label
:
"已完成"
,
value
:
"8"
,
},
],
},
];
...
...
@@ -418,32 +348,32 @@ function Instore(props) {
const
tableprops
=
{
...
props
,
pageextra
:
activeTabKey
==
"1"
?
(
<
Dropdown
placement=
"bottomRight"
overlay=
{
<
Menu
onClick=
{
(
e
)
=>
{
setdrawprops
((
s
)
=>
({
...
s
,
visible
:
true
,
title
:
"新增"
+
itemz
[
e
.
key
],
fields
:
defaultFields
[
e
.
key
],
in
storeType
:
keytoval
[
e
.
key
],
val
:
"add"
,
//类型
extra
:
null
,
}));
}
}
items=
{
items
}
/>
}
>
<
Button
type=
"primary"
>
新增
</
Button
>
</
Dropdown
>
)
:
(
"none"
),
//
pageextra:
//
activeTabKey == "1" ? (
//
<Dropdown
//
placement="bottomRight"
//
overlay={
//
<Menu
//
onClick={(e) => {
//
setdrawprops((s) => ({
//
...s,
//
visible: true,
//
title: "新增" + itemz[e.key],
//
fields: defaultFields[e.key],
// out
storeType: keytoval[e.key],
//
val: "add", //类型
//
extra: null,
//
}));
//
}}
//
items={items}
//
/>
//
}
//
>
//
<Button type="primary">新增</Button>
//
</Dropdown>
//
) : (
//
"none"
//
),
tabList
:
[
{
tab
:
"未完成"
,
...
...
@@ -465,14 +395,12 @@ function Instore(props) {
return
(
<
div
>
<
div
style=
{
{
position
:
"fixed"
,
bottom
:
-
100000
}
}
>
<
div
style=
{
{
position
:
"fixed"
,
bottom
:
-
100000
}
}
>
<
PrintDom
ref=
{
printRef
}
{
...
drawprops
}
/>
</
div
>
<
div
style=
{
{
display
:
"none"
}
}
>
<
PrintQrCode
ref=
{
mutiPrintRef
}
selectedItems=
{
selectKeys
}
/>
</
div
>
<
AutoTable
{
...
tableprops
}
actionRef=
{
actionRef
}
...
...
@@ -482,19 +410,131 @@ function Instore(props) {
{
...
drawprops
}
submitData=
{
async
(
value
)
=>
{
if
(
drawprops
.
val
==
"add"
)
{
let
newfileds
=
JSON
.
parse
(
JSON
.
stringify
(
value
));
newfileds
.
materialList
=
newfileds
?.
materialList
?.
map
((
it
)
=>
{
delete
it
.
usableNum
;
delete
it
.
id
;
return
it
;
});
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/wmsMaterie
Instore/saveIn
Store"
,
params
:
{
...
value
,
instoreType
:
drawprops
.
in
storeType
},
url
:
"/ngic-workmanship/wmsMaterie
Outstore/saveOut
Store"
,
params
:
{
...
newfileds
,
outstoreType
:
drawprops
.
out
storeType
},
});
if
(
res
.
code
==
"0000"
)
{
reload
();
}
}
}
}
onChange=
{
async
(
changedValues
,
allValues
)
=>
{
for
(
let
i
in
changedValues
)
{
if
(
i
==
"storeId"
)
{
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieStockStore/selectbox/usableStock"
,
params
:
{
storeId
:
changedValues
[
"storeId"
]
},
}),
options
=
res
?.
data
?.
dataList
;
setdrawprops
((
s
)
=>
{
let
fields
=
JSON
.
parse
(
JSON
.
stringify
(
s
.
fields
));
for
(
let
i
in
fields
)
{
fields
[
i
].
value
=
allValues
[
i
];
}
fields
[
"materialList"
].
linkconfig
=
{
urlchangeval
:
{
//根据url接口 改变某个value
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieStockStore/queryStoreOne"
,
params
,
}),
params
:
{
materieId
:
"linked"
,
storeId
:
changedValues
[
i
]
},
effectresult
:
{
productionUnit
:
"productionUnit"
,
//key 为列表更新值 value为response 返回值
productionUnitName
:
"productionUnitName"
,
usableNum
:
"usableNum"
,
outstroeNum
:
"outstroeNum"
,
},
},
};
fields
[
"materialList"
].
columns
=
[
{
title
:
(
<
span
>
物料编码-名称
<
b
style=
{
{
color
:
"red"
}
}
>
*
</
b
>
</
span
>
),
dataIndex
:
"materieId"
,
key
:
"materieId"
,
valueType
:
"select"
,
fieldProps
:
{
allowClear
:
true
,
showSearch
:
true
,
options
,
},
formItemProps
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
"此项为必填项"
}],
};
},
editable
:
true
,
},
{
title
:
(
<
span
>
出库数量
<
b
style=
{
{
color
:
"red"
}
}
>
*
</
b
>
</
span
>
),
dataIndex
:
"outstroeNum"
,
key
:
"outstroeNum"
,
formItemProps
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
"此项为必填项"
}],
};
},
valueType
:
"digit"
,
fieldProps
:
{
precision
:
3
,
},
editable
:
true
,
},
{
title
:
"可用库存"
,
dataIndex
:
"usableNum"
,
key
:
"usableNum"
,
readonly
:
"usableNum"
,
},
{
title
:
"库存单位"
,
dataIndex
:
"productionUnitName"
,
key
:
"productionUnitName"
,
readonly
:
"productionUnitName"
,
},
{
title
:
"操作"
,
valueType
:
"option"
,
width
:
70
,
render
:
(
text
,
record
,
_
,
action
)
=>
[
<
a
key=
"delete"
onClick=
{
()
=>
{}
}
>
删除
</
a
>,
],
},
];
fields
[
"materialList"
].
value
=
undefined
;
let
newfields
=
{
...
fields
,
};
return
{
...
s
,
fields
:
newfields
,
};
});
}
}
}
}
reload=
{
reload
}
/>
</
div
>
);
}
export
default
In
store
;
export
default
Out
store
;
This diff is collapsed.
Click to expand it.
src/pages/insertstore/Instore/printdom.jsx
View file @
673a770f
...
...
@@ -53,28 +53,13 @@ let columns = [
key
:
"materieName"
,
search
:
false
,
render
:
(
dom
,
row
)
=>
{
return
(
row
.
materieCode
??
"
"
)
+
" - "
+
(
row
.
materieName
??
""
);
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"
,
title
:
"出库数量"
,
dataIndex
:
"outstroeNum"
,
key
:
"outstroeNum"
,
search
:
false
,
},
{
...
...
@@ -82,10 +67,12 @@ let columns = [
dataIndex
:
"productionUnitName"
,
key
:
"productionUnitName"
,
search
:
false
,
width
:
60
,
},
];
function
PrintDom
({
totalPath
,
val
,
totalParams
,
totalCard
},
ref
)
{
console
.
log
(
totalCard
);
let
printRef
=
useRef
();
const
[
data
,
setdata
]
=
useState
({});
useImperativeHandle
(
ref
,
()
=>
({
...
...
@@ -95,7 +82,9 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
useEffect
(()
=>
{
if
(
val
==
"detail"
)
{
doFetch
({
url
:
totalPath
,
params
:
totalParams
}).
then
((
res
)
=>
{
setdata
(
res
?.
data
?.
data
);
if
(
res
.
code
==
"0000"
)
{
setdata
(
res
?.
data
?.
data
);
}
});
}
else
{
}
...
...
@@ -141,9 +130,10 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
style=
{
{
width
:
"100%"
,
fontSize
:
40
,
marginTop
:
"-6px"
,
}
}
>
入
库工单
出
库工单
</
h1
>
<
img
style=
{
{
...
...
@@ -154,12 +144,12 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
alt=
""
/>
</
div
>
<
div
style=
{
{
display
:
"flex"
,
flexWrap
:
"wrap"
,
paddingLeft
:
"2%"
,
marginTop
:
24
,
}
}
>
{
totalCard
&&
...
...
@@ -175,7 +165,7 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
marginBottom
:
10
,
padding
:
"4px"
,
fontSize
:
20
,
overflow
:
"
inherit
"
,
overflow
:
"
hidden
"
,
}
}
>
<
b
>
{
it
.
title
}
:
</
b
>
...
...
@@ -184,7 +174,6 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
);
})
}
</
div
>
<
div
style=
{
{
padding
:
"4px 2%"
,
...
...
This diff is collapsed.
Click to expand it.
src/pages/insertstore/Otherinstore/fields.js
0 → 100644
View file @
673a770f
import
{
factorySelect
,
shopSelectByFactory
}
from
"@/services/system"
;
import
{
doFetch
}
from
"@/utils/doFetch"
;
import
{
Button
,
Table
}
from
"antd"
;
import
{
EditableProTable
}
from
"@ant-design/pro-table"
;
import
{
useEffect
,
useState
}
from
'react'
import
{
useModel
}
from
'umi'
const
EditUpload
=
({
record
,
fid
,
storeId
})
=>
{
const
[
value
,
setvalue
]
=
useState
({
[
record
.
id
]:
record
.
uploadList
});
const
{
initialState
,
setInitialState
}
=
useModel
(
"@@initialState"
);
useEffect
(()
=>
{
if
(
!
value
)
{
return
}
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
{
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
rowKey
=
{
"id"
}
maxLength
=
{
1000
}
style
=
{{
marginLeft
:
48
}}
columns
=
{[
{
title
:
<
span
>
库位名称
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
dataIndex
:
"storePositionName"
,
key
:
"storePositionId"
,
search
:
false
,
valueType
:
"select"
,
request
:
async
(
params
)
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-auth/sysStorePosition/queryByStoreId/selection"
,
params
:
{
storeId
:
params
.
storeId
}
});
return
res
?.
data
?.
dataList
},
editable
:
(
text
,
record
,
index
)
=>
{
return
!
record
.
materieOutstoreDetailId
},
params
:
{
storeId
:
storeId
},
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
},
{
title
:
<
span
>
上架数量
<
b
style
=
{{
color
:
"red"
}}
>*<
/b></
span
>
,
dataIndex
:
"instroeNum"
,
key
:
"instroeNum"
,
search
:
false
,
editable
:
(
text
,
record
,
index
)
=>
{
return
!
record
.
materieOutstoreDetailId
},
valueType
:
"digit"
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
},
{
title
:
"备注"
,
dataIndex
:
"remark"
,
key
:
"remark"
,
search
:
false
,
editable
:
(
text
,
record
,
index
)
=>
{
return
!
record
.
materieOutstoreDetailId
}
},
{
title
:
"操作"
,
valueType
:
"option"
,
width
:
70
,
render
:
(
text
,
record
,
_
,
action
)
=>
[
typeof
(
record
.
id
)
==
"number"
&&
<
a
key
=
"delete"
onClick
=
{()
=>
{
}}
>
删除
<
/a>
,
],
}
]}
value
=
{
value
[
record
.
id
]}
recordCreatorProps
=
{{
newRecordType
:
"dataSource"
,
record
:
()
=>
({
id
:
Date
.
now
(),
}),
}}
editable
=
{{
type
:
"multiple"
,
actionRender
:
(
row
,
config
,
defaultDoms
)
=>
{
return
[
defaultDoms
.
delete
];
},
onValuesChange
:
async
(
records
,
recordList
)
=>
{
setvalue
(
s
=>
{
return
({
...
s
,
[
record
.
id
]:
recordList
})
});
},
}}
pagination
=
{
false
}
/
>
}
const
one
=
{
"materieInstoreNo"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"入库单号"
,
"name"
:
[
"materieInstoreNo"
],
"required"
:
false
,
placeholder
:
"不填写系统自动生成"
},
"storeId"
:
{
"value"
:
null
,
"type"
:
"select"
,
"title"
:
"入库仓库"
,
"name"
:
[
"storeId"
],
"required"
:
true
,
"options"
:
{
database
:
()
=>
doFetch
({
url
:
"/ngic-auth/sysStore/selectionBox"
,
params
:
{
factoryIdList
:
[]
}
}),
params
:
{}
},
},
"supplierId"
:
{
"value"
:
null
,
"type"
:
"select"
,
"title"
:
"供应商"
,
"name"
:
[
"supplierId"
],
"required"
:
true
,
"options"
:
{
database
:
()
=>
doFetch
({
url
:
"/ngic-auth/sysSupplier/query/selection"
,
params
:
{}
}),
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"
,
"materieControlNo"
:
"materialCode"
,
"instroeNum"
:
"instroeNum"
}
}
},
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
:
true
,
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"
,
valueType
:
"digit"
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
}
},
{
"title"
:
"库存单位"
,
"dataIndex"
:
"productionUnitName"
,
"key"
:
"productionUnitName"
,
"readonly"
:
'productionUnitName'
,
"width"
:
88
},
{
title
:
"操作"
,
valueType
:
"option"
,
width
:
70
,
render
:
(
text
,
record
,
_
,
action
)
=>
[
<
a
key
=
"delete"
onClick
=
{()
=>
{
}}
>
删除
<
/a>
,
],
},
],
rowKey
:
"id"
,
}
},
two
=
{
"materieInstoreNo"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"入库单号"
,
"name"
:
[
"materieInstoreNo"
],
"required"
:
false
,
placeholder
:
"不填写系统自动生成"
},
"storeId"
:
{
"value"
:
null
,
"type"
:
"select"
,
"title"
:
"入库仓库"
,
"name"
:
[
"storeId"
],
"required"
:
true
,
"options"
:
{
database
:
()
=>
doFetch
({
url
:
"/ngic-auth/sysStore/selectionBox"
,
params
:
{
factoryIdList
:
[]
}
}),
params
:
{}
},
},
"supplierId"
:
{
"value"
:
"2022070124566476657"
,
"type"
:
"select"
,
"title"
:
"供应商"
,
"name"
:
[
"supplierId"
],
"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"
,
"materieControlNo"
:
"materialCode"
,
"instroeNum"
:
"instroeNum"
}
}
},
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
:
true
,
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
:
'此项为必填项'
}],
};
},
valueType
:
"digit"
},
{
"title"
:
"库存单位"
,
"dataIndex"
:
"productionUnitName"
,
"key"
:
"productionUnitName"
,
"readonly"
:
'productionUnitName'
,
"width"
:
88
},
{
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
,
placeholder
:
"不填写系统自动生成"
},
"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"
,
"materieControlNo"
:
"materialCode"
,
"instroeNum"
:
"instroeNum"
,
"supplierId"
:
"supplierId"
}
}
},
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
:
true
,
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
:
true
,
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
:
'此项为必填项'
}],
};
},
valueType
:
"digit"
},
{
"title"
:
"库存单位"
,
"dataIndex"
:
"productionUnitName"
,
"key"
:
"productionUnitName"
,
"readonly"
:
'productionUnitName'
,
"width"
:
88
},
{
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
,
placeholder
:
"不填写系统自动生成"
},
"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"
,
"materieControlNo"
:
"materialCode"
,
"instroeNum"
:
"instroeNum"
,
"supplierId"
:
"supplierId"
}
}
},
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
:
true
,
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
:
true
,
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
:
'此项为必填项'
}],
};
},
valueType
:
"digit"
},
{
"title"
:
"库存单位"
,
"dataIndex"
:
"productionUnitName"
,
"key"
:
"productionUnitName"
,
"readonly"
:
'productionUnitName'
,
"width"
:
88
},
{
title
:
"操作"
,
valueType
:
"option"
,
width
:
70
,
render
:
(
text
,
record
,
_
,
action
)
=>
[
<
a
key
=
"delete"
onClick
=
{()
=>
{
}}
>
删除
<
/a>
,
],
},
],
rowKey
:
"id"
,
}
},
detail
=
(
setselected
,
dom
)
=>
({
totalCard
:
[
//物料详情
{
cardTitle
:
"基本信息"
,
itemData
:
[
{
title
:
"入库单号"
,
key
:
"materieInstoreNo"
,
},
{
title
:
"入库类型"
,
key
:
"instoreTypeName"
,
},
{
title
:
"入库仓库"
,
key
:
"storeName"
,
},
{
title
:
"相关单号"
,
key
:
"businessNo"
,
},
{
title
:
"创建人"
,
key
:
"createUserName"
,
},
{
title
:
"创建时间"
,
key
:
"createTime"
,
},
{
title
:
"状态"
,
key
:
"statusName"
,
},
{
title
:
"完成时间"
,
key
:
"finishTime"
,
},
{
title
:
"备注"
,
key
:
"remark"
,
noshow
:
"100%"
,
},
{
title
:
"工单条形码"
,
noshow
:
true
,
key
:
"qrCodeUrl"
,
type
:
"img"
,
width
:
100
,
},
],
},
{
cardTitle
:
"物料信息列表"
,
extraContent
:
dom
,
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
:
"remainderNums"
,
key
:
"remainderNums"
,
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
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
},
{
title
:
"上架数量"
,
dataIndex
:
"instroeNum"
,
key
:
"instroeNum"
,
search
:
false
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
}
]}
dataSource
=
{
record
.
uploadList
}
pagination
=
{
false
}
/>
,
},
pagination
:
"false"
,
rowKey
:
"id"
,
rowSelection
:
{
onChange
:
(
selectedRowKeys
,
selectedRows
)
=>
{
setselected
(
selectedRows
)
},
}
},
],
},
{
cardTitle
:
"强制关单信息"
,
itemData
:
[
{
title
:
"关单人"
,
key
:
"closeUserName"
,
},
{
title
:
"关单时间"
,
key
:
"closeTime"
,
}
],
},
{
cardTitle
:
"上架明细"
,
noPrint
:
true
,
itemData
:
[
{
key
:
"materialUploadList"
,
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
:
{
defaultExpandAllRows
:
true
,
expandedRowRender
:
record
=>
<
Table
style
=
{{
marginLeft
:
48
}}
columns
=
{[
{
title
:
"库位名称"
,
dataIndex
:
"storePositionName"
,
key
:
"storePositionName"
,
search
:
false
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
},
{
title
:
"上架数量"
,
dataIndex
:
"instroeNum"
,
key
:
"instroeNum"
,
search
:
false
,
"formItemProps"
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}],
};
},
}
,
{
title
:
"备注"
,
dataIndex
:
"remark"
,
key
:
"remark"
,
search
:
false
,
}
,
{
title
:
"操作人"
,
dataIndex
:
"uploadUserName"
,
key
:
"uploadUserName"
,
search
:
false
,
}
,
{
title
:
"操作时间"
,
dataIndex
:
"uploadTime"
,
key
:
"uploadTime"
,
search
:
false
,
}
]}
dataSource
=
{
record
.
uploadList
}
pagination
=
{
false
}
/>
,
},
pagination
:
"false"
},
],
},
]
}),
doinsert
=
(
fid
,
storeId
)
=>
({
totalCard
:
[
//物料详情
{
cardTitle
:
"基本信息"
,
itemData
:
[
{
title
:
"入库单号"
,
key
:
"materieInstoreNo"
,
},
{
title
:
"入库类型"
,
key
:
"instoreTypeName"
,
},
{
title
:
"入库仓库"
,
key
:
"storeName"
,
},
{
title
:
"相关单号"
,
key
:
"businessNo"
,
},
{
title
:
"备注"
,
key
:
"remark"
,
},
{
title
:
"创建人"
,
key
:
"createUserName"
,
},
{
title
:
"创建时间"
,
key
:
"createTime"
,
},
{
title
:
"状态"
,
key
:
"statusName"
,
}
],
},
{
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
:
"remainderNums"
,
key
:
"remainderNums"
,
search
:
false
,
},
{
title
:
"库存单位"
,
dataIndex
:
"productionUnitName"
,
key
:
"productionUnitName"
,
search
:
false
,
},
],
expandable
:
{
expandedRowRender
:
record
=>
<
EditUpload
record
=
{
record
}
fid
=
{
fid
}
storeId
=
{
storeId
}
/>
,
},
rowKey
:
"id"
},
],
},
]
});
export
default
{
one
,
two
,
three
,
four
,
detail
,
doinsert
};
This diff is collapsed.
Click to expand it.
src/pages/insertstore/Otherinstore/index.jsx
0 → 100644
View file @
673a770f
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
import
{
useReactToPrint
}
from
"react-to-print"
;
import
{
useModel
}
from
"umi"
;
import
PrintDom
from
"./printdom"
;
import
{
PrintQrCode
}
from
"@/components/PrintCode"
;
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
>,
},
],
itemz
=
{
one
:
"采购入库"
,
two
:
"生产入库"
,
three
:
"退料入库"
,
four
:
"其他入库"
,
};
const
defaultFields
=
{
four
:
{
materieInstoreNo
:
{
value
:
null
,
type
:
"input"
,
title
:
"入库单号"
,
name
:
[
"materieInstoreNo"
],
required
:
false
,
placeholder
:
"不填写系统自动生成"
,
},
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"
,
materieControlNo
:
"materialCode"
,
instroeNum
:
"instroeNum"
,
supplierId
:
"supplierId"
,
},
},
},
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
:
true
,
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
:
true
,
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
:
"此项为必填项"
}],
};
},
valueType
:
"digit"
,
},
{
title
:
"库存单位"
,
dataIndex
:
"productionUnitName"
,
key
:
"productionUnitName"
,
readonly
:
"productionUnitName"
,
width
:
88
,
},
{
title
:
"操作"
,
valueType
:
"option"
,
width
:
70
,
render
:
(
text
,
record
,
_
,
action
)
=>
[
<
a
key=
"delete"
onClick=
{
()
=>
{}
}
>
删除
</
a
>,
],
},
],
rowKey
:
"id"
,
},
},
detail
:
(
setselected
,
dom
)
=>
({
totalCard
:
[
//物料详情
{
cardTitle
:
"基本信息"
,
itemData
:
[
{
title
:
"入库单号"
,
key
:
"materieInstoreNo"
,
},
{
title
:
"入库类型"
,
key
:
"instoreTypeName"
,
},
{
title
:
"入库仓库"
,
key
:
"storeName"
,
},
{
title
:
"相关单号"
,
key
:
"businessNo"
,
},
{
title
:
"创建人"
,
key
:
"createUserName"
,
},
{
title
:
"创建时间"
,
key
:
"createTime"
,
},
{
title
:
"状态"
,
key
:
"statusName"
,
},
{
title
:
"完成时间"
,
key
:
"finishTime"
,
},
{
title
:
"备注"
,
key
:
"remark"
,
noshow
:
"100%"
,
},
{
title
:
"工单条形码"
,
noshow
:
true
,
key
:
"qrCodeUrl"
,
type
:
"img"
,
width
:
100
,
},
],
},
{
cardTitle
:
"物料信息列表"
,
extraContent
:
dom
,
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
:
"remainderNums"
,
key
:
"remainderNums"
,
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
,
formItemProps
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
"此项为必填项"
}],
};
},
},
{
title
:
"上架数量"
,
dataIndex
:
"instroeNum"
,
key
:
"instroeNum"
,
search
:
false
,
formItemProps
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
"此项为必填项"
}],
};
},
},
]
}
dataSource=
{
record
.
uploadList
}
pagination=
{
false
}
/>
),
},
pagination
:
"false"
,
rowKey
:
"id"
,
rowSelection
:
{
onChange
:
(
selectedRowKeys
,
selectedRows
)
=>
{
setselected
(
selectedRows
);
},
},
},
],
},
{
cardTitle
:
"强制关单信息"
,
itemData
:
[
{
title
:
"关单人"
,
key
:
"closeUserName"
,
},
{
title
:
"关单时间"
,
key
:
"closeTime"
,
},
],
},
{
cardTitle
:
"上架明细"
,
noPrint
:
true
,
itemData
:
[
{
key
:
"materialUploadList"
,
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
:
{
defaultExpandAllRows
:
true
,
expandedRowRender
:
(
record
)
=>
(
<
Table
style=
{
{
marginLeft
:
48
}
}
columns=
{
[
{
title
:
"库位名称"
,
dataIndex
:
"storePositionName"
,
key
:
"storePositionName"
,
search
:
false
,
formItemProps
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
"此项为必填项"
}],
};
},
},
{
title
:
"上架数量"
,
dataIndex
:
"instroeNum"
,
key
:
"instroeNum"
,
search
:
false
,
formItemProps
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
"此项为必填项"
}],
};
},
},
{
title
:
"备注"
,
dataIndex
:
"remark"
,
key
:
"remark"
,
search
:
false
,
},
{
title
:
"操作人"
,
dataIndex
:
"uploadUserName"
,
key
:
"uploadUserName"
,
search
:
false
,
},
{
title
:
"操作时间"
,
dataIndex
:
"uploadTime"
,
key
:
"uploadTime"
,
search
:
false
,
},
]
}
dataSource=
{
record
.
uploadList
}
pagination=
{
false
}
/>
),
},
pagination
:
"false"
,
},
],
},
],
}),
doinsert
:
(
fid
,
storeId
)
=>
({
totalCard
:
[
//物料详情
{
cardTitle
:
"基本信息"
,
itemData
:
[
{
title
:
"入库单号"
,
key
:
"materieInstoreNo"
,
},
{
title
:
"入库类型"
,
key
:
"instoreTypeName"
,
},
{
title
:
"入库仓库"
,
key
:
"storeName"
,
},
{
title
:
"相关单号"
,
key
:
"businessNo"
,
},
{
title
:
"备注"
,
key
:
"remark"
,
},
{
title
:
"创建人"
,
key
:
"createUserName"
,
},
{
title
:
"创建时间"
,
key
:
"createTime"
,
},
{
title
:
"状态"
,
key
:
"statusName"
,
},
],
},
{
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
:
"remainderNums"
,
key
:
"remainderNums"
,
search
:
false
,
},
{
title
:
"库存单位"
,
dataIndex
:
"productionUnitName"
,
key
:
"productionUnitName"
,
search
:
false
,
},
],
expandable
:
{
expandedRowRender
:
(
record
)
=>
(
<
EditUpload
record=
{
record
}
fid=
{
fid
}
storeId=
{
storeId
}
/>
),
},
rowKey
:
"id"
,
},
],
},
],
}),
};
function
Instore
(
props
)
{
const
{
initialState
,
setInitialState
}
=
useModel
(
"@@initialState"
);
const
[
activeTabKey
,
onTabChange
]
=
useState
(
"1"
);
const
[
selectKeys
,
setSelectKeys
]
=
useState
([]);
let
[
drawprops
,
setdrawprops
]
=
useState
({
title
:
""
,
visible
:
false
,
onClose
:
()
=>
{
setdrawprops
((
s
)
=>
({
...
s
,
visible
:
false
,
fields
:
{},
}));
},
fields
:
{},
width
:
1200
,
}),
actionRef
=
useRef
(),
ChildRef
=
null
,
printRef
=
useRef
(),
mutiPrintRef
=
useRef
();
//操作完成后刷新
function
reload
()
{
actionRef
.
current
.
reload
();
ChildRef
?.
onRefresh
();
message
.
success
(
"操作成功"
);
setdrawprops
((
s
)
=>
({
...
s
,
visible
:
false
,
fields
:
{},
}));
}
const
handlePrint
=
useReactToPrint
({
content
:
()
=>
printRef
.
current
.
dom
.
current
,
});
const
mutiPrint
=
useReactToPrint
({
content
:
()
=>
mutiPrintRef
.
current
.
dom
.
current
,
});
const
PrintButton
=
(
<
Button
disabled=
{
!
selectKeys
.
length
}
onClick=
{
()
=>
{
mutiPrint
();
}
}
>
打印
</
Button
>
);
useEffect
(()
=>
{
const
detail
=
defaultFields
.
detail
(
setSelectKeys
,
PrintButton
);
setdrawprops
((
s
)
=>
({
...
s
,
...
detail
,
}));
},
[
selectKeys
]);
const
columns
=
useMemo
(()
=>
{
if
(
activeTabKey
==
"1"
)
{
return
[
{
title
:
"入库单号"
,
dataIndex
:
"materieInstoreNo"
,
key
:
"materieInstoreNo"
,
render
:
(
dom
,
record
)
=>
{
return
(
<
a
onClick=
{
async
()
=>
{
const
detail
=
defaultFields
.
detail
(
setSelectKeys
,
PrintButton
);
setdrawprops
((
s
)
=>
({
...
s
,
visible
:
true
,
//查看详情 props
val
:
"detail"
,
title
:
`查看详情`
,
...
detail
,
totalPath
:
"/ngic-workmanship/wmsMaterieInstore/getInStoreInfoById"
,
totalParams
:
{
id
:
record
.
id
},
extra
:
(
<
Button
onClick=
{
async
()
=>
{
handlePrint
();
}
}
>
打印
</
Button
>
),
}));
}
}
>
{
dom
}
</
a
>
);
},
},
{
title
:
"入库类型"
,
dataIndex
:
"instoreTypeName"
,
key
:
"instoreType"
,
valueType
:
"select"
,
options
:
[
{
label
:
"采购入库"
,
value
:
"1"
,
},
{
label
:
"生产入库"
,
value
:
"2"
,
},
{
label
:
"退料入库"
,
value
:
"3"
,
},
{
label
:
"其他入库"
,
value
:
"4"
,
},
],
},
{
title
:
"入库仓库"
,
dataIndex
:
"storeName"
,
key
:
"storeId"
,
fieldProps
:
{
allowClear
:
true
,
showSearch
:
true
,
},
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"
,
valueType
:
"dateRange"
,
formItemProps
:
{
name
:
"createTimeList"
,
},
},
{
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
()
=>
{
let
extra
=
defaultFields
.
doinsert
(
record
.
id
,
record
.
storeId
);
setdrawprops
((
s
)
=>
({
...
s
,
visible
:
true
,
//查看详情 props
val
:
"detail"
,
title
:
`上架采集`
,
totalPath
:
"/ngic-workmanship/wmsMaterieInstore/getInStoreInfoById"
,
totalParams
:
{
id
:
record
.
id
},
extra
:
null
,
...
extra
,
}));
setInitialState
((
s
)
=>
{
return
{
...
s
,
submit
:
{},
};
});
}
),
getPrem
(
"equipmentCustomer_deleteById"
,
action
,
"关单"
,
null
,
{
title
:
"确认关单?"
,
onConfirm
:
()
=>
{
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieInstore/close"
,
params
:
{
id
:
record
.
id
},
}).
then
((
res
)
=>
{
if
(
res
.
code
==
"0000"
)
{
reload
();
}
});
},
}),
record
.
status
==
0
&&
getPrem
(
"equipmentCustomer_deleteById"
,
action
,
"删除"
,
null
,
{
title
:
"确认删除?"
,
onConfirm
:
()
=>
{
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieInstore/deleteById"
,
params
:
{
id
:
record
.
id
},
}).
then
((
res
)
=>
{
if
(
res
.
code
==
"0000"
)
{
reload
();
}
});
},
}),
];
},
},
];
}
else
{
return
[
{
title
:
"入库单号"
,
dataIndex
:
"materieInstoreNo"
,
key
:
"materieInstoreNo"
,
render
:
(
dom
,
record
)
=>
{
return
(
<
a
onClick=
{
()
=>
{
setdrawprops
((
s
)
=>
({
...
s
,
visible
:
true
,
//查看详情 props
val
:
"detail"
,
title
:
`查看详情`
,
...
defaultFields
?.
detail
,
totalPath
:
"/ngic-workmanship/wmsMaterieInstoreHis/getInStoreInfoById"
,
totalParams
:
{
id
:
record
.
id
},
extra
:
null
,
}));
}
}
>
{
dom
}
</
a
>
);
},
},
{
title
:
"入库类型"
,
dataIndex
:
"instoreTypeName"
,
key
:
"instoreType"
,
valueType
:
"select"
,
options
:
[
{
label
:
"采购入库"
,
value
:
"1"
,
},
{
label
:
"生产入库"
,
value
:
"2"
,
},
{
label
:
"退料入库"
,
value
:
"3"
,
},
{
label
:
"其他入库"
,
value
:
"4"
,
},
],
},
{
title
:
"入库仓库"
,
dataIndex
:
"storeName"
,
key
:
"storeId"
,
fieldProps
:
{
allowClear
:
true
,
showSearch
:
true
,
},
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"
,
valueType
:
"dateRange"
,
formItemProps
:
{
name
:
"createTimeList"
,
},
},
{
title
:
"完成时间"
,
dataIndex
:
"finishTime"
,
key
:
"finishTime"
,
valueType
:
"dateRange"
,
formItemProps
:
{
name
:
"finishTimeList"
,
},
},
{
title
:
"状态"
,
dataIndex
:
"statusName"
,
key
:
"status"
,
valueType
:
"select"
,
options
:
[
{
label
:
"已上架"
,
value
:
"2"
,
},
{
label
:
"已关单"
,
value
:
"4"
,
},
],
},
];
}
},
[
activeTabKey
]);
const
tableprops
=
{
...
props
,
pageextra
:
activeTabKey
==
"1"
?
(
<
Button
type=
"primary"
onClick=
{
(
e
)
=>
{
setdrawprops
((
s
)
=>
({
...
s
,
visible
:
true
,
title
:
"新增"
+
itemz
[
"four"
],
fields
:
defaultFields
[
"four"
],
instoreType
:
keytoval
[
"four"
],
val
:
"add"
,
//类型
extra
:
null
,
}));
}
}
>
新增
</
Button
>
)
:
(
"none"
),
tabList
:
[
{
tab
:
"未完成"
,
key
:
"1"
,
},
{
tab
:
"已完成"
,
key
:
"2"
,
},
],
activeTabKey
,
onTabChange
,
columns
,
path
:
activeTabKey
==
"1"
?
"/ngic-workmanship/wmsMaterieInstore/queryList"
:
"/ngic-workmanship/wmsMaterieInstoreHis/queryList"
,
};
return
(
<
div
>
<
div
style=
{
{
position
:
"fixed"
,
bottom
:
-
100000
}
}
>
<
PrintDom
ref=
{
printRef
}
{
...
drawprops
}
/>
</
div
>
<
div
style=
{
{
display
:
"none"
}
}
>
<
PrintQrCode
ref=
{
mutiPrintRef
}
selectedItems=
{
selectKeys
}
/>
</
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/wmsMaterieInstore/saveInStore"
,
params
:
{
...
value
,
instoreType
:
drawprops
.
instoreType
},
});
if
(
res
.
code
==
"0000"
)
{
reload
();
}
}
}
}
reload=
{
reload
}
/>
</
div
>
);
}
export
default
Instore
;
This diff is collapsed.
Click to expand it.
src/pages/insertstore/Otherinstore/index.less
0 → 100644
View file @
673a770f
.sitelayout {
min-height: calc(100vh - 98px) !important;
.sitelayoutbackground {
background: #fff;
}
}
.title{
margin: 0px;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/pages/insertstore/Otherinstore/printdom.jsx
0 → 100644
View file @
673a770f
import
{
doFetch
}
from
"@/utils/doFetch"
;
import
React
,
{
useState
,
useImperativeHandle
,
forwardRef
,
useRef
,
}
from
"react"
;
import
{
useEffect
}
from
"react"
;
import
{
ScrollBoard
}
from
"@jiaminghi/data-view-react"
;
import
{
useWindowSize
}
from
"@/utils/windowsize"
;
const
pageStyle
=
`
@media all {
.page-break {
display: none;
}
}
@media print {
html, body {
height: initial !important;
overflow: initial !important;
position:relative;
-webkit-print-color-adjust: exact;
word-break: break-all;
}
}
@media print {
.page-break {
margin-top:0;
display: block;
page-break-before: auto;
}
}
@media print {
.page-noprint {
display: none !important;
}
}
@page {
size: auto;
margin: 0px;
}
`
;
let
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
,
},
];
function
PrintDom
({
totalPath
,
val
,
totalParams
,
totalCard
},
ref
)
{
let
printRef
=
useRef
();
const
[
data
,
setdata
]
=
useState
({});
useImperativeHandle
(
ref
,
()
=>
({
dom
:
printRef
,
}));
useEffect
(()
=>
{
if
(
val
==
"detail"
)
{
doFetch
({
url
:
totalPath
,
params
:
totalParams
}).
then
((
res
)
=>
{
setdata
(
res
?.
data
?.
data
);
});
}
else
{
}
},
[
val
]);
let
datas
=
data
?.
materialList
?
data
?.
materialList
.
map
((
it
)
=>
{
return
columns
.
map
((
item
)
=>
{
if
(
item
.
render
)
{
return
item
.
render
(
it
,
it
);
}
else
{
return
it
[
item
.
dataIndex
];
}
});
})
:
[];
return
(
<>
<
style
type=
"text/css"
media=
"print"
>
{
pageStyle
}
</
style
>
{
val
==
"detail"
&&
(
<
div
ref=
{
printRef
}
style=
{
{
width
:
"100%"
,
minHeight
:
"100%"
,
overflow
:
"inherit"
,
position
:
"relative"
,
}
}
>
<
div
style=
{
{
display
:
"flex"
,
justifyContent
:
"space-between"
,
alignItems
:
"center"
,
padding
:
"0 2%"
,
paddingBottom
:
12
,
}
}
>
<
h1
style=
{
{
width
:
"100%"
,
fontSize
:
40
,
}
}
>
入库工单
</
h1
>
<
img
style=
{
{
width
:
300
,
height
:
"auto"
,
}
}
src=
{
data
?.
qrCodeUrl
}
alt=
""
/>
</
div
>
<
div
style=
{
{
display
:
"flex"
,
flexWrap
:
"wrap"
,
paddingLeft
:
"2%"
,
}
}
>
{
totalCard
&&
totalCard
[
0
].
itemData
.
filter
((
it
)
=>
!
(
it
.
noshow
===
true
))
.
map
((
it
)
=>
{
return
(
<
div
style=
{
{
width
:
it
.
noshow
??
"32%"
,
backgroundColor
:
"#f9f9f9"
,
marginRight
:
"1%"
,
marginBottom
:
10
,
padding
:
"4px"
,
fontSize
:
20
,
overflow
:
"inherit"
,
}
}
>
<
b
>
{
it
.
title
}
:
</
b
>
<
span
>
{
data
[
it
.
key
]
||
"-"
}
</
span
>
</
div
>
);
})
}
</
div
>
<
div
style=
{
{
padding
:
"4px 2%"
,
position
:
"relative"
,
width
:
"100%"
,
overflow
:
"hidden"
,
}
}
id=
"large"
>
<
div
style=
{
{
marginBottom
:
18
,
}
}
>
<
b
>
{
totalCard
&&
totalCard
[
1
].
cardTitle
}
</
b
>
</
div
>
<
ScrollBoard
config=
{
{
header
:
columns
.
map
((
it
)
=>
it
.
title
),
data
:
datas
,
rowNum
:
datas
.
length
,
hoverPause
:
false
,
}
}
/>
</
div
>
</
div
>
)
}
</>
);
}
export
default
forwardRef
(
PrintDom
);
This diff is collapsed.
Click to expand it.
src/pages/outsetstore/Otheroutstore/index.jsx
View file @
673a770f
...
...
@@ -66,13 +66,6 @@ const defaultFields = {
params
:
{},
},
},
businessNo
:
{
value
:
null
,
type
:
"input"
,
title
:
"相关单号"
,
name
:
[
"businessNo"
],
required
:
false
,
},
remark
:
{
value
:
null
,
type
:
"textarea"
,
...
...
@@ -95,13 +88,13 @@ const defaultFields = {
//根据url接口 改变某个value
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/
wmsMaterieStockStore/queryStoreOne
"
,
url
:
"/ngic-workmanship/
pmMaterie/queryById
"
,
params
,
}),
params
:
{
materieId
:
"linked"
},
effectresult
:
{
productionUnit
:
"productionUnit
"
,
//key 为列表更新值 value为response 返回值
productionUnitName
:
"productionUnitName
"
,
specificationModel
:
"specificationModel
"
,
//key 为列表更新值 value为response 返回值
ironLoss
:
"ironLoss
"
,
usableNum
:
"usableNum"
,
outstroeNum
:
"outstroeNum"
,
},
...
...
@@ -117,13 +110,6 @@ const defaultFields = {
dataIndex
:
"materieId"
,
key
:
"materieId"
,
valueType
:
"select"
,
request
:
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/pmMaterie/selectboxByStoreId"
,
params
:
{
storeId
:
formRef
.
current
},
});
return
res
?.
data
?.
dataList
;
},
fieldProps
:
{
allowClear
:
true
,
showSearch
:
true
,
...
...
@@ -133,11 +119,36 @@ const defaultFields = {
rules
:
[{
required
:
true
,
message
:
"此项为必填项"
}],
};
},
editable
:
true
,
},
{
title
:
<
span
>
规格型号
</
span
>,
dataIndex
:
"specificationModel"
,
key
:
"specificationModel"
,
readonly
:
"specificationModel"
,
},
{
title
:
"铁损"
,
dataIndex
:
"ironLoss"
,
key
:
"ironLoss"
,
readonly
:
"ironLoss"
,
},
{
title
:
"片厚"
,
dataIndex
:
"sheetThickness"
,
key
:
"sheetThickness"
,
// readonly: "sheetThickness",
},
{
title
:
"牌号"
,
dataIndex
:
"shopSign"
,
key
:
"shopSign"
,
readonly
:
"shopSign"
,
},
{
title
:
(
<
span
>
出库数量
<
b
style=
{
{
color
:
"red"
}
}
>
*
</
b
>
出库数量
<
b
style=
{
{
color
:
"red"
}
}
>
*
</
b
>
</
span
>
),
dataIndex
:
"outstroeNum"
,
...
...
@@ -148,9 +159,6 @@ const defaultFields = {
};
},
valueType
:
"digit"
,
fieldProps
:
{
precision
:
3
,
},
},
{
title
:
"可用库存"
,
...
...
@@ -164,6 +172,7 @@ const defaultFields = {
key
:
"productionUnitName"
,
readonly
:
"productionUnitName"
,
},
{
title
:
"操作"
,
valueType
:
"option"
,
...
...
@@ -645,6 +654,7 @@ function Outstore(props) {
dataIndex
:
"outstoreTypeName"
,
key
:
"outstoreType"
,
valueType
:
"select"
,
search
:
false
,
options
:
[
{
label
:
"生产领料出库"
,
...
...
@@ -667,6 +677,7 @@ function Outstore(props) {
{
title
:
"出库仓库"
,
dataIndex
:
"storeName"
,
search
:
false
,
key
:
"storeId"
,
fieldProps
:
{
allowClear
:
true
,
...
...
@@ -682,11 +693,6 @@ function Outstore(props) {
},
valueType
:
"select"
,
},
{
title
:
"相关单号"
,
dataIndex
:
"businessNo"
,
key
:
"businessNo"
,
},
{
title
:
"备注"
,
dataIndex
:
"remark"
,
...
...
@@ -820,6 +826,7 @@ function Outstore(props) {
{
title
:
"出库类型"
,
dataIndex
:
"outstoreTypeName"
,
search
:
false
,
key
:
"outstoreType"
,
valueType
:
"select"
,
options
:
[
...
...
@@ -843,6 +850,7 @@ function Outstore(props) {
},
{
title
:
"出库仓库"
,
search
:
false
,
dataIndex
:
"storeName"
,
key
:
"storeId"
,
fieldProps
:
{
...
...
@@ -859,11 +867,7 @@ function Outstore(props) {
},
valueType
:
"select"
,
},
{
title
:
"相关单号"
,
dataIndex
:
"businessNo"
,
key
:
"businessNo"
,
},
{
title
:
"备注"
,
dataIndex
:
"remark"
,
...
...
@@ -887,6 +891,7 @@ function Outstore(props) {
{
title
:
"完成时间"
,
dataIndex
:
"finishTime"
,
search
:
false
,
key
:
"finishTime"
,
valueType
:
"dateRange"
,
formItemProps
:
{
...
...
@@ -896,18 +901,8 @@ function Outstore(props) {
{
title
:
"状态"
,
dataIndex
:
"statusName"
,
search
:
false
,
key
:
"status"
,
valueType
:
"select"
,
options
:
[
{
label
:
"已下架"
,
value
:
"2"
,
},
{
label
:
"已关单"
,
value
:
"4"
,
},
],
},
];
}
...
...
@@ -974,9 +969,10 @@ function Outstore(props) {
if
(
drawprops
.
val
==
"add"
)
{
let
newfileds
=
JSON
.
parse
(
JSON
.
stringify
(
value
));
newfileds
.
materialList
=
newfileds
?.
materialList
?.
map
((
it
)
=>
{
delete
it
.
usableNum
;
delete
it
.
id
;
return
it
;
return
{
materieId
:
it
?.
materieId
,
outstroeNum
:
it
?.
outstroeNum
,
};
});
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieOutstore/saveOutStore"
,
...
...
@@ -1005,15 +1001,19 @@ function Outstore(props) {
//根据url接口 改变某个value
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/
wmsMaterieStockStore/queryStoreOne
"
,
url
:
"/ngic-workmanship/
pmMaterie/queryById
"
,
params
,
}),
params
:
{
materieId
:
"linked"
,
storeId
:
changedValues
[
i
]
},
params
:
{
materieId
:
"linked"
},
effectresult
:
{
productionUnit
:
"productionUnit
"
,
//key 为列表更新值 value为response 返回值
productionUnitName
:
"productionUnitName
"
,
specificationModel
:
"specificationModel
"
,
//key 为列表更新值 value为response 返回值
ironLoss
:
"ironLoss
"
,
usableNum
:
"usableNum"
,
outstroeNum
:
"outstroeNum"
,
sheetThickness
:
"sheetThickness"
,
shopSign
:
"shopSign"
,
usableNum
:
"usableNum"
,
productionUnitName
:
"productionUnitName"
,
},
},
};
...
...
@@ -1039,10 +1039,34 @@ function Outstore(props) {
},
editable
:
true
,
},
{
title
:
<
span
>
规格型号
</
span
>,
dataIndex
:
"specificationModel"
,
key
:
"specificationModel"
,
readonly
:
"specificationModel"
,
},
{
title
:
"铁损"
,
dataIndex
:
"ironLoss"
,
key
:
"ironLoss"
,
readonly
:
"ironLoss"
,
},
{
title
:
"片厚"
,
dataIndex
:
"sheetThickness"
,
key
:
"sheetThickness"
,
readonly
:
"sheetThickness"
,
},
{
title
:
"牌号"
,
dataIndex
:
"shopSign"
,
key
:
"shopSign"
,
readonly
:
"shopSign"
,
},
{
title
:
(
<
span
>
出库数量
<
b
style=
{
{
color
:
"red"
}
}
>
*
</
b
>
出库数量
<
b
style=
{
{
color
:
"red"
}
}
>
*
</
b
>
</
span
>
),
dataIndex
:
"outstroeNum"
,
...
...
@@ -1053,10 +1077,6 @@ function Outstore(props) {
};
},
valueType
:
"digit"
,
fieldProps
:
{
precision
:
3
,
},
editable
:
true
,
},
{
title
:
"可用库存"
,
...
...
@@ -1070,6 +1090,7 @@ function Outstore(props) {
key
:
"productionUnitName"
,
readonly
:
"productionUnitName"
,
},
{
title
:
"操作"
,
valueType
:
"option"
,
...
...
@@ -1085,6 +1106,7 @@ function Outstore(props) {
let
newfields
=
{
...
fields
,
};
console
.
log
(
"123123123131"
,
newfields
);
return
{
...
s
,
fields
:
newfields
,
...
...
This diff is collapsed.
Click to expand it.
src/pages/user/Login/index.jsx
View file @
673a770f
...
...
@@ -6,7 +6,7 @@ import {
CloseOutlined
,
}
from
"@ant-design/icons"
;
import
{
Alert
,
message
,
Tabs
,
Row
,
Col
,
Button
,
Input
}
from
"antd"
;
import
React
,
{
useState
,
useRef
}
from
"react"
;
import
React
,
{
useState
,
useRef
,
useEffect
,
useLayoutEffect
}
from
"react"
;
import
{
ProFormCaptcha
,
ProFormCheckbox
,
...
...
@@ -38,7 +38,6 @@ import {
import
{
doFetch
}
from
"@/utils/doFetch"
;
import
{
ProDescriptions
}
from
"@ant-design/pro-components"
;
const
{
Search
}
=
Input
;
const
{
TabPane
}
=
Tabs
;
...
...
@@ -92,6 +91,20 @@ const Login = () => {
const
{
query
}
=
history
.
location
;
const
{
redirect
}
=
query
;
history
.
push
(
redirect
||
"/"
);
try
{
var
LODOP
=
window
.
getLodop
();
if
(
LODOP
.
VERSION
)
{
if
(
LODOP
.
CVERSION
)
alert
(
"当前有WEB打印服务C-Lodop可用!
\n
C-Lodop版本:"
+
LODOP
.
CVERSION
+
"(内含Lodop"
+
LODOP
.
VERSION
+
")"
);
else
alert
(
"本机已成功安装了Lodop控件!
\n
版本号:"
+
LODOP
.
VERSION
);
}
}
catch
(
err
)
{}
return
;
}
}
catch
(
error
)
{
...
...
@@ -614,7 +627,6 @@ const Login = () => {
</Link> */
}
</
div
>
</
LoginForm
>
</
div
>
<
Footer
></
Footer
>
</
div
>
...
...
This diff is collapsed.
Click to expand it.
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