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
facee4fe
Commit
facee4fe
authored
1 year ago
by
krysent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new
parent
ed24dcb5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1530 additions
and
1351 deletions
+1530
-1351
index.jsx
src/components/DrawInitForm/index.jsx
+1
-1
index.jsx
src/components/EditTable/index.jsx
+97
-90
index.jsx
src/pages/insertstore/Otherinstore/index.jsx
+156
-1260
index_c.jsx
src/pages/insertstore/Otherinstore/index_c.jsx
+1276
-0
No files found.
src/components/DrawInitForm/index.jsx
View file @
facee4fe
...
...
@@ -39,8 +39,8 @@ function DrawInitForm(props) {
getContainer=
{
false
}
style=
{
{
position
:
"absolute"
,
transform
:
"translateX(0)"
,
maxWidth
:
"100%"
}
}
width=
{
props
.
val
==
"detail"
?
1000
:
props
.
width
}
destroyOnClose=
{
true
}
{
...
props
}
destroyOnClose=
{
true
}
>
{
props
.
val
==
"only"
&&
props
.
children
}
{
props
.
val
==
"only"
?
null
:
props
.
val
==
"detail"
?
<
Details
{
...
detailprops
}
></
Details
>
:
<
InitForm
{
...
newProps
}
></
InitForm
>
}
...
...
This diff is collapsed.
Click to expand it.
src/components/EditTable/index.jsx
View file @
facee4fe
import
React
,
{
useEffect
,
useRef
}
from
"react"
;
import
React
,
{
useEffect
,
useRef
,
useState
}
from
"react"
;
import
{
EditableProTable
}
from
"@ant-design/pro-table"
;
import
{
useUpdate
}
from
'ahooks'
;
import
{
useUpdate
}
from
"ahooks"
;
const
EditTable
=
({
columns
,
...
...
@@ -11,103 +10,111 @@ const EditTable = ({
recordCreatorProps
,
maxLength
,
linkconfig
,
style
style
,
})
=>
{
const
update
=
useUpdate
();
const
editorFormRef
=
useRef
();
useEffect
(()
=>
{
if
(
value
===
undefined
){
update
()
}
},[
value
])
console
.
log
(
columns
);
const
[
show
,
setshow
]
=
useState
(
true
);
useEffect
(()
=>
{
setshow
(
false
);
setTimeout
(()
=>
{
setshow
(
true
);
},
1200
);
},
[]);
return
(
<
EditableProTable
style=
{
{
...(
style
??
{})
}
}
columns=
{
columns
}
rowKey=
{
rowKey
}
value=
{
value
||
[]
}
onChange=
{
onChange
}
recordCreatorProps=
{
recordCreatorProps
==
"false"
?
false
:
{
newRecordType
:
"dataSource"
,
record
:
()
=>
({
[
rowKey
]:
Date
.
now
(),
}),
}
}
editableFormRef=
{
editorFormRef
}
editable=
{
{
type
:
"multiple"
,
editableKeys
:
value
?
value
.
map
((
item
)
=>
item
[
rowKey
])
:
[],
actionRender
:
(
row
,
config
,
defaultDoms
)
=>
{
return
[
defaultDoms
.
delete
];
},
onValuesChange
:
async
(
record
,
recordList
)
=>
{
let
{
urlchangeval
}
=
linkconfig
??
{};
let
newvalue
=
[...
recordList
];
if
(
urlchangeval
&&
record
)
{
//根据url 改变 数据值
let
{
params
,
database
,
effectresult
}
=
urlchangeval
??
{},
curvaluerow
=
value
&&
value
.
length
>
0
?
value
.
filter
(
it
=>
it
[
rowKey
]
==
record
[
rowKey
])[
0
]
:
{}
//获取除本行之外已修改的value值
newvalue
=
newvalue
.
map
((
it
,
i
)
=>
{
if
(
!
record
)
return
it
;
if
(
it
[
rowKey
]
==
record
[
rowKey
])
{
let
freshvals
=
{}
Object
.
keys
(
effectresult
).
map
(
its
=>
{
// freshvals[its] = value[i][its];
freshvals
[
its
]
=
it
[
its
];
})
it
=
{
...
record
,
...
freshvals
}
}
else
{
it
=
value
&&
value
.
length
>
0
?
value
.
filter
(
its
=>
its
[
rowKey
]
==
it
[
rowKey
])[
0
]
:
{}
}
return
it
});
//参数获取
let
parames
=
{};
let
ifs
=
true
;
Object
.
keys
(
params
).
map
(
it
=>
{
if
(
params
[
it
]
==
"linked"
)
{
parames
[
it
]
=
record
[
it
]
if
(
record
[
it
]
!=
curvaluerow
[
it
])
{
ifs
=
false
;
}
}
else
{
parames
[
it
]
=
params
[
it
]
show
&&
(
<
EditableProTable
style=
{
{
...(
style
??
{})
}
}
columns=
{
columns
}
rowKey=
{
rowKey
}
value=
{
value
||
[]
}
onChange=
{
onChange
}
recordCreatorProps=
{
recordCreatorProps
==
"false"
?
false
:
{
newRecordType
:
"dataSource"
,
record
:
()
=>
({
[
rowKey
]:
Date
.
now
(),
}),
}
})
if
(
ifs
)
{
//值未变化
}
else
{
let
res
=
await
database
(
parames
);
}
editableFormRef=
{
editorFormRef
}
editable=
{
{
type
:
"multiple"
,
editableKeys
:
value
?
value
.
map
((
item
)
=>
item
[
rowKey
])
:
[],
actionRender
:
(
row
,
config
,
defaultDoms
)
=>
{
return
[
defaultDoms
.
delete
];
},
onValuesChange
:
async
(
record
,
recordList
)
=>
{
let
{
urlchangeval
}
=
linkconfig
??
{};
let
newvalue
=
[...
recordList
];
if
(
urlchangeval
&&
record
)
{
//根据url 改变 数据值
let
{
params
,
database
,
effectresult
}
=
urlchangeval
??
{},
curvaluerow
=
value
&&
value
.
length
>
0
?
value
.
filter
((
it
)
=>
it
[
rowKey
]
==
record
[
rowKey
])[
0
]
:
{};
//获取除本行之外已修改的value值
newvalue
=
newvalue
.
map
((
it
,
i
)
=>
{
if
(
!
record
)
return
it
;
if
(
it
[
rowKey
]
==
record
[
rowKey
])
{
Object
.
keys
(
effectresult
).
map
(
items
=>
{
let
result
=
res
?.
data
?.
data
??
{}
it
[
items
]
=
result
[
effectresult
[
items
]];
})
editorFormRef
.
current
?.
setRowData
?.(
i
,
it
)
let
freshvals
=
{};
Object
.
keys
(
effectresult
).
map
((
its
)
=>
{
// freshvals[its] = value[i][its];
freshvals
[
its
]
=
it
[
its
];
});
it
=
{
...
record
,
...
freshvals
,
};
}
else
{
it
=
value
&&
value
.
length
>
0
?
value
.
filter
((
its
)
=>
its
[
rowKey
]
==
it
[
rowKey
])[
0
]
:
{};
}
return
it
})
};
return
it
;
});
}
onChange
(
newvalue
);
},
}
}
maxLength=
{
maxLength
??
1000
}
/>
//参数获取
let
parames
=
{};
let
ifs
=
true
;
Object
.
keys
(
params
).
map
((
it
)
=>
{
if
(
params
[
it
]
==
"linked"
)
{
parames
[
it
]
=
record
[
it
];
if
(
record
[
it
]
!=
curvaluerow
[
it
])
{
ifs
=
false
;
}
}
else
{
parames
[
it
]
=
params
[
it
];
}
});
if
(
ifs
)
{
//值未变化
}
else
{
let
res
=
await
database
(
parames
);
newvalue
=
newvalue
.
map
((
it
,
i
)
=>
{
if
(
it
[
rowKey
]
==
record
[
rowKey
])
{
Object
.
keys
(
effectresult
).
map
((
items
)
=>
{
let
result
=
res
?.
data
?.
data
??
{};
it
[
items
]
=
result
[
effectresult
[
items
]];
});
editorFormRef
.
current
?.
setRowData
?.(
i
,
it
);
}
else
{
}
return
it
;
});
}
}
onChange
(
newvalue
);
},
}
}
maxLength=
{
maxLength
??
1000
}
/>
)
);
};
...
...
This diff is collapsed.
Click to expand it.
src/pages/insertstore/Otherinstore/index.jsx
View file @
facee4fe
import
React
,
{
useEffect
,
useMemo
,
useRef
,
useState
}
from
"react"
;
import
{
Dropdown
,
Menu
,
Button
,
message
,
Table
}
from
"antd"
;
import
AutoTable
from
"@/components/AutoTable"
;
// import defaultFields from "./fields";
import
{
doFetch
}
from
"@/utils/doFetch"
;
import
React
,
{
useState
,
useEffect
}
from
"react"
;
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"
;
import
{
EditableProTable
}
from
"@ant-design/pro-table"
;
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
EditUpload
=
({
record
,
fid
,
storeId
})
=>
{
console
.
log
(
123
);
const
[
value
,
setvalue
]
=
useState
({
[
record
.
id
]:
record
.
uploadList
,
});
const
{
initialState
,
setInitialState
}
=
useModel
(
"@@initialState"
);
const
fetchRequest
=
async
(
params
)
=>
{
console
.
log
(
5555
);
let
newParams
=
JSON
.
parse
(
JSON
.
stringify
(
params
));
let
res
=
await
doFetch
({
url
:
"/ngic-auth/sysStorePosition/queryUseAbleSelection"
,
params
:
{
storeId
:
newParams
.
storeId
},
});
return
res
?.
data
?.
dataList
;
};
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
)
:
[],
},
};
});
// fetchRequest(params);
},
[
value
]);
useEffect
(()
=>
{
fetchRequest
({
storeId
,
});
},
[
storeId
]);
import
{
doFetch
}
from
"@/utils/doFetch"
;
function
Otherinstore
()
{
const
[
open
,
setopen
]
=
useState
(
false
);
return
(
<
EditableProTable
rowKey=
{
"id"
}
maxLength=
{
1
}
style=
{
{
marginLeft
:
48
}
}
columns=
{
[
{
title
:
(
<
span
>
库位名称
<
b
style=
{
{
color
:
"red"
}
}
>
*
</
b
>
</
span
>
),
dataIndex
:
"storePositionName"
,
key
:
"storePositionId"
,
search
:
false
,
valueType
:
"select"
,
request
:
async
(
params
)
=>
{
console
.
log
(
params
);
const
res
=
await
fetchRequest
(
params
);
return
res
;
},
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
}
/>
);
};
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
[
PchList
,
setPchList
]
=
useState
();
useEffect
(()
=>
{
if
(
drawprops
?.
visible
)
{
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieLabel/selectionByStatus"
,
params
:
{
status
:
"1"
},
}).
then
((
res
)
=>
{
setPchList
(
res
?.
data
?.
dataList
);
});
}
},
[
drawprops
?.
visible
]);
const
defaultFields
=
useMemo
(()
=>
{
// let option = {
// options: PchList,
// allowClear: true,
// showSearch: true,
// };
// console.log("pchlist:", option);
return
{
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/selectionBoxAll"
,
params
:
{},
}),
params
:
{},
},
},
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/wmsMaterieLabel/queryByLabelId"
,
params
,
}),
params
:
{
labelId
:
"linked"
},
effectresult
:
{
productionUnitName
:
"productionUnitName"
,
materieCode
:
"materieCode"
,
supplierId
:
"supplierId"
,
supplierName
:
"supplierName"
,
width
:
"width"
,
ironLoss
:
"ironLoss"
,
sheetThickness
:
"sheetThickness"
,
shopSign
:
"shopSign"
,
weight
:
"weight"
,
specificationModel
:
"specificationModel"
,
},
},
},
columns
:
[
{
title
:
(
<
span
>
批次号
<
b
style=
{
{
color
:
"red"
}
}
>
*
</
b
>
</
span
>
),
dataIndex
:
"labelId"
,
key
:
"labelId"
,
valueType
:
"select"
,
width
:
180
,
request
:
async
(
params
)
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieLabel/selectionByStatus"
,
params
:
{
status
:
"1"
},
});
return
res
?.
data
?.
dataList
;
},
formItemProps
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
"此项为必填项"
}],
};
},
},
<>
<
div
style=
{
{
height
:
"20px"
,
width
:
"20px"
,
backgroundColor
:
"red"
}
}
onClick=
{
()
=>
{
setopen
(
!
open
);
}
}
></
div
>
<
DrawInitForm
width=
"1200px"
fields=
{
open
?
{
materialList
:
{
value
:
[],
title
:
"物料信息"
,
type
:
"table"
,
col
:
{
span
:
24
},
name
:
[
"materialList"
],
required
:
true
,
linkconfig
:
{
urlchangeval
:
{
//根据url接口 改变某个value
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieLabel/queryByLabelId"
,
params
,
}),
params
:
{
labelId
:
"linked"
},
effectresult
:
{
productionUnitName
:
"productionUnitName"
,
materieCode
:
"materieCode"
,
supplierId
:
"supplierId"
,
supplierName
:
"supplierName"
,
width
:
"width"
,
ironLoss
:
"ironLoss"
,
sheetThickness
:
"sheetThickness"
,
shopSign
:
"shopSign"
,
weight
:
"weight"
,
specificationModel
:
"specificationModel"
,
},
},
},
columns
:
[
{
title
:
(
<
span
>
批次号
<
b
style=
{
{
color
:
"red"
}
}
>
*
</
b
>
</
span
>
),
dataIndex
:
"labelId"
,
key
:
"labelId"
,
valueType
:
"select"
,
width
:
180
,
params
:
{},
request
:
async
()
=>
{
alert
(
"Please"
)
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieLabel/selectionByStatus"
,
params
:
{
status
:
1
},
});
console
.
log
(
res
);
return
res
?.
data
?.
dataList
;
},
formItemProps
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
"此项为必填项"
}],
};
},
},
{
title
:
(
<
span
>
物料编码-名称
<
b
style=
{
{
color
:
"red"
}
}
>
*
</
b
>
</
span
>
),
dataIndex
:
"materieCode"
,
key
:
"materieCode"
,
width
:
160
,
valueType
:
"select"
,
readonly
:
true
,
renderFormItem
:
({
entry
})
=>
{
return
(
<
span
>
{
entry
?.
materieCode
}
-
{
entry
?.
materieName
}
</
span
>
);
},
},
{
title
:
"规格型号"
,
dataIndex
:
"specificationModel"
,
key
:
"specificationModel"
,
readonly
:
true
,
width
:
140
,
},
{
title
:
(
<
span
>
物料编码-名称
<
b
style=
{
{
color
:
"red"
}
}
>
*
</
b
>
</
span
>
),
dataIndex
:
"materieCode"
,
key
:
"materieCode"
,
width
:
160
,
valueType
:
"select"
,
readonly
:
true
,
renderFormItem
:
({
entry
})
=>
{
return
(
<
span
>
{
entry
?.
materieCode
}
-
{
entry
?.
materieName
}
</
span
>
);
},
},
{
title
:
"规格型号"
,
dataIndex
:
"specificationModel"
,
key
:
"specificationModel"
,
readonly
:
true
,
width
:
140
,
},
{
title
:
"供应商"
,
dataIndex
:
"supplierName"
,
key
:
"supplierName"
,
readonly
:
"supplierName"
,
},
{
title
:
"宽度"
,
dataIndex
:
"width"
,
key
:
"width"
,
readonly
:
"width"
,
},
{
title
:
"铁损"
,
dataIndex
:
"ironLoss"
,
key
:
"ironLoss"
,
readonly
:
"ironLoss"
,
},
{
title
:
"片厚"
,
dataIndex
:
"sheetThickness"
,
key
:
"sheetThickness"
,
readonly
:
"sheetThickness"
,
},
{
title
:
"牌号"
,
dataIndex
:
"shopSign"
,
key
:
"shopSign"
,
readonly
:
"shopSign"
,
},
{
title
:
"入库数量"
,
dataIndex
:
"weight"
,
key
:
"weight"
,
readonly
:
"weight"
,
},
{
title
:
"库存单位"
,
dataIndex
:
"productionUnitName"
,
key
:
"productionUnitName"
,
readonly
:
"productionUnitName"
,
},
{
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
:
"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
:
""
,
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
:
"supplierName"
,
key
:
"supplierName"
,
readonly
:
"supplierName"
,
},
},
{
title
:
"供应商编号 - 名称"
,
dataIndex
:
"supplierNo"
,
key
:
"supplierNo"
,
search
:
false
,
render
:
(
dom
,
row
)
=>
{
return
(
(
row
.
supplierNo
??
""
)
+
" - "
+
(
row
.
supplierName
??
""
)
);
{
title
:
"宽度"
,
dataIndex
:
"width"
,
key
:
"width"
,
readonly
:
"width"
,
},
},
{
title
:
"批次号"
,
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
:
"ironLoss"
,
key
:
"ironLoss"
,
readonly
:
"ironLoss"
,
},
},
{
title
:
"供应商编号 - 名称"
,
dataIndex
:
"supplierNo"
,
key
:
"supplierNo"
,
search
:
false
,
render
:
(
dom
,
row
)
=>
{
return
(
(
row
.
supplierNo
??
""
)
+
" - "
+
(
row
.
supplierName
??
""
)
);
{
title
:
"片厚"
,
dataIndex
:
"sheetThickness"
,
key
:
"sheetThickness"
,
readonly
:
"sheetThickness"
,
},
},
{
title
:
"批次号"
,
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/uploadOtherInstore"
,
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
:
"shopSign"
,
key
:
"shopSign"
,
readonly
:
"shopSign"
,
},
},
{
title
:
"供应商编号 - 名称"
,
dataIndex
:
"supplierNo"
,
key
:
"supplierNo"
,
search
:
false
,
render
:
(
dom
,
row
)
=>
{
return
(
(
row
.
supplierNo
??
""
)
+
" - "
+
(
row
.
supplierName
??
""
)
);
{
title
:
"入库数量"
,
dataIndex
:
"weight"
,
key
:
"weight"
,
readonly
:
"weight"
,
},
},
{
title
:
"批次号"
,
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"
,
},
],
},
],
}),
};
},
[
PchList
]);
// const defaultFields = useMemo(() => {
// console.log(PchList);
// return
// }, [PchList]);
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"
,
search
:
false
,
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"
,
search
:
false
,
valueType
:
"select"
,
options
:
[
{
label
:
"采购入库"
,
value
:
"1"
,
},
{
label
:
"生产入库"
,
value
:
"2"
,
},
{
label
:
"退料入库"
,
value
:
"3"
,
},
{
label
:
"其他入库"
,
value
:
"4"
,
},
],
},
{
title
:
"入库仓库"
,
search
:
false
,
dataIndex
:
"storeName"
,
key
:
"storeId"
,
fieldProps
:
{
allowClear
:
true
,
showSearch
:
true
,
},
options
:
{
database
:
()
=>
doFetch
({
url
:
"/ngic-auth/sysStore/selectionBox"
,
params
:
{
factoryIdList
:
[]
},
}),
params
:
{},
},
valueType
:
"select"
,
},
{
title
:
"备注"
,
dataIndex
:
"remark"
,
key
:
"remark"
,
search
:
false
,
},
{
title
:
"创建人"
,
dataIndex
:
"createUserName"
,
search
:
false
,
key
:
"createUserName"
,
},
{
title
:
"创建时间"
,
dataIndex
:
"createTime"
,
key
:
"createTime"
,
valueType
:
"dateRange"
,
formItemProps
:
{
name
:
"createTimeList"
,
},
},
{
title
:
"状态"
,
dataIndex
:
"statusName"
,
search
:
false
,
key
:
"status"
,
valueType
:
"select"
,
options
:
[
{
label
:
"待分配"
,
value
:
"5"
,
},
{
label
:
"待执行"
,
value
:
"6"
,
},
{
label
:
"执行中"
,
value
:
"7"
,
},
],
},
{
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
===
7
?
null
:
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"
,
search
:
false
,
key
:
"instoreType"
,
valueType
:
"select"
,
options
:
[
{
label
:
"采购入库"
,
value
:
"1"
,
},
{
label
:
"生产入库"
,
value
:
"2"
,
},
{
label
:
"退料入库"
,
value
:
"3"
,
},
{
label
:
"其他入库"
,
value
:
"4"
,
},
],
},
{
title
:
"入库仓库"
,
search
:
false
,
dataIndex
:
"storeName"
,
key
:
"storeId"
,
fieldProps
:
{
allowClear
:
true
,
showSearch
:
true
,
},
options
:
{
database
:
()
=>
doFetch
({
url
:
"/ngic-auth/sysStore/selectionBox"
,
params
:
{
factoryIdList
:
[]
},
}),
params
:
{},
},
valueType
:
"select"
,
},
{
title
:
"备注"
,
dataIndex
:
"remark"
,
key
:
"remark"
,
search
:
false
,
},
{
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"
,
search
:
false
,
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/queryOtherList"
:
"/ngic-workmanship/wmsMaterieInstoreHis/queryOtherList"
,
};
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"
)
{
const
data
=
JSON
.
parse
(
JSON
.
stringify
(
value
));
const
materialList
=
data
?.
materialList
?.
map
((
it
)
=>
{
return
{
labelId
:
it
?.
labelId
,
};
});
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieInstore/saveOtherInstore"
,
params
:
{
materieInstoreNo
:
data
.
materieInstoreNo
,
storeId
:
data
.
storeId
,
remark
:
data
.
remark
,
materialList
:
materialList
,
},
});
if
(
res
.
code
==
"0000"
)
{
reload
();
}
}
title
:
"库存单位"
,
dataIndex
:
"productionUnitName"
,
key
:
"productionUnitName"
,
readonly
:
"productionUnitName"
,
},
{
title
:
"操作"
,
valueType
:
"option"
,
width
:
70
,
render
:
(
text
,
record
,
_
,
action
)
=>
[
<
a
key=
"delete"
onClick=
{
()
=>
{}
}
>
删除
</
a
>,
],
},
],
rowKey
:
"id"
,
},
}
:
{}
}
visible=
{
open
}
onClose=
{
()
=>
{
setopen
(
false
);
}
}
reload=
{
reload
}
/>
</
div
>
></
DrawInitForm
>
</>
);
}
export
default
I
nstore
;
export
default
Otheri
nstore
;
This diff is collapsed.
Click to expand it.
src/pages/insertstore/Otherinstore/index_c.jsx
0 → 100644
View file @
facee4fe
import
React
,
{
useEffect
,
useMemo
,
useRef
,
useState
}
from
"react"
;
import
{
Dropdown
,
Menu
,
Button
,
message
,
Table
}
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"
;
import
{
EditableProTable
}
from
"@ant-design/pro-table"
;
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
EditUpload
=
({
record
,
fid
,
storeId
})
=>
{
console
.
log
(
123
);
const
[
value
,
setvalue
]
=
useState
({
[
record
.
id
]:
record
.
uploadList
,
});
const
{
initialState
,
setInitialState
}
=
useModel
(
"@@initialState"
);
const
fetchRequest
=
async
(
params
)
=>
{
console
.
log
(
5555
);
let
newParams
=
JSON
.
parse
(
JSON
.
stringify
(
params
));
let
res
=
await
doFetch
({
url
:
"/ngic-auth/sysStorePosition/queryUseAbleSelection"
,
params
:
{
storeId
:
newParams
.
storeId
},
});
return
res
?.
data
?.
dataList
;
};
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
)
:
[],
},
};
});
// fetchRequest(params);
},
[
value
]);
useEffect
(()
=>
{
fetchRequest
({
storeId
,
});
},
[
storeId
]);
return
(
<
EditableProTable
rowKey=
{
"id"
}
maxLength=
{
1
}
style=
{
{
marginLeft
:
48
}
}
columns=
{
[
{
title
:
(
<
span
>
库位名称
<
b
style=
{
{
color
:
"red"
}
}
>
*
</
b
>
</
span
>
),
dataIndex
:
"storePositionName"
,
key
:
"storePositionId"
,
search
:
false
,
valueType
:
"select"
,
request
:
async
(
params
)
=>
{
console
.
log
(
params
);
const
res
=
await
fetchRequest
(
params
);
return
res
;
},
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
}
/>
);
};
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
[
PchList
,
setPchList
]
=
useState
();
useEffect
(()
=>
{
if
(
drawprops
?.
visible
)
{
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieLabel/selectionByStatus"
,
params
:
{
status
:
"1"
},
}).
then
((
res
)
=>
{
setPchList
(
res
?.
data
?.
dataList
);
});
}
},
[
drawprops
?.
visible
]);
const
defaultFields
=
useMemo
(()
=>
{
// let option = {
// options: PchList,
// allowClear: true,
// showSearch: true,
// };
// console.log("pchlist:", option);
return
{
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/selectionBoxAll"
,
params
:
{},
}),
params
:
{},
},
},
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/wmsMaterieLabel/queryByLabelId"
,
params
,
}),
params
:
{
labelId
:
"linked"
},
effectresult
:
{
productionUnitName
:
"productionUnitName"
,
materieCode
:
"materieCode"
,
supplierId
:
"supplierId"
,
supplierName
:
"supplierName"
,
width
:
"width"
,
ironLoss
:
"ironLoss"
,
sheetThickness
:
"sheetThickness"
,
shopSign
:
"shopSign"
,
weight
:
"weight"
,
specificationModel
:
"specificationModel"
,
},
},
},
columns
:
[
{
title
:
(
<
span
>
批次号
<
b
style=
{
{
color
:
"red"
}
}
>
*
</
b
>
</
span
>
),
dataIndex
:
"labelId"
,
key
:
"labelId"
,
valueType
:
"select"
,
width
:
180
,
request
:
async
(
params
)
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieLabel/selectionByStatus"
,
params
:
{
status
:
"1"
},
});
return
res
?.
data
?.
dataList
;
},
formItemProps
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
"此项为必填项"
}],
};
},
},
{
title
:
(
<
span
>
物料编码-名称
<
b
style=
{
{
color
:
"red"
}
}
>
*
</
b
>
</
span
>
),
dataIndex
:
"materieCode"
,
key
:
"materieCode"
,
width
:
160
,
valueType
:
"select"
,
readonly
:
true
,
renderFormItem
:
({
entry
})
=>
{
return
(
<
span
>
{
entry
?.
materieCode
}
-
{
entry
?.
materieName
}
</
span
>
);
},
},
{
title
:
"规格型号"
,
dataIndex
:
"specificationModel"
,
key
:
"specificationModel"
,
readonly
:
true
,
width
:
140
,
},
{
title
:
"供应商"
,
dataIndex
:
"supplierName"
,
key
:
"supplierName"
,
readonly
:
"supplierName"
,
},
{
title
:
"宽度"
,
dataIndex
:
"width"
,
key
:
"width"
,
readonly
:
"width"
,
},
{
title
:
"铁损"
,
dataIndex
:
"ironLoss"
,
key
:
"ironLoss"
,
readonly
:
"ironLoss"
,
},
{
title
:
"片厚"
,
dataIndex
:
"sheetThickness"
,
key
:
"sheetThickness"
,
readonly
:
"sheetThickness"
,
},
{
title
:
"牌号"
,
dataIndex
:
"shopSign"
,
key
:
"shopSign"
,
readonly
:
"shopSign"
,
},
{
title
:
"入库数量"
,
dataIndex
:
"weight"
,
key
:
"weight"
,
readonly
:
"weight"
,
},
{
title
:
"库存单位"
,
dataIndex
:
"productionUnitName"
,
key
:
"productionUnitName"
,
readonly
:
"productionUnitName"
,
},
{
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
:
"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
:
""
,
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
:
"批次号"
,
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
:
"批次号"
,
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/uploadOtherInstore"
,
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
:
"批次号"
,
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"
,
},
],
},
],
}),
};
},
[
PchList
]);
// const defaultFields = useMemo(() => {
// console.log(PchList);
// return
// }, [PchList]);
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"
,
search
:
false
,
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"
,
search
:
false
,
valueType
:
"select"
,
options
:
[
{
label
:
"采购入库"
,
value
:
"1"
,
},
{
label
:
"生产入库"
,
value
:
"2"
,
},
{
label
:
"退料入库"
,
value
:
"3"
,
},
{
label
:
"其他入库"
,
value
:
"4"
,
},
],
},
{
title
:
"入库仓库"
,
search
:
false
,
dataIndex
:
"storeName"
,
key
:
"storeId"
,
fieldProps
:
{
allowClear
:
true
,
showSearch
:
true
,
},
options
:
{
database
:
()
=>
doFetch
({
url
:
"/ngic-auth/sysStore/selectionBox"
,
params
:
{
factoryIdList
:
[]
},
}),
params
:
{},
},
valueType
:
"select"
,
},
{
title
:
"备注"
,
dataIndex
:
"remark"
,
key
:
"remark"
,
search
:
false
,
},
{
title
:
"创建人"
,
dataIndex
:
"createUserName"
,
search
:
false
,
key
:
"createUserName"
,
},
{
title
:
"创建时间"
,
dataIndex
:
"createTime"
,
key
:
"createTime"
,
valueType
:
"dateRange"
,
formItemProps
:
{
name
:
"createTimeList"
,
},
},
{
title
:
"状态"
,
dataIndex
:
"statusName"
,
search
:
false
,
key
:
"status"
,
valueType
:
"select"
,
options
:
[
{
label
:
"待分配"
,
value
:
"5"
,
},
{
label
:
"待执行"
,
value
:
"6"
,
},
{
label
:
"执行中"
,
value
:
"7"
,
},
],
},
{
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
===
7
?
null
:
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"
,
search
:
false
,
key
:
"instoreType"
,
valueType
:
"select"
,
options
:
[
{
label
:
"采购入库"
,
value
:
"1"
,
},
{
label
:
"生产入库"
,
value
:
"2"
,
},
{
label
:
"退料入库"
,
value
:
"3"
,
},
{
label
:
"其他入库"
,
value
:
"4"
,
},
],
},
{
title
:
"入库仓库"
,
search
:
false
,
dataIndex
:
"storeName"
,
key
:
"storeId"
,
fieldProps
:
{
allowClear
:
true
,
showSearch
:
true
,
},
options
:
{
database
:
()
=>
doFetch
({
url
:
"/ngic-auth/sysStore/selectionBox"
,
params
:
{
factoryIdList
:
[]
},
}),
params
:
{},
},
valueType
:
"select"
,
},
{
title
:
"备注"
,
dataIndex
:
"remark"
,
key
:
"remark"
,
search
:
false
,
},
{
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"
,
search
:
false
,
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/queryOtherList"
:
"/ngic-workmanship/wmsMaterieInstoreHis/queryOtherList"
,
};
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"
)
{
const
data
=
JSON
.
parse
(
JSON
.
stringify
(
value
));
const
materialList
=
data
?.
materialList
?.
map
((
it
)
=>
{
return
{
labelId
:
it
?.
labelId
,
};
});
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieInstore/saveOtherInstore"
,
params
:
{
materieInstoreNo
:
data
.
materieInstoreNo
,
storeId
:
data
.
storeId
,
remark
:
data
.
remark
,
materialList
:
materialList
,
},
});
if
(
res
.
code
==
"0000"
)
{
reload
();
}
}
}
}
reload=
{
reload
}
/>
</
div
>
);
}
export
default
Instore
;
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