Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
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
shenshaokai
jinfa-platform
Commits
05b72197
Commit
05b72197
authored
Apr 14, 2022
by
Bill
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-material-authButton' into 'v2-220418'
当品类关联属性为空时隐藏物料属性 See merge request linkseeks-design/pro-platform!293
parents
b6396287
f4f6a588
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
6 deletions
+23
-6
add.tsx
src/pages/commodity/material/materialPendingAdd/add.tsx
+7
-5
index.tsx
src/pages/commodity/material/materialPendingAdd/index.tsx
+8
-1
index.tsx
...s/commodity/material/materialPendingExamChangeI/index.tsx
+2
-0
index.tsx
.../commodity/material/materialPendingExamChangeII/index.tsx
+2
-0
index.tsx
src/pages/commodity/material/materialPendingExamI/index.tsx
+2
-0
index.tsx
src/pages/commodity/material/materialPendingExamII/index.tsx
+2
-0
No files found.
src/pages/commodity/material/materialPendingAdd/add.tsx
View file @
05b72197
...
...
@@ -80,7 +80,6 @@ const MaterialAdd = (props) => {
if
(
!
formatInitialValue
)
{
return
}
console
.
log
(
formatInitialValue
?.
interiorState
,
"formatInitialValue?.interiorState"
)
if
(
formatInitialValue
?.
interiorState
===
HAS_CONFIRM
)
{
formActions
.
setFieldState
(
'changeCard'
,
(
state
)
=>
{
FormPath
.
setIn
(
state
,
'visible'
,
true
);
...
...
@@ -332,17 +331,20 @@ const MaterialAdd = (props) => {
$('onFieldValueChange', 'category').subscribe((fieldState) => {
if (!fieldState.value || fieldState.value.length === 0) {
setSchema(
getSchema(
propsCardSchema({} as ISchema)
)
getSchema({})
)
return;
}
const categoryId = [...fieldState.value].pop();
getProductCustomerGetCustomerCategoryById({id: categoryId})
.then((data) => {
console.log(data);
const { customerAttributeList } = data.data;
if (customerAttributeList.length === 0) {
setSchema(
getSchema({})
)
return;
}
const result = {};
customerAttributeList.forEach((_item) => {
const { customerAttributeValueList, name, type, isEmpty, id } = _item;
...
...
src/pages/commodity/material/materialPendingAdd/index.tsx
View file @
05b72197
...
...
@@ -44,8 +44,11 @@ const MaterialQuery = () => {
}
setDeleteLoading
((
prev
)
=>
prev
.
concat
(
_row
.
id
))
try
{
const
{
selectedRowKeys
,
selectRow
}
=
selectRowFns
;
const
{
data
,
code
}
=
await
postProductGoodsDeleteBatchGoods
({
idList
:
[
_row
.
id
]
});
if
(
code
===
1000
)
{
selectRowFns
.
setSelectedRowKeys
(
selectedRowKeys
.
filter
((
_item
)
=>
_item
!==
_row
.
id
))
selectRowFns
.
setSelectRow
(
selectRow
.
filter
((
_item
)
=>
_item
.
id
!==
_row
.
id
))
formActions
.
submit
();
}
}
finally
{
...
...
@@ -86,8 +89,11 @@ const MaterialQuery = () => {
});
return
;
}
const
{
selectedRowKeys
,
selectRow
}
=
selectRowFns
;
const
{
data
,
code
}
=
await
postProductGoodsSubmit
({
id
:
_row
.
id
});
if
(
code
===
1000
)
{
selectRowFns
.
setSelectedRowKeys
(
selectedRowKeys
.
filter
((
_item
)
=>
_item
!==
_row
.
id
))
selectRowFns
.
setSelectRow
(
selectRow
.
filter
((
_item
)
=>
_item
.
id
!==
_row
.
id
))
formActions
.
submit
();
}
}
catch
(
e
)
{}
...
...
@@ -211,13 +217,14 @@ const MaterialQuery = () => {
try
{
const
{
data
,
code
}
=
await
postProductGoodsDeleteBatchGoods
({
idList
:
selectedRowKeys
})
if
(
code
===
1000
)
{
selectRowFns
.
setSelectedRowKeys
([])
selectRowFns
.
setSelectRow
([])
ref
.
current
.
reload
()
}
}
catch
(
e
)
{}
finally
{
setLoading
(
false
);
}
}
const
handleSearch
=
(
values
:
SearchParams
)
=>
{
...
...
src/pages/commodity/material/materialPendingExamChangeI/index.tsx
View file @
05b72197
...
...
@@ -76,6 +76,8 @@ const MaterialQuery = () => {
try
{
const
{
data
,
code
}
=
await
postProductGoodsGoodsExamineChangeBatch1
({
idList
:
selectedRowKeys
})
if
(
code
===
1000
)
{
selectRowFns
.
setSelectedRowKeys
([])
selectRowFns
.
setSelectRow
([])
ref
.
current
.
reload
()
}
}
catch
(
e
)
{}
...
...
src/pages/commodity/material/materialPendingExamChangeII/index.tsx
View file @
05b72197
...
...
@@ -80,6 +80,8 @@ const MaterialQuery = () => {
try
{
const
{
data
,
code
}
=
await
postProductGoodsGoodsExamineChangeBatch2
({
idList
:
selectedRowKeys
})
if
(
code
===
1000
)
{
selectRowFns
.
setSelectedRowKeys
([])
selectRowFns
.
setSelectRow
([])
ref
.
current
.
reload
()
}
}
catch
(
e
)
{}
...
...
src/pages/commodity/material/materialPendingExamI/index.tsx
View file @
05b72197
...
...
@@ -77,6 +77,8 @@ const MaterialQuery = () => {
try
{
const
{
data
,
code
}
=
await
postProductGoodsGoodsExamineBatch1
({
idList
:
selectedRowKeys
})
if
(
code
===
1000
)
{
selectRowFns
.
setSelectedRowKeys
([])
selectRowFns
.
setSelectRow
([])
ref
.
current
.
reload
()
}
}
catch
(
e
)
{}
...
...
src/pages/commodity/material/materialPendingExamII/index.tsx
View file @
05b72197
...
...
@@ -76,6 +76,8 @@ const MaterialQuery = () => {
try
{
const
{
data
,
code
}
=
await
postProductGoodsGoodsExamineBatch2
({
idList
:
selectedRowKeys
})
if
(
code
===
1000
)
{
selectRowFns
.
setSelectedRowKeys
([])
selectRowFns
.
setSelectRow
([])
ref
.
current
.
reload
()
}
}
catch
(
e
)
{}
...
...
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