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
46f9c68e
Commit
46f9c68e
authored
Mar 14, 2022
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 品类属性多租户隐藏关联平台品类input,新增商品不先输入价格操作下一步清空属性选择
parent
ce662a55
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
82 additions
and
58 deletions
+82
-58
addAttribute.tsx
src/pages/classAndProperty/attribute/addAttribute.tsx
+27
-24
index.tsx
src/pages/classAndProperty/attribute/index.tsx
+1
-1
index.tsx
src/pages/classAndProperty/class/index.tsx
+9
-0
addPropertyValue.tsx
...pages/classAndProperty/propertyValue/addPropertyValue.tsx
+38
-30
index.tsx
src/pages/classAndProperty/propertyValue/index.tsx
+1
-1
addProducts.tsx
src/pages/commodity/products/addProducts.tsx
+4
-0
directChannel.tsx
src/pages/commodity/products/directChannel.tsx
+1
-1
index.tsx
...es/transaction/components/saleOrderProductTable/index.tsx
+1
-1
No files found.
src/pages/classAndProperty/attribute/addAttribute.tsx
View file @
46f9c68e
...
...
@@ -41,6 +41,7 @@ const AddAtttribute: React.FC<{}> = () => {
const
[
isSee
,
setIsSee
]
=
useState
(
false
)
// 判断查看依据
const
[
isSpecial
,
setIsSpecial
]
=
useState
(
false
)
//特殊属性禁用展示方式
const
[
submitLoading
,
setSubmitLoading
]
=
useState
<
boolean
>
(
false
)
const
{
isMultiple
}
=
history
.
location
.
query
useEffect
(()
=>
{
const
{
location
}
=
history
...
...
@@ -322,30 +323,32 @@ const AddAtttribute: React.FC<{}> = () => {
<
Input
disabled
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
18
}
>
<
Form
.
Item
label=
{
<
span
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.addAttribute.form.attributeGroupName'
})
}
<
Tooltip
title=
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.addAttribute.form.attributeGroupName.tooltip'
})
}
>
<
QuestionCircleOutlined
/>
</
Tooltip
>
</
span
>
}
>
<
Row
>
<
Col
span=
{
20
}
>
<
Form
.
Item
name=
{
[
'attribute'
,
'name'
]
}
style=
{
{
display
:
'none'
}
}
><
Input
disabled
/></
Form
.
Item
>
<
Form
.
Item
name=
"attributeShow"
noStyle
><
Input
disabled
/></
Form
.
Item
>
</
Col
>
<
Col
span=
{
4
}
>
<
Button
type=
"primary"
icon=
{
<
LinkOutlined
/>
}
disabled=
{
isSee
}
style=
{
{
backgroundColor
:
'#909399'
,
borderColor
:
'#909399'
}
}
onClick=
{
()
=>
handleLink
()
}
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.addAttribute.form.attributeGroupName.button'
})
}
</
Button
>
</
Col
>
</
Row
>
</
Form
.
Item
>
</
Col
>
{
!
isMultiple
&&
<
Col
span=
{
18
}
>
<
Form
.
Item
label=
{
<
span
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.addAttribute.form.attributeGroupName'
})
}
<
Tooltip
title=
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.addAttribute.form.attributeGroupName.tooltip'
})
}
>
<
QuestionCircleOutlined
/>
</
Tooltip
>
</
span
>
}
>
<
Row
>
<
Col
span=
{
20
}
>
<
Form
.
Item
name=
{
[
'attribute'
,
'name'
]
}
style=
{
{
display
:
'none'
}
}
><
Input
disabled
/></
Form
.
Item
>
<
Form
.
Item
name=
"attributeShow"
noStyle
><
Input
disabled
/></
Form
.
Item
>
</
Col
>
<
Col
span=
{
4
}
>
<
Button
type=
"primary"
icon=
{
<
LinkOutlined
/>
}
disabled=
{
isSee
}
style=
{
{
backgroundColor
:
'#909399'
,
borderColor
:
'#909399'
}
}
onClick=
{
()
=>
handleLink
()
}
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.addAttribute.form.attributeGroupName.button'
})
}
</
Button
>
</
Col
>
</
Row
>
</
Form
.
Item
>
</
Col
>
}
<
Col
span=
{
18
}
>
<
Form
.
Item
label=
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.addAttribute.form.isEnable'
})
}
...
...
src/pages/classAndProperty/attribute/index.tsx
View file @
46f9c68e
...
...
@@ -245,7 +245,7 @@ const Attribute: React.FC<{}> = () => {
const
Actions
=
(
<
Space
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
history
.
push
(
'/memberCenter/commodityAbility/classAndProperty/attribute/add'
)
}
}
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/attribute/add?isMultiple=${isMultiple}`
)
}
}
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.actions.button.1'
})
}
</
Button
>
{
...
...
src/pages/classAndProperty/class/index.tsx
View file @
46f9c68e
...
...
@@ -247,6 +247,15 @@ const ClassProperty: React.FC<{}> = () => {
onSubmit=
{
onFinish
}
actions=
{
formActions
}
effects=
{
(
$
,
action
)
=>
{
$
(
'onFormMount'
).
subscribe
(()
=>
{
console
.
log
(
isMultiple
,
'isMultiple'
)
if
(
isMultiple
)
{
action
.
setFieldState
(
'category'
,
state
=>
{
state
.
display
=
false
state
.
visible
=
false
})
}
})
flag
=
false
$
(
ON_FORM_INPUT_CHANGE
).
subscribe
(()
=>
{
setIsEditForm
(
true
)
...
...
src/pages/classAndProperty/propertyValue/addPropertyValue.tsx
View file @
46f9c68e
...
...
@@ -48,6 +48,9 @@ const AddPropertyValue: React.FC<{}> = () => {
const
[
customPlateformExpandkeys
,
setCustomPlateformExpandkeys
]
=
useState
<
any
>
()
const
[
submitLoading
,
setSubmitLoading
]
=
useState
<
boolean
>
(
false
)
const
{
isMultiple
}
=
history
.
location
.
query
/* 平台属性值列表树 */
const
{
treeData
,
...
...
@@ -99,21 +102,24 @@ const AddPropertyValue: React.FC<{}> = () => {
const
handleSubmitAllSetting
=
()
=>
{
setSubmitLoading
(
true
)
attrValueForm
.
validateFields
().
then
(
values
=>
{
const
{
attrId
,
attrName
,
type
}
=
history
.
location
.
query
const
{
attrId
,
attrName
,
type
,
isMultiple
}
=
history
.
location
.
query
let
pararms
:
any
=
{
...
values
}
delete
pararms
.
attributeName
if
(
JSON
.
stringify
(
pararms
.
attributeValue
)
===
'{}'
)
if
(
JSON
.
stringify
(
pararms
.
attributeValue
)
===
'{}'
)
{
delete
pararms
.
attributeValue
if
(
type
===
'2'
)
}
if
(
type
===
'2'
)
{
pararms
.
value
=
areaString
if
(
type
===
'1'
)
}
if
(
type
===
'1'
)
{
pararms
.
value
=
intl
.
formatMessage
({
id
:
'classAndProperty.addPropertyValue.datetText'
})
+
parseInt
(
Math
.
random
()
*
100
+
''
)
}
postProductCustomerSaveOrUpdateCustomerAttributeValue
(
pararms
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
// history.goBack()
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/propertyValue?attrId=
${
attrId
}
&attrName=
${
attrName
}
&type=
${
type
}
`
)
else
if
(
res
.
code
===
1000
)
{
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/propertyValue?attrId=
${
attrId
}
&attrName=
${
attrName
}
&type=
${
type
}
&isMultiple=
${
isMultiple
}
`
)
}
else
{
setSubmitLoading
(
false
)
}
})
}).
catch
(
error
=>
{
...
...
@@ -256,28 +262,30 @@ const AddPropertyValue: React.FC<{}> = () => {
</
Form
.
Item
>
}
</
Col
>
<
Col
span=
{
18
}
>
<
Form
.
Item
label=
{
<
span
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.addPropertyValue.form.paltformValue'
})
}
<
Tooltip
title=
{
intl
.
formatMessage
({
id
:
'classAndProperty.addPropertyValue.form.paltformValue.tooltip'
})
}
>
<
QuestionCircleOutlined
/>
</
Tooltip
>
</
span
>
}
>
<
Row
>
<
Col
span=
{
20
}
style=
{
{
display
:
'none'
}
}
><
Form
.
Item
name=
{
[
'attributeValue'
,
'id'
]
}
><
Input
disabled
/></
Form
.
Item
></
Col
>
<
Col
span=
{
20
}
><
Form
.
Item
name=
{
[
'attributeValue'
,
'value'
]
}
><
Input
disabled
/></
Form
.
Item
></
Col
>
<
Col
span=
{
4
}
>
<
Button
type=
"primary"
icon=
{
<
LinkOutlined
/>
}
style=
{
{
backgroundColor
:
'#909399'
,
borderColor
:
'#909399'
}
}
onClick=
{
handleLink
}
disabled=
{
isSee
}
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.addPropertyValue.form.paltformValue.button'
})
}
</
Button
>
</
Col
>
</
Row
>
</
Form
.
Item
>
</
Col
>
{
!
isMultiple
&&
<
Col
span=
{
18
}
>
<
Form
.
Item
label=
{
<
span
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.addPropertyValue.form.paltformValue'
})
}
<
Tooltip
title=
{
intl
.
formatMessage
({
id
:
'classAndProperty.addPropertyValue.form.paltformValue.tooltip'
})
}
>
<
QuestionCircleOutlined
/>
</
Tooltip
>
</
span
>
}
>
<
Row
>
<
Col
span=
{
20
}
style=
{
{
display
:
'none'
}
}
><
Form
.
Item
name=
{
[
'attributeValue'
,
'id'
]
}
><
Input
disabled
/></
Form
.
Item
></
Col
>
<
Col
span=
{
20
}
><
Form
.
Item
name=
{
[
'attributeValue'
,
'value'
]
}
><
Input
disabled
/></
Form
.
Item
></
Col
>
<
Col
span=
{
4
}
>
<
Button
type=
"primary"
icon=
{
<
LinkOutlined
/>
}
style=
{
{
backgroundColor
:
'#909399'
,
borderColor
:
'#909399'
}
}
onClick=
{
handleLink
}
disabled=
{
isSee
}
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.addPropertyValue.form.paltformValue.button'
})
}
</
Button
>
</
Col
>
</
Row
>
</
Form
.
Item
>
</
Col
>
}
<
Col
span=
{
18
}
>
<
Form
.
Item
name=
'attributeName'
...
...
src/pages/classAndProperty/propertyValue/index.tsx
View file @
46f9c68e
...
...
@@ -400,7 +400,7 @@ const PropertyValue: React.FC<{}> = () => {
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/propertyValue/add?attrId=${selectKey || history.location.query.attrId}&attrName=${selectNode?._title || history.location.query.attrName}&type=${selectNode?.type || history.location.query.type}`
)
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/propertyValue/add?attrId=${selectKey || history.location.query.attrId}&attrName=${selectNode?._title || history.location.query.attrName}&type=${selectNode?.type || history.location.query.type}
&isMultiple=${isMultiple}
`
)
}
}
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.propertyValue.standardTable.formilyChilds.button'
})
}
...
...
src/pages/commodity/products/addProducts.tsx
View file @
46f9c68e
...
...
@@ -366,6 +366,10 @@ const AddProducts: React.FC<{}> = (props) => {
setIsDisableSaveBtn
(
false
)
message
.
error
(
e
.
message
||
intl
.
formatMessage
({
id
:
'commodity.products.addProducts.onSave.error.2'
}))
}
// 新增不先填价格 清空属性form
if
(
childFormRefs
.
current
[
1
].
current
.
__INTERNAL__
.
name
===
'attribute-form'
&&
!
productInfoByEdit
)
{
childFormRefs
.
current
[
1
].
current
.
resetFields
()
}
console
.
log
(
e
,
'e'
)
}).
catch
(
error
=>
{
console
.
log
(
error
,
'_error'
)
...
...
src/pages/commodity/products/directChannel.tsx
View file @
46f9c68e
...
...
@@ -201,7 +201,7 @@ const DirectChannel: React.FC<{}> = () => {
})
},
onCancel
()
{
console
.
log
(
'Cancel'
)
;
console
.
log
(
'Cancel'
)
},
})
else
...
...
src/pages/transaction/components/saleOrderProductTable/index.tsx
View file @
46f9c68e
...
...
@@ -271,7 +271,7 @@ export const MoneyTotalBox = ({ dataSource, isEditData, setCouponModalVisible })
{
!
creditsCommodity
&&
<
Col
span=
{
2
}
>
<
div
>
{
intl
.
formatMessage
({
id
:
'transaction_components.jifendikou'
})
}
</
div
>
<
div
>
{
`-
¥
${deductionAmount}`
}
</
div
>
<
div
>
{
`-
${intl.formatMessage({ id: 'common.money' })}
${deductionAmount}`
}
</
div
>
</
Col
>
}
{
...
...
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