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
0dd1a8ca
Commit
0dd1a8ca
authored
Apr 01, 2022
by
前端-彭佳文
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix418' into 'v2-220418'
fix: 处理编辑导入商品数据物流区块数据回显异常 See merge request linkseeks-design/pro-platform!103
parents
d143c394
5a9bc2a2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
7 deletions
+17
-7
addProducts.tsx
src/pages/commodity/products/addProducts.tsx
+7
-1
logisticsForm.tsx
...ages/commodity/products/addProductsItem/logisticsForm.tsx
+4
-2
index.tsx
src/pages/commodity/products/constant/index.tsx
+4
-2
index.tsx
src/pages/commodity/products/index.tsx
+2
-2
No files found.
src/pages/commodity/products/addProducts.tsx
View file @
0dd1a8ca
...
...
@@ -21,6 +21,7 @@ import { store } from '@/store'
import
{
CommodityType
,
filterUsefulData
,
filterUsefulDraftData
}
from
'./constant'
;
import
{
getProductCommodityGetCommodity
,
getProductCommodityGetCommodityDraftById
,
getProductCustomerGetCustomerCategoryById
,
postProductCommodityApplyCheckCommodity
,
postProductCommoditySaveOrUpdateCommodity
,
postProductCommoditySaveOrUpdateCommodityDraft
}
from
'@/services/ProductV2Api'
;
import
{
getTemplateWebPageTemplateWebFindGoodsDescribeTemplate
}
from
'@/services/TemplateV2Api'
;
import
{
postProductCommodityDeleteCommodityDraftBatch
}
from
'@/services/ProductV2Api'
;
const
{
TabPane
}
=
Tabs
...
...
@@ -151,7 +152,7 @@ const AddProducts: React.FC<{}> = (props) => {
const
onSave
=
()
=>
{
setIsDisableSaveBtn
(
true
)
const
{
id
}
=
history
.
location
.
query
const
{
id
,
draftId
}
=
history
.
location
.
query
if
(
childFormRefs
.
current
.
length
>
0
)
{
try
{
let
data
=
childFormRefs
.
current
.
map
(
async
__
=>
{
...
...
@@ -364,6 +365,10 @@ const AddProducts: React.FC<{}> = (props) => {
setIsDisableSaveBtn
(
false
)
}
})
// 存在草稿即删除草稿
if
(
draftId
)
{
postProductCommodityDeleteCommodityDraftBatch
({
idList
:
[
draftId
]},
{
ctlType
:
"none"
})
}
}).
then
(
e
=>
{
if
(
e
)
{
setIsDisableSaveBtn
(
false
)
...
...
@@ -559,6 +564,7 @@ const AddProducts: React.FC<{}> = (props) => {
numberKeys
.
map
(
item
=>
delete
_params
[
item
])
}
console
.
log
(
_params
,
'params'
)
_params
.
sendCycle
=
_params
.
logistics
.
sendCycle
postProductCommoditySaveOrUpdateCommodityDraft
(
draftId
?
{
id
:
draftId
,
draft
:
_params
}
:
{
draft
:
_params
}).
then
(({
code
})
=>
{
if
(
code
===
1000
)
{
setIsDisableSaveDrate
(
false
)
...
...
src/pages/commodity/products/addProductsItem/logisticsForm.tsx
View file @
0dd1a8ca
...
...
@@ -39,7 +39,7 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
//传入ref给父级
onRef
(
logisticsFormRef
)
if
(
history
.
location
.
query
?.
id
)
{
if
(
history
.
location
.
query
?.
id
||
history
.
location
.
query
?.
draftId
)
{
const
{
deliveryType
,
carriageType
,
...
...
@@ -49,7 +49,9 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
setCarriageType
(
carriageType
)
setIsTemplate
(
useTemplate
)
setTemplate
(
useTemplate
)
logisticsForm
.
setFieldsValue
(
productInfoByEdit
.
logistics
)
setTimeout
(()
=>
{
logisticsForm
.
setFieldsValue
(
productInfoByEdit
.
logistics
)
},
500
)
}
else
{
logisticsForm
.
setFieldsValue
({
deliveryType
:
1
,
carriageType
:
1
})
}
...
...
src/pages/commodity/products/constant/index.tsx
View file @
0dd1a8ca
...
...
@@ -340,7 +340,7 @@ export const filterUsefulData = (data) => {
unitPriceAndPicList
:
data
.
unitPriceAndPicList
,
isAllAttributePic
:
data
.
isAllAttributePic
,
commodityRemark
:
data
.
commodityRemark
,
logistics
:
data
.
logistics
,
logistics
:
{...
data
.
logistics
,
sendCycle
:
data
.
sendCycle
}
,
isInvoice
:
data
.
isInvoice
,
marks
:
data
.
marks
,
packing
:
data
.
packing
,
...
...
@@ -352,6 +352,7 @@ export const filterUsefulData = (data) => {
description
:
data
.
description
,
type
:
data
.
type
,
createTime
:
data
.
createTime
,
isCrossBorder
:
data
.
isCrossBorder
,
}
}
...
...
@@ -377,7 +378,7 @@ export const filterUsefulDraftData = (data) => {
unitPriceAndPicList
:
data
.
unitPriceAndPicList
||
[],
isAllAttributePic
:
data
.
isAllAttributePic
,
commodityRemark
:
data
.
commodityRemark
,
logistics
:
data
.
logistics
,
logistics
:
{...
data
.
logistics
,
sendCycle
:
data
.
sendCycle
}
,
isInvoice
:
data
.
isInvoice
,
marks
:
data
.
marks
,
packing
:
data
.
packing
,
...
...
@@ -389,6 +390,7 @@ export const filterUsefulDraftData = (data) => {
description
:
data
.
description
,
type
:
data
.
type
,
createTime
:
data
.
createTime
,
isCrossBorder
:
data
.
isCrossBorder
,
// 是否草稿
draft
:
data
.
draft
,
}
...
...
src/pages/commodity/products/index.tsx
View file @
0dd1a8ca
...
...
@@ -463,7 +463,7 @@ const Products: React.FC<{}> = () => {
const
step1DescripSuccess
=
<
div
className=
{
styles
.
step1Description
}
>
<
h4
>
{
intl
.
formatMessage
({
id
:
'commodity.products.step1DescripSuccess.text.1'
})
}
</
h4
>
<
p
>
{
intl
.
formatMessage
({
id
:
'commodity.products.step1DescripSuccess.text.2'
})
}
</
p
>
<
Button
type=
"primary"
onClick=
{
modalImportData
}
>
{
intl
.
formatMessage
({
id
:
'commodity.products.step1DescripSuccess.button'
})
}
</
Button
>
<
Button
type=
"primary"
style=
{
{
width
:
'100%'
}
}
onClick=
{
modalImportData
}
>
{
intl
.
formatMessage
({
id
:
'commodity.products.step1DescripSuccess.button'
})
}
</
Button
>
</
div
>
const
step1Exception
=
<
div
className=
{
styles
.
step1Description
}
>
...
...
@@ -1032,7 +1032,7 @@ const Products: React.FC<{}> = () => {
<
Result
icon=
{
<
Progress
type=
"circle"
percent=
{
100
}
status=
"exception"
/>
}
title=
{
step1Exception
}
extra=
{
<
Button
onClick=
{
exportErrorLog
}
>
{
intl
.
formatMessage
({
id
:
'commodity.products.modal.button.2'
})
}
</
Button
>
}
extra=
{
<
Button
onClick=
{
exportErrorLog
}
style=
{
{
width
:
'100%'
}
}
>
{
intl
.
formatMessage
({
id
:
'commodity.products.modal.button.2'
})
}
</
Button
>
}
/>
</>
}
...
...
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