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
ff072944
Commit
ff072944
authored
Apr 12, 2022
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改物料提价逻辑,
parent
afb448dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
11 deletions
+24
-11
useGetDetailCommon.tsx
src/pages/commodity/material/common/useGetDetailCommon.tsx
+5
-5
index.tsx
src/pages/commodity/material/materialPendingAdd/index.tsx
+19
-6
No files found.
src/pages/commodity/material/common/useGetDetailCommon.tsx
View file @
ff072944
...
@@ -62,7 +62,7 @@ function useGetDetailCommon<T extends GetProductGoodsGetGoodsProcessDetailRespon
...
@@ -62,7 +62,7 @@ function useGetDetailCommon<T extends GetProductGoodsGetGoodsProcessDetailRespon
},
},
{
{
title
:
'规格型号'
,
title
:
'规格型号'
,
value
:
'M20型号'
value
:
initialValue
?.
type
},
},
{
{
title
:
'品牌'
,
title
:
'品牌'
,
...
@@ -74,7 +74,7 @@ function useGetDetailCommon<T extends GetProductGoodsGetGoodsProcessDetailRespon
...
@@ -74,7 +74,7 @@ function useGetDetailCommon<T extends GetProductGoodsGetGoodsProcessDetailRespon
},
},
{
{
title
:
'备注'
,
title
:
'备注'
,
value
:
initialValue
?.
rema
rk
||
''
value
:
initialValue
?.
rema
ke
||
''
},
},
{
{
title
:
'品类'
,
title
:
'品类'
,
...
@@ -150,7 +150,7 @@ function useGetDetailCommon<T extends GetProductGoodsGetGoodsProcessDetailRespon
...
@@ -150,7 +150,7 @@ function useGetDetailCommon<T extends GetProductGoodsGetGoodsProcessDetailRespon
{
{
title
:
'附件'
,
title
:
'附件'
,
render
:
(
text
,
record
)
=>
{
render
:
(
text
,
record
)
=>
{
const
value
=
{
name
:
'设计图纸pdf'
,
url
:
''
};
const
value
=
{
name
:
record
.
name
,
url
:
record
.
url
};
return
(
return
(
<
FileItem
value=
{
value
}
/>
<
FileItem
value=
{
value
}
/>
)
)
...
@@ -158,10 +158,10 @@ function useGetDetailCommon<T extends GetProductGoodsGetGoodsProcessDetailRespon
...
@@ -158,10 +158,10 @@ function useGetDetailCommon<T extends GetProductGoodsGetGoodsProcessDetailRespon
},
},
{
{
title
:
'备注'
,
title
:
'备注'
,
dataIndex
:
'desc'
dataIndex
:
'desc
ription
'
}
}
]
]
},
[
initialValue
])
},
[])
/**
/**
* 内部单据流转记录
* 内部单据流转记录
...
...
src/pages/commodity/material/materialPendingAdd/index.tsx
View file @
ff072944
...
@@ -9,7 +9,7 @@ import { Button, Card, Cascader, message, Modal, Popconfirm, Space, Spin } from
...
@@ -9,7 +9,7 @@ import { Button, Card, Cascader, message, Modal, Popconfirm, Space, Spin } from
import
{
getColumn
}
from
'../common/columns'
;
import
{
getColumn
}
from
'../common/columns'
;
import
{
createFormActions
,
Schema
}
from
'@formily/antd'
;
import
{
createFormActions
,
Schema
}
from
'@formily/antd'
;
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
;
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
;
import
{
GetProductGoodsGetMaterialListRequest
,
getProductGoodsGetSubGoodsList
,
getProductGoodsGetToBeAddGoodsList
,
postProductGoodsDeleteBatchGoods
,
postProductGoodsSubmit
}
from
'@/services/ProductV2Api'
;
import
{
GetProductGoodsGetMaterialListRequest
,
getProductGoodsGetSubGoodsList
,
getProductGoodsGetToBeAddGoodsList
,
getProductMaterialProcessIsExistMaterialProcess
,
postProductGoodsDeleteBatchGoods
,
postProductGoodsSubmit
}
from
'@/services/ProductV2Api'
;
import
{
SearchParams
}
from
'../materialQuery'
;
import
{
SearchParams
}
from
'../materialQuery'
;
import
{
EMPTY
,
fetchBrand
,
fetchCategoryData
,
fetchTreeData
,
useAsyncCascader
}
from
'../common/useGetTableSearchData'
;
import
{
EMPTY
,
fetchBrand
,
fetchCategoryData
,
fetchTreeData
,
useAsyncCascader
}
from
'../common/useGetTableSearchData'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
...
@@ -44,17 +44,30 @@ const MaterialQuery = () => {
...
@@ -44,17 +44,30 @@ const MaterialQuery = () => {
const
handleSubmit
=
async
(
_row
)
=>
{
const
handleSubmit
=
async
(
_row
)
=>
{
setIsLoading
((
prev
)
=>
prev
.
concat
(
_row
.
id
))
setIsLoading
((
prev
)
=>
prev
.
concat
(
_row
.
id
))
try
{
try
{
const
{
data
,
code
}
=
await
postProductGoodsSubmit
({
id
:
_row
.
id
});
const
materialGroupId
=
_row
.
materialGroup
?.
id
if
(
code
===
1000
)
{
?
{
materialGroupId
:
_row
.
materialGroup
?.
id
}
formActions
.
submit
();
:
{}
}
else
if
(
code
===
43149
)
{
const
processRes
=
await
getProductMaterialProcessIsExistMaterialProcess
({
materialId
:
_row
.
id
,
processType
:
_row
.
interiorState
===
1
?
`1`
:
`2`
,
...
materialGroupId
,
}
as
any
)
if
(
processRes
.
code
!==
1000
||
!
processRes
.
data
)
{
Modal
.
warning
({
Modal
.
warning
({
title
:
'提交提醒'
,
title
:
'提交提醒'
,
content
:
`当前还未创建审核工作流, 请在物料审核流程规则配置设置`
,
content
:
(
<
div
>
当前还未创建审核工作流, 请在
<
a
target=
{
"_blank"
}
href=
{
`/memberCenter/commodityAbility/material/materialAuditProcessConfig`
}
>
物料审核流程规则配置
</
a
>
设置
</
div
>
),
onOk
()
{
onOk
()
{
console
.
log
(
'OK'
);
console
.
log
(
'OK'
);
},
},
});
});
return
;
}
const
{
data
,
code
}
=
await
postProductGoodsSubmit
({
id
:
_row
.
id
});
if
(
code
===
1000
)
{
formActions
.
submit
();
}
}
}
catch
(
e
)
{}
}
catch
(
e
)
{}
finally
{
finally
{
...
...
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