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
27c98491
Commit
27c98491
authored
Dec 03, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:处理编辑交易规则商品无分页问题,处理销售订单商品区块修改价格后乱序问题,处理商城跳转过来的订单会员折扣传参异常
parent
3e251647
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
17 additions
and
15 deletions
+17
-15
index.tsx
...es/transaction/components/saleOrderProductTable/index.tsx
+2
-2
index.tsx
...transaction/purchaseOrder/orderCollect/constant/index.tsx
+1
-2
index.ts
...s/transaction/purchaseOrder/orderCollect/effects/index.ts
+2
-2
index.tsx
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
+1
-1
useProductTable.tsx
...tion/purchaseOrder/orderCollect/model/useProductTable.tsx
+2
-3
index.ts
...es/transaction/purchaseOrder/orderCollect/schema/index.ts
+0
-0
useSelfTable.tsx
...action/purchaseOrder/readyPayOrder/model/useSelfTable.tsx
+7
-2
useSelfTable.tsx
...saleOrder/readyConfirmDelevedOrder/model/useSelfTable.tsx
+1
-1
RuleSetting.tsx
...s/transaction/transactionRules/components/RuleSetting.tsx
+1
-1
index.tsx
src/pages/transaction/transactionRules/schema/index.tsx
+0
-1
No files found.
src/pages/transaction/components/saleOrderProductTable/index.tsx
View file @
27c98491
...
...
@@ -363,7 +363,7 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
})
ctl
.
setData
({
...
data
,
orderProductRequests
:
newData
orderProductRequests
:
newData
.
sort
((
a
,
b
)
=>
a
.
id
-
b
.
id
)
})
};
...
...
@@ -479,7 +479,7 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
<
MellowCard
title=
'订单商品'
style=
{
{
marginTop
:
24
}
}
bordered=
{
false
}
>
<
Table
columns=
{
columns
}
dataSource=
{
orderProductRequests
}
dataSource=
{
orderProductRequests
.
sort
((
a
,
b
)
=>
a
.
id
-
b
.
id
)
}
components=
{
productComponents
}
rowKey=
'id'
pagination=
{
false
}
...
...
src/pages/transaction/purchaseOrder/orderCollect/constant/index.tsx
View file @
27c98491
...
...
@@ -4,7 +4,6 @@ import { Row, Space, Popover } from 'antd'
import
{
DELIVERY_TYPE
,
OrderModalType
,
PurchaseOrderOutWorkStateTexts
}
from
'@/constants'
import
{
EnvironmentOutlined
}
from
'@ant-design/icons'
import
{
PublicApi
}
from
'@/services/api'
import
{
toPercent
}
from
'@/utils/type'
// 简单控制价格区间的组件
// @todo 后续需要优化, 样式,目录文件等。
...
...
@@ -295,7 +294,7 @@ export const productInfoColumns: any[] = [
dataIndex
:
'memberPrice'
,
align
:
'center'
,
key
:
'memberPrice'
,
render
:
(
text
,
record
)
=>
record
.
isMemberPrice
?
toPercent
(
text
)
:
null
render
:
(
text
,
record
)
=>
record
.
isMemberPrice
&&
text
?
text
*
100
+
'%'
:
null
},
{
title
:
'采购数量'
,
...
...
src/pages/transaction/purchaseOrder/orderCollect/effects/index.ts
View file @
27c98491
...
...
@@ -89,7 +89,6 @@ export const useEditHideField = () => {
export
const
useProductTableChangeForPay
=
(
ctx
:
ISchemaFormActions
|
ISchemaFormAsyncActions
,
update
)
=>
{
FormEffectHooks
.
onFieldValueChange$
(
'orderProductRequests'
).
subscribe
(
state
=>
{
const
{
value
}
=
state
console
.
log
(
value
,
'vlaue'
)
const
payInfoData
=
ctx
.
getFieldValue
(
'paymentInformationResponses'
)
// 强制渲染一次, 用于触发金额总数
update
()
...
...
@@ -183,7 +182,8 @@ export const useOrderFormInitEffect = (ctx: ISchemaFormActions | ISchemaFormAsyn
commodityId
:
v
.
id
,
// 添加commodityId用于判断是商品价格是使用price字段还是unitPrice字段(也可判断是报价订单还是其他)
memberPrice
:
v
.
memberDiscount
!==
1
?
v
.
memberDiscount
:
1
,
// 添加会员折扣
}
})))
})
))
}
// 回显的数据保存在表单中, 当切换下单模式时,可以再次回显
...
...
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
View file @
27c98491
...
...
@@ -72,7 +72,7 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => {
orderProductList
:
logsiticsDataMaps
.
map
(
v
=>
({
templateId
:
v
.
logistics
.
templateId
,
weight
:
v
.
logistics
.
weight
,
count
:
v
?.
purchaseCount
||
0
count
:
v
?.
purchaseCount
||
null
})),
receiverAddressId
:
typeof
receiverAddressId
===
'object'
?
receiverAddressId
.
id
:
receiverAddressId
},
{
ttl
:
10
*
1000
,
useCache
:
true
,
ctlType
:
'none'
}).
then
(
res
=>
{
...
...
src/pages/transaction/purchaseOrder/orderCollect/model/useProductTable.tsx
View file @
27c98491
...
...
@@ -48,9 +48,9 @@ export const getUnitPriceTotal = (record) => {
// let memberPrice = record.memberPrice !== 1 ? toPoint(record.memberPrice) : 1
let
memberPrice
=
record
.
memberPrice
if
(
record
.
isMemberPrice
)
{
return
unitPrice
*
purchaseCount
*
memberPrice
return
Number
((
unitPrice
*
purchaseCount
*
memberPrice
).
toFixed
(
2
))
}
else
{
return
unitPrice
*
purchaseCount
return
Number
((
unitPrice
*
purchaseCount
).
toFixed
(
2
))
}
}
export
const
useProductTable
=
(
ctx
:
ISchemaFormActions
|
ISchemaFormAsyncActions
)
=>
{
...
...
@@ -105,7 +105,6 @@ export const useProductTable = (ctx: ISchemaFormActions | ISchemaFormAsyncAction
const
newData
=
[...
ctx
.
getFieldValue
(
'orderProductRequests'
)];
const
index
=
newData
.
findIndex
(
item
=>
row
.
id
===
item
.
id
);
const
item
=
newData
[
index
];
console
.
log
(
getUnitPriceTotal
(
row
),
'row'
)
row
[
'money'
]
=
getUnitPriceTotal
(
row
)
// 新增的时候接口字段id,commodityId 编辑的时候id,productId
row
[
'productId'
]
=
row
?.
commodityId
?
row
.
id
:
row
.
productId
...
...
src/pages/transaction/purchaseOrder/orderCollect/schema/index.ts
View file @
27c98491
src/pages/transaction/purchaseOrder/readyPayOrder/model/useSelfTable.tsx
View file @
27c98491
...
...
@@ -4,7 +4,7 @@ import { Button, Row, Col, Progress, Popconfirm } from 'antd'
import
{
PublicApi
}
from
'@/services/api'
import
EyePreview
from
'@/components/EyePreview'
import
{
formatTimeString
}
from
'@/utils'
import
{
ORDER_TYPE
,
PurchaseOrderOutWorkState
}
from
'@/constants'
import
{
ORDER_TYPE
,
PurchaseOrder
InsideWorkState
,
PurchaseOrder
OutWorkState
}
from
'@/constants'
import
StatusColors
from
'../../components/StatusColors'
import
{
FieldTimeOutlined
}
from
'@ant-design/icons'
import
{
...
...
@@ -162,7 +162,12 @@ export const useSelfTable = (props) => {
<
Link
to=
{
`/memberCenter/tranactionAbility/purchaseOrder/readyPayOrder/detail?id=${record.id}`
}
>
去支付
</
Link
>
}
{
(
record
.
externalState
===
PurchaseOrderOutWorkState
.
PAY_ORDER
&&
!
record
.
signatureLogId
||
record
.
externalState
===
PurchaseOrderOutWorkState
.
CONFIRM_NOT_ARRIVED_ACCOUNT
)
&&
(
record
.
externalState
===
PurchaseOrderOutWorkState
.
PAY_ORDER
&&
!
record
.
signatureLogId
||
record
.
externalState
===
PurchaseOrderOutWorkState
.
CONFIRM_NOT_ARRIVED_ACCOUNT
&&
record
.
interiorState
!==
PurchaseOrderInsideWorkState
.
PAY_SUCCESS
)
&&
<
Popconfirm
title=
"是否要取消该订单?"
onConfirm=
{
()
=>
handleCancel
(
record
.
id
)
}
...
...
src/pages/transaction/saleOrder/readyConfirmDelevedOrder/model/useSelfTable.tsx
View file @
27c98491
...
...
@@ -60,7 +60,7 @@ export const useSelfTable = () => {
align
:
'center'
,
dataIndex
:
'sumPrice'
,
key
:
'sumPrice'
,
render
:
text
=>
'¥'
+
tex
t
render
:
(
t
,
r
)
=>
(
r
.
type
===
7
||
r
.
type
===
8
)
?
t
:
'¥'
+
t
},
{
title
:
'发货批次'
,
align
:
'center'
,
dataIndex
:
'shipmentBatch'
,
key
:
'shipmentBatch'
,
render
:
text
=>
text
?
`第
${
text
}
次`
:
''
},
// @todo 发货单号跳转
...
...
src/pages/transaction/transactionRules/components/RuleSetting.tsx
View file @
27c98491
...
...
@@ -239,7 +239,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
async
function
getInitValue
()
{
const
{
data
}
=
await
PublicApi
.
getOrderTradingRulesDetails
({
id
:
id
})
if
(
data
.
isTacitlyApprove
===
2
)
{
const
res
=
await
getBindingProducts
({
id
:
id
.
toString
(),
current
:
'1'
,
pageSize
:
'10'
})
const
res
=
await
getBindingProducts
({
id
:
id
.
toString
(),
current
:
'1'
,
pageSize
:
'10
00
'
})
addSchemaAction
.
setFieldState
(
'products'
,
state
=>
{
state
.
value
=
res
.
data
})
...
...
src/pages/transaction/transactionRules/schema/index.tsx
View file @
27c98491
...
...
@@ -176,7 +176,6 @@ export const ruleDetailSchema: ISchema = padRequiredMessage({
rowKey
:
'id'
,
columns
:
"{{tableColumns}}"
,
prefix
:
"{{tableAddButton}}"
,
idNotList
:
[]
}
}
}
...
...
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