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
linweijiong
jinfa-platform
Commits
0ddd86f1
Commit
0ddd86f1
authored
Dec 16, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复新增属性勾选价格属性必须勾选必填项,处理前面非必填项价格属性组合出来的商品编辑出错问题
parent
b2d5a596
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
47 deletions
+17
-47
addAttribute.tsx
src/pages/classAndProperty/attribute/addAttribute.tsx
+9
-1
priceAttributeForm.tsx
...commodity/products/addProductsItem/priceAttributeForm.tsx
+0
-0
index.tsx
...nsaction/purchaseOrder/readyDelevedOrder/detail/index.tsx
+6
-44
useSelfTable.tsx
...on/purchaseOrder/readyDelevedOrder/model/useSelfTable.tsx
+1
-1
index.ts
src/store/product/index.ts
+1
-1
No files found.
src/pages/classAndProperty/attribute/addAttribute.tsx
View file @
0ddd86f1
...
...
@@ -160,6 +160,14 @@ const AddAtttribute: React.FC<{}> = () => {
menuForm
.
setFieldsValue
({
isDate
:
false
})
}
const
priceAttributeChange
=
(
e
)
=>
{
if
(
e
.
target
.
checked
)
{
menuForm
.
setFieldsValue
({
"isEmpty"
:
true
})
}
else
{
menuForm
.
setFieldsValue
({
"isEmpty"
:
false
})
}
}
return
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.addAttribute.back'
})
}
/>
}
...
...
@@ -261,7 +269,7 @@ const AddAtttribute: React.FC<{}> = () => {
</Col> */
}
<
Col
span=
{
24
}
>
{
/* 规格属性 -> 原价格属性 */
}
<
Form
.
Item
name=
"isPrice"
valuePropName=
"checked"
initialValue=
{
false
}
noStyle
><
Checkbox
disabled=
{
isSee
}
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.addAttribute.form.isPrice'
})
}
</
Checkbox
></
Form
.
Item
>
<
Form
.
Item
name=
"isPrice"
valuePropName=
"checked"
initialValue=
{
false
}
noStyle
><
Checkbox
onChange=
{
priceAttributeChange
}
disabled=
{
isSee
}
>
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.addAttribute.form.isPrice'
})
}
</
Checkbox
></
Form
.
Item
>
<
Tooltip
title=
{
intl
.
formatMessage
({
id
:
'classAndProperty.attribute.addAttribute.form.isPrice.tooltip'
})
}
>
<
InfoCircleOutlined
/>
</
Tooltip
>
...
...
src/pages/commodity/products/addProductsItem/priceAttributeForm.tsx
View file @
0ddd86f1
This diff is collapsed.
Click to expand it.
src/pages/transaction/purchaseOrder/readyDelevedOrder/detail/index.tsx
View file @
0ddd86f1
import
React
,
{
useCallback
,
useRef
}
from
'react'
;
import
React
from
'react'
;
import
{
OrderDetailContext
}
from
'../../../_public/order/context'
;
import
{
Button
}
from
'antd'
;
import
OrderDetailHeader
from
'@/pages/transaction/components/orderDetailHeader'
;
import
OrderDetailWrapper
from
'@/pages/transaction/components/orderDetailWrapper'
;
import
PreLoading
from
'@/components/PreLoading'
;
import
{
useOrderDetail
}
from
'../../../_public/order/effects/useOrderDetail'
;
import
OrderHandDeleved
from
'../../../components/orderHandDeleved'
;
import
OrderDetailSection
from
'../../../components/orderDetailSection'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
useIntl
}
from
'umi'
;
const
ReadyConfirmDelevedOrderDetail
:
React
.
FC
=
()
=>
{
const
{
formContext
,
id
,
detailList
}
=
useOrderDetail
({
type
:
's_readyConfirmDelevedOrder'
})
const
{
batchNo
}
=
usePageStatus
()
const
intl
=
useIntl
()
// // 是否是手工发货
// const isHandDeleved = formContext.data && formContext.data.purchaseOrderInteriorState === SaleOrderInsideWorkState.HAND_DELEVED_ORDER
// // 所有发货单都是否已经发货了
// const isShowBtn = isHandDeleved || formContext.data?.orderDeliveryDetailsResponses?.some(v => v.interiorState === DeliverySideState.ADD_LOGISTICS_ORDER)
// 是否发过货
// const isHandDeleved = Number(batchNo) <= 0
const
isHandDeleved
=
true
// 是否发货完成
const
approvedRef
=
useRef
<
any
>
({})
const
handleClick
=
useCallback
(()
=>
{
if
(
isHandDeleved
)
{
approvedRef
.
current
.
setVisible
(
true
)
}
else
{
const
deleveBox
=
document
.
querySelector
(
'#deleveBox'
)
as
any
window
.
scrollTo
(
0
,
deleveBox
.
offsetTop
)
}
},
[
isHandDeleved
])
const
ReadyDelevedOrderDetail
:
React
.
FC
=
()
=>
{
const
{
formContext
,
detailList
}
=
useOrderDetail
({
type
:
'purchaseOrder'
})
return
(
<
div
>
<
OrderDetailContext
.
Provider
value=
{
formContext
}
>
<
OrderDetailHeader
detailList=
{
detailList
}
detailData=
{
formContext
.
data
}
extraRight=
{
<
Button
type=
'primary'
onClick=
{
handleClick
}
>
{
isHandDeleved
?
intl
.
formatMessage
({
id
:
'saleOrder.querenshougongfa'
,
defaultMessage
:
'确认手工发货'
})
:
intl
.
formatMessage
({
id
:
'saleOrder.qufahuo'
,
defaultMessage
:
'去发货'
})
}
</
Button
>
}
/>
<
OrderDetailHeader
detailList=
{
detailList
}
detailData=
{
formContext
.
data
}
/>
<
OrderDetailWrapper
>
<
PreLoading
loading=
{
!
formContext
.
data
}
active
paragraph=
{
{
rows
:
6
}
}
>
<
OrderDetailSection
formContext=
{
formContext
}
type=
'saleOrder'
/>
<
OrderDetailSection
formContext=
{
formContext
}
/>
</
PreLoading
>
</
OrderDetailWrapper
>
{
/* 提交时触发的弹窗集合 */
}
<
OrderHandDeleved
currentRef=
{
approvedRef
}
/>
</
OrderDetailContext
.
Provider
>
</
div
>
);
};
export
default
Ready
Confirm
DelevedOrderDetail
;
export
default
ReadyDelevedOrderDetail
;
src/pages/transaction/purchaseOrder/readyDelevedOrder/model/useSelfTable.tsx
View file @
0ddd86f1
...
...
@@ -21,7 +21,7 @@ export const useSelfTable = () => {
render
:
(
text
,
record
)
=>
{
// 查看订单, 需根据状态显示不同schema
return
(
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/
saleOrder/readyConfirmDelevedOrder/preview
?id=${record.orderId}`
}
>
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/
purchaseOrder/readyDelevedOrder/detail
?id=${record.orderId}`
}
>
{
text
}
</
EyePreview
>
)
...
...
src/store/product/index.ts
View file @
0ddd86f1
...
...
@@ -66,7 +66,7 @@ class ProductStore implements IProductModule {
tempObj
[
item
]
=
attributeValueIdArr
[
index
]
}
else
if
(
this
.
attributeLists
.
filter
(
_item
=>
_item
.
id
===
item
)[
0
]?.
type
===
3
){
// 输入
tempObj
[
item
]
=
attributeValueArr
[
index
][
0
]
.
value
tempObj
[
item
]
=
attributeValueArr
[
index
][
0
]
?.
value
||
''
}
else
{
tempObj
[
item
]
=
attributeValueIdArr
[
index
][
0
]
...
...
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