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
357331ae
Commit
357331ae
authored
Feb 09, 2022
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理渠道商编辑修改阶梯价格无效和新增编辑商品副单价显示null的问题‘
parent
58ce212d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
10 deletions
+22
-10
setPrice.tsx
src/pages/commodity/products/addChannelItem/setPrice.tsx
+1
-1
priceAttributeForm.tsx
...commodity/products/addProductsItem/priceAttributeForm.tsx
+20
-8
modifyDirectChannel.tsx
src/pages/commodity/products/modifyDirectChannel.tsx
+1
-1
No files found.
src/pages/commodity/products/addChannelItem/setPrice.tsx
View file @
357331ae
...
...
@@ -220,7 +220,7 @@ const SetPrice: React.FC<IProps> = (props) => {
setSelectedSpecRowKeys
([])
}
const
clickSetPrice
=
(
record
:
any
)
=>
{
const
clickSetPrice
=
(
record
)
=>
{
setIsBatchSetting
(
false
)
// 点击行操作批量置为false
setCurrentSetPriceRow
(
record
)
setModifyModal
(
true
)
...
...
src/pages/commodity/products/addProductsItem/priceAttributeForm.tsx
View file @
357331ae
...
...
@@ -271,8 +271,12 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
key
:
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.priceAttributeForm.planPrice'
}),
render
:
(
text
,
record
)
=>
{
const
assistPrice
=
_tableDataSource
[
record
[
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.priceAttributeForm.index'
})]][
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.priceAttributeForm.planPrice'
})]
console
.
log
(
assistPrice
,
'assistPrice'
)
if
(
assistPrice
&&
Array
.
isArray
(
assistPrice
))
{
return
assistPrice
.
map
((
p
,
i
)
=>
<
p
key=
{
i
}
>
{
planPrice
===
3
?
p
:
`${intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.currency' })}${p}`
}
</
p
>)
return
assistPrice
.
map
((
p
,
i
)
=>
{
const
_p
=
p
?
p
:
'0.00'
return
<
p
key=
{
i
}
>
{
planPrice
===
3
?
_p
:
`${intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.currency' })}${_p}`
}
</
p
>
})
}
else
if
(
assistPrice
)
{
return
planPrice
===
3
?
assistPrice
:
(
isNaN
(
assistPrice
)
?
`¥
${
0.00
}
`
:
`
${
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.priceAttributeForm.currency'
})}${
assistPrice
}
`
)
}
...
...
@@ -630,11 +634,11 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
}
const
onChangeTax
=
(
e
)
=>
{
setIsTax
(
e
.
target
.
checked
)
setIsTax
(
e
.
target
.
value
)
}
const
onChangeFreeTax
=
(
e
)
=>
{
setIsFreeTax
(
e
.
target
.
checked
)
setIsFreeTax
(
e
.
target
.
value
)
}
const
formValueChange
=
(
changeValue
,
values
)
=>
{
...
...
@@ -651,7 +655,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
}
else
{
setAssistantUniquePrice
((
Number
(
values
[
'uniquePrice'
]
||
0
)
*
Number
(
values
[
'assistantUniquePriceRate'
]
||
0
)
/
100
).
toFixed
(
2
))
}
setAssistantUniquePriceRate
(
values
[
'assistantUniquePriceRate'
])
setAssistantUniquePriceRate
(
values
[
'assistantUniquePriceRate'
]
||
0
)
}
return
(<>
...
...
@@ -824,7 +828,11 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
valuePropName=
"checked"
initialValue=
{
true
}
>
<
Checkbox
onChange=
{
onChangeTax
}
>
{
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.priceAttributeForm.form.isTax.check'
})
}
</
Checkbox
>
{
/* <Checkbox onChange={onChangeTax}>{intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.isTax.check' })}</Checkbox> */
}
<
Radio
.
Group
onChange=
{
onChangeTax
}
value=
{
isTax
}
>
<
Radio
value=
{
true
}
>
是
</
Radio
>
<
Radio
value=
{
false
}
>
否
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
{
isTax
?
...
...
@@ -847,13 +855,17 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
:
null
}
{
/*
<Form.Item
<
Form
.
Item
name=
"isFreeTax"
label=
{
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.priceAttributeForm.form.isTax'
})
}
valuePropName=
"checked"
initialValue=
{
true
}
>
<Checkbox onChange={onChangeFreeTax}>{intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.isTax.check' })}</Checkbox>
{
/* <Checkbox onChange={onChangeFreeTax}>{intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.isTax.check' })}</Checkbox> */
}
<
Radio
.
Group
onChange=
{
onChangeFreeTax
}
value=
{
isFreeTax
}
>
<
Radio
value=
{
true
}
>
是
</
Radio
>
<
Radio
value=
{
false
}
>
否
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
{
isFreeTax
?
...
...
@@ -875,7 +887,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
</
Form
.
Item
>
:
null
}
*/
}
}
</
Form
>
{
/* 批量设置按钮 */
}
{
...
...
src/pages/commodity/products/modifyDirectChannel.tsx
View file @
357331ae
...
...
@@ -307,7 +307,7 @@ const ModifyDirectChannel: React.FC<{}> = () => {
})
}
setPriceTableData
(
_newTabeData
)
constructedPrarams
()
//
constructedPrarams()
})
}
...
...
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